react-iiif-vault 2.0.19 → 4.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.
- package/README.md +77 -1
- package/dist/Image-CXsx26cA.d.ts +45 -0
- package/dist/Image-g-DyBvi0.d.cts +45 -0
- package/dist/ImageStrategy-BHLIi5gd.d.ts +55 -0
- package/dist/ImageStrategy-Be9YES5a.d.cts +55 -0
- package/dist/SimpleViewerContext.hooks-CTgfe0Gg.d.cts +617 -0
- package/dist/SimpleViewerContext.hooks-DYJSrd-U.d.ts +617 -0
- package/dist/SimpleViewerContext.types-CWf5OFM7.d.ts +51 -0
- package/dist/SimpleViewerContext.types-Df-cpBss.d.cts +51 -0
- package/dist/ViewerPresetContext-D7N6KH9p.d.ts +144 -0
- package/dist/ViewerPresetContext-DwFTIkDx.d.cts +144 -0
- package/dist/bundle.d.ts +290 -196
- package/dist/bundle.global.js +45 -74
- package/dist/canvas-panel/scene.cjs +1 -0
- package/dist/canvas-panel/scene.d.cts +133 -0
- package/dist/canvas-panel/scene.d.ts +133 -0
- package/dist/canvas-panel/scene.js +1 -0
- package/dist/canvas-panel.cjs +1 -47
- package/dist/canvas-panel.d.cts +10 -5
- package/dist/canvas-panel.d.ts +10 -5
- package/dist/canvas-panel.js +1 -1
- package/dist/chunk-3XPYQXUE.js +48 -0
- package/dist/chunk-6WG6RPHU.js +1 -0
- package/dist/chunk-DXC5VCRN.js +1 -0
- package/dist/chunk-DZ7DMQ3V.cjs +1 -0
- package/dist/chunk-HFC72RK6.js +1 -0
- package/dist/chunk-L2GTJVPY.js +1 -0
- package/dist/chunk-L576POBV.cjs +2 -0
- package/dist/chunk-LKWFF45D.cjs +1 -0
- package/dist/chunk-MEQI335A.js +2 -0
- package/dist/chunk-MIANDAMK.cjs +1 -0
- package/dist/chunk-ND2R7OTX.js +1 -0
- package/dist/chunk-R7HZTE2T.cjs +48 -0
- package/dist/chunk-WBVFSMED.cjs +1 -0
- package/dist/chunk-XULFR6E3.cjs +1 -0
- package/dist/chunk-YEU5T67O.js +1 -0
- package/dist/chunk-ZBGD3VEW.cjs +1 -0
- package/dist/chunk-ZEGT4BAR.cjs +1 -0
- package/dist/core.cjs +1 -0
- package/dist/core.d.cts +133 -0
- package/dist/core.d.ts +133 -0
- package/dist/core.js +1 -0
- package/dist/{index-DijgVxjb.d.ts → index-ClFUurPI.d.ts} +15 -69
- package/dist/{index-DHghDluJ.d.cts → index-QFlDahI_.d.cts} +15 -69
- package/dist/index.cjs +1 -49
- package/dist/index.d.cts +33 -1496
- package/dist/index.d.ts +33 -1496
- package/dist/index.js +1 -1
- package/dist/presentation-4.cjs +1 -0
- package/dist/presentation-4.d.cts +304 -0
- package/dist/presentation-4.d.ts +304 -0
- package/dist/presentation-4.js +1 -0
- package/dist/ranges-Cc2ppjFD.d.ts +689 -0
- package/dist/ranges-D-UBNcsJ.d.cts +689 -0
- package/dist/{useRenderingStrategy-CoKE915F.d.cts → useRenderingStrategy-Vubk-vUU.d.cts} +47 -24
- package/dist/{useRenderingStrategy-CoKE915F.d.ts → useRenderingStrategy-Vubk-vUU.d.ts} +47 -24
- package/dist/utils-DHWZGbVU.d.ts +54 -0
- package/dist/utils-De5WTLDh.d.cts +54 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.cts +7 -5
- package/dist/utils.d.ts +7 -5
- package/dist/utils.js +1 -1
- package/package.json +54 -15
- package/dist/chunk-OGCPXOIP.js +0 -49
- package/dist/chunk-P7XHGETS.js +0 -1
- package/dist/utils-BKdiug6F.d.cts +0 -41
- package/dist/utils-CmwQWQLa.d.ts +0 -41
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export * from '@iiif/helpers/annotation-targets';
|
|
2
|
+
export { PointSelector, SvgSelector, expandTarget, expandTargets, parseSelector } from '@iiif/helpers/annotation-targets';
|
|
3
|
+
import { Reference } from '@iiif/parser/presentation-3/types';
|
|
4
|
+
export * from '@iiif/parser/presentation-3/types';
|
|
5
|
+
export { ImageService as IIIFImageService, ResourceProvider as IIIFResourceProvider } from '@iiif/parser/presentation-3/types';
|
|
6
|
+
import { AnnotationNormalized, AnnotationPageNormalized, CanvasNormalized, CollectionNormalized, ManifestNormalized, RangeNormalized } from '@iiif/parser/presentation-3-normalized/types';
|
|
7
|
+
export * from '@iiif/parser/presentation-3-normalized/types';
|
|
8
|
+
import { Vault, IIIFStore } from '@iiif/helpers/vault';
|
|
9
|
+
export { Vault } from '@iiif/helpers/vault';
|
|
10
|
+
import { ac as ResourceRequestOptions, b0 as ActiveVault } from './SimpleViewerContext.hooks-DYJSrd-U.js';
|
|
11
|
+
export { A as AnnotationContext, e as AnnotationPageContext, j as AnnotationStyleProvider, f as AnnotationStyles, g as AnnotationThemeDefinition, x as Auth, o as AuthProvider, l as AuthRContext, m as AuthReactContext, n as AuthReactContextActions, k as AuthState, C as CanvasContext, y as CollectionContext, z as ControlsContext, B as ControlsReactContext, at as EasingInput, a9 as EventEmitterProvider, H as EventsProvider, I as ImageServiceLoaderContext, af as ImageServiceRequestOptions, aJ as InnerViewerProvider, M as ManifestContext, O as MediaPlayerProvider, P as RangeContext, a8 as ReactEmitterContext, F as ReactEventContext, a as ReactVaultContext, Q as ResourceContextType, R as ResourceProvider, S as ResourceReactContext, W as SelectorControllerProvider, U as SelectorHelperEventTypes, aK as SimpleViewerProvider, aI as SimpleViewerReactContext, aw as UseViewportScrollOptions, au as UseViewportTourOptions, V as VaultActivatedAnnotation, a1 as VaultHooks, aZ as VaultProvider, d as VirtualAnnotationProvider, b as VisibleCanvasReactContext, a2 as createVaultHooks, E as defaultEmitter, $ as getComplexTimelineStrategy, ar as getCroppedThumbnail, h as getDefaultAnnotationStyles, a0 as getVideoStrategy, b1 as useActiveVault, a3 as useAnnotationPageManager, i as useAnnotationStyles, r as useAuthActions, t as useAuthService, q as useAuthStore, w as useAuthToken, v as useAuthTokens, a4 as useCanvasClock, aN as useCanvasSequence, a5 as useCanvasStartTime, aM as useContainerSequence, s as useCurrentAuth, a6 as useDispatch, aa as useEmitter, ab as useEvent, G as useEventEmitter, a7 as useEventListener, ad as useExternalResource, ae as useImage, ag as useImageService, J as useImageServiceLoader, ah as useImageTile, p as useIsAuthEnabled, L as useMediaActions, N as useMediaElements, K as useMediaState, ai as usePaintables, al as useRemoteStylesheet, D as useRenderControls, T as useResourceContext, am as useResourceEvents, an as useResources, ao as useSearchService, Z as useSelectorController, X as useSelectorEmitter, Y as useSelectorEvents, _ as useSelectorHelper, aL as useSimpleViewer, aj as useStaticRenderingStrategy, ap as useStyleHelper, aq as useStyles, ak as useStylesheetStore, as as useThumbnail, b2 as useVault, ax as useViewportScroll, av as useViewportTour, u as useVirtualAnnotationPage, c as useVirtualAnnotationPageContext, a$ as useVisibleCanvasContainers, a_ as useVisibleCanvases } from './SimpleViewerContext.hooks-DYJSrd-U.js';
|
|
12
|
+
import { DependencyList } from 'react';
|
|
13
|
+
import { Vault4 } from '@iiif/helpers/vault-4';
|
|
14
|
+
export { h as ComplexTimelineController, k as ComplexTimelineEvents, C as ComplexTimelineProvider, j as ComplexTimelineStore, e as MediaPlayerActions, M as MediaPlayerState, S as StrategyContext, b as StrategyReactContext, V as ViewerPresetContext, i as createComplexTimelineStore, f as formatTime, r as resolveKeyframeChanges, a as useComplexTimeline, u as useComplexTimelineStore, g as useSimpleMediaPlayer, c as useStrategy, d as useViewerPreset } from './ViewerPresetContext-D7N6KH9p.js';
|
|
15
|
+
export { f as AnnotationPageDescription, A as AudioSequence, n as ChoiceEvents, C as ComplexTimelineStrategy, E as EmptyStrategy, k as ImageServiceLoaderType, I as ImageWithOptionalService, M as MediaStrategy, R as RenderingStrategy, S as Single3DModelStrategy, c as SingleAudio, a as SingleImageStrategy, e as SingleVideo, d as SingleYouTubeVideo, l as StrategyActions, i as TextContent, h as TextualContentStrategy, T as TimelineKeyframe, U as UnknownStrategy, m as UseRenderingStrategy, o as UseRenderingStrategyOptions, V as VideoSequence, g as get3dStrategy, b as getImageStrategy, j as getTextualContentStrategy, u as useLoadImageService, p as useRenderingStrategy } from './useRenderingStrategy-Vubk-vUU.js';
|
|
16
|
+
export { e as emptyActions, d as emptyStrategy, a as getMediaTemporalSelectors, b as getParsedTargetSelector, g as getRenderingStrategy, p as parseSpecificResource, u as unknownResponse, c as unsupportedStrategy } from './utils-DHWZGbVU.js';
|
|
17
|
+
export { c as SimpleViewerActions, d as SimpleViewerActionsType, S as SimpleViewerContext, a as SimpleViewerProps, b as SimpleViewerReducerState } from './SimpleViewerContext.types-CWf5OFM7.js';
|
|
18
|
+
export { getManifestSequence, getVisibleCanvasesFromCanvasId } from '@iiif/helpers/sequences';
|
|
19
|
+
import 'react/jsx-runtime';
|
|
20
|
+
import '@atlas-viewer/atlas';
|
|
21
|
+
import 'zustand/vanilla';
|
|
22
|
+
import 'mitt';
|
|
23
|
+
import '@iiif/helpers/image-service';
|
|
24
|
+
import '@iiif/helpers';
|
|
25
|
+
import '@iiif/helpers/vault/store';
|
|
26
|
+
import '@iiif/parser/image-3';
|
|
27
|
+
import '@iiif/helpers/painting-annotations';
|
|
28
|
+
import 'zustand';
|
|
29
|
+
import '@iiif/helpers/styles';
|
|
30
|
+
import '@iiif/parser/presentation-4-normalized/types';
|
|
31
|
+
import '@iiif/parser/presentation-4/types';
|
|
32
|
+
|
|
33
|
+
declare function useAnnotationsAtTime(time: number, options?: {
|
|
34
|
+
canvasId?: string;
|
|
35
|
+
}): AnnotationNormalized[];
|
|
36
|
+
|
|
37
|
+
declare function useCanvasSubset(idsOrRefs?: Array<string | Reference>): Reference<'Canvas'>[];
|
|
38
|
+
|
|
39
|
+
declare function usePaintingAnnotations(options?: {
|
|
40
|
+
canvasId?: string;
|
|
41
|
+
enableSingleAnnotation?: boolean;
|
|
42
|
+
}): AnnotationNormalized[];
|
|
43
|
+
|
|
44
|
+
declare function useAnnotation(options?: {
|
|
45
|
+
id?: string;
|
|
46
|
+
selector?: undefined;
|
|
47
|
+
}): AnnotationNormalized | undefined;
|
|
48
|
+
declare function useAnnotation<T>(options?: {
|
|
49
|
+
id: string;
|
|
50
|
+
selector: (annotation: AnnotationNormalized) => T;
|
|
51
|
+
}, deps?: DependencyList): T | undefined;
|
|
52
|
+
|
|
53
|
+
declare function useAnnotationPage(options?: {
|
|
54
|
+
id?: string;
|
|
55
|
+
selector?: undefined;
|
|
56
|
+
}): AnnotationPageNormalized | undefined;
|
|
57
|
+
declare function useAnnotationPage<T>(options?: {
|
|
58
|
+
id: string;
|
|
59
|
+
selector: (annotation: AnnotationPageNormalized) => T;
|
|
60
|
+
}, deps?: DependencyList): T | undefined;
|
|
61
|
+
|
|
62
|
+
declare function useCanvas(options?: {
|
|
63
|
+
id?: string;
|
|
64
|
+
selector?: undefined;
|
|
65
|
+
}): CanvasNormalized | undefined;
|
|
66
|
+
declare function useCanvas<T>(options?: {
|
|
67
|
+
id: string;
|
|
68
|
+
selector: (canvas: CanvasNormalized) => T;
|
|
69
|
+
}, deps?: DependencyList): T | undefined;
|
|
70
|
+
|
|
71
|
+
declare function useCollection(options: {
|
|
72
|
+
id: string;
|
|
73
|
+
selector?: undefined;
|
|
74
|
+
}): CollectionNormalized | undefined;
|
|
75
|
+
declare function useCollection<T>(options: {
|
|
76
|
+
id: string;
|
|
77
|
+
selector: (collection: CollectionNormalized) => T;
|
|
78
|
+
}, deps?: DependencyList): T | undefined;
|
|
79
|
+
|
|
80
|
+
declare function useExistingVault(vault?: Vault): Vault;
|
|
81
|
+
declare function useExistingVault<TVault extends Vault | Vault4>(vault: TVault): TVault;
|
|
82
|
+
declare function useExistingVault(vault: Vault | Vault4 | undefined): Vault | Vault4;
|
|
83
|
+
|
|
84
|
+
declare function useExternalCollection(idOrRef: string | {
|
|
85
|
+
id: string;
|
|
86
|
+
type: string;
|
|
87
|
+
}, options?: ResourceRequestOptions): {
|
|
88
|
+
id: string;
|
|
89
|
+
requestId: string;
|
|
90
|
+
isLoaded: boolean;
|
|
91
|
+
cached?: boolean;
|
|
92
|
+
error: any;
|
|
93
|
+
/** @deprecated Use collection. Retained for existing consumers. */
|
|
94
|
+
manifest?: CollectionNormalized;
|
|
95
|
+
collection?: CollectionNormalized;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare function useExternalManifest(idOrRef: string | {
|
|
99
|
+
id: string;
|
|
100
|
+
type: string;
|
|
101
|
+
}, options?: ResourceRequestOptions): {
|
|
102
|
+
id: string;
|
|
103
|
+
requestId: string;
|
|
104
|
+
isLoaded: boolean;
|
|
105
|
+
cached?: boolean;
|
|
106
|
+
error: any;
|
|
107
|
+
manifest?: ManifestNormalized;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
declare function useManifest(options?: {
|
|
111
|
+
id?: string;
|
|
112
|
+
selector?: undefined;
|
|
113
|
+
}): ManifestNormalized | undefined;
|
|
114
|
+
declare function useManifest<T>(options?: {
|
|
115
|
+
id: string;
|
|
116
|
+
selector: (manifest: ManifestNormalized) => T;
|
|
117
|
+
}, deps?: DependencyList): T | undefined;
|
|
118
|
+
|
|
119
|
+
declare function useRange(options?: {
|
|
120
|
+
id?: string;
|
|
121
|
+
selector?: undefined;
|
|
122
|
+
}): RangeNormalized | undefined;
|
|
123
|
+
declare function useRange<T>(options?: {
|
|
124
|
+
id: string;
|
|
125
|
+
selector: (range: RangeNormalized) => T;
|
|
126
|
+
}, deps?: DependencyList): T | undefined;
|
|
127
|
+
|
|
128
|
+
declare function useVaultEffect(callback: (vault: Vault) => void, deps?: DependencyList): void;
|
|
129
|
+
|
|
130
|
+
declare function useSelectorForVault<T, TVault extends ActiveVault>(vault: TVault, selector: (state: IIIFStore, vault: TVault) => T, deps?: DependencyList): T;
|
|
131
|
+
declare function useVaultSelector<T>(selector: (state: IIIFStore, vault: Vault) => T, deps?: DependencyList): T;
|
|
132
|
+
|
|
133
|
+
export { ActiveVault, ResourceRequestOptions, useAnnotation, useAnnotationPage, useAnnotationsAtTime, useCanvas, useCanvasSubset, useCollection, useExistingVault, useExternalCollection, useExternalManifest, useManifest, usePaintingAnnotations, useRange, useSelectorForVault, useVaultEffect, useVaultSelector };
|
package/dist/core.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as vo,b as Io}from"./chunk-DXC5VCRN.js";import{a as Wr,b as Xr,c as Yr,d as Zr,e as _r,f as $r,g as ro,h as oo,i as eo,j as to,k as po,l as fo,m as mo,n as xo,o as io,p as ao,q as no,r as so,s as lo,t as uo,u as go,v as co,w as yo}from"./chunk-ND2R7OTX.js";import{A as mr,a as y,b as v,c as I,d as P,e as A,f as S,g as V,h,i as E,k as G,l as H,m as J,n as K,o as L,p as M,q as N,r as O,s as Q,t as U,u as W,v as or,w as er,x as tr,y as pr,z as fr}from"./chunk-6WG6RPHU.js";import{$ as dr,A as b,B as j,Ba as Jr,C as q,Ca as Ur,D as w,E as B,F as D,G as X,H as Y,I as Z,J as _,K as $,L as rr,N as xr,O as ir,P as ar,Q as nr,R as sr,S as lr,T as ur,U as o,W as e,X as t,Y as gr,Z as cr,_ as yr,a as p,aa as vr,b as f,ba as Ir,c as r,ca as Pr,d as m,da as Ar,e as x,ea as Sr,f as i,fa as Vr,g as a,h as n,i as s,j as l,k as u,l as g,m as c,n as d,qa as hr,ra as Rr,sa as Fr,ta as Tr,u as R,ua as kr,v as F,va as zr,w as T,x as k,xa as Er,y as z,ya as Gr,z as C,za as Hr}from"./chunk-MEQI335A.js";import"./chunk-UNH7HXGJ.js";import{e as Cr,f as br,g as jr,h as qr,i as wr,j as Br,k as Dr,l as Kr,m as Lr,n as Mr,o as Nr,p as Or,q as Qr}from"./chunk-L2GTJVPY.js";import{expandTarget as So,expandTargets as Vo,parseSelector as ho}from"@iiif/helpers/annotation-targets";import{Vault as Fo}from"@iiif/helpers/vault";export{ro as AnnotationContext,oo as AnnotationPageContext,W as AnnotationStyleProvider,D as Auth,k as AuthProvider,R as AuthRContext,F as AuthReactContext,T as AuthReactContextActions,m as CanvasContext,eo as CollectionContext,Ir as ComplexTimelineProvider,sr as ControlsReactContext,M as EventEmitterProvider,zr as EventsProvider,cr as ImageServiceLoaderContext,H as InnerViewerProvider,P as ManifestContext,fr as MediaPlayerProvider,A as RangeContext,L as ReactEmitterContext,Tr as ReactEventContext,x as ReactVaultContext,r as ResourceProvider,p as ResourceReactContext,Wr as SelectorControllerProvider,J as SimpleViewerProvider,G as SimpleViewerReactContext,ar as StrategyReactContext,Fo as Vault,i as VaultProvider,hr as ViewerPresetContext,t as VirtualAnnotationProvider,u as VisibleCanvasReactContext,Vr as createComplexTimelineStore,to as createVaultHooks,Fr as defaultEmitter,qr as emptyActions,Dr as emptyStrategy,So as expandTarget,Vo as expandTargets,xr as formatTime,Kr as get3dStrategy,Or as getComplexTimelineStrategy,dr as getCroppedThumbnail,Q as getDefaultAnnotationStyles,Lr as getImageStrategy,co as getManifestSequence,br as getMediaTemporalSelectors,jr as getParsedTargetSelector,Qr as getRenderingStrategy,Mr as getTextualContentStrategy,Nr as getVideoStrategy,yo as getVisibleCanvasesFromCanvasId,ho as parseSelector,Cr as parseSpecificResource,Sr as resolveKeyframeChanges,wr as unknownResponse,Br as unsupportedStrategy,a as useActiveVault,Z as useAnnotation,or as useAnnotationPage,Er as useAnnotationPageManager,U as useAnnotationStyles,fo as useAnnotationsAtTime,b as useAuthActions,q as useAuthService,C as useAuthStore,B as useAuthToken,w as useAuthTokens,_ as useCanvas,mo as useCanvasClock,h as useCanvasSequence,mr as useCanvasStartTime,xo as useCanvasSubset,vo as useCollection,Ar as useComplexTimeline,Pr as useComplexTimelineStore,V as useContainerSequence,j as useCurrentAuth,ur as useDispatch,N as useEmitter,O as useEvent,kr as useEventEmitter,io as useEventListener,y as useExistingVault,Io as useExternalCollection,I as useExternalManifest,v as useExternalResource,$r as useImage,ao as useImageService,yr as useImageServiceLoader,no as useImageTile,z as useIsAuthEnabled,Hr as useLoadImageService,d as useManifest,tr as useMediaActions,pr as useMediaElements,er as useMediaState,Jr as usePaintables,po as usePaintingAnnotations,S as useRange,Y as useRemoteStylesheet,lr as useRenderControls,Ur as useRenderingStrategy,f as useResourceContext,$ as useResourceEvents,Gr as useResources,E as useSearchService,Zr as useSelectorController,Xr as useSelectorEmitter,Yr as useSelectorEvents,s as useSelectorForVault,_r as useSelectorHelper,ir as useSimpleMediaPlayer,K as useSimpleViewer,so as useStaticRenderingStrategy,nr as useStrategy,lo as useStyleHelper,rr as useStyles,X as useStylesheetStore,vr as useThumbnail,n as useVault,gr as useVaultEffect,l as useVaultSelector,Rr as useViewerPreset,go as useViewportScroll,uo as useViewportTour,o as useVirtualAnnotationPage,e as useVirtualAnnotationPageContext,c as useVisibleCanvasContainers,g as useVisibleCanvases};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViewerMode, Runtime, BoxStyle, AtlasProps, Preset } from '@atlas-viewer/atlas';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, {
|
|
3
|
+
import React__default, { FC, ReactNode, ComponentType, RefObject, ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
import { StoreApi } from 'zustand';
|
|
@@ -8,12 +8,13 @@ import * as mitt from 'mitt';
|
|
|
8
8
|
import { Emitter } from 'mitt';
|
|
9
9
|
import * as polygon_editor from 'polygon-editor';
|
|
10
10
|
import { RenderState, SlowState, InputShape, ValidTools, createHelper } from 'polygon-editor';
|
|
11
|
-
import {
|
|
12
|
-
import { Reference, FragmentSelector, SvgSelector, AnnotationPage } from '@iiif/presentation-3';
|
|
11
|
+
import { S as SimpleViewerContext } from './SimpleViewerContext.types-CWf5OFM7.js';
|
|
13
12
|
import * as zustand_vanilla from 'zustand/vanilla';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
13
|
+
import { FragmentSelector, SvgSelector, AnnotationPage } from '@iiif/parser/presentation-3/types';
|
|
14
|
+
import { AnnotationPageNormalized } from '@iiif/parser/presentation-3-normalized/types';
|
|
15
|
+
import { c as SingleAudio, e as SingleVideo, r as CompatibleCanvas, M as MediaStrategy, l as StrategyActions, o as UseRenderingStrategyOptions, a as SingleImageStrategy, E as EmptyStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService } from './useRenderingStrategy-Vubk-vUU.js';
|
|
16
|
+
import { I as ImageOptions, R as RenderImage$1 } from './Image-CXsx26cA.js';
|
|
17
|
+
import { ChoiceDescription } from '@iiif/helpers';
|
|
17
18
|
|
|
18
19
|
type RenderContextProps = {
|
|
19
20
|
canvasId?: string;
|
|
@@ -218,50 +219,6 @@ declare function useSvgEditor(options: SvgEditorOptions): {
|
|
|
218
219
|
editor: react_jsx_runtime.JSX.Element | null;
|
|
219
220
|
};
|
|
220
221
|
|
|
221
|
-
type SimpleViewerContext = {
|
|
222
|
-
items: Reference<'Canvas'>[];
|
|
223
|
-
sequence: number[][];
|
|
224
|
-
hasNext: boolean;
|
|
225
|
-
hasPrevious: boolean;
|
|
226
|
-
setSequenceIndex: (newId: number) => void;
|
|
227
|
-
setCurrentCanvasId: (newId: string) => void;
|
|
228
|
-
setCurrentCanvasIndex: (newId: number) => void;
|
|
229
|
-
currentSequenceIndex: number;
|
|
230
|
-
nextCanvas: () => void;
|
|
231
|
-
previousCanvas: () => void;
|
|
232
|
-
};
|
|
233
|
-
type SimpleViewerProps = {
|
|
234
|
-
vault?: Vault;
|
|
235
|
-
manifest: string;
|
|
236
|
-
pagingEnabled?: boolean;
|
|
237
|
-
children: ReactNode;
|
|
238
|
-
startCanvas?: string;
|
|
239
|
-
rangeId?: string;
|
|
240
|
-
};
|
|
241
|
-
type SimpleViewerReducerState = {
|
|
242
|
-
sequence: number[][];
|
|
243
|
-
availableCanvases: Reference<'Canvas'>[];
|
|
244
|
-
visibleCanvases: Reference<'Canvas'>[];
|
|
245
|
-
currentCanvas: string | null;
|
|
246
|
-
isPaged: boolean;
|
|
247
|
-
rangeId: string | null;
|
|
248
|
-
};
|
|
249
|
-
interface SimpleViewerActions {
|
|
250
|
-
setCurrentCanvasId(newId: string): void;
|
|
251
|
-
setCurrentCanvasIndex(newId: number): void;
|
|
252
|
-
nextCanvas(): void;
|
|
253
|
-
previousCanvas(): void;
|
|
254
|
-
setCurrentRange(newId: string): void;
|
|
255
|
-
clearRange(): void;
|
|
256
|
-
setPagingEnabled(isEnabled: boolean): void;
|
|
257
|
-
}
|
|
258
|
-
type SimpleViewerActionsType = {
|
|
259
|
-
[T in keyof SimpleViewerActions]: {
|
|
260
|
-
type: T;
|
|
261
|
-
payload: Parameters<SimpleViewerActions[T]>[0];
|
|
262
|
-
};
|
|
263
|
-
}[keyof SimpleViewerActions];
|
|
264
|
-
|
|
265
222
|
type Polygons = ReturnType<typeof createHelper>;
|
|
266
223
|
type Point = [number, number] | [number, number, number, number, number, number];
|
|
267
224
|
type AnnotationRequest = {
|
|
@@ -511,13 +468,13 @@ interface VideoComponentProps {
|
|
|
511
468
|
element: RefObject<HTMLVideoElement>;
|
|
512
469
|
media: SingleVideo;
|
|
513
470
|
playPause: () => void;
|
|
514
|
-
canvas:
|
|
471
|
+
canvas: CompatibleCanvas;
|
|
515
472
|
poster?: string;
|
|
516
473
|
startTime?: number;
|
|
517
474
|
captions?: MediaStrategy['captions'];
|
|
518
475
|
}
|
|
519
476
|
declare function VideoHTML({ element, media, startTime, playPause, poster, }: VideoComponentProps): react_jsx_runtime.JSX.Element;
|
|
520
|
-
declare function Video({ media, mediaControlsDeps, children, videoComponent, captions, }: {
|
|
477
|
+
declare function Video({ media, mediaControlsDeps, children, posterCanvasId: posterCanvasIdProp, videoComponent, captions, }: {
|
|
521
478
|
media: SingleVideo;
|
|
522
479
|
mediaControlsDeps?: any[];
|
|
523
480
|
children: ReactNode;
|
|
@@ -526,12 +483,14 @@ declare function Video({ media, mediaControlsDeps, children, videoComponent, cap
|
|
|
526
483
|
captions?: MediaStrategy['captions'];
|
|
527
484
|
}): null;
|
|
528
485
|
|
|
529
|
-
type CanvasProps = {
|
|
486
|
+
type CanvasProps = ImageOptions & {
|
|
530
487
|
x?: number;
|
|
531
488
|
y?: number;
|
|
532
489
|
onCreated?: any;
|
|
533
490
|
onChoiceChange?: (choice?: ChoiceDescription) => void;
|
|
534
491
|
registerActions?: (actions: StrategyActions) => void;
|
|
492
|
+
emitter?: UseRenderingStrategyOptions["emitter"];
|
|
493
|
+
annotationPageManagerId?: string;
|
|
535
494
|
defaultChoices?: Array<{
|
|
536
495
|
id: string;
|
|
537
496
|
opacity?: number;
|
|
@@ -563,26 +522,13 @@ type CanvasProps = {
|
|
|
563
522
|
svgTheme?: Partial<SVGTheme>;
|
|
564
523
|
renderAnnotationContextMenu?: (options: RenderContextProps) => React__default.ReactNode;
|
|
565
524
|
};
|
|
566
|
-
declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, complexTimelineControlsDeps, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, rotation, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, components, children, annotationPopup, svgTheme, renderContextMenu, renderAnnotationContextMenu, }: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
525
|
+
declare function RenderCanvas({ x, y, onChoiceChange, registerActions, emitter, annotationPageManagerId, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, complexTimelineControlsDeps, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, rotation, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableThumbnail, imageCandidates, format, useFloorCalc, renderOptions, style, enableYouTube, onClickPaintingAnnotation, components, children, annotationPopup, svgTheme, renderContextMenu, renderAnnotationContextMenu, }: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
567
526
|
|
|
568
527
|
declare function CanvasBackground({ style }: {
|
|
569
528
|
style?: BoxStyle;
|
|
570
529
|
}): react_jsx_runtime.JSX.Element | null;
|
|
571
530
|
|
|
572
|
-
declare function RenderImage(
|
|
573
|
-
id: string;
|
|
574
|
-
image: ImageWithOptionalService;
|
|
575
|
-
thumbnail?: ImageCandidate;
|
|
576
|
-
isStatic?: boolean;
|
|
577
|
-
enableSizes?: boolean;
|
|
578
|
-
enableAnnotations?: boolean;
|
|
579
|
-
selector?: BoxSelector;
|
|
580
|
-
x?: number;
|
|
581
|
-
y?: number;
|
|
582
|
-
children?: ReactNode;
|
|
583
|
-
onClick?: (e: any) => void;
|
|
584
|
-
rotation?: number;
|
|
585
|
-
}): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare function RenderImage(props: ComponentProps<typeof RenderImage$1>): react_jsx_runtime.JSX.Element;
|
|
586
532
|
|
|
587
533
|
declare function ModelHTML({ model }: {
|
|
588
534
|
model: any;
|
|
@@ -662,4 +608,4 @@ type CanvasPanelType = ForwardRefExoticComponent<CanvasPanelProps & RefAttribute
|
|
|
662
608
|
};
|
|
663
609
|
declare const CanvasPanel: CanvasPanelType;
|
|
664
610
|
|
|
665
|
-
export { type
|
|
611
|
+
export { type AnnotationRequest as A, type CanvasPanelProps as C, RenderAnnotation as R, type SVGTheme as S, type VideoComponentProps as V, CanvasPanel as a, type AnnotationRequestOptions as b, type AtlasStore as c, type AnnotationResponse as d, type AtlasStoreEvents as e, type CreateAtlasStoreProps as f, createAtlasStore as g, AtlasStoreReactContext as h, getAtlasStoreByName as i, AtlasStoreProvider as j, RenderAnnotationPage as k, type RenderContextProps as l, useContextMenuStore as m, useAtlasContextMenu as n, defaultSvgTheme as o, polygonToTarget as p, useSvgEditor as q, requestToAnnotationResponse as r, type AudioComponentProps as s, useAtlasStore as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViewerMode, Runtime, BoxStyle, AtlasProps, Preset } from '@atlas-viewer/atlas';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, {
|
|
3
|
+
import React__default, { FC, ReactNode, ComponentType, RefObject, ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
import { StoreApi } from 'zustand';
|
|
@@ -8,12 +8,13 @@ import * as mitt from 'mitt';
|
|
|
8
8
|
import { Emitter } from 'mitt';
|
|
9
9
|
import * as polygon_editor from 'polygon-editor';
|
|
10
10
|
import { RenderState, SlowState, InputShape, ValidTools, createHelper } from 'polygon-editor';
|
|
11
|
-
import {
|
|
12
|
-
import { Reference, FragmentSelector, SvgSelector, AnnotationPage } from '@iiif/presentation-3';
|
|
11
|
+
import { S as SimpleViewerContext } from './SimpleViewerContext.types-Df-cpBss.cjs';
|
|
13
12
|
import * as zustand_vanilla from 'zustand/vanilla';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
13
|
+
import { FragmentSelector, SvgSelector, AnnotationPage } from '@iiif/parser/presentation-3/types';
|
|
14
|
+
import { AnnotationPageNormalized } from '@iiif/parser/presentation-3-normalized/types';
|
|
15
|
+
import { c as SingleAudio, e as SingleVideo, r as CompatibleCanvas, M as MediaStrategy, l as StrategyActions, o as UseRenderingStrategyOptions, a as SingleImageStrategy, E as EmptyStrategy, C as ComplexTimelineStrategy, R as RenderingStrategy, I as ImageWithOptionalService } from './useRenderingStrategy-Vubk-vUU.cjs';
|
|
16
|
+
import { I as ImageOptions, R as RenderImage$1 } from './Image-g-DyBvi0.cjs';
|
|
17
|
+
import { ChoiceDescription } from '@iiif/helpers';
|
|
17
18
|
|
|
18
19
|
type RenderContextProps = {
|
|
19
20
|
canvasId?: string;
|
|
@@ -218,50 +219,6 @@ declare function useSvgEditor(options: SvgEditorOptions): {
|
|
|
218
219
|
editor: react_jsx_runtime.JSX.Element | null;
|
|
219
220
|
};
|
|
220
221
|
|
|
221
|
-
type SimpleViewerContext = {
|
|
222
|
-
items: Reference<'Canvas'>[];
|
|
223
|
-
sequence: number[][];
|
|
224
|
-
hasNext: boolean;
|
|
225
|
-
hasPrevious: boolean;
|
|
226
|
-
setSequenceIndex: (newId: number) => void;
|
|
227
|
-
setCurrentCanvasId: (newId: string) => void;
|
|
228
|
-
setCurrentCanvasIndex: (newId: number) => void;
|
|
229
|
-
currentSequenceIndex: number;
|
|
230
|
-
nextCanvas: () => void;
|
|
231
|
-
previousCanvas: () => void;
|
|
232
|
-
};
|
|
233
|
-
type SimpleViewerProps = {
|
|
234
|
-
vault?: Vault;
|
|
235
|
-
manifest: string;
|
|
236
|
-
pagingEnabled?: boolean;
|
|
237
|
-
children: ReactNode;
|
|
238
|
-
startCanvas?: string;
|
|
239
|
-
rangeId?: string;
|
|
240
|
-
};
|
|
241
|
-
type SimpleViewerReducerState = {
|
|
242
|
-
sequence: number[][];
|
|
243
|
-
availableCanvases: Reference<'Canvas'>[];
|
|
244
|
-
visibleCanvases: Reference<'Canvas'>[];
|
|
245
|
-
currentCanvas: string | null;
|
|
246
|
-
isPaged: boolean;
|
|
247
|
-
rangeId: string | null;
|
|
248
|
-
};
|
|
249
|
-
interface SimpleViewerActions {
|
|
250
|
-
setCurrentCanvasId(newId: string): void;
|
|
251
|
-
setCurrentCanvasIndex(newId: number): void;
|
|
252
|
-
nextCanvas(): void;
|
|
253
|
-
previousCanvas(): void;
|
|
254
|
-
setCurrentRange(newId: string): void;
|
|
255
|
-
clearRange(): void;
|
|
256
|
-
setPagingEnabled(isEnabled: boolean): void;
|
|
257
|
-
}
|
|
258
|
-
type SimpleViewerActionsType = {
|
|
259
|
-
[T in keyof SimpleViewerActions]: {
|
|
260
|
-
type: T;
|
|
261
|
-
payload: Parameters<SimpleViewerActions[T]>[0];
|
|
262
|
-
};
|
|
263
|
-
}[keyof SimpleViewerActions];
|
|
264
|
-
|
|
265
222
|
type Polygons = ReturnType<typeof createHelper>;
|
|
266
223
|
type Point = [number, number] | [number, number, number, number, number, number];
|
|
267
224
|
type AnnotationRequest = {
|
|
@@ -511,13 +468,13 @@ interface VideoComponentProps {
|
|
|
511
468
|
element: RefObject<HTMLVideoElement>;
|
|
512
469
|
media: SingleVideo;
|
|
513
470
|
playPause: () => void;
|
|
514
|
-
canvas:
|
|
471
|
+
canvas: CompatibleCanvas;
|
|
515
472
|
poster?: string;
|
|
516
473
|
startTime?: number;
|
|
517
474
|
captions?: MediaStrategy['captions'];
|
|
518
475
|
}
|
|
519
476
|
declare function VideoHTML({ element, media, startTime, playPause, poster, }: VideoComponentProps): react_jsx_runtime.JSX.Element;
|
|
520
|
-
declare function Video({ media, mediaControlsDeps, children, videoComponent, captions, }: {
|
|
477
|
+
declare function Video({ media, mediaControlsDeps, children, posterCanvasId: posterCanvasIdProp, videoComponent, captions, }: {
|
|
521
478
|
media: SingleVideo;
|
|
522
479
|
mediaControlsDeps?: any[];
|
|
523
480
|
children: ReactNode;
|
|
@@ -526,12 +483,14 @@ declare function Video({ media, mediaControlsDeps, children, videoComponent, cap
|
|
|
526
483
|
captions?: MediaStrategy['captions'];
|
|
527
484
|
}): null;
|
|
528
485
|
|
|
529
|
-
type CanvasProps = {
|
|
486
|
+
type CanvasProps = ImageOptions & {
|
|
530
487
|
x?: number;
|
|
531
488
|
y?: number;
|
|
532
489
|
onCreated?: any;
|
|
533
490
|
onChoiceChange?: (choice?: ChoiceDescription) => void;
|
|
534
491
|
registerActions?: (actions: StrategyActions) => void;
|
|
492
|
+
emitter?: UseRenderingStrategyOptions["emitter"];
|
|
493
|
+
annotationPageManagerId?: string;
|
|
535
494
|
defaultChoices?: Array<{
|
|
536
495
|
id: string;
|
|
537
496
|
opacity?: number;
|
|
@@ -563,26 +522,13 @@ type CanvasProps = {
|
|
|
563
522
|
svgTheme?: Partial<SVGTheme>;
|
|
564
523
|
renderAnnotationContextMenu?: (options: RenderContextProps) => React__default.ReactNode;
|
|
565
524
|
};
|
|
566
|
-
declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, complexTimelineControlsDeps, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, rotation, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableYouTube, onClickPaintingAnnotation, components, children, annotationPopup, svgTheme, renderContextMenu, renderAnnotationContextMenu, }: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
525
|
+
declare function RenderCanvas({ x, y, onChoiceChange, registerActions, emitter, annotationPageManagerId, defaultChoices, isStatic, renderViewerControls, renderMediaControls, renderComplexTimelineControls, complexTimelineControlsDeps, viewControlsDeps, mediaControlsDeps, strategies, throwOnUnknown, rotation, backgroundStyle, alwaysShowBackground, keepCanvasScale, enableSizes, enableThumbnail, imageCandidates, format, useFloorCalc, renderOptions, style, enableYouTube, onClickPaintingAnnotation, components, children, annotationPopup, svgTheme, renderContextMenu, renderAnnotationContextMenu, }: CanvasProps): react_jsx_runtime.JSX.Element;
|
|
567
526
|
|
|
568
527
|
declare function CanvasBackground({ style }: {
|
|
569
528
|
style?: BoxStyle;
|
|
570
529
|
}): react_jsx_runtime.JSX.Element | null;
|
|
571
530
|
|
|
572
|
-
declare function RenderImage(
|
|
573
|
-
id: string;
|
|
574
|
-
image: ImageWithOptionalService;
|
|
575
|
-
thumbnail?: ImageCandidate;
|
|
576
|
-
isStatic?: boolean;
|
|
577
|
-
enableSizes?: boolean;
|
|
578
|
-
enableAnnotations?: boolean;
|
|
579
|
-
selector?: BoxSelector;
|
|
580
|
-
x?: number;
|
|
581
|
-
y?: number;
|
|
582
|
-
children?: ReactNode;
|
|
583
|
-
onClick?: (e: any) => void;
|
|
584
|
-
rotation?: number;
|
|
585
|
-
}): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare function RenderImage(props: ComponentProps<typeof RenderImage$1>): react_jsx_runtime.JSX.Element;
|
|
586
532
|
|
|
587
533
|
declare function ModelHTML({ model }: {
|
|
588
534
|
model: any;
|
|
@@ -662,4 +608,4 @@ type CanvasPanelType = ForwardRefExoticComponent<CanvasPanelProps & RefAttribute
|
|
|
662
608
|
};
|
|
663
609
|
declare const CanvasPanel: CanvasPanelType;
|
|
664
610
|
|
|
665
|
-
export { type
|
|
611
|
+
export { type AnnotationRequest as A, type CanvasPanelProps as C, RenderAnnotation as R, type SVGTheme as S, type VideoComponentProps as V, CanvasPanel as a, type AnnotationRequestOptions as b, type AtlasStore as c, type AnnotationResponse as d, type AtlasStoreEvents as e, type CreateAtlasStoreProps as f, createAtlasStore as g, AtlasStoreReactContext as h, getAtlasStoreByName as i, AtlasStoreProvider as j, RenderAnnotationPage as k, type RenderContextProps as l, useContextMenuStore as m, useAtlasContextMenu as n, defaultSvgTheme as o, polygonToTarget as p, useSvgEditor as q, requestToAnnotationResponse as r, type AudioComponentProps as s, useAtlasStore as u };
|