@nulib/clover 4.0.0-beta.1 → 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 +7 -7
- package/dist/components/Annotations/Annotations.mjs +165 -204
- package/dist/components/Annotations/EntryBodies.mjs +28 -3
- package/dist/components/Annotations/languages.mjs +1 -17
- package/dist/components/Body/BodyAlert.mjs +2 -1
- package/dist/components/Body/Caption.mjs +2 -1
- package/dist/components/Body/CaptionDetails.mjs +2 -1
- package/dist/components/Body/glyphs.mjs +9 -0
- package/dist/components/Canvas/AnnotationMenu.mjs +76 -60
- package/dist/components/Canvas/AnnotationState.mjs +9 -2
- package/dist/components/Canvas/Annotations.mjs +16 -7
- package/dist/components/Canvas/CanvasView.mjs +173 -32
- package/dist/components/Canvas/ChoiceMenu.mjs +51 -31
- package/dist/components/Canvas/Connected.mjs +38 -4
- package/dist/components/Canvas/ControlMenu.mjs +6 -4
- package/dist/components/Canvas/Controls.mjs +17 -1
- package/dist/components/Canvas/FrameAnimation.mjs +568 -167
- package/dist/components/Canvas/LoadedCanvas.mjs +5 -3
- package/dist/components/Canvas/PlaceBox.mjs +74 -0
- package/dist/components/Canvas/Placeholder.mjs +2 -1
- package/dist/components/Canvas/fromManifest.mjs +2 -1
- package/dist/components/Canvas/layout.mjs +121 -32
- package/dist/components/Canvas/media/MediaBody.mjs +32 -6
- package/dist/components/Canvas/media/Player.mjs +11 -25
- package/dist/components/Canvas/media/Transport.mjs +94 -61
- package/dist/components/Canvas/media/TransportButton.mjs +2 -1
- package/dist/components/Canvas/media/placeMenu.mjs +19 -0
- package/dist/components/Canvas/media/seekGaps.mjs +43 -0
- package/dist/components/Canvas/media/sequence.mjs +96 -0
- package/dist/components/Canvas/media/useMediaElement.mjs +22 -3
- package/dist/components/Collection/Collection.mjs +2 -1
- package/dist/components/CollectionSelect/CollectionSelect.mjs +5 -2
- package/dist/components/Contents/Contents.mjs +163 -34
- package/dist/components/Download/Download.mjs +34 -38
- package/dist/components/Download/downloads.mjs +40 -0
- package/dist/components/Items/AnnotationItems.mjs +165 -0
- package/dist/components/Items/CountMenu.mjs +89 -0
- package/dist/components/Items/Item.mjs +24 -17
- package/dist/components/Items/Items.mjs +65 -37
- package/dist/components/Items/Pager.mjs +39 -79
- package/dist/components/Items/PagerLayout.mjs +41 -0
- package/dist/components/Items/Position.mjs +103 -0
- package/dist/components/Items/StandaloneItems.mjs +12 -4
- package/dist/components/Items/TargetItems.mjs +202 -0
- package/dist/components/Label/Label.mjs +2 -1
- package/dist/components/Map/MapView.mjs +367 -57
- package/dist/components/Panel/About.mjs +36 -7
- package/dist/components/Panel/AboutActions.mjs +117 -0
- package/dist/components/Panel/Panel.mjs +58 -18
- package/dist/components/Panel/PartOfManifest.mjs +4 -3
- package/dist/components/Panel/ReadingLanguages.mjs +20 -0
- package/dist/components/Primitives/Primitives.mjs +18 -3
- package/dist/components/Provider/Provider.mjs +19 -5
- package/dist/components/Root/Announcer.mjs +3 -2
- package/dist/components/Root/Root.mjs +5 -2
- package/dist/components/Root/useRootState.mjs +14 -2
- package/dist/components/Scene/SceneView.mjs +23 -6
- package/dist/components/Search/Search.mjs +3 -2
- package/dist/components/Split/Split.mjs +4 -1
- package/dist/components/Status/Status.mjs +10 -2
- package/dist/components/Timeline/playerSurface.mjs +2 -1
- package/dist/components/Transcript/Transcript.mjs +42 -23
- package/dist/core/annotation-bodies.mjs +25 -5
- package/dist/core/annotation-collection.mjs +3 -2
- package/dist/core/annotation-name.mjs +12 -9
- package/dist/core/annotation-sets.mjs +139 -10
- package/dist/core/annotations-content.mjs +8 -1
- package/dist/core/annotations.mjs +8 -1
- package/dist/core/choice-key.mjs +5 -0
- package/dist/core/clover.mjs +105 -20
- package/dist/core/content-state-reader.mjs +33 -2
- package/dist/core/dates-format.mjs +30 -0
- package/dist/core/dates.mjs +19 -0
- package/dist/core/geo.mjs +46 -5
- package/dist/core/image-layers.mjs +96 -0
- package/dist/core/items.mjs +4 -2
- package/dist/core/language-choice.mjs +30 -0
- package/dist/core/link.mjs +15 -1
- package/dist/core/load.mjs +4 -2
- package/dist/core/pages.mjs +20 -1
- package/dist/core/presentation.mjs +6 -4
- package/dist/core/range-regions.mjs +70 -0
- package/dist/core/ranges.mjs +52 -18
- package/dist/core/region.mjs +7 -2
- package/dist/core/sanitize.mjs +86 -1
- package/dist/core/save-file.mjs +33 -0
- package/dist/core/selectors.mjs +12 -0
- package/dist/core/upgrade.mjs +23 -0
- package/dist/core/value.mjs +11 -23
- package/dist/hooks/useFullscreenExit.mjs +26 -0
- package/dist/hooks/useHighContrast.mjs +27 -0
- package/dist/i18n/autonym.mjs +11 -0
- package/dist/i18n/config.mjs +3 -8
- package/dist/{core → i18n}/direction.mjs +5 -1
- package/dist/i18n/languages.mjs +44 -0
- package/dist/i18n/locales/en.json.mjs +1 -1
- package/dist/i18n/locales/es.json.mjs +1 -1
- package/dist/i18n/locales/fi.json.mjs +1 -1
- package/dist/i18n/locales/fr.json.mjs +1 -1
- package/dist/i18n/locales/nb.json.mjs +1 -1
- package/dist/i18n/locales/nn.json.mjs +1 -1
- package/dist/i18n/locales/no.json.mjs +1 -1
- package/dist/i18n/locales/pt.json.mjs +1 -1
- package/dist/{ui → i18n}/useContainerName.mjs +5 -4
- package/dist/{react/language.mjs → i18n/useRootLanguage.mjs} +2 -2
- package/dist/index.d.mts +393 -53
- package/dist/index.mjs +6 -2
- package/dist/lib/fullscreen.mjs +6 -1
- package/dist/lib/renderer/CanvasRenderer.mjs +28 -5
- package/dist/lib/renderer/math/affine.mjs +14 -0
- package/dist/lib/renderer/scene/planFrame.mjs +12 -12
- package/dist/lib/renderer/scene/regions.mjs +11 -1
- package/dist/lib/renderer/scene/sceneItem.mjs +72 -9
- package/dist/lib/time.mjs +10 -0
- package/dist/map/index.d.mts +26 -4
- package/dist/react/fetchManifest.mjs +19 -0
- package/dist/react/hooks.mjs +7 -1
- package/dist/react/readingLanguages.mjs +16 -0
- package/dist/react/usePagesReached.mjs +42 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +87 -9
- package/dist/templates/document/Document.mjs +5 -1
- package/dist/templates/index.d.mts +21 -3
- package/dist/templates.css +1 -1
- package/dist/ui/BodyUnloadable.mjs +34 -0
- package/dist/ui/Button.mjs +2 -1
- package/dist/ui/Chevron.mjs +34 -0
- package/dist/ui/ControlCluster.mjs +6 -3
- package/dist/ui/EntryThumbnail.mjs +60 -0
- package/dist/ui/ExitFullscreen.mjs +2 -1
- package/dist/ui/FieldPill.mjs +5 -4
- package/dist/ui/HideToggle.mjs +2 -1
- package/dist/ui/LanguageChoice.mjs +45 -0
- package/dist/ui/ListEnd.mjs +29 -0
- package/dist/ui/Markup.mjs +27 -8
- package/dist/ui/NavDate.mjs +29 -0
- package/dist/ui/ReadMore.mjs +3 -2
- package/dist/ui/Sections.mjs +19 -28
- package/dist/ui/Steps.mjs +4 -3
- package/dist/ui/Tip.mjs +9 -4
- package/dist/web-components/About-DhOGPFaI.mjs +1 -0
- package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +1 -0
- package/dist/web-components/AnnotationMenu-BCwwwfbb.mjs +1 -0
- package/dist/web-components/AnnotationState-CavxnAAq.mjs +1 -0
- package/dist/web-components/Annotations-DDjSrBL5.mjs +2 -0
- package/dist/web-components/Annotations-rBmeI5sR.mjs +1 -0
- package/dist/web-components/Body-DaY1UJIy.mjs +1 -0
- package/dist/web-components/BodyAlert-COKp19lq.mjs +1 -0
- package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +1 -0
- package/dist/web-components/Button-DLFYqtz9.mjs +1 -0
- package/dist/web-components/{Camera-cdCqKMup.mjs → Camera-Cp5ma-6C.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-CnLEHRs4.mjs → Canvas2DBackend-3PToh87Z.mjs} +1 -1
- package/dist/web-components/CanvasView-BWQ4SK2b.mjs +2 -0
- package/dist/web-components/CaptionDetails-DSziiuQV.mjs +1 -0
- package/dist/web-components/Chevron-r-_hUPn8.mjs +1 -0
- package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +1 -0
- package/dist/web-components/Collection-B9swJtPW.mjs +1 -0
- package/dist/web-components/CollectionSelect-CBWUbqQi.mjs +1 -0
- package/dist/web-components/Connected-B2d6EoFl.mjs +1 -0
- package/dist/web-components/Connected-BSRM9FJY.mjs +1 -0
- package/dist/web-components/Connected-BnpxYeJN.mjs +1 -0
- package/dist/web-components/Contents-D7FPxSH-.mjs +1 -0
- package/dist/web-components/ControlMenu-Crtho2cs.mjs +1 -0
- package/dist/web-components/CountMenu-DyTp_J4k.mjs +1 -0
- package/dist/web-components/Cue-CbZaGwZh.mjs +1 -0
- package/dist/web-components/Document-BfltLWZZ.mjs +1 -0
- package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +1 -0
- package/dist/web-components/{DomLayers-BD4QPbl6.mjs → DomLayers-CTGub6wo.mjs} +1 -1
- package/dist/web-components/Download-BOYNIb7C.mjs +1 -0
- package/dist/web-components/EntryBodies-Bfd2Z42z.mjs +1 -0
- package/dist/web-components/EntryThumbnail-DQE8ajI9.mjs +1 -0
- package/dist/web-components/FieldPill-D5DNJWLy.mjs +1 -0
- package/dist/web-components/FrameAnimation-IfR1czfc.mjs +1 -0
- package/dist/web-components/Gallery-DD06BDQo.mjs +1 -0
- package/dist/web-components/HideToggle-DL911R1Z.mjs +1 -0
- package/dist/web-components/Items-BHzT9A73.mjs +1 -0
- package/dist/web-components/Label-KabnxuMN.mjs +1 -0
- package/dist/web-components/LanguageChoice-DT1UPiDn.mjs +1 -0
- package/dist/web-components/LightboxBody-BhRhdXo6.mjs +1 -0
- package/dist/web-components/ListEnd-CbwNlty-.mjs +1 -0
- package/dist/web-components/{Loaded-D5xmFRSo.mjs → Loaded-BWfEBJyg.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +1 -0
- package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +1 -0
- package/dist/web-components/{Loading-CBKfwsML.mjs → Loading-zw74TdAz.mjs} +1 -1
- package/dist/web-components/{Map-Bcgp_R8H.mjs → Map--dJhk0_0.mjs} +1 -1
- package/dist/web-components/MapView-duA5WGsu.mjs +3 -0
- package/dist/web-components/Markup-D-kioDf9.mjs +2 -0
- package/dist/web-components/MediaBody-CoOiVXcv.mjs +1 -0
- package/dist/web-components/MediaBody-d8ErTuwT.mjs +1 -0
- package/dist/web-components/NavDate-BQHuyLOC.mjs +1 -0
- package/dist/web-components/{Navigator-BSJbEbuJ.mjs → Navigator-B3U21_ti.mjs} +1 -1
- package/dist/web-components/Pager-DnJknq92.mjs +1 -0
- package/dist/web-components/PagerLayout-CvOmKtSW.mjs +1 -0
- package/dist/web-components/Panel-CIdjOznL.mjs +1 -0
- package/dist/web-components/{PanelToggle-mUDw73zI.mjs → PanelToggle-CFtWIeWv.mjs} +1 -1
- package/dist/web-components/PartOfManifest-F87jIrf9.mjs +1 -0
- package/dist/web-components/{Pending-BPOQ2z1L.mjs → Pending-CYAQajKu.mjs} +1 -1
- package/dist/web-components/PlaceBox-BtIbIotm.mjs +1 -0
- package/dist/web-components/Placeholder-TIyj4ZjR.mjs +1 -0
- package/dist/web-components/Position-BkWBRBfW.mjs +1 -0
- package/dist/web-components/Primitives-BmODPlnK.mjs +1 -0
- package/dist/web-components/Provider-C8se8i4I.mjs +1 -0
- package/dist/web-components/ReadMore-BwGFsLS2.mjs +1 -0
- package/dist/web-components/Root-CAJB0-Mh.mjs +1 -0
- package/dist/web-components/Scene-Ctcdt7CD.mjs +1 -0
- package/dist/web-components/SceneView-B6bEx_7x.mjs +1 -0
- package/dist/web-components/Search-CbmK9vLp.mjs +1 -0
- package/dist/web-components/Sections-Dy5_pkyQ.mjs +2 -0
- package/dist/web-components/StandaloneItems-BmUnBp0H.mjs +1 -0
- package/dist/web-components/Status-Dww3Pyf4.mjs +1 -0
- package/dist/web-components/Steps-o_UprQfZ.mjs +1 -0
- package/dist/web-components/TargetItems-BBOGDubv.mjs +1 -0
- package/dist/web-components/Timeline-CfIF4APc.mjs +1 -0
- package/dist/web-components/Tip-BbexILXs.mjs +1 -0
- package/dist/web-components/Transcript-ZVXM3ZDA.mjs +1 -0
- package/dist/web-components/annotation-collection-7SS1ELcO.mjs +1 -0
- package/dist/web-components/annotation-name-CYkZopdd.mjs +1 -0
- package/dist/web-components/annotations-content-Bdtn50sf.mjs +1 -0
- package/dist/web-components/body-CkOBHlJ0.mjs +1 -0
- package/dist/web-components/canvas-CWf_Fag8.mjs +1 -0
- package/dist/web-components/choice-key-BUNebLKe.mjs +1 -0
- package/dist/web-components/{cloverEngine-B4LinbSt.mjs → cloverEngine-6djEHNCD.mjs} +2 -2
- package/dist/web-components/content-state-reader-Ahh6artg.mjs +1 -0
- package/dist/web-components/{controls-Dj2BybWb.mjs → controls-BJrZVQkS.mjs} +1 -1
- package/dist/web-components/custom-elements.json +109 -13
- package/dist/web-components/dates-DR3gfcON.mjs +1 -0
- package/dist/web-components/downloads-CqVWo-yn.mjs +1 -0
- package/dist/web-components/{engine-BSt8LTso.mjs → engine-B-sscpLa.mjs} +1 -1
- package/dist/web-components/{engines-CC0OEsVE.mjs → engines-DfCHjbt3.mjs} +1 -1
- package/dist/web-components/es-BYfHUZ7P.mjs +1 -0
- package/dist/web-components/fetchManifest-BIzne1Pj.mjs +1 -0
- package/dist/web-components/fi-B5y2qr8T.mjs +1 -0
- package/dist/web-components/fr-ChezCx6V.mjs +1 -0
- package/dist/web-components/fromManifest-gg5Wx14y.mjs +1 -0
- package/dist/web-components/glyphs-JYl2STEr.mjs +1 -0
- package/dist/web-components/hooks-x7rO95CS.mjs +1 -0
- package/dist/web-components/image-layers-BjbeyHBS.mjs +1 -0
- package/dist/web-components/{imageService-dsdmcegU.mjs → imageService-0eTvQ-3h.mjs} +1 -1
- package/dist/web-components/index-BZ7b9k0N.mjs +1 -0
- package/dist/web-components/index.d.mts +95 -10
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-CnAIl9fS.mjs +1 -0
- package/dist/web-components/items-F6hJgdAS.mjs +1 -0
- package/dist/web-components/label-CI88KH2_.mjs +1 -0
- package/dist/web-components/layout-De1MOSYe.mjs +1 -0
- package/dist/web-components/link-GEdiEwlR.mjs +1 -0
- package/dist/web-components/logo-Ckwj7FlP.mjs +1 -0
- package/dist/web-components/models-59cEeiAA.mjs +1 -0
- package/dist/web-components/nb-8J22f9Td.mjs +1 -0
- package/dist/web-components/nn-Dv1EvzI1.mjs +1 -0
- package/dist/web-components/no-8J22f9Td.mjs +1 -0
- package/dist/web-components/{nodes-B7JRwBgl.mjs → nodes-CTw9OqlA.mjs} +1 -1
- package/dist/web-components/{overlayImage-0OgQl1TL.mjs → overlayImage-BMt4UTlR.mjs} +1 -1
- package/dist/web-components/{panel-CjXfre-g.mjs → panel-C17Rl9Ya.mjs} +1 -1
- package/dist/web-components/part-CXts97_M.mjs +1 -0
- package/dist/web-components/playerSurface-HYwEwPK6.mjs +1 -0
- package/dist/web-components/presentation-2-C-U79S_T.mjs +1 -0
- package/dist/web-components/{provider-C1wKfdjb.mjs → provider-BpxorEiq.mjs} +1 -1
- package/dist/web-components/pt-DWYQkATt.mjs +1 -0
- package/dist/web-components/range-regions-BGQy4E9U.mjs +1 -0
- package/dist/web-components/read-more-BDM_6CVc.mjs +1 -0
- package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +1 -0
- package/dist/web-components/rendererSurface-C0aKlE0v.mjs +22 -0
- package/dist/web-components/{renderers-BMSWEFUR.mjs → renderers-CiB74bQh.mjs} +1 -1
- package/dist/web-components/{resource-DLHocQ1C.mjs → resource-CRbpf9pX.mjs} +1 -1
- package/dist/web-components/sanitize-qIOeyIww.mjs +3 -0
- package/dist/web-components/save-file-CCuZEuQr.mjs +1 -0
- package/dist/web-components/search-CkM0O0Z1.mjs +1 -0
- package/dist/web-components/sequence-C28xoNmD.mjs +1 -0
- package/dist/web-components/shared-MTsMddHx.mjs +1 -0
- package/dist/web-components/{show-link-CyzYE1eS.mjs → show-link-BXm7SNIC.mjs} +1 -1
- package/dist/web-components/{sizedImage-uv_NlE0l.mjs → sizedImage-k4Q-eyOB.mjs} +1 -1
- package/dist/web-components/{split-CYuMjp89.mjs → split-Hp6z-v4h.mjs} +1 -1
- package/dist/web-components/{status-Ms5L0ghK.mjs → status-BmtuKfAG.mjs} +1 -1
- package/dist/web-components/styles-CZV1nbBQ.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-Dp7a8oom.mjs +1 -0
- package/dist/web-components/{tip-dWhupWSr.mjs → tip-C-oovDZK.mjs} +1 -1
- package/dist/web-components/{toggle-BQTjR1I3.mjs → toggle-C7ODWDEZ.mjs} +1 -1
- package/dist/web-components/upgrade-eNW0DPXq.mjs +1 -0
- package/dist/web-components/upgrader-BlbMUEH6.mjs +1 -0
- package/dist/web-components/useContainerName-CrOmY-km.mjs +1 -0
- package/dist/web-components/useNearViewport-BqXi9Gn4.mjs +1 -0
- package/dist/web-components/{useScrollTrack-WbG28FPD.mjs → useScrollTrack-CEsOU2yT.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +1 -0
- package/dist/web-components/viewer/AnnotationMenu-DPOSehBo.mjs +1 -0
- package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +1 -0
- package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +2 -0
- package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-CAmzJD5P.mjs → Canvas2DBackend-BTK6ZJh0.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +1 -0
- package/dist/web-components/viewer/ChoiceMenu-DQ1x572Y.mjs +1 -0
- package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +1 -0
- package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +1 -0
- package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +1 -0
- package/dist/web-components/viewer/Contents-DrXckx7d.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-4u6U6yqb.mjs +1 -0
- package/dist/web-components/viewer/Cue-C-aF8peC.mjs +1 -0
- package/dist/web-components/viewer/Document-BN1rICu3.mjs +1 -0
- package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-DRdQSEtN.mjs → DomLayers-CGkDtemL.mjs} +1 -1
- package/dist/web-components/viewer/Download-CawEl9MN.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +1 -0
- package/dist/web-components/viewer/FieldPill-DFXGWrvB.mjs +1 -0
- package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +1 -0
- package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +1 -0
- package/dist/web-components/viewer/HideToggle-DP5kHzWM.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +1 -0
- package/dist/web-components/viewer/{LightboxBody-CXMc1xOH.mjs → LightboxBody-C2T7IC29.mjs} +1 -1
- package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +1 -0
- package/dist/web-components/viewer/MapView-BN9wXQKV.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +1 -0
- package/dist/web-components/viewer/NavDate-C2-wwLuB.mjs +1 -0
- package/dist/web-components/viewer/{Navigator-CKwDgG2x.mjs → Navigator-C3jghOd3.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +1 -0
- package/dist/web-components/viewer/PartOfManifest-D22yMgCf.mjs +1 -0
- package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +1 -0
- package/dist/web-components/viewer/Search-DC259m4f.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +1 -0
- package/dist/web-components/viewer/Steps-Bw32X5xO.mjs +1 -0
- package/dist/web-components/viewer/TargetItems-DLhUH1Gq.mjs +1 -0
- package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +1 -0
- package/dist/web-components/viewer/annotations-content-CbA3eOIC.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-CynoKdta.mjs → cloverEngine-C04bCSFR.mjs} +2 -2
- package/dist/web-components/viewer/content-state-reader-C7UBMOq3.mjs +1 -0
- package/dist/web-components/viewer/fetchManifest-C2Yxg3x9.mjs +1 -0
- package/dist/web-components/viewer/{host-DlCltI_c.mjs → host-CZeyjCKR.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-B09fporZ.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/link-DssZ0Z2N.mjs +1 -0
- package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +1 -0
- package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +1 -0
- package/dist/web-components/viewer/{renderers-C_wdmw9v.mjs → renderers-DLoqv3QO.mjs} +1 -1
- package/dist/web-components/viewer/save-file-CJT5p5Hg.mjs +1 -0
- package/dist/web-components/viewer/{search-BHLyNxZ6.mjs → search-PhOwMKHi.mjs} +1 -1
- package/dist/web-components/viewer/styles-NZLnZPAC.mjs +1 -0
- package/dist/web-components/viewer/viewer-D30YHqyF.mjs +29 -0
- package/dist/web-components/viewer/{vtt-XiS_-5Ao.mjs → vtt-1Pk7Dhsj.mjs} +1 -1
- package/dist/web-components/viewer-CH7re5OO.mjs +1 -0
- package/dist/web-components/{vtt-DYAOuQoK.mjs → vtt-CacHieeN.mjs} +1 -1
- package/package.json +8 -4
- package/dist/i18n/reader.mjs +0 -13
- package/dist/web-components/About-DbrFSVBm.mjs +0 -1
- package/dist/web-components/AnnotationMenu-EBjIQpQl.mjs +0 -1
- package/dist/web-components/AnnotationState-DQTaO6Gz.mjs +0 -1
- package/dist/web-components/Annotations-Cb9U7HJ_.mjs +0 -2
- package/dist/web-components/Annotations-Dl0SgHBS.mjs +0 -1
- package/dist/web-components/Body-DxSz3iST.mjs +0 -1
- package/dist/web-components/BodyAlert-C8EOXz24.mjs +0 -1
- package/dist/web-components/Button-uWgfvqsL.mjs +0 -1
- package/dist/web-components/CanvasView-BI3YzNdK.mjs +0 -1
- package/dist/web-components/CaptionDetails-B80ZhZ7v.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DCp7-co7.mjs +0 -1
- package/dist/web-components/Collection-B1Le2_TU.mjs +0 -1
- package/dist/web-components/CollectionSelect-BL_jQog-.mjs +0 -1
- package/dist/web-components/Connected-BxqaRL9o.mjs +0 -1
- package/dist/web-components/Connected-DCBI-j9H.mjs +0 -1
- package/dist/web-components/Connected-DkhfVWxd.mjs +0 -1
- package/dist/web-components/Contents-zYEGHLfe.mjs +0 -1
- package/dist/web-components/ControlMenu-CAHiLAtl.mjs +0 -1
- package/dist/web-components/Cue-BT2V9VAq.mjs +0 -1
- package/dist/web-components/Document-BdCjGnJN.mjs +0 -1
- package/dist/web-components/DocumentPanel-X_Rta0Wu.mjs +0 -1
- package/dist/web-components/Download-DqU-goFi.mjs +0 -1
- package/dist/web-components/EntryBodies-DXAQH0vR.mjs +0 -1
- package/dist/web-components/ErrorBoundary-chQaO-Up.mjs +0 -1
- package/dist/web-components/FieldPill-CyEssPVm.mjs +0 -1
- package/dist/web-components/FrameAnimation-Bb0pOoRl.mjs +0 -1
- package/dist/web-components/Gallery-BXU3TcT3.mjs +0 -1
- package/dist/web-components/HideToggle-BwMrOBMu.mjs +0 -1
- package/dist/web-components/Items-DRj1UEpC.mjs +0 -1
- package/dist/web-components/Label-D6aVJB9s.mjs +0 -1
- package/dist/web-components/LightboxBody-BzXQGMDn.mjs +0 -1
- package/dist/web-components/LoadedCanvas-DOjtxLSe.mjs +0 -1
- package/dist/web-components/LoadedMap-DouDS2lO.mjs +0 -1
- package/dist/web-components/MapView-CD5zkTs8.mjs +0 -1
- package/dist/web-components/Markup-C1hMA8wk.mjs +0 -2
- package/dist/web-components/MediaBody-B_Gii4we.mjs +0 -1
- package/dist/web-components/MediaBody-BfrKIPte.mjs +0 -1
- package/dist/web-components/Pager-Di_2hHM3.mjs +0 -1
- package/dist/web-components/Panel-DbsC8A9V.mjs +0 -1
- package/dist/web-components/PartOfManifest-7eOwURrF.mjs +0 -1
- package/dist/web-components/Primitives-XQO3m1wG.mjs +0 -1
- package/dist/web-components/Provider-B61118lU.mjs +0 -1
- package/dist/web-components/ReadMore-BJH-qqte.mjs +0 -1
- package/dist/web-components/Root-Dj277K6p.mjs +0 -1
- package/dist/web-components/Scene-BTWpLeec.mjs +0 -1
- package/dist/web-components/SceneView-BYo7WmPt.mjs +0 -1
- package/dist/web-components/Search-ZV8FFN4p.mjs +0 -1
- package/dist/web-components/Sections-ejwu1_Sm.mjs +0 -2
- package/dist/web-components/StandaloneItems-BYaiyCca.mjs +0 -1
- package/dist/web-components/Status-YbQK2KzY.mjs +0 -1
- package/dist/web-components/Timeline-ByyVSd7B.mjs +0 -1
- package/dist/web-components/Tip-IO11xX4x.mjs +0 -1
- package/dist/web-components/Transcript-D0gUxUoA.mjs +0 -1
- package/dist/web-components/annotation-collection-Csv7WIlm.mjs +0 -1
- package/dist/web-components/annotations-content-BS_OFz5Z.mjs +0 -1
- package/dist/web-components/body-CKjwwFep.mjs +0 -1
- package/dist/web-components/canvas-CIzpp-Uz.mjs +0 -1
- package/dist/web-components/content-state-reader-D1BkpICh.mjs +0 -1
- package/dist/web-components/es-BwMkoRod.mjs +0 -1
- package/dist/web-components/fi-gPFOn9RK.mjs +0 -1
- package/dist/web-components/fr-DUHmgdJo.mjs +0 -1
- package/dist/web-components/fromManifest-BhemHaoA.mjs +0 -1
- package/dist/web-components/glyphs-drROkef9.mjs +0 -1
- package/dist/web-components/hooks-BXzQSllm.mjs +0 -1
- package/dist/web-components/index-B7nZdqLg.mjs +0 -1
- package/dist/web-components/items-CB2Uk7ts.mjs +0 -1
- package/dist/web-components/items-jfQ5XzEj.mjs +0 -1
- package/dist/web-components/keep-fragments-B5nlv2ck.mjs +0 -1
- package/dist/web-components/label-Vbg_cMOJ.mjs +0 -1
- package/dist/web-components/layout-mMHI0lsj.mjs +0 -1
- package/dist/web-components/link-ZRnv5NFR.mjs +0 -1
- package/dist/web-components/logo-Boy6u4m2.mjs +0 -1
- package/dist/web-components/models-D1EE_CmH.mjs +0 -1
- package/dist/web-components/nb-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/nn-Dg2_HdZu.mjs +0 -1
- package/dist/web-components/no-BSvnQ6jd.mjs +0 -1
- package/dist/web-components/part-cUiPs2-y.mjs +0 -1
- package/dist/web-components/playerSurface-CU5XxI1j.mjs +0 -1
- package/dist/web-components/pt-B3J80JgO.mjs +0 -1
- package/dist/web-components/read-more-DNHNtG-a.mjs +0 -1
- package/dist/web-components/rendererSurface-DhIlOjGT.mjs +0 -22
- package/dist/web-components/sanitize-Dc7nOsgO.mjs +0 -3
- package/dist/web-components/search-CLy2Wj01.mjs +0 -1
- package/dist/web-components/shared-YUjOSBKO.mjs +0 -1
- package/dist/web-components/styles-CyuM_fB1.mjs +0 -1
- package/dist/web-components/thumbnail-c2K_iQsD.mjs +0 -1
- package/dist/web-components/time-B9GZoYcm.mjs +0 -1
- package/dist/web-components/upgrader-XNxI-5jo.mjs +0 -1
- package/dist/web-components/useContainerName-BpJ3IWY0.mjs +0 -1
- package/dist/web-components/useNearViewport-CtLyYg9n.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-ZKyBeyUU.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-DO33zokc.mjs +0 -1
- package/dist/web-components/viewer/Annotations-BOjhr5ks.mjs +0 -1
- package/dist/web-components/viewer/Annotations-DkLueFLK.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-DOJlUtOn.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-BDq6H34G.mjs +0 -1
- package/dist/web-components/viewer/Collection-By3puO0V.mjs +0 -1
- package/dist/web-components/viewer/Connected-DZNO2CPf.mjs +0 -1
- package/dist/web-components/viewer/Connected-ESg5y49m.mjs +0 -1
- package/dist/web-components/viewer/Contents-B_FqDwTW.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DdQl-dTf.mjs +0 -1
- package/dist/web-components/viewer/Cue-BTRHfiWQ.mjs +0 -1
- package/dist/web-components/viewer/Document-B9_PyD2w.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CtEJVPoE.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-CJuTRcTq.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-06uwrNwE.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-3dcDHf5q.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BYasTqZc.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-BxkNMX-T.mjs +0 -1
- package/dist/web-components/viewer/MapView-DCerrRRV.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-BdkJcyGy.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-waF4KvHp.mjs +0 -1
- package/dist/web-components/viewer/PartOfManifest-DalHJFwC.mjs +0 -1
- package/dist/web-components/viewer/Search-Di_QQfDb.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-B9J6nnWn.mjs +0 -1
- package/dist/web-components/viewer/Transcript-aHOixfna.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-I2UkdobR.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-D-i4j9pD.mjs +0 -1
- package/dist/web-components/viewer/content-state-reader-D7GIMcKK.mjs +0 -1
- package/dist/web-components/viewer/link-BX-wzj1u.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CHqn1fG8.mjs +0 -1
- package/dist/web-components/viewer/styles-BRCkEU3w.mjs +0 -1
- package/dist/web-components/viewer/viewer-ipqAA-xQ.mjs +0 -28
- package/dist/web-components/viewer-DEHIsIHd.mjs +0 -1
- /package/dist/{ui → i18n}/languageCode.mjs +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -52,8 +52,10 @@ export interface LocalizedValue {
|
|
|
52
52
|
export declare function localize(value: LanguageMapLike, language?: string, separator?: string): LocalizedValue;
|
|
53
53
|
/**
|
|
54
54
|
* What an annotation says: its text bodies (plain, HTML or Markdown, as their `format`
|
|
55
|
-
* says)
|
|
56
|
-
*
|
|
55
|
+
* says), its images (Cookbook 0377) and its named places (Cookbook 0139), each read too
|
|
56
|
+
* where a `SpecificResource` holds it as its `source` (Cookbook 0045: a comment's words,
|
|
57
|
+
* given a `styleClass`). Caption files belong to the media transcript, so are left out.
|
|
58
|
+
* Light, for the Canvas's caption as well as the lists.
|
|
57
59
|
*/
|
|
58
60
|
export interface AnnotationBodyEntry {
|
|
59
61
|
/** `TextualBody` text, as published: plain, or IIIF's limited HTML. */
|
|
@@ -62,8 +64,22 @@ export interface AnnotationBodyEntry {
|
|
|
62
64
|
language?: string;
|
|
63
65
|
/** An image body (Cookbook 0377): its URL. */
|
|
64
66
|
image?: string;
|
|
65
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* An image body's label, else its annotation's: the image's text alternative. A place's
|
|
69
|
+
* name, its feature's `label`, else its annotation's.
|
|
70
|
+
*/
|
|
66
71
|
label?: LanguageMapLike;
|
|
72
|
+
/**
|
|
73
|
+
* A place, a GeoJSON `Feature` (Cookbook 0139: a map on the page, tagged with where it
|
|
74
|
+
* shows): named by its `label`, which the Map draws it under too.
|
|
75
|
+
*/
|
|
76
|
+
place?: true;
|
|
77
|
+
/**
|
|
78
|
+
* One item of a `Choice` (Cookbook 0346: the same words in English and in Japanese), by
|
|
79
|
+
* the choice's place among the annotation's: of each, one shows, the one in the reader's
|
|
80
|
+
* language (`bodyInLanguage`, `core/annotation-name.ts`).
|
|
81
|
+
*/
|
|
82
|
+
choice?: number;
|
|
67
83
|
}
|
|
68
84
|
/**
|
|
69
85
|
* Clover's one data shape: IIIF Presentation 4.
|
|
@@ -71,7 +87,8 @@ export interface AnnotationBodyEntry {
|
|
|
71
87
|
* Every resource is upgraded to Presentation 4 on the way in, so no part is written for
|
|
72
88
|
* several shapes. Presentation 2.1 and 3.0 are upgraded by `@iiif/parser`; Presentation 4
|
|
73
89
|
* passes through untouched. The upgrader is imported on demand, so it costs nothing until
|
|
74
|
-
* the first resource that needs it arrives
|
|
90
|
+
* the first resource that needs it arrives, and its reader of Presentation 2 only with
|
|
91
|
+
* the first resource in 2.
|
|
75
92
|
*/
|
|
76
93
|
export type Manifest = P4.Manifest;
|
|
77
94
|
export type Presentation4Canvas = P4.Canvas;
|
|
@@ -85,7 +102,8 @@ export type Presentation4Timeline = P4.Timeline;
|
|
|
85
102
|
export type Container = Presentation4Canvas | Presentation4Timeline | Presentation4Scene;
|
|
86
103
|
/**
|
|
87
104
|
* `resource` as Presentation 4: a Manifest, Collection, Canvas, Timeline or Scene from any
|
|
88
|
-
* supported version. Presentation 4 input is returned as it is
|
|
105
|
+
* supported version. Presentation 4 input is returned as it is; the rest is upgraded as
|
|
106
|
+
* `upgrade.ts` reads it, loaded with the upgrader.
|
|
89
107
|
*/
|
|
90
108
|
export declare function toPresentation4<T = Manifest | Presentation4Collection | Container>(resource: unknown): Promise<T>;
|
|
91
109
|
/**
|
|
@@ -108,12 +126,78 @@ export interface AnnotationEntry {
|
|
|
108
126
|
bodies: AnnotationBodyEntry[];
|
|
109
127
|
/** The annotation as published, for a host's own rendering. */
|
|
110
128
|
annotation: Record<string, any>;
|
|
129
|
+
/**
|
|
130
|
+
* A Range's region (`range-regions.ts`): its place among the Range's parts, "1 of 4",
|
|
131
|
+
* which its hotspot shows after its name.
|
|
132
|
+
*/
|
|
133
|
+
place?: {
|
|
134
|
+
index: number;
|
|
135
|
+
total: number;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* An annotation of one image of a `Choice` (Cookbook 0326: an X-ray's tag), not of the
|
|
139
|
+
* Canvas: the choice's key (`core/choice-key.ts`), the item's place in it, and the
|
|
140
|
+
* image's id. It is drawn while that item is the one chosen, and its `target` is given
|
|
141
|
+
* here in the Canvas's terms, placed through the image's painting.
|
|
142
|
+
*/
|
|
143
|
+
layer?: {
|
|
144
|
+
key: string;
|
|
145
|
+
item: number;
|
|
146
|
+
image: string;
|
|
147
|
+
};
|
|
111
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* The set of the regions the Manifest's Ranges name (`range-regions.ts`), drawn as
|
|
151
|
+
* annotations, listed by Contents.
|
|
152
|
+
*/
|
|
153
|
+
export declare const CONTENTS_SET_ID = "contents";
|
|
112
154
|
export interface AnnotationSet {
|
|
113
155
|
id: string;
|
|
114
156
|
label?: LanguageMapLike;
|
|
115
|
-
/**
|
|
116
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Where it came from: the Manifest's Canvases, the host, a Content Search, or the
|
|
159
|
+
* regions the Manifest's Ranges name (`contentsSet`).
|
|
160
|
+
*/
|
|
161
|
+
source: "manifest" | "added" | "search" | "contents";
|
|
162
|
+
entries: AnnotationEntry[];
|
|
163
|
+
/** The AnnotationCollection its page is `partOf`, by id (Cookbook 0309). */
|
|
164
|
+
collection?: string;
|
|
165
|
+
/**
|
|
166
|
+
* The AnnotationPage or AnnotationCollection it was given as, where it is the Root's
|
|
167
|
+
* content (James Turner's tags across Manifests), walked as one whole.
|
|
168
|
+
*/
|
|
169
|
+
content?: {
|
|
170
|
+
id: string;
|
|
171
|
+
type: "AnnotationPage" | "AnnotationCollection";
|
|
172
|
+
label?: LanguageMapLike;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/** An annotation page a Canvas names: by id, its Canvas, and whether it is fetched. */
|
|
176
|
+
export interface AnnotationPageRef {
|
|
177
|
+
id: string;
|
|
178
|
+
canvasId: string;
|
|
179
|
+
fetched: boolean;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Annotations walked as one whole, as a viewer walks a Collection's members: the
|
|
183
|
+
* AnnotationPage or AnnotationCollection given as the content (James Turner's tags across
|
|
184
|
+
* Manifests, all in hand), else an AnnotationCollection the Manifest's annotation pages
|
|
185
|
+
* are part of (Cookbook 0309: layout markup across a newspaper's pages, managed as one
|
|
186
|
+
* whole), whose pages load as the reader reaches them.
|
|
187
|
+
*/
|
|
188
|
+
export interface AnnotationCollection {
|
|
189
|
+
id: string;
|
|
190
|
+
type: "AnnotationPage" | "AnnotationCollection";
|
|
191
|
+
label?: LanguageMapLike;
|
|
192
|
+
/** The number of its annotations, where it says. */
|
|
193
|
+
total?: number;
|
|
194
|
+
/**
|
|
195
|
+
* The Manifest's pages of it, in the Canvases' order, so a listing loads them as the
|
|
196
|
+
* reader reaches them (`usePagesReached`, `clover.fetchAnnotationPages`). None for the
|
|
197
|
+
* content's, whose annotations are all in hand.
|
|
198
|
+
*/
|
|
199
|
+
pages: AnnotationPageRef[];
|
|
200
|
+
/** Its annotations on the Manifest's Canvases, in their order, as far as fetched. */
|
|
117
201
|
entries: AnnotationEntry[];
|
|
118
202
|
}
|
|
119
203
|
/**
|
|
@@ -161,6 +245,34 @@ export interface Target {
|
|
|
161
245
|
/** Start playback on arrival (auto-advance from the previous Canvas). */
|
|
162
246
|
autoplay?: boolean;
|
|
163
247
|
}
|
|
248
|
+
/** One of a content state's several targets: a Manifest, and a place in it. */
|
|
249
|
+
export interface ContentTarget {
|
|
250
|
+
/** Its own id: the content state's, with its place among the targets. */
|
|
251
|
+
id: string;
|
|
252
|
+
/** Where its Manifest is: the address it is loaded from. */
|
|
253
|
+
manifestId: string;
|
|
254
|
+
/**
|
|
255
|
+
* The id its Manifest gives itself, once loaded, where it is not that address (Cookbook
|
|
256
|
+
* 0540's are `…/manifest.json/manifest.json`, served at `…/manifest.json`).
|
|
257
|
+
*/
|
|
258
|
+
manifestAs?: string;
|
|
259
|
+
canvasId?: string;
|
|
260
|
+
/** In the Canvas's own coordinates. */
|
|
261
|
+
region?: {
|
|
262
|
+
x: number;
|
|
263
|
+
y: number;
|
|
264
|
+
w: number;
|
|
265
|
+
h: number;
|
|
266
|
+
};
|
|
267
|
+
/** Seconds into a time-based Canvas. */
|
|
268
|
+
time?: number;
|
|
269
|
+
}
|
|
270
|
+
/** A content state's targets, in its order, and its own `label` where it gives one. */
|
|
271
|
+
export interface ContentTargets {
|
|
272
|
+
id: string;
|
|
273
|
+
label?: Record<string, string[]>;
|
|
274
|
+
items: ContentTarget[];
|
|
275
|
+
}
|
|
164
276
|
/** A content state as a link carries it: base64url of the URI-encoded JSON, unpadded. */
|
|
165
277
|
export declare function encodeContentState(json: unknown): string;
|
|
166
278
|
export interface ContentStateOutput {
|
|
@@ -273,6 +385,12 @@ export interface CloverState {
|
|
|
273
385
|
manifest: Manifest | null;
|
|
274
386
|
/** The Collection it was reached through, if any. */
|
|
275
387
|
collection: Presentation4Collection | null;
|
|
388
|
+
/**
|
|
389
|
+
* Whether the content was that Collection (or a content state opening it): the Manifest
|
|
390
|
+
* shown is one of its members, which the reader moves between. False for a Collection
|
|
391
|
+
* read only from the Manifest's `partOf` (`openCollection`), and for no Collection.
|
|
392
|
+
*/
|
|
393
|
+
throughCollection: boolean;
|
|
276
394
|
/** The Canvas the reader is on: the first of the view that shows it. */
|
|
277
395
|
canvasId: string | null;
|
|
278
396
|
/** Where to go once the view is drawn: a region, a time. Consumed once applied. */
|
|
@@ -286,10 +404,28 @@ export interface CloverState {
|
|
|
286
404
|
* drawn is `selectHiddenSets`'s.
|
|
287
405
|
*/
|
|
288
406
|
shownSets: string[];
|
|
289
|
-
/**
|
|
407
|
+
/**
|
|
408
|
+
* Sets beside the Manifest's own pages: its images' own (Cookbook 0326, read once it is
|
|
409
|
+
* shown, their module loaded then), the host's through `annotations`, and a content
|
|
410
|
+
* state's note.
|
|
411
|
+
*/
|
|
290
412
|
addedSets: AnnotationSet[];
|
|
291
413
|
/** A Content Search of the Manifest: its query, progress and hits. */
|
|
292
414
|
search: SearchState;
|
|
415
|
+
/**
|
|
416
|
+
* The regions the Manifest's Ranges name, as a set the Canvas draws (Cookbook 0025),
|
|
417
|
+
* read once a Manifest whose Ranges name one is shown, its module loaded then; null
|
|
418
|
+
* until then and for one without (`range-regions.ts`).
|
|
419
|
+
*/
|
|
420
|
+
regions: AnnotationSet | null;
|
|
421
|
+
/**
|
|
422
|
+
* A content state's several targets (Cookbook 0540: two Canvases from two Manifests),
|
|
423
|
+
* opened on the first, each to be gone to in turn (`goToTarget`); null for one target,
|
|
424
|
+
* and for any other content. They stay through moves among them, until the next content.
|
|
425
|
+
*/
|
|
426
|
+
targets: ContentTargets | null;
|
|
427
|
+
/** The target last gone to: which one is current where two are on the same view. */
|
|
428
|
+
targetIndex: number | null;
|
|
293
429
|
}
|
|
294
430
|
export interface SearchState {
|
|
295
431
|
query: string;
|
|
@@ -337,6 +473,12 @@ export interface Clover {
|
|
|
337
473
|
highlight: Channel<string | null>;
|
|
338
474
|
/** The chapter (its Range's id) under the pointer on a seek bar, or in `Contents`. */
|
|
339
475
|
chapter: Channel<string | null>;
|
|
476
|
+
/**
|
|
477
|
+
* The annotation the reader asked to find (`selectAnnotation`), each time they ask, the
|
|
478
|
+
* one selected already among them: the Canvas frames it again, after the reader has
|
|
479
|
+
* moved the view away (Cookbook 0021).
|
|
480
|
+
*/
|
|
481
|
+
found: Channel<string | null>;
|
|
340
482
|
readonly request: CloverRequest | undefined;
|
|
341
483
|
setRequest(request: CloverRequest | undefined): void;
|
|
342
484
|
/** Load content. `canvasId` wins over everything; `defaultCanvasId` over `start`. */
|
|
@@ -349,6 +491,12 @@ export interface Clover {
|
|
|
349
491
|
goToManifest(id: string, canvasId?: string): Promise<void>;
|
|
350
492
|
/** A controlled host's Manifest, shown without asking it again. */
|
|
351
493
|
syncManifest(id: string | null): Promise<void>;
|
|
494
|
+
/**
|
|
495
|
+
* Go to one of a content state's targets (`state.targets`), by its place among them:
|
|
496
|
+
* its Manifest opened where it is not the one shown (or the host asked, when it holds
|
|
497
|
+
* the Manifest), then its Canvas, and its region or time.
|
|
498
|
+
*/
|
|
499
|
+
goToTarget(index: number): void;
|
|
352
500
|
/**
|
|
353
501
|
* Show a Collection the Manifest is part of (its `partOf`) beside it: the Collection's
|
|
354
502
|
* members become a choice, while the Manifest and the reader's place stay as they are.
|
|
@@ -394,6 +542,12 @@ export interface Clover {
|
|
|
394
542
|
* `scope="all"`). Returns the release.
|
|
395
543
|
*/
|
|
396
544
|
holdAllAnnotationPages(): () => void;
|
|
545
|
+
/**
|
|
546
|
+
* Fetch these referenced annotation pages, each once, wherever the Manifest's Canvases
|
|
547
|
+
* name them: a listing that loads its pages as the reader reaches them (an
|
|
548
|
+
* AnnotationCollection's, Cookbook 0309), rather than all at once.
|
|
549
|
+
*/
|
|
550
|
+
fetchAnnotationPages(pageIds: string[]): void;
|
|
397
551
|
/** Abandon any load in flight. The instance stays usable. */
|
|
398
552
|
dispose(): void;
|
|
399
553
|
}
|
|
@@ -475,6 +629,14 @@ export interface RootProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
|
|
|
475
629
|
request?: CloverRequest;
|
|
476
630
|
/** The language to read IIIF text in. The reader's, by default. */
|
|
477
631
|
language?: string;
|
|
632
|
+
/**
|
|
633
|
+
* Clover's higher-contrast mode, for every part inside: the accent kept to rings,
|
|
634
|
+
* outlines and marks, and never under words or a glyph, where the controls' dark fill
|
|
635
|
+
* takes its place, edged in the accent. For an accent that cannot carry white text at
|
|
636
|
+
* 4.5:1. It is on wherever the reader's system asks for more contrast, too. Default
|
|
637
|
+
* `false`.
|
|
638
|
+
*/
|
|
639
|
+
highContrast?: boolean;
|
|
478
640
|
/**
|
|
479
641
|
* Renderers of your own for some views — by Canvas id, painting format, or a test —
|
|
480
642
|
* drawn by every `Body` inside in place of `Canvas` (3.x's `customDisplays`).
|
|
@@ -564,6 +726,11 @@ export type CanvasRendererEvent =
|
|
|
564
726
|
| "viewport"
|
|
565
727
|
/** A new set of images replaced the previous one. */
|
|
566
728
|
| "change" | "error"
|
|
729
|
+
/**
|
|
730
|
+
* Whether nothing the scene paints could be loaded (its detail): every image failed to
|
|
731
|
+
* prepare, or every tile it wanted failed for good. Fires as that changes.
|
|
732
|
+
*/
|
|
733
|
+
| "unloadable"
|
|
567
734
|
/** The backend changed (fallback, or a context released and reacquired). */
|
|
568
735
|
| "backend"
|
|
569
736
|
/** A click that is not a zoom, with click-to-zoom turned off. */
|
|
@@ -717,6 +884,19 @@ export interface CanvasAnnotation {
|
|
|
717
884
|
pageLabel?: LanguageMapLike;
|
|
718
885
|
/** Its AnnotationPage's `id`, by which the menu hides its page (`hiddenPages`). */
|
|
719
886
|
pageId?: string;
|
|
887
|
+
/** A Range's region: its place among the Range's parts (`AnnotationEntry`'s). */
|
|
888
|
+
place?: {
|
|
889
|
+
index: number;
|
|
890
|
+
total: number;
|
|
891
|
+
};
|
|
892
|
+
/**
|
|
893
|
+
* An annotation of one item of a `Choice` (Cookbook 0326): drawn while that item is the
|
|
894
|
+
* one chosen, by the choice's key and the item's place (`AnnotationEntry`'s).
|
|
895
|
+
*/
|
|
896
|
+
layer?: {
|
|
897
|
+
key: string;
|
|
898
|
+
item: number;
|
|
899
|
+
};
|
|
720
900
|
}
|
|
721
901
|
/**
|
|
722
902
|
* Everything a control needs in order to work, ready to spread onto a button: the id, the
|
|
@@ -786,6 +966,11 @@ export interface CanvasControlsConfig {
|
|
|
786
966
|
* Shown only when a Canvas has either.
|
|
787
967
|
*/
|
|
788
968
|
information?: boolean;
|
|
969
|
+
/**
|
|
970
|
+
* A map control that shows where the Canvas, else its Manifest, is (its `navPlace`), on a
|
|
971
|
+
* map in a box, as the information is. Shown only when one of them has a place.
|
|
972
|
+
*/
|
|
973
|
+
map?: boolean;
|
|
789
974
|
}
|
|
790
975
|
export interface CloverCanvasOptions {
|
|
791
976
|
/** Which painter to use. `auto` (default) tries WebGL2, then Canvas2D. */
|
|
@@ -907,6 +1092,13 @@ export interface CloverCanvasProps {
|
|
|
907
1092
|
* default; inside a `Root`, the Root's.
|
|
908
1093
|
*/
|
|
909
1094
|
language?: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Clover's higher-contrast mode: the accent kept to rings, outlines and marks, and never
|
|
1097
|
+
* under words or a glyph, where the controls' dark fill takes its place, edged in the
|
|
1098
|
+
* accent. Inside a `Root`, the Root's too; on wherever the reader's system asks for more
|
|
1099
|
+
* contrast. Default `false`.
|
|
1100
|
+
*/
|
|
1101
|
+
highContrast?: boolean;
|
|
910
1102
|
/** Stable id for this instance. A new id remounts the renderer. */
|
|
911
1103
|
instanceId?: string;
|
|
912
1104
|
className?: string;
|
|
@@ -931,6 +1123,11 @@ export interface CloverCanvasProps {
|
|
|
931
1123
|
* targets are drawn; coordinates are the target image's own.
|
|
932
1124
|
*/
|
|
933
1125
|
annotations?: CanvasAnnotation[];
|
|
1126
|
+
/**
|
|
1127
|
+
* The Manifest's `navPlace`, a GeoJSON FeatureCollection: where it is, which the map
|
|
1128
|
+
* control shows where the Canvases shown have none of their own.
|
|
1129
|
+
*/
|
|
1130
|
+
navPlace?: unknown;
|
|
934
1131
|
/**
|
|
935
1132
|
* The AnnotationPages (each annotation's `pageId`) whose annotations are hidden: none
|
|
936
1133
|
* of them is drawn, but the annotations menu still lists them under their page, with
|
|
@@ -1023,6 +1220,12 @@ export interface CloverCanvasProps {
|
|
|
1023
1220
|
lang?: string;
|
|
1024
1221
|
start: number;
|
|
1025
1222
|
end?: number;
|
|
1223
|
+
/**
|
|
1224
|
+
* A picture of it, over it on the seek bar and under it in the menu while it plays:
|
|
1225
|
+
* a URL, shown as it is, or a IIIF image (a Range's `thumbnail`), asked of its
|
|
1226
|
+
* service as its `info.json` allows. Inside a `Root`, its Range's `thumbnail`.
|
|
1227
|
+
*/
|
|
1228
|
+
thumbnail?: string | Record<string, unknown>;
|
|
1026
1229
|
}>;
|
|
1027
1230
|
/** A chapter (by its `id`) to mark on the seek bar, as hovering it in a list does. */
|
|
1028
1231
|
highlightedChapter?: string | null;
|
|
@@ -1072,17 +1275,11 @@ export interface LabelProps extends Omit<React.HTMLAttributes<HTMLElement>, "lan
|
|
|
1072
1275
|
* none.
|
|
1073
1276
|
*/
|
|
1074
1277
|
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLElement>>;
|
|
1075
|
-
/**
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
of?: StepsOf;
|
|
1081
|
-
}
|
|
1082
|
-
/** Go to the previous item. `aria-disabled` on the first. */
|
|
1083
|
-
export declare const Previous: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1084
|
-
/** Go to the next item. `aria-disabled` on the last. */
|
|
1085
|
-
export declare const Next: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1278
|
+
/**
|
|
1279
|
+
* What the pieces step through inside a Root: its views, its Collection's members, or a
|
|
1280
|
+
* content state's targets (Cookbook 0540).
|
|
1281
|
+
*/
|
|
1282
|
+
export type StepsOf = "views" | "members" | "targets";
|
|
1086
1283
|
export interface PositionProps extends React.HTMLAttributes<HTMLElement> {
|
|
1087
1284
|
/** What it counts: the Root's views (default), or its Collection's members. */
|
|
1088
1285
|
of?: StepsOf;
|
|
@@ -1094,6 +1291,32 @@ export interface PositionProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1094
1291
|
* bare slash would leave to guesswork.
|
|
1095
1292
|
*/
|
|
1096
1293
|
export declare const Position: React.ForwardRefExoticComponent<PositionProps & React.RefAttributes<HTMLElement>>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Stepping through Items one at a time: `Previous`, `Next` and `Position`, and the three
|
|
1296
|
+
* together as Items' `pager` layout (`<Clover.Items layout="pager" />`).
|
|
1297
|
+
*
|
|
1298
|
+
* They step through what Items lists: the Root's views (a paged book a spread at a time),
|
|
1299
|
+
* or with `of="members"` the Collection's Manifests. The arrows follow the Manifest's
|
|
1300
|
+
* `viewingDirection`: in a right-to-left book, "previous" points right. Each renders
|
|
1301
|
+
* nothing when there is only one item.
|
|
1302
|
+
*
|
|
1303
|
+
* `Previous` and `Next` are round controls with an arrow, as Items' own arrows are: the
|
|
1304
|
+
* name is hidden from sight but not from assistive technology, and shows on hover and
|
|
1305
|
+
* focus. Where there is nowhere to go, each shows disabled.
|
|
1306
|
+
*
|
|
1307
|
+
* This module reads no thumbnails: a layout with a pager and no strip carries none of it.
|
|
1308
|
+
* `Position` and the steps the three read are `Position.tsx`, which a page counting its
|
|
1309
|
+
* views loads without the rest.
|
|
1310
|
+
*/
|
|
1311
|
+
export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children">;
|
|
1312
|
+
export interface StepProps extends ButtonProps {
|
|
1313
|
+
/** What it steps through: the Root's views (default), or its Collection's members. */
|
|
1314
|
+
of?: StepsOf;
|
|
1315
|
+
}
|
|
1316
|
+
/** Go to the previous item. `aria-disabled` on the first. */
|
|
1317
|
+
export declare const Previous: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1318
|
+
/** Go to the next item. `aria-disabled` on the last. */
|
|
1319
|
+
export declare const Next: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1097
1320
|
/**
|
|
1098
1321
|
* What `Items` shows: light models of a Manifest's views or a Collection's members, never
|
|
1099
1322
|
* the resources themselves, so a long sequence costs a few fields per item.
|
|
@@ -1110,6 +1333,11 @@ export interface ItemPart {
|
|
|
1110
1333
|
duration?: number;
|
|
1111
1334
|
/** What it mostly paints: `Image`, `Video`, `Audio` (`Sound` in Presentation 3) or `Model`. */
|
|
1112
1335
|
media?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Its picture, where it is not the resource's own: a region of its Canvas (a content
|
|
1338
|
+
* state's target, Cookbook 0540). Null for none.
|
|
1339
|
+
*/
|
|
1340
|
+
source?: ThumbnailSource | null;
|
|
1113
1341
|
}
|
|
1114
1342
|
export interface ItemModel {
|
|
1115
1343
|
/** The first Canvas of a view, or a member's id. What selecting it goes to. */
|
|
@@ -1118,8 +1346,12 @@ export interface ItemModel {
|
|
|
1118
1346
|
parts: ItemPart[];
|
|
1119
1347
|
label?: LanguageMapLike;
|
|
1120
1348
|
summary?: LanguageMapLike;
|
|
1349
|
+
/** A member's date for navigation, as written (Cookbook 0318). */
|
|
1350
|
+
navDate?: string;
|
|
1121
1351
|
/** Where a link to a member goes: its `homepage`, else its id. */
|
|
1122
1352
|
href?: string;
|
|
1353
|
+
/** That homepage's own language, where its `language` gives one. */
|
|
1354
|
+
hrefLang?: string;
|
|
1123
1355
|
}
|
|
1124
1356
|
/**
|
|
1125
1357
|
* A scrolling row of thumbnails (`slider`), a column, a wrapping grid, or one item at a
|
|
@@ -1133,10 +1365,19 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
1133
1365
|
*/
|
|
1134
1366
|
layout?: ItemsLayout;
|
|
1135
1367
|
/**
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1368
|
+
* The pager's size: `large` (the default), round controls; or `small`, its steps and
|
|
1369
|
+
* count as Search's are, for a header's line. Default `"large"`.
|
|
1138
1370
|
*/
|
|
1139
|
-
|
|
1371
|
+
size?: "large" | "small";
|
|
1372
|
+
/**
|
|
1373
|
+
* Inside a `Root`: the Manifest's views (default), the members of the Collection it
|
|
1374
|
+
* belongs to, choosing one to show, a content state's targets, where it names two or
|
|
1375
|
+
* more (Cookbook 0540), each opening its Manifest at its place, or annotations walked as
|
|
1376
|
+
* one whole: the AnnotationPage or AnnotationCollection given as the content, else the
|
|
1377
|
+
* AnnotationCollection its annotation pages are part of (Cookbook 0309), each picked
|
|
1378
|
+
* and framed on its Canvas.
|
|
1379
|
+
*/
|
|
1380
|
+
of?: "views" | "members" | "targets" | "annotations";
|
|
1140
1381
|
/**
|
|
1141
1382
|
* Standalone: a Collection (its members), a Manifest (its views) or a URL to one. Inside
|
|
1142
1383
|
* a `Root`, leave it out to list the Root's views.
|
|
@@ -1168,6 +1409,13 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
1168
1409
|
request?: CloverRequest;
|
|
1169
1410
|
/** Standalone: the language to read IIIF text in. */
|
|
1170
1411
|
language?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Clover's higher-contrast mode: the accent kept to rings, outlines and marks, and never
|
|
1414
|
+
* under words or a glyph, where the controls' dark fill takes its place, edged in the
|
|
1415
|
+
* accent. Inside a `Root`, the Root's too; on wherever the reader's system asks for more
|
|
1416
|
+
* contrast. Default `false`.
|
|
1417
|
+
*/
|
|
1418
|
+
highContrast?: boolean;
|
|
1171
1419
|
/** Replace an item's figure with your own. */
|
|
1172
1420
|
renderItem?: (item: ItemModel, state: {
|
|
1173
1421
|
selected: boolean;
|
|
@@ -1378,8 +1626,17 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
1378
1626
|
headingLevel?: number;
|
|
1379
1627
|
/** The element to render. Default `aside`. */
|
|
1380
1628
|
as?: React.ElementType;
|
|
1381
|
-
/**
|
|
1629
|
+
/**
|
|
1630
|
+
* Whether About's heading offers the downloads, by a Download button that lists the
|
|
1631
|
+
* `rendering` of the page in view and of the Manifest. Default `true`.
|
|
1632
|
+
*/
|
|
1382
1633
|
download?: boolean;
|
|
1634
|
+
/**
|
|
1635
|
+
* Where what the resource says of itself comes in several languages, About's heading
|
|
1636
|
+
* offers them, and the whole Root reads in the one chosen. Default `true`; `false`
|
|
1637
|
+
* leaves the choice out, and the Root reads in its `language`, else the reader's.
|
|
1638
|
+
*/
|
|
1639
|
+
languages?: boolean;
|
|
1383
1640
|
/**
|
|
1384
1641
|
* `Clover.Tab`s. Without any, the panel has the tabs Clover has data for: About,
|
|
1385
1642
|
* Contents when the Manifest has Ranges, Search when it has a Content Search service, a
|
|
@@ -1411,7 +1668,11 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1411
1668
|
* heading, and names its section instead (`ui/heading.ts`).
|
|
1412
1669
|
*/
|
|
1413
1670
|
headingLevel?: number;
|
|
1414
|
-
/**
|
|
1671
|
+
/**
|
|
1672
|
+
* Alone, outside a Panel: list the downloads, Download's links, in a section of their
|
|
1673
|
+
* own. In a Panel, its heading's Download button lists them (the Panel's `download`).
|
|
1674
|
+
* Default `true`.
|
|
1675
|
+
*/
|
|
1415
1676
|
download?: boolean;
|
|
1416
1677
|
/**
|
|
1417
1678
|
* The Manifest's thumbnail first, small, at its own shape, floated at the end of the
|
|
@@ -1425,6 +1686,12 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1425
1686
|
* it (Mat, 2026-10-26: "repeat label as a heading"). Default `true`.
|
|
1426
1687
|
*/
|
|
1427
1688
|
label?: boolean;
|
|
1689
|
+
/**
|
|
1690
|
+
* Alone, outside a Panel: where what the resource says of itself comes in several
|
|
1691
|
+
* languages, offer them over what About says, the whole Root reading in the one chosen.
|
|
1692
|
+
* In a Panel, its heading offers them (the Panel's `languages`). Default `true`.
|
|
1693
|
+
*/
|
|
1694
|
+
languages?: boolean;
|
|
1428
1695
|
}
|
|
1429
1696
|
/**
|
|
1430
1697
|
* Everything the Manifest says about itself, in the order 3.x's About tab shows it:
|
|
@@ -1434,8 +1701,12 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1434
1701
|
* Each part renders only if the Manifest has
|
|
1435
1702
|
* it. The downloads are Download's: the `rendering` of the page in view ("This page")
|
|
1436
1703
|
* and of the Manifest ("All pages").
|
|
1704
|
+
*
|
|
1705
|
+
* Where what it says comes in several languages, the languages to read the resource in
|
|
1706
|
+
* (`ReadingLanguages`): over what About says, or, in a Panel's `about` section, beside
|
|
1707
|
+
* its heading, where they show whichever section is open.
|
|
1437
1708
|
*/
|
|
1438
|
-
export declare function About({
|
|
1709
|
+
export declare function About({ languages, ...props }: AboutProps): React.JSX.Element;
|
|
1439
1710
|
export interface AnnotationsProps extends React.HTMLAttributes<HTMLElement> {
|
|
1440
1711
|
/**
|
|
1441
1712
|
* Every annotation in the Manifest (default), as the Viewer's panel lists them: by
|
|
@@ -1453,25 +1724,6 @@ export interface AnnotationsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1453
1724
|
headingLevel?: number;
|
|
1454
1725
|
as?: React.ElementType;
|
|
1455
1726
|
}
|
|
1456
|
-
/**
|
|
1457
|
-
* The annotations of the Root's resource — comments, tags, transcriptions — grouped by
|
|
1458
|
-
* set, as a list to read and to point with.
|
|
1459
|
-
*
|
|
1460
|
-
* - Each entry shows its content (IIIF's limited HTML, sanitized; an image body as an
|
|
1461
|
-
* image). Pressing it frames the annotation on the Canvas, going to its Canvas first if
|
|
1462
|
-
* need be. For the keyboard, a button inside it does the same, out of sight, its focus
|
|
1463
|
-
* drawn around the entry.
|
|
1464
|
-
* - Hovering or focusing an entry highlights its hotspot, and hovering a hotspot
|
|
1465
|
-
* highlights its entry: one highlight, shared through the Root, with no timers.
|
|
1466
|
-
* - Each set is headed by its AnnotationPage's own label, when it has one, and at the
|
|
1467
|
-
* header's end a toggle that hides its annotations from the Canvas (`HideToggle`: an
|
|
1468
|
-
* eye, "Hide" and the page's label, or "Hide annotations" for a page without one).
|
|
1469
|
-
* Pointed at or focused, it lights every entry it hides.
|
|
1470
|
-
* - Where the same words come as separate annotations, one per language (a transcription
|
|
1471
|
-
* and its translation), the set's header offers their languages by code ("AR", "EN"),
|
|
1472
|
-
* and lists one at a time: the Root's `language` to start, else the reader's
|
|
1473
|
-
* (`LanguageChoice`). Annotations in no language show whichever is chosen.
|
|
1474
|
-
*/
|
|
1475
1727
|
export declare const Annotations: React.ForwardRefExoticComponent<AnnotationsProps & React.RefAttributes<HTMLElement>>;
|
|
1476
1728
|
export interface TranscriptProps extends React.HTMLAttributes<HTMLElement> {
|
|
1477
1729
|
as?: React.ElementType;
|
|
@@ -1508,7 +1760,10 @@ export interface TranscriptProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1508
1760
|
* "IT") picks one: native radios, each named by its code and its file's label, in that
|
|
1509
1761
|
* label's language. In an information panel's accordion the row sits beside the
|
|
1510
1762
|
* Transcript's heading (`useSectionActions`), where it is not lost in the cues; elsewhere
|
|
1511
|
-
* it is over them.
|
|
1763
|
+
* it is over them. The Root's language wins (Mat, 2026-10-28: "there should be one
|
|
1764
|
+
* language toggle. always let root win"): the file in it is the one read, and where the
|
|
1765
|
+
* Root offers the languages to read the resource in (`useReadingLanguages`), the
|
|
1766
|
+
* Transcript offers none of its own.
|
|
1512
1767
|
*/
|
|
1513
1768
|
export declare const Transcript: React.ForwardRefExoticComponent<TranscriptProps & React.RefAttributes<HTMLElement>>;
|
|
1514
1769
|
export interface ContentsProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -1517,7 +1772,17 @@ export interface ContentsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1517
1772
|
/**
|
|
1518
1773
|
* The Manifest's table of contents, from its Ranges: chapters of a book, acts of an opera,
|
|
1519
1774
|
* nested as they nest. The entry the reader is in is marked, following playback through a
|
|
1520
|
-
* time-based Canvas.
|
|
1775
|
+
* time-based Canvas. An entry with entries under it opens and closes them by a button at
|
|
1776
|
+
* the end of its row (a disclosure, `aria-expanded`), named for it ("Sections in Act 1").
|
|
1777
|
+
* They start closed, but for those holding the current entry: open from the root down
|
|
1778
|
+
* to it, and set in the text's weight, so the trail to it shows (Mat, 2026-10-28). The
|
|
1779
|
+
* reader's own choices hold, until the current entry comes into a branch it was not in,
|
|
1780
|
+
* which opens. An article in parts (its columns, on pages out of order) has, while it is
|
|
1781
|
+
* the current entry, a step through them in its row ("2 / 4", `ui/Steps`); its
|
|
1782
|
+
* regions are drawn on the Canvas as annotations are (`range-regions.ts`). The current
|
|
1783
|
+
* entry shows its Range's `thumbnail` (Cookbook 0229) under its words, large, as the seek
|
|
1784
|
+
* bar's popover does, and the others none (`ui/EntryThumbnail`). Choosing an entry goes
|
|
1785
|
+
* to its Canvas, and to its region or its moment.
|
|
1521
1786
|
* Hovering or focusing one marks its chapter on the Canvas's seek bar, and the chapter
|
|
1522
1787
|
* under the pointer there marks its entry here: one highlight, through the Root
|
|
1523
1788
|
* (`clover.chapter`), as the annotations share theirs.
|
|
@@ -1534,7 +1799,9 @@ export interface DownloadProps extends Omit<React.HTMLAttributes<HTMLElement>, "
|
|
|
1534
1799
|
* Downloads, as 3.x's Viewer offers them: the `rendering` of the Canvases in view ("This
|
|
1535
1800
|
* page") and of the Manifest ("All pages") — a PDF, a text, a high-resolution file —
|
|
1536
1801
|
* each a link, as Homepage lists a resource's pages (Mat, 2026-10-21: links, not a
|
|
1537
|
-
* button that opens them).
|
|
1802
|
+
* button that opens them). Pressed, a link saves its file rather than opening it, where
|
|
1803
|
+
* its server lets the file be fetched (`saveFile`), and opens it in a new tab where not.
|
|
1804
|
+
* Renders nothing when there is nothing to download.
|
|
1538
1805
|
*/
|
|
1539
1806
|
export declare function Download({ className, headingLevel, ...rest }: DownloadProps): React.JSX.Element | null;
|
|
1540
1807
|
/** A length: pixels as a number, or a CSS length in `px`, `rem` or `%` of the split. */
|
|
@@ -1763,6 +2030,13 @@ export interface SceneProps {
|
|
|
1763
2030
|
label?: unknown;
|
|
1764
2031
|
/** The language to read IIIF text in. The reader's, by default; inside a `Root`, the Root's. */
|
|
1765
2032
|
language?: string;
|
|
2033
|
+
/**
|
|
2034
|
+
* Clover's higher-contrast mode: the accent kept to rings, outlines and marks, and never
|
|
2035
|
+
* under words or a glyph, where the controls' dark fill takes its place, edged in the
|
|
2036
|
+
* accent. Inside a `Root`, the Root's too; on wherever the reader's system asks for more
|
|
2037
|
+
* contrast. Default `false`.
|
|
2038
|
+
*/
|
|
2039
|
+
highContrast?: boolean;
|
|
1766
2040
|
className?: string;
|
|
1767
2041
|
/** All of Clover's controls (`true`, the default), none (`false`), or all but those set `false`. */
|
|
1768
2042
|
controls?: boolean | SceneControlsConfig;
|
|
@@ -1827,6 +2101,13 @@ export declare function useVisibleCanvases(): Container[];
|
|
|
1827
2101
|
export declare function useActiveCanvas(): Container | null;
|
|
1828
2102
|
/** Moving between views. Steps by view, so a spread moves two pages at a time. */
|
|
1829
2103
|
export declare function useNavigation(): Navigation;
|
|
2104
|
+
/**
|
|
2105
|
+
* Annotations walked as one whole: the AnnotationPage or AnnotationCollection given as
|
|
2106
|
+
* the content, else the AnnotationCollection the Manifest's annotation pages are part of
|
|
2107
|
+
* (Cookbook 0309). Its `id`, `type`, `label`, `total`, `pages` and its annotations so far
|
|
2108
|
+
* (`entries`); null where there are none. `Items of="annotations"` walks them.
|
|
2109
|
+
*/
|
|
2110
|
+
export declare function useAnnotationCollection(): AnnotationCollection | null;
|
|
1830
2111
|
/** Every annotation set: the Manifest's own (fetched so far) and any the host added. */
|
|
1831
2112
|
export declare function useAnnotationSets(): AnnotationSet[];
|
|
1832
2113
|
/** A IIIF language map as text in the Root's language, with the tag it is in. */
|
|
@@ -1869,7 +2150,7 @@ export interface Shortcut {
|
|
|
1869
2150
|
* hides it without moving the pointer or focus; the pointer can move onto it without it
|
|
1870
2151
|
* closing; and it stays until the pointer or focus leaves. Styles are `ui/Tip.css`.
|
|
1871
2152
|
*/
|
|
1872
|
-
export declare function Tip({ label, lang, shortcut, scrolls, image, }: {
|
|
2153
|
+
export declare function Tip({ label, lang, shortcut, scrolls, image, lead, after, }: {
|
|
1873
2154
|
label: string;
|
|
1874
2155
|
/** The language of `label`, where it is not its control's. */
|
|
1875
2156
|
lang?: string;
|
|
@@ -1885,6 +2166,18 @@ export declare function Tip({ label, lang, shortcut, scrolls, image, }: {
|
|
|
1885
2166
|
* shows, and named by them, as the control is.
|
|
1886
2167
|
*/
|
|
1887
2168
|
image?: string;
|
|
2169
|
+
/**
|
|
2170
|
+
* A line over the words, set apart from them: the time under the pointer, over a
|
|
2171
|
+
* chapter's title in the seek bar's popover (`ui/Tip.css`). Shown only: its control
|
|
2172
|
+
* says it for assistive technology.
|
|
2173
|
+
*/
|
|
2174
|
+
lead?: string;
|
|
2175
|
+
/**
|
|
2176
|
+
* A figure after the words, smaller, as the step through a list sets its place (a
|
|
2177
|
+
* Range's region's "1 / 4", `ui/Steps.css`). Shown only: its control says it for
|
|
2178
|
+
* assistive technology.
|
|
2179
|
+
*/
|
|
2180
|
+
after?: React.ReactNode;
|
|
1888
2181
|
}): React.JSX.Element;
|
|
1889
2182
|
/**
|
|
1890
2183
|
* Clover's popups open one at a time: the Canvas's menus (annotations, Choice, an
|
|
@@ -1962,6 +2255,11 @@ export declare function titled(level: number, id: string, fallback?: React.Eleme
|
|
|
1962
2255
|
export interface CloverContextValue {
|
|
1963
2256
|
clover: Clover;
|
|
1964
2257
|
language?: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* The reader chose a language to read IIIF text in (About's languages): every part
|
|
2260
|
+
* inside reads in it, until the Root is given another `language`.
|
|
2261
|
+
*/
|
|
2262
|
+
chooseLanguage?: (tag: string) => void;
|
|
1965
2263
|
/** Renderers of the host's own, for `Body` to draw some views with. */
|
|
1966
2264
|
renderers?: BodyRenderer[];
|
|
1967
2265
|
}
|
|
@@ -2006,6 +2304,11 @@ export interface Chapter {
|
|
|
2006
2304
|
label?: LanguageMapLike;
|
|
2007
2305
|
start: number;
|
|
2008
2306
|
end?: number;
|
|
2307
|
+
/**
|
|
2308
|
+
* Its Range's `thumbnail` (Cookbook 0229), the first it gives, as written: what draws
|
|
2309
|
+
* it asks its service as its `info.json` allows (`ui/EntryThumbnail`).
|
|
2310
|
+
*/
|
|
2311
|
+
thumbnail?: Record<string, unknown>;
|
|
2009
2312
|
}
|
|
2010
2313
|
export declare function chaptersOf(manifest: Manifest | null, canvasId: string | null, duration?: number): Chapter[];
|
|
2011
2314
|
/** One entry of a table of contents: a Range, where it starts, and the Ranges within. */
|
|
@@ -2028,8 +2331,33 @@ export interface ContentsNode {
|
|
|
2028
2331
|
w: number;
|
|
2029
2332
|
h: number;
|
|
2030
2333
|
};
|
|
2334
|
+
/**
|
|
2335
|
+
* Its own Canvases and their parts, in the order the Range reads them (Cookbook 0025:
|
|
2336
|
+
* an article's columns, page 2 then page 5): for a `sequence` (Cookbook 0027), where a
|
|
2337
|
+
* region is among them, which the Canvas draws (`range-regions.ts`), or where its pages
|
|
2338
|
+
* are out of the Manifest's order; two or more are stepped through in Contents. None on
|
|
2339
|
+
* a recording's time, nor for any other run of whole pages in order, which Items steps.
|
|
2340
|
+
*/
|
|
2341
|
+
parts?: ContentsPart[];
|
|
2342
|
+
/**
|
|
2343
|
+
* A Range of `behavior` `sequence` (Cookbook 0027): an order of the Canvases of its own,
|
|
2344
|
+
* the first of them the default, as `currentContents` takes it.
|
|
2345
|
+
*/
|
|
2346
|
+
sequence?: true;
|
|
2347
|
+
/** Its Range's `thumbnail` (Cookbook 0229), the first it gives, as written. */
|
|
2348
|
+
thumbnail?: Record<string, unknown>;
|
|
2031
2349
|
children: ContentsNode[];
|
|
2032
2350
|
}
|
|
2351
|
+
/** One Canvas, or a region of one, in a Range's reading order. */
|
|
2352
|
+
export interface ContentsPart {
|
|
2353
|
+
canvasId: string;
|
|
2354
|
+
region?: {
|
|
2355
|
+
x: number;
|
|
2356
|
+
y: number;
|
|
2357
|
+
w: number;
|
|
2358
|
+
h: number;
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2033
2361
|
/**
|
|
2034
2362
|
* The Manifest's table of contents, from `structures`. A single top Range that only wraps
|
|
2035
2363
|
* others is unwrapped, as a reader expects its chapters, not one entry holding them.
|
|
@@ -2040,7 +2368,12 @@ export declare function tableOfContents(manifest: Manifest | null): ContentsNode
|
|
|
2040
2368
|
* The entry the reader is in: the deepest covering `canvasId` whose span holds `time` (or
|
|
2041
2369
|
* that has no span). Null when none is.
|
|
2042
2370
|
*/
|
|
2043
|
-
export declare function currentContents(nodes: ContentsNode[], canvasId: string | null, time?: number
|
|
2371
|
+
export declare function currentContents(nodes: ContentsNode[], canvasId: string | null, time?: number,
|
|
2372
|
+
/**
|
|
2373
|
+
* The entry the reader chose: it, or the deepest entry in it, is current wherever it
|
|
2374
|
+
* covers the Canvas and time, over any other that does (one of two sequences).
|
|
2375
|
+
*/
|
|
2376
|
+
chosen?: string | null): string | null;
|
|
2044
2377
|
export declare function toPlainText(html: string): string;
|
|
2045
2378
|
/**
|
|
2046
2379
|
* How a text is read, strictly by its `format`'s media type: `text/html` as IIIF's HTML,
|
|
@@ -2056,14 +2389,16 @@ export declare function readAs(format: string | undefined, value?: string): "mar
|
|
|
2056
2389
|
* there is found, and the region read as shares of it (scaled from where it is painted),
|
|
2057
2390
|
* so the service's own `info.json` decides how it is asked for, never more than the
|
|
2058
2391
|
* region has, and from a server that cannot cut a region, nothing (no fallback: all of
|
|
2059
|
-
* the image is not the region).
|
|
2392
|
+
* the image is not the region). A `Choice`'s first image stands for it, or the one named
|
|
2393
|
+
* (`image`: a layer's annotation is cut from its own layer, Cookbook 0326). Null where no
|
|
2394
|
+
* image with a service is painted there.
|
|
2060
2395
|
*/
|
|
2061
2396
|
export declare function regionSource(canvas: Json | undefined, rect: {
|
|
2062
2397
|
x: number;
|
|
2063
2398
|
y: number;
|
|
2064
2399
|
w: number;
|
|
2065
2400
|
h: number;
|
|
2066
|
-
}): ThumbnailSource | null;
|
|
2401
|
+
}, image?: string): ThumbnailSource | null;
|
|
2067
2402
|
/**
|
|
2068
2403
|
* Clover's translations, without a translation library.
|
|
2069
2404
|
*
|
|
@@ -2159,8 +2494,13 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2159
2494
|
* stacked boxes each opened by its heading, or `"tabs"`.
|
|
2160
2495
|
*/
|
|
2161
2496
|
panelLayout?: PanelLayout;
|
|
2162
|
-
/** The downloads
|
|
2497
|
+
/** The downloads, from a Download button beside the panel's About heading. Default `true`. */
|
|
2163
2498
|
download?: boolean;
|
|
2499
|
+
/**
|
|
2500
|
+
* The languages to read the resource in, beside the panel's About heading, where what
|
|
2501
|
+
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
2502
|
+
*/
|
|
2503
|
+
languages?: boolean;
|
|
2164
2504
|
/** The thumbnails under the Body: a layout, or `false` for none. Default `slider`. */
|
|
2165
2505
|
items?: Exclude<ItemsLayout, "pager"> | false;
|
|
2166
2506
|
/**
|
|
@@ -2176,7 +2516,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2176
2516
|
*/
|
|
2177
2517
|
fill?: boolean;
|
|
2178
2518
|
};
|
|
2179
|
-
declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, items, storageKey, fill, ...root }: DefaultProps): React.JSX.Element;
|
|
2519
|
+
declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, languages, items, storageKey, fill, ...root }: DefaultProps): React.JSX.Element;
|
|
2180
2520
|
/**
|
|
2181
2521
|
* A layout the Viewer draws: one from `@nulib/clover/templates`, or a component of your
|
|
2182
2522
|
* own that takes the `Clover.Root` props.
|