@nulib/clover 4.0.0 → 4.1.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/dist/components/Body/Body.mjs +16 -1
- package/dist/components/Body/glyphs.mjs +15 -0
- package/dist/components/Canvas/CanvasView.mjs +116 -12
- package/dist/components/Canvas/ChaptersMenu.mjs +105 -0
- package/dist/components/Canvas/ControlMenu.mjs +23 -4
- package/dist/components/Canvas/Controls.mjs +223 -60
- package/dist/components/Canvas/ControlsFade.mjs +16 -0
- package/dist/components/Canvas/ImageControls.mjs +209 -0
- package/dist/components/Canvas/Placeholder.mjs +44 -12
- package/dist/components/Canvas/RowFits.mjs +85 -0
- package/dist/components/Canvas/layout.mjs +11 -0
- package/dist/components/Canvas/media/MediaBody.mjs +105 -46
- package/dist/components/Canvas/media/Player.mjs +0 -55
- package/dist/components/Canvas/media/Transport.mjs +14 -23
- package/dist/components/Canvas/panClearOfControls.mjs +1 -1
- package/dist/components/Collection/Collection.mjs +1 -1
- package/dist/components/Items/CountMenu.mjs +1 -0
- package/dist/components/Items/Item.mjs +4 -3
- package/dist/components/Items/Items.mjs +30 -10
- package/dist/components/Items/PagerLayout.mjs +2 -0
- package/dist/components/Items/TargetItems.mjs +1 -1
- package/dist/components/Items/masonry.mjs +35 -0
- package/dist/components/Panel/About.mjs +25 -8
- package/dist/components/Root/useRootState.mjs +2 -49
- package/dist/components/Scene/SceneView.mjs +13 -2
- package/dist/components/Scene/cloverEngine.mjs +2 -1
- package/dist/components/Timeline/playerSurface.mjs +2 -0
- package/dist/core/clover.mjs +7 -4
- package/dist/core/content-state.mjs +5 -3
- 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/index.d.mts +109 -51
- package/dist/lib/gltf/load.mjs +26 -6
- package/dist/lib/renderer/CanvasRenderer.mjs +44 -32
- package/dist/lib/renderer/camera/Camera.mjs +1 -1
- package/dist/react/useContentStateOutput.mjs +71 -0
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +37 -128
- package/dist/templates/document/Document.mjs +41 -64
- package/dist/templates/document/Sheets.mjs +13 -5
- package/dist/templates/gallery/Gallery.mjs +90 -18
- package/dist/templates/index.d.mts +299 -17
- package/dist/templates/shared/Lightbox.mjs +161 -69
- package/dist/templates/shared/LightboxView.mjs +118 -0
- package/dist/templates/shared/PanelPane.mjs +104 -0
- package/dist/templates/{document/DocumentPanel.mjs → shared/PanelPart.mjs} +2 -2
- package/dist/templates/shared/dragToClose.mjs +51 -8
- package/dist/templates/shared/givenAnnotations.mjs +13 -0
- package/dist/templates/shared/useDragToClose.mjs +6 -3
- package/dist/templates/shared/useLazyPanelPane.mjs +16 -0
- package/dist/templates/shared/useSlide.mjs +6 -0
- package/dist/templates.css +1 -1
- package/dist/ui/ControlCluster.mjs +15 -17
- package/dist/ui/Sections.mjs +3 -3
- package/dist/ui/mediaIcons.mjs +35 -8
- package/dist/ui/useScrollTrack.mjs +2 -1
- package/dist/web-components/About-DvyvVUK5.mjs +1 -0
- package/dist/web-components/AnnotationItems-BpRcSrOM.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-BCwwwfbb.mjs → AnnotationMenu-BDPec3iI.mjs} +1 -1
- package/dist/web-components/{AnnotationState-CavxnAAq.mjs → AnnotationState-Chs_37Kk.mjs} +1 -1
- package/dist/web-components/{Annotations-DDjSrBL5.mjs → Annotations-6E-oD_wg.mjs} +1 -1
- package/dist/web-components/{Annotations-rBmeI5sR.mjs → Annotations-CLPEq7Ro.mjs} +1 -1
- package/dist/web-components/Body-Ct61yxI7.mjs +1 -0
- package/dist/web-components/{BodyAlert-COKp19lq.mjs → BodyAlert-C_Qh3Up_.mjs} +1 -1
- package/dist/web-components/{Button-DLFYqtz9.mjs → Button-L8ZMy5lY.mjs} +1 -1
- package/dist/web-components/{Camera-Cp5ma-6C.mjs → Camera-BPyLzZjP.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-3PToh87Z.mjs → Canvas2DBackend-8wFavYdl.mjs} +1 -1
- package/dist/web-components/CanvasView-2Fj9nT06.mjs +2 -0
- package/dist/web-components/CaptionDetails-DuwS-grE.mjs +1 -0
- package/dist/web-components/ChaptersMenu-Bj2EqtVJ.mjs +1 -0
- package/dist/web-components/{Chevron-r-_hUPn8.mjs → Chevron-Cyr_cc9X.mjs} +1 -1
- package/dist/web-components/ChoiceMenu-ConzybVH.mjs +1 -0
- package/dist/web-components/Collection-CLayN8sv.mjs +1 -0
- package/dist/web-components/{CollectionSelect-CBWUbqQi.mjs → CollectionSelect-D2d8dGJ4.mjs} +1 -1
- package/dist/web-components/{Connected-B2d6EoFl.mjs → Connected-CBQ6xyhr.mjs} +1 -1
- package/dist/web-components/{Connected-BSRM9FJY.mjs → Connected-DMXG3imZ.mjs} +1 -1
- package/dist/web-components/{Connected-BnpxYeJN.mjs → Connected-pyd0EBD3.mjs} +1 -1
- package/dist/web-components/{Contents-D7FPxSH-.mjs → Contents-tCMXBYDK.mjs} +1 -1
- package/dist/web-components/ControlMenu-D1zkB0qX.mjs +1 -0
- package/dist/web-components/ControlsFade-BNXVTL_Q.mjs +1 -0
- package/dist/web-components/{CountMenu-DyTp_J4k.mjs → CountMenu-Dnzb7lKo.mjs} +1 -1
- package/dist/web-components/Cue-CUGmPS3k.mjs +1 -0
- package/dist/web-components/Document-D-8nalCX.mjs +1 -0
- package/dist/web-components/{DomLayers-CTGub6wo.mjs → DomLayers-BxPU05-D.mjs} +1 -1
- package/dist/web-components/{Download-BOYNIb7C.mjs → Download-Bku9Vptk.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bfd2Z42z.mjs → EntryBodies-77vDudCb.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-DQE8ajI9.mjs → EntryThumbnail-BxQWKW6e.mjs} +1 -1
- package/dist/web-components/{FieldPill-D5DNJWLy.mjs → FieldPill-nFGsaru9.mjs} +1 -1
- package/dist/web-components/FrameAnimation-BvKiSXcm.mjs +1 -0
- package/dist/web-components/Gallery-4Hd58afA.mjs +1 -0
- package/dist/web-components/{HideToggle-DL911R1Z.mjs → HideToggle-TEhY4TS4.mjs} +1 -1
- package/dist/web-components/ImageControls-CZO7WoPb.mjs +1 -0
- package/dist/web-components/Items-CudZ4Lnb.mjs +1 -0
- package/dist/web-components/Label-f07N5Fld.mjs +1 -0
- package/dist/web-components/{LanguageChoice-DT1UPiDn.mjs → LanguageChoice-B5VM21DV.mjs} +1 -1
- package/dist/web-components/LightboxView-C4OASmkg.mjs +1 -0
- package/dist/web-components/ListEnd-M39M62Cl.mjs +1 -0
- package/dist/web-components/{Loaded-BWfEBJyg.mjs → Loaded-oGFyBuos.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-IvpSzPO6.mjs +1 -0
- package/dist/web-components/LoadedMap-WATGNLxl.mjs +1 -0
- package/dist/web-components/{Loading-zw74TdAz.mjs → Loading-YxuKrDAM.mjs} +1 -1
- package/dist/web-components/{Map--dJhk0_0.mjs → Map-Cw9j3gi3.mjs} +1 -1
- package/dist/web-components/MapView-3OxoCr5l.mjs +3 -0
- package/dist/web-components/Markup-DW75Jx3j.mjs +2 -0
- package/dist/web-components/MediaBody-CLtd0bf0.mjs +1 -0
- package/dist/web-components/MediaBody-JnKnoIqY.mjs +1 -0
- package/dist/web-components/{NavDate-BQHuyLOC.mjs → NavDate-BCCOyycx.mjs} +1 -1
- package/dist/web-components/{Navigator-B3U21_ti.mjs → Navigator-Bx4zS0Yr.mjs} +1 -1
- package/dist/web-components/{Pager-DnJknq92.mjs → Pager-B9GvQ64b.mjs} +1 -1
- package/dist/web-components/PagerLayout-BF33VZL_.mjs +1 -0
- package/dist/web-components/Panel-BvDpCn6K.mjs +1 -0
- package/dist/web-components/PanelPart-Bd4lSUrP.mjs +1 -0
- package/dist/web-components/{PanelToggle-CFtWIeWv.mjs → PanelToggle-bPcIULGZ.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-F87jIrf9.mjs → PartOfManifest-HLg-r00O.mjs} +1 -1
- package/dist/web-components/{Pending-CYAQajKu.mjs → Pending-BxGjjnqq.mjs} +1 -1
- package/dist/web-components/PlaceBox-D-Zhe9-U.mjs +1 -0
- package/dist/web-components/Placeholder-DzY5hcbk.mjs +1 -0
- package/dist/web-components/{Position-BkWBRBfW.mjs → Position-TYnzcm8e.mjs} +1 -1
- package/dist/web-components/{Primitives-BmODPlnK.mjs → Primitives-C6VJXxZD.mjs} +1 -1
- package/dist/web-components/Provider-DyB0wpeO.mjs +1 -0
- package/dist/web-components/{ReadMore-BwGFsLS2.mjs → ReadMore-De_0T7lc.mjs} +1 -1
- package/dist/web-components/Root-Bt3NNBFb.mjs +1 -0
- package/dist/web-components/Scene-DrOM9YlD.mjs +1 -0
- package/dist/web-components/SceneView-DA7Yg20p.mjs +1 -0
- package/dist/web-components/{Search-CbmK9vLp.mjs → Search-DgT8OPsK.mjs} +1 -1
- package/dist/web-components/{Sections-Dy5_pkyQ.mjs → Sections-d1acn7qm.mjs} +2 -2
- package/dist/web-components/{StandaloneItems-BmUnBp0H.mjs → StandaloneItems-DUb4YKCB.mjs} +1 -1
- package/dist/web-components/{Status-Dww3Pyf4.mjs → Status-CcU3u6P4.mjs} +1 -1
- package/dist/web-components/{Steps-o_UprQfZ.mjs → Steps-nlSCzbDQ.mjs} +1 -1
- package/dist/web-components/{TargetItems-BBOGDubv.mjs → TargetItems-BDJM3Ar-.mjs} +1 -1
- package/dist/web-components/Timeline-BfdN3lIv.mjs +1 -0
- package/dist/web-components/{Tip-BbexILXs.mjs → Tip-OCB88zwY.mjs} +1 -1
- package/dist/web-components/{Transcript-ZVXM3ZDA.mjs → Transcript-bSA3cx_K.mjs} +1 -1
- package/dist/web-components/Transport-DaIhfZqC.mjs +1 -0
- package/dist/web-components/Transport-DjOYI-fR.mjs +1 -0
- package/dist/web-components/{annotation-collection-7SS1ELcO.mjs → annotation-collection-D8emkElk.mjs} +1 -1
- package/dist/web-components/{annotation-name-CYkZopdd.mjs → annotation-name-DbWjhgra.mjs} +1 -1
- package/dist/web-components/{annotations-content-Bdtn50sf.mjs → annotations-content-Bg6aVAGC.mjs} +1 -1
- package/dist/web-components/{body-CkOBHlJ0.mjs → body-Ct8dmQdW.mjs} +1 -1
- package/dist/web-components/canvas-goEZLqEd.mjs +1 -0
- package/dist/web-components/cloverEngine-Df7cMwOP.mjs +164 -0
- package/dist/web-components/{content-state-reader-Ahh6artg.mjs → content-state-reader-CNmBpG1L.mjs} +1 -1
- package/dist/web-components/{controls-BJrZVQkS.mjs → controls-BZr16sYQ.mjs} +1 -1
- package/dist/web-components/custom-elements.json +160 -44
- package/dist/web-components/{downloads-CqVWo-yn.mjs → downloads-EjJ6Hpip.mjs} +1 -1
- package/dist/web-components/dragToClose-X9NbZOhA.mjs +1 -0
- package/dist/web-components/{engine-B-sscpLa.mjs → engine-DMoc0tff.mjs} +1 -1
- package/dist/web-components/{engines-DfCHjbt3.mjs → engines-BmB81VXR.mjs} +1 -1
- package/dist/web-components/es-B1NvdYp-.mjs +1 -0
- package/dist/web-components/{fetchManifest-BIzne1Pj.mjs → fetchManifest-CwQC6cCh.mjs} +1 -1
- package/dist/web-components/fi-BjtYZNLo.mjs +1 -0
- package/dist/web-components/fr-Cd22Lziw.mjs +1 -0
- package/dist/web-components/fromManifest-DrAmY1lB.mjs +1 -0
- package/dist/web-components/glyphs-BFK_hvJJ.mjs +1 -0
- package/dist/web-components/hooks-BhtNDs_1.mjs +1 -0
- package/dist/web-components/image-layers-D2nQC4R-.mjs +1 -0
- package/dist/web-components/{imageService-0eTvQ-3h.mjs → imageService-iFElsopt.mjs} +1 -1
- package/dist/web-components/index-FJEpXukG.mjs +1 -0
- package/dist/web-components/index.d.mts +4 -4
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BPPrqbeh.mjs +1 -0
- package/dist/web-components/items-BnEnc5ot.mjs +1 -0
- package/dist/web-components/label-DauFa5sg.mjs +1 -0
- package/dist/web-components/layout-Djwu8f4R.mjs +1 -0
- package/dist/web-components/{link-GEdiEwlR.mjs → link-0lUlTZlw.mjs} +1 -1
- package/dist/web-components/logo-DWPxaZaG.mjs +1 -0
- package/dist/web-components/masonry-0QfzOgbB.mjs +1 -0
- package/dist/web-components/{models-59cEeiAA.mjs → models-BF2pqufA.mjs} +1 -1
- package/dist/web-components/nb-CEwZDBiR.mjs +1 -0
- package/dist/web-components/nn-jYQhr9RI.mjs +1 -0
- package/dist/web-components/no-CEwZDBiR.mjs +1 -0
- package/dist/web-components/{nodes-CTw9OqlA.mjs → nodes-ChQRLDGU.mjs} +1 -1
- package/dist/web-components/{overlayImage-BMt4UTlR.mjs → overlayImage-MKrcgDep.mjs} +1 -1
- package/dist/web-components/panClearOfControls-Cn2ZXsZi.mjs +1 -0
- package/dist/web-components/{panel-C17Rl9Ya.mjs → panel-C13V6w6E.mjs} +1 -1
- package/dist/web-components/part-CekFWrtz.mjs +1 -0
- package/dist/web-components/playerSurface-DG1XipTq.mjs +1 -0
- package/dist/web-components/pointer-YQppt0at.mjs +1 -0
- package/dist/web-components/{provider-BpxorEiq.mjs → provider-DiUkZYiW.mjs} +1 -1
- package/dist/web-components/pt-CWR30SzS.mjs +1 -0
- package/dist/web-components/{range-regions-BGQy4E9U.mjs → range-regions-CqGjyM76.mjs} +1 -1
- package/dist/web-components/{read-more-BDM_6CVc.mjs → read-more-D8RJYdtQ.mjs} +1 -1
- package/dist/web-components/readingLanguages-BWOLZK2k.mjs +1 -0
- package/dist/web-components/rendererSurface-BkbGDL_Z.mjs +22 -0
- package/dist/web-components/{renderers-CiB74bQh.mjs → renderers-LtRX5pT0.mjs} +1 -1
- package/dist/web-components/{resource-CRbpf9pX.mjs → resource-Cfydiy4m.mjs} +1 -1
- package/dist/web-components/{save-file-CCuZEuQr.mjs → save-file-dZyOpXgY.mjs} +1 -1
- package/dist/web-components/search-BfUZJM3a.mjs +1 -0
- package/dist/web-components/shared-DkY2a89G.mjs +1 -0
- package/dist/web-components/{show-link-BXm7SNIC.mjs → show-link-DgLJzG7k.mjs} +1 -1
- package/dist/web-components/{sizedImage-k4Q-eyOB.mjs → sizedImage-NHzhcBYk.mjs} +1 -1
- package/dist/web-components/{split-Hp6z-v4h.mjs → split-CuFiKjin.mjs} +1 -1
- package/dist/web-components/{status-BmtuKfAG.mjs → status-C3etlkhY.mjs} +1 -1
- package/dist/web-components/styles-DkkVOSUQ.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-Dp7a8oom.mjs → thumbnail-DecrVnpj.mjs} +1 -1
- package/dist/web-components/{tip-C-oovDZK.mjs → tip-D5YgaIWW.mjs} +1 -1
- package/dist/web-components/{toggle-C7ODWDEZ.mjs → toggle-CZGB65VZ.mjs} +1 -1
- package/dist/web-components/{useContainerName-CrOmY-km.mjs → useContainerName-hKQjEt7a.mjs} +1 -1
- package/dist/web-components/useControlsVisibility-DPg8uAkW.mjs +1 -0
- package/dist/web-components/useLazyPanelPane-eby-OI1V.mjs +1 -0
- package/dist/web-components/{useNearViewport-BqXi9Gn4.mjs → useNearViewport-CDbHQUBk.mjs} +1 -1
- package/dist/web-components/useScrollTrack-D9l_P3_B.mjs +1 -0
- package/dist/web-components/viewer/AnnotationItems-DtsnDXPM.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationMenu-DPOSehBo.mjs → AnnotationMenu-C-Mz6CCn.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-5pim5K72.mjs +1 -0
- package/dist/web-components/viewer/Annotations-Cqn1TkzD.mjs +2 -0
- package/dist/web-components/viewer/Annotations-CxwN9FkB.mjs +1 -0
- package/dist/web-components/viewer/{Canvas2DBackend-BTK6ZJh0.mjs → Canvas2DBackend-C-ZMSCak.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-CRD-gSZP.mjs +1 -0
- package/dist/web-components/viewer/ChaptersMenu-Brcq3yJv.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-DQ1x572Y.mjs → ChoiceMenu-ByGzQQx1.mjs} +1 -1
- package/dist/web-components/viewer/Collection-m0GCcsfQ.mjs +1 -0
- package/dist/web-components/viewer/Connected-Bmc_CdUD.mjs +1 -0
- package/dist/web-components/viewer/Connected-Dvx7wtot.mjs +1 -0
- package/dist/web-components/viewer/Contents-CwDpfiJY.mjs +1 -0
- package/dist/web-components/viewer/ControlMenu-TcO85hDf.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BoZ4ABAE.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-4u6U6yqb.mjs → CountMenu-0-ie8kIZ.mjs} +1 -1
- package/dist/web-components/viewer/Cue-DxmAS9Gx.mjs +1 -0
- package/dist/web-components/viewer/Document-BsryuYJ1.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-CGkDtemL.mjs → DomLayers-hc0qARQc.mjs} +1 -1
- package/dist/web-components/viewer/Download-MO-1Rik4.mjs +1 -0
- package/dist/web-components/viewer/EntryBodies-g-OEwEsk.mjs +1 -0
- package/dist/web-components/viewer/EntryThumbnail-DcIDYATi.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-DFXGWrvB.mjs → FieldPill-B9S21lxw.mjs} +1 -1
- package/dist/web-components/viewer/FrameAnimation-qI9cZPEs.mjs +1 -0
- package/dist/web-components/viewer/Gallery-BOgUqfqw.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-DP5kHzWM.mjs → HideToggle-D8wH49mq.mjs} +1 -1
- package/dist/web-components/viewer/ImageControls-ZoEC9jWd.mjs +1 -0
- package/dist/web-components/viewer/LanguageChoice-CRqsCBAp.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-BB-GcbYr.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-D9Obxie4.mjs +1 -0
- package/dist/web-components/viewer/{MapView-BN9wXQKV.mjs → MapView-DQSwUzd7.mjs} +2 -2
- package/dist/web-components/viewer/MediaBody-CIw2nTlj.mjs +1 -0
- package/dist/web-components/viewer/MediaBody-D5ff6xy-.mjs +1 -0
- package/dist/web-components/viewer/{NavDate-C2-wwLuB.mjs → NavDate-BnfDG57h.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-C3jghOd3.mjs → Navigator-BNwjmkXY.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-C8jraHqs.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-YNbBI9SQ.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-D22yMgCf.mjs → PartOfManifest-DX7H0V4g.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-CCWfzsNU.mjs +1 -0
- package/dist/web-components/viewer/Placeholder-CsEkLhz7.mjs +1 -0
- package/dist/web-components/viewer/Search-CsdYzdq1.mjs +1 -0
- package/dist/web-components/viewer/StandaloneItems-BfvBxbUm.mjs +1 -0
- package/dist/web-components/viewer/{Steps-Bw32X5xO.mjs → Steps-BH8ZApS4.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DLhUH1Gq.mjs → TargetItems-BebPFr-c.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-DXLv5WR9.mjs +1 -0
- package/dist/web-components/viewer/Transport-C-fh7Kx2.mjs +1 -0
- package/dist/web-components/viewer/Transport-CY6BWfMi.mjs +1 -0
- package/dist/web-components/viewer/annotation-collection-Cjd8Dgyl.mjs +1 -0
- package/dist/web-components/viewer/annotation-name-CwmgQFia.mjs +1 -0
- package/dist/web-components/viewer/{annotations-content-CbA3eOIC.mjs → annotations-content-BARXoAz-.mjs} +1 -1
- package/dist/web-components/viewer/cloverEngine-CumnJPKO.mjs +164 -0
- package/dist/web-components/viewer/{content-state-reader-C7UBMOq3.mjs → content-state-reader-DuvyLThu.mjs} +1 -1
- package/dist/web-components/viewer/dragToClose-CFCxhUxn.mjs +1 -0
- package/dist/web-components/viewer/{fetchManifest-C2Yxg3x9.mjs → fetchManifest-qNB_KgxL.mjs} +1 -1
- package/dist/web-components/viewer/{host-CZeyjCKR.mjs → host-GTHX2fPK.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-DKOuaRTj.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DssZ0Z2N.mjs → link-BlaM0tCa.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-RVpv69R5.mjs +1 -0
- package/dist/web-components/viewer/range-regions-CIZiAHOp.mjs +1 -0
- package/dist/web-components/viewer/{renderers-DLoqv3QO.mjs → renderers-Dw1klwlx.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-CJT5p5Hg.mjs → save-file-EvzaBEJN.mjs} +1 -1
- package/dist/web-components/viewer/{search-PhOwMKHi.mjs → search-x1QL_bth.mjs} +1 -1
- package/dist/web-components/viewer/styles-I7_LWFGj.mjs +1 -0
- package/dist/web-components/viewer/useControlsVisibility-C_SQHIVR.mjs +1 -0
- package/dist/web-components/viewer/useLazyPanelPane-UuGDJrf_.mjs +1 -0
- package/dist/web-components/viewer/viewer-DJrQuNs1.mjs +29 -0
- package/dist/web-components/viewer/{vtt-1Pk7Dhsj.mjs → vtt-C2G89SWH.mjs} +1 -1
- package/dist/web-components/viewer-Br44EEba.mjs +1 -0
- package/dist/web-components/{vtt-CacHieeN.mjs → vtt-Dd0c7psH.mjs} +1 -1
- package/package.json +1 -1
- package/dist/templates/shared/LightboxBody.mjs +0 -9
- package/dist/web-components/About-DhOGPFaI.mjs +0 -1
- package/dist/web-components/AnnotationItems-CNP4CJiT.mjs +0 -1
- package/dist/web-components/Body-DaY1UJIy.mjs +0 -1
- package/dist/web-components/BodyUnloadable-DcTM7hHF.mjs +0 -1
- package/dist/web-components/CanvasView-BWQ4SK2b.mjs +0 -2
- package/dist/web-components/CaptionDetails-DSziiuQV.mjs +0 -1
- package/dist/web-components/ChoiceMenu-DTuEEUeM.mjs +0 -1
- package/dist/web-components/Collection-B9swJtPW.mjs +0 -1
- package/dist/web-components/ControlMenu-Crtho2cs.mjs +0 -1
- package/dist/web-components/Cue-CbZaGwZh.mjs +0 -1
- package/dist/web-components/Document-BfltLWZZ.mjs +0 -1
- package/dist/web-components/DocumentPanel-ZSe40cV4.mjs +0 -1
- package/dist/web-components/FrameAnimation-IfR1czfc.mjs +0 -1
- package/dist/web-components/Gallery-DD06BDQo.mjs +0 -1
- package/dist/web-components/Items-BHzT9A73.mjs +0 -1
- package/dist/web-components/Label-KabnxuMN.mjs +0 -1
- package/dist/web-components/LightboxBody-BhRhdXo6.mjs +0 -1
- package/dist/web-components/ListEnd-CbwNlty-.mjs +0 -1
- package/dist/web-components/LoadedCanvas-CdZ5WOWz.mjs +0 -1
- package/dist/web-components/LoadedMap-DQyQVRVQ.mjs +0 -1
- package/dist/web-components/MapView-duA5WGsu.mjs +0 -3
- package/dist/web-components/Markup-D-kioDf9.mjs +0 -2
- package/dist/web-components/MediaBody-CoOiVXcv.mjs +0 -1
- package/dist/web-components/MediaBody-d8ErTuwT.mjs +0 -1
- package/dist/web-components/PagerLayout-CvOmKtSW.mjs +0 -1
- package/dist/web-components/Panel-CIdjOznL.mjs +0 -1
- package/dist/web-components/PlaceBox-BtIbIotm.mjs +0 -1
- package/dist/web-components/Placeholder-TIyj4ZjR.mjs +0 -1
- package/dist/web-components/Provider-C8se8i4I.mjs +0 -1
- package/dist/web-components/Root-CAJB0-Mh.mjs +0 -1
- package/dist/web-components/Scene-Ctcdt7CD.mjs +0 -1
- package/dist/web-components/SceneView-B6bEx_7x.mjs +0 -1
- package/dist/web-components/Timeline-CfIF4APc.mjs +0 -1
- package/dist/web-components/canvas-CWf_Fag8.mjs +0 -1
- package/dist/web-components/cloverEngine-6djEHNCD.mjs +0 -164
- package/dist/web-components/dragToClose-C-Pf1IeO.mjs +0 -1
- package/dist/web-components/es-BYfHUZ7P.mjs +0 -1
- package/dist/web-components/fi-B5y2qr8T.mjs +0 -1
- package/dist/web-components/fr-ChezCx6V.mjs +0 -1
- package/dist/web-components/fromManifest-gg5Wx14y.mjs +0 -1
- package/dist/web-components/glyphs-JYl2STEr.mjs +0 -1
- package/dist/web-components/hooks-x7rO95CS.mjs +0 -1
- package/dist/web-components/image-layers-BjbeyHBS.mjs +0 -1
- package/dist/web-components/index-BZ7b9k0N.mjs +0 -1
- package/dist/web-components/items-CnAIl9fS.mjs +0 -1
- package/dist/web-components/items-F6hJgdAS.mjs +0 -1
- package/dist/web-components/label-CI88KH2_.mjs +0 -1
- package/dist/web-components/layout-De1MOSYe.mjs +0 -1
- package/dist/web-components/logo-Ckwj7FlP.mjs +0 -1
- package/dist/web-components/nb-8J22f9Td.mjs +0 -1
- package/dist/web-components/nn-Dv1EvzI1.mjs +0 -1
- package/dist/web-components/no-8J22f9Td.mjs +0 -1
- package/dist/web-components/panClearOfControls-ac9uf-Qs.mjs +0 -1
- package/dist/web-components/part-CXts97_M.mjs +0 -1
- package/dist/web-components/playerSurface-HYwEwPK6.mjs +0 -1
- package/dist/web-components/pt-DWYQkATt.mjs +0 -1
- package/dist/web-components/readingLanguages-fs_HqvqQ.mjs +0 -1
- package/dist/web-components/rendererSurface-C0aKlE0v.mjs +0 -22
- package/dist/web-components/search-CkM0O0Z1.mjs +0 -1
- package/dist/web-components/shared-MTsMddHx.mjs +0 -1
- package/dist/web-components/styles-CZV1nbBQ.mjs +0 -1
- package/dist/web-components/useScrollTrack-CEsOU2yT.mjs +0 -1
- package/dist/web-components/viewer/AnnotationItems-CyhVcRFc.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-Bjztkobn.mjs +0 -1
- package/dist/web-components/viewer/Annotations-Dh_8Tzi0.mjs +0 -2
- package/dist/web-components/viewer/Annotations-wwuOCxzI.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-BwCTovy_.mjs +0 -1
- package/dist/web-components/viewer/Collection-DSBxCmXw.mjs +0 -1
- package/dist/web-components/viewer/Connected-CL3N8F2J.mjs +0 -1
- package/dist/web-components/viewer/Connected-DTk1jlyI.mjs +0 -1
- package/dist/web-components/viewer/Contents-DrXckx7d.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-Bp91s-g_.mjs +0 -1
- package/dist/web-components/viewer/Cue-C-aF8peC.mjs +0 -1
- package/dist/web-components/viewer/Document-BN1rICu3.mjs +0 -1
- package/dist/web-components/viewer/DocumentPanel-CEesxdeY.mjs +0 -1
- package/dist/web-components/viewer/Download-CawEl9MN.mjs +0 -1
- package/dist/web-components/viewer/EntryBodies-nYHMwSSM.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-DrO_0SzR.mjs +0 -1
- package/dist/web-components/viewer/FrameAnimation-CZfzpxaD.mjs +0 -1
- package/dist/web-components/viewer/Gallery-MWHtvjti.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-C50T7dPI.mjs +0 -1
- package/dist/web-components/viewer/LightboxBody-C2T7IC29.mjs +0 -1
- package/dist/web-components/viewer/ListEnd-BDuOx__m.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-CEyswliX.mjs +0 -1
- package/dist/web-components/viewer/MediaBody-Dw3DWDjc.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-Cg2NpqoD.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Dckw4Sfk.mjs +0 -1
- package/dist/web-components/viewer/Placeholder-NYVWYg5Q.mjs +0 -1
- package/dist/web-components/viewer/Search-DC259m4f.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-E4kpMne9.mjs +0 -1
- package/dist/web-components/viewer/Transcript-D_VGJQxn.mjs +0 -1
- package/dist/web-components/viewer/annotation-collection-DZHa18ir.mjs +0 -1
- package/dist/web-components/viewer/annotation-name-BaNdW2Xk.mjs +0 -1
- package/dist/web-components/viewer/cloverEngine-C04bCSFR.mjs +0 -164
- package/dist/web-components/viewer/image-layers-B09fporZ.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-BR3eJCKq.mjs +0 -1
- package/dist/web-components/viewer/range-regions-By6L5JOK.mjs +0 -1
- package/dist/web-components/viewer/styles-NZLnZPAC.mjs +0 -1
- package/dist/web-components/viewer/viewer-D30YHqyF.mjs +0 -29
- package/dist/web-components/viewer-CH7re5OO.mjs +0 -1
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
import * as P4 from '@iiif/parser/presentation-4/types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* IIIF language maps as text: the closest language to the reader's, and that language's
|
|
8
|
+
* tag, so the text can carry a `lang` attribute.
|
|
9
|
+
*/
|
|
10
|
+
export type LanguageMapLike = string | Record<string, string[] | string | undefined> | null | undefined;
|
|
6
11
|
export type Presentation4Canvas = P4.Canvas;
|
|
7
12
|
export type Presentation4Scene = P4.Scene;
|
|
8
13
|
export type Presentation4Timeline = P4.Timeline;
|
|
@@ -142,19 +147,169 @@ export interface RootProps extends Omit<React.HTMLAttributes<HTMLElement>, "chil
|
|
|
142
147
|
*/
|
|
143
148
|
annotationPages?: "view" | "all";
|
|
144
149
|
/**
|
|
145
|
-
* Where the reader is, as a IIIF content state,
|
|
146
|
-
*
|
|
150
|
+
* Where the reader is, as a IIIF content state, as it changes: a move, a pan or zoom,
|
|
151
|
+
* or a pause or seek in media. At most every 150ms while it moves, always its last
|
|
152
|
+
* place, and only when it changed.
|
|
147
153
|
*/
|
|
148
154
|
onContentStateChange?: (state: ContentStateOutput) => void;
|
|
149
155
|
/** The element to render. Default `div`. */
|
|
150
156
|
as?: React.ElementType;
|
|
151
157
|
children?: React.ReactNode;
|
|
152
158
|
}
|
|
159
|
+
/** A region of the image as shares of it: 0 to 1 across and down. */
|
|
160
|
+
export interface RegionShare {
|
|
161
|
+
x: number;
|
|
162
|
+
y: number;
|
|
163
|
+
width: number;
|
|
164
|
+
height: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* A small picture of a IIIF resource, for a list or a strip of them.
|
|
168
|
+
*
|
|
169
|
+
* - The resource's own `thumbnail` comes first; then, for a Canvas, the first image it
|
|
170
|
+
* paints; then its placeholder or accompanying Canvas's (video and sound).
|
|
171
|
+
* - An image service is asked for nothing until its own `info.json` has been read (the
|
|
172
|
+
* renderer's cached fetch, so a Canvas shown later does not ask again), and then only
|
|
173
|
+
* as strictly as it says it can answer (`sizedImageUrl`): never more than the image has,
|
|
174
|
+
* nor than its limits, at level 0 only a size it lists (Mat, 2026-10-24: "be
|
|
175
|
+
* responsible when making IIIF image server requests"). What a manifest says of a
|
|
176
|
+
* service is not trusted to say what its server does.
|
|
177
|
+
* - Without a service, the image itself is used.
|
|
178
|
+
*/
|
|
179
|
+
export interface ThumbnailSource {
|
|
180
|
+
/** Ready to use: an image with no service. */
|
|
181
|
+
src?: string;
|
|
182
|
+
/** An image service: its `info.json` is read before a URL is made (`resolveThumbnail`). */
|
|
183
|
+
service?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Only part of the image: shares of it (a target's region), or a region in Image API
|
|
186
|
+
* syntax in the service's own pixels (a painting's selector), read against its `info.json`.
|
|
187
|
+
*/
|
|
188
|
+
region?: RegionShare | string;
|
|
189
|
+
/** Used if the service cannot answer. */
|
|
190
|
+
fallback?: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* What `Items` shows: light models of a Manifest's views or a Collection's members, never
|
|
194
|
+
* the resources themselves, so a long sequence costs a few fields per item.
|
|
195
|
+
*
|
|
196
|
+
* Memoized on the resource object, as the selectors are.
|
|
197
|
+
*/
|
|
198
|
+
export interface ItemPart {
|
|
199
|
+
id: string;
|
|
200
|
+
type: string;
|
|
201
|
+
label?: LanguageMapLike;
|
|
202
|
+
/** The resource, for a thumbnail and for `renderItem`. */
|
|
203
|
+
resource: unknown;
|
|
204
|
+
/** Seconds, for video and sound. */
|
|
205
|
+
duration?: number;
|
|
206
|
+
/** What it mostly paints: `Image`, `Video`, `Audio` (`Sound` in Presentation 3) or `Model`. */
|
|
207
|
+
media?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Its picture, where it is not the resource's own: a region of its Canvas (a content
|
|
210
|
+
* state's target, Cookbook 0540). Null for none.
|
|
211
|
+
*/
|
|
212
|
+
source?: ThumbnailSource | null;
|
|
213
|
+
}
|
|
214
|
+
export interface ItemModel {
|
|
215
|
+
/** The first Canvas of a view, or a member's id. What selecting it goes to. */
|
|
216
|
+
id: string;
|
|
217
|
+
/** A Canvas view: one Canvas, or a spread. A member: itself. */
|
|
218
|
+
parts: ItemPart[];
|
|
219
|
+
label?: LanguageMapLike;
|
|
220
|
+
summary?: LanguageMapLike;
|
|
221
|
+
/** A member's date for navigation, as written (Cookbook 0318). */
|
|
222
|
+
navDate?: string;
|
|
223
|
+
/** Where a link to a member goes: its `homepage`, else its id. */
|
|
224
|
+
href?: string;
|
|
225
|
+
/** That homepage's own language, where its `language` gives one. */
|
|
226
|
+
hrefLang?: string;
|
|
227
|
+
}
|
|
228
|
+
/** The line under an item's label: its summary, its date (`navDate`), or neither. */
|
|
229
|
+
export type ItemSecondary = "summary" | "navDate" | "none";
|
|
153
230
|
/**
|
|
154
|
-
* A scrolling row of thumbnails (`slider`), a column, a wrapping grid,
|
|
155
|
-
* time (`pager`: Previous,
|
|
231
|
+
* A scrolling row of thumbnails (`slider`), a column, a wrapping grid, a grid whose
|
|
232
|
+
* pictures keep their proportions (`masonry`), or one item at a time (`pager`: Previous,
|
|
233
|
+
* Position and Next).
|
|
156
234
|
*/
|
|
157
|
-
export type ItemsLayout = "slider" | "list" | "grid" | "pager";
|
|
235
|
+
export type ItemsLayout = "slider" | "list" | "grid" | "masonry" | "pager";
|
|
236
|
+
export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onSelect" | "children"> {
|
|
237
|
+
/**
|
|
238
|
+
* A scrolling row (the default), a column, a wrapping grid, `masonry`, or `pager`:
|
|
239
|
+
* Previous, Position and Next, stepping one item at a time, with no thumbnails.
|
|
240
|
+
* `masonry` is a grid whose pictures keep their own proportions, each item packed up
|
|
241
|
+
* under the one above it, still in reading order, left to right.
|
|
242
|
+
*/
|
|
243
|
+
layout?: ItemsLayout;
|
|
244
|
+
/**
|
|
245
|
+
* The line under an item's label, where it has one (a Collection's members do): its
|
|
246
|
+
* `summary` (the default), its `navDate`, or `none`. Default `"summary"`.
|
|
247
|
+
*/
|
|
248
|
+
secondary?: ItemSecondary;
|
|
249
|
+
/**
|
|
250
|
+
* The pager's size: `large` (the default), round controls; or `small`, its steps and
|
|
251
|
+
* count as Search's are, for a header's line. Default `"large"`.
|
|
252
|
+
*/
|
|
253
|
+
size?: "large" | "small";
|
|
254
|
+
/**
|
|
255
|
+
* Inside a `Root`: the Manifest's views (default), the members of the Collection it
|
|
256
|
+
* belongs to, choosing one to show, a content state's targets, where it names two or
|
|
257
|
+
* more (Cookbook 0540), each opening its Manifest at its place, or annotations walked as
|
|
258
|
+
* one whole: the AnnotationPage or AnnotationCollection given as the content, else the
|
|
259
|
+
* AnnotationCollection its annotation pages are part of (Cookbook 0309), each picked
|
|
260
|
+
* and framed on its Canvas.
|
|
261
|
+
*/
|
|
262
|
+
of?: "views" | "members" | "targets" | "annotations";
|
|
263
|
+
/**
|
|
264
|
+
* Standalone: a Collection (its members), a Manifest (its views) or a URL to one. Inside
|
|
265
|
+
* a `Root`, leave it out to list the Root's views.
|
|
266
|
+
*/
|
|
267
|
+
iiifContent?: IIIFContent;
|
|
268
|
+
/** Standalone: a list of IIIF resources (Manifests, Collections, Canvases) as they are. */
|
|
269
|
+
items?: unknown[];
|
|
270
|
+
/**
|
|
271
|
+
* `id` selects: a listbox whose options go to a view (in a `Root`). `homepage` leaves: a
|
|
272
|
+
* list of links to each item's `homepage`. Defaults to `id` for views and `homepage`
|
|
273
|
+
* for a Collection's members or a list.
|
|
274
|
+
*/
|
|
275
|
+
navigation?: "id" | "homepage";
|
|
276
|
+
/**
|
|
277
|
+
* An item was chosen, with the click's or the key's own event. For a link, call
|
|
278
|
+
* `event.preventDefault()` to stay on the page and handle it yourself.
|
|
279
|
+
*/
|
|
280
|
+
onSelect?: (item: ItemModel, event: React.SyntheticEvent) => void;
|
|
281
|
+
/** Standalone: show the resource's label, summary and homepage link. Default true. */
|
|
282
|
+
header?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Standalone: the level of the header's title, to fit the outline of the page around
|
|
285
|
+
* it (a slider under an `h2` takes 3). Default 2.
|
|
286
|
+
*/
|
|
287
|
+
headingLevel?: number;
|
|
288
|
+
/** Pixels requested for each thumbnail's longer side. Default 200. */
|
|
289
|
+
thumbnailSize?: number;
|
|
290
|
+
/**
|
|
291
|
+
* Inside a `Root`: list the views even where there is only one, as a gallery's grid
|
|
292
|
+
* does. The pager, with nothing to step to, still draws nothing. Default `false`: one
|
|
293
|
+
* view has nothing to choose between.
|
|
294
|
+
*/
|
|
295
|
+
singleItem?: boolean;
|
|
296
|
+
/** Standalone: credentials, headers and `fetch`. In a `Root`, the Root's are used. */
|
|
297
|
+
request?: CloverRequest;
|
|
298
|
+
/** Standalone: the language to read IIIF text in. */
|
|
299
|
+
language?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Clover's higher-contrast mode: the accent kept to rings, outlines and marks, and never
|
|
302
|
+
* under words or a glyph, where the controls' dark fill takes its place, edged in the
|
|
303
|
+
* accent. Inside a `Root`, the Root's too; on wherever the reader's system asks for more
|
|
304
|
+
* contrast. Default `false`.
|
|
305
|
+
*/
|
|
306
|
+
highContrast?: boolean;
|
|
307
|
+
/** Replace an item's figure with your own. */
|
|
308
|
+
renderItem?: (item: ItemModel, state: {
|
|
309
|
+
selected: boolean;
|
|
310
|
+
}) => React.ReactNode;
|
|
311
|
+
as?: React.ElementType;
|
|
312
|
+
}
|
|
158
313
|
/** How the sections are laid out. */
|
|
159
314
|
export type SectionsLayout = "tabs" | "accordion";
|
|
160
315
|
/** How an information panel lays out its sections. */
|
|
@@ -189,6 +344,11 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
189
344
|
languages?: boolean;
|
|
190
345
|
/** The thumbnails under the Body: a layout, or `false` for none. Default `slider`. */
|
|
191
346
|
items?: Exclude<ItemsLayout, "pager"> | false;
|
|
347
|
+
/**
|
|
348
|
+
* The thumbnails even where the resource has one view, which has nothing to choose
|
|
349
|
+
* between. Default `false`.
|
|
350
|
+
*/
|
|
351
|
+
singleItem?: boolean;
|
|
192
352
|
/**
|
|
193
353
|
* Where the panel's width is remembered once the reader drags its bar
|
|
194
354
|
* (`localStorage`). Default `"clover-template-default"`; `false` forgets it.
|
|
@@ -201,6 +361,12 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
201
361
|
* `--clover-body-height` tall, and the layout as tall as it needs.
|
|
202
362
|
*/
|
|
203
363
|
fill?: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* When the Body's view controls (zoom, the turns, reset, full screen) wait behind
|
|
366
|
+
* More: `"auto"` (the default), only where its row cannot hold them all; `"always"`.
|
|
367
|
+
* The Body's `collapseControls`.
|
|
368
|
+
*/
|
|
369
|
+
collapseControls?: "auto" | "always";
|
|
204
370
|
};
|
|
205
371
|
/**
|
|
206
372
|
* The Viewer's own layout, drawn when no `template` is given: Clover 3.x's Viewer, built
|
|
@@ -214,13 +380,18 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
214
380
|
* uncovered: a click there, Escape or the panel's close button puts it away. Size it with
|
|
215
381
|
* `--clover-body-height`.
|
|
216
382
|
*/
|
|
217
|
-
export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, languages, items, storageKey, fill, ...root }: DefaultProps): React.JSX.Element;
|
|
383
|
+
export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, download, languages, items, singleItem, storageKey, fill, collapseControls, ...root }: DefaultProps): React.JSX.Element;
|
|
218
384
|
export type DocumentProps = Omit<RootProps, "children"> & {
|
|
219
385
|
/**
|
|
220
386
|
* Whether the page thumbnails start shown beside the page. Default `true`. On a phone,
|
|
221
387
|
* where they would float over the page, they start put away.
|
|
222
388
|
*/
|
|
223
389
|
defaultSidebarOpen?: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* The page thumbnails, and their toggle, even where the resource has one page, which
|
|
392
|
+
* has nothing to choose between. Default `false`.
|
|
393
|
+
*/
|
|
394
|
+
singleItem?: boolean;
|
|
224
395
|
/**
|
|
225
396
|
* Whether the information panel starts open beside the page. Default `false`. Where it
|
|
226
397
|
* has no room there and would slide over the page, it starts closed.
|
|
@@ -249,6 +420,12 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
249
420
|
* (`localStorage`). Default `"clover-template-document"`; `false` forgets it.
|
|
250
421
|
*/
|
|
251
422
|
storageKey?: string | false;
|
|
423
|
+
/**
|
|
424
|
+
* When the Body's view controls (zoom, the turns, reset, full screen) wait behind
|
|
425
|
+
* More: `"auto"` (the default), only where its row cannot hold them all; `"always"`.
|
|
426
|
+
* The Body's `collapseControls`.
|
|
427
|
+
*/
|
|
428
|
+
collapseControls?: "auto" | "always";
|
|
252
429
|
};
|
|
253
430
|
/**
|
|
254
431
|
* A layout that reads like a PDF viewer: a toolbar, page thumbnails down the left, and
|
|
@@ -259,36 +436,141 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
259
436
|
* where there is room for both, and slides out over the page where there is not. Size
|
|
260
437
|
* it with `--clover-template-document-height`.
|
|
261
438
|
*/
|
|
262
|
-
export declare function Document({ className, defaultSidebarOpen, defaultPanelOpen, panelLayout, download, languages, headingLevel, storageKey, ...root }: DocumentProps): React.JSX.Element;
|
|
439
|
+
export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, download, languages, headingLevel, storageKey, collapseControls, ...root }: DocumentProps): React.JSX.Element;
|
|
263
440
|
export type GalleryProps = Omit<RootProps, "children"> & {
|
|
264
441
|
/** The size of a grid cell. Default `10rem`, through `--clover-items-size`. */
|
|
265
442
|
size?: string;
|
|
443
|
+
/**
|
|
444
|
+
* The Gallery's height: `"auto"` (the default) grows with its grid; a number (pixels)
|
|
445
|
+
* or any CSS length fixes it, its padding inside, and the grid scrolls under the header.
|
|
446
|
+
*/
|
|
447
|
+
height?: number | string;
|
|
448
|
+
/**
|
|
449
|
+
* The space between the grid's cells: a number (pixels) or any CSS length. Default the
|
|
450
|
+
* Gallery's inset, `--clover-inset`.
|
|
451
|
+
*/
|
|
452
|
+
gap?: number | string;
|
|
453
|
+
/**
|
|
454
|
+
* The grid, as its Items' layout: `grid`, square cells, or `masonry`, each picture at
|
|
455
|
+
* its own proportions. Default `grid`.
|
|
456
|
+
*/
|
|
457
|
+
items?: Extract<ItemsLayout, "grid" | "masonry">;
|
|
458
|
+
/**
|
|
459
|
+
* The line under each cell's label, where it has one (a Collection's members do): its
|
|
460
|
+
* `summary`, its `navDate`, or `none`. Default `summary`.
|
|
461
|
+
*/
|
|
462
|
+
secondary?: ItemsProps["secondary"];
|
|
463
|
+
/**
|
|
464
|
+
* The resource's summary under the title, cut to two lines with Read more under it where
|
|
465
|
+
* it runs longer. Default `true`; `false` leaves it out, the title alone over the grid.
|
|
466
|
+
*/
|
|
467
|
+
summary?: boolean;
|
|
468
|
+
/**
|
|
469
|
+
* How the lightbox moves on from the view it shows: a short strip of thumbnails
|
|
470
|
+
* (`slider`, Items' carousel), or `pager`, Previous, the position and Next. Default
|
|
471
|
+
* `slider`.
|
|
472
|
+
*/
|
|
473
|
+
lightboxItems?: "slider" | "pager";
|
|
474
|
+
/**
|
|
475
|
+
* The information panel beside the lightbox's view, as Default's and Document's is
|
|
476
|
+
* beside theirs, and its toggle. Default `true`.
|
|
477
|
+
*/
|
|
478
|
+
panel?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Whether the panel starts open beside the lightbox's view. Default `true`. Where it has
|
|
481
|
+
* no room there and would slide over the view, it starts closed.
|
|
482
|
+
*/
|
|
483
|
+
defaultPanelOpen?: boolean;
|
|
484
|
+
/** How the panel lays out its sections: `"accordion"` (the default) or `"tabs"`. */
|
|
485
|
+
panelLayout?: PanelLayout;
|
|
486
|
+
/** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
|
|
487
|
+
download?: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* The languages to read the resource in, beside the panel's About heading, where what
|
|
490
|
+
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
491
|
+
*/
|
|
492
|
+
languages?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Where the panel's width is remembered once the reader drags its bar
|
|
495
|
+
* (`localStorage`). Default `"clover-template-gallery"`; `false` forgets it.
|
|
496
|
+
*/
|
|
497
|
+
storageKey?: string | false;
|
|
266
498
|
/**
|
|
267
499
|
* The title's heading level, to fit the outline of the page around the layout (under
|
|
268
500
|
* an `h2`, 3). The lightbox's title is a level below it. Default 2.
|
|
269
501
|
*/
|
|
270
502
|
headingLevel?: number;
|
|
503
|
+
/**
|
|
504
|
+
* When the Body's view controls (zoom, the turns, reset, full screen) wait behind
|
|
505
|
+
* More: `"auto"` (the default), only where its row cannot hold them all; `"always"`.
|
|
506
|
+
* Its lightbox's Body's `collapseControls`.
|
|
507
|
+
*/
|
|
508
|
+
collapseControls?: "auto" | "always";
|
|
271
509
|
};
|
|
272
510
|
/**
|
|
273
|
-
* A grid
|
|
274
|
-
*
|
|
275
|
-
* and
|
|
511
|
+
* A grid framed by what it opens, that opens a cell in a lightbox with the Body and the
|
|
512
|
+
* pager. A Manifest: its title and summary, and a cell for each view (a spread is one
|
|
513
|
+
* cell). A Collection: its own title and summary, and a cell for each member, which
|
|
514
|
+
* shows that Manifest in the lightbox. Escape, the close button, or a press outside
|
|
515
|
+
* closes it, and focus returns to the cell.
|
|
276
516
|
*/
|
|
277
|
-
export declare function Gallery({ className, size, headingLevel, style, ...root }: GalleryProps): React.JSX.Element;
|
|
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;
|
|
278
518
|
export interface LightboxProps {
|
|
279
519
|
open: boolean;
|
|
280
520
|
onClose: () => void;
|
|
281
521
|
/** The level of its title, a level under the layout's. Default 3. */
|
|
282
522
|
headingLevel?: number;
|
|
523
|
+
/**
|
|
524
|
+
* How the reader moves on from the view shown: a short strip of thumbnails (`slider`,
|
|
525
|
+
* Items' carousel), or `pager`, Previous, the position and Next. Default `slider`.
|
|
526
|
+
*/
|
|
527
|
+
items?: "slider" | "pager";
|
|
528
|
+
/**
|
|
529
|
+
* The information panel beside the view, as every template's is (`PanelPane`): its
|
|
530
|
+
* toggle among the Body's controls, or on the bar beside it. Default `true`.
|
|
531
|
+
*/
|
|
532
|
+
panel?: boolean;
|
|
533
|
+
/** Whether the panel starts open beside the view; over it, closed. Default `true`. */
|
|
534
|
+
defaultPanelOpen?: boolean;
|
|
535
|
+
/** The panel's sections as stacked boxes (`"accordion"`, the default) or tabs. */
|
|
536
|
+
panelLayout?: PanelLayout;
|
|
537
|
+
/** The downloads in the panel's About, where there is a `rendering`. Default `true`. */
|
|
538
|
+
download?: boolean;
|
|
539
|
+
/** The languages to read the resource in, beside the panel's About heading. Default `true`. */
|
|
540
|
+
languages?: boolean;
|
|
541
|
+
/** Where the panel's width is remembered once dragged; `false` forgets it. */
|
|
542
|
+
storageKey?: string | false;
|
|
543
|
+
/** The Body's `collapseControls`: when the view's controls collapse behind one button. */
|
|
544
|
+
collapseControls?: "auto" | "always";
|
|
283
545
|
className?: string;
|
|
284
546
|
}
|
|
285
547
|
/**
|
|
286
|
-
* The current Canvas in a modal
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
548
|
+
* The current Canvas in a modal layer over the layout, and only the layout (Mat,
|
|
549
|
+
* 2026-10-30: "backdrop should not extend beyond the bounds of the template"): over it,
|
|
550
|
+
* a step back to the level it opened from, the Manifest's label as its title (Mat,
|
|
551
|
+
* 2026-11-01: "the Manifest label stay up here in the title and be more obvious as a
|
|
552
|
+
* heading") and Close; then the Body, the view's label under it (Mat, 2026-11-01: "move
|
|
553
|
+
* the Canvas/Scene/Timeline label below the item"), and a short strip of thumbnails (Mat,
|
|
554
|
+
* 2026-11-01: "carousel by default") or the pager (with the position). A modal
|
|
555
|
+
* `<dialog>`'s backdrop always covers the whole window, so this is a layer in the Root, a
|
|
556
|
+
* `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 pager), and Escape,
|
|
558
|
+
* Close, Back or a press on the layer outside the panel closes it, focus going back to
|
|
559
|
+
* what opened it.
|
|
560
|
+
* By default it fills the layout's bounds; `--clover-template-lightbox-inset`,
|
|
561
|
+
* `-backdrop` and `-radius` give it room, a backdrop and corners (`Lightbox.css`). The
|
|
562
|
+
* layout positions it and holds its stacking (`position: relative` and `isolation:
|
|
563
|
+
* isolate`, as the Gallery does), so its layer never stacks over the page around it.
|
|
564
|
+
*
|
|
565
|
+
* Beside the view, the information panel, as every template's is (`PanelPane`; Mat,
|
|
566
|
+
* 2026-11-01: "show the pane like we have for document/default"), its every interaction
|
|
567
|
+
* theirs.
|
|
568
|
+
*
|
|
569
|
+
* Its view mounts only while open, so it is sized when drawn, and its code (the Body, the
|
|
570
|
+
* panes and the panel's pane) loads the first time (`preloadLightbox` starts it sooner):
|
|
571
|
+
* until then a busy box holds its place under the title and Close. The Panel's own code
|
|
572
|
+
* loads as it opens, the chunk Document's is (`PanelPart`).
|
|
291
573
|
*/
|
|
292
|
-
export declare function Lightbox({ open, onClose, headingLevel, className, }: LightboxProps): React.JSX.Element;
|
|
574
|
+
export declare function Lightbox({ open, onClose, headingLevel, items, className, ...view }: LightboxProps): React.JSX.Element;
|
|
293
575
|
|
|
294
576
|
export {};
|
|
@@ -1,107 +1,199 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useEffect, Suspense, lazy } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { useGivenAnnotations } from "./givenAnnotations.mjs";
|
|
5
|
+
import { useT, useLangOf, useLocalized, useManifest } from "../../react/hooks.mjs";
|
|
5
6
|
import { useUniqueId } from "../../ui/useUniqueId.mjs";
|
|
6
7
|
import { Label } from "../../components/Label/Label.mjs";
|
|
7
8
|
import { titled } from "../../ui/heading.mjs";
|
|
8
9
|
import { Tip } from "../../ui/Tip.mjs";
|
|
9
|
-
import {
|
|
10
|
-
const load = () => import("./
|
|
11
|
-
const
|
|
10
|
+
import { useCloverSelector } from "../../react/context.mjs";
|
|
11
|
+
const load = () => import("./LightboxView.mjs");
|
|
12
|
+
const LightboxView = lazy(load);
|
|
12
13
|
const preloadLightbox = () => void load();
|
|
13
14
|
function Lightbox({
|
|
14
15
|
open,
|
|
15
16
|
onClose,
|
|
16
17
|
headingLevel = 3,
|
|
17
|
-
|
|
18
|
+
items = "slider",
|
|
19
|
+
className,
|
|
20
|
+
...view
|
|
18
21
|
}) {
|
|
19
22
|
var _a;
|
|
20
23
|
const t = useT();
|
|
21
24
|
const langOf = useLangOf();
|
|
22
|
-
const
|
|
25
|
+
const layer = useRef(null);
|
|
26
|
+
const panel = useRef(null);
|
|
27
|
+
const close = useRef(null);
|
|
23
28
|
const baseId = useUniqueId().replace(/:/g, "");
|
|
24
29
|
const titleId = `${baseId}-title`;
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const named =
|
|
30
|
+
const viewTitleId = `${baseId}-view`;
|
|
31
|
+
const manifestLabel = useLocalized((_a = useManifest()) == null ? void 0 : _a.label);
|
|
32
|
+
const named = manifestLabel.text ? titleId : viewTitleId;
|
|
33
|
+
const given = Boolean(useGivenAnnotations());
|
|
34
|
+
const closing = useRef(onClose);
|
|
35
|
+
closing.current = onClose;
|
|
28
36
|
useEffect(() => {
|
|
29
|
-
var _a2;
|
|
30
|
-
const element =
|
|
31
|
-
|
|
32
|
-
if (open
|
|
33
|
-
|
|
37
|
+
var _a2, _b, _c, _d;
|
|
38
|
+
const element = layer.current;
|
|
39
|
+
const root = element == null ? void 0 : element.parentElement;
|
|
40
|
+
if (!open || !element || !root) return;
|
|
41
|
+
const opener = element.ownerDocument.activeElement;
|
|
42
|
+
const others = Array.from(root.children).filter(
|
|
43
|
+
(child) => child !== element && !child.classList.contains("clover-announcer")
|
|
44
|
+
);
|
|
45
|
+
others.forEach((child) => child.inert = true);
|
|
46
|
+
(_b = (_a2 = panel.current) == null ? void 0 : _a2.scrollIntoView) == null ? void 0 : _b.call(_a2, { block: "nearest" });
|
|
47
|
+
const chosen = (_c = panel.current) == null ? void 0 : _c.querySelector(
|
|
48
|
+
'[role="listbox"] [role="option"][aria-selected="true"]'
|
|
49
|
+
);
|
|
50
|
+
(_d = chosen ?? close.current) == null ? void 0 : _d.focus({ preventScroll: true });
|
|
51
|
+
return () => {
|
|
52
|
+
others.forEach((child) => child.inert = false);
|
|
53
|
+
if (opener == null ? void 0 : opener.isConnected) opener.focus({ preventScroll: true });
|
|
54
|
+
};
|
|
34
55
|
}, [open]);
|
|
35
56
|
return /* @__PURE__ */ jsx(
|
|
36
|
-
"
|
|
57
|
+
"div",
|
|
37
58
|
{
|
|
38
|
-
ref:
|
|
59
|
+
ref: layer,
|
|
39
60
|
className: ["clover-template-lightbox", className].filter(Boolean).join(" "),
|
|
40
|
-
|
|
41
|
-
onClose,
|
|
61
|
+
hidden: !open,
|
|
42
62
|
onClick: (event) => {
|
|
43
|
-
if (event.target ===
|
|
63
|
+
if (event.target === layer.current) onClose();
|
|
44
64
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
onKeyDown: (event) => {
|
|
66
|
+
if (event.key !== "Escape" || event.defaultPrevented) return;
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
closing.current();
|
|
69
|
+
},
|
|
70
|
+
children: open && /* @__PURE__ */ jsxs(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
ref: panel,
|
|
74
|
+
role: "dialog",
|
|
75
|
+
"aria-modal": "true",
|
|
76
|
+
"aria-labelledby": named,
|
|
77
|
+
className: "clover-template-lightbox-content",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsxs("header", { className: "clover-template-lightbox-header", children: [
|
|
80
|
+
/* @__PURE__ */ jsx(Back, { onOut: onClose }),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
Label,
|
|
83
|
+
{
|
|
84
|
+
as: titled(headingLevel, titleId).as,
|
|
85
|
+
id: titleId,
|
|
86
|
+
className: "clover-template-lightbox-title clover-template-title clover-title"
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
named === viewTitleId && /* @__PURE__ */ jsx(Label, { of: "canvas", id: viewTitleId, hidden: true }),
|
|
90
|
+
/* @__PURE__ */ jsxs(
|
|
91
|
+
"button",
|
|
92
|
+
{
|
|
93
|
+
ref: close,
|
|
94
|
+
type: "button",
|
|
95
|
+
className: "clover-template-lightbox-close",
|
|
96
|
+
"aria-label": t("commonClose"),
|
|
97
|
+
lang: langOf("commonClose"),
|
|
98
|
+
onClick: onClose,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx(
|
|
101
|
+
"svg",
|
|
76
102
|
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
focusable: "false",
|
|
105
|
+
width: "16",
|
|
106
|
+
height: "16",
|
|
107
|
+
viewBox: "0 0 16 16",
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
"path",
|
|
110
|
+
{
|
|
111
|
+
d: "M3 3l10 10M13 3L3 13",
|
|
112
|
+
stroke: "currentColor",
|
|
113
|
+
strokeWidth: "2",
|
|
114
|
+
strokeLinecap: "round"
|
|
115
|
+
}
|
|
116
|
+
)
|
|
81
117
|
}
|
|
82
|
-
)
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ jsx(Tip, { label: t("commonClose") })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
Suspense,
|
|
126
|
+
{
|
|
127
|
+
fallback: /* @__PURE__ */ jsx(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: "clover-template-lightbox-body clover-template-lightbox-pending",
|
|
131
|
+
"aria-busy": "true"
|
|
83
132
|
}
|
|
84
133
|
),
|
|
85
|
-
/* @__PURE__ */ jsx(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
134
|
+
children: /* @__PURE__ */ jsx(
|
|
135
|
+
LightboxView,
|
|
136
|
+
{
|
|
137
|
+
id: baseId,
|
|
138
|
+
annotations: given,
|
|
139
|
+
items,
|
|
140
|
+
headingLevel,
|
|
141
|
+
...view
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
function Back({ onOut }) {
|
|
153
|
+
const t = useT();
|
|
154
|
+
const langOf = useLangOf();
|
|
155
|
+
const collection = useCloverSelector(
|
|
156
|
+
(state) => state.throughCollection ? state.collection : null
|
|
157
|
+
);
|
|
158
|
+
const set = useGivenAnnotations();
|
|
159
|
+
const manifest = useManifest();
|
|
160
|
+
const above = useLocalized(
|
|
161
|
+
set ? set.label : (collection == null ? void 0 : collection.label) ?? (manifest == null ? void 0 : manifest.label)
|
|
162
|
+
);
|
|
163
|
+
const key = above.text ? "templateBackTo" : "templateBack";
|
|
164
|
+
const label = t(key, { label: above.text });
|
|
165
|
+
return /* @__PURE__ */ jsxs(
|
|
166
|
+
"button",
|
|
167
|
+
{
|
|
168
|
+
type: "button",
|
|
169
|
+
className: "clover-template-lightbox-back",
|
|
170
|
+
"aria-label": label,
|
|
171
|
+
lang: langOf(key),
|
|
172
|
+
onClick: onOut,
|
|
173
|
+
children: [
|
|
90
174
|
/* @__PURE__ */ jsx(
|
|
91
|
-
|
|
175
|
+
"svg",
|
|
92
176
|
{
|
|
93
|
-
|
|
94
|
-
|
|
177
|
+
"aria-hidden": "true",
|
|
178
|
+
focusable: "false",
|
|
179
|
+
width: "16",
|
|
180
|
+
height: "16",
|
|
181
|
+
viewBox: "0 0 16 16",
|
|
182
|
+
children: /* @__PURE__ */ jsx(
|
|
183
|
+
"path",
|
|
95
184
|
{
|
|
96
|
-
|
|
97
|
-
|
|
185
|
+
d: "M10 3L5 8l5 5",
|
|
186
|
+
fill: "none",
|
|
187
|
+
stroke: "currentColor",
|
|
188
|
+
strokeWidth: "2",
|
|
189
|
+
strokeLinecap: "round",
|
|
190
|
+
strokeLinejoin: "round"
|
|
98
191
|
}
|
|
99
|
-
)
|
|
100
|
-
children: /* @__PURE__ */ jsx(LightboxBody, {})
|
|
192
|
+
)
|
|
101
193
|
}
|
|
102
194
|
),
|
|
103
|
-
/* @__PURE__ */ jsx(
|
|
104
|
-
]
|
|
195
|
+
/* @__PURE__ */ jsx(Tip, { label, lang: langOf(key) })
|
|
196
|
+
]
|
|
105
197
|
}
|
|
106
198
|
);
|
|
107
199
|
}
|