@manifest-editor/creators 2.1.0 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manifest-editor/creators",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
6
6
  "repository": {
@@ -27,7 +27,8 @@
27
27
  "import": "./dist/index.js",
28
28
  "require": "./dist/index.cjs"
29
29
  },
30
- "./package.json": "./package.json"
30
+ "./package.json": "./package.json",
31
+ "./index.css": "./dist/index.css"
31
32
  },
32
33
  "scripts": {
33
34
  "build": "tsdown src/index.ts",
@@ -37,35 +38,38 @@
37
38
  "prepack": "tsdown src/index.ts"
38
39
  },
39
40
  "dependencies": {
40
- "@iiif/helpers": "1.5.7",
41
- "@iiif/parser": "2.2.8",
41
+ "@atlas-viewer/atlas": "3.2.3",
42
+ "@iiif/helpers": "1.6.1",
43
+ "@iiif/parser": "2.2.14",
42
44
  "@iiif/presentation-3": "^2.2.3",
43
45
  "@iiif/presentation-3-normalized": "^0.9.7",
44
- "@manifest-editor/components": "2.1.0",
45
- "@manifest-editor/creator-api": "2.1.0",
46
- "@manifest-editor/editor-api": "2.1.0",
47
- "@manifest-editor/editors": "2.1.0",
48
- "@manifest-editor/shell": "2.1.0",
49
- "iiif-browser": "2.0.5-next.95a29ac",
50
- "react": "19.2.0",
51
- "react-dom": "19.2.0",
46
+ "@manifest-editor/components": "2.2.0",
47
+ "@manifest-editor/creator-api": "2.2.0",
48
+ "@manifest-editor/editor-api": "2.2.0",
49
+ "@manifest-editor/editors": "2.2.0",
50
+ "@manifest-editor/shell": "2.2.0",
51
+ "iiif-browser": "https://pkg.pr.new/digirati-co-uk/iiif-browser/iiif-browser@4934ee2",
52
+ "react": "19.2.8",
53
+ "react-dom": "19.2.8",
52
54
  "react-error-boundary": "^4.0.13",
53
- "react-iiif-vault": "2.0.11",
55
+ "react-iiif-vault": "2.0.18",
54
56
  "styled-components": "6.1.8"
55
57
  },
56
58
  "devDependencies": {
57
59
  "@atlas-viewer/iiif-image-api": "^2.2.0",
58
- "@manifest-editor/ui": "2.1.0",
59
- "@repo/eslint-config": "",
60
- "@types/react": "^18.3.3",
61
- "@types/react-dom": "^18.3.0",
62
- "postcss-import": "^16.1.0",
63
- "rollup-plugin-postcss": "^4.0.2",
60
+ "@manifest-editor/ui": "2.2.0",
61
+ "@tsdown/css": "0.22.14",
62
+ "@types/react": "19.2.18",
63
+ "@types/react-dom": "19.2.4",
64
64
  "tiny-invariant": "^1.3.3",
65
- "tsdown": "0.16.4"
65
+ "tsdown": "0.22.14"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "96fdf3010c854efc620205ad43a3e361fea56691"
70
+ "gitHead": "9ee7ce32bf7728205e22d852fb80061b86067471",
71
+ "inlinedDependencies": {
72
+ "@atlas-viewer/iiif-image-api": "2.2.0",
73
+ "tiny-invariant": "1.3.3"
74
+ }
71
75
  }
