react-iiif-vault 1.0.11 → 1.1.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 +1059 -0
- package/dist/bundle.global.js +227 -0
- package/dist/canvas-panel.cjs +46 -0
- package/dist/canvas-panel.d.cts +11 -0
- package/dist/canvas-panel.d.ts +11 -0
- package/dist/canvas-panel.js +1 -0
- package/dist/chunk-DXFXJCXN.js +1 -0
- package/dist/chunk-VPKD2BBH.js +47 -0
- package/dist/index-BZirmhnp.d.cts +188 -0
- package/dist/index-Cxs6aAuK.d.ts +188 -0
- package/dist/index.cjs +47 -0
- package/dist/index.d.cts +722 -0
- package/dist/index.d.ts +722 -0
- package/dist/index.js +1 -0
- package/dist/useRenderingStrategy-Xj9yQm4y.d.cts +145 -0
- package/dist/useRenderingStrategy-Xj9yQm4y.d.ts +145 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.cts +32 -0
- package/dist/utils.d.ts +32 -0
- package/dist/utils.js +1 -0
- package/package.json +67 -70
- package/.build/types/canvas-panel/Viewer.d.ts +0 -14
- package/.build/types/canvas-panel/context/overlays.d.ts +0 -3
- package/.build/types/canvas-panel/context/world-size.d.ts +0 -2
- package/.build/types/canvas-panel/index.d.ts +0 -46
- package/.build/types/canvas-panel/render/Annotation.d.ts +0 -8
- package/.build/types/canvas-panel/render/AnnotationPage.d.ts +0 -7
- package/.build/types/canvas-panel/render/Audio.d.ts +0 -11
- package/.build/types/canvas-panel/render/Canvas.d.ts +0 -34
- package/.build/types/canvas-panel/render/CanvasBackground.d.ts +0 -4
- package/.build/types/canvas-panel/render/DefaultCanvasFallback.d.ts +0 -6
- package/.build/types/canvas-panel/render/Image.d.ts +0 -16
- package/.build/types/canvas-panel/render/Model.d.ts +0 -7
- package/.build/types/canvas-panel/render/Video.d.ts +0 -12
- package/.build/types/canvas-panel/render/VideoYouTube.d.ts +0 -12
- package/.build/types/components/CanvasAnnotations.d.ts +0 -10
- package/.build/types/components/CombinedMetadata.d.ts +0 -4
- package/.build/types/components/Image.d.ts +0 -15
- package/.build/types/components/ManifestMetadata.d.ts +0 -4
- package/.build/types/components/Metadata.d.ts +0 -39
- package/.build/types/components/SequenceThumbnails.d.ts +0 -29
- package/.build/types/components/SingleCanvasThumbnail.d.ts +0 -20
- package/.build/types/context/AnnotationContext.d.ts +0 -5
- package/.build/types/context/AnnotationPageContext.d.ts +0 -5
- package/.build/types/context/CanvasContext.d.ts +0 -5
- package/.build/types/context/CollectionContext.d.ts +0 -5
- package/.build/types/context/ContextBridge.d.ts +0 -14
- package/.build/types/context/ImageServiceLoaderContext.d.ts +0 -4
- package/.build/types/context/ManifestContext.d.ts +0 -5
- package/.build/types/context/MediaContext.d.ts +0 -17
- package/.build/types/context/RangeContext.d.ts +0 -5
- package/.build/types/context/ResourceContext.d.ts +0 -15
- package/.build/types/context/VaultContext.d.ts +0 -14
- package/.build/types/context/ViewerPresetContext.d.ts +0 -3
- package/.build/types/context/VisibleCanvasContext.d.ts +0 -4
- package/.build/types/demo/demo.d.ts +0 -1
- package/.build/types/demo/media-controls.d.ts +0 -1
- package/.build/types/demo/viewer-controls.d.ts +0 -1
- package/.build/types/features/rendering-strategy/3d-strategy.d.ts +0 -12
- package/.build/types/features/rendering-strategy/audio-strategy.d.ts +0 -3
- package/.build/types/features/rendering-strategy/get-rendering-strategy.d.ts +0 -11
- package/.build/types/features/rendering-strategy/image-strategy.d.ts +0 -12
- package/.build/types/features/rendering-strategy/rendering-utils.d.ts +0 -12
- package/.build/types/features/rendering-strategy/resource-types.d.ts +0 -55
- package/.build/types/features/rendering-strategy/strategies.d.ts +0 -31
- package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +0 -16
- package/.build/types/features/rendering-strategy/video-strategy.d.ts +0 -3
- package/.build/types/future-helpers/ranges.d.ts +0 -7
- package/.build/types/future-helpers/sequences.d.ts +0 -8
- package/.build/types/hooks/useAnnotation.d.ts +0 -8
- package/.build/types/hooks/useAnnotationPage.d.ts +0 -8
- package/.build/types/hooks/useAnnotationPageManager.d.ts +0 -10
- package/.build/types/hooks/useAnnotationsAtTime.d.ts +0 -4
- package/.build/types/hooks/useCanvas.d.ts +0 -8
- package/.build/types/hooks/useCanvasClock.d.ts +0 -1
- package/.build/types/hooks/useCanvasSelector.d.ts +0 -0
- package/.build/types/hooks/useCanvasSubset.d.ts +0 -2
- package/.build/types/hooks/useCanvasTimeline.d.ts +0 -0
- package/.build/types/hooks/useCollection.d.ts +0 -8
- package/.build/types/hooks/useDispatch.d.ts +0 -2
- package/.build/types/hooks/useEnabledAnnotationPageIds.d.ts +0 -1
- package/.build/types/hooks/useEventListener.d.ts +0 -4
- package/.build/types/hooks/useExistingVault.d.ts +0 -2
- package/.build/types/hooks/useExternalCollection.d.ts +0 -13
- package/.build/types/hooks/useExternalManifest.d.ts +0 -13
- package/.build/types/hooks/useExternalResource.d.ts +0 -16
- package/.build/types/hooks/useImage.d.ts +0 -10
- package/.build/types/hooks/useImageService.d.ts +0 -9
- package/.build/types/hooks/useImageTile.d.ts +0 -11
- package/.build/types/hooks/useLoadImageService.d.ts +0 -6
- package/.build/types/hooks/useManifest.d.ts +0 -8
- package/.build/types/hooks/usePaintables.d.ts +0 -9
- package/.build/types/hooks/usePaintingAnnotations.d.ts +0 -5
- package/.build/types/hooks/useRange.d.ts +0 -8
- package/.build/types/hooks/useRenderingStrategy.d.ts +0 -15
- package/.build/types/hooks/useResourceEvents.d.ts +0 -3
- package/.build/types/hooks/useResources.d.ts +0 -1
- package/.build/types/hooks/useSearchService.d.ts +0 -2
- package/.build/types/hooks/useSimpleMediaPlayer.d.ts +0 -32
- package/.build/types/hooks/useStyleHelper.d.ts +0 -1
- package/.build/types/hooks/useStyles.d.ts +0 -3
- package/.build/types/hooks/useThumbnail.d.ts +0 -5
- package/.build/types/hooks/useVault.d.ts +0 -2
- package/.build/types/hooks/useVaultEffect.d.ts +0 -2
- package/.build/types/hooks/useVaultSelector.d.ts +0 -2
- package/.build/types/hooks/useVirtualAnnotationPage.d.ts +0 -14
- package/.build/types/hooks/useVirtualAnnotationPageContext.d.ts +0 -671
- package/.build/types/hooks/useVirtualCanvas.d.ts +0 -0
- package/.build/types/index.d.ts +0 -72
- package/.build/types/utility/flatten-annotation-page-ids.d.ts +0 -7
- package/.build/types/utility/i18n-utils.d.ts +0 -30
- package/.build/types/utils.d.ts +0 -2
- package/.build/types/viewers/SimpleViewerContext.d.ts +0 -6
- package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +0 -19
- package/.build/types/viewers/SimpleViewerContext.types.d.ts +0 -46
- package/.build/types/viewers/SingleCanvasContext.d.ts +0 -1
- package/dist/bundle/cjs/index.js +0 -49
- package/dist/bundle/cjs/index.js.map +0 -1
- package/dist/bundle/esm/index.mjs +0 -3319
- package/dist/bundle/esm/index.mjs.map +0 -1
- package/dist/canvas-panel/cjs/canvas-panel.js +0 -47
- package/dist/canvas-panel/cjs/canvas-panel.js.map +0 -1
- package/dist/canvas-panel/esm/canvas-panel.mjs +0 -1858
- package/dist/canvas-panel/esm/canvas-panel.mjs.map +0 -1
- package/dist/index.umd.js +0 -393
- package/dist/index.umd.js.map +0 -1
- package/dist/react17/cjs/index.js +0 -49
- package/dist/react17/cjs/index.js.map +0 -1
- package/dist/react17/esm/index.mjs +0 -3319
- package/dist/react17/esm/index.mjs.map +0 -1
- package/dist/utils/cjs/utils.js +0 -2
- package/dist/utils/cjs/utils.js.map +0 -1
- package/dist/utils/esm/utils.mjs +0 -238
- package/dist/utils/esm/utils.mjs.map +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
import { S as SimpleViewerContext, a as SimpleViewerProps } from './index-Cxs6aAuK.js';
|
|
2
|
+
export { C as CanvasPanel, c as SimpleViewerActions, d as SimpleViewerActionsType, b as SimpleViewerReducerState } from './index-Cxs6aAuK.js';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ReactNode, FunctionComponent, RefObject } from 'react';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { InternationalString, ImageService, ImageSize, AuthProbeService2, Auth2LocationResource, Auth2SubstituteResource, AuthAccessService2, AuthAccessTokenService2, AuthAccessToken2, SearchServiceQueryParams, SearchServiceSearchResponse, SearchService as SearchService$1, SearchServiceAutocomplete, Reference, Annotation } from '@iiif/presentation-3';
|
|
7
|
+
import { RegionParameter, RotationParameter, SizeParameter, ImageServiceLoader, ImageCandidateRequest, ImageCandidate } from '@atlas-viewer/iiif-image-api';
|
|
8
|
+
import * as zustand_vanilla from 'zustand/vanilla';
|
|
9
|
+
import { StoreApi } from 'zustand/vanilla';
|
|
10
|
+
import { Vault, VaultOptions, NormalizedEntity, IIIFStore } from '@iiif/helpers/vault';
|
|
11
|
+
import * as zustand from 'zustand';
|
|
12
|
+
import * as _iiif_helpers from '@iiif/helpers';
|
|
13
|
+
import { Paintables } from '@iiif/helpers';
|
|
14
|
+
import { CanvasNormalized, AnnotationNormalized, AnnotationPageNormalized, CollectionNormalized, ManifestNormalized, RangeNormalized } from '@iiif/presentation-3-normalized';
|
|
15
|
+
import { Preset } from '@atlas-viewer/atlas';
|
|
16
|
+
import { R as RenderingStrategy } from './useRenderingStrategy-Xj9yQm4y.js';
|
|
17
|
+
export { e as AnnotationPageDescription, A as AudioSequence, C as ComplexTimelineStrategy, E as EmptyStrategy, j as ImageServiceLoaderType, I as ImageWithOptionalService, M as MediaStrategy, h as Single3DModelStrategy, b as SingleAudio, a as SingleImageStrategy, c as SingleVideo, d as SingleYouTubeVideo, S as StrategyActions, T as TextualContentStrategy, U as UnknownStrategy, k as UseRenderingStrategy, l as UseRenderingStrategyOptions, V as VideoSequence, i as get3dStrategy, g as getImageStrategy, f as getTextualContentStrategy, u as useLoadImageService, m as useRenderingStrategy } from './useRenderingStrategy-Xj9yQm4y.js';
|
|
18
|
+
export { emptyActions, emptyStrategy, getParsedTargetSelector, getRenderingStrategy, parseSpecificResource, unknownResponse, unsupportedStrategy } from './utils.js';
|
|
19
|
+
import { VaultZustandStore } from '@iiif/helpers/vault/store';
|
|
20
|
+
import * as _iiif_helpers_painting_annotations from '@iiif/helpers/painting-annotations';
|
|
21
|
+
import * as _iiif_helpers_styles from '@iiif/helpers/styles';
|
|
22
|
+
export * from '@iiif/helpers/annotation-targets';
|
|
23
|
+
|
|
24
|
+
declare const CanvasAnnotations: React$1.ForwardRefExoticComponent<{
|
|
25
|
+
canvasId?: string | undefined;
|
|
26
|
+
} & React$1.RefAttributes<{
|
|
27
|
+
availablePageIds: string[];
|
|
28
|
+
enabledPageIds: string[];
|
|
29
|
+
setPageEnabled: (id: string, opt?: {
|
|
30
|
+
deselectOthers?: boolean | undefined;
|
|
31
|
+
}) => void;
|
|
32
|
+
setPageDisabled: (deselectId: string) => void;
|
|
33
|
+
}>>;
|
|
34
|
+
|
|
35
|
+
type FacetConfig = {
|
|
36
|
+
id: string;
|
|
37
|
+
label: InternationalString;
|
|
38
|
+
keys: string[];
|
|
39
|
+
values?: FacetConfigValue[];
|
|
40
|
+
};
|
|
41
|
+
type FacetConfigValue = {
|
|
42
|
+
id: string;
|
|
43
|
+
label: InternationalString;
|
|
44
|
+
values: string[];
|
|
45
|
+
key: string;
|
|
46
|
+
};
|
|
47
|
+
interface MetadataProps {
|
|
48
|
+
config?: FacetConfig[];
|
|
49
|
+
metadata?: Array<{
|
|
50
|
+
label: InternationalString;
|
|
51
|
+
value: InternationalString;
|
|
52
|
+
} | null>;
|
|
53
|
+
labelWidth?: number;
|
|
54
|
+
allowHtml?: boolean;
|
|
55
|
+
showEmptyMessage?: boolean;
|
|
56
|
+
separator?: string;
|
|
57
|
+
classes?: {
|
|
58
|
+
container?: string;
|
|
59
|
+
row?: string;
|
|
60
|
+
label?: string;
|
|
61
|
+
value?: string;
|
|
62
|
+
empty?: string;
|
|
63
|
+
};
|
|
64
|
+
emptyMessage?: string;
|
|
65
|
+
emptyValueFallback?: string;
|
|
66
|
+
emptyLabelFallback?: string;
|
|
67
|
+
tableHeader?: React.ReactNode;
|
|
68
|
+
tableFooter?: React.ReactNode;
|
|
69
|
+
emptyFallback?: React.ReactNode;
|
|
70
|
+
}
|
|
71
|
+
declare function Metadata({ metadata, config, labelWidth, showEmptyMessage, allowHtml, emptyFallback, classes, emptyMessage, emptyValueFallback, emptyLabelFallback, separator, tableFooter, tableHeader, }: MetadataProps): react_jsx_runtime.JSX.Element;
|
|
72
|
+
|
|
73
|
+
type CombinedMetadataProps = Omit<MetadataProps, 'metadata'>;
|
|
74
|
+
declare function CombinedMetadata(props: CombinedMetadataProps): react_jsx_runtime.JSX.Element;
|
|
75
|
+
|
|
76
|
+
interface ImageProps {
|
|
77
|
+
src: string | ImageService;
|
|
78
|
+
alt?: string;
|
|
79
|
+
size?: Partial<ImageSize>;
|
|
80
|
+
region?: RegionParameter;
|
|
81
|
+
className?: string;
|
|
82
|
+
style?: React.CSSProperties;
|
|
83
|
+
fetchImageService?: boolean;
|
|
84
|
+
quality?: string;
|
|
85
|
+
rotation?: number | RotationParameter;
|
|
86
|
+
format?: string;
|
|
87
|
+
}
|
|
88
|
+
declare function Image(props: ImageProps): react_jsx_runtime.JSX.Element | null;
|
|
89
|
+
|
|
90
|
+
type ManifestMetadataProps = Omit<MetadataProps, 'metadata'>;
|
|
91
|
+
declare function ManifestMetadata(props: ManifestMetadataProps): react_jsx_runtime.JSX.Element;
|
|
92
|
+
|
|
93
|
+
interface SequenceThumbnailsProps {
|
|
94
|
+
flat?: boolean;
|
|
95
|
+
size?: {
|
|
96
|
+
width: number;
|
|
97
|
+
height?: number;
|
|
98
|
+
};
|
|
99
|
+
classes?: {
|
|
100
|
+
container?: string;
|
|
101
|
+
row?: string;
|
|
102
|
+
item?: string;
|
|
103
|
+
figure?: string;
|
|
104
|
+
imageWrapper?: string;
|
|
105
|
+
img?: string;
|
|
106
|
+
label?: string;
|
|
107
|
+
selected?: {
|
|
108
|
+
row?: string;
|
|
109
|
+
item?: string;
|
|
110
|
+
figure?: string;
|
|
111
|
+
img?: string;
|
|
112
|
+
label?: string;
|
|
113
|
+
imageWrapper?: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
figure?: boolean;
|
|
117
|
+
showLabel?: boolean;
|
|
118
|
+
fallback?: React.ReactNode;
|
|
119
|
+
}
|
|
120
|
+
declare function SequenceThumbnails({ flat, size, classes, showLabel, figure, fallback }: SequenceThumbnailsProps): react_jsx_runtime.JSX.Element;
|
|
121
|
+
|
|
122
|
+
interface SingleCanvasThumbnailProps {
|
|
123
|
+
canvasId?: string;
|
|
124
|
+
size?: Partial<SizeParameter>;
|
|
125
|
+
visible?: boolean;
|
|
126
|
+
alt?: string;
|
|
127
|
+
dereference?: boolean;
|
|
128
|
+
figure?: boolean;
|
|
129
|
+
showLabel?: boolean;
|
|
130
|
+
classes?: {
|
|
131
|
+
figure?: string;
|
|
132
|
+
img?: string;
|
|
133
|
+
label?: string;
|
|
134
|
+
imageWrapper?: string;
|
|
135
|
+
};
|
|
136
|
+
placeholder?: React.ReactNode;
|
|
137
|
+
fallback?: React.ReactNode;
|
|
138
|
+
}
|
|
139
|
+
declare function SingleCanvasThumbnail(props: SingleCanvasThumbnailProps): react_jsx_runtime.JSX.Element;
|
|
140
|
+
|
|
141
|
+
declare function AnnotationContext({ annotation, children }: {
|
|
142
|
+
annotation: string;
|
|
143
|
+
children: ReactNode;
|
|
144
|
+
}): react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
declare function AnnotationPageContext({ annotationPage, children }: {
|
|
147
|
+
annotationPage: string;
|
|
148
|
+
children: ReactNode;
|
|
149
|
+
}): react_jsx_runtime.JSX.Element;
|
|
150
|
+
|
|
151
|
+
declare function hasAuth(resource: any): boolean;
|
|
152
|
+
interface ProbeStore {
|
|
153
|
+
service?: AuthProbeService2;
|
|
154
|
+
status: 'unknown' | 'probing' | 'error' | 'success';
|
|
155
|
+
shouldRedirect: boolean;
|
|
156
|
+
redirectResource: Auth2LocationResource | null;
|
|
157
|
+
shouldSubstitute: boolean;
|
|
158
|
+
substituteResource: Auth2SubstituteResource | null;
|
|
159
|
+
error: string | null;
|
|
160
|
+
errorHeading: InternationalString | null;
|
|
161
|
+
errorNote: InternationalString | null;
|
|
162
|
+
shouldDisplayResource: boolean;
|
|
163
|
+
token: string | null;
|
|
164
|
+
probe: () => Promise<void>;
|
|
165
|
+
setToken: (token: string) => void;
|
|
166
|
+
}
|
|
167
|
+
interface AuthContextState {
|
|
168
|
+
currentAuth: number;
|
|
169
|
+
authItems: AuthAccessState[];
|
|
170
|
+
}
|
|
171
|
+
interface AuthContextCurrentActions {
|
|
172
|
+
login(): void;
|
|
173
|
+
logout(): void;
|
|
174
|
+
nextAuth(): void;
|
|
175
|
+
previousAuth(): void;
|
|
176
|
+
setAuth(index: number): void;
|
|
177
|
+
}
|
|
178
|
+
interface AuthContextActions {
|
|
179
|
+
addService(service: AuthAccessService2, probeId: string): void;
|
|
180
|
+
removeService(service: AuthAccessService2, probeId: string): void;
|
|
181
|
+
}
|
|
182
|
+
interface AuthAccessState {
|
|
183
|
+
id: string;
|
|
184
|
+
type: 'external' | 'kiosk' | 'active';
|
|
185
|
+
service: AuthAccessService2;
|
|
186
|
+
probeId: string;
|
|
187
|
+
isPending: boolean;
|
|
188
|
+
isLoggedIn: boolean;
|
|
189
|
+
canAuthenticate: boolean;
|
|
190
|
+
instances: number;
|
|
191
|
+
error?: string;
|
|
192
|
+
session: null | {
|
|
193
|
+
token: string;
|
|
194
|
+
expires: number;
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
declare const createAuthStateStore: () => zustand_vanilla.StoreApi<AuthContextCurrentActions & AuthContextState & AuthContextActions>;
|
|
198
|
+
declare const createProbe: (service?: AuthProbeService2, token?: string) => zustand_vanilla.StoreApi<ProbeStore>;
|
|
199
|
+
declare function authDetailsForResource(resource: any): {
|
|
200
|
+
hasAuth?: boolean | undefined;
|
|
201
|
+
services: {
|
|
202
|
+
probe?: AuthProbeService2;
|
|
203
|
+
access?: AuthAccessService2;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
declare function makeAccessTokenRequest<T extends AuthAccessTokenService2>(service: T, { strict }?: {
|
|
207
|
+
strict?: boolean;
|
|
208
|
+
}): Promise<AuthAccessToken2>;
|
|
209
|
+
declare function makeAccessServiceRequest<T extends AuthAccessService2>(service: T): Promise<void>;
|
|
210
|
+
|
|
211
|
+
interface AuthState {
|
|
212
|
+
id: string;
|
|
213
|
+
type: 'external' | 'kiosk' | 'active';
|
|
214
|
+
service: AuthAccessService2;
|
|
215
|
+
probeId: string;
|
|
216
|
+
isPending: boolean;
|
|
217
|
+
isLoggedIn: boolean;
|
|
218
|
+
canAuthenticate: boolean;
|
|
219
|
+
instances: number;
|
|
220
|
+
error?: string;
|
|
221
|
+
session: null | {
|
|
222
|
+
token: string;
|
|
223
|
+
expires: number;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
declare const AuthRContext: React$1.Context<StoreApi<AuthContextState & AuthContextCurrentActions & AuthContextActions> | null>;
|
|
227
|
+
declare const AuthReactContext: React$1.Context<(AuthContextState & AuthContextCurrentActions) | null>;
|
|
228
|
+
declare const AuthReactContextActions: React$1.Context<AuthContextActions | null>;
|
|
229
|
+
declare function AuthProvider({ children }: {
|
|
230
|
+
children: ReactNode;
|
|
231
|
+
}): react_jsx_runtime.JSX.Element;
|
|
232
|
+
declare function AuthProvider_Old({ children }: {
|
|
233
|
+
children: ReactNode;
|
|
234
|
+
}): react_jsx_runtime.JSX.Element;
|
|
235
|
+
declare function useIsAuthEnabled(): boolean;
|
|
236
|
+
declare function useAuthStore(): StoreApi<AuthContextState & AuthContextCurrentActions & AuthContextActions>;
|
|
237
|
+
declare function useAuthActions(): {
|
|
238
|
+
login: () => void;
|
|
239
|
+
logout: () => void;
|
|
240
|
+
nextAuth: () => void;
|
|
241
|
+
previousAuth: () => void;
|
|
242
|
+
setAuth: (index: number) => void;
|
|
243
|
+
addService: (service: AuthAccessService2, probeId: string) => void;
|
|
244
|
+
removeService: (service: AuthAccessService2, probeId: string) => void;
|
|
245
|
+
};
|
|
246
|
+
declare function useCurrentAuth(): AuthContextState & AuthContextCurrentActions & AuthContextActions;
|
|
247
|
+
declare function useAuthService(id: string): AuthAccessState | undefined;
|
|
248
|
+
declare function useAuthTokens(id?: string): string | undefined;
|
|
249
|
+
declare function useAuthToken(id: string): string | null;
|
|
250
|
+
declare function useCurrentAuth_old(): AuthContextState & AuthContextCurrentActions;
|
|
251
|
+
declare function useAuthService_old(id: string): AuthState | null;
|
|
252
|
+
declare function useAuthTokens_old(id?: string): string | null;
|
|
253
|
+
declare function useAuthToken_old(id?: string): string | null;
|
|
254
|
+
declare function useAuthActions_old(): AuthContextActions | null;
|
|
255
|
+
interface AuthProps<T, Extra> {
|
|
256
|
+
resource: T;
|
|
257
|
+
extra?: Extra;
|
|
258
|
+
children: (service: T) => ReactNode;
|
|
259
|
+
fallbackComponent?: FunctionComponent<any> | null;
|
|
260
|
+
loadingComponent?: FunctionComponent<any> | null;
|
|
261
|
+
errorComponent?: FunctionComponent<{
|
|
262
|
+
resource: T;
|
|
263
|
+
error: string;
|
|
264
|
+
heading: InternationalString | null;
|
|
265
|
+
note: InternationalString | null;
|
|
266
|
+
extra: Extra | undefined;
|
|
267
|
+
}> | null;
|
|
268
|
+
}
|
|
269
|
+
declare function Auth<Element, Extra = any>(props: AuthProps<Element, Extra>): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
270
|
+
|
|
271
|
+
declare function CanvasContext({ canvas, children }: {
|
|
272
|
+
canvas: string;
|
|
273
|
+
children: ReactNode;
|
|
274
|
+
}): react_jsx_runtime.JSX.Element;
|
|
275
|
+
|
|
276
|
+
declare function CollectionContext({ collection, children }: {
|
|
277
|
+
collection: string;
|
|
278
|
+
children: ReactNode;
|
|
279
|
+
}): react_jsx_runtime.JSX.Element;
|
|
280
|
+
|
|
281
|
+
declare function ManifestContext({ manifest, children }: {
|
|
282
|
+
manifest: string;
|
|
283
|
+
children: ReactNode;
|
|
284
|
+
}): react_jsx_runtime.JSX.Element;
|
|
285
|
+
|
|
286
|
+
type MediaPlayerState = {
|
|
287
|
+
isPlaying: boolean;
|
|
288
|
+
isMuted: boolean;
|
|
289
|
+
playRequested: boolean;
|
|
290
|
+
volume: number;
|
|
291
|
+
isFinished: boolean;
|
|
292
|
+
duration: number;
|
|
293
|
+
};
|
|
294
|
+
type MediaPlayerActions = {
|
|
295
|
+
play(): void;
|
|
296
|
+
pause(): void;
|
|
297
|
+
playPause(): void;
|
|
298
|
+
mute(): void;
|
|
299
|
+
unmute(): void;
|
|
300
|
+
toggleMute(): void;
|
|
301
|
+
setVolume(volume: number): void;
|
|
302
|
+
setDurationPercent(percent: number): void;
|
|
303
|
+
setTime(time: number): void;
|
|
304
|
+
};
|
|
305
|
+
declare function formatTime(time: number): string;
|
|
306
|
+
declare function useSimpleMediaPlayer(props: {
|
|
307
|
+
duration: number;
|
|
308
|
+
}): readonly [
|
|
309
|
+
{
|
|
310
|
+
element: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
311
|
+
currentTime: RefObject<HTMLDivElement>;
|
|
312
|
+
progress: RefObject<HTMLDivElement>;
|
|
313
|
+
},
|
|
314
|
+
MediaPlayerState,
|
|
315
|
+
MediaPlayerActions
|
|
316
|
+
];
|
|
317
|
+
|
|
318
|
+
declare function useMediaState(): MediaPlayerState;
|
|
319
|
+
declare function useMediaActions(): MediaPlayerActions;
|
|
320
|
+
declare function useMediaElements(): {
|
|
321
|
+
element: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
322
|
+
currentTime: RefObject<HTMLDivElement>;
|
|
323
|
+
progress: RefObject<HTMLDivElement>;
|
|
324
|
+
};
|
|
325
|
+
declare function MediaPlayerProvider({ actions, state, children, currentTime, progress, element, }: {
|
|
326
|
+
actions: MediaPlayerActions;
|
|
327
|
+
state: MediaPlayerState;
|
|
328
|
+
children: ReactNode;
|
|
329
|
+
currentTime: RefObject<HTMLDivElement>;
|
|
330
|
+
progress: RefObject<HTMLDivElement>;
|
|
331
|
+
element: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
332
|
+
}): react_jsx_runtime.JSX.Element;
|
|
333
|
+
|
|
334
|
+
declare function RangeContext({ range, children }: {
|
|
335
|
+
range: string;
|
|
336
|
+
children: ReactNode;
|
|
337
|
+
}): react_jsx_runtime.JSX.Element;
|
|
338
|
+
|
|
339
|
+
type ResourceContextType = {
|
|
340
|
+
collection?: string;
|
|
341
|
+
manifest?: string;
|
|
342
|
+
range?: string;
|
|
343
|
+
canvas?: string;
|
|
344
|
+
annotation?: string;
|
|
345
|
+
annotationPage?: string;
|
|
346
|
+
};
|
|
347
|
+
declare const ResourceReactContext: React__default.Context<ResourceContextType>;
|
|
348
|
+
declare const useResourceContext: () => ResourceContextType;
|
|
349
|
+
declare function ResourceProvider({ value, children }: {
|
|
350
|
+
value: ResourceContextType;
|
|
351
|
+
children: ReactNode;
|
|
352
|
+
}): react_jsx_runtime.JSX.Element;
|
|
353
|
+
|
|
354
|
+
declare const ReactVaultContext: React__default.Context<{
|
|
355
|
+
vault: Vault | null;
|
|
356
|
+
setVaultInstance: (vault: Vault) => void;
|
|
357
|
+
}>;
|
|
358
|
+
declare function VaultProvider({ vault, vaultOptions, useGlobal, resources, children, }: {
|
|
359
|
+
vault?: Vault;
|
|
360
|
+
useGlobal?: boolean;
|
|
361
|
+
vaultOptions?: VaultOptions;
|
|
362
|
+
resources?: ResourceContextType;
|
|
363
|
+
children: ReactNode;
|
|
364
|
+
}): react_jsx_runtime.JSX.Element;
|
|
365
|
+
|
|
366
|
+
type SearchService = SearchService$1 & {
|
|
367
|
+
service: SearchServiceAutocomplete | SearchServiceAutocomplete[];
|
|
368
|
+
};
|
|
369
|
+
interface Search1Store {
|
|
370
|
+
service: SearchService | undefined;
|
|
371
|
+
lastQuery: SearchServiceQueryParams;
|
|
372
|
+
resources: SearchServiceSearchResponse['resources'];
|
|
373
|
+
loading: boolean;
|
|
374
|
+
error: boolean;
|
|
375
|
+
hasAutocomplete: boolean;
|
|
376
|
+
hasSearch: boolean;
|
|
377
|
+
errorMessage: string;
|
|
378
|
+
highlight: SearchServiceSearchResponse['resources'][number] | null;
|
|
379
|
+
search: (query: SearchServiceQueryParams, options?: {
|
|
380
|
+
headers?: HeadersInit;
|
|
381
|
+
}) => void;
|
|
382
|
+
clearSearch: () => void;
|
|
383
|
+
highlightResult: (id: string) => void;
|
|
384
|
+
nextResult: () => void;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
declare function useContextBridge(): {
|
|
388
|
+
VaultContext: {
|
|
389
|
+
vault: _iiif_helpers.Vault | null;
|
|
390
|
+
setVaultInstance: (vault: _iiif_helpers.Vault) => void;
|
|
391
|
+
};
|
|
392
|
+
ResourceContext: ResourceContextType;
|
|
393
|
+
SimpleViewerReactContext: SimpleViewerContext;
|
|
394
|
+
VisibleCanvasReactContext: string[];
|
|
395
|
+
AuthRContext: zustand.StoreApi<AuthContextState & AuthContextCurrentActions & AuthContextActions> | null;
|
|
396
|
+
SearchReactContext: zustand.StoreApi<Search1Store> | null;
|
|
397
|
+
};
|
|
398
|
+
declare function ContextBridge(props: {
|
|
399
|
+
bridge: ReturnType<typeof useContextBridge>;
|
|
400
|
+
children: ReactNode;
|
|
401
|
+
}): react_jsx_runtime.JSX.Element;
|
|
402
|
+
|
|
403
|
+
declare const VisibleCanvasReactContext: React__default.Context<string[]>;
|
|
404
|
+
declare function useVisibleCanvases(): CanvasNormalized[];
|
|
405
|
+
|
|
406
|
+
declare const ViewerPresetContext: React$1.Context<Preset | null | undefined>;
|
|
407
|
+
declare function useViewerPreset(): Preset | null | undefined;
|
|
408
|
+
|
|
409
|
+
declare const ImageServiceLoaderContext: React__default.Context<ImageServiceLoader>;
|
|
410
|
+
declare function useImageServiceLoader(): ImageServiceLoader;
|
|
411
|
+
|
|
412
|
+
declare function getVideoStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
|
|
413
|
+
|
|
414
|
+
declare function useAnnotation(options?: {
|
|
415
|
+
id: string;
|
|
416
|
+
}): AnnotationNormalized | undefined;
|
|
417
|
+
declare function useAnnotation<T>(options?: {
|
|
418
|
+
id: string;
|
|
419
|
+
selector: (annotation: AnnotationNormalized) => T;
|
|
420
|
+
}, deps?: any[]): T | undefined;
|
|
421
|
+
|
|
422
|
+
declare function useAnnotationPage(options?: {
|
|
423
|
+
id: string;
|
|
424
|
+
}): AnnotationPageNormalized | undefined;
|
|
425
|
+
declare function useAnnotationPage<T>(options?: {
|
|
426
|
+
id: string;
|
|
427
|
+
selector: (annotation: AnnotationPageNormalized) => T;
|
|
428
|
+
}, deps?: any[]): T | undefined;
|
|
429
|
+
|
|
430
|
+
declare function useAnnotationPageManager(resourceId?: string, options?: {
|
|
431
|
+
all?: boolean;
|
|
432
|
+
}): {
|
|
433
|
+
availablePageIds: string[];
|
|
434
|
+
enabledPageIds: string[];
|
|
435
|
+
setPageEnabled: (id: string, opt?: {
|
|
436
|
+
deselectOthers?: boolean;
|
|
437
|
+
}) => void;
|
|
438
|
+
setPageDisabled: (deselectId: string) => void;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
declare function useAnnotationsAtTime(time: number, options?: {
|
|
442
|
+
canvasId?: string;
|
|
443
|
+
}): AnnotationNormalized[];
|
|
444
|
+
|
|
445
|
+
declare function useCanvas(options?: {
|
|
446
|
+
id: string;
|
|
447
|
+
}): CanvasNormalized | undefined;
|
|
448
|
+
declare function useCanvas<T>(options?: {
|
|
449
|
+
id: string;
|
|
450
|
+
selector: (canvas: CanvasNormalized) => T;
|
|
451
|
+
}, deps?: any[]): T | undefined;
|
|
452
|
+
|
|
453
|
+
declare function useCanvasClock(canvasId?: string, autoplay?: boolean): void;
|
|
454
|
+
|
|
455
|
+
declare function useCanvasSubset(idsOrRefs?: Array<string | Reference>): Reference<'Canvas'>[];
|
|
456
|
+
|
|
457
|
+
declare function useCollection(options: {
|
|
458
|
+
id: string;
|
|
459
|
+
}): CollectionNormalized | undefined;
|
|
460
|
+
declare function useCollection<T>(options: {
|
|
461
|
+
id: string;
|
|
462
|
+
selector: (collection: CollectionNormalized) => T;
|
|
463
|
+
}, deps?: any[]): T | undefined;
|
|
464
|
+
|
|
465
|
+
declare function useDispatch(): VaultZustandStore['dispatch'];
|
|
466
|
+
|
|
467
|
+
type SupportedEvents = 'onClick';
|
|
468
|
+
declare function useEventListener<T>(resource: Reference, name: SupportedEvents, listener: (e: any, resource: T) => void, scope?: string[], deps?: any[]): void;
|
|
469
|
+
|
|
470
|
+
declare function useExistingVault(vault?: Vault): Vault;
|
|
471
|
+
|
|
472
|
+
type ResourceRequestOptions = {
|
|
473
|
+
noCache?: boolean;
|
|
474
|
+
};
|
|
475
|
+
declare function useExternalResource<T extends {
|
|
476
|
+
id: string;
|
|
477
|
+
}>(idOrRef: string | {
|
|
478
|
+
id: string;
|
|
479
|
+
type: string;
|
|
480
|
+
}, { noCache }?: ResourceRequestOptions): {
|
|
481
|
+
id: string;
|
|
482
|
+
requestId: string;
|
|
483
|
+
isLoaded: boolean;
|
|
484
|
+
error: any;
|
|
485
|
+
cached: boolean;
|
|
486
|
+
resource?: T;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
declare function useExternalCollection(idOrRef: string | {
|
|
490
|
+
id: string;
|
|
491
|
+
type: string;
|
|
492
|
+
}, options?: ResourceRequestOptions): {
|
|
493
|
+
id: string;
|
|
494
|
+
requestId: string;
|
|
495
|
+
isLoaded: boolean;
|
|
496
|
+
cached?: boolean;
|
|
497
|
+
error: any;
|
|
498
|
+
manifest?: CollectionNormalized;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
declare function useExternalManifest(idOrRef: string | {
|
|
502
|
+
id: string;
|
|
503
|
+
type: string;
|
|
504
|
+
}, options?: ResourceRequestOptions): {
|
|
505
|
+
id: string;
|
|
506
|
+
requestId: string;
|
|
507
|
+
isLoaded: boolean;
|
|
508
|
+
cached?: boolean;
|
|
509
|
+
error: any;
|
|
510
|
+
manifest?: ManifestNormalized;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
declare function useImage(service: ImageService | undefined, data?: {
|
|
514
|
+
size?: Partial<ImageSize>;
|
|
515
|
+
selector?: RegionParameter;
|
|
516
|
+
rotation?: number | RotationParameter;
|
|
517
|
+
format?: string;
|
|
518
|
+
region?: RegionParameter;
|
|
519
|
+
quality?: string;
|
|
520
|
+
}, deps?: any[]): string | null;
|
|
521
|
+
|
|
522
|
+
interface ImageServiceRequestOptions {
|
|
523
|
+
cacheKey?: string;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Returns the First image service on the current canvas.
|
|
527
|
+
*
|
|
528
|
+
* @note It is better to use the hook useRenderingStrategy for rendering.
|
|
529
|
+
*/
|
|
530
|
+
declare function useImageService({ cacheKey }?: ImageServiceRequestOptions): {
|
|
531
|
+
data: ImageService | undefined;
|
|
532
|
+
isFetching: boolean;
|
|
533
|
+
status: 'error' | 'success' | 'loading' | 'idle';
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
declare function useImageTile(): {
|
|
537
|
+
isLoading: boolean;
|
|
538
|
+
tile: {
|
|
539
|
+
id: string | undefined;
|
|
540
|
+
width: number | null | undefined;
|
|
541
|
+
height: number | null | undefined;
|
|
542
|
+
imageService: ImageService;
|
|
543
|
+
thumbnail: undefined;
|
|
544
|
+
} | null;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
declare function useManifest(options?: {
|
|
548
|
+
id: string;
|
|
549
|
+
}): ManifestNormalized | undefined;
|
|
550
|
+
declare function useManifest<T>(options?: {
|
|
551
|
+
id: string;
|
|
552
|
+
selector: (manifest: ManifestNormalized) => T;
|
|
553
|
+
}, deps?: any[]): T | undefined;
|
|
554
|
+
|
|
555
|
+
declare function usePaintables(options?: {
|
|
556
|
+
defaultChoices?: string[];
|
|
557
|
+
enableSingleAnnotation?: boolean;
|
|
558
|
+
}, deps?: any[]): readonly [_iiif_helpers_painting_annotations.Paintables, {
|
|
559
|
+
makeChoice: (id: string, { deselectOthers, deselect }?: {
|
|
560
|
+
deselectOthers?: boolean;
|
|
561
|
+
deselect?: boolean;
|
|
562
|
+
}) => void;
|
|
563
|
+
}];
|
|
564
|
+
|
|
565
|
+
declare function usePaintingAnnotations(options?: {
|
|
566
|
+
canvasId?: string;
|
|
567
|
+
enableSingleAnnotation?: boolean;
|
|
568
|
+
}): AnnotationNormalized[];
|
|
569
|
+
|
|
570
|
+
declare function useRange(options?: {
|
|
571
|
+
id: string;
|
|
572
|
+
}): RangeNormalized | undefined;
|
|
573
|
+
declare function useRange<T>(options?: {
|
|
574
|
+
id: string;
|
|
575
|
+
selector: (range: RangeNormalized) => T;
|
|
576
|
+
}, deps?: any[]): T | undefined;
|
|
577
|
+
|
|
578
|
+
declare function useResourceEvents<T extends NormalizedEntity>(resource?: Reference, scope?: string[]): any;
|
|
579
|
+
|
|
580
|
+
declare function useResources<Type>(ids: string[], type: string): Type[];
|
|
581
|
+
|
|
582
|
+
declare function useSearchService(): SearchService$1 | undefined;
|
|
583
|
+
|
|
584
|
+
declare function useStyleHelper(): _iiif_helpers_styles.StyledHelper<_iiif_helpers_styles.StyleDefinition>;
|
|
585
|
+
|
|
586
|
+
declare function useStyles<Style extends Record<string, Record<string, any>>>(resource: undefined | Reference<any>): Style;
|
|
587
|
+
declare function useStyles<Style extends Record<string, any>>(resource: undefined | Reference<any>, scope: string): Style;
|
|
588
|
+
|
|
589
|
+
declare function useThumbnail(request: ImageCandidateRequest, dereference?: boolean, { canvasId, manifestId }?: {
|
|
590
|
+
canvasId?: string;
|
|
591
|
+
manifestId?: string;
|
|
592
|
+
}): ImageCandidate | undefined;
|
|
593
|
+
|
|
594
|
+
declare const useVault: () => Vault;
|
|
595
|
+
|
|
596
|
+
declare const useVaultEffect: (callback: (vault: Vault) => void, deps?: any[]) => void;
|
|
597
|
+
|
|
598
|
+
declare function useVaultSelector<T>(selector: (state: IIIFStore, vault: Vault) => T, deps?: any[]): T;
|
|
599
|
+
|
|
600
|
+
interface VaultActivatedAnnotation {
|
|
601
|
+
__vault?: Vault;
|
|
602
|
+
bindToVault(vault: Vault): void;
|
|
603
|
+
source: string | {
|
|
604
|
+
id: string;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
declare function useVirtualAnnotationPage(): readonly [AnnotationPageNormalized | null, {
|
|
608
|
+
readonly addAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized, atIndex?: number) => void;
|
|
609
|
+
readonly removeAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized) => void;
|
|
610
|
+
}];
|
|
611
|
+
|
|
612
|
+
declare function useVirtualAnnotationPageContext(): [AnnotationPageNormalized | null, {
|
|
613
|
+
addAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized, atIndex?: number | undefined) => void;
|
|
614
|
+
removeAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized) => void;
|
|
615
|
+
}];
|
|
616
|
+
declare function VirtualAnnotationProvider({ children }: {
|
|
617
|
+
children: any;
|
|
618
|
+
}): react_jsx_runtime.JSX.Element;
|
|
619
|
+
|
|
620
|
+
declare function flattenAnnotationPageIds({ canvas, manifest, all, canvases, }: {
|
|
621
|
+
manifest?: ManifestNormalized;
|
|
622
|
+
canvas?: CanvasNormalized;
|
|
623
|
+
canvases?: CanvasNormalized[];
|
|
624
|
+
all?: boolean;
|
|
625
|
+
}): string[];
|
|
626
|
+
|
|
627
|
+
declare function LanguageProvider(props: {
|
|
628
|
+
language: string;
|
|
629
|
+
children: ReactNode;
|
|
630
|
+
}): react_jsx_runtime.JSX.Element;
|
|
631
|
+
declare function useIIIFLanguage(): string;
|
|
632
|
+
type LanguageStringProps = {
|
|
633
|
+
[key: string]: any;
|
|
634
|
+
} & {
|
|
635
|
+
as?: string | React__default.FC<any>;
|
|
636
|
+
language: string;
|
|
637
|
+
viewingDirection?: 'rtl' | 'rtl';
|
|
638
|
+
};
|
|
639
|
+
declare function LanguageString({ as: Component, language, children, viewingDirection, ...props }: LanguageStringProps): react_jsx_runtime.JSX.Element;
|
|
640
|
+
declare const useClosestLanguage: (getLanguages: () => string[], deps?: any[]) => string | undefined;
|
|
641
|
+
declare function useLocaleString(inputText: InternationalString | string | null | undefined, defaultText?: string, separator?: string): readonly [string, string | undefined];
|
|
642
|
+
declare function useCreateLocaleString(): (inputText: InternationalString | string | null | undefined, defaultText?: string, separator?: string) => string;
|
|
643
|
+
type LocaleStringProps = {
|
|
644
|
+
as?: string | React__default.FC<any>;
|
|
645
|
+
defaultText?: string;
|
|
646
|
+
to?: string;
|
|
647
|
+
separator?: string;
|
|
648
|
+
enableDangerouslySetInnerHTML?: boolean;
|
|
649
|
+
children: InternationalString | string | null | undefined;
|
|
650
|
+
style?: React__default.CSSProperties;
|
|
651
|
+
extraProps?: any;
|
|
652
|
+
} & Record<string, any>;
|
|
653
|
+
declare function LocaleString({ as: Component, defaultText, enableDangerouslySetInnerHTML, children, separator, ...props }: LocaleStringProps): react_jsx_runtime.JSX.Element;
|
|
654
|
+
|
|
655
|
+
declare const SimpleViewerReactContext: React__default.Context<SimpleViewerContext>;
|
|
656
|
+
declare function InnerViewerProvider(props: SimpleViewerProps): react_jsx_runtime.JSX.Element | null;
|
|
657
|
+
declare function SimpleViewerProvider(props: SimpleViewerProps): react_jsx_runtime.JSX.Element;
|
|
658
|
+
declare function useSimpleViewer(): SimpleViewerContext;
|
|
659
|
+
|
|
660
|
+
declare function useCanvasSequence({ startCanvas, disablePaging }: {
|
|
661
|
+
startCanvas?: string;
|
|
662
|
+
disablePaging?: boolean;
|
|
663
|
+
}): {
|
|
664
|
+
visibleItems: string[];
|
|
665
|
+
cursor: number;
|
|
666
|
+
items: {
|
|
667
|
+
type: "Canvas";
|
|
668
|
+
id: string;
|
|
669
|
+
}[];
|
|
670
|
+
sequence: number[][];
|
|
671
|
+
hasPrevious: boolean;
|
|
672
|
+
hasNext: boolean;
|
|
673
|
+
setSequenceIndex: React$1.Dispatch<React$1.SetStateAction<number>>;
|
|
674
|
+
setCanvasIndex: (index: number) => void;
|
|
675
|
+
setCanvasId: (id: string) => void;
|
|
676
|
+
next: () => void;
|
|
677
|
+
previous: () => void;
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Get visible canvases from canvas ID
|
|
682
|
+
*
|
|
683
|
+
* This function returns a list of canvas references that should all be displayed
|
|
684
|
+
* when the passed canvasId is visible. This should work for individual items,
|
|
685
|
+
* 2-up paged view and continuous (scrolls).
|
|
686
|
+
*
|
|
687
|
+
* The options are listed below (from IIIF docs)
|
|
688
|
+
*
|
|
689
|
+
* - `unordered` - Valid on Collections, Manifests and Ranges. The Canvases included in resources that have this behavior
|
|
690
|
+
* have no inherent order, and user interfaces should avoid implying an order to the user. Disjoint with individuals,
|
|
691
|
+
* continuous, and paged.
|
|
692
|
+
*
|
|
693
|
+
* - `individuals` - Valid on Collections, Manifests, and Ranges. For Collections that have this behavior, each of the
|
|
694
|
+
* included Manifests are distinct objects in the given order. For Manifests and Ranges, the included Canvases are
|
|
695
|
+
* distinct views, and should not be presented in a page-turning interface. This is the default layout behavior if
|
|
696
|
+
* not specified. Disjoint with unordered, continuous, and paged.
|
|
697
|
+
*
|
|
698
|
+
* - `continuous` Valid on Collections, Manifests and Ranges, which include Canvases that have at least height and
|
|
699
|
+
* width dimensions. Canvases included in resources that have this behavior are partial views and an appropriate
|
|
700
|
+
* rendering might display all of the Canvases virtually stitched together, such as a long scroll split into
|
|
701
|
+
* sections. This behavior has no implication for audio resources. The viewingDirection of the Manifest will
|
|
702
|
+
* determine the appropriate arrangement of the Canvases. Disjoint with unordered, individuals and paged.
|
|
703
|
+
*
|
|
704
|
+
* - `paged` Valid on Collections, Manifests and Ranges, which include Canvases that have at least height and width
|
|
705
|
+
* dimensions. Canvases included in resources that have this behavior represent views that should be presented in
|
|
706
|
+
* a page-turning interface if one is available. The first canvas is a single view (the first recto) and thus the
|
|
707
|
+
* second canvas likely represents the back of the object in the first canvas. If this is not the case, see the
|
|
708
|
+
* behavior value non-paged. Disjoint with unordered, individuals, continuous, facing-pages and non-paged.
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
declare function getVisibleCanvasesFromCanvasId(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, canvasId: string | null, preventPaged?: boolean): Reference<'Canvas'>[];
|
|
712
|
+
declare function getManifestSequence(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, { disablePaging, skipNonPaged }?: {
|
|
713
|
+
disablePaging?: boolean;
|
|
714
|
+
skipNonPaged?: boolean;
|
|
715
|
+
}): [Reference<'Canvas'>[], number[][]];
|
|
716
|
+
|
|
717
|
+
declare function findFirstCanvasFromRange(vault: Vault, range: RangeNormalized): null | Reference<'Canvas'>;
|
|
718
|
+
declare function findAllCanvasesInRange(vault: Vault, range: RangeNormalized): Array<Reference<'Canvas'>>;
|
|
719
|
+
declare function findManifestSelectedRange(vault: Vault, manifest: ManifestNormalized, canvasId: string): null | RangeNormalized;
|
|
720
|
+
declare function findSelectedRange(vault: Vault, range: RangeNormalized, canvasId: string): null | RangeNormalized;
|
|
721
|
+
|
|
722
|
+
export { AnnotationContext, AnnotationPageContext, Auth, type AuthAccessState, type AuthContextActions, type AuthContextCurrentActions, type AuthContextState, AuthProvider, AuthProvider_Old, AuthRContext, AuthReactContext, AuthReactContextActions, type AuthState, CanvasAnnotations, CanvasContext, CollectionContext, CombinedMetadata, ContextBridge, Image, type ImageProps, ImageServiceLoaderContext, type ImageServiceRequestOptions, InnerViewerProvider, LanguageProvider, LanguageString, LocaleString, ManifestContext, ManifestMetadata, type MediaPlayerActions, MediaPlayerProvider, type MediaPlayerState, Metadata, type MetadataProps, type ProbeStore, RangeContext, ReactVaultContext, RenderingStrategy, type ResourceContextType, ResourceProvider, ResourceReactContext, type ResourceRequestOptions, SequenceThumbnails, SimpleViewerContext, SimpleViewerProps, SimpleViewerProvider, SimpleViewerReactContext, SingleCanvasThumbnail, type VaultActivatedAnnotation, VaultProvider, ViewerPresetContext, VirtualAnnotationProvider, VisibleCanvasReactContext, authDetailsForResource, createAuthStateStore, createProbe, findAllCanvasesInRange, findFirstCanvasFromRange, findManifestSelectedRange, findSelectedRange, flattenAnnotationPageIds, formatTime, getManifestSequence, getVideoStrategy, getVisibleCanvasesFromCanvasId, hasAuth, makeAccessServiceRequest, makeAccessTokenRequest, useAnnotation, useAnnotationPage, useAnnotationPageManager, useAnnotationsAtTime, useAuthActions, useAuthActions_old, useAuthService, useAuthService_old, useAuthStore, useAuthToken, useAuthToken_old, useAuthTokens, useAuthTokens_old, useCanvas, useCanvasClock, useCanvasSequence, useCanvasSubset, useClosestLanguage, useCollection, useContextBridge, useCreateLocaleString, useCurrentAuth, useCurrentAuth_old, useDispatch, useEventListener, useExistingVault, useExternalCollection, useExternalManifest, useExternalResource, useIIIFLanguage, useImage, useImageService, useImageServiceLoader, useImageTile, useIsAuthEnabled, useLocaleString, useManifest, useMediaActions, useMediaElements, useMediaState, usePaintables, usePaintingAnnotations, useRange, useResourceContext, useResourceEvents, useResources, useSearchService, useSimpleMediaPlayer, useSimpleViewer, useStyleHelper, useStyles, useThumbnail, useVault, useVaultEffect, useVaultSelector, useViewerPreset, useVirtualAnnotationPage, useVirtualAnnotationPageContext, useVisibleCanvases };
|