@manifest-editor/creators 1.3.0 → 1.4.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/README.md +49 -0
- package/dist/chunk-AVISJS46.js +50 -0
- package/dist/chunk-ES62IRNT.js +50 -0
- package/dist/chunk-KLSWX2QF.js +38 -0
- package/dist/chunk-PFQB3PNW.js +47 -0
- package/dist/chunk-S3JO5Y3Z.js +50 -0
- package/dist/iiif-browser-form.lazy-3INAWCE5.js +54 -0
- package/dist/iiif-browser-form.lazy-4NX7YPGK.js +57 -0
- package/dist/iiif-browser-form.lazy-4X5LD2U4.js +51 -0
- package/dist/iiif-browser-form.lazy-5TF74M2Q.js +48 -0
- package/dist/iiif-browser-form.lazy-BHX6TGDY.js +58 -0
- package/dist/iiif-browser-form.lazy-C72INDSJ.js +57 -0
- package/dist/iiif-browser-form.lazy-DKKTAIO5.js +59 -0
- package/dist/iiif-browser-form.lazy-DPRO7R2W.js +59 -0
- package/dist/iiif-browser-form.lazy-EREIP6PZ.js +58 -0
- package/dist/iiif-browser-form.lazy-FQDZQ3UW.js +58 -0
- package/dist/iiif-browser-form.lazy-G7TCZSC2.js +58 -0
- package/dist/iiif-browser-form.lazy-HZ3M2DXT.js +57 -0
- package/dist/iiif-browser-form.lazy-I7KTYV3O.js +57 -0
- package/dist/iiif-browser-form.lazy-JMT72BLP.js +59 -0
- package/dist/iiif-browser-form.lazy-JX4S6NGX.js +48 -0
- package/dist/iiif-browser-form.lazy-KTB4BQBM.js +59 -0
- package/dist/iiif-browser-form.lazy-O35TC45U.js +49 -0
- package/dist/iiif-browser-form.lazy-OMDV43NQ.js +51 -0
- package/dist/iiif-browser-form.lazy-OXQVZ3GS.js +59 -0
- package/dist/iiif-browser-form.lazy-XORWZFSW.js +49 -0
- package/dist/index.cjs +1028 -537
- package/dist/index.d.cts +367 -21
- package/dist/index.d.ts +367 -21
- package/dist/index.js +954 -489
- package/dist/manifest-browser-form.lazy-FI4GGCPX.js +6 -0
- package/dist/manifest-browser-form.lazy-HJJKFMR6.js +6 -0
- package/dist/manifest-browser-form.lazy-MYI26AX4.js +6 -0
- package/dist/manifest-browser-form.lazy-XVYSAQAW.js +6 -0
- package/dist/manifest-browser-form.lazy-YYKOYF7R.js +6 -0
- package/package.json +12 -11
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
|
|
2
|
+
import { Vault } from "@iiif/helpers";
|
|
3
|
+
import { PreviewVaultBoundary } from "@manifest-editor/shell";
|
|
4
|
+
import { IIIFBrowser } from "iiif-browser";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function IIIFBrowserCreatorForm(props) {
|
|
8
|
+
const vault = useMemo(() => new Vault(), []);
|
|
9
|
+
const output = useMemo(() => {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
type: "callback",
|
|
13
|
+
label: "Select",
|
|
14
|
+
supportedTypes: ["Canvas", "CanvasList", "CanvasRegion", "ImageService", "ImageServiceRegion"],
|
|
15
|
+
cb: (resource) => props.runCreate({ output: resource }),
|
|
16
|
+
format: { type: "custom", format: (resource, parent, vault2) => ({ resource: vault2.get(resource), parent }) }
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
}, [props.runCreate]);
|
|
20
|
+
const navigationOptions = useMemo(() => {
|
|
21
|
+
return {
|
|
22
|
+
canCropImage: true,
|
|
23
|
+
canSelectCanvas: true,
|
|
24
|
+
canSelectManifest: false,
|
|
25
|
+
canSelectCollection: false,
|
|
26
|
+
// @todo fix the output so this one works.
|
|
27
|
+
multiSelect: true
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
const uiOptions = useMemo(() => {
|
|
31
|
+
return {
|
|
32
|
+
buttonClassName: "bg-me-primary-500 text-white hover:bg-me-primary-600"
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
|
|
36
|
+
IIIFBrowser,
|
|
37
|
+
{
|
|
38
|
+
debug: true,
|
|
39
|
+
ui: uiOptions,
|
|
40
|
+
vault,
|
|
41
|
+
className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
|
|
42
|
+
output,
|
|
43
|
+
navigation: navigationOptions
|
|
44
|
+
}
|
|
45
|
+
) });
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
IIIFBrowserCreatorForm as default
|
|
49
|
+
};
|