@nulib/clover 4.1.0 → 4.3.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 +1 -1
- package/dist/components/Body/useControlsVisibility.mjs +35 -13
- package/dist/components/Canvas/CanvasView.mjs +33 -4
- package/dist/components/Canvas/ChaptersMenu.mjs +6 -1
- package/dist/components/Canvas/ControlMenu.mjs +9 -2
- package/dist/components/Canvas/Controls.mjs +17 -4
- package/dist/components/Canvas/FrameAnimation.mjs +3 -0
- package/dist/components/Canvas/ImageControls.mjs +8 -3
- package/dist/components/Canvas/Placeholder.mjs +5 -2
- package/dist/components/Canvas/RowFits.mjs +3 -1
- package/dist/components/Canvas/media/MediaBody.mjs +3 -0
- package/dist/components/Canvas/media/Player.mjs +3 -0
- package/dist/components/Canvas/media/Transport.mjs +3 -0
- package/dist/components/Canvas/media/useMediaElement.mjs +32 -9
- package/dist/components/Items/masonry.mjs +2 -0
- package/dist/components/Map/MapView.mjs +42 -2
- package/dist/components/Map/maplibre-sheet.mjs +5 -0
- package/dist/components/Map/sheet.mjs +19 -0
- package/dist/components/Map/worker.mjs +28 -1
- package/dist/components/Panel/Panel.mjs +47 -59
- package/dist/components/Panel/sections.mjs +62 -0
- package/dist/components/Scene/SceneView.mjs +3 -0
- package/dist/core/content-state.mjs +1 -11
- package/dist/core/load.mjs +9 -1
- package/dist/core/presentation.mjs +4 -5
- package/dist/core/sanitize.mjs +15 -3
- package/dist/core/svg-shape.mjs +2 -1
- package/dist/core/thumbnail.mjs +15 -4
- package/dist/core/trusted.mjs +26 -0
- package/dist/core/vtt.mjs +20 -9
- package/dist/index.d.mts +269 -6
- package/dist/index.mjs +13 -0
- package/dist/lib/pointer.mjs +1 -1
- package/dist/lib/renderer/CanvasRenderer.mjs +48 -7
- package/dist/lib/renderer/camera/CameraAnimator.mjs +39 -20
- package/dist/lib/renderer/input/GestureController.mjs +15 -5
- package/dist/map/index.d.mts +6 -1
- package/dist/styles/collection-select.css +1 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/items.css +1 -0
- package/dist/styles/map.css +1 -0
- package/dist/styles/media.css +1 -0
- package/dist/styles/panel.css +1 -0
- package/dist/styles/scene.css +1 -0
- package/dist/styles/split.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +7 -0
- package/dist/templates/document/Document.mjs +22 -3
- package/dist/templates/document/Sheets.mjs +2 -0
- package/dist/templates/gallery/Gallery.mjs +7 -1
- package/dist/templates/index.d.mts +167 -6
- package/dist/templates/shared/Lightbox.mjs +50 -3
- package/dist/templates/shared/LightboxView.mjs +8 -1
- package/dist/templates/shared/PanelPane.mjs +13 -1
- package/dist/templates.css +1 -1
- package/dist/ui/Button.mjs +3 -1
- package/dist/ui/ControlCluster.mjs +6 -3
- package/dist/ui/Markup.mjs +8 -7
- package/dist/ui/Tip.mjs +6 -1
- package/dist/ui/adoptSheet.mjs +19 -0
- package/dist/ui/sheets/map.mjs +5 -0
- package/dist/ui/sheets/media.mjs +5 -0
- package/dist/ui/sheets/scene.mjs +5 -0
- package/dist/web-components/{About-DvyvVUK5.mjs → About-uNCjvWgs.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-BpRcSrOM.mjs → AnnotationItems-JwlcCvPo.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-BDPec3iI.mjs → AnnotationMenu-BWyKEyvW.mjs} +1 -1
- package/dist/web-components/{AnnotationState-Chs_37Kk.mjs → AnnotationState-Bhqs75Br.mjs} +1 -1
- package/dist/web-components/{Annotations-CLPEq7Ro.mjs → Annotations-C7y0N8Lj.mjs} +1 -1
- package/dist/web-components/{Annotations-6E-oD_wg.mjs → Annotations-ZwcRh2UE.mjs} +2 -2
- package/dist/web-components/{Body-Ct61yxI7.mjs → Body-DyrvRDkt.mjs} +1 -1
- package/dist/web-components/{BodyAlert-C_Qh3Up_.mjs → BodyAlert-XV88XjL8.mjs} +1 -1
- package/dist/web-components/Button-BIaw5k1q.mjs +1 -0
- package/dist/web-components/{Camera-BPyLzZjP.mjs → Camera-7SlnmGtb.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-8wFavYdl.mjs → Canvas2DBackend-DBGZRGid.mjs} +1 -1
- package/dist/web-components/CanvasView-CmDxczm9.mjs +2 -0
- package/dist/web-components/{CaptionDetails-DuwS-grE.mjs → CaptionDetails-Bxz8AXMz.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-CMQiBqvx.mjs +1 -0
- package/dist/web-components/{Chevron-Cyr_cc9X.mjs → Chevron-B3XaClVT.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-ConzybVH.mjs → ChoiceMenu-pugo5zxI.mjs} +1 -1
- package/dist/web-components/{Collection-CLayN8sv.mjs → Collection-Ch_FeSKp.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-D2d8dGJ4.mjs → CollectionSelect-2jDEkOcK.mjs} +1 -1
- package/dist/web-components/{Connected-CBQ6xyhr.mjs → Connected-3hnIPSWM.mjs} +1 -1
- package/dist/web-components/{Connected-DMXG3imZ.mjs → Connected-Bne3I5E1.mjs} +1 -1
- package/dist/web-components/{Connected-pyd0EBD3.mjs → Connected-DuANHN93.mjs} +1 -1
- package/dist/web-components/{Contents-tCMXBYDK.mjs → Contents-DIQrin_-.mjs} +1 -1
- package/dist/web-components/ControlMenu-BydnCTTQ.mjs +1 -0
- package/dist/web-components/ControlsFade-CleBsk-W.mjs +1 -0
- package/dist/web-components/CountMenu-CReBYVwu.mjs +1 -0
- package/dist/web-components/Cue-2zGQuUOC.mjs +1 -0
- package/dist/web-components/Document-pjc2qOX4.mjs +1 -0
- package/dist/web-components/{DomLayers-BxPU05-D.mjs → DomLayers-D9X_FPto.mjs} +1 -1
- package/dist/web-components/{Download-Bku9Vptk.mjs → Download-B8MpVqgk.mjs} +1 -1
- package/dist/web-components/{EntryBodies-77vDudCb.mjs → EntryBodies-DdpRfU5U.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-BxQWKW6e.mjs → EntryThumbnail-DM7Zjj1z.mjs} +1 -1
- package/dist/web-components/{FieldPill-nFGsaru9.mjs → FieldPill-BAql8_6s.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-BvKiSXcm.mjs → FrameAnimation-Dj46RxuL.mjs} +1 -1
- package/dist/web-components/Gallery-B9FNA02Z.mjs +1 -0
- package/dist/web-components/{HideToggle-TEhY4TS4.mjs → HideToggle-duXvDvDw.mjs} +1 -1
- package/dist/web-components/ImageControls-DODKjC0d.mjs +1 -0
- package/dist/web-components/{Items-CudZ4Lnb.mjs → Items-BHTQJU7T.mjs} +1 -1
- package/dist/web-components/{Label-f07N5Fld.mjs → Label-D4dlrtpH.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-B5VM21DV.mjs → LanguageChoice-DR3X-dtJ.mjs} +1 -1
- package/dist/web-components/LightboxView-D-aBaKfB.mjs +1 -0
- package/dist/web-components/{ListEnd-M39M62Cl.mjs → ListEnd-CQ4vX-NW.mjs} +1 -1
- package/dist/web-components/{Loaded-oGFyBuos.mjs → Loaded-DsNSPXWf.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-IvpSzPO6.mjs → LoadedCanvas-Cq7_O2bw.mjs} +1 -1
- package/dist/web-components/LoadedMap-0_prxuA4.mjs +1 -0
- package/dist/web-components/{Loading-YxuKrDAM.mjs → Loading-4PmhMeZ-.mjs} +1 -1
- package/dist/web-components/{Map-Cw9j3gi3.mjs → Map-B29Ba50b.mjs} +1 -1
- package/dist/web-components/MapView-nHeg39Kz.mjs +3 -0
- package/dist/web-components/Markup-BZ7l5GbG.mjs +2 -0
- package/dist/web-components/MediaBody-DH-rr_0N.mjs +1 -0
- package/dist/web-components/{MediaBody-JnKnoIqY.mjs → MediaBody-eSThjFzH.mjs} +1 -1
- package/dist/web-components/{NavDate-BCCOyycx.mjs → NavDate-0MsHRjBW.mjs} +1 -1
- package/dist/web-components/{Navigator-Bx4zS0Yr.mjs → Navigator-qJ79A8Nk.mjs} +1 -1
- package/dist/web-components/{Pager-B9GvQ64b.mjs → Pager-SPd_u0qz.mjs} +1 -1
- package/dist/web-components/{PagerLayout-BF33VZL_.mjs → PagerLayout-CkSwDAnp.mjs} +1 -1
- package/dist/web-components/Panel-C8r3EsWn.mjs +1 -0
- package/dist/web-components/PanelPart-BA1NoeLA.mjs +1 -0
- package/dist/web-components/{PanelToggle-bPcIULGZ.mjs → PanelToggle-CrKP8BqE.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-HLg-r00O.mjs → PartOfManifest-BdDSxK4k.mjs} +1 -1
- package/dist/web-components/{Pending-BxGjjnqq.mjs → Pending-CmgVU1kF.mjs} +1 -1
- package/dist/web-components/{PlaceBox-D-Zhe9-U.mjs → PlaceBox-D7HLNGxE.mjs} +1 -1
- package/dist/web-components/Placeholder-DVAlXejQ.mjs +1 -0
- package/dist/web-components/{Position-TYnzcm8e.mjs → Position-C6KUAceQ.mjs} +1 -1
- package/dist/web-components/{Primitives-C6VJXxZD.mjs → Primitives-ClQVjY6x.mjs} +1 -1
- package/dist/web-components/{Provider-DyB0wpeO.mjs → Provider-C0IUdU6v.mjs} +1 -1
- package/dist/web-components/{ReadMore-De_0T7lc.mjs → ReadMore-BiEJA4yO.mjs} +1 -1
- package/dist/web-components/Root-Drt5N4_s.mjs +1 -0
- package/dist/web-components/Scene-C7t16NjC.mjs +1 -0
- package/dist/web-components/SceneView-BHg37-rs.mjs +1 -0
- package/dist/web-components/{Search-DgT8OPsK.mjs → Search-Bpd_lGzH.mjs} +1 -1
- package/dist/web-components/{Sections-d1acn7qm.mjs → Sections-D_bS5IQH.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-DUb4YKCB.mjs → StandaloneItems-YV9O9M8F.mjs} +1 -1
- package/dist/web-components/{Status-CcU3u6P4.mjs → Status-BCG7AN9B.mjs} +1 -1
- package/dist/web-components/{Steps-nlSCzbDQ.mjs → Steps-Dnn8Ajqf.mjs} +1 -1
- package/dist/web-components/TargetItems-xxbtePln.mjs +1 -0
- package/dist/web-components/Timeline-Danuk_Nn.mjs +1 -0
- package/dist/web-components/Tip-DPFWlNLu.mjs +1 -0
- package/dist/web-components/{Transcript-bSA3cx_K.mjs → Transcript-C-_DbUO5.mjs} +1 -1
- package/dist/web-components/{Transport-DjOYI-fR.mjs → Transport-BKona8RD.mjs} +1 -1
- package/dist/web-components/Transport-Bonmu77-.mjs +1 -0
- package/dist/web-components/{annotation-collection-D8emkElk.mjs → annotation-collection-nmxzo_hO.mjs} +1 -1
- package/dist/web-components/{annotation-name-DbWjhgra.mjs → annotation-name-DoUUo-8D.mjs} +1 -1
- package/dist/web-components/{annotations-content-Bg6aVAGC.mjs → annotations-content-Cl1upbdd.mjs} +1 -1
- package/dist/web-components/{body-Ct8dmQdW.mjs → body-DC8Oq8rY.mjs} +1 -1
- package/dist/web-components/{canvas-goEZLqEd.mjs → canvas-gzoTnBxw.mjs} +1 -1
- package/dist/web-components/{cloverEngine-Df7cMwOP.mjs → cloverEngine-CFL1Bd7n.mjs} +1 -1
- package/dist/web-components/{content-state-reader-CNmBpG1L.mjs → content-state-reader-DYbmXxCp.mjs} +1 -1
- package/dist/web-components/controlGlyphs-d7KUIUwi.mjs +1 -0
- package/dist/web-components/{controls-BZr16sYQ.mjs → controls-VC9D1mwr.mjs} +1 -1
- package/dist/web-components/custom-elements.json +41 -3
- package/dist/web-components/{downloads-EjJ6Hpip.mjs → downloads-D2cnWDbs.mjs} +1 -1
- package/dist/web-components/{dragToClose-X9NbZOhA.mjs → dragToClose-CzYeh_12.mjs} +1 -1
- package/dist/web-components/{engine-DMoc0tff.mjs → engine-Dcfyp2DV.mjs} +1 -1
- package/dist/web-components/{engines-BmB81VXR.mjs → engines-BMr7naGM.mjs} +1 -1
- package/dist/web-components/{fetchManifest-CwQC6cCh.mjs → fetchManifest-DxptUh4u.mjs} +1 -1
- package/dist/web-components/{fromManifest-DrAmY1lB.mjs → fromManifest-BpPFLVyZ.mjs} +1 -1
- package/dist/web-components/{glyphs-BFK_hvJJ.mjs → glyphs-BCnJl8py.mjs} +1 -1
- package/dist/web-components/hooks-Dz_5UXXp.mjs +1 -0
- package/dist/web-components/{image-layers-D2nQC4R-.mjs → image-layers-BPnq7jk1.mjs} +1 -1
- package/dist/web-components/{imageService-iFElsopt.mjs → imageService-DFPkPNfe.mjs} +1 -1
- package/dist/web-components/index-ClM6Kq8w.mjs +1 -0
- package/dist/web-components/index.d.mts +5 -3
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BHporT5i.mjs +1 -0
- package/dist/web-components/{items-BnEnc5ot.mjs → items-D03KhDg6.mjs} +1 -1
- package/dist/web-components/label-r0ki6r1U.mjs +1 -0
- package/dist/web-components/{layout-Djwu8f4R.mjs → layout-DVa_DnGH.mjs} +1 -1
- package/dist/web-components/{link-0lUlTZlw.mjs → link-DxXxMXiw.mjs} +1 -1
- package/dist/web-components/logo-Br42Vlsk.mjs +1 -0
- package/dist/web-components/maplibre-sheet-CfiZ6JFk.mjs +1 -0
- package/dist/web-components/masonry-BZCdA3bV.mjs +1 -0
- package/dist/web-components/{models-BF2pqufA.mjs → models-pO77sm3z.mjs} +1 -1
- package/dist/web-components/{nodes-ChQRLDGU.mjs → nodes-CmL3eoRE.mjs} +1 -1
- package/dist/web-components/{overlayImage-MKrcgDep.mjs → overlayImage-DFGetjMh.mjs} +1 -1
- package/dist/web-components/{panel-C13V6w6E.mjs → panel-B1vzUm6_.mjs} +1 -1
- package/dist/web-components/part-DmRBh4pf.mjs +1 -0
- package/dist/web-components/{playerSurface-DG1XipTq.mjs → playerSurface-CQ1wrIAQ.mjs} +1 -1
- package/dist/web-components/pointer-DWnCT3D3.mjs +1 -0
- package/dist/web-components/{provider-DiUkZYiW.mjs → provider-U7xzX_0T.mjs} +1 -1
- package/dist/web-components/{range-regions-CqGjyM76.mjs → range-regions-Di_lmVqZ.mjs} +1 -1
- package/dist/web-components/{read-more-D8RJYdtQ.mjs → read-more-BtA1sriO.mjs} +1 -1
- package/dist/web-components/{readingLanguages-BWOLZK2k.mjs → readingLanguages-Ptho-Co9.mjs} +1 -1
- package/dist/web-components/rendererSurface-BgZPnAwj.mjs +22 -0
- package/dist/web-components/{renderers-LtRX5pT0.mjs → renderers-hoD3WKYA.mjs} +1 -1
- package/dist/web-components/{resource-Cfydiy4m.mjs → resource-DuTMsPEj.mjs} +1 -1
- package/dist/web-components/{sanitize-qIOeyIww.mjs → sanitize-BedC_UE5.mjs} +3 -3
- package/dist/web-components/{save-file-dZyOpXgY.mjs → save-file-CLB5IM4a.mjs} +1 -1
- package/dist/web-components/{search-BfUZJM3a.mjs → search-Dd2Y1dsZ.mjs} +1 -1
- package/dist/web-components/shared-CCg1Iag8.mjs +1 -0
- package/dist/web-components/{show-link-DgLJzG7k.mjs → show-link-NjacLIdz.mjs} +1 -1
- package/dist/web-components/{sizedImage-NHzhcBYk.mjs → sizedImage-CKOGmqhN.mjs} +1 -1
- package/dist/web-components/{split-CuFiKjin.mjs → split-CcoXZcGX.mjs} +1 -1
- package/dist/web-components/{status-C3etlkhY.mjs → status-B4a3Izph.mjs} +1 -1
- package/dist/web-components/styles-C7PVxtkQ.mjs +1 -0
- package/dist/web-components/svg-shape-D1K-WNrY.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-ez20ssEY.mjs +1 -0
- package/dist/web-components/{tip-D5YgaIWW.mjs → tip-DeFPN33O.mjs} +1 -1
- package/dist/web-components/{toggle-CZGB65VZ.mjs → toggle-CGSnnjW-.mjs} +1 -1
- package/dist/web-components/trusted-Bvpx307M.mjs +1 -0
- package/dist/web-components/{useContainerName-hKQjEt7a.mjs → useContainerName-BfyeBf6_.mjs} +1 -1
- package/dist/web-components/useControlsVisibility-oRiMiQhD.mjs +1 -0
- package/dist/web-components/useLazyPanelPane-CReKsr8z.mjs +1 -0
- package/dist/web-components/{useNearViewport-CDbHQUBk.mjs → useNearViewport-BADiMpLi.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-D9l_P3_B.mjs → useScrollTrack-9QsMaHSx.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-DtsnDXPM.mjs → AnnotationItems-Cvh3jfmf.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-C-Mz6CCn.mjs → AnnotationMenu-d5PT7q8D.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-5pim5K72.mjs → AnnotationState-DbtYTHMy.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-Cqn1TkzD.mjs → Annotations-DKWYJOo2.mjs} +2 -2
- package/dist/web-components/viewer/{Annotations-CxwN9FkB.mjs → Annotations-D_wg4O99.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-C-ZMSCak.mjs → Canvas2DBackend-B4IXvdsN.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-CRD-gSZP.mjs → CaptionDetails-Bxh9VD7n.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-CaAIaRZN.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-ByGzQQx1.mjs → ChoiceMenu-Clp4Zeog.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-m0GCcsfQ.mjs → Collection-C5BfoUOH.mjs} +1 -1
- package/dist/web-components/viewer/Connected-9VGl2Xnx.mjs +1 -0
- package/dist/web-components/viewer/{Connected-Dvx7wtot.mjs → Connected-Cd2qwuuo.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-CwDpfiJY.mjs → Contents-CsG9e7v2.mjs} +1 -1
- package/dist/web-components/viewer/ControlMenu-q_u_UC8q.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-Db3IWArv.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-Dn0-z5A9.mjs +1 -0
- package/dist/web-components/viewer/Cue-slOJQhPI.mjs +1 -0
- package/dist/web-components/viewer/Document-r3Sz3RfH.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-hc0qARQc.mjs → DomLayers-CwHg1jZg.mjs} +1 -1
- package/dist/web-components/viewer/{Download-MO-1Rik4.mjs → Download-Clx_e2ga.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-g-OEwEsk.mjs → EntryBodies-B4SnV6NJ.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-DcIDYATi.mjs → EntryThumbnail-CsAqKh38.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-B9S21lxw.mjs → FieldPill-NQfq8SXA.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-qI9cZPEs.mjs → FrameAnimation-wN2VNW7D.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-nX9kQlft.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-D8wH49mq.mjs → HideToggle-B843JuKU.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls--qeUY5kg.mjs +1 -0
- package/dist/web-components/viewer/{LanguageChoice-CRqsCBAp.mjs → LanguageChoice-CZ6K3Mhv.mjs} +1 -1
- package/dist/web-components/viewer/LightboxView-BcbP3cJD.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-D9Obxie4.mjs → ListEnd-DbYDv46a.mjs} +1 -1
- package/dist/web-components/viewer/MapView-Dj7Iq7P2.mjs +3 -0
- package/dist/web-components/viewer/MediaBody-TN4XsCm7.mjs +1 -0
- package/dist/web-components/viewer/{MediaBody-D5ff6xy-.mjs → MediaBody-iAxGgXNy.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-BnfDG57h.mjs → NavDate-Clj6OMa6.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-BNwjmkXY.mjs → Navigator-DPdR3SYX.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-C8jraHqs.mjs → PagerLayout-CtlmDRjI.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-DzZWRlK1.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-DX7H0V4g.mjs → PartOfManifest-NAXs2DYd.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-CCWfzsNU.mjs → PlaceBox-C2k5Fsfo.mjs} +1 -1
- package/dist/web-components/viewer/Placeholder-DF6dRMjt.mjs +1 -0
- package/dist/web-components/viewer/{Search-CsdYzdq1.mjs → Search-DoUc8tWu.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-BfvBxbUm.mjs → StandaloneItems-DuXasJO0.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-BH8ZApS4.mjs → Steps-B3MrG4Cv.mjs} +1 -1
- package/dist/web-components/viewer/TargetItems-DOFSQtYR.mjs +1 -0
- package/dist/web-components/viewer/{Transcript-DXLv5WR9.mjs → Transcript-Dy-FHWMo.mjs} +1 -1
- package/dist/web-components/viewer/Transport-C5wkxVOF.mjs +1 -0
- package/dist/web-components/viewer/{Transport-C-fh7Kx2.mjs → Transport-CUXmY_jW.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-Cjd8Dgyl.mjs → annotation-collection-A0PNdPhI.mjs} +1 -1
- package/dist/web-components/viewer/annotation-name-CfQs7Mb2.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-BARXoAz-.mjs → annotations-content-B52-zM99.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CumnJPKO.mjs → cloverEngine-4sgpB7Rz.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-DuvyLThu.mjs → content-state-reader-vtATl-W3.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-CFCxhUxn.mjs → dragToClose-B4rj1D3r.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-qNB_KgxL.mjs → fetchManifest-gAj8phm4.mjs} +1 -1
- package/dist/web-components/viewer/{host-GTHX2fPK.mjs → host-Hv8WXfiF.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DKOuaRTj.mjs → image-layers-gFEDKVkV.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BlaM0tCa.mjs → link-DIh6ysyo.mjs} +1 -1
- package/dist/web-components/viewer/{overlayImage-RVpv69R5.mjs → overlayImage-BRjcH40Q.mjs} +1 -1
- package/dist/web-components/viewer/{range-regions-CIZiAHOp.mjs → range-regions-uPqjKIER.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-Dw1klwlx.mjs → renderers-C5EfPrd7.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-EvzaBEJN.mjs → save-file-dIa0LCAn.mjs} +1 -1
- package/dist/web-components/viewer/{search-x1QL_bth.mjs → search-Bbv9dCNq.mjs} +1 -1
- package/dist/web-components/viewer/styles-L1HpSoL2.mjs +1 -0
- package/dist/web-components/viewer/useControlsVisibility-jopIdHZi.mjs +1 -0
- package/dist/web-components/viewer/useLazyPanelPane-CoPgtYkx.mjs +1 -0
- package/dist/web-components/viewer/viewer-DqpSyvH-.mjs +29 -0
- package/dist/web-components/viewer/vtt-DpgB_K8v.mjs +5 -0
- package/dist/web-components/viewer-D2lGdifc.mjs +1 -0
- package/dist/web-components/vtt-KUQbi4PK.mjs +5 -0
- package/dist/web-components/worker-C9aVbya_.mjs +1 -0
- package/package.json +2 -1
- package/dist/web-components/Button-L8ZMy5lY.mjs +0 -1
- package/dist/web-components/CanvasView-2Fj9nT06.mjs +0 -2
- package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +0 -1
- package/dist/web-components/ControlMenu-D1zkB0qX.mjs +0 -1
- package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +0 -1
- package/dist/web-components/CountMenu-Dnzb7lKo.mjs +0 -1
- package/dist/web-components/Cue-CUGmPS3k.mjs +0 -1
- package/dist/web-components/Document-D-8nalCX.mjs +0 -1
- package/dist/web-components/Gallery-4Hd58afA.mjs +0 -1
- package/dist/web-components/ImageControls-CZO7WoPb.mjs +0 -1
- package/dist/web-components/LightboxView-C4OASmkg.mjs +0 -1
- package/dist/web-components/LoadedMap-WATGNLxl.mjs +0 -1
- package/dist/web-components/MapView-3OxoCr5l.mjs +0 -3
- package/dist/web-components/Markup-DW75Jx3j.mjs +0 -2
- package/dist/web-components/MediaBody-CLtd0bf0.mjs +0 -1
- package/dist/web-components/Panel-BvDpCn6K.mjs +0 -1
- package/dist/web-components/PanelPart-Bd4lSUrP.mjs +0 -1
- package/dist/web-components/Placeholder-DzY5hcbk.mjs +0 -1
- package/dist/web-components/Root-Bt3NNBFb.mjs +0 -1
- package/dist/web-components/Scene-DrOM9YlD.mjs +0 -1
- package/dist/web-components/SceneView-DA7Yg20p.mjs +0 -1
- package/dist/web-components/TargetItems-BDJM3Ar-.mjs +0 -1
- package/dist/web-components/Timeline-BfdN3lIv.mjs +0 -1
- package/dist/web-components/Tip-OCB88zwY.mjs +0 -1
- package/dist/web-components/Transport-DaIhfZqC.mjs +0 -1
- package/dist/web-components/hooks-BhtNDs_1.mjs +0 -1
- package/dist/web-components/index-FJEpXukG.mjs +0 -1
- package/dist/web-components/items-BPPrqbeh.mjs +0 -1
- package/dist/web-components/label-DauFa5sg.mjs +0 -1
- package/dist/web-components/logo-DWPxaZaG.mjs +0 -1
- package/dist/web-components/masonry-0QfzOgbB.mjs +0 -1
- package/dist/web-components/part-CekFWrtz.mjs +0 -1
- package/dist/web-components/pointer-YQppt0at.mjs +0 -1
- package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +0 -22
- package/dist/web-components/shared-DkY2a89G.mjs +0 -1
- package/dist/web-components/styles-DkkVOSUQ.mjs +0 -1
- package/dist/web-components/svg-shape-DLY3g7oq.mjs +0 -1
- package/dist/web-components/thumbnail-DecrVnpj.mjs +0 -1
- package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +0 -1
- package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +0 -1
- package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +0 -1
- package/dist/web-components/viewer/CountMenu-0-ie8kIZ.mjs +0 -1
- package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +0 -1
- package/dist/web-components/viewer/Document-BsryuYJ1.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +0 -1
- package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +0 -1
- package/dist/web-components/viewer/MapView-DQSwUzd7.mjs +0 -3
- package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +0 -1
- package/dist/web-components/viewer/TargetItems-BebPFr-c.mjs +0 -1
- package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +0 -1
- package/dist/web-components/viewer/styles-I7_LWFGj.mjs +0 -1
- package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +0 -1
- package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +0 -1
- package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +0 -29
- package/dist/web-components/viewer/vtt-C2G89SWH.mjs +0 -5
- package/dist/web-components/viewer-Br44EEba.mjs +0 -1
- package/dist/web-components/vtt-Dd0c7psH.mjs +0 -5
- package/dist/web-components/worker-CjXN0dku.mjs +0 -1
|
@@ -24,6 +24,8 @@ function Default({
|
|
|
24
24
|
panel = true,
|
|
25
25
|
defaultPanelOpen,
|
|
26
26
|
panelLayout = "accordion",
|
|
27
|
+
panelSections,
|
|
28
|
+
panelLabels,
|
|
27
29
|
download = true,
|
|
28
30
|
languages = true,
|
|
29
31
|
items = "slider",
|
|
@@ -31,6 +33,7 @@ function Default({
|
|
|
31
33
|
storageKey = "clover-template-default",
|
|
32
34
|
fill = false,
|
|
33
35
|
collapseControls,
|
|
36
|
+
canvasOptions,
|
|
34
37
|
...root
|
|
35
38
|
}) {
|
|
36
39
|
const panes = useRef(null);
|
|
@@ -43,6 +46,7 @@ function Default({
|
|
|
43
46
|
beside: useWideEnough(panes, BESIDE_REM),
|
|
44
47
|
defaultOpen: defaultPanelOpen ?? true,
|
|
45
48
|
followFocus: useFollowFocus(),
|
|
49
|
+
sections: panelSections,
|
|
46
50
|
body: () => {
|
|
47
51
|
var _a;
|
|
48
52
|
return (_a = panes.current) == null ? void 0 : _a.querySelector(
|
|
@@ -93,6 +97,7 @@ function Default({
|
|
|
93
97
|
{
|
|
94
98
|
className: "clover-template-default-body",
|
|
95
99
|
collapseControls,
|
|
100
|
+
options: canvasOptions,
|
|
96
101
|
children: panel && !docked && pane.toggle
|
|
97
102
|
}
|
|
98
103
|
),
|
|
@@ -112,6 +117,8 @@ function Default({
|
|
|
112
117
|
pane,
|
|
113
118
|
className: "clover-template-default-panel",
|
|
114
119
|
layout: panelLayout,
|
|
120
|
+
sections: panelSections,
|
|
121
|
+
labels: panelLabels,
|
|
115
122
|
download,
|
|
116
123
|
languages,
|
|
117
124
|
headingLevel: header ? below(headingLevel) : headingLevel
|
|
@@ -27,11 +27,14 @@ function Document({
|
|
|
27
27
|
singleItem = false,
|
|
28
28
|
defaultPanelOpen = false,
|
|
29
29
|
panelLayout = "accordion",
|
|
30
|
+
panelSections,
|
|
31
|
+
panelLabels,
|
|
30
32
|
download = true,
|
|
31
33
|
languages = true,
|
|
32
34
|
headingLevel = 2,
|
|
33
35
|
storageKey = "clover-template-document",
|
|
34
36
|
collapseControls,
|
|
37
|
+
canvasOptions,
|
|
35
38
|
...root
|
|
36
39
|
}) {
|
|
37
40
|
const title = titled(
|
|
@@ -52,11 +55,14 @@ function Document({
|
|
|
52
55
|
singleItem,
|
|
53
56
|
defaultPanelOpen,
|
|
54
57
|
panelLayout,
|
|
58
|
+
panelSections,
|
|
59
|
+
panelLabels,
|
|
55
60
|
download,
|
|
56
61
|
languages,
|
|
57
62
|
headingLevel,
|
|
58
63
|
storageKey,
|
|
59
|
-
collapseControls
|
|
64
|
+
collapseControls,
|
|
65
|
+
canvasOptions
|
|
60
66
|
}
|
|
61
67
|
)
|
|
62
68
|
}
|
|
@@ -74,7 +80,10 @@ function DocumentLayout({
|
|
|
74
80
|
headingLevel = 2,
|
|
75
81
|
storageKey,
|
|
76
82
|
panelLayout,
|
|
83
|
+
panelSections,
|
|
84
|
+
panelLabels,
|
|
77
85
|
collapseControls,
|
|
86
|
+
canvasOptions,
|
|
78
87
|
title
|
|
79
88
|
}) {
|
|
80
89
|
const t = useT();
|
|
@@ -101,7 +110,8 @@ function DocumentLayout({
|
|
|
101
110
|
id: `${id}-panel`,
|
|
102
111
|
beside: useWideEnough(panes, BESIDE_REM + (showSidebar ? SIDEBAR_REM : 0)),
|
|
103
112
|
defaultOpen: Boolean(defaultPanelOpen),
|
|
104
|
-
followFocus
|
|
113
|
+
followFocus,
|
|
114
|
+
sections: panelSections
|
|
105
115
|
});
|
|
106
116
|
const reach = (event) => {
|
|
107
117
|
var _a, _b;
|
|
@@ -234,7 +244,14 @@ function DocumentLayout({
|
|
|
234
244
|
min: showSidebar && !sidebar.over || docked ? PAGE_MIN : void 0,
|
|
235
245
|
children: [
|
|
236
246
|
pages && !sidebar.open && /* @__PURE__ */ jsx("div", { className: "clover-template-document-sidebar-closed", children: toggle }),
|
|
237
|
-
/* @__PURE__ */ jsx(
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
Sheets,
|
|
249
|
+
{
|
|
250
|
+
collapseControls,
|
|
251
|
+
canvasOptions,
|
|
252
|
+
children: !docked && panelToggle
|
|
253
|
+
}
|
|
254
|
+
)
|
|
238
255
|
]
|
|
239
256
|
}
|
|
240
257
|
),
|
|
@@ -244,6 +261,8 @@ function DocumentLayout({
|
|
|
244
261
|
pane: panel,
|
|
245
262
|
className: "clover-template-document-panel",
|
|
246
263
|
layout: panelLayout,
|
|
264
|
+
sections: panelSections,
|
|
265
|
+
labels: panelLabels,
|
|
247
266
|
headingLevel: below(headingLevel),
|
|
248
267
|
download: false,
|
|
249
268
|
languages
|
|
@@ -17,6 +17,7 @@ const ratioOf = (canvas) => {
|
|
|
17
17
|
};
|
|
18
18
|
function Sheets({
|
|
19
19
|
collapseControls,
|
|
20
|
+
canvasOptions,
|
|
20
21
|
children
|
|
21
22
|
}) {
|
|
22
23
|
const { clover } = useClover("Document");
|
|
@@ -307,6 +308,7 @@ function Sheets({
|
|
|
307
308
|
{
|
|
308
309
|
className: "clover-template-document-body",
|
|
309
310
|
collapseControls,
|
|
311
|
+
options: canvasOptions,
|
|
310
312
|
onReady: setHandle,
|
|
311
313
|
children
|
|
312
314
|
}
|
|
@@ -25,11 +25,14 @@ function Gallery({
|
|
|
25
25
|
panel = true,
|
|
26
26
|
defaultPanelOpen = true,
|
|
27
27
|
panelLayout = "accordion",
|
|
28
|
+
panelSections,
|
|
29
|
+
panelLabels,
|
|
28
30
|
download = true,
|
|
29
31
|
languages = true,
|
|
30
32
|
storageKey = "clover-template-gallery",
|
|
31
33
|
headingLevel = 2,
|
|
32
34
|
collapseControls,
|
|
35
|
+
canvasOptions,
|
|
33
36
|
style,
|
|
34
37
|
...root
|
|
35
38
|
}) {
|
|
@@ -76,10 +79,13 @@ function Gallery({
|
|
|
76
79
|
panel,
|
|
77
80
|
defaultPanelOpen,
|
|
78
81
|
panelLayout,
|
|
82
|
+
panelSections,
|
|
83
|
+
panelLabels,
|
|
79
84
|
download,
|
|
80
85
|
languages,
|
|
81
86
|
storageKey,
|
|
82
|
-
collapseControls
|
|
87
|
+
collapseControls,
|
|
88
|
+
canvasOptions
|
|
83
89
|
}
|
|
84
90
|
)
|
|
85
91
|
]
|
|
@@ -156,6 +156,39 @@ export interface RootProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
|
|
|
156
156
|
as?: React.ElementType;
|
|
157
157
|
children?: React.ReactNode;
|
|
158
158
|
}
|
|
159
|
+
export type BackendKind = "webgl2" | "canvas2d" | "none";
|
|
160
|
+
export interface GestureOptions {
|
|
161
|
+
/**
|
|
162
|
+
* A mouse click zooms in; with Shift, out. With this or `dblClickToZoom`, a double tap
|
|
163
|
+
* (a finger, or a pen that does not hover) zooms in.
|
|
164
|
+
*/
|
|
165
|
+
clickToZoom: boolean;
|
|
166
|
+
/** A double click zooms in. Only consulted when `clickToZoom` is off. */
|
|
167
|
+
dblClickToZoom: boolean;
|
|
168
|
+
pinchToZoom: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Plain wheel zooms. Off by default, matching Clover's OpenSeadragon setting, so an
|
|
171
|
+
* embedded viewer never swallows page scroll. A trackpad pinch (a wheel event with
|
|
172
|
+
* `ctrlKey`) always zooms the image, since it is never a page scroll.
|
|
173
|
+
*/
|
|
174
|
+
scrollToZoom: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* The reader may move the camera at all: drag, pinch, wheel, double-click and keys.
|
|
177
|
+
* Off, the view stays where the host puts it and only taps are reported (a lone video
|
|
178
|
+
* or sound, always fitted to the Body).
|
|
179
|
+
*/
|
|
180
|
+
navigable: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* A mouse or pen drag tracks the pointer 1:1 and glides on after a fast release. Off,
|
|
183
|
+
* the drag is eased instead and stops where the pointer does. A finger always tracks 1:1 and flicks.
|
|
184
|
+
*/
|
|
185
|
+
flickEnabled: boolean;
|
|
186
|
+
/** Release speed, px/s, below which a drag does not flick. */
|
|
187
|
+
flickMinSpeed: number;
|
|
188
|
+
/** Seconds of release velocity the flick travels. */
|
|
189
|
+
flickMomentum: number;
|
|
190
|
+
}
|
|
191
|
+
export type BackendPreference = "auto" | BackendKind;
|
|
159
192
|
/** A region of the image as shares of it: 0 to 1 across and down. */
|
|
160
193
|
export interface RegionShare {
|
|
161
194
|
x: number;
|
|
@@ -174,6 +207,9 @@ export interface RegionShare {
|
|
|
174
207
|
* nor than its limits, at level 0 only a size it lists (Mat, 2026-10-24: "be
|
|
175
208
|
* responsible when making IIIF image server requests"). What a manifest says of a
|
|
176
209
|
* service is not trusted to say what its server does.
|
|
210
|
+
* - A `thumbnail` whose own `width` and `height` already fit the size (`resolveThumbnail`)
|
|
211
|
+
* is used as the manifest gives it, with no `info.json` read: the publisher's own URL,
|
|
212
|
+
* not one built from what a service says.
|
|
177
213
|
* - Without a service, the image itself is used.
|
|
178
214
|
*/
|
|
179
215
|
export interface ThumbnailSource {
|
|
@@ -188,6 +224,58 @@ export interface ThumbnailSource {
|
|
|
188
224
|
region?: RegionShare | string;
|
|
189
225
|
/** Used if the service cannot answer. */
|
|
190
226
|
fallback?: string;
|
|
227
|
+
/** The pixels `fallback` is, as its own `width` and `height` say (a `thumbnail`'s). */
|
|
228
|
+
fallbackSize?: {
|
|
229
|
+
width: number;
|
|
230
|
+
height: number;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
export interface CloverCanvasOptions {
|
|
234
|
+
/** Which painter to use. `auto` (default) tries WebGL2, then Canvas2D. */
|
|
235
|
+
backend?: BackendPreference;
|
|
236
|
+
/** Pointer, wheel and keyboard behavior. Wheel zoom is off by default. */
|
|
237
|
+
gestures?: Partial<GestureOptions>;
|
|
238
|
+
/** Largest zoom, in CSS pixels per image pixel. Default 1.1. */
|
|
239
|
+
maxZoomPixelRatio?: number;
|
|
240
|
+
/** Smallest zoom, as a fraction of the home zoom. Default 0.9. */
|
|
241
|
+
minZoomImageRatio?: number;
|
|
242
|
+
/** Seconds for an animation to close most of its distance. 0 disables easing. */
|
|
243
|
+
animationTime?: number;
|
|
244
|
+
/**
|
|
245
|
+
* Seconds each animation (zoom, glide, home) takes, on a fixed-length spring. Unset,
|
|
246
|
+
* the camera eases by `animationTime` instead.
|
|
247
|
+
*/
|
|
248
|
+
animationDuration?: number;
|
|
249
|
+
/** With `animationDuration`, how much of the movement comes early: higher starts faster. Default 6.5. */
|
|
250
|
+
springStiffness?: number;
|
|
251
|
+
/** Hold the image inside its bounds while dragging. Default true; false lets it spring back on release. */
|
|
252
|
+
constrainDuringPan?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Milliseconds the controls and navigator stay after a mouse (or a pen that hovers)
|
|
255
|
+
* stops moving, or a finger lifts, as the Player's `hideDelay`. Default 3000; `Infinity`
|
|
256
|
+
* keeps them once shown. A tap on the picture shows them, and another hides them. Focus
|
|
257
|
+
* that no press brought holds them, and so does a paused recording.
|
|
258
|
+
* A Timeline's: a Canvas's controls stay in sight, for now (Mat, 2026-11-01).
|
|
259
|
+
*/
|
|
260
|
+
hideDelay?: number;
|
|
261
|
+
/** A time-based Canvas's video or sound. */
|
|
262
|
+
/**
|
|
263
|
+
* An animation Canvas (painting annotations at `#t=` times, one per frame): play on
|
|
264
|
+
* arrival, and loop at the end (the reader can turn looping off and on). Inside a `Root`,
|
|
265
|
+
* `auto-advance` and `repeat` behaviors set them, and a Manifest's `auto-advance` moves
|
|
266
|
+
* on when a non-looping animation ends (`onEnded`, as for video). Neither by default; a
|
|
267
|
+
* reader asking for reduced motion is never autoplayed.
|
|
268
|
+
*/
|
|
269
|
+
animation?: {
|
|
270
|
+
autoplay?: boolean;
|
|
271
|
+
loop?: boolean;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Credentials, headers and a custom `fetch` for every request the Canvas makes:
|
|
275
|
+
* `info.json`, tiles, captions and HLS. A `<video>` or an image without CORS can only
|
|
276
|
+
* send credentials. Inside a `Root`, the Root's `request` is used.
|
|
277
|
+
*/
|
|
278
|
+
request?: CloverRequest;
|
|
191
279
|
}
|
|
192
280
|
/**
|
|
193
281
|
* What `Items` shows: light models of a Manifest's views or a Collection's members, never
|
|
@@ -310,8 +398,21 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
310
398
|
}) => React.ReactNode;
|
|
311
399
|
as?: React.ElementType;
|
|
312
400
|
}
|
|
401
|
+
/**
|
|
402
|
+
* A section `Panel` draws by itself, from what the Root's resource holds. `sections`
|
|
403
|
+
* chooses among them; each still shows only where there is data for it.
|
|
404
|
+
*/
|
|
405
|
+
export type PanelSection = "about" | "targets" | "collection" | "contents" | "search" | "map" | "transcript" | "annotations";
|
|
313
406
|
/** How the sections are laid out. */
|
|
314
407
|
export type SectionsLayout = "tabs" | "accordion";
|
|
408
|
+
/**
|
|
409
|
+
* What a page calls a section, in place of Clover's own word for it: its words, taken to
|
|
410
|
+
* be in the page's language, or its words by language tag, one of which the tab carries
|
|
411
|
+
* as its `lang` where it is not the page's (WCAG 3.1.2).
|
|
412
|
+
*/
|
|
413
|
+
export type PanelSectionLabel = string | Readonly<Record<string, string>>;
|
|
414
|
+
/** A label for any of the default sections, by its value. */
|
|
415
|
+
export type PanelSectionLabels = Partial<Record<PanelSection, PanelSectionLabel>>;
|
|
315
416
|
/** How an information panel lays out its sections. */
|
|
316
417
|
export type PanelLayout = SectionsLayout;
|
|
317
418
|
export type DefaultProps = Omit<RootProps, "children"> & {
|
|
@@ -335,6 +436,19 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
335
436
|
* stacked boxes each opened by its heading, or `"tabs"`.
|
|
336
437
|
*/
|
|
337
438
|
panelLayout?: PanelLayout;
|
|
439
|
+
/**
|
|
440
|
+
* The panel's sections, from Clover's own: with
|
|
441
|
+
* `["contents", "search", "transcript", "annotations"]` it has those four, each still
|
|
442
|
+
* only where the resource has data for it, and no panel at all where it has none of
|
|
443
|
+
* them. Default: every section.
|
|
444
|
+
*/
|
|
445
|
+
panelSections?: readonly PanelSection[];
|
|
446
|
+
/**
|
|
447
|
+
* What a panel section's tab or heading says, in place of Clover's own word for it:
|
|
448
|
+
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
449
|
+
* Panel's `labels`).
|
|
450
|
+
*/
|
|
451
|
+
panelLabels?: PanelSectionLabels;
|
|
338
452
|
/** The downloads, from a Download button beside the panel's About heading. Default `true`. */
|
|
339
453
|
download?: boolean;
|
|
340
454
|
/**
|
|
@@ -367,6 +481,8 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
367
481
|
* The Body's `collapseControls`.
|
|
368
482
|
*/
|
|
369
483
|
collapseControls?: "auto" | "always";
|
|
484
|
+
/** The Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
485
|
+
canvasOptions?: CloverCanvasOptions;
|
|
370
486
|
};
|
|
371
487
|
/**
|
|
372
488
|
* The Viewer's own layout, drawn when no `template` is given: Clover 3.x's Viewer, built
|
|
@@ -380,7 +496,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
380
496
|
* uncovered: a click there, Escape or the panel's close button puts it away. Size it with
|
|
381
497
|
* `--clover-body-height`.
|
|
382
498
|
*/
|
|
383
|
-
export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, languages, items, singleItem, storageKey, fill, collapseControls, ...root }: DefaultProps): React.JSX.Element;
|
|
499
|
+
export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, items, singleItem, storageKey, fill, collapseControls, canvasOptions, ...root }: DefaultProps): React.JSX.Element;
|
|
384
500
|
export type DocumentProps = Omit<RootProps, "children"> & {
|
|
385
501
|
/**
|
|
386
502
|
* Whether the page thumbnails start shown beside the page. Default `true`. On a phone,
|
|
@@ -402,6 +518,19 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
402
518
|
* Default's), stacked boxes each opened by its heading, or `"tabs"`.
|
|
403
519
|
*/
|
|
404
520
|
panelLayout?: PanelLayout;
|
|
521
|
+
/**
|
|
522
|
+
* The panel's sections, from Clover's own: with
|
|
523
|
+
* `["contents", "search", "transcript", "annotations"]` it has those four, each still
|
|
524
|
+
* only where the resource has data for it, and no panel at all where it has none of
|
|
525
|
+
* them. Default: every section.
|
|
526
|
+
*/
|
|
527
|
+
panelSections?: readonly PanelSection[];
|
|
528
|
+
/**
|
|
529
|
+
* What a panel section's tab or heading says, in place of Clover's own word for it:
|
|
530
|
+
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
531
|
+
* Panel's `labels`).
|
|
532
|
+
*/
|
|
533
|
+
panelLabels?: PanelSectionLabels;
|
|
405
534
|
/** The downloads in the toolbar, as links: the page's and the Manifest's `rendering`. Default `true`. */
|
|
406
535
|
download?: boolean;
|
|
407
536
|
/**
|
|
@@ -426,6 +555,8 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
426
555
|
* The Body's `collapseControls`.
|
|
427
556
|
*/
|
|
428
557
|
collapseControls?: "auto" | "always";
|
|
558
|
+
/** The Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
559
|
+
canvasOptions?: CloverCanvasOptions;
|
|
429
560
|
};
|
|
430
561
|
/**
|
|
431
562
|
* A layout that reads like a PDF viewer: a toolbar, page thumbnails down the left, and
|
|
@@ -436,7 +567,7 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
436
567
|
* where there is room for both, and slides out over the page where there is not. Size
|
|
437
568
|
* it with `--clover-template-document-height`.
|
|
438
569
|
*/
|
|
439
|
-
export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, download, languages, headingLevel, storageKey, collapseControls, ...root }: DocumentProps): React.JSX.Element;
|
|
570
|
+
export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, headingLevel, storageKey, collapseControls, canvasOptions, ...root }: DocumentProps): React.JSX.Element;
|
|
440
571
|
export type GalleryProps = Omit<RootProps, "children"> & {
|
|
441
572
|
/** The size of a grid cell. Default `10rem`, through `--clover-items-size`. */
|
|
442
573
|
size?: string;
|
|
@@ -483,6 +614,19 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
483
614
|
defaultPanelOpen?: boolean;
|
|
484
615
|
/** How the panel lays out its sections: `"accordion"` (the default) or `"tabs"`. */
|
|
485
616
|
panelLayout?: PanelLayout;
|
|
617
|
+
/**
|
|
618
|
+
* The panel's sections, from Clover's own: with
|
|
619
|
+
* `["contents", "search", "transcript", "annotations"]` it has those four, each still
|
|
620
|
+
* only where the resource has data for it, and no panel at all where it has none of
|
|
621
|
+
* them. Default: every section.
|
|
622
|
+
*/
|
|
623
|
+
panelSections?: readonly PanelSection[];
|
|
624
|
+
/**
|
|
625
|
+
* What a panel section's tab or heading says, in place of Clover's own word for it:
|
|
626
|
+
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
627
|
+
* Panel's `labels`).
|
|
628
|
+
*/
|
|
629
|
+
panelLabels?: PanelSectionLabels;
|
|
486
630
|
/** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
|
|
487
631
|
download?: boolean;
|
|
488
632
|
/**
|
|
@@ -506,6 +650,8 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
506
650
|
* Its lightbox's Body's `collapseControls`.
|
|
507
651
|
*/
|
|
508
652
|
collapseControls?: "auto" | "always";
|
|
653
|
+
/** Its lightbox's Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
654
|
+
canvasOptions?: CloverCanvasOptions;
|
|
509
655
|
};
|
|
510
656
|
/**
|
|
511
657
|
* A grid framed by what it opens, that opens a cell in a lightbox with the Body and the
|
|
@@ -514,7 +660,7 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
514
660
|
* shows that Manifest in the lightbox. Escape, the close button, or a press outside
|
|
515
661
|
* closes it, and focus returns to the cell.
|
|
516
662
|
*/
|
|
517
|
-
export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, download, languages, storageKey, headingLevel, collapseControls, style, ...root }: GalleryProps): React.JSX.Element;
|
|
663
|
+
export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, storageKey, headingLevel, collapseControls, canvasOptions, style, ...root }: GalleryProps): React.JSX.Element;
|
|
518
664
|
export interface LightboxProps {
|
|
519
665
|
open: boolean;
|
|
520
666
|
onClose: () => void;
|
|
@@ -534,6 +680,19 @@ export interface LightboxProps {
|
|
|
534
680
|
defaultPanelOpen?: boolean;
|
|
535
681
|
/** The panel's sections as stacked boxes (`"accordion"`, the default) or tabs. */
|
|
536
682
|
panelLayout?: PanelLayout;
|
|
683
|
+
/**
|
|
684
|
+
* The panel's sections, from Clover's own: with
|
|
685
|
+
* `["contents", "search", "transcript", "annotations"]` it has those four, each still
|
|
686
|
+
* only where the resource has data for it, and no panel at all where it has none of
|
|
687
|
+
* them. Default: every section.
|
|
688
|
+
*/
|
|
689
|
+
panelSections?: readonly PanelSection[];
|
|
690
|
+
/**
|
|
691
|
+
* What a panel section's tab or heading says, in place of Clover's own word for it:
|
|
692
|
+
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
693
|
+
* Panel's `labels`).
|
|
694
|
+
*/
|
|
695
|
+
panelLabels?: PanelSectionLabels;
|
|
537
696
|
/** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
|
|
538
697
|
download?: boolean;
|
|
539
698
|
/** The languages to read the resource in, beside the panel's About heading. Default `true`. */
|
|
@@ -542,6 +701,8 @@ export interface LightboxProps {
|
|
|
542
701
|
storageKey?: string | false;
|
|
543
702
|
/** The Body's `collapseControls`: when the view's controls collapse behind one button. */
|
|
544
703
|
collapseControls?: "auto" | "always";
|
|
704
|
+
/** The Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
705
|
+
canvasOptions?: CloverCanvasOptions;
|
|
545
706
|
className?: string;
|
|
546
707
|
}
|
|
547
708
|
/**
|
|
@@ -554,9 +715,9 @@ export interface LightboxProps {
|
|
|
554
715
|
* 2026-11-01: "carousel by default") or the pager (with the position). A modal
|
|
555
716
|
* `<dialog>`'s backdrop always covers the whole window, so this is a layer in the Root, a
|
|
556
717
|
* `dialog` to assistive technology, named by its title: while it is open the rest of the
|
|
557
|
-
* Root is inert, focus is on the view in its strip (on Close with the
|
|
558
|
-
* Close, Back or a press on the layer
|
|
559
|
-
*
|
|
718
|
+
* Root is inert but what speaks, focus is on the view in its strip (on Close with the
|
|
719
|
+
* pager), Tab comes round inside it, and Escape, Close, Back or a press on the layer
|
|
720
|
+
* outside the panel closes it, focus going back to the grid's cell of the view shown.
|
|
560
721
|
* By default it fills the layout's bounds; `--clover-template-lightbox-inset`,
|
|
561
722
|
* `-backdrop` and `-radius` give it room, a backdrop and corners (`Lightbox.css`). The
|
|
562
723
|
* layout positions it and holds its stacking (`position: relative` and `isolation:
|
|
@@ -40,7 +40,7 @@ function Lightbox({
|
|
|
40
40
|
if (!open || !element || !root) return;
|
|
41
41
|
const opener = element.ownerDocument.activeElement;
|
|
42
42
|
const others = Array.from(root.children).filter(
|
|
43
|
-
(child) => child !== element && !child.classList.contains("clover-announcer")
|
|
43
|
+
(child) => child !== element && !child.classList.contains("clover-announcer") && !child.classList.contains("clover-status")
|
|
44
44
|
);
|
|
45
45
|
others.forEach((child) => child.inert = true);
|
|
46
46
|
(_b = (_a2 = panel.current) == null ? void 0 : _a2.scrollIntoView) == null ? void 0 : _b.call(_a2, { block: "nearest" });
|
|
@@ -48,9 +48,33 @@ function Lightbox({
|
|
|
48
48
|
'[role="listbox"] [role="option"][aria-selected="true"]'
|
|
49
49
|
);
|
|
50
50
|
(_d = chosen ?? close.current) == null ? void 0 : _d.focus({ preventScroll: true });
|
|
51
|
+
const doc = element.ownerDocument;
|
|
52
|
+
let check;
|
|
53
|
+
const onTab = (event) => {
|
|
54
|
+
var _a3;
|
|
55
|
+
if (event.key !== "Tab" || !((_a3 = panel.current) == null ? void 0 : _a3.contains(event.target)))
|
|
56
|
+
return;
|
|
57
|
+
const back = event.shiftKey;
|
|
58
|
+
clearTimeout(check);
|
|
59
|
+
check = setTimeout(() => {
|
|
60
|
+
var _a4;
|
|
61
|
+
const dialog = panel.current;
|
|
62
|
+
if (!dialog || dialog.contains(doc.activeElement)) return;
|
|
63
|
+
const stops = stopsOf(dialog);
|
|
64
|
+
(_a4 = back ? stops.at(-1) : stops[0]) == null ? void 0 : _a4.focus();
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
doc.addEventListener("keydown", onTab, true);
|
|
51
68
|
return () => {
|
|
69
|
+
var _a3, _b2;
|
|
70
|
+
doc.removeEventListener("keydown", onTab, true);
|
|
71
|
+
clearTimeout(check);
|
|
52
72
|
others.forEach((child) => child.inert = false);
|
|
53
|
-
|
|
73
|
+
const shown = (_a3 = opener == null ? void 0 : opener.closest('[role="listbox"]')) == null ? void 0 : _a3.querySelector('[role="option"][aria-selected="true"]');
|
|
74
|
+
const back = shown ?? opener;
|
|
75
|
+
if (!(back == null ? void 0 : back.isConnected)) return;
|
|
76
|
+
back.focus({ preventScroll: true });
|
|
77
|
+
(_b2 = back.scrollIntoView) == null ? void 0 : _b2.call(back, { block: "nearest" });
|
|
54
78
|
};
|
|
55
79
|
}, [open]);
|
|
56
80
|
return /* @__PURE__ */ jsx(
|
|
@@ -63,7 +87,12 @@ function Lightbox({
|
|
|
63
87
|
if (event.target === layer.current) onClose();
|
|
64
88
|
},
|
|
65
89
|
onKeyDown: (event) => {
|
|
66
|
-
if (event.
|
|
90
|
+
if (event.defaultPrevented) return;
|
|
91
|
+
if (event.key === "Tab" && panel.current) {
|
|
92
|
+
wrapFocus(panel.current, event);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (event.key !== "Escape") return;
|
|
67
96
|
event.preventDefault();
|
|
68
97
|
closing.current();
|
|
69
98
|
},
|
|
@@ -149,6 +178,24 @@ function Lightbox({
|
|
|
149
178
|
}
|
|
150
179
|
);
|
|
151
180
|
}
|
|
181
|
+
const STOPS = 'a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])';
|
|
182
|
+
const stopsOf = (dialog) => Array.from(dialog.querySelectorAll(STOPS)).filter(
|
|
183
|
+
(stop) => {
|
|
184
|
+
var _a;
|
|
185
|
+
return stop.tabIndex >= 0 && !stop.matches(":disabled") && !stop.closest("[inert]") && (((_a = stop.checkVisibility) == null ? void 0 : _a.call(stop, { visibilityProperty: true })) ?? true);
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
function wrapFocus(dialog, event) {
|
|
189
|
+
const stops = stopsOf(dialog);
|
|
190
|
+
const first = stops[0];
|
|
191
|
+
const last = stops.at(-1);
|
|
192
|
+
if (!first || !last) return;
|
|
193
|
+
const at = dialog.ownerDocument.activeElement;
|
|
194
|
+
if (event.shiftKey ? at === first : at === last) {
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
(event.shiftKey ? last : first).focus();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
152
199
|
function Back({ onOut }) {
|
|
153
200
|
const t = useT();
|
|
154
201
|
const langOf = useLangOf();
|
|
@@ -17,10 +17,13 @@ function LightboxView({
|
|
|
17
17
|
panel = true,
|
|
18
18
|
defaultPanelOpen = true,
|
|
19
19
|
panelLayout = "accordion",
|
|
20
|
+
panelSections,
|
|
21
|
+
panelLabels,
|
|
20
22
|
download = true,
|
|
21
23
|
languages = true,
|
|
22
24
|
storageKey,
|
|
23
|
-
collapseControls
|
|
25
|
+
collapseControls,
|
|
26
|
+
canvasOptions
|
|
24
27
|
}) {
|
|
25
28
|
const panes = useRef(null);
|
|
26
29
|
useEffect(() => {
|
|
@@ -52,6 +55,7 @@ function LightboxView({
|
|
|
52
55
|
beside: useWideEnough(panes, BESIDE_REM),
|
|
53
56
|
defaultOpen: defaultPanelOpen,
|
|
54
57
|
followFocus: useFollowFocus(),
|
|
58
|
+
sections: panelSections,
|
|
55
59
|
body: () => {
|
|
56
60
|
var _a;
|
|
57
61
|
return (_a = panes.current) == null ? void 0 : _a.querySelector(
|
|
@@ -78,6 +82,7 @@ function LightboxView({
|
|
|
78
82
|
{
|
|
79
83
|
className: "clover-template-lightbox-body",
|
|
80
84
|
collapseControls,
|
|
85
|
+
options: canvasOptions,
|
|
81
86
|
children: panel && !pane.docked && pane.toggle
|
|
82
87
|
}
|
|
83
88
|
),
|
|
@@ -104,6 +109,8 @@ function LightboxView({
|
|
|
104
109
|
{
|
|
105
110
|
pane,
|
|
106
111
|
layout: panelLayout,
|
|
112
|
+
sections: panelSections,
|
|
113
|
+
labels: panelLabels,
|
|
107
114
|
download,
|
|
108
115
|
languages,
|
|
109
116
|
headingLevel: (headingLevel ?? 3) + 1
|
|
@@ -5,6 +5,7 @@ import { preloadDrag } from "./useDragToClose.mjs";
|
|
|
5
5
|
import { useDrawer } from "./useDrawer.mjs";
|
|
6
6
|
import { PANEL_MIN } from "./useSlide.mjs";
|
|
7
7
|
import { useSpineTop } from "./useSpine.mjs";
|
|
8
|
+
import { usePanelSections } from "../../components/Panel/sections.mjs";
|
|
8
9
|
import { SplitHandle, SplitPane } from "../../components/Split/Split.mjs";
|
|
9
10
|
import { PanelToggle } from "../../components/Panel/PanelToggle.mjs";
|
|
10
11
|
function usePanelPane({
|
|
@@ -13,6 +14,7 @@ function usePanelPane({
|
|
|
13
14
|
defaultOpen,
|
|
14
15
|
followFocus,
|
|
15
16
|
body,
|
|
17
|
+
sections,
|
|
16
18
|
panel,
|
|
17
19
|
load
|
|
18
20
|
}) {
|
|
@@ -34,8 +36,9 @@ function usePanelPane({
|
|
|
34
36
|
if (drawer.over) preloadDrag();
|
|
35
37
|
};
|
|
36
38
|
const toggle = /* @__PURE__ */ jsx(
|
|
37
|
-
|
|
39
|
+
PaneToggle,
|
|
38
40
|
{
|
|
41
|
+
sections,
|
|
39
42
|
open: drawer.open,
|
|
40
43
|
onOpenChange: (next) => next && !panel && load ? load().then(() => drawer.setOpen(true)) : drawer.setOpen(next),
|
|
41
44
|
controls: id
|
|
@@ -58,12 +61,20 @@ function usePanelPane({
|
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
63
|
}
|
|
64
|
+
function PaneToggle({
|
|
65
|
+
sections,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return usePanelSections(sections).length ? /* @__PURE__ */ jsx(PanelToggle, { ...props }) : null;
|
|
69
|
+
}
|
|
61
70
|
function PanelPane({
|
|
62
71
|
pane,
|
|
63
72
|
className,
|
|
64
73
|
...panel
|
|
65
74
|
}) {
|
|
66
75
|
const { id, over, docked, Part } = pane;
|
|
76
|
+
const offered = usePanelSections(panel.sections);
|
|
77
|
+
if (!offered.length) return null;
|
|
67
78
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
79
|
docked && /* @__PURE__ */ jsx(
|
|
69
80
|
SplitHandle,
|
|
@@ -80,6 +91,7 @@ function PanelPane({
|
|
|
80
91
|
id,
|
|
81
92
|
"data-spine": over || void 0,
|
|
82
93
|
name: "panel",
|
|
94
|
+
"data-about": offered.includes("about") || void 0,
|
|
83
95
|
className: ["clover-template-panel clover-template-drawer", className].filter(Boolean).join(" "),
|
|
84
96
|
size: "24rem",
|
|
85
97
|
min: over ? void 0 : PANEL_MIN,
|