react-iiif-vault 0.9.15 → 0.9.18
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/.build/types/canvas-panel/Viewer.d.ts +1 -1
- package/.build/types/canvas-panel/index.d.ts +2 -0
- package/.build/types/canvas-panel/render/Canvas.d.ts +8 -3
- package/.build/types/canvas-panel/render/CanvasBackground.d.ts +4 -0
- package/.build/types/canvas-panel/render/Image.d.ts +2 -2
- package/.build/types/context/AnnotationPageContext.d.ts +5 -0
- package/.build/types/context/ContextBridge.d.ts +1 -9
- package/.build/types/context/PortalContext.d.ts +3 -2
- package/.build/types/context/ResourceContext.d.ts +1 -0
- package/.build/types/features/rendering-strategy/3d-strategy.d.ts +1 -1
- package/.build/types/features/rendering-strategy/rendering-utils.d.ts +5 -1
- package/.build/types/features/rendering-strategy/resource-types.d.ts +3 -0
- package/.build/types/features/rendering-strategy/strategies.d.ts +10 -1
- package/.build/types/features/rendering-strategy/textual-content-strategy.d.ts +17 -0
- package/.build/types/future-helpers/ranges.d.ts +6 -0
- package/.build/types/future-helpers/sequences.d.ts +6 -0
- package/.build/types/hooks/useAnnotationPage.d.ts +8 -0
- package/.build/types/hooks/useCanvasSubset.d.ts +2 -0
- package/.build/types/index.d.ts +7 -0
- package/.build/types/viewers/SimpleViewerContext.d.ts +4 -16
- package/.build/types/viewers/SimpleViewerContext.hooks.d.ts +14 -0
- package/.build/types/viewers/SimpleViewerContext.types.d.ts +42 -0
- package/dist/bundle/cjs/index.js +5 -3
- package/dist/bundle/cjs/index.js.map +1 -1
- package/dist/bundle/esm/index.mjs +1043 -210
- package/dist/bundle/esm/index.mjs.map +1 -1
- package/dist/canvas-panel/cjs/canvas-panel.js +5 -3
- package/dist/canvas-panel/cjs/canvas-panel.js.map +1 -1
- package/dist/canvas-panel/esm/canvas-panel.mjs +731 -95
- package/dist/canvas-panel/esm/canvas-panel.mjs.map +1 -1
- package/dist/index.umd.js +22 -20
- package/dist/index.umd.js.map +1 -1
- package/dist/react17/cjs/index.js +30 -0
- package/dist/react17/cjs/index.js.map +1 -0
- package/dist/react17/esm/index.mjs +3213 -0
- package/dist/react17/esm/index.mjs.map +1 -0
- package/package.json +14 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AtlasProps } from '@atlas-viewer/atlas
|
|
2
|
+
import { AtlasProps } from '@atlas-viewer/atlas';
|
|
3
3
|
export declare function Viewer({ children, errorFallback, outerContainerProps, ...props }: AtlasProps & {
|
|
4
4
|
height?: number | string;
|
|
5
5
|
width?: number | string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Viewer } from './Viewer';
|
|
2
2
|
import { RenderCanvas } from './render/Canvas';
|
|
3
3
|
import { RenderImage } from './render/Image';
|
|
4
|
+
import { CanvasBackground } from './render/CanvasBackground';
|
|
4
5
|
export declare const CanvasPanel: {
|
|
5
6
|
RenderImage: typeof RenderImage;
|
|
6
7
|
RenderCanvas: typeof RenderCanvas;
|
|
@@ -15,4 +16,5 @@ export declare const CanvasPanel: {
|
|
|
15
16
|
interactive?: boolean | undefined;
|
|
16
17
|
}>;
|
|
17
18
|
Viewer: typeof Viewer;
|
|
19
|
+
CanvasBackground: typeof CanvasBackground;
|
|
18
20
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxStyle } from '@atlas-viewer/atlas';
|
|
2
3
|
import { ChoiceDescription } from '../../features/rendering-strategy/choice-types';
|
|
3
4
|
import { StrategyActions } from '../../hooks/useRenderingStrategy';
|
|
4
|
-
import { MediaStrategy, RenderingStrategy } from '../../features/rendering-strategy/strategies';
|
|
5
|
+
import { EmptyStrategy, MediaStrategy, RenderingStrategy } from '../../features/rendering-strategy/strategies';
|
|
5
6
|
import { SingleImageStrategy } from '../../features/rendering-strategy/image-strategy';
|
|
7
|
+
import { ImageWithOptionalService } from '../../features/rendering-strategy/resource-types';
|
|
6
8
|
declare type CanvasProps = {
|
|
7
9
|
x?: number;
|
|
8
10
|
y?: number;
|
|
@@ -15,9 +17,12 @@ declare type CanvasProps = {
|
|
|
15
17
|
}>;
|
|
16
18
|
isStatic?: boolean;
|
|
17
19
|
children?: ReactNode;
|
|
18
|
-
renderViewerControls?: (strategy: SingleImageStrategy) => ReactNode;
|
|
20
|
+
renderViewerControls?: (strategy: SingleImageStrategy | EmptyStrategy) => ReactNode;
|
|
19
21
|
renderMediaControls?: (strategy: MediaStrategy) => ReactNode;
|
|
20
22
|
strategies?: Array<RenderingStrategy['type']>;
|
|
23
|
+
backgroundStyle?: BoxStyle;
|
|
24
|
+
alwaysShowBackground?: boolean;
|
|
25
|
+
onClickPaintingAnnotation?: (id: string, image: ImageWithOptionalService, e: any) => void;
|
|
21
26
|
};
|
|
22
|
-
export declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, strategies, children, }: CanvasProps): JSX.Element | null;
|
|
27
|
+
export declare function RenderCanvas({ x, y, onChoiceChange, registerActions, defaultChoices, isStatic, renderViewerControls, renderMediaControls, strategies, backgroundStyle, alwaysShowBackground, onClickPaintingAnnotation, children, }: CanvasProps): JSX.Element | null;
|
|
23
28
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ImageCandidate } from '@atlas-viewer/iiif-image-api';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { ImageWithOptionalService } from '../../features/rendering-strategy/resource-types';
|
|
4
|
-
export declare function RenderImage({ id, image, thumbnail, isStatic, x, y,
|
|
4
|
+
export declare function RenderImage({ id, image, thumbnail, isStatic, x, y, children, onClick, }: {
|
|
5
5
|
id: string;
|
|
6
6
|
image: ImageWithOptionalService;
|
|
7
7
|
thumbnail?: ImageCandidate;
|
|
8
8
|
isStatic?: boolean;
|
|
9
9
|
x?: number;
|
|
10
10
|
y?: number;
|
|
11
|
-
annotations?: ReactNode;
|
|
12
11
|
children?: ReactNode;
|
|
12
|
+
onClick?: (e: any) => void;
|
|
13
13
|
}): JSX.Element;
|
|
@@ -5,15 +5,7 @@ export declare function useContextBridge(): {
|
|
|
5
5
|
setVaultInstance: (vault: import("@iiif/vault/*").Vault) => void;
|
|
6
6
|
};
|
|
7
7
|
ResourceContext: import("./ResourceContext").ResourceContextType;
|
|
8
|
-
SimpleViewerReactContext:
|
|
9
|
-
setCurrentCanvasId: (newId: string | ((prev: string) => string)) => void;
|
|
10
|
-
setCurrentCanvasIndex: (newId: number | ((prev: number) => number)) => void;
|
|
11
|
-
currentCanvasIndex: number;
|
|
12
|
-
pagingView: boolean;
|
|
13
|
-
totalCanvases: number;
|
|
14
|
-
nextCanvas: () => void;
|
|
15
|
-
previousCanvas: () => void;
|
|
16
|
-
};
|
|
8
|
+
SimpleViewerReactContext: import("..").SimpleViewerContext;
|
|
17
9
|
VisibleCanvasReactContext: string[];
|
|
18
10
|
};
|
|
19
11
|
export declare function ContextBridge(props: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
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>;
|
|
4
5
|
export declare function CanvasPortal({ children, overlay }: {
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
overlay?: boolean;
|
|
@@ -5,6 +5,7 @@ export declare type ResourceContextType = {
|
|
|
5
5
|
range?: string;
|
|
6
6
|
canvas?: string;
|
|
7
7
|
annotation?: string;
|
|
8
|
+
annotationPage?: string;
|
|
8
9
|
};
|
|
9
10
|
export declare const ResourceReactContext: React.Context<ResourceContextType>;
|
|
10
11
|
export declare const useResourceContext: () => ResourceContextType;
|
|
@@ -2,7 +2,7 @@ import { CanvasNormalized } from '@iiif/presentation-3';
|
|
|
2
2
|
import { Paintables } from './rendering-utils';
|
|
3
3
|
import { AnnotationPageDescription } from './resource-types';
|
|
4
4
|
import { ChoiceDescription } from './choice-types';
|
|
5
|
-
import { ExternalWebResource } from '@iiif/presentation-3
|
|
5
|
+
import { ExternalWebResource } from '@iiif/presentation-3';
|
|
6
6
|
import { RenderingStrategy } from './strategies';
|
|
7
7
|
export declare type Single3DModelStrategy = {
|
|
8
8
|
type: '3d-model';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { AnnotationNormalized, ContentResource, IIIFExternalWebResource, SpecificResource } from '@iiif/presentation-3';
|
|
1
|
+
import { AnnotationNormalized, CanvasNormalized, ContentResource, IIIFExternalWebResource, PointSelector, SpecificResource, W3CAnnotationTarget } from '@iiif/presentation-3';
|
|
2
2
|
import { Vault } from '@iiif/vault';
|
|
3
3
|
import { ChoiceDescription } from './choice-types';
|
|
4
4
|
import { UseRenderingStrategy } from '../../hooks/useRenderingStrategy';
|
|
5
|
+
import { BoxSelector, SupportedTarget, TemporalBoxSelector } from '@iiif/vault-helpers';
|
|
5
6
|
export declare function parseSpecificResource(resource: ContentResource): any[];
|
|
6
7
|
export interface Paintables {
|
|
7
8
|
choice: ChoiceDescription | null;
|
|
8
9
|
types: string[];
|
|
9
10
|
items: Array<{
|
|
11
|
+
annotationId: string;
|
|
10
12
|
type: string;
|
|
11
13
|
resource: IIIFExternalWebResource | SpecificResource;
|
|
12
14
|
target: any;
|
|
@@ -14,8 +16,10 @@ export interface Paintables {
|
|
|
14
16
|
}>;
|
|
15
17
|
}
|
|
16
18
|
export declare function getPaintables(vault: Vault, paintingAnnotations: AnnotationNormalized[], enabledChoices: string[]): Paintables;
|
|
19
|
+
export declare function getParsedTargetSelector(canvas: CanvasNormalized, target: W3CAnnotationTarget | W3CAnnotationTarget[]): [TemporalBoxSelector | BoxSelector | PointSelector | null, SupportedTarget['source']];
|
|
17
20
|
export declare const emptyActions: {
|
|
18
21
|
makeChoice: () => void;
|
|
19
22
|
};
|
|
20
23
|
export declare const unknownResponse: UseRenderingStrategy[0];
|
|
21
24
|
export declare const unsupportedStrategy: (reason: string) => UseRenderingStrategy[0];
|
|
25
|
+
export declare const emptyStrategy: (width: number, height: number) => UseRenderingStrategy[0];
|
|
@@ -2,6 +2,7 @@ import { AnnotationPageNormalized, ImageService } from '@iiif/presentation-3';
|
|
|
2
2
|
import { BoxSelector, TemporalBoxSelector, TemporalSelector } from '@iiif/vault-helpers/annotation-targets';
|
|
3
3
|
export declare type ImageWithOptionalService = {
|
|
4
4
|
id: string;
|
|
5
|
+
annotationId: string;
|
|
5
6
|
type: 'Image';
|
|
6
7
|
service?: ImageService;
|
|
7
8
|
width?: number;
|
|
@@ -15,6 +16,7 @@ export declare type ImageWithOptionalService = {
|
|
|
15
16
|
};
|
|
16
17
|
export declare type SingleAudio = {
|
|
17
18
|
type: 'Sound';
|
|
19
|
+
annotationId: string;
|
|
18
20
|
url: string;
|
|
19
21
|
format: string;
|
|
20
22
|
duration: number;
|
|
@@ -23,6 +25,7 @@ export declare type SingleAudio = {
|
|
|
23
25
|
};
|
|
24
26
|
export declare type SingleVideo = {
|
|
25
27
|
type: 'Video';
|
|
28
|
+
annotationId: string;
|
|
26
29
|
url: string;
|
|
27
30
|
format: string;
|
|
28
31
|
duration: number;
|
|
@@ -2,6 +2,7 @@ import { AnnotationPageDescription, AudioSequence, ImageWithOptionalService, Sin
|
|
|
2
2
|
import { ChoiceDescription } from './choice-types';
|
|
3
3
|
import { SingleImageStrategy } from './image-strategy';
|
|
4
4
|
import { Single3DModelStrategy } from './3d-strategy';
|
|
5
|
+
import { TextualContentStrategy } from './textual-content-strategy';
|
|
5
6
|
export declare type MediaStrategy = {
|
|
6
7
|
type: 'media';
|
|
7
8
|
media: SingleAudio | SingleVideo | AudioSequence | VideoSequence;
|
|
@@ -14,9 +15,17 @@ export declare type ComplexTimelineStrategy = {
|
|
|
14
15
|
choice?: ChoiceDescription;
|
|
15
16
|
annotations?: AnnotationPageDescription;
|
|
16
17
|
};
|
|
18
|
+
export declare type EmptyStrategy = {
|
|
19
|
+
type: 'empty';
|
|
20
|
+
image: null;
|
|
21
|
+
images: [];
|
|
22
|
+
height: number;
|
|
23
|
+
width: number;
|
|
24
|
+
annotations?: AnnotationPageDescription;
|
|
25
|
+
};
|
|
17
26
|
export declare type UnknownStrategy = {
|
|
18
27
|
type: 'unknown';
|
|
19
28
|
reason?: string;
|
|
20
29
|
annotations?: AnnotationPageDescription;
|
|
21
30
|
};
|
|
22
|
-
export declare type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | UnknownStrategy;
|
|
31
|
+
export declare type RenderingStrategy = SingleImageStrategy | MediaStrategy | ComplexTimelineStrategy | Single3DModelStrategy | TextualContentStrategy | UnknownStrategy | EmptyStrategy;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CanvasNormalized, InternationalString } from '@iiif/presentation-3';
|
|
2
|
+
import { ChoiceDescription } from './choice-types';
|
|
3
|
+
import { AnnotationPageDescription } from './resource-types';
|
|
4
|
+
import { Paintables } from './rendering-utils';
|
|
5
|
+
import { RenderingStrategy } from './strategies';
|
|
6
|
+
import { SupportedTarget } from '@iiif/vault-helpers';
|
|
7
|
+
export declare type TextualContentStrategy = {
|
|
8
|
+
type: 'textual-content';
|
|
9
|
+
items: {
|
|
10
|
+
annotationId: string;
|
|
11
|
+
text: InternationalString;
|
|
12
|
+
target: SupportedTarget | null;
|
|
13
|
+
}[];
|
|
14
|
+
choice?: ChoiceDescription;
|
|
15
|
+
annotations?: AnnotationPageDescription;
|
|
16
|
+
};
|
|
17
|
+
export declare function getTextualContentStrategy(canvas: CanvasNormalized, paintables: Paintables): RenderingStrategy;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Vault } from '@iiif/vault';
|
|
2
|
+
import { ManifestNormalized, RangeNormalized, Reference } from '@iiif/presentation-3';
|
|
3
|
+
export declare function findFirstCanvasFromRange(vault: Vault, range: RangeNormalized): null | Reference<'Canvas'>;
|
|
4
|
+
export declare function findAllCanvasesInRange(vault: Vault, range: RangeNormalized): Array<Reference<'Canvas'>>;
|
|
5
|
+
export declare function findManifestSelectedRange(vault: Vault, manifest: ManifestNormalized, canvasId: string): null | RangeNormalized;
|
|
6
|
+
export declare function findSelectedRange(vault: Vault, range: RangeNormalized, canvasId: string): null | RangeNormalized;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ManifestNormalized, RangeNormalized, Reference } from '@iiif/presentation-3';
|
|
2
|
+
import { Vault } from '@iiif/vault';
|
|
3
|
+
export declare function getVisibleCanvasesFromCanvasId(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, canvasId: string | null, preventPaged?: boolean): Reference<'Canvas'>[];
|
|
4
|
+
export declare function getManifestSequence(vault: Vault, manifestOrRange: ManifestNormalized | RangeNormalized, { disablePaging }?: {
|
|
5
|
+
disablePaging?: boolean;
|
|
6
|
+
}): [Reference<'Canvas'>[], number[][]];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AnnotationPageNormalized } from '@iiif/presentation-3';
|
|
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;
|
package/.build/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './canvas-panel';
|
|
2
2
|
export * from './context/AnnotationContext';
|
|
3
|
+
export * from './context/AnnotationPageContext';
|
|
3
4
|
export * from './context/CanvasContext';
|
|
4
5
|
export * from './context/CollectionContext';
|
|
5
6
|
export * from './context/ManifestContext';
|
|
@@ -18,10 +19,12 @@ export * from './features/rendering-strategy/rendering-utils';
|
|
|
18
19
|
export * from './features/rendering-strategy/resource-types';
|
|
19
20
|
export * from './features/rendering-strategy/strategies';
|
|
20
21
|
export * from './hooks/useAnnotation';
|
|
22
|
+
export * from './hooks/useAnnotationPage';
|
|
21
23
|
export * from './hooks/useAnnotationPageManager';
|
|
22
24
|
export * from './hooks/useAnnotationsAtTime';
|
|
23
25
|
export * from './hooks/useCanvas';
|
|
24
26
|
export * from './hooks/useCanvasClock';
|
|
27
|
+
export * from './hooks/useCanvasSubset';
|
|
25
28
|
export * from './hooks/useCollection';
|
|
26
29
|
export * from './hooks/useDispatch';
|
|
27
30
|
export * from './hooks/useEventListener';
|
|
@@ -52,3 +55,7 @@ export * from './hooks/useRenderingStrategy';
|
|
|
52
55
|
export * from '@iiif/vault-helpers/annotation-targets';
|
|
53
56
|
export * from './utility/flatten-annotation-page-ids';
|
|
54
57
|
export * from './viewers/SimpleViewerContext';
|
|
58
|
+
export * from './viewers/SimpleViewerContext.hooks';
|
|
59
|
+
export * from './viewers/SimpleViewerContext.types';
|
|
60
|
+
export * from './future-helpers/sequences';
|
|
61
|
+
export * from './future-helpers/ranges';
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
setCurrentCanvasId: (newId: string | ((prev: string) => string)) => void;
|
|
4
|
-
setCurrentCanvasIndex: (newId: number | ((prev: number) => number)) => void;
|
|
5
|
-
currentCanvasIndex: number;
|
|
6
|
-
pagingView: boolean;
|
|
7
|
-
totalCanvases: number;
|
|
8
|
-
nextCanvas: () => void;
|
|
9
|
-
previousCanvas: () => void;
|
|
10
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SimpleViewerContext, SimpleViewerProps } from './SimpleViewerContext.types';
|
|
11
3
|
export declare const SimpleViewerReactContext: React.Context<SimpleViewerContext>;
|
|
12
|
-
export declare function
|
|
13
|
-
|
|
14
|
-
pagingEnabled?: boolean;
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
}): JSX.Element;
|
|
4
|
+
export declare function InnerViewerProvider(props: SimpleViewerProps): JSX.Element;
|
|
5
|
+
export declare function SimpleViewerProvider(props: SimpleViewerProps): JSX.Element;
|
|
17
6
|
export declare function useSimpleViewer(): SimpleViewerContext;
|
|
18
|
-
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function useCanvasSequence({ startCanvas, disablePaging }: {
|
|
2
|
+
startCanvas?: string;
|
|
3
|
+
disablePaging?: boolean;
|
|
4
|
+
}): {
|
|
5
|
+
visibleItems: string[];
|
|
6
|
+
cursor: number;
|
|
7
|
+
items: import("@iiif/presentation-3").Reference<"Canvas">[];
|
|
8
|
+
sequence: number[][];
|
|
9
|
+
setSequenceIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
10
|
+
setCanvasIndex: (index: number) => void;
|
|
11
|
+
setCanvasId: (id: string) => void;
|
|
12
|
+
next: () => void;
|
|
13
|
+
previous: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Reference } from '@iiif/presentation-3';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare type SimpleViewerContext = {
|
|
4
|
+
items: Reference<'Canvas'>[];
|
|
5
|
+
sequence: number[][];
|
|
6
|
+
setSequenceIndex: (newId: number) => void;
|
|
7
|
+
setCurrentCanvasId: (newId: string) => void;
|
|
8
|
+
setCurrentCanvasIndex: (newId: number) => void;
|
|
9
|
+
currentSequenceIndex: number;
|
|
10
|
+
nextCanvas: () => void;
|
|
11
|
+
previousCanvas: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare type SimpleViewerProps = {
|
|
14
|
+
manifest: string;
|
|
15
|
+
pagingEnabled?: boolean;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
startCanvas?: string;
|
|
18
|
+
rangeId?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type SimpleViewerReducerState = {
|
|
21
|
+
sequence: number[][];
|
|
22
|
+
availableCanvases: Reference<'Canvas'>[];
|
|
23
|
+
visibleCanvases: Reference<'Canvas'>[];
|
|
24
|
+
currentCanvas: string | null;
|
|
25
|
+
isPaged: boolean;
|
|
26
|
+
rangeId: string | null;
|
|
27
|
+
};
|
|
28
|
+
export interface SimpleViewerActions {
|
|
29
|
+
setCurrentCanvasId(newId: string): void;
|
|
30
|
+
setCurrentCanvasIndex(newId: number): void;
|
|
31
|
+
nextCanvas(): void;
|
|
32
|
+
previousCanvas(): void;
|
|
33
|
+
setCurrentRange(newId: string): void;
|
|
34
|
+
clearRange(): void;
|
|
35
|
+
setPagingEnabled(isEnabled: boolean): void;
|
|
36
|
+
}
|
|
37
|
+
export declare type SimpleViewerActionsType = {
|
|
38
|
+
[T in keyof SimpleViewerActions]: {
|
|
39
|
+
type: T;
|
|
40
|
+
payload: Parameters<SimpleViewerActions[T]>[0];
|
|
41
|
+
};
|
|
42
|
+
}[keyof SimpleViewerActions];
|