react-iiif-vault 0.9.20 → 1.0.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 (66) hide show
  1. package/.build/types/canvas-panel/Viewer.d.ts +2 -1
  2. package/.build/types/canvas-panel/context/overlays.d.ts +3 -0
  3. package/.build/types/canvas-panel/context/world-size.d.ts +2 -0
  4. package/.build/types/canvas-panel/index.d.ts +35 -12
  5. package/.build/types/canvas-panel/render/AnnotationPage.d.ts +2 -1
  6. package/.build/types/canvas-panel/render/Audio.d.ts +6 -1
  7. package/.build/types/canvas-panel/render/Canvas.d.ts +10 -4
  8. package/.build/types/canvas-panel/render/DefaultCanvasFallback.d.ts +3 -2
  9. package/.build/types/canvas-panel/render/Image.d.ts +4 -1
  10. package/.build/types/canvas-panel/render/Model.d.ts +5 -1
  11. package/.build/types/canvas-panel/render/Video.d.ts +9 -3
  12. package/.build/types/canvas-panel/render/VideoYouTube.d.ts +12 -0
  13. package/.build/types/context/ContextBridge.d.ts +2 -2
  14. package/.build/types/context/VaultContext.d.ts +1 -1
  15. package/.build/types/context/VisibleCanvasContext.d.ts +1 -1
  16. package/.build/types/features/rendering-strategy/3d-strategy.d.ts +2 -3
  17. package/.build/types/features/rendering-strategy/audio-strategy.d.ts +2 -2
  18. package/.build/types/features/rendering-strategy/image-strategy.d.ts +2 -3
  19. package/.build/types/features/rendering-strategy/rendering-utils.d.ts +3 -16
  20. package/.build/types/features/rendering-strategy/resource-types.d.ts +13 -3
  21. package/.build/types/features/rendering-strategy/strategies.d.ts +3 -3
  22. package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +3 -4
  23. package/.build/types/features/rendering-strategy/video-strategy.d.ts +2 -2
  24. package/.build/types/future-helpers/ranges.d.ts +3 -2
  25. package/.build/types/future-helpers/sequences.d.ts +5 -3
  26. package/.build/types/hooks/useAnnotation.d.ts +1 -1
  27. package/.build/types/hooks/useAnnotationPage.d.ts +1 -1
  28. package/.build/types/hooks/useAnnotationsAtTime.d.ts +1 -1
  29. package/.build/types/hooks/useCanvas.d.ts +1 -1
  30. package/.build/types/hooks/useCanvasSubset.d.ts +1 -1
  31. package/.build/types/hooks/useCollection.d.ts +1 -1
  32. package/.build/types/hooks/useDispatch.d.ts +2 -2
  33. package/.build/types/hooks/useExternalCollection.d.ts +1 -1
  34. package/.build/types/hooks/useExternalManifest.d.ts +1 -1
  35. package/.build/types/hooks/useManifest.d.ts +1 -1
  36. package/.build/types/hooks/usePaintables.d.ts +1 -1
  37. package/.build/types/hooks/usePaintingAnnotations.d.ts +1 -1
  38. package/.build/types/hooks/useRange.d.ts +1 -1
  39. package/.build/types/hooks/useResourceEvents.d.ts +1 -1
  40. package/.build/types/hooks/useStyleHelper.d.ts +1 -1
  41. package/.build/types/hooks/useVault.d.ts +1 -1
  42. package/.build/types/hooks/useVaultEffect.d.ts +1 -1
  43. package/.build/types/hooks/useVaultSelector.d.ts +1 -1
  44. package/.build/types/hooks/useVirtualAnnotationPage.d.ts +3 -2
  45. package/.build/types/hooks/useVirtualAnnotationPageContext.d.ts +665 -3
  46. package/.build/types/index.d.ts +2 -3
  47. package/.build/types/utility/flatten-annotation-page-ids.d.ts +1 -1
  48. package/.build/types/utility/i18n-utils.d.ts +28 -0
  49. package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +4 -1
  50. package/dist/bundle/cjs/index.js +87 -5
  51. package/dist/bundle/cjs/index.js.map +1 -1
  52. package/dist/bundle/esm/index.mjs +5311 -2781
  53. package/dist/bundle/esm/index.mjs.map +1 -1
  54. package/dist/canvas-panel/cjs/canvas-panel.js +86 -5
  55. package/dist/canvas-panel/cjs/canvas-panel.js.map +1 -1
  56. package/dist/canvas-panel/esm/canvas-panel.mjs +5156 -2365
  57. package/dist/canvas-panel/esm/canvas-panel.mjs.map +1 -1
  58. package/dist/index.umd.js +287 -31
  59. package/dist/index.umd.js.map +1 -1
  60. package/dist/react17/cjs/index.js +87 -5
  61. package/dist/react17/cjs/index.js.map +1 -1
  62. package/dist/react17/esm/index.mjs +5311 -2786
  63. package/dist/react17/esm/index.mjs.map +1 -1
  64. package/package.json +21 -28
  65. package/.build/types/context/PortalContext.d.ts +0 -8
  66. package/.build/types/features/rendering-strategy/choice-types.d.ts +0 -15
