@manifest-editor/exhibition-preset 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/dist/index.css CHANGED
@@ -3,7 +3,6 @@
3
3
  }
4
4
 
5
5
  /* SVG */
6
-
7
6
  .atlas-cursor-se {
8
7
  cursor: se-resize;
9
8
  }
@@ -38,14 +37,12 @@
38
37
  8 8,
39
38
  pointer;
40
39
  }
41
-
42
40
  .atlas-cursor-draw {
43
41
  cursor:
44
42
  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAABSElEQVRYCe2TvWqEQBSFtxa09xECwSo/26dIL9iIog9i52P4JilCSLrdJGz6pA5sqs0PQqJuzoGdMBl0DehstpiBi3PH6z3fnBknEzOMA8aBDgfW7WOF5WnHJ+MuUx8df0UYhvOmaV52AtEGQCAJ4nTcLSvdZADOy7J8dF13SYgoioQT+iBkAIoj/2yBWGJdDwQar2D3LXfMnfdAnCgGDk8BMOWF64OI43iGOjphIIQTx8P9Vzr89TiSJJmhlsfxvxCbO7EXEEeKmcPTLcfxxV/VsqwPqKzTNBV3YncQRVFcUVyEBHGAtXGH6oTYOVR+ADjP8/watRfjqm+6qRCqOHPHcd5Q96oFgE37IHzfv0fNgzaAbRCe5z1VVfUMgHOtADJElmU3tm2/B0FwV9c1xSPt4kIAYoeISwTPfYE4E+/M0zhgHOhy4BtfABNjetwFVwAAAABJRU5ErkJggg==")
45
43
  4 4,
46
44
  pointer;
47
45
  }
