react-iiif-vault 1.3.5 → 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.
@@ -1,9 +1,9 @@
1
- import { ReactNode, FC, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
1
+ import React__default, { ReactNode, FC, ComponentType, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { AtlasProps, Preset, BoxStyle, ViewerMode } from '@atlas-viewer/atlas';
4
4
  import { AnnotationPage, Reference } from '@iiif/presentation-3';
5
- import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
6
- import { S as StrategyActions, a as SingleImageStrategy, E as EmptyStrategy, M as MediaStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService, b as SingleAudio, c as SingleVideo } from './useRenderingStrategy-2EaRC2Nc.cjs';
5
+ import { AnnotationPageNormalized, CanvasNormalized } from '@iiif/presentation-3-normalized';
6
+ import { S as SingleAudio, a as SingleVideo, M as MediaStrategy, b as StrategyActions, c as SingleImageStrategy, E as EmptyStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService } from './useRenderingStrategy-DkjxMKJV.cjs';
7
7
  import { ChoiceDescription, BoxSelector } from '@iiif/helpers';
8
8
  import { ImageCandidate } from '@atlas-viewer/iiif-image-api';
9
9
  import { Vault } from '@iiif/helpers/vault';
@@ -34,6 +34,38 @@ declare const RenderAnnotationPage: FC<{
34
34
  className?: string;
35
35
  }>;
36
36
 
37
+ interface AudioComponentProps {
38
+ media: SingleAudio;
39
+ startTime?: number | null;
40
+ children: ReactNode;
41
+ }
42
+ declare function AudioHTML({ media, startTime, children }: AudioComponentProps): react_jsx_runtime.JSX.Element;
43
+ declare function Audio({ media, mediaControlsDeps, audioCopmonent, children, }: {
44
+ media: SingleAudio;
45
+ mediaControlsDeps?: any[];
46
+ children: ReactNode;
47
+ audioCopmonent?: ComponentType<AudioComponentProps>;
48
+ }): null;
49
+
50
+ interface VideoComponentProps {
51
+ element: RefObject<HTMLVideoElement>;
52
+ media: SingleVideo;
53
+ playPause: () => void;
54
+ canvas: CanvasNormalized;
55
+ poster?: string;
56
+ startTime?: number;
57
+ captions?: MediaStrategy['captions'];
58
+ }
59
+ declare function VideoHTML({ element, media, startTime, playPause, poster }: VideoComponentProps): react_jsx_runtime.JSX.Element;
60
+ declare function Video({ media, mediaControlsDeps, children, videoComponent, captions, }: {
61
+ media: SingleVideo;
62
+ mediaControlsDeps?: any[];
63
+ children: ReactNode;
64
+ posterCanvasId?: string;
65
+ videoComponent?: ComponentType<VideoComponentProps>;
66
+ captions?: MediaStrategy['captions'];
67
+ }): null;
68
+
37
69
  type CanvasProps = {
38
70
  x?: number;
39
71
  y?: number;
@@ -60,8 +92,12 @@ type CanvasProps = {
60
92
  ignoreSize?: boolean;
61
93
  throwOnUnknown?: boolean;
62
94
  onClickPaintingAnnotation?: (id: string, image: ImageWithOptionalService, e: any) => void;
95
+ components?: {
96
+ Video?: React__default.ComponentType<VideoComponentProps>;
97
+ Audio?: React__default.ComponentType<AudioComponentProps>;
98
+ };
63
99
  };
64
- declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, children, }: CanvasProps): react_jsx_runtime.JSX.Element | null;
100
+ declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, components, children, }: CanvasProps): react_jsx_runtime.JSX.Element | null;
65
101
 
