@nulib/clover 4.6.0 → 4.6.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/dist/components/Canvas/CanvasView.mjs +18 -4
- package/dist/components/Canvas/Connected.mjs +1 -1
- package/dist/components/Canvas/LoadedCanvas.mjs +26 -6
- package/dist/components/Canvas/Placeholder.mjs +1 -1
- package/dist/components/Canvas/media/Player.mjs +2 -2
- package/dist/components/CollectionSelect/CollectionSelect.mjs +6 -4
- package/dist/components/Items/Items.mjs +2 -5
- package/dist/components/Items/Position.mjs +2 -5
- package/dist/components/Items/StandaloneItems.mjs +6 -0
- package/dist/components/Map/MapView.mjs +2 -8
- package/dist/components/Root/useRootState.mjs +15 -14
- package/dist/components/Scene/Loaded.mjs +5 -1
- package/dist/core/clover.mjs +38 -10
- package/dist/core/geo.mjs +5 -4
- package/dist/core/selectors.mjs +7 -1
- package/dist/index.d.mts +14 -2
- package/dist/lib/renderer/CanvasRenderer.mjs +4 -3
- package/dist/map/index.d.mts +2 -1
- package/dist/ui/EntryThumbnail.mjs +6 -3
- package/dist/web-components/About-I4h1cfup.mjs +1 -0
- package/dist/web-components/AnnotationItems-BfQm1YRD.mjs +1 -0
- package/dist/web-components/{AnnotationMenu-4PN2LNP-.mjs → AnnotationMenu-guk9SbaL.mjs} +1 -1
- package/dist/web-components/{AnnotationState-3KHHmQhl.mjs → AnnotationState-BX7xh-bd.mjs} +1 -1
- package/dist/web-components/{Annotations-BwKS6fG8.mjs → Annotations-BJrje3Ey.mjs} +1 -1
- package/dist/web-components/{Annotations-CPUvoKJe.mjs → Annotations-DBxLDLDf.mjs} +1 -1
- package/dist/web-components/{Body-CTzmxY8R.mjs → Body-CQuiRv9p.mjs} +1 -1
- package/dist/web-components/{BodyAlert-CXOxbNBE.mjs → BodyAlert-DF9rnG5o.mjs} +1 -1
- package/dist/web-components/{Button-a59NBnOp.mjs → Button-qhI73GCI.mjs} +1 -1
- package/dist/web-components/{Camera-BlbXBgYZ.mjs → Camera-D2MnETlC.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-DXCfms6g.mjs → Canvas2DBackend-kJpOk_Pb.mjs} +1 -1
- package/dist/web-components/CanvasView-B752g1bm.mjs +2 -0
- package/dist/web-components/{CaptionDetails-CCCTWTQP.mjs → CaptionDetails-Cl3fLJfr.mjs} +1 -1
- package/dist/web-components/ChaptersMenu-CB4zdVOh.mjs +1 -0
- package/dist/web-components/{Chevron-CH8yyEDi.mjs → Chevron-CT1ntI6B.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-BQVTRzXj.mjs → ChoiceMenu-DoXMSLjk.mjs} +1 -1
- package/dist/web-components/{Collection-CbEMQWrO.mjs → Collection-B8ipKdPl.mjs} +1 -1
- package/dist/web-components/CollectionSelect-C0Tunk6c.mjs +1 -0
- package/dist/web-components/{Connected-Dq0xux9o.mjs → Connected-DaP_DgGw.mjs} +1 -1
- package/dist/web-components/{Connected-C31vzWei.mjs → Connected-L47VwCva.mjs} +1 -1
- package/dist/web-components/Connected-shq2_tc-.mjs +1 -0
- package/dist/web-components/{Contents-CGc6_Z5c.mjs → Contents-_u13TaBJ.mjs} +1 -1
- package/dist/web-components/{ControlMenu-ej-Kpb31.mjs → ControlMenu-BW39OjKC.mjs} +1 -1
- package/dist/web-components/ControlsFade-LFHufW32.mjs +1 -0
- package/dist/web-components/{CountMenu-D4M1roIh.mjs → CountMenu-CQ7ThPWJ.mjs} +1 -1
- package/dist/web-components/Cue-B1IlY4Ae.mjs +1 -0
- package/dist/web-components/{Document-CPQELxSI.mjs → Document-BChOw20c.mjs} +1 -1
- package/dist/web-components/{DomLayers-DwhkzPRS.mjs → DomLayers-BIFA6J56.mjs} +1 -1
- package/dist/web-components/{Download-Dsei4KG3.mjs → Download-BfZJVu-O.mjs} +1 -1
- package/dist/web-components/{EntryBodies-BI7V3B5i.mjs → EntryBodies-Bld2RXeE.mjs} +1 -1
- package/dist/web-components/EntryThumbnail-C5df3CaH.mjs +1 -0
- package/dist/web-components/{FieldPill-BOeOasUT.mjs → FieldPill-Dx--yBoK.mjs} +1 -1
- package/dist/web-components/FrameAnimation-CpniJMTK.mjs +1 -0
- package/dist/web-components/{Gallery-BDGDzt0R.mjs → Gallery-CkaSdVAP.mjs} +1 -1
- package/dist/web-components/{GlobeGlyph-9zKXX7B6.mjs → GlobeGlyph-CCi1sZgm.mjs} +1 -1
- package/dist/web-components/{HideToggle-CmwFnHcZ.mjs → HideToggle-nvJtMFOZ.mjs} +1 -1
- package/dist/web-components/{ImageControls-CSHxdUD1.mjs → ImageControls-Df-M7F2R.mjs} +1 -1
- package/dist/web-components/Items-BsKByN_b.mjs +1 -0
- package/dist/web-components/{ItemsVertical-BeIiJ37B.mjs → ItemsVertical-Dmhm1DBy.mjs} +1 -1
- package/dist/web-components/Label-DElSTYS5.mjs +1 -0
- package/dist/web-components/{LanguageChoice-D_vEiQp9.mjs → LanguageChoice-t55qbd8x.mjs} +1 -1
- package/dist/web-components/{LanguageMenu-ycNvnbOB.mjs → LanguageMenu-BlFBWRSO.mjs} +1 -1
- package/dist/web-components/{LightboxView-CsOAsZ3f.mjs → LightboxView-BhPao9ao.mjs} +1 -1
- package/dist/web-components/{ListEnd-B6tyeK1B.mjs → ListEnd-KSoUQrsM.mjs} +1 -1
- package/dist/web-components/Loaded-uGqT3xyD.mjs +1 -0
- package/dist/web-components/LoadedCanvas-fqjWHH0H.mjs +3 -0
- package/dist/web-components/LoadedMap-BpRHQPoU.mjs +1 -0
- package/dist/web-components/{Loading-CAkF1fBT.mjs → Loading-DSaV1vxb.mjs} +1 -1
- package/dist/web-components/{Map-BDsBYSp5.mjs → Map-CUY8HEgh.mjs} +1 -1
- package/dist/web-components/MapView-DIVMYZZ1.mjs +3 -0
- package/dist/web-components/{Markup-COA2t_y1.mjs → Markup-DzUsOaNC.mjs} +1 -1
- package/dist/web-components/{MediaBody-CNk9fFfN.mjs → MediaBody-CJELKAWJ.mjs} +1 -1
- package/dist/web-components/{MediaBody-XsEObuYV.mjs → MediaBody-CN2ZTxK0.mjs} +1 -1
- package/dist/web-components/{NavDate-1LLiZ8Vq.mjs → NavDate-CD3sFxZJ.mjs} +1 -1
- package/dist/web-components/{Navigator-t1y35uj8.mjs → Navigator-CVDhe8R_.mjs} +1 -1
- package/dist/web-components/{Pager-35N8_3lH.mjs → Pager-BmZaB--9.mjs} +1 -1
- package/dist/web-components/PagerLayout-DhIz3hKA.mjs +1 -0
- package/dist/web-components/{Panel-D16u98YB.mjs → Panel-CdJyJVBh.mjs} +1 -1
- package/dist/web-components/PanelPart-m2QWHh_4.mjs +1 -0
- package/dist/web-components/{PanelToggle-BcUVIbQw.mjs → PanelToggle-BqVj7sX0.mjs} +1 -1
- package/dist/web-components/PartOfManifest-Dgw1shMM.mjs +1 -0
- package/dist/web-components/{Pending-bIYd0PwB.mjs → Pending-CDXsIk5O.mjs} +1 -1
- package/dist/web-components/{PlaceBox-D-pLIX5w.mjs → PlaceBox-DNnl9coD.mjs} +1 -1
- package/dist/web-components/Placeholder-D8Sabput.mjs +1 -0
- package/dist/web-components/Position-oFMJoo4P.mjs +1 -0
- package/dist/web-components/{Primitives-DP2uwwcU.mjs → Primitives-BdXIEpYW.mjs} +1 -1
- package/dist/web-components/{Provider-BUDzNTyJ.mjs → Provider-DWIlPOzR.mjs} +1 -1
- package/dist/web-components/{ReadMore-B6qft77s.mjs → ReadMore-f34RbHMm.mjs} +1 -1
- package/dist/web-components/{Root-J9v7nQ6o.mjs → Root-CEtLCE4Y.mjs} +1 -1
- package/dist/web-components/Scene-BJE8miZL.mjs +1 -0
- package/dist/web-components/{SceneView-DykQJepG.mjs → SceneView-D635_fRV.mjs} +1 -1
- package/dist/web-components/{Search-DEoFdx2g.mjs → Search-219u7M8o.mjs} +1 -1
- package/dist/web-components/{Sections-B6j9eFao.mjs → Sections-C3fPhGNx.mjs} +1 -1
- package/dist/web-components/{SeekMarks-C3ZDOMbt.mjs → SeekMarks-Ds8v3SaW.mjs} +1 -1
- package/dist/web-components/StandaloneItems-Mdh-k3w9.mjs +1 -0
- package/dist/web-components/{Status-C49DxNaY.mjs → Status-CEkhPlDF.mjs} +1 -1
- package/dist/web-components/{Steps-BTAJ3lc6.mjs → Steps-BoNd47eB.mjs} +1 -1
- package/dist/web-components/{TargetItems-BZFSWVs6.mjs → TargetItems-dFjJs-VP.mjs} +1 -1
- package/dist/web-components/Timeline-DPdS6bYG.mjs +1 -0
- package/dist/web-components/{Tip-Dv-gYN8n.mjs → Tip-mcI7IRQh.mjs} +1 -1
- package/dist/web-components/{Transcript-FmC6HR0-.mjs → Transcript-5wVgmZmU.mjs} +1 -1
- package/dist/web-components/{Transport-BKFLjI45.mjs → Transport-DYjd2GnA.mjs} +1 -1
- package/dist/web-components/{Transport-pRWbs9M3.mjs → Transport-DdNRlSa0.mjs} +1 -1
- package/dist/web-components/{annotation-collection-Dc-peX7w.mjs → annotation-collection-C3UpNV1K.mjs} +1 -1
- package/dist/web-components/{annotation-name-BhbhOgES.mjs → annotation-name-DhMF4ZHj.mjs} +1 -1
- package/dist/web-components/{annotations-content-BJSUCNd1.mjs → annotations-content-CuWJZr4t.mjs} +1 -1
- package/dist/web-components/{body-BEZ3sYcR.mjs → body-Bym9Uvav.mjs} +1 -1
- package/dist/web-components/canvas-BIXBggVo.mjs +1 -0
- package/dist/web-components/{cloverEngine-BstElW9l.mjs → cloverEngine-BEdb3g52.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DGOg8oAH.mjs → content-state-reader-BGZEChSM.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-Lxfq7zz4.mjs → controlGlyphs-DMQCxKaT.mjs} +1 -1
- package/dist/web-components/{controls-BibZpBh1.mjs → controls-B1pIwRgH.mjs} +1 -1
- package/dist/web-components/{downloads-cYib41PV.mjs → downloads-DwzBIS-9.mjs} +1 -1
- package/dist/web-components/{dragToClose-BpzjNnPx.mjs → dragToClose-BYUJ9qgo.mjs} +1 -1
- package/dist/web-components/{engine-Cl755NaO.mjs → engine-DUv-Syum.mjs} +1 -1
- package/dist/web-components/{engines-fZzYf1dz.mjs → engines-BzM_oBU_.mjs} +1 -1
- package/dist/web-components/{fetchManifest-D31pEPrb.mjs → fetchManifest-Cp7c8vs5.mjs} +1 -1
- package/dist/web-components/{follow-content-Byosc3Ev.mjs → follow-content-CmXq05TW.mjs} +1 -1
- package/dist/web-components/{fromManifest-DqCyZd2Q.mjs → fromManifest-DbgwTeBo.mjs} +1 -1
- package/dist/web-components/{glyphs-8fjIPAtZ.mjs → glyphs-atKuagcd.mjs} +1 -1
- package/dist/web-components/{hooks-Bo5GjPGX.mjs → hooks-DhTYPPVG.mjs} +1 -1
- package/dist/web-components/image-layers-CoBPhMZw.mjs +1 -0
- package/dist/web-components/{image-service-content-bUFBZCr1.mjs → image-service-content-CL_EZugL.mjs} +1 -1
- package/dist/web-components/{imageService-CCKieCxo.mjs → imageService-BoQQvo1U.mjs} +1 -1
- package/dist/web-components/{index-DhlRi3H9.mjs → index-Ciz5x8Tt.mjs} +1 -1
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/{items-CKMFXz0W.mjs → items-CjtUJjSU.mjs} +1 -1
- package/dist/web-components/items-DiQ3K5TV.mjs +1 -0
- package/dist/web-components/label-CKgFcOzZ.mjs +1 -0
- package/dist/web-components/{layout-DQtgCOJJ.mjs → layout-zjkkOHIj.mjs} +1 -1
- package/dist/web-components/{link-q4quIuuD.mjs → link-CrNaByf-.mjs} +1 -1
- package/dist/web-components/logo-C2xm9WAL.mjs +1 -0
- package/dist/web-components/{models-Dw-cADIz.mjs → models-BFKa5v_H.mjs} +1 -1
- package/dist/web-components/{nodes-nZmQ93ib.mjs → nodes-BDyXzQhk.mjs} +1 -1
- package/dist/web-components/{overlayImage-B-ybt0wn.mjs → overlayImage-BGxovfPN.mjs} +1 -1
- package/dist/web-components/{panel-C27fOmhT.mjs → panel-rEGhe5fL.mjs} +1 -1
- package/dist/web-components/part-PF-s_vD-.mjs +1 -0
- package/dist/web-components/{playerSurface-BLzwC0Ux.mjs → playerSurface-BthXi9l2.mjs} +1 -1
- package/dist/web-components/{pointer-BYZjBehK.mjs → pointer-C22ufJ5w.mjs} +1 -1
- package/dist/web-components/{provider-Cs6sFr4G.mjs → provider-B2C3eH9p.mjs} +1 -1
- package/dist/web-components/{range-regions-DssQTTra.mjs → range-regions-Ytq4QkMX.mjs} +1 -1
- package/dist/web-components/{read-more-Cp9CLzyd.mjs → read-more-B7LHzF4-.mjs} +1 -1
- package/dist/web-components/{readingLanguages-D97yt-4s.mjs → readingLanguages-B20n_dkw.mjs} +1 -1
- package/dist/web-components/{rendererSurface-BuBm8Th_.mjs → rendererSurface-BfZP5clN.mjs} +2 -2
- package/dist/web-components/{renderers-BL-b8snn.mjs → renderers-C569MeQB.mjs} +1 -1
- package/dist/web-components/{resource-DwKOZbOZ.mjs → resource-C5cMic8z.mjs} +1 -1
- package/dist/web-components/{save-file-CcfAgDXf.mjs → save-file-DsYdCZpi.mjs} +1 -1
- package/dist/web-components/{search-C45Jd7QH.mjs → search-kJ_71fbN.mjs} +1 -1
- package/dist/web-components/shared-ByrLMUQa.mjs +1 -0
- package/dist/web-components/{show-link-D9bByIzf.mjs → show-link-BqrJDDMV.mjs} +1 -1
- package/dist/web-components/{sizedImage-BFAry04f.mjs → sizedImage-CyCf0GtL.mjs} +1 -1
- package/dist/web-components/{split-CDZiE4rz.mjs → split-BZRKCI3g.mjs} +1 -1
- package/dist/web-components/{status-BtCciELI.mjs → status-CwO2mygB.mjs} +1 -1
- package/dist/web-components/{styles-Bf3qmdsh.mjs → styles-BOXm_R8o.mjs} +1 -1
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/thumbnail-Np4ftjUo.mjs +1 -0
- package/dist/web-components/{tip-_XUeFMj4.mjs → tip-CNyxI6xd.mjs} +1 -1
- package/dist/web-components/{toggle-DkPNS5eL.mjs → toggle-lop2se80.mjs} +1 -1
- package/dist/web-components/{useContainerName-BfU0IozO.mjs → useContainerName-DR_6TyDU.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-pU1JVIpK.mjs → useControlsVisibility-Dig_1-0T.mjs} +1 -1
- package/dist/web-components/{useNearViewport-D1kQt-tS.mjs → useNearViewport-B_kjW0WB.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-cQfG_zk_.mjs → useScrollTrack-6BV6IizZ.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationItems-UHFS1uDO.mjs → AnnotationItems-BDFH_6F_.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationMenu-0Ru0csCz.mjs → AnnotationMenu-BHCrJoNx.mjs} +1 -1
- package/dist/web-components/viewer/{AnnotationState-hEds2Tpa.mjs → AnnotationState-BV0fzlj8.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-Oprg7015.mjs → Annotations-BhA_Bbyj.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-vzP6-fS4.mjs → Annotations-DEqkGlE1.mjs} +1 -1
- package/dist/web-components/viewer/{Canvas2DBackend-3b5xEKac.mjs → Canvas2DBackend-Bq_bo1mL.mjs} +1 -1
- package/dist/web-components/viewer/{CaptionDetails-DDIjm-rC.mjs → CaptionDetails-D6Gd_EGS.mjs} +1 -1
- package/dist/web-components/viewer/ChaptersMenu-DE2TFesS.mjs +1 -0
- package/dist/web-components/viewer/{ChoiceMenu-COUDRKGM.mjs → ChoiceMenu-BVlpPUhr.mjs} +1 -1
- package/dist/web-components/viewer/{Collection-kWUradiW.mjs → Collection-DIgmeOCD.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-B2TrgX9-.mjs → Connected-7TgFouaR.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-FiJKHEv9.mjs → Connected-D9dz_v1p.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-DHyzbjco.mjs → Contents-ROI1iuuR.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-DWi6tgKb.mjs → ControlMenu-CZlN7x0D.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-QEgqI3wY.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-BYU6T0Ou.mjs → CountMenu-CCEH_rEu.mjs} +1 -1
- package/dist/web-components/viewer/{Cue-Ct2isFl7.mjs → Cue-CLbO9g2X.mjs} +1 -1
- package/dist/web-components/viewer/{Document-BtN3vmsO.mjs → Document-8ADB98RM.mjs} +1 -1
- package/dist/web-components/viewer/{DomLayers-CEzVM7HQ.mjs → DomLayers-BXPbPq1a.mjs} +1 -1
- package/dist/web-components/viewer/{Download-5BsnDZLL.mjs → Download-YfjzAcAF.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-D9R-wouw.mjs → EntryBodies-B2DBmUYl.mjs} +1 -1
- package/dist/web-components/viewer/EntryThumbnail-B2cRaP5D.mjs +1 -0
- package/dist/web-components/viewer/{FieldPill-CsyRt9Xh.mjs → FieldPill-C7o8586T.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-f4RKtdpP.mjs → FrameAnimation-CytZC2Lx.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-DC4QY9lG.mjs → Gallery-CQma5dBZ.mjs} +1 -1
- package/dist/web-components/viewer/{GlobeGlyph-BwZm2Ffj.mjs → GlobeGlyph-UxhwZJy1.mjs} +1 -1
- package/dist/web-components/viewer/{HideToggle-BD6zlrz3.mjs → HideToggle-DZMCACLG.mjs} +1 -1
- package/dist/web-components/viewer/{ImageControls-Bw9a17cS.mjs → ImageControls-fzFWqFVh.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-CcDmpHnE.mjs → LanguageChoice-B8F2WhUM.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageMenu-CRtM-mLy.mjs → LanguageMenu-BIpATvd4.mjs} +1 -1
- package/dist/web-components/viewer/{LightboxView-DJoH23fL.mjs → LightboxView-D-6yYXCc.mjs} +1 -1
- package/dist/web-components/viewer/{ListEnd-CSp0KGGZ.mjs → ListEnd-DhrDIRKM.mjs} +1 -1
- package/dist/web-components/viewer/MapView-XFUp4DVX.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-CMddJWMF.mjs → MediaBody-C3fVbzuD.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-BJ_MF_t1.mjs → NavDate-B47wyKdc.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-Gt56cM6f.mjs → Navigator-BqNBxE5l.mjs} +1 -1
- package/dist/web-components/viewer/{PagerLayout-BMrlMLfO.mjs → PagerLayout-DKdFxLZ1.mjs} +1 -1
- package/dist/web-components/viewer/PanelPart-CuddftmQ.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-BdZWbAQI.mjs → PartOfManifest-DF40jLNB.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-C27N2KG8.mjs → PlaceBox-Bi1inmQv.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-BX2y25Fo.mjs → Placeholder-BhAzmG0d.mjs} +1 -1
- package/dist/web-components/viewer/{Search-auUpOyeS.mjs → Search-CTkCx-SZ.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-Bg0PLdp0.mjs → SeekMarks-8NvVfr4F.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-P1ygiZtX.mjs +1 -0
- package/dist/web-components/viewer/{Steps-ABKs2V_m.mjs → Steps-DwqiM7sH.mjs} +1 -1
- package/dist/web-components/viewer/{TargetItems-BQVUKMAs.mjs → TargetItems-B873PbFR.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-DaShc1z-.mjs → Transcript-D7cFMWGk.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-ClkPaaOB.mjs → Transport-DPURF464.mjs} +1 -1
- package/dist/web-components/viewer/{Transport-6wRUIGiD.mjs → Transport-TvkdinN-.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-eyRpE2h4.mjs → annotation-collection-BwY8uYqa.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-DdchUvJI.mjs → annotation-name-DQMCd2DB.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-BZXlT3bR.mjs → annotations-content-q11OcPdT.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-CZWHXlyY.mjs → cloverEngine-K2HNl3W1.mjs} +1 -1
- package/dist/web-components/viewer/{content-state-reader-CDV0Igdx.mjs → content-state-reader-BhDMcVmC.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-CD-MJb-V.mjs → dragToClose-BFhEkxmf.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-C1IEIf45.mjs → fetchManifest-aJRqlL7Q.mjs} +1 -1
- package/dist/web-components/viewer/{follow-content-IQqCbvbJ.mjs → follow-content-Cy0flRSN.mjs} +1 -1
- package/dist/web-components/viewer/{host-BxQrzQnu.mjs → host-C4OSSUrc.mjs} +1 -1
- package/dist/web-components/viewer/{image-layers-DurrQgfL.mjs → image-layers-BmOyugIr.mjs} +1 -1
- package/dist/web-components/viewer/{image-service-content-ClAm_g0Y.mjs → image-service-content-BuqFuXBZ.mjs} +1 -1
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-Drdj-HcB.mjs → link-BtdcvLLg.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-BOilakHT.mjs +1 -0
- package/dist/web-components/viewer/{range-regions-a5eVBfJy.mjs → range-regions-S1HcVfpb.mjs} +1 -1
- package/dist/web-components/viewer/{renderers-CdXzZ9As.mjs → renderers-CetbXlHH.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-B2UBQRXz.mjs → save-file-BohgaD35.mjs} +1 -1
- package/dist/web-components/viewer/{search-BBZKUiMB.mjs → search-C0ZHXQW-.mjs} +1 -1
- package/dist/web-components/viewer/{useControlsVisibility-BfTACzo_.mjs → useControlsVisibility-CmA6PMfv.mjs} +1 -1
- package/dist/web-components/viewer/viewer-BXbkj7DJ.mjs +29 -0
- package/dist/web-components/viewer/{vtt-CCkTp_f2.mjs → vtt-BIJk7HEl.mjs} +1 -1
- package/dist/web-components/{viewer-D-AQ7mGw.mjs → viewer-f_6tefcG.mjs} +1 -1
- package/dist/web-components/{vtt-BjXkNfI_.mjs → vtt-BRwnCWbJ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/web-components/About-Brbhm22a.mjs +0 -1
- package/dist/web-components/AnnotationItems-Dy4BNabL.mjs +0 -1
- package/dist/web-components/CanvasView-CiP25Iqc.mjs +0 -2
- package/dist/web-components/ChaptersMenu-Bne6N9cf.mjs +0 -1
- package/dist/web-components/CollectionSelect-BpvtCwSl.mjs +0 -1
- package/dist/web-components/Connected-BWomgzfE.mjs +0 -1
- package/dist/web-components/ControlsFade-CStkqANR.mjs +0 -1
- package/dist/web-components/Cue-BhXRUDe9.mjs +0 -1
- package/dist/web-components/EntryThumbnail-BnMLzy5M.mjs +0 -1
- package/dist/web-components/FrameAnimation-BcEfAQrI.mjs +0 -1
- package/dist/web-components/Items-DCRr750U.mjs +0 -1
- package/dist/web-components/Label-CVfL9bMO.mjs +0 -1
- package/dist/web-components/Loaded-CSYg8oIR.mjs +0 -1
- package/dist/web-components/LoadedCanvas-W9sCFkdf.mjs +0 -1
- package/dist/web-components/LoadedMap-jx7uEeDg.mjs +0 -1
- package/dist/web-components/MapView-DO23FSrT.mjs +0 -3
- package/dist/web-components/PagerLayout-SNT5cl4D.mjs +0 -1
- package/dist/web-components/PanelPart-DfjlK_hB.mjs +0 -1
- package/dist/web-components/PartOfManifest-BYyflVQI.mjs +0 -1
- package/dist/web-components/Placeholder-Mq1Iaasr.mjs +0 -1
- package/dist/web-components/Position-Bh1Iq4d6.mjs +0 -1
- package/dist/web-components/Scene-CdqC1O-B.mjs +0 -1
- package/dist/web-components/StandaloneItems-CtxMB090.mjs +0 -1
- package/dist/web-components/Timeline-D5oL1UyW.mjs +0 -1
- package/dist/web-components/canvas-CfnKZqTU.mjs +0 -1
- package/dist/web-components/image-layers-CFarmTfZ.mjs +0 -1
- package/dist/web-components/items-BXd02UN6.mjs +0 -1
- package/dist/web-components/label-DcF-YCIN.mjs +0 -1
- package/dist/web-components/logo-DWI0N9FL.mjs +0 -1
- package/dist/web-components/part-B9t8Qe9D.mjs +0 -1
- package/dist/web-components/shared-D2pvbPvF.mjs +0 -1
- package/dist/web-components/thumbnail-By5wfGlE.mjs +0 -1
- package/dist/web-components/viewer/ChaptersMenu-DmJy-cfd.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-CuooJOpa.mjs +0 -1
- package/dist/web-components/viewer/EntryThumbnail-P6CmjmO9.mjs +0 -1
- package/dist/web-components/viewer/MapView-BO2ppZpW.mjs +0 -3
- package/dist/web-components/viewer/PanelPart-CaxBca8z.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-CBRWUCNf.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-CDT5ohRo.mjs +0 -1
- package/dist/web-components/viewer/viewer-BrkFZVo_.mjs +0 -29
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, Suspense, lazy } from "react";
|
|
4
4
|
import Caption, { hasInformation, captionLabelId } from "../Body/Caption.mjs";
|
|
5
5
|
import Controls, { NO_LIMITS } from "./Controls.mjs";
|
|
6
6
|
import { findChoices, startingChoices, animationFrames, canvasScene, paintedType, placeholderStill, frameKey, canvasSize, canvasRectToWorld } from "./layout.mjs";
|
|
@@ -100,7 +100,10 @@ const ANNOTATION_KEYS = {
|
|
|
100
100
|
const CanvasView = (props) => {
|
|
101
101
|
var _a;
|
|
102
102
|
const hasSource = Boolean((_a = props.canvases) == null ? void 0 : _a.length) || toSceneImages(props.body, props.src).length > 0;
|
|
103
|
-
|
|
103
|
+
const [kept, setKept] = useState(false);
|
|
104
|
+
const keep = hasSource || kept && props.manifestId === "loading";
|
|
105
|
+
if (keep !== kept) setKept(keep);
|
|
106
|
+
if (!keep) return null;
|
|
104
107
|
return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CanvasBody, { ...props }) });
|
|
105
108
|
};
|
|
106
109
|
const CanvasBody = (props) => {
|
|
@@ -559,15 +562,26 @@ ${canvases.map((canvas) => canvas.id).join("|")}` : null;
|
|
|
559
562
|
if (exitFocused.current && lost) (_a2 = hostRef.current) == null ? void 0 : _a2.focus();
|
|
560
563
|
exitFocused.current = false;
|
|
561
564
|
}, [fullscreenExit]);
|
|
565
|
+
const flushed = useRef(false);
|
|
566
|
+
useLayoutEffect(() => {
|
|
567
|
+
var _a2;
|
|
568
|
+
if (shownCanvases.current === null || shownCanvases.current === canvasKey)
|
|
569
|
+
return;
|
|
570
|
+
(_a2 = surfaceRef.current) == null ? void 0 : _a2.clear();
|
|
571
|
+
drawnScene.current = null;
|
|
572
|
+
flushed.current = true;
|
|
573
|
+
setStatus("loading");
|
|
574
|
+
}, [canvasKey]);
|
|
562
575
|
useEffect(() => {
|
|
563
576
|
const surface2 = surfaceRef.current;
|
|
564
577
|
if (showPlaceholder) placeholderShown.current = true;
|
|
565
578
|
if (!surface2 || !nearViewport || showPlaceholder) return;
|
|
566
|
-
const moved = shownCanvases.current !== null && shownCanvases.current !== canvasKey;
|
|
579
|
+
const moved = flushed.current || shownCanvases.current !== null && shownCanvases.current !== canvasKey;
|
|
567
580
|
if (!surface2.isOpen || moved) setStatus("loading");
|
|
568
581
|
const fit = mediaOnly || placeholderShown.current && surface2.isOpen || moved;
|
|
569
582
|
shownCanvases.current = canvasKey;
|
|
570
583
|
placeholderShown.current = false;
|
|
584
|
+
flushed.current = false;
|
|
571
585
|
surface2.setImages(images, { world: world ?? void 0, fit });
|
|
572
586
|
}, [imagesKey, instanceId, mediaElement, nearViewport, showPlaceholder]);
|
|
573
587
|
const shownManifest = useRef(manifestId);
|
|
@@ -580,7 +594,7 @@ ${canvases.map((canvas) => canvas.id).join("|")}` : null;
|
|
|
580
594
|
setCleared(true);
|
|
581
595
|
setStatus("loading");
|
|
582
596
|
}, [manifestId]);
|
|
583
|
-
const loading = status === "loading" && images.length > 0 && nearViewport && !showPlaceholder;
|
|
597
|
+
const loading = status === "loading" && (images.length > 0 || manifestId === "loading") && nearViewport && !showPlaceholder;
|
|
584
598
|
return /* @__PURE__ */ jsx(HostLanguageContext.Provider, { value: root.hostLanguage, children: /* @__PURE__ */ jsxs(
|
|
585
599
|
"figure",
|
|
586
600
|
{
|
|
@@ -11,6 +11,7 @@ import { readPage, pageLabel } from "../../core/annotation-sets.mjs";
|
|
|
11
11
|
import { loadContent } from "../../core/load.mjs";
|
|
12
12
|
import { useLoaded } from "../../hooks/useLoaded.mjs";
|
|
13
13
|
const loadRanges = () => import("../../core/ranges.mjs");
|
|
14
|
+
const NONE = [];
|
|
14
15
|
function LoadedCanvas({
|
|
15
16
|
iiifContent,
|
|
16
17
|
onAnnotationLink,
|
|
@@ -26,11 +27,18 @@ function LoadedCanvas({
|
|
|
26
27
|
const key = typeof iiifContent === "string" ? iiifContent : String((iiifContent == null ? void 0 : iiifContent.id) ?? "");
|
|
27
28
|
const [followed, setFollowed] = useState(null);
|
|
28
29
|
const link = (followed == null ? void 0 : followed.key) === key ? followed : null;
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
const wanted = `${key}
|
|
31
|
+
${(link == null ? void 0 : link.manifestId) ?? ""}
|
|
32
|
+
${(link == null ? void 0 : link.canvasId) ?? ""}`;
|
|
33
|
+
const [loadingFor, setLoadingFor] = useState(wanted);
|
|
34
|
+
if (loadingFor !== wanted) {
|
|
35
|
+
setLoadingFor(wanted);
|
|
31
36
|
setView(
|
|
32
37
|
(current) => current.state === "ready" ? { ...current, next: true } : { state: "loading" }
|
|
33
38
|
);
|
|
39
|
+
}
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
let live = true;
|
|
34
42
|
(async () => {
|
|
35
43
|
var _a2;
|
|
36
44
|
const content = await loadContent((link == null ? void 0 : link.manifestId) ?? iiifContent, {
|
|
@@ -39,8 +47,8 @@ function LoadedCanvas({
|
|
|
39
47
|
const canvases = (content.manifest.items ?? []).filter(
|
|
40
48
|
(each) => of ? each.type === of : each.type !== "Scene"
|
|
41
49
|
);
|
|
42
|
-
const
|
|
43
|
-
const canvas = canvases.find((each) => each.id ===
|
|
50
|
+
const wanted2 = (link == null ? void 0 : link.canvasId) ?? ((_a2 = content.target) == null ? void 0 : _a2.canvasId);
|
|
51
|
+
const canvas = canvases.find((each) => each.id === wanted2) ?? canvases[0];
|
|
44
52
|
if (!canvas) throw new Error(`It has no ${of ?? "Canvas"} to show.`);
|
|
45
53
|
if (live) setView({ state: "ready", content, canvas });
|
|
46
54
|
})().catch((error) => {
|
|
@@ -54,7 +62,7 @@ function LoadedCanvas({
|
|
|
54
62
|
live = false;
|
|
55
63
|
};
|
|
56
64
|
}, [key, link == null ? void 0 : link.manifestId, link == null ? void 0 : link.canvasId, request, of]);
|
|
57
|
-
const ready = view.state === "ready" ? view : null;
|
|
65
|
+
const ready = view.state === "ready" && !view.next ? view : null;
|
|
58
66
|
const [annotations, setAnnotations] = useState([]);
|
|
59
67
|
const given = Boolean(props.annotations);
|
|
60
68
|
useEffect(() => {
|
|
@@ -123,12 +131,24 @@ function LoadedCanvas({
|
|
|
123
131
|
props.language,
|
|
124
132
|
(ranges == null ? void 0 : ranges.chaptersOf) ?? null
|
|
125
133
|
);
|
|
134
|
+
if (view.state === "ready" && view.next)
|
|
135
|
+
return /* @__PURE__ */ jsx(
|
|
136
|
+
CanvasView,
|
|
137
|
+
{
|
|
138
|
+
...props,
|
|
139
|
+
manifestId: "loading",
|
|
140
|
+
canvases: NONE,
|
|
141
|
+
placeholder,
|
|
142
|
+
onReady: handleReady,
|
|
143
|
+
onMediaElement: handleMediaElement
|
|
144
|
+
}
|
|
145
|
+
);
|
|
126
146
|
if (view.state === "ready")
|
|
127
147
|
return /* @__PURE__ */ jsx(
|
|
128
148
|
CanvasView,
|
|
129
149
|
{
|
|
130
150
|
...props,
|
|
131
|
-
manifestId: view.
|
|
151
|
+
manifestId: view.content.manifest.id,
|
|
132
152
|
canvases: [view.canvas],
|
|
133
153
|
label: props.label ?? view.canvas.label ?? view.content.manifest.label,
|
|
134
154
|
partOf: props.partOf ?? view.content.manifest.label,
|
|
@@ -62,8 +62,8 @@ function PlayerFace({
|
|
|
62
62
|
const source = thumbnailSource({ thumbnail });
|
|
63
63
|
return source ? { source } : null;
|
|
64
64
|
}, [shown, canvas, language]);
|
|
65
|
-
const src = useThumbnail(art == null ? void 0 : art.source, ART_SIZE, request,
|
|
66
|
-
const ground = useThumbnail(art == null ? void 0 : art.source, GROUND_SIZE, request,
|
|
65
|
+
const src = useThumbnail(art == null ? void 0 : art.source, ART_SIZE, request, canvas.id);
|
|
66
|
+
const ground = useThumbnail(art == null ? void 0 : art.source, GROUND_SIZE, request, canvas.id);
|
|
67
67
|
const [loaded, setLoaded] = useState();
|
|
68
68
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
69
|
/* @__PURE__ */ jsx(
|
|
@@ -3,6 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef, useState, useEffect, useRef } from "react";
|
|
4
4
|
import { useUniqueId } from "../../ui/useUniqueId.mjs";
|
|
5
5
|
import { itemsOfCollection } from "../../core/items.mjs";
|
|
6
|
+
import { selectShownId } from "../../core/selectors.mjs";
|
|
6
7
|
import { localize } from "../../core/value.mjs";
|
|
7
8
|
import { useCloverTranslation } from "../../i18n/useCloverTranslation.mjs";
|
|
8
9
|
import { join } from "../../lib/classnames.mjs";
|
|
@@ -24,7 +25,8 @@ const CollectionSelect = forwardRef(
|
|
|
24
25
|
const { t, langOf } = useCloverTranslation();
|
|
25
26
|
const { clover, language } = useClover("CollectionSelect");
|
|
26
27
|
const collection = useCloverSelector((state) => state.collection);
|
|
27
|
-
const shown = useCloverSelector((state) =>
|
|
28
|
+
const shown = useCloverSelector((state) => selectShownId(state) ?? "");
|
|
29
|
+
const loaded = useCloverSelector((state) => {
|
|
28
30
|
var _a;
|
|
29
31
|
return ((_a = state.manifest) == null ? void 0 : _a.id) ?? "";
|
|
30
32
|
});
|
|
@@ -35,9 +37,9 @@ const CollectionSelect = forwardRef(
|
|
|
35
37
|
const asked = useRef(null);
|
|
36
38
|
useEffect(() => {
|
|
37
39
|
asked.current = null;
|
|
38
|
-
}, [
|
|
40
|
+
}, [loaded, collection]);
|
|
39
41
|
const choose = (next) => {
|
|
40
|
-
if (!next || next ===
|
|
42
|
+
if (!next || next === loaded || next === asked.current) return;
|
|
41
43
|
asked.current = next;
|
|
42
44
|
onChange == null ? void 0 : onChange(next);
|
|
43
45
|
void clover.goToManifest(next).finally(() => {
|
|
@@ -80,7 +82,7 @@ const CollectionSelect = forwardRef(
|
|
|
80
82
|
value: pending ?? shown,
|
|
81
83
|
onKeyDown: (event) => {
|
|
82
84
|
const { key } = event;
|
|
83
|
-
if (key === "Enter") choose(pending);
|
|
85
|
+
if (key === "Enter") choose(pending ?? shown);
|
|
84
86
|
else if (key === "Escape") {
|
|
85
87
|
if (stepBack()) event.preventDefault();
|
|
86
88
|
} else if (STEPS.has(key) || key.length === 1 && !event.ctrlKey && !event.metaKey) {
|
|
@@ -6,7 +6,7 @@ import { ItemFigure } from "./Item.mjs";
|
|
|
6
6
|
import { Tip } from "../../ui/Tip.mjs";
|
|
7
7
|
import { itemsOfCollection, itemsOfManifest } from "../../core/items.mjs";
|
|
8
8
|
import { selectAnnotationCollection } from "../../core/annotation-sets.mjs";
|
|
9
|
-
import { selectPosition, selectSequence } from "../../core/selectors.mjs";
|
|
9
|
+
import { selectShownId, selectPosition, selectSequence } from "../../core/selectors.mjs";
|
|
10
10
|
import { resolveDirection } from "../../core/sequence.mjs";
|
|
11
11
|
import { localize } from "../../core/value.mjs";
|
|
12
12
|
import { useCloverTranslation } from "../../i18n/useCloverTranslation.mjs";
|
|
@@ -56,10 +56,7 @@ function MemberItems({
|
|
|
56
56
|
}) {
|
|
57
57
|
const { clover, language } = useOptionalClover();
|
|
58
58
|
const collection = useCloverSelector((state) => state.collection);
|
|
59
|
-
const manifestId = useCloverSelector(
|
|
60
|
-
var _a;
|
|
61
|
-
return ((_a = state.manifest) == null ? void 0 : _a.id) ?? null;
|
|
62
|
-
});
|
|
59
|
+
const manifestId = useCloverSelector(selectShownId);
|
|
63
60
|
const items = itemsOfCollection(collection);
|
|
64
61
|
const direction = resolveDirection(
|
|
65
62
|
collection == null ? void 0 : collection.viewingDirection
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { itemsOfCollection } from "../../core/items.mjs";
|
|
5
|
-
import { selectTargetIndex } from "../../core/selectors.mjs";
|
|
5
|
+
import { selectShownId, selectTargetIndex } from "../../core/selectors.mjs";
|
|
6
6
|
import { useCloverTranslation } from "../../i18n/useCloverTranslation.mjs";
|
|
7
7
|
import { join } from "../../lib/classnames.mjs";
|
|
8
8
|
import { useClover, useCloverSelector } from "../../react/context.mjs";
|
|
@@ -14,10 +14,7 @@ function useRootSteps(of, part) {
|
|
|
14
14
|
const navigation = useNavigation();
|
|
15
15
|
const { direction } = useSequence();
|
|
16
16
|
const collection = useCloverSelector((state) => state.collection);
|
|
17
|
-
const shown = useCloverSelector(
|
|
18
|
-
var _a;
|
|
19
|
-
return ((_a = state.manifest) == null ? void 0 : _a.id) ?? null;
|
|
20
|
-
});
|
|
17
|
+
const shown = useCloverSelector(selectShownId);
|
|
21
18
|
const targets = useCloverSelector(
|
|
22
19
|
(state) => {
|
|
23
20
|
var _a;
|
|
@@ -22,6 +22,12 @@ function StandaloneItems({
|
|
|
22
22
|
const key = typeof iiifContent === "string" ? iiifContent : iiifContent == null ? void 0 : iiifContent.id;
|
|
23
23
|
const latest = useRef({ iiifContent, request });
|
|
24
24
|
latest.current = { iiifContent, request };
|
|
25
|
+
const [loadingFor, setLoadingFor] = useState(key);
|
|
26
|
+
if (loadingFor !== key) {
|
|
27
|
+
setLoadingFor(key);
|
|
28
|
+
setResource(null);
|
|
29
|
+
setSelected(0);
|
|
30
|
+
}
|
|
25
31
|
useEffect(() => {
|
|
26
32
|
if (provided || latest.current.iiifContent === void 0) return;
|
|
27
33
|
const controller = new AbortController();
|
|
@@ -7,7 +7,7 @@ import { useHighContrast, highContrastProps } from "../../hooks/useHighContrast.
|
|
|
7
7
|
import { DEFAULT_STYLE_URL, applyDefaultBasemap } from "./basemap.mjs";
|
|
8
8
|
import { navPlaceOf, georeferencesOf, cornersOf, boundsOf, readGeoreference } from "../../core/geo.mjs";
|
|
9
9
|
import { sendsCredentials } from "../../core/request.mjs";
|
|
10
|
-
import { selectVisibleCanvases } from "../../core/selectors.mjs";
|
|
10
|
+
import { selectVisibleCanvases, selectShownId } from "../../core/selectors.mjs";
|
|
11
11
|
import { localize } from "../../core/value.mjs";
|
|
12
12
|
import { useCloverTranslation } from "../../i18n/useCloverTranslation.mjs";
|
|
13
13
|
import { join } from "../../lib/classnames.mjs";
|
|
@@ -65,13 +65,7 @@ function ConnectedMap({
|
|
|
65
65
|
),
|
|
66
66
|
[picked, highlighted]
|
|
67
67
|
);
|
|
68
|
-
const manifestId = useOptionalCloverSelector(
|
|
69
|
-
(state) => {
|
|
70
|
-
var _a;
|
|
71
|
-
return ((_a = state.manifest) == null ? void 0 : _a.id) ?? null;
|
|
72
|
-
},
|
|
73
|
-
null
|
|
74
|
-
);
|
|
68
|
+
const manifestId = useOptionalCloverSelector(selectShownId, null);
|
|
75
69
|
const current = useMemo(
|
|
76
70
|
() => scope === "view" ? [
|
|
77
71
|
...shown.map((canvas) => canvas.id),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useRef, useState, useEffect, useSyncExternalStore, useCallback, useMemo } from "react";
|
|
2
|
+
import { useRef, useState, useLayoutEffect, useEffect, useSyncExternalStore, useCallback, useMemo } from "react";
|
|
3
3
|
import { createClover } from "../../core/clover.mjs";
|
|
4
4
|
import { requestKey } from "../../core/request.mjs";
|
|
5
5
|
import { cloverI18n } from "../../i18n/config.mjs";
|
|
6
6
|
import { useRootContentState } from "../../react/useContentStateOutput.mjs";
|
|
7
7
|
import { sameRenderers } from "../Body/renderers.mjs";
|
|
8
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
8
9
|
function useRootState({
|
|
9
10
|
iiifContent,
|
|
10
11
|
canvasId,
|
|
@@ -55,6 +56,18 @@ function useRootState({
|
|
|
55
56
|
})
|
|
56
57
|
);
|
|
57
58
|
clover.setRequest(request);
|
|
59
|
+
const [status, setStatus] = useState(clover.store.get().status);
|
|
60
|
+
useIsomorphicLayoutEffect(() => {
|
|
61
|
+
let last = clover.store.get().status;
|
|
62
|
+
return clover.store.subscribe(() => {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
const { status: next, error } = clover.store.get();
|
|
65
|
+
if (next === last) return;
|
|
66
|
+
last = next;
|
|
67
|
+
setStatus(next);
|
|
68
|
+
(_b = (_a = latest.current).onStatusChange) == null ? void 0 : _b.call(_a, next, error);
|
|
69
|
+
});
|
|
70
|
+
}, [clover]);
|
|
58
71
|
const initial = useRef({});
|
|
59
72
|
initial.current = {
|
|
60
73
|
canvasId,
|
|
@@ -65,25 +78,13 @@ function useRootState({
|
|
|
65
78
|
const content = useRef(iiifContent);
|
|
66
79
|
content.current = iiifContent;
|
|
67
80
|
const key = contentKey(iiifContent);
|
|
68
|
-
|
|
81
|
+
useIsomorphicLayoutEffect(() => {
|
|
69
82
|
void clover.load(content.current, initial.current);
|
|
70
83
|
return () => clover.dispose();
|
|
71
84
|
}, [clover, key, requestSettings]);
|
|
72
85
|
useEffect(() => {
|
|
73
86
|
if (controlled) clover.syncCanvas(canvasId ?? null);
|
|
74
87
|
}, [clover, controlled, canvasId]);
|
|
75
|
-
const [status, setStatus] = useState(clover.store.get().status);
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
let last = clover.store.get().status;
|
|
78
|
-
return clover.store.subscribe(() => {
|
|
79
|
-
var _a, _b;
|
|
80
|
-
const { status: next, error } = clover.store.get();
|
|
81
|
-
if (next === last) return;
|
|
82
|
-
last = next;
|
|
83
|
-
setStatus(next);
|
|
84
|
-
(_b = (_a = latest.current).onStatusChange) == null ? void 0 : _b.call(_a, next, error);
|
|
85
|
-
});
|
|
86
|
-
}, [clover]);
|
|
87
88
|
const annotationsRef = useRef(annotations);
|
|
88
89
|
annotationsRef.current = annotations;
|
|
89
90
|
const annotationsKey = annotationsInputKey(annotations);
|
|
@@ -10,9 +10,13 @@ function LoadedScene({ iiifContent, ...props }) {
|
|
|
10
10
|
const [view, setView] = useState({ state: "loading" });
|
|
11
11
|
const request = (_a = props.options) == null ? void 0 : _a.request;
|
|
12
12
|
const key = typeof iiifContent === "string" ? iiifContent : String((iiifContent == null ? void 0 : iiifContent.id) ?? "");
|
|
13
|
+
const [loadingFor, setLoadingFor] = useState(key);
|
|
14
|
+
if (loadingFor !== key) {
|
|
15
|
+
setLoadingFor(key);
|
|
16
|
+
setView({ state: "loading" });
|
|
17
|
+
}
|
|
13
18
|
useEffect(() => {
|
|
14
19
|
let live = true;
|
|
15
|
-
setView({ state: "loading" });
|
|
16
20
|
(async () => {
|
|
17
21
|
var _a2;
|
|
18
22
|
const content = await loadContent(iiifContent, { request });
|
package/dist/core/clover.mjs
CHANGED
|
@@ -30,6 +30,7 @@ const INITIAL = {
|
|
|
30
30
|
status: "idle",
|
|
31
31
|
error: null,
|
|
32
32
|
manifest: null,
|
|
33
|
+
opening: null,
|
|
33
34
|
collection: null,
|
|
34
35
|
throughCollection: false,
|
|
35
36
|
canvasId: null,
|
|
@@ -107,7 +108,6 @@ function createClover(options = {}) {
|
|
|
107
108
|
const start = selectStart(manifest);
|
|
108
109
|
const target = has(deepLink == null ? void 0 : deepLink.canvasId) ? deepLink : has(start == null ? void 0 : start.canvasId) ? start : null;
|
|
109
110
|
const canvasId = has(initial.canvasId) ? initial.canvasId : (target == null ? void 0 : target.canvasId) ?? (has(initial.defaultCanvasId) ? initial.defaultCanvasId : null) ?? ((_a = canvases[0]) == null ? void 0 : _a.id) ?? null;
|
|
110
|
-
searching == null ? void 0 : searching.abort();
|
|
111
111
|
const picked = pick && ((_b = findEntry(stateSets, pick)) == null ? void 0 : _b.canvasId) === canvasId ? pick : null;
|
|
112
112
|
const arrival = target && picked ? { ...target, region: void 0 } : target;
|
|
113
113
|
const at = ++arrivals;
|
|
@@ -117,6 +117,7 @@ function createClover(options = {}) {
|
|
|
117
117
|
search: NO_SEARCH,
|
|
118
118
|
regions: null,
|
|
119
119
|
manifest,
|
|
120
|
+
opening: null,
|
|
120
121
|
collection,
|
|
121
122
|
canvasId,
|
|
122
123
|
target: arrival && arrival.canvasId === canvasId ? arrival : null,
|
|
@@ -168,21 +169,48 @@ function createClover(options = {}) {
|
|
|
168
169
|
total: selectSequence(manifest).views.length
|
|
169
170
|
};
|
|
170
171
|
};
|
|
171
|
-
const begin = () => {
|
|
172
|
+
const begin = (opening, within) => {
|
|
172
173
|
loading == null ? void 0 : loading.abort();
|
|
174
|
+
searching == null ? void 0 : searching.abort();
|
|
173
175
|
const controller = new AbortController();
|
|
174
176
|
loading = controller;
|
|
175
177
|
requested.clear();
|
|
176
|
-
|
|
178
|
+
arrivals++;
|
|
179
|
+
layerSets = [];
|
|
180
|
+
if (!within) {
|
|
181
|
+
stateSets = [];
|
|
182
|
+
contentTargets = null;
|
|
183
|
+
}
|
|
184
|
+
store.set({
|
|
185
|
+
status: "loading",
|
|
186
|
+
error: null,
|
|
187
|
+
manifest: null,
|
|
188
|
+
opening,
|
|
189
|
+
canvasId: null,
|
|
190
|
+
target: null,
|
|
191
|
+
annotationId: null,
|
|
192
|
+
search: NO_SEARCH,
|
|
193
|
+
regions: null,
|
|
194
|
+
addedSets: added(),
|
|
195
|
+
...!within && {
|
|
196
|
+
collection: null,
|
|
197
|
+
throughCollection: false,
|
|
198
|
+
targets: null,
|
|
199
|
+
targetIndex: null
|
|
200
|
+
}
|
|
201
|
+
});
|
|
177
202
|
return controller.signal;
|
|
178
203
|
};
|
|
179
204
|
const fail = (error) => store.set({
|
|
180
205
|
status: "error",
|
|
181
206
|
error: error instanceof Error ? error : new Error(String(error))
|
|
182
207
|
});
|
|
183
|
-
async function
|
|
208
|
+
async function open(content, initial = {}, within = false) {
|
|
184
209
|
var _a;
|
|
185
|
-
const signal = begin(
|
|
210
|
+
const signal = begin(
|
|
211
|
+
within && typeof content === "string" ? content : null,
|
|
212
|
+
within
|
|
213
|
+
);
|
|
186
214
|
try {
|
|
187
215
|
const loaded = await loadContent(content, {
|
|
188
216
|
request,
|
|
@@ -212,8 +240,8 @@ function createClover(options = {}) {
|
|
|
212
240
|
}
|
|
213
241
|
}
|
|
214
242
|
const isShown = (id) => {
|
|
215
|
-
const { manifest, collection } = store.get();
|
|
216
|
-
return (manifest == null ? void 0 : manifest.id) === id || (collection == null ? void 0 : collection.id) === id;
|
|
243
|
+
const { manifest, collection, opening, status } = store.get();
|
|
244
|
+
return (manifest == null ? void 0 : manifest.id) === id || (collection == null ? void 0 : collection.id) === id || opening === id && status === "loading";
|
|
217
245
|
};
|
|
218
246
|
const memberOf = (id) => {
|
|
219
247
|
var _a;
|
|
@@ -237,11 +265,11 @@ function createClover(options = {}) {
|
|
|
237
265
|
};
|
|
238
266
|
const show = async (member, place) => {
|
|
239
267
|
if (member.type === "Collection") {
|
|
240
|
-
await
|
|
268
|
+
await open(member.id, {}, true);
|
|
241
269
|
return store.get().status === "ready";
|
|
242
270
|
}
|
|
243
271
|
const { collection } = store.get();
|
|
244
|
-
const signal = begin();
|
|
272
|
+
const signal = begin(member.id, true);
|
|
245
273
|
const pick = pending;
|
|
246
274
|
pending = null;
|
|
247
275
|
const waiting = pick ? findEntry(stateSets, pick) : null;
|
|
@@ -278,7 +306,7 @@ function createClover(options = {}) {
|
|
|
278
306
|
setRequest(next) {
|
|
279
307
|
request = next;
|
|
280
308
|
},
|
|
281
|
-
load,
|
|
309
|
+
load: open,
|
|
282
310
|
async openCollection(id) {
|
|
283
311
|
var _a;
|
|
284
312
|
const shown = store.get().manifest;
|
package/dist/core/geo.mjs
CHANGED
|
@@ -85,17 +85,18 @@ function annotationsOf(canvas) {
|
|
|
85
85
|
}
|
|
86
86
|
const navPlaces = /* @__PURE__ */ new WeakMap();
|
|
87
87
|
function navPlaceOf(manifest, collection = null, language) {
|
|
88
|
-
|
|
88
|
+
const held = manifest ?? collection;
|
|
89
|
+
if (!held) return NO_FEATURES;
|
|
89
90
|
const key = `${language ?? ""}|${(collection == null ? void 0 : collection.id) ?? ""}`;
|
|
90
|
-
let byKey = navPlaces.get(
|
|
91
|
-
if (!byKey) navPlaces.set(
|
|
91
|
+
let byKey = navPlaces.get(held);
|
|
92
|
+
if (!byKey) navPlaces.set(held, byKey = /* @__PURE__ */ new Map());
|
|
92
93
|
const cached = byKey.get(key);
|
|
93
94
|
if (cached) return cached;
|
|
94
95
|
const features = [];
|
|
95
96
|
const add = (geo, owner) => features.push(...featuresOf(geo).map((f) => flatten(f, owner, language)));
|
|
96
97
|
const c = collection;
|
|
97
98
|
if (c == null ? void 0 : c.navPlace) add(c.navPlace, { label: c.label, navDate: c.navDate });
|
|
98
|
-
const m = manifest;
|
|
99
|
+
const m = manifest ?? {};
|
|
99
100
|
let own = false;
|
|
100
101
|
for (const member of asArray(c == null ? void 0 : c.items)) {
|
|
101
102
|
if (typeof (member == null ? void 0 : member.id) !== "string") continue;
|
package/dist/core/selectors.mjs
CHANGED
|
@@ -89,9 +89,14 @@ const hasBehavior = (resource, value) => {
|
|
|
89
89
|
return Array.isArray(behavior) ? behavior.includes(value) : behavior === value;
|
|
90
90
|
};
|
|
91
91
|
const partOfCollection = (manifest) => [(manifest == null ? void 0 : manifest.partOf) ?? []].flat().find((part) => (part == null ? void 0 : part.id) && part.type === "Collection");
|
|
92
|
+
function selectShownId(state) {
|
|
93
|
+
var _a;
|
|
94
|
+
return ((_a = state.manifest) == null ? void 0 : _a.id) ?? state.opening;
|
|
95
|
+
}
|
|
92
96
|
function selectTargetIndex(targets, targetIndex, manifest, canvasId) {
|
|
93
97
|
const items = targets == null ? void 0 : targets.items;
|
|
94
|
-
if (!(items == null ? void 0 : items.length)
|
|
98
|
+
if (!(items == null ? void 0 : items.length)) return -1;
|
|
99
|
+
if (!manifest) return targetIndex ?? -1;
|
|
95
100
|
const visible2 = selectVisibleCanvases(manifest, canvasId);
|
|
96
101
|
const here = (index) => {
|
|
97
102
|
const target = items[index];
|
|
@@ -108,6 +113,7 @@ export {
|
|
|
108
113
|
selectNextCanvases,
|
|
109
114
|
selectPosition,
|
|
110
115
|
selectSequence,
|
|
116
|
+
selectShownId,
|
|
111
117
|
selectStart,
|
|
112
118
|
selectTargetIndex,
|
|
113
119
|
selectVisibleCanvases
|
package/dist/index.d.mts
CHANGED
|
@@ -391,8 +391,19 @@ export type CloverStatus = "idle" | "loading" | "ready" | "error";
|
|
|
391
391
|
export interface CloverState {
|
|
392
392
|
status: CloverStatus;
|
|
393
393
|
error: Error | null;
|
|
394
|
-
/**
|
|
394
|
+
/**
|
|
395
|
+
* The Manifest shown, in Presentation 4. Null from the moment another is asked for
|
|
396
|
+
* (`load`, a Collection's member, a content state's target) until it arrives: nothing
|
|
397
|
+
* of the last one shows while the next loads (Mat, 2026-11-06).
|
|
398
|
+
*/
|
|
395
399
|
manifest: Manifest | null;
|
|
400
|
+
/**
|
|
401
|
+
* What was asked for while it loads, by the id it was asked by: a Collection's member,
|
|
402
|
+
* a target's Manifest. What marks the current member (`selectShownId`) reads it until
|
|
403
|
+
* the Manifest arrives, so the choice holds, and a step from it steps from there; and
|
|
404
|
+
* after it fails, so the member the error is for is the one to try again.
|
|
405
|
+
*/
|
|
406
|
+
opening: string | null;
|
|
396
407
|
/** The Collection it was reached through, if any. */
|
|
397
408
|
collection: Presentation4Collection | null;
|
|
398
409
|
/**
|
|
@@ -2144,7 +2155,8 @@ export interface Georeference {
|
|
|
2144
2155
|
* 0139 has). A feature from a member names that member, the open one's place its own
|
|
2145
2156
|
* Manifest's where it gives one, in the member's place in the Collection's order; one
|
|
2146
2157
|
* from a Canvas or annotation names that Canvas. Memoized on the Manifest (and the
|
|
2147
|
-
* Collection), so the same collection comes back while nothing changes.
|
|
2158
|
+
* Collection), so the same collection comes back while nothing changes. While a member
|
|
2159
|
+
* loads, its Manifest put away, the Collection's places stay, each its member's own.
|
|
2148
2160
|
*/
|
|
2149
2161
|
export declare function navPlaceOf(manifest: Manifest | null, collection?: Presentation4Collection | null, language?: string): MapFeatureCollection;
|
|
2150
2162
|
/**
|
|
@@ -406,9 +406,10 @@ class CanvasRenderer {
|
|
|
406
406
|
}
|
|
407
407
|
/**
|
|
408
408
|
* Put the scene away at once: from the next frame nothing of it is drawn, and a swap
|
|
409
|
-
* still preparing is dropped. For moving to
|
|
410
|
-
* never show
|
|
411
|
-
* scene, framed afresh
|
|
409
|
+
* still preparing is dropped. For moving to another Canvas or another resource, whose
|
|
410
|
+
* pictures should never show the last one's while they load (Mat, 2026-11-06);
|
|
411
|
+
* `setImages` then draws the new scene, framed afresh, each image as it can be drawn.
|
|
412
|
+
* A swap within one Canvas (a Choice picked) keeps the old scene up instead.
|
|
412
413
|
*/
|
|
413
414
|
clear() {
|
|
414
415
|
this.setUnloadable(false);
|
package/dist/map/index.d.mts
CHANGED
|
@@ -102,7 +102,8 @@ export interface Georeference {
|
|
|
102
102
|
* 0139 has). A feature from a member names that member, the open one's place its own
|
|
103
103
|
* Manifest's where it gives one, in the member's place in the Collection's order; one
|
|
104
104
|
* from a Canvas or annotation names that Canvas. Memoized on the Manifest (and the
|
|
105
|
-
* Collection), so the same collection comes back while nothing changes.
|
|
105
|
+
* Collection), so the same collection comes back while nothing changes. While a member
|
|
106
|
+
* loads, its Manifest put away, the Collection's places stay, each its member's own.
|
|
106
107
|
*/
|
|
107
108
|
export declare function navPlaceOf(manifest: Manifest | null, collection?: Presentation4Collection | null, language?: string): MapFeatureCollection;
|
|
108
109
|
/**
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
3
|
+
import { useState, useRef, useEffect } from "react";
|
|
4
4
|
import { resolveThumbnail } from "../core/thumbnail.mjs";
|
|
5
5
|
import { join } from "../lib/classnames.mjs";
|
|
6
6
|
const ENTRY_THUMBNAIL_SIZE = 52;
|
|
7
7
|
const PICTURE_SIZE = 336;
|
|
8
|
-
function useThumbnail(source, size, request, hold
|
|
8
|
+
function useThumbnail(source, size, request, hold) {
|
|
9
9
|
const [src, setSrc] = useState(source == null ? void 0 : source.src);
|
|
10
10
|
const key = source ? JSON.stringify(source) : "";
|
|
11
|
+
const heldFor = useRef(hold);
|
|
11
12
|
useEffect(() => {
|
|
13
|
+
const held = hold !== void 0 && heldFor.current === hold;
|
|
14
|
+
heldFor.current = hold;
|
|
12
15
|
if (!source || source.src) return setSrc(source == null ? void 0 : source.src);
|
|
13
|
-
if (!
|
|
16
|
+
if (!held) setSrc(void 0);
|
|
14
17
|
let live = true;
|
|
15
18
|
void resolveThumbnail(source, size, request).then(
|
|
16
19
|
(url) => live && setSrc(url)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as M,y as j,u as t,z as C,P as N,Z as w,a as x,Q as $,x as H,c as _,A as G,b as V,a0 as T,W,l as k}from"./shared-ByrLMUQa.mjs";import{j as B}from"./classnames-DukgfdpI.mjs";import{u as Q}from"./readingLanguages-B20n_dkw.mjs";import{Thumbnail as U,Summary as R,Metadata as Z,RequiredStatement as E,Rights as J,Homepage as X,SeeAlso as Y,Id as K}from"./Primitives-BdXIEpYW.mjs";import{u as ee}from"./downloads-DwzBIS-9.mjs";import{P as te}from"./Provider-DWIlPOzR.mjs";import{a as oe,t as ae}from"./heading-Cjt0f-Eu.mjs";import{L as ne}from"./Label-DElSTYS5.mjs";import{r as re}from"./dates-DR3gfcON.mjs";import"./styles-BOXm_R8o.mjs";const se=C(()=>import("./LanguageChoice-t55qbd8x.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-BfZJVu-O.mjs").then(({DownloadGroups:e})=>({default:e}))),he=C(()=>import("./NavDate-CD3sFxZJ.mjs").then(e=>e.a).then(({NavDate:e})=>({default:e}))),be=C(()=>import("./PartOfManifest-Dgw1shMM.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=V(),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(U,{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(Z,{className:"clover-about-metadata"}),t(E,{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(J,{})),u("aboutHomepage",I("homepage"),t(X,{})),u("aboutSeeAlso",I("seeAlso"),t(Y,{})),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",!W(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,am as _,T as E,H as O,A as R,y as T,u as f,k,d as q,a3 as F}from"./shared-ByrLMUQa.mjs";import{P as L,a as y}from"./Items-BsKByN_b.mjs";import{C as B}from"./CountMenu-CQ7ThPWJ.mjs";import{a as D}from"./annotation-name-DhMF4ZHj.mjs";import{f as G,r as H}from"./fetchManifest-Cp7c8vs5.mjs";import{u as K,L as V}from"./ListEnd-KSoUQrsM.mjs";function j({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)??z,g=(s==null?void 0:s.entries)??J,{loaded:A,more:N,reachNext:S}=K(d),x=E(()=>[...new Set(g.map(t=>O(t.annotation)).filter(t=>!!t&&t!==(n==null?void 0:n.id)))],[g,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 g.filter(a=>!t||t.has(a.setId)).map(a=>{const m=O(a.annotation),p=m&&m!==(n==null?void 0:n.id)?C.get(m)??null:n;return X(a,p,e,M)})},[d,A,g,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(L,{...c,forwardedRef:r,steps:{position:h,total:b,direction:"left-to-right",step:(a,m)=>{const p=h+a;if(!(p<0)){if(i[p])return w(i[p],m);N&&(I.current=p,S())}}},nameKey:"informationPanelTabsAnnotations",position:f(B,{position:h,total:b,list:a=>f(j,{layout:"list",forwardedRef:null,onSelect:a})})}):f(k,{children:[f(y,{...c,forwardedRef:r,items:i,selected:h,navigation:"id",language:e,request:l.request,showSummary:true,onActivate:w}),N&&f(V,{onReached:S})]})}const z=[],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)G(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=D(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?H(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{j 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-ByrLMUQa.mjs";import{s as H}from"./Annotations-DBxLDLDf.mjs";import T from"./ControlMenu-BW39OjKC.mjs";import{C as $}from"./Cue-B1IlY4Ae.mjs";import{H as z}from"./HideToggle-nvJtMFOZ.mjs";import{u as B}from"./useContainerName-DR_6TyDU.mjs";import"./styles-BOXm_R8o.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};
|