48
-
49
46
  .atlas-cursor-cut {
50
47
  cursor:
51
48
  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAACQklEQVRYCe1VS0sCURR2TBNalCG0kUkLlKDcuuqxaNvOP+Cira3Vv2HoQoRaBv6HLDPDRUS7gqAH2AOcsQhBQafvi2kQHzkzWqsZ+Jhzzz2P7545547NZj0mK6AoyrRJ1/HdkHwbeABC40czGAFJFzqdjpzP548hP/87CSRcarVaj+CtxGKxc6xfgHmD5zBv3k2AJEiGOrMR7WYdJ+VnEZh4BdAPAnsCcOv5TBMjoCbeQ9IaGvME63ugDKz+RqSPABwWAJ5gIBBscUBAEbpUvV7fDQaDny6XS7Tb7XPJZLKNOMeAf4BPvwqG27xkOFrD0G63X7kHb4Wo1WpXXDcajVu32/3h8XikbDZbiEajFe5nMhlW46g/W48GRtPAA284Og5DJBK5ZEJRFKter7faa1epVE4R5xC4C4fDNz6frwr5qSedttQ+gSAILWh3kGAFN1xZszAn8ADmHrANAS///gm66YLAPDCwCaHf6u4BytBtAvuyLF8HAgGtPxKJxBl66g17/u74pmUEEoAUGw5BvvuEMnXAFLAHSM1m8xGJ65BHjqEhMkzAU6Lb338IUKaOewyGN0myerouIt0E1MASS8xRY7cTlKnDvkQb3QGNGiL4MkvLQ+ZyuQLWB8AhZ546tRcM/5a1MdRBSHI6nbO0KxaLM3htAOulUomyzeFwcE+m/GcPTnwRj8dLSKDwkiEos9uxN+7dMZo3kqxxrNLpdIE3HEFZHbVffzqjo+u0AAk/cAQ8qaDs1+lumVkVsCrQV4Ev5W84Pu7IH00AAAAASUVORK5CYII=")
package/dist/index.d.cts CHANGED
@@ -1,18 +1,91 @@
1
- import * as _manifest_editor_shell1 from "@manifest-editor/shell";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as React from "react";
3
2
  import { SVGProps } from "react";
4
-
3
+ import { CreatorResource } from "@manifest-editor/creator-api";
4
+ import { CreateImageServicePayload } from "@manifest-editor/creators";
5
+ import { DelftExhibitionProps, DelftPresentationProps } from "exhibition-viewer/library";
5
6
  //#region src/icons/PresetIcon.d.ts
6
- declare const PresetIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime0.JSX.Element;
7
+ declare const PresetIcon: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
8
+ //#endregion
9
+ //#region src/creators/image-service-slide-creator.d.ts
10
+ interface CreateImageServiceSlidePayload extends CreateImageServicePayload {
11
+ imageSlideBehavior?: string[];
12
+ slideType?: "default" | "left" | "right" | "bottom";
13
+ }
14
+ declare module "@manifest-editor/creator-api" {
15
+ namespace IIIFManifestEditor {
16
+ interface CreatorDefinitions {
17
+ "@exhibitions/image-service-creator": typeof imageServiceSlideCreator;
18
+ }
19
+ }
20
+ }
21
+ declare const imageServiceSlideCreator: import("@manifest-editor/creator-api").SpecificCreatorDefinition<CreateImageServicePayload, "@exhibitions/image-service-creator", "Canvas", [], ["Canvas"], ["Manifest"], ["items"], Promise<CreatorResource>>;
7
22
  //#endregion
8
23
  //#region src/presets/scrolling-preset.d.ts
9
- declare const exhibitionEditorScrollingPreset: _manifest_editor_shell1.MappedApp;
24
+ declare const exhibitionEditorScrollingPreset: import("@manifest-editor/shell").MappedApp;
10
25
  //#endregion
11
26
  //#region src/presets/slideshow-preset.d.ts
12
- declare const exhibitionEditorSlideshowPreset: _manifest_editor_shell1.MappedApp;
27
+ declare const exhibitionEditorSlideshowPreset: import("@manifest-editor/shell").MappedApp;
28
+ //#endregion
29
+ //#region src/helpers/exhibition-preview-url-helper.d.ts
30
+ type PresetUrlSearchParamsPreset = "delft" | "exhibition" | "minimal" | "presentation" | "scroll" | "slideshow";
31
+ type TableOfContentsPlacement = "header" | "footer";
32
+ type FloatingPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right";
33
+ type PresetUrlSearchParamsByPreset = {
34
+ delft: DelftPresetUrlSearchParamsOptions;
35
+ exhibition: DelftPresetUrlSearchParamsOptions;
36
+ minimal: MinimalPresetUrlSearchParamsOptions;
37
+ presentation: PresentationPresetUrlSearchParamsOptions;
38
+ scroll: ScrollPresetUrlSearchParamsOptions;
39
+ slideshow: SlideshowPresetUrlSearchParamsOptions;
40
+ };
41
+ type PresetUrlSearchParamsOptions<T extends PresetUrlSearchParamsPreset = PresetUrlSearchParamsPreset> = PresetUrlSearchParamsByPreset[T];
42
+ type SharedPresetUrlSearchParamsOptions = {
43
+ manifest: string;
44
+ canvas?: string;
45
+ };
46
+ type DelftPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & Pick<NonNullable<DelftExhibitionProps["options"]>, "cutCorners" | "fullTitleBar"> & {
47
+ hideTableOfContents?: boolean;
48
+ ignoreCanvasBackgrounds?: boolean;
49
+ showNavigationControls?: boolean;
50
+ showProgressBar?: boolean;
51
+ tableOfContentsPlacement?: TableOfContentsPlacement;
52
+ };
53
+ type MinimalPresetUrlSearchParamsOptions = DelftPresetUrlSearchParamsOptions;
54
+ type PresentationPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & Pick<NonNullable<DelftPresentationProps["options"]>, "cutCorners" | "isFloating"> & {
55
+ floating?: NonNullable<DelftPresentationProps["options"]>["isFloating"];
56
+ floatingPosition?: FloatingPosition;
57
+ ignoreCanvasBackgrounds?: boolean;
58
+ labelOnlyFloating?: boolean;
59
+ };
60
+ type SlideshowPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & {
61
+ minimal?: boolean;
62
+ floating?: NonNullable<DelftPresentationProps["options"]>["isFloating"];
63
+ floatingPosition?: FloatingPosition;
64
+ ignoreCanvasBackgrounds?: boolean;
65
+ labelOnlyFloating?: boolean;
66
+ };
67
+ type ScrollPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & {
68
+ minimal?: boolean;
69
+ manifestEditorPreview?: boolean;
70
+ manifestEditorPreviewOrigin?: string;
71
+ ignoreCanvasBackgrounds?: boolean;
72
+ tableOfContentsPlacement?: TableOfContentsPlacement;
73
+ };
74
+ //#endregion
75
+ //#region src/components/ExhibitionPreviewPanel.d.ts
76
+ interface ExhibitionPreviewPanelProps {
77
+ preset: PresetUrlSearchParamsPreset;
78
+ presetOptions?: Partial<PresetUrlSearchParamsOptions>;
79
+ focusSelectedCanvas?: boolean;
80
+ }
81
+ declare function useExhibitionPreviewWindow({ preset, presetOptions, focusSelectedCanvas }: ExhibitionPreviewPanelProps): {
82
+ open: () => void;
83
+ focus: () => void;
84
+ isClosed: boolean;
85
+ };
13
86
  //#endregion
14
87
  //#region src/index.d.ts
15
- declare const exhibitionEditorPreset: _manifest_editor_shell1.MappedApp;
88
+ declare const exhibitionEditorPreset: import("@manifest-editor/shell").MappedApp;
16
89
  //#endregion
17
- export { PresetIcon, exhibitionEditorPreset, exhibitionEditorScrollingPreset, exhibitionEditorSlideshowPreset };
90
+ export { type CreateImageServiceSlidePayload, PresetIcon, exhibitionEditorPreset, exhibitionEditorScrollingPreset, exhibitionEditorSlideshowPreset, imageServiceSlideCreator, useExhibitionPreviewWindow };
18
91
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/icons/PresetIcon.tsx","../src/presets/scrolling-preset.ts","../src/presets/slideshow-preset.ts","../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;cAGM,oBAAqB,SAAS,mBAAc,kBAAA,CAAA,GAAA,CAAA;;;cCarC,iCA+CZ,uBAAA,CA/C2C;;;cCM/B,iCAiEZ,uBAAA,CAjE2C;;;cCU/B,wBAmEZ,uBAAA,CAnEkC"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/icons/PresetIcon.tsx","../src/creators/image-service-slide-creator.tsx","../src/presets/scrolling-preset.ts","../src/presets/slideshow-preset.ts","../src/helpers/exhibition-preview-url-helper.ts","../src/components/ExhibitionPreviewPanel.tsx","../src/index.tsx"],"mappings":";;;;;;cAGM,aAAU,OAAW,SAAS,mBAAc,MAAA,IAAA;;;UCMjC,uCAAuC;EACtD;EACA;;;YAIU;cACE;MACR,6CAA6C;;;;cAKtC,iEAAwB,0BAAA,oHAAA,QAAA;;;cCAxB,kEAA+B;;;cCK/B,kEAA+B;;;KCzBhC;KACP;KACA;KAEO;EACV,OAAO;EACP,YAAY;EACZ,SAAS;EACT,cAAc;EACd,QAAQ;EACR,WAAW;;KAGD,6BAA6B,UAAU,8BAA8B,+BAC/E,8BAA8B;KAE3B;EACH;EACA;;KAGU,oCAAoC,qCAC9C,KAAK,YAAY;EACf;EACA;EACA;EACA;EACA,2BAA2B;;KAGnB,sCAAsC;KAEtC,2CAA2C,qCACrD,KAAK,YAAY;EACf,WAAW,YAAY;EACvB,mBAAmB;EACnB;EACA;;KAGQ,wCAAwC;EAClD;EACA,WAAW,YAAY;EACvB,mBAAmB;EACnB;EACA;;KAGU,qCAAqC;EAC/C;EACA;EACA;EACA;EACA,2BAA2B;;;;UCzCZ;EACf,QAAQ;EACR,gBAAgB,QAAQ;EACxB;;iBAwNc,6BACd,QACA,eACA,uBACC;;;;;;;cCrMU,yDAAsB"}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,91 @@
1
- import * as _manifest_editor_shell1 from "@manifest-editor/shell";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as React from "react";
3
2
  import { SVGProps } from "react";
