react-iiif-vault 1.0.10 → 1.1.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.
Files changed (134) hide show
  1. package/dist/bundle.d.ts +1058 -0
  2. package/dist/bundle.global.js +227 -0
  3. package/dist/canvas-panel.cjs +46 -0
  4. package/dist/canvas-panel.d.cts +11 -0
  5. package/dist/canvas-panel.d.ts +11 -0
  6. package/dist/canvas-panel.js +1 -0
  7. package/dist/chunk-HEVA2EDS.js +47 -0
  8. package/dist/chunk-YSH2CIKG.js +1 -0
  9. package/dist/index-BZirmhnp.d.cts +188 -0
  10. package/dist/index-Cxs6aAuK.d.ts +188 -0
  11. package/dist/index.cjs +47 -0
  12. package/dist/index.d.cts +721 -0
  13. package/dist/index.d.ts +721 -0
  14. package/dist/index.js +1 -0
  15. package/dist/useRenderingStrategy-Xj9yQm4y.d.cts +145 -0
  16. package/dist/useRenderingStrategy-Xj9yQm4y.d.ts +145 -0
  17. package/dist/utils.cjs +1 -0
  18. package/dist/utils.d.cts +32 -0
  19. package/dist/utils.d.ts +32 -0
  20. package/dist/utils.js +1 -0
  21. package/package.json +67 -70
  22. package/.build/types/canvas-panel/Viewer.d.ts +0 -14
  23. package/.build/types/canvas-panel/context/overlays.d.ts +0 -3
  24. package/.build/types/canvas-panel/context/world-size.d.ts +0 -2
  25. package/.build/types/canvas-panel/index.d.ts +0 -46
  26. package/.build/types/canvas-panel/render/Annotation.d.ts +0 -8
  27. package/.build/types/canvas-panel/render/AnnotationPage.d.ts +0 -7
  28. package/.build/types/canvas-panel/render/Audio.d.ts +0 -11
  29. package/.build/types/canvas-panel/render/Canvas.d.ts +0 -34
  30. package/.build/types/canvas-panel/render/CanvasBackground.d.ts +0 -4
  31. package/.build/types/canvas-panel/render/DefaultCanvasFallback.d.ts +0 -6
  32. package/.build/types/canvas-panel/render/Image.d.ts +0 -16
  33. package/.build/types/canvas-panel/render/Model.d.ts +0 -7
  34. package/.build/types/canvas-panel/render/Video.d.ts +0 -12
  35. package/.build/types/canvas-panel/render/VideoYouTube.d.ts +0 -12
  36. package/.build/types/components/CanvasAnnotations.d.ts +0 -10
  37. package/.build/types/components/CombinedMetadata.d.ts +0 -4
  38. package/.build/types/components/Image.d.ts +0 -15
  39. package/.build/types/components/ManifestMetadata.d.ts +0 -4
  40. package/.build/types/components/Metadata.d.ts +0 -39
  41. package/.build/types/components/SequenceThumbnails.d.ts +0 -29
  42. package/.build/types/components/SingleCanvasThumbnail.d.ts +0 -20
  43. package/.build/types/context/AnnotationContext.d.ts +0 -5
  44. package/.build/types/context/AnnotationPageContext.d.ts +0 -5
  45. package/.build/types/context/CanvasContext.d.ts +0 -5
  46. package/.build/types/context/CollectionContext.d.ts +0 -5
  47. package/.build/types/context/ContextBridge.d.ts +0 -14
  48. package/.build/types/context/ImageServiceLoaderContext.d.ts +0 -4
  49. package/.build/types/context/ManifestContext.d.ts +0 -5
  50. package/.build/types/context/MediaContext.d.ts +0 -17
  51. package/.build/types/context/RangeContext.d.ts +0 -5
  52. package/.build/types/context/ResourceContext.d.ts +0 -15
  53. package/.build/types/context/VaultContext.d.ts +0 -14
  54. package/.build/types/context/ViewerPresetContext.d.ts +0 -3
  55. package/.build/types/context/VisibleCanvasContext.d.ts +0 -4
  56. package/.build/types/demo/demo.d.ts +0 -1
  57. package/.build/types/demo/media-controls.d.ts +0 -1
  58. package/.build/types/demo/viewer-controls.d.ts +0 -1
  59. package/.build/types/features/rendering-strategy/3d-strategy.d.ts +0 -12
  60. package/.build/types/features/rendering-strategy/audio-strategy.d.ts +0 -3
  61. package/.build/types/features/rendering-strategy/get-rendering-strategy.d.ts +0 -11
  62. package/.build/types/features/rendering-strategy/image-strategy.d.ts +0 -12
  63. package/.build/types/features/rendering-strategy/rendering-utils.d.ts +0 -12
  64. package/.build/types/features/rendering-strategy/resource-types.d.ts +0 -55
  65. package/.build/types/features/rendering-strategy/strategies.d.ts +0 -31
  66. package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +0 -16
  67. package/.build/types/features/rendering-strategy/video-strategy.d.ts +0 -3
  68. package/.build/types/future-helpers/ranges.d.ts +0 -7
  69. package/.build/types/future-helpers/sequences.d.ts +0 -8
  70. package/.build/types/hooks/useAnnotation.d.ts +0 -8
  71. package/.build/types/hooks/useAnnotationPage.d.ts +0 -8
  72. package/.build/types/hooks/useAnnotationPageManager.d.ts +0 -10
  73. package/.build/types/hooks/useAnnotationsAtTime.d.ts +0 -4
  74. package/.build/types/hooks/useCanvas.d.ts +0 -8
  75. package/.build/types/hooks/useCanvasClock.d.ts +0 -1
  76. package/.build/types/hooks/useCanvasSelector.d.ts +0 -0
  77. package/.build/types/hooks/useCanvasSubset.d.ts +0 -2
  78. package/.build/types/hooks/useCanvasTimeline.d.ts +0 -0
  79. package/.build/types/hooks/useCollection.d.ts +0 -8
  80. package/.build/types/hooks/useDispatch.d.ts +0 -2
  81. package/.build/types/hooks/useEnabledAnnotationPageIds.d.ts +0 -1
  82. package/.build/types/hooks/useEventListener.d.ts +0 -4
  83. package/.build/types/hooks/useExistingVault.d.ts +0 -2
  84. package/.build/types/hooks/useExternalCollection.d.ts +0 -13
  85. package/.build/types/hooks/useExternalManifest.d.ts +0 -13
  86. package/.build/types/hooks/useExternalResource.d.ts +0 -16
  87. package/.build/types/hooks/useImage.d.ts +0 -10
  88. package/.build/types/hooks/useImageService.d.ts +0 -9
  89. package/.build/types/hooks/useImageTile.d.ts +0 -11
  90. package/.build/types/hooks/useLoadImageService.d.ts +0 -6
  91. package/.build/types/hooks/useManifest.d.ts +0 -8
  92. package/.build/types/hooks/usePaintables.d.ts +0 -9
  93. package/.build/types/hooks/usePaintingAnnotations.d.ts +0 -5
  94. package/.build/types/hooks/useRange.d.ts +0 -8
  95. package/.build/types/hooks/useRenderingStrategy.d.ts +0 -15
  96. package/.build/types/hooks/useResourceEvents.d.ts +0 -3
  97. package/.build/types/hooks/useResources.d.ts +0 -1
  98. package/.build/types/hooks/useSearchService.d.ts +0 -2
  99. package/.build/types/hooks/useSimpleMediaPlayer.d.ts +0 -32
  100. package/.build/types/hooks/useStyleHelper.d.ts +0 -1
  101. package/.build/types/hooks/useStyles.d.ts +0 -3
  102. package/.build/types/hooks/useThumbnail.d.ts +0 -5
  103. package/.build/types/hooks/useVault.d.ts +0 -2
  104. package/.build/types/hooks/useVaultEffect.d.ts +0 -2
  105. package/.build/types/hooks/useVaultSelector.d.ts +0 -2
  106. package/.build/types/hooks/useVirtualAnnotationPage.d.ts +0 -14
  107. package/.build/types/hooks/useVirtualAnnotationPageContext.d.ts +0 -671
  108. package/.build/types/hooks/useVirtualCanvas.d.ts +0 -0
  109. package/.build/types/index.d.ts +0 -72
  110. package/.build/types/utility/flatten-annotation-page-ids.d.ts +0 -7
  111. package/.build/types/utility/i18n-utils.d.ts +0 -30
  112. package/.build/types/utils.d.ts +0 -2
  113. package/.build/types/viewers/SimpleViewerContext.d.ts +0 -6
  114. package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +0 -19
  115. package/.build/types/viewers/SimpleViewerContext.types.d.ts +0 -46
  116. package/.build/types/viewers/SingleCanvasContext.d.ts +0 -1
  117. package/dist/bundle/cjs/index.js +0 -49
  118. package/dist/bundle/cjs/index.js.map +0 -1
  119. package/dist/bundle/esm/index.mjs +0 -3314
  120. package/dist/bundle/esm/index.mjs.map +0 -1
  121. package/dist/canvas-panel/cjs/canvas-panel.js +0 -47
  122. package/dist/canvas-panel/cjs/canvas-panel.js.map +0 -1
  123. package/dist/canvas-panel/esm/canvas-panel.mjs +0 -1853
  124. package/dist/canvas-panel/esm/canvas-panel.mjs.map +0 -1
  125. package/dist/index.umd.js +0 -393
  126. package/dist/index.umd.js.map +0 -1
  127. package/dist/react17/cjs/index.js +0 -49
  128. package/dist/react17/cjs/index.js.map +0 -1
  129. package/dist/react17/esm/index.mjs +0 -3314
  130. package/dist/react17/esm/index.mjs.map +0 -1
  131. package/dist/utils/cjs/utils.js +0 -2
  132. package/dist/utils/cjs/utils.js.map +0 -1
  133. package/dist/utils/esm/utils.mjs +0 -238
  134. package/dist/utils/esm/utils.mjs.map +0 -1
