react-iiif-vault 1.0.7 → 1.0.9
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/.build/types/canvas-panel/Viewer.d.ts +1 -1
- package/.build/types/canvas-panel/index.d.ts +2 -1
- package/.build/types/canvas-panel/render/Audio.d.ts +1 -1
- package/.build/types/canvas-panel/render/Canvas.d.ts +2 -2
- package/.build/types/canvas-panel/render/CanvasBackground.d.ts +1 -1
- package/.build/types/canvas-panel/render/DefaultCanvasFallback.d.ts +1 -1
- package/.build/types/canvas-panel/render/Image.d.ts +1 -1
- package/.build/types/canvas-panel/render/Model.d.ts +1 -1
- package/.build/types/canvas-panel/render/Video.d.ts +1 -1
- package/.build/types/canvas-panel/render/VideoYouTube.d.ts +1 -1
- package/.build/types/components/CanvasAnnotations.d.ts +10 -0
- package/.build/types/components/CombinedMetadata.d.ts +4 -0
- package/.build/types/components/Image.d.ts +15 -0
- package/.build/types/components/ManifestMetadata.d.ts +4 -0
- package/.build/types/components/Metadata.d.ts +39 -0
- package/.build/types/components/SequenceThumbnails.d.ts +29 -0
- package/.build/types/components/SingleCanvasThumbnail.d.ts +20 -0
- package/.build/types/context/AnnotationContext.d.ts +1 -1
- package/.build/types/context/AnnotationPageContext.d.ts +1 -1
- package/.build/types/context/CanvasContext.d.ts +1 -1
- package/.build/types/context/CollectionContext.d.ts +1 -1
- package/.build/types/context/ContextBridge.d.ts +1 -1
- package/.build/types/context/ManifestContext.d.ts +1 -1
- package/.build/types/context/MediaContext.d.ts +1 -1
- package/.build/types/context/RangeContext.d.ts +1 -1
- package/.build/types/context/ResourceContext.d.ts +2 -2
- package/.build/types/context/VaultContext.d.ts +1 -1
- package/.build/types/demo/media-controls.d.ts +1 -1
- package/.build/types/demo/viewer-controls.d.ts +1 -1
- package/.build/types/features/rendering-strategy/3d-strategy.d.ts +1 -1
- package/.build/types/features/rendering-strategy/image-strategy.d.ts +1 -1
- package/.build/types/features/rendering-strategy/resource-types.d.ts +7 -7
- package/.build/types/features/rendering-strategy/strategies.d.ts +5 -5
- package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +1 -1
- package/.build/types/hooks/useEventListener.d.ts +1 -1
- package/.build/types/hooks/useExternalResource.d.ts +1 -1
- package/.build/types/hooks/useImage.d.ts +10 -0
- package/.build/types/hooks/useLoadImageService.d.ts +1 -1
- package/.build/types/hooks/useRenderingStrategy.d.ts +3 -3
- package/.build/types/hooks/useSimpleMediaPlayer.d.ts +2 -2
- package/.build/types/hooks/useVirtualAnnotationPageContext.d.ts +81 -81
- package/.build/types/index.d.ts +8 -0
- package/.build/types/utility/i18n-utils.d.ts +8 -6
- package/.build/types/viewers/SimpleViewerContext.d.ts +2 -2
- package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +2 -0
- package/.build/types/viewers/SimpleViewerContext.types.d.ts +6 -4
- package/dist/bundle/cjs/index.js +7 -6
- package/dist/bundle/cjs/index.js.map +1 -1
- package/dist/bundle/esm/index.mjs +2388 -1171
- package/dist/bundle/esm/index.mjs.map +1 -1
- package/dist/canvas-panel/cjs/canvas-panel.js +5 -5
- package/dist/canvas-panel/cjs/canvas-panel.js.map +1 -1
- package/dist/canvas-panel/esm/canvas-panel.mjs +581 -520
- package/dist/canvas-panel/esm/canvas-panel.mjs.map +1 -1
- package/dist/index.umd.js +78 -76
- package/dist/index.umd.js.map +1 -1
- package/dist/react17/cjs/index.js +7 -6
- package/dist/react17/cjs/index.js.map +1 -1
- package/dist/react17/esm/index.mjs +2388 -1171
- package/dist/react17/esm/index.mjs.map +1 -1
- package/dist/utils/cjs/utils.js +1 -1
- package/dist/utils/cjs/utils.js.map +1 -1
- package/dist/utils/esm/utils.mjs +108 -107
- package/dist/utils/esm/utils.mjs.map +1 -1
- package/package.json +24 -22
|
@@ -18,6 +18,7 @@ interface CanvasPanelProps {
|
|
|
18
18
|
header?: ReactNode;
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
mode?: ViewerMode;
|
|
21
|
+
reuseAtlas?: boolean;
|
|
21
22
|
height?: number;
|
|
22
23
|
spacing?: number;
|
|
23
24
|
components?: {
|
|
@@ -27,7 +28,7 @@ interface CanvasPanelProps {
|
|
|
27
28
|
canvasProps?: Omit<Partial<CanvasProps>, 'x'>;
|
|
28
29
|
annotations?: ReactNode;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
type CanvasPanelType = ForwardRefExoticComponent<CanvasPanelProps & RefAttributes<SimpleViewerContext>> & {
|
|
31
32
|
RenderImage: typeof RenderImage;
|
|
32
33
|
RenderCanvas: typeof RenderCanvas;
|
|
33
34
|
RenderAnnotationPage: typeof RenderAnnotationPage;
|
|
@@ -3,7 +3,7 @@ import { SingleAudio } from '../../features/rendering-strategy/resource-types';
|
|
|
3
3
|
export declare function AudioHTML({ media, children }: {
|
|
4
4
|
media: SingleAudio;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
}): JSX.Element;
|
|
6
|
+
}): import("react/jsx-dev-runtime").JSX.Element;
|
|
7
7
|
export declare function Audio({ media, mediaControlsDeps, children, }: {
|
|
8
8
|
media: SingleAudio;
|
|
9
9
|
mediaControlsDeps?: any[];
|
|
@@ -5,7 +5,7 @@ import { EmptyStrategy, MediaStrategy, RenderingStrategy } from '../../features/
|
|
|
5
5
|
import { SingleImageStrategy } from '../../features/rendering-strategy/image-strategy';
|
|
6
6
|
import { ImageWithOptionalService } from '../../features/rendering-strategy/resource-types';
|
|
7
7
|
import { ChoiceDescription } from '@iiif/helpers';
|
|
8
|
-
export
|
|
8
|
+
export type CanvasProps = {
|
|
9
9
|
x?: number;
|
|
10
10
|
y?: number;
|
|
11
11
|
onCreated?: any;
|
|
@@ -31,4 +31,4 @@ export declare type CanvasProps = {
|
|
|
31
31
|
throwOnUnknown?: boolean;
|
|
32
32
|
onClickPaintingAnnotation?: (id: string, image: ImageWithOptionalService, e: any) => void;
|
|
33
33
|
};
|
|
34
|
-
export declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, children, }: CanvasProps): JSX.Element | null;
|
|
34
|
+
export declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, children, }: CanvasProps): import("react/jsx-dev-runtime").JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ export declare function VideoHTML({ element, media, playPause, }: {
|
|
|
4
4
|
element: RefObject<any>;
|
|
5
5
|
media: SingleVideo;
|
|
6
6
|
playPause: () => void;
|
|
7
|
-
}): JSX.Element;
|
|
7
|
+
}): import("react/jsx-dev-runtime").JSX.Element;
|
|
8
8
|
export declare function Video({ media, mediaControlsDeps, children, }: {
|
|
9
9
|
media: SingleVideo;
|
|
10
10
|
mediaControlsDeps?: any[];
|
|
@@ -4,7 +4,7 @@ export declare function VideoYouTubeHTML({ element, media, playPause, }: {
|
|
|
4
4
|
element: RefObject<any>;
|
|
5
5
|
media: SingleYouTubeVideo;
|
|
6
6
|
playPause: () => void;
|
|
7
|
-
}): JSX.Element | null;
|
|
7
|
+
}): import("react/jsx-dev-runtime").JSX.Element | null;
|
|
8
8
|
export declare function VideoYouTube({ media, mediaControlsDeps, children, }: {
|
|
9
9
|
media: SingleYouTubeVideo;
|
|
10
10
|
mediaControlsDeps?: any[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CanvasAnnotations: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
canvasId?: string | undefined;
|
|
3
|
+
} & import("react").RefAttributes<{
|
|
4
|
+
availablePageIds: string[];
|
|
5
|
+
enabledPageIds: string[];
|
|
6
|
+
setPageEnabled: (id: string, opt?: {
|
|
7
|
+
deselectOthers?: boolean | undefined;
|
|
8
|
+
}) => void;
|
|
9
|
+
setPageDisabled: (deselectId: string) => void;
|
|
10
|
+
}>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RegionParameter, RotationParameter } from '@atlas-viewer/iiif-image-api';
|
|
2
|
+
import { ImageService, ImageSize } from '@iiif/presentation-3';
|
|
3
|
+
export interface ImageProps {
|
|
4
|
+
src: string | ImageService;
|
|
5
|
+
alt?: string;
|
|
6
|
+
size?: Partial<ImageSize>;
|
|
7
|
+
region?: RegionParameter;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
fetchImageService?: boolean;
|
|
11
|
+
quality?: string;
|
|
12
|
+
rotation?: number | RotationParameter;
|
|
13
|
+
format?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Image(props: ImageProps): import("react/jsx-dev-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InternationalString } from '@iiif/presentation-3';
|
|
2
|
+
type FacetConfig = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: InternationalString;
|
|
5
|
+
keys: string[];
|
|
6
|
+
values?: FacetConfigValue[];
|
|
7
|
+
};
|
|
8
|
+
type FacetConfigValue = {
|
|
9
|
+
id: string;
|
|
10
|
+
label: InternationalString;
|
|
11
|
+
values: string[];
|
|
12
|
+
key: string;
|
|
13
|
+
};
|
|
14
|
+
export interface MetadataProps {
|
|
15
|
+
config?: FacetConfig[];
|
|
16
|
+
metadata?: Array<{
|
|
17
|
+
label: InternationalString;
|
|
18
|
+
value: InternationalString;
|
|
19
|
+
} | null>;
|
|
20
|
+
labelWidth?: number;
|
|
21
|
+
allowHtml?: boolean;
|
|
22
|
+
showEmptyMessage?: boolean;
|
|
23
|
+
separator?: string;
|
|
24
|
+
classes?: {
|
|
25
|
+
container?: string;
|
|
26
|
+
row?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
value?: string;
|
|
29
|
+
empty?: string;
|
|
30
|
+
};
|
|
31
|
+
emptyMessage?: string;
|
|
32
|
+
emptyValueFallback?: string;
|
|
33
|
+
emptyLabelFallback?: string;
|
|
34
|
+
tableHeader?: React.ReactNode;
|
|
35
|
+
tableFooter?: React.ReactNode;
|
|
36
|
+
emptyFallback?: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare function Metadata({ metadata, config, labelWidth, showEmptyMessage, allowHtml, emptyFallback, classes, emptyMessage, emptyValueFallback, emptyLabelFallback, separator, tableFooter, tableHeader, }: MetadataProps): import("react/jsx-dev-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface SequenceThumbnailsProps {
|
|
2
|
+
flat?: boolean;
|
|
3
|
+
size?: {
|
|
4
|
+
width: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
};
|
|
7
|
+
classes?: {
|
|
8
|
+
container?: string;
|
|
9
|
+
row?: string;
|
|
10
|
+
item?: string;
|
|
11
|
+
figure?: string;
|
|
12
|
+
imageWrapper?: string;
|
|
13
|
+
img?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
selected?: {
|
|
16
|
+
row?: string;
|
|
17
|
+
item?: string;
|
|
18
|
+
figure?: string;
|
|
19
|
+
img?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
imageWrapper?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
figure?: boolean;
|
|
25
|
+
showLabel?: boolean;
|
|
26
|
+
fallback?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare function SequenceThumbnails({ flat, size, classes, showLabel, figure, fallback }: SequenceThumbnailsProps): import("react/jsx-dev-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SizeParameter } from '@atlas-viewer/iiif-image-api';
|
|
2
|
+
interface SingleCanvasThumbnailProps {
|
|
3
|
+
canvasId?: string;
|
|
4
|
+
size?: Partial<SizeParameter>;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
alt?: string;
|
|
7
|
+
dereference?: boolean;
|
|
8
|
+
figure?: boolean;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
classes?: {
|
|
11
|
+
figure?: string;
|
|
12
|
+
img?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
imageWrapper?: string;
|
|
15
|
+
};
|
|
16
|
+
placeholder?: React.ReactNode;
|
|
17
|
+
fallback?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function SingleCanvasThumbnail(props: SingleCanvasThumbnailProps): import("react/jsx-dev-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -14,4 +14,4 @@ export declare function MediaPlayerProvider({ actions, state, children, currentT
|
|
|
14
14
|
currentTime: RefObject<HTMLDivElement>;
|
|
15
15
|
progress: RefObject<HTMLDivElement>;
|
|
16
16
|
element: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
17
|
-
}): JSX.Element;
|
|
17
|
+
}): import("react/jsx-dev-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type ResourceContextType = {
|
|
3
3
|
collection?: string;
|
|
4
4
|
manifest?: string;
|
|
5
5
|
range?: string;
|
|
@@ -12,4 +12,4 @@ export declare const useResourceContext: () => ResourceContextType;
|
|
|
12
12
|
export declare function ResourceProvider({ value, children }: {
|
|
13
13
|
value: ResourceContextType;
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
}): JSX.Element;
|
|
15
|
+
}): import("react/jsx-dev-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function MediaControls(): JSX.Element;
|
|
1
|
+
export declare function MediaControls(): import("react/jsx-dev-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function ViewerControls(): JSX.Element;
|
|
1
|
+
export declare function ViewerControls(): import("react/jsx-dev-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { AnnotationPageDescription } from './resource-types';
|
|
|
3
3
|
import { ExternalWebResource } from '@iiif/presentation-3';
|
|
4
4
|
import { RenderingStrategy } from './strategies';
|
|
5
5
|
import { ChoiceDescription, Paintables } from '@iiif/helpers';
|
|
6
|
-
export
|
|
6
|
+
export type Single3DModelStrategy = {
|
|
7
7
|
type: '3d-model';
|
|
8
8
|
model: ExternalWebResource;
|
|
9
9
|
choice?: ChoiceDescription;
|
|
@@ -2,7 +2,7 @@ import { CanvasNormalized } from '@iiif/presentation-3-normalized';
|
|
|
2
2
|
import { ImageServiceLoaderType } from '../../hooks/useLoadImageService';
|
|
3
3
|
import { AnnotationPageDescription, ImageWithOptionalService } from './resource-types';
|
|
4
4
|
import { ChoiceDescription, Paintables } from '@iiif/helpers';
|
|
5
|
-
export
|
|
5
|
+
export type SingleImageStrategy = {
|
|
6
6
|
type: 'images';
|
|
7
7
|
image: ImageWithOptionalService;
|
|
8
8
|
images: Array<ImageWithOptionalService>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImageService } from '@iiif/presentation-3';
|
|
2
2
|
import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
|
|
3
3
|
import { BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/helpers/annotation-targets';
|
|
4
|
-
export
|
|
4
|
+
export type ImageWithOptionalService = {
|
|
5
5
|
id: string;
|
|
6
6
|
annotationId: string;
|
|
7
7
|
type: 'Image';
|
|
@@ -15,7 +15,7 @@ export declare type ImageWithOptionalService = {
|
|
|
15
15
|
target: BoxSelector | TemporalBoxSelector;
|
|
16
16
|
selector?: BoxSelector;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type SingleAudio = {
|
|
19
19
|
type: 'Sound';
|
|
20
20
|
annotationId: string;
|
|
21
21
|
url: string;
|
|
@@ -24,7 +24,7 @@ export declare type SingleAudio = {
|
|
|
24
24
|
target: TemporalSelector;
|
|
25
25
|
selector: TemporalSelector;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type SingleYouTubeVideo = {
|
|
28
28
|
type: 'VideoYouTube';
|
|
29
29
|
annotationId: string;
|
|
30
30
|
url: string;
|
|
@@ -33,7 +33,7 @@ export declare type SingleYouTubeVideo = {
|
|
|
33
33
|
target: TemporalSelector | TemporalBoxSelector;
|
|
34
34
|
selector: TemporalSelector | TemporalBoxSelector;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type SingleVideo = {
|
|
37
37
|
type: 'Video';
|
|
38
38
|
annotationId: string;
|
|
39
39
|
url: string;
|
|
@@ -42,14 +42,14 @@ export declare type SingleVideo = {
|
|
|
42
42
|
target: TemporalSelector | TemporalBoxSelector;
|
|
43
43
|
selector: TemporalSelector | TemporalBoxSelector;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type AudioSequence = {
|
|
46
46
|
type: 'SoundSequence';
|
|
47
47
|
items: SingleAudio[];
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type VideoSequence = {
|
|
50
50
|
type: 'VideoSequence';
|
|
51
51
|
items: SingleVideo[];
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type AnnotationPageDescription = {
|
|
54
54
|
pages: AnnotationPageNormalized[];
|
|
55
55
|
};
|
|
@@ -3,19 +3,19 @@ import { AnnotationPageDescription, AudioSequence, ImageWithOptionalService, Sin
|
|
|
3
3
|
import { SingleImageStrategy } from './image-strategy';
|
|
4
4
|
import { Single3DModelStrategy } from './3d-strategy';
|
|
5
5
|
import { TextualContentStrategy } from './textual-content-strategy';
|
|
6
|
-
export
|
|
6
|
+
export type MediaStrategy = {
|
|
7
7
|
type: 'media';
|
|
8
8
|
media: SingleAudio | SingleVideo | AudioSequence | VideoSequence | SingleYouTubeVideo;
|
|
9
9
|
choice?: ChoiceDescription;
|
|
10
10
|
annotations?: AnnotationPageDescription;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ComplexTimelineStrategy = {
|
|
13
13
|
type: 'complex-timeline';
|
|
14
14
|
items: Array<ImageWithOptionalService | SingleAudio | SingleVideo>;
|
|
15
15
|
choice?: ChoiceDescription;
|
|
16
16
|
annotations?: AnnotationPageDescription;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type EmptyStrategy = {
|
|
19
19
|
type: 'empty';
|
|
20
20
|
image: null;
|
|
21
21
|
images: [];
|
|
@@ -23,9 +23,9 @@ export declare type EmptyStrategy = {
|
|
|
23
23
|
width: number;
|
|
24
24
|
annotations?: AnnotationPageDescription;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type UnknownStrategy = {
|
|
27
27
|
type: 'unknown';
|
|
28
28
|
reason?: string;
|
|
29
29
|
annotations?: AnnotationPageDescription;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | TextualContentStrategy | UnknownStrategy | EmptyStrategy;
|
|
@@ -3,7 +3,7 @@ import { CanvasNormalized } from '@iiif/presentation-3-normalized';
|
|
|
3
3
|
import { AnnotationPageDescription } from './resource-types';
|
|
4
4
|
import { RenderingStrategy } from './strategies';
|
|
5
5
|
import { ChoiceDescription, Paintables, SupportedTarget } from '@iiif/helpers';
|
|
6
|
-
export
|
|
6
|
+
export type TextualContentStrategy = {
|
|
7
7
|
type: 'textual-content';
|
|
8
8
|
items: {
|
|
9
9
|
annotationId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Reference } from '@iiif/presentation-3';
|
|
2
|
-
|
|
2
|
+
type SupportedEvents = 'onClick';
|
|
3
3
|
export declare function useEventListener<T>(resource: Reference, name: SupportedEvents, listener: (e: any, resource: T) => void, scope?: string[], deps?: any[]): void;
|
|
4
4
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RegionParameter, RotationParameter } from '@atlas-viewer/iiif-image-api';
|
|
2
|
+
import { ImageService, ImageSize } from '@iiif/presentation-3';
|
|
3
|
+
export declare function useImage(service: ImageService | undefined, data?: {
|
|
4
|
+
size?: Partial<ImageSize>;
|
|
5
|
+
selector?: RegionParameter;
|
|
6
|
+
rotation?: number | RotationParameter;
|
|
7
|
+
format?: string;
|
|
8
|
+
region?: RegionParameter;
|
|
9
|
+
quality?: string;
|
|
10
|
+
}, deps?: any[]): string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageService } from '@iiif/presentation-3';
|
|
2
|
-
export
|
|
2
|
+
export type ImageServiceLoaderType = (imageService: any | undefined, { height, width }: {
|
|
3
3
|
height: number;
|
|
4
4
|
width: number;
|
|
5
5
|
}) => ImageService | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RenderingStrategy } from '../features/rendering-strategy/strategies';
|
|
2
|
-
export
|
|
2
|
+
export type StrategyActions = {
|
|
3
3
|
makeChoice: (id: string, options?: {
|
|
4
4
|
deselectOthers?: boolean;
|
|
5
5
|
deselect?: boolean;
|
|
6
6
|
}) => void;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type UseRenderingStrategy = [RenderingStrategy, StrategyActions];
|
|
9
|
+
export type UseRenderingStrategyOptions = {
|
|
10
10
|
strategies?: Array<RenderingStrategy['type']>;
|
|
11
11
|
annotationPageManagerId?: string;
|
|
12
12
|
enableSingleAnnotation?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type MediaPlayerState = {
|
|
3
3
|
isPlaying: boolean;
|
|
4
4
|
isMuted: boolean;
|
|
5
5
|
playRequested: boolean;
|
|
@@ -7,7 +7,7 @@ export declare type MediaPlayerState = {
|
|
|
7
7
|
isFinished: boolean;
|
|
8
8
|
duration: number;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type MediaPlayerActions = {
|
|
11
11
|
play(): void;
|
|
12
12
|
pause(): void;
|
|
13
13
|
playPause(): void;
|