4
-
3
+ import { DelftExhibitionProps, DelftPresentationProps } from "exhibition-viewer/library";
4
+ import { CreatorResource } from "@manifest-editor/creator-api";
5
+ import { CreateImageServicePayload } from "@manifest-editor/creators";
5
6
  //#region src/icons/PresetIcon.d.ts
6
- declare const PresetIcon: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime0.JSX.Element;
7
+ declare const PresetIcon: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
8
+ //#endregion
9
+ //#region src/creators/image-service-slide-creator.d.ts
10
+ interface CreateImageServiceSlidePayload extends CreateImageServicePayload {
11
+ imageSlideBehavior?: string[];
12
+ slideType?: "default" | "left" | "right" | "bottom";
13
+ }
14
+ declare module "@manifest-editor/creator-api" {
15
+ namespace IIIFManifestEditor {
16
+ interface CreatorDefinitions {
17
+ "@exhibitions/image-service-creator": typeof imageServiceSlideCreator;
18
+ }
19
+ }
20
+ }
21
+ declare const imageServiceSlideCreator: import("@manifest-editor/creator-api").SpecificCreatorDefinition<CreateImageServicePayload, "@exhibitions/image-service-creator", "Canvas", [], ["Canvas"], ["Manifest"], ["items"], Promise<CreatorResource>>;
7
22
  //#endregion
