react-iiif-vault 0.9.21 → 1.0.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.
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 +37 -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 +3 -2
  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 +5319 -2795
  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 +5178 -2378
  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 +5319 -2800
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-iiif-vault",
3
- "version": "0.9.21",
3
+ "version": "1.0.1",
4
4
  "main": "dist/bundle/cjs/index.js",
5
5
  "module": "dist/bundle/esm/index.mjs",
6
6
  "types": ".build/types/index.d.ts",
@@ -15,15 +15,18 @@
15
15
  ".": {
16
16
  "require": "./dist/bundle/cjs/index.js",
17
17
  "import": "./dist/bundle/esm/index.mjs",
18
- "default": "./dist/index.umd.js"
18
+ "default": "./dist/index.umd.js",
19
+ "types": "./dist/types/index.d.ts"
19
20
  },
20
21
  "./canvas-panel": {
21
22
  "require": "./dist/canvas-panel/cjs/canvas-panel.js",
22
- "import": "./dist/canvas-panel/esm/canvas-panel.mjs"
23
+ "import": "./dist/canvas-panel/esm/canvas-panel.mjs",
24
+ "types": "./dist/types/canvas-panel/index.d.ts"
23
25
  },
24
26
  "./react17": {
25
27
  "require": "./dist/react17/cjs/index.js",
26
- "import": "./dist/react17/esm/index.mjs"
28
+ "import": "./dist/react17/esm/index.mjs",
29
+ "types": "./dist/types/index.d.ts"
27
30
  }
28
31
  },
29
32
  "typesVersions": {
@@ -40,47 +43,37 @@
40
43
  "start": "vite",
41
44
  "build": "tsc -p ./tsconfig.types.json --declaration --emitDeclarationOnly && node vite/build.mjs",
42
45
  "prepublishOnly": "tsc -p ./tsconfig.types.json --declaration --emitDeclarationOnly && node vite/build.mjs",
43
- "test": "vitest",
44
- "upgrade-deps": "yarn upgrade @atlas-viewer/iiif-image-api @iiif/parser @iiif/presentation-2 @iiif/presentation-3 @iiif/vault @iiif/vault-helpers"
46
+ "test": "vitest"
45
47
  },
46
48
  "license": "MIT",
47
- "resolutions": {
48
- "@atlas-viewer/atlas": "^2.0.0-alpha.19",
49
- "@atlas-viewer/iiif-image-api": "^2.0.5",
50
- "@iiif/vault": "^0.9.19",
51
- "@iiif/parser": "^1.0.13",
52
- "@iiif/presentation-3": "^1.1.2"
53
- },
54
49
  "dependencies": {
55
- "@atlas-viewer/atlas": "^2.0.0-alpha.19",
56
- "@atlas-viewer/iiif-image-api": "2.*",
57
- "@iiif/parser": ">=v1.0.13",
50
+ "@atlas-viewer/atlas": "^2.0.1",
51
+ "@atlas-viewer/iiif-image-api": "^2.1.1",
52
+ "@iiif/parser": "^2.0.1",
58
53
  "@iiif/presentation-2": "1.*",
59
- "@iiif/presentation-3": "^1.1.2",
60
- "@iiif/vault": ">=0.9.19",
61
- "@iiif/vault-helpers": ">=0.9.7",
54
+ "@iiif/presentation-3": "^2.1.3",
55
+ "@iiif/presentation-3-normalized": "^0.9.7",
56
+ "@iiif/helpers": "^1.0.3",
62
57
  "react": "^16.10.2 || ^17.0.2 || ^18.2.0",
63
58
  "react-dom": "^16.10.2 || ^17.0.2 || ^18.2.0",
64
59
  "react-error-boundary": "^3.1.4",
65
- "redux": "^4.2.0",
66
- "typescript": "^4.7.4",
67
- "use-sync-external-store": "^1.2.0"
60
+ "zustand": "4.4.7"
68
61
  },
69
62
  "devDependencies": {
70
63
  "@testing-library/react": "^12.1.4",
71
64
  "@testing-library/react-hooks": "^7.0.2",
72
65
  "@types/react": "^18.0.14",
73
66
  "@types/react-dom": "^18.0.5",
74
- "@types/use-sync-external-store": "^0.0.3",
75
67
  "@typescript-eslint/eslint-plugin": "^5.22.0",
76
68
  "@typescript-eslint/parser": "^5.22.0",
77
- "@vitejs/plugin-react": "^1.3.2",
69
+ "@vitejs/plugin-react": "4.2.1",
78
70
  "chalk": "^5.0.1",
79
71
  "eslint": "^8.11.0",
80
72
  "eslint-plugin-json": "^3.1.0",
81
73
  "eslint-plugin-prettier": "^4.0.0",
82
- "happy-dom": "^3.2.2",
74
+ "happy-dom": "^13.1.4",
83
75
  "prettier": "^2.6.2",
76
+ "query-string": "^7.1.1",
84
77
  "react-16": "npm:react@16",
85
78
  "react-17": "npm:react@17",
86
79
  "react-18": "npm:react@18",
@@ -88,10 +81,10 @@
88
81
  "react-dom-17": "npm:react-dom@17",
89
82
  "react-dom-18": "npm:react-dom@18",
90
83
  "react-use": "^17.3.2",
91
- "query-string": "^7.1.1",
92
84
  "tslib": "^2.4.0",
93
- "vite": "^2.9.14",
94
- "vitest": "^0.18.0"
85
+ "typescript": "^4.7.4",
86
+ "vite": "^5.0.11",
87
+ "vitest": "1.2.0"
95
88
  },
96
89
  "publishConfig": {
97
90
  "access": "public"
@@ -1,8 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { Root } from 'react-dom/client';
3
- export declare const PortalContext: React.Context<Root | null>;
4
- export declare const OverlayPortalContext: React.Context<Root | null>;
5
- export declare function CanvasPortal({ children, overlay }: {
6
- children: ReactNode;
7
- overlay?: boolean;
8
- }): null;
@@ -1,15 +0,0 @@
1
- import { InternationalString } from '@iiif/presentation-3';
2
- export interface SingleChoice {
3
- type: 'single-choice';
4
- label?: InternationalString;
5
- items: Array<{
6
- id: string;
7
- label?: InternationalString;
8
- selected?: true;
9
- }>;
10
- }
11
- export interface ComplexChoice {
12
- type: 'complex-choice';
13
- items: SingleChoice[];
14
- }
15
- export declare type ChoiceDescription = SingleChoice | ComplexChoice;