@manifest-editor/exhibition-preset 1.4.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -3607
- package/dist/index.css +69 -783
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +5 -3
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -3683
- package/dist/index.js.map +1 -0
- package/package.json +30 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["tourStepAnnotations: AnnotationPanel","exhibitionCenterPanel: LayoutPanel","exhibitionOverviewLeftPanel: LayoutPanel","exhibitionBackgroundTask: BackgroundPanel","imageBlockEditor: CanvasEditorDefinition","infoBlockEditor: CanvasEditorDefinition","youtubeMainEdtior: CanvasEditorDefinition","ExhibitionItem","exhibitionGridLeftPanel: LayoutPanel","exhibitionCanvasEditor: EditorDefinition","ExhibitionRightPanel","exhibitionSummaryEdtior: EditorDefinition","ExhibitionRightPanel","exhibitionTourSteps: EditorDefinition","customBehaviourEditor: EditorDefinition","exhibitionConfigs: BehaviorEditorProps[\"configs\"]"],"sources":["../src/annotations/TourStepAnnotations.tsx","../src/center-panels/ExhibitionCenterPanel.tsx","../src/left-panels/ExhibitionOverview.tsx","../src/background-panel.tsx","../src/helpers.ts","../src/canvas-editors/image-block-editor.tsx","../src/canvas-editors/info-block-editor.tsx","../src/canvas-editors/youtube-editor.tsx","../src/creators/image-browser-slide-creator.tsx","../src/creators/image-service-slide-creator.tsx","../src/creators/image-slide-creator.tsx","../src/creators/image-url-slide.tsx","../src/creators/info-box-creator.tsx","../src/creators/video-slide-creator.tsx","../src/creators/youtube-slide-creator.tsx","../src/components/ExhibitionContainer.tsx","../src/components/ExhibitionItem.tsx","../src/components/ExhibitionGrid.tsx","../src/icons/ResizeHandleIcon.tsx","../src/components/SortableExhibitionItem.tsx","../src/components/SortableExhibitionGrid.tsx","../src/left-panels/ExhibitionGrid.tsx","../src/components/ExhibitionItemConversion.tsx","../src/right-panels/ExhibitionCanvasEditor.tsx","../src/right-panels/ExhibitionSummaryEditor.tsx","../src/icons/CheckIcon.tsx","../src/components/ExhibitionTourStepPopup.tsx","../src/components/PendingTourStepAnnotation.tsx","../src/components/ActionButtonPopupSwitcher.tsx","../src/components/TourNormalAnnotationEditor.tsx","../src/components/TourPaintingAnnotationEditor.tsx","../src/components/TourAnnotationEditor.tsx","../src/components/TourAnnotationPageEditor.tsx","../src/right-panels/ExhibitionTourSteps.tsx","../src/components/AspectRatioWarning.tsx","../src/right-panels/SlideBehaviours.tsx","../src/index.tsx"],"sourcesContent":["import { ViewerAnnotationPage } from \"@manifest-editor/editors\";\nimport { type AnnotationPanel, useAtlasStore, useLayoutState } from \"@manifest-editor/shell\";\nimport { AnnotationPageContext, useCanvas } from \"react-iiif-vault\";\nimport { useStore } from \"zustand\";\n\nexport const tourStepAnnotations: AnnotationPanel = {\n id: \"@exhibition/tour-step-annotations\",\n label: \"Tour steps\",\n render: () => <TourStepAnnotations />,\n};\n\nfunction TourStepAnnotations() {\n const canvas = useCanvas();\n const store = useAtlasStore();\n const toolEnabled = useStore(store, (s) => s.tool.enabled);\n const { rightPanel } = useLayoutState();\n const isRightPanel = rightPanel.current === \"@manifest-editor/editor\";\n const isTour = isRightPanel && rightPanel.state?.currentTab?.startsWith(\"@exhibition/tour-steps\");\n const firstAnnotationPage = canvas?.annotations[0];\n\n if (!isTour || !canvas || toolEnabled || !firstAnnotationPage) {\n return null;\n }\n\n return (\n <>\n <AnnotationPageContext annotationPage={firstAnnotationPage.id}>\n <ViewerAnnotationPage />\n </AnnotationPageContext>\n </>\n );\n}\n","import { EditTextIcon } from \"@manifest-editor/components\";\nimport { CanvasPanelEditor, CanvasPanelViewer } from \"@manifest-editor/editors\";\nimport {\n EditingStackContext,\n InlineEditingStack,\n type LayoutPanel,\n useLayoutActions,\n usePanelActions,\n} from \"@manifest-editor/shell\";\nimport { DelftExhibition } from \"exhibition-viewer\";\nimport { type EditorHooks, EditorHooksProvider } from \"exhibition-viewer/library\";\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport { Button } from \"react-aria-components\";\nimport { CanvasContext, useManifest, useVault } from \"react-iiif-vault\";\n\nexport const exhibitionCenterPanel: LayoutPanel = {\n id: \"@exhibitions/center-panel\", // We are overriding the default canvas listing panel\n label: \"Exhibition editor\",\n icon: null,\n render: () => <ExhibitionCenterPanel />,\n options: {\n minWidth: 350,\n maxWidth: 350,\n },\n};\n\nfunction ExhibitionCenterPanel() {\n const manifest = useManifest();\n const vault = useVault();\n const [scale, setScale] = useState(0.8);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const { edit, leftPanel } = useLayoutActions();\n\n const hooks = useMemo(() => {\n return {\n localeStringEditor: (props) => {\n return (\n <span className=\"inline-flex items-center hover:ring-4 hover:ring-me-primary-500\">\n {props.original}\n <Button className=\"py-1 px-2 inline-block\" onPress={() => edit(props.resource)}>\n <EditTextIcon className=\"text-xl\" />\n </Button>\n </span>\n );\n },\n canvasPreviewEditor: (props) => {\n return (\n <div className=\"w-full h-full flex-1 flex relative\">\n {props.original}\n <button\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n edit(props.resource);\n leftPanel.open({ id: \"canvas-listing\", open: true });\n }}\n className=\"absolute top-5 right-5 bg-white text-black p-2 rounded z-40\"\n >\n EDIT\n </button>\n </div>\n );\n },\n } satisfies EditorHooks;\n }, []);\n\n useLayoutEffect(() => {\n if (wrapperRef.current) {\n const wrapperWidth = wrapperRef.current.offsetWidth;\n const initialScale = wrapperWidth / 1200;\n setScale(Math.max(1, initialScale));\n }\n }, []);\n\n if (!manifest) return null;\n\n return (\n <div ref={wrapperRef} className=\"overflow-y-auto delft-exhibition\">\n <EditorHooksProvider hooks={hooks}>\n <DelftExhibition\n key={scale}\n skipLoadManifest\n customVault={vault}\n manifest={manifest.id}\n options={{\n disablePresentation: true,\n hideTableOfContents: true,\n hideTitle: true,\n alternativeImageMode: true,\n }}\n />\n </EditorHooksProvider>\n </div>\n );\n}\n","import { InfoIcon } from \"@manifest-editor/components\";\nimport type { LayoutPanel } from \"@manifest-editor/shell\";\nimport { useManifest } from \"react-iiif-vault\";\n\nexport const exhibitionOverviewLeftPanel: LayoutPanel = {\n id: \"@exhibitions/overview-panel\", // We are overriding the default canvas listing panel\n label: \"\",\n icon: <div className=\"hidden hover:block\">👀</div>,\n render: () => <ExhibitionOverviewPanel />,\n};\n\nexport function ExhibitionOverviewPanel() {\n const manifest = useManifest();\n\n if (!manifest) return null;\n\n return (\n <div>\n Coming soon.\n {/*<DelftExhibition manifest={manifest.id} language=\"en\" viewObjectLinks={[]} />*/}\n </div>\n );\n}\n","import { useInStack } from \"@manifest-editor/editors\";\nimport { useEditCanvasItems } from \"@manifest-editor/manifest-preset/components\";\nimport { type BackgroundPanel, useConfig, useLayoutActions, useLayoutState } from \"@manifest-editor/shell\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useManifest } from \"react-iiif-vault\";\nimport { exhibitionCenterPanel } from \"./center-panels/ExhibitionCenterPanel\";\nimport { exhibitionOverviewLeftPanel } from \"./left-panels/ExhibitionOverview\";\n\nexport const exhibitionBackgroundTask: BackgroundPanel = {\n id: \"exhibition-background-task\",\n label: \"Query string\",\n render: () => <ExhibitionBackgroundPanel />,\n};\n\nfunction ExhibitionBackgroundPanel() {\n console.log(\"rendering?\");\n const manifest = useManifest();\n const canvas = useInStack(\"Canvas\");\n const { leftPanel, rightPanel } = useLayoutState();\n const {\n edit,\n leftPanel: leftPanelActions,\n rightPanel: rightPanelActions,\n centerPanel: centerPanelActions,\n } = useLayoutActions();\n const { canvasActions, open } = useEditCanvasItems();\n const { editorFeatureFlags: { rememberCanvasId = true, rememberLeftPanelId = false } = {} } = useConfig();\n const isLeftPanelOpen = leftPanel.open;\n\n useEffect(() => {\n // When left panel is exhibition overview, set the main panel\n if (manifest && leftPanel.current === exhibitionOverviewLeftPanel.id) {\n edit(manifest);\n centerPanelActions.open({ id: exhibitionCenterPanel.id });\n leftPanelActions.close();\n }\n }, [leftPanel.current]);\n\n return null;\n}\n","import type { CanvasNormalized } from \"@iiif/presentation-3-normalized\";\n\nconst heightMap = {\n \"h-1\": \"lg:min-h-[100px] row-span-1\",\n \"h-2\": \"lg:min-h-[200px] row-span-2\",\n \"h-3\": \"lg:min-h-[300px] row-span-3\",\n \"h-4\": \"lg:min-h-[400px] row-span-4\",\n \"h-5\": \"lg:min-h-[500px] row-span-5\",\n \"h-6\": \"lg:min-h-[600px] row-span-6\",\n \"h-7\": \"lg:min-h-[700px] row-span-7\",\n \"h-8\": \"lg:min-h-[800px] row-span-8\",\n \"h-9\": \"lg:min-h-[900px] row-span-9\",\n \"h-10\": \"lg:min-h-[1000px] row-span-10\",\n \"h-11\": \"lg:min-h-[1100px] row-span-11\",\n \"h-12\": \"lg:min-h-[1200px] row-span-12\",\n};\nconst previewHeightMap = {\n \"h-1\": \"lg:min-h-[25px] row-span-1\",\n \"h-2\": \"lg:min-h-[50px] row-span-2\",\n \"h-3\": \"lg:min-h-[75px] row-span-3\",\n \"h-4\": \"lg:min-h-[100px] row-span-4\",\n \"h-5\": \"lg:min-h-[125px] row-span-5\",\n \"h-6\": \"lg:min-h-[150px] row-span-6\",\n \"h-7\": \"lg:min-h-[175px] row-span-7\",\n \"h-8\": \"lg:min-h-[200px] row-span-8\",\n \"h-9\": \"lg:min-h-[225px] row-span-9\",\n \"h-10\": \"lg:min-h-[250px] row-span-10\",\n \"h-11\": \"lg:min-h-[275px] row-span-11\",\n \"h-12\": \"lg:min-h-[300px] row-span-12\",\n};\n\nconst widthMap = {\n \"w-1\": \"col-span-1\",\n \"w-2\": \"col-span-2\",\n \"w-3\": \"col-span-3\",\n \"w-4\": \"col-span-4\",\n \"w-5\": \"col-span-5\",\n \"w-6\": \"col-span-6\",\n \"w-7\": \"col-span-7\",\n \"w-8\": \"col-span-8\",\n \"w-9\": \"col-span-9\",\n \"w-10\": \"col-span-10\",\n \"w-11\": \"col-span-11\",\n \"w-12\": \"col-span-12\",\n};\n\nexport function getHeightWidthRatio(behavior?: string[]) {\n const { isLeft, isRight, isBottom } = getGridStats(behavior);\n const h = behavior?.find((a) => a.includes(\"h-\")) as keyof typeof heightMap;\n const w = behavior?.find((a) => a.includes(\"w-\")) as keyof typeof widthMap;\n\n if (!h || !w) {\n return { h: 0, w: 0, ratio: 1 };\n }\n\n const ret = {\n h: Number.parseInt(h.split(\"-\")[1]!),\n w: Number.parseInt(w.split(\"-\")[1]!),\n ratio: 1,\n };\n\n // If left or right - the ratio is 2/3s.\n if (isLeft || isRight) {\n ret.w *= 2 / 3;\n }\n if (isBottom) {\n ret.h *= 2 / 3;\n }\n\n if (ret.h && ret.w) {\n ret.ratio = ret.w / ret.h;\n }\n return ret;\n}\n\nexport function getClassName(b?: string[], firstInfo = false, preview = true) {\n if (!b || b.length === 0) {\n b = [\"h-8\", \"w-8\", \"image\"];\n }\n let h = b.find((a) => a.includes(\"h-\")) as keyof typeof heightMap;\n const w = b.find((a) => a.includes(\"w-\")) as keyof typeof widthMap;\n const classNames = [];\n\n if (firstInfo && h === \"h-4\") {\n h = \"h-8\";\n }\n classNames.push(preview ? previewHeightMap[h] : heightMap[h]);\n classNames.push(widthMap[w]);\n return classNames.join(\" \");\n}\n\nexport function getGridStats(behavior?: string[]) {\n const isRight = behavior?.includes(\"right\");\n const isLeft = behavior?.includes(\"left\");\n const isBottom = behavior?.includes(\"bottom\");\n const isTop = behavior?.includes(\"top\");\n const isImage = behavior?.includes(\"image\") || (!isLeft && !isRight && !isBottom && !isTop);\n const isInfo = behavior?.includes(\"info\");\n\n return {\n isRight,\n isLeft,\n isBottom,\n isTop,\n isInfo,\n isImage,\n };\n}\n\nexport function isExhibitionItem(canvas: CanvasNormalized | undefined) {\n if (!canvas) return false;\n\n const behaviors = canvas.behavior || [];\n if (behaviors.includes(\"image\") || behaviors.includes(\"info\")) {\n return true;\n }\n\n for (const behavior of behaviors) {\n if (behavior.startsWith(\"w-\") || behavior.startsWith(\"h-\")) {\n return true;\n }\n }\n\n return false;\n}\n","import { ActionButton } from \"@manifest-editor/components\";\nimport { CanvasPanelEditor, useInStack, useToggleList } from \"@manifest-editor/editors\";\nimport type { CanvasEditorDefinition, LayoutPanel } from \"@manifest-editor/shell\";\nimport { useLocalStorage } from \"@manifest-editor/shell\";\nimport { CanvasContext, LocaleString, type RenderingStrategy, useCanvas } from \"react-iiif-vault\";\nimport { twMerge } from \"tailwind-merge\";\nimport { getClassName, getGridStats } from \"../helpers\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\n\nexport const imageBlockEditor: CanvasEditorDefinition = {\n id: \"image-block-editor\",\n label: \"Image Block Editor\",\n component: (strategy) => <ImageBlockEditor strategy={strategy} />,\n supports: {\n strategy: (strategy, resource, vault) => {\n if (strategy.type !== \"images\") {\n return false;\n }\n\n const fullResource = vault.get(resource.resource);\n if (fullResource.type !== \"Canvas\") {\n return false;\n }\n\n const behaviors = fullResource.behavior || [];\n\n let isImage = false;\n for (const behaviour of behaviors) {\n if (behaviour.startsWith(\"w-\") || behaviour.startsWith(\"h-\") || behaviour === \"image\") {\n isImage = true;\n }\n }\n\n return isImage;\n },\n },\n};\n\nexport function ImageBlockEditor({ strategy }: { strategy: RenderingStrategy }) {\n const [isPreview, setIsPreview] = useLocalStorage(\"exhibition-preview-mode\");\n const canvas = useInStack(\"Canvas\");\n if (!canvas) {\n return null;\n }\n\n return (\n <CanvasContext canvas={canvas.resource.source?.id}>\n <div className=\"flex gap-4 bg-me-500 py-2 px-4 text-white shadow-md z-40 ring-1 ring-me-500 items-center\">\n Switch view\n <ActionButton onPress={() => setIsPreview(!isPreview)}>\n {isPreview ? \"Full canvas\" : \"Layout preview\"}\n </ActionButton>\n </div>\n {isPreview ? (\n <ImageBlockRenderer />\n ) : (\n <div className=\"h-full flex flex-1 min-h-0\">\n <CanvasPanelEditor asFallback />\n </div>\n )}\n </CanvasContext>\n );\n}\n\nfunction ImageBlockRenderer() {\n const ref = useRef<HTMLDivElement>(null);\n const canvas = useCanvas();\n const behavior = canvas?.behavior || [];\n const className = getClassName(behavior, false, false);\n const { isBottom, isImage, isInfo, isLeft } = getGridStats(canvas?.behavior);\n\n const [scale, setScale] = useState(1);\n\n useLayoutEffect(() => {\n // 1200 is what it looks like on the site.\n const container = ref.current;\n if (!container) return;\n const containerWidth = container.offsetWidth;\n const imageWidth = 1200;\n setScale(containerWidth / imageWidth);\n }, [canvas]);\n\n return (\n <div className=\"overflow-hidden h-full w-full\" ref={ref}>\n <div className=\"grid grid-cols-12 grid-rows-12 h-full bg-white\">\n <div\n className={twMerge(\n className,\n \"flex h-full max-h-full min-h-0 ring-4 ring-black\",\n isLeft ? \"flex-row-reverse\" : isBottom ? \"flex-col\" : \"flex-row\"\n )}\n >\n <div className=\"flex-1 h-full flex min-w-0\">\n <CanvasPanelEditor asFallback />\n </div>\n {!isImage ? (\n <div\n className={`${isBottom ? \"min-h-3 w-full\" : \"w-1/3\"} flex-shrink-0 self-stretch text-white bg-black rounded p-8 relative h-full`}\n >\n <div style={{ fontSize: `${scale * 16}px` }}>\n <LocaleString className=\"block mb-4\">{canvas?.label}</LocaleString>\n <LocaleString>{canvas?.summary}</LocaleString>\n </div>\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n","import { ActionButton } from \"@manifest-editor/components\";\nimport { AnnotationBodyEditor } from \"@manifest-editor/editors\";\nimport {\n type CanvasEditorDefinition,\n useGenericEditor,\n useInlineCreator,\n} from \"@manifest-editor/shell\";\nimport {\n AnnotationContext,\n type TextualContentStrategy,\n useAnnotation,\n useCanvas,\n useVaultSelector,\n} from \"react-iiif-vault\";\n\nexport const infoBlockEditor: CanvasEditorDefinition = {\n id: \"info-block-editor\",\n label: \"info Block Editor\",\n component: (strategy) => (\n <InfoBlockEditor strategy={strategy as TextualContentStrategy} />\n ),\n supports: {\n strategy: (strategy, resource, vault) => {\n if (strategy.type !== \"textual-content\") {\n return false;\n }\n return true;\n },\n },\n};\n\nexport function InfoBlockEditor(props: { strategy: TextualContentStrategy }) {\n const canvas = useCanvas();\n const annotationPage = useVaultSelector((_, vault) =>\n // biome-ignore lint/style/noNonNullAssertion: Should always be present.\n vault.get(canvas?.items[0]!),\n );\n const longSummaries = useVaultSelector((_, vault) =>\n canvas?.annotations[0] ? vault.get(canvas?.annotations[0]!) : null,\n );\n\n // creator.create(definition, payload);\n\n return (\n <div className=\"overflow-y-auto bg-white shadow\">\n <div className=\"mb-12\">\n {annotationPage.items.map((annotation, key) => {\n return (\n <AnnotationContext\n key={annotation.id + key}\n annotation={annotation.id}\n >\n <AnnotationEditor />\n </AnnotationContext>\n );\n })}\n </div>\n\n {longSummaries ? (\n <>\n <h2 className=\"text-2xl font-bold px-4 border-t border-gray-200 pt-4 mb-4\">\n Long Summaries\n </h2>\n <p className=\"my-4 px-4\">\n Long summaries are used to provide more detailed information about\n the canvas. They appear when the user clicks \"read more\" in the\n exhibition.\n </p>\n {longSummaries.items.map((annotation, key) => {\n return (\n <AnnotationContext\n key={annotation.id + key}\n annotation={annotation.id}\n >\n <AnnotationEditor />\n </AnnotationContext>\n );\n })}\n </>\n ) : null}\n </div>\n );\n}\n\nfunction AnnotationEditor() {\n const annotation = useAnnotation();\n const creator = useInlineCreator();\n const bodies = annotation?.body || [];\n const editor = useGenericEditor(annotation);\n\n if (!annotation) {\n return null;\n }\n\n return (\n <div>\n {bodies.map((body, n) => {\n return (\n <AnnotationBodyEditor\n key={n}\n className=\"p-4 hover:bg-me-100/40 focus-within:bg-me-100/40\"\n resourceId={body.id}\n onRemove={() => editor.annotation.body.deleteAtIndex(n)}\n />\n );\n })}\n\n <div className=\"p-4\">\n <ActionButton\n primary\n onPress={() => {\n creator.create(\n \"@manifest-editor/html-body-creator\",\n { language: \"en\", value: \"\" },\n {\n targetType: \"ContentResource\",\n parent: {\n property: \"body\",\n resource: {\n id: annotation.id,\n type: \"Annotation\",\n },\n },\n initialData: {},\n },\n );\n }}\n >\n Add new annotation\n </ActionButton>\n </div>\n </div>\n );\n}\n","import { ActionButton, LazyThumbnail } from \"@manifest-editor/components\";\nimport { type CanvasEditorDefinition, useGenericEditor, useLayoutActions } from \"@manifest-editor/shell\";\nimport { useRef } from \"react\";\nimport {\n LocaleString,\n type MediaStrategy,\n type SingleYouTubeVideo,\n useCanvas,\n useVaultSelector,\n} from \"react-iiif-vault\";\nimport invariant from \"tiny-invariant\";\n\nexport const youtubeMainEdtior: CanvasEditorDefinition = {\n id: \"youtube-main-editor\",\n label: \"YouTube main editor\",\n component: (strategy) =>\n strategy.type === \"media\" ? (\n <YouTubeEditor strategy={strategy as MediaStrategy} video={strategy.media as SingleYouTubeVideo} />\n ) : null,\n supports: {\n strategy: (strategy, resource, vault) => {\n console.log(strategy);\n if (strategy.type !== \"media\") {\n return false;\n }\n\n if (strategy.media.type !== \"VideoYouTube\") {\n return false;\n }\n\n return true;\n },\n },\n};\n\nexport function YouTubeEditor({ strategy, video }: { strategy: MediaStrategy; video: SingleYouTubeVideo }) {\n const { edit } = useLayoutActions();\n const canvas = useCanvas();\n const annotationRef = useVaultSelector((_, v) => {\n const page = v.get(canvas?.items[0]!);\n return page.items[0]!;\n });\n invariant(canvas && annotationRef);\n const player = useRef<HTMLIFrameElement>(null);\n const annotation = useGenericEditor(annotationRef);\n const media = video;\n\n const ar = (canvas.width || 1) / (canvas.height || 1);\n const ytThumbnail = `https://img.youtube.com/vi/${media.youTubeId}/maxresdefault.jpg`;\n\n return (\n <div className=\"overflow-y-auto\">\n <div className=\"p-8\">\n <div className=\"bg-black z-20 flex p-8 rounded-lg max-w-full max-h-[70vh] mx-auto\" style={{ aspectRatio: ar }}>\n <iframe\n title=\"YouTube video\"\n className=\"border-none w-full h-full object-contain\"\n ref={player}\n src={`https://www.youtube.com/embed/${media.youTubeId}?enablejsapi=1&origin=${window.location.host}&modestbranding=1&rel=0`}\n // @ts-expect-error\n referrerPolicy=\"no-referrer compute-pressure\"\n sandbox=\"allow-scripts allow-same-origin allow-presentation\"\n />\n </div>\n </div>\n\n <div className=\"bg-white shadow w-full p-8 flex gap-8\">\n <div>\n <div\n className=\"w-64 bg-black flex-shrink-0 flex items-center justify-center rounded overflow-clip\"\n style={{ aspectRatio: ar }}\n >\n {canvas.thumbnail?.length ? (\n <LazyThumbnail cover />\n ) : (\n <div className=\"text-white/50 text-center py-16\">No thumbnail</div>\n )}\n </div>\n </div>\n <div className=\"flex-1\">\n <LocaleString\n as=\"h3\"\n className=\"text-2xl font-bold mt-4\"\n defaultText={(<span className=\"text-black/30\">No Label</span>) as any}\n >\n {annotation.descriptive.label.get()}\n </LocaleString>\n <LocaleString\n as=\"p\"\n className=\"mt-2 mb-8\"\n defaultText={(<span className=\"text-black/30\">No summary</span>) as any}\n >\n {annotation.descriptive.summary.get()}\n </LocaleString>\n <ActionButton onPress={() => edit(annotation.ref())}>Edit properties</ActionButton>\n </div>\n </div>\n </div>\n );\n}\n","import {\n type CreatorFunctionContext,\n creatorHelper,\n type CreatorResource,\n defineCreator,\n} from \"@manifest-editor/creator-api\";\nimport { type IIIFBrowserCreatorPayload, iiifBrowserCreator } from \"@manifest-editor/creators\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/browser-creator\": typeof imageBrowserSlideCreator;\n }\n }\n}\n\nexport const imageBrowserSlideCreator = defineCreator({\n ...iiifBrowserCreator,\n id: \"@exhibitions/browser-creator\",\n create: createBrowser,\n tags: [\"image\", \"exhibition-slide\"],\n label: \"IIIF Browser\",\n summary: \"Browse IIIF Resources\",\n});\n\nasync function createBrowser(data: IIIFBrowserCreatorPayload, ctx: CreatorFunctionContext): Promise<CreatorResource> {\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n\n const dimensions = { width: 0, height: 0 };\n\n const createBrowserAnnotation = creatorHelper(\n ctx,\n { id: pageId, type: \"AnnotationPage\" },\n \"items\",\n \"@manifest-editor/iiif-browser-creator\",\n );\n\n const annotation = await createBrowserAnnotation(\n {\n ...data,\n trackSize({ width, height }) {\n dimensions.height = height;\n dimensions.width = width;\n },\n },\n {\n targetType: \"Annotation\",\n target: {\n id: canvasId,\n type: \"Canvas\",\n },\n },\n );\n\n const createSlide = creatorHelper(ctx, \"Manifest\", \"items\", \"@exhibitions/image-slide-creator\");\n\n // 2. Pass that to an empty slide.\n return await createSlide({\n canvasId,\n width: dimensions.width,\n height: dimensions.height,\n type: \"default\", // default / left / right / bottom\n items: annotation,\n });\n}\n","import {\n type CreatorFunctionContext,\n creatorHelper,\n type CreatorResource,\n defineCreator,\n} from \"@manifest-editor/creator-api\";\nimport { type CreateImageServicePayload, imageServiceCreator } from \"@manifest-editor/creators\";\nimport { imageSlideCreator } from \"./image-slide-creator\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/image-service-creator\": typeof imageServiceSlideCreator;\n }\n }\n}\n\nexport const imageServiceSlideCreator = defineCreator({\n ...imageServiceCreator,\n id: \"@exhibitions/image-service-creator\",\n create: createImageService,\n tags: [\"image\", \"exhibition-slide\"],\n label: \"IIIF Image\",\n summary: \"IIIF Image service\",\n resourceType: \"Canvas\",\n supports: {\n parentTypes: [\"Manifest\"],\n parentFields: [\"items\"],\n },\n});\n\nasync function createImageService(\n data: CreateImageServicePayload,\n ctx: CreatorFunctionContext,\n): Promise<CreatorResource> {\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const annotationId = ctx.generateId(\"annotation\");\n\n const createImageService = creatorHelper(\n ctx,\n { id: annotationId, type: \"Annotation\" },\n \"body\",\n \"@manifest-editor/image-service-creator\",\n );\n\n // 1. Call the original creator to get the annotation\n const resource = await createImageService(data, {\n target: {\n id: canvasId,\n type: \"Canvas\",\n },\n });\n\n const { width, height } = resource.get();\n\n const annotation = ctx.embed({\n id: ctx.generateId(\"annotation\"),\n type: \"Annotation\",\n motivation: \"painting\",\n body: [resource],\n target: {\n type: \"SpecificResource\",\n source: { id: canvasId, type: \"Canvas\" },\n },\n });\n\n // 2. Pass that to an empty slide.\n const createSlide = creatorHelper(ctx, \"Manifest\", \"items\", \"@exhibitions/image-slide-creator\");\n return await createSlide({\n canvasId,\n width,\n height,\n type: \"default\", // default / left / right / bottom\n items: [annotation],\n });\n}\n","import { emptyAnnotationPage, emptyCanvas } from \"@iiif/parser\";\nimport type { InternationalString } from \"@iiif/presentation-3\";\nimport { EmptyCanvasIcon } from \"@manifest-editor/components\";\nimport { type CreatorFunctionContext, type CreatorResource, defineCreator } from \"@manifest-editor/creator-api\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/image-slide-creator\": typeof imageSlideCreator;\n \"@exhibitions/image-slide-creator-bottom\": typeof imageSlideBottomCreator;\n \"@exhibitions/image-slide-creator-left\": typeof imageSlideLeftCreator;\n \"@exhibitions/image-slide-creator-right\": typeof imageSlideRightCreator;\n }\n }\n}\n\nexport const imageSlideCreator = defineCreator({\n id: \"@exhibitions/image-slide-creator\",\n create: createImageSlide,\n label: \"Empty slide\",\n summary: \"An empty image slide.\",\n icon: <EmptyCanvasIcon />,\n tags: [\"exhibition-slide\"], // No tag, so it doesn't appear, it's just called.\n resourceType: \"Canvas\",\n resourceFields: [\"id\", \"type\", \"label\", \"height\", \"width\", \"items\"],\n supports: {\n parentTypes: [\"Manifest\"],\n parentFields: [\"items\"],\n },\n});\n\nexport const imageSlideLeftCreator = defineCreator({\n ...imageSlideCreator,\n id: \"@exhibitions/image-slide-creator-left\",\n label: \"Image (Left)\",\n summary: \"An image with text on the left.\",\n icon: <div>IMAGE (LEFT)</div>,\n create: (payload, ctx) => createImageSlide({ ...payload, type: \"left\" }, ctx),\n});\n\nexport const imageSlideRightCreator = defineCreator({\n ...imageSlideCreator,\n id: \"@exhibitions/image-slide-creator-right\",\n label: \"Image (Right)\",\n summary: \"An image with text on the right.\",\n icon: <div>IMAGE (RIGHT)</div>,\n create: (payload, ctx) => createImageSlide({ ...payload, type: \"right\" }, ctx),\n});\n\nexport const imageSlideBottomCreator = defineCreator({\n ...imageSlideCreator,\n id: \"@exhibitions/image-slide-creator-bottom\",\n label: \"Image (Bottom)\",\n summary: \"An image with text at the bottom.\",\n icon: <div>IMAGE (BOTTOM)</div>,\n create: (payload, ctx) => createImageSlide({ ...payload, type: \"bottom\" }, ctx),\n});\n\ninterface InfoBoxPayload {\n canvasId?: string;\n label?: InternationalString;\n height?: number;\n width?: number;\n duration?: number;\n type: \"default\" | \"left\" | \"right\" | \"bottom\";\n items?: CreatorResource[];\n}\n\nfunction createImageSlide(payload: InfoBoxPayload, ctx: CreatorFunctionContext) {\n const canvasId = payload.canvasId || ctx.generateId(\"Canvas\");\n const itemsPageId = ctx.generateId(\"AnnotationPage\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const annotationsPageId = ctx.generateId(\"AnnotationPage\", {\n id: canvasId,\n type: \"Canvas\",\n });\n\n const behavior = [];\n let width = 6000;\n\n if (payload.width && payload.height) {\n // Let's figure out the right behaviours.\n if (payload.width > payload.height) {\n // The orientation is landscape.\n // Let's shrink the height.\n const gridSize = payload.width / 12;\n const heightColumns = Math.floor(payload.height / gridSize);\n const hClass = `h-${heightColumns}`;\n behavior.push(\"w-12\", hClass);\n } else {\n // The orientation is portrait.\n const gridSize = payload.height / 12;\n const widthColumns = Math.floor(payload.width / gridSize);\n const wClass = `w-${widthColumns}`;\n behavior.push(wClass, \"h-12\");\n }\n } else {\n behavior.push(\"w-12\", \"h-4\");\n }\n\n switch (payload.type) {\n case \"left\":\n behavior.push(\"left\");\n width *= 2 / 3;\n break;\n case \"right\":\n behavior.push(\"right\");\n width *= 2 / 3;\n break;\n case \"bottom\":\n behavior.push(\"bottom\");\n break;\n }\n\n if (!payload.items?.length) {\n behavior.push(\"multi-image\");\n }\n\n return ctx.embed({\n ...emptyCanvas,\n id: canvasId,\n behavior,\n label: payload.label || { en: [\"Untitled\"] },\n height: payload.height || 2000,\n duration: payload.duration,\n width: payload.width || width,\n items: [\n ctx.embed({\n ...emptyAnnotationPage,\n id: itemsPageId,\n type: \"AnnotationPage\",\n items: payload.items ? payload.items : [],\n }),\n ],\n annotations: [\n ctx.embed({\n ...emptyAnnotationPage,\n id: annotationsPageId,\n type: \"AnnotationPage\",\n items: [],\n }),\n ],\n });\n}\n","import {\n type CreatorFunctionContext,\n creatorHelper,\n type CreatorResource,\n defineCreator,\n} from \"@manifest-editor/creator-api\";\nimport { type CreateImageUrlPayload, imageUrlCreator } from \"@manifest-editor/creators\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/image-url-creator\": typeof imageUrlSlideCreator;\n }\n }\n}\n\nexport const imageUrlSlideCreator = defineCreator({\n ...imageUrlCreator,\n id: \"@exhibitions/image-url-creator\",\n create: createUrlSlide,\n tags: [\"exhibition-slide\"],\n label: \"Image\",\n summary: \"Image from URL\",\n resourceType: \"Canvas\",\n supports: {\n parentTypes: [\"Manifest\"],\n parentFields: [\"items\"],\n },\n});\n\nasync function createUrlSlide(data: CreateImageUrlPayload, ctx: CreatorFunctionContext): Promise<CreatorResource> {\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const annotationId = ctx.generateId(\"annotation\");\n\n const createImageUrl = creatorHelper(\n ctx,\n { id: annotationId, type: \"Annotation\" },\n \"body\",\n \"@manifest-editor/image-url-creator\",\n );\n\n // 1. Call the original creator to get the annotation\n const resource = await createImageUrl(data, {\n target: {\n id: canvasId,\n type: \"Canvas\",\n },\n targetType: \"Annotation\",\n });\n\n const { width, height } = resource.get();\n\n const annotation = ctx.embed({\n id: annotationId,\n type: \"Annotation\",\n motivation: \"painting\",\n body: [resource],\n target: {\n type: \"SpecificResource\",\n source: { id: canvasId, type: \"Canvas\" },\n },\n });\n\n // 2. Pass that to an empty slide.\n const createSlide = creatorHelper(ctx, \"Manifest\", \"items\", \"@exhibitions/image-slide-creator\");\n return await createSlide({\n canvasId,\n width,\n height,\n type: \"default\", // default / left / right / bottom\n items: [annotation],\n });\n}\n","import { emptyAnnotation, emptyCanvas } from \"@iiif/parser\";\nimport type { InternationalString } from \"@iiif/presentation-3\";\nimport { type CreatorFunctionContext, defineCreator } from \"@manifest-editor/creator-api\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/info-box-creator\": typeof infoBoxCreator;\n }\n }\n}\n\nexport const infoBoxCreator = defineCreator({\n id: \"@exhibitions/info-box-creator\",\n create: createInfoBox,\n label: \"Info box\",\n summary: \"A text panel for an exhibition\",\n icon: (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\">\n <title>Info box</title>\n <path\n fill=\"currentColor\"\n d=\"M11 17h2v-6h-2zm1-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22\"\n />\n </svg>\n ),\n tags: [\"exhibition-slide\"],\n resourceType: \"Canvas\",\n resourceFields: [\"id\", \"type\", \"label\", \"height\", \"width\", \"items\"],\n supports: {\n parentTypes: [\"Manifest\"],\n parentFields: [\"items\"],\n },\n});\n\ninterface InfoBoxPayload {\n label?: InternationalString;\n height?: number;\n width?: number;\n}\n\nasync function createInfoBox(data: InfoBoxPayload, ctx: CreatorFunctionContext) {\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const annotationsId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const annotation = {\n ...emptyAnnotation,\n id: ctx.generateId(\"annotation\", { id: canvasId, type: \"Canvas\" }),\n type: \"Annotation\",\n };\n\n const bodies = [\n await ctx.create(\n \"@manifest-editor/html-body-creator\",\n {\n language: \"en\",\n body: \"\",\n },\n { parent: { resource: annotation, property: \"body\" } },\n ),\n ];\n\n const annotationResource = ctx.embed({\n ...annotation,\n motivation: \"painting\",\n body: bodies,\n target: {\n type: \"SpecificResource\",\n source: { id: canvasId, type: \"Canvas\" },\n },\n });\n\n const annotationLongId = ctx.generateId(\"annotation\", {\n id: canvasId,\n type: \"Canvas\",\n });\n const longDescriptionResource = ctx.embed({\n id: annotationLongId,\n type: \"Annotation\",\n motivation: \"tagging\",\n body: [\n await ctx.create(\n \"@manifest-editor/html-body-creator\",\n {\n language: \"en\",\n body: \"\",\n },\n {\n parent: {\n resource: { id: annotationLongId, type: \"Annotation\" },\n property: \"body\",\n },\n },\n ),\n ],\n target: {\n type: \"SpecificResource\",\n source: { id: canvasId, type: \"Canvas\" },\n },\n });\n\n const page = ctx.embed({\n id: pageId,\n type: \"AnnotationPage\",\n items: [annotationResource],\n });\n\n const annotations = ctx.embed({\n id: annotationsId,\n type: \"AnnotationPage\",\n items: [longDescriptionResource],\n });\n\n return ctx.embed({\n ...emptyCanvas, // bug with placeholder canvas.\n id: canvasId,\n type: \"Canvas\",\n behavior: [\"w-4\", \"h-4\", \"info\"],\n label: data.label || undefined,\n height: data.height || 1000,\n width: data.width || 1000,\n items: [page],\n annotations: [annotations],\n });\n}\n","import { emptyCanvas } from \"@iiif/parser\";\nimport type { ContentResource } from \"@iiif/presentation-3\";\nimport { type CreatorFunctionContext, creatorHelper, defineCreator } from \"@manifest-editor/creator-api\";\nimport { type CreateVideoAnnotationPayload, videoAnnotation } from \"@manifest-editor/creators\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/video-creator\": typeof videoSlideCreator;\n }\n }\n}\n\nexport const videoSlideCreator = defineCreator({\n ...videoAnnotation,\n id: \"@exhibitions/video-creator\",\n create: createVideo,\n tags: [\"video\", \"exhibition-slide\"],\n label: \"Video\",\n summary: \"A video for an exhibition\",\n resourceType: \"Canvas\",\n resourceFields: [\"id\", \"type\", \"label\", \"height\", \"width\", \"items\"],\n supports: {\n parentTypes: [\"Manifest\"],\n parentFields: [\"items\"],\n },\n});\n\nasync function createVideo(data: CreateVideoAnnotationPayload, ctx: CreatorFunctionContext): any {\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n\n const annotation = await ctx.create(\"@manifest-editor/video-annotation\", data, {\n target: {\n id: canvasId,\n type: \"Canvas\",\n },\n targetType: \"Annotation\",\n parent: {\n resource: { id: pageId, type: \"AnnotationPage\" },\n property: \"items\",\n },\n });\n\n const page = ctx.embed({\n id: pageId,\n type: \"AnnotationPage\",\n items: [annotation],\n });\n\n // Add thumbnail?\n\n const createSlide = creatorHelper(ctx, \"Manifest\", \"items\", \"@exhibitions/image-slide-creator\");\n\n // 2. Pass that to an empty slide.\n return await createSlide({\n canvasId,\n height: data.height || 1080,\n width: data.width || 1920,\n duration: data.duration,\n type: \"bottom\", // default / left / right / bottom\n items: [annotation as any],\n });\n}\n","import { emptyCanvas } from \"@iiif/parser\";\nimport type { InternationalString } from \"@iiif/presentation-3\";\nimport { type CreatorFunctionContext, defineCreator } from \"@manifest-editor/creator-api\";\nimport { youTubeBodyCreator } from \"@manifest-editor/creators\";\nimport { getYouTubeId } from \"@manifest-editor/editors\";\n\ndeclare module \"@manifest-editor/creator-api\" {\n namespace IIIFManifestEditor {\n interface CreatorDefinitions {\n \"@exhibitions/youtube-creator\": typeof youtubeSlideCreator;\n }\n }\n}\n\nexport const youtubeSlideCreator = defineCreator({\n ...youTubeBodyCreator,\n id: \"@exhibitions/youtube-creator\",\n create: createYoutube,\n tags: [\"video\", \"exhibition-slide\"],\n label: \"YouTube\",\n summary: \"A YouTube for an exhibition\",\n});\n\ninterface YouTubeCreatePayload {\n youtubeUrl: string;\n label?: InternationalString;\n height?: number;\n width?: number;\n duration: number;\n}\n\nasync function createYoutube(data: YouTubeCreatePayload, ctx: CreatorFunctionContext) {\n const ytId = getYouTubeId(data.youtubeUrl);\n const canvasId = ctx.generateId(\"canvas\");\n const pageId = ctx.generateId(\"annotation-page\", {\n id: canvasId,\n type: \"Canvas\",\n });\n\n const annotation = await ctx.create(\"@manifest-editor/youtube\", data, {\n target: {\n id: canvasId,\n type: \"Canvas\",\n },\n targetType: \"Annotation\",\n parent: {\n resource: { id: pageId, type: \"AnnotationPage\" },\n property: \"items\",\n },\n });\n\n const page = ctx.embed({\n id: pageId,\n type: \"AnnotationPage\",\n items: [annotation],\n });\n\n const thumbnail = ctx.embed({\n id: `https://img.youtube.com/vi/${ytId}/maxresdefault.jpg`,\n type: \"Image\",\n format: \"image/jpeg\",\n width: 640,\n height: 360,\n });\n\n // Add thumbnail?\n\n return ctx.embed({\n ...emptyCanvas, // bug with placeholder canvas.\n id: canvasId,\n type: \"Canvas\",\n behavior: [\"w-12\", \"h-8\"],\n label: data.label || { en: [\"Untitled YouTube Video\"] },\n height: data.height || 1080,\n width: data.width || 1920,\n thumbnail: [thumbnail],\n items: [page],\n });\n}\n","import { useLayoutActions } from \"@manifest-editor/shell\";\nimport { Button } from \"react-aria-components\";\nimport { LocaleString, useManifest } from \"react-iiif-vault\";\n\nexport function ExhibitionContainer({ children }: { children: React.ReactNode }) {\n const manifest = useManifest();\n const { edit } = useLayoutActions();\n return (\n <div className=\"grid auto-rows-auto grid-cols-12 content-center justify-center gap-2 p-2\">\n <div className=\"col-span-12 row-span-2 text-black flex flex-col items-center justify-center\">\n <Button\n onPress={() => manifest && edit(manifest)}\n className=\"col-span-4 row-span-4 text-md text-left text-black hover:bg-slate-100 w-full flex items-center justify-center\"\n >\n <LocaleString className=\"block w-full text-left\">{manifest?.label}</LocaleString>\n </Button>\n </div>\n {children}\n </div>\n );\n}\n","import { LazyThumbnail } from \"@manifest-editor/components\";\nimport { useInStack } from \"@manifest-editor/editors\";\nimport { forwardRef } from \"react\";\nimport {\n LocaleString,\n useCanvas,\n useRenderingStrategy,\n} from \"react-iiif-vault\";\nimport { twMerge } from \"tailwind-merge\";\nimport { getClassName, getGridStats } from \"../helpers\";\n\nexport interface ExhibitionItemProps\n extends React.HTMLAttributes<HTMLDivElement> {\n isFirst: boolean;\n onClick: () => void;\n item: { id: string };\n}\n\nexport const ExhibitionItem = forwardRef<HTMLDivElement, ExhibitionItemProps>(\n function ExhibitionItem(\n { isFirst, item, children: divChildren, ...props },\n ref,\n ) {\n const canvas = useCanvas();\n const [strategy] = useRenderingStrategy();\n const behavior = canvas?.behavior || [];\n const currentCanvas = useInStack(\"Canvas\");\n const className = getClassName(canvas?.behavior, isFirst);\n const { isBottom, isImage, isInfo, isLeft } = getGridStats(\n canvas?.behavior,\n );\n\n const isSelected = currentCanvas?.resource.source?.id === canvas?.id;\n\n let children = null;\n if (isInfo) {\n children = (\n <div className=\"bg-black w-full h-full text-white max-h-40\">\n <div className=\"p-1.5 text-[4px]\">\n {strategy.type === \"textual-content\" ? (\n <LocaleString enableDangerouslySetInnerHTML>\n {strategy.items[0]?.text}\n </LocaleString>\n ) : null}\n </div>\n </div>\n );\n } else {\n children = (\n <div\n className={twMerge(\n \"flex h-full max-h-full min-h-0\",\n isLeft ? \"flex-row-reverse\" : isBottom ? \"flex-col\" : \"flex-row\",\n )}\n >\n <div className=\"flex-1 overflow-hidden relative justify-self-stretch\">\n <div className=\"absolute inset-0 w-full h-full\">\n <LazyThumbnail cover fade={false} />\n </div>\n </div>\n {isImage ? null : (\n <div\n className={`${isBottom ? \"min-h-3 w-full\" : \"w-1/3\"} flex-shrink-0 self-stretch p-2 text-white bg-black rounded`}\n >\n <div className=\"p-1.5 text-[4px]\">\n <LocaleString className=\"block mb-1 text-[5px]\">\n {canvas?.label}\n </LocaleString>\n <LocaleString>{canvas?.summary}</LocaleString>\n </div>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n className={twMerge(\n className,\n \"bg-me-gray-700 overflow-hidden hover:ring-2 ring-me-primary-500 relative\",\n isSelected ? \"ring-2 ring-me-primary-500\" : \"\",\n )}\n {...props}\n >\n {children}\n {divChildren}\n </div>\n );\n },\n);\n","import {\n useCreator,\n useLayoutActions,\n useManifestEditor,\n} from \"@manifest-editor/shell\";\nimport { CanvasContext } from \"react-iiif-vault\";\nimport { ExhibitionContainer } from \"./ExhibitionContainer\";\nimport { ExhibitionItem } from \"./ExhibitionItem\";\n\nexport function ExhibitionGrid() {\n const { open } = useLayoutActions();\n const { structural, technical } = useManifestEditor();\n const [, canvasActions] = useCreator(\n { id: technical.id.get(), type: \"Manifest\" },\n \"items\",\n \"Manifest\",\n );\n const items = structural.items.get();\n\n return (\n <ExhibitionContainer>\n {items.map((item, index) => (\n <CanvasContext key={index} canvas={item.id}>\n <ExhibitionItem\n isFirst={index === 0}\n item={item}\n onClick={() => {\n open({ id: \"current-canvas\" });\n canvasActions.edit(item, index);\n }}\n />\n </CanvasContext>\n ))}\n </ExhibitionContainer>\n );\n}\n","import type { SVGProps } from \"react\";\n\nexport function ResizeHandleIcon(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n height=\"1em\"\n width=\"1em\"\n {...props}\n >\n <title>Rearrange</title>\n <path fill=\"none\" d=\"M0 0h24v24H0z\" />\n <path d=\"M20 9H4v2h16V9zM4 15h16v-2H4v2z\" />\n </svg>\n );\n}\n","import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { ResizeHandleIcon } from \"../icons/ResizeHandleIcon\";\nimport { ExhibitionItem } from \"./ExhibitionItem\";\n\nexport function SortableExhibitionItem({\n isFirst,\n onClick,\n item,\n}: {\n isFirst: boolean;\n onClick: () => void;\n item: { id: string };\n}) {\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({\n id: item.id,\n transition: {\n duration: 150,\n easing: \"cubic-bezier(0.25, 1, 0.5, 1)\",\n },\n });\n\n const style = {\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n return (\n <ExhibitionItem\n ref={setNodeRef}\n style={style}\n {...attributes}\n {...listeners}\n onClick={onClick}\n isFirst={isFirst}\n item={item}\n >\n <div className=\"absolute bg-white text-2xl p-1 top-0.5 right-0.5\">\n <ResizeHandleIcon aria-label=\"Reorder item\" />\n </div>\n </ExhibitionItem>\n );\n}\n","import {\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n closestCenter,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { restrictToParentElement } from \"@dnd-kit/modifiers\";\nimport {\n SortableContext,\n rectSortingStrategy,\n sortableKeyboardCoordinates,\n} from \"@dnd-kit/sortable\";\nimport {\n useCreator,\n useLayoutActions,\n useManifestEditor,\n} from \"@manifest-editor/shell\";\nimport { useCallback } from \"react\";\nimport { CanvasContext } from \"react-iiif-vault\";\nimport { ExhibitionContainer } from \"./ExhibitionContainer\";\nimport { SortableExhibitionItem } from \"./SortableExhibitionItem\";\n\nexport function SortableExhibitionGrid() {\n const { structural, technical } = useManifestEditor();\n const items = structural.items.get();\n const { open } = useLayoutActions();\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n const [, canvasActions] = useCreator(\n { id: technical.id.get(), type: \"Manifest\" },\n \"items\",\n \"Manifest\",\n );\n\n const onDragEnd = useCallback(\n (result: DragEndEvent) => {\n const { active, over } = result;\n if (over && active.id !== over.id) {\n structural.items.reorder(\n items.findIndex((item) => item.id === active.id),\n items.findIndex((item) => item.id === over.id),\n );\n }\n },\n [items, structural.items],\n );\n\n return (\n <ExhibitionContainer>\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={onDragEnd}\n modifiers={[restrictToParentElement]}\n >\n <SortableContext items={items} strategy={rectSortingStrategy}>\n {items.map((item, idx) => {\n if (!item) return null;\n return (\n <CanvasContext key={item.id} canvas={item.id}>\n <SortableExhibitionItem\n key={item.id}\n item={item}\n isFirst={idx === 0}\n onClick={() => {\n open({ id: \"current-canvas\" });\n canvasActions.edit(item, idx);\n }}\n />\n </CanvasContext>\n );\n })}\n </SortableContext>\n </DndContext>\n </ExhibitionContainer>\n );\n}\n","import { Sidebar, SidebarContent, SidebarHeader } from \"@manifest-editor/components\";\nimport { useToggleList } from \"@manifest-editor/editors\";\nimport { CanvasListView, CanvasListingIcon } from \"@manifest-editor/manifest-preset/components\";\nimport { type LayoutPanel, useCreator, useManifestEditor } from \"@manifest-editor/shell\";\nimport { ExhibitionGrid } from \"../components/ExhibitionGrid\";\nimport { SortableExhibitionGrid } from \"../components/SortableExhibitionGrid\";\n\nexport const exhibitionGridLeftPanel: LayoutPanel = {\n id: \"canvas-listing\", // We are overriding the default canvas listing panel\n label: \"Exhibition grid\",\n icon: <ExhibitionGridIcon />,\n render: () => <ExhibitionGridLeftPanel />,\n options: {\n minWidth: 350,\n maxWidth: 350,\n },\n};\n\nfunction ExhibitionGridLeftPanel() {\n const { technical } = useManifestEditor();\n const manifestId = technical.id.get();\n const manifest = { id: manifestId, type: \"Manifest\" };\n const [canCreateCanvas, canvasActions] = useCreator(manifest, \"items\", \"Canvas\");\n const [toggled, toggle] = useToggleList();\n\n return (\n <Sidebar>\n <SidebarHeader\n title={\"Exhibition\"}\n actions={[\n {\n icon: toggled.list ? <CanvasListingIcon className=\"text-2xl\" /> : <ExhibitionGridIcon />,\n title: toggled.list ? \"List view\" : \"Grid view\",\n onClick: () => toggle(\"list\"),\n },\n {\n icon: <ListEditIcon />,\n title: \"Edit slides\",\n toggled: toggled.editing,\n onClick: () => toggle(\"editing\"),\n },\n {\n icon: <NewSlideIcon />,\n title: \"Add new slide\",\n disabled: !canCreateCanvas,\n onClick: () => canvasActions.createFiltered(\"exhibition-slide\"),\n },\n ]}\n />\n <SidebarContent>\n {toggled.list ? (\n <CanvasListView isEditing={toggled.editing} />\n ) : toggled.editing ? (\n <SortableExhibitionGrid />\n ) : (\n <ExhibitionGrid />\n )}\n </SidebarContent>\n </Sidebar>\n );\n}\n\nfunction ExhibitionGridIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 -960 960 960\">\n <title>Exhibition grid</title>\n <path d=\"M600-160v-280h280v280H600ZM440-520v-280h440v280H440ZM80-160v-280h440v280H80Zm0-360v-280h280v280H80Zm440-80h280v-120H520v120ZM160-240h280v-120H160v120Zm520 0h120v-120H680v120ZM160-600h120v-120H160v120Zm360 0Zm-80 240Zm240 0ZM280-600Z\" />\n </svg>\n );\n}\nfunction ListEditIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\">\n <title>Edit slides</title>\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n <path d=\"M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z\" />\n </svg>\n );\n}\nfunction NewSlideIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 -960 960 960\">\n <title>Add new slide</title>\n <path d=\"M160-240v-480 480Zm80-80v-200h360v200H240Zm-80 160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v240h-80v-240H160v480h360v80H160Zm500-320v-100H360v-60h360v160h-60Zm60 400v-120H600v-80h120v-120h80v120h120v80H800v120h-80Z\" />\n </svg>\n );\n}\n","import { getValue } from \"@iiif/helpers\";\nimport { ActionButton } from \"@manifest-editor/components\";\nimport { useEditor } from \"@manifest-editor/shell\";\n\nexport function ExhibitionItemConversion() {\n const editor = useEditor();\n\n const applyDefaultSettings = () => {\n const canvasWidth = editor.technical.width.get();\n const canvasHeight = editor.technical.height.get();\n const summary = editor.descriptive.summary;\n const behaviors = editor.technical.behavior;\n\n const behaviorsToAdd = behaviors.get();\n behaviorsToAdd.push(\"w-12\");\n\n const height = Math.max(1, Math.min(12, Math.round((canvasWidth / canvasHeight) * 12)));\n behaviorsToAdd.push(`h-${height}`);\n // Implementation of applying default settings\n // 1. Add behavior of \"w-12\"\n // 2. Add behavior of \"h-1\" to \"h-12\" based on canvas height\n // 3. Add an empty summary\n if (!getValue(summary.get())) {\n summary.set({ en: [\"Summary of image\"] });\n }\n\n editor.technical.behavior.set(behaviorsToAdd);\n };\n\n return (\n <div className=\"flex flex-col items-center gap-4 border-me-100 border-2 p-4 rounded\">\n This canvas was not created in the exhibition editor. Do you want to apply default settings?\n <ActionButton onPress={() => applyDefaultSettings()}>Apply defaults</ActionButton>\n </div>\n );\n}\n","import { Sidebar, SidebarContent } from \"@manifest-editor/components\";\nimport {\n DimensionsTriplet,\n InputContainer,\n LanguageMapEditor,\n LinkingPropertyList,\n PaintingAnnotationList,\n createAppActions,\n} from \"@manifest-editor/editors\";\nimport { type EditorDefinition, ResourceEditingProvider, useEditingResource, useEditor } from \"@manifest-editor/shell\";\nimport { AnnotationPageContext, useCanvas } from \"react-iiif-vault\";\nimport { AspectRatioWarning } from \"../components/AspectRatioWarning\";\nimport { getGridStats, isExhibitionItem } from \"../helpers\";\nimport { ExhibitionItemConversion } from \"../components/ExhibitionItemConversion\";\n\nexport const exhibitionCanvasEditor: EditorDefinition = {\n id: \"@exhibition/right-panel-editor\",\n supports: {\n edit: true,\n properties: [\"label\", \"summary\"],\n resourceTypes: [\"Canvas\"],\n custom: ({ resource }, vault) => {\n const full = vault.get(resource);\n const stats = getGridStats(full.behavior);\n\n if (full.type === \"Canvas\" && !stats.isInfo) {\n return true;\n }\n return false;\n },\n },\n label: \"Exhibition\",\n component: () => <ExhibitionRightPanel />,\n};\n\nfunction ExhibitionRightPanel() {\n const canvas = useCanvas();\n const resource = useEditingResource();\n const { structural, descriptive } = useEditor();\n const { items } = structural;\n const { thumbnail } = descriptive;\n const pages = items.get();\n const page = pages[0];\n\n const isAnExhibitionCanvas = isExhibitionItem(canvas);\n\n if (!canvas || !page || !resource) return <div className=\"p-8\">Canvas, page, or resource not found</div>;\n\n return (\n <Sidebar>\n <SidebarContent padding>\n <ResourceEditingProvider resource={canvas}>\n {!isAnExhibitionCanvas ? <ExhibitionItemConversion /> : null}\n\n <LanguageMapEditor dispatchType=\"label\" disableMultiline disallowHTML />\n\n <LinkingPropertyList\n containerId={thumbnail.containerId()}\n label=\"Thumbnail\"\n property=\"thumbnail\"\n items={thumbnail.get()}\n singleMode\n reorder={(ctx) => thumbnail.reorder(ctx.startIndex, ctx.endIndex)}\n createActions={createAppActions(thumbnail)}\n creationType=\"ContentResource\"\n emptyLabel=\"No thumbnail\"\n parent={resource?.resource}\n />\n\n <AnnotationPageContext annotationPage={page.id}>\n <PaintingAnnotationList createFilter=\"image\" />\n </AnnotationPageContext>\n </ResourceEditingProvider>\n </SidebarContent>\n </Sidebar>\n );\n}\n","import { Sidebar, SidebarContent } from \"@manifest-editor/components\";\nimport { LanguageMapEditor } from \"@manifest-editor/editors\";\nimport { type EditorDefinition, ResourceEditingProvider } from \"@manifest-editor/shell\";\nimport { useCanvas } from \"react-iiif-vault\";\nimport { getGridStats } from \"../helpers\";\n\nexport const exhibitionSummaryEdtior: EditorDefinition = {\n id: \"@exhibition/summary-editor\",\n supports: {\n edit: true,\n properties: [\"summary\"],\n resourceTypes: [\"Canvas\"],\n custom: ({ resource }, vault) => {\n const full = vault.get(resource);\n const stats = getGridStats(full.behavior);\n\n if (full.type === \"Canvas\" && !stats.isInfo) {\n return true;\n }\n return false;\n },\n },\n label: \"Summary\",\n component: () => <ExhibitionRightPanel />,\n};\n\nfunction ExhibitionRightPanel() {\n const canvas = useCanvas();\n if (!canvas) return null;\n\n return (\n <Sidebar>\n <SidebarContent padding>\n <ResourceEditingProvider resource={canvas}>\n <LanguageMapEditor dispatchType=\"label\" />\n <LanguageMapEditor dispatchType=\"summary\" />\n </ResourceEditingProvider>\n </SidebarContent>\n </Sidebar>\n );\n}\n","export function CheckIcon(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" {...props}>\n {/* Icon from Google Material Icons by Material Design Authors - https://github.com/material-icons/material-icons/blob/master/LICENSE */}\n <path fill=\"currentColor\" d=\"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z\" />\n </svg>\n );\n}\n","import { ActionButton, HTMLEditor } from \"@manifest-editor/components\";\nimport {\n useCurrentAnnotationActions,\n useCurrentAnnotationMetadata,\n} from \"react-iiif-vault\";\nimport { CheckIcon } from \"../icons/CheckIcon\";\nimport { useConfig } from \"@manifest-editor/shell\";\nimport { AnnotationPopUpSwitcherButton } from \"@manifest-editor/editors\";\n\nexport const DEFAULT_TOUR_STEP_HTML = \"<h2>New step</h2><p>Description</p>\";\n\nexport function ExhibitionTourStepPopup() {\n const { saveAnnotation } = useCurrentAnnotationActions();\n const [metadata, setMetadata] = useCurrentAnnotationMetadata();\n const { editorFeatureFlags } = useConfig();\n const { annotationPopups } = editorFeatureFlags;\n\n if (!annotationPopups) {\n return (\n <div className=\"flex gap-2\">\n <ActionButton primary onPress={() => saveAnnotation()}>\n <CheckIcon /> Finish editing\n </ActionButton>\n <AnnotationPopUpSwitcherButton />\n </div>\n );\n }\n\n return (\n <div className=\"bg-white shadow-md rounded-lg\">\n <div className=\"prose-headings:mt-1 overflow-y-auto rounded prose-headings:mb-1 prose-sm focus-within:ring-1 focus-within:ring-me-primary-500\">\n <HTMLEditor\n className=\"border-none\"\n value={metadata.bodyValue || DEFAULT_TOUR_STEP_HTML}\n onChange={(newValue) => setMetadata({ bodyValue: newValue })}\n />\n </div>\n\n <div className=\"flex gap-2 p-3\">\n <ActionButton primary onPress={() => saveAnnotation()}>\n <CheckIcon /> Finish editing\n </ActionButton>\n <AnnotationPopUpSwitcherButton />\n </div>\n </div>\n );\n}\n","import {\n ActionButton,\n HTMLEditor,\n DeleteIcon,\n TargetIcon,\n} from \"@manifest-editor/components\";\nimport { useAtlasStore, useConfig } from \"@manifest-editor/shell\";\nimport {\n useCurrentAnnotationActions,\n useCurrentAnnotationMetadata,\n} from \"react-iiif-vault\";\nimport { useStore } from \"zustand\";\nimport { CheckIcon } from \"../icons/CheckIcon\";\nimport { DEFAULT_TOUR_STEP_HTML } from \"./ExhibitionTourStepPopup\";\nimport { AnnotationPopUpSwitcherButton } from \"@manifest-editor/editors\";\n\nexport function PendingTourStepAnnotation() {\n const store = useAtlasStore();\n const polygon = useStore(store, (s) => s.polygon);\n const [metadata, setMetadata] = useCurrentAnnotationMetadata();\n const { editorFeatureFlags } = useConfig();\n const { annotationPopups } = editorFeatureFlags;\n const { cancelRequest, saveAnnotation } = useCurrentAnnotationActions();\n\n return (\n <div className=\"border border-gray-300 hover:border-me-500 shadow-sm rounded bg-white relative\">\n <div className=\"bg-me-primary-500 text-white p-2 m-1 rounded flex gap-2\">\n <TargetIcon />\n Draw a box on the canvas\n </div>\n {annotationPopups ? (\n <div className=\"relative p-3 line-clamp-3 prose-p:text-slate-600\">\n <div className=\"prose-headings:mt-1 prose-headings:mb-1 prose-sm\">\n <div\n dangerouslySetInnerHTML={{\n __html: metadata.bodyValue || DEFAULT_TOUR_STEP_HTML,\n }}\n />\n </div>\n </div>\n ) : (\n <HTMLEditor\n className=\"border-none\"\n value={metadata.bodyValue || DEFAULT_TOUR_STEP_HTML}\n onChange={(newValue) => setMetadata({ bodyValue: newValue })}\n />\n )}\n <div className=\"flex gap-2 p-3\">\n <ActionButton\n isDisabled={polygon?.points.length === 0}\n onPress={() => saveAnnotation()}\n >\n <CheckIcon /> Finish editing\n </ActionButton>\n\n <ActionButton className=\"gap-2 flex\" onPress={() => cancelRequest()}>\n <DeleteIcon /> Delete\n </ActionButton>\n\n <AnnotationPopUpSwitcherButton />\n </div>\n </div>\n );\n}\n","import { ActionButton, AnnotationPopInIcon, AnnotationPopOutIcon } from \"@manifest-editor/components\";\nimport { useConfig, useSaveConfig } from \"@manifest-editor/shell\";\n\nexport function ActionButtonPopupSwitcher() {\n const { editorFeatureFlags } = useConfig();\n const { annotationPopups } = editorFeatureFlags;\n const saveConfig = useSaveConfig();\n\n return (\n <ActionButton\n className=\"ml-auto\"\n onPress={() => saveConfig({ editorFeatureFlags: { ...editorFeatureFlags, annotationPopups: annotationPopups ? false : true } })}\n >\n {annotationPopups ? <AnnotationPopInIcon /> : <AnnotationPopOutIcon />}\n </ActionButton>\n );\n}\n","import {\n ActionButton,\n DeleteIcon,\n EditTextIcon,\n HTMLAnnotationBodyRender,\n} from \"@manifest-editor/components\";\nimport {\n AnnotationPopUpSwitcherButton,\n HTMLAnnotationEditor,\n useAnnotationEditor,\n} from \"@manifest-editor/editors\";\nimport { useContext, useEffect, useState } from \"react\";\nimport { CheckIcon } from \"../icons/CheckIcon\";\nimport { ResourceEditingReactContext, useConfig } from \"@manifest-editor/shell\";\nimport {\n AnnotationContext,\n useAnnotation,\n useCurrentAnnotationActions,\n} from \"react-iiif-vault\";\nimport { ActionButtonPopupSwitcher } from \"./ActionButtonPopupSwitcher\";\n\nexport function TourNormalAnnotationEditor({\n highlightProps,\n}: {\n highlightProps: any;\n}) {\n const value = useContext(ResourceEditingReactContext);\n const annotation = useAnnotation();\n const { editorFeatureFlags } = useConfig();\n const { annotationPopups } = editorFeatureFlags;\n\n const {\n isPending,\n cancelRequest,\n busy,\n requestAnnotationFromTarget,\n deleteAnnotation,\n } = useAnnotationEditor({\n annotationPopup: (\n <AnnotationContext annotation={annotation!.id}>\n <ResourceEditingReactContext.Provider value={value}>\n <TourAnnotationPopupEditor />\n </ResourceEditingReactContext.Provider>\n </AnnotationContext>\n ),\n });\n\n const [isOpen, setIsOpen] = useState(false);\n\n useEffect(() => {\n if (isOpen && !isPending) {\n setIsOpen(true);\n }\n }, [isPending, isOpen]);\n\n // This is an annotatino within a page.\n return (\n <div\n {...highlightProps}\n className=\"border border-gray-300 hover:border-me-500 shadow-sm rounded bg-white relative\"\n >\n <div className=\"relative\">\n {isOpen && !annotationPopups ? (\n <HTMLAnnotationEditor className=\"border-none\" />\n ) : (\n <HTMLAnnotationBodyRender\n className=\"px-3 pt-3 line-clamp-3 prose-p:text-slate-600\"\n locale=\"en\"\n />\n )}\n </div>\n <div className=\"flex gap-2 p-2\">\n {isOpen && isPending ? (\n <>\n <ActionButton\n primary\n onPress={() => {\n setIsOpen(false);\n cancelRequest();\n }}\n >\n <CheckIcon /> Finish editing\n </ActionButton>\n <AnnotationPopUpSwitcherButton />\n </>\n ) : (\n <ActionButton\n isDisabled={busy}\n onPress={() => {\n setIsOpen(true);\n requestAnnotationFromTarget().then(() => {\n setIsOpen(false);\n });\n }}\n >\n <EditTextIcon /> Edit\n </ActionButton>\n )}\n <ActionButton className=\"gap-2 flex\" onPress={() => deleteAnnotation()}>\n <DeleteIcon /> Delete\n </ActionButton>\n </div>\n <div className=\"absolute -bottom-5 left-5 h-5 border-l-2 border-gray-300 w-0\" />\n </div>\n );\n}\n\nfunction TourAnnotationPopupEditor() {\n const { editorFeatureFlags } = useConfig();\n const { annotationPopups } = editorFeatureFlags;\n const { saveAnnotation } = useCurrentAnnotationActions();\n\n if (!annotationPopups) {\n return (\n <div className=\"flex gap-2\">\n <ActionButton primary onPress={() => saveAnnotation()}>\n <CheckIcon /> Finish editing\n </ActionButton>\n <AnnotationPopUpSwitcherButton />\n </div>\n );\n }\n\n return (\n <div className=\"bg-white shadow-md rounded-lg relative max-h-[50vh] overflow-y-auto\">\n <div className=\"prose-headings:mt-1 rounded prose-headings:mb-1 prose-sm focus-within:ring-1 focus-within:ring-me-primary-500\">\n <HTMLAnnotationEditor className=\"border-none\" />\n </div>\n\n <div className=\"flex gap-2 p-2 sticky bottom-0 z-50 bg-white\">\n <ActionButton\n primary\n onPress={() => {\n saveAnnotation();\n }}\n >\n <CheckIcon /> Finish editing\n </ActionButton>\n <ActionButtonPopupSwitcher />\n </div>\n </div>\n );\n}\n","import { ActionButton, DeleteIcon, EditTextIcon } from \"@manifest-editor/components\";\nimport { LanguageMapEditor } from \"@manifest-editor/editors\";\nimport { useGenericEditor, useLayoutActions } from \"@manifest-editor/shell\";\nimport { useState } from \"react\";\nimport { LocaleString, useAnnotation, useAnnotationPage } from \"react-iiif-vault\";\nimport { CheckIcon } from \"../icons/CheckIcon\";\n\nexport function TourPaintingAnnotationEditor({\n originalAnnotationId,\n highlightProps,\n}: {\n originalAnnotationId?: string;\n highlightProps: any;\n}) {\n const page = useAnnotationPage();\n const pageEditor = useGenericEditor(page);\n const annotation = useAnnotation();\n const { edit } = useLayoutActions();\n const [isOpen, setIsOpen] = useState(false);\n\n const deleteAnnotation = () => {\n if (originalAnnotationId && confirm(\"Are you sure you want to delete this annotation?\")) {\n // Delete the original annotation.\n const index = pageEditor.structural.items\n .getWithoutTracking()\n .findIndex((item) => item.id === originalAnnotationId);\n pageEditor.structural.items.deleteAtIndex(index);\n }\n };\n\n return (\n <div {...highlightProps} className=\"border border-gray-300 hover:border-me-500 shadow-sm rounded bg-white relative\">\n <div className=\"flex gap-2 mb-2 p-3\">\n <div className=\"flex-1 min-w-0\">\n {isOpen ? (\n <>\n <h3 className=\"text-lg font-semibold border-b pt-1 pb-2 mb-2\">Edit step</h3>\n <LanguageMapEditor dispatchType=\"label\" />\n <LanguageMapEditor dispatchType=\"summary\" />\n </>\n ) : (\n <>\n <LocaleString\n as=\"div\"\n defaultText={(<span className=\"opacity-50\">Untitled</span>) as any}\n className=\"whitespace-nowrap overflow-ellipsis w-full overflow-x-hidden\"\n >\n {annotation?.label}\n </LocaleString>\n <LocaleString className=\"text-gray-500 text-sm bg-white line-clamp-2\" as=\"div\">\n {annotation?.summary}\n </LocaleString>\n </>\n )}\n </div>\n </div>\n\n <div className=\"flex gap-2 p-2\">\n {isOpen ? (\n <ActionButton onPress={() => setIsOpen(false)}>\n <CheckIcon /> Finish editing\n </ActionButton>\n ) : (\n <ActionButton onPress={() => setIsOpen(true)}>\n <EditTextIcon /> Edit body\n </ActionButton>\n )}\n\n <ActionButton onPress={() => edit(annotation!)}>Edit annotation</ActionButton>\n\n <ActionButton className=\"gap-2 flex\" onPress={() => deleteAnnotation()}>\n <DeleteIcon /> Delete\n </ActionButton>\n </div>\n <div className=\"absolute -bottom-5 left-5 h-5 border-l-2 border-gray-300 w-0\" />\n </div>\n );\n}\n","import { useAnnotationInfo } from \"@manifest-editor/editors\";\nimport { ResourceEditingProvider } from \"@manifest-editor/shell\";\nimport { useMemo } from \"react\";\nimport { AnnotationContext } from \"react-iiif-vault\";\nimport { TourNormalAnnotationEditor } from \"./TourNormalAnnotationEditor\";\nimport { TourPaintingAnnotationEditor } from \"./TourPaintingAnnotationEditor\";\n\nexport function TourAnnotationEditor() {\n const [annotation, { annotationTarget, highlightProps }] =\n useAnnotationInfo();\n\n const resource = useMemo(() => {\n if (annotationTarget) {\n return { id: annotationTarget, type: \"Annotation\" };\n }\n return { id: annotation?.id as string, type: \"Annotation\" };\n }, [annotation?.id, annotationTarget]);\n\n if (annotationTarget) {\n return (\n <ResourceEditingProvider resource={resource}>\n <AnnotationContext annotation={annotationTarget}>\n <TourPaintingAnnotationEditor\n originalAnnotationId={annotation?.id}\n highlightProps={highlightProps}\n />\n </AnnotationContext>\n </ResourceEditingProvider>\n );\n }\n\n return (\n <ResourceEditingProvider resource={resource}>\n <TourNormalAnnotationEditor highlightProps={highlightProps} />\n </ResourceEditingProvider>\n );\n}\n","import { ReorderList } from \"@manifest-editor/editors\";\nimport { useGenericEditor } from \"@manifest-editor/shell\";\nimport { AnnotationContext, useAnnotationPage } from \"react-iiif-vault\";\nimport { TourAnnotationEditor } from \"./TourAnnotationEditor\";\n\nexport function TourAnnotationPageEditor({\n reorderable = false,\n}: { reorderable?: boolean }) {\n const page = useAnnotationPage();\n const editor = useGenericEditor(page);\n\n if (!page) {\n return null;\n }\n\n if (!reorderable) {\n return (\n <>\n {page.items.map((annotation) => (\n <AnnotationContext annotation={annotation.id} key={annotation.id}>\n <TourAnnotationEditor />\n </AnnotationContext>\n ))}\n </>\n );\n }\n\n return (\n <>\n <ReorderList\n id={page.id}\n marginBottom=\"0.5em\"\n items={page.items || []}\n inlineHandle={false}\n reorder={({ startIndex, endIndex }) =>\n editor.structural.items.reorder(startIndex, endIndex)\n }\n renderItem={(ref, index) => (\n <AnnotationContext annotation={ref.id as string}>\n <TourAnnotationEditor />\n </AnnotationContext>\n )}\n />\n </>\n );\n}\n","import type { InternationalString } from \"@iiif/presentation-3\";\nimport { ActionButton, Sidebar, SidebarContent } from \"@manifest-editor/components\";\nimport { PromptToAddPaintingAnnotations } from \"@manifest-editor/editors\";\nimport {\n type EditorDefinition,\n ResourceEditingProvider,\n useConfig,\n useCreator,\n useGenericEditor,\n useInlineCreator,\n} from \"@manifest-editor/shell\";\nimport { useState } from \"react\";\nimport { Button } from \"react-aria-components\";\nimport { AnnotationPageContext, useCanvas, useRequestAnnotation } from \"react-iiif-vault\";\nimport { ExhibitionTourStepPopup } from \"../components/ExhibitionTourStepPopup\";\nimport { PendingTourStepAnnotation } from \"../components/PendingTourStepAnnotation\";\nimport { TourAnnotationPageEditor } from \"../components/TourAnnotationPageEditor\";\nimport { getGridStats } from \"../helpers\";\n\nexport const exhibitionTourSteps: EditorDefinition = {\n id: \"@exhibition/tour-steps\",\n supports: {\n edit: true,\n properties: [\"annotations\"],\n resourceTypes: [\"Canvas\"],\n custom: ({ resource }, vault) => {\n const full = vault.get(resource);\n const stats = getGridStats(full.behavior);\n\n if (full.type === \"Canvas\" && !stats.isInfo) {\n return true;\n }\n return false;\n },\n },\n label: \"Tour steps\",\n component: () => <ExhibitionRightPanelOptionalPage />,\n};\n\nfunction ExhibitionRightPanelOptionalPage() {\n const canvas = useCanvas();\n const firstAnnotationPage = canvas?.annotations[0];\n const itemsAnnotationPage = canvas?.items[0];\n\n // @todo create annotation page?\n if (!firstAnnotationPage || !canvas || !itemsAnnotationPage) {\n return <PromptCreationOfTourSteps />;\n }\n\n return <ExhibitionRightPanel />;\n}\n\nfunction PromptCreationOfTourSteps() {\n const canvas = useCanvas();\n const creator = useInlineCreator();\n\n const createEmptyAnnotationPage = () => {\n if (!canvas) return;\n creator.create(\n \"@manifest-editor/empty-annotation-page\",\n {\n label: { en: [\"Tour steps\"] },\n },\n {\n target: {\n id: canvas.id,\n type: \"Canvas\",\n },\n targetType: \"AnnotationPage\",\n parent: {\n property: \"annotations\",\n resource: {\n id: canvas.id,\n type: \"Canvas\",\n },\n },\n },\n );\n };\n\n return (\n <div className=\"flex flex-col items-center justify-center p-4\">\n <div className=\"p-4 opacity-50 text-center\">This image does not yet have a tour.</div>\n\n <Button\n className=\"border w-full disabled:opacity-50 border-gray-300 hover:border-me-500 hover:bg-me-50 cursor-pointer shadow-sm rounded p-4 bg-white relative text-black/40 hover:text-me-500\"\n onPress={() => createEmptyAnnotationPage()}\n >\n Create Tour\n </Button>\n </div>\n );\n}\n\nfunction ExhibitionRightPanel() {\n const canvas = useCanvas();\n const firstAnnotationPage = canvas?.annotations[0];\n const itemsAnnotationPage = canvas?.items[0];\n const editor = useGenericEditor(firstAnnotationPage);\n const creator = useInlineCreator();\n const [reorderable, setReorderable] = useState(false);\n\n const { requestAnnotation, isPending, busy, cancelRequest, completeRequest } = useRequestAnnotation({\n onSuccess: (resp) => {\n const bodyValue = resp.metadata.bodyValue || \"\";\n\n if (!resp.cancelled && resp.target && firstAnnotationPage) {\n creator.create(\n \"@manifest-editor/html-annotation\",\n {\n label: { en: [\"Tour step\"] },\n body: {\n en: [bodyValue || \"<h2>New step</h2><p>Description</p>\"],\n },\n motivation: \"tagging\",\n } as {\n label?: InternationalString;\n body: InternationalString;\n motivation?: string;\n height?: number;\n width?: number;\n },\n {\n target: {\n id: canvas.id,\n type: \"Canvas\",\n },\n targetType: \"Annotation\",\n parent: {\n property: \"items\",\n resource: {\n id: firstAnnotationPage.id,\n type: \"AnnotationPage\",\n },\n },\n initialData: {\n selector: resp,\n },\n },\n );\n }\n },\n });\n\n if (!canvas) return null;\n if (!firstAnnotationPage) {\n return <div>No annotation page - create one?</div>;\n }\n\n return (\n <Sidebar>\n <SidebarContent padding>\n <div className=\"flex gap-4 border-b pt-4 pb-2 mb-2\">\n <h2 className=\"text-lg font-semibold flex-1\">Tour steps</h2>\n <ActionButton onPress={() => setReorderable((r) => !r)}>{reorderable ? \"Done\" : \"Reorder\"}</ActionButton>\n </div>\n\n <ResourceEditingProvider resource={canvas}>\n <AnnotationPageContext annotationPage={firstAnnotationPage.id}>\n <div className=\"flex flex-col gap-4\">\n <TourAnnotationPageEditor reorderable={reorderable} />\n\n {!busy ? (\n isPending ? (\n <PendingTourStepAnnotation />\n ) : (\n <Button\n onPress={() =>\n requestAnnotation({\n type: \"box\",\n annotationPopup: <ExhibitionTourStepPopup />,\n })\n }\n className=\"border disabled:opacity-50 border-gray-300 hover:border-me-500 hover:bg-me-50 cursor-pointer shadow-sm rounded p-4 bg-white relative text-black/40 hover:text-me-500\"\n >\n + Add new step\n </Button>\n )\n ) : null}\n </div>\n {itemsAnnotationPage /*&& hasMultiplePainting*/ ? (\n <>\n <h3 className=\"text-md border-b pt-4 pb-2 mb-2\">Available tour steps from images</h3>\n <PromptToAddPaintingAnnotations\n painting={itemsAnnotationPage}\n page={editor.ref()}\n canvasId={canvas.id}\n />\n </>\n ) : null}\n </AnnotationPageContext>\n </ResourceEditingProvider>\n </SidebarContent>\n </Sidebar>\n );\n}\n","import { useCanvas } from \"react-iiif-vault\";\nimport invariant from \"tiny-invariant\";\nimport { getHeightWidthRatio } from \"../helpers\";\n\nexport function AspectRatioWarning() {\n const canvas = useCanvas();\n invariant(canvas);\n\n const ratio =\n canvas.width && canvas.height ? canvas.width / canvas.height : 0;\n const target = getHeightWidthRatio(canvas.behavior || []);\n\n if (Math.abs(ratio - target.ratio) < 0.01) return null;\n\n return (\n <div className=\"p-2 rounded bg-me-100\">\n <div className=\"text-me-700-500\">Aspect ratio warning</div>\n <div className=\"text-sm text-black/60\">\n The aspect ratio of this canvas is {ratio.toFixed(2)} but the target\n aspect ratio is {target.ratio.toFixed(2)}. Some parts of this image may\n be cropped.\n <div className=\"relative h-32 w-full mt-2\">\n <div\n className=\"bg-[red] left-0 top-0 z-2 opacity-50 max-w-32 max-h-32\"\n style={{ aspectRatio: ratio.toFixed(2) }}\n >\n <div\n className=\"asbolute bg-[white] left-0 top-0 z-1 opacity-50 max-w-32 max-h-32\"\n style={{ aspectRatio: target.ratio }}\n />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { Sidebar, SidebarContent, SidebarHeader } from \"@manifest-editor/components\";\nimport {\n BehaviorEditor,\n type BehaviorEditorProps,\n DimensionsTriplet,\n InputContainer,\n useInStack,\n} from \"@manifest-editor/editors\";\nimport { type EditorDefinition, useEditor } from \"@manifest-editor/shell\";\nimport { useState } from \"react\";\nimport { AspectRatioWarning } from \"../components/AspectRatioWarning\";\n\nexport const customBehaviourEditor: EditorDefinition = {\n component: () => <SlideBehavioursPanel />,\n supports: {\n edit: true,\n resourceTypes: [\"Canvas\"],\n properties: [\"behavior\"],\n },\n id: \"slide-behaviors\",\n label: \"Layout\",\n tabs: {\n showTitle: true,\n },\n};\n\nconst exhibitionConfigs: BehaviorEditorProps[\"configs\"] = [\n {\n id: \"layout\",\n type: \"choice\",\n label: { en: [\"Layout\"] },\n initialOpen: true,\n items: [\n {\n label: { en: [\"Text on left\"] },\n value: \"left\",\n },\n {\n label: { en: [\"Text on right\"] },\n value: \"right\",\n },\n {\n label: { en: [\"Text on bottom\"] },\n value: \"bottom\",\n },\n {\n label: { en: [\"Text on top\"] },\n value: \"top\",\n },\n {\n label: { en: [\"Only image\"] },\n value: \"image\",\n },\n ],\n },\n {\n id: \"floating\",\n type: \"choice\",\n label: { en: [\"Floating\"] },\n initialOpen: false,\n addNone: true,\n groupBehavior: \"floating\",\n items: [\n {\n label: { en: [\"Float top left\"] },\n value: \"float-top-left\",\n },\n {\n label: { en: [\"Float top right\"] },\n value: \"float-top-right\",\n },\n {\n label: { en: [\"Float bottom left\"] },\n value: \"float-bottom-left\",\n },\n {\n label: { en: [\"Float bottom right\"] },\n value: \"float-bottom-right\",\n },\n ],\n },\n {\n id: \"size\",\n component: (existing, setBehaviors) => <EditSize behaviors={existing} setBehaviors={setBehaviors} />,\n label: { en: [\"Size\"] },\n type: \"custom\",\n initialOpen: true,\n supports: (b) => b.startsWith(\"w-\") || b.startsWith(\"h-\"),\n },\n];\n\nexport function RoundGridIcon(props: { index: number } & React.SVGProps<SVGSVGElement>) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\" {...props}>\n {/* Icon from Google Material Icons by Material Design Authors - https://github.com/material-icons/material-icons/blob/master/LICENSE */}\n <path\n fill={props.index === 0 ? \"currentColor\" : \"none\"}\n stroke=\"currentColor\"\n d=\"M5 11h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2\"\n />\n <path\n fill={props.index === 1 ? \"currentColor\" : \"none\"}\n stroke=\"currentColor\"\n d=\"M5 21h4c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2\"\n />\n <path\n fill={props.index === 2 ? \"currentColor\" : \"none\"}\n stroke=\"currentColor\"\n d=\"M13 5v4c0 1.1.9 2 2 2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2\"\n />\n <path\n fill={props.index === 3 ? \"currentColor\" : \"none\"}\n stroke=\"currentColor\"\n d=\"M15 21h4c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2\"\n />\n </svg>\n );\n}\n\nfunction parseBehaviors(items: string[]) {\n let width = 0;\n let height = 0;\n\n for (const item of items) {\n if (item.startsWith(\"w-\")) {\n width = Number.parseInt(item.slice(2));\n }\n if (item.startsWith(\"h-\")) {\n height = Number.parseInt(item.slice(2));\n }\n }\n\n return {\n width,\n height,\n };\n}\n\nfunction EditSize({ behaviors, setBehaviors }: { behaviors: string[]; setBehaviors: (behaviors: string[]) => void }) {\n const { width, height } = parseBehaviors(behaviors);\n const [hoverPosition, setHoverPosition] = useState({ x: -1, y: -1 });\n\n const setBehavior = (w: number, h: number) => {\n const newBehaviors = behaviors.filter((b) => {\n return !b.startsWith(\"w-\") && !b.startsWith(\"h-\");\n });\n\n newBehaviors.push(`w-${w}`);\n newBehaviors.push(`h-${h}`);\n\n setBehaviors(newBehaviors);\n };\n\n const cells = Array.from({ length: 144 }, (_, i) => {\n const x = i % 12;\n const y = Math.floor(i / 12);\n const hovered = hoverPosition.x >= x && hoverPosition.y >= y;\n const selected = x < width && y < height;\n const hoveredAndSelected = hovered && selected;\n\n let bgClass = \"bg-gray-200\";\n if (hovered) {\n bgClass = \"bg-me-200\";\n }\n if (selected) {\n bgClass = \"bg-me-500\";\n }\n if (hoveredAndSelected) {\n bgClass = \"bg-me-400\";\n }\n\n return (\n // biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>\n <div\n key={i}\n className={`flex aspect-square rounded cursor-se-resize items-center justify-center ${bgClass}`}\n onClick={() => setBehavior(x + 1, y + 1)}\n onMouseUp={() => setBehavior(x + 1, y + 1)}\n onMouseEnter={() => setHoverPosition({ x, y })}\n />\n );\n });\n\n return (\n <div className=\"grid grid-cols-12 grid-rows-12 gap-1\" onMouseLeave={() => setHoverPosition({ x: -1, y: -1 })}>\n {cells}\n </div>\n );\n}\n\nfunction SlideBehavioursPanel() {\n const canvas = useInStack(\"Canvas\");\n const editor = useEditor();\n const { width, height } = editor.technical;\n\n if (!canvas || editor.technical.type !== \"Canvas\") {\n return (\n <Sidebar>\n <SidebarHeader title=\"Slide behaviors\" />\n <div>Please select canvas</div>\n </Sidebar>\n );\n }\n\n return (\n <Sidebar>\n <SidebarContent>\n <div className=\"px-2\">\n <InputContainer $wide>\n <DimensionsTriplet\n widthId={width.containerId()}\n width={width.get() || 0}\n changeWidth={(v) => width.set(v)}\n heightId={height.containerId()}\n height={height.get() || 0}\n changeHeight={(v) => height.set(v)}\n />\n <div>\n <AspectRatioWarning />\n </div>\n </InputContainer>\n </div>\n\n <BehaviorEditor\n behavior={editor.technical.behavior.get() || []}\n onChange={(v) => {\n editor.technical.behavior.set(v);\n }}\n configs={exhibitionConfigs}\n />\n </SidebarContent>\n </Sidebar>\n );\n}\n","import * as ManifestPreset from \"@manifest-editor/manifest-preset\";\nimport { extendApp, mapApp } from \"@manifest-editor/shell\";\nimport \"./index.css\";\nimport { tourStepAnnotations } from \"./annotations/TourStepAnnotations\";\nimport { exhibitionBackgroundTask } from \"./background-panel\";\nimport { imageBlockEditor } from \"./canvas-editors/image-block-editor\";\nimport { infoBlockEditor } from \"./canvas-editors/info-block-editor\";\nimport { youtubeMainEdtior } from \"./canvas-editors/youtube-editor\";\nimport { exhibitionCenterPanel } from \"./center-panels/ExhibitionCenterPanel\";\nimport { imageBrowserSlideCreator } from \"./creators/image-browser-slide-creator\";\nimport { imageServiceSlideCreator } from \"./creators/image-service-slide-creator\";\nimport { imageSlideCreator } from \"./creators/image-slide-creator\";\nimport { imageUrlSlideCreator } from \"./creators/image-url-slide\";\nimport { infoBoxCreator } from \"./creators/info-box-creator\";\nimport { videoSlideCreator } from \"./creators/video-slide-creator\";\nimport { youtubeSlideCreator } from \"./creators/youtube-slide-creator\";\nimport { exhibitionGridLeftPanel } from \"./left-panels/ExhibitionGrid\";\nimport { exhibitionOverviewLeftPanel } from \"./left-panels/ExhibitionOverview\";\nimport { exhibitionCanvasEditor } from \"./right-panels/ExhibitionCanvasEditor\";\nimport { exhibitionSummaryEdtior } from \"./right-panels/ExhibitionSummaryEditor\";\nimport { exhibitionTourSteps } from \"./right-panels/ExhibitionTourSteps\";\nimport { customBehaviourEditor } from \"./right-panels/SlideBehaviours\";\n\nexport const exhibitionEditorPreset = extendApp(\n mapApp(ManifestPreset),\n {\n id: \"exhibition-editor\",\n title: \"Exhibition Editor\",\n project: true,\n projectType: \"Manifest\",\n },\n {\n config: {\n editorConfig: {\n Canvas: {\n hideTabs: [\n \"@manifest-editor/overview\",\n \"@manifest-editor/technical-properties\",\n \"@manifest-editor/linking-properties\",\n \"@manifest-editor/nav-place-editor\",\n \"@manifest-editor/canvas-structural\",\n \"@manifest-editor/descriptive-properties\",\n \"@manifest-editor/overview-canvas-editor\",\n \"@manifest-editor/metadata\",\n ],\n },\n },\n },\n leftPanels: [\n //\n exhibitionGridLeftPanel,\n exhibitionOverviewLeftPanel,\n ],\n centerPanels: [\n //\n exhibitionCenterPanel,\n ],\n annotations: [\n //\n tourStepAnnotations,\n ],\n leftPanelIds: [\"left-panel-manifest\"],\n background: [exhibitionBackgroundTask],\n canvasEditors: [\n //\n imageBlockEditor,\n youtubeMainEdtior,\n infoBlockEditor,\n ],\n editors: [\n //\n exhibitionCanvasEditor,\n customBehaviourEditor,\n exhibitionSummaryEdtior,\n exhibitionTourSteps,\n ],\n creators: [\n infoBoxCreator,\n youtubeSlideCreator,\n imageServiceSlideCreator,\n imageBrowserSlideCreator,\n imageSlideCreator,\n imageUrlSlideCreator,\n videoSlideCreator,\n ],\n },\n);\n"],"mappings":"k3FAKA,MAAaA,GAAuC,CAClD,GAAI,oCACJ,MAAO,aACP,WAAc,EAAC,GAAA,EAAA,CAAsB,CACtC,CAED,SAAS,IAAsB,CAC7B,IAAM,EAAS,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D,QAAS,CAEP,GACA,GACA,GACA,GACD,CACD,SAAU,CACR,GACA,GACA,GACA,GACA,EACA,GACA,GACD,CACF,CACF"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manifest-editor/exhibition-preset",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/digirati-co-uk/iiif-manifest-editor.git",
|
|
8
|
+
"url": "git+https://github.com/digirati-co-uk/iiif-manifest-editor.git",
|
|
9
9
|
"directory": "packages/exhibition-preset"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
@@ -18,63 +18,61 @@
|
|
|
18
18
|
],
|
|
19
19
|
"main": "./dist/index.cjs",
|
|
20
20
|
"module": "./dist/index.js",
|
|
21
|
-
"types": "./dist/index.d.
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
22
|
"files": [
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"default": "./dist/index.cjs"
|
|
30
|
-
},
|
|
31
|
-
"import": {
|
|
32
|
-
"types": "./dist/index.d.ts",
|
|
33
|
-
"default": "./dist/index.js"
|
|
34
|
-
}
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
35
29
|
},
|
|
30
|
+
"./package.json": "./package.json",
|
|
36
31
|
"./dist/index.css": "./dist/index.css"
|
|
37
32
|
},
|
|
38
33
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"dev": "
|
|
34
|
+
"build": "tsdown",
|
|
35
|
+
"dev": "tsdown --watch",
|
|
41
36
|
"typecheck": "tsc --noEmit",
|
|
42
|
-
"prepack": "
|
|
37
|
+
"prepack": "tsdown --clean"
|
|
43
38
|
},
|
|
44
39
|
"dependencies": {
|
|
45
40
|
"@dnd-kit/core": "^6.0.8",
|
|
46
41
|
"@dnd-kit/modifiers": "7.0.0",
|
|
47
42
|
"@dnd-kit/sortable": "8.0.0",
|
|
48
43
|
"@dnd-kit/utilities": "^3.2.1",
|
|
49
|
-
"@iiif/helpers": "
|
|
50
|
-
"@iiif/parser": "
|
|
44
|
+
"@iiif/helpers": "1.5.7",
|
|
45
|
+
"@iiif/parser": "2.2.8",
|
|
51
46
|
"@iiif/presentation-3": "^2.2.3",
|
|
52
47
|
"@iiif/presentation-3-normalized": "^0.9.7",
|
|
53
|
-
"@manifest-editor/components": "
|
|
54
|
-
"@manifest-editor/creator-api": "
|
|
55
|
-
"@manifest-editor/creators": "
|
|
56
|
-
"@manifest-editor/editor-api": "
|
|
57
|
-
"@manifest-editor/editors": "
|
|
58
|
-
"@manifest-editor/manifest-preset": "
|
|
59
|
-
"@manifest-editor/shell": "
|
|
60
|
-
"
|
|
61
|
-
"react
|
|
62
|
-
"react-
|
|
63
|
-
"react-
|
|
48
|
+
"@manifest-editor/components": "2.0.0",
|
|
49
|
+
"@manifest-editor/creator-api": "2.0.0",
|
|
50
|
+
"@manifest-editor/creators": "2.0.0",
|
|
51
|
+
"@manifest-editor/editor-api": "2.0.0",
|
|
52
|
+
"@manifest-editor/editors": "2.0.0",
|
|
53
|
+
"@manifest-editor/manifest-preset": "2.0.0",
|
|
54
|
+
"@manifest-editor/shell": "2.0.0",
|
|
55
|
+
"exhibition-viewer": "^1.0.10",
|
|
56
|
+
"react": "19.2.0",
|
|
57
|
+
"react-aria-components": "^1.12",
|
|
58
|
+
"react-dom": "19.2.0",
|
|
59
|
+
"react-iiif-vault": "2.0.6",
|
|
64
60
|
"tailwind-merge": "^2.3.0",
|
|
65
61
|
"tiny-invariant": "^1.3.3",
|
|
66
|
-
"zustand": "
|
|
62
|
+
"zustand": "4.5.2"
|
|
67
63
|
},
|
|
68
64
|
"devDependencies": {
|
|
69
|
-
"@manifest-editor/ui": "
|
|
70
|
-
"@repo/eslint-config": "
|
|
65
|
+
"@manifest-editor/ui": "2.0.0",
|
|
66
|
+
"@repo/eslint-config": "",
|
|
71
67
|
"@types/react": "^18.3.3",
|
|
72
68
|
"@types/react-dom": "^18.3.0",
|
|
69
|
+
"postcss-import": "^16.1.0",
|
|
70
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
73
71
|
"tiny-invariant": "^1.3.3",
|
|
74
|
-
"
|
|
72
|
+
"tsdown": "0.16.4"
|
|
75
73
|
},
|
|
76
74
|
"publishConfig": {
|
|
77
75
|
"access": "public"
|
|
78
76
|
},
|
|
79
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "0baa971edfd5c47a0c492ccfd3e836fb1345a038"
|
|
80
78
|
}
|