@templatical/editor 0.38.0 → 0.39.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 +2 -4
- package/dist/{AiChatSidebar-tu4eLcf_.js → AiChatSidebar-pOxCZWz9.js} +67 -67
- package/dist/{AiFeatureMenu-BF0i0vA4.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
- package/dist/{BlockIssueBadge-DT-FqKeC.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
- package/dist/{BlockPreviewCanvas-DDCmMram.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
- package/dist/{CloudHeaderExtras-NPhudovT.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
- package/dist/{CloudPanels-Iwnky0iA.js → CloudPanels-CyZAnSJY.js} +7 -7
- package/dist/{CollaboratorBar-DAITu0hz.js → CollaboratorBar-C7Zca3g1.js} +4 -4
- package/dist/{CommentsPanel-CDvgmWP1.js → CommentsPanel-CNOb7YCm.js} +2 -2
- package/dist/{CommentsSidebar-X_xqM3dR.js → CommentsSidebar-VmwjU9va.js} +14 -14
- package/dist/{CountdownBlock-ZFJIdbP6.js → CountdownBlock-DSvbf3qU.js} +3 -3
- package/dist/{CountdownToolbar-DBFoG3a6.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
- package/dist/{DesignReferenceSidebar--QtXjLrw.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
- package/dist/{IssuesPanel-BLbNFMSX.js → IssuesPanel-DL2Xr14_.js} +8 -8
- package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
- package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
- package/dist/{MediaPanels-CMTAhDXB.js → MediaPanels-Cc4UkfG1.js} +2 -2
- package/dist/MergeTagInput-QI-5KG2R.js +81 -0
- package/dist/{MergeTagModeToggle-DKN6ihI5.js → MergeTagModeToggle-D793Bj_E.js} +32 -73
- package/dist/{ParagraphEditor-1E9yzOfk.js → ParagraphEditor-DkkPSexG.js} +50 -51
- package/dist/{RestoreVersionDialog-BMGUkcd8.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
- package/dist/{RichTextEditorContent-BnxbQUV9.js → RichTextEditorContent-BC5UTVnb.js} +12 -12
- package/dist/{SaveBlockDialog-WKASpCCT.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
- package/dist/{SavedBlocksBrowserModal-AYEXTMtQ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
- package/dist/{SavedBlocksPanels-D_CpacTl.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
- package/dist/{SavedBlocksPickBar-BHMwg-1G.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
- package/dist/{TemplateScoringPanel-CSin43YM.js → TemplateScoringPanel-C2Rdlyn6.js} +104 -104
- package/dist/TemplateSettings-C_5leDdF.js +245 -0
- package/dist/{TestEmailModal-BxizsRCd.js → TestEmailModal-DJ5q_u4N.js} +55 -55
- package/dist/{TestEmailPanel-vd2e5HzT.js → TestEmailPanel-CP24UGst.js} +2 -2
- package/dist/{TitleEditor-CLJ68Ty4.js → TitleEditor-QBBOXtxx.js} +18 -18
- package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
- package/dist/Toolbar-COD2TW20.js +2426 -0
- package/dist/{TplModal-Q9fDgS1M.js → TplModal-C8xGjC1l.js} +5 -5
- package/dist/{VersionHistoryMenu-eGYVhM4H.js → VersionHistoryMenu-BVQityes.js} +10 -10
- package/dist/{VersionHistoryPanels-C7Ntrrfq.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
- package/dist/{VersionPreviewBanner-BbQXnR0M.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
- package/dist/{blockTypeIcons-5qD4bB76.js → blockTypeIcons-CdXugKyV.js} +16 -37
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-D9S-UCfZ.js → ca-YlPDhElv.js} +5 -3
- package/dist/cdn/chunks/{AiChatSidebar-dyqqHAcI.js → AiChatSidebar-CjSEoK4x.js} +54 -54
- package/dist/cdn/chunks/AiChatSidebar-CjSEoK4x.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
- package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js → CloudPanels-bHhh9AUA.js} +6 -6
- package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js → CollaboratorBar-DgqcaGGI.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js → CommentsPanel-Cy4TlTHC.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js → CountdownBlock-DdC8Lg5F.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js → CountdownToolbar-CN9h4nlC.js} +22 -21
- package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js → IssuesPanel-DdFk-Blf.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
- package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
- package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-D21M6shx.js → MediaPanels-kX9AZQ7K.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-D21M6shx.js.map → MediaPanels-kX9AZQ7K.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
- package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js → MergeTagModeToggle-n3nvSNeQ.js} +33 -33
- package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js → ParagraphEditor-DO4RzP8l.js} +43 -43
- package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js → RichTextEditorContent-Ch5zeyZ7.js} +9 -9
- package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
- package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DBjUNULq.js → TemplateScoringPanel--JxR6CsQ.js} +86 -86
- package/dist/cdn/chunks/TemplateScoringPanel--JxR6CsQ.js.map +1 -0
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-BTNlSW6f.js → TestEmailModal-BAuDxJtD.js} +53 -53
- package/dist/cdn/chunks/TestEmailModal-BAuDxJtD.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js → TestEmailPanel-GUGZisLp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CrnuIq62.js → TitleEditor-uKu33Nwr.js} +16 -16
- package/dist/cdn/chunks/TitleEditor-uKu33Nwr.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
- package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
- package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DYXrTz42.js → TplModal-DuwS2ifK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DYXrTz42.js.map → TplModal-DuwS2ifK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js → blockTypeIcons-raBjStuv.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
- package/dist/{ca-D9S-UCfZ.js → cdn/chunks/ca-YlPDhElv.js} +7 -1
- package/dist/cdn/chunks/{ca-D9S-UCfZ.js.map → ca-YlPDhElv.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
- package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js → createCloudRuntime-D5bXzcTe.js} +6 -6
- package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
- package/dist/cdn/chunks/{de-BUPszLpi.js → de-CONjnzrF.js} +6 -2
- package/dist/cdn/chunks/{de-BUPszLpi.js.map → de-CONjnzrF.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
- package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
- package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
- package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
- package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
- package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-MXgtarMl.js → editor-modal-C_xYN_66.js} +7 -7
- package/dist/cdn/chunks/{editor-modal-MXgtarMl.js.map → editor-modal-C_xYN_66.js.map} +1 -1
- package/dist/cdn/chunks/{en-BbOC5x3w.js → en-BAMooiOF.js} +6 -2
- package/dist/cdn/chunks/{en-BbOC5x3w.js.map → en-BAMooiOF.js.map} +1 -1
- package/dist/cdn/chunks/en-BwfjKb4M.js +2 -0
- package/dist/{es-0bCDcT9p.js → cdn/chunks/es-I47lHs2m.js} +7 -1
- package/dist/cdn/chunks/{es-0bCDcT9p.js.map → es-I47lHs2m.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-B8_jnIkD.js → extensions-Bhu8UEE5.js} +185 -100
- package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
- package/dist/cdn/chunks/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +6 -2
- package/dist/cdn/chunks/{fr-Brr8mJ9e.js.map → fr-B8MIKjT4.js.map} +1 -1
- package/dist/cdn/chunks/htmlparser-ClUZ6waR.js +1113 -0
- package/dist/cdn/chunks/htmlparser-ClUZ6waR.js.map +1 -0
- package/dist/cdn/chunks/{icons-BUlqGSgd.js → icons-BKkJ-5xF.js} +36 -36
- package/dist/cdn/chunks/{icons-BUlqGSgd.js.map → icons-BKkJ-5xF.js.map} +1 -1
- package/dist/cdn/chunks/keys-dJbD1QPs.js +12 -0
- package/dist/cdn/chunks/keys-dJbD1QPs.js.map +1 -0
- package/dist/{nl-Co3_RL0M.js → cdn/chunks/nl-CBLxcb-0.js} +7 -1
- package/dist/cdn/chunks/{nl-Co3_RL0M.js.map → nl-CBLxcb-0.js.map} +1 -1
- package/dist/{pt-BR-BECez5b0.js → cdn/chunks/pt-BR-CMSRfX7t.js} +7 -1
- package/dist/cdn/chunks/{pt-BR-BECez5b0.js.map → pt-BR-CMSRfX7t.js.map} +1 -1
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
- package/dist/cdn/chunks/{src-IGLRmUar.js → src-CZ-W8YBa.js} +4 -4
- package/dist/cdn/chunks/{src-IGLRmUar.js.map → src-CZ-W8YBa.js.map} +1 -1
- package/dist/cdn/chunks/{src-CUvZWL6Y.js → src-CaNsA_WX.js} +2 -2
- package/dist/cdn/chunks/{src-CUvZWL6Y.js.map → src-CaNsA_WX.js.map} +1 -1
- package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -1
- package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
- package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
- package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js → useCloudI18n-C09JcFS0.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
- package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-B0zW2nT4.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js → useI18n-DTZ9sIcv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
- package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
- package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-BE8oDoha.js +60 -0
- package/dist/cdn/chunks/useMergeTag-BE8oDoha.js.map +1 -0
- package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js → usePopoverPosition-gB9q-ql7.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js → useScrollToBlock-CtTXwmiU.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +856 -3347
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DWtkBzBU.js → check-eqb2JhqU.js} +1 -1
- package/dist/{chevron-down-C-Fjxcqj.js → chevron-down-Dkr-7Ywl.js} +1 -1
- package/dist/{chevron-right-SOkn2d4P.js → chevron-right-Bge4XF_B.js} +1 -1
- package/dist/{chevron-up-lntU1ypp.js → chevron-up-CQAyl0kC.js} +1 -1
- package/dist/{circle-alert-CjzUTwy3.js → circle-alert-CYgTHKWr.js} +1 -1
- package/dist/{clock-pB2QKPsJ.js → clock-BgSJZJP5.js} +1 -1
- package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
- package/dist/{copy-CId1E038.js → copy-mw6PVnOJ.js} +1 -1
- package/dist/{createCloudRuntime-x5WZm3p8.js → createCloudRuntime-BGd5--Bq.js} +5 -5
- package/dist/{createLucideIcon-Cwf_nTzE.js → createLucideIcon-BxY5yz5u.js} +6 -6
- package/dist/{de-BUPszLpi.js → de-CONjnzrF.js} +5 -1
- package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
- package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
- package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
- package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
- package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
- package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
- package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
- package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
- package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
- package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
- package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
- package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
- package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
- package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
- package/dist/{editor-modal-B_LaQf0s.js → editor-modal-OPhP71YO.js} +20 -20
- package/dist/{en-BbOC5x3w.js → en-BAMooiOF.js} +5 -1
- package/dist/en-CjNopehs.js +2 -0
- package/dist/{cdn/chunks/es-0bCDcT9p.js → es-I47lHs2m.js} +5 -3
- package/dist/extensions-DRN-elXT.js +1645 -0
- package/dist/{eye-BuGtFUoJ.js → eye-DphkRtAD.js} +1 -1
- package/dist/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +5 -1
- package/dist/{image-up-gH4JEpU5.js → image-up-Qi2BXD7T.js} +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/{info-BQ60P82u.js → info-VSyAs02q.js} +1 -1
- package/dist/keys-BdoSgsz9.js +10 -0
- package/dist/{link-3R8it3J7.js → link-CNuozGqD.js} +1 -1
- package/dist/{list-Ccdgj46T.js → list-BA0I5Wmu.js} +1 -1
- package/dist/{loader-circle-B_tAD4k6.js → loader-circle-z5eeqasv.js} +1 -1
- package/dist/{message-circle-P-KSc6V0.js → message-circle-BsQ9hEup.js} +1 -1
- package/dist/{cdn/chunks/nl-Co3_RL0M.js → nl-CBLxcb-0.js} +5 -3
- package/dist/package-OkXfuRoO.js +25 -0
- package/dist/{pencil-9ZiwqS4r.js → pencil-DFVFA7Dj.js} +1 -1
- package/dist/{plus-BwJEzCaO.js → plus-D8bkVjZ7.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-BECez5b0.js → pt-BR-CMSRfX7t.js} +5 -3
- package/dist/{refresh-cw-DEgfb2FK.js → refresh-cw-DPB7YFuz.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
- package/dist/{search-DqQ8Li5E.js → search-C-dCgqIa.js} +1 -1
- package/dist/{send-CE6uvqop.js → send-Cm2fy2zm.js} +1 -1
- package/dist/{shield-check-DhD1Z3rd.js → shield-check-COgBYFDF.js} +1 -1
- package/dist/smartphone-v0u_MOEV.js +46 -0
- package/dist/socialIcons-DkGcpEwC.js +1130 -0
- package/dist/{sparkles-R0ZQHa6F.js → sparkles-Ds0RF8Iu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
- package/dist/templatical-editor.js +945 -3511
- package/dist/{text-align-start-DSux2UNn.js → text-align-start-DiavaIm6.js} +1 -1
- package/dist/{trash-Cf_SqsER.js → trash-DnOkfu2V.js} +1 -1
- package/dist/{triangle-alert-C6tGa6jw.js → triangle-alert-DGLAyXnh.js} +1 -1
- package/dist/{upload-DusKjpVr.js → upload-BBDme2cy.js} +1 -1
- package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
- package/dist/{useCloudI18n-BLyh_e2T.js → useCloudI18n-D1iedlP3.js} +2 -2
- package/dist/useEditorCore-C5APBjjV.js +4097 -0
- package/dist/{useEditorRoot-ds57-l6F.js → useEditorRoot-BOxn5EfP.js} +2 -2
- package/dist/{useI18n-BbdxxpOE.js → useI18n-Ds_-druD.js} +2 -2
- package/dist/useLogicTag-DoHfc08B.js +36 -0
- package/dist/useMergeTag-DXyum3kG.js +58 -0
- package/dist/{usePopoverPosition-CprM5p-c.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
- package/dist/{useScrollToBlock-BTFw0b9O.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
- package/dist/{x-D_-42Ukq.js → x-3BHV3Q6K.js} +1 -1
- package/package.json +16 -16
- package/dist/ColorPicker-BqlZ_TqG.js +0 -501
- package/dist/FieldRow-C8nOknr_.js +0 -128
- package/dist/MergeTagInput-BEjzj4Iu.js +0 -457
- package/dist/MergeTagSuggestion-DKoLEeoj.js +0 -1329
- package/dist/cdn/chunks/AiChatSidebar-dyqqHAcI.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js +0 -502
- package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js.map +0 -1
- package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
- package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-l7paaAml.js +0 -419
- package/dist/cdn/chunks/MergeTagInput-l7paaAml.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js +0 -215
- package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js.map +0 -1
- package/dist/cdn/chunks/TemplateScoringPanel-DBjUNULq.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-BTNlSW6f.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CrnuIq62.js.map +0 -1
- package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
- package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
- package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
- package/dist/cdn/chunks/en-C9U7N77n.js +0 -2
- package/dist/cdn/chunks/extensions-B8_jnIkD.js.map +0 -1
- package/dist/cdn/chunks/htmlparser-DTML8Gvz.js +0 -1007
- package/dist/cdn/chunks/htmlparser-DTML8Gvz.js.map +0 -1
- package/dist/cdn/chunks/keys-DBFhDFng.js +0 -12
- package/dist/cdn/chunks/keys-DBFhDFng.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js +0 -3689
- package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-B0zW2nT4.js +0 -10
- package/dist/cdn/chunks/useMergeTag-BYAifvh8.js +0 -46
- package/dist/cdn/chunks/useMergeTag-BYAifvh8.js.map +0 -1
- package/dist/en-DcmpWV53.js +0 -2
- package/dist/extensions-CHOBZRab.js +0 -445
- package/dist/keys-DQA2i1k1.js +0 -10
- package/dist/useEditorCore-DhlKOYwe.js +0 -5273
- package/dist/useMergeTag-DlvOBW_B.js +0 -44
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
import { A as e, At as t, B as n, E as r, J as i, K as a, M as o, S as s, W as c, Z as l, at as u, b as d, c as f, d as p, g as m, h, i as g, jt as _, kt as v, l as y, r as b, s as x, u as S, v as C } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
|
|
2
|
+
import { c as w, n as T, s as E, t as ee } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
|
|
3
|
+
import { F as D, M as O, O as k, j as A } from "./dist-tGkjkX-v.js";
|
|
4
|
+
import { t as te } from "./dist-BDuPwOyn.js";
|
|
5
|
+
import { K as ne, Y as re, d as ie, q as j } from "./keys-BdoSgsz9.js";
|
|
6
|
+
import { t as M } from "./useI18n-Ds_-druD.js";
|
|
7
|
+
import { a as ae, i as oe, n as se, r as ce, t as le } from "./usePopoverPosition-Du-Ah8E9.js";
|
|
8
|
+
import { t as N } from "./createLucideIcon-BxY5yz5u.js";
|
|
9
|
+
import { t as ue } from "./pencil-DFVFA7Dj.js";
|
|
10
|
+
import { t as de } from "./x-3BHV3Q6K.js";
|
|
11
|
+
import { t as P } from "./useMergeTag-DXyum3kG.js";
|
|
12
|
+
import { t as F } from "./useLogicTag-DoHfc08B.js";
|
|
13
|
+
import { u as fe } from "./styleConstants-C_YAPdQS.js";
|
|
14
|
+
var I = N({
|
|
15
|
+
name: "braces",
|
|
16
|
+
size: 24,
|
|
17
|
+
node: [["path", {
|
|
18
|
+
d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",
|
|
19
|
+
key: "ezmyqa"
|
|
20
|
+
}], ["path", {
|
|
21
|
+
d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",
|
|
22
|
+
key: "e1hn23"
|
|
23
|
+
}]],
|
|
24
|
+
aliases: ["curly-braces"]
|
|
25
|
+
}), L = N({
|
|
26
|
+
name: "scan-line",
|
|
27
|
+
size: 24,
|
|
28
|
+
node: [
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M3 7V5a2 2 0 0 1 2-2h2",
|
|
31
|
+
key: "aa7l1z"
|
|
32
|
+
}],
|
|
33
|
+
["path", {
|
|
34
|
+
d: "M17 3h2a2 2 0 0 1 2 2v2",
|
|
35
|
+
key: "4qcy5o"
|
|
36
|
+
}],
|
|
37
|
+
["path", {
|
|
38
|
+
d: "M21 17v2a2 2 0 0 1-2 2h-2",
|
|
39
|
+
key: "6vwrx8"
|
|
40
|
+
}],
|
|
41
|
+
["path", {
|
|
42
|
+
d: "M7 21H5a2 2 0 0 1-2-2v-2",
|
|
43
|
+
key: "ioqczr"
|
|
44
|
+
}],
|
|
45
|
+
["path", {
|
|
46
|
+
d: "M7 12h10",
|
|
47
|
+
key: "b7w52i"
|
|
48
|
+
}]
|
|
49
|
+
]
|
|
50
|
+
}), R = (e, t = 0, n = 1) => e > n ? n : e < t ? t : e, z = (e, t = 0, n = 10 ** t) => Math.round(n * e) / n, B = (e) => W(V(e)), V = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
51
|
+
r: parseInt(e[0] + e[0], 16),
|
|
52
|
+
g: parseInt(e[1] + e[1], 16),
|
|
53
|
+
b: parseInt(e[2] + e[2], 16),
|
|
54
|
+
a: e.length === 4 ? z(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
55
|
+
} : {
|
|
56
|
+
r: parseInt(e.substring(0, 2), 16),
|
|
57
|
+
g: parseInt(e.substring(2, 4), 16),
|
|
58
|
+
b: parseInt(e.substring(4, 6), 16),
|
|
59
|
+
a: e.length === 8 ? z(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
60
|
+
}), pe = (e) => ge(he(e)), me = ({ h: e, s: t, v: n, a: r }) => {
|
|
61
|
+
let i = (200 - t) * n / 100;
|
|
62
|
+
return {
|
|
63
|
+
h: z(e),
|
|
64
|
+
s: z(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
65
|
+
l: z(i / 2),
|
|
66
|
+
a: z(r, 2)
|
|
67
|
+
};
|
|
68
|
+
}, H = (e) => {
|
|
69
|
+
let { h: t, s: n, l: r } = me(e);
|
|
70
|
+
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
71
|
+
}, he = ({ h: e, s: t, v: n, a: r }) => {
|
|
72
|
+
e = e / 360 * 6, t /= 100, n /= 100;
|
|
73
|
+
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;
|
|
74
|
+
return {
|
|
75
|
+
r: z([
|
|
76
|
+
n,
|
|
77
|
+
o,
|
|
78
|
+
a,
|
|
79
|
+
a,
|
|
80
|
+
s,
|
|
81
|
+
n
|
|
82
|
+
][c] * 255),
|
|
83
|
+
g: z([
|
|
84
|
+
s,
|
|
85
|
+
n,
|
|
86
|
+
n,
|
|
87
|
+
o,
|
|
88
|
+
a,
|
|
89
|
+
a
|
|
90
|
+
][c] * 255),
|
|
91
|
+
b: z([
|
|
92
|
+
a,
|
|
93
|
+
a,
|
|
94
|
+
s,
|
|
95
|
+
n,
|
|
96
|
+
n,
|
|
97
|
+
o
|
|
98
|
+
][c] * 255),
|
|
99
|
+
a: z(r, 2)
|
|
100
|
+
};
|
|
101
|
+
}, U = (e) => {
|
|
102
|
+
let t = e.toString(16);
|
|
103
|
+
return t.length < 2 ? "0" + t : t;
|
|
104
|
+
}, ge = ({ r: e, g: t, b: n, a: r }) => {
|
|
105
|
+
let i = r < 1 ? U(z(r * 255)) : "";
|
|
106
|
+
return "#" + U(e) + U(t) + U(n) + i;
|
|
107
|
+
}, W = ({ r: e, g: t, b: n, a: r }) => {
|
|
108
|
+
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;
|
|
109
|
+
return {
|
|
110
|
+
h: z(60 * (o < 0 ? o + 6 : o)),
|
|
111
|
+
s: z(i ? a / i * 100 : 0),
|
|
112
|
+
v: z(i / 255 * 100),
|
|
113
|
+
a: r
|
|
114
|
+
};
|
|
115
|
+
}, G = (e, t) => {
|
|
116
|
+
if (e === t) return !0;
|
|
117
|
+
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
118
|
+
return !0;
|
|
119
|
+
}, K = (e, t) => e.toLowerCase() === t.toLowerCase() || G(V(e), V(t)), q = {}, J = (e) => {
|
|
120
|
+
let t = q[e];
|
|
121
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, q[e] = t), t;
|
|
122
|
+
}, Y = (e, t, n) => {
|
|
123
|
+
e.dispatchEvent(new CustomEvent(t, {
|
|
124
|
+
bubbles: !0,
|
|
125
|
+
detail: n
|
|
126
|
+
}));
|
|
127
|
+
}, X = !1, Z = (e) => "touches" in e, _e = (e) => X && !Z(e) ? !1 : (X ||= Z(e), !0), ve = (e, t) => {
|
|
128
|
+
let n = Z(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
129
|
+
Y(e.el, "move", e.getMove({
|
|
130
|
+
x: R((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
131
|
+
y: R((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
132
|
+
}));
|
|
133
|
+
}, ye = (e, t) => {
|
|
134
|
+
let n = t.keyCode;
|
|
135
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), Y(e.el, "move", e.getMove({
|
|
136
|
+
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
137
|
+
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
138
|
+
}, !0)));
|
|
139
|
+
}, be = class {
|
|
140
|
+
constructor(e, t, n, r) {
|
|
141
|
+
let i = J(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
142
|
+
e.appendChild(i.content.cloneNode(!0));
|
|
143
|
+
let a = e.querySelector(`[part=${t}]`);
|
|
144
|
+
a.addEventListener("mousedown", this), a.addEventListener("touchstart", this), a.addEventListener("keydown", this), this.el = a, this.xy = r, this.nodes = [a.firstChild, a];
|
|
145
|
+
}
|
|
146
|
+
set dragging(e) {
|
|
147
|
+
let t = e ? document.addEventListener : document.removeEventListener;
|
|
148
|
+
t(X ? "touchmove" : "mousemove", this), t(X ? "touchend" : "mouseup", this);
|
|
149
|
+
}
|
|
150
|
+
handleEvent(e) {
|
|
151
|
+
switch (e.type) {
|
|
152
|
+
case "mousedown":
|
|
153
|
+
case "touchstart":
|
|
154
|
+
if (e.preventDefault(), !_e(e) || !X && e.button != 0) return;
|
|
155
|
+
this.el.focus(), ve(this, e), this.dragging = !0;
|
|
156
|
+
break;
|
|
157
|
+
case "mousemove":
|
|
158
|
+
case "touchmove":
|
|
159
|
+
e.preventDefault(), ve(this, e);
|
|
160
|
+
break;
|
|
161
|
+
case "mouseup":
|
|
162
|
+
case "touchend":
|
|
163
|
+
this.dragging = !1;
|
|
164
|
+
break;
|
|
165
|
+
case "keydown": ye(this, e);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
style(e) {
|
|
169
|
+
e.forEach((e, t) => {
|
|
170
|
+
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}, xe = class extends be {
|
|
174
|
+
constructor(e) {
|
|
175
|
+
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
176
|
+
}
|
|
177
|
+
update({ h: e }) {
|
|
178
|
+
this.h = e, this.style([{
|
|
179
|
+
left: `${e / 360 * 100}%`,
|
|
180
|
+
color: H({
|
|
181
|
+
h: e,
|
|
182
|
+
s: 100,
|
|
183
|
+
v: 100,
|
|
184
|
+
a: 1
|
|
185
|
+
})
|
|
186
|
+
}]), this.el.setAttribute("aria-valuenow", `${z(e)}`);
|
|
187
|
+
}
|
|
188
|
+
getMove(e, t) {
|
|
189
|
+
return { h: t ? R(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
190
|
+
}
|
|
191
|
+
}, Se = class extends be {
|
|
192
|
+
constructor(e) {
|
|
193
|
+
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
194
|
+
}
|
|
195
|
+
update(e) {
|
|
196
|
+
this.hsva = e, this.style([{
|
|
197
|
+
top: `${100 - e.v}%`,
|
|
198
|
+
left: `${e.s}%`,
|
|
199
|
+
color: H(e)
|
|
200
|
+
}, { "background-color": H({
|
|
201
|
+
h: e.h,
|
|
202
|
+
s: 100,
|
|
203
|
+
v: 100,
|
|
204
|
+
a: 1
|
|
205
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${z(e.s)}%, Brightness ${z(e.v)}%`);
|
|
206
|
+
}
|
|
207
|
+
getMove(e, t) {
|
|
208
|
+
return {
|
|
209
|
+
s: t ? R(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
210
|
+
v: t ? R(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}, Ce = ":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)}", we = "[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}", Te = "[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}", Q = Symbol("same"), Ee = Symbol("color"), De = Symbol("hsva"), $ = Symbol("update"), Oe = Symbol("parts"), ke = Symbol("css"), Ae = Symbol("sliders"), je = class extends HTMLElement {
|
|
214
|
+
static get observedAttributes() {
|
|
215
|
+
return ["color"];
|
|
216
|
+
}
|
|
217
|
+
get [ke]() {
|
|
218
|
+
return [
|
|
219
|
+
Ce,
|
|
220
|
+
we,
|
|
221
|
+
Te
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
get [Ae]() {
|
|
225
|
+
return [Se, xe];
|
|
226
|
+
}
|
|
227
|
+
get color() {
|
|
228
|
+
return this[Ee];
|
|
229
|
+
}
|
|
230
|
+
set color(e) {
|
|
231
|
+
if (!this[Q](e)) {
|
|
232
|
+
let t = this.colorModel.toHsva(e);
|
|
233
|
+
this[$](t), this[Ee] = e;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
constructor() {
|
|
237
|
+
super();
|
|
238
|
+
let e = J(`<style>${this[ke].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
239
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[Oe] = this[Ae].map((e) => new e(t));
|
|
240
|
+
}
|
|
241
|
+
connectedCallback() {
|
|
242
|
+
if (this.hasOwnProperty("color")) {
|
|
243
|
+
let e = this.color;
|
|
244
|
+
delete this.color, this.color = e;
|
|
245
|
+
} else this.color ||= this.colorModel.defaultColor;
|
|
246
|
+
}
|
|
247
|
+
attributeChangedCallback(e, t, n) {
|
|
248
|
+
let r = this.colorModel.fromAttr(n);
|
|
249
|
+
this[Q](r) || (this.color = r);
|
|
250
|
+
}
|
|
251
|
+
handleEvent(e) {
|
|
252
|
+
let t = this[De], n = {
|
|
253
|
+
...t,
|
|
254
|
+
...e.detail
|
|
255
|
+
};
|
|
256
|
+
this[$](n);
|
|
257
|
+
let r;
|
|
258
|
+
!G(n, t) && !this[Q](r = this.colorModel.fromHsva(n)) && (this[Ee] = r, Y(this, "color-changed", { value: r }));
|
|
259
|
+
}
|
|
260
|
+
[Q](e) {
|
|
261
|
+
return this.color && this.colorModel.equal(e, this.color);
|
|
262
|
+
}
|
|
263
|
+
[$](e) {
|
|
264
|
+
this[De] = e, this[Oe].forEach((t) => t.update(e));
|
|
265
|
+
}
|
|
266
|
+
}, Me = {
|
|
267
|
+
defaultColor: "#000",
|
|
268
|
+
toHsva: B,
|
|
269
|
+
fromHsva: ({ h: e, s: t, v: n }) => pe({
|
|
270
|
+
h: e,
|
|
271
|
+
s: t,
|
|
272
|
+
v: n,
|
|
273
|
+
a: 1
|
|
274
|
+
}),
|
|
275
|
+
equal: K,
|
|
276
|
+
fromAttr: (e) => e
|
|
277
|
+
}, Ne = class extends je {
|
|
278
|
+
get colorModel() {
|
|
279
|
+
return Me;
|
|
280
|
+
}
|
|
281
|
+
}, Pe = class extends Ne {};
|
|
282
|
+
customElements.define("hex-color-picker", Pe);
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
285
|
+
var Fe = [
|
|
286
|
+
"disabled",
|
|
287
|
+
"aria-label",
|
|
288
|
+
"title",
|
|
289
|
+
"aria-expanded"
|
|
290
|
+
], Ie = {
|
|
291
|
+
key: 0,
|
|
292
|
+
class: "tpl:relative tpl:flex-1"
|
|
293
|
+
}, Le = [
|
|
294
|
+
"value",
|
|
295
|
+
"placeholder",
|
|
296
|
+
"disabled",
|
|
297
|
+
"aria-label"
|
|
298
|
+
], Re = ["aria-label", "title"], ze = ["data-tpl-theme"], Be = ["aria-label"], Ve = [
|
|
299
|
+
"aria-label",
|
|
300
|
+
"title",
|
|
301
|
+
"aria-checked",
|
|
302
|
+
"tabindex"
|
|
303
|
+
], He = [
|
|
304
|
+
"aria-label",
|
|
305
|
+
"title",
|
|
306
|
+
"aria-checked",
|
|
307
|
+
"tabindex",
|
|
308
|
+
"onClick"
|
|
309
|
+
], Ue = ["color", "aria-label"], We = {
|
|
310
|
+
key: 2,
|
|
311
|
+
class: "tpl:relative tpl:mt-2"
|
|
312
|
+
}, Ge = [
|
|
313
|
+
"value",
|
|
314
|
+
"placeholder",
|
|
315
|
+
"disabled",
|
|
316
|
+
"aria-label"
|
|
317
|
+
], Ke = ["aria-label", "title"], qe = /* @__PURE__ */ C({
|
|
318
|
+
__name: "ColorPicker",
|
|
319
|
+
props: {
|
|
320
|
+
modelValue: {},
|
|
321
|
+
placeholder: { default: "" },
|
|
322
|
+
seedColor: { default: "#ffffff" },
|
|
323
|
+
swatchOnly: {
|
|
324
|
+
type: Boolean,
|
|
325
|
+
default: !1
|
|
326
|
+
},
|
|
327
|
+
disabled: {
|
|
328
|
+
type: Boolean,
|
|
329
|
+
default: !1
|
|
330
|
+
},
|
|
331
|
+
size: { default: "md" },
|
|
332
|
+
ariaLabel: { default: "" },
|
|
333
|
+
presets: { default: void 0 },
|
|
334
|
+
allowCustom: {
|
|
335
|
+
type: Boolean,
|
|
336
|
+
default: void 0
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
emits: ["update:modelValue"],
|
|
340
|
+
setup(r, { emit: i }) {
|
|
341
|
+
let a = r, c = i, { t: d } = M(), h = l(!1), _ = l(), C = l(), T = l(!1);
|
|
342
|
+
te(_, () => {
|
|
343
|
+
h.value = !1;
|
|
344
|
+
}, { ignore: [C] });
|
|
345
|
+
let D = x(() => !a.modelValue), O = x(() => oe(a.modelValue)), k = x(() => oe(a.modelValue || a.seedColor)), A = x(() => !a.disabled && !D.value), j = s(ie, ae), N = x(() => [...new Set(a.presets ?? j.presets)]), ue = x(() => a.allowCustom ?? j.allowCustom), P = x(() => N.value.length > 0), F = x(() => ue.value || !P.value), I = x(() => ce(a.modelValue));
|
|
346
|
+
function L(e) {
|
|
347
|
+
return I.value !== "" && ce(e) === I.value;
|
|
348
|
+
}
|
|
349
|
+
function R(e) {
|
|
350
|
+
c("update:modelValue", e);
|
|
351
|
+
}
|
|
352
|
+
let z = x(() => P.value && !F.value);
|
|
353
|
+
function B(e) {
|
|
354
|
+
return z.value ? e + 1 : e;
|
|
355
|
+
}
|
|
356
|
+
let V = x(() => {
|
|
357
|
+
if (z.value && D.value) return 0;
|
|
358
|
+
let e = N.value.findIndex((e) => L(e));
|
|
359
|
+
return e === -1 ? 0 : B(e);
|
|
360
|
+
});
|
|
361
|
+
function pe() {
|
|
362
|
+
return V.value === 0 ? 0 : -1;
|
|
363
|
+
}
|
|
364
|
+
function me(e) {
|
|
365
|
+
return B(e) === V.value ? 0 : -1;
|
|
366
|
+
}
|
|
367
|
+
function H(e) {
|
|
368
|
+
if (![
|
|
369
|
+
"ArrowRight",
|
|
370
|
+
"ArrowDown",
|
|
371
|
+
"ArrowLeft",
|
|
372
|
+
"ArrowUp"
|
|
373
|
+
].includes(e.key)) return;
|
|
374
|
+
let t = e.currentTarget, n = Array.from(t.querySelectorAll("[role=\"radio\"]")), r = e.target.closest("[role=\"radio\"]"), i = r ? n.indexOf(r) : -1;
|
|
375
|
+
i !== -1 && (n[(i + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + n.length) % n.length]?.focus(), e.preventDefault());
|
|
376
|
+
}
|
|
377
|
+
function he(e) {
|
|
378
|
+
T.value = !0, c("update:modelValue", e.detail.value);
|
|
379
|
+
}
|
|
380
|
+
function U() {
|
|
381
|
+
T.value = !1;
|
|
382
|
+
}
|
|
383
|
+
function ge() {
|
|
384
|
+
!T.value && D.value && c("update:modelValue", k.value);
|
|
385
|
+
}
|
|
386
|
+
function W(e) {
|
|
387
|
+
c("update:modelValue", e.target.value);
|
|
388
|
+
}
|
|
389
|
+
function G() {
|
|
390
|
+
c("update:modelValue", "");
|
|
391
|
+
}
|
|
392
|
+
let K = se(), { toLocal: q } = le(), J = s(ne, null), Y = s(re, null), X = l({
|
|
393
|
+
top: 0,
|
|
394
|
+
left: 0
|
|
395
|
+
});
|
|
396
|
+
function Z() {
|
|
397
|
+
if (!a.disabled) {
|
|
398
|
+
if (!h.value) {
|
|
399
|
+
let e = C.value?.getBoundingClientRect();
|
|
400
|
+
if (e) {
|
|
401
|
+
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
402
|
+
X.value = q({
|
|
403
|
+
top: t,
|
|
404
|
+
left: e.left
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
h.value = !h.value;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return (i, a) => (e(), p("div", { class: v(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", r.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
412
|
+
f("button", {
|
|
413
|
+
ref_key: "swatchRef",
|
|
414
|
+
ref: C,
|
|
415
|
+
type: "button",
|
|
416
|
+
disabled: r.disabled,
|
|
417
|
+
"aria-label": r.ariaLabel || u(d).colorPicker.pickColor,
|
|
418
|
+
title: r.ariaLabel || void 0,
|
|
419
|
+
"aria-expanded": h.value,
|
|
420
|
+
class: v([
|
|
421
|
+
"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)]",
|
|
422
|
+
r.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
423
|
+
h.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !r.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
|
|
424
|
+
r.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
425
|
+
]),
|
|
426
|
+
onClick: Z
|
|
427
|
+
}, [f("span", {
|
|
428
|
+
class: v(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": D.value }]),
|
|
429
|
+
style: t(D.value ? void 0 : { backgroundColor: O.value })
|
|
430
|
+
}, null, 6)], 10, Fe),
|
|
431
|
+
!r.swatchOnly && F.value ? (e(), p("div", Ie, [f("input", {
|
|
432
|
+
type: "text",
|
|
433
|
+
class: v([u(fe), "tpl:w-full"]),
|
|
434
|
+
style: t(A.value ? { paddingRight: "2.25rem" } : void 0),
|
|
435
|
+
value: O.value,
|
|
436
|
+
placeholder: r.placeholder || u(d).colorPicker.notSet,
|
|
437
|
+
disabled: r.disabled,
|
|
438
|
+
"aria-label": u(d).colorPicker.hexValue,
|
|
439
|
+
onInput: W
|
|
440
|
+
}, null, 46, Le), A.value ? (e(), p("button", {
|
|
441
|
+
key: 0,
|
|
442
|
+
type: "button",
|
|
443
|
+
"aria-label": u(d).colorPicker.clear,
|
|
444
|
+
title: u(d).colorPicker.clear,
|
|
445
|
+
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)]",
|
|
446
|
+
onClick: G
|
|
447
|
+
}, [m(u(de), {
|
|
448
|
+
size: 14,
|
|
449
|
+
"stroke-width": 1.5
|
|
450
|
+
})], 8, Re)) : S("", !0)])) : S("", !0),
|
|
451
|
+
(e(), y(g, {
|
|
452
|
+
to: u(K),
|
|
453
|
+
disabled: !u(K)
|
|
454
|
+
}, [m(ee, {
|
|
455
|
+
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
456
|
+
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
457
|
+
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
458
|
+
"leave-active-class": "tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
459
|
+
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
460
|
+
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
461
|
+
}, {
|
|
462
|
+
default: n(() => [h.value ? (e(), p("div", {
|
|
463
|
+
key: 0,
|
|
464
|
+
ref_key: "popoverRef",
|
|
465
|
+
ref: _,
|
|
466
|
+
"data-tpl-theme": u(Y),
|
|
467
|
+
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)]",
|
|
468
|
+
style: t({
|
|
469
|
+
top: `${X.value.top}px`,
|
|
470
|
+
left: `${X.value.left}px`,
|
|
471
|
+
...u(J)
|
|
472
|
+
})
|
|
473
|
+
}, [
|
|
474
|
+
P.value ? (e(), p("div", {
|
|
475
|
+
key: 0,
|
|
476
|
+
role: "radiogroup",
|
|
477
|
+
"aria-label": u(d).colorPicker.presetColors,
|
|
478
|
+
class: v(["tpl:flex tpl:flex-wrap tpl:gap-1.5", F.value && "tpl:mb-2"]),
|
|
479
|
+
onKeydown: H
|
|
480
|
+
}, [z.value ? (e(), p("button", {
|
|
481
|
+
key: 0,
|
|
482
|
+
type: "button",
|
|
483
|
+
role: "radio",
|
|
484
|
+
"aria-label": u(d).colorPicker.clear,
|
|
485
|
+
title: u(d).colorPicker.clear,
|
|
486
|
+
"aria-checked": D.value,
|
|
487
|
+
tabindex: pe(),
|
|
488
|
+
class: v(["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)]", D.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)]"]),
|
|
489
|
+
onClick: G
|
|
490
|
+
}, null, 10, Ve)) : S("", !0), (e(!0), p(b, null, o(N.value, (n, r) => (e(), p("button", {
|
|
491
|
+
key: n,
|
|
492
|
+
type: "button",
|
|
493
|
+
role: "radio",
|
|
494
|
+
"aria-label": n,
|
|
495
|
+
title: n,
|
|
496
|
+
"aria-checked": L(n),
|
|
497
|
+
tabindex: me(r),
|
|
498
|
+
style: t({ backgroundColor: n }),
|
|
499
|
+
class: v(["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)]", L(n) ? "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)]"]),
|
|
500
|
+
onClick: (e) => R(n)
|
|
501
|
+
}, null, 14, He))), 128))], 42, Be)) : S("", !0),
|
|
502
|
+
F.value ? (e(), p("hex-color-picker", {
|
|
503
|
+
key: 1,
|
|
504
|
+
color: k.value,
|
|
505
|
+
"aria-label": u(d).colorPicker.pickColor,
|
|
506
|
+
onColorChanged: he,
|
|
507
|
+
onPointerdown: U,
|
|
508
|
+
onPointerup: ge,
|
|
509
|
+
onKeydown: a[0] ||= E((e) => h.value = !1, ["escape"])
|
|
510
|
+
}, null, 40, Ue)) : S("", !0),
|
|
511
|
+
r.swatchOnly && F.value ? (e(), p("div", We, [f("input", {
|
|
512
|
+
type: "text",
|
|
513
|
+
class: v([u(fe), "tpl:w-full"]),
|
|
514
|
+
style: t(A.value ? { paddingRight: "2.25rem" } : void 0),
|
|
515
|
+
value: O.value,
|
|
516
|
+
placeholder: r.placeholder || u(d).colorPicker.notSet,
|
|
517
|
+
disabled: r.disabled,
|
|
518
|
+
"aria-label": u(d).colorPicker.hexValue,
|
|
519
|
+
onChange: W,
|
|
520
|
+
onKeydown: a[1] ||= E(w((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
521
|
+
}, null, 46, Ge), A.value ? (e(), p("button", {
|
|
522
|
+
key: 0,
|
|
523
|
+
type: "button",
|
|
524
|
+
"aria-label": u(d).colorPicker.clear,
|
|
525
|
+
title: u(d).colorPicker.clear,
|
|
526
|
+
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)]",
|
|
527
|
+
onClick: G
|
|
528
|
+
}, [m(u(de), {
|
|
529
|
+
size: 14,
|
|
530
|
+
"stroke-width": 1.5
|
|
531
|
+
})], 8, Ke)) : S("", !0)])) : S("", !0)
|
|
532
|
+
], 12, ze)) : S("", !0)]),
|
|
533
|
+
_: 1
|
|
534
|
+
})], 8, ["to", "disabled"]))
|
|
535
|
+
], 2));
|
|
536
|
+
}
|
|
537
|
+
}), Je = ["id"], Ye = {
|
|
538
|
+
key: 0,
|
|
539
|
+
class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
540
|
+
"data-testid": "merge-tag-suggestion-empty"
|
|
541
|
+
}, Xe = [
|
|
542
|
+
"id",
|
|
543
|
+
"aria-selected",
|
|
544
|
+
"data-selected",
|
|
545
|
+
"data-merge-tag-value",
|
|
546
|
+
"onMousedown",
|
|
547
|
+
"onMousemove"
|
|
548
|
+
], Ze = { class: "tpl:font-medium" }, Qe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, $e = /* @__PURE__ */ C({
|
|
549
|
+
__name: "MergeTagSuggestionList",
|
|
550
|
+
props: {
|
|
551
|
+
items: {},
|
|
552
|
+
selectedIndex: {},
|
|
553
|
+
emptyText: {},
|
|
554
|
+
listId: {}
|
|
555
|
+
},
|
|
556
|
+
emits: ["select", "hover"],
|
|
557
|
+
setup(t) {
|
|
558
|
+
let n = t;
|
|
559
|
+
function r(e) {
|
|
560
|
+
return n.listId ? `${n.listId}-opt-${e}` : void 0;
|
|
561
|
+
}
|
|
562
|
+
return (n, i) => (e(), p("div", {
|
|
563
|
+
id: t.listId,
|
|
564
|
+
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)]",
|
|
565
|
+
role: "listbox",
|
|
566
|
+
"data-testid": "merge-tag-suggestion-list"
|
|
567
|
+
}, [t.items.length === 0 ? (e(), p("div", Ye, _(t.emptyText), 1)) : S("", !0), (e(!0), p(b, null, o(t.items, (i, a) => (e(), p("button", {
|
|
568
|
+
key: i.value,
|
|
569
|
+
id: r(a),
|
|
570
|
+
type: "button",
|
|
571
|
+
role: "option",
|
|
572
|
+
"aria-selected": a === t.selectedIndex,
|
|
573
|
+
"data-selected": a === t.selectedIndex ? "true" : "false",
|
|
574
|
+
"data-merge-tag-value": i.value,
|
|
575
|
+
class: v(["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 === t.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
576
|
+
onMousedown: w((e) => n.$emit("select", i), ["prevent", "stop"]),
|
|
577
|
+
onMousemove: (e) => a !== t.selectedIndex && n.$emit("hover", a)
|
|
578
|
+
}, [f("span", Ze, _(i.label), 1), f("span", Qe, _(i.value), 1)], 42, Xe))), 128))], 8, Je));
|
|
579
|
+
}
|
|
580
|
+
}), et = 10, tt = 0;
|
|
581
|
+
function nt(e, t) {
|
|
582
|
+
let n = t.trim().toLowerCase();
|
|
583
|
+
return n === "" ? e.slice(0, et) : e.filter((e) => {
|
|
584
|
+
let t = e.label.toLowerCase(), r = e.value.toLowerCase();
|
|
585
|
+
return t.includes(n) || r.includes(n);
|
|
586
|
+
}).slice(0, et);
|
|
587
|
+
}
|
|
588
|
+
function rt(e, t, n, r) {
|
|
589
|
+
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;
|
|
590
|
+
}
|
|
591
|
+
function it(e, t) {
|
|
592
|
+
let n = null, r = null, i = null, a = l([]), o = l(0), s = null, c = `tpl-merge-tag-suggestion-${++tt}`, u = null, f = [], p = null;
|
|
593
|
+
function m() {
|
|
594
|
+
y(u?.() ?? null);
|
|
595
|
+
}
|
|
596
|
+
function h() {
|
|
597
|
+
m(), p !== null && cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
598
|
+
p = null, m();
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
function g(e) {
|
|
602
|
+
let t = [], n = e?.parentElement ?? null;
|
|
603
|
+
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
604
|
+
let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
|
|
605
|
+
/(auto|scroll|overlay)/.test(r) && t.push(n), n = n.parentElement;
|
|
606
|
+
}
|
|
607
|
+
return t;
|
|
608
|
+
}
|
|
609
|
+
function _(e) {
|
|
610
|
+
f = [window, ...g(e)];
|
|
611
|
+
for (let e of f) e.addEventListener("scroll", m, {
|
|
612
|
+
passive: !0,
|
|
613
|
+
capture: !0
|
|
614
|
+
});
|
|
615
|
+
window.addEventListener("resize", m, { passive: !0 });
|
|
616
|
+
}
|
|
617
|
+
function v() {
|
|
618
|
+
for (let e of f) e.removeEventListener("scroll", m, { capture: !0 });
|
|
619
|
+
window.removeEventListener("resize", m), f = [];
|
|
620
|
+
}
|
|
621
|
+
function y(e) {
|
|
622
|
+
if (!r || !e || e.bottom < 0 || e.top > window.innerHeight) return;
|
|
623
|
+
r.style.position = "absolute", r.style.zIndex = "9999";
|
|
624
|
+
let t = r.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0, i = t?.left ?? 0;
|
|
625
|
+
r.style.left = `${e.left - i}px`, r.style.top = `${e.bottom - n}px`;
|
|
626
|
+
let a = r.offsetHeight;
|
|
627
|
+
if (a !== 0 && window.innerHeight - e.bottom < a) {
|
|
628
|
+
let t = Math.max(0, e.top - a);
|
|
629
|
+
r.style.top = `${t - n}px`;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
function b(e, t) {
|
|
633
|
+
let n = t?.closest("[data-tpl-theme]");
|
|
634
|
+
if (!n) return;
|
|
635
|
+
let r = n.getAttribute("data-tpl-theme");
|
|
636
|
+
r && e.setAttribute("data-tpl-theme", r);
|
|
637
|
+
let i = window.getComputedStyle(n);
|
|
638
|
+
for (let t = 0; t < i.length; t++) {
|
|
639
|
+
let n = i[t];
|
|
640
|
+
n.startsWith("--tpl-") && e.style.setProperty(n, i.getPropertyValue(n));
|
|
641
|
+
}
|
|
642
|
+
e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
|
|
643
|
+
}
|
|
644
|
+
function x(e) {
|
|
645
|
+
i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls", c)) : (i.removeAttribute("aria-expanded"), i.removeAttribute("aria-controls"), i.removeAttribute("aria-activedescendant"), i.removeAttribute("aria-haspopup"), i.removeAttribute("role")));
|
|
646
|
+
}
|
|
647
|
+
function S() {
|
|
648
|
+
if (i) {
|
|
649
|
+
if (a.value.length === 0) {
|
|
650
|
+
i.removeAttribute("aria-activedescendant");
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
i.setAttribute("aria-activedescendant", `${c}-opt-${o.value}`);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
function C(e) {
|
|
657
|
+
s?.(e);
|
|
658
|
+
}
|
|
659
|
+
return {
|
|
660
|
+
open: ({ items: l, getRect: f, anchorEl: p, onCommand: m }) => {
|
|
661
|
+
a.value = l, o.value = 0, s = m, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), i = p, b(r, p), (t?.value ?? document.body).appendChild(r), n = T({ render() {
|
|
662
|
+
return d($e, {
|
|
663
|
+
items: a.value,
|
|
664
|
+
selectedIndex: o.value,
|
|
665
|
+
emptyText: e,
|
|
666
|
+
listId: c,
|
|
667
|
+
onSelect: (e) => C(e),
|
|
668
|
+
onHover: (e) => {
|
|
669
|
+
o.value = e, S();
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
} }), n.mount(r), x(!0), S(), u = f, h(), _(p);
|
|
673
|
+
},
|
|
674
|
+
update: ({ items: e, getRect: t, onCommand: n }) => {
|
|
675
|
+
a.value = e, o.value >= e.length && (o.value = 0), s = n, S(), u = t, h();
|
|
676
|
+
},
|
|
677
|
+
handleKeyDown: (e) => {
|
|
678
|
+
let t = rt(e, a.value, o, C);
|
|
679
|
+
return t && S(), t;
|
|
680
|
+
},
|
|
681
|
+
close: () => {
|
|
682
|
+
r !== null && (p !== null && (cancelAnimationFrame(p), p = null), v(), x(!1), n?.unmount(), r.remove(), n = null, r = null, i = null, s = null, u = null);
|
|
683
|
+
},
|
|
684
|
+
isOpen: () => r !== null
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
//#endregion
|
|
688
|
+
//#region src/utils/mergeTagTrigger.ts
|
|
689
|
+
function at(e, t, n, r) {
|
|
690
|
+
if (!n) return null;
|
|
691
|
+
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
692
|
+
if (a === -1) return null;
|
|
693
|
+
let o = i.slice(a + n.length);
|
|
694
|
+
return /\s/.test(o) || r && o.includes(r) ? null : {
|
|
695
|
+
triggerStart: a,
|
|
696
|
+
caret: t,
|
|
697
|
+
query: o
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
//#endregion
|
|
701
|
+
//#region src/utils/textFieldCaret.ts
|
|
702
|
+
var ot = /* @__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(".");
|
|
703
|
+
function st(e, t, n) {
|
|
704
|
+
return {
|
|
705
|
+
left: e,
|
|
706
|
+
top: t,
|
|
707
|
+
bottom: n,
|
|
708
|
+
right: e,
|
|
709
|
+
width: 0,
|
|
710
|
+
height: n - t,
|
|
711
|
+
x: e,
|
|
712
|
+
y: t,
|
|
713
|
+
toJSON: () => ({})
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function ct(e, t) {
|
|
717
|
+
let n = e.ownerDocument, r = n.defaultView;
|
|
718
|
+
if (!r) return null;
|
|
719
|
+
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
720
|
+
o.setAttribute("aria-hidden", "true");
|
|
721
|
+
let s = o.style;
|
|
722
|
+
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";
|
|
723
|
+
let c = s, l = a;
|
|
724
|
+
for (let e of ot) c[e] = l[e];
|
|
725
|
+
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
726
|
+
let u = e.value, d = u.slice(0, t);
|
|
727
|
+
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
728
|
+
let f = n.createElement("span");
|
|
729
|
+
f.textContent = u.slice(t) || ".", o.appendChild(f), n.body.appendChild(o);
|
|
730
|
+
let p = f.offsetTop, m = f.offsetLeft;
|
|
731
|
+
n.body.removeChild(o);
|
|
732
|
+
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;
|
|
733
|
+
if (i) return st(y, h.top, h.bottom);
|
|
734
|
+
let b = h.top + p + g - e.scrollTop;
|
|
735
|
+
return st(y, b, b + v);
|
|
736
|
+
}
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region src/composables/useMergeTagAutocomplete.ts
|
|
739
|
+
var lt = /* @__PURE__ */ new Set([
|
|
740
|
+
"ArrowLeft",
|
|
741
|
+
"ArrowRight",
|
|
742
|
+
"Home",
|
|
743
|
+
"End"
|
|
744
|
+
]);
|
|
745
|
+
function ut(e) {
|
|
746
|
+
let { elementRef: t, modelValue: n, emit: o, mergeTags: l, syntax: u, enabled: d, onInsert: f } = e, p = O(u), m = A(u), h = x(() => d && p !== null && l.value.length > 0), g = s(j, null), _ = it((a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", se()), v = !1;
|
|
747
|
+
c() && i(() => {
|
|
748
|
+
v = !0, _.close();
|
|
749
|
+
});
|
|
750
|
+
function y(e) {
|
|
751
|
+
let t = e.value ?? "";
|
|
752
|
+
return at(t, e.selectionStart ?? t.length, p, m);
|
|
753
|
+
}
|
|
754
|
+
function b(e, i, a) {
|
|
755
|
+
let s = e.value ?? n(), c = s.slice(i.caret), l = m && c.startsWith(m) ? m.length : 0, u = s.slice(0, i.triggerStart), d = s.slice(i.caret + l), p = u + a.value + d, h = u.length + a.value.length;
|
|
756
|
+
f?.(), o(p), _.close(), r(() => {
|
|
757
|
+
if (v) return;
|
|
758
|
+
let e = t.value;
|
|
759
|
+
e?.focus(), e?.setSelectionRange(h, h);
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
function S() {
|
|
763
|
+
if (!h.value || v) return;
|
|
764
|
+
let e = t.value;
|
|
765
|
+
if (!e) {
|
|
766
|
+
_.close();
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
let n = y(e);
|
|
770
|
+
if (!n) {
|
|
771
|
+
_.close();
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
let r = nt(l.value, n.query), i = () => ct(e, n.triggerStart), a = (t) => b(e, n, t);
|
|
775
|
+
_.isOpen() ? _.update({
|
|
776
|
+
items: r,
|
|
777
|
+
getRect: i,
|
|
778
|
+
onCommand: a
|
|
779
|
+
}) : _.open({
|
|
780
|
+
items: r,
|
|
781
|
+
getRect: i,
|
|
782
|
+
anchorEl: e,
|
|
783
|
+
onCommand: a
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
function C(e) {
|
|
787
|
+
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : lt.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
|
|
788
|
+
}
|
|
789
|
+
return {
|
|
790
|
+
available: h,
|
|
791
|
+
refresh: S,
|
|
792
|
+
handleKeydown: C,
|
|
793
|
+
close: () => _.close(),
|
|
794
|
+
isOpen: () => _.isOpen()
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/composables/useMergeTagField.ts
|
|
799
|
+
function dt(e) {
|
|
800
|
+
let { modelValue: t, emit: n, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: u, isMergeTagValue: d, getMergeTagDisplayLabel: f, findMergeTag: p, requestMergeTag: m, syntax: h, autocomplete: g } = P(), { canInsertLogicTag: _, isRequesting: v, requestLogicTag: y } = F(), b = l(!1), S = !1, C = !1;
|
|
801
|
+
c() && i(() => {
|
|
802
|
+
C = !0;
|
|
803
|
+
});
|
|
804
|
+
let w = ut({
|
|
805
|
+
elementRef: a,
|
|
806
|
+
modelValue: t,
|
|
807
|
+
emit: n,
|
|
808
|
+
mergeTags: o,
|
|
809
|
+
syntax: h,
|
|
810
|
+
enabled: g,
|
|
811
|
+
onInsert: () => {
|
|
812
|
+
b.value = !0;
|
|
813
|
+
}
|
|
814
|
+
}), T = x(() => {
|
|
815
|
+
let e = t();
|
|
816
|
+
if (!e) return [];
|
|
817
|
+
let n = [], r = `(${h.value.source}|${h.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
818
|
+
for (; (o = i.exec(e)) !== null;) {
|
|
819
|
+
o.index > a && n.push({
|
|
820
|
+
type: "text",
|
|
821
|
+
value: e.slice(a, o.index)
|
|
822
|
+
});
|
|
823
|
+
let t = o[0];
|
|
824
|
+
d(t) ? n.push({
|
|
825
|
+
type: "mergeTag",
|
|
826
|
+
value: t,
|
|
827
|
+
label: f(t)
|
|
828
|
+
}) : D(t, h) ? n.push({
|
|
829
|
+
type: "logicMergeTag",
|
|
830
|
+
value: t,
|
|
831
|
+
keyword: k(t, h)
|
|
832
|
+
}) : n.push({
|
|
833
|
+
type: "text",
|
|
834
|
+
value: t
|
|
835
|
+
}), a = o.index + t.length;
|
|
836
|
+
}
|
|
837
|
+
return a < e.length && n.push({
|
|
838
|
+
type: "text",
|
|
839
|
+
value: e.slice(a)
|
|
840
|
+
}), n;
|
|
841
|
+
}), E = x(() => T.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
842
|
+
function ee() {
|
|
843
|
+
b.value = !0, r(() => {
|
|
844
|
+
a.value?.focus();
|
|
845
|
+
let e = t()?.length || 0;
|
|
846
|
+
a.value?.setSelectionRange(e, e);
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
function O() {
|
|
850
|
+
S || (b.value = !1);
|
|
851
|
+
}
|
|
852
|
+
function A(e) {
|
|
853
|
+
n(e.target.value), w.refresh();
|
|
854
|
+
}
|
|
855
|
+
function te(e) {
|
|
856
|
+
return w.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && O(), !1);
|
|
857
|
+
}
|
|
858
|
+
function ne() {
|
|
859
|
+
w.refresh();
|
|
860
|
+
}
|
|
861
|
+
function re() {
|
|
862
|
+
w.close(), O();
|
|
863
|
+
}
|
|
864
|
+
function ie() {
|
|
865
|
+
n("");
|
|
866
|
+
}
|
|
867
|
+
async function j() {
|
|
868
|
+
let e = b.value && a.value ? a.value.selectionStart ?? t().length : t().length;
|
|
869
|
+
S = !0;
|
|
870
|
+
let i;
|
|
871
|
+
try {
|
|
872
|
+
i = await m();
|
|
873
|
+
} finally {
|
|
874
|
+
S = !1;
|
|
875
|
+
}
|
|
876
|
+
if (!C && i) {
|
|
877
|
+
let o = t().slice(0, e), s = t().slice(e), c = o + i.value + s;
|
|
878
|
+
n(c), b.value = !0, r(() => {
|
|
879
|
+
if (C) return;
|
|
880
|
+
let t = e + i.value.length;
|
|
881
|
+
a.value?.focus(), a.value?.setSelectionRange(t, t);
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
async function M(e) {
|
|
886
|
+
let t = T.value, r = t[e];
|
|
887
|
+
if (r?.type !== "mergeTag") return;
|
|
888
|
+
S = !0;
|
|
889
|
+
let i;
|
|
890
|
+
try {
|
|
891
|
+
i = await m({
|
|
892
|
+
reason: "edit",
|
|
893
|
+
current: p(r.value)
|
|
894
|
+
});
|
|
895
|
+
} finally {
|
|
896
|
+
S = !1;
|
|
897
|
+
}
|
|
898
|
+
!C && i && n(t.map((t, n) => n === e ? i.value : t.value).join(""));
|
|
899
|
+
}
|
|
900
|
+
async function ae() {
|
|
901
|
+
let e = a.value, i = e?.selectionStart ?? t().length, o = e?.selectionEnd ?? i;
|
|
902
|
+
S = !0;
|
|
903
|
+
let s;
|
|
904
|
+
try {
|
|
905
|
+
s = await y();
|
|
906
|
+
} finally {
|
|
907
|
+
S = !1;
|
|
908
|
+
}
|
|
909
|
+
if (C || !s) return;
|
|
910
|
+
let c = t(), l, u;
|
|
911
|
+
"before" in s ? (l = c.slice(0, i) + s.before + c.slice(i, o) + s.after + c.slice(o), u = i + s.before.length + (o - i)) : (l = c.slice(0, i) + s.value + c.slice(i), u = i + s.value.length), n(l), b.value = !0, r(() => {
|
|
912
|
+
C || (a.value?.focus(), a.value?.setSelectionRange(u, u));
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
return {
|
|
916
|
+
segments: T,
|
|
917
|
+
hasMergeTags: E,
|
|
918
|
+
canRequestMergeTag: s,
|
|
919
|
+
isRequestingMergeTag: u,
|
|
920
|
+
canInsertLogicTag: _,
|
|
921
|
+
isRequestingLogicTag: v,
|
|
922
|
+
isEditing: b,
|
|
923
|
+
startEditing: ee,
|
|
924
|
+
stopEditing: O,
|
|
925
|
+
handleInput: A,
|
|
926
|
+
handleKeydown: te,
|
|
927
|
+
handleClick: ne,
|
|
928
|
+
handleBlur: re,
|
|
929
|
+
clearValue: ie,
|
|
930
|
+
insertMergeTag: j,
|
|
931
|
+
replaceMergeTagAt: M,
|
|
932
|
+
insertLogicTag: ae,
|
|
933
|
+
autocompleteAvailable: w.available
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
938
|
+
var ft = ["aria-label"], pt = [
|
|
939
|
+
"data-tooltip",
|
|
940
|
+
"aria-label",
|
|
941
|
+
"onClick"
|
|
942
|
+
], mt = ["data-tooltip"], ht = ["data-tooltip"], gt = {
|
|
943
|
+
key: 3,
|
|
944
|
+
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
945
|
+
}, _t = ["aria-label", "title"], vt = ["aria-label", "title"], yt = /* @__PURE__ */ C({
|
|
946
|
+
__name: "MergeTagSegments",
|
|
947
|
+
props: {
|
|
948
|
+
segments: {},
|
|
949
|
+
displayClass: {},
|
|
950
|
+
pulse: { type: Boolean }
|
|
951
|
+
},
|
|
952
|
+
emits: [
|
|
953
|
+
"edit",
|
|
954
|
+
"clear",
|
|
955
|
+
"repick"
|
|
956
|
+
],
|
|
957
|
+
setup(t, { emit: n }) {
|
|
958
|
+
let r = n, { t: i, format: a } = M(), { canRepickMergeTag: s, showRawValue: c } = P();
|
|
959
|
+
function l() {
|
|
960
|
+
r("edit");
|
|
961
|
+
}
|
|
962
|
+
return (n, d) => (e(), p("div", {
|
|
963
|
+
role: "group",
|
|
964
|
+
"aria-label": u(i).mergeTag.fieldGroup,
|
|
965
|
+
class: v([t.displayClass, { "tpl-pulse-fill": t.pulse }]),
|
|
966
|
+
onClick: l
|
|
967
|
+
}, [
|
|
968
|
+
(e(!0), p(b, null, o(t.segments, (t, n) => (e(), p(b, { key: `${t.type}-${n}-${t.value}` }, [t.type === "mergeTag" && u(s)(t.value) ? (e(), p("button", {
|
|
969
|
+
key: 0,
|
|
970
|
+
type: "button",
|
|
971
|
+
class: v(["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", u(c) ? "tpl-tooltip" : ""]),
|
|
972
|
+
"data-tooltip": u(c) ? t.value : void 0,
|
|
973
|
+
"aria-label": u(a)(u(i).mergeTag.changeTag, { label: t.label }),
|
|
974
|
+
"data-testid": "merge-tag-field-chip",
|
|
975
|
+
style: {
|
|
976
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
977
|
+
color: "var(--tpl-primary)"
|
|
978
|
+
},
|
|
979
|
+
onClick: w((e) => r("repick", n), ["stop"])
|
|
980
|
+
}, _(t.label), 11, pt)) : t.type === "mergeTag" ? (e(), p("span", {
|
|
981
|
+
key: 1,
|
|
982
|
+
class: v(["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", u(c) ? "tpl-tooltip" : ""]),
|
|
983
|
+
"data-tooltip": u(c) ? t.value : void 0,
|
|
984
|
+
style: {
|
|
985
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
986
|
+
color: "var(--tpl-primary)"
|
|
987
|
+
}
|
|
988
|
+
}, _(t.label), 11, mt)) : t.type === "logicMergeTag" ? (e(), p("span", {
|
|
989
|
+
key: 2,
|
|
990
|
+
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",
|
|
991
|
+
"data-tooltip": t.value,
|
|
992
|
+
style: {
|
|
993
|
+
"background-color": "transparent",
|
|
994
|
+
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
995
|
+
color: "var(--tpl-primary)"
|
|
996
|
+
}
|
|
997
|
+
}, _(t.keyword), 9, ht)) : (e(), p("span", gt, _(t.value), 1))], 64))), 128)),
|
|
998
|
+
f("button", {
|
|
999
|
+
type: "button",
|
|
1000
|
+
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",
|
|
1001
|
+
"aria-label": u(i).mergeTag.editAsText,
|
|
1002
|
+
title: u(i).mergeTag.editAsText,
|
|
1003
|
+
"data-testid": "merge-tag-field-edit",
|
|
1004
|
+
onClick: w(l, ["stop"])
|
|
1005
|
+
}, [m(u(ue), {
|
|
1006
|
+
size: 12,
|
|
1007
|
+
"stroke-width": 2
|
|
1008
|
+
})], 8, _t),
|
|
1009
|
+
f("button", {
|
|
1010
|
+
type: "button",
|
|
1011
|
+
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",
|
|
1012
|
+
"aria-label": u(i).mergeTag.remove,
|
|
1013
|
+
title: u(i).mergeTag.remove,
|
|
1014
|
+
"data-testid": "merge-tag-field-clear",
|
|
1015
|
+
onClick: d[0] ||= w((e) => r("clear"), ["stop"])
|
|
1016
|
+
}, [m(u(de), {
|
|
1017
|
+
size: 12,
|
|
1018
|
+
"stroke-width": 2.5
|
|
1019
|
+
})], 8, vt)
|
|
1020
|
+
], 10, ft));
|
|
1021
|
+
}
|
|
1022
|
+
}), bt = [
|
|
1023
|
+
"aria-label",
|
|
1024
|
+
"title",
|
|
1025
|
+
"disabled"
|
|
1026
|
+
], xt = "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)]", St = /* @__PURE__ */ C({
|
|
1027
|
+
__name: "MergeTagInsertButton",
|
|
1028
|
+
props: { disabled: { type: Boolean } },
|
|
1029
|
+
emits: ["insert"],
|
|
1030
|
+
setup(t) {
|
|
1031
|
+
let { t: n } = M();
|
|
1032
|
+
return (r, i) => (e(), p("button", {
|
|
1033
|
+
type: "button",
|
|
1034
|
+
class: v([xt, "tpl:mt-1.5"]),
|
|
1035
|
+
"aria-label": u(n).mergeTag.insert,
|
|
1036
|
+
title: u(n).mergeTag.insert,
|
|
1037
|
+
disabled: t.disabled,
|
|
1038
|
+
onMousedown: i[0] ||= w(() => {}, ["prevent"]),
|
|
1039
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1040
|
+
}, [m(u(L), {
|
|
1041
|
+
size: 12,
|
|
1042
|
+
"stroke-width": 2
|
|
1043
|
+
}), h(" " + _(u(n).mergeTag.insertShort), 1)], 42, bt));
|
|
1044
|
+
}
|
|
1045
|
+
}), Ct = [
|
|
1046
|
+
"aria-label",
|
|
1047
|
+
"title",
|
|
1048
|
+
"disabled"
|
|
1049
|
+
], 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__ */ C({
|
|
1050
|
+
__name: "LogicTagInsertButton",
|
|
1051
|
+
props: { disabled: { type: Boolean } },
|
|
1052
|
+
emits: ["insert"],
|
|
1053
|
+
setup(t) {
|
|
1054
|
+
let { t: n } = M();
|
|
1055
|
+
return (r, i) => (e(), p("button", {
|
|
1056
|
+
type: "button",
|
|
1057
|
+
class: v([wt, "tpl:mt-1.5"]),
|
|
1058
|
+
"aria-label": u(n).logicTag.insert,
|
|
1059
|
+
title: u(n).logicTag.insert,
|
|
1060
|
+
disabled: t.disabled,
|
|
1061
|
+
"data-testid": "field-insert-logic-button",
|
|
1062
|
+
onMousedown: i[0] ||= w(() => {}, ["prevent"]),
|
|
1063
|
+
onClick: i[1] ||= (e) => r.$emit("insert")
|
|
1064
|
+
}, [m(u(I), {
|
|
1065
|
+
size: 12,
|
|
1066
|
+
"stroke-width": 2
|
|
1067
|
+
}), h(" " + _(u(n).logicTag.insertShort), 1)], 42, Ct));
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
//#endregion
|
|
1071
|
+
export { it as a, qe as c, dt as i, L as l, St as n, nt as o, yt as r, rt as s, Tt as t, I as u };
|