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
|
File without changes
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CollectionNormalized } from '@iiif/presentation-3-normalized';
|
|
2
|
-
export declare function useCollection(options: {
|
|
3
|
-
id: string;
|
|
4
|
-
}): CollectionNormalized | undefined;
|
|
5
|
-
export declare function useCollection<T>(options: {
|
|
6
|
-
id: string;
|
|
7
|
-
selector: (collection: CollectionNormalized) => T;
|
|
8
|
-
}, deps?: any[]): T | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useEnabledAnnotationPageIds(resourceId?: string, availablePageIds?: string[]): string[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CollectionNormalized } from '@iiif/presentation-3-normalized';
|
|
2
|
-
import { ResourceRequestOptions } from './useExternalResource';
|
|
3
|
-
export declare function useExternalCollection(idOrRef: string | {
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
}, options?: ResourceRequestOptions): {
|
|
7
|
-
id: string;
|
|
8
|
-
requestId: string;
|
|
9
|
-
isLoaded: boolean;
|
|
10
|
-
cached?: boolean;
|
|
11
|
-
error: any;
|
|
12
|
-
manifest?: CollectionNormalized;
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ManifestNormalized } from '@iiif/presentation-3-normalized';
|
|
2
|
-
import { ResourceRequestOptions } from './useExternalResource';
|
|
3
|
-
export declare function useExternalManifest(idOrRef: string | {
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
}, options?: ResourceRequestOptions): {
|
|
7
|
-
id: string;
|
|
8
|
-
requestId: string;
|
|
9
|
-
isLoaded: boolean;
|
|
10
|
-
cached?: boolean;
|
|
11
|
-
error: any;
|
|
12
|
-
manifest?: ManifestNormalized;
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type ResourceRequestOptions = {
|
|
2
|
-
noCache?: boolean;
|
|
3
|
-
};
|
|
4
|
-
export declare function useExternalResource<T extends {
|
|
5
|
-
id: string;
|
|
6
|
-
}>(idOrRef: string | {
|
|
7
|
-
id: string;
|
|
8
|
-
type: string;
|
|
9
|
-
}, { noCache }?: ResourceRequestOptions): {
|
|
10
|
-
id: string;
|
|
11
|
-
requestId: string;
|
|
12
|
-
isLoaded: boolean;
|
|
13
|
-
error: any;
|
|
14
|
-
cached: boolean;
|
|
15
|
-
resource?: T;
|
|
16
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
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,9 +0,0 @@
|
|
|
1
|
-
import { ImageService } from '@iiif/presentation-3';
|
|
2
|
-
export interface ImageServiceRequestOptions {
|
|
3
|
-
cacheKey?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function useImageService({ cacheKey }?: ImageServiceRequestOptions): {
|
|
6
|
-
data: ImageService | undefined;
|
|
7
|
-
isFetching: boolean;
|
|
8
|
-
status: 'error' | 'success' | 'loading' | 'idle';
|
|
9
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ImageService } from '@iiif/presentation-3';
|
|
2
|
-
export declare function useImageTile(): {
|
|
3
|
-
isLoading: boolean;
|
|
4
|
-
tile: {
|
|
5
|
-
id: string | undefined;
|
|
6
|
-
width: number | null | undefined;
|
|
7
|
-
height: number | null | undefined;
|
|
8
|
-
imageService: ImageService;
|
|
9
|
-
thumbnail: undefined;
|
|
10
|
-
} | null;
|
|
11
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ImageService } from '@iiif/presentation-3';
|
|
2
|
-
export type ImageServiceLoaderType = (imageService: any | undefined, { height, width }: {
|
|
3
|
-
height: number;
|
|
4
|
-
width: number;
|
|
5
|
-
}) => ImageService | undefined;
|
|
6
|
-
export declare function useLoadImageService(): readonly [ImageServiceLoaderType, Record<string, string>];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ManifestNormalized } from '@iiif/presentation-3-normalized';
|
|
2
|
-
export declare function useManifest(options?: {
|
|
3
|
-
id: string;
|
|
4
|
-
}): ManifestNormalized | undefined;
|
|
5
|
-
export declare function useManifest<T>(options?: {
|
|
6
|
-
id: string;
|
|
7
|
-
selector: (manifest: ManifestNormalized) => T;
|
|
8
|
-
}, deps?: any[]): T | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare function usePaintables(options?: {
|
|
2
|
-
defaultChoices?: string[];
|
|
3
|
-
enableSingleAnnotation?: boolean;
|
|
4
|
-
}, deps?: any[]): readonly [import("@iiif/helpers/painting-annotations").Paintables, {
|
|
5
|
-
makeChoice: (id: string, { deselectOthers, deselect }?: {
|
|
6
|
-
deselectOthers?: boolean | undefined;
|
|
7
|
-
deselect?: boolean | undefined;
|
|
8
|
-
}) => void;
|
|
9
|
-
}];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RangeNormalized } from '@iiif/presentation-3-normalized';
|
|
2
|
-
export declare function useRange(options?: {
|
|
3
|
-
id: string;
|
|
4
|
-
}): RangeNormalized | undefined;
|
|
5
|
-
export declare function useRange<T>(options?: {
|
|
6
|
-
id: string;
|
|
7
|
-
selector: (range: RangeNormalized) => T;
|
|
8
|
-
}, deps?: any[]): T | undefined;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RenderingStrategy } from '../features/rendering-strategy/strategies';
|
|
2
|
-
export type StrategyActions = {
|
|
3
|
-
makeChoice: (id: string, options?: {
|
|
4
|
-
deselectOthers?: boolean;
|
|
5
|
-
deselect?: boolean;
|
|
6
|
-
}) => void;
|
|
7
|
-
};
|
|
8
|
-
export type UseRenderingStrategy = [RenderingStrategy, StrategyActions];
|
|
9
|
-
export type UseRenderingStrategyOptions = {
|
|
10
|
-
strategies?: Array<RenderingStrategy['type']>;
|
|
11
|
-
annotationPageManagerId?: string;
|
|
12
|
-
enableSingleAnnotation?: boolean;
|
|
13
|
-
defaultChoices?: string[];
|
|
14
|
-
};
|
|
15
|
-
export declare function useRenderingStrategy(options?: UseRenderingStrategyOptions): UseRenderingStrategy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useResources<Type>(ids: string[], type: string): Type[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
export type MediaPlayerState = {
|
|
3
|
-
isPlaying: boolean;
|
|
4
|
-
isMuted: boolean;
|
|
5
|
-
playRequested: boolean;
|
|
6
|
-
volume: number;
|
|
7
|
-
isFinished: boolean;
|
|
8
|
-
duration: number;
|
|
9
|
-
};
|
|
10
|
-
export type MediaPlayerActions = {
|
|
11
|
-
play(): void;
|
|
12
|
-
pause(): void;
|
|
13
|
-
playPause(): void;
|
|
14
|
-
mute(): void;
|
|
15
|
-
unmute(): void;
|
|
16
|
-
toggleMute(): void;
|
|
17
|
-
setVolume(volume: number): void;
|
|
18
|
-
setDurationPercent(percent: number): void;
|
|
19
|
-
setTime(time: number): void;
|
|
20
|
-
};
|
|
21
|
-
export declare function formatTime(time: number): string;
|
|
22
|
-
export declare function useSimpleMediaPlayer(props: {
|
|
23
|
-
duration: number;
|
|
24
|
-
}): readonly [
|
|
25
|
-
{
|
|
26
|
-
element: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
27
|
-
currentTime: RefObject<HTMLDivElement>;
|
|
28
|
-
progress: RefObject<HTMLDivElement>;
|
|
29
|
-
},
|
|
30
|
-
MediaPlayerState,
|
|
31
|
-
MediaPlayerActions
|
|
32
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useStyleHelper(): import("@iiif/helpers/styles").StyledHelper<import("@iiif/helpers/styles").StyleDefinition>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { Reference } from '@iiif/presentation-3';
|
|
2
|
-
export declare function useStyles<Style extends Record<string, Record<string, any>>>(resource: undefined | Reference<any>): Style;
|
|
3
|
-
export declare function useStyles<Style extends Record<string, any>>(resource: undefined | Reference<any>, scope: string): Style;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ImageCandidate, ImageCandidateRequest } from '@atlas-viewer/iiif-image-api';
|
|
2
|
-
export declare function useThumbnail(request: ImageCandidateRequest, dereference?: boolean, { canvasId, manifestId }?: {
|
|
3
|
-
canvasId?: string;
|
|
4
|
-
manifestId?: string;
|
|
5
|
-
}): ImageCandidate | undefined;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Annotation } from '@iiif/presentation-3';
|
|
2
|
-
import { AnnotationNormalized, AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
|
|
3
|
-
import { Vault } from '@iiif/helpers/vault';
|
|
4
|
-
export interface VaultActivatedAnnotation {
|
|
5
|
-
__vault?: Vault;
|
|
6
|
-
bindToVault(vault: Vault): void;
|
|
7
|
-
source: string | {
|
|
8
|
-
id: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare function useVirtualAnnotationPage(): readonly [AnnotationPageNormalized | null, {
|
|
12
|
-
readonly addAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized, atIndex?: number) => void;
|
|
13
|
-
readonly removeAnnotation: (id: string | Annotation | VaultActivatedAnnotation | AnnotationNormalized) => void;
|
|
14
|
-
}];
|