8
23
  //#region src/presets/scrolling-preset.d.ts
9
- declare const exhibitionEditorScrollingPreset: _manifest_editor_shell1.MappedApp;
24
+ declare const exhibitionEditorScrollingPreset: import("@manifest-editor/shell").MappedApp;
10
25
  //#endregion
11
26
  //#region src/presets/slideshow-preset.d.ts
12
- declare const exhibitionEditorSlideshowPreset: _manifest_editor_shell1.MappedApp;
27
+ declare const exhibitionEditorSlideshowPreset: import("@manifest-editor/shell").MappedApp;
28
+ //#endregion
29
+ //#region src/helpers/exhibition-preview-url-helper.d.ts
30
+ type PresetUrlSearchParamsPreset = "delft" | "exhibition" | "minimal" | "presentation" | "scroll" | "slideshow";
31
+ type TableOfContentsPlacement = "header" | "footer";
32
+ type FloatingPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom" | "left" | "right";
33
+ type PresetUrlSearchParamsByPreset = {
34
+ delft: DelftPresetUrlSearchParamsOptions;
35
+ exhibition: DelftPresetUrlSearchParamsOptions;
36
+ minimal: MinimalPresetUrlSearchParamsOptions;
37
+ presentation: PresentationPresetUrlSearchParamsOptions;
38
+ scroll: ScrollPresetUrlSearchParamsOptions;
39
+ slideshow: SlideshowPresetUrlSearchParamsOptions;
40
+ };
41
+ type PresetUrlSearchParamsOptions<T extends PresetUrlSearchParamsPreset = PresetUrlSearchParamsPreset> = PresetUrlSearchParamsByPreset[T];
42
+ type SharedPresetUrlSearchParamsOptions = {
43
+ manifest: string;
44
+ canvas?: string;
45
+ };
46
+ type DelftPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & Pick<NonNullable<DelftExhibitionProps["options"]>, "cutCorners" | "fullTitleBar"> & {
47
+ hideTableOfContents?: boolean;
48
+ ignoreCanvasBackgrounds?: boolean;
49
+ showNavigationControls?: boolean;
50
+ showProgressBar?: boolean;
51
+ tableOfContentsPlacement?: TableOfContentsPlacement;
52
+ };
53
+ type MinimalPresetUrlSearchParamsOptions = DelftPresetUrlSearchParamsOptions;
54
+ type PresentationPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & Pick<NonNullable<DelftPresentationProps["options"]>, "cutCorners" | "isFloating"> & {
55
+ floating?: NonNullable<DelftPresentationProps["options"]>["isFloating"];
56
+ floatingPosition?: FloatingPosition;
57
+ ignoreCanvasBackgrounds?: boolean;
58
+ labelOnlyFloating?: boolean;
59
+ };
60
+ type SlideshowPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & {
61
+ minimal?: boolean;
62
+ floating?: NonNullable<DelftPresentationProps["options"]>["isFloating"];
63
+ floatingPosition?: FloatingPosition;
64
+ ignoreCanvasBackgrounds?: boolean;
65
+ labelOnlyFloating?: boolean;
66
+ };
67
+ type ScrollPresetUrlSearchParamsOptions = SharedPresetUrlSearchParamsOptions & {
68
+ minimal?: boolean;
69
+ manifestEditorPreview?: boolean;
70
+ manifestEditorPreviewOrigin?: string;
71
+ ignoreCanvasBackgrounds?: boolean;
72
+ tableOfContentsPlacement?: TableOfContentsPlacement;
73
+ };
74
+ //#endregion
75
+ //#region src/components/ExhibitionPreviewPanel.d.ts
76
+ interface ExhibitionPreviewPanelProps {
77
+ preset: PresetUrlSearchParamsPreset;
78
+ presetOptions?: Partial<PresetUrlSearchParamsOptions>;
79
+ focusSelectedCanvas?: boolean;
80
+ }
81
+ declare function useExhibitionPreviewWindow({ preset, presetOptions, focusSelectedCanvas }: ExhibitionPreviewPanelProps): {
82
+ open: () => void;
83
+ focus: () => void;
84
+ isClosed: boolean;
85
+ };
13
86
  //#endregion
