react-iiif-vault 2.0.19 → 4.0.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 +77 -1
- package/dist/Image-CXsx26cA.d.ts +45 -0
- package/dist/Image-g-DyBvi0.d.cts +45 -0
- package/dist/ImageStrategy-BHLIi5gd.d.ts +55 -0
- package/dist/ImageStrategy-Be9YES5a.d.cts +55 -0
- package/dist/SimpleViewerContext.hooks-CTgfe0Gg.d.cts +617 -0
- package/dist/SimpleViewerContext.hooks-DYJSrd-U.d.ts +617 -0
- package/dist/SimpleViewerContext.types-CWf5OFM7.d.ts +51 -0
- package/dist/SimpleViewerContext.types-Df-cpBss.d.cts +51 -0
- package/dist/ViewerPresetContext-D7N6KH9p.d.ts +144 -0
- package/dist/ViewerPresetContext-DwFTIkDx.d.cts +144 -0
- package/dist/bundle.d.ts +290 -196
- package/dist/bundle.global.js +45 -74
- package/dist/canvas-panel/scene.cjs +1 -0
- package/dist/canvas-panel/scene.d.cts +133 -0
- package/dist/canvas-panel/scene.d.ts +133 -0
- package/dist/canvas-panel/scene.js +1 -0
- package/dist/canvas-panel.cjs +1 -47
- package/dist/canvas-panel.d.cts +10 -5
- package/dist/canvas-panel.d.ts +10 -5
- package/dist/canvas-panel.js +1 -1
- package/dist/chunk-3XPYQXUE.js +48 -0
- package/dist/chunk-6WG6RPHU.js +1 -0
- package/dist/chunk-DXC5VCRN.js +1 -0
- package/dist/chunk-DZ7DMQ3V.cjs +1 -0
- package/dist/chunk-HFC72RK6.js +1 -0
- package/dist/chunk-L2GTJVPY.js +1 -0
- package/dist/chunk-L576POBV.cjs +2 -0
- package/dist/chunk-LKWFF45D.cjs +1 -0
- package/dist/chunk-MEQI335A.js +2 -0
- package/dist/chunk-MIANDAMK.cjs +1 -0
- package/dist/chunk-ND2R7OTX.js +1 -0
- package/dist/chunk-R7HZTE2T.cjs +48 -0
- package/dist/chunk-WBVFSMED.cjs +1 -0
- package/dist/chunk-XULFR6E3.cjs +1 -0
- package/dist/chunk-YEU5T67O.js +1 -0
- package/dist/chunk-ZBGD3VEW.cjs +1 -0
- package/dist/chunk-ZEGT4BAR.cjs +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.d.cts +133 -0
- package/dist/core.d.ts +133 -0
- package/dist/core.js +1 -0
- package/dist/{index-DijgVxjb.d.ts → index-ClFUurPI.d.ts} +15 -69
- package/dist/{index-DHghDluJ.d.cts → index-QFlDahI_.d.cts} +15 -69
- package/dist/index.cjs +1 -49
- package/dist/index.d.cts +33 -1496
- package/dist/index.d.ts +33 -1496
- package/dist/index.js +1 -1
- package/dist/presentation-4.cjs +1 -0
- package/dist/presentation-4.d.cts +304 -0
- package/dist/presentation-4.d.ts +304 -0
- package/dist/presentation-4.js +1 -0
- package/dist/ranges-Cc2ppjFD.d.ts +689 -0
- package/dist/ranges-D-UBNcsJ.d.cts +689 -0
- package/dist/{useRenderingStrategy-CoKE915F.d.cts → useRenderingStrategy-Vubk-vUU.d.cts} +47 -24
- package/dist/{useRenderingStrategy-CoKE915F.d.ts → useRenderingStrategy-Vubk-vUU.d.ts} +47 -24
- package/dist/utils-DHWZGbVU.d.ts +54 -0
- package/dist/utils-De5WTLDh.d.cts +54 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.cts +7 -5
- package/dist/utils.d.ts +7 -5
- package/dist/utils.js +1 -1
- package/package.json +54 -15
- package/dist/chunk-OGCPXOIP.js +0 -49
- package/dist/chunk-P7XHGETS.js +0 -1
- package/dist/utils-BKdiug6F.d.cts +0 -41
- package/dist/utils-CmwQWQLa.d.ts +0 -41
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { ChoiceDescription, Paintables, SupportedTarget, ComplexChoice } from '@iiif/helpers';
|
|
2
|
-
import { ImageService, ExternalWebResource, InternationalString } from '@iiif/presentation-3';
|
|
3
|
-
import {
|
|
1
|
+
import { ChoiceDescription, Paintables as Paintables$1, SupportedTarget, ComplexChoice } from '@iiif/helpers';
|
|
2
|
+
import { ImageService, ExternalWebResource, InternationalString } from '@iiif/parser/presentation-3/types';
|
|
3
|
+
import { Paintables } from '@iiif/helpers/painting-annotations';
|
|
4
|
+
import { CanvasNormalized as CanvasNormalized$1, TimelineNormalized, AnnotationPageNormalized as AnnotationPageNormalized$2 } from '@iiif/parser/presentation-4-normalized/types';
|
|
4
5
|
import { TransformPoint, SelectorTransform, BoxStyle, BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/helpers/annotation-targets';
|
|
6
|
+
import { CanvasNormalized, AnnotationPageNormalized as AnnotationPageNormalized$1 } from '@iiif/parser/presentation-3-normalized/types';
|
|
5
7
|
import { Emitter } from 'mitt';
|
|
6
8
|
|
|
9
|
+
type CompatibleCanvas = (CanvasNormalized | CanvasNormalized$1 | TimelineNormalized) & {
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
duration?: number;
|
|
13
|
+
};
|
|
14
|
+
type CanvasContainerReference = {
|
|
15
|
+
id: string;
|
|
16
|
+
type: 'Canvas' | 'Timeline' | 'Scene';
|
|
17
|
+
};
|
|
18
|
+
type ViewableContainerReference = Pick<CanvasContainerReference, 'id'> & {
|
|
19
|
+
type: 'Canvas' | 'Timeline';
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type AnnotationPageNormalized = AnnotationPageNormalized$1 | AnnotationPageNormalized$2;
|
|
23
|
+
|
|
24
|
+
type AnnotationNormalized$2 = Paintables['items'][number]['annotation'];
|
|
25
|
+
|
|
7
26
|
type ImageWithOptionalService = {
|
|
8
27
|
id: string;
|
|
9
28
|
annotationId: string;
|
|
10
|
-
annotation: AnnotationNormalized;
|
|
29
|
+
annotation: AnnotationNormalized$2;
|
|
11
30
|
type: 'Image';
|
|
12
31
|
service?: ImageService;
|
|
13
32
|
width?: number;
|
|
@@ -29,7 +48,7 @@ type ImageWithOptionalService = {
|
|
|
29
48
|
type SingleAudio = {
|
|
30
49
|
type: 'Sound';
|
|
31
50
|
annotationId: string;
|
|
32
|
-
annotation: AnnotationNormalized;
|
|
51
|
+
annotation: AnnotationNormalized$2;
|
|
33
52
|
url: string;
|
|
34
53
|
format: string;
|
|
35
54
|
duration: number;
|
|
@@ -42,7 +61,7 @@ type SingleAudio = {
|
|
|
42
61
|
type SingleYouTubeVideo = {
|
|
43
62
|
type: 'VideoYouTube';
|
|
44
63
|
annotationId: string;
|
|
45
|
-
annotation: AnnotationNormalized;
|
|
64
|
+
annotation: AnnotationNormalized$2;
|
|
46
65
|
url: string;
|
|
47
66
|
youTubeId: string;
|
|
48
67
|
duration: number;
|
|
@@ -52,7 +71,7 @@ type SingleYouTubeVideo = {
|
|
|
52
71
|
type SingleVideo = {
|
|
53
72
|
type: 'Video';
|
|
54
73
|
annotationId: string;
|
|
55
|
-
annotation: AnnotationNormalized;
|
|
74
|
+
annotation: AnnotationNormalized$2;
|
|
56
75
|
url: string;
|
|
57
76
|
format: string;
|
|
58
77
|
duration: number;
|
|
@@ -77,6 +96,18 @@ type AnnotationPageDescription = {
|
|
|
77
96
|
pages: AnnotationPageNormalized[];
|
|
78
97
|
};
|
|
79
98
|
|
|
99
|
+
type AnnotationNormalized$1 = Paintables['items'][number]['annotation'];
|
|
100
|
+
|
|
101
|
+
type Single3DModelStrategy = {
|
|
102
|
+
type: '3d-model';
|
|
103
|
+
model: ExternalWebResource;
|
|
104
|
+
choice?: ChoiceDescription;
|
|
105
|
+
annotations?: AnnotationPageDescription;
|
|
106
|
+
annotation: AnnotationNormalized$1;
|
|
107
|
+
annotationId: string;
|
|
108
|
+
};
|
|
109
|
+
declare function get3dStrategy(canvas: CompatibleCanvas, paintables: Paintables$1): RenderingStrategy;
|
|
110
|
+
|
|
80
111
|
type ImageServiceLoaderType = (imageService: any | undefined, { height, width }: {
|
|
81
112
|
height: number;
|
|
82
113
|
width: number;
|
|
@@ -89,15 +120,16 @@ declare function useLoadImageService(): readonly [ImageServiceLoaderType, Record
|
|
|
89
120
|
real?: boolean | undefined;
|
|
90
121
|
}>];
|
|
91
122
|
|
|
92
|
-
type
|
|
93
|
-
type: '
|
|
94
|
-
|
|
123
|
+
type SingleImageStrategy = {
|
|
124
|
+
type: 'images';
|
|
125
|
+
image: ImageWithOptionalService;
|
|
126
|
+
images: Array<ImageWithOptionalService>;
|
|
95
127
|
choice?: ChoiceDescription;
|
|
96
128
|
annotations?: AnnotationPageDescription;
|
|
97
|
-
annotation: AnnotationNormalized;
|
|
98
|
-
annotationId: string;
|
|
99
129
|
};
|
|
100
|
-
declare function
|
|
130
|
+
declare function getImageStrategy(canvas: CompatibleCanvas, paintables: Paintables$1, loadImageService: ImageServiceLoaderType): SingleImageStrategy | UnknownStrategy;
|
|
131
|
+
|
|
132
|
+
type AnnotationNormalized = Paintables['items'][number]['annotation'];
|
|
101
133
|
|
|
102
134
|
type TextualContentStrategy = {
|
|
103
135
|
type: 'textual-content';
|
|
@@ -112,7 +144,7 @@ type TextContent = {
|
|
|
112
144
|
annotationId: string;
|
|
113
145
|
annotation: AnnotationNormalized;
|
|
114
146
|
};
|
|
115
|
-
declare function getTextualContentStrategy(canvas:
|
|
147
|
+
declare function getTextualContentStrategy(canvas: CompatibleCanvas, paintables: Paintables$1): RenderingStrategy;
|
|
116
148
|
|
|
117
149
|
type MediaStrategy = {
|
|
118
150
|
type: 'media';
|
|
@@ -160,15 +192,6 @@ type UnknownStrategy = {
|
|
|
160
192
|
};
|
|
161
193
|
type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | TextualContentStrategy | UnknownStrategy | EmptyStrategy;
|
|
162
194
|
|
|
163
|
-
type SingleImageStrategy = {
|
|
164
|
-
type: 'images';
|
|
165
|
-
image: ImageWithOptionalService;
|
|
166
|
-
images: Array<ImageWithOptionalService>;
|
|
167
|
-
choice?: ChoiceDescription;
|
|
168
|
-
annotations?: AnnotationPageDescription;
|
|
169
|
-
};
|
|
170
|
-
declare function getImageStrategy(canvas: CanvasNormalized, paintables: Paintables, loadImageService: ImageServiceLoaderType): SingleImageStrategy | UnknownStrategy;
|
|
171
|
-
|
|
172
195
|
type StrategyActions = {
|
|
173
196
|
makeChoice: (id: string, options?: {
|
|
174
197
|
deselectOthers?: boolean;
|
|
@@ -199,4 +222,4 @@ type UseRenderingStrategyOptions = {
|
|
|
199
222
|
};
|
|
200
223
|
declare function useRenderingStrategy(options?: UseRenderingStrategyOptions): UseRenderingStrategy;
|
|
201
224
|
|
|
202
|
-
export { type AudioSequence as A, type ComplexTimelineStrategy as C, type EmptyStrategy as E, type ImageWithOptionalService as I, type MediaStrategy as M, type RenderingStrategy as R, type
|
|
225
|
+
export { type AudioSequence as A, type ComplexTimelineStrategy as C, type EmptyStrategy as E, type ImageWithOptionalService as I, type MediaStrategy as M, type RenderingStrategy as R, type Single3DModelStrategy as S, type TimelineKeyframe as T, type UnknownStrategy as U, type VideoSequence as V, type SingleImageStrategy as a, getImageStrategy as b, type SingleAudio as c, type SingleYouTubeVideo as d, type SingleVideo as e, type AnnotationPageDescription as f, get3dStrategy as g, type TextualContentStrategy as h, type TextContent as i, getTextualContentStrategy as j, type ImageServiceLoaderType as k, type StrategyActions as l, type UseRenderingStrategy as m, type ChoiceEvents as n, type UseRenderingStrategyOptions as o, useRenderingStrategy as p, type ViewableContainerReference as q, type CompatibleCanvas as r, useLoadImageService as u };
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { ChoiceDescription, Paintables, SupportedTarget, ComplexChoice } from '@iiif/helpers';
|
|
2
|
-
import { ImageService, ExternalWebResource, InternationalString } from '@iiif/presentation-3';
|
|
3
|
-
import {
|
|
1
|
+
import { ChoiceDescription, Paintables as Paintables$1, SupportedTarget, ComplexChoice } from '@iiif/helpers';
|
|
2
|
+
import { ImageService, ExternalWebResource, InternationalString } from '@iiif/parser/presentation-3/types';
|
|
3
|
+
import { Paintables } from '@iiif/helpers/painting-annotations';
|
|
4
|
+
import { CanvasNormalized as CanvasNormalized$1, TimelineNormalized, AnnotationPageNormalized as AnnotationPageNormalized$2 } from '@iiif/parser/presentation-4-normalized/types';
|
|
4
5
|
import { TransformPoint, SelectorTransform, BoxStyle, BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/helpers/annotation-targets';
|
|
6
|
+
import { CanvasNormalized, AnnotationPageNormalized as AnnotationPageNormalized$1 } from '@iiif/parser/presentation-3-normalized/types';
|
|
5
7
|
import { Emitter } from 'mitt';
|
|
6
8
|
|
|
9
|
+
type CompatibleCanvas = (CanvasNormalized | CanvasNormalized$1 | TimelineNormalized) & {
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
duration?: number;
|
|
13
|
+
};
|
|
14
|
+
type CanvasContainerReference = {
|
|
15
|
+
id: string;
|
|
16
|
+
type: 'Canvas' | 'Timeline' | 'Scene';
|
|
17
|
+
};
|
|
18
|
+
type ViewableContainerReference = Pick<CanvasContainerReference, 'id'> & {
|
|
19
|
+
type: 'Canvas' | 'Timeline';
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type AnnotationPageNormalized = AnnotationPageNormalized$1 | AnnotationPageNormalized$2;
|
|
23
|
+
|
|
24
|
+
type AnnotationNormalized$2 = Paintables['items'][number]['annotation'];
|
|
25
|
+
|
|
7
26
|
type ImageWithOptionalService = {
|
|
8
27
|
id: string;
|
|
9
28
|
annotationId: string;
|
|
10
|
-
annotation: AnnotationNormalized;
|
|
29
|
+
annotation: AnnotationNormalized$2;
|
|
11
30
|
type: 'Image';
|
|
12
31
|
service?: ImageService;
|
|
13
32
|
width?: number;
|
|
@@ -29,7 +48,7 @@ type ImageWithOptionalService = {
|
|
|
29
48
|
type SingleAudio = {
|
|
30
49
|
type: 'Sound';
|
|
31
50
|
annotationId: string;
|
|
32
|
-
annotation: AnnotationNormalized;
|
|
51
|
+
annotation: AnnotationNormalized$2;
|
|
33
52
|
url: string;
|
|
34
53
|
format: string;
|
|
35
54
|
duration: number;
|
|
@@ -42,7 +61,7 @@ type SingleAudio = {
|
|
|
42
61
|
type SingleYouTubeVideo = {
|
|
43
62
|
type: 'VideoYouTube';
|
|
44
63
|
annotationId: string;
|
|
45
|
-
annotation: AnnotationNormalized;
|
|
64
|
+
annotation: AnnotationNormalized$2;
|
|
46
65
|
url: string;
|
|
47
66
|
youTubeId: string;
|
|
48
67
|
duration: number;
|
|
@@ -52,7 +71,7 @@ type SingleYouTubeVideo = {
|
|
|
52
71
|
type SingleVideo = {
|
|
53
72
|
type: 'Video';
|
|
54
73
|
annotationId: string;
|
|
55
|
-
annotation: AnnotationNormalized;
|
|
74
|
+
annotation: AnnotationNormalized$2;
|
|
56
75
|
url: string;
|
|
57
76
|
format: string;
|
|
58
77
|
duration: number;
|
|
@@ -77,6 +96,18 @@ type AnnotationPageDescription = {
|
|
|
77
96
|
pages: AnnotationPageNormalized[];
|
|
78
97
|
};
|
|
79
98
|
|
|
99
|
+
type AnnotationNormalized$1 = Paintables['items'][number]['annotation'];
|
|
100
|
+
|
|
101
|
+
type Single3DModelStrategy = {
|
|
102
|
+
type: '3d-model';
|
|
103
|
+
model: ExternalWebResource;
|
|
104
|
+
choice?: ChoiceDescription;
|
|
105
|
+
annotations?: AnnotationPageDescription;
|
|
106
|
+
annotation: AnnotationNormalized$1;
|
|
107
|
+
annotationId: string;
|
|
108
|
+
};
|
|
109
|
+
declare function get3dStrategy(canvas: CompatibleCanvas, paintables: Paintables$1): RenderingStrategy;
|
|
110
|
+
|
|
80
111
|
type ImageServiceLoaderType = (imageService: any | undefined, { height, width }: {
|
|
81
112
|
height: number;
|
|
82
113
|
width: number;
|
|
@@ -89,15 +120,16 @@ declare function useLoadImageService(): readonly [ImageServiceLoaderType, Record
|
|
|
89
120
|
real?: boolean | undefined;
|
|
90
121
|
}>];
|
|
91
122
|
|
|
92
|
-
type
|
|
93
|
-
type: '
|
|
94
|
-
|
|
123
|
+
type SingleImageStrategy = {
|
|
124
|
+
type: 'images';
|
|
125
|
+
image: ImageWithOptionalService;
|
|
126
|
+
images: Array<ImageWithOptionalService>;
|
|
95
127
|
choice?: ChoiceDescription;
|
|
96
128
|
annotations?: AnnotationPageDescription;
|
|
97
|
-
annotation: AnnotationNormalized;
|
|
98
|
-
annotationId: string;
|
|
99
129
|
};
|
|
100
|
-
declare function
|
|
130
|
+
declare function getImageStrategy(canvas: CompatibleCanvas, paintables: Paintables$1, loadImageService: ImageServiceLoaderType): SingleImageStrategy | UnknownStrategy;
|
|
131
|
+
|
|
132
|
+
type AnnotationNormalized = Paintables['items'][number]['annotation'];
|
|
101
133
|
|
|
102
134
|
type TextualContentStrategy = {
|
|
103
135
|
type: 'textual-content';
|
|
@@ -112,7 +144,7 @@ type TextContent = {
|
|
|
112
144
|
annotationId: string;
|
|
113
145
|
annotation: AnnotationNormalized;
|
|
114
146
|
};
|
|
115
|
-
declare function getTextualContentStrategy(canvas:
|
|
147
|
+
declare function getTextualContentStrategy(canvas: CompatibleCanvas, paintables: Paintables$1): RenderingStrategy;
|
|
116
148
|
|
|
117
149
|
type MediaStrategy = {
|
|
118
150
|
type: 'media';
|
|
@@ -160,15 +192,6 @@ type UnknownStrategy = {
|
|
|
160
192
|
};
|
|
161
193
|
type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | TextualContentStrategy | UnknownStrategy | EmptyStrategy;
|
|
162
194
|
|
|
163
|
-
type SingleImageStrategy = {
|
|
164
|
-
type: 'images';
|
|
165
|
-
image: ImageWithOptionalService;
|
|
166
|
-
images: Array<ImageWithOptionalService>;
|
|
167
|
-
choice?: ChoiceDescription;
|
|
168
|
-
annotations?: AnnotationPageDescription;
|
|
169
|
-
};
|
|
170
|
-
declare function getImageStrategy(canvas: CanvasNormalized, paintables: Paintables, loadImageService: ImageServiceLoaderType): SingleImageStrategy | UnknownStrategy;
|
|
171
|
-
|
|
172
195
|
type StrategyActions = {
|
|
173
196
|
makeChoice: (id: string, options?: {
|
|
174
197
|
deselectOthers?: boolean;
|
|
@@ -199,4 +222,4 @@ type UseRenderingStrategyOptions = {
|
|
|
199
222
|
};
|
|
200
223
|
declare function useRenderingStrategy(options?: UseRenderingStrategyOptions): UseRenderingStrategy;
|
|
201
224
|
|
|
202
|
-
export { type AudioSequence as A, type ComplexTimelineStrategy as C, type EmptyStrategy as E, type ImageWithOptionalService as I, type MediaStrategy as M, type RenderingStrategy as R, type
|
|
225
|
+
export { type AudioSequence as A, type ComplexTimelineStrategy as C, type EmptyStrategy as E, type ImageWithOptionalService as I, type MediaStrategy as M, type RenderingStrategy as R, type Single3DModelStrategy as S, type TimelineKeyframe as T, type UnknownStrategy as U, type VideoSequence as V, type SingleImageStrategy as a, getImageStrategy as b, type SingleAudio as c, type SingleYouTubeVideo as d, type SingleVideo as e, type AnnotationPageDescription as f, get3dStrategy as g, type TextualContentStrategy as h, type TextContent as i, getTextualContentStrategy as j, type ImageServiceLoaderType as k, type StrategyActions as l, type UseRenderingStrategy as m, type ChoiceEvents as n, type UseRenderingStrategyOptions as o, useRenderingStrategy as p, type ViewableContainerReference as q, type CompatibleCanvas as r, useLoadImageService as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { R as RenderingStrategy, r as CompatibleCanvas, k as ImageServiceLoaderType, m as UseRenderingStrategy, U as UnknownStrategy } from './useRenderingStrategy-Vubk-vUU.js';
|
|
2
|
+
import * as _iiif_parser_presentation_4_normalized_types from '@iiif/parser/presentation-4-normalized/types';
|
|
3
|
+
import { Paintables } from '@iiif/helpers/painting-annotations';
|
|
4
|
+
import * as _iiif_helpers_vault from '@iiif/helpers/vault';
|
|
5
|
+
import { PointSelector, ContentResource as ContentResource$1 } from '@iiif/parser/presentation-3/types';
|
|
6
|
+
import { ContentResource as ContentResource$2 } from '@iiif/parser/presentation-4/types';
|
|
7
|
+
import { Paintables as Paintables$1, expandTarget, TemporalBoxSelector, BoxSelector, SupportedTarget } from '@iiif/helpers';
|
|
8
|
+
|
|
9
|
+
type CompatVault = {
|
|
10
|
+
get: _iiif_helpers_vault.Vault['get'];
|
|
11
|
+
setMetaValue: _iiif_helpers_vault.Vault['setMetaValue'];
|
|
12
|
+
getResourceMeta: _iiif_helpers_vault.Vault['getResourceMeta'];
|
|
13
|
+
load: _iiif_helpers_vault.Vault['load'];
|
|
14
|
+
requestStatus: _iiif_helpers_vault.Vault['requestStatus'];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
interface GetRenderStrategyOptions {
|
|
18
|
+
canvas: CompatibleCanvas | _iiif_parser_presentation_4_normalized_types.SceneNormalized | null | undefined;
|
|
19
|
+
paintables: Paintables;
|
|
20
|
+
supports: string[];
|
|
21
|
+
loadImageService: ImageServiceLoaderType;
|
|
22
|
+
vault?: CompatVault;
|
|
23
|
+
}
|
|
24
|
+
declare function getRenderingStrategy({ canvas, paintables, supports, loadImageService, vault, }: GetRenderStrategyOptions): RenderingStrategy;
|
|
25
|
+
|
|
26
|
+
type ContentResource = ContentResource$1 | ContentResource$2;
|
|
27
|
+
/**
|
|
28
|
+
* Parse specific resource.
|
|
29
|
+
*
|
|
30
|
+
* This could be expanded to support pulling out more from the specific resource.
|
|
31
|
+
*
|
|
32
|
+
* @param resource
|
|
33
|
+
*/
|
|
34
|
+
declare function parseSpecificResource(resource: ContentResource): any[];
|
|
35
|
+
/** Keep canvas placement and source cropping separate for both audio and video. */
|
|
36
|
+
declare function getMediaTemporalSelectors(canvas: CompatibleCanvas, item: Paintables$1['items'][number]): {
|
|
37
|
+
target: {
|
|
38
|
+
startTime: number;
|
|
39
|
+
endTime: number;
|
|
40
|
+
};
|
|
41
|
+
source: {
|
|
42
|
+
startTime: number;
|
|
43
|
+
endTime?: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare function getParsedTargetSelector(canvas: CompatibleCanvas, target: Parameters<typeof expandTarget>[0]): [TemporalBoxSelector | BoxSelector | PointSelector | null, SupportedTarget['source']];
|
|
47
|
+
declare const emptyActions: {
|
|
48
|
+
makeChoice: () => void;
|
|
49
|
+
};
|
|
50
|
+
declare const unknownResponse: UseRenderingStrategy[0];
|
|
51
|
+
declare const unsupportedStrategy: (reason: string) => UnknownStrategy;
|
|
52
|
+
declare const emptyStrategy: (width: number, height: number) => UseRenderingStrategy[0];
|
|
53
|
+
|
|
54
|
+
export { type CompatVault as C, getMediaTemporalSelectors as a, getParsedTargetSelector as b, unsupportedStrategy as c, emptyStrategy as d, emptyActions as e, getRenderingStrategy as g, parseSpecificResource as p, unknownResponse as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { R as RenderingStrategy, r as CompatibleCanvas, k as ImageServiceLoaderType, m as UseRenderingStrategy, U as UnknownStrategy } from './useRenderingStrategy-Vubk-vUU.cjs';
|
|
2
|
+
import * as _iiif_parser_presentation_4_normalized_types from '@iiif/parser/presentation-4-normalized/types';
|
|
3
|
+
import { Paintables } from '@iiif/helpers/painting-annotations';
|
|
4
|
+
import * as _iiif_helpers_vault from '@iiif/helpers/vault';
|
|
5
|
+
import { PointSelector, ContentResource as ContentResource$1 } from '@iiif/parser/presentation-3/types';
|
|
6
|
+
import { ContentResource as ContentResource$2 } from '@iiif/parser/presentation-4/types';
|
|
7
|
+
import { Paintables as Paintables$1, expandTarget, TemporalBoxSelector, BoxSelector, SupportedTarget } from '@iiif/helpers';
|
|
8
|
+
|
|
9
|
+
type CompatVault = {
|
|
10
|
+
get: _iiif_helpers_vault.Vault['get'];
|
|
11
|
+
setMetaValue: _iiif_helpers_vault.Vault['setMetaValue'];
|
|
12
|
+
getResourceMeta: _iiif_helpers_vault.Vault['getResourceMeta'];
|
|
13
|
+
load: _iiif_helpers_vault.Vault['load'];
|
|
14
|
+
requestStatus: _iiif_helpers_vault.Vault['requestStatus'];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
interface GetRenderStrategyOptions {
|
|
18
|
+
canvas: CompatibleCanvas | _iiif_parser_presentation_4_normalized_types.SceneNormalized | null | undefined;
|
|
19
|
+
paintables: Paintables;
|
|
20
|
+
supports: string[];
|
|
21
|
+
loadImageService: ImageServiceLoaderType;
|
|
22
|
+
vault?: CompatVault;
|
|
23
|
+
}
|
|
24
|
+
declare function getRenderingStrategy({ canvas, paintables, supports, loadImageService, vault, }: GetRenderStrategyOptions): RenderingStrategy;
|
|
25
|
+
|
|
26
|
+
type ContentResource = ContentResource$1 | ContentResource$2;
|
|
27
|
+
/**
|
|
28
|
+
* Parse specific resource.
|
|
29
|
+
*
|
|
30
|
+
* This could be expanded to support pulling out more from the specific resource.
|
|
31
|
+
*
|
|
32
|
+
* @param resource
|
|
33
|
+
*/
|
|
34
|
+
declare function parseSpecificResource(resource: ContentResource): any[];
|
|
35
|
+
/** Keep canvas placement and source cropping separate for both audio and video. */
|
|
36
|
+
declare function getMediaTemporalSelectors(canvas: CompatibleCanvas, item: Paintables$1['items'][number]): {
|
|
37
|
+
target: {
|
|
38
|
+
startTime: number;
|
|
39
|
+
endTime: number;
|
|
40
|
+
};
|
|
41
|
+
source: {
|
|
42
|
+
startTime: number;
|
|
43
|
+
endTime?: number | undefined;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare function getParsedTargetSelector(canvas: CompatibleCanvas, target: Parameters<typeof expandTarget>[0]): [TemporalBoxSelector | BoxSelector | PointSelector | null, SupportedTarget['source']];
|
|
47
|
+
declare const emptyActions: {
|
|
48
|
+
makeChoice: () => void;
|
|
49
|
+
};
|
|
50
|
+
declare const unknownResponse: UseRenderingStrategy[0];
|
|
51
|
+
declare const unsupportedStrategy: (reason: string) => UnknownStrategy;
|
|
52
|
+
declare const emptyStrategy: (width: number, height: number) => UseRenderingStrategy[0];
|
|
53
|
+
|
|
54
|
+
export { type CompatVault as C, getMediaTemporalSelectors as a, getParsedTargetSelector as b, unsupportedStrategy as c, emptyStrategy as d, emptyActions as e, getRenderingStrategy as g, parseSpecificResource as p, unknownResponse as u };
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var z=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var i in t)z(e,i,{get:t[i],enumerable:!0})},J=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j(t))!Q.call(e,o)&&o!==i&&z(e,o,{get:()=>t[o],enumerable:!(a=_(t,o))||a.enumerable});return e};var K=e=>J(z({},"__esModule",{value:!0}),e);var re={};$(re,{emptyActions:()=>Z,emptyStrategy:()=>O,getParsedTargetSelector:()=>b,getRenderingStrategy:()=>ie,parseSpecificResource:()=>X,unknownResponse:()=>I,unsupportedStrategy:()=>m});module.exports=K(re);var U=require("@iiif/helpers");function X(e){return e.type==="SpecificResource"?[e.source,{selector:e.selector}]:[e,{selector:null}]}function b(e,t){let{selector:i,source:a}=(0,U.expandTarget)(t);if(a.id!==e.id)return[null,a];let o={type:"BoxSelector",spatial:{x:0,y:0,width:Number(e.width),height:Number(e.height)}};return[i?i.type==="TemporalSelector"?{type:"TemporalBoxSelector",temporal:i.temporal,spatial:o.spatial}:i:null,a]}var Z={makeChoice:()=>{}},I={type:"unknown"},m=e=>({type:"unknown",reason:e,annotations:{pages:[]}}),O=(e,t)=>({type:"empty",width:e,height:t,annotations:{pages:[]},image:null,images:[]});var ee=["model/gltf-binary"];function L(e,t){let i=t.items[0],a=i.resource;return a.format?ee.indexOf(a.format)===-1?m(`3D format: ${a.format} is unsupported`):{type:"3d-model",model:a,annotationId:i.annotationId,annotation:i.annotation}:m("Unknown format")}function R(e,t){let i=t.items,a=i[0];if(i.length===0||!a)return m("No audio");if(!e.duration)return m("No duration on canvas");if(i.length>1)return m("Only one audio source supported");let o=a.resource;return o?("format"in o||(o.format="audio/mpeg"),{type:"media",media:{annotationId:a.annotationId,annotation:a.annotation,duration:e.duration,url:o.id,type:"Sound",target:{type:"TemporalSelector",temporal:{startTime:0,endTime:e.duration}},format:o.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:e.duration}}},annotations:{pages:[]}}):m("Unknown audio")}var v=require("@iiif/helpers/annotation-targets"),E=require("@iiif/parser/image-3");function S(e){return e.replace(/^http:/,"https:")}function W(e){if(!(e?.type!=="ImageApiSelector"||typeof e.rotation>"u"))return B(e.rotation)}function B(e){if(e===null||typeof e>"u"||e==="")return;let t=Number(e);return Number.isFinite(t)?t:void 0}function te(e){let t=e.selector||{};return{...e.rotationOrigin||t.rotationOrigin?{rotationOrigin:e.rotationOrigin||t.rotationOrigin}:{},...e.translate||t.translate?{translate:e.translate||t.translate}:{},...e.transform||t.transform?{transform:e.transform||t.transform}:{},...e.style||t.boxStyle?{style:e.style||t.boxStyle}:{},...e.styleClass?{styleClass:e.styleClass}:{}}}function N(e,t,i){let a=[],o=[];for(let n of t.items){let u=n.resource&&n.resource.type==="SpecificResource"?n.resource.source:n.resource;if(!u.id)return m("No resource Identifier");let d=(n.resource.type==="SpecificResource"?W(n.resource.selector):void 0)??W(n.selector)??B(n.rotation)??B(n.selector?.rotation),f=typeof d<"u",r;if(u.service){let T=(0,E.getImageServices)(u);T[0]&&(r=i(T[0],f?{width:Number(u.width||e.width),height:Number(u.height||e.height)}:e))}let p={type:"BoxSelector",spatial:{x:0,y:0,width:Number(e.width),height:Number(e.height)}},[s,c]=b(e,n.target),g=e.id?.split("?")[0]||"";if(!(S(c.id||"")===S(e.id)||S(decodeURIComponent(c.id||""))===S(e.id||"")||S(c.id||"")===S(g)||S(decodeURIComponent(c.id||""))===S(g)))continue;let y=n.resource.width&&n.resource.height?{type:"BoxSelector",spatial:{x:0,y:0,width:n.resource.width,height:n.resource.height}}:void 0,l=n.resource.type==="SpecificResource"?(0,v.expandTarget)(n.resource):null;if(n.selector){let T=(0,v.expandTarget)({type:"SpecificResource",source:n.resource,selector:n.selector});T&&(l=T)}let h=l&&l.selector&&(l.selector.type==="BoxSelector"||l.selector.type==="TemporalBoxSelector")?{type:"BoxSelector",spatial:{x:l.selector.spatial.x,y:l.selector.spatial.y,width:l.selector.spatial.width,height:l.selector.spatial.height},...typeof l.selector.rotation<"u"?{rotation:l.selector.rotation}:{},...l.selector.rotationOrigin?{rotationOrigin:l.selector.rotationOrigin}:{},...l.selector.translate?{translate:l.selector.translate}:{},...l.selector.transform?{transform:l.selector.transform}:{},...l.selector.boxStyle?{boxStyle:l.selector.boxStyle}:{}}:void 0;r&&!r.id&&(r.id=r["@id"]);let D={id:u.id,type:"Image",annotationId:n.annotationId,annotation:n.annotation,width:Number(f||s||h?u.width:e.width),height:Number(f||s||h?u.height:e.height),...typeof d<"u"?{rotation:d}:{},...te(n),service:r,sizes:r&&r.sizes?r.sizes:u.width&&u.height?[{width:u.width,height:u.height}]:[],target:s&&s.type!=="PointSelector"?s:p,selector:h||{type:"BoxSelector",spatial:{x:0,y:0,width:Number(e.width),height:Number(e.height)}},annotationPages:n.resource.annotations||[]};a.push(D)}return{type:"images",image:a[0],images:a,choice:t.choice}}function Y(e,t={},i){let a=e.language||i||"none";switch(e.type){case"TextualBody":{typeof e.value<"u"&&(t[a]=[e.value]);break}case"List":case"Composite":case"Choice":e.items&&e.items.forEach(o=>Y(o,t,a))}return t}function V(e,t){let i=[];return t.items.forEach(a=>{if(a.resource){let[o]=b(e,a.target);i.push({type:"Text",annotationId:a.annotationId,annotation:a.annotation,text:Y(a.resource),target:o})}}),{type:"textual-content",items:i}}var k=require("@iiif/helpers");var oe=/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/|shorts\/)|(?:(?:watch)?\?vi?=|&vi?=))([^#&?]*).*/;function P(e,t,i,a=!1){let o=t.items.filter(y=>y.type==="video"),n=o[0],u=!1,x=!1;if(e.duration||(x=!0),o.length>1||!n)return m("Only one video source supported");let d=o[0]?.resource,f=!!(d.service||[]).find(y=>(y.profile||"").includes("youtube.com"));if(!f&&x)return m("Video does not have duration");if(!d)return m("Unknown video");if((!d.format||d.format==="text/html")&&!f)return m("Video does not have format");let r=[],p=i.get(e.annotations||[]);for(let y of p){let l=i.get(y.items||[]);for(let h of l)if((h.motivation?Array.isArray(h.motivation||"")?h.motivation:[h.motivation]:[]).includes("supplementing")){let T=i.get(h.body||[]);for(let G of T){let C=G;if(C.type==="Choice")for(let H of C.items){let w=i.get(H);w.format==="text/vtt"&&r.push({id:w.id,type:"Text",format:"text/vtt",label:w.label,language:w.language})}else C.format==="text/vtt"&&r.push({id:C.id,type:"Text",format:"text/vtt",label:C.label,language:C.language})}}}let s={annotationId:n.annotationId,annotation:n.annotation,duration:e.duration,url:d.id,type:"Video",target:{type:"TemporalSelector",temporal:{startTime:0,endTime:e.duration}},format:d.format,selector:{type:"TemporalSelector",temporal:{startTime:0,endTime:e.duration}}},c=(0,k.expandTarget)(n.target);c.selector&&c.selector.type==="TemporalBoxSelector"&&(s.target=c.selector);let{selector:g}=(0,k.parseSelector)(n.selector);if(g===null){let y=s.target.temporal.startTime,h=(s.target.temporal.endTime||e.duration)-y;s.selector={type:"TemporalSelector",temporal:{startTime:0,endTime:h}}}else g.type==="TemporalSelector"&&(s.selector=g);if(a&&!s.target.spatial&&(u=!0,s.target={type:"TemporalBoxSelector",temporal:s.target.temporal,spatial:{x:e.width/2,y:e.height/2,width:e.width/2,height:e.height/2}}),f){s.type="VideoYouTube";let y=d.id.match(oe);if(!y[1])return m("Video is not known youtube video");s.youTubeId=y[1]}return{type:"media",media:s,annotations:{pages:[]},noSpatial:u,captions:r}}var F=require("@iiif/helpers");function q(e,t,i,a){let o={type:"complex-timeline",items:[],keyframes:[],highlights:[],duration:e.duration||0},n={type:"complex-choice",items:[]},u=a.get(e.annotations);function x(r){r.choice&&(r.choice.type==="complex-choice"?n.items.push(...r.choice.items):n.items.push(r.choice))}for(let r of t.items){if(r.type==="image"){let p=N(e,{choice:null,allChoices:null,types:["image"],items:[r]},i);if(p.type==="images"){if(!p.image)continue;x(p),o.items.push(p.image);let s={id:p.image.annotationId,type:"enter",resourceType:"image",time:p.image.target?.temporal?.startTime||0};o.keyframes.push(s);let c={id:p.image.annotationId,type:"exit",resourceType:"image",time:p.image.target?.temporal?.endTime||e.duration||0};o.keyframes.push(c)}}if(r.type==="textualbody"){let p=V(e,{choice:null,allChoices:null,types:["textualbody"],items:[r]});if(p.type==="textual-content"){x(p);let s=p.items[0];o.items.push(s);let c=s.target,g={id:s.annotationId,type:"enter",resourceType:"text",time:c.temporal?.startTime||0};o.keyframes.push(g);let y={id:s.annotationId,type:"exit",resourceType:"text",time:c.temporal?.endTime||e.duration||0};o.keyframes.push(y)}}if(r.type==="video"){let p=P(e,{choice:null,allChoices:null,types:["video"],items:[r]},a,!0);if(p.type==="media"){x(p);let s=p.media;o.items.push(s);let c={id:s.annotationId,type:"enter",resourceType:"video",time:s.target?.temporal?.startTime||0};o.keyframes.push(c);let g={id:s.annotationId,type:"exit",resourceType:"video",time:s.target?.temporal?.endTime||e.duration||0};o.keyframes.push(g)}}if(r.type==="audio"||r.type==="sound"){let p=R(e,{choice:null,allChoices:null,types:["audio"],items:[r]});if(p.type==="media"){x(p);let s=p.media;o.items.push(s);let c={id:s.annotationId,type:"enter",resourceType:"audio",time:s.target?.temporal?.startTime||0};o.keyframes.push(c);let g={id:s.annotationId,type:"exit",resourceType:"audio",time:s.target?.temporal?.endTime||e.duration||0};o.keyframes.push(g)}}}for(let r of u)for(let p of r.items){let s=a.get(p),c=(0,F.expandTarget)(s.target,{typeMap:a.getState?.().iiif.mapping});if(c.selector?.temporal){let g={id:s.id,type:"enter",resourceType:"highlight",time:c.selector.temporal.startTime||0};o.keyframes.push(g);let y={id:s.id,type:"exit",resourceType:"highlight",time:c.selector.temporal.endTime||e.duration||0};o.keyframes.push(y)}o.highlights.push({annotation:s,target:c})}o.keyframes.sort((r,p)=>r.time-p.time);let d=[],f=[];for(let r of o.keyframes){if(r.resourceType==="image"||r.resourceType==="text"||r.resourceType==="highlight"){f.push(r);continue}if(r.type==="enter"){d.length===0&&(r.isPrime=!0),d.push(r),f.push(r);continue}if(r.type==="exit"&&(f.push(r),d=d.filter(p=>p.id!==r.id),d.length!==0)){let p=d[0],s={id:p.id,type:"change",isPrime:!0,resourceType:p.resourceType,time:r.time};f.push(s)}}return o.keyframes=f,n.items.length&&(o.choice=n),o}var A={},M={get(e){return e},setMetaValue([e,t,i],a){let o=M.getResourceMeta(e,t),n=o?o[i]:void 0,u=typeof a=="function"?a(n):a;A[e]={...A[e]||{},[t]:{...(A[e]||{})[t]||{},[i]:u}}},getResourceMeta:(e,t)=>{let i=A[e];if(i)return t?i[t]:i},async load(e){let t=typeof e=="string"?e:e.id;return fetch(t).then(i=>i.json())},requestStatus(e){}};function ie({canvas:e,paintables:t,supports:i,loadImageService:a,vault:o=M}){if(!e)return I;if(t.types.length===0)return i.indexOf("empty")!==-1?O(e.width,e.height):I;if(t.types.length!==1)if(t.types.length===2&&t.types.indexOf("text")!==-1)t.types=t.types.filter(u=>u!=="text");else return i.indexOf("complex-timeline")===-1?m("Complex timeline not supported"):q(e,t,a,o);let n=t.types[0];return n==="image"?i.indexOf("images")===-1?m("Image not supported"):N(e,t,a):n==="Model"||n==="model"?i.indexOf("3d-model")===-1?m("3D not supported"):L(e,t):n==="textualbody"?i.indexOf("textual-content")===-1?m("Textual content not supported"):V(e,t):n==="sound"||n==="audio"?i.indexOf("media")===-1?m("Media not supported"):R(e,t):n==="video"?i.indexOf("media")===-1?m("Media not supported"):P(e,t,o):I}
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-ZBGD3VEW.cjs');var _chunkZEGT4BARcjs = require('./chunk-ZEGT4BAR.cjs');exports.emptyActions = _chunkZEGT4BARcjs.h; exports.emptyStrategy = _chunkZEGT4BARcjs.k; exports.getMediaTemporalSelectors = _chunkZEGT4BARcjs.f; exports.getParsedTargetSelector = _chunkZEGT4BARcjs.g; exports.getRenderingStrategy = _chunkZEGT4BARcjs.q; exports.parseSpecificResource = _chunkZEGT4BARcjs.e; exports.unknownResponse = _chunkZEGT4BARcjs.i; exports.unsupportedStrategy = _chunkZEGT4BARcjs.j;
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { e as emptyActions,
|
|
2
|
-
import './useRenderingStrategy-
|
|
1
|
+
export { e as emptyActions, d as emptyStrategy, a as getMediaTemporalSelectors, b as getParsedTargetSelector, g as getRenderingStrategy, p as parseSpecificResource, u as unknownResponse, c as unsupportedStrategy } from './utils-De5WTLDh.cjs';
|
|
2
|
+
import './useRenderingStrategy-Vubk-vUU.cjs';
|
|
3
3
|
import '@iiif/helpers';
|
|
4
|
-
import '@iiif/presentation-3';
|
|
5
|
-
import '@iiif/
|
|
4
|
+
import '@iiif/parser/presentation-3/types';
|
|
5
|
+
import '@iiif/helpers/painting-annotations';
|
|
6
|
+
import '@iiif/parser/presentation-4-normalized/types';
|
|
6
7
|
import '@iiif/helpers/annotation-targets';
|
|
8
|
+
import '@iiif/parser/presentation-3-normalized/types';
|
|
7
9
|
import 'mitt';
|
|
8
|
-
import '@iiif/helpers/painting-annotations';
|
|
9
10
|
import '@iiif/helpers/vault';
|
|
11
|
+
import '@iiif/parser/presentation-4/types';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { e as emptyActions,
|
|
2
|
-
import './useRenderingStrategy-
|
|
1
|
+
export { e as emptyActions, d as emptyStrategy, a as getMediaTemporalSelectors, b as getParsedTargetSelector, g as getRenderingStrategy, p as parseSpecificResource, u as unknownResponse, c as unsupportedStrategy } from './utils-DHWZGbVU.js';
|
|
2
|
+
import './useRenderingStrategy-Vubk-vUU.js';
|
|
3
3
|
import '@iiif/helpers';
|
|
4
|
-
import '@iiif/presentation-3';
|
|
5
|
-
import '@iiif/
|
|
4
|
+
import '@iiif/parser/presentation-3/types';
|
|
5
|
+
import '@iiif/helpers/painting-annotations';
|
|
6
|
+
import '@iiif/parser/presentation-4-normalized/types';
|
|
6
7
|
import '@iiif/helpers/annotation-targets';
|
|
8
|
+
import '@iiif/parser/presentation-3-normalized/types';
|
|
7
9
|
import 'mitt';
|
|
8
|
-
import '@iiif/helpers/painting-annotations';
|
|
9
10
|
import '@iiif/helpers/vault';
|
|
11
|
+
import '@iiif/parser/presentation-4/types';
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-UNH7HXGJ.js";import{a,b,c,d,e,f,
|
|
1
|
+
import"./chunk-UNH7HXGJ.js";import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,q as h}from"./chunk-L2GTJVPY.js";export{d as emptyActions,g as emptyStrategy,b as getMediaTemporalSelectors,c as getParsedTargetSelector,h as getRenderingStrategy,a as parseSpecificResource,e as unknownResponse,f as unsupportedStrategy};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-iiif-vault",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -47,6 +47,36 @@
|
|
|
47
47
|
"types": "./dist/utils.d.ts",
|
|
48
48
|
"default": "./dist/utils.js"
|
|
49
49
|
}
|
|
50
|
+
},
|
|
51
|
+
"./presentation-4": {
|
|
52
|
+
"require": {
|
|
53
|
+
"types": "./dist/presentation-4.d.cts",
|
|
54
|
+
"default": "./dist/presentation-4.cjs"
|
|
55
|
+
},
|
|
56
|
+
"import": {
|
|
57
|
+
"types": "./dist/presentation-4.d.ts",
|
|
58
|
+
"default": "./dist/presentation-4.js"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"./core": {
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./dist/core.d.cts",
|
|
64
|
+
"default": "./dist/core.cjs"
|
|
65
|
+
},
|
|
66
|
+
"import": {
|
|
67
|
+
"types": "./dist/core.d.ts",
|
|
68
|
+
"default": "./dist/core.js"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"./canvas-panel/scene": {
|
|
72
|
+
"require": {
|
|
73
|
+
"types": "./dist/canvas-panel/scene.d.cts",
|
|
74
|
+
"default": "./dist/canvas-panel/scene.cjs"
|
|
75
|
+
},
|
|
76
|
+
"import": {
|
|
77
|
+
"types": "./dist/canvas-panel/scene.d.ts",
|
|
78
|
+
"default": "./dist/canvas-panel/scene.js"
|
|
79
|
+
}
|
|
50
80
|
}
|
|
51
81
|
},
|
|
52
82
|
"scripts": {
|
|
@@ -56,33 +86,33 @@
|
|
|
56
86
|
"test": "vitest",
|
|
57
87
|
"prepack": "tsup && tsup --config tsup.umd.ts",
|
|
58
88
|
"lint": "publint",
|
|
59
|
-
"start": "vite"
|
|
89
|
+
"start": "vite",
|
|
90
|
+
"check:package": "node scripts/check-package.mjs",
|
|
91
|
+
"check:core": "node scripts/check-core.mjs",
|
|
92
|
+
"check:scene": "node scripts/check-scene.mjs"
|
|
60
93
|
},
|
|
61
94
|
"license": "MIT",
|
|
62
95
|
"dependencies": {
|
|
63
96
|
"@floating-ui/react": "^0.27.13",
|
|
64
|
-
"@iiif/helpers": "
|
|
65
|
-
"@iiif/parser": "
|
|
66
|
-
"@iiif/presentation-2": "^1.0.4",
|
|
67
|
-
"@iiif/presentation-3": "^2.2.3",
|
|
68
|
-
"@iiif/presentation-3-normalized": "^0.9.7",
|
|
97
|
+
"@iiif/helpers": "4.0.0",
|
|
98
|
+
"@iiif/parser": "4.0.1",
|
|
69
99
|
"mitt": "^3.0.1",
|
|
70
100
|
"polygon-editor": "0.0.23",
|
|
71
101
|
"react-error-boundary": "^4.0.13",
|
|
72
102
|
"react-lazy-load-image-component": "^1.6.0",
|
|
73
|
-
"react-reconciler": "~0.29.0",
|
|
74
103
|
"tiny-invariant": "^1.3.3",
|
|
75
104
|
"zustand": "^4.5.2"
|
|
76
105
|
},
|
|
77
106
|
"peerDependencies": {
|
|
78
|
-
"@atlas-viewer/atlas": "^3.
|
|
79
|
-
"react": "^18.2.0 || ^19.2.0",
|
|
80
|
-
"react-dom": "^18.2.0 || ^19.2.0"
|
|
81
|
-
},
|
|
82
|
-
"devDependencies": {
|
|
83
|
-
"@atlas-viewer/atlas": "3.2.1",
|
|
107
|
+
"@atlas-viewer/atlas": "^3.3.0",
|
|
84
108
|
"react": "^19.2.0",
|
|
85
109
|
"react-dom": "^19.2.0",
|
|
110
|
+
"react-reconciler": "~0.33.0"
|
|
111
|
+
},
|
|
112
|
+
"devDependencies": {
|
|
113
|
+
"@atlas-viewer/atlas": "3.3.0",
|
|
114
|
+
"react": "^19.3.0",
|
|
115
|
+
"react-dom": "^19.3.0",
|
|
86
116
|
"@testing-library/react": "^15.0.2",
|
|
87
117
|
"@types/react": "^18.2.75",
|
|
88
118
|
"@types/react-dom": "^18.2.24",
|
|
@@ -98,9 +128,18 @@
|
|
|
98
128
|
"tsup": "^8.0.2",
|
|
99
129
|
"typescript": "^5.4.5",
|
|
100
130
|
"vite": "^5.2.12",
|
|
101
|
-
"vitest": "^1.6.0"
|
|
131
|
+
"vitest": "^1.6.0",
|
|
132
|
+
"react-reconciler": "~0.33.0"
|
|
102
133
|
},
|
|
103
134
|
"publishConfig": {
|
|
104
135
|
"access": "public"
|
|
136
|
+
},
|
|
137
|
+
"peerDependenciesMeta": {
|
|
138
|
+
"react-dom": {
|
|
139
|
+
"optional": true
|
|
140
|
+
},
|
|
141
|
+
"react-reconciler": {
|
|
142
|
+
"optional": true
|
|
143
|
+
}
|
|
105
144
|
}
|
|
106
145
|
}
|