@manifest-editor/creators 2.0.2-next.0.fed8073 → 2.0.3-next.0.2c09e87
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/iiif-browser-form.lazy-B7Lg0pEn.js +2 -0
- package/dist/iiif-browser-form.lazy-B7Lg0pEn.js.map +1 -0
- package/dist/iiif-browser-form.lazy-ByLpHski.cjs +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.css +4 -3
- package/dist/index.d.cts +63 -63
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/manifest-browser-form.lazy-BJxkvzpe.cjs +1 -0
- package/dist/manifest-browser-form.lazy-BTnOj81t.js +2 -0
- package/dist/manifest-browser-form.lazy-BTnOj81t.js.map +1 -0
- package/dist/manifest-browser-form.lazy-C6Kbyc7m.js +1 -0
- package/dist/manifest-browser-form.lazy-DqPd_M1o.cjs +1 -0
- package/package.json +8 -8
- package/dist/iiif-browser-form.lazy-3ZdoCwGA.cjs +0 -1
- package/dist/iiif-browser-form.lazy-C2OEJ-sB.js +0 -2
- package/dist/iiif-browser-form.lazy-C2OEJ-sB.js.map +0 -1
- package/dist/manifest-browser-form.lazy-ChGxMNuK.js +0 -1
- package/dist/manifest-browser-form.lazy-CyY_B4mJ.cjs +0 -1
- package/dist/manifest-browser-form.lazy-DnIXlrw4.cjs +0 -1
- package/dist/manifest-browser-form.lazy-WlvvR5FO.js +0 -2
- package/dist/manifest-browser-form.lazy-WlvvR5FO.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./manifest-browser-form.lazy-DqPd_M1o.cjs`);exports.default=e.t;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useMemo as e}from"react";import{jsx as t}from"react/jsx-runtime";import{PreviewVaultBoundary as n,usePreviewVault as r}from"@manifest-editor/shell";import{IIIFBrowser as i}from"iiif-browser";function a(a){let o=r(),s=e(()=>a.options.initialData||{},[a.options.initialData]),c=e(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Manifest`,`Collection`,`ManifestList`,`CollectionList`,`CollectionItemList`],cb:e=>a.runCreate({output:e}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[a.runCreate]),l=e(()=>({canCropImage:!1,canSelectCanvas:!1,canSelectManifest:!0,canSelectCollection:!0,multiSelect:!0,...s.iiifBrowserOptions?.navigation||{}}),[s.iiifBrowserOptions?.navigation]);return t(n,{children:t(i,{ui:e(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`,homeLink:`${window.location.origin}/collection.json`,...s.iiifBrowserOptions?.ui||{}}),[s.iiifBrowserOptions?.ui]),vault:o,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:c,navigation:l,customPages:s.iiifBrowserOptions?.customPages||{},history:s.iiifBrowserOptions?.history||{}})})}export{a as t};
|
|
2
|
+
//# sourceMappingURL=manifest-browser-form.lazy-BTnOj81t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-browser-form.lazy-BTnOj81t.js","names":["initialData: ManifestBrowserCreatorInitialData","resource","vault"],"sources":["../src/Manifest/ManifestBrowserCreator/manifest-browser-form.lazy.tsx"],"sourcesContent":["import type { CreatorContext } from \"@manifest-editor/creator-api\";\nimport { PreviewVaultBoundary, usePreviewVault } from \"@manifest-editor/shell\";\nimport { IIIFBrowser, type IIIFBrowserProps } from \"iiif-browser\";\nimport { useMemo } from \"react\";\n\nexport interface ManifestBrowserCreatorInitialData {\n iiifBrowserOptions?: Partial<IIIFBrowserProps>;\n}\n\nexport default function ManifestBrowserCreatorForm(props: CreatorContext) {\n const vault = usePreviewVault();\n const initialData: ManifestBrowserCreatorInitialData = useMemo(() => {\n return props.options.initialData || {};\n }, [props.options.initialData]);\n\n const output = useMemo(() => {\n return [\n {\n type: \"callback\",\n label: \"Select\",\n supportedTypes: [\n \"Manifest\",\n \"Collection\",\n \"ManifestList\",\n \"CollectionList\",\n \"CollectionItemList\",\n ],\n cb: (resource) => props.runCreate({ output: resource }),\n format: {\n type: \"custom\",\n format: (resource, parent, vault) => {\n const resourcesAsArray = Array.isArray(resource)\n ? resource\n : [{ ...resource, parent }];\n const resources = [];\n for (const resource of resourcesAsArray) {\n resources.push({\n resource: vault.get(resource),\n parent: resource.parent,\n selector: resource.selector,\n });\n }\n return resources;\n },\n },\n },\n ] as IIIFBrowserProps[\"output\"];\n }, [props.runCreate]);\n\n const navigationOptions = useMemo(() => {\n return {\n canCropImage: false,\n canSelectCanvas: false,\n canSelectManifest: true,\n canSelectCollection: true,\n multiSelect: true,\n ...(initialData.iiifBrowserOptions?.navigation || {}),\n };\n }, [initialData.iiifBrowserOptions?.navigation]);\n\n const uiOptions = useMemo(() => {\n return {\n buttonClassName: \"bg-me-primary-500 text-white hover:bg-me-primary-600\",\n homeLink: `${window.location.origin}/collection.json`,\n ...(initialData.iiifBrowserOptions?.ui || {}),\n } as IIIFBrowserProps[\"ui\"];\n }, [initialData.iiifBrowserOptions?.ui]);\n\n return (\n <PreviewVaultBoundary>\n <IIIFBrowser\n ui={uiOptions}\n vault={vault}\n className=\"iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full\"\n output={output}\n navigation={navigationOptions}\n customPages={(initialData.iiifBrowserOptions?.customPages || {})}\n history={initialData.iiifBrowserOptions?.history || {}}\n />\n </PreviewVaultBoundary>\n );\n}\n"],"mappings":"sMASA,SAAwB,EAA2B,EAAuB,CACxE,IAAM,EAAQ,GAAiB,CACzBA,EAAiD,MAC9C,EAAM,QAAQ,aAAe,EAAE,CACrC,CAAC,EAAM,QAAQ,YAAY,CAAC,CAEzB,EAAS,MACN,CACL,CACE,KAAM,WACN,MAAO,SACP,eAAgB,CACd,WACA,aACA,eACA,iBACA,qBACD,CACD,GAAK,GAAa,EAAM,UAAU,CAAE,OAAQ,EAAU,CAAC,CACvD,OAAQ,CACN,KAAM,SACN,QAAS,EAAU,EAAQ,IAAU,CACnC,IAAM,EAAmB,MAAM,QAAQ,EAAS,CAC5C,EACA,CAAC,CAAE,GAAG,EAAU,SAAQ,CAAC,CACvB,EAAY,EAAE,CACpB,IAAK,IAAMC,KAAY,EACrB,EAAU,KAAK,CACb,SAAUC,EAAM,IAAID,EAAS,CAC7B,OAAQA,EAAS,OACjB,SAAUA,EAAS,SACpB,CAAC,CAEJ,OAAO,GAEV,CACF,CACF,CACA,CAAC,EAAM,UAAU,CAAC,CAEf,EAAoB,OACjB,CACL,aAAc,GACd,gBAAiB,GACjB,kBAAmB,GACnB,oBAAqB,GACrB,YAAa,GACb,GAAI,EAAY,oBAAoB,YAAc,EAAE,CACrD,EACA,CAAC,EAAY,oBAAoB,WAAW,CAAC,CAUhD,OACE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,GAXY,OACT,CACL,gBAAiB,uDACjB,SAAU,GAAG,OAAO,SAAS,OAAO,kBACpC,GAAI,EAAY,oBAAoB,IAAM,EAAE,CAC7C,EACA,CAAC,EAAY,oBAAoB,GAAG,CAAC,CAM3B,QACP,UAAU,6FACF,SACR,WAAY,EACZ,YAAc,EAAY,oBAAoB,aAAe,EAAE,CAC/D,QAAS,EAAY,oBAAoB,SAAW,EAAE,EACtD,CAAA,CACmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./manifest-browser-form.lazy-BTnOj81t.js";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./index.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`@manifest-editor/shell`),i=require(`iiif-browser`);function a(e){let a=(0,r.usePreviewVault)(),o=(0,t.useMemo)(()=>e.options.initialData||{},[e.options.initialData]),s=(0,t.useMemo)(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Manifest`,`Collection`,`ManifestList`,`CollectionList`,`CollectionItemList`],cb:t=>e.runCreate({output:t}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[e.runCreate]),c=(0,t.useMemo)(()=>({canCropImage:!1,canSelectCanvas:!1,canSelectManifest:!0,canSelectCollection:!0,multiSelect:!0,...o.iiifBrowserOptions?.navigation||{}}),[o.iiifBrowserOptions?.navigation]);return(0,n.jsx)(r.PreviewVaultBoundary,{children:(0,n.jsx)(i.IIIFBrowser,{ui:(0,t.useMemo)(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`,homeLink:`${window.location.origin}/collection.json`,...o.iiifBrowserOptions?.ui||{}}),[o.iiifBrowserOptions?.ui]),vault:a,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:s,navigation:c,customPages:o.iiifBrowserOptions?.customPages||{},history:o.iiifBrowserOptions?.history||{}})})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manifest-editor/creators",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-next.0.2c09e87",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
|
|
6
6
|
"repository": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@iiif/parser": "2.2.8",
|
|
42
42
|
"@iiif/presentation-3": "^2.2.3",
|
|
43
43
|
"@iiif/presentation-3-normalized": "^0.9.7",
|
|
44
|
-
"@manifest-editor/components": "2.0.
|
|
45
|
-
"@manifest-editor/creator-api": "2.0.
|
|
46
|
-
"@manifest-editor/editor-api": "2.0.
|
|
47
|
-
"@manifest-editor/editors": "2.0.
|
|
48
|
-
"@manifest-editor/shell": "2.0.
|
|
44
|
+
"@manifest-editor/components": "2.0.3-next.0.2c09e87",
|
|
45
|
+
"@manifest-editor/creator-api": "2.0.3-next.0.2c09e87",
|
|
46
|
+
"@manifest-editor/editor-api": "2.0.3-next.0.2c09e87",
|
|
47
|
+
"@manifest-editor/editors": "2.0.3-next.0.2c09e87",
|
|
48
|
+
"@manifest-editor/shell": "2.0.3-next.0.2c09e87",
|
|
49
49
|
"iiif-browser": "2.0.5-next.95a29ac",
|
|
50
50
|
"react": "19.2.0",
|
|
51
51
|
"react-dom": "19.2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@atlas-viewer/iiif-image-api": "^2.2.0",
|
|
58
|
-
"@manifest-editor/ui": "2.0.
|
|
58
|
+
"@manifest-editor/ui": "2.0.2",
|
|
59
59
|
"@repo/eslint-config": "",
|
|
60
60
|
"@types/react": "^18.3.3",
|
|
61
61
|
"@types/react-dom": "^18.3.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "2c09e87eab40d98f09411903678f2b5b04aa01e4"
|
|
71
71
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./index.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`@manifest-editor/shell`),i=require(`iiif-browser`);function a(e){let a=(0,r.usePreviewVault)(),o=(0,t.useMemo)(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Canvas`,`CanvasList`,`CanvasRegion`,`ImageService`,`ImageServiceRegion`],cb:t=>e.runCreate({output:t}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[e.runCreate]),s=(0,t.useMemo)(()=>({canCropImage:!0,canSelectCanvas:!0,canSelectManifest:!1,canSelectCollection:!1,multiSelect:!0}),[]);return(0,n.jsx)(r.PreviewVaultBoundary,{children:(0,n.jsx)(i.IIIFBrowser,{ui:(0,t.useMemo)(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`}),[]),vault:a,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:o,navigation:s})})}exports.default=a;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{jsx as t}from"react/jsx-runtime";import{PreviewVaultBoundary as n,usePreviewVault as r}from"@manifest-editor/shell";import{IIIFBrowser as i}from"iiif-browser";function a(a){let o=r(),s=e(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Canvas`,`CanvasList`,`CanvasRegion`,`ImageService`,`ImageServiceRegion`],cb:e=>a.runCreate({output:e}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[a.runCreate]),c=e(()=>({canCropImage:!0,canSelectCanvas:!0,canSelectManifest:!1,canSelectCollection:!1,multiSelect:!0}),[]);return t(n,{children:t(i,{ui:e(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`}),[]),vault:o,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:s,navigation:c})})}export{a as default};
|
|
2
|
-
//# sourceMappingURL=iiif-browser-form.lazy-C2OEJ-sB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iiif-browser-form.lazy-C2OEJ-sB.js","names":["resource","vault"],"sources":["../src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx"],"sourcesContent":["import { Vault } from \"@iiif/helpers\";\nimport type { CreatorContext } from \"@manifest-editor/creator-api\";\nimport { PreviewVaultBoundary, usePreviewVault } from \"@manifest-editor/shell\";\nimport { IIIFBrowser, type IIIFBrowserProps } from \"iiif-browser\";\nimport { useMemo } from \"react\";\n\nexport default function IIIFBrowserCreatorForm(props: CreatorContext) {\n const vault = usePreviewVault();\n const output = useMemo(() => {\n return [\n {\n type: \"callback\",\n label: \"Select\",\n supportedTypes: [\n \"Canvas\",\n \"CanvasList\",\n \"CanvasRegion\",\n \"ImageService\",\n \"ImageServiceRegion\",\n ],\n cb: (resource) => props.runCreate({ output: resource }),\n format: {\n type: \"custom\",\n format: (resource, parent, vault) => {\n const resourcesAsArray = Array.isArray(resource)\n ? resource\n : [{ ...resource, parent }];\n const resources = [];\n for (const resource of resourcesAsArray) {\n resources.push({\n resource: vault.get(resource),\n parent: resource.parent,\n selector: resource.selector,\n });\n }\n return resources;\n },\n },\n },\n ] as IIIFBrowserProps[\"output\"];\n }, [props.runCreate]);\n\n const navigationOptions = useMemo(() => {\n return {\n canCropImage: true,\n canSelectCanvas: true,\n canSelectManifest: false,\n canSelectCollection: false,\n // @todo fix the output so this one works.\n multiSelect: true,\n };\n }, []);\n\n const uiOptions = useMemo(() => {\n return {\n buttonClassName: \"bg-me-primary-500 text-white hover:bg-me-primary-600\",\n } as IIIFBrowserProps[\"ui\"];\n }, []);\n\n return (\n <PreviewVaultBoundary>\n <IIIFBrowser\n ui={uiOptions}\n vault={vault}\n className=\"iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full\"\n output={output}\n navigation={navigationOptions}\n />\n </PreviewVaultBoundary>\n );\n}\n"],"mappings":"sMAMA,SAAwB,EAAuB,EAAuB,CACpE,IAAM,EAAQ,GAAiB,CACzB,EAAS,MACN,CACL,CACE,KAAM,WACN,MAAO,SACP,eAAgB,CACd,SACA,aACA,eACA,eACA,qBACD,CACD,GAAK,GAAa,EAAM,UAAU,CAAE,OAAQ,EAAU,CAAC,CACvD,OAAQ,CACN,KAAM,SACN,QAAS,EAAU,EAAQ,IAAU,CACnC,IAAM,EAAmB,MAAM,QAAQ,EAAS,CAC5C,EACA,CAAC,CAAE,GAAG,EAAU,SAAQ,CAAC,CACvB,EAAY,EAAE,CACpB,IAAK,IAAMA,KAAY,EACrB,EAAU,KAAK,CACb,SAAUC,EAAM,IAAID,EAAS,CAC7B,OAAQA,EAAS,OACjB,SAAUA,EAAS,SACpB,CAAC,CAEJ,OAAO,GAEV,CACF,CACF,CACA,CAAC,EAAM,UAAU,CAAC,CAEf,EAAoB,OACjB,CACL,aAAc,GACd,gBAAiB,GACjB,kBAAmB,GACnB,oBAAqB,GAErB,YAAa,GACd,EACA,EAAE,CAAC,CAQN,OACE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,GATY,OACT,CACL,gBAAiB,uDAClB,EACA,EAAE,CAAC,CAMO,QACP,UAAU,6FACF,SACR,WAAY,GACZ,CAAA,CACmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./manifest-browser-form.lazy-WlvvR5FO.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./index.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`),r=require(`@manifest-editor/shell`),i=require(`iiif-browser`);function a(e){let a=(0,r.usePreviewVault)(),o=(0,t.useMemo)(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Manifest`,`Collection`,`ManifestList`,`CollectionList`,`CollectionItemList`],cb:t=>e.runCreate({output:t}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[e.runCreate]),s=(0,t.useMemo)(()=>({canCropImage:!1,canSelectCanvas:!1,canSelectManifest:!0,canSelectCollection:!0,multiSelect:!0}),[]);return(0,n.jsx)(r.PreviewVaultBoundary,{children:(0,n.jsx)(i.IIIFBrowser,{ui:(0,t.useMemo)(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`}),[]),vault:a,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:o,navigation:s})})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./manifest-browser-form.lazy-CyY_B4mJ.cjs`);exports.default=e.t;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{jsx as t}from"react/jsx-runtime";import{PreviewVaultBoundary as n,usePreviewVault as r}from"@manifest-editor/shell";import{IIIFBrowser as i}from"iiif-browser";function a(a){let o=r(),s=e(()=>[{type:`callback`,label:`Select`,supportedTypes:[`Manifest`,`Collection`,`ManifestList`,`CollectionList`,`CollectionItemList`],cb:e=>a.runCreate({output:e}),format:{type:`custom`,format:(e,t,n)=>{let r=Array.isArray(e)?e:[{...e,parent:t}],i=[];for(let e of r)i.push({resource:n.get(e),parent:e.parent,selector:e.selector});return i}}}],[a.runCreate]),c=e(()=>({canCropImage:!1,canSelectCanvas:!1,canSelectManifest:!0,canSelectCollection:!0,multiSelect:!0}),[]);return t(n,{children:t(i,{ui:e(()=>({buttonClassName:`bg-me-primary-500 text-white hover:bg-me-primary-600`}),[]),vault:o,className:`iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full`,output:s,navigation:c})})}export{a as t};
|
|
2
|
-
//# sourceMappingURL=manifest-browser-form.lazy-WlvvR5FO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-browser-form.lazy-WlvvR5FO.js","names":["resource","vault"],"sources":["../src/Manifest/ManifestBrowserCreator/manifest-browser-form.lazy.tsx"],"sourcesContent":["import { Vault } from \"@iiif/helpers\";\nimport type { CreatorContext } from \"@manifest-editor/creator-api\";\nimport { PreviewVaultBoundary, usePreviewVault } from \"@manifest-editor/shell\";\nimport { IIIFBrowser, type IIIFBrowserProps } from \"iiif-browser\";\nimport { useMemo } from \"react\";\n\nexport default function ManifestBrowserCreatorForm(props: CreatorContext) {\n const vault = usePreviewVault();\n const output = useMemo(() => {\n return [\n {\n type: \"callback\",\n label: \"Select\",\n supportedTypes: [\n \"Manifest\",\n \"Collection\",\n \"ManifestList\",\n \"CollectionList\",\n \"CollectionItemList\",\n ],\n cb: (resource) => props.runCreate({ output: resource }),\n format: {\n type: \"custom\",\n format: (resource, parent, vault) => {\n const resourcesAsArray = Array.isArray(resource)\n ? resource\n : [{ ...resource, parent }];\n const resources = [];\n for (const resource of resourcesAsArray) {\n resources.push({\n resource: vault.get(resource),\n parent: resource.parent,\n selector: resource.selector,\n });\n }\n return resources;\n },\n },\n },\n ] as IIIFBrowserProps[\"output\"];\n }, [props.runCreate]);\n\n const navigationOptions = useMemo(() => {\n return {\n canCropImage: false,\n canSelectCanvas: false,\n canSelectManifest: true,\n canSelectCollection: true,\n multiSelect: true,\n };\n }, []);\n\n const uiOptions = useMemo(() => {\n return {\n buttonClassName: \"bg-me-primary-500 text-white hover:bg-me-primary-600\",\n } as IIIFBrowserProps[\"ui\"];\n }, []);\n\n return (\n <PreviewVaultBoundary>\n <IIIFBrowser\n ui={uiOptions}\n vault={vault}\n className=\"iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full\"\n output={output}\n navigation={navigationOptions}\n />\n </PreviewVaultBoundary>\n );\n}\n"],"mappings":"sMAMA,SAAwB,EAA2B,EAAuB,CACxE,IAAM,EAAQ,GAAiB,CACzB,EAAS,MACN,CACL,CACE,KAAM,WACN,MAAO,SACP,eAAgB,CACd,WACA,aACA,eACA,iBACA,qBACD,CACD,GAAK,GAAa,EAAM,UAAU,CAAE,OAAQ,EAAU,CAAC,CACvD,OAAQ,CACN,KAAM,SACN,QAAS,EAAU,EAAQ,IAAU,CACnC,IAAM,EAAmB,MAAM,QAAQ,EAAS,CAC5C,EACA,CAAC,CAAE,GAAG,EAAU,SAAQ,CAAC,CACvB,EAAY,EAAE,CACpB,IAAK,IAAMA,KAAY,EACrB,EAAU,KAAK,CACb,SAAUC,EAAM,IAAID,EAAS,CAC7B,OAAQA,EAAS,OACjB,SAAUA,EAAS,SACpB,CAAC,CAEJ,OAAO,GAEV,CACF,CACF,CACA,CAAC,EAAM,UAAU,CAAC,CAEf,EAAoB,OACjB,CACL,aAAc,GACd,gBAAiB,GACjB,kBAAmB,GACnB,oBAAqB,GACrB,YAAa,GACd,EACA,EAAE,CAAC,CAQN,OACE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,GATY,OACT,CACL,gBAAiB,uDAClB,EACA,EAAE,CAAC,CAMO,QACP,UAAU,6FACF,SACR,WAAY,GACZ,CAAA,CACmB"}
|