@@ -1,7 +0,0 @@
1
- import { AnnotationPage } from '@iiif/presentation-3';
2
- import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
3
- import { FC } from 'react';
4
- export declare const RenderAnnotationPage: FC<{
5
- page: AnnotationPage | AnnotationPageNormalized;
6
- className?: string;
7
- }>;
@@ -1,11 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { SingleAudio } from '../../features/rendering-strategy/resource-types';
3
- export declare function AudioHTML({ media, children }: {
4
- media: SingleAudio;
5
- children: ReactNode;
6
- }): import("react/jsx-dev-runtime").JSX.Element;
7
- export declare function Audio({ media, mediaControlsDeps, children, }: {
8
- media: SingleAudio;
9
- mediaControlsDeps?: any[];
10
- children: ReactNode;
11
- }): null;
@@ -1,34 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { BoxStyle } from '@atlas-viewer/atlas';
3
- import { StrategyActions } from '../../hooks/useRenderingStrategy';
4
- import { EmptyStrategy, MediaStrategy, RenderingStrategy } from '../../features/rendering-strategy/strategies';
5
- import { SingleImageStrategy } from '../../features/rendering-strategy/image-strategy';
6
- import { ImageWithOptionalService } from '../../features/rendering-strategy/resource-types';
7
- import { ChoiceDescription } from '@iiif/helpers';
8
- export type CanvasProps = {
9
- x?: number;
10
- y?: number;
11
- onCreated?: any;
12
- onChoiceChange?: (choice?: ChoiceDescription) => void;
13
- registerActions?: (actions: StrategyActions) => void;
14
- defaultChoices?: Array<{
15
- id: string;
16
- opacity?: number;
17
- }>;
18
- isStatic?: boolean;
19
- keepCanvasScale?: boolean;
20
- children?: ReactNode;
21
- renderViewerControls?: (strategy: SingleImageStrategy | EmptyStrategy) => ReactNode;
22
- viewControlsDeps?: any[];
23
- renderMediaControls?: (strategy: MediaStrategy) => ReactNode;
24
- mediaControlsDeps?: any[];
25
- strategies?: Array<RenderingStrategy['type']>;
26
- backgroundStyle?: BoxStyle;
27
- alwaysShowBackground?: boolean;
28
- enableSizes?: boolean;
29
- enableYouTube?: boolean;
30
- ignoreSize?: boolean;
31
- throwOnUnknown?: boolean;
32
- onClickPaintingAnnotation?: (id: string, image: ImageWithOptionalService, e: any) => void;
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): import("react/jsx-dev-runtime").JSX.Element | null;
@@ -1,4 +0,0 @@
1
- import { BoxStyle } from '@atlas-viewer/atlas';
2
- export declare function CanvasBackground({ style }: {
3
- style?: BoxStyle;
4
- }): import("react/jsx-dev-runtime").JSX.Element | null;
@@ -1,6 +0,0 @@
1
- import { FallbackProps } from 'react-error-boundary';
2
- export declare function DefaultCanvasFallback({ width, style, height, error, resetErrorBoundary, }: {
3
- width?: number;
4
- height?: number;
5
- style?: any;
6
- } & FallbackProps): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import { ImageCandidate } from '@atlas-viewer/iiif-image-api';
2
- import { ReactNode } from 'react';
3
- import { ImageWithOptionalService } from '../../features/rendering-strategy/resource-types';
4
- import { BoxSelector } from '@iiif/helpers';
5
- export declare function RenderImage({ id, image, thumbnail, isStatic, x, y, children, selector, onClick, enableSizes, }: {
6
- id: string;
7
- image: ImageWithOptionalService;
8
- thumbnail?: ImageCandidate;
9
- isStatic?: boolean;
10
- enableSizes?: boolean;
11
- selector?: BoxSelector;
12
- x?: number;
13
- y?: number;
14
- children?: ReactNode;
15
- onClick?: (e: any) => void;
16
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export declare function ModelHTML({ model }: {
2
- model: any;
3
- }): import("react/jsx-dev-runtime").JSX.Element;
4
- export declare function Model({ model, name }: {
5
- model: any;
6
- name?: string;
7
- }): null;
@@ -1,12 +0,0 @@
1
- import { ReactNode, RefObject } from 'react';
2
- import { SingleVideo } from '../../features/rendering-strategy/resource-types';
3
- export declare function VideoHTML({ element, media, playPause, }: {
4
- element: RefObject<any>;
5
- media: SingleVideo;
6
- playPause: () => void;
7
- }): import("react/jsx-dev-runtime").JSX.Element;
8
- export declare function Video({ media, mediaControlsDeps, children, }: {
9
- media: SingleVideo;
10
- mediaControlsDeps?: any[];
11
- children: ReactNode;
12
- }): null;
@@ -1,12 +0,0 @@
1
- import { SingleYouTubeVideo } from '../../features/rendering-strategy/resource-types';
2
- import { ReactNode, RefObject } from 'react';
3
- export declare function VideoYouTubeHTML({ element, media, playPause, }: {
4
- element: RefObject<any>;
5
- media: SingleYouTubeVideo;
6
- playPause: () => void;
7
- }): import("react/jsx-dev-runtime").JSX.Element | null;
8
- export declare function VideoYouTube({ media, mediaControlsDeps, children, }: {
9
- media: SingleYouTubeVideo;
10
- mediaControlsDeps?: any[];
11
- children: ReactNode;
12
- }): null;
@@ -1,10 +0,0 @@
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
- }>>;
@@ -1,4 +0,0 @@
1
- import { MetadataProps } from './Metadata';
2
- type CombinedMetadataProps = Omit<MetadataProps, 'metadata'>;
3
- export declare function CombinedMetadata(props: CombinedMetadataProps): import("react/jsx-dev-runtime").JSX.Element;
4
- export {};
@@ -1,15 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- import { MetadataProps } from './Metadata';
2
- type ManifestMetadataProps = Omit<MetadataProps, 'metadata'>;
3
- export declare function ManifestMetadata(props: ManifestMetadataProps): import("react/jsx-dev-runtime").JSX.Element;
4
- export {};
@@ -1,39 +0,0 @@
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 {};
@@ -1,29 +0,0 @@
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 {};
@@ -1,20 +0,0 @@
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 {};
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function AnnotationContext({ annotation, children }: {
3
- annotation: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function AnnotationPageContext({ annotationPage, children }: {
3
- annotationPage: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function CanvasContext({ canvas, children }: {
3
- canvas: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function CollectionContext({ collection, children }: {
3
- collection: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function useContextBridge(): {
3
- VaultContext: {
4
- vault: import("@iiif/helpers/vault").Vault | null;
5
- setVaultInstance: (vault: import("@iiif/helpers/vault").Vault) => void;
6
- };
7
- ResourceContext: import("./ResourceContext").ResourceContextType;
8
- SimpleViewerReactContext: import("..").SimpleViewerContext;
9
- VisibleCanvasReactContext: string[];
10
- };
11
- export declare function ContextBridge(props: {
12
- bridge: ReturnType<typeof useContextBridge>;
13
- children: ReactNode;
14
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { ImageServiceLoader } from '@atlas-viewer/iiif-image-api';
3
- export declare const ImageServiceLoaderContext: React.Context<ImageServiceLoader>;
4
- export declare function useImageServiceLoader(): ImageServiceLoader;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function ManifestContext({ manifest, children }: {
3
- manifest: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,17 +0,0 @@
1
- import { ReactNode, RefObject } from 'react';
2
- import { MediaPlayerActions, MediaPlayerState } from '../hooks/useSimpleMediaPlayer';
3
- export declare function useMediaState(): MediaPlayerState;
4
- export declare function useMediaActions(): MediaPlayerActions;
5
- export declare function useMediaElements(): {
6
- element: RefObject<HTMLAudioElement | HTMLVideoElement>;
7
- currentTime: RefObject<HTMLDivElement>;
8
- progress: RefObject<HTMLDivElement>;
9
- };
10
- export declare function MediaPlayerProvider({ actions, state, children, currentTime, progress, element, }: {
11
- actions: MediaPlayerActions;
12
- state: MediaPlayerState;
13
- children: ReactNode;
14
- currentTime: RefObject<HTMLDivElement>;
15
- progress: RefObject<HTMLDivElement>;
16
- element: RefObject<HTMLAudioElement | HTMLVideoElement>;
17
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare function RangeContext({ range, children }: {
3
- range: string;
4
- children: ReactNode;
5
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- export type ResourceContextType = {
3
- collection?: string;
4
- manifest?: string;
5
- range?: string;
6
- canvas?: string;
7
- annotation?: string;
8
- annotationPage?: string;
9
- };
10
- export declare const ResourceReactContext: React.Context<ResourceContextType>;
11
- export declare const useResourceContext: () => ResourceContextType;
12
- export declare function ResourceProvider({ value, children }: {
13
- value: ResourceContextType;
14
- children: ReactNode;
15
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { Vault, VaultOptions } from '@iiif/helpers/vault';
3
- import { ResourceContextType } from './ResourceContext';
4
- export declare const ReactVaultContext: React.Context<{
5
- vault: Vault | null;
6
- setVaultInstance: (vault: Vault) => void;
7
- }>;
8
- export declare function VaultProvider({ vault, vaultOptions, useGlobal, resources, children, }: {
9
- vault?: Vault;
10
- useGlobal?: boolean;
11
- vaultOptions?: VaultOptions;
12
- resources?: ResourceContextType;
13
- children: ReactNode;
14
- }): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { Preset } from '@atlas-viewer/atlas';
2
- export declare const ViewerPresetContext: import("react").Context<Preset | null | undefined>;
3
- export declare function useViewerPreset(): Preset | null | undefined;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
3
- export declare const VisibleCanvasReactContext: React.Context<string[]>;
4
- export declare function useVisibleCanvases(): CanvasNormalized[];
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare function MediaControls(): import("react/jsx-dev-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function ViewerControls(): import("react/jsx-dev-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- import { AnnotationPageDescription } from './resource-types';
3
- import { ExternalWebResource } from '@iiif/presentation-3';
4
- import { RenderingStrategy } from './strategies';
5
- import { ChoiceDescription, Paintables } from '@iiif/helpers';
6
- export type Single3DModelStrategy = {
7
- type: '3d-model';
8
- model: ExternalWebResource;
9
- choice?: ChoiceDescription;
10
- annotations?: AnnotationPageDescription;
11
- };
12
- export declare function get3dStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
@@ -1,3 +0,0 @@
1
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- import { Paintables } from '@iiif/helpers';
3
- export declare function getAudioStrategy(canvas: CanvasNormalized, paintables: Paintables): import("./strategies").RenderingStrategy;
@@ -1,11 +0,0 @@
1
- import type { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- import type { Paintables } from '@iiif/helpers/painting-annotations';
3
- import type { ImageServiceLoaderType } from '../../hooks/useLoadImageService';
4
- interface GetRenderStrategyOptions {
5
- canvas: CanvasNormalized | null | undefined;
6
- paintables: Paintables;
7
- supports: string[];
8
- loadImageService: ImageServiceLoaderType;
9
- }
10
- export declare function getRenderingStrategy({ canvas, paintables, supports, loadImageService }: GetRenderStrategyOptions): import("./strategies").RenderingStrategy;
11
- export {};
@@ -1,12 +0,0 @@
1
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- import { ImageServiceLoaderType } from '../../hooks/useLoadImageService';
3
- import { AnnotationPageDescription, ImageWithOptionalService } from './resource-types';
4
- import { ChoiceDescription, Paintables } from '@iiif/helpers';
5
- export type SingleImageStrategy = {
6
- type: 'images';
7
- image: ImageWithOptionalService;
8
- images: Array<ImageWithOptionalService>;
9
- choice?: ChoiceDescription;
10
- annotations?: AnnotationPageDescription;
11
- };
12
- export declare function getImageStrategy(canvas: CanvasNormalized, paintables: Paintables, loadImageService: ImageServiceLoaderType): import("./strategies").RenderingStrategy;
@@ -1,12 +0,0 @@
1
- import { ContentResource, PointSelector, W3CAnnotationTarget } from '@iiif/presentation-3';
2
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
3
- import { UseRenderingStrategy } from '../../hooks/useRenderingStrategy';
4
- import { BoxSelector, SupportedTarget, TemporalBoxSelector } from '@iiif/helpers';
5
- export declare function parseSpecificResource(resource: ContentResource): any[];
6
- export declare function getParsedTargetSelector(canvas: CanvasNormalized, target: W3CAnnotationTarget | W3CAnnotationTarget[]): [TemporalBoxSelector | BoxSelector | PointSelector | null, SupportedTarget['source']];
7
- export declare const emptyActions: {
8
- makeChoice: () => void;
9
- };
10
- export declare const unknownResponse: UseRenderingStrategy[0];
11
- export declare const unsupportedStrategy: (reason: string) => UseRenderingStrategy[0];
12
- export declare const emptyStrategy: (width: number, height: number) => UseRenderingStrategy[0];
@@ -1,55 +0,0 @@
1
- import { ImageService } from '@iiif/presentation-3';
2
- import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
3
- import { BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/helpers/annotation-targets';
4
- export type ImageWithOptionalService = {
5
- id: string;
6
- annotationId: string;
7
- type: 'Image';
8
- service?: ImageService;
9
- width?: number;
10
- height?: number;
11
- sizes?: Array<{
12
- width: number;
13
- height: number;
14
- }>;
15
- target: BoxSelector | TemporalBoxSelector;
16
- selector?: BoxSelector;
17
- };
18
- export type SingleAudio = {
19
- type: 'Sound';
20
- annotationId: string;
21
- url: string;
22
- format: string;
23
- duration: number;
24
- target: TemporalSelector;
25
- selector: TemporalSelector;
26
- };
27
- export type SingleYouTubeVideo = {
28
- type: 'VideoYouTube';
29
- annotationId: string;
30
- url: string;
31
- youTubeId: string;
32
- duration: number;
33
- target: TemporalSelector | TemporalBoxSelector;
34
- selector: TemporalSelector | TemporalBoxSelector;
35
- };
36
- export type SingleVideo = {
37
- type: 'Video';
38
- annotationId: string;
39
- url: string;
40
- format: string;
41
- duration: number;
42
- target: TemporalSelector | TemporalBoxSelector;
43
- selector: TemporalSelector | TemporalBoxSelector;
44
- };
45
- export type AudioSequence = {
46
- type: 'SoundSequence';
47
- items: SingleAudio[];
48
- };
49
- export type VideoSequence = {
50
- type: 'VideoSequence';
51
- items: SingleVideo[];
52
- };
53
- export type AnnotationPageDescription = {
54
- pages: AnnotationPageNormalized[];
55
- };
@@ -1,31 +0,0 @@
1
- import { ChoiceDescription } from '@iiif/helpers';
2
- import { AnnotationPageDescription, AudioSequence, ImageWithOptionalService, SingleAudio, SingleVideo, SingleYouTubeVideo, VideoSequence } from './resource-types';
3
- import { SingleImageStrategy } from './image-strategy';
4
- import { Single3DModelStrategy } from './3d-strategy';
5
- import { TextualContentStrategy } from './textual-content-strategy';
6
- export type MediaStrategy = {
7
- type: 'media';
8
- media: SingleAudio | SingleVideo | AudioSequence | VideoSequence | SingleYouTubeVideo;
9
- choice?: ChoiceDescription;
10
- annotations?: AnnotationPageDescription;
11
- };
12
- export type ComplexTimelineStrategy = {
13
- type: 'complex-timeline';
14
- items: Array<ImageWithOptionalService | SingleAudio | SingleVideo>;
15
- choice?: ChoiceDescription;
16
- annotations?: AnnotationPageDescription;
17
- };
18
- export type EmptyStrategy = {
19
- type: 'empty';
20
- image: null;
21
- images: [];
22
- height: number;
23
- width: number;
24
- annotations?: AnnotationPageDescription;
25
- };
26
- export type UnknownStrategy = {
27
- type: 'unknown';
28
- reason?: string;
29
- annotations?: AnnotationPageDescription;
30
- };
31
- export type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | TextualContentStrategy | UnknownStrategy | EmptyStrategy;
@@ -1,16 +0,0 @@
1
- import { InternationalString } from '@iiif/presentation-3';
2
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
3
- import { AnnotationPageDescription } from './resource-types';
4
- import { RenderingStrategy } from './strategies';
5
- import { ChoiceDescription, Paintables, SupportedTarget } from '@iiif/helpers';
6
- export type TextualContentStrategy = {
7
- type: 'textual-content';
8
- items: {
9
- annotationId: string;
10
- text: InternationalString;
11
- target: SupportedTarget | null;
12
- }[];
13
- choice?: ChoiceDescription;
14
- annotations?: AnnotationPageDescription;
15
- };
16
- export declare function getTextualContentStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
@@ -1,3 +0,0 @@
1
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- import { Paintables } from '@iiif/helpers';
3
- export declare function getVideoStrategy(canvas: CanvasNormalized, paintables: Paintables): import("./strategies").RenderingStrategy;
@@ -1,7 +0,0 @@
1
- import { Vault } from '@iiif/helpers/vault';
2
- import { ManifestNormalized, RangeNormalized } from '@iiif/presentation-3-normalized';
3
- import { Reference } from '@iiif/presentation-3';
4
- export declare function findFirstCanvasFromRange(vault: Vault, range: RangeNormalized): null | Reference<'Canvas'>;
5
- export declare function findAllCanvasesInRange(vault: Vault, range: RangeNormalized): Array<Reference<'Canvas'>>;
6
- export declare function findManifestSelectedRange(vault: Vault, manifest: ManifestNormalized, canvasId: string): null | RangeNormalized;
7
- export declare function findSelectedRange(vault: Vault, range: RangeNormalized, canvasId: string): null | RangeNormalized;
@@ -1,8 +0,0 @@
1
- import { ManifestNormalized, RangeNormalized } from '@iiif/presentation-3-normalized';
2
- import { Reference } from '@iiif/presentation-3';
3
- import { Vault } from '@iiif/helpers/vault';
4
- export declare function getVisibleCanvasesFromCanvasId(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, canvasId: string | null, preventPaged?: boolean): Reference<'Canvas'>[];
5
- export declare function getManifestSequence(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, { disablePaging, skipNonPaged }?: {
6
- disablePaging?: boolean;
7
- skipNonPaged?: boolean;
8
- }): [Reference<'Canvas'>[], number[][]];
@@ -1,8 +0,0 @@
1
- import { AnnotationNormalized } from '@iiif/presentation-3-normalized';
2
- export declare function useAnnotation(options?: {
3
- id: string;
4
- }): AnnotationNormalized | undefined;
5
- export declare function useAnnotation<T>(options?: {
6
- id: string;
7
- selector: (annotation: AnnotationNormalized) => T;
8
- }, deps?: any[]): T | undefined;
@@ -1,8 +0,0 @@
1
- import { AnnotationPageNormalized } from '@iiif/presentation-3-normalized';
2
- export declare function useAnnotationPage(options?: {
3
- id: string;
4
- }): AnnotationPageNormalized | undefined;
5
- export declare function useAnnotationPage<T>(options?: {
6
- id: string;
7
- selector: (annotation: AnnotationPageNormalized) => T;
8
- }, deps?: any[]): T | undefined;
@@ -1,10 +0,0 @@
1
- export declare function useAnnotationPageManager(resourceId?: string, options?: {
2
- all?: boolean;
3
- }): {
4
- availablePageIds: string[];
5
- enabledPageIds: string[];
6
- setPageEnabled: (id: string, opt?: {
7
- deselectOthers?: boolean;
8
- }) => void;
9
- setPageDisabled: (deselectId: string) => void;
10
- };
@@ -1,4 +0,0 @@
1
- import { AnnotationNormalized } from '@iiif/presentation-3-normalized';
2
- export declare function useAnnotationsAtTime(time: number, options?: {
3
- canvasId?: string;
4
- }): AnnotationNormalized[];
@@ -1,8 +0,0 @@
1
- import { CanvasNormalized } from '@iiif/presentation-3-normalized';
2
- export declare function useCanvas(options?: {
3
- id: string;
4
- }): CanvasNormalized | undefined;
5
- export declare function useCanvas<T>(options?: {
6
- id: string;
7
- selector: (canvas: CanvasNormalized) => T;
8
- }, deps?: any[]): T | undefined;
@@ -1 +0,0 @@
1
- export declare function useCanvasClock(canvasId?: string, autoplay?: boolean): void;
File without changes