66
102
  declare function RenderImage({ id, image, thumbnail, isStatic, x, y, children, selector, onClick, enableSizes, }: {
67
103
  id: string;
@@ -124,33 +160,6 @@ type SimpleViewerActionsType = {
124
160
  };
125
161
  }[keyof SimpleViewerActions];
126
162
 
127
- declare function AudioHTML({ media, startTime, children, }: {
128
- media: SingleAudio;
129
- startTime?: number | null;
130
- children: ReactNode;
131
- }): react_jsx_runtime.JSX.Element;
132
- declare function Audio({ media, mediaControlsDeps, children, }: {
133
- media: SingleAudio;
134
- mediaControlsDeps?: any[];
135
- children: ReactNode;
136
- }): null;
137
-
138
- interface VideoComponentProps {
139
- element: RefObject<HTMLVideoElement>;
140
- media: SingleVideo;
141
- playPause: () => void;
142
- poster?: string;
143
- startTime?: number;
144
- }
145
- declare function VideoHTML({ element, media, startTime, playPause, poster }: VideoComponentProps): react_jsx_runtime.JSX.Element;
146
- declare function Video({ media, mediaControlsDeps, children, videoComponent, }: {
147
- media: SingleVideo;
148
- mediaControlsDeps?: any[];
149
- children: ReactNode;
150
- posterCanvasId?: string;
151
- videoComponent?: FC<VideoComponentProps>;
152
- }): null;
153
-
154
163
  declare function ModelHTML({ model }: {
155
164
  model: any;
156
165
  }): react_jsx_runtime.JSX.Element;
@@ -1,9 +1,9 @@
1
- import { ReactNode, FC, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
1
+ import React__default, { ReactNode, FC, ComponentType, RefObject, ForwardRefExoticComponent, RefAttributes } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { AtlasProps, Preset, BoxStyle, ViewerMode } from '@atlas-viewer/atlas';
4
4
  import { AnnotationPage, Reference } from '@iiif/presentation-3';
5
- import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
6
- import { S as StrategyActions, a as SingleImageStrategy, E as EmptyStrategy, M as MediaStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService, b as SingleAudio, c as SingleVideo } from './useRenderingStrategy-2EaRC2Nc.js';
5
+ import { AnnotationPageNormalized, CanvasNormalized } from '@iiif/presentation-3-normalized';
6
+ import { S as SingleAudio, a as SingleVideo, M as MediaStrategy, b as StrategyActions, c as SingleImageStrategy, E as EmptyStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService } from './useRenderingStrategy-DkjxMKJV.js';
7
7
  import { ChoiceDescription, BoxSelector } from '@iiif/helpers';
8
8
  import { ImageCandidate } from '@atlas-viewer/iiif-image-api';
9
9
  import { Vault } from '@iiif/helpers/vault';
@@ -34,6 +34,38 @@ declare const RenderAnnotationPage: FC<{
34
34
  className?: string;
35
35
  }>;
36
36
 
37
+ interface AudioComponentProps {
38
+ media: SingleAudio;
39
+ startTime?: number | null;
40
+ children: ReactNode;
41
+ }
42
+ declare function AudioHTML({ media, startTime, children }: AudioComponentProps): react_jsx_runtime.JSX.Element;
43
+ declare function Audio({ media, mediaControlsDeps, audioCopmonent, children, }: {
44
+ media: SingleAudio;
45
+ mediaControlsDeps?: any[];
46
+ children: ReactNode;
47
+ audioCopmonent?: ComponentType<AudioComponentProps>;
48
+ }): null;
49
+
50
+ interface VideoComponentProps {
51
+ element: RefObject<HTMLVideoElement>;
52
+ media: SingleVideo;
53
+ playPause: () => void;
54
+ canvas: CanvasNormalized;
55
+ poster?: string;
56
+ startTime?: number;
57
+ captions?: MediaStrategy['captions'];
58
+ }
59
+ declare function VideoHTML({ element, media, startTime, playPause, poster }: VideoComponentProps): react_jsx_runtime.JSX.Element;
60
+ declare function Video({ media, mediaControlsDeps, children, videoComponent, captions, }: {
61
+ media: SingleVideo;
62
+ mediaControlsDeps?: any[];
63
+ children: ReactNode;
64
+ posterCanvasId?: string;
65
+ videoComponent?: ComponentType<VideoComponentProps>;
66
+ captions?: MediaStrategy['captions'];
67
+ }): null;
68
+
37
69
  type CanvasProps = {
38
70
  x?: number;
39
71
  y?: number;
@@ -60,8 +92,12 @@ type CanvasProps = {
60
92
  ignoreSize?: boolean;
61
93
  throwOnUnknown?: boolean;
62
94
  onClickPaintingAnnotation?: (id: string, image: ImageWithOptionalService, e: any) => void;
95
+ components?: {
96
+ Video?: React__default.ComponentType<VideoComponentProps>;
97
+ Audio?: React__default.ComponentType<AudioComponentProps>;
98
+ };
63
99
  };
64
- declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, children, }: CanvasProps): react_jsx_runtime.JSX.Element | null;
100
+ declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, components, children, }: CanvasProps): react_jsx_runtime.JSX.Element | null;
65
101
 
66
102
  declare function RenderImage({ id, image, thumbnail, isStatic, x, y, children, selector, onClick, enableSizes, }: {
67
103
  id: string;
@@ -124,33 +160,6 @@ type SimpleViewerActionsType = {
124
160
  };
125
161
  }[keyof SimpleViewerActions];
126
162
 
127
- declare function AudioHTML({ media, startTime, children, }: {
128
- media: SingleAudio;
129
- startTime?: number | null;
130
- children: ReactNode;
131
- }): react_jsx_runtime.JSX.Element;
132
- declare function Audio({ media, mediaControlsDeps, children, }: {
133
- media: SingleAudio;
134
- mediaControlsDeps?: any[];
135
- children: ReactNode;
136
- }): null;
137
-
138
- interface VideoComponentProps {
139
- element: RefObject<HTMLVideoElement>;
140
- media: SingleVideo;
141
- playPause: () => void;
142
- poster?: string;
143
- startTime?: number;
144
- }
145
- declare function VideoHTML({ element, media, startTime, playPause, poster }: VideoComponentProps): react_jsx_runtime.JSX.Element;
146
- declare function Video({ media, mediaControlsDeps, children, videoComponent, }: {
147
- media: SingleVideo;
148
- mediaControlsDeps?: any[];
149
- children: ReactNode;
150
- posterCanvasId?: string;
151
- videoComponent?: FC<VideoComponentProps>;
152
- }): null;
153
-
154
163
  declare function ModelHTML({ model }: {
155
164
  model: any;
156
165
  }): react_jsx_runtime.JSX.Element;