react-iiif-vault 1.5.0 → 1.5.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.
package/dist/bundle.d.ts CHANGED
@@ -3,13 +3,14 @@ import React__default, { ReactNode, FC, ComponentType, RefObject, ForwardRefExot
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { AtlasProps, Preset, BoxStyle, ViewerMode } from '@atlas-viewer/atlas';
5
5
  import { AnnotationPage, ImageService as ImageService$1, ExternalWebResource, InternationalString, Reference, ImageSize, AuthProbeService2, Auth2LocationResource, Auth2SubstituteResource, AuthAccessService2, AuthAccessTokenService2, AuthAccessToken2, SearchServiceQueryParams, SearchServiceSearchResponse, SearchService as SearchService$1, SearchServiceAutocomplete, ContentResource, W3CAnnotationTarget, PointSelector, Annotation } from '@iiif/presentation-3';
6
- import { AnnotationPageNormalized, CanvasNormalized, AnnotationNormalized, CollectionNormalized, ManifestNormalized, RangeNormalized } from '@iiif/presentation-3-normalized';
6
+ import { AnnotationPageNormalized, AnnotationNormalized, CanvasNormalized, CollectionNormalized, ManifestNormalized, RangeNormalized } from '@iiif/presentation-3-normalized';
7
7
  import * as _iiif_helpers from '@iiif/helpers';
8
- import { ChoiceDescription, Paintables, SupportedTarget, ComplexChoice, ImageCandidate, BoxSelector as BoxSelector$1, TemporalBoxSelector as TemporalBoxSelector$1, Vault as Vault$1 } from '@iiif/helpers';
8
+ import { ChoiceDescription, Paintables, SupportedTarget, ComplexChoice, ImageCandidate, BoxSelector as BoxSelector$1, TemporalBoxSelector as TemporalBoxSelector$1 } from '@iiif/helpers';
9
9
  import { BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/helpers/annotation-targets';
10
10
  export * from '@iiif/helpers/annotation-targets';
11
11
  import * as mitt from 'mitt';
12
12
  import { Emitter, EventType, Handler } from 'mitt';
13
+ import * as _iiif_helpers_vault from '@iiif/helpers/vault';
13
14
  import { Vault, VaultOptions, NormalizedEntity, IIIFStore } from '@iiif/helpers/vault';
14
15
  import { RegionParameter, RotationParameter, SizeParameter } from '@iiif/parser/image-3';
15
16
  import * as polygon_editor from 'polygon-editor';
@@ -53,6 +54,7 @@ declare const RenderAnnotationPage: FC<{
53
54
  type ImageWithOptionalService = {
54
55
  id: string;
55
56
  annotationId: string;
57
+ annotation: AnnotationNormalized;
56
58
  type: 'Image';
57
59
  service?: ImageService$1;
58
60
  width?: number;
@@ -67,6 +69,7 @@ type ImageWithOptionalService = {
67
69
  type SingleAudio = {
68
70
  type: 'Sound';
69
71
  annotationId: string;
72
+ annotation: AnnotationNormalized;
70
73
  url: string;
71
74
  format: string;
72
75
  duration: number;
@@ -79,6 +82,7 @@ type SingleAudio = {
79
82
  type SingleYouTubeVideo = {
80
83
  type: 'VideoYouTube';
81
84
  annotationId: string;
85
+ annotation: AnnotationNormalized;
82
86
  url: string;
83
87
  youTubeId: string;
84
88
  duration: number;
@@ -88,6 +92,7 @@ type SingleYouTubeVideo = {
88
92
  type SingleVideo = {
89
93
  type: 'Video';
90
94
  annotationId: string;
95
+ annotation: AnnotationNormalized;
91
96
  url: string;
92
97
  format: string;
93
98
  duration: number;
@@ -138,6 +143,8 @@ type Single3DModelStrategy = {
138
143
  model: ExternalWebResource;
139
144
  choice?: ChoiceDescription;
140
145
  annotations?: AnnotationPageDescription;
146
+ annotation: AnnotationNormalized;
147
+ annotationId: string;
141
148
  };
142
149
  declare function get3dStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
143
150
 
@@ -149,9 +156,10 @@ type TextualContentStrategy = {
149
156
  };
150
157
  type TextContent = {
151
158
  type: 'Text';
152
- annotationId: string;
153
159
  text: InternationalString;
154
160
  target: SupportedTarget | null;
161
+ annotationId: string;
162
+ annotation: AnnotationNormalized;
155
163
  };
156
164
  declare function getTextualContentStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
157
165
 
@@ -1247,18 +1255,26 @@ declare const unknownResponse: UseRenderingStrategy[0];
1247
1255
  declare const unsupportedStrategy: (reason: string) => UnknownStrategy;
1248
1256
  declare const emptyStrategy: (width: number, height: number) => UseRenderingStrategy[0];
1249
1257
 
1250
- declare function getVideoStrategy(canvas: CanvasNormalized, paintables: Paintables, vault: Vault$1): UnknownStrategy | MediaStrategy;
1258
+ type CompatVault = {
1259
+ get: _iiif_helpers_vault.Vault['get'];
1260
+ setMetaValue: _iiif_helpers_vault.Vault['setMetaValue'];
1261
+ getResourceMeta: _iiif_helpers_vault.Vault['getResourceMeta'];
1262
+ load: _iiif_helpers_vault.Vault['load'];
1263
+ requestStatus: _iiif_helpers_vault.Vault['requestStatus'];
1264
+ };
1265
+
1266
+ declare function getVideoStrategy(canvas: CanvasNormalized, paintables: Paintables, vault: CompatVault): UnknownStrategy | MediaStrategy;
1251
1267
 
1252
1268
  interface GetRenderStrategyOptions {
1253
1269
  canvas: CanvasNormalized | null | undefined;
1254
1270
  paintables: Paintables$1;
1255
1271
  supports: string[];
1256
1272
  loadImageService: ImageServiceLoaderType;
1257
- vault: Vault$1;
1273
+ vault?: CompatVault;
1258
1274
  }
1259
1275
  declare function getRenderingStrategy({ canvas, paintables, supports, loadImageService, vault, }: GetRenderStrategyOptions): RenderingStrategy;
1260
1276
 
1261
- declare function getComplexTimelineStrategy(canvas: CanvasNormalized, paintables: Paintables, loadImageService: ImageServiceLoaderType, vault: Vault$1): ComplexTimelineStrategy;
1277
+ declare function getComplexTimelineStrategy(canvas: CanvasNormalized, paintables: Paintables, loadImageService: ImageServiceLoaderType, vault: CompatVault): ComplexTimelineStrategy;
1262
1278
 
1263
1279
  declare function useAnnotation(options?: {
1264
1280
  id: string;