@templatical/editor 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
- package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-DdhtfsmO.js} +223 -210
- package/dist/{AiPanels-CxGp6klr.js → AiPanels-HBx7xoJR.js} +6 -6
- package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-DPzSekZt.js} +78 -107
- package/dist/BlockIssueBadge-eIXZJ9M3.js +33 -0
- package/dist/BlockPreviewCanvas-DO-2TP_6.js +140 -0
- package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-i2kZdrdP.js} +44 -44
- package/dist/CollaborationNotices-DANsjl7c.js +65 -0
- package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CbbAA0m1.js} +24 -24
- package/dist/CommentsPanel-CYW3LWis.js +16 -0
- package/dist/CommentsSidebar-CcF4ISMi.js +526 -0
- package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-BMezkFbJ.js} +21 -21
- package/dist/CountdownToolbar-D3Lv74kU.js +258 -0
- package/dist/{IssuesPanel-BHFQ3wrP.js → IssuesPanel-BMAG9042.js} +141 -129
- package/dist/LanguageMenu-FlP_Jbup.js +403 -0
- package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-DAnVszWu.js +46 -0
- package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-BjYs-UQX.js} +439 -430
- package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-LnG-cF_S.js} +160 -160
- package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-C2r5fiFo.js} +4 -4
- package/dist/{cdn/chunks/MergeTagInput-CFu9VXPS.js → MergeTagInput-BsnogCeY.js} +32 -34
- package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DiufIQ-_.js} +49 -49
- package/dist/MergeTagTextarea-BweI-Xsi.js +126 -0
- package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-qgBp5yIB.js} +286 -257
- package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-DdYUrFiK.js} +23 -23
- package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-C5MAzx3E.js} +54 -53
- package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-eK6fjtTy.js} +86 -86
- package/dist/SavedBlocksBrowserModal-D2QHd2Yp.js +359 -0
- package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-Cl61f4Mf.js} +9 -9
- package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-CXP2dkeB.js} +15 -15
- package/dist/TemplateSettings-BKJrdZcH.js +294 -0
- package/dist/TestEmailModal-DQotJg6g.js +212 -0
- package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-CwiTzJsh.js} +4 -4
- package/dist/TitleEditor-CzSvsPAn.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-Cd75ci5W.js +3711 -0
- package/dist/{TplModal-9IndEYk5.js → TplModal-ZoXu40T9.js} +17 -17
- package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BvhN-Ofk.js} +39 -39
- package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DPWMnYbd.js} +5 -5
- package/dist/VersionPreviewBanner-CuJnasxH.js +37 -0
- package/dist/WrapperBlock-D4fPwO0t.js +44 -0
- package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BXMxu86H.js} +27 -26
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-Dtm3A2cD.js} +71 -69
- package/dist/cdn/chunks/AiAltTextReview-Dtm3A2cD.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-BV5D1itk.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-BV5D1itk.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-D3jkh6Xb.js} +80 -80
- package/dist/cdn/chunks/AiRewriteMenu-D3jkh6Xb.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-RQFilqXC.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-RQFilqXC.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-BSJ-Z5Hw.js} +43 -43
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-BSJ-Z5Hw.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-Bc9914Az.js} +16 -16
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-Bc9914Az.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-DbR9phAk.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DbR9phAk.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-CjMhMhnv.js} +26 -26
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-CUmI4HMm.js} +132 -120
- package/dist/cdn/chunks/IssuesPanel-CUmI4HMm.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-5Z3fFzjc.js} +465 -456
- package/dist/cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-DDCIwr9U.js} +439 -439
- package/dist/cdn/chunks/MediaEditModal-DDCIwr9U.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-Dz79oy8P.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-Dz79oy8P.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-CIWy-cXf.js +82 -0
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-CIWy-cXf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BrP5GR-x.js} +50 -50
- package/dist/cdn/chunks/MergeTagModeToggle-BrP5GR-x.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-Crj1DBqC.js} +18 -18
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-Crj1DBqC.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-rCCqFlwJ.js} +43 -43
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-rCCqFlwJ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-C34RW1aM.js} +71 -71
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-C34RW1aM.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CJnwWPT-.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-CJnwWPT-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-CA2PqXIH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-CA2PqXIH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-Dj3ortee.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-Dj3ortee.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-BXeCtTjU.js} +81 -78
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CpZcpB9D.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CpZcpB9D.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js +202 -0
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js → TplModal-DDDUDMYC.js} +19 -19
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-DDDUDMYC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-DSElv3Sv.js} +36 -36
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-DSElv3Sv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-H2nuik1l.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-H2nuik1l.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js.map +1 -0
- package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js +3039 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-BdsclY8_.js} +85 -83
- package/dist/cdn/chunks/createCloudRuntime-BdsclY8_.js.map +1 -0
- package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
- package/dist/{dist-CEdyyDn7.js → cdn/chunks/dist-BzXULHvI.js} +63 -61
- package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-DqGgijFI.js} +108 -109
- package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-DepKdldn.js} +1384 -1376
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CPbgthOv.js} +986 -986
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CPbgthOv.js.map} +1 -1
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
- package/dist/cdn/chunks/en-IYVryJRl.js +1 -0
- package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
- package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-Uh9vuFfK.js} +57 -57
- package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-Uh9vuFfK.js.map} +1 -1
- package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
- package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-CSSMtbGK.js} +187 -144
- package/dist/cdn/chunks/icons-CSSMtbGK.js.map +1 -0
- package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js.map +1 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-C8k7tw98.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-C8k7tw98.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +115 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js +2638 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js.map +1 -0
- package/dist/cdn/chunks/src-CACM3o--.js +2606 -0
- package/dist/cdn/chunks/src-CACM3o--.js.map +1 -0
- package/dist/cdn/chunks/{src-CUH_EI7k.js → src-Ddpm4HsS.js} +225 -259
- package/dist/cdn/chunks/src-Ddpm4HsS.js.map +1 -0
- package/dist/cdn/chunks/{src-BKpAis_q.js → src-DheBmnvF.js} +635 -478
- package/dist/cdn/chunks/src-DheBmnvF.js.map +1 -0
- package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
- package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-Dipw_zOQ.js} +48 -48
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js → useLogicTag-B7RpqVFQ.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-B7RpqVFQ.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js → useMergeTag-C-32ETjj.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-C-32ETjj.js.map} +1 -1
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-D33ZXoWp.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-D33ZXoWp.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2503 -1809
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-N3x4z_rH.js → check-ChQ0l8EQ.js} +1 -1
- package/dist/{chevron-down-gXu9qNwO.js → chevron-down-Bh6cp6PI.js} +1 -1
- package/dist/{chevron-right-rL0ayGk5.js → chevron-right-LUgdqdoW.js} +1 -1
- package/dist/{chevron-up-0ugh8HnW.js → chevron-up-XsDeJxQN.js} +1 -1
- package/dist/{circle-alert-B9Ls75B5.js → circle-alert-lODfDsrj.js} +1 -1
- package/dist/{clock-BqHBaCLm.js → clock-DrqFEZkT.js} +1 -1
- package/dist/composables-BOP3ERRP.js +4517 -0
- package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DGV5a5Af.js} +47 -45
- package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-Dw5e5gVE.js} +16 -16
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-0alKVRc_.js} +100 -99
- package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
- package/dist/dist-6DU0me3E.js +4 -0
- package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
- package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
- package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
- package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
- package/dist/{cdn/chunks/dist-C2epoAwW.js → dist-CX7skkvG.js} +29 -31
- package/dist/dist-CcOn7WCo.js +4 -0
- package/dist/dist-Cdkm20M6.js +2542 -0
- package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
- package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
- package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
- package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
- package/dist/{dist-DDN7yR-w.js → dist-fqSers8_.js} +131 -131
- package/dist/{editor-modal-Du9VI9q4.js → editor-modal-B_2EAOjN.js} +907 -906
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-DTtwco2Q.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-FRYhx7qa.js → extensions-DOLZkLzV.js} +173 -173
- package/dist/{eye-BKj9Tfnc.js → eye-DChfk0gi.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-DNdvdTla.js → image--Hj2by1G.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Bx-kBkbH.js → info-BbXgy82f.js} +1 -1
- package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
- package/dist/keys-BCqskl51.js +9 -0
- package/dist/languageName-DEEOhDWI.js +10 -0
- package/dist/{link-D8-rYdIQ.js → link-C2_8yJno.js} +1 -1
- package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
- package/dist/{list-BneisA27.js → list-DLGs2n0V.js} +1 -1
- package/dist/{loader-circle-DBEXphyx.js → loader-circle-BbDItE_O.js} +1 -1
- package/dist/{message-circle-Bg4xInCM.js → message-circle-NAModq0p.js} +1 -1
- package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
- package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
- package/dist/noticeTones-D7BPu-Le.js +14 -0
- package/dist/{package-B40Vkfsp.js → package-BuzsfRyH.js} +1 -1
- package/dist/{pencil-CYdAHTds.js → pencil-BTUUECH4.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Dm7DN65T.js +13 -0
- package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -4
- package/dist/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -0
- package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xMURqGWi.js} +2 -12
- package/dist/rotate-ccw-DqVcEIn5.js +13 -0
- package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-DlHp8xgy.js} +167 -167
- package/dist/sanitizeHtml-mKgNUdME.js +962 -0
- package/dist/{search-BZEo08gi.js → search-Cfr3W44N.js} +1 -1
- package/dist/{send-DHtrnXQs.js → send-CH1SrvyB.js} +1 -1
- package/dist/{smartphone-dlN3vpA3.js → smartphone-pAkvzjdI.js} +1 -1
- package/dist/socialIcons-Dqr4DJOz.js +2705 -0
- package/dist/{sparkles-NOttoDnJ.js → sparkles-CRO0cCnp.js} +1 -1
- package/dist/{square-B1CJgdt2.js → square-CaQWMntx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
- package/dist/templatical-editor.js +2294 -1608
- package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-BQ39AaRK.js} +1 -1
- package/dist/{trash-CGbk4Sgt.js → trash-BL5gEFHN.js} +1 -1
- package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-BYbKu7zZ.js} +1 -1
- package/dist/{upload-DQoackAn.js → upload-BhmL4Vqx.js} +1 -1
- package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-CeTm777E.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-DFDYJeMN.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-B46vACAG.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-C0Kapxdh.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1247 -1239
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-zcrnmcmU.js → x-B7NZYzhx.js} +1 -1
- package/package.json +23 -23
- package/dist/AiAltTextPopover-Cm11CsKH.js +0 -105
- package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
- package/dist/BlockPreviewCanvas-Df9iz7sK.js +0 -140
- package/dist/CollaborationNotices-JQ3vQoqO.js +0 -75
- package/dist/CommentsPanel-BuftXc0U.js +0 -16
- package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
- package/dist/CountdownToolbar-CrL4WKy9.js +0 -197
- package/dist/MergeTagInput-DE7kWwXx.js +0 -80
- package/dist/MergeTagTextarea-DVPQkiYY.js +0 -69
- package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
- package/dist/TemplateSettings-D0XcH32O.js +0 -236
- package/dist/TestEmailModal-Cb5t0yB2.js +0 -209
- package/dist/TitleEditor-BYk_9SpQ.js +0 -198
- package/dist/ToggleSwitch-poGWbduy.js +0 -36
- package/dist/Toolbar-Dku_pZni.js +0 -3145
- package/dist/VersionPreviewBanner-CSs7zum_.js +0 -37
- package/dist/WrapperBlock-DwjK_IdJ.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BafAtBoA.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-4F6vwhJ5.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Ny1X_mee.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CAiwilM2.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js +0 -469
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-pr7_nuLI.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-B_ldj3TO.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CGfzcHwP.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BFpK5dxg.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DcwKhFnI.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js +0 -198
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D6niZ2Rc.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
- package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
- package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-BF9gazbd.js +0 -11
- package/dist/cdn/chunks/keys-BF9gazbd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js +0 -2008
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js.map +0 -1
- package/dist/cdn/chunks/src-BKpAis_q.js.map +0 -1
- package/dist/cdn/chunks/src-C9DTvn1H.js +0 -1423
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
- package/dist/cdn/chunks/src-CUH_EI7k.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-C0dawxGr.js.map +0 -1
- package/dist/dist-CzrLYq2s.js +0 -1363
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-CyEE7FPY.js +0 -1
- package/dist/keys-DBjrQkYH.js +0 -9
- package/dist/normalizeMergeTagMarkup-IH8COHzd.js +0 -196
- package/dist/sanitizeHtml-CnOA1efV.js +0 -942
- package/dist/socialIcons-B_d52_eS.js +0 -2075
- package/dist/useEditorCore-DG9UvWUm.js +0 -4011
- package/dist/useEditorRoot-BKr6nNkC.js +0 -7
- package/dist/usePopoverPosition-C42kD7zt.js +0 -68
- package/dist/withCurrentFont-v_a4Oso8.js +0 -18
package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-5Z3fFzjc.js}
RENAMED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as R } from "./useMergeTag-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { C as e, E as t, F as n, G as r, H as i, L as a, O as o, Q as s, X as c, Y as l, _ as u, b as d, c as f, ct as p, dt as m, f as h, g, h as _, j as v, l as y, m as b, mt as x, n as S, p as C, pt as w, r as T, tt as E, u as D, x as O } from "./draggable-DepKdldn.js";
|
|
2
|
+
import { c as k, i as A, s as j, u as M } from "./src-CACM3o--.js";
|
|
3
|
+
import { G as N, Ht as P, N as F, t as I } from "./icons-CSSMtbGK.js";
|
|
4
|
+
import { et as ee, it as te, p as ne, tt as re } from "./keys-CoQtCqNv.js";
|
|
5
|
+
import { t as L } from "./useI18n-BnJYydPv.js";
|
|
6
|
+
import { d as ie } from "./styleConstants-CgiNKdnc.js";
|
|
7
|
+
import { t as ae } from "./dist-DqGgijFI.js";
|
|
8
|
+
import { t as R } from "./useMergeTag-C-32ETjj.js";
|
|
9
|
+
import { a as oe, c as se, n as ce, o as le, r as ue, s as de, t as fe } from "./usePopoverPosition-BWAXWeBv.js";
|
|
10
|
+
import { t as z } from "./useLogicTag-B7RpqVFQ.js";
|
|
11
11
|
// ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
12
|
-
var
|
|
12
|
+
var B = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, V = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n, H = (e) => he(U(e)), U = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
13
13
|
r: parseInt(e[0] + e[0], 16),
|
|
14
14
|
g: parseInt(e[1] + e[1], 16),
|
|
15
15
|
b: parseInt(e[2] + e[2], 16),
|
|
16
|
-
a: e.length === 4 ?
|
|
16
|
+
a: e.length === 4 ? V(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
17
17
|
} : {
|
|
18
18
|
r: parseInt(e.substring(0, 2), 16),
|
|
19
19
|
g: parseInt(e.substring(2, 4), 16),
|
|
20
20
|
b: parseInt(e.substring(4, 6), 16),
|
|
21
|
-
a: e.length === 8 ?
|
|
22
|
-
}),
|
|
21
|
+
a: e.length === 8 ? V(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
22
|
+
}), pe = (e) => me(K(e)), W = ({ h: e, s: t, v: n, a: r }) => {
|
|
23
23
|
let i = (200 - t) * n / 100;
|
|
24
24
|
return {
|
|
25
|
-
h:
|
|
26
|
-
s:
|
|
27
|
-
l:
|
|
28
|
-
a:
|
|
25
|
+
h: V(e),
|
|
26
|
+
s: V(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
27
|
+
l: V(i / 2),
|
|
28
|
+
a: V(r, 2)
|
|
29
29
|
};
|
|
30
|
-
},
|
|
31
|
-
let { h: t, s: n, l: r } =
|
|
30
|
+
}, G = (e) => {
|
|
31
|
+
let { h: t, s: n, l: r } = W(e);
|
|
32
32
|
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
33
|
-
},
|
|
33
|
+
}, K = ({ h: e, s: t, v: n, a: r }) => {
|
|
34
34
|
e = e / 360 * 6, t /= 100, n /= 100;
|
|
35
35
|
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;
|
|
36
36
|
return {
|
|
37
|
-
r:
|
|
37
|
+
r: V([
|
|
38
38
|
n,
|
|
39
39
|
o,
|
|
40
40
|
a,
|
|
@@ -42,7 +42,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
42
42
|
s,
|
|
43
43
|
n
|
|
44
44
|
][c] * 255),
|
|
45
|
-
g:
|
|
45
|
+
g: V([
|
|
46
46
|
s,
|
|
47
47
|
n,
|
|
48
48
|
n,
|
|
@@ -50,7 +50,7 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
50
50
|
a,
|
|
51
51
|
a
|
|
52
52
|
][c] * 255),
|
|
53
|
-
b:
|
|
53
|
+
b: V([
|
|
54
54
|
a,
|
|
55
55
|
a,
|
|
56
56
|
s,
|
|
@@ -58,73 +58,73 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
58
58
|
n,
|
|
59
59
|
o
|
|
60
60
|
][c] * 255),
|
|
61
|
-
a:
|
|
61
|
+
a: V(r, 2)
|
|
62
62
|
};
|
|
63
|
-
},
|
|
63
|
+
}, q = (e) => {
|
|
64
64
|
let t = e.toString(16);
|
|
65
65
|
return t.length < 2 ? "0" + t : t;
|
|
66
|
-
}, pe = ({ r: e, g: t, b: n, a: r }) => {
|
|
67
|
-
let i = r < 1 ? K(B(r * 255)) : "";
|
|
68
|
-
return "#" + K(e) + K(t) + K(n) + i;
|
|
69
66
|
}, me = ({ r: e, g: t, b: n, a: r }) => {
|
|
67
|
+
let i = r < 1 ? q(V(r * 255)) : "";
|
|
68
|
+
return "#" + q(e) + q(t) + q(n) + i;
|
|
69
|
+
}, he = ({ r: e, g: t, b: n, a: r }) => {
|
|
70
70
|
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;
|
|
71
71
|
return {
|
|
72
|
-
h:
|
|
73
|
-
s:
|
|
74
|
-
v:
|
|
72
|
+
h: V(60 * (o < 0 ? o + 6 : o)),
|
|
73
|
+
s: V(i ? a / i * 100 : 0),
|
|
74
|
+
v: V(i / 255 * 100),
|
|
75
75
|
a: r
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, ge = (e, t) => {
|
|
78
78
|
if (e === t) return !0;
|
|
79
79
|
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
80
80
|
return !0;
|
|
81
|
-
},
|
|
82
|
-
let t =
|
|
83
|
-
return t || (t = document.createElement("template"), t.innerHTML = e,
|
|
84
|
-
},
|
|
81
|
+
}, _e = (e, t) => e.toLowerCase() === t.toLowerCase() || ge(U(e), U(t)), ve = {}, ye = (e) => {
|
|
82
|
+
let t = ve[e];
|
|
83
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, ve[e] = t), t;
|
|
84
|
+
}, J = (e, t, n) => {
|
|
85
85
|
e.dispatchEvent(new CustomEvent(t, {
|
|
86
86
|
bubbles: !0,
|
|
87
87
|
detail: n
|
|
88
88
|
}));
|
|
89
|
-
},
|
|
90
|
-
let n =
|
|
91
|
-
|
|
92
|
-
x:
|
|
93
|
-
y:
|
|
89
|
+
}, Y = !1, X = (e) => "touches" in e, be = (e) => Y && !X(e) ? !1 : (Y ||= X(e), !0), Z = (e, t) => {
|
|
90
|
+
let n = X(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
91
|
+
J(e.el, "move", e.getMove({
|
|
92
|
+
x: B((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
93
|
+
y: B((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
94
94
|
}));
|
|
95
|
-
},
|
|
95
|
+
}, xe = (e, t) => {
|
|
96
96
|
let n = t.keyCode;
|
|
97
|
-
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(),
|
|
97
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), J(e.el, "move", e.getMove({
|
|
98
98
|
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
99
99
|
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
100
100
|
}, !0)));
|
|
101
|
-
},
|
|
101
|
+
}, Se = class {
|
|
102
102
|
constructor(e, t, n, r) {
|
|
103
|
-
let i =
|
|
103
|
+
let i = ye(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
104
104
|
e.appendChild(i.content.cloneNode(!0));
|
|
105
105
|
let a = e.querySelector(`[part=${t}]`);
|
|
106
106
|
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
107
107
|
}
|
|
108
108
|
set dragging(e) {
|
|
109
109
|
let t = e ? document.addEventListener : document.removeEventListener;
|
|
110
|
-
t(
|
|
110
|
+
t(Y ? "touchmove" : "mousemove", this), t(Y ? "touchend" : "mouseup", this);
|
|
111
111
|
}
|
|
112
112
|
handleEvent(e) {
|
|
113
113
|
switch (e.type) {
|
|
114
114
|
case "mousedown":
|
|
115
115
|
case "touchstart":
|
|
116
|
-
if (e.preventDefault(), !
|
|
117
|
-
this.el.focus(),
|
|
116
|
+
if (e.preventDefault(), !be(e) || !Y && e.button != 0) return;
|
|
117
|
+
this.el.focus(), Z(this, e), this.dragging = !0;
|
|
118
118
|
break;
|
|
119
119
|
case "mousemove":
|
|
120
120
|
case "touchmove":
|
|
121
|
-
e.preventDefault(),
|
|
121
|
+
e.preventDefault(), Z(this, e);
|
|
122
122
|
break;
|
|
123
123
|
case "mouseup":
|
|
124
124
|
case "touchend":
|
|
125
125
|
this.dragging = !1;
|
|
126
126
|
break;
|
|
127
|
-
case "keydown":
|
|
127
|
+
case "keydown": xe(this, e);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
style(e) {
|
|
@@ -132,25 +132,25 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
132
132
|
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
},
|
|
135
|
+
}, Ce = class extends Se {
|
|
136
136
|
constructor(e) {
|
|
137
137
|
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
138
138
|
}
|
|
139
139
|
update({ h: e }) {
|
|
140
140
|
this.h = e, this.style([{
|
|
141
141
|
left: `${e / 360 * 100}%`,
|
|
142
|
-
color:
|
|
142
|
+
color: G({
|
|
143
143
|
h: e,
|
|
144
144
|
s: 100,
|
|
145
145
|
v: 100,
|
|
146
146
|
a: 1
|
|
147
147
|
})
|
|
148
|
-
}]), this.el.setAttribute("aria-valuenow", `${
|
|
148
|
+
}]), this.el.setAttribute("aria-valuenow", `${V(e)}`);
|
|
149
149
|
}
|
|
150
150
|
getMove(e, t) {
|
|
151
|
-
return { h: t ?
|
|
151
|
+
return { h: t ? B(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
152
152
|
}
|
|
153
|
-
},
|
|
153
|
+
}, Q = class extends Se {
|
|
154
154
|
constructor(e) {
|
|
155
155
|
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
156
156
|
}
|
|
@@ -158,47 +158,47 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
158
158
|
this.hsva = e, this.style([{
|
|
159
159
|
top: `${100 - e.v}%`,
|
|
160
160
|
left: `${e.s}%`,
|
|
161
|
-
color:
|
|
162
|
-
}, { "background-color":
|
|
161
|
+
color: G(e)
|
|
162
|
+
}, { "background-color": G({
|
|
163
163
|
h: e.h,
|
|
164
164
|
s: 100,
|
|
165
165
|
v: 100,
|
|
166
166
|
a: 1
|
|
167
|
-
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${
|
|
167
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${V(e.s)}%, Brightness ${V(e.v)}%`);
|
|
168
168
|
}
|
|
169
169
|
getMove(e, t) {
|
|
170
170
|
return {
|
|
171
|
-
s: t ?
|
|
172
|
-
v: t ?
|
|
171
|
+
s: t ? B(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
172
|
+
v: t ? B(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
},
|
|
175
|
+
}, we = ":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)}", Te = "[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}", Ee = "[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}", $ = Symbol("same"), De = Symbol("color"), Oe = Symbol("hsva"), ke = Symbol("update"), Ae = Symbol("parts"), je = Symbol("css"), Me = Symbol("sliders"), Ne = class extends HTMLElement {
|
|
176
176
|
static get observedAttributes() {
|
|
177
177
|
return ["color"];
|
|
178
178
|
}
|
|
179
|
-
get [
|
|
179
|
+
get [je]() {
|
|
180
180
|
return [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
we,
|
|
182
|
+
Te,
|
|
183
|
+
Ee
|
|
184
184
|
];
|
|
185
185
|
}
|
|
186
|
-
get [
|
|
187
|
-
return [
|
|
186
|
+
get [Me]() {
|
|
187
|
+
return [Q, Ce];
|
|
188
188
|
}
|
|
189
189
|
get color() {
|
|
190
|
-
return this[
|
|
190
|
+
return this[De];
|
|
191
191
|
}
|
|
192
192
|
set color(e) {
|
|
193
193
|
if (!this[$](e)) {
|
|
194
194
|
let t = this.colorModel.toHsva(e);
|
|
195
|
-
this[
|
|
195
|
+
this[ke](t), this[De] = e;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
constructor() {
|
|
199
199
|
super();
|
|
200
|
-
let e =
|
|
201
|
-
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[
|
|
200
|
+
let e = ye(`<style>${this[je].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
201
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Ae] = this[Me].map((e) => new e(t));
|
|
202
202
|
}
|
|
203
203
|
connectedCallback() {
|
|
204
204
|
if (this.hasOwnProperty("color")) {
|
|
@@ -211,75 +211,75 @@ var z = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, B = (e, t = 0, n = 10 **
|
|
|
211
211
|
this[$](r) || (this.color = r);
|
|
212
212
|
}
|
|
213
213
|
handleEvent(e) {
|
|
214
|
-
let t = this[
|
|
214
|
+
let t = this[Oe], n = {
|
|
215
215
|
...t,
|
|
216
216
|
...e.detail
|
|
217
217
|
};
|
|
218
|
-
this[
|
|
218
|
+
this[ke](n);
|
|
219
219
|
let r;
|
|
220
|
-
!
|
|
220
|
+
!ge(n, t) && !this[$](r = this.colorModel.fromHsva(n)) && (this[De] = r, J(this, "color-changed", { value: r }));
|
|
221
221
|
}
|
|
222
222
|
[$](e) {
|
|
223
223
|
return this.color && this.colorModel.equal(e, this.color);
|
|
224
224
|
}
|
|
225
|
-
[
|
|
226
|
-
this[
|
|
225
|
+
[ke](e) {
|
|
226
|
+
this[Oe] = e, this[Ae].forEach((t) => t.update(e));
|
|
227
227
|
}
|
|
228
|
-
},
|
|
228
|
+
}, Pe = {
|
|
229
229
|
defaultColor: "#000",
|
|
230
|
-
toHsva:
|
|
231
|
-
fromHsva: ({ h: e, s: t, v: n }) =>
|
|
230
|
+
toHsva: H,
|
|
231
|
+
fromHsva: ({ h: e, s: t, v: n }) => pe({
|
|
232
232
|
h: e,
|
|
233
233
|
s: t,
|
|
234
234
|
v: n,
|
|
235
235
|
a: 1
|
|
236
236
|
}),
|
|
237
|
-
equal:
|
|
237
|
+
equal: _e,
|
|
238
238
|
fromAttr: (e) => e
|
|
239
|
-
},
|
|
239
|
+
}, Fe = class extends Ne {
|
|
240
240
|
get colorModel() {
|
|
241
|
-
return
|
|
241
|
+
return Pe;
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
customElements.define("hex-color-picker", class extends
|
|
244
|
+
customElements.define("hex-color-picker", class extends Fe {});
|
|
245
245
|
// src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
246
|
-
var
|
|
246
|
+
var Ie = [
|
|
247
247
|
"disabled",
|
|
248
248
|
"aria-label",
|
|
249
249
|
"title",
|
|
250
250
|
"aria-expanded"
|
|
251
|
-
],
|
|
251
|
+
], Le = {
|
|
252
252
|
key: 0,
|
|
253
253
|
class: "tpl:relative tpl:flex-1"
|
|
254
|
-
},
|
|
254
|
+
}, Re = [
|
|
255
255
|
"value",
|
|
256
256
|
"placeholder",
|
|
257
257
|
"disabled",
|
|
258
258
|
"aria-label"
|
|
259
|
-
],
|
|
259
|
+
], ze = ["aria-label", "title"], Be = ["data-tpl-theme"], Ve = [
|
|
260
260
|
"aria-pressed",
|
|
261
261
|
"aria-label",
|
|
262
262
|
"title"
|
|
263
|
-
],
|
|
263
|
+
], He = ["aria-label"], Ue = [
|
|
264
264
|
"aria-label",
|
|
265
265
|
"title",
|
|
266
266
|
"aria-checked",
|
|
267
267
|
"tabindex"
|
|
268
|
-
],
|
|
268
|
+
], We = [
|
|
269
269
|
"aria-label",
|
|
270
270
|
"title",
|
|
271
271
|
"aria-checked",
|
|
272
272
|
"tabindex",
|
|
273
273
|
"onClick"
|
|
274
|
-
],
|
|
274
|
+
], Ge = ["color", "aria-label"], Ke = {
|
|
275
275
|
key: 3,
|
|
276
276
|
class: "tpl:relative tpl:mt-2"
|
|
277
|
-
},
|
|
277
|
+
}, qe = [
|
|
278
278
|
"value",
|
|
279
279
|
"placeholder",
|
|
280
280
|
"disabled",
|
|
281
281
|
"aria-label"
|
|
282
|
-
],
|
|
282
|
+
], Je = ["aria-label", "title"], Ye = /* @__PURE__ */ e({
|
|
283
283
|
__name: "ColorPicker",
|
|
284
284
|
props: {
|
|
285
285
|
modelValue: {},
|
|
@@ -306,34 +306,38 @@ var Pe = [
|
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
emits: ["update:modelValue"],
|
|
309
|
-
setup(
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}, {
|
|
314
|
-
let A =
|
|
315
|
-
|
|
316
|
-
|
|
309
|
+
setup(e, { emit: t }) {
|
|
310
|
+
let s = e, c = se(), l = C(() => s.disabled || !c.value), v = t, { t: T } = L(), k = E(!1);
|
|
311
|
+
i(l, (e) => {
|
|
312
|
+
e && (k.value = !1);
|
|
313
|
+
}, { flush: "sync" });
|
|
314
|
+
let A = E(), j = E(), M = E(!1);
|
|
315
|
+
ae(A, () => {
|
|
316
|
+
k.value = !1;
|
|
317
|
+
}, { ignore: [j] });
|
|
318
|
+
let N = C(() => !s.modelValue), P = C(() => s.modelValue.trim().toLowerCase() === "transparent"), F = C(() => le(s.modelValue)), re = C(() => (s.modelValue ? de(s.modelValue) : null) || (de(s.seedColor) ?? "#ffffff")), R = C(() => !l.value && !N.value), z = o(ne, ue), B = C(() => [...new Set(s.presets ?? z.presets)]), V = C(() => s.allowCustom ?? z.allowCustom), H = C(() => B.value.length > 0), U = C(() => V.value || !H.value), pe = C(() => oe(s.modelValue));
|
|
319
|
+
function W(e) {
|
|
320
|
+
return pe.value !== "" && oe(e) === pe.value;
|
|
317
321
|
}
|
|
318
|
-
function
|
|
319
|
-
|
|
322
|
+
function G(e) {
|
|
323
|
+
l.value || v("update:modelValue", e);
|
|
320
324
|
}
|
|
321
|
-
let
|
|
322
|
-
function
|
|
323
|
-
return
|
|
325
|
+
let K = C(() => H.value && !U.value);
|
|
326
|
+
function q(e) {
|
|
327
|
+
return K.value ? e + 1 : e;
|
|
324
328
|
}
|
|
325
|
-
let
|
|
326
|
-
if (
|
|
327
|
-
let e =
|
|
328
|
-
return e === -1 ? 0 :
|
|
329
|
+
let me = C(() => {
|
|
330
|
+
if (K.value && N.value) return 0;
|
|
331
|
+
let e = B.value.findIndex((e) => W(e));
|
|
332
|
+
return e === -1 ? 0 : q(e);
|
|
329
333
|
});
|
|
330
|
-
function
|
|
331
|
-
return
|
|
334
|
+
function he() {
|
|
335
|
+
return me.value === 0 ? 0 : -1;
|
|
332
336
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
337
|
+
function ge(e) {
|
|
338
|
+
return q(e) === me.value ? 0 : -1;
|
|
335
339
|
}
|
|
336
|
-
function
|
|
340
|
+
function _e(e) {
|
|
337
341
|
if (![
|
|
338
342
|
"ArrowRight",
|
|
339
343
|
"ArrowDown",
|
|
@@ -343,90 +347,90 @@ var Pe = [
|
|
|
343
347
|
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
|
|
344
348
|
r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
|
|
345
349
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
350
|
+
function ve(e) {
|
|
351
|
+
l.value || (M.value = !0, v("update:modelValue", e.detail.value));
|
|
348
352
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
function ge() {
|
|
353
|
-
!k.value && A.value && s("update:modelValue", le.value);
|
|
353
|
+
function ye() {
|
|
354
|
+
l.value || (M.value = !1);
|
|
354
355
|
}
|
|
355
|
-
function J(
|
|
356
|
-
|
|
356
|
+
function J() {
|
|
357
|
+
l.value || !M.value && N.value && v("update:modelValue", re.value);
|
|
357
358
|
}
|
|
358
|
-
function Y() {
|
|
359
|
-
|
|
359
|
+
function Y(e) {
|
|
360
|
+
l.value || v("update:modelValue", e.target.value);
|
|
360
361
|
}
|
|
361
362
|
function X() {
|
|
362
|
-
|
|
363
|
+
l.value || v("update:modelValue", "");
|
|
363
364
|
}
|
|
364
|
-
|
|
365
|
+
function be() {
|
|
366
|
+
l.value || v("update:modelValue", "transparent");
|
|
367
|
+
}
|
|
368
|
+
let Z = ce(), { toLocal: xe } = fe(), Se = o(ee, null), Ce = o(te, null), Q = E({
|
|
365
369
|
top: 0,
|
|
366
370
|
left: 0
|
|
367
371
|
});
|
|
368
|
-
function
|
|
369
|
-
if (!
|
|
370
|
-
if (!
|
|
371
|
-
let e =
|
|
372
|
+
function we() {
|
|
373
|
+
if (!l.value) {
|
|
374
|
+
if (!k.value) {
|
|
375
|
+
let e = j.value?.getBoundingClientRect();
|
|
372
376
|
if (e) {
|
|
373
377
|
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
374
|
-
Q.value =
|
|
378
|
+
Q.value = xe({
|
|
375
379
|
top: t,
|
|
376
380
|
left: e.left
|
|
377
381
|
});
|
|
378
382
|
}
|
|
379
383
|
}
|
|
380
|
-
|
|
384
|
+
k.value = !k.value;
|
|
381
385
|
}
|
|
382
386
|
}
|
|
383
|
-
return (
|
|
384
|
-
|
|
387
|
+
return (t, i) => (n(), u("div", { class: m(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", l.value && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
388
|
+
b("button", {
|
|
385
389
|
ref_key: "swatchRef",
|
|
386
|
-
ref:
|
|
390
|
+
ref: j,
|
|
387
391
|
type: "button",
|
|
388
|
-
disabled:
|
|
389
|
-
"aria-label":
|
|
390
|
-
title:
|
|
391
|
-
"aria-expanded":
|
|
392
|
-
class:
|
|
392
|
+
disabled: l.value,
|
|
393
|
+
"aria-label": e.ariaLabel || p(T).colorPicker.pickColor,
|
|
394
|
+
title: e.ariaLabel || void 0,
|
|
395
|
+
"aria-expanded": k.value,
|
|
396
|
+
class: m([
|
|
393
397
|
"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)]",
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
398
|
+
l.value ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
399
|
+
k.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !l.value && "tpl:hover:border-[var(--tpl-text-dim)]",
|
|
400
|
+
e.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
397
401
|
]),
|
|
398
|
-
onClick:
|
|
399
|
-
}, [
|
|
400
|
-
class:
|
|
401
|
-
"tpl-color-swatch-empty":
|
|
402
|
-
"tpl-color-swatch-transparent":
|
|
402
|
+
onClick: we
|
|
403
|
+
}, [b("span", {
|
|
404
|
+
class: m(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", {
|
|
405
|
+
"tpl-color-swatch-empty": N.value,
|
|
406
|
+
"tpl-color-swatch-transparent": P.value
|
|
403
407
|
}]),
|
|
404
|
-
style:
|
|
405
|
-
}, null, 6)], 10,
|
|
406
|
-
!
|
|
408
|
+
style: w(N.value || P.value ? void 0 : { backgroundColor: F.value })
|
|
409
|
+
}, null, 6)], 10, Ie),
|
|
410
|
+
!e.swatchOnly && U.value ? (n(), u("div", Le, [b("input", {
|
|
407
411
|
type: "text",
|
|
408
|
-
class:
|
|
409
|
-
style:
|
|
410
|
-
value:
|
|
411
|
-
placeholder:
|
|
412
|
-
disabled:
|
|
413
|
-
"aria-label":
|
|
414
|
-
onInput:
|
|
415
|
-
}, null, 46,
|
|
412
|
+
class: m([p(ie), "tpl:w-full"]),
|
|
413
|
+
style: w(R.value ? { paddingRight: "2.25rem" } : void 0),
|
|
414
|
+
value: F.value,
|
|
415
|
+
placeholder: e.placeholder || p(T).colorPicker.notSet,
|
|
416
|
+
disabled: l.value,
|
|
417
|
+
"aria-label": p(T).colorPicker.hexValue,
|
|
418
|
+
onInput: Y
|
|
419
|
+
}, null, 46, Re), R.value ? (n(), u("button", {
|
|
416
420
|
key: 0,
|
|
417
421
|
type: "button",
|
|
418
|
-
"aria-label":
|
|
419
|
-
title:
|
|
422
|
+
"aria-label": p(T).colorPicker.clear,
|
|
423
|
+
title: p(T).colorPicker.clear,
|
|
420
424
|
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)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
421
|
-
onClick:
|
|
422
|
-
}, [
|
|
425
|
+
onClick: X
|
|
426
|
+
}, [O(p(I), {
|
|
423
427
|
size: 14,
|
|
424
428
|
"stroke-width": 1.5
|
|
425
|
-
})], 8,
|
|
426
|
-
(
|
|
427
|
-
to:
|
|
428
|
-
disabled: !
|
|
429
|
-
}, [
|
|
429
|
+
})], 8, ze)) : g("", !0)])) : g("", !0),
|
|
430
|
+
(n(), _(h, {
|
|
431
|
+
to: p(Z),
|
|
432
|
+
disabled: !p(Z)
|
|
433
|
+
}, [O(S, {
|
|
430
434
|
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
431
435
|
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
432
436
|
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
@@ -434,103 +438,103 @@ var Pe = [
|
|
|
434
438
|
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
435
439
|
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
436
440
|
}, {
|
|
437
|
-
default:
|
|
441
|
+
default: r(() => [k.value ? (n(), u("div", {
|
|
438
442
|
key: 0,
|
|
439
443
|
ref_key: "popoverRef",
|
|
440
|
-
ref:
|
|
441
|
-
"data-tpl-theme":
|
|
444
|
+
ref: A,
|
|
445
|
+
"data-tpl-theme": p(Ce),
|
|
442
446
|
class: "tpl-color-popover tpl:absolute tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
443
|
-
style:
|
|
447
|
+
style: w({
|
|
444
448
|
top: `${Q.value.top}px`,
|
|
445
449
|
left: `${Q.value.left}px`,
|
|
446
|
-
...
|
|
450
|
+
...p(Se)
|
|
447
451
|
})
|
|
448
452
|
}, [
|
|
449
|
-
|
|
453
|
+
e.allowTransparent ? (n(), u("button", {
|
|
450
454
|
key: 0,
|
|
451
455
|
type: "button",
|
|
452
456
|
"data-testid": "color-picker-transparent",
|
|
453
|
-
"aria-pressed":
|
|
454
|
-
"aria-label":
|
|
455
|
-
title:
|
|
456
|
-
class:
|
|
457
|
-
onClick:
|
|
458
|
-
}, [
|
|
459
|
-
|
|
457
|
+
"aria-pressed": P.value,
|
|
458
|
+
"aria-label": p(T).colorPicker.transparent,
|
|
459
|
+
title: p(T).colorPicker.transparent,
|
|
460
|
+
class: m(["tpl:mb-2 tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-2 tpl:py-1 tpl:text-left tpl:text-xs tpl:text-[var(--tpl-text)] 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)]", P.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
|
|
461
|
+
onClick: be
|
|
462
|
+
}, [i[2] ||= b("span", { class: "tpl-color-swatch-transparent tpl:size-4 tpl:shrink-0 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)]" }, null, -1), d(" " + x(p(T).colorPicker.transparent), 1)], 10, Ve)) : g("", !0),
|
|
463
|
+
H.value ? (n(), u("div", {
|
|
460
464
|
key: 1,
|
|
461
465
|
role: "radiogroup",
|
|
462
|
-
"aria-label":
|
|
463
|
-
class:
|
|
464
|
-
onKeydown:
|
|
465
|
-
}, [
|
|
466
|
+
"aria-label": p(T).colorPicker.presetColors,
|
|
467
|
+
class: m(["tpl:flex tpl:flex-wrap tpl:gap-1.5", U.value && "tpl:mb-2"]),
|
|
468
|
+
onKeydown: _e
|
|
469
|
+
}, [K.value ? (n(), u("button", {
|
|
466
470
|
key: 0,
|
|
467
471
|
type: "button",
|
|
468
472
|
role: "radio",
|
|
469
|
-
"aria-label":
|
|
470
|
-
title:
|
|
471
|
-
"aria-checked":
|
|
472
|
-
tabindex:
|
|
473
|
-
class:
|
|
474
|
-
onClick:
|
|
475
|
-
}, null, 10,
|
|
473
|
+
"aria-label": p(T).colorPicker.clear,
|
|
474
|
+
title: p(T).colorPicker.clear,
|
|
475
|
+
"aria-checked": N.value,
|
|
476
|
+
tabindex: he(),
|
|
477
|
+
class: m(["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)]", N.value ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
|
|
478
|
+
onClick: X
|
|
479
|
+
}, null, 10, Ue)) : g("", !0), (n(!0), u(D, null, a(B.value, (e, t) => (n(), u("button", {
|
|
476
480
|
key: e,
|
|
477
481
|
type: "button",
|
|
478
482
|
role: "radio",
|
|
479
483
|
"aria-label": e,
|
|
480
484
|
title: e,
|
|
481
|
-
"aria-checked":
|
|
482
|
-
tabindex:
|
|
483
|
-
style:
|
|
484
|
-
class:
|
|
485
|
-
onClick: (t) =>
|
|
486
|
-
}, null, 14,
|
|
487
|
-
|
|
485
|
+
"aria-checked": W(e),
|
|
486
|
+
tabindex: ge(t),
|
|
487
|
+
style: w({ backgroundColor: e }),
|
|
488
|
+
class: m(["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)]", W(e) ? "tpl:ring-2 tpl:ring-[var(--tpl-primary)] tpl:ring-offset-1 tpl:ring-offset-[var(--tpl-bg-elevated)]" : "tpl:hover:border-[var(--tpl-text-dim)]"]),
|
|
489
|
+
onClick: (t) => G(e)
|
|
490
|
+
}, null, 14, We))), 128))], 42, He)) : g("", !0),
|
|
491
|
+
U.value ? (n(), u("hex-color-picker", {
|
|
488
492
|
key: 2,
|
|
489
|
-
color:
|
|
490
|
-
"aria-label":
|
|
491
|
-
onColorChanged:
|
|
492
|
-
onPointerdown:
|
|
493
|
-
onPointerup:
|
|
494
|
-
onKeydown:
|
|
495
|
-
}, null, 40,
|
|
496
|
-
|
|
493
|
+
color: re.value,
|
|
494
|
+
"aria-label": p(T).colorPicker.pickColor,
|
|
495
|
+
onColorChanged: ve,
|
|
496
|
+
onPointerdown: ye,
|
|
497
|
+
onPointerup: J,
|
|
498
|
+
onKeydown: i[0] ||= f((e) => k.value = !1, ["escape"])
|
|
499
|
+
}, null, 40, Ge)) : g("", !0),
|
|
500
|
+
e.swatchOnly && U.value ? (n(), u("div", Ke, [b("input", {
|
|
497
501
|
type: "text",
|
|
498
|
-
class:
|
|
499
|
-
style:
|
|
500
|
-
value:
|
|
501
|
-
placeholder:
|
|
502
|
-
disabled:
|
|
503
|
-
"aria-label":
|
|
504
|
-
onChange:
|
|
505
|
-
onKeydown:
|
|
506
|
-
}, null, 46,
|
|
502
|
+
class: m([p(ie), "tpl:w-full"]),
|
|
503
|
+
style: w(R.value ? { paddingRight: "2.25rem" } : void 0),
|
|
504
|
+
value: F.value,
|
|
505
|
+
placeholder: e.placeholder || p(T).colorPicker.notSet,
|
|
506
|
+
disabled: l.value,
|
|
507
|
+
"aria-label": p(T).colorPicker.hexValue,
|
|
508
|
+
onChange: Y,
|
|
509
|
+
onKeydown: i[1] ||= f(y((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
510
|
+
}, null, 46, qe), R.value ? (n(), u("button", {
|
|
507
511
|
key: 0,
|
|
508
512
|
type: "button",
|
|
509
|
-
"aria-label":
|
|
510
|
-
title:
|
|
513
|
+
"aria-label": p(T).colorPicker.clear,
|
|
514
|
+
title: p(T).colorPicker.clear,
|
|
511
515
|
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)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
512
|
-
onClick:
|
|
513
|
-
}, [
|
|
516
|
+
onClick: X
|
|
517
|
+
}, [O(p(I), {
|
|
514
518
|
size: 14,
|
|
515
519
|
"stroke-width": 1.5
|
|
516
|
-
})], 8,
|
|
517
|
-
], 12,
|
|
520
|
+
})], 8, Je)) : g("", !0)])) : g("", !0)
|
|
521
|
+
], 12, Be)) : g("", !0)]),
|
|
518
522
|
_: 1
|
|
519
523
|
})], 8, ["to", "disabled"]))
|
|
520
524
|
], 2));
|
|
521
525
|
}
|
|
522
|
-
}),
|
|
526
|
+
}), Xe = ["id"], Ze = {
|
|
523
527
|
key: 0,
|
|
524
528
|
class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
525
529
|
"data-testid": "merge-tag-suggestion-empty"
|
|
526
|
-
},
|
|
530
|
+
}, Qe = [
|
|
527
531
|
"id",
|
|
528
532
|
"aria-selected",
|
|
529
533
|
"data-selected",
|
|
530
534
|
"data-merge-tag-value",
|
|
531
535
|
"onMousedown",
|
|
532
536
|
"onMousemove"
|
|
533
|
-
],
|
|
537
|
+
], $e = { class: "tpl:font-medium" }, et = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, tt = /* @__PURE__ */ e({
|
|
534
538
|
__name: "MergeTagSuggestionList",
|
|
535
539
|
props: {
|
|
536
540
|
items: {},
|
|
@@ -541,49 +545,49 @@ var Pe = [
|
|
|
541
545
|
emits: ["select", "hover"],
|
|
542
546
|
setup(e) {
|
|
543
547
|
let t = e;
|
|
544
|
-
function
|
|
548
|
+
function r(e) {
|
|
545
549
|
return t.listId ? `${t.listId}-opt-${e}` : void 0;
|
|
546
550
|
}
|
|
547
|
-
return (t,
|
|
551
|
+
return (t, i) => (n(), u("div", {
|
|
548
552
|
id: e.listId,
|
|
549
553
|
class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1 tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
550
554
|
role: "listbox",
|
|
551
555
|
"data-testid": "merge-tag-suggestion-list"
|
|
552
|
-
}, [e.items.length === 0 ? (
|
|
553
|
-
key:
|
|
554
|
-
id:
|
|
556
|
+
}, [e.items.length === 0 ? (n(), u("div", Ze, x(e.emptyText), 1)) : g("", !0), (n(!0), u(D, null, a(e.items, (i, a) => (n(), u("button", {
|
|
557
|
+
key: i.value,
|
|
558
|
+
id: r(a),
|
|
555
559
|
type: "button",
|
|
556
560
|
role: "option",
|
|
557
|
-
"aria-selected":
|
|
558
|
-
"data-selected":
|
|
559
|
-
"data-merge-tag-value":
|
|
560
|
-
class:
|
|
561
|
-
onMousedown:
|
|
562
|
-
onMousemove: (n) =>
|
|
563
|
-
}, [
|
|
561
|
+
"aria-selected": a === e.selectedIndex,
|
|
562
|
+
"data-selected": a === e.selectedIndex ? "true" : "false",
|
|
563
|
+
"data-merge-tag-value": i.value,
|
|
564
|
+
class: m(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", a === e.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
565
|
+
onMousedown: y((e) => t.$emit("select", i), ["prevent", "stop"]),
|
|
566
|
+
onMousemove: (n) => a !== e.selectedIndex && t.$emit("hover", a)
|
|
567
|
+
}, [b("span", $e, x(i.label), 1), b("span", et, x(i.value), 1)], 42, Qe))), 128))], 8, Xe));
|
|
564
568
|
}
|
|
565
|
-
}),
|
|
566
|
-
function
|
|
569
|
+
}), nt = 10, rt = 0;
|
|
570
|
+
function it(e, t) {
|
|
567
571
|
let n = t.trim().toLowerCase();
|
|
568
|
-
return n === "" ? e.slice(0,
|
|
572
|
+
return n === "" ? e.slice(0, nt) : e.filter((e) => {
|
|
569
573
|
let t = e.label.toLowerCase(), r = e.value.toLowerCase();
|
|
570
574
|
return t.includes(n) || r.includes(n);
|
|
571
|
-
}).slice(0,
|
|
575
|
+
}).slice(0, nt);
|
|
572
576
|
}
|
|
573
|
-
function
|
|
577
|
+
function at(e, t, n, r) {
|
|
574
578
|
return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
|
|
575
579
|
}
|
|
576
|
-
function
|
|
577
|
-
let r = null, i = null, a = null, o =
|
|
578
|
-
function
|
|
579
|
-
|
|
580
|
+
function ot(e, n) {
|
|
581
|
+
let r = null, i = null, a = null, o = E([]), s = E(0), c = null, l = `tpl-merge-tag-suggestion-${++rt}`, u = null, d = [], f = null;
|
|
582
|
+
function p() {
|
|
583
|
+
v(u?.() ?? null);
|
|
580
584
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
583
|
-
|
|
585
|
+
function m() {
|
|
586
|
+
p(), f !== null && cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
587
|
+
f = null, p();
|
|
584
588
|
});
|
|
585
589
|
}
|
|
586
|
-
function
|
|
590
|
+
function h(e) {
|
|
587
591
|
let t = [], n = e?.parentElement ?? null;
|
|
588
592
|
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
589
593
|
let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
|
|
@@ -591,19 +595,19 @@ function it(t, n) {
|
|
|
591
595
|
}
|
|
592
596
|
return t;
|
|
593
597
|
}
|
|
594
|
-
function
|
|
595
|
-
|
|
596
|
-
for (let e of
|
|
598
|
+
function g(e) {
|
|
599
|
+
d = [window, ...h(e)];
|
|
600
|
+
for (let e of d) e.addEventListener("scroll", p, {
|
|
597
601
|
passive: !0,
|
|
598
602
|
capture: !0
|
|
599
603
|
});
|
|
600
|
-
window.addEventListener("resize",
|
|
604
|
+
window.addEventListener("resize", p, { passive: !0 });
|
|
601
605
|
}
|
|
602
|
-
function
|
|
603
|
-
for (let e of
|
|
604
|
-
window.removeEventListener("resize",
|
|
606
|
+
function _() {
|
|
607
|
+
for (let e of d) e.removeEventListener("scroll", p, { capture: !0 });
|
|
608
|
+
window.removeEventListener("resize", p), d = [];
|
|
605
609
|
}
|
|
606
|
-
function
|
|
610
|
+
function v(e) {
|
|
607
611
|
if (!i || !e || e.bottom < 0 || e.top > window.innerHeight) return;
|
|
608
612
|
i.style.position = "absolute", i.style.zIndex = "9999";
|
|
609
613
|
let t = i.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0;
|
|
@@ -614,7 +618,7 @@ function it(t, n) {
|
|
|
614
618
|
i.style.top = `${t - n}px`;
|
|
615
619
|
}
|
|
616
620
|
}
|
|
617
|
-
function
|
|
621
|
+
function y(e, t) {
|
|
618
622
|
let n = t?.closest("[data-tpl-theme]");
|
|
619
623
|
if (!n) return;
|
|
620
624
|
let r = n.getAttribute("data-tpl-theme");
|
|
@@ -626,48 +630,48 @@ function it(t, n) {
|
|
|
626
630
|
}
|
|
627
631
|
e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
|
|
628
632
|
}
|
|
629
|
-
function
|
|
630
|
-
a && (e ? (a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "listbox"), a.setAttribute("aria-expanded", "true"), a.setAttribute("aria-controls",
|
|
633
|
+
function b(e) {
|
|
634
|
+
a && (e ? (a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "listbox"), a.setAttribute("aria-expanded", "true"), a.setAttribute("aria-controls", l)) : (a.removeAttribute("aria-expanded"), a.removeAttribute("aria-controls"), a.removeAttribute("aria-activedescendant"), a.removeAttribute("aria-haspopup"), a.removeAttribute("role")));
|
|
631
635
|
}
|
|
632
|
-
function
|
|
633
|
-
a && (o.value.length === 0 ? a.removeAttribute("aria-activedescendant") : a.setAttribute("aria-activedescendant", `${
|
|
636
|
+
function x() {
|
|
637
|
+
a && (o.value.length === 0 ? a.removeAttribute("aria-activedescendant") : a.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`));
|
|
634
638
|
}
|
|
635
|
-
function
|
|
636
|
-
|
|
639
|
+
function S(e) {
|
|
640
|
+
c?.(e);
|
|
637
641
|
}
|
|
638
642
|
return {
|
|
639
|
-
open: ({ items:
|
|
640
|
-
o.value =
|
|
641
|
-
return
|
|
643
|
+
open: ({ items: d, getRect: f, anchorEl: p, onCommand: h }) => {
|
|
644
|
+
o.value = d, s.value = 0, c = h, i = document.createElement("div"), i.setAttribute("data-testid", "merge-tag-suggestion-popup"), a = p, y(i, p), (n?.value ?? document.body).appendChild(i), r = T({ render() {
|
|
645
|
+
return t(tt, {
|
|
642
646
|
items: o.value,
|
|
643
|
-
selectedIndex:
|
|
644
|
-
emptyText:
|
|
645
|
-
listId:
|
|
646
|
-
onSelect: (e) =>
|
|
647
|
+
selectedIndex: s.value,
|
|
648
|
+
emptyText: e,
|
|
649
|
+
listId: l,
|
|
650
|
+
onSelect: (e) => S(e),
|
|
647
651
|
onHover: (e) => {
|
|
648
|
-
|
|
652
|
+
s.value = e, x();
|
|
649
653
|
}
|
|
650
654
|
});
|
|
651
|
-
} }), r.mount(i),
|
|
655
|
+
} }), r.mount(i), b(!0), x(), u = f, m(), g(p);
|
|
652
656
|
},
|
|
653
657
|
update: ({ items: e, getRect: t, onCommand: n }) => {
|
|
654
|
-
o.value = e,
|
|
658
|
+
o.value = e, s.value >= e.length && (s.value = 0), c = n, x(), u = t, m();
|
|
655
659
|
},
|
|
656
660
|
handleKeyDown: (e) => {
|
|
657
|
-
let t =
|
|
658
|
-
return t &&
|
|
661
|
+
let t = at(e, o.value, s, S);
|
|
662
|
+
return t && x(), t;
|
|
659
663
|
},
|
|
660
664
|
close: () => {
|
|
661
|
-
i !== null && (
|
|
665
|
+
i !== null && (f !== null && (cancelAnimationFrame(f), f = null), _(), b(!1), r?.unmount(), i.remove(), r = null, i = null, a = null, c = null, u = null);
|
|
662
666
|
},
|
|
663
667
|
isOpen: () => i !== null
|
|
664
668
|
};
|
|
665
669
|
}
|
|
666
670
|
// src/utils/mergeTagTrigger.ts
|
|
667
|
-
function
|
|
671
|
+
function st(e, t, n, r, i) {
|
|
668
672
|
if (!n) return null;
|
|
669
673
|
let a = e.slice(0, t), o = a.lastIndexOf(n);
|
|
670
|
-
if (o === -1 || i && o <
|
|
674
|
+
if (o === -1 || i && o < ct(a, i)) return null;
|
|
671
675
|
let s = a.slice(o + n.length);
|
|
672
676
|
return /\s/.test(s) || r && s.includes(r) ? null : {
|
|
673
677
|
triggerStart: o,
|
|
@@ -675,14 +679,14 @@ function at(e, t, n, r, i) {
|
|
|
675
679
|
query: s
|
|
676
680
|
};
|
|
677
681
|
}
|
|
678
|
-
function
|
|
682
|
+
function ct(e, t) {
|
|
679
683
|
let n = new RegExp(t.source, `${t.flags.replace(/[gy]/g, "")}g`), r = 0;
|
|
680
684
|
for (let t of e.matchAll(n)) r = t.index + t[0].length;
|
|
681
685
|
return r;
|
|
682
686
|
}
|
|
683
687
|
// src/utils/textFieldCaret.ts
|
|
684
|
-
var
|
|
685
|
-
function
|
|
688
|
+
var lt = /* @__PURE__ */ "boxSizing.width.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.lineHeight.fontFamily.textAlign.textTransform.textIndent.letterSpacing.wordSpacing.tabSize.whiteSpace.wordWrap.wordBreak".split(".");
|
|
689
|
+
function ut(e, t, n) {
|
|
686
690
|
return {
|
|
687
691
|
left: e,
|
|
688
692
|
top: t,
|
|
@@ -695,7 +699,7 @@ function ct(e, t, n) {
|
|
|
695
699
|
toJSON: () => ({})
|
|
696
700
|
};
|
|
697
701
|
}
|
|
698
|
-
function
|
|
702
|
+
function dt(e, t) {
|
|
699
703
|
let n = e.ownerDocument, r = n.defaultView;
|
|
700
704
|
if (!r) return null;
|
|
701
705
|
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
@@ -703,7 +707,7 @@ function lt(e, t) {
|
|
|
703
707
|
let s = o.style;
|
|
704
708
|
s.position = "absolute", s.visibility = "hidden", s.top = "0", s.left = "0", s.overflow = "hidden", s.whiteSpace = i ? "pre" : "pre-wrap", s.wordWrap = i ? "normal" : "break-word";
|
|
705
709
|
let c = s, l = a;
|
|
706
|
-
for (let e of
|
|
710
|
+
for (let e of lt) c[e] = l[e];
|
|
707
711
|
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
708
712
|
let u = e.value, d = u.slice(0, t);
|
|
709
713
|
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
@@ -712,216 +716,221 @@ function lt(e, t) {
|
|
|
712
716
|
let p = f.offsetTop, m = f.offsetLeft;
|
|
713
717
|
n.body.removeChild(o);
|
|
714
718
|
let h = e.getBoundingClientRect(), g = parseFloat(a.borderTopWidth) || 0, _ = parseFloat(a.borderLeftWidth) || 0, v = parseFloat(a.lineHeight) || parseFloat(a.fontSize) || 0, y = h.left + m + _ - e.scrollLeft;
|
|
715
|
-
if (i) return
|
|
719
|
+
if (i) return ut(y, h.top, h.bottom);
|
|
716
720
|
let b = h.top + p + g - e.scrollTop;
|
|
717
|
-
return
|
|
721
|
+
return ut(y, b, b + v);
|
|
718
722
|
}
|
|
719
723
|
// src/composables/useMergeTagAutocomplete.ts
|
|
720
|
-
var
|
|
724
|
+
var ft = /* @__PURE__ */ new Set([
|
|
721
725
|
"ArrowLeft",
|
|
722
726
|
"ArrowRight",
|
|
723
727
|
"Home",
|
|
724
728
|
"End"
|
|
725
729
|
]);
|
|
726
|
-
function
|
|
727
|
-
let { elementRef:
|
|
728
|
-
|
|
729
|
-
|
|
730
|
+
function pt(e) {
|
|
731
|
+
let { elementRef: t, modelValue: n, emit: r, mergeTags: a, syntax: u, enabled: d, onInsert: f } = e, p = se(), m = k(u), h = j(u), g = C(() => p.value && d && m !== null && a.value.length > 0), _ = o(re, null), y = ot((c(_) ? _.value : _)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", ce());
|
|
732
|
+
i(p, (e) => {
|
|
733
|
+
e || y.close();
|
|
734
|
+
}, { flush: "sync" });
|
|
735
|
+
let b = !1;
|
|
736
|
+
l() && s(() => {
|
|
737
|
+
b = !0, y.close();
|
|
730
738
|
});
|
|
731
|
-
function
|
|
739
|
+
function x(e) {
|
|
732
740
|
let t = e.value ?? "";
|
|
733
|
-
return
|
|
741
|
+
return st(t, e.selectionStart ?? t.length, m, h, u.value);
|
|
734
742
|
}
|
|
735
|
-
function
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
743
|
+
function S(e, i, a) {
|
|
744
|
+
if (!p.value) return;
|
|
745
|
+
let o = e.value ?? n(), s = o.slice(i.caret), c = h && s.startsWith(h) ? h.length : 0, l = o.slice(0, i.triggerStart), u = o.slice(i.caret + c), d = l + a.value + u, m = l.length + a.value.length;
|
|
746
|
+
f?.(), r(d), y.close(), v(() => {
|
|
747
|
+
if (b) return;
|
|
748
|
+
let e = t.value;
|
|
749
|
+
e?.focus(), e?.setSelectionRange(m, m);
|
|
741
750
|
});
|
|
742
751
|
}
|
|
743
|
-
function
|
|
744
|
-
if (!
|
|
745
|
-
let e =
|
|
752
|
+
function w() {
|
|
753
|
+
if (!g.value || b) return;
|
|
754
|
+
let e = t.value;
|
|
746
755
|
if (!e) {
|
|
747
|
-
|
|
756
|
+
y.close();
|
|
748
757
|
return;
|
|
749
758
|
}
|
|
750
|
-
let
|
|
751
|
-
if (!
|
|
752
|
-
|
|
759
|
+
let n = x(e);
|
|
760
|
+
if (!n) {
|
|
761
|
+
y.close();
|
|
753
762
|
return;
|
|
754
763
|
}
|
|
755
|
-
let r =
|
|
756
|
-
|
|
764
|
+
let r = it(a.value, n.query), i = () => dt(e, n.triggerStart), o = (t) => S(e, n, t);
|
|
765
|
+
y.isOpen() ? y.update({
|
|
757
766
|
items: r,
|
|
758
767
|
getRect: i,
|
|
759
|
-
onCommand:
|
|
760
|
-
}) :
|
|
768
|
+
onCommand: o
|
|
769
|
+
}) : y.open({
|
|
761
770
|
items: r,
|
|
762
771
|
getRect: i,
|
|
763
772
|
anchorEl: e,
|
|
764
|
-
onCommand:
|
|
773
|
+
onCommand: o
|
|
765
774
|
});
|
|
766
775
|
}
|
|
767
|
-
function
|
|
768
|
-
return
|
|
776
|
+
function T(e) {
|
|
777
|
+
return y.isOpen() ? e.key === "Escape" ? (y.close(), !0) : ft.has(e.key) ? (y.close(), !1) : y.handleKeyDown(e) : !1;
|
|
769
778
|
}
|
|
770
779
|
return {
|
|
771
|
-
available:
|
|
772
|
-
refresh:
|
|
773
|
-
handleKeydown:
|
|
774
|
-
close: () =>
|
|
775
|
-
isOpen: () =>
|
|
780
|
+
available: g,
|
|
781
|
+
refresh: w,
|
|
782
|
+
handleKeydown: T,
|
|
783
|
+
close: () => y.close(),
|
|
784
|
+
isOpen: () => y.isOpen()
|
|
776
785
|
};
|
|
777
786
|
}
|
|
778
787
|
// src/composables/useMergeTagField.ts
|
|
779
|
-
function
|
|
780
|
-
let { modelValue:
|
|
781
|
-
|
|
788
|
+
function mt(e) {
|
|
789
|
+
let { modelValue: t, emit: n, elementRef: r } = e, { mergeTags: i, canRequestMergeTag: a, isRequesting: o, isMergeTagValue: c, getMergeTagDisplayLabel: u, findMergeTag: d, requestMergeTag: f, syntax: p, autocomplete: m } = R(), { canInsertLogicTag: h, isRequesting: g, requestLogicTag: _ } = z(), y = E(!1), b = !1, x = !1;
|
|
790
|
+
l() && s(() => {
|
|
782
791
|
x = !0;
|
|
783
792
|
});
|
|
784
|
-
let
|
|
785
|
-
elementRef:
|
|
786
|
-
modelValue:
|
|
787
|
-
emit:
|
|
788
|
-
mergeTags:
|
|
789
|
-
syntax:
|
|
790
|
-
enabled:
|
|
793
|
+
let S = pt({
|
|
794
|
+
elementRef: r,
|
|
795
|
+
modelValue: t,
|
|
796
|
+
emit: n,
|
|
797
|
+
mergeTags: i,
|
|
798
|
+
syntax: p,
|
|
799
|
+
enabled: m,
|
|
791
800
|
onInsert: () => {
|
|
792
801
|
y.value = !0;
|
|
793
802
|
}
|
|
794
|
-
}),
|
|
795
|
-
let e =
|
|
803
|
+
}), w = C(() => {
|
|
804
|
+
let e = t();
|
|
796
805
|
if (!e) return [];
|
|
797
|
-
let
|
|
806
|
+
let n = [], r = `(${p.value.source}|${p.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
798
807
|
for (; (o = i.exec(e)) !== null;) {
|
|
799
|
-
o.index > a &&
|
|
808
|
+
o.index > a && n.push({
|
|
800
809
|
type: "text",
|
|
801
810
|
value: e.slice(a, o.index)
|
|
802
811
|
});
|
|
803
|
-
let
|
|
804
|
-
|
|
812
|
+
let t = o[0];
|
|
813
|
+
c(t) ? n.push({
|
|
805
814
|
type: "mergeTag",
|
|
806
|
-
value:
|
|
807
|
-
label:
|
|
808
|
-
}) :
|
|
815
|
+
value: t,
|
|
816
|
+
label: u(t)
|
|
817
|
+
}) : M(t, p) ? n.push({
|
|
809
818
|
type: "logicMergeTag",
|
|
810
|
-
value:
|
|
811
|
-
keyword:
|
|
812
|
-
}) :
|
|
819
|
+
value: t,
|
|
820
|
+
keyword: A(t, p)
|
|
821
|
+
}) : n.push({
|
|
813
822
|
type: "text",
|
|
814
|
-
value:
|
|
815
|
-
}), a = o.index +
|
|
823
|
+
value: t
|
|
824
|
+
}), a = o.index + t.length;
|
|
816
825
|
}
|
|
817
|
-
return a < e.length &&
|
|
826
|
+
return a < e.length && n.push({
|
|
818
827
|
type: "text",
|
|
819
828
|
value: e.slice(a)
|
|
820
|
-
}),
|
|
821
|
-
}),
|
|
829
|
+
}), n;
|
|
830
|
+
}), T = C(() => w.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
822
831
|
function D() {
|
|
823
|
-
y.value = !0,
|
|
824
|
-
|
|
825
|
-
let e =
|
|
826
|
-
|
|
832
|
+
y.value = !0, v(() => {
|
|
833
|
+
r.value?.focus();
|
|
834
|
+
let e = t()?.length || 0;
|
|
835
|
+
r.value?.setSelectionRange(e, e);
|
|
827
836
|
});
|
|
828
837
|
}
|
|
829
838
|
function O() {
|
|
830
839
|
b || (y.value = !1);
|
|
831
840
|
}
|
|
832
|
-
function
|
|
833
|
-
|
|
841
|
+
function k(e) {
|
|
842
|
+
n(e.target.value), S.refresh();
|
|
834
843
|
}
|
|
835
|
-
function
|
|
836
|
-
return
|
|
844
|
+
function j(e) {
|
|
845
|
+
return S.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && O(), !1);
|
|
837
846
|
}
|
|
838
|
-
function
|
|
839
|
-
|
|
847
|
+
function N() {
|
|
848
|
+
S.refresh();
|
|
840
849
|
}
|
|
841
|
-
function
|
|
842
|
-
|
|
850
|
+
function P() {
|
|
851
|
+
S.close(), O();
|
|
843
852
|
}
|
|
844
|
-
function
|
|
845
|
-
|
|
853
|
+
function F() {
|
|
854
|
+
n("");
|
|
846
855
|
}
|
|
847
|
-
async function
|
|
848
|
-
let e = y.value &&
|
|
856
|
+
async function I() {
|
|
857
|
+
let e = y.value && r.value ? r.value.selectionStart ?? t().length : t().length;
|
|
849
858
|
b = !0;
|
|
850
|
-
let
|
|
859
|
+
let i;
|
|
851
860
|
try {
|
|
852
|
-
|
|
861
|
+
i = await f();
|
|
853
862
|
} finally {
|
|
854
863
|
b = !1;
|
|
855
864
|
}
|
|
856
|
-
if (!x &&
|
|
857
|
-
let
|
|
858
|
-
|
|
865
|
+
if (!x && i) {
|
|
866
|
+
let a = t().slice(0, e), o = t().slice(e), s = a + i.value + o;
|
|
867
|
+
n(s), y.value = !0, v(() => {
|
|
859
868
|
if (x) return;
|
|
860
|
-
let t = e +
|
|
861
|
-
|
|
869
|
+
let t = e + i.value.length;
|
|
870
|
+
r.value?.focus(), r.value?.setSelectionRange(t, t);
|
|
862
871
|
});
|
|
863
872
|
}
|
|
864
873
|
}
|
|
865
|
-
async function
|
|
866
|
-
let t =
|
|
867
|
-
if (
|
|
874
|
+
async function ee(e) {
|
|
875
|
+
let t = w.value, r = t[e];
|
|
876
|
+
if (r?.type !== "mergeTag") return;
|
|
868
877
|
b = !0;
|
|
869
|
-
let
|
|
878
|
+
let i;
|
|
870
879
|
try {
|
|
871
|
-
|
|
880
|
+
i = await f({
|
|
872
881
|
reason: "edit",
|
|
873
|
-
current:
|
|
882
|
+
current: d(r.value)
|
|
874
883
|
});
|
|
875
884
|
} finally {
|
|
876
885
|
b = !1;
|
|
877
886
|
}
|
|
878
|
-
!x &&
|
|
887
|
+
!x && i && n(t.map((t, n) => n === e ? i.value : t.value).join(""));
|
|
879
888
|
}
|
|
880
|
-
async function
|
|
881
|
-
let e =
|
|
889
|
+
async function te() {
|
|
890
|
+
let e = r.value, i = e?.selectionStart ?? t().length, a = e?.selectionEnd ?? i;
|
|
882
891
|
b = !0;
|
|
883
|
-
let
|
|
892
|
+
let o;
|
|
884
893
|
try {
|
|
885
|
-
|
|
894
|
+
o = await _();
|
|
886
895
|
} finally {
|
|
887
896
|
b = !1;
|
|
888
897
|
}
|
|
889
|
-
if (x || !
|
|
890
|
-
let
|
|
891
|
-
"before" in
|
|
892
|
-
x || (
|
|
898
|
+
if (x || !o) return;
|
|
899
|
+
let s = t(), c, l;
|
|
900
|
+
"before" in o ? (c = s.slice(0, i) + o.before + s.slice(i, a) + o.after + s.slice(a), l = i + o.before.length + (a - i)) : (c = s.slice(0, i) + o.value + s.slice(i), l = i + o.value.length), n(c), y.value = !0, v(() => {
|
|
901
|
+
x || (r.value?.focus(), r.value?.setSelectionRange(l, l));
|
|
893
902
|
});
|
|
894
903
|
}
|
|
895
904
|
return {
|
|
896
|
-
segments:
|
|
897
|
-
hasMergeTags:
|
|
898
|
-
canRequestMergeTag:
|
|
899
|
-
isRequestingMergeTag:
|
|
900
|
-
canInsertLogicTag:
|
|
901
|
-
isRequestingLogicTag:
|
|
905
|
+
segments: w,
|
|
906
|
+
hasMergeTags: T,
|
|
907
|
+
canRequestMergeTag: a,
|
|
908
|
+
isRequestingMergeTag: o,
|
|
909
|
+
canInsertLogicTag: h,
|
|
910
|
+
isRequestingLogicTag: g,
|
|
902
911
|
isEditing: y,
|
|
903
912
|
startEditing: D,
|
|
904
913
|
stopEditing: O,
|
|
905
|
-
handleInput:
|
|
906
|
-
handleKeydown:
|
|
907
|
-
handleClick:
|
|
908
|
-
handleBlur:
|
|
909
|
-
clearValue:
|
|
910
|
-
insertMergeTag:
|
|
911
|
-
replaceMergeTagAt:
|
|
912
|
-
insertLogicTag:
|
|
913
|
-
autocompleteAvailable:
|
|
914
|
+
handleInput: k,
|
|
915
|
+
handleKeydown: j,
|
|
916
|
+
handleClick: N,
|
|
917
|
+
handleBlur: P,
|
|
918
|
+
clearValue: F,
|
|
919
|
+
insertMergeTag: I,
|
|
920
|
+
replaceMergeTagAt: ee,
|
|
921
|
+
insertLogicTag: te,
|
|
922
|
+
autocompleteAvailable: S.available
|
|
914
923
|
};
|
|
915
924
|
}
|
|
916
925
|
// src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
917
|
-
var
|
|
926
|
+
var ht = ["aria-label"], gt = [
|
|
918
927
|
"data-tooltip",
|
|
919
928
|
"aria-label",
|
|
920
929
|
"onClick"
|
|
921
|
-
],
|
|
930
|
+
], _t = ["data-tooltip"], vt = ["data-tooltip"], yt = {
|
|
922
931
|
key: 3,
|
|
923
932
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
924
|
-
},
|
|
933
|
+
}, bt = ["aria-label", "title"], xt = ["aria-label", "title"], St = /* @__PURE__ */ e({
|
|
925
934
|
__name: "MergeTagSegments",
|
|
926
935
|
props: {
|
|
927
936
|
segments: {},
|
|
@@ -934,37 +943,37 @@ var pt = ["aria-label"], mt = [
|
|
|
934
943
|
"repick"
|
|
935
944
|
],
|
|
936
945
|
setup(e, { emit: t }) {
|
|
937
|
-
let
|
|
946
|
+
let r = t, { t: i, format: o } = L(), { canRepickMergeTag: s, showRawValue: c } = R();
|
|
938
947
|
function l() {
|
|
939
|
-
|
|
948
|
+
r("edit");
|
|
940
949
|
}
|
|
941
|
-
return (t, d) => (
|
|
950
|
+
return (t, d) => (n(), u("div", {
|
|
942
951
|
role: "group",
|
|
943
|
-
"aria-label":
|
|
944
|
-
class:
|
|
952
|
+
"aria-label": p(i).mergeTag.fieldGroup,
|
|
953
|
+
class: m([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
945
954
|
onClick: l
|
|
946
955
|
}, [
|
|
947
|
-
(
|
|
956
|
+
(n(!0), u(D, null, a(e.segments, (e, t) => (n(), u(D, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" && p(s)(e.value) ? (n(), u("button", {
|
|
948
957
|
key: 0,
|
|
949
958
|
type: "button",
|
|
950
|
-
class:
|
|
951
|
-
"data-tooltip":
|
|
952
|
-
"aria-label":
|
|
959
|
+
class: m(["tpl:inline-flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded tpl:border-none tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", p(c) ? "tpl-tooltip" : ""]),
|
|
960
|
+
"data-tooltip": p(c) ? e.value : void 0,
|
|
961
|
+
"aria-label": p(o)(p(i).mergeTag.changeTag, { label: e.label }),
|
|
953
962
|
"data-testid": "merge-tag-field-chip",
|
|
954
963
|
style: {
|
|
955
964
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
956
965
|
color: "var(--tpl-primary)"
|
|
957
966
|
},
|
|
958
|
-
onClick:
|
|
959
|
-
},
|
|
967
|
+
onClick: y((e) => r("repick", t), ["stop"])
|
|
968
|
+
}, x(e.label), 11, gt)) : e.type === "mergeTag" ? (n(), u("span", {
|
|
960
969
|
key: 1,
|
|
961
|
-
class:
|
|
962
|
-
"data-tooltip":
|
|
970
|
+
class: m(["tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium", p(c) ? "tpl-tooltip" : ""]),
|
|
971
|
+
"data-tooltip": p(c) ? e.value : void 0,
|
|
963
972
|
style: {
|
|
964
973
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
965
974
|
color: "var(--tpl-primary)"
|
|
966
975
|
}
|
|
967
|
-
},
|
|
976
|
+
}, x(e.label), 11, _t)) : e.type === "logicMergeTag" ? (n(), u("span", {
|
|
968
977
|
key: 2,
|
|
969
978
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
970
979
|
"data-tooltip": e.value,
|
|
@@ -973,79 +982,79 @@ var pt = ["aria-label"], mt = [
|
|
|
973
982
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
974
983
|
color: "var(--tpl-primary)"
|
|
975
984
|
}
|
|
976
|
-
},
|
|
977
|
-
|
|
985
|
+
}, x(e.keyword), 9, vt)) : (n(), u("span", yt, x(e.value), 1))], 64))), 128)),
|
|
986
|
+
b("button", {
|
|
978
987
|
type: "button",
|
|
979
988
|
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-primary)] tpl:hover:opacity-100",
|
|
980
|
-
"aria-label":
|
|
981
|
-
title:
|
|
989
|
+
"aria-label": p(i).mergeTag.editAsText,
|
|
990
|
+
title: p(i).mergeTag.editAsText,
|
|
982
991
|
"data-testid": "merge-tag-field-edit",
|
|
983
|
-
onClick:
|
|
984
|
-
}, [
|
|
992
|
+
onClick: y(l, ["stop"])
|
|
993
|
+
}, [O(p(N), {
|
|
985
994
|
size: 12,
|
|
986
995
|
"stroke-width": 2
|
|
987
|
-
})], 8,
|
|
988
|
-
|
|
996
|
+
})], 8, bt),
|
|
997
|
+
b("button", {
|
|
989
998
|
type: "button",
|
|
990
999
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all tpl:hover:text-[var(--tpl-danger)] tpl:hover:opacity-100",
|
|
991
|
-
"aria-label":
|
|
992
|
-
title:
|
|
1000
|
+
"aria-label": p(i).mergeTag.remove,
|
|
1001
|
+
title: p(i).mergeTag.remove,
|
|
993
1002
|
"data-testid": "merge-tag-field-clear",
|
|
994
|
-
onClick: d[0] ||=
|
|
995
|
-
}, [
|
|
1003
|
+
onClick: d[0] ||= y((e) => r("clear"), ["stop"])
|
|
1004
|
+
}, [O(p(I), {
|
|
996
1005
|
size: 12,
|
|
997
1006
|
"stroke-width": 2.5
|
|
998
|
-
})], 8,
|
|
999
|
-
], 10,
|
|
1007
|
+
})], 8, xt)
|
|
1008
|
+
], 10, ht));
|
|
1000
1009
|
}
|
|
1001
|
-
}),
|
|
1010
|
+
}), Ct = [
|
|
1002
1011
|
"aria-label",
|
|
1003
1012
|
"title",
|
|
1004
1013
|
"disabled"
|
|
1005
|
-
],
|
|
1014
|
+
], wt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Tt = /* @__PURE__ */ e({
|
|
1006
1015
|
__name: "MergeTagInsertButton",
|
|
1007
1016
|
props: { disabled: { type: Boolean } },
|
|
1008
1017
|
emits: ["insert"],
|
|
1009
1018
|
setup(e) {
|
|
1010
|
-
let { t } =
|
|
1011
|
-
return (
|
|
1019
|
+
let { t } = L();
|
|
1020
|
+
return (r, i) => (n(), u("button", {
|
|
1012
1021
|
type: "button",
|
|
1013
|
-
class:
|
|
1014
|
-
"aria-label":
|
|
1015
|
-
title:
|
|
1022
|
+
class: m([wt, "tpl:mt-1.5"]),
|
|
1023
|
+
"aria-label": p(t).mergeTag.insert,
|
|
1024
|
+
title: p(t).mergeTag.insert,
|
|
1016
1025
|
disabled: e.disabled,
|
|
1017
|
-
onMousedown:
|
|
1018
|
-
onClick:
|
|
1019
|
-
}, [
|
|
1026
|
+
onMousedown: i[0] ||= y(() => {}, ["prevent"]),
|
|
1027
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1028
|
+
}, [O(p(F), {
|
|
1020
1029
|
size: 12,
|
|
1021
1030
|
"stroke-width": 2
|
|
1022
|
-
}), d(" " + p(
|
|
1031
|
+
}), d(" " + x(p(t).mergeTag.insertShort), 1)], 42, Ct));
|
|
1023
1032
|
}
|
|
1024
|
-
}),
|
|
1033
|
+
}), Et = [
|
|
1025
1034
|
"aria-label",
|
|
1026
1035
|
"title",
|
|
1027
1036
|
"disabled"
|
|
1028
|
-
],
|
|
1037
|
+
], Dt = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:hover:bg-[var(--tpl-primary-light)] tpl:hover:text-[var(--tpl-primary)] tpl:hover:border-[var(--tpl-primary)]", Ot = /* @__PURE__ */ e({
|
|
1029
1038
|
__name: "LogicTagInsertButton",
|
|
1030
1039
|
props: { disabled: { type: Boolean } },
|
|
1031
1040
|
emits: ["insert"],
|
|
1032
1041
|
setup(e) {
|
|
1033
|
-
let { t } =
|
|
1034
|
-
return (
|
|
1042
|
+
let { t } = L();
|
|
1043
|
+
return (r, i) => (n(), u("button", {
|
|
1035
1044
|
type: "button",
|
|
1036
|
-
class:
|
|
1037
|
-
"aria-label":
|
|
1038
|
-
title:
|
|
1045
|
+
class: m([Dt, "tpl:mt-1.5"]),
|
|
1046
|
+
"aria-label": p(t).logicTag.insert,
|
|
1047
|
+
title: p(t).logicTag.insert,
|
|
1039
1048
|
disabled: e.disabled,
|
|
1040
1049
|
"data-testid": "field-insert-logic-button",
|
|
1041
|
-
onMousedown:
|
|
1042
|
-
onClick:
|
|
1043
|
-
}, [
|
|
1050
|
+
onMousedown: i[0] ||= y(() => {}, ["prevent"]),
|
|
1051
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1052
|
+
}, [O(p(P), {
|
|
1044
1053
|
size: 12,
|
|
1045
1054
|
"stroke-width": 2
|
|
1046
|
-
}), d(" " + p(
|
|
1055
|
+
}), d(" " + x(p(t).logicTag.insertShort), 1)], 42, Et));
|
|
1047
1056
|
}
|
|
1048
1057
|
});
|
|
1049
|
-
export {
|
|
1058
|
+
export { ot as a, Ye as c, mt as i, Tt as n, it as o, St as r, at as s, Ot as t };
|
|
1050
1059
|
|
|
1051
|
-
//# sourceMappingURL=LogicTagInsertButton-
|
|
1060
|
+
//# sourceMappingURL=LogicTagInsertButton-5Z3fFzjc.js.map
|