@@ -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=e(()=>a.options.initialData||{},[a.options.initialData]),s=r(),c=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]),l=e(()=>({canCropImage:!0,canSelectCanvas:!0,canSelectManifest:!1,canSelectCollection:!1,multiSelect:!0,...o.iiifBrowserOptions?.navigation||{}}),[o]);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`,...o.iiifBrowserOptions?.ui||{}}),[o]),vault:s,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:o.iiifBrowserOptions?.customPages||{},history:o.iiifBrowserOptions?.history||{}})})}export{a as default};
2
- //# sourceMappingURL=iiif-browser-form.lazy-B46fXhwH.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iiif-browser-form.lazy-B46fXhwH.js","names":["initialData: IIIFBrowserCreatorInitialData","resource","vault"],"sources":["../src/ContentResource/IIIFBrowserCreator/iiif-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 IIIFBrowserCreatorInitialData {\n iiifBrowserOptions?: Partial<IIIFBrowserProps>;\n}\n\nexport default function IIIFBrowserCreatorForm(props: CreatorContext) {\n const initialData: IIIFBrowserCreatorInitialData = useMemo(() => {\n return props.options.initialData || {};\n }, [props.options.initialData]);\n\n const vault = usePreviewVault();\n const output = useMemo(() => {\n return [\n {\n type: \"callback\",\n label: \"Select\",\n supportedTypes: [\"Canvas\", \"CanvasList\", \"CanvasRegion\", \"ImageService\", \"ImageServiceRegion\"],\n cb: (resource) => props.runCreate({ output: resource }),\n format: {\n type: \"custom\",\n format: (resource, parent, vault) => {\n const resourcesAsArray = Array.isArray(resource) ? resource : [{ ...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 ...(initialData.iiifBrowserOptions?.navigation || {}),\n } as IIIFBrowserProps[\"navigation\"];\n }, [initialData]);\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 // /collection.json\n ...(initialData.iiifBrowserOptions?.ui || {}),\n } as IIIFBrowserProps[\"ui\"];\n }, [initialData]);\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,EAAuB,EAAuB,CACpE,IAAMA,EAA6C,MAC1C,EAAM,QAAQ,aAAe,EAAE,CACrC,CAAC,EAAM,QAAQ,YAAY,CAAC,CAEzB,EAAQ,GAAiB,CACzB,EAAS,MACN,CACL,CACE,KAAM,WACN,MAAO,SACP,eAAgB,CAAC,SAAU,aAAc,eAAgB,eAAgB,qBAAqB,CAC9F,GAAK,GAAa,EAAM,UAAU,CAAE,OAAQ,EAAU,CAAC,CACvD,OAAQ,CACN,KAAM,SACN,QAAS,EAAU,EAAQ,IAAU,CACnC,IAAM,EAAmB,MAAM,QAAQ,EAAS,CAAG,EAAW,CAAC,CAAE,GAAG,EAAU,SAAQ,CAAC,CACjF,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,GAErB,YAAa,GACb,GAAI,EAAY,oBAAoB,YAAc,EAAE,CACrD,EACA,CAAC,EAAY,CAAC,CAWjB,OACE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CACC,GAZY,OACT,CACL,gBAAiB,uDACjB,SAAU,GAAG,OAAO,SAAS,OAAO,kBAEpC,GAAI,EAAY,oBAAoB,IAAM,EAAE,CAC7C,EACA,CAAC,EAAY,CAAC,CAMJ,QACP,UAAU,6FACF,SACR,WAAY,EACZ,YAAa,EAAY,oBAAoB,aAAe,EAAE,CAC9D,QAAS,EAAY,oBAAoB,SAAW,EAAE,EACtD,CAAA,CACmB"}
@@ -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,t.useMemo)(()=>e.options.initialData||{},[e.options.initialData]),o=(0,r.usePreviewVault)(),s=(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]),c=(0,t.useMemo)(()=>({canCropImage:!0,canSelectCanvas:!0,canSelectManifest:!1,canSelectCollection:!1,multiSelect:!0,...a.iiifBrowserOptions?.navigation||{}}),[a]);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`,...a.iiifBrowserOptions?.ui||{}}),[a]),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,customPages:a.iiifBrowserOptions?.customPages||{},history:a.iiifBrowserOptions?.history||{}})})}exports.default=a;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.css","names":[],"sources":["../src/index.css"],"sourcesContent":["export default undefined;"],"mappings":"AAAA"}
@@ -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)(()=>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}});
@@ -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(()=>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-CUJKdJ0m.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest-browser-form.lazy-CUJKdJ0m.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"}
@@ -1 +0,0 @@
1
- const e=require(`./manifest-browser-form.lazy-CMV49j5Z.cjs`);exports.default=e.t;
@@ -1 +0,0 @@
1
- import{t as e}from"./manifest-browser-form.lazy-CUJKdJ0m.js";export{e as default};