@nulib/clover 4.0.0-beta.0 → 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 +375 -64
- package/dist/components/Map/maplibre-worker.mjs +7 -0
- package/dist/components/Map/worker.mjs +22 -0
- package/dist/components/Panel/About.mjs +50 -16
- 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 +13 -3
- 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 +7 -3
- package/dist/core/language-choice.mjs +30 -0
- package/dist/core/link.mjs +15 -1
- package/dist/core/load.mjs +14 -5
- 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 +415 -64
- 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 +40 -7
- 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 +26 -5
- 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 +4 -3
- 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-Dw51CAfF.mjs → Camera-Cp5ma-6C.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-RRN2bEkc.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-BsR2AOy-.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-wQurAeJz.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-BmA--pzr.mjs → Loading-zw74TdAz.mjs} +1 -1
- package/dist/web-components/{Map-DzVGblIS.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-CIJFA3q1.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-BYjV2t1j.mjs → PanelToggle-CFtWIeWv.mjs} +1 -1
- package/dist/web-components/PartOfManifest-F87jIrf9.mjs +1 -0
- package/dist/web-components/{Pending-BspZajh5.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-Dbv-26NP.mjs → cloverEngine-6djEHNCD.mjs} +2 -2
- package/dist/web-components/content-state-reader-Ahh6artg.mjs +1 -0
- package/dist/web-components/{controls-qRYf2jO2.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-D8JLgzqq.mjs → engine-B-sscpLa.mjs} +1 -1
- package/dist/web-components/{engines-BwVb9R_A.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-C3yg9DxB.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-Bf-Fb7e5.mjs → nodes-CTw9OqlA.mjs} +1 -1
- package/dist/web-components/{overlayImage-DdPs2EGY.mjs → overlayImage-BMt4UTlR.mjs} +1 -1
- package/dist/web-components/{panel-CiqEFDzv.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-LUmAQSoP.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-Bg4QqawN.mjs → renderers-CiB74bQh.mjs} +1 -1
- package/dist/web-components/{resource-DzIvB_4m.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-DWRRXSBy.mjs → show-link-BXm7SNIC.mjs} +1 -1
- package/dist/web-components/{sizedImage-DfjlV2-i.mjs → sizedImage-k4Q-eyOB.mjs} +1 -1
- package/dist/web-components/{split-m-_XivaW.mjs → split-Hp6z-v4h.mjs} +1 -1
- package/dist/web-components/{status-DDS7jLNd.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-BXByhOJ9.mjs → tip-C-oovDZK.mjs} +1 -1
- package/dist/web-components/{toggle-AS72kq6v.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-dLFWnT8N.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-CkvI0wUT.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-Dybz_aJv.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-ClQ4yrTh.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-Duc69Yes.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-CjuYjUhI.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-yWi4R1bP.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-L-IlGI1r.mjs → renderers-DLoqv3QO.mjs} +1 -1
- package/dist/web-components/viewer/save-file-CJT5p5Hg.mjs +1 -0
- package/dist/web-components/viewer/{search-DWkwRPo_.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-1ZJwtElI.mjs → vtt-1Pk7Dhsj.mjs} +1 -1
- package/dist/web-components/viewer-CH7re5OO.mjs +1 -0
- package/dist/web-components/{vtt-GFssZH8Y.mjs → vtt-CacHieeN.mjs} +1 -1
- package/dist/web-components/worker-CjXN0dku.mjs +1 -0
- package/package.json +10 -5
- package/dist/i18n/reader.mjs +0 -13
- package/dist/web-components/About-uKa1wfDr.mjs +0 -1
- package/dist/web-components/AnnotationMenu-BGIYRXW6.mjs +0 -1
- package/dist/web-components/AnnotationState-D2UIgIEC.mjs +0 -1
- package/dist/web-components/Annotations-BhwAv3ah.mjs +0 -1
- package/dist/web-components/Annotations-C_tBJHo3.mjs +0 -2
- package/dist/web-components/Body-DMEERFuB.mjs +0 -1
- package/dist/web-components/BodyAlert-BP8voSLv.mjs +0 -1
- package/dist/web-components/Button-Cl02BFDd.mjs +0 -1
- package/dist/web-components/CanvasView-B8lMMSou.mjs +0 -1
- package/dist/web-components/CaptionDetails-KLMDv-ec.mjs +0 -1
- package/dist/web-components/ChoiceMenu-CXrVOmJl.mjs +0 -1
- package/dist/web-components/Collection-DL4Ui4hF.mjs +0 -1
- package/dist/web-components/CollectionSelect-DL-bbpwJ.mjs +0 -1
- package/dist/web-components/Connected-B0S1HXQb.mjs +0 -1
- package/dist/web-components/Connected-BcjRA5si.mjs +0 -1
- package/dist/web-components/Connected-Q7iizBb8.mjs +0 -1
- package/dist/web-components/Contents-ZC8TiGaW.mjs +0 -1
- package/dist/web-components/ControlMenu-DIoU797-.mjs +0 -1
- package/dist/web-components/Cue-CJxnDMEy.mjs +0 -1
- package/dist/web-components/Document-DHBRAFEK.mjs +0 -1
- package/dist/web-components/DocumentPanel-CqvE2pu9.mjs +0 -1
- package/dist/web-components/Download-DBksL1C0.mjs +0 -1
- package/dist/web-components/EntryBodies-VwEkTVrw.mjs +0 -1
- package/dist/web-components/ErrorBoundary-Cy9PGoZv.mjs +0 -1
- package/dist/web-components/FieldPill-DCJBz6Vj.mjs +0 -1
- package/dist/web-components/FrameAnimation-DRbmgGpF.mjs +0 -1
- package/dist/web-components/Gallery-BM7-VJkB.mjs +0 -1
- package/dist/web-components/HideToggle-BdYgG7us.mjs +0 -1
- package/dist/web-components/Items-_1Jz3FMs.mjs +0 -1
- package/dist/web-components/Label-CAiJ49eA.mjs +0 -1
- package/dist/web-components/LightboxBody-DyhUZiDf.mjs +0 -1
- package/dist/web-components/LoadedCanvas-DWz5IK5m.mjs +0 -1
- package/dist/web-components/LoadedMap-DIeW313M.mjs +0 -1
- package/dist/web-components/MapView-BJaN7VBI.mjs +0 -1
- package/dist/web-components/Markup-D91DbxLk.mjs +0 -2
- package/dist/web-components/MediaBody-BYcVPo2X.mjs +0 -1
- package/dist/web-components/MediaBody-FEzH8VVw.mjs +0 -1
- package/dist/web-components/Pager-BGwCurxE.mjs +0 -1
- package/dist/web-components/Panel-B-GXOkzF.mjs +0 -1
- package/dist/web-components/PartOfManifest-ClbGepVM.mjs +0 -1
- package/dist/web-components/Primitives-CTh59wvs.mjs +0 -1
- package/dist/web-components/Provider-C6rIiDXH.mjs +0 -1
- package/dist/web-components/ReadMore-BJ2i-0uN.mjs +0 -1
- package/dist/web-components/Root-DkkYDtur.mjs +0 -1
- package/dist/web-components/Scene-B_PU_TiX.mjs +0 -1
- package/dist/web-components/SceneView-qcW_sT3j.mjs +0 -1
- package/dist/web-components/Search-UOneIUcP.mjs +0 -1
- package/dist/web-components/Sections-we9U9fXq.mjs +0 -2
- package/dist/web-components/StandaloneItems-DU8oCFc_.mjs +0 -1
- package/dist/web-components/Status-Cs5ZvFvL.mjs +0 -1
- package/dist/web-components/Timeline-WtYZ1bIJ.mjs +0 -1
- package/dist/web-components/Tip-C8J3qsIK.mjs +0 -1
- package/dist/web-components/Transcript-CRL2zToL.mjs +0 -1
- package/dist/web-components/annotation-collection-ZPyvpLFc.mjs +0 -1
- package/dist/web-components/annotations-content-BZChKhJZ.mjs +0 -1
- package/dist/web-components/body-UntgrmoV.mjs +0 -1
- package/dist/web-components/canvas-d_U4v_mh.mjs +0 -1
- package/dist/web-components/content-state-reader-DjdKWjit.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-UrMJgktp.mjs +0 -1
- package/dist/web-components/glyphs-BoX0a88P.mjs +0 -1
- package/dist/web-components/hooks-Dp8pjU8l.mjs +0 -1
- package/dist/web-components/index-DWxMuwDL.mjs +0 -1
- package/dist/web-components/items--Tu7ZM3L.mjs +0 -1
- package/dist/web-components/items-W2vrwArM.mjs +0 -1
- package/dist/web-components/keep-fragments-B5nlv2ck.mjs +0 -1
- package/dist/web-components/label-CYQ7tVl6.mjs +0 -1
- package/dist/web-components/layout-KL0V-iJu.mjs +0 -1
- package/dist/web-components/link-DRRTY4lY.mjs +0 -1
- package/dist/web-components/logo-CnQUCB3Y.mjs +0 -1
- package/dist/web-components/models-BP2qp9nT.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-CUBY90_b.mjs +0 -1
- package/dist/web-components/playerSurface-i2TJz-F4.mjs +0 -1
- package/dist/web-components/pt-B3J80JgO.mjs +0 -1
- package/dist/web-components/read-more-BaaO77el.mjs +0 -1
- package/dist/web-components/rendererSurface-DAvatpMF.mjs +0 -22
- package/dist/web-components/sanitize-Dc7nOsgO.mjs +0 -3
- package/dist/web-components/search-DgcgsI3I.mjs +0 -1
- package/dist/web-components/shared-J3w3gnXD.mjs +0 -1
- package/dist/web-components/styles-Ypl9KrSK.mjs +0 -1
- package/dist/web-components/thumbnail-BZvLSwWW.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-DCbE5JXi.mjs +0 -1
- package/dist/web-components/useNearViewport-CyoK3l8W.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-Dd4tnzNV.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-DZaSy5lH.mjs +0 -1
- package/dist/web-components/viewer/Annotations-D1h-Yi5J.mjs +0 -1
- package/dist/web-components/viewer/Annotations-sj79EMen.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-B_JdNjJ7.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-xa51a1DV.mjs +0 -1
- package/dist/web-components/viewer/Collection-CxuLCspj.mjs +0 -1
- package/dist/web-components/viewer/Connected-BSUBc3Ci.mjs +0 -1
- package/dist/web-components/viewer/Connected-CPIxNjF2.mjs +0 -1
- package/dist/web-components/viewer/Contents-DNh9mnsF.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DdgIvBdf.mjs +0 -1
- package/dist/web-components/viewer/Cue-90H9_dXz.mjs +0 -1
- package/dist/web-components/viewer/Document-CNCpzkiN.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-BdG4TVLE.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-DGXjFP3N.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-Icmd98OY.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-DJZN3Rd4.mjs +0 -1
- package/dist/web-components/viewer/Gallery-CEp3-bh2.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-DB6HTmAO.mjs +0 -1
- package/dist/web-components/viewer/MapView-BVSdybIC.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-BBbSMT1i.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-BzMXMHIF.mjs +0 -1
- package/dist/web-components/viewer/PartOfManifest-X9_q-2t6.mjs +0 -1
- package/dist/web-components/viewer/Search-S4N5QU4R.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-BO4VyWRW.mjs +0 -1
- package/dist/web-components/viewer/Transcript-BbDaS064.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-BjZ1DAHq.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-jn3n5Y2-.mjs +0 -1
- package/dist/web-components/viewer/content-state-reader-CPiShIjP.mjs +0 -1
- package/dist/web-components/viewer/link-CwE-fg5G.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-BpOgqsZ0.mjs +0 -1
- package/dist/web-components/viewer/styles-BRCkEU3w.mjs +0 -1
- package/dist/web-components/viewer/viewer--TreVlJ_.mjs +0 -28
- package/dist/web-components/viewer-DyV864Qe.mjs +0 -1
- /package/dist/{ui → i18n}/languageCode.mjs +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v8.0.1
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import * as P4 from '@iiif/parser/presentation-4/types';
|
|
4
4
|
import { Annotation, IIIFExternalWebResource, InternationalString, MetadataItem } from '@iiif/presentation-3';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { CSSProperties, ReactNode } from 'react';
|
|
@@ -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,19 +64,48 @@ 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
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Clover's one data shape: IIIF Presentation 4.
|
|
86
|
+
*
|
|
87
|
+
* Every resource is upgraded to Presentation 4 on the way in, so no part is written for
|
|
88
|
+
* several shapes. Presentation 2.1 and 3.0 are upgraded by `@iiif/parser`; Presentation 4
|
|
89
|
+
* passes through untouched. The upgrader is imported on demand, so it costs nothing until
|
|
90
|
+
* the first resource that needs it arrives, and its reader of Presentation 2 only with
|
|
91
|
+
* the first resource in 2.
|
|
92
|
+
*/
|
|
93
|
+
export type Manifest = P4.Manifest;
|
|
94
|
+
export type Presentation4Canvas = P4.Canvas;
|
|
95
|
+
export type Presentation4Collection = P4.Collection;
|
|
96
|
+
export type Presentation4Scene = P4.Scene;
|
|
97
|
+
export type Presentation4Timeline = P4.Timeline;
|
|
68
98
|
/**
|
|
69
99
|
* A IIIF resource Clover can show directly, a Manifest's item: a Canvas (`Canvas`), a
|
|
70
100
|
* Timeline (`Timeline`, sound) or a Scene (`Scene`, 3D).
|
|
71
101
|
*/
|
|
72
|
-
export type Container =
|
|
102
|
+
export type Container = Presentation4Canvas | Presentation4Timeline | Presentation4Scene;
|
|
73
103
|
/**
|
|
74
104
|
* `resource` as Presentation 4: a Manifest, Collection, Canvas, Timeline or Scene from any
|
|
75
|
-
* 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.
|
|
76
107
|
*/
|
|
77
|
-
export declare function toPresentation4<T = Manifest |
|
|
108
|
+
export declare function toPresentation4<T = Manifest | Presentation4Collection | Container>(resource: unknown): Promise<T>;
|
|
78
109
|
/**
|
|
79
110
|
* Annotations to read and to point at: everything a Manifest's Canvases carry in their
|
|
80
111
|
* `annotations` (comments, tags, transcriptions, descriptions), and pages a host adds.
|
|
@@ -95,12 +126,78 @@ export interface AnnotationEntry {
|
|
|
95
126
|
bodies: AnnotationBodyEntry[];
|
|
96
127
|
/** The annotation as published, for a host's own rendering. */
|
|
97
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
|
+
};
|
|
98
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";
|
|
99
154
|
export interface AnnotationSet {
|
|
100
155
|
id: string;
|
|
101
156
|
label?: LanguageMapLike;
|
|
102
|
-
/**
|
|
103
|
-
|
|
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. */
|
|
104
201
|
entries: AnnotationEntry[];
|
|
105
202
|
}
|
|
106
203
|
/**
|
|
@@ -148,6 +245,34 @@ export interface Target {
|
|
|
148
245
|
/** Start playback on arrival (auto-advance from the previous Canvas). */
|
|
149
246
|
autoplay?: boolean;
|
|
150
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
|
+
}
|
|
151
276
|
/** A content state as a link carries it: base64url of the URI-encoded JSON, unpadded. */
|
|
152
277
|
export declare function encodeContentState(json: unknown): string;
|
|
153
278
|
export interface ContentStateOutput {
|
|
@@ -259,7 +384,13 @@ export interface CloverState {
|
|
|
259
384
|
/** The Manifest shown, in Presentation 4. */
|
|
260
385
|
manifest: Manifest | null;
|
|
261
386
|
/** The Collection it was reached through, if any. */
|
|
262
|
-
collection:
|
|
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;
|
|
263
394
|
/** The Canvas the reader is on: the first of the view that shows it. */
|
|
264
395
|
canvasId: string | null;
|
|
265
396
|
/** Where to go once the view is drawn: a region, a time. Consumed once applied. */
|
|
@@ -273,10 +404,28 @@ export interface CloverState {
|
|
|
273
404
|
* drawn is `selectHiddenSets`'s.
|
|
274
405
|
*/
|
|
275
406
|
shownSets: string[];
|
|
276
|
-
/**
|
|
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
|
+
*/
|
|
277
412
|
addedSets: AnnotationSet[];
|
|
278
413
|
/** A Content Search of the Manifest: its query, progress and hits. */
|
|
279
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;
|
|
280
429
|
}
|
|
281
430
|
export interface SearchState {
|
|
282
431
|
query: string;
|
|
@@ -324,6 +473,12 @@ export interface Clover {
|
|
|
324
473
|
highlight: Channel<string | null>;
|
|
325
474
|
/** The chapter (its Range's id) under the pointer on a seek bar, or in `Contents`. */
|
|
326
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>;
|
|
327
482
|
readonly request: CloverRequest | undefined;
|
|
328
483
|
setRequest(request: CloverRequest | undefined): void;
|
|
329
484
|
/** Load content. `canvasId` wins over everything; `defaultCanvasId` over `start`. */
|
|
@@ -336,6 +491,12 @@ export interface Clover {
|
|
|
336
491
|
goToManifest(id: string, canvasId?: string): Promise<void>;
|
|
337
492
|
/** A controlled host's Manifest, shown without asking it again. */
|
|
338
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;
|
|
339
500
|
/**
|
|
340
501
|
* Show a Collection the Manifest is part of (its `partOf`) beside it: the Collection's
|
|
341
502
|
* members become a choice, while the Manifest and the reader's place stay as they are.
|
|
@@ -381,6 +542,12 @@ export interface Clover {
|
|
|
381
542
|
* `scope="all"`). Returns the release.
|
|
382
543
|
*/
|
|
383
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;
|
|
384
551
|
/** Abandon any load in flight. The instance stays usable. */
|
|
385
552
|
dispose(): void;
|
|
386
553
|
}
|
|
@@ -462,6 +629,14 @@ export interface RootProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
|
|
|
462
629
|
request?: CloverRequest;
|
|
463
630
|
/** The language to read IIIF text in. The reader's, by default. */
|
|
464
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;
|
|
465
640
|
/**
|
|
466
641
|
* Renderers of your own for some views — by Canvas id, painting format, or a test —
|
|
467
642
|
* drawn by every `Body` inside in place of `Canvas` (3.x's `customDisplays`).
|
|
@@ -551,6 +726,11 @@ export type CanvasRendererEvent =
|
|
|
551
726
|
| "viewport"
|
|
552
727
|
/** A new set of images replaced the previous one. */
|
|
553
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"
|
|
554
734
|
/** The backend changed (fallback, or a context released and reacquired). */
|
|
555
735
|
| "backend"
|
|
556
736
|
/** A click that is not a zoom, with click-to-zoom turned off. */
|
|
@@ -704,6 +884,19 @@ export interface CanvasAnnotation {
|
|
|
704
884
|
pageLabel?: LanguageMapLike;
|
|
705
885
|
/** Its AnnotationPage's `id`, by which the menu hides its page (`hiddenPages`). */
|
|
706
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
|
+
};
|
|
707
900
|
}
|
|
708
901
|
/**
|
|
709
902
|
* Everything a control needs in order to work, ready to spread onto a button: the id, the
|
|
@@ -773,6 +966,11 @@ export interface CanvasControlsConfig {
|
|
|
773
966
|
* Shown only when a Canvas has either.
|
|
774
967
|
*/
|
|
775
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;
|
|
776
974
|
}
|
|
777
975
|
export interface CloverCanvasOptions {
|
|
778
976
|
/** Which painter to use. `auto` (default) tries WebGL2, then Canvas2D. */
|
|
@@ -894,6 +1092,13 @@ export interface CloverCanvasProps {
|
|
|
894
1092
|
* default; inside a `Root`, the Root's.
|
|
895
1093
|
*/
|
|
896
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;
|
|
897
1102
|
/** Stable id for this instance. A new id remounts the renderer. */
|
|
898
1103
|
instanceId?: string;
|
|
899
1104
|
className?: string;
|
|
@@ -918,6 +1123,11 @@ export interface CloverCanvasProps {
|
|
|
918
1123
|
* targets are drawn; coordinates are the target image's own.
|
|
919
1124
|
*/
|
|
920
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;
|
|
921
1131
|
/**
|
|
922
1132
|
* The AnnotationPages (each annotation's `pageId`) whose annotations are hidden: none
|
|
923
1133
|
* of them is drawn, but the annotations menu still lists them under their page, with
|
|
@@ -1010,6 +1220,12 @@ export interface CloverCanvasProps {
|
|
|
1010
1220
|
lang?: string;
|
|
1011
1221
|
start: number;
|
|
1012
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>;
|
|
1013
1229
|
}>;
|
|
1014
1230
|
/** A chapter (by its `id`) to mark on the seek bar, as hovering it in a list does. */
|
|
1015
1231
|
highlightedChapter?: string | null;
|
|
@@ -1059,17 +1275,11 @@ export interface LabelProps extends Omit<React.HTMLAttributes<HTMLElement>, "lan
|
|
|
1059
1275
|
* none.
|
|
1060
1276
|
*/
|
|
1061
1277
|
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLElement>>;
|
|
1062
|
-
/**
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
of?: StepsOf;
|
|
1068
|
-
}
|
|
1069
|
-
/** Go to the previous item. `aria-disabled` on the first. */
|
|
1070
|
-
export declare const Previous: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLButtonElement>>;
|
|
1071
|
-
/** Go to the next item. `aria-disabled` on the last. */
|
|
1072
|
-
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";
|
|
1073
1283
|
export interface PositionProps extends React.HTMLAttributes<HTMLElement> {
|
|
1074
1284
|
/** What it counts: the Root's views (default), or its Collection's members. */
|
|
1075
1285
|
of?: StepsOf;
|
|
@@ -1081,6 +1291,32 @@ export interface PositionProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1081
1291
|
* bare slash would leave to guesswork.
|
|
1082
1292
|
*/
|
|
1083
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>>;
|
|
1084
1320
|
/**
|
|
1085
1321
|
* What `Items` shows: light models of a Manifest's views or a Collection's members, never
|
|
1086
1322
|
* the resources themselves, so a long sequence costs a few fields per item.
|
|
@@ -1097,6 +1333,11 @@ export interface ItemPart {
|
|
|
1097
1333
|
duration?: number;
|
|
1098
1334
|
/** What it mostly paints: `Image`, `Video`, `Audio` (`Sound` in Presentation 3) or `Model`. */
|
|
1099
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;
|
|
1100
1341
|
}
|
|
1101
1342
|
export interface ItemModel {
|
|
1102
1343
|
/** The first Canvas of a view, or a member's id. What selecting it goes to. */
|
|
@@ -1105,8 +1346,12 @@ export interface ItemModel {
|
|
|
1105
1346
|
parts: ItemPart[];
|
|
1106
1347
|
label?: LanguageMapLike;
|
|
1107
1348
|
summary?: LanguageMapLike;
|
|
1349
|
+
/** A member's date for navigation, as written (Cookbook 0318). */
|
|
1350
|
+
navDate?: string;
|
|
1108
1351
|
/** Where a link to a member goes: its `homepage`, else its id. */
|
|
1109
1352
|
href?: string;
|
|
1353
|
+
/** That homepage's own language, where its `language` gives one. */
|
|
1354
|
+
hrefLang?: string;
|
|
1110
1355
|
}
|
|
1111
1356
|
/**
|
|
1112
1357
|
* A scrolling row of thumbnails (`slider`), a column, a wrapping grid, or one item at a
|
|
@@ -1120,10 +1365,19 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
1120
1365
|
*/
|
|
1121
1366
|
layout?: ItemsLayout;
|
|
1122
1367
|
/**
|
|
1123
|
-
*
|
|
1124
|
-
*
|
|
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"`.
|
|
1370
|
+
*/
|
|
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.
|
|
1125
1379
|
*/
|
|
1126
|
-
of?: "views" | "members";
|
|
1380
|
+
of?: "views" | "members" | "targets" | "annotations";
|
|
1127
1381
|
/**
|
|
1128
1382
|
* Standalone: a Collection (its members), a Manifest (its views) or a URL to one. Inside
|
|
1129
1383
|
* a `Root`, leave it out to list the Root's views.
|
|
@@ -1155,6 +1409,13 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
1155
1409
|
request?: CloverRequest;
|
|
1156
1410
|
/** Standalone: the language to read IIIF text in. */
|
|
1157
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;
|
|
1158
1419
|
/** Replace an item's figure with your own. */
|
|
1159
1420
|
renderItem?: (item: ItemModel, state: {
|
|
1160
1421
|
selected: boolean;
|
|
@@ -1193,9 +1454,14 @@ export interface StatusProps {
|
|
|
1193
1454
|
* (WCAG 4.1.3).
|
|
1194
1455
|
*/
|
|
1195
1456
|
export declare function Status({ className, loading, error: renderError, }: StatusProps): React.JSX.Element;
|
|
1457
|
+
/**
|
|
1458
|
+
* A IIIF resource as JSON, read loosely. One declaration for the modules whose `Json`
|
|
1459
|
+
* reaches Clover's types: the bundled declarations (`build:types`) would hold one per
|
|
1460
|
+
* module, under the one name, which TypeScript rejects.
|
|
1461
|
+
*/
|
|
1462
|
+
export type Json = Record<string, any>;
|
|
1196
1463
|
/** Whose property a part reads: the Root's Manifest, or the Canvas in view. */
|
|
1197
1464
|
export type Of = "manifest" | "canvas";
|
|
1198
|
-
export type Json = Record<string, any>;
|
|
1199
1465
|
/** The provider a part is drawn for, inside `Provider`; null outside one. */
|
|
1200
1466
|
export declare const useProvider: () => Json | null;
|
|
1201
1467
|
export interface PartProps<Value> extends Omit<React.HTMLAttributes<HTMLElement>, "lang"> {
|
|
@@ -1360,8 +1626,17 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
1360
1626
|
headingLevel?: number;
|
|
1361
1627
|
/** The element to render. Default `aside`. */
|
|
1362
1628
|
as?: React.ElementType;
|
|
1363
|
-
/**
|
|
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
|
+
*/
|
|
1364
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;
|
|
1365
1640
|
/**
|
|
1366
1641
|
* `Clover.Tab`s. Without any, the panel has the tabs Clover has data for: About,
|
|
1367
1642
|
* Contents when the Manifest has Ranges, Search when it has a Content Search service, a
|
|
@@ -1393,7 +1668,11 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1393
1668
|
* heading, and names its section instead (`ui/heading.ts`).
|
|
1394
1669
|
*/
|
|
1395
1670
|
headingLevel?: number;
|
|
1396
|
-
/**
|
|
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
|
+
*/
|
|
1397
1676
|
download?: boolean;
|
|
1398
1677
|
/**
|
|
1399
1678
|
* The Manifest's thumbnail first, small, at its own shape, floated at the end of the
|
|
@@ -1407,6 +1686,12 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1407
1686
|
* it (Mat, 2026-10-26: "repeat label as a heading"). Default `true`.
|
|
1408
1687
|
*/
|
|
1409
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;
|
|
1410
1695
|
}
|
|
1411
1696
|
/**
|
|
1412
1697
|
* Everything the Manifest says about itself, in the order 3.x's About tab shows it:
|
|
@@ -1416,8 +1701,12 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1416
1701
|
* Each part renders only if the Manifest has
|
|
1417
1702
|
* it. The downloads are Download's: the `rendering` of the page in view ("This page")
|
|
1418
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.
|
|
1419
1708
|
*/
|
|
1420
|
-
export declare function About({
|
|
1709
|
+
export declare function About({ languages, ...props }: AboutProps): React.JSX.Element;
|
|
1421
1710
|
export interface AnnotationsProps extends React.HTMLAttributes<HTMLElement> {
|
|
1422
1711
|
/**
|
|
1423
1712
|
* Every annotation in the Manifest (default), as the Viewer's panel lists them: by
|
|
@@ -1435,25 +1724,6 @@ export interface AnnotationsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1435
1724
|
headingLevel?: number;
|
|
1436
1725
|
as?: React.ElementType;
|
|
1437
1726
|
}
|
|
1438
|
-
/**
|
|
1439
|
-
* The annotations of the Root's resource — comments, tags, transcriptions — grouped by
|
|
1440
|
-
* set, as a list to read and to point with.
|
|
1441
|
-
*
|
|
1442
|
-
* - Each entry shows its content (IIIF's limited HTML, sanitized; an image body as an
|
|
1443
|
-
* image). Pressing it frames the annotation on the Canvas, going to its Canvas first if
|
|
1444
|
-
* need be. For the keyboard, a button inside it does the same, out of sight, its focus
|
|
1445
|
-
* drawn around the entry.
|
|
1446
|
-
* - Hovering or focusing an entry highlights its hotspot, and hovering a hotspot
|
|
1447
|
-
* highlights its entry: one highlight, shared through the Root, with no timers.
|
|
1448
|
-
* - Each set is headed by its AnnotationPage's own label, when it has one, and at the
|
|
1449
|
-
* header's end a toggle that hides its annotations from the Canvas (`HideToggle`: an
|
|
1450
|
-
* eye, "Hide" and the page's label, or "Hide annotations" for a page without one).
|
|
1451
|
-
* Pointed at or focused, it lights every entry it hides.
|
|
1452
|
-
* - Where the same words come as separate annotations, one per language (a transcription
|
|
1453
|
-
* and its translation), the set's header offers their languages by code ("AR", "EN"),
|
|
1454
|
-
* and lists one at a time: the Root's `language` to start, else the reader's
|
|
1455
|
-
* (`LanguageChoice`). Annotations in no language show whichever is chosen.
|
|
1456
|
-
*/
|
|
1457
1727
|
export declare const Annotations: React.ForwardRefExoticComponent<AnnotationsProps & React.RefAttributes<HTMLElement>>;
|
|
1458
1728
|
export interface TranscriptProps extends React.HTMLAttributes<HTMLElement> {
|
|
1459
1729
|
as?: React.ElementType;
|
|
@@ -1490,7 +1760,10 @@ export interface TranscriptProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1490
1760
|
* "IT") picks one: native radios, each named by its code and its file's label, in that
|
|
1491
1761
|
* label's language. In an information panel's accordion the row sits beside the
|
|
1492
1762
|
* Transcript's heading (`useSectionActions`), where it is not lost in the cues; elsewhere
|
|
1493
|
-
* 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.
|
|
1494
1767
|
*/
|
|
1495
1768
|
export declare const Transcript: React.ForwardRefExoticComponent<TranscriptProps & React.RefAttributes<HTMLElement>>;
|
|
1496
1769
|
export interface ContentsProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -1499,7 +1772,17 @@ export interface ContentsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1499
1772
|
/**
|
|
1500
1773
|
* The Manifest's table of contents, from its Ranges: chapters of a book, acts of an opera,
|
|
1501
1774
|
* nested as they nest. The entry the reader is in is marked, following playback through a
|
|
1502
|
-
* 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.
|
|
1503
1786
|
* Hovering or focusing one marks its chapter on the Canvas's seek bar, and the chapter
|
|
1504
1787
|
* under the pointer there marks its entry here: one highlight, through the Root
|
|
1505
1788
|
* (`clover.chapter`), as the annotations share theirs.
|
|
@@ -1516,7 +1799,9 @@ export interface DownloadProps extends Omit<React.HTMLAttributes<HTMLElement>, "
|
|
|
1516
1799
|
* Downloads, as 3.x's Viewer offers them: the `rendering` of the Canvases in view ("This
|
|
1517
1800
|
* page") and of the Manifest ("All pages") — a PDF, a text, a high-resolution file —
|
|
1518
1801
|
* each a link, as Homepage lists a resource's pages (Mat, 2026-10-21: links, not a
|
|
1519
|
-
* 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.
|
|
1520
1805
|
*/
|
|
1521
1806
|
export declare function Download({ className, headingLevel, ...rest }: DownloadProps): React.JSX.Element | null;
|
|
1522
1807
|
/** A length: pixels as a number, or a CSS length in `px`, `rem` or `%` of the split. */
|
|
@@ -1745,6 +2030,13 @@ export interface SceneProps {
|
|
|
1745
2030
|
label?: unknown;
|
|
1746
2031
|
/** The language to read IIIF text in. The reader's, by default; inside a `Root`, the Root's. */
|
|
1747
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;
|
|
1748
2040
|
className?: string;
|
|
1749
2041
|
/** All of Clover's controls (`true`, the default), none (`false`), or all but those set `false`. */
|
|
1750
2042
|
controls?: boolean | SceneControlsConfig;
|
|
@@ -1809,6 +2101,13 @@ export declare function useVisibleCanvases(): Container[];
|
|
|
1809
2101
|
export declare function useActiveCanvas(): Container | null;
|
|
1810
2102
|
/** Moving between views. Steps by view, so a spread moves two pages at a time. */
|
|
1811
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;
|
|
1812
2111
|
/** Every annotation set: the Manifest's own (fetched so far) and any the host added. */
|
|
1813
2112
|
export declare function useAnnotationSets(): AnnotationSet[];
|
|
1814
2113
|
/** A IIIF language map as text in the Root's language, with the tag it is in. */
|
|
@@ -1851,7 +2150,7 @@ export interface Shortcut {
|
|
|
1851
2150
|
* hides it without moving the pointer or focus; the pointer can move onto it without it
|
|
1852
2151
|
* closing; and it stays until the pointer or focus leaves. Styles are `ui/Tip.css`.
|
|
1853
2152
|
*/
|
|
1854
|
-
export declare function Tip({ label, lang, shortcut, scrolls, image, }: {
|
|
2153
|
+
export declare function Tip({ label, lang, shortcut, scrolls, image, lead, after, }: {
|
|
1855
2154
|
label: string;
|
|
1856
2155
|
/** The language of `label`, where it is not its control's. */
|
|
1857
2156
|
lang?: string;
|
|
@@ -1867,6 +2166,18 @@ export declare function Tip({ label, lang, shortcut, scrolls, image, }: {
|
|
|
1867
2166
|
* shows, and named by them, as the control is.
|
|
1868
2167
|
*/
|
|
1869
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;
|
|
1870
2181
|
}): React.JSX.Element;
|
|
1871
2182
|
/**
|
|
1872
2183
|
* Clover's popups open one at a time: the Canvas's menus (annotations, Choice, an
|
|
@@ -1944,6 +2255,11 @@ export declare function titled(level: number, id: string, fallback?: React.Eleme
|
|
|
1944
2255
|
export interface CloverContextValue {
|
|
1945
2256
|
clover: Clover;
|
|
1946
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;
|
|
1947
2263
|
/** Renderers of the host's own, for `Body` to draw some views with. */
|
|
1948
2264
|
renderers?: BodyRenderer[];
|
|
1949
2265
|
}
|
|
@@ -1954,12 +2270,6 @@ export declare function useClover(part?: string): CloverContextValue;
|
|
|
1954
2270
|
* return the same object for the same state (the core's are memoized), or pass `isEqual`.
|
|
1955
2271
|
*/
|
|
1956
2272
|
export declare function useCloverSelector<Value>(selector: (state: CloverState) => Value, isEqual?: (a: Value, b: Value) => boolean, part?: string): Value;
|
|
1957
|
-
/**
|
|
1958
|
-
* Reading a content state: what a Root handed one (JSON or base64url, not a URL) loads
|
|
1959
|
-
* and where it goes. Its own chunk, loaded only for a content state (`loadContent`): a
|
|
1960
|
-
* page that opens a URL never carries it. Writing one stays in `content-state.ts`.
|
|
1961
|
-
*/
|
|
1962
|
-
export type Json = Record<string, any>;
|
|
1963
2273
|
/** A content state string (JSON, or base64url-encoded JSON) as JSON; null if neither. */
|
|
1964
2274
|
export declare function decodeContentState(value: string): Json | null;
|
|
1965
2275
|
/**
|
|
@@ -1994,6 +2304,11 @@ export interface Chapter {
|
|
|
1994
2304
|
label?: LanguageMapLike;
|
|
1995
2305
|
start: number;
|
|
1996
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>;
|
|
1997
2312
|
}
|
|
1998
2313
|
export declare function chaptersOf(manifest: Manifest | null, canvasId: string | null, duration?: number): Chapter[];
|
|
1999
2314
|
/** One entry of a table of contents: a Range, where it starts, and the Ranges within. */
|
|
@@ -2016,8 +2331,33 @@ export interface ContentsNode {
|
|
|
2016
2331
|
w: number;
|
|
2017
2332
|
h: number;
|
|
2018
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>;
|
|
2019
2349
|
children: ContentsNode[];
|
|
2020
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
|
+
}
|
|
2021
2361
|
/**
|
|
2022
2362
|
* The Manifest's table of contents, from `structures`. A single top Range that only wraps
|
|
2023
2363
|
* others is unwrapped, as a reader expects its chapters, not one entry holding them.
|
|
@@ -2028,7 +2368,12 @@ export declare function tableOfContents(manifest: Manifest | null): ContentsNode
|
|
|
2028
2368
|
* The entry the reader is in: the deepest covering `canvasId` whose span holds `time` (or
|
|
2029
2369
|
* that has no span). Null when none is.
|
|
2030
2370
|
*/
|
|
2031
|
-
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;
|
|
2032
2377
|
export declare function toPlainText(html: string): string;
|
|
2033
2378
|
/**
|
|
2034
2379
|
* How a text is read, strictly by its `format`'s media type: `text/html` as IIIF's HTML,
|
|
@@ -2038,21 +2383,22 @@ export declare function toPlainText(html: string): string;
|
|
|
2038
2383
|
* aside; anything else is plain text.
|
|
2039
2384
|
*/
|
|
2040
2385
|
export declare function readAs(format: string | undefined, value?: string): "markdown" | "html" | "plain";
|
|
2041
|
-
export type Json = Record<string, any>;
|
|
2042
2386
|
/**
|
|
2043
2387
|
* A small picture of a region of a Canvas (an annotation's `xywh`, in the Canvas's own
|
|
2044
2388
|
* coordinates), to be cut by the image server (`resolveThumbnail`): the image painted
|
|
2045
2389
|
* there is found, and the region read as shares of it (scaled from where it is painted),
|
|
2046
2390
|
* so the service's own `info.json` decides how it is asked for, never more than the
|
|
2047
2391
|
* region has, and from a server that cannot cut a region, nothing (no fallback: all of
|
|
2048
|
-
* 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.
|
|
2049
2395
|
*/
|
|
2050
2396
|
export declare function regionSource(canvas: Json | undefined, rect: {
|
|
2051
2397
|
x: number;
|
|
2052
2398
|
y: number;
|
|
2053
2399
|
w: number;
|
|
2054
2400
|
h: number;
|
|
2055
|
-
}): ThumbnailSource | null;
|
|
2401
|
+
}, image?: string): ThumbnailSource | null;
|
|
2056
2402
|
/**
|
|
2057
2403
|
* Clover's translations, without a translation library.
|
|
2058
2404
|
*
|
|
@@ -2148,8 +2494,13 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2148
2494
|
* stacked boxes each opened by its heading, or `"tabs"`.
|
|
2149
2495
|
*/
|
|
2150
2496
|
panelLayout?: PanelLayout;
|
|
2151
|
-
/** The downloads
|
|
2497
|
+
/** The downloads, from a Download button beside the panel's About heading. Default `true`. */
|
|
2152
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;
|
|
2153
2504
|
/** The thumbnails under the Body: a layout, or `false` for none. Default `slider`. */
|
|
2154
2505
|
items?: Exclude<ItemsLayout, "pager"> | false;
|
|
2155
2506
|
/**
|
|
@@ -2165,7 +2516,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2165
2516
|
*/
|
|
2166
2517
|
fill?: boolean;
|
|
2167
2518
|
};
|
|
2168
|
-
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;
|
|
2169
2520
|
/**
|
|
2170
2521
|
* A layout the Viewer draws: one from `@nulib/clover/templates`, or a component of your
|
|
2171
2522
|
* own that takes the `Clover.Root` props.
|