@nulib/clover 4.4.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/components/Annotations/Annotations.mjs +11 -5
- package/dist/components/Body/Caption.mjs +1 -1
- package/dist/components/Canvas/AnnotationMenu.mjs +16 -2
- package/dist/components/Canvas/AnnotationState.mjs +27 -23
- package/dist/components/Canvas/ControlMenu.mjs +9 -0
- package/dist/components/Canvas/PlaceBox.mjs +8 -0
- package/dist/components/Canvas/media/Transport.mjs +32 -18
- package/dist/components/Items/CountMenu.mjs +13 -1
- package/dist/components/Items/Items.mjs +24 -7
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +31 -19
- 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 +43 -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/core/value.mjs +1 -1
- package/dist/i18n/config.mjs +88 -14
- package/dist/i18n/direction.mjs +2 -2
- 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/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles/items.css +1 -1
- package/dist/styles/map.css +1 -1
- package/dist/styles/media.css +1 -1
- package/dist/styles/panel.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/default/Default.mjs +3 -0
- package/dist/templates/document/Document.mjs +6 -1
- package/dist/templates/gallery/Gallery.mjs +2 -0
- package/dist/templates/index.d.mts +56 -11
- package/dist/templates/shared/LightboxView.mjs +3 -0
- package/dist/templates/shared/useDrawer.mjs +14 -2
- package/dist/ui/ErrorBoundary.mjs +19 -5
- package/dist/ui/FieldPill.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/Sections.mjs +18 -5
- package/dist/ui/Tip.mjs +4 -2
- package/dist/ui/sheets/map.mjs +1 -1
- package/dist/ui/sheets/media.mjs +1 -1
- package/dist/ui/useScrollTrack.mjs +34 -19
- package/dist/web-components/About-BklM8JA9.mjs +1 -0
- package/dist/web-components/AnnotationItems-4mbvOrhN.mjs +1 -0
- package/dist/web-components/AnnotationMenu-DtMaxXf5.mjs +1 -0
- package/dist/web-components/AnnotationState-BuEpq99k.mjs +1 -0
- package/dist/web-components/Annotations-Dyg-RAdd.mjs +2 -0
- package/dist/web-components/{Annotations-oXpa3fvs.mjs → Annotations-oPabBO7j.mjs} +1 -1
- package/dist/web-components/{Body-BNLhtQi3.mjs → Body-CD7AtOPv.mjs} +1 -1
- package/dist/web-components/{BodyAlert-B0AblEtp.mjs → BodyAlert-DzW4__bK.mjs} +1 -1
- package/dist/web-components/{Button-0dU8Owcz.mjs → Button-1To2Pwuz.mjs} +1 -1
- package/dist/web-components/{Camera-BS8iIH74.mjs → Camera-B82ZMekU.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-U4BLi8EN.mjs → Canvas2DBackend-Ds-qoQ0W.mjs} +1 -1
- package/dist/web-components/CanvasView-B4fnYim4.mjs +2 -0
- package/dist/web-components/{CaptionDetails-CtRzBSwh.mjs → CaptionDetails-TTAEPH02.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-DJRfJSwC.mjs → ChaptersMenu-DhbAktrS.mjs} +1 -1
- package/dist/web-components/{Chevron-BJFhP5wm.mjs → Chevron-Br3zRRMX.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-Cfjnk3NG.mjs → ChoiceMenu-B4_doj7b.mjs} +1 -1
- package/dist/web-components/{Collection-C2ji8AVd.mjs → Collection-DrMfq53r.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-CSTSqjG3.mjs → CollectionSelect-PP7IEcwu.mjs} +1 -1
- package/dist/web-components/{Connected-B42WdjMx.mjs → Connected-BOPNEv3j.mjs} +1 -1
- package/dist/web-components/{Connected-D2y_qBDh.mjs → Connected-BguZSgy4.mjs} +1 -1
- package/dist/web-components/{Connected-C-Ars8eC.mjs → Connected-CN94wOYw.mjs} +1 -1
- package/dist/web-components/{Contents-BLbU9Qvc.mjs → Contents-Dn7MutL9.mjs} +1 -1
- package/dist/web-components/ControlMenu-DlP3JsqV.mjs +1 -0
- package/dist/web-components/ControlsFade-Cuh5Mqe7.mjs +1 -0
- package/dist/web-components/CountMenu-Aoott7Hu.mjs +1 -0
- package/dist/web-components/Cue-BAj92VWz.mjs +1 -0
- package/dist/web-components/Document-BjTWX_7P.mjs +1 -0
- package/dist/web-components/{DomLayers-DDRNVemT.mjs → DomLayers-GnBlZ7yI.mjs} +1 -1
- package/dist/web-components/{Download-VPFf23Kw.mjs → Download-C1RNBLdn.mjs} +1 -1
- package/dist/web-components/{EntryBodies-CKgmBQCk.mjs → EntryBodies-BG4F8uub.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-CgukpUtr.mjs → EntryThumbnail-BJPQwkQw.mjs} +1 -1
- package/dist/web-components/FieldPill-CgMPW9BB.mjs +1 -0
- package/dist/web-components/{FrameAnimation-C2EFrQl0.mjs → FrameAnimation-DWd0yBuN.mjs} +1 -1
- package/dist/web-components/Gallery-DpJqgaft.mjs +1 -0
- package/dist/web-components/GlobeGlyph-CLM28n1E.mjs +1 -0
- package/dist/web-components/{HideToggle-HVrk9D6t.mjs → HideToggle-C4mW4-CK.mjs} +1 -1
- package/dist/web-components/{ImageControls-BsGWsB_S.mjs → ImageControls-B36Hng03.mjs} +1 -1
- package/dist/web-components/Items-BApzELFW.mjs +1 -0
- package/dist/web-components/Label-CRTQApU-.mjs +1 -0
- package/dist/web-components/LanguageChoice-B1941Wuu.mjs +1 -0
- package/dist/web-components/LanguageMenu-yWDzK3U0.mjs +1 -0
- package/dist/web-components/LightboxView-BLHI5EIj.mjs +1 -0
- package/dist/web-components/{ListEnd-BPSaqeEg.mjs → ListEnd-CIiLZZzc.mjs} +1 -1
- package/dist/web-components/{Loaded-vg9q9y73.mjs → Loaded-X_Pr53fq.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-BtNg_QnI.mjs → LoadedCanvas-1Bi6-QtF.mjs} +1 -1
- package/dist/web-components/LoadedMap-58bpxj_6.mjs +1 -0
- package/dist/web-components/{Loading-DnCFXiNy.mjs → Loading-CyoVEwax.mjs} +1 -1
- package/dist/web-components/{Map-CIGzy4XB.mjs → Map-2oeDIJzq.mjs} +1 -1
- package/dist/web-components/MapView-DX3ZLqmp.mjs +3 -0
- package/dist/web-components/{Markup-Csh1bNkq.mjs → Markup-B2GbrisO.mjs} +1 -1
- package/dist/web-components/{MediaBody-CRJFBpMk.mjs → MediaBody-DZ9JgkKF.mjs} +1 -1
- package/dist/web-components/{MediaBody-CeEWPIDp.mjs → MediaBody-eFAZIyGv.mjs} +1 -1
- package/dist/web-components/{NavDate-qoFXy3Ou.mjs → NavDate-BwV4kPl-.mjs} +1 -1
- package/dist/web-components/{Navigator-9n2yLQdc.mjs → Navigator-CTrfNuwj.mjs} +1 -1
- package/dist/web-components/{Pager-4rZjWBna.mjs → Pager-BGjj90LQ.mjs} +1 -1
- package/dist/web-components/PagerLayout-Ce7zW_yB.mjs +1 -0
- package/dist/web-components/Panel-77xi6y2C.mjs +1 -0
- package/dist/web-components/PanelPart-Cm9VykIu.mjs +1 -0
- package/dist/web-components/{PanelToggle-0K2YTp6k.mjs → PanelToggle-Cj_FjIgS.mjs} +1 -1
- package/dist/web-components/{PartOfManifest-ZUGZW86B.mjs → PartOfManifest-B0RwR4iy.mjs} +1 -1
- package/dist/web-components/{Pending-lpHOVvqE.mjs → Pending-s7yYnZzR.mjs} +1 -1
- package/dist/web-components/PlaceBox-pt7Vmrs1.mjs +1 -0
- package/dist/web-components/{Placeholder-ChFeaw7a.mjs → Placeholder-BK-eqSCl.mjs} +1 -1
- package/dist/web-components/{Position-C2Hm7tJZ.mjs → Position-CKsSKMgZ.mjs} +1 -1
- package/dist/web-components/Primitives-T7usOLie.mjs +1 -0
- package/dist/web-components/Provider-B2k1G-E0.mjs +1 -0
- package/dist/web-components/{ReadMore-DsthjUIZ.mjs → ReadMore-Cs2t9xkI.mjs} +1 -1
- package/dist/web-components/Root-D942bSXu.mjs +1 -0
- package/dist/web-components/Scene-Cwzisn4E.mjs +1 -0
- package/dist/web-components/SceneView-_CNm8cGL.mjs +1 -0
- package/dist/web-components/Search-u43mfzT8.mjs +1 -0
- package/dist/web-components/Sections-CPU5bGvk.mjs +2 -0
- package/dist/web-components/{SeekMarks-DNHLgUaX.mjs → SeekMarks-CnqVS-ym.mjs} +1 -1
- package/dist/web-components/StandaloneItems-D9Og9pdI.mjs +1 -0
- package/dist/web-components/{Status-DLZANUzF.mjs → Status-Cxev3WuC.mjs} +1 -1
- package/dist/web-components/{Steps-BigQvWNW.mjs → Steps-l7_NsIBr.mjs} +1 -1
- package/dist/web-components/{TargetItems-DzNzoEeh.mjs → TargetItems-nP3Oa9hh.mjs} +1 -1
- package/dist/web-components/Timeline-C1g1MXp5.mjs +1 -0
- package/dist/web-components/{Tip-CoSRaKjm.mjs → Tip-D2pR3HW4.mjs} +1 -1
- package/dist/web-components/Transcript-D_a9jio-.mjs +1 -0
- package/dist/web-components/Transport-CowDRPK7.mjs +1 -0
- package/dist/web-components/Transport-uqpqUIKE.mjs +1 -0
- package/dist/web-components/{annotation-collection-DwJ2R8tG.mjs → annotation-collection-d6JyHnML.mjs} +1 -1
- package/dist/web-components/{annotation-name-2rUtUYsN.mjs → annotation-name-BWTrB9nK.mjs} +1 -1
- package/dist/web-components/{annotations-content-fTNYRgN_.mjs → annotations-content-Bomfao_5.mjs} +1 -1
- package/dist/web-components/{body-qFClz6nF.mjs → body-Dfn0GJa2.mjs} +1 -1
- package/dist/web-components/{canvas-DqmG6v1g.mjs → canvas-DHIn2DIV.mjs} +1 -1
- package/dist/web-components/{cloverEngine-BBfVDNbE.mjs → cloverEngine-DDVOcZTv.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DYXL5lFa.mjs → content-state-reader-CyNkhTZY.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-DqZmaT9n.mjs → controlGlyphs-Dymy1PkA.mjs} +1 -1
- package/dist/web-components/{controls-BvC6zo32.mjs → controls-CIkf2UoE.mjs} +1 -1
- package/dist/web-components/custom-elements.json +35 -3
- package/dist/web-components/downloads-DCsDCcA8.mjs +1 -0
- package/dist/web-components/{dragToClose-wFiErDub.mjs → dragToClose-BKcu5guw.mjs} +1 -1
- package/dist/web-components/{engine-B0W3FXuQ.mjs → engine-BhdQsvOB.mjs} +1 -1
- package/dist/web-components/{engines-DVRUnyFv.mjs → engines-pnfVMoUH.mjs} +1 -1
- package/dist/web-components/{fetchManifest-f8gYlPDK.mjs → fetchManifest-QmVIeaHo.mjs} +1 -1
- package/dist/web-components/{fromManifest-BmpOsc5g.mjs → fromManifest-CvXwGGRI.mjs} +1 -1
- package/dist/web-components/{glyphs-oAgi4Au0.mjs → glyphs-BAh9Lia0.mjs} +1 -1
- package/dist/web-components/hooks-CTqjdpYl.mjs +1 -0
- package/dist/web-components/{image-layers-CndzdWOW.mjs → image-layers-Dp2qOSA5.mjs} +1 -1
- package/dist/web-components/image-service-content-B5ICMeIO.mjs +1 -0
- package/dist/web-components/{imageService-DTp1mc0F.mjs → imageService-XKWMYAcG.mjs} +1 -1
- package/dist/web-components/index-BuoWCrun.mjs +1 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-8ZEJCxWU.mjs +1 -0
- package/dist/web-components/items-DjpIYUxD.mjs +1 -0
- package/dist/web-components/ja-Cg1enUhM.mjs +1 -0
- package/dist/web-components/label-BWHRHAY2.mjs +1 -0
- package/dist/web-components/layout-B3HyDCsP.mjs +1 -0
- package/dist/web-components/{link-CEfxl5hU.mjs → link-Mnt5GrKM.mjs} +1 -1
- package/dist/web-components/logo-YR9jXUE4.mjs +1 -0
- package/dist/web-components/{models-B-kri8Ov.mjs → models-NfaX6B8u.mjs} +1 -1
- package/dist/web-components/{nodes-BKoxD-el.mjs → nodes-CRrc5Svn.mjs} +1 -1
- package/dist/web-components/{overlayImage-Dp8CjA_L.mjs → overlayImage-D7Knsh4X.mjs} +1 -1
- package/dist/web-components/{panel-ldBDfuIV.mjs → panel-DUMFdAc8.mjs} +1 -1
- package/dist/web-components/part-C_V28rvN.mjs +1 -0
- package/dist/web-components/{playerSurface-CLWTmyt1.mjs → playerSurface-CF5g-4Po.mjs} +1 -1
- package/dist/web-components/pointer-PJLHbbSD.mjs +1 -0
- package/dist/web-components/{provider-D24Pm3a1.mjs → provider-b4id5kCa.mjs} +1 -1
- package/dist/web-components/{range-regions-9vY5ikPm.mjs → range-regions-DCY76ydS.mjs} +1 -1
- package/dist/web-components/{read-more-CoOeWZOF.mjs → read-more-UM90-AEc.mjs} +1 -1
- package/dist/web-components/readingLanguages-Qdn21-7Q.mjs +1 -0
- package/dist/web-components/rendererSurface-PZlq-wa_.mjs +22 -0
- package/dist/web-components/{renderers-BXcv_AqV.mjs → renderers-DIHonXTq.mjs} +1 -1
- package/dist/web-components/resource-BlU2Ese6.mjs +1 -0
- package/dist/web-components/{save-file-Dj3MRR7Y.mjs → save-file-GI0ekTmd.mjs} +1 -1
- package/dist/web-components/{search-C9OyY1qk.mjs → search-CHjjiXkB.mjs} +1 -1
- package/dist/web-components/shared-DgJ0bXca.mjs +1 -0
- package/dist/web-components/{show-link-4mlfdoeo.mjs → show-link-BlLkTYtm.mjs} +1 -1
- package/dist/web-components/{sizedImage-COfCkv_8.mjs → sizedImage-BoGT1x5n.mjs} +1 -1
- package/dist/web-components/{split-Ci426kxC.mjs → split-OO6-WiG3.mjs} +1 -1
- package/dist/web-components/{status-CzasXLV8.mjs → status-CSenPCO4.mjs} +1 -1
- package/dist/web-components/styles-Bvw9LFU7.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-ByuoouMG.mjs → thumbnail-DYJHCrW_.mjs} +1 -1
- package/dist/web-components/{tip-CQEGLOst.mjs → tip-Dr1mfd4o.mjs} +1 -1
- package/dist/web-components/{toggle-Dro_EmUU.mjs → toggle-86lqpaU9.mjs} +1 -1
- package/dist/web-components/{useContainerName-CUP-TlA5.mjs → useContainerName-BfNL6p3O.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-DeI3NHWp.mjs → useControlsVisibility-C3LCnrb7.mjs} +1 -1
- package/dist/web-components/useNearViewport-Dk5q1rzk.mjs +1 -0
- package/dist/web-components/useScrollTrack-B_yYmQDS.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationItems-ByWBkMRd.mjs → AnnotationItems-BbPnS9EE.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationMenu-BGv-HimF.mjs +1 -0
- package/dist/web-components/viewer/AnnotationState-uRm7bEwg.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-CJRF_IwO.mjs → Annotations-_2PMmUfu.mjs} +1 -1
- package/dist/web-components/viewer/Annotations-reaO1ILe.mjs +2 -0
- package/dist/web-components/viewer/{Canvas2DBackend-DPDF0a8D.mjs → Canvas2DBackend-Dru1ImJh.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-3OlEaKmX.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-D7b9t6bm.mjs → ChaptersMenu-kchuXDZy.mjs} +1 -1
- package/dist/web-components/viewer/{ChoiceMenu-f2774ZaY.mjs → ChoiceMenu-C8pEoSC6.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-D1E6A8es.mjs → Collection-B4LN_80C.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-BLeqNIOf.mjs → Connected-80hCJuhg.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DfqFYcTn.mjs → Connected-CzPY2rgu.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DvmP8OGy.mjs → Contents-D4jw_lGe.mjs} +1 -1
- package/dist/web-components/viewer/ControlMenu-C3Jh10iR.mjs +1 -0
- package/dist/web-components/viewer/ControlsFade-BKkJ95B5.mjs +1 -0
- package/dist/web-components/viewer/CountMenu-Blz1oHgs.mjs +1 -0
- package/dist/web-components/viewer/Cue-BnC9XuZp.mjs +1 -0
- package/dist/web-components/viewer/Document-BG0F97nL.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-CD56oMcR.mjs → DomLayers-BL6vNcmI.mjs} +1 -1
- package/dist/web-components/viewer/{Download-DAOzY3Nu.mjs → Download-B0BD_SzR.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-0A0uyEwC.mjs → EntryBodies-Cbmr-Eg4.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-fBaBZJGd.mjs → EntryThumbnail-DAdEyIuL.mjs} +1 -1
- package/dist/web-components/viewer/FieldPill-DNL96sDW.mjs +1 -0
- package/dist/web-components/viewer/{FrameAnimation-kba5V4Vk.mjs → FrameAnimation-BO3QVSUw.mjs} +1 -1
- package/dist/web-components/viewer/Gallery-DN7ajF4i.mjs +1 -0
- package/dist/web-components/viewer/GlobeGlyph-B-Wd0AkW.mjs +1 -0
- package/dist/web-components/viewer/{HideToggle-D8c_7URN.mjs → HideToggle-DH0u1wFC.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-C_C0LSj7.mjs → ImageControls-Lz-ESk1X.mjs} +1 -1
- package/dist/web-components/viewer/LanguageChoice-BkQkSsPE.mjs +1 -0
- package/dist/web-components/viewer/LanguageMenu-gIJHQiBc.mjs +1 -0
- package/dist/web-components/viewer/LightboxView-D066VR5m.mjs +1 -0
- package/dist/web-components/viewer/{ListEnd-B2hnHrcl.mjs → ListEnd-D4nNouKZ.mjs} +1 -1
- package/dist/web-components/viewer/{MapView-Cr3RiB1K.mjs → MapView-C_8iciAK.mjs} +3 -3
- package/dist/web-components/viewer/{MediaBody-4ZFKNnr3.mjs → MediaBody-BgBDbfHg.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-xjpo27Vw.mjs → MediaBody-D4hiLqhm.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-Dz5eW2XY.mjs → NavDate-BMVT6UwB.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-DNZcaADs.mjs → Navigator-DbBBbDZn.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-D771pC5E.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-2H7jd6PS.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BHpVLJOn.mjs → PartOfManifest-BMaH_tsn.mjs} +1 -1
- package/dist/web-components/viewer/PlaceBox-OytRM9_s.mjs +1 -0
- package/dist/web-components/viewer/{Placeholder-CLITKdu6.mjs → Placeholder-BWuq47Sw.mjs} +1 -1
- package/dist/web-components/viewer/Search-Bmz7mUbA.mjs +1 -0
- package/dist/web-components/viewer/{SeekMarks-B8cuyVgz.mjs → SeekMarks-CAsMUj2N.mjs} +1 -1
- package/dist/web-components/viewer/{StandaloneItems-Cu0aBqAo.mjs → StandaloneItems-BCHhR9sF.mjs} +1 -1
- package/dist/web-components/viewer/{Steps-DqszSHcR.mjs → Steps-BDT2W9QN.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-DN8ebfbK.mjs → TargetItems-CkZbD8GE.mjs} +1 -1
- package/dist/web-components/viewer/Transcript-BbFXEJSc.mjs +1 -0
- package/dist/web-components/viewer/Transport-CI5UkA3K.mjs +1 -0
- package/dist/web-components/viewer/Transport-PgBpf33S.mjs +1 -0
- package/dist/web-components/viewer/{annotation-collection-Drwfws4R.mjs → annotation-collection-l4zuf56A.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-Bp2GHdpi.mjs → annotation-name-CRl0w7NR.mjs} +1 -1
- package/dist/web-components/viewer/annotations-content-CYjPRTZn.mjs +1 -0
- package/dist/web-components/viewer/{cloverEngine-BmUppb5Y.mjs → cloverEngine-2b_guC4P.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-B9u1vc3t.mjs → content-state-reader-Cm-rvusT.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-C9KwbQpA.mjs → dragToClose-DXXIWV62.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-gl9fyg7D.mjs → fetchManifest-DorkDXGC.mjs} +1 -1
- package/dist/web-components/viewer/{host-D3tVEhAD.mjs → host-DscGC2S0.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DSehEFmU.mjs → image-layers-CZ9-efD2.mjs} +1 -1
- package/dist/web-components/viewer/image-service-content-C60w8IZm.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-BYKFtAno.mjs → link-CysSctMX.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-CwPnVnIi.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-CEM4sQKi.mjs → range-regions-C7ZBtSyb.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-BiDrFLxn.mjs → renderers-D4wJiQYv.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-CzYUFJNg.mjs → save-file-uqsNOVPU.mjs} +1 -1
- package/dist/web-components/viewer/{search-Dr6AQ3Lb.mjs → search-CWuD5EZA.mjs} +1 -1
- package/dist/web-components/viewer/styles-BjjJM8OS.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-CP5m7oBd.mjs → useControlsVisibility-KTxa_3yJ.mjs} +1 -1
- package/dist/web-components/viewer/viewer-C3d_TgAI.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CDqR3lHn.mjs → vtt-DqtJ20x0.mjs} +1 -1
- package/dist/web-components/viewer-BoyWG64n.mjs +1 -0
- package/dist/web-components/{vtt-DHZRkZ_P.mjs → vtt-BNuRzGap.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-DgBOPS3N.mjs +0 -1
- package/dist/web-components/AnnotationItems-CBEb7Cew.mjs +0 -1
- package/dist/web-components/AnnotationMenu-DiQyu45i.mjs +0 -1
- package/dist/web-components/AnnotationState-DemGGP7N.mjs +0 -1
- package/dist/web-components/Annotations-CDVyd69_.mjs +0 -2
- package/dist/web-components/CanvasView-DeM04pm-.mjs +0 -2
- package/dist/web-components/ControlMenu-CJtszzgx.mjs +0 -1
- package/dist/web-components/ControlsFade-Pye8AyCz.mjs +0 -1
- package/dist/web-components/CountMenu-3-t8974M.mjs +0 -1
- package/dist/web-components/Cue-eTms5gbr.mjs +0 -1
- package/dist/web-components/Document-CkKoLQ51.mjs +0 -1
- package/dist/web-components/FieldPill-M9u0eLtz.mjs +0 -1
- package/dist/web-components/Gallery-mqXXjGtK.mjs +0 -1
- package/dist/web-components/Items-BoFm0Hlx.mjs +0 -1
- package/dist/web-components/Label-GTBsGDCC.mjs +0 -1
- package/dist/web-components/LanguageChoice-BEiskuVG.mjs +0 -1
- package/dist/web-components/LightboxView-Daz0RCee.mjs +0 -1
- package/dist/web-components/LoadedMap-D9Z3zl12.mjs +0 -1
- package/dist/web-components/MapView-CExlNO5E.mjs +0 -3
- package/dist/web-components/PagerLayout-l6UNSoQ1.mjs +0 -1
- package/dist/web-components/Panel-ikILE92M.mjs +0 -1
- package/dist/web-components/PanelPart-VPAwSoQZ.mjs +0 -1
- package/dist/web-components/PlaceBox-D73C--SU.mjs +0 -1
- package/dist/web-components/Primitives-CBRreXtS.mjs +0 -1
- package/dist/web-components/Provider-HPVBNZPr.mjs +0 -1
- package/dist/web-components/Root-BJwk-F1e.mjs +0 -1
- package/dist/web-components/Scene-DC7ofvsK.mjs +0 -1
- package/dist/web-components/SceneView-C53yZtMZ.mjs +0 -1
- package/dist/web-components/Search-Cd0xLU3y.mjs +0 -1
- package/dist/web-components/Sections-Cf3JDxnz.mjs +0 -2
- package/dist/web-components/StandaloneItems-DEchYe7Y.mjs +0 -1
- package/dist/web-components/Timeline--uq4-_TD.mjs +0 -1
- package/dist/web-components/Transcript-Dex719tP.mjs +0 -1
- package/dist/web-components/Transport-BV0Rg5Ym.mjs +0 -1
- package/dist/web-components/Transport-CHkvmPbN.mjs +0 -1
- package/dist/web-components/downloads-CFz0RnMz.mjs +0 -1
- package/dist/web-components/hooks-uer3ZRx7.mjs +0 -1
- package/dist/web-components/index-BkADsP3U.mjs +0 -1
- package/dist/web-components/items-BWG13qDG.mjs +0 -1
- package/dist/web-components/items-SD92pRMN.mjs +0 -1
- package/dist/web-components/label-Bw9SwLh8.mjs +0 -1
- package/dist/web-components/layout-DrVnUBcm.mjs +0 -1
- package/dist/web-components/logo-Dzr2M4F7.mjs +0 -1
- package/dist/web-components/part-dr-d1XPo.mjs +0 -1
- package/dist/web-components/pointer-IZcH8rZy.mjs +0 -1
- package/dist/web-components/readingLanguages-Bd4MD2DP.mjs +0 -1
- package/dist/web-components/rendererSurface-Ox625xUL.mjs +0 -22
- package/dist/web-components/resource-DmK-8hJ-.mjs +0 -1
- package/dist/web-components/shared-BmkV0s_d.mjs +0 -1
- package/dist/web-components/styles-On1ck1Ob.mjs +0 -1
- package/dist/web-components/useNearViewport-yyUYq47j.mjs +0 -1
- package/dist/web-components/useScrollTrack-CcFLYR4o.mjs +0 -1
- package/dist/web-components/viewer/AnnotationMenu-C-9tbH4G.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-CV4g-WUB.mjs +0 -1
- package/dist/web-components/viewer/Annotations-t1K8U5Kp.mjs +0 -2
- package/dist/web-components/viewer/CaptionDetails-xzvdqP5N.mjs +0 -1
- package/dist/web-components/viewer/ControlMenu-DIfN3xYJ.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-sckPhZ4x.mjs +0 -1
- package/dist/web-components/viewer/CountMenu-BQVCtVfu.mjs +0 -1
- package/dist/web-components/viewer/Cue-DQ8q-fgb.mjs +0 -1
- package/dist/web-components/viewer/Document-B-nJpfDh.mjs +0 -1
- package/dist/web-components/viewer/FieldPill-BQcDb4xM.mjs +0 -1
- package/dist/web-components/viewer/Gallery-_0dEBq2w.mjs +0 -1
- package/dist/web-components/viewer/LanguageChoice-0UWQ5V-y.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-Dnlf7m8l.mjs +0 -1
- package/dist/web-components/viewer/PagerLayout-PYWFPFSJ.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Bd0JqUwF.mjs +0 -1
- package/dist/web-components/viewer/PlaceBox-Bh9V3RLS.mjs +0 -1
- package/dist/web-components/viewer/Search-C0B5Jh9V.mjs +0 -1
- package/dist/web-components/viewer/Transcript-D3mKmdQY.mjs +0 -1
- package/dist/web-components/viewer/Transport-9f_lhebG.mjs +0 -1
- package/dist/web-components/viewer/Transport-BudReE7Y.mjs +0 -1
- package/dist/web-components/viewer/annotations-content-Ci-orrao.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CdgpMutd.mjs +0 -1
- package/dist/web-components/viewer/styles-DvZTMHkr.mjs +0 -1
- package/dist/web-components/viewer/viewer-DaG51iO3.mjs +0 -29
- package/dist/web-components/viewer-DeAUI9Fi.mjs +0 -1
package/dist/i18n/config.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { loaders } from "./locales/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { visitorLanguages, pageLanguage, scriptLanguage, baseLanguage, sameLanguage, readInterfaceLanguagesFrom } from "./languages.mjs";
|
|
4
4
|
import en from "./locales/en.json.mjs";
|
|
5
5
|
const CLOVER_I18N_NAMESPACE = "clover";
|
|
6
6
|
const resources = {
|
|
7
7
|
en: { [CLOVER_I18N_NAMESPACE]: { ...en } }
|
|
8
8
|
};
|
|
9
|
-
let
|
|
9
|
+
let configured = [];
|
|
10
|
+
let chosen;
|
|
11
|
+
let picked = [];
|
|
10
12
|
let fallbacks = [];
|
|
11
13
|
let version = 0;
|
|
12
14
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -15,9 +17,12 @@ function notify() {
|
|
|
15
17
|
listeners.forEach((listener) => listener());
|
|
16
18
|
}
|
|
17
19
|
function withBase(lng) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
return [lng, scriptLanguage(lng), baseLanguage(lng)].filter(
|
|
21
|
+
(tag) => !!tag
|
|
22
|
+
);
|
|
20
23
|
}
|
|
24
|
+
const has = (tag) => tag === "en" || ships(tag) || !!resources[tag];
|
|
25
|
+
const speaks = (lng) => withBase(lng).find(has);
|
|
21
26
|
const loading = /* @__PURE__ */ new Map();
|
|
22
27
|
const ships = (lng) => Object.prototype.hasOwnProperty.call(loaders, lng);
|
|
23
28
|
function load(lng) {
|
|
@@ -48,28 +53,87 @@ function loadFor(chain2) {
|
|
|
48
53
|
}
|
|
49
54
|
let chain = [];
|
|
50
55
|
let madeFrom = "";
|
|
56
|
+
let byDefault = "en";
|
|
57
|
+
function offered() {
|
|
58
|
+
const page = pageLanguage();
|
|
59
|
+
return [.../* @__PURE__ */ new Set([...configured, ...page ? [page] : []])];
|
|
60
|
+
}
|
|
51
61
|
function lookupChain() {
|
|
52
|
-
const from =
|
|
62
|
+
const from = `${version} ${typeof document < "u" ? document.documentElement.lang : ""} ${typeof navigator < "u" ? navigator.languages : ""}`;
|
|
53
63
|
if (from === madeFrom) return chain;
|
|
54
64
|
madeFrom = from;
|
|
55
|
-
const
|
|
65
|
+
const set = offered();
|
|
66
|
+
const visitor = visitorLanguages().map(speaks).find(Boolean);
|
|
67
|
+
byDefault = visitor ?? set.map(speaks).find(Boolean) ?? "en";
|
|
56
68
|
chain = [
|
|
57
|
-
...new Set(
|
|
69
|
+
...new Set(
|
|
70
|
+
[chosen ?? byDefault, ...fallbacks, ...set].filter((tag) => !!tag).flatMap(withBase).concat("en")
|
|
71
|
+
)
|
|
58
72
|
];
|
|
59
73
|
void loadFor(chain);
|
|
60
74
|
return chain;
|
|
61
75
|
}
|
|
76
|
+
function offeredLanguages() {
|
|
77
|
+
lookupChain();
|
|
78
|
+
return [
|
|
79
|
+
...new Set(
|
|
80
|
+
[byDefault, ...offered().map(speaks), ...picked.map(speaks)].filter(
|
|
81
|
+
(tag) => !!tag
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
readInterfaceLanguagesFrom(() => {
|
|
87
|
+
lookupChain();
|
|
88
|
+
return [chosen, byDefault, ...offered()];
|
|
89
|
+
});
|
|
62
90
|
function langWithin(lang, hostLanguage) {
|
|
63
91
|
if (!lang) return void 0;
|
|
64
92
|
return sameLanguage(lang, hostLanguage || cloverI18n.resolvedLanguage) ? void 0 : lang;
|
|
65
93
|
}
|
|
66
94
|
const cloverI18n = {
|
|
67
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Clover's interface language: the one the visitor chose, else the first of the chain
|
|
97
|
+
* whose strings have loaded.
|
|
98
|
+
*/
|
|
68
99
|
get language() {
|
|
69
|
-
return
|
|
100
|
+
return chosen ?? lookupChain().find((lng) => resources[lng]) ?? "en";
|
|
101
|
+
},
|
|
102
|
+
/** The interface language the visitor chose, if they chose one. */
|
|
103
|
+
get chosenLanguage() {
|
|
104
|
+
return chosen;
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* The tag Clover has strings for that speaks `lng` (`zh-Hans` for `zh-CN`, `en` for
|
|
108
|
+
* `en-US`), shipped or given by the page; none where it has no strings for it.
|
|
109
|
+
*/
|
|
110
|
+
stringsFor(lng) {
|
|
111
|
+
return speaks(lng);
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* The interface languages to offer, and the one in use (`chosen`): the default (the
|
|
115
|
+
* visitor's, where Clover has strings for it), then the languages configured, each as
|
|
116
|
+
* the tag Clover has strings for. A choice is worth offering only where there are two
|
|
117
|
+
* or more.
|
|
118
|
+
*/
|
|
119
|
+
interfaceLanguages() {
|
|
120
|
+
const languages = offeredLanguages();
|
|
121
|
+
return { languages, chosen: chosen && speaks(chosen) || byDefault };
|
|
70
122
|
},
|
|
71
123
|
/**
|
|
72
|
-
*
|
|
124
|
+
* Speak `lng` whatever the visitor's languages, as their choice of interface language;
|
|
125
|
+
* none goes back to the default. Settles once its strings have loaded, or failed to.
|
|
126
|
+
*
|
|
127
|
+
* await cloverI18n.chooseInterfaceLanguage("fr");
|
|
128
|
+
*/
|
|
129
|
+
chooseInterfaceLanguage(lng) {
|
|
130
|
+
chosen = lng || void 0;
|
|
131
|
+
picked = chosen ? [.../* @__PURE__ */ new Set([...picked, chosen])] : [];
|
|
132
|
+
notify();
|
|
133
|
+
return loadFor(lookupChain());
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* The language Clover's interface strings are in: the first of the lookup chain that has any. A
|
|
73
137
|
* language set with no strings of its own resolves to the next, English at the last.
|
|
74
138
|
*/
|
|
75
139
|
get resolvedLanguage() {
|
|
@@ -80,9 +144,9 @@ const cloverI18n = {
|
|
|
80
144
|
}
|
|
81
145
|
) ?? "en";
|
|
82
146
|
},
|
|
147
|
+
/** As `chooseInterfaceLanguage` does: i18next's name for it. */
|
|
83
148
|
changeLanguage(lng) {
|
|
84
|
-
|
|
85
|
-
notify();
|
|
149
|
+
return cloverI18n.chooseInterfaceLanguage(lng);
|
|
86
150
|
},
|
|
87
151
|
/** A string and the language it came from, which a missing key leaves in another. */
|
|
88
152
|
resolve(key, values, namespace = CLOVER_I18N_NAMESPACE) {
|
|
@@ -123,7 +187,7 @@ const cloverI18n = {
|
|
|
123
187
|
* Settles once the language Clover speaks has loaded, or failed to: for a server render,
|
|
124
188
|
* or a test, that needs the strings in place before it draws.
|
|
125
189
|
*
|
|
126
|
-
* await initCloverI18n({
|
|
190
|
+
* await initCloverI18n({ languages: ["fr"] }).ready();
|
|
127
191
|
*/
|
|
128
192
|
ready() {
|
|
129
193
|
return loadFor(lookupChain());
|
|
@@ -153,7 +217,17 @@ function initCloverI18n(options = {}) {
|
|
|
153
217
|
if (options.fallbackLng !== void 0) {
|
|
154
218
|
fallbacks = options.fallbackLng === false ? [] : [options.fallbackLng].flat();
|
|
155
219
|
}
|
|
156
|
-
|
|
220
|
+
const before = configured.join();
|
|
221
|
+
if (options.languages !== void 0) {
|
|
222
|
+
configured = [options.languages].flat().filter(Boolean);
|
|
223
|
+
} else if (options.lng) {
|
|
224
|
+
configured = [options.lng];
|
|
225
|
+
}
|
|
226
|
+
if (configured.join() !== before) {
|
|
227
|
+
picked = [];
|
|
228
|
+
const kept = [...visitorLanguages(), ...offered()].map(speaks);
|
|
229
|
+
if (chosen && !kept.includes(speaks(chosen))) chosen = void 0;
|
|
230
|
+
}
|
|
157
231
|
notify();
|
|
158
232
|
return cloverI18n;
|
|
159
233
|
}
|
package/dist/i18n/direction.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const RTL_LANGUAGE = /^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi)$/;
|
|
2
|
+
const RTL_LANGUAGE = /^(ar|arc|ckb|dv|fa|he|iw|ks|ps|sd|syr|ug|ur|yi|ota|prs|azb|pnb|bal|glk|mzn|lrc|khw|nqo|rhg|jrb|jpr|sam|arz|ary|apc|acm|ajp|aeb|ars)$/;
|
|
3
3
|
const RTL_SCRIPT = /^(adlm|arab|hebr|nkoo|rohg|syrc|thaa)$/;
|
|
4
4
|
function directionOf(lang) {
|
|
5
5
|
if (!lang) return void 0;
|
|
6
6
|
const [primary, ...subtags] = lang.toLowerCase().split(/[-_]/);
|
|
7
|
-
const script = subtags.find((subtag) => subtag
|
|
7
|
+
const script = subtags.find((subtag) => /^[a-z]{4}$/.test(subtag));
|
|
8
8
|
return (script ? RTL_SCRIPT.test(script) : RTL_LANGUAGE.test(primary)) ? "rtl" : void 0;
|
|
9
9
|
}
|
|
10
10
|
function languageProps(lang) {
|
package/dist/i18n/languages.mjs
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
function visitorLanguages() {
|
|
3
|
+
if (typeof navigator === "undefined") return [];
|
|
4
|
+
return [...navigator.languages ?? [], navigator.language].filter(Boolean);
|
|
5
|
+
}
|
|
6
|
+
function pageLanguage() {
|
|
7
|
+
if (typeof document === "undefined") return void 0;
|
|
8
|
+
return document.documentElement.lang || void 0;
|
|
9
|
+
}
|
|
10
|
+
let interfaceLanguages = () => [];
|
|
11
|
+
function readInterfaceLanguagesFrom(source) {
|
|
12
|
+
interfaceLanguages = source;
|
|
13
|
+
}
|
|
2
14
|
function readerLanguages() {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
const [chosen, ...rest] = interfaceLanguages();
|
|
16
|
+
return [
|
|
17
|
+
...new Set(
|
|
18
|
+
[chosen, ...visitorLanguages(), ...rest, pageLanguage()].filter(
|
|
19
|
+
(tag) => !!tag
|
|
20
|
+
)
|
|
21
|
+
)
|
|
22
|
+
];
|
|
10
23
|
}
|
|
11
24
|
const baseLanguage = (tag) => tag.split("-")[0];
|
|
12
25
|
function sameLanguage(a, b) {
|
|
13
26
|
return baseLanguage(a).toLowerCase() === baseLanguage(b).toLowerCase();
|
|
14
27
|
}
|
|
28
|
+
function scriptLanguage(tag) {
|
|
29
|
+
try {
|
|
30
|
+
const { language, script } = new Intl.Locale(tag).maximize();
|
|
31
|
+
return script && `${language}-${script}`;
|
|
32
|
+
} catch {
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function sameScript(tag, tags) {
|
|
37
|
+
const script = scriptLanguage(tag);
|
|
38
|
+
if (!script) return void 0;
|
|
39
|
+
return tags.find(
|
|
40
|
+
(each) => each !== "none" && each !== "@none" && scriptLanguage(each) === script
|
|
41
|
+
);
|
|
42
|
+
}
|
|
15
43
|
const baseOf = (tag) => tag.includes("-") ? baseLanguage(tag) : null;
|
|
16
44
|
function closestLanguage(language, tags, fallbacks = []) {
|
|
17
45
|
if (!tags.length) return void 0;
|
|
@@ -21,6 +49,8 @@ function closestLanguage(language, tags, fallbacks = []) {
|
|
|
21
49
|
if (tags.includes(language)) return language;
|
|
22
50
|
const base = baseOf(language);
|
|
23
51
|
if (base && tags.includes(base)) return base;
|
|
52
|
+
const script = sameScript(language, tags);
|
|
53
|
+
if (script) return script;
|
|
24
54
|
const fallback = fallbacks.find((tag) => tags.includes(tag));
|
|
25
55
|
if (fallback) return fallback;
|
|
26
56
|
const regional = tags.findIndex((tag) => baseOf(tag) === language);
|
|
@@ -39,6 +69,10 @@ export {
|
|
|
39
69
|
baseLanguage,
|
|
40
70
|
closestLanguage,
|
|
41
71
|
languageToRead,
|
|
72
|
+
pageLanguage,
|
|
73
|
+
readInterfaceLanguagesFrom,
|
|
42
74
|
readerLanguages,
|
|
43
|
-
sameLanguage
|
|
75
|
+
sameLanguage,
|
|
76
|
+
scriptLanguage,
|
|
77
|
+
visitorLanguages
|
|
44
78
|
};
|
|
@@ -3,10 +3,13 @@ const loaders = {
|
|
|
3
3
|
es: () => import("./es.json.mjs"),
|
|
4
4
|
fi: () => import("./fi.json.mjs"),
|
|
5
5
|
fr: () => import("./fr.json.mjs"),
|
|
6
|
+
ja: () => import("./ja.json.mjs"),
|
|
6
7
|
nb: () => import("./nb.json.mjs"),
|
|
7
8
|
nn: () => import("./nn.json.mjs"),
|
|
8
9
|
no: () => import("./no.json.mjs"),
|
|
9
|
-
pt: () => import("./pt.json.mjs")
|
|
10
|
+
pt: () => import("./pt.json.mjs"),
|
|
11
|
+
"zh-Hans": () => import("./zh-Hans.json.mjs"),
|
|
12
|
+
"zh-Hant": () => import("./zh-Hant.json.mjs")
|
|
10
13
|
};
|
|
11
14
|
export {
|
|
12
15
|
loaders
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const ja = JSON.parse('{"commonClose":"閉じる","commonNext":"次へ","commonPrevious":"前へ","commonSearch":"検索","commonViewAll":"すべて表示","controlShortcut":"{{label}}({{shortcut}})","contentSearchLoading":"読み込み中…","contentSearchPlaceholder":"検索","contentSearchResultsNone":"結果はありません","contentSearchResult":"1 件の結果","contentSearchResults":"{{count}} 件の結果","contentSearchError":"検索を完了できませんでした。","contentSearchPosition":"{{total}} 件中 {{index}} 件目の結果","contentSearchClear":"検索をクリア","canvasPosition":"{{total}} 件中 {{index}} 件目","canvasImage":"画像","bodyUnloadableImage":"この画像を読み込めませんでした。","bodyUnloadableVideo":"この動画を読み込めませんでした。","bodyUnloadableAudio":"この音声を読み込めませんでした。","bodyUnloadableModel":"このモデルを読み込めませんでした。","canvasRoleDescription":"ズームできる画像","canvasKeysImage":"矢印キーで移動(Shift で大きく移動)、プラスとマイナスでズーム、0 で表示をリセット、R または Shift+R で回転します。","canvasKeysMedia":"Space または K で再生・一時停止、J または L で 10 秒戻る・進む、M でミュート・ミュート解除します。","canvasKeysAnnotations":"Escape キーで選択した注釈を解除します。","sceneModel":"3D モデル","sceneRoleDescription":"回転できる 3D モデル","sceneKeys":"矢印キーでモデルを回転(Shift で大きく回転)、プラスとマイナスでズーム、0 で表示をリセット、R または Shift+R で右または左に回転します。","sceneRotateUp":"上に回転","sceneRotateDown":"下に回転","sceneRotate":"回転","sceneResetView":"表示をリセット","statusLoading":"読み込み中…","statusError":"読み込めませんでした。","itemsLabel":"アイテム","download":"ダウンロード","downloadPage":"このページ","downloadAll":"すべてのページ","templateSidebar":"アイテム","templateSidebarToggle":"アイテムを表示","templateBack":"戻る","templateBackTo":"{{label}} に戻る","collectionLabel":"コレクション","itemsScrollBack":"前のアイテムを表示","itemsScrollForward":"さらにアイテムを表示","aboutRights":"権利","aboutDate":"日付","aboutHomepage":"ホームページ","aboutSeeAlso":"関連情報","aboutProvider":"提供者","logo":"ロゴ","aboutManifest":"IIIF マニフェスト","aboutCanvas":"IIIF キャンバス","aboutPartOf":"所属先","aboutOpenManifest":"マニフェスト全体を開く","aboutCollection":"IIIF コレクション","readingLanguage":"言語","annotationsHide":"注釈を非表示","annotationsHideTip":"非表示","readMore":"続きを読む","readLess":"折りたたむ","annotationsShow":"画像上で探す","annotationsShowTime":"録音内で探す","annotationsImage":"画像","annotationsLanguage":"言語","annotationsOpenLink":"リンクを開く","transcriptLabel":"文字起こし","imageViewerOpen":"画像ビューアを開く","imageViewerClose":"画像ビューアを閉じる","canvasChoice":"選択肢","canvasViewerControls":"ビューアのコントロール","canvasExpandControls":"ビューアのコントロールを展開","canvasCollapseControls":"ビューアのコントロールを折りたたむ","canvasScrollBack":"前のコントロールを表示","canvasScrollForward":"さらにコントロールを表示","imageFullScreen":"全画面表示","imageExitFullScreen":"全画面表示を終了","imageResetZoom":"ズームをリセット","imageRotateLeft":"左に回転","imageRotateRight":"右に回転","imageZoomIn":"拡大","imageZoomOut":"縮小","informationPanelTabs":"情報パネル","sectionsScrollBack":"前のタブを表示","sectionsScrollForward":"さらにタブを表示","informationPanelClose":"情報パネルを閉じる","informationPanelTabsAbout":"概要","informationPanelTabsAnnotations":"注釈","informationPanelTabsSearch":"検索","informationPanelTabsContents":"目次","contentsSectionsIn":"下位セクション:","informationPanelTabsMap":"地図","informationPanelTabsCollection":"コレクション","informationPanelTabsTargets":"ビュー","mapUnavailable":"地図を表示できませんでした。","mapLabel":"地図","mapAttribution":"地図のクレジット","mapPlaceUntitled":"場所 {{number}}","mapOverlay":"ジオリファレンス画像","mapPlacesListed":"地図の後に一覧表示される場所:{{count}} 件","informationPanelToggle":"詳細情報","playerPlay":"再生","playerPause":"一時停止","playerMute":"ミュート","playerUnmute":"ミュート解除","playerVolume":"音量","playerSeek":"再生位置","playerCaptions":"字幕","playerCaptionsOff":"オフ","playerChapters":"チャプター","playerFill":"枠いっぱいに表示","playerFit":"枠に収める","frameRepeat":"繰り返し","playerCurrentTime":"経過時間","playerDuration":"再生時間","splitHandle":"パネルのサイズを変更"}');
|
|
3
|
+
export {
|
|
4
|
+
ja as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const zhHans = JSON.parse('{"commonClose":"关闭","commonNext":"下一个","commonPrevious":"上一个","commonSearch":"搜索","commonViewAll":"查看全部","controlShortcut":"{{label}}({{shortcut}})","contentSearchLoading":"正在加载…","contentSearchPlaceholder":"搜索","contentSearchResultsNone":"无结果","contentSearchResult":"1 个结果","contentSearchResults":"{{count}} 个结果","contentSearchError":"无法完成搜索。","contentSearchPosition":"第 {{index}} 个结果,共 {{total}} 个","contentSearchClear":"清除搜索","canvasPosition":"第 {{index}} 项,共 {{total}} 项","canvasImage":"图像","bodyUnloadableImage":"无法加载此图像。","bodyUnloadableVideo":"无法加载此视频。","bodyUnloadableAudio":"无法加载此音频。","bodyUnloadableModel":"无法加载此模型。","canvasRoleDescription":"可缩放图像","canvasKeysImage":"使用方向键平移(按住 Shift 可大步移动),按加号和减号缩放,按 0 重置视图,按 R 或 Shift+R 旋转。","canvasKeysMedia":"按空格键或 K 播放或暂停,按 J 或 L 后退或前进十秒,按 M 静音或取消静音。","canvasKeysAnnotations":"按 Esc 键清除所选注释。","sceneModel":"3D 模型","sceneRoleDescription":"可旋转 3D 模型","sceneKeys":"使用方向键旋转模型(按住 Shift 可大步旋转),按加号和减号缩放,按 0 重置视图,按 R 或 Shift+R 向右或向左旋转。","sceneRotateUp":"向上旋转","sceneRotateDown":"向下旋转","sceneRotate":"旋转","sceneResetView":"重置视图","statusLoading":"正在加载…","statusError":"无法加载。","itemsLabel":"项目","download":"下载","downloadPage":"本页","downloadAll":"所有页面","templateSidebar":"项目","templateSidebarToggle":"显示项目","templateBack":"返回","templateBackTo":"返回{{label}}","collectionLabel":"集合","itemsScrollBack":"显示上一组项目","itemsScrollForward":"显示更多项目","aboutRights":"权利","aboutDate":"日期","aboutHomepage":"主页","aboutSeeAlso":"另见","aboutProvider":"提供者","logo":"标志","aboutManifest":"IIIF 清单","aboutCanvas":"IIIF 画布","aboutPartOf":"所属","aboutOpenManifest":"打开完整清单","aboutCollection":"IIIF 集合","readingLanguage":"语言","annotationsHide":"隐藏注释","annotationsHideTip":"隐藏","readMore":"展开","readLess":"收起","annotationsShow":"在图像上查找","annotationsShowTime":"在录音中查找","annotationsImage":"图像","annotationsLanguage":"语言","annotationsOpenLink":"打开链接","transcriptLabel":"文字记录","imageViewerOpen":"打开图像查看器","imageViewerClose":"关闭图像查看器","canvasChoice":"选项","canvasViewerControls":"查看器控件","canvasExpandControls":"展开查看器控件","canvasCollapseControls":"收起查看器控件","canvasScrollBack":"显示上一组控件","canvasScrollForward":"显示更多控件","imageFullScreen":"全屏","imageExitFullScreen":"退出全屏","imageResetZoom":"重置缩放","imageRotateLeft":"向左旋转","imageRotateRight":"向右旋转","imageZoomIn":"放大","imageZoomOut":"缩小","informationPanelTabs":"信息面板","sectionsScrollBack":"显示上一组标签页","sectionsScrollForward":"显示更多标签页","informationPanelClose":"关闭信息面板","informationPanelTabsAbout":"简介","informationPanelTabsAnnotations":"注释","informationPanelTabsSearch":"搜索","informationPanelTabsContents":"目录","contentsSectionsIn":"下级章节:","informationPanelTabsMap":"地图","informationPanelTabsCollection":"集合","informationPanelTabsTargets":"视图","mapUnavailable":"无法显示地图。","mapLabel":"地图","mapAttribution":"地图来源","mapPlaceUntitled":"地点 {{number}}","mapOverlay":"地理配准图像","mapPlacesListed":"地图后列出的地点:{{count}} 个","informationPanelToggle":"更多信息","playerPlay":"播放","playerPause":"暂停","playerMute":"静音","playerUnmute":"取消静音","playerVolume":"音量","playerSeek":"播放进度","playerCaptions":"字幕","playerCaptionsOff":"关闭","playerChapters":"章节","playerFill":"填满画面","playerFit":"适应画面","frameRepeat":"重复","playerCurrentTime":"当前时间","playerDuration":"时长","splitHandle":"调整面板大小"}');
|
|
3
|
+
export {
|
|
4
|
+
zhHans as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const zhHant = JSON.parse('{"commonClose":"關閉","commonNext":"下一個","commonPrevious":"上一個","commonSearch":"搜尋","commonViewAll":"檢視全部","controlShortcut":"{{label}}({{shortcut}})","contentSearchLoading":"載入中…","contentSearchPlaceholder":"搜尋","contentSearchResultsNone":"沒有結果","contentSearchResult":"1 筆結果","contentSearchResults":"{{count}} 筆結果","contentSearchError":"無法完成搜尋。","contentSearchPosition":"第 {{index}} 筆結果,共 {{total}} 筆","contentSearchClear":"清除搜尋","canvasPosition":"第 {{index}} 項,共 {{total}} 項","canvasImage":"影像","bodyUnloadableImage":"無法載入此影像。","bodyUnloadableVideo":"無法載入此影片。","bodyUnloadableAudio":"無法載入此音訊。","bodyUnloadableModel":"無法載入此模型。","canvasRoleDescription":"可縮放影像","canvasKeysImage":"使用方向鍵平移(按住 Shift 可大幅移動),按加號和減號縮放,按 0 重設檢視,按 R 或 Shift+R 旋轉。","canvasKeysMedia":"按空白鍵或 K 播放或暫停,按 J 或 L 倒轉或快轉十秒,按 M 靜音或取消靜音。","canvasKeysAnnotations":"按 Esc 鍵清除所選註解。","sceneModel":"3D 模型","sceneRoleDescription":"可旋轉 3D 模型","sceneKeys":"使用方向鍵旋轉模型(按住 Shift 可大幅旋轉),按加號和減號縮放,按 0 重設檢視,按 R 或 Shift+R 向右或向左旋轉。","sceneRotateUp":"向上旋轉","sceneRotateDown":"向下旋轉","sceneRotate":"旋轉","sceneResetView":"重設檢視","statusLoading":"載入中…","statusError":"無法載入。","itemsLabel":"項目","download":"下載","downloadPage":"本頁","downloadAll":"所有頁面","templateSidebar":"項目","templateSidebarToggle":"顯示項目","templateBack":"返回","templateBackTo":"返回{{label}}","collectionLabel":"集合","itemsScrollBack":"顯示上一組項目","itemsScrollForward":"顯示更多項目","aboutRights":"權利","aboutDate":"日期","aboutHomepage":"首頁","aboutSeeAlso":"另見","aboutProvider":"提供者","logo":"標誌","aboutManifest":"IIIF 清單","aboutCanvas":"IIIF 畫布","aboutPartOf":"所屬","aboutOpenManifest":"開啟完整清單","aboutCollection":"IIIF 集合","readingLanguage":"語言","annotationsHide":"隱藏註解","annotationsHideTip":"隱藏","readMore":"展開","readLess":"收合","annotationsShow":"在影像上尋找","annotationsShowTime":"在錄音中尋找","annotationsImage":"影像","annotationsLanguage":"語言","annotationsOpenLink":"開啟連結","transcriptLabel":"逐字稿","imageViewerOpen":"開啟影像檢視器","imageViewerClose":"關閉影像檢視器","canvasChoice":"選項","canvasViewerControls":"檢視器控制項","canvasExpandControls":"展開檢視器控制項","canvasCollapseControls":"收合檢視器控制項","canvasScrollBack":"顯示上一組控制項","canvasScrollForward":"顯示更多控制項","imageFullScreen":"全螢幕","imageExitFullScreen":"結束全螢幕","imageResetZoom":"重設縮放","imageRotateLeft":"向左旋轉","imageRotateRight":"向右旋轉","imageZoomIn":"放大","imageZoomOut":"縮小","informationPanelTabs":"資訊面板","sectionsScrollBack":"顯示上一組分頁","sectionsScrollForward":"顯示更多分頁","informationPanelClose":"關閉資訊面板","informationPanelTabsAbout":"簡介","informationPanelTabsAnnotations":"註解","informationPanelTabsSearch":"搜尋","informationPanelTabsContents":"目錄","contentsSectionsIn":"下層章節:","informationPanelTabsMap":"地圖","informationPanelTabsCollection":"集合","informationPanelTabsTargets":"檢視","mapUnavailable":"無法顯示地圖。","mapLabel":"地圖","mapAttribution":"地圖來源","mapPlaceUntitled":"地點 {{number}}","mapOverlay":"地理對位影像","mapPlacesListed":"地圖後列出的地點:{{count}} 個","informationPanelToggle":"更多資訊","playerPlay":"播放","playerPause":"暫停","playerMute":"靜音","playerUnmute":"取消靜音","playerVolume":"音量","playerSeek":"播放進度","playerCaptions":"字幕","playerCaptionsOff":"關閉","playerChapters":"章節","playerFill":"填滿畫面","playerFit":"符合畫面","frameRepeat":"重複","playerCurrentTime":"目前時間","playerDuration":"長度","splitHandle":"調整面板大小"}');
|
|
3
|
+
export {
|
|
4
|
+
zhHant as default
|
|
5
|
+
};
|
package/dist/index.d.mts
CHANGED
|
@@ -307,8 +307,9 @@ export declare function buildContentState({ manifestId, canvasId, type, region,
|
|
|
307
307
|
* state (JSON or base64url). The resource may be a Manifest, a Collection (its first
|
|
308
308
|
* Manifest is shown), a lone Canvas (its `partOf` Manifest, or a Manifest made around
|
|
309
309
|
* it), or annotations, an AnnotationPage or AnnotationCollection (the Manifest their first
|
|
310
|
-
* annotation's Canvas is `partOf`, at that Canvas).
|
|
311
|
-
*
|
|
310
|
+
* annotation's Canvas is `partOf`, at that Canvas). It may also be a IIIF Image service,
|
|
311
|
+
* its `info.json` or its base URI, shown as the one image it is (`imageServiceContent`).
|
|
312
|
+
* Everything is fetched once, with the request settings, and upgraded to Presentation 4.
|
|
312
313
|
*/
|
|
313
314
|
export type IIIFContent = string | Record<string, unknown>;
|
|
314
315
|
/**
|
|
@@ -934,7 +935,7 @@ export type ControlButtonProps = {
|
|
|
934
935
|
"aria-label": string;
|
|
935
936
|
/**
|
|
936
937
|
* The language of the name, when it is not the page's: a Choice's own label, or one
|
|
937
|
-
* of Clover's strings in another language. Spread it with the rest (WCAG 3.1.2).
|
|
938
|
+
* of Clover's interface strings in another language. Spread it with the rest (WCAG 3.1.2).
|
|
938
939
|
*/
|
|
939
940
|
lang?: string;
|
|
940
941
|
/** The key the Canvas answers to for this control, when it has one. */
|
|
@@ -1012,6 +1013,11 @@ export interface CloverCanvasOptions {
|
|
|
1012
1013
|
maxZoomPixelRatio?: number;
|
|
1013
1014
|
/** Smallest zoom, as a fraction of the home zoom. Default 0.9. */
|
|
1014
1015
|
minZoomImageRatio?: number;
|
|
1016
|
+
/**
|
|
1017
|
+
* Whether home may enlarge the image past `maxZoomPixelRatio` to fill the box. False,
|
|
1018
|
+
* home stops at that zoom and centers the image, smaller than the box. Default true.
|
|
1019
|
+
*/
|
|
1020
|
+
upscale?: boolean;
|
|
1015
1021
|
/** Seconds for an animation to close most of its distance. 0 disables easing. */
|
|
1016
1022
|
animationTime?: number;
|
|
1017
1023
|
/**
|
|
@@ -1429,6 +1435,12 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
1429
1435
|
* under the one above it, still in reading order, left to right.
|
|
1430
1436
|
*/
|
|
1431
1437
|
layout?: ItemsLayout;
|
|
1438
|
+
/**
|
|
1439
|
+
* The slider's direction: a row (`horizontal`), or a column (`vertical`) that fills
|
|
1440
|
+
* the height of what holds it, as a filmstrip beside the Body, its pictures as wide as
|
|
1441
|
+
* the column. Default `"horizontal"`.
|
|
1442
|
+
*/
|
|
1443
|
+
orientation?: "horizontal" | "vertical";
|
|
1432
1444
|
/**
|
|
1433
1445
|
* The line under an item's label, where it has one (a Collection's members do): its
|
|
1434
1446
|
* `summary` (the default), its `navDate`, or `none`. Default `"summary"`.
|
|
@@ -1676,7 +1688,7 @@ export declare function usePanelSections(sections?: readonly PanelSection[]): Pa
|
|
|
1676
1688
|
/** How the sections are laid out. */
|
|
1677
1689
|
export type SectionsLayout = "tabs" | "accordion";
|
|
1678
1690
|
/**
|
|
1679
|
-
* What a page calls a section, in place of Clover's
|
|
1691
|
+
* What a page calls a section, in place of its word in Clover's interface language: its words, taken to
|
|
1680
1692
|
* be in the page's language, or its words by language tag, one of which the tab carries
|
|
1681
1693
|
* as its `lang` where it is not the page's (WCAG 3.1.2).
|
|
1682
1694
|
*/
|
|
@@ -1747,6 +1759,13 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
1747
1759
|
* leaves the choice out, and the Root reads in its `language`, else the reader's.
|
|
1748
1760
|
*/
|
|
1749
1761
|
languages?: boolean;
|
|
1762
|
+
/**
|
|
1763
|
+
* Whether About's language toggle also offers Clover's interface languages (its
|
|
1764
|
+
* control labels, section titles and announcements) that the resource has none of: the
|
|
1765
|
+
* visitor's and the site's, where they differ, one choice for the page. Default
|
|
1766
|
+
* `true`; `false` leaves them out, and Clover speaks the visitor's.
|
|
1767
|
+
*/
|
|
1768
|
+
interfaceLanguages?: boolean;
|
|
1750
1769
|
/**
|
|
1751
1770
|
* Which of the default sections the panel may have, in Clover's own order: with
|
|
1752
1771
|
* `["contents", "search"]` it has those two and no About. Each still shows only where
|
|
@@ -1755,7 +1774,7 @@ export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "def
|
|
|
1755
1774
|
*/
|
|
1756
1775
|
sections?: readonly PanelSection[];
|
|
1757
1776
|
/**
|
|
1758
|
-
* What a default section's tab or heading says, in place of Clover's
|
|
1777
|
+
* What a default section's tab or heading says, in place of its word in Clover's interface language:
|
|
1759
1778
|
* `{ annotations: "Chapters" }`, or `{ annotations: { en: "Chapters", de: "Kapitel" } }`
|
|
1760
1779
|
* to say it in several, read in the one Clover speaks and marked with its language
|
|
1761
1780
|
* where that is not the page's (WCAG 3.1.2). A `Tab` of your own says it in `label`.
|
|
@@ -1825,6 +1844,13 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1825
1844
|
* In a Panel, its heading offers them (the Panel's `languages`). Default `true`.
|
|
1826
1845
|
*/
|
|
1827
1846
|
languages?: boolean;
|
|
1847
|
+
/**
|
|
1848
|
+
* Alone, outside a Panel: whether its language toggle also offers Clover's interface
|
|
1849
|
+
* languages (its control labels, section titles and announcements) that the resource
|
|
1850
|
+
* has none of, the visitor's and the site's, where they differ. In a Panel, the Panel's
|
|
1851
|
+
* `interfaceLanguages`. Default `true`.
|
|
1852
|
+
*/
|
|
1853
|
+
interfaceLanguages?: boolean;
|
|
1828
1854
|
}
|
|
1829
1855
|
/**
|
|
1830
1856
|
* Everything the Manifest says about itself, in the order 3.x's About tab shows it:
|
|
@@ -1835,11 +1861,12 @@ export interface AboutProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1835
1861
|
* it. The downloads are Download's: the `rendering` of the page in view ("This page")
|
|
1836
1862
|
* and of the Manifest ("All pages").
|
|
1837
1863
|
*
|
|
1838
|
-
* Where what it says comes in several languages, the
|
|
1839
|
-
*
|
|
1840
|
-
* its heading, where
|
|
1864
|
+
* Where what it says comes in several languages, or the visitor's language differs from
|
|
1865
|
+
* the site's, the languages to read in, as one toggle (`LanguageToggle`): over what About
|
|
1866
|
+
* says, or, in a Panel's `about` section, beside its heading, where it shows whichever
|
|
1867
|
+
* section is open.
|
|
1841
1868
|
*/
|
|
1842
|
-
export declare function About({ languages, ...props }: AboutProps): React.JSX.Element;
|
|
1869
|
+
export declare function About({ languages, interfaceLanguages, ...props }: AboutProps): React.JSX.Element;
|
|
1843
1870
|
export interface AnnotationsProps extends React.HTMLAttributes<HTMLElement> {
|
|
1844
1871
|
/**
|
|
1845
1872
|
* Every annotation in the Manifest (default), as the Viewer's panel lists them: by
|
|
@@ -2433,7 +2460,7 @@ export declare function useLocalized(value: LanguageMapLike): LocalizedValue;
|
|
|
2433
2460
|
/** Clover's interface strings in the current language: `t("commonClose")`. */
|
|
2434
2461
|
export declare function useT(): (key: string, values?: Record<string, unknown>) => string;
|
|
2435
2462
|
/**
|
|
2436
|
-
* The language of one of Clover's strings where it is not the page's (a French reader on
|
|
2463
|
+
* The language of one of Clover's interface strings where it is not the page's (a French reader on
|
|
2437
2464
|
* an English page, or a key that fell back to English), for the element that shows it, or
|
|
2438
2465
|
* is named by it, to carry as `lang` (WCAG 3.1.2). Undefined otherwise: the string takes
|
|
2439
2466
|
* the page's language. The page's is the nearest `lang` around the Root.
|
|
@@ -2578,6 +2605,13 @@ export interface CloverContextValue {
|
|
|
2578
2605
|
* inside reads in it, until the Root is given another `language`.
|
|
2579
2606
|
*/
|
|
2580
2607
|
chooseLanguage?: (tag: string) => void;
|
|
2608
|
+
/**
|
|
2609
|
+
* Whether a language toggle of the Root's is drawn (About's, `LanguageToggle`), so the
|
|
2610
|
+
* parts that would offer their own (an annotation set's languages, a Transcript's
|
|
2611
|
+
* caption files) follow it instead; `drawsToggle` says one is, until its cleanup runs.
|
|
2612
|
+
*/
|
|
2613
|
+
toggleDrawn?: boolean;
|
|
2614
|
+
drawsToggle?: () => () => void;
|
|
2581
2615
|
/** Renderers of the host's own, for `Body` to draw some views with. */
|
|
2582
2616
|
renderers?: BodyRenderer[];
|
|
2583
2617
|
}
|
|
@@ -2718,7 +2752,8 @@ export declare function regionSource(canvas: Json | undefined, rect: {
|
|
|
2718
2752
|
h: number;
|
|
2719
2753
|
}, image?: string): ThumbnailSource | null;
|
|
2720
2754
|
/**
|
|
2721
|
-
* Clover's
|
|
2755
|
+
* Clover's interface language: the language of its control labels ("Zoom in"), section
|
|
2756
|
+
* titles ("About") and announcements ("Item 2 of 17"), without a translation library.
|
|
2722
2757
|
*
|
|
2723
2758
|
* Clover needs a key lookup with a fallback chain, `{{name}}` interpolation and language
|
|
2724
2759
|
* detection. i18next did that at about 20 kB gzipped across three packages;
|
|
@@ -2726,44 +2761,84 @@ export declare function regionSource(canvas: Json | undefined, rect: {
|
|
|
2726
2761
|
* them, so existing `initCloverI18n` calls keep working:
|
|
2727
2762
|
*
|
|
2728
2763
|
* initCloverI18n({
|
|
2729
|
-
*
|
|
2764
|
+
* languages: ["de"],
|
|
2730
2765
|
* fallbackLng: ["de", "en"],
|
|
2731
2766
|
* resources: { de: { clover: { informationPanelTabsAbout: "Über" } } },
|
|
2732
2767
|
* });
|
|
2733
2768
|
*
|
|
2769
|
+
* Which it speaks (Mat, 2026-11-05): the languages configured (`languages`, or `lng` for
|
|
2770
|
+
* one), then the page's `<html lang>` (Mat, 2026-11-05: derived, as the visitor's is),
|
|
2771
|
+
* else English; then the visitor's languages, from
|
|
2772
|
+
* the browser. The visitor's first that Clover has strings for is the default, else the
|
|
2773
|
+
* first configured; where the two differ, `interfaceLanguages()` offers both, and
|
|
2774
|
+
* `chooseInterfaceLanguage` takes the visitor's choice.
|
|
2775
|
+
*
|
|
2734
2776
|
* English ships with Clover. Each other language it ships loads the first time Clover is
|
|
2735
2777
|
* to speak it, so until it arrives a string shows in English, marked as English by
|
|
2736
|
-
* `langOf`, and the
|
|
2778
|
+
* `langOf`, and the parts re-render when it does. `cloverI18n.ready()` waits for it.
|
|
2737
2779
|
*/
|
|
2738
2780
|
export declare const CLOVER_I18N_NAMESPACE = "clover";
|
|
2739
2781
|
/** `resources[language][namespace][key]` — i18next's resource shape. */
|
|
2740
2782
|
export type CloverI18nResources = Record<string, Record<string, Record<string, string>>>;
|
|
2741
2783
|
export interface CloverI18nOptions {
|
|
2742
2784
|
/**
|
|
2743
|
-
* The
|
|
2744
|
-
*
|
|
2785
|
+
* The languages your site offers Clover's interface in, most preferred first. A
|
|
2786
|
+
* visitor whose own language Clover has strings for sees theirs, with these offered
|
|
2787
|
+
* beside it, with the page's `<html lang>`; any other visitor sees the first of these.
|
|
2788
|
+
* When not given, the page's
|
|
2789
|
+
* `<html lang>`, else English.
|
|
2745
2790
|
*/
|
|
2791
|
+
languages?: string | readonly string[];
|
|
2792
|
+
/** One language to offer, as `languages: [lng]` does. */
|
|
2746
2793
|
lng?: string;
|
|
2747
2794
|
/** Languages to try, in order, when a key is missing. English is always last. */
|
|
2748
2795
|
fallbackLng?: string | readonly string[] | false;
|
|
2749
2796
|
/** Strings to add or override, merged into what Clover ships. */
|
|
2750
2797
|
resources?: CloverI18nResources;
|
|
2751
2798
|
}
|
|
2752
|
-
/** One of Clover's strings, and the language it is written in. */
|
|
2799
|
+
/** One of Clover's interface strings, and the language it is written in. */
|
|
2753
2800
|
export interface CloverString {
|
|
2754
2801
|
text: string;
|
|
2755
2802
|
/** The language the string came from; undefined when no language has the key. */
|
|
2756
2803
|
lang?: string;
|
|
2757
2804
|
}
|
|
2758
2805
|
declare const cloverI18n: {
|
|
2759
|
-
/**
|
|
2806
|
+
/**
|
|
2807
|
+
* Clover's interface language: the one the visitor chose, else the first of the chain
|
|
2808
|
+
* whose strings have loaded.
|
|
2809
|
+
*/
|
|
2760
2810
|
readonly language: string;
|
|
2811
|
+
/** The interface language the visitor chose, if they chose one. */
|
|
2812
|
+
readonly chosenLanguage: string | undefined;
|
|
2813
|
+
/**
|
|
2814
|
+
* The tag Clover has strings for that speaks `lng` (`zh-Hans` for `zh-CN`, `en` for
|
|
2815
|
+
* `en-US`), shipped or given by the page; none where it has no strings for it.
|
|
2816
|
+
*/
|
|
2817
|
+
stringsFor(lng: string): string | undefined;
|
|
2818
|
+
/**
|
|
2819
|
+
* The interface languages to offer, and the one in use (`chosen`): the default (the
|
|
2820
|
+
* visitor's, where Clover has strings for it), then the languages configured, each as
|
|
2821
|
+
* the tag Clover has strings for. A choice is worth offering only where there are two
|
|
2822
|
+
* or more.
|
|
2823
|
+
*/
|
|
2824
|
+
interfaceLanguages(): {
|
|
2825
|
+
languages: string[];
|
|
2826
|
+
chosen: string;
|
|
2827
|
+
};
|
|
2761
2828
|
/**
|
|
2762
|
-
*
|
|
2829
|
+
* Speak `lng` whatever the visitor's languages, as their choice of interface language;
|
|
2830
|
+
* none goes back to the default. Settles once its strings have loaded, or failed to.
|
|
2831
|
+
*
|
|
2832
|
+
* await cloverI18n.chooseInterfaceLanguage("fr");
|
|
2833
|
+
*/
|
|
2834
|
+
chooseInterfaceLanguage(lng?: string): Promise<void>;
|
|
2835
|
+
/**
|
|
2836
|
+
* The language Clover's interface strings are in: the first of the lookup chain that has any. A
|
|
2763
2837
|
* language set with no strings of its own resolves to the next, English at the last.
|
|
2764
2838
|
*/
|
|
2765
2839
|
readonly resolvedLanguage: string;
|
|
2766
|
-
|
|
2840
|
+
/** As `chooseInterfaceLanguage` does: i18next's name for it. */
|
|
2841
|
+
changeLanguage(lng: string): Promise<void>;
|
|
2767
2842
|
/** A string and the language it came from, which a missing key leaves in another. */
|
|
2768
2843
|
resolve(key: string, values?: Record<string, unknown>, namespace?: string): CloverString;
|
|
2769
2844
|
t(key: string, values?: Record<string, unknown>, namespace?: string): string;
|
|
@@ -2778,7 +2853,7 @@ declare const cloverI18n: {
|
|
|
2778
2853
|
* Settles once the language Clover speaks has loaded, or failed to: for a server render,
|
|
2779
2854
|
* or a test, that needs the strings in place before it draws.
|
|
2780
2855
|
*
|
|
2781
|
-
* await initCloverI18n({
|
|
2856
|
+
* await initCloverI18n({ languages: ["fr"] }).ready();
|
|
2782
2857
|
*/
|
|
2783
2858
|
ready(): Promise<void>;
|
|
2784
2859
|
/** For `useSyncExternalStore`: re-render readers when the language or strings change. */
|
|
@@ -2787,8 +2862,11 @@ declare const cloverI18n: {
|
|
|
2787
2862
|
};
|
|
2788
2863
|
export type CloverI18n = typeof cloverI18n;
|
|
2789
2864
|
/**
|
|
2790
|
-
*
|
|
2791
|
-
* call
|
|
2865
|
+
* Configure Clover's interface language (`languages`, or `lng` for one) and add or
|
|
2866
|
+
* override strings. Safe to call more than once: each call merges its `resources` and
|
|
2867
|
+
* applies any `languages`, `lng` or `fallbackLng` it is given. A visitor whose language
|
|
2868
|
+
* Clover has strings for still sees theirs first, with yours offered beside it; to speak
|
|
2869
|
+
* one language whatever the visitor's, `chooseInterfaceLanguage`.
|
|
2792
2870
|
*/
|
|
2793
2871
|
export declare function initCloverI18n(options?: CloverI18nOptions): CloverI18n;
|
|
2794
2872
|
export type DefaultProps = Omit<RootProps, "children"> & {
|
|
@@ -2820,7 +2898,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2820
2898
|
*/
|
|
2821
2899
|
panelSections?: readonly PanelSection[];
|
|
2822
2900
|
/**
|
|
2823
|
-
* What a panel section's tab or heading says, in place of Clover's
|
|
2901
|
+
* What a panel section's tab or heading says, in place of its word in Clover's interface language:
|
|
2824
2902
|
* `{ annotations: "Chapters" }`, or a word by language tag to say it in several (the
|
|
2825
2903
|
* Panel's `labels`).
|
|
2826
2904
|
*/
|
|
@@ -2832,6 +2910,13 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2832
2910
|
* it says of itself comes in several (the Panel's `languages`). Default `true`.
|
|
2833
2911
|
*/
|
|
2834
2912
|
languages?: boolean;
|
|
2913
|
+
/**
|
|
2914
|
+
* Default, Document and Gallery: whether the panel's language toggle, beside its About
|
|
2915
|
+
* heading, also offers Clover's interface languages (its control labels, section
|
|
2916
|
+
* titles and announcements) that the resource has none of, the visitor's and the
|
|
2917
|
+
* site's, where they differ (the Panel's `interfaceLanguages`). Default `true`.
|
|
2918
|
+
*/
|
|
2919
|
+
interfaceLanguages?: boolean;
|
|
2835
2920
|
/** The thumbnails under the Body: a layout, or `false` for none. Default `slider`. */
|
|
2836
2921
|
items?: Exclude<ItemsLayout, "pager"> | false;
|
|
2837
2922
|
/**
|
|
@@ -2860,7 +2945,7 @@ export type DefaultProps = Omit<RootProps, "children"> & {
|
|
|
2860
2945
|
/** The Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
2861
2946
|
canvasOptions?: CloverCanvasOptions;
|
|
2862
2947
|
};
|
|
2863
|
-
declare function Default({ className, header, headingLevel, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, items, singleItem, storageKey, fill, collapseControls, canvasOptions, ...root }: DefaultProps): React.JSX.Element;
|
|
2948
|
+
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;
|
|
2864
2949
|
/**
|
|
2865
2950
|
* A layout the Viewer draws: one from `@nulib/clover/templates`, or a component of your
|
|
2866
2951
|
* own that takes the `Clover.Root` props.
|