@manifest-editor/creators 1.3.0 → 1.3.1

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.
@@ -0,0 +1,38 @@
1
+ // src/Manifest/ManifestBrowserCreator/manifest-browser-form.lazy.tsx
2
+ import { IIIFExplorer } from "@manifest-editor/iiif-browser";
3
+ import {
4
+ usePreviewVault,
5
+ usePreviewHistory,
6
+ PreviewVaultBoundary,
7
+ HOMEPAGE_COLLECTION
8
+ } from "@manifest-editor/shell";
9
+ import { Fragment, jsx } from "react/jsx-runtime";
10
+ function ManifestBrowserCreatorForm(props) {
11
+ const vault = usePreviewVault();
12
+ const { addHistory, clearHistory } = usePreviewHistory();
13
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
14
+ IIIFExplorer,
15
+ {
16
+ window: false,
17
+ hideHeader: true,
18
+ outputTypes: ["Manifest", "Collection"],
19
+ vault,
20
+ output: { type: "content-state" },
21
+ homepageCollection: HOMEPAGE_COLLECTION,
22
+ clearHomepageCollection: clearHistory,
23
+ onHistory: addHistory,
24
+ outputTargets: [
25
+ {
26
+ type: "callback",
27
+ label: "Select",
28
+ cb: (resource) => props.runCreate({ output: resource })
29
+ }
30
+ ],
31
+ allowRemoveEntry: true
32
+ }
33
+ ) }) });
34
+ }
35
+
36
+ export {
37
+ ManifestBrowserCreatorForm
38
+ };
@@ -0,0 +1,57 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import { Vault } from "@iiif/helpers";
3
+ import {
4
+ PreviewVaultBoundary
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = useMemo(() => new Vault(), []);
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ const uiOptions = useMemo(() => {
39
+ return {
40
+ buttonClassName: "me-primary-500 text-white hover:bg-me-primary-600"
41
+ };
42
+ }, []);
43
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
44
+ IIIFBrowser,
45
+ {
46
+ debug: true,
47
+ ui: uiOptions,
48
+ vault,
49
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
50
+ output,
51
+ navigation: navigationOptions
52
+ }
53
+ ) });
54
+ }
55
+ export {
56
+ IIIFBrowserCreatorForm as default
57
+ };
@@ -0,0 +1,51 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import { Vault } from "@iiif/helpers";
3
+ import {
4
+ PreviewVaultBoundary
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = useMemo(() => new Vault(), []);
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
39
+ IIIFBrowser,
40
+ {
41
+ debug: true,
42
+ vault,
43
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
44
+ output,
45
+ navigation: navigationOptions
46
+ }
47
+ ) });
48
+ }
49
+ export {
50
+ IIIFBrowserCreatorForm as default
51
+ };
@@ -0,0 +1,57 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import { Vault } from "@iiif/helpers";
3
+ import {
4
+ PreviewVaultBoundary
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = useMemo(() => new Vault(), []);
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ const uiOptions = useMemo(() => {
39
+ return {
40
+ buttonClassName: "me-primary-500 text-white"
41
+ };
42
+ }, []);
43
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
44
+ IIIFBrowser,
45
+ {
46
+ debug: true,
47
+ ui: uiOptions,
48
+ vault,
49
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
50
+ output,
51
+ navigation: navigationOptions
52
+ }
53
+ ) });
54
+ }
55
+ export {
56
+ IIIFBrowserCreatorForm as default
57
+ };
@@ -0,0 +1,57 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import { Vault } from "@iiif/helpers";
3
+ import {
4
+ PreviewVaultBoundary
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = useMemo(() => new Vault(), []);
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ const uiOptions = useMemo(() => {
39
+ return {
40
+ buttonClassName: "bg-me-primary-500 text-white hover:bg-me-primary-600"
41
+ };
42
+ }, []);
43
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
44
+ IIIFBrowser,
45
+ {
46
+ debug: true,
47
+ ui: uiOptions,
48
+ vault,
49
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
50
+ output,
51
+ navigation: navigationOptions
52
+ }
53
+ ) });
54
+ }
55
+ export {
56
+ IIIFBrowserCreatorForm as default
57
+ };
@@ -0,0 +1,57 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import { Vault } from "@iiif/helpers";
3
+ import {
4
+ PreviewVaultBoundary
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = useMemo(() => new Vault(), []);
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ const uiOptions = useMemo(() => {
39
+ return {
40
+ buttonClassName: "me-primary-500"
41
+ };
42
+ }, []);
43
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
44
+ IIIFBrowser,
45
+ {
46
+ debug: true,
47
+ ui: uiOptions,
48
+ vault,
49
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
50
+ output,
51
+ navigation: navigationOptions
52
+ }
53
+ ) });
54
+ }
55
+ export {
56
+ IIIFBrowserCreatorForm as default
57
+ };
@@ -0,0 +1,48 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import {
3
+ PreviewVaultBoundary,
4
+ usePreviewVault
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = usePreviewVault();
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
29
+ IIIFBrowser,
30
+ {
31
+ debug: true,
32
+ vault,
33
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
34
+ output,
35
+ navigation: {
36
+ canCropImage: true,
37
+ canSelectCanvas: true,
38
+ canSelectManifest: false,
39
+ canSelectCollection: false,
40
+ // @todo fix the output so this one works.
41
+ multiSelect: false
42
+ }
43
+ }
44
+ ) });
45
+ }
46
+ export {
47
+ IIIFBrowserCreatorForm as default
48
+ };
@@ -0,0 +1,51 @@
1
+ // src/ContentResource/IIIFBrowserCreator/iiif-browser-form.lazy.tsx
2
+ import {
3
+ PreviewVaultBoundary,
4
+ usePreviewVault
5
+ } from "@manifest-editor/shell";
6
+ import { IIIFBrowser } from "iiif-browser";
7
+ import { useMemo } from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function IIIFBrowserCreatorForm(props) {
10
+ const vault = usePreviewVault();
11
+ const output = useMemo(() => {
12
+ return [
13
+ {
14
+ type: "callback",
15
+ label: "Select",
16
+ supportedTypes: [
17
+ "Canvas",
18
+ "CanvasList",
19
+ "CanvasRegion",
20
+ "ImageService",
21
+ "ImageServiceRegion"
22
+ ],
23
+ cb: (resource) => props.runCreate({ output: resource }),
24
+ format: { type: "content-state" }
25
+ }
26
+ ];
27
+ }, [props.runCreate]);
28
+ const navigationOptions = useMemo(() => {
29
+ return {
30
+ canCropImage: true,
31
+ canSelectCanvas: true,
32
+ canSelectManifest: false,
33
+ canSelectCollection: false,
34
+ // @todo fix the output so this one works.
35
+ multiSelect: false
36
+ };
37
+ }, []);
38
+ return /* @__PURE__ */ jsx(PreviewVaultBoundary, { children: /* @__PURE__ */ jsx(
39
+ IIIFBrowser,
40
+ {
41
+ debug: true,
42
+ vault,
43
+ className: "iiif-browser border-none border-t rounded-none h-[70vh] min-h-[60vh] max-h-full max-w-full",
44
+ output,
45
+ navigation: navigationOptions
46
+ }
47
+ ) });
48
+ }
49
+ export {
50
+ IIIFBrowserCreatorForm as default
51
+ };