@nulib/clover 4.4.2 → 4.5.1
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 +2 -2
- package/dist/components/Annotations/Annotations.mjs +11 -5
- package/dist/components/Items/Items.mjs +15 -5
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +1 -1
- package/dist/components/Panel/About.mjs +16 -5
- package/dist/components/Panel/AboutActions.mjs +10 -16
- package/dist/components/Panel/LanguageToggle.mjs +69 -0
- package/dist/components/Panel/Panel.mjs +9 -1
- package/dist/components/Panel/ReadingLanguages.mjs +2 -16
- package/dist/components/Panel/sections.mjs +6 -1
- package/dist/components/Root/useRootState.mjs +46 -4
- package/dist/components/Search/Search.mjs +10 -7
- package/dist/components/Transcript/Transcript.mjs +42 -33
- package/dist/core/image-service-content.mjs +108 -0
- package/dist/core/load.mjs +38 -1
- package/dist/i18n/config.mjs +88 -14
- package/dist/i18n/languages.mjs +42 -8
- package/dist/i18n/locales/index.mjs +4 -1
- package/dist/i18n/locales/ja.json.mjs +5 -0
- package/dist/i18n/locales/zh-Hans.json.mjs +5 -0
- package/dist/i18n/locales/zh-Hant.json.mjs +5 -0
- package/dist/index.d.mts +109 -24
- package/dist/lib/renderer/CanvasRenderer.mjs +20 -5
- package/dist/map/index.d.mts +3 -2
- package/dist/react/readingLanguages.mjs +15 -2
- package/dist/styles/default.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles/panel.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +2 -0
- package/dist/templates/document/Document.mjs +5 -1
- package/dist/templates/gallery/Gallery.mjs +2 -0
- package/dist/templates/index.d.mts +53 -11
- package/dist/templates/shared/LightboxView.mjs +2 -0
- package/dist/ui/GlobeGlyph.mjs +26 -0
- package/dist/ui/LanguageChoice.mjs +87 -20
- package/dist/ui/LanguageMenu.mjs +94 -0
- package/dist/ui/useScrollTrack.mjs +34 -19
- package/dist/web-components/About-BMlEaTqj.mjs +1 -0
- package/dist/web-components/AnnotationItems-DNur2mn_.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-BiM0n-6H.mjs → AnnotationMenu-9pQOKEMb.mjs} +1 -1
- package/dist/web-components/AnnotationState-BVDRV-1B.mjs +1 -0
- package/dist/web-components/{Annotations-x5H_Vls9.mjs → Annotations-B5WD596p.mjs} +1 -1
- package/dist/web-components/Annotations-BmETEgUn.mjs +2 -0
- package/dist/web-components/{Body-BWOsHKU1.mjs → Body-BgCsKpGr.mjs} +1 -1
- package/dist/web-components/{BodyAlert-DYfrepDo.mjs → BodyAlert-Dt_medBN.mjs} +1 -1
- package/dist/web-components/{Button-Ch0E6GVj.mjs → Button-DW1Y9SI4.mjs} +1 -1
- package/dist/web-components/{Camera-CY4adJpn.mjs → Camera-Cj_vOD9V.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-eFcDTxq6.mjs → Canvas2DBackend-BjCgV8Gn.mjs} +1 -1
- package/dist/web-components/{CanvasView-BqsXUI8n.mjs → CanvasView-fCOQzA_R.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-CuYSbD70.mjs → CaptionDetails-Z5FFvEp8.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-IlAt1pp2.mjs → ChaptersMenu-b80HFV28.mjs} +1 -1
- package/dist/web-components/{Chevron-uZe3N2Pt.mjs → Chevron-D9HTNAaC.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-DBJynLGl.mjs → ChoiceMenu-CXtI293_.mjs} +1 -1
- package/dist/web-components/{Collection-C1sRlJK1.mjs → Collection-CASEkwgi.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-BYMQaanx.mjs → CollectionSelect-Boc7wy9j.mjs} +1 -1
- package/dist/web-components/{Connected-Bd2T2EUc.mjs → Connected-Biw2I6Po.mjs} +1 -1
- package/dist/web-components/{Connected-Ckar86TI.mjs → Connected-CNlmumRT.mjs} +1 -1
- package/dist/web-components/{Connected-Dpp3iO3D.mjs → Connected-DXm_z3q9.mjs} +1 -1
- package/dist/web-components/{Contents-DjtD3iKA.mjs → Contents-N3FNf9QU.mjs} +1 -1
- package/dist/web-components/{ControlMenu-CaD8Frag.mjs → ControlMenu-DLJsVZnm.mjs} +1 -1
- package/dist/web-components/ControlsFade-DcPvrXFf.mjs +1 -0
- package/dist/web-components/{CountMenu-DBiLd3X6.mjs → CountMenu-DyBK1e4z.mjs} +1 -1
- package/dist/web-components/Cue-CrnTNjnn.mjs +1 -0
- package/dist/web-components/Document-CZ3qHszc.mjs +1 -0
- package/dist/web-components/{DomLayers-DXbbsOVO.mjs → DomLayers-BwlLZSRc.mjs} +1 -1
- package/dist/web-components/{Download-CgRv1Jio.mjs → Download-WldBPDxr.mjs} +1 -1
- package/dist/web-components/{EntryBodies-DnXLIVR-.mjs → EntryBodies-BwWEgZ1_.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-BtRvqME5.mjs → EntryThumbnail-C56uAnMQ.mjs} +1 -1
- package/dist/web-components/{FieldPill-CmagfxvU.mjs → FieldPill-C1UAftNo.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-DmqYAi-M.mjs → FrameAnimation-BpHvVjI3.mjs} +1 -1
- package/dist/web-components/Gallery-h9AR15s0.mjs +1 -0
- package/dist/web-components/GlobeGlyph-CnvS-FYu.mjs +1 -0
- package/dist/web-components/{HideToggle-aDBXi6F0.mjs → HideToggle-D-r79OIC.mjs} +1 -1
- package/dist/web-components/{ImageControls-CdEwkNkw.mjs → ImageControls-CdcicjR7.mjs} +1 -1
- package/dist/web-components/Items-CVvtjq7r.mjs +1 -0
- package/dist/web-components/Label-CvbxytPx.mjs +1 -0
- package/dist/web-components/LanguageChoice-BJd_RsYq.mjs +1 -0
- package/dist/web-components/LanguageMenu-BsnzmKwN.mjs +1 -0
- package/dist/web-components/LightboxView-DReKv-Dd.mjs +1 -0
- package/dist/web-components/{ListEnd-D1Y0rzNK.mjs → ListEnd-DwtNoi_1.mjs} +1 -1
- package/dist/web-components/{Loaded-Bebqgt6V.mjs → Loaded-BPOKsLbO.mjs} +1 -1
- package/dist/web-components/LoadedCanvas-HQwMz-9o.mjs +1 -0
- package/dist/web-components/LoadedMap-Totn9tyS.mjs +1 -0
- package/dist/web-components/{Loading-B5lpxt7E.mjs → Loading-C5mJstXv.mjs} +1 -1
- package/dist/web-components/{Map-DsHQLS6G.mjs → Map-Drj3FcfB.mjs} +1 -1
- package/dist/web-components/MapView-Bf4alyhB.mjs +3 -0
- package/dist/web-components/{Markup-CQb91uB6.mjs → Markup-DgJRP5fa.mjs} +1 -1
- package/dist/web-components/{MediaBody-BbipyE0n.mjs → MediaBody-1FBP2j7l.mjs} +1 -1
- package/dist/web-components/{MediaBody-CuCVF-N7.mjs → MediaBody-BEWLYzRU.mjs} +1 -1
- package/dist/web-components/{NavDate-CjJTuBbs.mjs → NavDate-rtQNHF_X.mjs} +1 -1
- package/dist/web-components/{Navigator-BKVI3csP.mjs → Navigator-Byl5hEjY.mjs} +1 -1
- package/dist/web-components/{Pager-CTvxvbel.mjs → Pager-DkTHvyHN.mjs} +1 -1
- package/dist/web-components/PagerLayout-C6kl1hk2.mjs +1 -0
- package/dist/web-components/Panel-C6gKilND.mjs +1 -0
- package/dist/web-components/PanelPart-B_2EB7jQ.mjs +1 -0
- package/dist/web-components/{PanelToggle-Dsp3JD1s.mjs → PanelToggle-DqoE9niZ.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-Bu5XTdcH.mjs → PartOfManifest-ydDwjNTt.mjs} +1 -1
- package/dist/web-components/{Pending-C7ZSt2eL.mjs → Pending-DWJWng2S.mjs} +1 -1
- package/dist/web-components/{PlaceBox-PwpqCwOS.mjs → PlaceBox-DB54T8Pe.mjs} +1 -1
- package/dist/web-components/{Placeholder-B_DxAE6y.mjs → Placeholder-DJg1rjuD.mjs} +1 -1
- package/dist/web-components/{Position-CQ7FBqd0.mjs → Position-BHc5qoff.mjs} +1 -1
- package/dist/web-components/Primitives-Ea4kfG9I.mjs +1 -0
- package/dist/web-components/Provider-D9_x7agY.mjs +1 -0
- package/dist/web-components/{ReadMore-0vMRgzA8.mjs → ReadMore-Dv-gInr5.mjs} +1 -1
- package/dist/web-components/Root-Cju5jUFL.mjs +1 -0
- package/dist/web-components/Scene-B6doLHT0.mjs +1 -0
- package/dist/web-components/{SceneView-DSUVfGQR.mjs → SceneView-CekvA-s4.mjs} +1 -1
- package/dist/web-components/Search-Dp2mguRJ.mjs +1 -0
- package/dist/web-components/{Sections-BdEZZD0J.mjs → Sections-DURsiaS-.mjs} +1 -1
- package/dist/web-components/{SeekMarks-ByDBrurH.mjs → SeekMarks-DT6hra-w.mjs} +1 -1
- package/dist/web-components/StandaloneItems-aPSHNgk2.mjs +1 -0
- package/dist/web-components/{Status-CK2v5LdZ.mjs → Status-pDPG5ab1.mjs} +1 -1
- package/dist/web-components/{Steps-DlYRgYiS.mjs → Steps-DCyGkbOP.mjs} +1 -1
- package/dist/web-components/{TargetItems-B0ZkDWAH.mjs → TargetItems-Be6A1gcy.mjs} +1 -1
- package/dist/web-components/Timeline-Cj9cCYCA.mjs +1 -0
- package/dist/web-components/{Tip-BPxXnFcb.mjs → Tip-Bsd8bCx9.mjs} +1 -1
- package/dist/web-components/Transcript-bQaRVoI_.mjs +1 -0
- package/dist/web-components/{Transport-nQ1ytZeY.mjs → Transport-DOzVY_IU.mjs} +1 -1
- package/dist/web-components/{Transport-Cc1VnGe1.mjs → Transport-DUGGwa-G.mjs} +1 -1
- package/dist/web-components/{annotation-collection-JrLc_Org.mjs → annotation-collection-DGCbF6YN.mjs} +1 -1
- package/dist/web-components/{annotation-name-WwXE5c2m.mjs → annotation-name-DFdgSllS.mjs} +1 -1
- package/dist/web-components/{annotations-content-G5YUyhp2.mjs → annotations-content-CwUfqHPh.mjs} +1 -1
- package/dist/web-components/{body-BvY3Vpf_.mjs → body-C3LAo8pl.mjs} +1 -1
- package/dist/web-components/{canvas-CaNpS96c.mjs → canvas-BUmbx6sa.mjs} +1 -1
- package/dist/web-components/{cloverEngine-Cpp8BjZa.mjs → cloverEngine-gT8L7Xi7.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DakKAf36.mjs → content-state-reader-B3GmJui6.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-bqWNGQ1-.mjs → controlGlyphs-BC2tLOYb.mjs} +1 -1
- package/dist/web-components/{controls-Db0929rf.mjs → controls-n8BSf19H.mjs} +1 -1
- package/dist/web-components/custom-elements.json +35 -3
- package/dist/web-components/downloads-CurHNK9M.mjs +1 -0
- package/dist/web-components/{dragToClose-D5AN98l4.mjs → dragToClose-Cbxkgv9j.mjs} +1 -1
- package/dist/web-components/{engine-B1m2m56g.mjs → engine-C51pr0Wa.mjs} +1 -1
- package/dist/web-components/{engines-CBm3cDwx.mjs → engines-CZzpPjXO.mjs} +1 -1
- package/dist/web-components/{fetchManifest-lvHWlQYu.mjs → fetchManifest-Crn4VJ56.mjs} +1 -1
- package/dist/web-components/{fromManifest-ZbH8cYoN.mjs → fromManifest-Ci0vEX5i.mjs} +1 -1
- package/dist/web-components/{glyphs-BtnJwbd5.mjs → glyphs-BcLY9GG7.mjs} +1 -1
- package/dist/web-components/hooks-C9BeaqLZ.mjs +1 -0
- package/dist/web-components/{image-layers-DjUA6eWF.mjs → image-layers-zWauwKEw.mjs} +1 -1
- package/dist/web-components/image-service-content-BAmoCFAH.mjs +1 -0
- package/dist/web-components/{imageService-B9yNXMcD.mjs → imageService-DXS2KuSL.mjs} +1 -1
- package/dist/web-components/index-BxhBBH2G.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-CPW7LZpT.mjs +1 -0
- package/dist/web-components/items-DUZSfcSf.mjs +1 -0
- package/dist/web-components/ja-Cg1enUhM.mjs +1 -0
- package/dist/web-components/label-BswVRwfJ.mjs +1 -0
- package/dist/web-components/layout-NPxKIp1S.mjs +1 -0
- package/dist/web-components/{link-BhvZNgtv.mjs → link-DI1Gv9P_.mjs} +1 -1
- package/dist/web-components/logo-Ccv2scvi.mjs +1 -0
- package/dist/web-components/{models-CIHL07o7.mjs → models-DtSFB57l.mjs} +1 -1
- package/dist/web-components/{nodes-TS4tB7cC.mjs → nodes-BEUmRfuQ.mjs} +1 -1
- package/dist/web-components/{overlayImage-B3ItMjXk.mjs → overlayImage-BOqTHR8E.mjs} +1 -1
- package/dist/web-components/{panel-M3PpVN7f.mjs → panel-Cd5S9Ezy.mjs} +1 -1
- package/dist/web-components/part-C7WLTw20.mjs +1 -0
- package/dist/web-components/{playerSurface-BGgYHT2u.mjs → playerSurface-QGjBv9Yq.mjs} +1 -1
- package/dist/web-components/{pointer-J2gT4W9m.mjs → pointer-BLFSppkR.mjs} +1 -1
- package/dist/web-components/{provider-CdJfEMUj.mjs → provider-BMZpItBJ.mjs} +1 -1
- package/dist/web-components/{range-regions-DxSIpIVo.mjs → range-regions-DX9sTrBU.mjs} +1 -1
- package/dist/web-components/{read-more-wCGc6ELt.mjs → read-more-DSnuyAMI.mjs} +1 -1
- package/dist/web-components/readingLanguages-C83aK9na.mjs +1 -0
- package/dist/web-components/rendererSurface-Clg0MuAj.mjs +22 -0
- package/dist/web-components/{renderers-zAtpns1S.mjs → renderers-DnnMGnA9.mjs} +1 -1
- package/dist/web-components/resource-BxbCXGtG.mjs +1 -0
- package/dist/web-components/{save-file-DquBqxrS.mjs → save-file-CuRpXpO7.mjs} +1 -1
- package/dist/web-components/{search-ChOKTYz9.mjs → search-B8ycnAKR.mjs} +1 -1
- package/dist/web-components/shared-CzlxExGR.mjs +1 -0
- package/dist/web-components/{show-link-Dry4M5w1.mjs → show-link-BOEKHpcs.mjs} +1 -1
- package/dist/web-components/{sizedImage-CjFqzhUE.mjs → sizedImage-BNlShxVG.mjs} +1 -1
- package/dist/web-components/{split-88HcOLCm.mjs → split-BwdAJ7v3.mjs} +1 -1
- package/dist/web-components/{status-BNrkhMe7.mjs → status-DwwUoyYG.mjs} +1 -1
- package/dist/web-components/styles-C51FhQQr.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-CoFd2duc.mjs → thumbnail-Bx8UP6ak.mjs} +1 -1
- package/dist/web-components/{tip-BCClTo0G.mjs → tip-DNLMHjGA.mjs} +1 -1
- package/dist/web-components/{toggle-DavvlVdF.mjs → toggle-D-vRsWQx.mjs} +1 -1
- package/dist/web-components/{useContainerName-B_Kzx2Wp.mjs → useContainerName-CAlWJohz.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-BdD2byHj.mjs → useControlsVisibility-IAlNQKAy.mjs} +1 -1
- package/dist/web-components/{useNearViewport-Bj8qJEA0.mjs → useNearViewport-B8E_rit4.mjs} +1 -1
- package/dist/web-components/useScrollTrack-D7S-3b7o.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationItems-3Sf8MxRQ.mjs → AnnotationItems-DLBXufXN.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-_xBnZtm1.mjs → AnnotationMenu-VQICxqCw.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-Blwq33RX.mjs +1 -0
- package/dist/web-components/viewer/Annotations-DE9evpU8.mjs +2 -0
- package/dist/web-components/viewer/{Annotations-24ComVk9.mjs → Annotations-DHKvpN_g.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-DPWYD9ST.mjs → Canvas2DBackend-CRMajv3c.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-B13rxFZq.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-C5J0d8Ck.mjs → ChaptersMenu-IAVcnwMF.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-B8iukYiR.mjs → ChoiceMenu-CORn4IQ7.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-CPVQ3JtI.mjs → Collection-CefKVGoo.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-x3v9xr7x.mjs → Connected-BwhumfiG.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-D5_bZzr5.mjs → Connected-KiqCyCyf.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-Ma7oDW1R.mjs → Contents-DLGRh2XL.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-D2HokCqd.mjs → ControlMenu-DBSEW19Y.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-CQ-g8cVb.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BnDN2b0n.mjs → CountMenu-C8_qWHK5.mjs} +1 -1
- package/dist/web-components/viewer/Cue-BwJDU9Vs.mjs +1 -0
- package/dist/web-components/viewer/Document-CbMXbIZ9.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BW2A4z82.mjs → DomLayers-ByxbcmL1.mjs} +1 -1
- package/dist/web-components/viewer/{Download-Cc_NA7QN.mjs → Download-3rtn7gLF.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-Bz69SWZh.mjs → EntryBodies-BP12ovq7.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-C8cUA5qc.mjs → EntryThumbnail-DpP82iU_.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-BzKvMF-K.mjs → FieldPill-BSdPIm-Q.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-DiQgfgri.mjs → FrameAnimation-DpoTQ3xX.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-BtJZKRID.mjs +1 -0
- package/dist/web-components/viewer/GlobeGlyph-CI64v0-v.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-jg311sUK.mjs → HideToggle-CmpZYjui.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-8ZIWLAkf.mjs → ImageControls-Da6YHXjJ.mjs} +1 -1
- package/dist/web-components/viewer/LanguageChoice-CbS8ksEM.mjs +1 -0
- package/dist/web-components/viewer/LanguageMenu-l2Me1RBQ.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-BCDkk6yf.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-JjGQ_q6c.mjs → ListEnd-DFpeNm-y.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-tAZ4vINr.mjs → MapView-DG-ZUI7R.mjs} +2 -2
- package/dist/web-components/viewer/{MediaBody-Da60tZIj.mjs → MediaBody-BgBDbfHg.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-CQAJJpuz.mjs → MediaBody-byvlUB_B.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-B7T2iPfP.mjs → NavDate-DpToOfYG.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-sEfTvK-l.mjs → Navigator-UVu84RyI.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-C3HEM9Ev.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-7DmaKxVo.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BYgk9r1j.mjs → PartOfManifest-CAG-54_j.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-BBtsMTsl.mjs → PlaceBox-4kYT5bX0.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-5focqckW.mjs → Placeholder-BGtNqkT3.mjs} +1 -1
- package/dist/web-components/viewer/Search-lYKOtFBO.mjs +1 -0
- package/dist/web-components/viewer/{SeekMarks-CUyvbMfC.mjs → SeekMarks-By4ZSK6u.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-DsoMdwWS.mjs → StandaloneItems-NfsSxROI.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-zpuoH0K0.mjs → Steps-BOB1n3WM.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DIKBor9X.mjs → TargetItems-vP03hWU8.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-CCn5yqeZ.mjs +1 -0
- package/dist/web-components/viewer/{Transport-DMnPpTsQ.mjs → Transport-B-GTF-rz.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-BM3IMXDW.mjs → Transport-Qi3YTaFs.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-C_9c9NPs.mjs → annotation-collection-CqFki-7M.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-jt1y3erg.mjs → annotation-name-z-zyEc1-.mjs} +1 -1
- package/dist/web-components/viewer/annotations-content-xp-O7sy-.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-CVyaltw7.mjs → cloverEngine-BSk-sfvP.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-DIcY4zWj.mjs → content-state-reader-DL-mMGZi.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-D2h8gIpa.mjs → dragToClose-vevhuGlo.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-C66Fk39V.mjs → fetchManifest-C-_la_Ym.mjs} +1 -1
- package/dist/web-components/viewer/{host-Fl21T-Pt.mjs → host-DHOefZ2L.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-CpDOoRh9.mjs → image-layers-qNcOTmq3.mjs} +1 -1
- package/dist/web-components/viewer/image-service-content-D63obMOY.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-DlX6OdhG.mjs → link-BZAbKwFF.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-oEpv2EvC.mjs +1 -0
- package/dist/web-components/viewer/{range-regions--YB9ll1N.mjs → range-regions-YtOKXMW8.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-zvRp3xYJ.mjs → renderers-BdXu40PJ.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-83yWcPHX.mjs → save-file-Cktvr4HF.mjs} +1 -1
- package/dist/web-components/viewer/{search-DDXsrZz3.mjs → search-CSjEe4Yv.mjs} +1 -1
- package/dist/web-components/viewer/styles-BjjJM8OS.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CudUJBCj.mjs → useControlsVisibility-CBeiyfcO.mjs} +1 -1
- package/dist/web-components/viewer/viewer-B7xAOtQD.mjs +29 -0
- package/dist/web-components/viewer/{vtt-D1xyC48J.mjs → vtt-BRwEspJw.mjs} +1 -1
- package/dist/web-components/viewer-BomG9B8d.mjs +1 -0
- package/dist/web-components/{vtt-ChAUl4lm.mjs → vtt-Cx6_Tym1.mjs} +1 -1
- package/dist/web-components/zh-Hans-DnYm6PWu.mjs +1 -0
- package/dist/web-components/zh-Hant-DsxnuLPZ.mjs +1 -0
- package/package.json +1 -1
- package/dist/web-components/About-rhhglI1Z.mjs +0 -1
- package/dist/web-components/AnnotationItems-9o4vZn9M.mjs +0 -1
- package/dist/web-components/AnnotationState-BCfjI6kC.mjs +0 -1
- package/dist/web-components/Annotations-bAuL-Vo6.mjs +0 -2
- package/dist/web-components/ControlsFade-qs_zu-DZ.mjs +0 -1
- package/dist/web-components/Cue-CrlByfoX.mjs +0 -1
- package/dist/web-components/Document-C3K-CXHu.mjs +0 -1
- package/dist/web-components/Gallery-DMNATgzf.mjs +0 -1
- package/dist/web-components/Items-xeEzg7uu.mjs +0 -1
- package/dist/web-components/Label-7SZqCiYh.mjs +0 -1
- package/dist/web-components/LanguageChoice-DrIQjsPP.mjs +0 -1
- package/dist/web-components/LightboxView-BzxRQK6r.mjs +0 -1
- package/dist/web-components/LoadedCanvas-8To8LkUE.mjs +0 -1
- package/dist/web-components/LoadedMap-BmF3Gmnw.mjs +0 -1
- package/dist/web-components/MapView-DcLIazmJ.mjs +0 -3
- package/dist/web-components/PagerLayout-DR6V9wwv.mjs +0 -1
- package/dist/web-components/Panel-BBRkfdof.mjs +0 -1
- package/dist/web-components/PanelPart-Cdbsnr8P.mjs +0 -1
- package/dist/web-components/Primitives-D5lVsBs8.mjs +0 -1
- package/dist/web-components/Provider-B9X74RHz.mjs +0 -1
- package/dist/web-components/Root-COIMTFHh.mjs +0 -1
- package/dist/web-components/Scene-DjUgqzXR.mjs +0 -1
- package/dist/web-components/Search-DOitIwis.mjs +0 -1
- package/dist/web-components/StandaloneItems-DATV9XoT.mjs +0 -1
- package/dist/web-components/Timeline-D-FevrUe.mjs +0 -1
- package/dist/web-components/Transcript-BLm9tljk.mjs +0 -1
- package/dist/web-components/downloads-CGkM4OSO.mjs +0 -1
- package/dist/web-components/hooks-BLpTDu28.mjs +0 -1
- package/dist/web-components/index-2F1l5TLi.mjs +0 -1
- package/dist/web-components/items-C56FfpBX.mjs +0 -1
- package/dist/web-components/items-DlG6IYqm.mjs +0 -1
- package/dist/web-components/label-DJ-Udq1e.mjs +0 -1
- package/dist/web-components/layout-Dh0myod-.mjs +0 -1
- package/dist/web-components/logo-k93ZgyqF.mjs +0 -1
- package/dist/web-components/part-Df1Vr2Ss.mjs +0 -1
- package/dist/web-components/readingLanguages-DmZ8CHoc.mjs +0 -1
- package/dist/web-components/rendererSurface-Bk7SHYws.mjs +0 -22
- package/dist/web-components/resource-Cb3AnAXL.mjs +0 -1
- package/dist/web-components/shared-D4j4IirO.mjs +0 -1
- package/dist/web-components/styles-Ca564vB9.mjs +0 -1
- package/dist/web-components/useScrollTrack-DBIW4pCJ.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-o4goI6T-.mjs +0 -1
- package/dist/web-components/viewer/Annotations-CJamLUnL.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-DNPq32gk.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-JoRgQt8U.mjs +0 -1
- package/dist/web-components/viewer/Cue-FHw5d8zO.mjs +0 -1
- package/dist/web-components/viewer/Document-DiXiOkPn.mjs +0 -1
- package/dist/web-components/viewer/Gallery-BYmzAEuZ.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-BXXMBe-A.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-DnN0fkeg.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-B4C72jTV.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Di406l-a.mjs +0 -1
- package/dist/web-components/viewer/Search-DbHlUxOS.mjs +0 -1
- package/dist/web-components/viewer/Transcript-B_puRtfb.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-Dg8h7vJX.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-yGXMVHgX.mjs +0 -1
- package/dist/web-components/viewer/styles-04jB_4IT.mjs +0 -1
- package/dist/web-components/viewer/viewer-0aUYzmQj.mjs +0 -29
- package/dist/web-components/viewer-B_5rFgy5.mjs +0 -1
|
@@ -183,8 +183,9 @@ export interface ContentStateOutput {
|
|
|
183
183
|
* state (JSON or base64url). The resource may be a Manifest, a Collection (its first
|
|
184
184
|
* Manifest is shown), a lone Canvas (its `partOf` Manifest, or a Manifest made around
|
|
185
185
|
* it), or annotations, an AnnotationPage or AnnotationCollection (the Manifest their first
|
|
186
|
-
* annotation's Canvas is `partOf`, at that Canvas).
|
|
187
|
-
*
|
|
186
|
+
* annotation's Canvas is `partOf`, at that Canvas). It may also be a IIIF Image service,
|
|
187
|
+
* its `info.json` or its base URI, shown as the one image it is (`imageServiceContent`).
|
|
188
|
+
* Everything is fetched once, with the request settings, and upgraded to Presentation 4.
|
|
188
189
|
*/
|
|
189
190
|
export type IIIFContent = string | Record<string, unknown>;
|
|
190
191
|
/**
|
|
@@ -372,6 +373,11 @@ export interface CloverCanvasOptions {
|
|
|
372
373
|
maxZoomPixelRatio?: number;
|
|
373
374
|
/** Smallest zoom, as a fraction of the home zoom. Default 0.9. */
|
|
374
375
|
minZoomImageRatio?: number;
|
|
376
|
+
/**
|
|
377
|
+
* Whether home may enlarge the image past `maxZoomPixelRatio` to fill the box. False,
|
|
378
|
+
* home stops at that zoom and centers the image, smaller than the box. Default true.
|
|
379
|
+
*/
|
|
380
|
+
upscale?: boolean;
|
|
375
381
|
/** Seconds for an animation to close most of its distance. 0 disables easing. */
|
|
376
382
|
animationTime?: number;
|
|
377
383
|
/**
|
|
@@ -462,6 +468,12 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
462
468
|
* under the one above it, still in reading order, left to right.
|
|
463
469
|
*/
|
|
464
470
|
layout?: ItemsLayout;
|
|
471
|
+
/**
|
|
472
|
+
* The slider's direction: a row (`horizontal`), or a column (`vertical`) that fills
|
|
473
|
+
* the height of what holds it, as a filmstrip beside the Body, its pictures as wide as
|
|
474
|
+
* the column. Default `"horizontal"`.
|
|
475
|
+
*/
|
|
476
|
+
orientation?: "horizontal" | "vertical";
|
|
465
477
|
/**
|
|
466
478
|
* The line under an item's label, where it has one (a Collection's members do): its
|
|
467
479
|
* `summary` (the default), its `navDate`, or `none`. Default `"summary"`.
|
|
@@ -545,7 +557,7 @@ export type PanelSection = "about" | "targets" | "collection" | "contents" | "se
|
|
|
545
557
|
/** How the sections are laid out. */
|
|
546
558
|
export type SectionsLayout = "tabs" | "accordion";
|
|
547
559
|
/**
|
|
548
|
-
* What a page calls a section, in place of Clover's
|
|
560
|
+
* What a page calls a section, in place of its word in Clover's interface language: its words, taken to
|
|
549
561
|
* be in the page's language, or its words by language tag, one of which the tab carries
|
|
550
562
|
* as its `lang` where it is not the page's (WCAG 3.1.2).
|
|
551
563
|
*/
|
|
@@ -601,6 +613,13 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
601
613
|
* leaves the choice out, and the Root reads in its `language`, else the reader's.
|
|
602
614
|
*/
|
|
603
615
|
languages?: boolean;
|
|
616
|
+
/**
|
|
617
|
+
* Whether About's language toggle also offers Clover's interface languages (its
|
|
618
|
+
* control labels, section titles and announcements) that the resource has none of: the
|
|
619
|
+
* visitor's and the site's, where they differ, one choice for the page. Default
|
|
620
|
+
* `true`; `false` leaves them out, and Clover speaks the visitor's.
|
|
621
|
+
*/
|
|
622
|
+
interfaceLanguages?: boolean;
|
|
604
623
|
/**
|
|
605
624
|
* Which of the default sections the panel may have, in Clover's own order: with
|
|
606
625
|
* `["contents", "search"]` it has those two and no About. Each still shows only where
|
|
@@ -609,7 +628,7 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
609
628
|
*/
|
|
610
629
|
sections?: readonly PanelSection[];
|
|
611
630
|
/**
|
|
612
|
-
* What a default section's tab or heading says, in place of Clover's
|
|
631
|
+
* What a default section's tab or heading says, in place of its word in Clover's interface language:
|
|
613
632
|
* `{ annotations: "Chapters" }`, or `{ annotations: { en: "Chapters", de: "Kapitel" } }`
|
|
614
633
|
* to say it in several, read in the one Clover speaks and marked with its language
|
|
615
634
|
* where that is not the page's (WCAG 3.1.2). A `Tab` of your own says it in `label`.
|
|
@@ -654,7 +673,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
654
673
|
*/
|
|
655
674
|
panelSections?: readonly PanelSection[];
|
|
656
675
|
/**
|
|
657
|
-
* What a panel section's tab or heading says, in place of Clover's
|
|
676
|
+
* What a panel section's tab or heading says, in place of its word in Clover's interface language:
|
|
658
677
|
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
659
678
|
* Panel's `labels`).
|
|
660
679
|
*/
|
|
@@ -666,6 +685,13 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
666
685
|
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
667
686
|
*/
|
|
668
687
|
languages?: boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Default, Document and Gallery: whether the panel's language toggle, beside its About
|
|
690
|
+
* heading, also offers Clover's interface languages (its control labels, section
|
|
691
|
+
* titles and announcements) that the resource has none of, the visitor's and the
|
|
692
|
+
* site's, where they differ (the Panel's `interfaceLanguages`). Default `true`.
|
|
693
|
+
*/
|
|
694
|
+
interfaceLanguages?: boolean;
|
|
669
695
|
/** The thumbnails under the Body: a layout, or `false` for none. Default `slider`. */
|
|
670
696
|
items?: Exclude<ItemsLayout, "pager"> | false;
|
|
671
697
|
/**
|
|
@@ -706,7 +732,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
706
732
|
* uncovered: a click there, Escape or the panel's close button puts it away. Size it with
|
|
707
733
|
* `--clover-body-height`.
|
|
708
734
|
*/
|
|
709
|
-
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;
|
|
735
|
+
export declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, interfaceLanguages, items, singleItem, storageKey, fill, collapseControls, canvasOptions, ...root }: DefaultProps): React.JSX.Element;
|
|
710
736
|
export type DocumentProps = Omit<RootProps, "children"> & {
|
|
711
737
|
/**
|
|
712
738
|
* Whether the page thumbnails start shown beside the page. Default `true`. On a phone,
|
|
@@ -736,7 +762,7 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
736
762
|
*/
|
|
737
763
|
panelSections?: readonly PanelSection[];
|
|
738
764
|
/**
|
|
739
|
-
* What a panel section's tab or heading says, in place of Clover's
|
|
765
|
+
* What a panel section's tab or heading says, in place of its word in Clover's interface language:
|
|
740
766
|
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
741
767
|
* Panel's `labels`).
|
|
742
768
|
*/
|
|
@@ -748,6 +774,13 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
748
774
|
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
749
775
|
*/
|
|
750
776
|
languages?: boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Default, Document and Gallery: whether the panel's language toggle, beside its About
|
|
779
|
+
* heading, also offers Clover's interface languages (its control labels, section
|
|
780
|
+
* titles and announcements) that the resource has none of, the visitor's and the
|
|
781
|
+
* site's, where they differ (the Panel's `interfaceLanguages`). Default `true`.
|
|
782
|
+
*/
|
|
783
|
+
interfaceLanguages?: boolean;
|
|
751
784
|
/**
|
|
752
785
|
* The title's heading level, to fit the outline of the page around the layout (under
|
|
753
786
|
* an `h2`, 3). The panel's sections, and the downloads' groups, are a level below
|
|
@@ -777,7 +810,7 @@ export type DocumentProps = Omit<RootProps, "children"> & {
|
|
|
777
810
|
* where there is room for both, and slides out over the page where there is not. Size
|
|
778
811
|
* it with `--clover-template-document-height`.
|
|
779
812
|
*/
|
|
780
|
-
export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, headingLevel, storageKey, collapseControls, canvasOptions, ...root }: DocumentProps): React.JSX.Element;
|
|
813
|
+
export declare function Document({ className, defaultSidebarOpen, singleItem, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, interfaceLanguages, headingLevel, storageKey, collapseControls, canvasOptions, ...root }: DocumentProps): React.JSX.Element;
|
|
781
814
|
export type GalleryProps = Omit<RootProps, "children"> & {
|
|
782
815
|
/** The size of a grid cell. Default `10rem`, through `--clover-items-size`. */
|
|
783
816
|
size?: string;
|
|
@@ -832,7 +865,7 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
832
865
|
*/
|
|
833
866
|
panelSections?: readonly PanelSection[];
|
|
834
867
|
/**
|
|
835
|
-
* What a panel section's tab or heading says, in place of Clover's
|
|
868
|
+
* What a panel section's tab or heading says, in place of its word in Clover's interface language:
|
|
836
869
|
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
837
870
|
* Panel's `labels`).
|
|
838
871
|
*/
|
|
@@ -844,6 +877,13 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
844
877
|
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
845
878
|
*/
|
|
846
879
|
languages?: boolean;
|
|
880
|
+
/**
|
|
881
|
+
* Default, Document and Gallery: whether the panel's language toggle, beside its About
|
|
882
|
+
* heading, also offers Clover's interface languages (its control labels, section
|
|
883
|
+
* titles and announcements) that the resource has none of, the visitor's and the
|
|
884
|
+
* site's, where they differ (the Panel's `interfaceLanguages`). Default `true`.
|
|
885
|
+
*/
|
|
886
|
+
interfaceLanguages?: boolean;
|
|
847
887
|
/**
|
|
848
888
|
* Where the panel's width is remembered once the reader drags its bar
|
|
849
889
|
* (`localStorage`). Default `"clover-template-gallery"`; `false` forgets it.
|
|
@@ -870,7 +910,7 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
870
910
|
* shows that Manifest in the lightbox. Escape, the close button, or a press outside
|
|
871
911
|
* closes it, and focus returns to the cell.
|
|
872
912
|
*/
|
|
873
|
-
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;
|
|
913
|
+
export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, interfaceLanguages, storageKey, headingLevel, collapseControls, canvasOptions, style, ...root }: GalleryProps): React.JSX.Element;
|
|
874
914
|
/**
|
|
875
915
|
* Focus that follows a control as it moves. A toggle drawn in one place while its pane is
|
|
876
916
|
* open and in another while it is shut is a new element after every press, and the one
|
|
@@ -1105,7 +1145,7 @@ export interface LightboxProps {
|
|
|
1105
1145
|
*/
|
|
1106
1146
|
panelSections?: readonly PanelSection[];
|
|
1107
1147
|
/**
|
|
1108
|
-
* What a panel section's tab or heading says, in place of Clover's
|
|
1148
|
+
* What a panel section's tab or heading says, in place of its word in Clover's interface language:
|
|
1109
1149
|
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
1110
1150
|
* Panel's `labels`).
|
|
1111
1151
|
*/
|
|
@@ -1114,6 +1154,8 @@ export interface LightboxProps {
|
|
|
1114
1154
|
download?: boolean;
|
|
1115
1155
|
/** The languages to read the resource in, beside the panel's About heading. Default `true`. */
|
|
1116
1156
|
languages?: boolean;
|
|
1157
|
+
/** Clover's interface languages in the panel's language toggle. Default `true`. */
|
|
1158
|
+
interfaceLanguages?: boolean;
|
|
1117
1159
|
/** Where the panel's width is remembered once dragged; `false` forgets it. */
|
|
1118
1160
|
storageKey?: string | false;
|
|
1119
1161
|
/** The Body's `collapseControls`: when the view's controls collapse behind one button. */
|
|
@@ -20,6 +20,7 @@ function LightboxView({
|
|
|
20
20
|
panelLabels,
|
|
21
21
|
download = true,
|
|
22
22
|
languages = true,
|
|
23
|
+
interfaceLanguages = true,
|
|
23
24
|
storageKey,
|
|
24
25
|
collapseControls,
|
|
25
26
|
canvasOptions,
|
|
@@ -116,6 +117,7 @@ function LightboxView({
|
|
|
116
117
|
labels: panelLabels,
|
|
117
118
|
download,
|
|
118
119
|
languages,
|
|
120
|
+
interfaceLanguages,
|
|
119
121
|
headingLevel: (headingLevel ?? 3) + 1
|
|
120
122
|
}
|
|
121
123
|
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
function GlobeGlyph() {
|
|
4
|
+
return /* @__PURE__ */ jsxs(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 512 512",
|
|
9
|
+
"aria-hidden": "true",
|
|
10
|
+
focusable: "false",
|
|
11
|
+
fill: "none",
|
|
12
|
+
stroke: "currentColor",
|
|
13
|
+
strokeWidth: "48",
|
|
14
|
+
strokeLinecap: "round",
|
|
15
|
+
strokeLinejoin: "round",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx("circle", { cx: "256", cy: "256", r: "200" }),
|
|
18
|
+
/* @__PURE__ */ jsx("ellipse", { cx: "256", cy: "256", rx: "84", ry: "200" }),
|
|
19
|
+
/* @__PURE__ */ jsx("path", { d: "M56 256h400M88 160h336M88 352h336" })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
GlobeGlyph
|
|
26
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, Fragment
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Suspense, lazy, useState, useRef, useLayoutEffect } from "react";
|
|
3
4
|
import { useCloverTranslation } from "../i18n/useCloverTranslation.mjs";
|
|
4
5
|
import { autonym } from "../i18n/autonym.mjs";
|
|
5
6
|
import { languageCode } from "../i18n/languageCode.mjs";
|
|
@@ -8,36 +9,102 @@ import { useContainerName } from "../i18n/useContainerName.mjs";
|
|
|
8
9
|
import { useUniqueId } from "./useUniqueId.mjs";
|
|
9
10
|
import { visuallyHidden } from "./visuallyHidden.mjs";
|
|
10
11
|
import { languageProps } from "../i18n/direction.mjs";
|
|
12
|
+
import { GlobeGlyph } from "./GlobeGlyph.mjs";
|
|
13
|
+
const LanguageMenu = lazy(() => import("./LanguageMenu.mjs"));
|
|
14
|
+
const ROW_MOST = 5;
|
|
15
|
+
function naturalEnd(label, rtl) {
|
|
16
|
+
const was = label.style.whiteSpace;
|
|
17
|
+
label.style.whiteSpace = "nowrap";
|
|
18
|
+
const rect = label.getBoundingClientRect();
|
|
19
|
+
label.style.whiteSpace = was;
|
|
20
|
+
return rtl ? rect.left : rect.right;
|
|
21
|
+
}
|
|
22
|
+
function useFolded(fit, count, shown) {
|
|
23
|
+
const [element, place] = useState(null);
|
|
24
|
+
const width = useRef(0);
|
|
25
|
+
const [folded, setFolded] = useState(false);
|
|
26
|
+
const [measured, setMeasured] = useState(false);
|
|
27
|
+
const [shownWas, setShownWas] = useState(shown);
|
|
28
|
+
if (shownWas !== shown) {
|
|
29
|
+
setShownWas(shown);
|
|
30
|
+
setFolded(false);
|
|
31
|
+
}
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
const found = element && (fit == null ? void 0 : fit(element));
|
|
34
|
+
if (element) setMeasured(!!found);
|
|
35
|
+
if (!element || !found) return;
|
|
36
|
+
const { label, box } = found;
|
|
37
|
+
const check = () => {
|
|
38
|
+
const rtl = getComputedStyle(box).direction === "rtl";
|
|
39
|
+
const rect = box.getBoundingClientRect();
|
|
40
|
+
if (!folded) width.current = rect.width;
|
|
41
|
+
const end = rtl ? rect.left : rect.right;
|
|
42
|
+
const start = rtl ? end + width.current : end - width.current;
|
|
43
|
+
const room = parseFloat(getComputedStyle(box).paddingInlineStart) || 0;
|
|
44
|
+
const words = naturalEnd(label, rtl);
|
|
45
|
+
const crosses = rtl ? words < start + room : words > start - room;
|
|
46
|
+
if (crosses !== folded) setFolded(crosses);
|
|
47
|
+
};
|
|
48
|
+
check();
|
|
49
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
50
|
+
const observer = new ResizeObserver(check);
|
|
51
|
+
observer.observe(label);
|
|
52
|
+
if (label.parentElement) observer.observe(label.parentElement);
|
|
53
|
+
return () => observer.disconnect();
|
|
54
|
+
}, [fit, folded, count, element]);
|
|
55
|
+
return { place, folded: measured ? folded : count > ROW_MOST };
|
|
56
|
+
}
|
|
11
57
|
function LanguageChoice({
|
|
12
58
|
languages,
|
|
13
59
|
chosen,
|
|
14
60
|
onChange,
|
|
15
61
|
nameKey,
|
|
16
|
-
part
|
|
62
|
+
part,
|
|
63
|
+
fit
|
|
17
64
|
}) {
|
|
18
65
|
const { t, langOf } = useCloverTranslation();
|
|
19
66
|
const id = useUniqueId();
|
|
20
67
|
const name = useContainerName(t(nameKey), langOf(nameKey));
|
|
68
|
+
const { place, folded } = useFolded(
|
|
69
|
+
fit,
|
|
70
|
+
languages.length,
|
|
71
|
+
languages.join(" ")
|
|
72
|
+
);
|
|
73
|
+
if (folded)
|
|
74
|
+
return /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
|
|
75
|
+
LanguageMenu,
|
|
76
|
+
{
|
|
77
|
+
languages,
|
|
78
|
+
chosen,
|
|
79
|
+
onChange,
|
|
80
|
+
nameKey,
|
|
81
|
+
part,
|
|
82
|
+
placeRef: place
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
21
85
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
86
|
name.node,
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
87
|
+
/* @__PURE__ */ jsxs("fieldset", { ...name.props, className: `${part}-languages`, ref: place, children: [
|
|
88
|
+
/* @__PURE__ */ jsx("span", { className: "clover-languages-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx(GlobeGlyph, {}) }),
|
|
89
|
+
languages.map((tag) => {
|
|
90
|
+
const own = autonym(tag);
|
|
91
|
+
return /* @__PURE__ */ jsxs("label", { className: `${part}-language`, children: [
|
|
92
|
+
/* @__PURE__ */ jsx(
|
|
93
|
+
"input",
|
|
94
|
+
{
|
|
95
|
+
type: "radio",
|
|
96
|
+
name: `${id}-language`,
|
|
97
|
+
checked: tag === chosen,
|
|
98
|
+
onChange: () => onChange(tag)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: `${part}-language-code`, children: languageCode(tag) }),
|
|
102
|
+
" ",
|
|
103
|
+
/* @__PURE__ */ jsx("span", { style: visuallyHidden, ...languageProps(tag), children: own }),
|
|
104
|
+
/* @__PURE__ */ jsx(Tip, { label: own, lang: tag })
|
|
105
|
+
] }, tag);
|
|
106
|
+
})
|
|
107
|
+
] })
|
|
41
108
|
] });
|
|
42
109
|
}
|
|
43
110
|
export {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useCallback } from "react";
|
|
4
|
+
import ControlMenu from "../components/Canvas/ControlMenu.mjs";
|
|
5
|
+
import { autonym } from "../i18n/autonym.mjs";
|
|
6
|
+
import { languageProps } from "../i18n/direction.mjs";
|
|
7
|
+
import { languageCode } from "../i18n/languageCode.mjs";
|
|
8
|
+
import { useCloverTranslation } from "../i18n/useCloverTranslation.mjs";
|
|
9
|
+
import { Chevron } from "./Chevron.mjs";
|
|
10
|
+
import { GlobeGlyph } from "./GlobeGlyph.mjs";
|
|
11
|
+
import { Tip } from "./Tip.mjs";
|
|
12
|
+
import { useUniqueId } from "./useUniqueId.mjs";
|
|
13
|
+
function LanguageMenu({
|
|
14
|
+
languages,
|
|
15
|
+
chosen,
|
|
16
|
+
onChange,
|
|
17
|
+
nameKey,
|
|
18
|
+
part,
|
|
19
|
+
placeRef
|
|
20
|
+
}) {
|
|
21
|
+
const { t, langOf } = useCloverTranslation();
|
|
22
|
+
const [open, setOpen] = useState(false);
|
|
23
|
+
const id = useUniqueId();
|
|
24
|
+
const button = `${id}-languages`;
|
|
25
|
+
const close = useCallback(
|
|
26
|
+
(restoreFocus) => {
|
|
27
|
+
var _a;
|
|
28
|
+
setOpen(false);
|
|
29
|
+
if (restoreFocus) (_a = document.getElementById(button)) == null ? void 0 : _a.focus();
|
|
30
|
+
},
|
|
31
|
+
[button]
|
|
32
|
+
);
|
|
33
|
+
const name = t(nameKey);
|
|
34
|
+
const nameLang = langOf(nameKey);
|
|
35
|
+
return /* @__PURE__ */ jsxs(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
ref: placeRef,
|
|
39
|
+
className: `${part}-languages clover-languages-folded`,
|
|
40
|
+
onBlur: (event) => {
|
|
41
|
+
const next = event.relatedTarget;
|
|
42
|
+
if (open && next && !event.currentTarget.contains(next)) setOpen(false);
|
|
43
|
+
},
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsxs(
|
|
46
|
+
"button",
|
|
47
|
+
{
|
|
48
|
+
type: "button",
|
|
49
|
+
id: button,
|
|
50
|
+
className: "clover-languages-button",
|
|
51
|
+
"aria-label": `${languageCode(chosen)}, ${name}`,
|
|
52
|
+
...languageProps(nameLang),
|
|
53
|
+
"aria-expanded": open,
|
|
54
|
+
"aria-controls": open ? `${button}-menu` : void 0,
|
|
55
|
+
onClick: () => setOpen((was) => !was),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ jsx(GlobeGlyph, {}),
|
|
58
|
+
/* @__PURE__ */ jsx("span", { className: "clover-languages-code", "aria-hidden": "true", children: languageCode(chosen) }),
|
|
59
|
+
/* @__PURE__ */ jsx(Chevron, { open, className: "clover-languages-caret" }),
|
|
60
|
+
/* @__PURE__ */ jsx(Tip, { label: name, lang: nameLang })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
open && /* @__PURE__ */ jsx(
|
|
65
|
+
ControlMenu,
|
|
66
|
+
{
|
|
67
|
+
id: `${button}-menu`,
|
|
68
|
+
triggerId: button,
|
|
69
|
+
onClose: close,
|
|
70
|
+
className: "clover-languages-menu",
|
|
71
|
+
children: /* @__PURE__ */ jsxs("fieldset", { children: [
|
|
72
|
+
/* @__PURE__ */ jsx("legend", { ...languageProps(nameLang), children: name }),
|
|
73
|
+
languages.map((tag) => /* @__PURE__ */ jsxs("label", { className: "clover-languages-option", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
"input",
|
|
76
|
+
{
|
|
77
|
+
type: "radio",
|
|
78
|
+
name: `${button}-language`,
|
|
79
|
+
checked: tag === chosen,
|
|
80
|
+
onChange: () => onChange(tag)
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx("span", { ...languageProps(tag), children: autonym(tag) })
|
|
84
|
+
] }, tag))
|
|
85
|
+
] })
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
LanguageMenu as default
|
|
94
|
+
};
|
|
@@ -8,30 +8,33 @@ const prefersReducedMotion = () => {
|
|
|
8
8
|
function useScrollTrack({
|
|
9
9
|
align = "start",
|
|
10
10
|
dragFree = false,
|
|
11
|
-
itemCount = 0
|
|
11
|
+
itemCount = 0,
|
|
12
|
+
axis = "x"
|
|
12
13
|
} = {}) {
|
|
14
|
+
const down = axis === "y";
|
|
13
15
|
const [viewport, setViewport] = useState(null);
|
|
14
16
|
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
15
17
|
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
16
18
|
const alignment = useRef(align);
|
|
17
19
|
alignment.current = align;
|
|
18
|
-
const snap = dragFree ? "none" :
|
|
20
|
+
const snap = dragFree ? "none" : `${axis} mandatory`;
|
|
19
21
|
const measure = useCallback(() => {
|
|
20
22
|
if (!viewport) return;
|
|
21
|
-
const position = Math.abs(viewport.scrollLeft);
|
|
22
|
-
const max = viewport.scrollWidth - viewport.clientWidth;
|
|
23
|
+
const position = Math.abs(down ? viewport.scrollTop : viewport.scrollLeft);
|
|
24
|
+
const max = down ? viewport.scrollHeight - viewport.clientHeight : viewport.scrollWidth - viewport.clientWidth;
|
|
23
25
|
setCanScrollPrev(position > 1);
|
|
24
26
|
setCanScrollNext(position < max - 1);
|
|
25
|
-
}, [viewport]);
|
|
27
|
+
}, [viewport, down]);
|
|
26
28
|
useEffect(() => {
|
|
27
29
|
if (!viewport) return;
|
|
28
30
|
const style = viewport.style;
|
|
29
|
-
style.overflowX = "auto";
|
|
30
|
-
style.overflowY = "hidden";
|
|
31
|
+
style.overflowX = down ? "hidden" : "auto";
|
|
32
|
+
style.overflowY = down ? "auto" : "hidden";
|
|
31
33
|
style.scrollSnapType = snap;
|
|
32
34
|
style.setProperty("--clover-track-align", align);
|
|
33
|
-
style.
|
|
34
|
-
|
|
35
|
+
if (down) style.overscrollBehaviorY = "contain";
|
|
36
|
+
else style.overscrollBehaviorX = "contain";
|
|
37
|
+
}, [viewport, snap, align, down]);
|
|
35
38
|
useEffect(() => {
|
|
36
39
|
if (!viewport) return;
|
|
37
40
|
let frame = 0;
|
|
@@ -55,9 +58,9 @@ function useScrollTrack({
|
|
|
55
58
|
(distance, instant = false) => {
|
|
56
59
|
if (!viewport || !distance) return;
|
|
57
60
|
const behavior = instant || prefersReducedMotion() ? "auto" : "smooth";
|
|
58
|
-
viewport.scrollBy({ left: distance, behavior });
|
|
61
|
+
viewport.scrollBy({ [down ? "top" : "left"]: distance, behavior });
|
|
59
62
|
},
|
|
60
|
-
[viewport]
|
|
63
|
+
[viewport, down]
|
|
61
64
|
);
|
|
62
65
|
const scrollToIndex = useCallback(
|
|
63
66
|
(index, { instant = false } = {}) => {
|
|
@@ -68,21 +71,29 @@ function useScrollTrack({
|
|
|
68
71
|
const box = viewport.getBoundingClientRect();
|
|
69
72
|
const rect = slide.getBoundingClientRect();
|
|
70
73
|
const rtl = getComputedStyle(viewport).direction === "rtl";
|
|
74
|
+
if (down) {
|
|
75
|
+
scrollAlong(
|
|
76
|
+
alignment.current === "center" ? rect.top + rect.height / 2 - (box.top + box.height / 2) : rect.top - box.top,
|
|
77
|
+
instant
|
|
78
|
+
);
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
71
81
|
scrollAlong(
|
|
72
82
|
alignment.current === "center" ? rect.left + rect.width / 2 - (box.left + box.width / 2) : rtl ? rect.right - box.right : rect.left - box.left,
|
|
73
83
|
instant
|
|
74
84
|
);
|
|
75
85
|
return true;
|
|
76
86
|
},
|
|
77
|
-
[viewport, scrollAlong]
|
|
87
|
+
[viewport, scrollAlong, down]
|
|
78
88
|
);
|
|
79
89
|
const page = useCallback(
|
|
80
90
|
(direction) => {
|
|
81
91
|
if (!viewport) return;
|
|
82
|
-
const rtl = getComputedStyle(viewport).direction === "rtl";
|
|
83
|
-
|
|
92
|
+
const rtl = !down && getComputedStyle(viewport).direction === "rtl";
|
|
93
|
+
const extent = down ? viewport.clientHeight : viewport.clientWidth;
|
|
94
|
+
scrollAlong(direction * extent * 0.9 * (rtl ? -1 : 1));
|
|
84
95
|
},
|
|
85
|
-
[viewport, scrollAlong]
|
|
96
|
+
[viewport, scrollAlong, down]
|
|
86
97
|
);
|
|
87
98
|
const scrollNext = useCallback(() => page(1), [page]);
|
|
88
99
|
const scrollPrev = useCallback(() => page(-1), [page]);
|
|
@@ -92,13 +103,16 @@ function useScrollTrack({
|
|
|
92
103
|
let dragging = false;
|
|
93
104
|
const onDown = (event) => {
|
|
94
105
|
if (event.pointerType !== "mouse" || event.button !== 0) return;
|
|
95
|
-
start = {
|
|
106
|
+
start = {
|
|
107
|
+
x: down ? event.clientY : event.clientX,
|
|
108
|
+
scroll: down ? viewport.scrollTop : viewport.scrollLeft
|
|
109
|
+
};
|
|
96
110
|
dragging = false;
|
|
97
111
|
};
|
|
98
112
|
const onMove = (event) => {
|
|
99
113
|
var _a;
|
|
100
114
|
if (!start) return;
|
|
101
|
-
const moved = event.clientX - start.x;
|
|
115
|
+
const moved = (down ? event.clientY : event.clientX) - start.x;
|
|
102
116
|
if (!dragging && Math.abs(moved) < DRAG_THRESHOLD) return;
|
|
103
117
|
if (!dragging) {
|
|
104
118
|
dragging = true;
|
|
@@ -106,7 +120,8 @@ function useScrollTrack({
|
|
|
106
120
|
viewport.style.scrollSnapType = "none";
|
|
107
121
|
viewport.dataset.dragging = "true";
|
|
108
122
|
}
|
|
109
|
-
viewport.
|
|
123
|
+
if (down) viewport.scrollTop = start.scroll - moved;
|
|
124
|
+
else viewport.scrollLeft = start.scroll - moved;
|
|
110
125
|
};
|
|
111
126
|
const onUp = (event) => {
|
|
112
127
|
var _a;
|
|
@@ -135,7 +150,7 @@ function useScrollTrack({
|
|
|
135
150
|
viewport.removeEventListener("pointercancel", onUp);
|
|
136
151
|
viewport.removeEventListener("click", onClick, true);
|
|
137
152
|
};
|
|
138
|
-
}, [viewport, snap]);
|
|
153
|
+
}, [viewport, snap, down]);
|
|
139
154
|
return {
|
|
140
155
|
ref: setViewport,
|
|
141
156
|
canScrollPrev,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as M,y as j,u as t,z as C,P as N,X as w,a as x,Q as $,x as H,c as _,A as G,b as U,Y as T,U as V,l as k}from"./shared-CzlxExGR.mjs";import{j as B}from"./classnames-DukgfdpI.mjs";import{u as Q}from"./readingLanguages-C83aK9na.mjs";import{Thumbnail as W,Summary as R,Metadata as X,RequiredStatement as Y,Rights as E,Homepage as J,SeeAlso as Z,Id as K}from"./Primitives-Ea4kfG9I.mjs";import{u as ee}from"./downloads-CurHNK9M.mjs";import{P as te}from"./Provider-D9_x7agY.mjs";import{a as oe,t as ae}from"./heading-Cjt0f-Eu.mjs";import{L as ne}from"./Label-CvbxytPx.mjs";import{r as re}from"./dates-DR3gfcON.mjs";import"./styles-C51FhQQr.mjs";const se=C(()=>import("./LanguageChoice-BJd_RsYq.mjs").then(e=>e.b).then(e=>({default:e.LanguageChoice}))),le=e=>{var r;const s=e.closest(".clover-sections-actions"),a=(r=s==null?void 0:s.closest(".clover-sections-item"))==null?void 0:r.querySelector(".clover-sections-heading .clover-sections-label");return s&&a?{box:s,label:a}:null},ce=e=>void w.chooseInterfaceLanguage(e);function ue(){x();const{languages:e,chosen:s}=w.interfaceLanguages();return e.length>1?{languages:e,chosen:s}:null}function ie({values:e=true,interfaceLanguages:s=true}={}){const a=Q(),r=ue(),l=e?(a==null?void 0:a.languages)??[]:[],c=o=>l.some(b=>b===o||w.stringsFor(b)===o),g=[...l,...(s?(r==null?void 0:r.languages)??[]:[]).filter(o=>!c(o))];if(g.length<2)return null;const P=w.chosenLanguage,h=P&&w.stringsFor(P),L=h&&g.includes(h)&&!c(h)?h:e&&a?a.chosen:(r==null?void 0:r.chosen)??g[0];return{languages:g,chosen:L,onChange:o=>l.includes(o)&&a?a.onChange(o):ce(o)}}function me({values:e,interfaceLanguages:s}){const a=ie({values:e,interfaceLanguages:s}),{drawsToggle:r}=M("About"),l=!!a;return j(()=>l?r==null?void 0:r():void 0,[l,r]),a?t(N,{fallback:null,children:t(se,{...a,nameKey:"readingLanguage",part:"clover-about",fit:le})}):null}const de=$(false),ge=C(()=>import("./Download-WldBPDxr.mjs").then(({DownloadGroups:e})=>({default:e}))),he=C(()=>import("./NavDate-rtQNHF_X.mjs").then(e=>e.a).then(({NavDate:e})=>({default:e}))),be=C(()=>import("./PartOfManifest-ydDwjNTt.mjs"));function fe({languages:e=true,interfaceLanguages:s=true,...a}){const r=H(de);return t(ve,{...a,download:!r&&a.download!==false,choice:r?null:t(me,{values:e,interfaceLanguages:s})})}function ve({choice:e,canvasSummary:s=false,headingLevel:a=3,download:r=true,thumbnail:l=true,label:c=true,className:g,...P}){const{t:h,langOf:L}=x(),v=ee(),o=_(n=>n.manifest,Object.is,"About"),b=G(null);j(()=>{const n=b.current,i=n==null?void 0:n.querySelector(".clover-about-head");if(!n||!i||typeof ResizeObserver>"u")return;const m=new Set,d=()=>{const D=i.querySelector(".clover-about-thumbnail"),A=i.querySelector(".clover-about-label");for(const S of[D,A])S&&!m.has(S)&&(m.add(S),y.observe(S));const f=n.style;if(!D){f.removeProperty("--clover-about-label-height"),f.removeProperty("--clover-about-thumbnail-width");return}const O=`${(A==null?void 0:A.offsetHeight)??0}px`,q=`${D.offsetWidth}px`;f.getPropertyValue("--clover-about-label-height")!==O&&f.setProperty("--clover-about-label-height",O),f.getPropertyValue("--clover-about-thumbnail-width")!==q&&f.setProperty("--clover-about-thumbnail-width",q)};let p=0;const y=new ResizeObserver(()=>{cancelAnimationFrame(p),p=requestAnimationFrame(d)});return y.observe(i),d(),()=>{cancelAnimationFrame(p),y.disconnect(),n.style.removeProperty("--clover-about-label-height"),n.style.removeProperty("--clover-about-thumbnail-width")}},[c,l,o]);const z=U(),F=()=>{var m,d;const n=b.current;(d=((m=n==null?void 0:n.closest(".clover-sections-item"))==null?void 0:m.querySelector(".clover-sections-button"))??n)==null||d.focus({preventScroll:true})};if(!o)return null;const u=(n,i,m)=>{if(!i)return null;const{as:d,title:p,group:y}=ae(a,`${z}-${n}`);return t("section",{className:"clover-about-section",...y,children:[t(d,{className:"clover-about-heading",...k(L(n)),...p,children:h(n)}),m]})},I=n=>Array.isArray(o[n])?o[n].length>0:!!o[n];return t("div",{ref:b,className:B("clover-about",g),tabIndex:-1,...P,children:[e,(l||c)&&t("div",{className:"clover-about-head",children:[l&&t(W,{className:"clover-about-thumbnail",size:256,alt:c?"":void 0}),c&&t(ne,{as:oe(a),className:"clover-about-label clover-title"})]}),s&&t(R,{of:"canvas",className:"clover-about-summary"}),T(o)&&o.partOf&&t(N,{fallback:null,children:t(be,{manifest:o,headingLevel:a,onOpened:F})}),t(R,{className:"clover-about-summary"}),t(X,{className:"clover-about-metadata"}),t(Y,{className:"clover-about-metadata"}),u("aboutDate",re(o.navDate),t(N,{fallback:null,children:t(he,{value:o.navDate,className:"clover-about-date"})})),u("aboutProvider",I("provider"),t(te,{})),u("aboutRights",o.rights,t(E,{})),u("aboutHomepage",I("homepage"),t(J,{})),u("aboutSeeAlso",I("seeAlso"),t(Z,{})),u("download",r&&v.page.length+v.all.length>0,t(N,{fallback:null,children:t(ge,{page:v.page,all:v.all,headingLevel:a+1})})),u(T(o)?"aboutCanvas":"aboutManifest",!V(o)&&o.id,t(K,{}))]})}const De=Object.freeze(Object.defineProperty({__proto__:null,About:fe},Symbol.toStringTag,{value:"Module"}));export{fe as A,de as I,me as L,De as a,ie as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as P,c as v,aj as _,T as E,G as O,A as R,y as T,u as f,k,d as q,a1 as F}from"./shared-CzlxExGR.mjs";import{P as G,a as L}from"./Items-CVvtjq7r.mjs";import{C as j}from"./CountMenu-DyBK1e4z.mjs";import{a as y}from"./annotation-name-DFdgSllS.mjs";import{f as B,r as D}from"./fetchManifest-Crn4VJ56.mjs";import{u as K,L as V}from"./ListEnd-DwtNoi_1.mjs";function z({onSelect:o,forwardedRef:r,...c}){const{clover:l,language:e}=P("Items"),n=v(t=>t.manifest),s=v(t=>_(t.manifest,t.addedSets)),u=v(t=>t.annotationId),d=(s==null?void 0:s.pages)??H,m=(s==null?void 0:s.entries)??J,{loaded:A,more:N,reachNext:S}=K(d),x=E(()=>[...new Set(m.map(t=>O(t.annotation)).filter(t=>!!t&&t!==(n==null?void 0:n.id)))],[m,n==null?void 0:n.id]),C=U(c.layout==="pager"?Q:x),M=x.length>0,i=E(()=>{const t=d.length?new Set(d.slice(0,A).map(a=>a.id)):null;return m.filter(a=>!t||t.has(a.setId)).map(a=>{const g=O(a.annotation),p=g&&g!==(n==null?void 0:n.id)?C.get(g)??null:n;return X(a,p,e,M)})},[d,A,m,n,C,M,e]),b=Math.max((s==null?void 0:s.total)??0,i.length),I=R(null);if(T(()=>{const t=I.current;t===null||!i[t]||(I.current=null,l.selectAnnotation(i[t].id))},[l,i]),!i.length)return null;const h=i.findIndex(t=>t.id===u),w=(t,a)=>{o==null||o(t,a),l.selectAnnotation(t.id)};return c.layout==="pager"?f(G,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,g)=>{const p=h+a;if(!(p<0)){if(i[p])return w(i[p],g);N&&(I.current=p,S())}}},nameKey:"informationPanelTabsAnnotations",position:f(j,{position:h,total:b,list:a=>f(z,{layout:"list",forwardedRef:null,onSelect:a})})}):f(k,{children:[f(L,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&f(V,{onReached:S})]})}const H=[],J=[],Q=[];function U(o){const{clover:r}=P("Items"),[c,l]=q(W);return T(()=>{if(!o.length)return;let e=true;for(const n of o)B(r,n).then(s=>{e&&s&&l(u=>u.has(n)?u:new Map(u).set(n,s))});return()=>{e=false}},[r,o]),c}const W=new Map;function X(o,r,c,l){const e=F(r,o.canvasId),n=y(o.bodies,c),s=n.text?{[n.lang??"none"]:[n.text]}:e==null?void 0:e.label,u=l?r==null?void 0:r.label:e==null?void 0:e.label,d=e&&o.target.rect?D(e,o.target.rect):void 0;return{id:o.id,label:s,summary:n.text?u:void 0,parts:[{id:o.id,type:"Canvas",label:s,resource:e??{id:o.canvasId},...d?{source:d}:{}}]}}export{z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as I,u as a,l as y}from"./shared-
|
|
1
|
+
import{A as I,u as a,l as y}from"./shared-CzlxExGR.mjs";import{s as H}from"./Annotations-B5WD596p.mjs";import T from"./ControlMenu-DLJsVZnm.mjs";import{C as $}from"./Cue-CrnTNjnn.mjs";import{H as z}from"./HideToggle-D-r79OIC.mjs";import{u as B}from"./useContainerName-CAlWJohz.mjs";import"./styles-C51FhQQr.mjs";const G=({id:d,triggerId:C,label:M,labelLang:k,annotations:p,hiddenPages:x=[],onPageVisibilityChange:v,selected:w,onSelect:u,onActivate:i,onClose:D})=>{const h=B(M,k),m=I(false),r=[];p.forEach((n,c)=>{var s,l;const o=r[r.length-1];o&&((s=o.page)==null?void 0:s.text)===((l=n.page)==null?void 0:l.text)?o.items.push(c):r.push({page:n.page,items:[c]})});const E=r.some(n=>!n.page);return a(T,{className:"clover-canvas-annotation-menu","data-testid":"clover-canvas-annotation-menu",id:d,onClose:D,triggerId:C,children:[E&&h.node,r.map((n,c)=>{const o=[...new Set(n.items.flatMap(t=>p[t].pageId??[]))],s=`${d}-page-${c}`,l=v&&o.length>0&&a(z,{hidden:o.every(t=>x.includes(t)),onChange:t=>v(o,!t),of:n.page?s:void 0});return a("fieldset",{...n.page?{"aria-labelledby":s}:h.props,className:"clover-canvas-menu-group clover-annotations-set",children:[n.page?a("legend",{className:"clover-canvas-menu-legend clover-annotations-set-header",children:[a("span",{className:"clover-annotations-title",id:s,...y(n.page.lang),children:n.page.text}),l]}):l&&a("div",{className:"clover-annotations-set-header",children:l}),a("div",{className:"clover-annotations-list",children:n.items.map(t=>{const e=p[t],f=H(e),g=w===e.id,N="image"in e?e.image:void 0;return a("label",{className:"clover-canvas-menu-item clover-annotations-entry","data-selected":g,onMouseEnter:()=>i(e.id),onMouseLeave:()=>i(null),onPointerDown:()=>{m.current=true},children:[a("input",{type:"radio",name:d,checked:g,onChange:()=>u(e,m.current),onClick:()=>{(g||!m.current)&&u(e)},onKeyDown:b=>{m.current=false,b.key==="Enter"&&(b.preventDefault(),u(e))},onFocus:()=>i(e.id),onBlur:()=>i(null)}),f!==void 0&&a($,{start:f,className:"clover-annotations-time"}),a("span",{className:"clover-annotations-body clover-cue-text",children:[N&&a("img",{className:"clover-annotations-image",src:N,alt:"",loading:"lazy"}),a("span",{className:"clover-annotations-text",...y(e.label?e.lang:void 0),children:e.label??String(t+1)})]})]},e.id)})})]},c)})]})};export{G as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as d,ac as qt,f as bt,d as C,aI as Gt,q as I,A as l,E as jt,y as z,_ as It,u as zt}from"./shared-CzlxExGR.mjs";import{w as Dt,p as kt,g as Ot,t as Jt,A as Ut}from"./Annotations-B5WD596p.mjs";import{h as Xt}from"./layout-NPxKIp1S.mjs";const Yt=()=>import("./svg-shape-D1K-WNrY.mjs");function Zt(w){var S;const c=d(()=>!!(w!=null&&w.some(({annotation:s})=>{var p;return(p=qt(s==null?void 0:s.target))==null?void 0:p.svg})),[w]);return((S=bt(Yt,c))==null?void 0:S.readSvgShape)??null}const xt=[];function Et({given:w,annotations:c,scene:S,renderer:s,sceneVersion:p,drawn:E,media:k,mediaElement:f,showPlaceholder:F,canvasKey:D,openImages:tt,openMedia:et,host:nt,onModel:H,refind:_=0}){const{canvases:g,language:v,hiddenPages:rt,unlistedPages:yt,onPageVisibilityChange:ct,onAnnotationActive:ut,selectedAnnotation:st,animateAnnotations:ot=false,highlightedAnnotation:Ct,onAnnotationSelect:lt,onAnnotationLink:J}=w,[B,Ft]=C([]),[it,Ht]=C([]),L=rt!==void 0,U=d(()=>{var n;if(L)return xt;const t=new Map;for(const r of c){if(!r.pageId)continue;const o=!(Number((n=g==null?void 0:g[r.targetIndex])==null?void 0:n.duration)>0)&&Gt(r.annotation.motivation,qt(Array.isArray(r.annotation.target)?r.annotation.target[0]:r.annotation.target));t.set(r.pageId,(t.get(r.pageId)??true)&&o)}const e=[...t].filter(([,r])=>r).map(([r])=>r);return e.length?e:xt},[L,c,g]),_t=d(()=>{const t=U.filter(e=>!it.includes(e)&&!B.includes(e));return t.length?[...B,...t]:B},[B,it,U]),a=rt??_t,X=yt??U,N=I(t=>X.length?t.filter(e=>!e.pageId||!X.includes(e.pageId)):t,[X]),dt=d(()=>N(c).length,[c,N]),T=I(t=>a.length?t.filter(e=>!e.pageId||!a.includes(e.pageId)):t,[a]),Q=l(ct);Q.current=ct;const R=I((t,e)=>{var n;(n=Q.current)==null||n.call(Q,t,e),!L&&(Ft(r=>{const i=r.filter(o=>!t.includes(o));return e?i:[...i,...t]}),Ht(r=>{const i=r.filter(o=>!t.includes(o));return e?[...i,...t]:i}))},[L]),gt=d(()=>Dt(T(c),g),[c,T,g]),O=d(()=>{if(!(!S||!g))return(t,e,n)=>{const r=g.findIndex(Wt=>Wt.id===e),i=r===-1?n:r,o=S.placements[i];return o?Xt(g[i],o,t):null}},[S,g]),W=Zt(c),P=d(()=>s&&p>0&&E?kt(c,O??((t,e,n)=>s.itemRectToWorld(n,t)),W,v):[],[s,c,p,E,O,W,v]),x=d(()=>T(P),[P,T]),Y=d(()=>P.length||!O?P:kt(c,O,W,v),[P,O,c,W,v]),[Bt,Lt]=C(null),[Nt,ft]=C(null),u=st!==void 0?st:Nt,A=l(null),h=l(ut);h.current=ut;const m=l(lt);m.current=lt;const Z=I(t=>{var e;Lt(t),(e=h.current)==null||e.call(h,t)},[]),$=l(ot);$.current=ot;const pt=l(false);pt.current=F;const V=l(f);V.current=f;const at=l(s);at.current=s;const q=l(null),Pt=l(a);Pt.current=a;const ht=l(R);ht.current=R;const K=I((t,e=true)=>{var n,r,i;if(t.pageId&&Pt.current.includes(t.pageId)&&ht.current([t.pageId],true),ft(t.id),(n=h.current)==null||n.call(h,t.id),(r=m.current)==null||r.call(m,t.id),!pt.current){if("start"in t){const o=V.current;if(!o)return;q.current=t.id,e?jt(o,t.start):o.currentTime=t.start;return}if(A.current=t.id,t.track){const o=V.current;o&&Ot(t,o)&&(q.current=t.id);return}(i=at.current)==null||i.fitAnnotation(t.world,!$.current)}},[]),mt=l(u);mt.current=u;const b=I(()=>{var t;return mt.current?(ft(null),A.current=null,(t=m.current)==null||t.call(m,null),true):false},[]),G=l(J);G.current=J;const wt=!!J,Qt=d(()=>wt?t=>{var e,n;(e=nt.current)==null||e.focus({preventScroll:true}),b(),t.link&&((n=G.current)==null||n.call(G,t.link))}:void 0,[wt,b,nt]),St=l(_);z(()=>{if(!u){A.current=null;return}if(St.current!==_&&(St.current=_,A.current=null),A.current===u)return;const t=r=>r.find(i=>i.id===u),e=t(x),n=e??t(P);if(n){if(A.current=n.id,n.track){!e&&f&&Ot(n,f);return}s==null||s.fitAnnotation(n.world,!$.current)}},[u,x,P,f,s,_]);const y=d(()=>k?Jt(c,v):[],[k,c,v]),j=d(()=>T(y),[y,T]),vt=d(()=>N(y.length?[...Y,...y]:Y),[Y,y,N]);z(()=>{if(!u){q.current=null;return}if(q.current===u||!f)return;const t=j.find(e=>e.id===u);t&&(q.current=t.id,f.currentTime=t.start)},[u,j,f]);const M=l(null),[Tt,Rt]=C(null);z(()=>{M.current=u??null},[u]),z(()=>{const t=M.current;if(!(!t||!c.some(e=>{var n;return((n=e.annotation)==null?void 0:n.id)===t}))&&(M.current=null,!!F)){if(!k){tt(true);return}et(D),Rt(D)}},[u,c,F,k,D,tt,et]);const At=d(()=>({menu:vt,placed:x,timed:j,hiddenPages:a,setPagesVisible:R,listedCount:dt,comments:gt,selected:u??null,select:K,activate:Z,release:b,quietlyOpened:Tt}),[vt,x,j,a,R,dt,gt,u,K,Z,b,Tt]);return It(()=>H(At),[At,H]),It(()=>()=>H(null),[H]),s&&p>0&&!F?zt(Ut,{renderer:s,placed:x,sceneVersion:p,active:Bt??Ct??u,selected:u,onActivate:Z,onSelect:K,onFollow:Qt,media:k?f:void 0}):null}export{Et as AnnotationState};
|