@templatical/editor 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
- package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CcqQDHzJ.js} +6 -6
- package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
- package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-Dnww6og-.js} +263 -315
- package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Bj4NZiie.js} +3 -3
- package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
- package/dist/CommentsSidebar-DvNEdugN.js +435 -0
- package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
- package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
- package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
- package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
- package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
- package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
- package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor--_zWfxps.js} +47 -47
- package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
- package/dist/SaveBlockDialog-CYIEHABH.js +264 -0
- package/dist/SavedBlockPreviewCanvas-2-mzAnZE.js +109 -0
- package/dist/SavedBlocksBrowserModal-D5V5yF_3.js +323 -0
- package/dist/SavedBlocksPanels-Dff38YXu.js +36 -0
- package/dist/SavedBlocksPickBar-rB6iyji6.js +52 -0
- package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-FtzDq8f0.js} +8 -8
- package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
- package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-DL2O1H8M.js} +4 -4
- package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-CPda5lh-.js} +11 -11
- package/dist/{TplModal-BDDyvT-C.js → TplModal-C7Koj5gM.js} +3 -3
- package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-CgwECCut.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu-Duwg413F.js} +12 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-B3hqbwfP.js} +275 -318
- package/dist/cdn/chunks/CloudEditor-B3hqbwfP.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-BS3rJy6-.js} +7 -6
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DZSzZ5ZP.js} +168 -164
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-DAnmIZjq.js} +4 -5
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-D80JedOj.js} +11 -10
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js +123 -0
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-CtaRa1vr.js} +90 -85
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js +263 -0
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +1 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js +111 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js +322 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js +38 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js +54 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-BJ7LFykI.js} +18 -15
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
- package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
- package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
- package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
- package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
- package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
- package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
- package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
- package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
- package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
- package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
- package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
- package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-ZX2oarW6.js} +28 -26
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-ZX2oarW6.js.map} +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
- package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
- package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
- package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
- package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
- package/dist/cdn/chunks/{media-library-yYAkAagU.js → src-D6F_3XkE.js} +1754 -1252
- package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
- package/dist/cdn/chunks/{renderer-DpBGiXOg.js → src-DYji-wXB.js} +117 -133
- package/dist/cdn/chunks/src-DYji-wXB.js.map +1 -0
- package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-DMOEiSX9.js} +1448 -1354
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
- package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +132 -120
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
- package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
- package/dist/chevron-up-BACyVhyC.js +7 -0
- package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
- package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
- package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
- package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
- package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
- package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
- package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
- package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
- package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
- package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
- package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
- package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
- package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
- package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
- package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
- package/dist/dist-CweLDZrs.js +5 -0
- package/dist/dist-DOsdqAEZ.js +5 -0
- package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
- package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
- package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
- package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
- package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
- package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
- package/dist/index.d.ts +81 -4
- package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
- package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
- package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
- package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
- package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
- package/dist/pencil-DdwmkKLb.js +10 -0
- package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
- package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
- package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
- package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
- package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
- package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
- package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DkF_-uX8.js → styles-PcOPXvLO.js} +1235 -1151
- package/dist/templatical-editor.js +134 -125
- package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
- package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
- package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
- package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
- package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
- package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-CT1slufs.js} +997 -817
- package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
- package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
- package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
- package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
- package/package.json +21 -21
- package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
- package/dist/CountdownBlock-Bn5w7C-p.js +0 -92
- package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
- package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
- package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
- package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
- package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
- package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-eGUE7hhw.js +0 -93
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-B0Hjh42a.js +0 -22
- package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
- package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
- package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
- package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js +0 -7657
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
- package/dist/cdn/chunks/icons-GX40Qm2W.js +0 -690
- package/dist/cdn/chunks/icons-GX40Qm2W.js.map +0 -1
- package/dist/cdn/chunks/media-library-yYAkAagU.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
- package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
- package/dist/cdn/chunks/quality-DffYv9j5.js.map +0 -1
- package/dist/cdn/chunks/renderer-DpBGiXOg.js.map +0 -1
- package/dist/cdn/chunks/src-9K6uFiuK.js +0 -509
- package/dist/cdn/chunks/src-9K6uFiuK.js.map +0 -1
- package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
- package/dist/dist-BDVm2MrW.js +0 -5
- package/dist/dist-DbekZDmJ.js +0 -5
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { M as e, P as t, T as n, V as r, Z as i, c as a, d as o, f as s, g as c, h as l, it as u, l as ee, m as te, n as ne, ot as d, p as f, st as p, u as re, x as m, y as h } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as ie } from "./dist-CxTt8FRE.js";
|
|
3
|
+
import { L as ae, l as oe, z as se } from "./keys-D7kUmfpE.js";
|
|
4
|
+
import { t as ce } from "./useI18n-8Wd7G-cq.js";
|
|
5
|
+
import { a as le, i as g, n as ue, r as de, t as fe } from "./usePopoverPosition-Bx0QewTv.js";
|
|
6
|
+
import { n as pe } from "./icons-CYWw8Xfp.js";
|
|
3
7
|
//#region src/constants/styleConstants.ts
|
|
4
|
-
var
|
|
8
|
+
var _ = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]", v = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", y = "tpl:w-full tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-sm tpl:border tpl:rounded-l-[var(--tpl-radius-sm)] tpl:rounded-r-none tpl:border-r-0 tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)] placeholder:tpl:text-[var(--tpl-text-dim)]", b = "tpl:flex tpl:items-center tpl:px-2.5 tpl:text-xs tpl:border tpl:border-l-0 tpl:text-[var(--tpl-text-dim)] tpl:bg-[var(--tpl-bg-hover)] tpl:border-[var(--tpl-border)] tpl:rounded-r-[var(--tpl-radius-sm)]", me = "tpl:flex-1 tpl:h-10 tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-mono tpl:border tpl:rounded-[var(--tpl-radius-sm)] tpl:shadow-xs tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:outline-none focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", x = "tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-4 tpl:border tpl:border-[var(--tpl-border)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)]", S = "tpl:flex tpl:size-8 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]", C = "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]", w = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2.5 tpl:py-2 tpl:font-mono tpl:text-xs tpl:text-[var(--tpl-text)] tpl:outline-none tpl:transition-all tpl:duration-150 tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", T = "tpl-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3.5 tpl:py-2 tpl:text-sm tpl:font-medium tpl:whitespace-nowrap tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary)] hover:tpl:text-[var(--tpl-bg)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", E = [
|
|
5
9
|
"10px",
|
|
6
10
|
"12px",
|
|
7
11
|
"14px",
|
|
@@ -14,7 +18,7 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
14
18
|
"36px",
|
|
15
19
|
"48px",
|
|
16
20
|
"64px"
|
|
17
|
-
],
|
|
21
|
+
], D = [
|
|
18
22
|
"1",
|
|
19
23
|
"1.2",
|
|
20
24
|
"1.4",
|
|
@@ -23,7 +27,7 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
23
27
|
"1.8",
|
|
24
28
|
"2",
|
|
25
29
|
"2.5"
|
|
26
|
-
],
|
|
30
|
+
], O = [
|
|
27
31
|
{
|
|
28
32
|
label: "Normal",
|
|
29
33
|
value: "normal"
|
|
@@ -52,34 +56,34 @@ var v = "tpl:block tpl:mb-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-te
|
|
|
52
56
|
label: "3px",
|
|
53
57
|
value: "3px"
|
|
54
58
|
}
|
|
55
|
-
],
|
|
59
|
+
], k = "#000000", A = "#ffffff", j = "#ffff00", M = "#f2f2f2", N = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, P = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n;
|
|
56
60
|
360 / (Math.PI * 2);
|
|
57
|
-
var
|
|
61
|
+
var F = (e) => ge(I(e)), I = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
58
62
|
r: parseInt(e[0] + e[0], 16),
|
|
59
63
|
g: parseInt(e[1] + e[1], 16),
|
|
60
64
|
b: parseInt(e[2] + e[2], 16),
|
|
61
|
-
a: e.length === 4 ?
|
|
65
|
+
a: e.length === 4 ? P(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
62
66
|
} : {
|
|
63
67
|
r: parseInt(e.substring(0, 2), 16),
|
|
64
68
|
g: parseInt(e.substring(2, 4), 16),
|
|
65
69
|
b: parseInt(e.substring(4, 6), 16),
|
|
66
|
-
a: e.length === 8 ?
|
|
67
|
-
}),
|
|
70
|
+
a: e.length === 8 ? P(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
71
|
+
}), L = (e) => he(B(e)), R = ({ h: e, s: t, v: n, a: r }) => {
|
|
68
72
|
let i = (200 - t) * n / 100;
|
|
69
73
|
return {
|
|
70
|
-
h:
|
|
71
|
-
s:
|
|
72
|
-
l:
|
|
73
|
-
a:
|
|
74
|
+
h: P(e),
|
|
75
|
+
s: P(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
76
|
+
l: P(i / 2),
|
|
77
|
+
a: P(r, 2)
|
|
74
78
|
};
|
|
75
|
-
},
|
|
76
|
-
let { h: t, s: n, l: r } =
|
|
79
|
+
}, z = (e) => {
|
|
80
|
+
let { h: t, s: n, l: r } = R(e);
|
|
77
81
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
78
|
-
},
|
|
82
|
+
}, B = ({ h: e, s: t, v: n, a: r }) => {
|
|
79
83
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
80
84
|
let i = Math.floor(e), a = n * (1 - t), o = n * (1 - (e - i) * t), s = n * (1 - (1 - e + i) * t), c = i % 6;
|
|
81
85
|
return {
|
|
82
|
-
r:
|
|
86
|
+
r: P([
|
|
83
87
|
n,
|
|
84
88
|
o,
|
|
85
89
|
a,
|
|
@@ -87,7 +91,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
87
91
|
s,
|
|
88
92
|
n
|
|
89
93
|
][c] * 255),
|
|
90
|
-
g:
|
|
94
|
+
g: P([
|
|
91
95
|
s,
|
|
92
96
|
n,
|
|
93
97
|
n,
|
|
@@ -95,7 +99,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
95
99
|
a,
|
|
96
100
|
a
|
|
97
101
|
][c] * 255),
|
|
98
|
-
b:
|
|
102
|
+
b: P([
|
|
99
103
|
a,
|
|
100
104
|
a,
|
|
101
105
|
s,
|
|
@@ -103,74 +107,74 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
103
107
|
n,
|
|
104
108
|
o
|
|
105
109
|
][c] * 255),
|
|
106
|
-
a:
|
|
110
|
+
a: P(r, 2)
|
|
107
111
|
};
|
|
108
|
-
},
|
|
112
|
+
}, V = (e) => {
|
|
109
113
|
let t = e.toString(16);
|
|
110
114
|
return t.length < 2 ? "0" + t : t;
|
|
111
|
-
}, me = ({ r: e, g: t, b: n, a: r }) => {
|
|
112
|
-
let i = r < 1 ? H(I(r * 255)) : "";
|
|
113
|
-
return "#" + H(e) + H(t) + H(n) + i;
|
|
114
115
|
}, he = ({ r: e, g: t, b: n, a: r }) => {
|
|
116
|
+
let i = r < 1 ? V(P(r * 255)) : "";
|
|
117
|
+
return "#" + V(e) + V(t) + V(n) + i;
|
|
118
|
+
}, ge = ({ r: e, g: t, b: n, a: r }) => {
|
|
115
119
|
let i = Math.max(e, t, n), a = i - Math.min(e, t, n), o = a ? i === e ? (t - n) / a : i === t ? 2 + (n - e) / a : 4 + (e - t) / a : 0;
|
|
116
120
|
return {
|
|
117
|
-
h:
|
|
118
|
-
s:
|
|
119
|
-
v:
|
|
121
|
+
h: P(60 * (o < 0 ? o + 6 : o)),
|
|
122
|
+
s: P(i ? a / i * 100 : 0),
|
|
123
|
+
v: P(i / 255 * 100),
|
|
120
124
|
a: r
|
|
121
125
|
};
|
|
122
|
-
},
|
|
126
|
+
}, H = (e, t) => {
|
|
123
127
|
if (e === t) return !0;
|
|
124
128
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
125
129
|
return !0;
|
|
126
|
-
},
|
|
127
|
-
let t =
|
|
128
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
129
|
-
},
|
|
130
|
+
}, U = (e, t) => e.toLowerCase() === t.toLowerCase() || H(I(e), I(t)), W = {}, G = (e) => {
|
|
131
|
+
let t = W[e];
|
|
132
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, W[e] = t), t;
|
|
133
|
+
}, K = (e, t, n) => {
|
|
130
134
|
e.dispatchEvent(new CustomEvent(t, {
|
|
131
135
|
bubbles: !0,
|
|
132
136
|
detail: n
|
|
133
137
|
}));
|
|
134
|
-
},
|
|
135
|
-
let n =
|
|
136
|
-
|
|
137
|
-
x:
|
|
138
|
-
y:
|
|
138
|
+
}, q = !1, J = (e) => "touches" in e, _e = (e) => q && !J(e) ? !1 : (q ||= J(e), !0), Y = (e, t) => {
|
|
139
|
+
let n = J(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
140
|
+
K(e.el, "move", e.getMove({
|
|
141
|
+
x: N((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
142
|
+
y: N((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
139
143
|
}));
|
|
140
|
-
},
|
|
144
|
+
}, ve = (e, t) => {
|
|
141
145
|
let n = t.keyCode;
|
|
142
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
146
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), K(e.el, "move", e.getMove({
|
|
143
147
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
144
148
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
145
149
|
}, !0)));
|
|
146
|
-
},
|
|
150
|
+
}, X = class {
|
|
147
151
|
constructor(e, t, n, r) {
|
|
148
|
-
let i =
|
|
152
|
+
let i = G(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
149
153
|
e.appendChild(i.content.cloneNode(!0));
|
|
150
154
|
let a = e.querySelector(`[part=${t}]`);
|
|
151
155
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
152
156
|
}
|
|
153
157
|
set dragging(e) {
|
|
154
158
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
155
|
-
t(
|
|
159
|
+
t(q ? "touchmove" : "mousemove", this), t(q ? "touchend" : "mouseup", this);
|
|
156
160
|
}
|
|
157
161
|
handleEvent(e) {
|
|
158
162
|
switch (e.type) {
|
|
159
163
|
case "mousedown":
|
|
160
164
|
case "touchstart":
|
|
161
|
-
if (e.preventDefault(), !
|
|
162
|
-
this.el.focus(),
|
|
165
|
+
if (e.preventDefault(), !_e(e) || !q && e.button != 0) return;
|
|
166
|
+
this.el.focus(), Y(this, e), this.dragging = !0;
|
|
163
167
|
break;
|
|
164
168
|
case "mousemove":
|
|
165
169
|
case "touchmove":
|
|
166
|
-
e.preventDefault(),
|
|
170
|
+
e.preventDefault(), Y(this, e);
|
|
167
171
|
break;
|
|
168
172
|
case "mouseup":
|
|
169
173
|
case "touchend":
|
|
170
174
|
this.dragging = !1;
|
|
171
175
|
break;
|
|
172
176
|
case "keydown":
|
|
173
|
-
|
|
177
|
+
ve(this, e);
|
|
174
178
|
break;
|
|
175
179
|
}
|
|
176
180
|
}
|
|
@@ -179,25 +183,25 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
179
183
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
180
184
|
});
|
|
181
185
|
}
|
|
182
|
-
}, ye = class extends
|
|
186
|
+
}, ye = class extends X {
|
|
183
187
|
constructor(e) {
|
|
184
188
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
185
189
|
}
|
|
186
190
|
update({ h: e }) {
|
|
187
191
|
this.h = e, this.style([{
|
|
188
192
|
left: `${e / 360 * 100}%`,
|
|
189
|
-
color:
|
|
193
|
+
color: z({
|
|
190
194
|
h: e,
|
|
191
195
|
s: 100,
|
|
192
196
|
v: 100,
|
|
193
197
|
a: 1
|
|
194
198
|
})
|
|
195
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
199
|
+
}]), this.el.setAttribute("aria-valuenow", `${P(e)}`);
|
|
196
200
|
}
|
|
197
201
|
getMove(e, t) {
|
|
198
|
-
return { h: t ?
|
|
202
|
+
return { h: t ? N(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
199
203
|
}
|
|
200
|
-
}, be = class extends
|
|
204
|
+
}, be = class extends X {
|
|
201
205
|
constructor(e) {
|
|
202
206
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
203
207
|
}
|
|
@@ -205,18 +209,18 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
205
209
|
this.hsva = e, this.style([{
|
|
206
210
|
top: `${100 - e.v}%`,
|
|
207
211
|
left: `${e.s}%`,
|
|
208
|
-
color:
|
|
209
|
-
}, { "background-color":
|
|
212
|
+
color: z(e)
|
|
213
|
+
}, { "background-color": z({
|
|
210
214
|
h: e.h,
|
|
211
215
|
s: 100,
|
|
212
216
|
v: 100,
|
|
213
217
|
a: 1
|
|
214
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
218
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${P(e.s)}%, Brightness ${P(e.v)}%`);
|
|
215
219
|
}
|
|
216
220
|
getMove(e, t) {
|
|
217
221
|
return {
|
|
218
|
-
s: t ?
|
|
219
|
-
v: t ?
|
|
222
|
+
s: t ? N(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
223
|
+
v: t ? N(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
220
224
|
};
|
|
221
225
|
}
|
|
222
226
|
}, xe = ":host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:\"\";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}", Se = "[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}", Ce = "[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}", Z = Symbol("same"), Q = Symbol("color"), we = Symbol("hsva"), $ = Symbol("update"), Te = Symbol("parts"), Ee = Symbol("css"), De = Symbol("sliders"), Oe = class extends HTMLElement {
|
|
@@ -244,7 +248,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
244
248
|
}
|
|
245
249
|
constructor() {
|
|
246
250
|
super();
|
|
247
|
-
let e =
|
|
251
|
+
let e = G(`<style>${this[Ee].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
248
252
|
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Te] = this[De].map((e) => new e(t));
|
|
249
253
|
}
|
|
250
254
|
connectedCallback() {
|
|
@@ -264,7 +268,7 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
264
268
|
};
|
|
265
269
|
this[$](n);
|
|
266
270
|
let r;
|
|
267
|
-
!
|
|
271
|
+
!H(n, t) && !this[Z](r = this.colorModel.fromHsva(n)) && (this[Q] = r, K(this, "color-changed", { value: r }));
|
|
268
272
|
}
|
|
269
273
|
[Z](e) {
|
|
270
274
|
return this.color && this.colorModel.equal(e, this.color);
|
|
@@ -274,14 +278,14 @@ var L = (e) => he(R(e)), R = (e) => (e[0] === "#" && (e = e.substring(1)), e.len
|
|
|
274
278
|
}
|
|
275
279
|
}, ke = {
|
|
276
280
|
defaultColor: "#000",
|
|
277
|
-
toHsva:
|
|
278
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
281
|
+
toHsva: F,
|
|
282
|
+
fromHsva: ({ h: e, s: t, v: n }) => L({
|
|
279
283
|
h: e,
|
|
280
284
|
s: t,
|
|
281
285
|
v: n,
|
|
282
286
|
a: 1
|
|
283
287
|
}),
|
|
284
|
-
equal:
|
|
288
|
+
equal: U,
|
|
285
289
|
fromAttr: (e) => e
|
|
286
290
|
}, Ae = class extends Oe {
|
|
287
291
|
get colorModel() {
|
|
@@ -346,34 +350,34 @@ var je = [
|
|
|
346
350
|
}
|
|
347
351
|
},
|
|
348
352
|
emits: ["update:modelValue"],
|
|
349
|
-
setup(m, { emit:
|
|
350
|
-
let
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}, { ignore: [
|
|
354
|
-
let
|
|
355
|
-
function
|
|
356
|
-
return
|
|
353
|
+
setup(m, { emit: _ }) {
|
|
354
|
+
let v = m, y = _, { t: b } = ce(), x = i(!1), S = i(), C = i(), w = i(!1);
|
|
355
|
+
ie(S, () => {
|
|
356
|
+
x.value = !1;
|
|
357
|
+
}, { ignore: [C] });
|
|
358
|
+
let T = s(() => !v.modelValue), E = s(() => g(v.modelValue)), D = s(() => g(v.modelValue || v.seedColor)), O = s(() => !v.disabled && !T.value), k = n(oe, le), A = s(() => [...new Set(v.presets ?? k.presets)]), j = s(() => v.allowCustom ?? k.allowCustom), M = s(() => A.value.length > 0), N = s(() => j.value || !M.value), P = s(() => de(v.modelValue));
|
|
359
|
+
function F(e) {
|
|
360
|
+
return P.value !== "" && de(e) === P.value;
|
|
357
361
|
}
|
|
358
|
-
function
|
|
359
|
-
|
|
362
|
+
function I(e) {
|
|
363
|
+
y("update:modelValue", e);
|
|
360
364
|
}
|
|
361
|
-
let
|
|
362
|
-
function
|
|
363
|
-
return
|
|
365
|
+
let L = s(() => M.value && !N.value);
|
|
366
|
+
function R(e) {
|
|
367
|
+
return L.value ? e + 1 : e;
|
|
364
368
|
}
|
|
365
|
-
let
|
|
366
|
-
if (
|
|
367
|
-
let e =
|
|
368
|
-
return e === -1 ? 0 :
|
|
369
|
+
let z = s(() => {
|
|
370
|
+
if (L.value && T.value) return 0;
|
|
371
|
+
let e = A.value.findIndex((e) => F(e));
|
|
372
|
+
return e === -1 ? 0 : R(e);
|
|
369
373
|
});
|
|
370
|
-
function
|
|
371
|
-
return
|
|
374
|
+
function B() {
|
|
375
|
+
return z.value === 0 ? 0 : -1;
|
|
372
376
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
377
|
+
function V(e) {
|
|
378
|
+
return R(e) === z.value ? 0 : -1;
|
|
375
379
|
}
|
|
376
|
-
function
|
|
380
|
+
function he(e) {
|
|
377
381
|
if (![
|
|
378
382
|
"ArrowRight",
|
|
379
383
|
"ArrowDown",
|
|
@@ -383,83 +387,83 @@ var je = [
|
|
|
383
387
|
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
|
|
384
388
|
r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
|
|
385
389
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
390
|
+
function ge(e) {
|
|
391
|
+
w.value = !0, y("update:modelValue", e.detail.value);
|
|
388
392
|
}
|
|
389
|
-
function
|
|
390
|
-
|
|
393
|
+
function H() {
|
|
394
|
+
w.value = !1;
|
|
391
395
|
}
|
|
392
|
-
function
|
|
393
|
-
!
|
|
396
|
+
function U() {
|
|
397
|
+
!w.value && T.value && y("update:modelValue", D.value);
|
|
394
398
|
}
|
|
395
|
-
function
|
|
396
|
-
|
|
399
|
+
function W(e) {
|
|
400
|
+
y("update:modelValue", e.target.value);
|
|
397
401
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
402
|
+
function G() {
|
|
403
|
+
y("update:modelValue", "");
|
|
400
404
|
}
|
|
401
|
-
let
|
|
405
|
+
let K = ue(), { toLocal: q } = fe(), J = n(ae, null), _e = n(se, null), Y = i({
|
|
402
406
|
top: 0,
|
|
403
407
|
left: 0
|
|
404
408
|
});
|
|
405
|
-
function
|
|
406
|
-
if (!
|
|
407
|
-
if (!
|
|
408
|
-
let e =
|
|
409
|
+
function ve() {
|
|
410
|
+
if (!v.disabled) {
|
|
411
|
+
if (!x.value) {
|
|
412
|
+
let e = C.value?.getBoundingClientRect();
|
|
409
413
|
if (e) {
|
|
410
414
|
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
411
|
-
|
|
415
|
+
Y.value = q({
|
|
412
416
|
top: t,
|
|
413
417
|
left: e.left
|
|
414
418
|
});
|
|
415
419
|
}
|
|
416
420
|
}
|
|
417
|
-
|
|
421
|
+
x.value = !x.value;
|
|
418
422
|
}
|
|
419
423
|
}
|
|
420
424
|
return (n, i) => (e(), c("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", m.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
421
425
|
f("button", {
|
|
422
426
|
ref_key: "swatchRef",
|
|
423
|
-
ref:
|
|
427
|
+
ref: C,
|
|
424
428
|
type: "button",
|
|
425
429
|
disabled: m.disabled,
|
|
426
|
-
"aria-label": m.ariaLabel || u(
|
|
430
|
+
"aria-label": m.ariaLabel || u(b).colorPicker.pickColor,
|
|
427
431
|
title: m.ariaLabel || void 0,
|
|
428
|
-
"aria-expanded":
|
|
432
|
+
"aria-expanded": x.value,
|
|
429
433
|
class: d([
|
|
430
434
|
"tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-0.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
431
435
|
m.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
432
|
-
|
|
436
|
+
x.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !m.disabled && "hover:tpl:border-[var(--tpl-text-dim)]",
|
|
433
437
|
m.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
434
438
|
]),
|
|
435
|
-
onClick:
|
|
439
|
+
onClick: ve
|
|
436
440
|
}, [f("span", {
|
|
437
|
-
class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty":
|
|
438
|
-
style: p(
|
|
441
|
+
class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": T.value }]),
|
|
442
|
+
style: p(T.value ? void 0 : { backgroundColor: E.value })
|
|
439
443
|
}, null, 6)], 10, je),
|
|
440
|
-
!m.swatchOnly &&
|
|
444
|
+
!m.swatchOnly && N.value ? (e(), c("div", Me, [f("input", {
|
|
441
445
|
type: "text",
|
|
442
|
-
class: d([u(
|
|
443
|
-
style: p(
|
|
444
|
-
value:
|
|
445
|
-
placeholder: m.placeholder || u(
|
|
446
|
+
class: d([u(me), "tpl:w-full"]),
|
|
447
|
+
style: p(O.value ? { paddingRight: "2.25rem" } : void 0),
|
|
448
|
+
value: E.value,
|
|
449
|
+
placeholder: m.placeholder || u(b).colorPicker.notSet,
|
|
446
450
|
disabled: m.disabled,
|
|
447
|
-
"aria-label": u(
|
|
448
|
-
onInput:
|
|
449
|
-
}, null, 46, Ne),
|
|
451
|
+
"aria-label": u(b).colorPicker.hexValue,
|
|
452
|
+
onInput: W
|
|
453
|
+
}, null, 46, Ne), O.value ? (e(), c("button", {
|
|
450
454
|
key: 0,
|
|
451
455
|
type: "button",
|
|
452
|
-
"aria-label": u(
|
|
453
|
-
title: u(
|
|
456
|
+
"aria-label": u(b).colorPicker.clear,
|
|
457
|
+
title: u(b).colorPicker.clear,
|
|
454
458
|
class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
|
|
455
|
-
onClick:
|
|
456
|
-
}, [h(u(
|
|
459
|
+
onClick: G
|
|
460
|
+
}, [h(u(pe), {
|
|
457
461
|
size: 14,
|
|
458
462
|
"stroke-width": 1.5
|
|
459
463
|
})], 8, Pe)) : l("", !0)])) : l("", !0),
|
|
460
464
|
(e(), te(o, {
|
|
461
|
-
to: u(
|
|
462
|
-
disabled: !u(
|
|
465
|
+
to: u(K),
|
|
466
|
+
disabled: !u(K)
|
|
463
467
|
}, [h(ne, {
|
|
464
468
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
465
469
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
@@ -468,73 +472,73 @@ var je = [
|
|
|
468
472
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
469
473
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
470
474
|
}, {
|
|
471
|
-
default: r(() => [
|
|
475
|
+
default: r(() => [x.value ? (e(), c("div", {
|
|
472
476
|
key: 0,
|
|
473
477
|
ref_key: "popoverRef",
|
|
474
|
-
ref:
|
|
475
|
-
"data-tpl-theme": u(
|
|
478
|
+
ref: S,
|
|
479
|
+
"data-tpl-theme": u(_e),
|
|
476
480
|
class: "tpl-color-popover tpl:absolute tpl:z-modal tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-3 tpl:shadow-lg",
|
|
477
481
|
style: p({
|
|
478
|
-
top: `${
|
|
479
|
-
left: `${
|
|
480
|
-
...u(
|
|
482
|
+
top: `${Y.value.top}px`,
|
|
483
|
+
left: `${Y.value.left}px`,
|
|
484
|
+
...u(J)
|
|
481
485
|
})
|
|
482
486
|
}, [
|
|
483
|
-
|
|
487
|
+
M.value ? (e(), c("div", {
|
|
484
488
|
key: 0,
|
|
485
489
|
role: "radiogroup",
|
|
486
|
-
"aria-label": u(
|
|
487
|
-
class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5",
|
|
488
|
-
onKeydown:
|
|
489
|
-
}, [
|
|
490
|
+
"aria-label": u(b).colorPicker.presetColors,
|
|
491
|
+
class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", N.value && "tpl:mb-2"]),
|
|
492
|
+
onKeydown: he
|
|
493
|
+
}, [L.value ? (e(), c("button", {
|
|
490
494
|
key: 0,
|
|
491
495
|
type: "button",
|
|
492
496
|
role: "radio",
|
|
493
|
-
"aria-label": u(
|
|
494
|
-
title: u(
|
|
495
|
-
"aria-checked":
|
|
496
|
-
tabindex:
|
|
497
|
-
class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]",
|
|
498
|
-
onClick:
|
|
499
|
-
}, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(
|
|
497
|
+
"aria-label": u(b).colorPicker.clear,
|
|
498
|
+
title: u(b).colorPicker.clear,
|
|
499
|
+
"aria-checked": T.value,
|
|
500
|
+
tabindex: B(),
|
|
501
|
+
class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", T.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
|
|
502
|
+
onClick: G
|
|
503
|
+
}, null, 10, Le)) : l("", !0), (e(!0), c(re, null, t(A.value, (t, n) => (e(), c("button", {
|
|
500
504
|
key: t,
|
|
501
505
|
type: "button",
|
|
502
506
|
role: "radio",
|
|
503
507
|
"aria-label": t,
|
|
504
508
|
title: t,
|
|
505
|
-
"aria-checked":
|
|
506
|
-
tabindex:
|
|
509
|
+
"aria-checked": F(t),
|
|
510
|
+
tabindex: V(n),
|
|
507
511
|
style: p({ backgroundColor: t }),
|
|
508
|
-
class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]",
|
|
509
|
-
onClick: (e) =>
|
|
512
|
+
class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", F(t) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "hover:tpl:border-[var(--tpl-text-dim)]"]),
|
|
513
|
+
onClick: (e) => I(t)
|
|
510
514
|
}, null, 14, Re))), 128))], 42, Ie)) : l("", !0),
|
|
511
|
-
|
|
515
|
+
N.value ? (e(), c("hex-color-picker", {
|
|
512
516
|
key: 1,
|
|
513
|
-
color:
|
|
514
|
-
"aria-label": u(
|
|
515
|
-
onColorChanged:
|
|
516
|
-
onPointerdown:
|
|
517
|
-
onPointerup:
|
|
518
|
-
onKeydown: i[0] ||= a((e) =>
|
|
517
|
+
color: D.value,
|
|
518
|
+
"aria-label": u(b).colorPicker.pickColor,
|
|
519
|
+
onColorChanged: ge,
|
|
520
|
+
onPointerdown: H,
|
|
521
|
+
onPointerup: U,
|
|
522
|
+
onKeydown: i[0] ||= a((e) => x.value = !1, ["escape"])
|
|
519
523
|
}, null, 40, ze)) : l("", !0),
|
|
520
|
-
m.swatchOnly &&
|
|
524
|
+
m.swatchOnly && N.value ? (e(), c("div", Be, [f("input", {
|
|
521
525
|
type: "text",
|
|
522
|
-
class: d([u(
|
|
523
|
-
style: p(
|
|
524
|
-
value:
|
|
525
|
-
placeholder: m.placeholder || u(
|
|
526
|
+
class: d([u(me), "tpl:w-full"]),
|
|
527
|
+
style: p(O.value ? { paddingRight: "2.25rem" } : void 0),
|
|
528
|
+
value: E.value,
|
|
529
|
+
placeholder: m.placeholder || u(b).colorPicker.notSet,
|
|
526
530
|
disabled: m.disabled,
|
|
527
|
-
"aria-label": u(
|
|
528
|
-
onChange:
|
|
531
|
+
"aria-label": u(b).colorPicker.hexValue,
|
|
532
|
+
onChange: W,
|
|
529
533
|
onKeydown: i[1] ||= a(ee((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
530
|
-
}, null, 46, Ve),
|
|
534
|
+
}, null, 46, Ve), O.value ? (e(), c("button", {
|
|
531
535
|
key: 0,
|
|
532
536
|
type: "button",
|
|
533
|
-
"aria-label": u(
|
|
534
|
-
title: u(
|
|
537
|
+
"aria-label": u(b).colorPicker.clear,
|
|
538
|
+
title: u(b).colorPicker.clear,
|
|
535
539
|
class: "tpl:absolute tpl:right-2 tpl:top-1/2 tpl:flex tpl:size-6 tpl:-translate-y-1/2 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
|
|
536
|
-
onClick:
|
|
537
|
-
}, [h(u(
|
|
540
|
+
onClick: G
|
|
541
|
+
}, [h(u(pe), {
|
|
538
542
|
size: 14,
|
|
539
543
|
"stroke-width": 1.5
|
|
540
544
|
})], 8, He)) : l("", !0)])) : l("", !0)
|
|
@@ -545,6 +549,6 @@ var je = [
|
|
|
545
549
|
}
|
|
546
550
|
});
|
|
547
551
|
//#endregion
|
|
548
|
-
export {
|
|
552
|
+
export { S as _, k as a, D as c, T as d, v as f, w as g, _ as h, M as i, C as l, b as m, A as n, E as o, y as p, j as r, O as s, Ue as t, x as u };
|
|
549
553
|
|
|
550
|
-
//# sourceMappingURL=ColorPicker-
|
|
554
|
+
//# sourceMappingURL=ColorPicker-DZSzZ5ZP.js.map
|