feat(media): web view skeleton for Media Studio
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NLSCTnhge4umMnemGXWr1w
This commit is contained in:
parent
b4083844ce
commit
884d8903ca
6
apps/web/src/pages/media/BrandKitView.tsx
Normal file
6
apps/web/src/pages/media/BrandKitView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-editor slice replaces this view. */
|
||||||
|
export function BrandKitView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/CollectionView.tsx
Normal file
6
apps/web/src/pages/media/CollectionView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-library slice replaces this view. */
|
||||||
|
export function CollectionView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/EditorView.tsx
Normal file
6
apps/web/src/pages/media/EditorView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-editor slice replaces this view. */
|
||||||
|
export function EditorView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/LibraryView.tsx
Normal file
6
apps/web/src/pages/media/LibraryView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-library slice replaces this view. */
|
||||||
|
export function LibraryView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
34
apps/web/src/pages/media/MediaStudio.tsx
Normal file
34
apps/web/src/pages/media/MediaStudio.tsx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { useState } from "react";
|
||||||
|
import { BrandKitView } from "./BrandKitView";
|
||||||
|
import { CollectionView } from "./CollectionView";
|
||||||
|
import { EditorView } from "./EditorView";
|
||||||
|
import { LibraryView } from "./LibraryView";
|
||||||
|
import type { MediaView } from "./nav";
|
||||||
|
import { PeopleView } from "./PeopleView";
|
||||||
|
import { ProjectView } from "./ProjectView";
|
||||||
|
import { ResultsView } from "./ResultsView";
|
||||||
|
import { ReviewView } from "./ReviewView";
|
||||||
|
|
||||||
|
/** Media Studio surface. Chrome (header, close, tabs) belongs to the W3-web-library slice. */
|
||||||
|
export function MediaStudio({ onClose }: { onClose: () => void }) {
|
||||||
|
const [view, setView] = useState<MediaView>({ name: "library" });
|
||||||
|
const props = { navigate: setView, onClose };
|
||||||
|
switch (view.name) {
|
||||||
|
case "library":
|
||||||
|
return <LibraryView {...props} />;
|
||||||
|
case "collection":
|
||||||
|
return <CollectionView {...props} collectionId={view.collectionId} />;
|
||||||
|
case "people":
|
||||||
|
return <PeopleView {...props} />;
|
||||||
|
case "results":
|
||||||
|
return <ResultsView {...props} />;
|
||||||
|
case "project":
|
||||||
|
return <ProjectView {...props} projectId={view.projectId} />;
|
||||||
|
case "editor":
|
||||||
|
return <EditorView {...props} projectId={view.projectId} planId={view.planId} />;
|
||||||
|
case "review":
|
||||||
|
return <ReviewView {...props} projectId={view.projectId} renderId={view.renderId} />;
|
||||||
|
case "brandKit":
|
||||||
|
return <BrandKitView {...props} brandKitId={view.brandKitId} />;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/PeopleView.tsx
Normal file
6
apps/web/src/pages/media/PeopleView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-library slice replaces this view. */
|
||||||
|
export function PeopleView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/ProjectView.tsx
Normal file
6
apps/web/src/pages/media/ProjectView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-editor slice replaces this view. */
|
||||||
|
export function ProjectView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/ResultsView.tsx
Normal file
6
apps/web/src/pages/media/ResultsView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-library slice replaces this view. */
|
||||||
|
export function ResultsView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
6
apps/web/src/pages/media/ReviewView.tsx
Normal file
6
apps/web/src/pages/media/ReviewView.tsx
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import type { MediaViewProps } from "./nav";
|
||||||
|
|
||||||
|
/** Placeholder; the W3-web-editor slice replaces this view. */
|
||||||
|
export function ReviewView(_props: MediaViewProps & Record<string, unknown>) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
14
apps/web/src/pages/media/nav.ts
Normal file
14
apps/web/src/pages/media/nav.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/** Screens inside Media Studio. Every view receives `navigate` to move between them. */
|
||||||
|
export type MediaView =
|
||||||
|
| { name: "library" }
|
||||||
|
| { name: "collection"; collectionId: string }
|
||||||
|
| { name: "people" }
|
||||||
|
| { name: "results" }
|
||||||
|
| { name: "project"; projectId: string }
|
||||||
|
| { name: "editor"; projectId: string; planId: string }
|
||||||
|
| { name: "review"; projectId: string; renderId: string }
|
||||||
|
| { name: "brandKit"; brandKitId?: string };
|
||||||
|
|
||||||
|
export interface MediaViewProps {
|
||||||
|
navigate: (view: MediaView) => void;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user