@feugene/granularity 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GrBadge.css +1 -1
- package/dist/GrFormFile.css +1 -1
- package/dist/GrToaster.css +1 -1
- package/dist/GrTree.css +1 -1
- package/dist/chunks/{config-ClhKPJvg.js → config-23WtUiAL.js} +1 -1
- package/dist/chunks/config-23WtUiAL.js.map +1 -0
- package/dist/chunks/config-8Pcutu1j.js.map +1 -0
- package/dist/chunks/{config-1uSYl98Y.js → config-B0i5r8kH.js} +1 -1
- package/dist/chunks/config-B0i5r8kH.js.map +1 -0
- package/dist/chunks/{config-BOlr7qw7.js → config-B5Rknzkd.js} +33 -39
- package/dist/chunks/config-B5Rknzkd.js.map +1 -0
- package/dist/chunks/config-B7W9VlZ7.js +5 -0
- package/dist/chunks/config-B7W9VlZ7.js.map +1 -0
- package/dist/chunks/config-BDSHekVC.js +84 -0
- package/dist/chunks/config-BDSHekVC.js.map +1 -0
- package/dist/chunks/config-BLHqZhy-.js.map +1 -0
- package/dist/chunks/{config-eYLZYOUS2.js → config-BMKNHFMD2.js} +15 -15
- package/dist/chunks/config-BMKNHFMD2.js.map +1 -0
- package/dist/chunks/config-BUHuGBik2.js.map +1 -0
- package/dist/chunks/config-BWiPnygb.js +5 -0
- package/dist/chunks/config-BWiPnygb.js.map +1 -0
- package/dist/chunks/config-BX1JTrkV.js.map +1 -0
- package/dist/chunks/config-BZFUM3Ky.js +75 -0
- package/dist/chunks/config-BZFUM3Ky.js.map +1 -0
- package/dist/chunks/{config-DUcu1D68.js → config-BmNT0Fmx.js} +2 -2
- package/dist/chunks/config-BmNT0Fmx.js.map +1 -0
- package/dist/chunks/{config-C49QUoJL.js → config-BvVq2gbd.js} +1 -1
- package/dist/chunks/{config-C49QUoJL.js.map → config-BvVq2gbd.js.map} +1 -1
- package/dist/chunks/{config-CrG1XiE7.js → config-C4hJxXDa.js} +5 -5
- package/dist/chunks/config-C4hJxXDa.js.map +1 -0
- package/dist/chunks/config-CB4RVt9M.js +66 -0
- package/dist/chunks/config-CB4RVt9M.js.map +1 -0
- package/dist/chunks/config-COE_vZ-l.js +52 -0
- package/dist/chunks/config-COE_vZ-l.js.map +1 -0
- package/dist/chunks/{config-CziwTDDL.js → config-CPdmr7tC.js} +1 -1
- package/dist/chunks/{config-CziwTDDL.js.map → config-CPdmr7tC.js.map} +1 -1
- package/dist/chunks/{config-BIRO0vDJ2.js → config-DPDFYzIa.js} +2 -2
- package/dist/chunks/config-DPDFYzIa.js.map +1 -0
- package/dist/chunks/{config-DnvPqu4g.js → config-DRKXJ9PW2.js} +1 -1
- package/dist/chunks/config-DRKXJ9PW2.js.map +1 -0
- package/dist/chunks/config-DToHb81g.js +45 -0
- package/dist/chunks/config-DToHb81g.js.map +1 -0
- package/dist/chunks/{config-jBp9wVv-.js → config-D_myOZbA.js} +1 -1
- package/dist/chunks/{config-jBp9wVv-.js.map → config-D_myOZbA.js.map} +1 -1
- package/dist/chunks/{config-D_R56_gT.js → config-Dg_6FTvJ.js} +1 -1
- package/dist/chunks/config-Dg_6FTvJ.js.map +1 -0
- package/dist/chunks/config-Dlm49Jp5.js +5 -0
- package/dist/chunks/config-Dlm49Jp5.js.map +1 -0
- package/dist/chunks/config-DpqOnJiz.js.map +1 -0
- package/dist/chunks/config-Dqy0rPPO2.js.map +1 -0
- package/dist/chunks/config-Droqn55j.js +8 -0
- package/dist/chunks/config-Droqn55j.js.map +1 -0
- package/dist/chunks/{config-C4snOIXg.js → config-KXuionN3.js} +1 -1
- package/dist/chunks/{config-C4snOIXg.js.map → config-KXuionN3.js.map} +1 -1
- package/dist/chunks/config-LGrZIdaZ.js.map +1 -0
- package/dist/chunks/{config-DezDih8_.js → config-LqDC_rvp.js} +2 -2
- package/dist/chunks/config-LqDC_rvp.js.map +1 -0
- package/dist/chunks/config-QaIc_gRa2.js.map +1 -0
- package/dist/chunks/config-U4m9PSql2.js.map +1 -0
- package/dist/chunks/{config-B7IIWGt_2.js → config-XmTv4pnI.js} +2 -2
- package/dist/chunks/config-XmTv4pnI.js.map +1 -0
- package/dist/chunks/config-eXB87DOi.js +9 -0
- package/dist/chunks/config-eXB87DOi.js.map +1 -0
- package/dist/chunks/{config-C7NpDrfO.js → config-gZWR75Bh2.js} +1 -1
- package/dist/chunks/config-gZWR75Bh2.js.map +1 -0
- package/dist/chunks/config-ipvU0lzP.js.map +1 -0
- package/dist/chunks/config-xR4XVmcy2.js.map +1 -0
- package/dist/chunks/context-Bfrgsluh.js +9 -0
- package/dist/chunks/context-Bfrgsluh.js.map +1 -0
- package/dist/chunks/context-DdNIxa1w.js +9 -0
- package/dist/chunks/context-DdNIxa1w.js.map +1 -0
- package/dist/chunks/context-DfWYCBB-.js +129 -0
- package/dist/chunks/context-DfWYCBB-.js.map +1 -0
- package/dist/chunks/{en-BdtiS2d3.js → en-Cr6EkG8c.js} +52 -4
- package/dist/chunks/en-Cr6EkG8c.js.map +1 -0
- package/dist/chunks/{es-DBhctWg-.js → es-DuYb1Qju.js} +3 -3
- package/dist/chunks/{es-DBhctWg-.js.map → es-DuYb1Qju.js.map} +1 -1
- package/dist/chunks/{es-BGRMZbe9.js → es-i08e9Sdo.js} +52 -4
- package/dist/chunks/es-i08e9Sdo.js.map +1 -0
- package/dist/chunks/{grBadgeStyles-DrycBuKT.js → grBadgeStyles-D3dFjr_N.js} +12 -12
- package/dist/chunks/grBadgeStyles-D3dFjr_N.js.map +1 -0
- package/dist/chunks/{grButtonStyles-C7Yga_Q1.js → grButtonStyles-DRBgDmOp.js} +28 -28
- package/dist/chunks/grButtonStyles-DRBgDmOp.js.map +1 -0
- package/dist/chunks/{grDropdownStyles-B_-DKytw.js → grDropdownStyles-HBPkghVr.js} +2 -2
- package/dist/chunks/{grDropdownStyles-B_-DKytw.js.map → grDropdownStyles-HBPkghVr.js.map} +1 -1
- package/dist/chunks/grModalEscStack-BXk-9mv7.js +43 -0
- package/dist/chunks/grModalEscStack-BXk-9mv7.js.map +1 -0
- package/dist/chunks/{grModalStyles-DWd3i05Q.js → grModalStyles-D8-shx9A.js} +1 -1
- package/dist/chunks/grModalStyles-D8-shx9A.js.map +1 -0
- package/dist/chunks/{grSelectStyles-CLK5hRd3.js → grSelectStyles-CwMUQrBZ.js} +12 -12
- package/dist/chunks/grSelectStyles-CwMUQrBZ.js.map +1 -0
- package/dist/chunks/{grStyle-Blc9otAx.js → grStyle-CdvxTXPH.js} +2 -2
- package/dist/chunks/grStyle-CdvxTXPH.js.map +1 -0
- package/dist/chunks/{granularityI18n-DoV7Ca2m.js → granularityI18n-SH0I--GW.js} +1 -1
- package/dist/chunks/{granularityI18n-DoV7Ca2m.js.map → granularityI18n-SH0I--GW.js.map} +1 -1
- package/dist/chunks/{ru-BFCnOiML.js → ru-B5XOOYZt.js} +52 -4
- package/dist/chunks/ru-B5XOOYZt.js.map +1 -0
- package/dist/chunks/{safelist-Do2RtzLB.js → safelist-BvO8HPnE.js} +1 -1
- package/dist/chunks/{safelist-Do2RtzLB.js.map → safelist-BvO8HPnE.js.map} +1 -1
- package/dist/chunks/shared-D-v9lit0.js +188 -0
- package/dist/chunks/shared-D-v9lit0.js.map +1 -0
- package/dist/chunks/{transition-TLFw4KBn.js → useScrollLock-K7kaP2Ud.js} +52 -1
- package/dist/chunks/useScrollLock-K7kaP2Ud.js.map +1 -0
- package/dist/components/GrAlert/chunks/GrAlert-B9gmpoPC.js +251 -0
- package/dist/components/GrAlert/chunks/GrAlert-B9gmpoPC.js.map +1 -0
- package/dist/components/GrAlert/index.js +2 -2
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-BVLoQ5tZ.js +499 -0
- package/dist/components/GrAutocomplete/chunks/GrAutocomplete-BVLoQ5tZ.js.map +1 -0
- package/dist/components/GrAutocomplete/index.js +3 -0
- package/dist/components/GrAvatar/chunks/{GrAvatar-96CpTCq5.js → GrAvatar-CTOUVBF7.js} +1 -1
- package/dist/components/GrAvatar/chunks/GrAvatar-CTOUVBF7.js.map +1 -0
- package/dist/components/GrAvatar/index.js +1 -1
- package/dist/components/GrBadge/chunks/{GrBadge-B77XlaqE.js → GrBadge-D1jefy4S.js} +12 -8
- package/dist/components/GrBadge/chunks/GrBadge-D1jefy4S.js.map +1 -0
- package/dist/components/GrBadge/index.js +2 -2
- package/dist/components/GrBadgeWrap/chunks/{GrBadgeWrap-CcktMOdg.js → GrBadgeWrap-DWDxHdiQ.js} +1 -1
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-DWDxHdiQ.js.map +1 -0
- package/dist/components/GrBadgeWrap/index.js +1 -1
- package/dist/components/GrBottomNav/chunks/{GrBottomNav-usuMgG8_.js → GrBottomNav-vSE4LXmk.js} +2 -2
- package/dist/components/GrBottomNav/chunks/GrBottomNav-vSE4LXmk.js.map +1 -0
- package/dist/components/GrBottomNav/index.js +1 -1
- package/dist/components/GrButton/chunks/{GrButton-BlffdeJr.js → GrButton-DCi4CUpo.js} +18 -14
- package/dist/components/GrButton/chunks/GrButton-DCi4CUpo.js.map +1 -0
- package/dist/components/GrButton/index.js +4 -4
- package/dist/components/GrCard/chunks/{GrCard-DUNMkuHW.js → GrCard-CxCjyHMb.js} +1 -1
- package/dist/components/GrCard/chunks/GrCard-CxCjyHMb.js.map +1 -0
- package/dist/components/GrCard/index.js +1 -1
- package/dist/components/GrCheckbox/chunks/{GrCheckbox-DJhzZZdO.js → GrCheckbox-BbIDRXtl.js} +5 -5
- package/dist/components/GrCheckbox/chunks/GrCheckbox-BbIDRXtl.js.map +1 -0
- package/dist/components/GrCheckbox/index.js +1 -1
- package/dist/components/GrCollapse/chunks/{GrCollapse-CPPLh_xU.js → GrCollapse-DApXztn8.js} +6 -6
- package/dist/components/GrCollapse/chunks/GrCollapse-DApXztn8.js.map +1 -0
- package/dist/components/GrCollapse/index.js +2 -2
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-6OyvNbek.js +410 -0
- package/dist/components/GrCommandPalette/chunks/GrCommandPalette-6OyvNbek.js.map +1 -0
- package/dist/components/GrCommandPalette/index.js +3 -0
- package/dist/components/GrConfigProvider/chunks/GrConfigProvider-BtyeBGm8.js +57 -0
- package/dist/components/GrConfigProvider/chunks/GrConfigProvider-BtyeBGm8.js.map +1 -0
- package/dist/components/GrConfigProvider/index.js +4 -0
- package/dist/components/GrConfirmDialog/chunks/{GrConfirmDialog-BWYKCsHd.js → GrConfirmDialog-e4120mWw.js} +5 -5
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-e4120mWw.js.map +1 -0
- package/dist/components/GrConfirmDialog/index.js +1 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-C1CzxV0p.js +307 -0
- package/dist/components/GrDataTable/chunks/GrDataTable-C1CzxV0p.js.map +1 -0
- package/dist/components/GrDataTable/index.js +2 -2
- package/dist/components/GrDialog/chunks/{GrDialog-5DAS-1Lb.js → GrDialog-BPMvDHOz.js} +6 -6
- package/dist/components/GrDialog/chunks/GrDialog-BPMvDHOz.js.map +1 -0
- package/dist/components/GrDialog/index.js +1 -1
- package/dist/components/GrDialogService/chunks/{GrDialogService-DY_fmaMu.js → GrDialogService-CYXCTGm3.js} +36 -11
- package/dist/components/GrDialogService/chunks/GrDialogService-CYXCTGm3.js.map +1 -0
- package/dist/components/GrDialogService/index.js +2 -2
- package/dist/components/GrDivider/chunks/GrDivider-BdENZ1w0.js +54 -0
- package/dist/components/GrDivider/chunks/GrDivider-BdENZ1w0.js.map +1 -0
- package/dist/components/GrDivider/index.js +3 -0
- package/dist/components/GrDrawer/chunks/{GrDrawer-D1kzsjXN.js → GrDrawer-KevdZ5BB.js} +41 -17
- package/dist/components/GrDrawer/chunks/GrDrawer-KevdZ5BB.js.map +1 -0
- package/dist/components/GrDrawer/index.js +2 -2
- package/dist/components/GrDropdown/chunks/{GrDropdown-BXb5Cxxf.js → GrDropdown-BKoy8hm-.js} +91 -5
- package/dist/components/GrDropdown/chunks/GrDropdown-BKoy8hm-.js.map +1 -0
- package/dist/components/GrDropdown/index.js +2 -2
- package/dist/components/GrDropdownMenu/chunks/{GrDropdownMenu-DFEJLPcV.js → GrDropdownMenu-zCatXzmt.js} +11 -11
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-zCatXzmt.js.map +1 -0
- package/dist/components/GrDropdownMenu/index.js +1 -1
- package/dist/components/GrEmptyState/chunks/{GrEmptyState-CA3BiTV7.js → GrEmptyState-CNb0BzjG.js} +3 -3
- package/dist/components/GrEmptyState/chunks/GrEmptyState-CNb0BzjG.js.map +1 -0
- package/dist/components/GrEmptyState/index.js +1 -1
- package/dist/components/GrFileUpload/chunks/{GrFileUpload-DvWPpiJS.js → GrFileUpload-CnLgUGDF.js} +12 -12
- package/dist/components/GrFileUpload/chunks/GrFileUpload-CnLgUGDF.js.map +1 -0
- package/dist/components/GrFileUpload/index.js +1 -1
- package/dist/components/GrForm/chunks/GrForm-CdaFjcyl.js +234 -0
- package/dist/components/GrForm/chunks/GrForm-CdaFjcyl.js.map +1 -0
- package/dist/components/GrForm/index.js +4 -0
- package/dist/components/GrFormField/chunks/GrFormField-CXCDBd99.js +100 -0
- package/dist/components/GrFormField/chunks/GrFormField-CXCDBd99.js.map +1 -0
- package/dist/components/GrFormField/index.js +3 -2
- package/dist/components/GrFormFile/chunks/{GrFormFile-CXcqqdvV.js → GrFormFile-CqacSbUl.js} +9 -9
- package/dist/components/GrFormFile/chunks/GrFormFile-CqacSbUl.js.map +1 -0
- package/dist/components/GrFormFile/index.js +1 -1
- package/dist/components/GrFormSection/chunks/{GrFormSection-Ce21jcgo.js → GrFormSection-C3w9DQJf.js} +1 -1
- package/dist/components/GrFormSection/chunks/GrFormSection-C3w9DQJf.js.map +1 -0
- package/dist/components/GrFormSection/index.js +1 -1
- package/dist/components/GrImageViewer/chunks/{GrImageViewer-OCUIrNh2.js → GrImageViewer-DDLJkvIU.js} +312 -223
- package/dist/components/GrImageViewer/chunks/GrImageViewer-DDLJkvIU.js.map +1 -0
- package/dist/components/GrImageViewer/index.js +1 -1
- package/dist/components/GrInput/chunks/GrInput-C1VBL0dg.js +337 -0
- package/dist/components/GrInput/chunks/GrInput-C1VBL0dg.js.map +1 -0
- package/dist/components/GrInput/index.js +2 -2
- package/dist/components/GrInputTag/chunks/{GrInputTag-zMgFqp2g.js → GrInputTag-BMk9jm42.js} +6 -6
- package/dist/components/GrInputTag/chunks/GrInputTag-BMk9jm42.js.map +1 -0
- package/dist/components/GrInputTag/index.js +2 -2
- package/dist/components/GrKbd/chunks/GrKbd-DTspwtoN.js +22 -0
- package/dist/components/GrKbd/chunks/GrKbd-DTspwtoN.js.map +1 -0
- package/dist/components/GrKbd/index.js +3 -0
- package/dist/components/GrLink/chunks/{GrLink-CYUe-Q8k.js → GrLink-BP0YrnL9.js} +1 -1
- package/dist/components/GrLink/chunks/{GrLink-CYUe-Q8k.js.map → GrLink-BP0YrnL9.js.map} +1 -1
- package/dist/components/GrLink/index.js +2 -2
- package/dist/components/GrList/chunks/{GrList-Dx772Ns4.js → GrList-5RA-tZzE.js} +3 -3
- package/dist/components/GrList/chunks/GrList-5RA-tZzE.js.map +1 -0
- package/dist/components/GrList/index.js +1 -1
- package/dist/components/GrLoading/chunks/{GrLoading--X_7rdbb.js → GrLoading-fRDtVfi7.js} +3 -3
- package/dist/components/GrLoading/chunks/GrLoading-fRDtVfi7.js.map +1 -0
- package/dist/components/GrLoading/index.js +2 -2
- package/dist/components/GrModal/chunks/{GrModal-BkjW9jZS.js → GrModal-BTu1-5eY.js} +4 -57
- package/dist/components/GrModal/chunks/GrModal-BTu1-5eY.js.map +1 -0
- package/dist/components/GrModal/index.js +3 -3
- package/dist/components/GrNavbar/chunks/{GrNavbar-DW3MiIIf.js → GrNavbar-keKT_mIM.js} +3 -3
- package/dist/components/GrNavbar/chunks/GrNavbar-keKT_mIM.js.map +1 -0
- package/dist/components/GrNavbar/index.js +1 -1
- package/dist/components/GrNumberInput/chunks/{GrNumberInput-CldPIWQx.js → GrNumberInput-l9ZOHG9D.js} +112 -28
- package/dist/components/GrNumberInput/chunks/GrNumberInput-l9ZOHG9D.js.map +1 -0
- package/dist/components/GrNumberInput/index.js +2 -2
- package/dist/components/GrPagination/chunks/{GrPagination-Bu9wv6it.js → GrPagination-C5Y69CuK.js} +59 -16
- package/dist/components/GrPagination/chunks/GrPagination-C5Y69CuK.js.map +1 -0
- package/dist/components/GrPagination/index.js +1 -1
- package/dist/components/GrProgressBar/chunks/{GrProgressBar-CC3z-Zqp.js → GrProgressBar-Dqg4Fj9S.js} +2 -2
- package/dist/components/GrProgressBar/chunks/GrProgressBar-Dqg4Fj9S.js.map +1 -0
- package/dist/components/GrProgressBar/index.js +2 -2
- package/dist/components/GrPromptDialog/chunks/{GrPromptDialog-TmWXbpEP.js → GrPromptDialog-DNUjRVB9.js} +7 -7
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-DNUjRVB9.js.map +1 -0
- package/dist/components/GrPromptDialog/index.js +2 -2
- package/dist/components/GrRadio/chunks/{GrRadio-CPTixXaY.js → GrRadio-DlhxPGqf.js} +5 -7
- package/dist/components/GrRadio/chunks/GrRadio-DlhxPGqf.js.map +1 -0
- package/dist/components/GrRadio/index.js +2 -2
- package/dist/components/GrRadioGroup/chunks/{GrRadioGroup-vKZCbkCp.js → GrRadioGroup-BXt9iw4q.js} +7 -5
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-BXt9iw4q.js.map +1 -0
- package/dist/components/GrRadioGroup/index.js +2 -2
- package/dist/components/GrRating/chunks/GrRating-Co-3Rk4h.js +241 -0
- package/dist/components/GrRating/chunks/GrRating-Co-3Rk4h.js.map +1 -0
- package/dist/components/GrRating/index.js +3 -0
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BWJNe2gr.js → GrResponseErrorBanner-2CvM7Z08.js} +2 -2
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-BWJNe2gr.js.map → GrResponseErrorBanner-2CvM7Z08.js.map} +1 -1
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-Cdu9ekK9.js → GrResponseErrorBanner-C8NGx8pE.js} +3 -3
- package/dist/components/GrResponseErrorBanner/chunks/{GrResponseErrorBanner-Cdu9ekK9.js.map → GrResponseErrorBanner-C8NGx8pE.js.map} +1 -1
- package/dist/components/GrResponseErrorBanner/index.js +2 -2
- package/dist/components/GrSegmented/chunks/{GrSegmented-C1y0UXpQ.js → GrSegmented-CTd3n4PA.js} +14 -11
- package/dist/components/GrSegmented/chunks/GrSegmented-CTd3n4PA.js.map +1 -0
- package/dist/components/GrSegmented/index.js +2 -2
- package/dist/components/GrSelect/chunks/{GrSelect-RShK21lK.js → GrSelect-Dn3FgJ3Z.js} +293 -87
- package/dist/components/GrSelect/chunks/GrSelect-Dn3FgJ3Z.js.map +1 -0
- package/dist/components/GrSelect/index.js +2 -2
- package/dist/components/GrSidebar/chunks/{GrSidebar-DkWozzwA.js → GrSidebar-cvnzBfj3.js} +7 -7
- package/dist/components/GrSidebar/chunks/GrSidebar-cvnzBfj3.js.map +1 -0
- package/dist/components/GrSidebar/index.js +1 -1
- package/dist/components/GrSkeleton/chunks/{GrSkeleton-DsN-_CDZ.js → GrSkeleton-BucA5F4J.js} +1 -1
- package/dist/components/GrSkeleton/chunks/GrSkeleton-BucA5F4J.js.map +1 -0
- package/dist/components/GrSkeleton/index.js +2 -2
- package/dist/components/GrSlider/chunks/GrSlider-CzzJ3bD-.js +286 -0
- package/dist/components/GrSlider/chunks/GrSlider-CzzJ3bD-.js.map +1 -0
- package/dist/components/GrSlider/index.js +3 -0
- package/dist/components/GrStatistic/chunks/GrStatistic-gHiAwrX5.js +128 -0
- package/dist/components/GrStatistic/chunks/GrStatistic-gHiAwrX5.js.map +1 -0
- package/dist/components/GrStatistic/index.js +3 -0
- package/dist/components/GrSwitch/chunks/{GrSwitch-DAioyccZ.js → GrSwitch-CJdRvS0s.js} +16 -7
- package/dist/components/GrSwitch/chunks/GrSwitch-CJdRvS0s.js.map +1 -0
- package/dist/components/GrSwitch/index.js +2 -2
- package/dist/components/GrTabPanels/chunks/GrTabPanels-DeEMgb_y.js +68 -0
- package/dist/components/GrTabPanels/chunks/GrTabPanels-DeEMgb_y.js.map +1 -0
- package/dist/components/GrTabPanels/index.js +3 -0
- package/dist/components/GrTable/chunks/{GrTable-Db3hRnKA.js → GrTable-sNvsA8wa.js} +24 -11
- package/dist/components/GrTable/chunks/GrTable-sNvsA8wa.js.map +1 -0
- package/dist/components/GrTable/index.js +2 -2
- package/dist/components/GrTabs/chunks/{GrTabs-Z-FDJUr_.js → GrTabs-BqTak0SR.js} +9 -4
- package/dist/components/GrTabs/chunks/GrTabs-BqTak0SR.js.map +1 -0
- package/dist/components/GrTabs/index.js +2 -2
- package/dist/components/GrTextarea/chunks/{GrTextarea-D56YxhKq.js → GrTextarea-DIYBAPpP.js} +16 -6
- package/dist/components/GrTextarea/chunks/GrTextarea-DIYBAPpP.js.map +1 -0
- package/dist/components/GrTextarea/index.js +2 -2
- package/dist/components/GrToaster/chunks/{GrToaster-eI8YvnIo.js → GrToaster-BVHjIHcM.js} +52 -11
- package/dist/components/GrToaster/chunks/GrToaster-BVHjIHcM.js.map +1 -0
- package/dist/components/GrToaster/index.js +2 -2
- package/dist/components/GrTooltip/chunks/{GrTooltip-BeyZ8ssR.js → GrTooltip-BMKH2lIx.js} +3 -3
- package/dist/components/GrTooltip/chunks/GrTooltip-BMKH2lIx.js.map +1 -0
- package/dist/components/GrTooltip/index.js +1 -1
- package/dist/components/GrTree/chunks/{GrTree-D3ODe2dB.js → GrTree-_12ChXRQ.js} +108 -9
- package/dist/components/GrTree/chunks/GrTree-_12ChXRQ.js.map +1 -0
- package/dist/components/GrTree/index.js +2 -2
- package/dist/components/GrTreeSelect/chunks/{GrTreeSelect-B2xBKs5Q.js → GrTreeSelect-CdaLG7Xq.js} +10 -10
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-CdaLG7Xq.js.map +1 -0
- package/dist/components/GrTreeSelect/index.js +2 -2
- package/dist/composables/useToast.js +3 -1
- package/dist/composables/useToast.js.map +1 -1
- package/dist/directives/loading.js +1 -1
- package/dist/granular-provider-node.js +6 -6
- package/dist/granular-provider-node.js.map +1 -1
- package/dist/granular-provider.js +1 -1
- package/dist/i18n/all.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +112 -87
- package/dist/index.js.map +1 -1
- package/dist/styles/base.css +30 -8
- package/dist/styles/index.css +6 -3
- package/dist/styles/preflight.css +8 -4
- package/dist/styles/themes/dark.css +52 -40
- package/dist/styles/themes/light.css +70 -45
- package/dist/styles/tokens.css +20 -20
- package/dist/types/src/components/GrAlert/GrAlert.vue.d.ts +26 -14
- package/dist/types/src/components/GrAlert/defaults.d.ts +17 -0
- package/dist/types/src/components/GrAlert/grAlertStyles.d.ts +55 -0
- package/dist/types/src/components/GrAlert/index.d.ts +4 -1
- package/dist/types/src/components/GrAutocomplete/GrAutocomplete.vue.d.ts +153 -0
- package/dist/types/src/components/GrAutocomplete/config.d.ts +1 -0
- package/dist/types/src/components/GrAutocomplete/defaults.d.ts +15 -0
- package/dist/types/src/components/GrAutocomplete/grAutocompleteStyles.d.ts +27 -0
- package/dist/types/src/components/GrAutocomplete/index.d.ts +6 -0
- package/dist/types/src/components/GrAutocomplete/safelist.d.ts +1 -0
- package/dist/types/src/components/GrAvatar/GrAvatar.vue.d.ts +1 -1
- package/dist/types/src/components/GrBadge/GrBadge.vue.d.ts +7 -7
- package/dist/types/src/components/GrBadge/defaults.d.ts +15 -0
- package/dist/types/src/components/GrBadge/index.d.ts +1 -0
- package/dist/types/src/components/GrBadgeWrap/GrBadgeWrap.vue.d.ts +1 -1
- package/dist/types/src/components/GrButton/GrButton.vue.d.ts +12 -12
- package/dist/types/src/components/GrButton/defaults.d.ts +25 -0
- package/dist/types/src/components/GrButton/grButtonStyles.d.ts +2 -2
- package/dist/types/src/components/GrButton/index.d.ts +1 -0
- package/dist/types/src/components/GrCheckbox/GrCheckbox.vue.d.ts +4 -4
- package/dist/types/src/components/GrCollapse/GrCollapse.vue.d.ts +2 -2
- package/dist/types/src/components/GrCollapse/GrCollapseItem.vue.d.ts +1 -1
- package/dist/types/src/components/GrCommandPalette/GrCommandPalette.vue.d.ts +128 -0
- package/dist/types/src/components/GrCommandPalette/config.d.ts +1 -0
- package/dist/types/src/components/GrCommandPalette/filtering.d.ts +35 -0
- package/dist/types/src/components/GrCommandPalette/grCommandPaletteStyles.d.ts +20 -0
- package/dist/types/src/components/GrCommandPalette/hotkey.d.ts +23 -0
- package/dist/types/src/components/GrCommandPalette/index.d.ts +6 -0
- package/dist/types/src/components/GrCommandPalette/safelist.d.ts +1 -0
- package/dist/types/src/components/GrConfigProvider/GrConfigProvider.vue.d.ts +59 -0
- package/dist/types/src/components/GrConfigProvider/config.d.ts +1 -0
- package/dist/types/src/components/GrConfigProvider/context.d.ts +131 -0
- package/dist/types/src/components/GrConfigProvider/index.d.ts +5 -0
- package/dist/types/src/components/GrConfirmDialog/GrConfirmDialog.vue.d.ts +2 -2
- package/dist/types/src/components/GrDataTable/GrDataTable.vue.d.ts +48 -4
- package/dist/types/src/components/GrDialog/GrDialog.vue.d.ts +1 -1
- package/dist/types/src/components/GrDialogService/store.d.ts +18 -0
- package/dist/types/src/components/GrDivider/GrDivider.vue.d.ts +58 -0
- package/dist/types/src/components/GrDivider/config.d.ts +1 -0
- package/dist/types/src/components/GrDivider/index.d.ts +4 -0
- package/dist/types/src/components/GrDrawer/GrDrawer.vue.d.ts +5 -5
- package/dist/types/src/components/GrDropdown/GrDropdown.vue.d.ts +8 -1
- package/dist/types/src/components/GrDropdownMenu/GrDropdownMenu.vue.d.ts +7 -1
- package/dist/types/src/components/GrDropdownMenu/GrDropdownMenuItem.vue.d.ts +1 -1
- package/dist/types/src/components/GrFileUpload/GrFileUpload.vue.d.ts +3 -3
- package/dist/types/src/components/GrForm/GrForm.vue.d.ts +93 -0
- package/dist/types/src/components/GrForm/config.d.ts +1 -0
- package/dist/types/src/components/GrForm/context.d.ts +27 -0
- package/dist/types/src/components/GrForm/index.d.ts +6 -0
- package/dist/types/src/components/GrForm/validation.d.ts +52 -0
- package/dist/types/src/components/GrFormField/GrFormField.vue.d.ts +25 -2
- package/dist/types/src/components/GrFormField/context.d.ts +20 -0
- package/dist/types/src/components/GrFormField/index.d.ts +1 -0
- package/dist/types/src/components/GrFormFile/GrFormFile.vue.d.ts +4 -4
- package/dist/types/src/components/GrImageViewer/GrImageViewer.vue.d.ts +7 -3
- package/dist/types/src/components/GrImageViewer/composables/useViewerKeyboard.d.ts +20 -0
- package/dist/types/src/components/GrImageViewer/composables/useWheelGesture.d.ts +16 -0
- package/dist/types/src/components/GrImageViewer/composables/useZoomPan.d.ts +50 -0
- package/dist/types/src/components/GrInput/GrInput.vue.d.ts +49 -10
- package/dist/types/src/components/GrInput/defaults.d.ts +18 -0
- package/dist/types/src/components/GrInput/grInputStyles.d.ts +1 -1
- package/dist/types/src/components/GrInput/index.d.ts +1 -0
- package/dist/types/src/components/GrInputTag/GrInputTag.vue.d.ts +3 -3
- package/dist/types/src/components/GrKbd/GrKbd.vue.d.ts +46 -0
- package/dist/types/src/components/GrKbd/config.d.ts +1 -0
- package/dist/types/src/components/GrKbd/index.d.ts +4 -0
- package/dist/types/src/components/GrLink/GrLink.vue.d.ts +3 -3
- package/dist/types/src/components/GrLink/grLinkStyles.d.ts +3 -3
- package/dist/types/src/components/GrModal/grModalStyles.d.ts +1 -1
- package/dist/types/src/components/GrNumberInput/GrNumberInput.vue.d.ts +25 -9
- package/dist/types/src/components/GrNumberInput/defaults.d.ts +14 -0
- package/dist/types/src/components/GrNumberInput/index.d.ts +1 -0
- package/dist/types/src/components/GrPagination/GrPagination.vue.d.ts +18 -0
- package/dist/types/src/components/GrPromptDialog/GrPromptDialog.vue.d.ts +4 -4
- package/dist/types/src/components/GrRadio/GrRadio.vue.d.ts +5 -5
- package/dist/types/src/components/GrRadio/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRadio/grRadioStyles.d.ts +3 -3
- package/dist/types/src/components/GrRadio/index.d.ts +1 -0
- package/dist/types/src/components/GrRadioGroup/GrRadioGroup.vue.d.ts +4 -4
- package/dist/types/src/components/GrRadioGroup/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRadioGroup/index.d.ts +1 -0
- package/dist/types/src/components/GrRating/GrRating.vue.d.ts +124 -0
- package/dist/types/src/components/GrRating/config.d.ts +1 -0
- package/dist/types/src/components/GrRating/defaults.d.ts +14 -0
- package/dist/types/src/components/GrRating/grRatingStyles.d.ts +21 -0
- package/dist/types/src/components/GrRating/index.d.ts +6 -0
- package/dist/types/src/components/GrRating/safelist.d.ts +1 -0
- package/dist/types/src/components/GrResponseErrorBanner/GrUploadErrorBanner.vue.d.ts +1 -1
- package/dist/types/src/components/GrSegmented/GrSegmented.vue.d.ts +7 -7
- package/dist/types/src/components/GrSegmented/defaults.d.ts +15 -0
- package/dist/types/src/components/GrSegmented/grSegmentedStyles.d.ts +1 -1
- package/dist/types/src/components/GrSegmented/index.d.ts +1 -0
- package/dist/types/src/components/GrSelect/GrSelect.vue.d.ts +57 -17
- package/dist/types/src/components/GrSelect/defaults.d.ts +17 -0
- package/dist/types/src/components/GrSelect/grSelectStyles.d.ts +3 -3
- package/dist/types/src/components/GrSelect/index.d.ts +1 -0
- package/dist/types/src/components/GrSidebar/GrSidebarItem.vue.d.ts +2 -2
- package/dist/types/src/components/GrSkeleton/GrSkeleton.vue.d.ts +1 -1
- package/dist/types/src/components/GrSlider/GrSlider.vue.d.ts +88 -0
- package/dist/types/src/components/GrSlider/config.d.ts +1 -0
- package/dist/types/src/components/GrSlider/defaults.d.ts +14 -0
- package/dist/types/src/components/GrSlider/grSliderStyles.d.ts +36 -0
- package/dist/types/src/components/GrSlider/index.d.ts +6 -0
- package/dist/types/src/components/GrSlider/safelist.d.ts +1 -0
- package/dist/types/src/components/GrStatistic/GrStatistic.vue.d.ts +116 -0
- package/dist/types/src/components/GrStatistic/config.d.ts +1 -0
- package/dist/types/src/components/GrStatistic/formatStatisticValue.d.ts +16 -0
- package/dist/types/src/components/GrStatistic/grStatisticStyles.d.ts +24 -0
- package/dist/types/src/components/GrStatistic/index.d.ts +6 -0
- package/dist/types/src/components/GrStatistic/safelist.d.ts +1 -0
- package/dist/types/src/components/GrSwitch/GrSwitch.vue.d.ts +4 -4
- package/dist/types/src/components/GrSwitch/defaults.d.ts +14 -0
- package/dist/types/src/components/GrSwitch/grSwitchStyles.d.ts +2 -2
- package/dist/types/src/components/GrSwitch/index.d.ts +1 -0
- package/dist/types/src/components/GrTabPanels/GrTabPanel.vue.d.ts +46 -0
- package/dist/types/src/components/GrTabPanels/GrTabPanels.vue.d.ts +51 -0
- package/dist/types/src/components/GrTabPanels/config.d.ts +5 -0
- package/dist/types/src/components/GrTabPanels/context.d.ts +9 -0
- package/dist/types/src/components/GrTabPanels/index.d.ts +6 -0
- package/dist/types/src/components/GrTable/GrTable.vue.d.ts +16 -0
- package/dist/types/src/components/GrTabs/GrTabs.vue.d.ts +6 -0
- package/dist/types/src/components/GrTextarea/GrTextarea.vue.d.ts +5 -5
- package/dist/types/src/components/GrToaster/GrToaster.vue.d.ts +19 -2
- package/dist/types/src/components/GrToaster/index.d.ts +1 -1
- package/dist/types/src/components/GrTooltip/GrTooltip.vue.d.ts +1 -1
- package/dist/types/src/components/GrTree/grTreeInteractionContext.d.ts +2 -0
- package/dist/types/src/components/GrTreeSelect/GrTreeSelect.vue.d.ts +1 -1
- package/dist/types/src/components/GrTreeSelect/grTreeSelectStyles.d.ts +1 -1
- package/dist/types/src/composables/internal/useScrollLock.d.ts +24 -0
- package/dist/types/src/composables/useToast.d.ts +24 -0
- package/dist/types/src/granular-provider/shared.d.ts +10 -0
- package/dist/types/src/i18n/messages/en.d.ts +84 -0
- package/dist/types/src/i18n/messages/es.d.ts +84 -0
- package/dist/types/src/i18n/messages/ru.d.ts +84 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/web-types.json +1642 -356
- package/package.json +41 -1
- package/dist/chunks/config-1uSYl98Y.js.map +0 -1
- package/dist/chunks/config-8Pcutu1j2.js.map +0 -1
- package/dist/chunks/config-B7IIWGt_2.js.map +0 -1
- package/dist/chunks/config-BIRO0vDJ2.js.map +0 -1
- package/dist/chunks/config-BLHqZhy-2.js.map +0 -1
- package/dist/chunks/config-BOlr7qw7.js.map +0 -1
- package/dist/chunks/config-BUHuGBik.js.map +0 -1
- package/dist/chunks/config-BX1JTrkV2.js.map +0 -1
- package/dist/chunks/config-C7NpDrfO.js.map +0 -1
- package/dist/chunks/config-ClhKPJvg.js.map +0 -1
- package/dist/chunks/config-Cpi9Mh2J.js.map +0 -1
- package/dist/chunks/config-CrG1XiE7.js.map +0 -1
- package/dist/chunks/config-DUcu1D68.js.map +0 -1
- package/dist/chunks/config-D_R56_gT.js.map +0 -1
- package/dist/chunks/config-DezDih8_.js.map +0 -1
- package/dist/chunks/config-DnvPqu4g.js.map +0 -1
- package/dist/chunks/config-DpqOnJiz2.js.map +0 -1
- package/dist/chunks/config-LGrZIdaZ2.js.map +0 -1
- package/dist/chunks/config-QaIc_gRa.js.map +0 -1
- package/dist/chunks/config-U4m9PSql.js.map +0 -1
- package/dist/chunks/config-eYLZYOUS2.js.map +0 -1
- package/dist/chunks/config-ipvU0lzP2.js.map +0 -1
- package/dist/chunks/config-xR4XVmcy.js.map +0 -1
- package/dist/chunks/en-BdtiS2d3.js.map +0 -1
- package/dist/chunks/es-BGRMZbe9.js.map +0 -1
- package/dist/chunks/grBadgeStyles-DrycBuKT.js.map +0 -1
- package/dist/chunks/grButtonStyles-C7Yga_Q1.js.map +0 -1
- package/dist/chunks/grModalStyles-DWd3i05Q.js.map +0 -1
- package/dist/chunks/grSelectStyles-CLK5hRd3.js.map +0 -1
- package/dist/chunks/grStyle-Blc9otAx.js.map +0 -1
- package/dist/chunks/ru-BFCnOiML.js.map +0 -1
- package/dist/chunks/shared-ChvcQgDl.js +0 -168
- package/dist/chunks/shared-ChvcQgDl.js.map +0 -1
- package/dist/chunks/transition-TLFw4KBn.js.map +0 -1
- package/dist/components/GrAlert/chunks/GrAlert-DPJSU_fG.js +0 -163
- package/dist/components/GrAlert/chunks/GrAlert-DPJSU_fG.js.map +0 -1
- package/dist/components/GrAvatar/chunks/GrAvatar-96CpTCq5.js.map +0 -1
- package/dist/components/GrBadge/chunks/GrBadge-B77XlaqE.js.map +0 -1
- package/dist/components/GrBadgeWrap/chunks/GrBadgeWrap-CcktMOdg.js.map +0 -1
- package/dist/components/GrBottomNav/chunks/GrBottomNav-usuMgG8_.js.map +0 -1
- package/dist/components/GrButton/chunks/GrButton-BlffdeJr.js.map +0 -1
- package/dist/components/GrCard/chunks/GrCard-DUNMkuHW.js.map +0 -1
- package/dist/components/GrCheckbox/chunks/GrCheckbox-DJhzZZdO.js.map +0 -1
- package/dist/components/GrCollapse/chunks/GrCollapse-CPPLh_xU.js.map +0 -1
- package/dist/components/GrConfirmDialog/chunks/GrConfirmDialog-BWYKCsHd.js.map +0 -1
- package/dist/components/GrDataTable/chunks/GrDataTable-ptbARmJ3.js +0 -179
- package/dist/components/GrDataTable/chunks/GrDataTable-ptbARmJ3.js.map +0 -1
- package/dist/components/GrDialog/chunks/GrDialog-5DAS-1Lb.js.map +0 -1
- package/dist/components/GrDialogService/chunks/GrDialogService-DY_fmaMu.js.map +0 -1
- package/dist/components/GrDrawer/chunks/GrDrawer-D1kzsjXN.js.map +0 -1
- package/dist/components/GrDropdown/chunks/GrDropdown-BXb5Cxxf.js.map +0 -1
- package/dist/components/GrDropdownMenu/chunks/GrDropdownMenu-DFEJLPcV.js.map +0 -1
- package/dist/components/GrEmptyState/chunks/GrEmptyState-CA3BiTV7.js.map +0 -1
- package/dist/components/GrFileUpload/chunks/GrFileUpload-DvWPpiJS.js.map +0 -1
- package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js +0 -35
- package/dist/components/GrFormField/chunks/GrFormField-BujNQrw8.js.map +0 -1
- package/dist/components/GrFormFile/chunks/GrFormFile-CXcqqdvV.js.map +0 -1
- package/dist/components/GrFormSection/chunks/GrFormSection-Ce21jcgo.js.map +0 -1
- package/dist/components/GrImageViewer/chunks/GrImageViewer-OCUIrNh2.js.map +0 -1
- package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js +0 -188
- package/dist/components/GrInput/chunks/GrInput-C8pOJgCi.js.map +0 -1
- package/dist/components/GrInputTag/chunks/GrInputTag-zMgFqp2g.js.map +0 -1
- package/dist/components/GrList/chunks/GrList-Dx772Ns4.js.map +0 -1
- package/dist/components/GrLoading/chunks/GrLoading--X_7rdbb.js.map +0 -1
- package/dist/components/GrModal/chunks/GrModal-BkjW9jZS.js.map +0 -1
- package/dist/components/GrNavbar/chunks/GrNavbar-DW3MiIIf.js.map +0 -1
- package/dist/components/GrNumberInput/chunks/GrNumberInput-CldPIWQx.js.map +0 -1
- package/dist/components/GrPagination/chunks/GrPagination-Bu9wv6it.js.map +0 -1
- package/dist/components/GrProgressBar/chunks/GrProgressBar-CC3z-Zqp.js.map +0 -1
- package/dist/components/GrPromptDialog/chunks/GrPromptDialog-TmWXbpEP.js.map +0 -1
- package/dist/components/GrRadio/chunks/GrRadio-CPTixXaY.js.map +0 -1
- package/dist/components/GrRadioGroup/chunks/GrRadioGroup-vKZCbkCp.js.map +0 -1
- package/dist/components/GrSegmented/chunks/GrSegmented-C1y0UXpQ.js.map +0 -1
- package/dist/components/GrSelect/chunks/GrSelect-RShK21lK.js.map +0 -1
- package/dist/components/GrSidebar/chunks/GrSidebar-DkWozzwA.js.map +0 -1
- package/dist/components/GrSkeleton/chunks/GrSkeleton-DsN-_CDZ.js.map +0 -1
- package/dist/components/GrSwitch/chunks/GrSwitch-DAioyccZ.js.map +0 -1
- package/dist/components/GrTable/chunks/GrTable-Db3hRnKA.js.map +0 -1
- package/dist/components/GrTabs/chunks/GrTabs-Z-FDJUr_.js.map +0 -1
- package/dist/components/GrTextarea/chunks/GrTextarea-D56YxhKq.js.map +0 -1
- package/dist/components/GrToaster/chunks/GrToaster-eI8YvnIo.js.map +0 -1
- package/dist/components/GrTooltip/chunks/GrTooltip-BeyZ8ssR.js.map +0 -1
- package/dist/components/GrTree/chunks/GrTree-D3ODe2dB.js.map +0 -1
- package/dist/components/GrTreeSelect/chunks/GrTreeSelect-B2xBKs5Q.js.map +0 -1
- package/dist/chunks/{config-8Pcutu1j2.js → config-8Pcutu1j.js} +0 -0
- package/dist/chunks/{config-BLHqZhy-2.js → config-BLHqZhy-.js} +0 -0
- package/dist/chunks/{config-BUHuGBik.js → config-BUHuGBik2.js} +0 -0
- package/dist/chunks/{config-BX1JTrkV2.js → config-BX1JTrkV.js} +0 -0
- package/dist/chunks/{config-DpqOnJiz2.js → config-DpqOnJiz.js} +0 -0
- package/dist/chunks/{config-Cpi9Mh2J.js → config-Dqy0rPPO2.js} +1 -1
- /package/dist/chunks/{config-LGrZIdaZ2.js → config-LGrZIdaZ.js} +0 -0
- /package/dist/chunks/{config-QaIc_gRa.js → config-QaIc_gRa2.js} +0 -0
- /package/dist/chunks/{config-U4m9PSql.js → config-U4m9PSql2.js} +0 -0
- /package/dist/chunks/{config-ipvU0lzP2.js → config-ipvU0lzP.js} +0 -0
- /package/dist/chunks/{config-xR4XVmcy.js → config-xR4XVmcy2.js} +0 -0
package/dist/components/GrImageViewer/chunks/{GrImageViewer-OCUIrNh2.js → GrImageViewer-DDLJkvIU.js}
RENAMED
|
@@ -1,6 +1,250 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useGranularityTranslations } from "../../../chunks/granularityI18n-SH0I--GW.js";
|
|
2
|
+
import { i as Ge, n as Se, r as he, s as Ye, t as useScrollLock } from "../../../chunks/useScrollLock-K7kaP2Ud.js";
|
|
3
3
|
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, openBlock, ref, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
|
+
//#region src/components/GrImageViewer/composables/useZoomPan.ts
|
|
5
|
+
var TRAILING_ZERO_DECIMAL_RE = /\.0$/;
|
|
6
|
+
function formatPercent(value) {
|
|
7
|
+
if (Number.isInteger(value)) return String(value);
|
|
8
|
+
return value.toFixed(1).replace(TRAILING_ZERO_DECIMAL_RE, "");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* useZoomPan — состояние и логика масштаба/поворота/панорамирования картинки,
|
|
12
|
+
* а также метрики (натуральный/вписанный/фактический размер, реальный масштаб).
|
|
13
|
+
* Вынесено из монолитного `GrImageViewer.vue`.
|
|
14
|
+
*/
|
|
15
|
+
function useZoomPan(options) {
|
|
16
|
+
const scale = ref(1);
|
|
17
|
+
const rotation = ref(0);
|
|
18
|
+
const offsetX = ref(0);
|
|
19
|
+
const offsetY = ref(0);
|
|
20
|
+
const isDragging = ref(false);
|
|
21
|
+
let dragStartX = 0;
|
|
22
|
+
let dragStartY = 0;
|
|
23
|
+
let dragOffsetStartX = 0;
|
|
24
|
+
let dragOffsetStartY = 0;
|
|
25
|
+
const naturalWidth = ref(0);
|
|
26
|
+
const naturalHeight = ref(0);
|
|
27
|
+
const fittedWidth = ref(0);
|
|
28
|
+
const fittedHeight = ref(0);
|
|
29
|
+
let resizeObserver = null;
|
|
30
|
+
const imageStyle = computed(() => ({ transform: `translate3d(${offsetX.value}px, ${offsetY.value}px, 0) scale(${scale.value}) rotate(${rotation.value}deg)` }));
|
|
31
|
+
const zoomValueText = computed(() => formatPercent(scale.value * 100));
|
|
32
|
+
const renderedWidth = computed(() => Math.round(fittedWidth.value * scale.value));
|
|
33
|
+
const renderedHeight = computed(() => Math.round(fittedHeight.value * scale.value));
|
|
34
|
+
const realScale = computed(() => {
|
|
35
|
+
if (!naturalWidth.value) return 0;
|
|
36
|
+
return fittedWidth.value * scale.value / naturalWidth.value;
|
|
37
|
+
});
|
|
38
|
+
const realScalePercent = computed(() => formatPercent(realScale.value * 100));
|
|
39
|
+
function setScale(value) {
|
|
40
|
+
const clamped = Math.min(options.maxScale(), Math.max(options.minScale(), value));
|
|
41
|
+
scale.value = Number(clamped.toFixed(4));
|
|
42
|
+
}
|
|
43
|
+
function zoomIn() {
|
|
44
|
+
setScale(scale.value * options.zoomRate());
|
|
45
|
+
}
|
|
46
|
+
function zoomOut() {
|
|
47
|
+
setScale(scale.value / options.zoomRate());
|
|
48
|
+
}
|
|
49
|
+
function rotateLeft() {
|
|
50
|
+
rotation.value -= 90;
|
|
51
|
+
options.onRotate(rotation.value);
|
|
52
|
+
}
|
|
53
|
+
function rotateRight() {
|
|
54
|
+
rotation.value += 90;
|
|
55
|
+
options.onRotate(rotation.value);
|
|
56
|
+
}
|
|
57
|
+
function resetTransform() {
|
|
58
|
+
scale.value = 1;
|
|
59
|
+
rotation.value = 0;
|
|
60
|
+
offsetX.value = 0;
|
|
61
|
+
offsetY.value = 0;
|
|
62
|
+
isDragging.value = false;
|
|
63
|
+
}
|
|
64
|
+
function resetImageMetrics() {
|
|
65
|
+
naturalWidth.value = 0;
|
|
66
|
+
naturalHeight.value = 0;
|
|
67
|
+
fittedWidth.value = 0;
|
|
68
|
+
fittedHeight.value = 0;
|
|
69
|
+
}
|
|
70
|
+
function measureFitted() {
|
|
71
|
+
const el = options.imageEl.value;
|
|
72
|
+
if (!el) return;
|
|
73
|
+
fittedWidth.value = el.offsetWidth;
|
|
74
|
+
fittedHeight.value = el.offsetHeight;
|
|
75
|
+
}
|
|
76
|
+
function onImageLoad(event) {
|
|
77
|
+
const el = event.target;
|
|
78
|
+
naturalWidth.value = el.naturalWidth;
|
|
79
|
+
naturalHeight.value = el.naturalHeight;
|
|
80
|
+
measureFitted();
|
|
81
|
+
}
|
|
82
|
+
function startObservingImage() {
|
|
83
|
+
const el = options.imageEl.value;
|
|
84
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
85
|
+
if (!resizeObserver) resizeObserver = new ResizeObserver(() => measureFitted());
|
|
86
|
+
resizeObserver.observe(el);
|
|
87
|
+
if (el.complete && el.naturalWidth) {
|
|
88
|
+
naturalWidth.value = el.naturalWidth;
|
|
89
|
+
naturalHeight.value = el.naturalHeight;
|
|
90
|
+
}
|
|
91
|
+
measureFitted();
|
|
92
|
+
}
|
|
93
|
+
function stopObservingImage() {
|
|
94
|
+
resizeObserver?.disconnect();
|
|
95
|
+
}
|
|
96
|
+
function onPointerDown(event) {
|
|
97
|
+
if (!options.draggable() || event.button !== 0) return;
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
isDragging.value = true;
|
|
100
|
+
dragStartX = event.clientX;
|
|
101
|
+
dragStartY = event.clientY;
|
|
102
|
+
dragOffsetStartX = offsetX.value;
|
|
103
|
+
dragOffsetStartY = offsetY.value;
|
|
104
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
105
|
+
}
|
|
106
|
+
function onPointerMove(event) {
|
|
107
|
+
if (!isDragging.value) return;
|
|
108
|
+
offsetX.value = dragOffsetStartX + (event.clientX - dragStartX);
|
|
109
|
+
offsetY.value = dragOffsetStartY + (event.clientY - dragStartY);
|
|
110
|
+
}
|
|
111
|
+
function onPointerUp(event) {
|
|
112
|
+
if (!isDragging.value) return;
|
|
113
|
+
isDragging.value = false;
|
|
114
|
+
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
scale,
|
|
118
|
+
rotation,
|
|
119
|
+
offsetX,
|
|
120
|
+
offsetY,
|
|
121
|
+
isDragging,
|
|
122
|
+
naturalWidth,
|
|
123
|
+
naturalHeight,
|
|
124
|
+
fittedWidth,
|
|
125
|
+
fittedHeight,
|
|
126
|
+
imageStyle,
|
|
127
|
+
zoomValueText,
|
|
128
|
+
renderedWidth,
|
|
129
|
+
renderedHeight,
|
|
130
|
+
realScale,
|
|
131
|
+
realScalePercent,
|
|
132
|
+
setScale,
|
|
133
|
+
zoomIn,
|
|
134
|
+
zoomOut,
|
|
135
|
+
rotateLeft,
|
|
136
|
+
rotateRight,
|
|
137
|
+
resetTransform,
|
|
138
|
+
resetImageMetrics,
|
|
139
|
+
measureFitted,
|
|
140
|
+
onImageLoad,
|
|
141
|
+
startObservingImage,
|
|
142
|
+
stopObservingImage,
|
|
143
|
+
onPointerDown,
|
|
144
|
+
onPointerMove,
|
|
145
|
+
onPointerUp
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/components/GrImageViewer/composables/useWheelGesture.ts
|
|
150
|
+
var WHEEL_ZOOM_SENSITIVITY = .0015;
|
|
151
|
+
var WHEEL_IDLE_MS = 120;
|
|
152
|
+
/**
|
|
153
|
+
* useWheelGesture — масштабирование колесом мыши / жестом трекпада с батчингом
|
|
154
|
+
* по `requestAnimationFrame` (рендер не чаще кадра — без «дёрганья»/наслоения) и
|
|
155
|
+
* временным отключением CSS-перехода на время жеста (`isWheelZooming`).
|
|
156
|
+
*/
|
|
157
|
+
function useWheelGesture(options) {
|
|
158
|
+
const isWheelZooming = ref(false);
|
|
159
|
+
let pendingWheelDelta = 0;
|
|
160
|
+
let wheelFrameId = null;
|
|
161
|
+
let wheelIdleTimer = null;
|
|
162
|
+
function cancelWheelFrame() {
|
|
163
|
+
if (wheelFrameId !== null) {
|
|
164
|
+
cancelAnimationFrame(wheelFrameId);
|
|
165
|
+
wheelFrameId = null;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function endWheelZoom() {
|
|
169
|
+
if (wheelIdleTimer !== null) {
|
|
170
|
+
clearTimeout(wheelIdleTimer);
|
|
171
|
+
wheelIdleTimer = null;
|
|
172
|
+
}
|
|
173
|
+
isWheelZooming.value = false;
|
|
174
|
+
pendingWheelDelta = 0;
|
|
175
|
+
cancelWheelFrame();
|
|
176
|
+
}
|
|
177
|
+
function flushWheelZoom() {
|
|
178
|
+
wheelFrameId = null;
|
|
179
|
+
const delta = pendingWheelDelta;
|
|
180
|
+
pendingWheelDelta = 0;
|
|
181
|
+
if (!delta) return;
|
|
182
|
+
const factor = Math.exp(-delta * WHEEL_ZOOM_SENSITIVITY);
|
|
183
|
+
options.applyZoomFactor(factor);
|
|
184
|
+
}
|
|
185
|
+
function onWheel(event) {
|
|
186
|
+
if (!options.enabled()) return;
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
isWheelZooming.value = true;
|
|
189
|
+
pendingWheelDelta += event.deltaY;
|
|
190
|
+
if (wheelFrameId === null) wheelFrameId = requestAnimationFrame(flushWheelZoom);
|
|
191
|
+
if (wheelIdleTimer !== null) clearTimeout(wheelIdleTimer);
|
|
192
|
+
wheelIdleTimer = setTimeout(() => {
|
|
193
|
+
wheelIdleTimer = null;
|
|
194
|
+
isWheelZooming.value = false;
|
|
195
|
+
}, WHEEL_IDLE_MS);
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
isWheelZooming,
|
|
199
|
+
onWheel,
|
|
200
|
+
endWheelZoom
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/components/GrImageViewer/composables/useViewerKeyboard.ts
|
|
205
|
+
/**
|
|
206
|
+
* useViewerKeyboard — клавиатурное управление просмотрщиком:
|
|
207
|
+
* Esc — закрыть, стрелки — переключение, `+`/`-`/`0` — зум/сброс.
|
|
208
|
+
*/
|
|
209
|
+
function useViewerKeyboard(options) {
|
|
210
|
+
const { actions } = options;
|
|
211
|
+
function onKeydown(event) {
|
|
212
|
+
switch (event.key) {
|
|
213
|
+
case "Escape":
|
|
214
|
+
if (!options.closeOnEscape()) return;
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
actions.close();
|
|
217
|
+
return;
|
|
218
|
+
case "ArrowLeft":
|
|
219
|
+
event.preventDefault();
|
|
220
|
+
actions.prev();
|
|
221
|
+
return;
|
|
222
|
+
case "ArrowRight":
|
|
223
|
+
event.preventDefault();
|
|
224
|
+
actions.next();
|
|
225
|
+
return;
|
|
226
|
+
case "+":
|
|
227
|
+
case "=":
|
|
228
|
+
case "Add":
|
|
229
|
+
event.preventDefault();
|
|
230
|
+
actions.zoomIn();
|
|
231
|
+
return;
|
|
232
|
+
case "-":
|
|
233
|
+
case "_":
|
|
234
|
+
case "Subtract":
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
actions.zoomOut();
|
|
237
|
+
return;
|
|
238
|
+
case "0":
|
|
239
|
+
event.preventDefault();
|
|
240
|
+
actions.reset();
|
|
241
|
+
break;
|
|
242
|
+
default:
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return { onKeydown };
|
|
246
|
+
}
|
|
247
|
+
//#endregion
|
|
4
248
|
//#region src/components/GrImageViewer/GrImageViewer.vue?vue&type=script&setup=true&lang.ts
|
|
5
249
|
var _hoisted_1 = { class: "fixed inset-0 overflow-hidden" };
|
|
6
250
|
var _hoisted_2 = { class: "pointer-events-none absolute inset-x-0 top-0 z-30 px-3 py-3 sm:px-6" };
|
|
@@ -39,8 +283,6 @@ var _hoisted_19 = {
|
|
|
39
283
|
var _hoisted_20 = ["aria-label"];
|
|
40
284
|
var _hoisted_21 = ["aria-label"];
|
|
41
285
|
var DEFAULT_Z_INDEX = 2e3;
|
|
42
|
-
var WHEEL_ZOOM_SENSITIVITY = .0015;
|
|
43
|
-
var WHEEL_IDLE_MS = 120;
|
|
44
286
|
//#endregion
|
|
45
287
|
//#region src/components/GrImageViewer/GrImageViewer.vue
|
|
46
288
|
var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
@@ -106,114 +348,37 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
106
348
|
const resolvedRotateRightLabel = computed(() => props.rotateRightLabel ?? t("gr.imageViewer.rotateRight", "Rotate right"));
|
|
107
349
|
const resolvedEmptyText = computed(() => props.emptyText ?? t("gr.imageViewer.empty", "No image"));
|
|
108
350
|
const emit = __emit;
|
|
109
|
-
const TRAILING_ZERO_DECIMAL_RE = /\.0$/;
|
|
110
351
|
const open = computed(() => props.modelValue);
|
|
352
|
+
const isClient = typeof window !== "undefined";
|
|
353
|
+
const { lock: lockBodyScroll, unlock: unlockBodyScroll } = useScrollLock();
|
|
111
354
|
const total = computed(() => props.urlList.length);
|
|
112
355
|
const hasImages = computed(() => total.value > 0);
|
|
113
356
|
const currentIndex = ref(0);
|
|
114
|
-
const scale = ref(1);
|
|
115
|
-
const rotation = ref(0);
|
|
116
|
-
const offsetX = ref(0);
|
|
117
|
-
const offsetY = ref(0);
|
|
118
357
|
const imageEl = ref(null);
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
let dragOffsetStartX = 0;
|
|
127
|
-
let dragOffsetStartY = 0;
|
|
128
|
-
const naturalWidth = ref(0);
|
|
129
|
-
const naturalHeight = ref(0);
|
|
130
|
-
const fittedWidth = ref(0);
|
|
131
|
-
const fittedHeight = ref(0);
|
|
132
|
-
let resizeObserver = null;
|
|
133
|
-
const currentUrl = computed(() => {
|
|
134
|
-
if (!hasImages.value) return;
|
|
135
|
-
return props.urlList[currentIndex.value];
|
|
358
|
+
const { scale, rotation, isDragging, naturalWidth, naturalHeight, renderedWidth, renderedHeight, realScale, realScalePercent, imageStyle, zoomValueText, setScale, zoomIn, zoomOut, rotateLeft, rotateRight, resetTransform, resetImageMetrics, onImageLoad, startObservingImage, stopObservingImage, onPointerDown, onPointerMove, onPointerUp } = useZoomPan({
|
|
359
|
+
minScale: () => props.minScale,
|
|
360
|
+
maxScale: () => props.maxScale,
|
|
361
|
+
zoomRate: () => props.zoomRate,
|
|
362
|
+
draggable: () => props.draggable,
|
|
363
|
+
imageEl,
|
|
364
|
+
onRotate: (deg) => emit("rotate", deg)
|
|
136
365
|
});
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
366
|
+
const { isWheelZooming, onWheel, endWheelZoom } = useWheelGesture({
|
|
367
|
+
enabled: () => props.wheelZoom && hasImages.value,
|
|
368
|
+
applyZoomFactor: (factor) => setScale(scale.value * factor)
|
|
140
369
|
});
|
|
370
|
+
const currentUrl = computed(() => hasImages.value ? props.urlList[currentIndex.value] : void 0);
|
|
371
|
+
const displayIndex = computed(() => hasImages.value ? currentIndex.value + 1 : 0);
|
|
141
372
|
const viewerStyle = computed(() => ({ zIndex: String(Number.isFinite(props.zIndex) ? props.zIndex : DEFAULT_Z_INDEX) }));
|
|
142
|
-
const imageStyle = computed(() => ({ transform: `translate3d(${offsetX.value}px, ${offsetY.value}px, 0) scale(${scale.value}) rotate(${rotation.value}deg)` }));
|
|
143
373
|
const imageTransitionClass = computed(() => isWheelZooming.value || isDragging.value ? "" : "transition-transform duration-150 ease-out");
|
|
144
374
|
const imageCursorClass = computed(() => {
|
|
145
375
|
if (!props.draggable) return "";
|
|
146
376
|
return isDragging.value ? "cursor-grabbing" : "cursor-grab";
|
|
147
377
|
});
|
|
148
|
-
function formatPercent(value) {
|
|
149
|
-
if (Number.isInteger(value)) return String(value);
|
|
150
|
-
return value.toFixed(1).replace(TRAILING_ZERO_DECIMAL_RE, "");
|
|
151
|
-
}
|
|
152
|
-
const zoomValueText = computed(() => formatPercent(scale.value * 100));
|
|
153
|
-
const renderedWidth = computed(() => Math.round(fittedWidth.value * scale.value));
|
|
154
|
-
const renderedHeight = computed(() => Math.round(fittedHeight.value * scale.value));
|
|
155
|
-
const realScale = computed(() => {
|
|
156
|
-
if (!naturalWidth.value) return 0;
|
|
157
|
-
return fittedWidth.value * scale.value / naturalWidth.value;
|
|
158
|
-
});
|
|
159
|
-
const realScalePercent = computed(() => formatPercent(realScale.value * 100));
|
|
160
|
-
const toolbarSlotProps = computed(() => ({
|
|
161
|
-
index: currentIndex.value,
|
|
162
|
-
displayIndex: displayIndex.value,
|
|
163
|
-
total: total.value,
|
|
164
|
-
scale: scale.value,
|
|
165
|
-
rotation: rotation.value,
|
|
166
|
-
naturalWidth: naturalWidth.value,
|
|
167
|
-
naturalHeight: naturalHeight.value,
|
|
168
|
-
renderedWidth: renderedWidth.value,
|
|
169
|
-
renderedHeight: renderedHeight.value,
|
|
170
|
-
realScale: realScale.value,
|
|
171
|
-
realScalePercent: realScalePercent.value,
|
|
172
|
-
actions: toolbarActions
|
|
173
|
-
}));
|
|
174
378
|
function normalizeIndex(value) {
|
|
175
379
|
if (!hasImages.value) return 0;
|
|
176
380
|
return ((Number.isFinite(value) ? Math.trunc(value) : 0) % total.value + total.value) % total.value;
|
|
177
381
|
}
|
|
178
|
-
function resetTransform() {
|
|
179
|
-
scale.value = 1;
|
|
180
|
-
rotation.value = 0;
|
|
181
|
-
offsetX.value = 0;
|
|
182
|
-
offsetY.value = 0;
|
|
183
|
-
isDragging.value = false;
|
|
184
|
-
}
|
|
185
|
-
function resetImageMetrics() {
|
|
186
|
-
naturalWidth.value = 0;
|
|
187
|
-
naturalHeight.value = 0;
|
|
188
|
-
fittedWidth.value = 0;
|
|
189
|
-
fittedHeight.value = 0;
|
|
190
|
-
}
|
|
191
|
-
function measureFitted() {
|
|
192
|
-
const el = imageEl.value;
|
|
193
|
-
if (!el) return;
|
|
194
|
-
fittedWidth.value = el.offsetWidth;
|
|
195
|
-
fittedHeight.value = el.offsetHeight;
|
|
196
|
-
}
|
|
197
|
-
function onImageLoad(event) {
|
|
198
|
-
const el = event.target;
|
|
199
|
-
naturalWidth.value = el.naturalWidth;
|
|
200
|
-
naturalHeight.value = el.naturalHeight;
|
|
201
|
-
measureFitted();
|
|
202
|
-
}
|
|
203
|
-
function startObservingImage() {
|
|
204
|
-
const el = imageEl.value;
|
|
205
|
-
if (!el || typeof ResizeObserver === "undefined") return;
|
|
206
|
-
if (!resizeObserver) resizeObserver = new ResizeObserver(() => measureFitted());
|
|
207
|
-
resizeObserver.observe(el);
|
|
208
|
-
if (el.complete && el.naturalWidth) {
|
|
209
|
-
naturalWidth.value = el.naturalWidth;
|
|
210
|
-
naturalHeight.value = el.naturalHeight;
|
|
211
|
-
}
|
|
212
|
-
measureFitted();
|
|
213
|
-
}
|
|
214
|
-
function stopObservingImage() {
|
|
215
|
-
resizeObserver?.disconnect();
|
|
216
|
-
}
|
|
217
382
|
function setIndex(nextIndex, options) {
|
|
218
383
|
const normalizedIndex = normalizeIndex(nextIndex);
|
|
219
384
|
if (normalizedIndex === currentIndex.value) return;
|
|
@@ -250,79 +415,6 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
250
415
|
function next() {
|
|
251
416
|
setIndex(currentIndex.value + 1);
|
|
252
417
|
}
|
|
253
|
-
function setScale(value) {
|
|
254
|
-
const clamped = Math.min(props.maxScale, Math.max(props.minScale, value));
|
|
255
|
-
scale.value = Number(clamped.toFixed(4));
|
|
256
|
-
}
|
|
257
|
-
function zoomIn() {
|
|
258
|
-
setScale(scale.value * props.zoomRate);
|
|
259
|
-
}
|
|
260
|
-
function zoomOut() {
|
|
261
|
-
setScale(scale.value / props.zoomRate);
|
|
262
|
-
}
|
|
263
|
-
function cancelWheelFrame() {
|
|
264
|
-
if (wheelFrameId !== null) {
|
|
265
|
-
cancelAnimationFrame(wheelFrameId);
|
|
266
|
-
wheelFrameId = null;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
function endWheelZoom() {
|
|
270
|
-
if (wheelIdleTimer !== null) {
|
|
271
|
-
clearTimeout(wheelIdleTimer);
|
|
272
|
-
wheelIdleTimer = null;
|
|
273
|
-
}
|
|
274
|
-
isWheelZooming.value = false;
|
|
275
|
-
pendingWheelDelta = 0;
|
|
276
|
-
cancelWheelFrame();
|
|
277
|
-
}
|
|
278
|
-
function flushWheelZoom() {
|
|
279
|
-
wheelFrameId = null;
|
|
280
|
-
const delta = pendingWheelDelta;
|
|
281
|
-
pendingWheelDelta = 0;
|
|
282
|
-
if (!delta) return;
|
|
283
|
-
const factor = Math.exp(-delta * WHEEL_ZOOM_SENSITIVITY);
|
|
284
|
-
setScale(scale.value * factor);
|
|
285
|
-
}
|
|
286
|
-
function onWheel(event) {
|
|
287
|
-
if (!props.wheelZoom || !hasImages.value) return;
|
|
288
|
-
event.preventDefault();
|
|
289
|
-
isWheelZooming.value = true;
|
|
290
|
-
pendingWheelDelta += event.deltaY;
|
|
291
|
-
if (wheelFrameId === null) wheelFrameId = requestAnimationFrame(flushWheelZoom);
|
|
292
|
-
if (wheelIdleTimer !== null) clearTimeout(wheelIdleTimer);
|
|
293
|
-
wheelIdleTimer = setTimeout(() => {
|
|
294
|
-
wheelIdleTimer = null;
|
|
295
|
-
isWheelZooming.value = false;
|
|
296
|
-
}, WHEEL_IDLE_MS);
|
|
297
|
-
}
|
|
298
|
-
function onPointerDown(event) {
|
|
299
|
-
if (!props.draggable || !hasImages.value || event.button !== 0) return;
|
|
300
|
-
event.preventDefault();
|
|
301
|
-
isDragging.value = true;
|
|
302
|
-
dragStartX = event.clientX;
|
|
303
|
-
dragStartY = event.clientY;
|
|
304
|
-
dragOffsetStartX = offsetX.value;
|
|
305
|
-
dragOffsetStartY = offsetY.value;
|
|
306
|
-
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
307
|
-
}
|
|
308
|
-
function onPointerMove(event) {
|
|
309
|
-
if (!isDragging.value) return;
|
|
310
|
-
offsetX.value = dragOffsetStartX + (event.clientX - dragStartX);
|
|
311
|
-
offsetY.value = dragOffsetStartY + (event.clientY - dragStartY);
|
|
312
|
-
}
|
|
313
|
-
function onPointerUp(event) {
|
|
314
|
-
if (!isDragging.value) return;
|
|
315
|
-
isDragging.value = false;
|
|
316
|
-
event.currentTarget.releasePointerCapture?.(event.pointerId);
|
|
317
|
-
}
|
|
318
|
-
function rotateLeft() {
|
|
319
|
-
rotation.value -= 90;
|
|
320
|
-
emit("rotate", rotation.value);
|
|
321
|
-
}
|
|
322
|
-
function rotateRight() {
|
|
323
|
-
rotation.value += 90;
|
|
324
|
-
emit("rotate", rotation.value);
|
|
325
|
-
}
|
|
326
418
|
const toolbarActions = {
|
|
327
419
|
close: closeViewer,
|
|
328
420
|
prev,
|
|
@@ -333,51 +425,44 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
333
425
|
rotateLeft,
|
|
334
426
|
rotateRight
|
|
335
427
|
};
|
|
428
|
+
const toolbarSlotProps = computed(() => ({
|
|
429
|
+
index: currentIndex.value,
|
|
430
|
+
displayIndex: displayIndex.value,
|
|
431
|
+
total: total.value,
|
|
432
|
+
scale: scale.value,
|
|
433
|
+
rotation: rotation.value,
|
|
434
|
+
naturalWidth: naturalWidth.value,
|
|
435
|
+
naturalHeight: naturalHeight.value,
|
|
436
|
+
renderedWidth: renderedWidth.value,
|
|
437
|
+
renderedHeight: renderedHeight.value,
|
|
438
|
+
realScale: realScale.value,
|
|
439
|
+
realScalePercent: realScalePercent.value,
|
|
440
|
+
actions: toolbarActions
|
|
441
|
+
}));
|
|
336
442
|
function onBackdropClick() {
|
|
337
443
|
if (!props.hideOnClickModal) return;
|
|
338
444
|
closeViewer();
|
|
339
445
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
prev();
|
|
350
|
-
return;
|
|
351
|
-
case "ArrowRight":
|
|
352
|
-
event.preventDefault();
|
|
353
|
-
next();
|
|
354
|
-
return;
|
|
355
|
-
case "+":
|
|
356
|
-
case "=":
|
|
357
|
-
case "Add":
|
|
358
|
-
event.preventDefault();
|
|
359
|
-
zoomIn();
|
|
360
|
-
return;
|
|
361
|
-
case "-":
|
|
362
|
-
case "_":
|
|
363
|
-
case "Subtract":
|
|
364
|
-
event.preventDefault();
|
|
365
|
-
zoomOut();
|
|
366
|
-
return;
|
|
367
|
-
case "0":
|
|
368
|
-
event.preventDefault();
|
|
369
|
-
resetTransform();
|
|
370
|
-
break;
|
|
371
|
-
default:
|
|
446
|
+
const { onKeydown } = useViewerKeyboard({
|
|
447
|
+
closeOnEscape: () => props.closeOnPressEscape,
|
|
448
|
+
actions: {
|
|
449
|
+
close: closeViewer,
|
|
450
|
+
prev,
|
|
451
|
+
next,
|
|
452
|
+
zoomIn,
|
|
453
|
+
zoomOut,
|
|
454
|
+
reset: resetTransform
|
|
372
455
|
}
|
|
373
|
-
}
|
|
456
|
+
});
|
|
374
457
|
watch(() => props.modelValue, async (isOpen) => {
|
|
375
458
|
if (!isOpen) {
|
|
459
|
+
unlockBodyScroll();
|
|
376
460
|
stopObservingImage();
|
|
377
461
|
endWheelZoom();
|
|
378
462
|
isDragging.value = false;
|
|
379
463
|
return;
|
|
380
464
|
}
|
|
465
|
+
lockBodyScroll();
|
|
381
466
|
syncIndexFromInitial();
|
|
382
467
|
await nextTick();
|
|
383
468
|
startObservingImage();
|
|
@@ -396,11 +481,15 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
396
481
|
preloadAt(normalizeIndex(index + 1));
|
|
397
482
|
}, { immediate: true });
|
|
398
483
|
onBeforeUnmount(() => {
|
|
484
|
+
unlockBodyScroll();
|
|
399
485
|
stopObservingImage();
|
|
400
486
|
endWheelZoom();
|
|
401
487
|
});
|
|
402
488
|
return (_ctx, _cache) => {
|
|
403
|
-
return openBlock(), createBlock(Teleport, {
|
|
489
|
+
return openBlock(), createBlock(Teleport, {
|
|
490
|
+
to: "body",
|
|
491
|
+
disabled: !isClient
|
|
492
|
+
}, [createVNode(unref(Se), {
|
|
404
493
|
show: open.value,
|
|
405
494
|
as: "template"
|
|
406
495
|
}, {
|
|
@@ -411,7 +500,7 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
411
500
|
role: "dialog",
|
|
412
501
|
"aria-modal": "true",
|
|
413
502
|
static: true,
|
|
414
|
-
onKeydown
|
|
503
|
+
onKeydown: unref(onKeydown)
|
|
415
504
|
}, {
|
|
416
505
|
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(unref(he), {
|
|
417
506
|
as: "template",
|
|
@@ -444,19 +533,19 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
444
533
|
tabindex: "-1"
|
|
445
534
|
}, {
|
|
446
535
|
default: withCtx(() => [
|
|
447
|
-
createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [__props.showProgress ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(displayIndex.value) + " / " + toDisplayString(total.value), 1)) : createCommentVNode("", true), __props.showZoomValue ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(zoomValueText
|
|
536
|
+
createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [__props.showProgress ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(displayIndex.value) + " / " + toDisplayString(total.value), 1)) : createCommentVNode("", true), __props.showZoomValue ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(unref(zoomValueText)) + "% ", 1)) : createCommentVNode("", true)]), createElementVNode("button", {
|
|
448
537
|
type: "button",
|
|
449
538
|
"data-gr-image-viewer-close": "",
|
|
450
539
|
"aria-label": resolvedCloseLabel.value,
|
|
451
540
|
class: "h-11 w-11 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
452
541
|
onClick: closeViewer
|
|
453
|
-
}, [..._cache[
|
|
542
|
+
}, [..._cache[11] || (_cache[11] = [createElementVNode("span", {
|
|
454
543
|
"aria-hidden": "true",
|
|
455
544
|
class: "text-lg leading-none"
|
|
456
545
|
}, "✕", -1)])], 8, _hoisted_7)])]),
|
|
457
546
|
createElementVNode("div", {
|
|
458
547
|
class: "relative z-10 h-full w-full flex items-center justify-center px-16 py-16 sm:px-24 sm:py-20",
|
|
459
|
-
onWheel
|
|
548
|
+
onWheel: _cache[5] || (_cache[5] = (...args) => unref(onWheel) && unref(onWheel)(...args))
|
|
460
549
|
}, [
|
|
461
550
|
total.value > 1 ? (openBlock(), createElementBlock("button", {
|
|
462
551
|
key: 0,
|
|
@@ -465,7 +554,7 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
465
554
|
"aria-label": resolvedPrevLabel.value,
|
|
466
555
|
class: "absolute left-3 top-1/2 z-20 h-12 w-12 -translate-y-1/2 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80 sm:left-6",
|
|
467
556
|
onClick: prev
|
|
468
|
-
}, [..._cache[
|
|
557
|
+
}, [..._cache[12] || (_cache[12] = [createElementVNode("span", {
|
|
469
558
|
"aria-hidden": "true",
|
|
470
559
|
class: "text-xl leading-none"
|
|
471
560
|
}, "‹", -1)])], 8, _hoisted_8)) : createCommentVNode("", true),
|
|
@@ -476,7 +565,7 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
476
565
|
"aria-label": resolvedNextLabel.value,
|
|
477
566
|
class: "absolute right-3 top-1/2 z-20 h-12 w-12 -translate-y-1/2 flex items-center justify-center rounded-full border border-white/20 bg-black/35 text-white transition-colors hover:bg-black/55 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80 sm:right-6",
|
|
478
567
|
onClick: next
|
|
479
|
-
}, [..._cache[
|
|
568
|
+
}, [..._cache[13] || (_cache[13] = [createElementVNode("span", {
|
|
480
569
|
"aria-hidden": "true",
|
|
481
570
|
class: "text-xl leading-none"
|
|
482
571
|
}, "›", -1)])], 8, _hoisted_9)) : createCommentVNode("", true),
|
|
@@ -489,12 +578,12 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
489
578
|
alt: "",
|
|
490
579
|
draggable: "false",
|
|
491
580
|
class: normalizeClass(["max-h-full max-w-full select-none object-contain will-change-transform", [imageTransitionClass.value, imageCursorClass.value]]),
|
|
492
|
-
style: normalizeStyle(imageStyle
|
|
493
|
-
onLoad: onImageLoad,
|
|
494
|
-
onPointerdown: onPointerDown,
|
|
495
|
-
onPointermove: onPointerMove,
|
|
496
|
-
onPointerup: onPointerUp,
|
|
497
|
-
onPointercancel: onPointerUp
|
|
581
|
+
style: normalizeStyle(unref(imageStyle)),
|
|
582
|
+
onLoad: _cache[0] || (_cache[0] = (...args) => unref(onImageLoad) && unref(onImageLoad)(...args)),
|
|
583
|
+
onPointerdown: _cache[1] || (_cache[1] = (...args) => unref(onPointerDown) && unref(onPointerDown)(...args)),
|
|
584
|
+
onPointermove: _cache[2] || (_cache[2] = (...args) => unref(onPointerMove) && unref(onPointerMove)(...args)),
|
|
585
|
+
onPointerup: _cache[3] || (_cache[3] = (...args) => unref(onPointerUp) && unref(onPointerUp)(...args)),
|
|
586
|
+
onPointercancel: _cache[4] || (_cache[4] = (...args) => unref(onPointerUp) && unref(onPointerUp)(...args))
|
|
498
587
|
}, null, 46, _hoisted_11)) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(resolvedEmptyText.value), 1))])
|
|
499
588
|
], 32),
|
|
500
589
|
createElementVNode("div", _hoisted_13, [createElementVNode("div", _hoisted_14, [renderSlot(_ctx.$slots, "toolbar", normalizeProps(guardReactiveProps(toolbarSlotProps.value)), () => [createElementVNode("div", _hoisted_15, [
|
|
@@ -503,29 +592,29 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
503
592
|
"data-gr-image-viewer-zoom-out": "",
|
|
504
593
|
"aria-label": resolvedZoomOutLabel.value,
|
|
505
594
|
class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
506
|
-
onClick: zoomOut
|
|
595
|
+
onClick: _cache[6] || (_cache[6] = (...args) => unref(zoomOut) && unref(zoomOut)(...args))
|
|
507
596
|
}, " − ", 8, _hoisted_16),
|
|
508
597
|
createElementVNode("button", {
|
|
509
598
|
type: "button",
|
|
510
599
|
"data-gr-image-viewer-zoom-reset": "",
|
|
511
600
|
"aria-label": resolvedResetZoomLabel.value,
|
|
512
601
|
class: "h-11 min-w-11 px-3 flex items-center justify-center rounded-full text-xs font-700 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
513
|
-
onClick: resetTransform
|
|
602
|
+
onClick: _cache[7] || (_cache[7] = (...args) => unref(resetTransform) && unref(resetTransform)(...args))
|
|
514
603
|
}, " 100% ", 8, _hoisted_17),
|
|
515
604
|
createElementVNode("button", {
|
|
516
605
|
type: "button",
|
|
517
606
|
"data-gr-image-viewer-zoom-in": "",
|
|
518
607
|
"aria-label": resolvedZoomInLabel.value,
|
|
519
608
|
class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
520
|
-
onClick: zoomIn
|
|
609
|
+
onClick: _cache[8] || (_cache[8] = (...args) => unref(zoomIn) && unref(zoomIn)(...args))
|
|
521
610
|
}, " + ", 8, _hoisted_18),
|
|
522
611
|
_ctx.$slots["toolbar-actions"] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
523
|
-
_cache[
|
|
612
|
+
_cache[14] || (_cache[14] = createElementVNode("div", {
|
|
524
613
|
class: "mx-1 h-6 w-px bg-white/25",
|
|
525
614
|
"aria-hidden": "true"
|
|
526
615
|
}, null, -1)),
|
|
527
616
|
renderSlot(_ctx.$slots, "toolbar-actions", normalizeProps(guardReactiveProps(toolbarSlotProps.value))),
|
|
528
|
-
_cache[
|
|
617
|
+
_cache[15] || (_cache[15] = createElementVNode("div", {
|
|
529
618
|
class: "mx-1 h-6 w-px bg-white/25",
|
|
530
619
|
"aria-hidden": "true"
|
|
531
620
|
}, null, -1))
|
|
@@ -535,14 +624,14 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
535
624
|
"data-gr-image-viewer-rotate-left": "",
|
|
536
625
|
"aria-label": resolvedRotateLeftLabel.value,
|
|
537
626
|
class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
538
|
-
onClick: rotateLeft
|
|
627
|
+
onClick: _cache[9] || (_cache[9] = (...args) => unref(rotateLeft) && unref(rotateLeft)(...args))
|
|
539
628
|
}, " ↺ ", 8, _hoisted_20),
|
|
540
629
|
createElementVNode("button", {
|
|
541
630
|
type: "button",
|
|
542
631
|
"data-gr-image-viewer-rotate-right": "",
|
|
543
632
|
"aria-label": resolvedRotateRightLabel.value,
|
|
544
633
|
class: "h-11 min-w-11 px-2 flex items-center justify-center rounded-full text-sm font-600 text-white transition-colors hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/80",
|
|
545
|
-
onClick: rotateRight
|
|
634
|
+
onClick: _cache[10] || (_cache[10] = (...args) => unref(rotateRight) && unref(rotateRight)(...args))
|
|
546
635
|
}, " ↻ ", 8, _hoisted_21)
|
|
547
636
|
])])])])
|
|
548
637
|
]),
|
|
@@ -551,9 +640,9 @@ var GrImageViewer_default = /* @__PURE__ */ defineComponent({
|
|
|
551
640
|
_: 3
|
|
552
641
|
})])]),
|
|
553
642
|
_: 3
|
|
554
|
-
}, 8, ["style"])]),
|
|
643
|
+
}, 8, ["style", "onKeydown"])]),
|
|
555
644
|
_: 3
|
|
556
|
-
}, 8, ["show"])]);
|
|
645
|
+
}, 8, ["show"])], 8, ["disabled"]);
|
|
557
646
|
};
|
|
558
647
|
}
|
|
559
648
|
});
|