ported from the standalone app's hash-tab UI. The panels do not coordinate through props (the panel contract only ever hands a component its panelId) or usePanelChannel-as-selection: - Gallery's lightbox is ?selected=<id>, Collections' detail is ?collection=<id> — different names since both panels render on the same route at once - Generate bumps useAtelierRefresh (added to officerdev/src/channels.ts) when a job finishes; Gallery subscribes to it — a genuine signal, not a selection, so it stays a channel images render through GET /files/:filename with a ?token= query param appended client-side (lib/api.ts's fileUrl), the same escape hatch FileViewer and the music plugin use for exactly this: a browser cannot set an Authorization header on an <img src>. Providers is not here — see PLUGIN.md for why it became a platform settings screen instead. assets/icon.png and assets/splash.png are [placeholder] flat swatches, not real artwork — see assets/PLACEHOLDER.md.
20 lines
1.3 KiB
TypeScript
20 lines
1.3 KiB
TypeScript
import type { AppRegistryMeta } from 'officerdev';
|
|
import { Sparkles, GalleryHorizontalEnd, FolderOpen } from 'lucide-react';
|
|
import { Generate } from './Generate/Generate';
|
|
import { Gallery } from './Gallery/Gallery';
|
|
import { Collections } from './Collections/Collections';
|
|
|
|
// No component re-exports. `panels.ts` declares PANELS — the shell mounts them by key and there is no
|
|
// way to export a component from a plugin.
|
|
//
|
|
// The three coordinate through the URL and one refresh channel, never through props: Gallery reads
|
|
// `?selected=<id>` for its lightbox, Collections reads `?collection=<id>` for its detail view — two
|
|
// different param names on purpose, since both panels render on the same route at once and would
|
|
// otherwise fight over one param. Generate bumps `useAtelierRefresh` (officerdev/src/channels.ts) when
|
|
// a job finishes; Gallery subscribes to it. See plugins/atelier/PLUGIN.md.
|
|
export const appRegistryMetas: AppRegistryMeta[] = [
|
|
{ key: 'atelier-generate', name: 'Generate', icon: Sparkles, component: Generate, availableOnPanel: false },
|
|
{ key: 'atelier-gallery', name: 'Gallery', icon: GalleryHorizontalEnd, component: Gallery, availableOnPanel: false },
|
|
{ key: 'atelier-collections', name: 'Collections', icon: FolderOpen, component: Collections, availableOnPanel: false },
|
|
];
|