14
87
  //#region src/index.d.ts
15
- declare const exhibitionEditorPreset: _manifest_editor_shell1.MappedApp;
88
+ declare const exhibitionEditorPreset: import("@manifest-editor/shell").MappedApp;
16
89
  //#endregion
17
- export { PresetIcon, exhibitionEditorPreset, exhibitionEditorScrollingPreset, exhibitionEditorSlideshowPreset };
90
+ export { type CreateImageServiceSlidePayload, PresetIcon, exhibitionEditorPreset, exhibitionEditorScrollingPreset, exhibitionEditorSlideshowPreset, imageServiceSlideCreator, useExhibitionPreviewWindow };
18
91
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/icons/PresetIcon.tsx","../src/presets/scrolling-preset.ts","../src/presets/slideshow-preset.ts","../src/index.tsx"],"sourcesContent":[],"mappings":";;;;;cAGM,oBAAqB,SAAS,mBAAc,kBAAA,CAAA,GAAA,CAAA;;;cCarC,iCA+CZ,uBAAA,CA/C2C;;;cCM/B,iCAiEZ,uBAAA,CAjE2C;;;cCU/B,wBAmEZ,uBAAA,CAnEkC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/icons/PresetIcon.tsx","../src/creators/image-service-slide-creator.tsx","../src/presets/scrolling-preset.ts","../src/presets/slideshow-preset.ts","../src/helpers/exhibition-preview-url-helper.ts","../src/components/ExhibitionPreviewPanel.tsx","../src/index.tsx"],"mappings":";;;;;;cAGM,aAAU,OAAW,SAAS,mBAAc,MAAA,IAAA;;;UCMjC,uCAAuC;EACtD;EACA;;;YAIU;cACE;MACR,6CAA6C;;;;cAKtC,iEAAwB,0BAAA,oHAAA,QAAA;;;cCAxB,kEAA+B;;;cCK/B,kEAA+B;;;KCzBhC;KACP;KACA;KAEO;EACV,OAAO;EACP,YAAY;EACZ,SAAS;EACT,cAAc;EACd,QAAQ;EACR,WAAW;;KAGD,6BAA6B,UAAU,8BAA8B,+BAC/E,8BAA8B;KAE3B;EACH;EACA;;KAGU,oCAAoC,qCAC9C,KAAK,YAAY;EACf;EACA;EACA;EACA;EACA,2BAA2B;;KAGnB,sCAAsC;KAEtC,2CAA2C,qCACrD,KAAK,YAAY;EACf,WAAW,YAAY;EACvB,mBAAmB;EACnB;EACA;;KAGQ,wCAAwC;EAClD;EACA,WAAW,YAAY;EACvB,mBAAmB;EACnB;EACA;;KAGU,qCAAqC;EAC/C;EACA;EACA;EACA;EACA,2BAA2B;;;;UCzCZ;EACf,QAAQ;EACR,gBAAgB,QAAQ;EACxB;;iBAwNc,6BACd,QACA,eACA,uBACC;;;;;;;cCrMU,yDAAsB"}