react-iiif-vault 2.0.2 → 2.0.4

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/dist/bundle.d.ts CHANGED
@@ -846,6 +846,43 @@ type CanvasPanelType = ForwardRefExoticComponent<CanvasPanelProps & RefAttribute
846
846
  };
847
847
  declare const CanvasPanel: CanvasPanelType;
848
848
 
849
+ type RegionHighlightType = {
850
+ id: any;
851
+ x: number;
852
+ y: number;
853
+ width: number;
854
+ height: number;
855
+ };
856
+ declare function RegionHighlight({ id, interactive, region, onClick, onHover, onSave, aspectRatio, maintainAspectRatio, disableCardinalControls, isEditing, style, }: {
857
+ id?: string;
858
+ region: RegionHighlightType;
859
+ isEditing: boolean;
860
+ onSave?: (annotation: RegionHighlightType) => void;
861
+ onClick?: (annotation: RegionHighlightType) => void;
862
+ onHover?: (annotation: RegionHighlightType) => void;
863
+ aspectRatio?: number;
864
+ maintainAspectRatio?: boolean;
865
+ disableCardinalControls?: boolean;
866
+ interactive?: boolean;
867
+ style?: BoxStyle;
868
+ }): react_jsx_runtime.JSX.Element;
869
+
870
+ type ResizeWorldItemProps = JSX.IntrinsicElements['worldObject'] & {
871
+ handleSize?: number;
872
+ resizable?: boolean;
873
+ aspectRatio?: number;
874
+ onSave: (pos: Partial<{
875
+ x: number;
876
+ y: number;
877
+ width: number;
878
+ height: number;
879
+ }>) => void;
880
+ children?: ReactNode;
881
+ maintainAspectRatio?: boolean;
882
+ disableCardinalControls?: boolean;
883
+ };
884
+ declare function ResizeWorldItem({ handleSize: _handleSize, resizable, onSave, children, maintainAspectRatio, disableCardinalControls, aspectRatio, ...props }: ResizeWorldItemProps): react_jsx_runtime.JSX.Element;
885
+
849
886
  declare function RenderAnnotationEditing({ theme, renderContextMenu, children, }: {
850
887
  theme?: Partial<SVGTheme>;
851
888
  renderContextMenu?: (options: RenderContextProps) => React.ReactNode;
@@ -1981,6 +2018,36 @@ declare function useRange<T>(options?: {
1981
2018
  selector: (range: RangeNormalized) => T;
1982
2019
  }, deps?: any[]): T | undefined;
1983
2020
 
2021
+ declare function useStaticRenderingStrategy({ supports }?: {
2022
+ supports?: Array<RenderingStrategy['type']>;
2023
+ }): RenderingStrategy;
2024
+
2025
+ interface StylesheetStore {
2026
+ stylesheets: Record<string, string>;
2027
+ loading: string[];
2028
+ errors: Array<{
2029
+ url: string;
2030
+ error: Error;
2031
+ }>;
2032
+ loadStylesheet(url: string): Promise<string>;
2033
+ setStylesheet(value: string, url?: string): string;
2034
+ parseStylesheet(stylesheet: Annotation['stylesheet'] | null): Promise<null | {
2035
+ id: string;
2036
+ type: 'CssStylesheet';
2037
+ value: string;
2038
+ }>;
2039
+ }
2040
+ declare const useStylesheetStore: zustand.UseBoundStore<zustand.StoreApi<StylesheetStore>>;
2041
+ declare function useRemoteStylesheet(stylesheet?: Annotation['stylesheet'] | null): readonly [Record<string, string>, {
2042
+ readonly id: string;
2043
+ readonly stylesheets: Record<string, string>;
2044
+ readonly loading: string[];
2045
+ readonly errors: {
2046
+ url: string;
2047
+ error: Error;
2048
+ }[];
2049
+ }];
2050
+
1984
2051
  declare function useRequestAnnotation(opts?: {
1985
2052
  onSuccess?: (r: AnnotationResponse) => void;
1986
2053
  }): {
@@ -2199,4 +2266,4 @@ declare function getManifestSequence(vault: Vault, manifestOrRange: ManifestNorm
2199
2266
  skipNonPaged?: boolean;
2200
2267
  }): [Reference<'Canvas'>[], number[][]];
2201
2268
 
2202
- export { AnnotationContext, AnnotationPageContext, type AnnotationPageDescription, type AnnotationRequest, type AnnotationRequestOptions, type AnnotationResponse, type AnnotationStrategyProps, AnnotationStyleProvider, type AnnotationStyles, type AnnotationThemeDefinition, type AtlasStore, type AtlasStoreEvents, AtlasStoreProvider, AtlasStoreReactContext, type AudioSequence, Auth, type AuthAccessState, type AuthContextActions, type AuthContextCurrentActions, type AuthContextState, AuthProvider, AuthRContext, AuthReactContext, AuthReactContextActions, type AuthState, CanvasAnnotations, CanvasContext, CanvasPanel, type CanvasPanelProps, CanvasStrategyProvider, CanvasWorldObject, type ChoiceEvents, CollectionContext, CombinedMetadata, ComplexTimelineProvider, type ComplexTimelineStrategy, ContextBridge, type ControlsContext, ControlsReactContext, type CreateAtlasStoreProps, CreateCustomShape, type CreateCustomShapeProps, CustomContextBridge, CustomContextBridgeProvider, DefaultEditingTools, type EmptyStrategy, EventEmitterProvider, EventsProvider, Image, type ImageProps, ImageService, ImageServiceLoaderContext, type ImageServiceLoaderType, type ImageServiceRequestOptions, type ImageStrategyProps, type ImageWithOptionalService, InnerViewerProvider, LanguageProvider, LanguageString, LocaleString, ManifestContext, ManifestMetadata, type MediaPlayerActions, MediaPlayerProvider, type MediaPlayerState, type MediaStrategy, Metadata, type MetadataProps, PolygonSelector, type PolygonSelectorProps, type ProbeStore, RangeContext, ReactEmitterContext, ReactEventContext, ReactVaultContext, Render3DModelStrategy, RenderAccompanyingCanvas, RenderAnnotation, RenderAnnotationEditing, RenderAnnotationPage, RenderAnnotationStrategy, RenderAudioStrategy, RenderComplexTimelineStrategy, type RenderContextProps, RenderEmptyStrategy, RenderImageStrategy, RenderSvgEditorControls, RenderTextualContentStrategy, RenderVideoStrategy, RenderYouTubeStrategy, type RenderingStrategy, type ResourceContextType, ResourceProvider, ResourceReactContext, type ResourceRequestOptions, type SVGTheme, SelectorControllerProvider, type SelectorHelperEventTypes, SequenceThumbnails, type SimpleViewerActions, type SimpleViewerActionsType, type SimpleViewerContext, type SimpleViewerProps, SimpleViewerProvider, SimpleViewerReactContext, type SimpleViewerReducerState, type Single3DModelStrategy, type SingleAudio, SingleCanvasThumbnail, type SingleImageStrategy, type SingleVideo, type SingleYouTubeVideo, type StrategyActions, type StrategyContext, StrategyReactContext, type SvgTheme, type TextContent, type TextualContentStrategy, ThumbnailFallbackImage, type TimelineKeyframe, TranslationProvider, TransliterationProvider, type UnknownStrategy, type UseRenderingStrategy, type UseRenderingStrategyOptions, type VaultActivatedAnnotation, VaultProvider, type VideoSequence, ViewerPresetContext, VirtualAnnotationProvider, VisibleCanvasReactContext, annotationResponseToSelector, authDetailsForResource, createAtlasStore, createAuthStateStore, createProbe, defaultEmitter, defaultSvgTheme, emptyActions, emptyStrategy, findAllCanvasesInRange, findFirstCanvasFromRange, findManifestSelectedRange, findSelectedRange, flattenAnnotationPageIds, formatTime, get3dStrategy, getAtlasStoreByName, getComplexTimelineStrategy, getDefaultAnnotationStyles, getImageStrategy, getManifestSequence, getParsedTargetSelector, getRenderingStrategy, getTextualContentStrategy, getVideoStrategy, getVisibleCanvasesFromCanvasId, hasAuth, isBoxSelector, isRectangle, isSvgSelector, makeAccessServiceRequest, makeAccessTokenRequest, parseSpecificResource, polygonToTarget, requestToAnnotationResponse, seraliseSupportedSelector, svgThemes, targetIntersects, unknownResponse, unsupportedStrategy, useAnnotation, useAnnotationPage, useAnnotationPageManager, useAnnotationStyles, useAnnotationsAtTime, useAtlasContextMenu, useAtlasStore, useAuthActions, useAuthService, useAuthStore, useAuthToken, useAuthTokens, useCanvas, useCanvasChoices, useCanvasClock, useCanvasSequence, useCanvasStartTime, useCanvasSubset, useClosestLanguage, useCollection, useComplexTimeline, useContextBridge, useContextMenuStore, useCreateLocaleString, useCurrentAnnotationActions, useCurrentAnnotationMetadata, useCurrentAnnotationRequest, useCurrentAnnotationTransition, useCurrentAuth, useCustomContextBridge, useDispatch, useEmitter, useEvent, useEventEmitter, useEventListener, useExistingVault, useExternalCollection, useExternalManifest, useExternalResource, useIIIFLanguage, useImage, useImageService, useImageServiceLoader, useImageTile, useIsAuthEnabled, useLoadImageService, useLocaleString, useManifest, useMediaActions, useMediaElements, useMediaState, usePaintables, usePaintingAnnotations, usePolygonHelper, useRange, useRenderControls, useRenderingStrategy, useRequestAnnotation, useResourceContext, useResourceEvents, useResources, useSearchService, useSelectorController, useSelectorEmitter, useSelectorEvents, useSelectorHelper, useSimpleMediaPlayer, useSimpleViewer, useStrategy, useStyleHelper, useStyles, useSvgEditor, useSvgEditorControls, useThumbnail, useTranslations, useTransliteration, useVault, useVaultEffect, useVaultSelector, useViewerPreset, useVirtualAnnotationPage, useVirtualAnnotationPageContext, useVisibleCanvases };
2269
+ export { AnnotationContext, AnnotationPageContext, type AnnotationPageDescription, type AnnotationRequest, type AnnotationRequestOptions, type AnnotationResponse, type AnnotationStrategyProps, AnnotationStyleProvider, type AnnotationStyles, type AnnotationThemeDefinition, type AtlasStore, type AtlasStoreEvents, AtlasStoreProvider, AtlasStoreReactContext, type AudioSequence, Auth, type AuthAccessState, type AuthContextActions, type AuthContextCurrentActions, type AuthContextState, AuthProvider, AuthRContext, AuthReactContext, AuthReactContextActions, type AuthState, CanvasAnnotations, CanvasContext, CanvasPanel, type CanvasPanelProps, CanvasStrategyProvider, CanvasWorldObject, type ChoiceEvents, CollectionContext, CombinedMetadata, ComplexTimelineProvider, type ComplexTimelineStrategy, ContextBridge, type ControlsContext, ControlsReactContext, type CreateAtlasStoreProps, CreateCustomShape, type CreateCustomShapeProps, CustomContextBridge, CustomContextBridgeProvider, DefaultEditingTools, type EmptyStrategy, EventEmitterProvider, EventsProvider, Image, type ImageProps, ImageService, ImageServiceLoaderContext, type ImageServiceLoaderType, type ImageServiceRequestOptions, type ImageStrategyProps, type ImageWithOptionalService, InnerViewerProvider, LanguageProvider, LanguageString, LocaleString, ManifestContext, ManifestMetadata, type MediaPlayerActions, MediaPlayerProvider, type MediaPlayerState, type MediaStrategy, Metadata, type MetadataProps, PolygonSelector, type PolygonSelectorProps, type ProbeStore, RangeContext, ReactEmitterContext, ReactEventContext, ReactVaultContext, RegionHighlight, Render3DModelStrategy, RenderAccompanyingCanvas, RenderAnnotation, RenderAnnotationEditing, RenderAnnotationPage, RenderAnnotationStrategy, RenderAudioStrategy, RenderComplexTimelineStrategy, type RenderContextProps, RenderEmptyStrategy, RenderImageStrategy, RenderSvgEditorControls, RenderTextualContentStrategy, RenderVideoStrategy, RenderYouTubeStrategy, type RenderingStrategy, ResizeWorldItem, type ResourceContextType, ResourceProvider, ResourceReactContext, type ResourceRequestOptions, type SVGTheme, SelectorControllerProvider, type SelectorHelperEventTypes, SequenceThumbnails, type SimpleViewerActions, type SimpleViewerActionsType, type SimpleViewerContext, type SimpleViewerProps, SimpleViewerProvider, SimpleViewerReactContext, type SimpleViewerReducerState, type Single3DModelStrategy, type SingleAudio, SingleCanvasThumbnail, type SingleImageStrategy, type SingleVideo, type SingleYouTubeVideo, type StrategyActions, type StrategyContext, StrategyReactContext, type SvgTheme, type TextContent, type TextualContentStrategy, ThumbnailFallbackImage, type TimelineKeyframe, TranslationProvider, TransliterationProvider, type UnknownStrategy, type UseRenderingStrategy, type UseRenderingStrategyOptions, type VaultActivatedAnnotation, VaultProvider, type VideoSequence, ViewerPresetContext, VirtualAnnotationProvider, VisibleCanvasReactContext, annotationResponseToSelector, authDetailsForResource, createAtlasStore, createAuthStateStore, createProbe, defaultEmitter, defaultSvgTheme, emptyActions, emptyStrategy, findAllCanvasesInRange, findFirstCanvasFromRange, findManifestSelectedRange, findSelectedRange, flattenAnnotationPageIds, formatTime, get3dStrategy, getAtlasStoreByName, getComplexTimelineStrategy, getDefaultAnnotationStyles, getImageStrategy, getManifestSequence, getParsedTargetSelector, getRenderingStrategy, getTextualContentStrategy, getVideoStrategy, getVisibleCanvasesFromCanvasId, hasAuth, isBoxSelector, isRectangle, isSvgSelector, makeAccessServiceRequest, makeAccessTokenRequest, parseSpecificResource, polygonToTarget, requestToAnnotationResponse, seraliseSupportedSelector, svgThemes, targetIntersects, unknownResponse, unsupportedStrategy, useAnnotation, useAnnotationPage, useAnnotationPageManager, useAnnotationStyles, useAnnotationsAtTime, useAtlasContextMenu, useAtlasStore, useAuthActions, useAuthService, useAuthStore, useAuthToken, useAuthTokens, useCanvas, useCanvasChoices, useCanvasClock, useCanvasSequence, useCanvasStartTime, useCanvasSubset, useClosestLanguage, useCollection, useComplexTimeline, useContextBridge, useContextMenuStore, useCreateLocaleString, useCurrentAnnotationActions, useCurrentAnnotationMetadata, useCurrentAnnotationRequest, useCurrentAnnotationTransition, useCurrentAuth, useCustomContextBridge, useDispatch, useEmitter, useEvent, useEventEmitter, useEventListener, useExistingVault, useExternalCollection, useExternalManifest, useExternalResource, useIIIFLanguage, useImage, useImageService, useImageServiceLoader, useImageTile, useIsAuthEnabled, useLoadImageService, useLocaleString, useManifest, useMediaActions, useMediaElements, useMediaState, usePaintables, usePaintingAnnotations, usePolygonHelper, useRange, useRemoteStylesheet, useRenderControls, useRenderingStrategy, useRequestAnnotation, useResourceContext, useResourceEvents, useResources, useSearchService, useSelectorController, useSelectorEmitter, useSelectorEvents, useSelectorHelper, useSimpleMediaPlayer, useSimpleViewer, useStaticRenderingStrategy, useStrategy, useStyleHelper, useStyles, useStylesheetStore, useSvgEditor, useSvgEditorControls, useThumbnail, useTranslations, useTransliteration, useVault, useVaultEffect, useVaultSelector, useViewerPreset, useVirtualAnnotationPage, useVirtualAnnotationPageContext, useVisibleCanvases };