@nulib/clover 4.3.1 → 4.4.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/Items/Item.mjs +30 -21
- package/dist/components/Items/Items.mjs +3 -1
- package/dist/components/Items/PagerLayout.mjs +1 -0
- package/dist/components/Map/MapView.mjs +7 -6
- package/dist/components/Panel/PanelToggle.mjs +3 -1
- package/dist/index.d.mts +26 -3
- package/dist/index.mjs +2 -1
- package/dist/map/index.d.mts +6 -0
- package/dist/react/hooks.mjs +3 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/templates/document/Document.mjs +2 -3
- package/dist/templates/document/Sheets.mjs +30 -0
- package/dist/templates/index.d.mts +433 -0
- package/dist/templates/index.mjs +19 -2
- package/dist/templates/shared/LightboxView.mjs +7 -5
- package/dist/templates/shared/PanelPane.mjs +27 -13
- package/dist/templates.css +1 -1
- package/dist/ui/Button.mjs +3 -1
- package/dist/web-components/{About-j3O9cA3r.mjs → About-DgBOPS3N.mjs} +1 -1
- package/dist/web-components/{AnnotationItems-U0WmWGOh.mjs → AnnotationItems-CBEb7Cew.mjs} +1 -1
- package/dist/web-components/{AnnotationMenu-C1fAWWYy.mjs → AnnotationMenu-DiQyu45i.mjs} +1 -1
- package/dist/web-components/{AnnotationState-C9UhGpsr.mjs → AnnotationState-DemGGP7N.mjs} +1 -1
- package/dist/web-components/{Annotations-BtJ4IVmy.mjs → Annotations-CDVyd69_.mjs} +1 -1
- package/dist/web-components/{Annotations-YcFbQRJx.mjs → Annotations-oXpa3fvs.mjs} +1 -1
- package/dist/web-components/{Body-Ccxmucbr.mjs → Body-BNLhtQi3.mjs} +1 -1
- package/dist/web-components/{BodyAlert-BBSStCpI.mjs → BodyAlert-B0AblEtp.mjs} +1 -1
- package/dist/web-components/Button-0dU8Owcz.mjs +1 -0
- package/dist/web-components/{Camera-DSk-YFpW.mjs → Camera-BS8iIH74.mjs} +1 -1
- package/dist/web-components/{Canvas2DBackend-CYAJ-W6-.mjs → Canvas2DBackend-U4BLi8EN.mjs} +1 -1
- package/dist/web-components/{CanvasView-BAJ6OYvn.mjs → CanvasView-DeM04pm-.mjs} +2 -2
- package/dist/web-components/{CaptionDetails-Dg9Y11o_.mjs → CaptionDetails-CtRzBSwh.mjs} +1 -1
- package/dist/web-components/{ChaptersMenu-i4bFwR8c.mjs → ChaptersMenu-DJRfJSwC.mjs} +1 -1
- package/dist/web-components/{Chevron-BnlK9F4K.mjs → Chevron-BJFhP5wm.mjs} +1 -1
- package/dist/web-components/{ChoiceMenu-YXA7Ku8M.mjs → ChoiceMenu-Cfjnk3NG.mjs} +1 -1
- package/dist/web-components/{Collection-DgSFQbN-.mjs → Collection-C2ji8AVd.mjs} +1 -1
- package/dist/web-components/{CollectionSelect-PUcTh3Uv.mjs → CollectionSelect-CSTSqjG3.mjs} +1 -1
- package/dist/web-components/{Connected-B_caNIrW.mjs → Connected-B42WdjMx.mjs} +1 -1
- package/dist/web-components/{Connected-YgL5BWf5.mjs → Connected-C-Ars8eC.mjs} +1 -1
- package/dist/web-components/{Connected-XhRc6yaA.mjs → Connected-D2y_qBDh.mjs} +1 -1
- package/dist/web-components/{Contents-CoC4TK6G.mjs → Contents-BLbU9Qvc.mjs} +1 -1
- package/dist/web-components/{ControlMenu-CYfLg3Ok.mjs → ControlMenu-CJtszzgx.mjs} +1 -1
- package/dist/web-components/ControlsFade-Pye8AyCz.mjs +1 -0
- package/dist/web-components/{CountMenu-C7XawAoa.mjs → CountMenu-3-t8974M.mjs} +1 -1
- package/dist/web-components/Cue-eTms5gbr.mjs +1 -0
- package/dist/web-components/Document-CkKoLQ51.mjs +1 -0
- package/dist/web-components/{DomLayers-Bbrulm6v.mjs → DomLayers-DDRNVemT.mjs} +1 -1
- package/dist/web-components/{Download-CfRPt74Y.mjs → Download-VPFf23Kw.mjs} +1 -1
- package/dist/web-components/{EntryBodies-Bz8hyAUW.mjs → EntryBodies-CKgmBQCk.mjs} +1 -1
- package/dist/web-components/{EntryThumbnail-R9h0AXcu.mjs → EntryThumbnail-CgukpUtr.mjs} +1 -1
- package/dist/web-components/{FieldPill-DFIdy-hn.mjs → FieldPill-M9u0eLtz.mjs} +1 -1
- package/dist/web-components/{FrameAnimation-DFDuFwwt.mjs → FrameAnimation-C2EFrQl0.mjs} +1 -1
- package/dist/web-components/{Gallery-BrYWLufL.mjs → Gallery-mqXXjGtK.mjs} +1 -1
- package/dist/web-components/{HideToggle-geO9QfFR.mjs → HideToggle-HVrk9D6t.mjs} +1 -1
- package/dist/web-components/{ImageControls-B9PhCHqi.mjs → ImageControls-BsGWsB_S.mjs} +1 -1
- package/dist/web-components/Items-BoFm0Hlx.mjs +1 -0
- package/dist/web-components/{Label-S7o8PlWU.mjs → Label-GTBsGDCC.mjs} +1 -1
- package/dist/web-components/{LanguageChoice-URJJAdah.mjs → LanguageChoice-BEiskuVG.mjs} +1 -1
- package/dist/web-components/LightboxView-Daz0RCee.mjs +1 -0
- package/dist/web-components/{ListEnd-B0wGr87o.mjs → ListEnd-BPSaqeEg.mjs} +1 -1
- package/dist/web-components/{Loaded-Do53YvYw.mjs → Loaded-vg9q9y73.mjs} +1 -1
- package/dist/web-components/{LoadedCanvas-BrtGPpSm.mjs → LoadedCanvas-BtNg_QnI.mjs} +1 -1
- package/dist/web-components/LoadedMap-D9Z3zl12.mjs +1 -0
- package/dist/web-components/{Loading-Du3wn1EM.mjs → Loading-DnCFXiNy.mjs} +1 -1
- package/dist/web-components/{Map-B6LVO0gx.mjs → Map-CIGzy4XB.mjs} +1 -1
- package/dist/web-components/MapView-CExlNO5E.mjs +3 -0
- package/dist/web-components/{Markup-DACv7sRg.mjs → Markup-Csh1bNkq.mjs} +1 -1
- package/dist/web-components/{MediaBody-CcuO5IZT.mjs → MediaBody-CRJFBpMk.mjs} +1 -1
- package/dist/web-components/{MediaBody-DGd2uFfK.mjs → MediaBody-CeEWPIDp.mjs} +1 -1
- package/dist/web-components/{NavDate-DRKmjc54.mjs → NavDate-qoFXy3Ou.mjs} +1 -1
- package/dist/web-components/{Navigator-CA8zB6CU.mjs → Navigator-9n2yLQdc.mjs} +1 -1
- package/dist/web-components/{Pager-DWp6u3iv.mjs → Pager-4rZjWBna.mjs} +1 -1
- package/dist/web-components/PagerLayout-l6UNSoQ1.mjs +1 -0
- package/dist/web-components/{Panel-CzUDNn8M.mjs → Panel-ikILE92M.mjs} +1 -1
- package/dist/web-components/PanelPart-VPAwSoQZ.mjs +1 -0
- package/dist/web-components/PanelToggle-0K2YTp6k.mjs +1 -0
- package/dist/web-components/{PartOfManifest-Ct-I8Ofm.mjs → PartOfManifest-ZUGZW86B.mjs} +1 -1
- package/dist/web-components/{Pending-f1heQNo7.mjs → Pending-lpHOVvqE.mjs} +1 -1
- package/dist/web-components/{PlaceBox-_an9ya_W.mjs → PlaceBox-D73C--SU.mjs} +1 -1
- package/dist/web-components/{Placeholder-D4-VCxeD.mjs → Placeholder-ChFeaw7a.mjs} +1 -1
- package/dist/web-components/{Position-DA4rzRiy.mjs → Position-C2Hm7tJZ.mjs} +1 -1
- package/dist/web-components/{Primitives-DU_VhdO2.mjs → Primitives-CBRreXtS.mjs} +1 -1
- package/dist/web-components/{Provider-Dl_t_qEC.mjs → Provider-HPVBNZPr.mjs} +1 -1
- package/dist/web-components/{ReadMore-BpA8Dex8.mjs → ReadMore-DsthjUIZ.mjs} +1 -1
- package/dist/web-components/{Root-DixSZV9Y.mjs → Root-BJwk-F1e.mjs} +1 -1
- package/dist/web-components/Scene-DC7ofvsK.mjs +1 -0
- package/dist/web-components/{SceneView-BJNlboix.mjs → SceneView-C53yZtMZ.mjs} +1 -1
- package/dist/web-components/{Search-CvpKzlYP.mjs → Search-Cd0xLU3y.mjs} +1 -1
- package/dist/web-components/{Sections-BhfcUyaf.mjs → Sections-Cf3JDxnz.mjs} +1 -1
- package/dist/web-components/{SeekMarks-BfOrFnvQ.mjs → SeekMarks-DNHLgUaX.mjs} +1 -1
- package/dist/web-components/{StandaloneItems-CoiceHd8.mjs → StandaloneItems-DEchYe7Y.mjs} +1 -1
- package/dist/web-components/{Status-B4327UOL.mjs → Status-DLZANUzF.mjs} +1 -1
- package/dist/web-components/{Steps-ACdXJZrV.mjs → Steps-BigQvWNW.mjs} +1 -1
- package/dist/web-components/{TargetItems-D1bLKA_B.mjs → TargetItems-DzNzoEeh.mjs} +1 -1
- package/dist/web-components/Timeline--uq4-_TD.mjs +1 -0
- package/dist/web-components/{Tip-BatwzZZo.mjs → Tip-CoSRaKjm.mjs} +1 -1
- package/dist/web-components/{Transcript-B1nh9UJK.mjs → Transcript-Dex719tP.mjs} +1 -1
- package/dist/web-components/{Transport-DKb3XTMA.mjs → Transport-BV0Rg5Ym.mjs} +1 -1
- package/dist/web-components/{Transport-BsjGGbFJ.mjs → Transport-CHkvmPbN.mjs} +1 -1
- package/dist/web-components/{annotation-collection-CtxYL-V3.mjs → annotation-collection-DwJ2R8tG.mjs} +1 -1
- package/dist/web-components/{annotation-name-KQ4wAi8-.mjs → annotation-name-2rUtUYsN.mjs} +1 -1
- package/dist/web-components/{annotations-content-XVgQ5me7.mjs → annotations-content-fTNYRgN_.mjs} +1 -1
- package/dist/web-components/{body-CbYkzpmQ.mjs → body-qFClz6nF.mjs} +1 -1
- package/dist/web-components/{canvas-Du31_Dru.mjs → canvas-DqmG6v1g.mjs} +1 -1
- package/dist/web-components/{cloverEngine-CuRCXZNZ.mjs → cloverEngine-BBfVDNbE.mjs} +1 -1
- package/dist/web-components/{content-state-reader-DLlBY4Ox.mjs → content-state-reader-DYXL5lFa.mjs} +1 -1
- package/dist/web-components/{controlGlyphs-ClH59vLg.mjs → controlGlyphs-DqZmaT9n.mjs} +1 -1
- package/dist/web-components/{controls-smixEi0i.mjs → controls-BvC6zo32.mjs} +1 -1
- package/dist/web-components/custom-elements.json +22 -0
- package/dist/web-components/{downloads-BqkNwsM0.mjs → downloads-CFz0RnMz.mjs} +1 -1
- package/dist/web-components/{dragToClose-2joCF413.mjs → dragToClose-wFiErDub.mjs} +1 -1
- package/dist/web-components/{engine-DNTgJBST.mjs → engine-B0W3FXuQ.mjs} +1 -1
- package/dist/web-components/{engines-BpFZX2dO.mjs → engines-DVRUnyFv.mjs} +1 -1
- package/dist/web-components/{fetchManifest-B-poGgag.mjs → fetchManifest-f8gYlPDK.mjs} +1 -1
- package/dist/web-components/{fromManifest-Dw3BwjHM.mjs → fromManifest-BmpOsc5g.mjs} +1 -1
- package/dist/web-components/{glyphs-VoJVEqLE.mjs → glyphs-oAgi4Au0.mjs} +1 -1
- package/dist/web-components/{hooks-Syt1XLVX.mjs → hooks-uer3ZRx7.mjs} +1 -1
- package/dist/web-components/{image-layers-ryUJ_0bq.mjs → image-layers-CndzdWOW.mjs} +1 -1
- package/dist/web-components/{imageService-DBU_Xks1.mjs → imageService-DTp1mc0F.mjs} +1 -1
- package/dist/web-components/index-BkADsP3U.mjs +1 -0
- package/dist/web-components/index.d.mts +3 -0
- package/dist/web-components/index.mjs +1 -1
- package/dist/web-components/items-BWG13qDG.mjs +1 -0
- package/dist/web-components/{items-BQPvL5D6.mjs → items-SD92pRMN.mjs} +1 -1
- package/dist/web-components/label-Bw9SwLh8.mjs +1 -0
- package/dist/web-components/{layout-MzMKFa5I.mjs → layout-DrVnUBcm.mjs} +1 -1
- package/dist/web-components/{link-BUQQE9P2.mjs → link-CEfxl5hU.mjs} +1 -1
- package/dist/web-components/logo-Dzr2M4F7.mjs +1 -0
- package/dist/web-components/{models-wl-5vW2i.mjs → models-B-kri8Ov.mjs} +1 -1
- package/dist/web-components/{nodes-CmOpA3s7.mjs → nodes-BKoxD-el.mjs} +1 -1
- package/dist/web-components/{overlayImage-tb9-Md51.mjs → overlayImage-Dp8CjA_L.mjs} +1 -1
- package/dist/web-components/{panel-BPVyAugu.mjs → panel-ldBDfuIV.mjs} +1 -1
- package/dist/web-components/part-dr-d1XPo.mjs +1 -0
- package/dist/web-components/{playerSurface-BxxMV-va.mjs → playerSurface-CLWTmyt1.mjs} +1 -1
- package/dist/web-components/{pointer-BqgxBJ82.mjs → pointer-IZcH8rZy.mjs} +1 -1
- package/dist/web-components/{provider-B9oAQG-u.mjs → provider-D24Pm3a1.mjs} +1 -1
- package/dist/web-components/{range-regions-BFB1374L.mjs → range-regions-9vY5ikPm.mjs} +1 -1
- package/dist/web-components/{read-more-oWPk0OLi.mjs → read-more-CoOeWZOF.mjs} +1 -1
- package/dist/web-components/{readingLanguages-BigCi6rZ.mjs → readingLanguages-Bd4MD2DP.mjs} +1 -1
- package/dist/web-components/{rendererSurface-B_OOhxzA.mjs → rendererSurface-Ox625xUL.mjs} +2 -2
- package/dist/web-components/{renderers-CBupZj8Z.mjs → renderers-BXcv_AqV.mjs} +1 -1
- package/dist/web-components/{resource-B6uUsU6D.mjs → resource-DmK-8hJ-.mjs} +1 -1
- package/dist/web-components/{save-file-BaIrLp1V.mjs → save-file-Dj3MRR7Y.mjs} +1 -1
- package/dist/web-components/{search-DaGpvTki.mjs → search-C9OyY1qk.mjs} +1 -1
- package/dist/web-components/{shared-D2RadIoz.mjs → shared-BmkV0s_d.mjs} +1 -1
- package/dist/web-components/{show-link-Cxylys81.mjs → show-link-4mlfdoeo.mjs} +1 -1
- package/dist/web-components/{sizedImage-DchqGFdt.mjs → sizedImage-COfCkv_8.mjs} +1 -1
- package/dist/web-components/{split-oaEIep3T.mjs → split-Ci426kxC.mjs} +1 -1
- package/dist/web-components/{status-CfCgO5OB.mjs → status-CzasXLV8.mjs} +1 -1
- package/dist/web-components/styles-On1ck1Ob.mjs +1 -0
- package/dist/web-components/three.mjs +1 -1
- package/dist/web-components/{thumbnail-D83GaQ8C.mjs → thumbnail-ByuoouMG.mjs} +1 -1
- package/dist/web-components/{tip-CMEBtCil.mjs → tip-CQEGLOst.mjs} +1 -1
- package/dist/web-components/toggle-Dro_EmUU.mjs +1 -0
- package/dist/web-components/{useContainerName-fp0-n_9x.mjs → useContainerName-CUP-TlA5.mjs} +1 -1
- package/dist/web-components/{useControlsVisibility-BYZlgiAt.mjs → useControlsVisibility-DeI3NHWp.mjs} +1 -1
- package/dist/web-components/{useNearViewport-DMqMdvue.mjs → useNearViewport-yyUYq47j.mjs} +1 -1
- package/dist/web-components/{useScrollTrack-BHuPAWxB.mjs → useScrollTrack-CcFLYR4o.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationItems-ByWBkMRd.mjs +1 -0
- package/dist/web-components/viewer/{AnnotationMenu-BO18q_Ze.mjs → AnnotationMenu-C-9tbH4G.mjs} +1 -1
- package/dist/web-components/viewer/AnnotationState-CV4g-WUB.mjs +1 -0
- package/dist/web-components/viewer/{Annotations-C46kSUA6.mjs → Annotations-CJRF_IwO.mjs} +1 -1
- package/dist/web-components/viewer/{Annotations-DEKa_9xz.mjs → Annotations-t1K8U5Kp.mjs} +2 -2
- package/dist/web-components/viewer/{Canvas2DBackend-DHSI3dKr.mjs → Canvas2DBackend-DPDF0a8D.mjs} +1 -1
- package/dist/web-components/viewer/CaptionDetails-xzvdqP5N.mjs +1 -0
- package/dist/web-components/viewer/{ChaptersMenu-CIwIM2Pb.mjs → ChaptersMenu-D7b9t6bm.mjs} +1 -1
- package/dist/web-components/viewer/ChoiceMenu-f2774ZaY.mjs +1 -0
- package/dist/web-components/viewer/Collection-D1E6A8es.mjs +1 -0
- package/dist/web-components/viewer/{Connected-Bbk8M5rE.mjs → Connected-BLeqNIOf.mjs} +1 -1
- package/dist/web-components/viewer/{Connected-DAOMKtJR.mjs → Connected-DfqFYcTn.mjs} +1 -1
- package/dist/web-components/viewer/{Contents-BnRBx3rc.mjs → Contents-DvmP8OGy.mjs} +1 -1
- package/dist/web-components/viewer/{ControlMenu-Co6yBttc.mjs → ControlMenu-DIfN3xYJ.mjs} +1 -1
- package/dist/web-components/viewer/ControlsFade-sckPhZ4x.mjs +1 -0
- package/dist/web-components/viewer/{CountMenu-lu21fO_7.mjs → CountMenu-BQVCtVfu.mjs} +1 -1
- package/dist/web-components/viewer/Cue-DQ8q-fgb.mjs +1 -0
- package/dist/web-components/viewer/Document-B-nJpfDh.mjs +1 -0
- package/dist/web-components/viewer/{DomLayers-BjxGaZkt.mjs → DomLayers-CD56oMcR.mjs} +1 -1
- package/dist/web-components/viewer/{Download-DhMD4AJt.mjs → Download-DAOzY3Nu.mjs} +1 -1
- package/dist/web-components/viewer/{EntryBodies-DL5UolEz.mjs → EntryBodies-0A0uyEwC.mjs} +1 -1
- package/dist/web-components/viewer/{EntryThumbnail-CJisDcni.mjs → EntryThumbnail-fBaBZJGd.mjs} +1 -1
- package/dist/web-components/viewer/{FieldPill-DAk6zxxD.mjs → FieldPill-BQcDb4xM.mjs} +1 -1
- package/dist/web-components/viewer/{FrameAnimation-DGMuFNdW.mjs → FrameAnimation-kba5V4Vk.mjs} +1 -1
- package/dist/web-components/viewer/{Gallery-CbHhyWlF.mjs → Gallery-_0dEBq2w.mjs} +1 -1
- package/dist/web-components/viewer/HideToggle-D8c_7URN.mjs +1 -0
- package/dist/web-components/viewer/{ImageControls-BDx7C1q5.mjs → ImageControls-C_C0LSj7.mjs} +1 -1
- package/dist/web-components/viewer/{LanguageChoice-BM9xZr_D.mjs → LanguageChoice-0UWQ5V-y.mjs} +1 -1
- package/dist/web-components/viewer/LightboxView-Dnlf7m8l.mjs +1 -0
- package/dist/web-components/viewer/ListEnd-B2hnHrcl.mjs +1 -0
- package/dist/web-components/viewer/MapView-Cr3RiB1K.mjs +3 -0
- package/dist/web-components/viewer/{MediaBody-BokgnTO-.mjs → MediaBody-4ZFKNnr3.mjs} +1 -1
- package/dist/web-components/viewer/{MediaBody-DPOcyiYH.mjs → MediaBody-xjpo27Vw.mjs} +1 -1
- package/dist/web-components/viewer/{NavDate-B6rCV-Cd.mjs → NavDate-Dz5eW2XY.mjs} +1 -1
- package/dist/web-components/viewer/{Navigator-CjgUcgKY.mjs → Navigator-DNZcaADs.mjs} +1 -1
- package/dist/web-components/viewer/PagerLayout-PYWFPFSJ.mjs +1 -0
- package/dist/web-components/viewer/PanelPart-Bd0JqUwF.mjs +1 -0
- package/dist/web-components/viewer/{PartOfManifest-B0TYADTv.mjs → PartOfManifest-BHpVLJOn.mjs} +1 -1
- package/dist/web-components/viewer/{PlaceBox-Cjdjg-_9.mjs → PlaceBox-Bh9V3RLS.mjs} +1 -1
- package/dist/web-components/viewer/{Placeholder-MYLjXbiF.mjs → Placeholder-CLITKdu6.mjs} +1 -1
- package/dist/web-components/viewer/{Search-CyRrBHsr.mjs → Search-C0B5Jh9V.mjs} +1 -1
- package/dist/web-components/viewer/{SeekMarks-1WSjARP5.mjs → SeekMarks-B8cuyVgz.mjs} +1 -1
- package/dist/web-components/viewer/StandaloneItems-Cu0aBqAo.mjs +1 -0
- package/dist/web-components/viewer/Steps-DqszSHcR.mjs +1 -0
- package/dist/web-components/viewer/{TargetItems-BpmZEVMS.mjs → TargetItems-DN8ebfbK.mjs} +1 -1
- package/dist/web-components/viewer/{Transcript-CE4BsnWd.mjs → Transcript-D3mKmdQY.mjs} +1 -1
- package/dist/web-components/viewer/Transport-9f_lhebG.mjs +1 -0
- package/dist/web-components/viewer/{Transport-1ROUkfsf.mjs → Transport-BudReE7Y.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-collection-vM0aeJgP.mjs → annotation-collection-Drwfws4R.mjs} +1 -1
- package/dist/web-components/viewer/{annotation-name-kjUrGbhg.mjs → annotation-name-Bp2GHdpi.mjs} +1 -1
- package/dist/web-components/viewer/{annotations-content-CysDLy4t.mjs → annotations-content-Ci-orrao.mjs} +1 -1
- package/dist/web-components/viewer/{cloverEngine-S8GEd-YZ.mjs → cloverEngine-BmUppb5Y.mjs} +2 -2
- package/dist/web-components/viewer/{content-state-reader-BTZKS9Hq.mjs → content-state-reader-B9u1vc3t.mjs} +1 -1
- package/dist/web-components/viewer/{dragToClose-Bt4QtVSO.mjs → dragToClose-C9KwbQpA.mjs} +1 -1
- package/dist/web-components/viewer/{fetchManifest-D4aIqcDV.mjs → fetchManifest-gl9fyg7D.mjs} +1 -1
- package/dist/web-components/viewer/{host-ClJe-BX1.mjs → host-D3tVEhAD.mjs} +1 -1
- package/dist/web-components/viewer/image-layers-DSehEFmU.mjs +1 -0
- package/dist/web-components/viewer/index.mjs +1 -1
- package/dist/web-components/viewer/{link-CU71f0wU.mjs → link-BYKFtAno.mjs} +1 -1
- package/dist/web-components/viewer/overlayImage-CdgpMutd.mjs +1 -0
- package/dist/web-components/viewer/range-regions-CEM4sQKi.mjs +1 -0
- package/dist/web-components/viewer/{renderers-2BgvLkI0.mjs → renderers-BiDrFLxn.mjs} +1 -1
- package/dist/web-components/viewer/{save-file-BW7D7oYG.mjs → save-file-CzYUFJNg.mjs} +1 -1
- package/dist/web-components/viewer/{search-DBMO82DV.mjs → search-Dr6AQ3Lb.mjs} +1 -1
- package/dist/web-components/viewer/styles-DvZTMHkr.mjs +1 -0
- package/dist/web-components/viewer/{useControlsVisibility-DSSIzst5.mjs → useControlsVisibility-CP5m7oBd.mjs} +1 -1
- package/dist/web-components/viewer/viewer-DaG51iO3.mjs +29 -0
- package/dist/web-components/viewer/{vtt-Dk5bwDVQ.mjs → vtt-CDqR3lHn.mjs} +1 -1
- package/dist/web-components/viewer-DeAUI9Fi.mjs +1 -0
- package/dist/web-components/{vtt-9Ui3h60h.mjs → vtt-DHZRkZ_P.mjs} +1 -1
- package/package.json +1 -1
- package/dist/templates/shared/useLazyPanelPane.mjs +0 -16
- package/dist/web-components/Button-Bphsp8rv.mjs +0 -1
- package/dist/web-components/ControlsFade-BcGL7yUH.mjs +0 -1
- package/dist/web-components/Cue-DZJ5TBKU.mjs +0 -1
- package/dist/web-components/Document-DZDYR2Tk.mjs +0 -1
- package/dist/web-components/Items-C7wjylgH.mjs +0 -1
- package/dist/web-components/LightboxView-65ROPr0_.mjs +0 -1
- package/dist/web-components/LoadedMap-C06TIgvf.mjs +0 -1
- package/dist/web-components/MapView-CzV3y5iI.mjs +0 -3
- package/dist/web-components/PagerLayout-DHRpcI8x.mjs +0 -1
- package/dist/web-components/PanelPart-DKb9dXm6.mjs +0 -1
- package/dist/web-components/PanelToggle-D5sx5FP9.mjs +0 -1
- package/dist/web-components/Scene-CSaXgBNr.mjs +0 -1
- package/dist/web-components/Timeline-DY8LpnOG.mjs +0 -1
- package/dist/web-components/index-DGXCFoHu.mjs +0 -1
- package/dist/web-components/items-TIbaHoB8.mjs +0 -1
- package/dist/web-components/label-Bd-QYEXn.mjs +0 -1
- package/dist/web-components/logo-Cn820OoX.mjs +0 -1
- package/dist/web-components/part-DeZI8Hmp.mjs +0 -1
- package/dist/web-components/styles-DZIDbHxL.mjs +0 -1
- package/dist/web-components/toggle-3NncfBSZ.mjs +0 -1
- package/dist/web-components/useLazyPanelPane-DXYGGS7f.mjs +0 -1
- package/dist/web-components/viewer/AnnotationItems-B5Vs0dYi.mjs +0 -1
- package/dist/web-components/viewer/AnnotationState-ZPmnCpbZ.mjs +0 -1
- package/dist/web-components/viewer/CaptionDetails-BVCqV9NT.mjs +0 -1
- package/dist/web-components/viewer/ChoiceMenu-Ww7lcPnq.mjs +0 -1
- package/dist/web-components/viewer/Collection-DCYM9eE6.mjs +0 -1
- package/dist/web-components/viewer/ControlsFade-pOQ5VQ5i.mjs +0 -1
- package/dist/web-components/viewer/Cue-oaiVO9ZO.mjs +0 -1
- package/dist/web-components/viewer/Document-ByBRhL68.mjs +0 -1
- package/dist/web-components/viewer/HideToggle-C6B9B2Bo.mjs +0 -1
- package/dist/web-components/viewer/LightboxView-RrioB0CN.mjs +0 -1
- package/dist/web-components/viewer/ListEnd-8vdKw6Py.mjs +0 -1
- package/dist/web-components/viewer/MapView-G3yj-Bjd.mjs +0 -3
- package/dist/web-components/viewer/PagerLayout-LZmC6VpV.mjs +0 -1
- package/dist/web-components/viewer/PanelPart-Cw1G5W4b.mjs +0 -1
- package/dist/web-components/viewer/StandaloneItems-CQrzTSPC.mjs +0 -1
- package/dist/web-components/viewer/Steps-Bd42-eq7.mjs +0 -1
- package/dist/web-components/viewer/Transport-g0_Cjy0f.mjs +0 -1
- package/dist/web-components/viewer/image-layers-DGa5HJt8.mjs +0 -1
- package/dist/web-components/viewer/overlayImage-D9GHzMmm.mjs +0 -1
- package/dist/web-components/viewer/range-regions-CiceyEuu.mjs +0 -1
- package/dist/web-components/viewer/styles-DogZyfVz.mjs +0 -1
- package/dist/web-components/viewer/useLazyPanelPane-_6IY7cV5.mjs +0 -1
- package/dist/web-components/viewer/viewer-ClQD1LNQ.mjs +0 -29
- package/dist/web-components/viewer-DLfZQmZs.mjs +0 -1
|
@@ -3,11 +3,76 @@
|
|
|
3
3
|
import * as P4 from '@iiif/parser/presentation-4/types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Where an annotation points, read from any form of Presentation 4 target:
|
|
8
|
+
*
|
|
9
|
+
* - a URI, `canvas#xywh=x,y,w,h` or `canvas#t=start,end`;
|
|
10
|
+
* - a reference, `{ id, type }`, whose id carries the same fragments (what the upgrader
|
|
11
|
+
* makes of a Presentation 3 string target);
|
|
12
|
+
* - a `SpecificResource`, `{ source, selector }`, with a `FragmentSelector`,
|
|
13
|
+
* `PointSelector` or `SvgSelector` (or an array of them, of which the first that
|
|
14
|
+
* applies wins);
|
|
15
|
+
* - several of these, as Presentation 4 groups them (`Independents`, `List`,
|
|
16
|
+
* `Composite`, which the upgrader makes of a Presentation 3 array), of which this reads
|
|
17
|
+
* the first; `annotationTargets` (`components/Canvas/track.ts`, with the hotspots that
|
|
18
|
+
* follow a recording) reads them all.
|
|
19
|
+
*
|
|
20
|
+
* A fragment may give a region and a time at once (`xywh=…&t=…`, both dimensions of a
|
|
21
|
+
* Media Fragment): the region through that stretch of a recording.
|
|
22
|
+
*/
|
|
23
|
+
export interface ParsedAnnotationTarget {
|
|
24
|
+
/** The Canvas (or other resource) targeted, without its fragment. */
|
|
25
|
+
id: string;
|
|
26
|
+
point?: {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
rect?: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
w: number;
|
|
34
|
+
h: number;
|
|
35
|
+
};
|
|
36
|
+
svg?: string;
|
|
37
|
+
/** A media fragment's time, as written: `start` or `start,end`. */
|
|
38
|
+
t?: string;
|
|
39
|
+
}
|
|
6
40
|
/**
|
|
7
41
|
* IIIF language maps as text: the closest language to the reader's, and that language's
|
|
8
42
|
* tag, so the text can carry a `lang` attribute.
|
|
9
43
|
*/
|
|
10
44
|
export type LanguageMapLike = string | Record<string, string[] | string | undefined> | null | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* What an annotation says: its text bodies (plain, HTML or Markdown, as their `format`
|
|
47
|
+
* says), its images (Cookbook 0377) and its named places (Cookbook 0139), each read too
|
|
48
|
+
* where a `SpecificResource` holds it as its `source` (Cookbook 0045: a comment's words,
|
|
49
|
+
* given a `styleClass`). Caption files belong to the media transcript, so are left out.
|
|
50
|
+
* Light, for the Canvas's caption as well as the lists.
|
|
51
|
+
*/
|
|
52
|
+
export interface AnnotationBodyEntry {
|
|
53
|
+
/** `TextualBody` text, as published: plain, or IIIF's limited HTML. */
|
|
54
|
+
value?: string;
|
|
55
|
+
format?: string;
|
|
56
|
+
language?: string;
|
|
57
|
+
/** An image body (Cookbook 0377): its URL. */
|
|
58
|
+
image?: string;
|
|
59
|
+
/**
|
|
60
|
+
* An image body's label, else its annotation's: the image's text alternative. A place's
|
|
61
|
+
* name, its feature's `label`, else its annotation's.
|
|
62
|
+
*/
|
|
63
|
+
label?: LanguageMapLike;
|
|
64
|
+
/**
|
|
65
|
+
* A place, a GeoJSON `Feature` (Cookbook 0139: a map on the page, tagged with where it
|
|
66
|
+
* shows): named by its `label`, which the Map draws it under too.
|
|
67
|
+
*/
|
|
68
|
+
place?: true;
|
|
69
|
+
/**
|
|
70
|
+
* One item of a `Choice` (Cookbook 0346: the same words in English and in Japanese), by
|
|
71
|
+
* the choice's place among the annotation's: of each, one shows, the one in the reader's
|
|
72
|
+
* language (`bodyInLanguage`, `core/annotation-name.ts`).
|
|
73
|
+
*/
|
|
74
|
+
choice?: number;
|
|
75
|
+
}
|
|
11
76
|
export type Presentation4Canvas = P4.Canvas;
|
|
12
77
|
export type Presentation4Scene = P4.Scene;
|
|
13
78
|
export type Presentation4Timeline = P4.Timeline;
|
|
@@ -16,6 +81,74 @@ export type Presentation4Timeline = P4.Timeline;
|
|
|
16
81
|
* Timeline (`Timeline`, sound) or a Scene (`Scene`, 3D).
|
|
17
82
|
*/
|
|
18
83
|
export type Container = Presentation4Canvas | Presentation4Timeline | Presentation4Scene;
|
|
84
|
+
/**
|
|
85
|
+
* Annotations to read and to point at: everything a Manifest's Canvases carry in their
|
|
86
|
+
* `annotations` (comments, tags, transcriptions, descriptions), and pages a host adds.
|
|
87
|
+
* Painting annotations are the picture, not commentary, and caption files belong to the
|
|
88
|
+
* media transcript, so neither is listed here.
|
|
89
|
+
*
|
|
90
|
+
* A set is one AnnotationPage. Sets are memoized on the Manifest and the added pages, so
|
|
91
|
+
* the same arrays come back while nothing changes.
|
|
92
|
+
*/
|
|
93
|
+
export interface AnnotationEntry {
|
|
94
|
+
id: string;
|
|
95
|
+
/** The set it came from. */
|
|
96
|
+
setId: string;
|
|
97
|
+
/** The Canvas it targets. */
|
|
98
|
+
canvasId: string;
|
|
99
|
+
target: ParsedAnnotationTarget;
|
|
100
|
+
motivation: string[];
|
|
101
|
+
bodies: AnnotationBodyEntry[];
|
|
102
|
+
/** The annotation as published, for a host's own rendering. */
|
|
103
|
+
annotation: Record<string, any>;
|
|
104
|
+
/**
|
|
105
|
+
* A Range's region (`range-regions.ts`): its place among the Range's parts, "1 of 4",
|
|
106
|
+
* which its hotspot shows after its name.
|
|
107
|
+
*/
|
|
108
|
+
place?: {
|
|
109
|
+
index: number;
|
|
110
|
+
total: number;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* An annotation of one image of a `Choice` (Cookbook 0326: an X-ray's tag), not of the
|
|
114
|
+
* Canvas: the choice's key (`core/choice-key.ts`), the item's place in it, and the
|
|
115
|
+
* image's id. It is drawn while that item is the one chosen, and its `target` is given
|
|
116
|
+
* here in the Canvas's terms, placed through the image's painting.
|
|
117
|
+
*/
|
|
118
|
+
layer?: {
|
|
119
|
+
key: string;
|
|
120
|
+
item: number;
|
|
121
|
+
image: string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** An annotation page a Canvas names: by id, its Canvas, and whether it is fetched. */
|
|
125
|
+
export interface AnnotationPageRef {
|
|
126
|
+
id: string;
|
|
127
|
+
canvasId: string;
|
|
128
|
+
fetched: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Annotations walked as one whole, as a viewer walks a Collection's members: the
|
|
132
|
+
* AnnotationPage or AnnotationCollection given as the content (James Turner's tags across
|
|
133
|
+
* Manifests, all in hand), else an AnnotationCollection the Manifest's annotation pages
|
|
134
|
+
* are part of (Cookbook 0309: layout markup across a newspaper's pages, managed as one
|
|
135
|
+
* whole), whose pages load as the reader reaches them.
|
|
136
|
+
*/
|
|
137
|
+
export interface AnnotationCollection {
|
|
138
|
+
id: string;
|
|
139
|
+
type: "AnnotationPage" | "AnnotationCollection";
|
|
140
|
+
label?: LanguageMapLike;
|
|
141
|
+
/** The number of its annotations, where it says. */
|
|
142
|
+
total?: number;
|
|
143
|
+
/**
|
|
144
|
+
* The Manifest's pages of it, in the Canvases' order, so a listing loads them as the
|
|
145
|
+
* reader reaches them (`usePagesReached`, `clover.fetchAnnotationPages`). None for the
|
|
146
|
+
* content's, whose annotations are all in hand.
|
|
147
|
+
*/
|
|
148
|
+
pages: AnnotationPageRef[];
|
|
149
|
+
/** Its annotations on the Manifest's Canvases, in their order, as far as fetched. */
|
|
150
|
+
entries: AnnotationEntry[];
|
|
151
|
+
}
|
|
19
152
|
/**
|
|
20
153
|
* How Clover asks for things: one setting for every request it makes — the IIIF resource,
|
|
21
154
|
* referenced annotation pages, `info.json`, tiles, captions and HLS segments.
|
|
@@ -334,6 +467,12 @@ export interface ItemsProps extends Omit<React.HTMLAttributes<HTMLElement>, "onS
|
|
|
334
467
|
* `summary` (the default), its `navDate`, or `none`. Default `"summary"`.
|
|
335
468
|
*/
|
|
336
469
|
secondary?: ItemSecondary;
|
|
470
|
+
/**
|
|
471
|
+
* Show each item's label, and the line under it, beside its picture (`true`, the
|
|
472
|
+
* default). `false` shows the pictures alone: the labels are hidden from sight but kept
|
|
473
|
+
* as each item's name for assistive technology (WCAG 4.1.2). Default `true`.
|
|
474
|
+
*/
|
|
475
|
+
labels?: boolean;
|
|
337
476
|
/**
|
|
338
477
|
* The pager's size: `large` (the default), round controls; or `small`, its steps and
|
|
339
478
|
* count as Search's are, for a header's line. Default `"large"`.
|
|
@@ -415,6 +554,77 @@ export type PanelSectionLabel = string | Readonly<Record<string, string>>;
|
|
|
415
554
|
export type PanelSectionLabels = Partial<Record<PanelSection, PanelSectionLabel>>;
|
|
416
555
|
/** How an information panel lays out its sections. */
|
|
417
556
|
export type PanelLayout = SectionsLayout;
|
|
557
|
+
export interface PanelProps extends Omit<React.HTMLAttributes<HTMLElement>, "defaultValue"> {
|
|
558
|
+
/**
|
|
559
|
+
* `tabs` (the default): a row of tabs, one section shown at a time. `accordion`: the
|
|
560
|
+
* sections stacked as boxes, each opened by its heading, one always open.
|
|
561
|
+
*/
|
|
562
|
+
layout?: PanelLayout;
|
|
563
|
+
/** The tab shown, controlled (`tabs`). */
|
|
564
|
+
value?: string;
|
|
565
|
+
/**
|
|
566
|
+
* The tab shown first (`tabs`), or the box open to start with (`accordion`). Default:
|
|
567
|
+
* the first.
|
|
568
|
+
*/
|
|
569
|
+
defaultValue?: string;
|
|
570
|
+
/** Called with the tab chosen, or the box opened. */
|
|
571
|
+
onValueChange?: (value: string) => void;
|
|
572
|
+
/**
|
|
573
|
+
* The panel can be closed: a close button appears in it. Closing from inside the panel
|
|
574
|
+
* hands focus back to the control that opens it (whatever has `aria-controls` naming the
|
|
575
|
+
* panel or an element around it), so focus is never left on something hidden.
|
|
576
|
+
*/
|
|
577
|
+
onClose?: () => void;
|
|
578
|
+
/**
|
|
579
|
+
* The panel floats over the page: Escape inside it closes it too, and its close button
|
|
580
|
+
* sits at its inner edge (the start, for a panel over the end of the page) rather than
|
|
581
|
+
* the end of its first row. A panel docked beside the Body needs neither, and is
|
|
582
|
+
* better without `onClose` at all: the toggle that opens it closes it.
|
|
583
|
+
*/
|
|
584
|
+
closeOnEscape?: boolean;
|
|
585
|
+
/**
|
|
586
|
+
* The level of the sections' headings (`accordion`), one under the heading the panel
|
|
587
|
+
* belongs to. The default sections' own headings are a level below them; tabs are not
|
|
588
|
+
* headings, so there they start at this level. Default 3.
|
|
589
|
+
*/
|
|
590
|
+
headingLevel?: number;
|
|
591
|
+
/** The element to render. Default `aside`. */
|
|
592
|
+
as?: React.ElementType;
|
|
593
|
+
/**
|
|
594
|
+
* Whether About's heading offers the downloads, by a Download button that lists the
|
|
595
|
+
* `rendering` of the page in view and of the Manifest. Default `true`.
|
|
596
|
+
*/
|
|
597
|
+
download?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Where what the resource says of itself comes in several languages, About's heading
|
|
600
|
+
* offers them, and the whole Root reads in the one chosen. Default `true`; `false`
|
|
601
|
+
* leaves the choice out, and the Root reads in its `language`, else the reader's.
|
|
602
|
+
*/
|
|
603
|
+
languages?: boolean;
|
|
604
|
+
/**
|
|
605
|
+
* Which of the default sections the panel may have, in Clover's own order: with
|
|
606
|
+
* `["contents", "search"]` it has those two and no About. Each still shows only where
|
|
607
|
+
* the resource has data for it, so a resource with none of them draws no panel at all.
|
|
608
|
+
* `Tab` children win over it. Default: every section.
|
|
609
|
+
*/
|
|
610
|
+
sections?: readonly PanelSection[];
|
|
611
|
+
/**
|
|
612
|
+
* What a default section's tab or heading says, in place of Clover's own word for it:
|
|
613
|
+
* `{ annotations: "Chapters" }`, or `{ annotations: { en: "Chapters", de: "Kapitel" } }`
|
|
614
|
+
* to say it in several, read in the one Clover speaks and marked with its language
|
|
615
|
+
* where that is not the page's (WCAG 3.1.2). A `Tab` of your own says it in `label`.
|
|
616
|
+
*/
|
|
617
|
+
labels?: PanelSectionLabels;
|
|
618
|
+
/**
|
|
619
|
+
* `Clover.Tab`s, the panel's sections whole, in their order: they win over `sections`.
|
|
620
|
+
* Without any, the panel has the tabs Clover has data for: About,
|
|
621
|
+
* Contents when the Manifest has Ranges, Search when it has a Content Search service, a
|
|
622
|
+
* Map when it (or a Canvas or annotation) has navPlace or a georeference,
|
|
623
|
+
* a Transcript when the view's media has captions or a plain-text transcript, and
|
|
624
|
+
* Annotations when there are any.
|
|
625
|
+
*/
|
|
626
|
+
children?: React.ReactNode;
|
|
627
|
+
}
|
|
418
628
|
export type DefaultProps = Omit<RootProps, "children"> & {
|
|
419
629
|
/** The header over the Body: the resource's title and provider. Default `true`. */
|
|
420
630
|
header?: boolean;
|
|
@@ -661,6 +871,210 @@ export type GalleryProps = Omit<RootProps, "children"> & {
|
|
|
661
871
|
* closes it, and focus returns to the cell.
|
|
662
872
|
*/
|
|
663
873
|
export declare function Gallery({ className, size, height, gap, items, secondary, summary, lightboxItems, panel, defaultPanelOpen, panelLayout, panelSections, panelLabels, download, languages, storageKey, headingLevel, collapseControls, canvasOptions, style, ...root }: GalleryProps): React.JSX.Element;
|
|
874
|
+
/**
|
|
875
|
+
* Focus that follows a control as it moves. A toggle drawn in one place while its pane is
|
|
876
|
+
* open and in another while it is shut is a new element after every press, and the one
|
|
877
|
+
* pressed goes with focus on it; focus is never left on what is gone or hidden (WCAG
|
|
878
|
+
* 2.4.3). Call the returned function, with a way to find the control, as the change that
|
|
879
|
+
* moves it is made. From the next frame, once the control is in its new place and focus
|
|
880
|
+
* has gone (with the element it was on, or the pane it was in), the control takes it.
|
|
881
|
+
* Frame by frame, not after a render: React may commit the move a render or more later
|
|
882
|
+
* (a Canvas draws its controls later still). If the reader puts focus somewhere of their
|
|
883
|
+
* own meanwhile, it is left there. A layout whose panes' toggles all move gives them one,
|
|
884
|
+
* so a later follow takes over from any before it: focus has one place to go.
|
|
885
|
+
*/
|
|
886
|
+
export declare function useFollowFocus(): (find: () => HTMLElement | null | undefined) => void;
|
|
887
|
+
export type PanelPart = React.ComponentType<PanelProps>;
|
|
888
|
+
export interface PanelPaneOptions {
|
|
889
|
+
/** The pane's `id`, which its toggle's `aria-controls` names. */
|
|
890
|
+
id: string;
|
|
891
|
+
/**
|
|
892
|
+
* Whether there is room for it beside the Body (`useWideEnough`): `undefined` until
|
|
893
|
+
* measured, and beside until then, as on the server.
|
|
894
|
+
*/
|
|
895
|
+
beside: boolean | undefined;
|
|
896
|
+
/** Whether it starts open beside the Body. Over the Body it always starts closed. */
|
|
897
|
+
defaultOpen: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* The Body's side it sits on, and slides in from over the Body: `"end"` (the default,
|
|
900
|
+
* every template's) or `"start"`. `PanelPane` goes after the main `SplitPane` for the
|
|
901
|
+
* end, and before it for the start (Mat, 2026-11-04: the Helpers page's Map example).
|
|
902
|
+
*/
|
|
903
|
+
side?: "start" | "end";
|
|
904
|
+
/** The layout's `useFollowFocus`, one for all its drawers. */
|
|
905
|
+
followFocus: ReturnType<typeof useFollowFocus>;
|
|
906
|
+
/**
|
|
907
|
+
* The Body its toggle sits level with on the spine, its top measured as it moves
|
|
908
|
+
* (`useSpineTop`): a title over it wrapping, the bar dragged. Without one, the toggle
|
|
909
|
+
* sits the inset down from the spine's top, as the Body starts there.
|
|
910
|
+
*/
|
|
911
|
+
body?: () => HTMLElement | null | undefined;
|
|
912
|
+
/**
|
|
913
|
+
* The sections the panel may have (`Clover.Panel`'s `sections`). Where the resource has
|
|
914
|
+
* none of them the pane and its toggle are left out altogether, so a layout never keeps
|
|
915
|
+
* room for a panel with nothing in it.
|
|
916
|
+
*/
|
|
917
|
+
sections?: readonly PanelSection[];
|
|
918
|
+
/**
|
|
919
|
+
* The Panel, `Clover.Panel`, drawn at once, on the server too: Default's. Without it,
|
|
920
|
+
* the pane loads the Panel's code itself (Mat, 2026-11-04: "always lazy if started
|
|
921
|
+
* closed. not lazy if open"): at once where it starts open, and otherwise as the
|
|
922
|
+
* reader reaches for its toggle (pointed at or focused), or on a first press, which
|
|
923
|
+
* waits for it, then opens the panel whole, so focus has its section to go to.
|
|
924
|
+
* Document's and the lightbox's, which start shut or out of sight.
|
|
925
|
+
*/
|
|
926
|
+
panel?: PanelPart;
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* The information panel beside the Body, one for every template (Mat, 2026-11-01: "an
|
|
930
|
+
* abstracted pane and not recreating the wheel for every template"): Default's, Document's
|
|
931
|
+
* and the Gallery's lightbox's. Its rule is `useDrawer`'s: beside the Body, a pane of its
|
|
932
|
+
* own past a bar that shares the width, where there is room for both; over the Body where
|
|
933
|
+
* there is not, sliding in, taking focus, and put away by Escape, its close button, a
|
|
934
|
+
* press on the Body beside it or a drag back off the end. Its toggle (`PanelToggle`) sits
|
|
935
|
+
* on the spine, the bar between them, while the panel is open beside the Body, and among
|
|
936
|
+
* the Body's controls otherwise, which the template places (`toggle`, while `!docked`): a
|
|
937
|
+
* press moves it, and focus follows it there. `PanelPane` draws the rest.
|
|
938
|
+
*
|
|
939
|
+
* The template's `Split` takes `splitProps`: where the panel is, Escape over the Body, and
|
|
940
|
+
* the reach that loads its code and the drag's.
|
|
941
|
+
*/
|
|
942
|
+
export declare function usePanelPane({ id, beside, defaultOpen, side, followFocus, body, sections, panel, }: PanelPaneOptions): {
|
|
943
|
+
id: string;
|
|
944
|
+
side: "start" | "end";
|
|
945
|
+
/** Open beside the Body: its bar and spine drawn, its toggle on the spine. */
|
|
946
|
+
docked: boolean;
|
|
947
|
+
spine: React.RefObject<HTMLDivElement | null>;
|
|
948
|
+
/** The toggle: the template draws it among the Body's controls while `!docked`. */
|
|
949
|
+
toggle: React.JSX.Element;
|
|
950
|
+
Part: PanelPart | undefined;
|
|
951
|
+
splitProps: {
|
|
952
|
+
"data-panel": string;
|
|
953
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
954
|
+
onPointerOver: (event: React.SyntheticEvent) => void;
|
|
955
|
+
onFocus: (event: React.SyntheticEvent) => void;
|
|
956
|
+
};
|
|
957
|
+
pane: React.RefObject<HTMLElement | null>;
|
|
958
|
+
over: boolean;
|
|
959
|
+
open: boolean;
|
|
960
|
+
shown: boolean;
|
|
961
|
+
opened: boolean;
|
|
962
|
+
setOpen: (next: boolean) => void;
|
|
963
|
+
close: () => void;
|
|
964
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
965
|
+
scrim: false | {
|
|
966
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
967
|
+
"data-open": boolean;
|
|
968
|
+
"aria-hidden": boolean;
|
|
969
|
+
onMouseDown: (event: React.MouseEvent) => void;
|
|
970
|
+
onClick: () => void;
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
export type PanelPaneState = ReturnType<typeof usePanelPane>;
|
|
974
|
+
/**
|
|
975
|
+
* The panel's side of a template's `Split`, after its main pane (before it, for the
|
|
976
|
+
* start side): while docked, the bar and the spine holding the toggle, between the two;
|
|
977
|
+
* the pane itself (`clover-template-panel`), its Panel given `onClose` and Escape while
|
|
978
|
+
* it floats over the Body; and, over the Body, the wash beside it. Nothing at all where the resource has none of the panel's sections: a
|
|
979
|
+
* template keeps no room, and no toggle, for a panel that would draw nothing. Its look is
|
|
980
|
+
* written once, in `Default.css`, which `styles.css` carries.
|
|
981
|
+
*/
|
|
982
|
+
export declare function PanelPane({ pane, className, ...panel }: {
|
|
983
|
+
pane: PanelPaneState;
|
|
984
|
+
className?: string;
|
|
985
|
+
} & Omit<PanelProps, "onClose" | "closeOnEscape">): React.JSX.Element | null;
|
|
986
|
+
export interface DrawerOptions {
|
|
987
|
+
/** The pane's `id`, which its toggle's `aria-controls` names. */
|
|
988
|
+
id: string;
|
|
989
|
+
/**
|
|
990
|
+
* Whether there is room for it beside the page (`useWideEnough`): `undefined` until
|
|
991
|
+
* measured, and beside until then, as on the server.
|
|
992
|
+
*/
|
|
993
|
+
beside: boolean | undefined;
|
|
994
|
+
/** Whether it starts open beside the page. Over the page it always starts closed. */
|
|
995
|
+
defaultOpen: boolean;
|
|
996
|
+
/** The edge it floats from over the page, and is dragged back to. */
|
|
997
|
+
side: "start" | "end";
|
|
998
|
+
/** Where focus goes as the reader opens it over the page. Default: the panel's. */
|
|
999
|
+
focus?: (pane: HTMLElement) => HTMLElement | null | undefined;
|
|
1000
|
+
/** Over the page it slides in and out; `false`, it simply shows and hides. */
|
|
1001
|
+
slides?: boolean;
|
|
1002
|
+
/** What sits on its edge and moves with it as it is dragged (its toggle, on its spine). */
|
|
1003
|
+
alongside?: React.RefObject<HTMLElement | null>;
|
|
1004
|
+
/**
|
|
1005
|
+
* The layout's `useFollowFocus`, one for all its drawers, so that a later follow takes
|
|
1006
|
+
* over from any before it.
|
|
1007
|
+
*/
|
|
1008
|
+
followFocus: ReturnType<typeof useFollowFocus>;
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* A pane beside the page where there is room, and a drawer over it where there is not:
|
|
1012
|
+
* Document's panel and thumbnails. One rule (Mat, 2026-10-27), which Default's panel
|
|
1013
|
+
* follows in its own code (one drawer; through this hook it would weigh more):
|
|
1014
|
+
*
|
|
1015
|
+
* - Beside the page it opens as the host asks, then as the reader chooses.
|
|
1016
|
+
* - Over the page it starts closed, whatever the host asks, and closes as the layout
|
|
1017
|
+
* narrows under it: open, it would cover what the reader came for, focus behind it
|
|
1018
|
+
* (WCAG 2.4.11). Focus in it goes to its toggle. Widening brings it back beside.
|
|
1019
|
+
* - Opened over the page, it takes focus (`focus`). Escape anywhere, a press on the wash
|
|
1020
|
+
* beside it, a drag back off the way it came or its toggle puts it away, and focus in
|
|
1021
|
+
* it goes to its toggle; focus elsewhere is left where it is.
|
|
1022
|
+
*
|
|
1023
|
+
* Its toggle is the button whose `aria-controls` names it. A toggle the template draws
|
|
1024
|
+
* in another place as the pane opens or closes is followed there (`useFollowFocus`).
|
|
1025
|
+
*/
|
|
1026
|
+
export declare function useDrawer({ id, beside: measured, defaultOpen, side, focus, slides, alongside, followFocus, }: DrawerOptions): {
|
|
1027
|
+
pane: React.RefObject<HTMLElement | null>;
|
|
1028
|
+
/** Over the page, where there is no room beside it. */
|
|
1029
|
+
over: boolean;
|
|
1030
|
+
open: boolean;
|
|
1031
|
+
/** In the layout: open, or over the page still sliding out. Its pane's `hidden` is `!shown`. */
|
|
1032
|
+
shown: boolean;
|
|
1033
|
+
/** Open and, over the page, slid in: its pane's `data-open`. */
|
|
1034
|
+
opened: boolean;
|
|
1035
|
+
setOpen: (next: boolean) => void;
|
|
1036
|
+
close: () => void;
|
|
1037
|
+
/** For the layout's `onKeyDown`: Escape anywhere puts it away over the page. */
|
|
1038
|
+
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
1039
|
+
scrim: false | {
|
|
1040
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
1041
|
+
"data-open": boolean;
|
|
1042
|
+
"aria-hidden": boolean;
|
|
1043
|
+
onMouseDown: (event: React.MouseEvent) => void;
|
|
1044
|
+
onClick: () => void;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Starts loading the drag's code as the reader reaches for a floating pane's toggle
|
|
1049
|
+
* (pointed at, pressed or focused; Mat, 2026-10-31), so it is there as the pane opens: a
|
|
1050
|
+
* swipe right after is never missed while it loads. A layout whose panes sit beside the
|
|
1051
|
+
* page never calls it.
|
|
1052
|
+
*/
|
|
1053
|
+
export declare function preloadDrag(): void;
|
|
1054
|
+
/**
|
|
1055
|
+
* The narrowest the page (Default's Body, Document's pages) and the panel may be dragged,
|
|
1056
|
+
* side by side: one pair for both templates, so their layouts never drift apart.
|
|
1057
|
+
*/
|
|
1058
|
+
export declare const PAGE_MIN = "16rem";
|
|
1059
|
+
export declare const PANEL_MIN = "14rem";
|
|
1060
|
+
/**
|
|
1061
|
+
* The room the two need beside each other: their minimums and the bar between them. Any
|
|
1062
|
+
* narrower (a phone) and the panel slides over the page instead.
|
|
1063
|
+
*/
|
|
1064
|
+
export declare const BESIDE_REM: number;
|
|
1065
|
+
/**
|
|
1066
|
+
* Whether `element` is at least `rem` wide: measured before paint, and again whenever it
|
|
1067
|
+
* resizes. Its own width, not the window's, so a layout in a narrow column of a wide page
|
|
1068
|
+
* still knows it is narrow. `undefined` until measured (on the server, or with no layout
|
|
1069
|
+
* yet), so the first measure is never mistaken for the layout narrowing or widening.
|
|
1070
|
+
*/
|
|
1071
|
+
export declare function useWideEnough(element: React.RefObject<HTMLElement | null>, rem: number): boolean | undefined;
|
|
1072
|
+
/**
|
|
1073
|
+
* Starts loading the lightbox's view before it is first opened: as the reader's pointer or
|
|
1074
|
+
* focus first comes to the layout, so the Body is there, or nearly, by the time they open
|
|
1075
|
+
* a view.
|
|
1076
|
+
*/
|
|
1077
|
+
export declare const preloadLightbox: () => undefined;
|
|
664
1078
|
export interface LightboxProps {
|
|
665
1079
|
open: boolean;
|
|
666
1080
|
onClose: () => void;
|
|
@@ -703,6 +1117,18 @@ export interface LightboxProps {
|
|
|
703
1117
|
collapseControls?: "auto" | "always";
|
|
704
1118
|
/** The Body's Canvas `options`: its gestures, zoom limits and motion. */
|
|
705
1119
|
canvasOptions?: CloverCanvasOptions;
|
|
1120
|
+
/**
|
|
1121
|
+
* The Body's `placeholder`: a Canvas's `placeholderContainer` first (the default), or,
|
|
1122
|
+
* `false`, the Canvas itself at once.
|
|
1123
|
+
*/
|
|
1124
|
+
placeholder?: boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* The current Canvas's label under the Body. Default `true`; `false` leaves it out, as
|
|
1127
|
+
* a single image with its caption beside it on the page needs no second one (Mat,
|
|
1128
|
+
* 2026-11-04: "remove canvas label"). The dialog is named by the Manifest's label all
|
|
1129
|
+
* the same, or the Canvas's where there is none.
|
|
1130
|
+
*/
|
|
1131
|
+
caption?: boolean;
|
|
706
1132
|
className?: string;
|
|
707
1133
|
}
|
|
708
1134
|
/**
|
|
@@ -733,5 +1159,12 @@ export interface LightboxProps {
|
|
|
733
1159
|
* loads as it opens, the chunk Document's is (`PanelPart`).
|
|
734
1160
|
*/
|
|
735
1161
|
export declare function Lightbox({ open, onClose, headingLevel, items, className, ...view }: LightboxProps): React.JSX.Element;
|
|
1162
|
+
/**
|
|
1163
|
+
* The annotations given as the Root's content (`addedSets` marked `content`), walked as
|
|
1164
|
+
* one whole (`useAnnotationCollection`); null where the content is a Manifest or a
|
|
1165
|
+
* Collection, even one whose pages are part of an AnnotationCollection. The lightbox
|
|
1166
|
+
* reads it too, to step through them and to name where Back goes.
|
|
1167
|
+
*/
|
|
1168
|
+
export declare function useGivenAnnotations(): AnnotationCollection | null;
|
|
736
1169
|
|
|
737
1170
|
export {};
|
package/dist/templates/index.mjs
CHANGED
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
import { Default } from "./default/Default.mjs";
|
|
3
3
|
import { Document } from "./document/Document.mjs";
|
|
4
4
|
import { Gallery } from "./gallery/Gallery.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { PanelPane, usePanelPane } from "./shared/PanelPane.mjs";
|
|
6
|
+
import { useDrawer } from "./shared/useDrawer.mjs";
|
|
7
|
+
import { preloadDrag } from "./shared/useDragToClose.mjs";
|
|
8
|
+
import { useFollowFocus } from "./shared/useFollowFocus.mjs";
|
|
9
|
+
import { BESIDE_REM, PAGE_MIN, PANEL_MIN, useWideEnough } from "./shared/useSlide.mjs";
|
|
10
|
+
import { Lightbox, preloadLightbox } from "./shared/Lightbox.mjs";
|
|
11
|
+
import { useGivenAnnotations } from "./shared/givenAnnotations.mjs";
|
|
6
12
|
export {
|
|
13
|
+
BESIDE_REM,
|
|
7
14
|
Default,
|
|
8
15
|
Document,
|
|
9
16
|
Gallery,
|
|
10
|
-
Lightbox
|
|
17
|
+
Lightbox,
|
|
18
|
+
PAGE_MIN,
|
|
19
|
+
PANEL_MIN,
|
|
20
|
+
PanelPane,
|
|
21
|
+
preloadDrag,
|
|
22
|
+
preloadLightbox,
|
|
23
|
+
useDrawer,
|
|
24
|
+
useFollowFocus,
|
|
25
|
+
useGivenAnnotations,
|
|
26
|
+
usePanelPane,
|
|
27
|
+
useWideEnough
|
|
11
28
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useEffect } from "react";
|
|
4
|
-
import { PanelPane } from "./PanelPane.mjs";
|
|
5
|
-
import { useLazyPanelPane } from "./useLazyPanelPane.mjs";
|
|
4
|
+
import { usePanelPane, PanelPane } from "./PanelPane.mjs";
|
|
6
5
|
import { useFollowFocus } from "./useFollowFocus.mjs";
|
|
7
6
|
import { useWideEnough, BESIDE_REM, PAGE_MIN } from "./useSlide.mjs";
|
|
8
7
|
import { Split, SplitPane } from "../../components/Split/Split.mjs";
|
|
@@ -23,7 +22,9 @@ function LightboxView({
|
|
|
23
22
|
languages = true,
|
|
24
23
|
storageKey,
|
|
25
24
|
collapseControls,
|
|
26
|
-
canvasOptions
|
|
25
|
+
canvasOptions,
|
|
26
|
+
placeholder,
|
|
27
|
+
caption = true
|
|
27
28
|
}) {
|
|
28
29
|
const panes = useRef(null);
|
|
29
30
|
useEffect(() => {
|
|
@@ -50,7 +51,7 @@ function LightboxView({
|
|
|
50
51
|
observer.observe(dialog, { childList: true, subtree: true });
|
|
51
52
|
return () => observer.disconnect();
|
|
52
53
|
}, []);
|
|
53
|
-
const pane =
|
|
54
|
+
const pane = usePanelPane({
|
|
54
55
|
id: `${id}-panel`,
|
|
55
56
|
beside: useWideEnough(panes, BESIDE_REM),
|
|
56
57
|
defaultOpen: defaultPanelOpen,
|
|
@@ -83,10 +84,11 @@ function LightboxView({
|
|
|
83
84
|
className: "clover-template-lightbox-body",
|
|
84
85
|
collapseControls,
|
|
85
86
|
options: canvasOptions,
|
|
87
|
+
placeholder,
|
|
86
88
|
children: panel && !pane.docked && pane.toggle
|
|
87
89
|
}
|
|
88
90
|
),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
91
|
+
caption && /* @__PURE__ */ jsx(
|
|
90
92
|
Label,
|
|
91
93
|
{
|
|
92
94
|
of: "canvas",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useRef } from "react";
|
|
2
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState, useEffect } from "react";
|
|
4
4
|
import { preloadDrag } from "./useDragToClose.mjs";
|
|
5
5
|
import { useDrawer } from "./useDrawer.mjs";
|
|
6
6
|
import { PANEL_MIN } from "./useSlide.mjs";
|
|
@@ -8,31 +8,38 @@ import { useSpineTop } from "./useSpine.mjs";
|
|
|
8
8
|
import { usePanelSections } from "../../components/Panel/sections.mjs";
|
|
9
9
|
import { SplitHandle, SplitPane } from "../../components/Split/Split.mjs";
|
|
10
10
|
import { PanelToggle } from "../../components/Panel/PanelToggle.mjs";
|
|
11
|
+
const loadPanel = () => import("./PanelPart.mjs");
|
|
11
12
|
function usePanelPane({
|
|
12
13
|
id,
|
|
13
14
|
beside,
|
|
14
15
|
defaultOpen,
|
|
16
|
+
side = "end",
|
|
15
17
|
followFocus,
|
|
16
18
|
body,
|
|
17
19
|
sections,
|
|
18
|
-
panel
|
|
19
|
-
load
|
|
20
|
+
panel
|
|
20
21
|
}) {
|
|
21
22
|
const drawer = useDrawer({
|
|
22
23
|
id,
|
|
23
24
|
beside,
|
|
24
25
|
defaultOpen,
|
|
25
|
-
side
|
|
26
|
+
side,
|
|
26
27
|
followFocus
|
|
27
28
|
});
|
|
28
29
|
const docked = !drawer.over && drawer.open;
|
|
29
30
|
const spine = useRef(null);
|
|
31
|
+
const [loaded, setLoaded] = useState();
|
|
32
|
+
const Part = panel ?? loaded;
|
|
33
|
+
const load = () => loadPanel().then((module) => setLoaded(() => module.default));
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (drawer.open && !Part) void load();
|
|
36
|
+
}, [drawer.open]);
|
|
30
37
|
useSpineTop(spine, () => body == null ? void 0 : body(), docked && Boolean(body));
|
|
31
38
|
const reach = (event) => {
|
|
32
39
|
var _a, _b;
|
|
33
40
|
if (!((_b = (_a = event.target).closest) == null ? void 0 : _b.call(_a, `[aria-controls~="${id}"]`)))
|
|
34
41
|
return;
|
|
35
|
-
if (!
|
|
42
|
+
if (!Part) void load();
|
|
36
43
|
if (drawer.over) preloadDrag();
|
|
37
44
|
};
|
|
38
45
|
const toggle = /* @__PURE__ */ jsx(
|
|
@@ -40,19 +47,21 @@ function usePanelPane({
|
|
|
40
47
|
{
|
|
41
48
|
sections,
|
|
42
49
|
open: drawer.open,
|
|
43
|
-
onOpenChange: (next) => next && !
|
|
44
|
-
controls: id
|
|
50
|
+
onOpenChange: (next) => next && !Part ? load().then(() => drawer.setOpen(true)) : drawer.setOpen(next),
|
|
51
|
+
controls: id,
|
|
52
|
+
side
|
|
45
53
|
}
|
|
46
54
|
);
|
|
47
55
|
return {
|
|
48
56
|
...drawer,
|
|
49
57
|
id,
|
|
58
|
+
side,
|
|
50
59
|
/** Open beside the Body: its bar and spine drawn, its toggle on the spine. */
|
|
51
60
|
docked,
|
|
52
61
|
spine,
|
|
53
62
|
/** The toggle: the template draws it among the Body's controls while `!docked`. */
|
|
54
63
|
toggle,
|
|
55
|
-
Part
|
|
64
|
+
Part,
|
|
56
65
|
splitProps: {
|
|
57
66
|
"data-panel": drawer.over ? "over" : "beside",
|
|
58
67
|
onKeyDown: drawer.onKeyDown,
|
|
@@ -72,24 +81,28 @@ function PanelPane({
|
|
|
72
81
|
className,
|
|
73
82
|
...panel
|
|
74
83
|
}) {
|
|
75
|
-
const { id, over, docked, Part } = pane;
|
|
84
|
+
const { id, over, docked, side, Part } = pane;
|
|
76
85
|
const offered = usePanelSections(panel.sections);
|
|
77
86
|
if (!offered.length) return null;
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
const bar = docked && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
80
89
|
SplitHandle,
|
|
81
90
|
{
|
|
82
91
|
className: "clover-template-panel-handle",
|
|
83
92
|
"aria-controls": id
|
|
84
93
|
}
|
|
85
94
|
),
|
|
86
|
-
|
|
95
|
+
/* @__PURE__ */ jsx("div", { ref: pane.spine, className: "clover-template-spine", children: pane.toggle })
|
|
96
|
+
] });
|
|
97
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
98
|
+
side === "end" && bar,
|
|
87
99
|
/* @__PURE__ */ jsx(
|
|
88
100
|
SplitPane,
|
|
89
101
|
{
|
|
90
102
|
ref: pane.pane,
|
|
91
103
|
id,
|
|
92
104
|
"data-spine": over || void 0,
|
|
105
|
+
"data-side": side,
|
|
93
106
|
name: "panel",
|
|
94
107
|
"data-about": offered.includes("about") || void 0,
|
|
95
108
|
className: ["clover-template-panel clover-template-drawer", className].filter(Boolean).join(" "),
|
|
@@ -107,6 +120,7 @@ function PanelPane({
|
|
|
107
120
|
)
|
|
108
121
|
}
|
|
109
122
|
),
|
|
123
|
+
side === "start" && bar,
|
|
110
124
|
pane.scrim && /* @__PURE__ */ jsx("div", { className: "clover-template-scrim", ...pane.scrim })
|
|
111
125
|
] });
|
|
112
126
|
}
|