@@ -5,7 +5,6 @@ export * from './context/CanvasContext';
5
5
  export * from './context/CollectionContext';
6
6
  export * from './context/ManifestContext';
7
7
  export * from './context/MediaContext';
8
- export * from './context/PortalContext';
9
8
  export * from './context/RangeContext';
10
9
  export * from './context/VaultContext';
11
10
  export * from './context/ResourceContext';
@@ -13,7 +12,6 @@ export * from './context/ContextBridge';
13
12
  export * from './context/VisibleCanvasContext';
14
13
  export * from './context/ViewerPresetContext';
15
14
  export * from './context/ImageServiceLoaderContext';
16
- export * from './features/rendering-strategy/choice-types';
17
15
  export * from './features/rendering-strategy/image-strategy';
18
16
  export * from './features/rendering-strategy/rendering-utils';
19
17
  export * from './features/rendering-strategy/resource-types';
@@ -52,8 +50,9 @@ export * from './hooks/useVaultSelector';
52
50
  export * from './hooks/useVirtualAnnotationPage';
53
51
  export * from './hooks/useVirtualAnnotationPageContext';
54
52
  export * from './hooks/useRenderingStrategy';
55
- export * from '@iiif/vault-helpers/annotation-targets';
53
+ export * from '@iiif/helpers/annotation-targets';
56
54
  export * from './utility/flatten-annotation-page-ids';
55
+ export * from './utility/i18n-utils';
57
56
  export * from './viewers/SimpleViewerContext';
58
57
  export * from './viewers/SimpleViewerContext.hooks';
59
58
  export * from './viewers/SimpleViewerContext.types';
@@ -1,4 +1,4 @@
1
- import { CanvasNormalized, ManifestNormalized } from '@iiif/presentation-3';
1
+ import { CanvasNormalized, ManifestNormalized } from '@iiif/presentation-3-normalized';
2
2
  export declare function flattenAnnotationPageIds({ canvas, manifest, all, canvases, }: {
3
3
  manifest?: ManifestNormalized;
4
4
  canvas?: CanvasNormalized;
@@ -0,0 +1,28 @@
1
+ import { InternationalString } from '@iiif/presentation-3';
2
+ import React, { ReactNode } from 'react';
3
+ export declare function LanguageProvider(props: {
4
+ language: string;
5
+ children: ReactNode;
6
+ }): JSX.Element;
7
+ export declare function useIIIFLanguage(): string;
8
+ declare type LanguageStringProps = {
9
+ [key: string]: any;
10
+ } & {
11
+ as?: string | React.FC<any>;
12
+ language: string;
13
+ viewingDirection?: 'rtl' | 'rtl';
14
+ };
15
+ export declare function LanguageString({ as: Component, language, children, viewingDirection, ...props }: LanguageStringProps): JSX.Element;
16
+ export declare const useClosestLanguage: (getLanguages: () => string[], deps?: any[]) => string | undefined;
17
+ export declare function useLocaleString(inputText: InternationalString | string | null | undefined, defaultText?: string): readonly [string, string | undefined];
18
+ export declare function useCreateLocaleString(): (inputText: InternationalString | string | null | undefined, defaultText?: string, separator?: string) => string;
19
+ export declare const LocaleString: React.FC<{
20
+ as?: string | React.FC<any>;
21
+ defaultText?: string;
22
+ to?: string;
23
+ enableDangerouslySetInnerHTML?: boolean;
24
+ children: InternationalString | string | null | undefined;
25
+ style?: React.CSSProperties;
26
+ extraProps?: any;
27
+ } & Record<string, any>>;
28
+ export {};
@@ -4,7 +4,10 @@ export declare function useCanvasSequence({ startCanvas, disablePaging }: {
4
4
  }): {
5
5
  visibleItems: string[];
6
6
  cursor: number;
7
- items: import("@iiif/presentation-3").Reference<"Canvas">[];
7
+ items: {
8
+ type: "Canvas";
9
+ id: string;
10
+ }[];
8
11
  sequence: number[][];
9
12
  setSequenceIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
10
13
  setCanvasIndex: (index: number) => void;