@templatical/editor 0.39.0 → 0.39.2
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-jVlXXND3.js → AiChatSidebar-pOxCZWz9.js} +14 -14
- package/dist/{AiFeatureMenu-C1HCntyQ.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
- package/dist/{BlockIssueBadge-JhNgcUmZ.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
- package/dist/{BlockPreviewCanvas-C_rA5LJN.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
- package/dist/{CloudHeaderExtras-DvYyNsPB.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
- package/dist/{CloudPanels-CDPhPVdd.js → CloudPanels-CyZAnSJY.js} +7 -7
- package/dist/{CollaboratorBar-Co9UPoB0.js → CollaboratorBar-C7Zca3g1.js} +4 -4
- package/dist/{CommentsPanel-CRcVN9Ri.js → CommentsPanel-CNOb7YCm.js} +2 -2
- package/dist/{CommentsSidebar-gDU977br.js → CommentsSidebar-VmwjU9va.js} +14 -14
- package/dist/{CountdownBlock-CEzrfe5R.js → CountdownBlock-DSvbf3qU.js} +3 -3
- package/dist/{CountdownToolbar-B00zhkNJ.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
- package/dist/{DesignReferenceSidebar-DedivZZl.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
- package/dist/{IssuesPanel-C-PjdmAV.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/MediaEditModal-D4GEq2md.js +3545 -0
- package/dist/{MediaPanels-BpQNY8YX.js → MediaPanels-sapgKtxu.js} +2 -2
- package/dist/MergeTagInput-QI-5KG2R.js +81 -0
- package/dist/{MergeTagModeToggle-DGuzSAdX.js → MergeTagModeToggle-D793Bj_E.js} +14 -55
- package/dist/{ParagraphEditor-jMKLLTa8.js → ParagraphEditor-DkkPSexG.js} +65 -66
- package/dist/{RestoreVersionDialog-DG1jUdBM.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
- package/dist/{RichTextEditorContent-JrNEg0kv.js → RichTextEditorContent-BC5UTVnb.js} +11 -11
- package/dist/{SaveBlockDialog-C0KC-OKs.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
- package/dist/{SavedBlocksBrowserModal-zyOiRgWZ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
- package/dist/{SavedBlocksPanels-epMd799w.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
- package/dist/{SavedBlocksPickBar-CJqqQ3jd.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
- package/dist/{TemplateScoringPanel-m2FOeaai.js → TemplateScoringPanel-C2Rdlyn6.js} +16 -16
- package/dist/TemplateSettings-C_5leDdF.js +245 -0
- package/dist/{TestEmailModal-D58kYkMV.js → TestEmailModal-DJ5q_u4N.js} +10 -10
- package/dist/{TestEmailPanel-BmFVBIQt.js → TestEmailPanel-CP24UGst.js} +2 -2
- package/dist/{TitleEditor-C4BGPXnf.js → TitleEditor-QBBOXtxx.js} +15 -15
- package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
- package/dist/Toolbar-COD2TW20.js +2426 -0
- package/dist/{TplModal-BIDJw4Kj.js → TplModal-C8xGjC1l.js} +5 -5
- package/dist/{VersionHistoryMenu-dt_aZQfh.js → VersionHistoryMenu-BVQityes.js} +10 -10
- package/dist/{VersionHistoryPanels-B_5SBRrr.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
- package/dist/{VersionPreviewBanner-DttvOkwd.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
- package/dist/{blockTypeIcons-CzTizYmK.js → blockTypeIcons-CdXugKyV.js} +16 -37
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +9 -0
- package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js → AiChatSidebar-CjSEoK4x.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-DeZl9Tk0.js.map → AiChatSidebar-CjSEoK4x.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Bv8jMu9p.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-B6PpoOPv.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
- package/dist/cdn/chunks/{BlockPreviewCanvas-DfEtDosD.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Hk98ub-C.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js → CloudPanels-bHhh9AUA.js} +6 -6
- package/dist/cdn/chunks/{CloudPanels-Ba3GLmvF.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js → CollaboratorBar-DgqcaGGI.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-D2dCQ9gg.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js → CommentsPanel-Cy4TlTHC.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CV2HveQk.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-Dok_vaRc.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js → CountdownBlock-DdC8Lg5F.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-DGDl3ota.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js → CountdownToolbar-CN9h4nlC.js} +22 -21
- package/dist/cdn/chunks/{CountdownToolbar-B9Rin64t.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-eCuTFak2.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.js → IssuesPanel-DdFk-Blf.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-CP7FEzw7.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/MediaEditModal-BBZRcYKe.js +3529 -0
- package/dist/cdn/chunks/MediaEditModal-BBZRcYKe.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js → MediaPanels-CSBCsFwT.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-TYrKKHX5.js.map → MediaPanels-CSBCsFwT.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-QGTUIWWo.js → MergeTagModeToggle-n3nvSNeQ.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-QGTUIWWo.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js → ParagraphEditor-DO4RzP8l.js} +40 -40
- package/dist/cdn/chunks/{ParagraphEditor-D1tsPv4v.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-BeCxNPLS.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js → RichTextEditorContent-Ch5zeyZ7.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-BBxzACFQ.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
- package/dist/cdn/chunks/{SaveBlockDialog-CLgh_g7H.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B4TcUJJe.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-CaBsHoRC.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-iG35XCDx.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js → TemplateScoringPanel--JxR6CsQ.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-DuQJBykq.js.map → TemplateScoringPanel--JxR6CsQ.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
- package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js → TestEmailModal-BAuDxJtD.js} +9 -9
- package/dist/cdn/chunks/{TestEmailModal-D6Woss3r.js.map → TestEmailModal-BAuDxJtD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js → TestEmailPanel-GUGZisLp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-CWQFB7J3.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js → TitleEditor-uKu33Nwr.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CbY1tgSl.js.map → TitleEditor-uKu33Nwr.js.map} +1 -1
- 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-CGpp-d_r.js → TplModal-DuwS2ifK.js} +5 -5
- package/dist/cdn/chunks/{TplModal-CGpp-d_r.js.map → TplModal-DuwS2ifK.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-ByVJXDbK.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CQJ5OggF.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-G4lLbfr8.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js → blockTypeIcons-raBjStuv.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CQY-vxdM.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
- package/dist/cdn/chunks/{ca-Jx2CDwtn.js → ca-BTf1Zbqb.js} +10 -1
- package/dist/cdn/chunks/{ca-Jx2CDwtn.js.map → ca-BTf1Zbqb.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-ClvtMBF1.js → createCloudRuntime-D5bXzcTe.js} +6 -6
- package/dist/cdn/chunks/{createCloudRuntime-ClvtMBF1.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
- package/dist/{de-Ck0pBGHu.js → cdn/chunks/de-xzrh9PA3.js} +11 -0
- package/dist/cdn/chunks/{de-Ck0pBGHu.js.map → de-xzrh9PA3.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-C-yBlj2C.js +2700 -0
- package/dist/cdn/chunks/editor-modal-C-yBlj2C.js.map +1 -0
- package/dist/cdn/chunks/en-DYtFUE2l.js +2 -0
- package/dist/cdn/chunks/{es-lagTvUfX.js → es-BT4LSpE2.js} +10 -1
- package/dist/cdn/chunks/{es-lagTvUfX.js.map → es-BT4LSpE2.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-D2YIhF7u.js → extensions-Bhu8UEE5.js} +105 -45
- package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
- package/dist/cdn/chunks/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +10 -1
- package/dist/cdn/chunks/{fr-C4hVl5Lk.js.map → fr-CI7OJoql.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DdrAicM2.js → icons-BKkJ-5xF.js} +43 -43
- package/dist/cdn/chunks/{icons-DdrAicM2.js.map → icons-BKkJ-5xF.js.map} +1 -1
- package/dist/cdn/chunks/{keys-DXYJTLZF.js → keys-dJbD1QPs.js} +2 -2
- package/dist/cdn/chunks/{keys-DXYJTLZF.js.map → keys-dJbD1QPs.js.map} +1 -1
- package/dist/{nl-CReD7Apd.js → cdn/chunks/nl-D8y5OWGB.js} +11 -0
- package/dist/cdn/chunks/{nl-CReD7Apd.js.map → nl-D8y5OWGB.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +10 -1
- package/dist/cdn/chunks/{pt-BR-BRA0-vGP.js.map → pt-BR-DMCbUBvJ.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-fn7uy1FD.js → src-O5Sp_qJ7.js} +3 -3
- package/dist/cdn/chunks/{src-fn7uy1FD.js.map → src-O5Sp_qJ7.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-OezCj0cx.js → useCloudI18n-C09JcFS0.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-OezCj0cx.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-ByHPMqYT.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BhE7ndNr.js → useI18n-DTZ9sIcv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-BhE7ndNr.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-DE2mpy1w.js → useMergeTag-BE8oDoha.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-DE2mpy1w.js.map → useMergeTag-BE8oDoha.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js → usePopoverPosition-gB9q-ql7.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-BPL891uG.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js → useScrollToBlock-CtTXwmiU.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-DwF4pVur.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +809 -3337
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-9xX6RVHz.js → check-eqb2JhqU.js} +1 -1
- package/dist/{chevron-down-J5hFJ6TL.js → chevron-down-Dkr-7Ywl.js} +1 -1
- package/dist/{chevron-right-BJuo5PQ-.js → chevron-right-Bge4XF_B.js} +1 -1
- package/dist/{chevron-up-Qfi5k52_.js → chevron-up-CQAyl0kC.js} +1 -1
- package/dist/{circle-alert-BiArYmkB.js → circle-alert-CYgTHKWr.js} +1 -1
- package/dist/{clock-BkYJZ7Y0.js → clock-BgSJZJP5.js} +1 -1
- package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
- package/dist/{copy-BRLUNHwF.js → copy-mw6PVnOJ.js} +1 -1
- package/dist/{createCloudRuntime-CNFXaTNQ.js → createCloudRuntime-BGd5--Bq.js} +5 -5
- package/dist/{createLucideIcon-CDDkF1Tm.js → createLucideIcon-BxY5yz5u.js} +6 -6
- package/dist/{cdn/chunks/de-Ck0pBGHu.js → de-xzrh9PA3.js} +9 -2
- 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-oD1qNz_P.js +2773 -0
- package/dist/en-CM5fTFSo.js +2 -0
- package/dist/{es-lagTvUfX.js → es-BT4LSpE2.js} +9 -0
- package/dist/extensions-DRN-elXT.js +1645 -0
- package/dist/{eye-DwhBOaV8.js → eye-DphkRtAD.js} +1 -1
- package/dist/{fr-C4hVl5Lk.js → fr-CI7OJoql.js} +9 -0
- package/dist/{image-up-CiyQNZBt.js → image-up-Qi2BXD7T.js} +1 -1
- package/dist/{info-D6A1qEiF.js → info-VSyAs02q.js} +1 -1
- package/dist/{keys-DD1rl72F.js → keys-BdoSgsz9.js} +1 -1
- package/dist/{link-tKGmYWsB.js → link-CNuozGqD.js} +1 -1
- package/dist/{list-DjZQRpeI.js → list-BA0I5Wmu.js} +1 -1
- package/dist/{loader-circle-D9ZL3Sv0.js → loader-circle-z5eeqasv.js} +1 -1
- package/dist/{message-circle-KTHxCcpB.js → message-circle-BsQ9hEup.js} +1 -1
- package/dist/{cdn/chunks/nl-CReD7Apd.js → nl-D8y5OWGB.js} +9 -2
- package/dist/package-OkXfuRoO.js +25 -0
- package/dist/{pencil-Bq-nbQ7F.js → pencil-DFVFA7Dj.js} +1 -1
- package/dist/{plus-CRMnR4IG.js → plus-D8bkVjZ7.js} +1 -1
- package/dist/{pt-BR-BRA0-vGP.js → pt-BR-DMCbUBvJ.js} +9 -0
- package/dist/{refresh-cw-D7bYS5tm.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-DUo0YwPz.js → search-C-dCgqIa.js} +1 -1
- package/dist/{send-DaVMQphu.js → send-Cm2fy2zm.js} +1 -1
- package/dist/{shield-check-DxaaurL9.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-D6T6k30e.js → sparkles-Ds0RF8Iu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
- package/dist/templatical-editor.js +895 -3498
- package/dist/{text-align-start-vreFpmCX.js → text-align-start-DiavaIm6.js} +1 -1
- package/dist/{trash-DBv8MGY6.js → trash-DnOkfu2V.js} +1 -1
- package/dist/{triangle-alert-CmNS2LLv.js → triangle-alert-DGLAyXnh.js} +1 -1
- package/dist/{upload-DDB9Fs0P.js → upload-BBDme2cy.js} +1 -1
- package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
- package/dist/{useCloudI18n-C1wuXik6.js → useCloudI18n-D1iedlP3.js} +2 -2
- package/dist/{useEditorCore-jfwgLThK.js → useEditorCore-C5APBjjV.js} +1140 -2325
- package/dist/{useEditorRoot-eVv4doqZ.js → useEditorRoot-BOxn5EfP.js} +2 -2
- package/dist/{useI18n-VOtdfENx.js → useI18n-Ds_-druD.js} +2 -2
- package/dist/useLogicTag-DoHfc08B.js +36 -0
- package/dist/{useMergeTag-CQM9pFca.js → useMergeTag-DXyum3kG.js} +2 -2
- package/dist/{usePopoverPosition-gZjRywai.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
- package/dist/{useScrollToBlock-C0Ehnyl4.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-B7sgO_z8.js → x-3BHV3Q6K.js} +1 -1
- package/package.json +14 -14
- package/dist/ColorPicker-BTtN94te.js +0 -501
- package/dist/FieldRow-C8nOknr_.js +0 -128
- package/dist/MergeTagInput-Cw1RoMly.js +0 -509
- package/dist/MergeTagSuggestion-BXO3UIXW.js +0 -1329
- package/dist/cdn/chunks/ColorPicker-BaonTCAQ.js +0 -502
- package/dist/cdn/chunks/ColorPicker-BaonTCAQ.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-CSIThqkz.js +0 -470
- package/dist/cdn/chunks/MergeTagInput-CSIThqkz.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.js +0 -215
- package/dist/cdn/chunks/MergeTagSuggestion-CY6WK8Eb.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/editor-modal-B6IdQWlf.js +0 -5908
- package/dist/cdn/chunks/editor-modal-B6IdQWlf.js.map +0 -1
- package/dist/cdn/chunks/en-DjunooBz.js +0 -2
- package/dist/cdn/chunks/extensions-D2YIhF7u.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-06PtcUi1.js +0 -3698
- package/dist/cdn/chunks/useEditorCore-06PtcUi1.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-ByHPMqYT.js +0 -10
- package/dist/editor-modal-uAEB6xKz.js +0 -5998
- package/dist/en-CQWkDCpm.js +0 -2
- package/dist/extensions-CcGj7OfS.js +0 -470
|
@@ -0,0 +1,1035 @@
|
|
|
1
|
+
import { E as e, F as t, H as n, K as r, N as i, Q as a, S as o, Y as s, at as c, b as l, c as u, ct as d, d as f, f as p, g as m, h, k as g, l as _, lt as v, m as y, n as b, p as x, q as S, r as C, u as w, ut as T, w as E, y as D } from "./draggable-IB4x6w2O.js";
|
|
2
|
+
import { a as O, c as k, d as ee, l as A } from "./src-Dwgq7hf4.js";
|
|
3
|
+
import { t as te } from "./dist-CXB2_kBa.js";
|
|
4
|
+
import { K as ne, Y as re, d as ie, q as j } from "./keys-dJbD1QPs.js";
|
|
5
|
+
import { t as M } from "./useI18n-DTZ9sIcv.js";
|
|
6
|
+
import { a as ae, i as oe, n as se, r as ce, t as le } from "./usePopoverPosition-gB9q-ql7.js";
|
|
7
|
+
import { K as N, P as ue, Rt as P, n as F } from "./icons-BKkJ-5xF.js";
|
|
8
|
+
import { t as I } from "./useMergeTag-BE8oDoha.js";
|
|
9
|
+
import { t as L } from "./useLogicTag-E2V0Xdcb.js";
|
|
10
|
+
import { u as de } from "./styleConstants-C_YAPdQS.js";
|
|
11
|
+
//#region ../../node_modules/.pnpm/vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/utils/math.js
|
|
12
|
+
var 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) => he(V(e)), V = (e) => (e[0] === "#" && (e = e.substring(1)), e.length < 6 ? {
|
|
13
|
+
r: parseInt(e[0] + e[0], 16),
|
|
14
|
+
g: parseInt(e[1] + e[1], 16),
|
|
15
|
+
b: parseInt(e[2] + e[2], 16),
|
|
16
|
+
a: e.length === 4 ? z(parseInt(e[3] + e[3], 16) / 255, 2) : 1
|
|
17
|
+
} : {
|
|
18
|
+
r: parseInt(e.substring(0, 2), 16),
|
|
19
|
+
g: parseInt(e.substring(2, 4), 16),
|
|
20
|
+
b: parseInt(e.substring(4, 6), 16),
|
|
21
|
+
a: e.length === 8 ? z(parseInt(e.substring(6, 8), 16) / 255, 2) : 1
|
|
22
|
+
}), H = (e) => me(pe(e)), fe = ({ h: e, s: t, v: n, a: r }) => {
|
|
23
|
+
let i = (200 - t) * n / 100;
|
|
24
|
+
return {
|
|
25
|
+
h: z(e),
|
|
26
|
+
s: z(i > 0 && i < 200 ? t * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0),
|
|
27
|
+
l: z(i / 2),
|
|
28
|
+
a: z(r, 2)
|
|
29
|
+
};
|
|
30
|
+
}, U = (e) => {
|
|
31
|
+
let { h: t, s: n, l: r } = fe(e);
|
|
32
|
+
return `hsl(${t}, ${n}%, ${r}%)`;
|
|
33
|
+
}, pe = ({ h: e, s: t, v: n, a: r }) => {
|
|
34
|
+
e = e / 360 * 6, t /= 100, n /= 100;
|
|
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
|
+
return {
|
|
37
|
+
r: z([
|
|
38
|
+
n,
|
|
39
|
+
o,
|
|
40
|
+
a,
|
|
41
|
+
a,
|
|
42
|
+
s,
|
|
43
|
+
n
|
|
44
|
+
][c] * 255),
|
|
45
|
+
g: z([
|
|
46
|
+
s,
|
|
47
|
+
n,
|
|
48
|
+
n,
|
|
49
|
+
o,
|
|
50
|
+
a,
|
|
51
|
+
a
|
|
52
|
+
][c] * 255),
|
|
53
|
+
b: z([
|
|
54
|
+
a,
|
|
55
|
+
a,
|
|
56
|
+
s,
|
|
57
|
+
n,
|
|
58
|
+
n,
|
|
59
|
+
o
|
|
60
|
+
][c] * 255),
|
|
61
|
+
a: z(r, 2)
|
|
62
|
+
};
|
|
63
|
+
}, W = (e) => {
|
|
64
|
+
let t = e.toString(16);
|
|
65
|
+
return t.length < 2 ? "0" + t : t;
|
|
66
|
+
}, me = ({ r: e, g: t, b: n, a: r }) => {
|
|
67
|
+
let i = r < 1 ? W(z(r * 255)) : "";
|
|
68
|
+
return "#" + W(e) + W(t) + W(n) + i;
|
|
69
|
+
}, he = ({ r: e, g: t, b: n, a: r }) => {
|
|
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
|
+
return {
|
|
72
|
+
h: z(60 * (o < 0 ? o + 6 : o)),
|
|
73
|
+
s: z(i ? a / i * 100 : 0),
|
|
74
|
+
v: z(i / 255 * 100),
|
|
75
|
+
a: r
|
|
76
|
+
};
|
|
77
|
+
}, G = (e, t) => {
|
|
78
|
+
if (e === t) return !0;
|
|
79
|
+
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
80
|
+
return !0;
|
|
81
|
+
}, K = (e, t) => e.toLowerCase() === t.toLowerCase() || G(V(e), V(t)), q = {}, J = (e) => {
|
|
82
|
+
let t = q[e];
|
|
83
|
+
return t || (t = document.createElement("template"), t.innerHTML = e, q[e] = t), t;
|
|
84
|
+
}, Y = (e, t, n) => {
|
|
85
|
+
e.dispatchEvent(new CustomEvent(t, {
|
|
86
|
+
bubbles: !0,
|
|
87
|
+
detail: n
|
|
88
|
+
}));
|
|
89
|
+
}, X = !1, Z = (e) => "touches" in e, ge = (e) => X && !Z(e) ? !1 : (X ||= Z(e), !0), _e = (e, t) => {
|
|
90
|
+
let n = Z(t) ? t.touches[0] : t, r = e.el.getBoundingClientRect();
|
|
91
|
+
Y(e.el, "move", e.getMove({
|
|
92
|
+
x: R((n.pageX - (r.left + window.pageXOffset)) / r.width),
|
|
93
|
+
y: R((n.pageY - (r.top + window.pageYOffset)) / r.height)
|
|
94
|
+
}));
|
|
95
|
+
}, ve = (e, t) => {
|
|
96
|
+
let n = t.keyCode;
|
|
97
|
+
n > 40 || e.xy && n < 37 || n < 33 || (t.preventDefault(), Y(e.el, "move", e.getMove({
|
|
98
|
+
x: n === 39 ? .01 : n === 37 ? -.01 : n === 34 ? .05 : n === 33 ? -.05 : n === 35 ? 1 : n === 36 ? -1 : 0,
|
|
99
|
+
y: n === 40 ? .01 : n === 38 ? -.01 : 0
|
|
100
|
+
}, !0)));
|
|
101
|
+
}, ye = class {
|
|
102
|
+
constructor(e, t, n, r) {
|
|
103
|
+
let i = J(`<div role="slider" tabindex="0" part="${t}" ${n}><div part="${t}-pointer"></div></div>`);
|
|
104
|
+
e.appendChild(i.content.cloneNode(!0));
|
|
105
|
+
let a = e.querySelector(`[part=${t}]`);
|
|
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
|
+
}
|
|
108
|
+
set dragging(e) {
|
|
109
|
+
let t = e ? document.addEventListener : document.removeEventListener;
|
|
110
|
+
t(X ? "touchmove" : "mousemove", this), t(X ? "touchend" : "mouseup", this);
|
|
111
|
+
}
|
|
112
|
+
handleEvent(e) {
|
|
113
|
+
switch (e.type) {
|
|
114
|
+
case "mousedown":
|
|
115
|
+
case "touchstart":
|
|
116
|
+
if (e.preventDefault(), !ge(e) || !X && e.button != 0) return;
|
|
117
|
+
this.el.focus(), _e(this, e), this.dragging = !0;
|
|
118
|
+
break;
|
|
119
|
+
case "mousemove":
|
|
120
|
+
case "touchmove":
|
|
121
|
+
e.preventDefault(), _e(this, e);
|
|
122
|
+
break;
|
|
123
|
+
case "mouseup":
|
|
124
|
+
case "touchend":
|
|
125
|
+
this.dragging = !1;
|
|
126
|
+
break;
|
|
127
|
+
case "keydown": ve(this, e);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
style(e) {
|
|
131
|
+
e.forEach((e, t) => {
|
|
132
|
+
for (let n in e) this.nodes[t].style.setProperty(n, e[n]);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}, be = class extends ye {
|
|
136
|
+
constructor(e) {
|
|
137
|
+
super(e, "hue", "aria-label=\"Hue\" aria-valuemin=\"0\" aria-valuemax=\"360\"", !1);
|
|
138
|
+
}
|
|
139
|
+
update({ h: e }) {
|
|
140
|
+
this.h = e, this.style([{
|
|
141
|
+
left: `${e / 360 * 100}%`,
|
|
142
|
+
color: U({
|
|
143
|
+
h: e,
|
|
144
|
+
s: 100,
|
|
145
|
+
v: 100,
|
|
146
|
+
a: 1
|
|
147
|
+
})
|
|
148
|
+
}]), this.el.setAttribute("aria-valuenow", `${z(e)}`);
|
|
149
|
+
}
|
|
150
|
+
getMove(e, t) {
|
|
151
|
+
return { h: t ? R(this.h + e.x * 360, 0, 360) : 360 * e.x };
|
|
152
|
+
}
|
|
153
|
+
}, xe = class extends ye {
|
|
154
|
+
constructor(e) {
|
|
155
|
+
super(e, "saturation", "aria-label=\"Color\"", !0);
|
|
156
|
+
}
|
|
157
|
+
update(e) {
|
|
158
|
+
this.hsva = e, this.style([{
|
|
159
|
+
top: `${100 - e.v}%`,
|
|
160
|
+
left: `${e.s}%`,
|
|
161
|
+
color: U(e)
|
|
162
|
+
}, { "background-color": U({
|
|
163
|
+
h: e.h,
|
|
164
|
+
s: 100,
|
|
165
|
+
v: 100,
|
|
166
|
+
a: 1
|
|
167
|
+
}) }]), this.el.setAttribute("aria-valuetext", `Saturation ${z(e.s)}%, Brightness ${z(e.v)}%`);
|
|
168
|
+
}
|
|
169
|
+
getMove(e, t) {
|
|
170
|
+
return {
|
|
171
|
+
s: t ? R(this.hsva.s + e.x * 100, 0, 100) : e.x * 100,
|
|
172
|
+
v: t ? R(this.hsva.v - e.y * 100, 0, 100) : Math.round(100 - e.y * 100)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}, Se = ":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)}", Ce = "[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}", we = "[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"), $ = Symbol("color"), Te = Symbol("hsva"), Ee = Symbol("update"), De = Symbol("parts"), Oe = Symbol("css"), ke = Symbol("sliders"), Ae = class extends HTMLElement {
|
|
176
|
+
static get observedAttributes() {
|
|
177
|
+
return ["color"];
|
|
178
|
+
}
|
|
179
|
+
get [Oe]() {
|
|
180
|
+
return [
|
|
181
|
+
Se,
|
|
182
|
+
Ce,
|
|
183
|
+
we
|
|
184
|
+
];
|
|
185
|
+
}
|
|
186
|
+
get [ke]() {
|
|
187
|
+
return [xe, be];
|
|
188
|
+
}
|
|
189
|
+
get color() {
|
|
190
|
+
return this[$];
|
|
191
|
+
}
|
|
192
|
+
set color(e) {
|
|
193
|
+
if (!this[Q](e)) {
|
|
194
|
+
let t = this.colorModel.toHsva(e);
|
|
195
|
+
this[Ee](t), this[$] = e;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
constructor() {
|
|
199
|
+
super();
|
|
200
|
+
let e = J(`<style>${this[Oe].join("")}</style>`), t = this.attachShadow({ mode: "open" });
|
|
201
|
+
t.appendChild(e.content.cloneNode(!0)), t.addEventListener("move", this), this[De] = this[ke].map((e) => new e(t));
|
|
202
|
+
}
|
|
203
|
+
connectedCallback() {
|
|
204
|
+
if (this.hasOwnProperty("color")) {
|
|
205
|
+
let e = this.color;
|
|
206
|
+
delete this.color, this.color = e;
|
|
207
|
+
} else this.color ||= this.colorModel.defaultColor;
|
|
208
|
+
}
|
|
209
|
+
attributeChangedCallback(e, t, n) {
|
|
210
|
+
let r = this.colorModel.fromAttr(n);
|
|
211
|
+
this[Q](r) || (this.color = r);
|
|
212
|
+
}
|
|
213
|
+
handleEvent(e) {
|
|
214
|
+
let t = this[Te], n = {
|
|
215
|
+
...t,
|
|
216
|
+
...e.detail
|
|
217
|
+
};
|
|
218
|
+
this[Ee](n);
|
|
219
|
+
let r;
|
|
220
|
+
!G(n, t) && !this[Q](r = this.colorModel.fromHsva(n)) && (this[$] = r, Y(this, "color-changed", { value: r }));
|
|
221
|
+
}
|
|
222
|
+
[Q](e) {
|
|
223
|
+
return this.color && this.colorModel.equal(e, this.color);
|
|
224
|
+
}
|
|
225
|
+
[Ee](e) {
|
|
226
|
+
this[Te] = e, this[De].forEach((t) => t.update(e));
|
|
227
|
+
}
|
|
228
|
+
}, je = {
|
|
229
|
+
defaultColor: "#000",
|
|
230
|
+
toHsva: B,
|
|
231
|
+
fromHsva: ({ h: e, s: t, v: n }) => H({
|
|
232
|
+
h: e,
|
|
233
|
+
s: t,
|
|
234
|
+
v: n,
|
|
235
|
+
a: 1
|
|
236
|
+
}),
|
|
237
|
+
equal: K,
|
|
238
|
+
fromAttr: (e) => e
|
|
239
|
+
}, Me = class extends Ae {
|
|
240
|
+
get colorModel() {
|
|
241
|
+
return je;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
customElements.define("hex-color-picker", class extends Me {});
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/components/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
247
|
+
var Ne = [
|
|
248
|
+
"disabled",
|
|
249
|
+
"aria-label",
|
|
250
|
+
"title",
|
|
251
|
+
"aria-expanded"
|
|
252
|
+
], Pe = {
|
|
253
|
+
key: 0,
|
|
254
|
+
class: "tpl:relative tpl:flex-1"
|
|
255
|
+
}, Fe = [
|
|
256
|
+
"value",
|
|
257
|
+
"placeholder",
|
|
258
|
+
"disabled",
|
|
259
|
+
"aria-label"
|
|
260
|
+
], Ie = ["aria-label", "title"], Le = ["data-tpl-theme"], Re = ["aria-label"], ze = [
|
|
261
|
+
"aria-label",
|
|
262
|
+
"title",
|
|
263
|
+
"aria-checked",
|
|
264
|
+
"tabindex"
|
|
265
|
+
], Be = [
|
|
266
|
+
"aria-label",
|
|
267
|
+
"title",
|
|
268
|
+
"aria-checked",
|
|
269
|
+
"tabindex",
|
|
270
|
+
"onClick"
|
|
271
|
+
], Ve = ["color", "aria-label"], He = {
|
|
272
|
+
key: 2,
|
|
273
|
+
class: "tpl:relative tpl:mt-2"
|
|
274
|
+
}, Ue = [
|
|
275
|
+
"value",
|
|
276
|
+
"placeholder",
|
|
277
|
+
"disabled",
|
|
278
|
+
"aria-label"
|
|
279
|
+
], We = ["aria-label", "title"], Ge = /* @__PURE__ */ o({
|
|
280
|
+
__name: "ColorPicker",
|
|
281
|
+
props: {
|
|
282
|
+
modelValue: {},
|
|
283
|
+
placeholder: { default: "" },
|
|
284
|
+
seedColor: { default: "#ffffff" },
|
|
285
|
+
swatchOnly: {
|
|
286
|
+
type: Boolean,
|
|
287
|
+
default: !1
|
|
288
|
+
},
|
|
289
|
+
disabled: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
default: !1
|
|
292
|
+
},
|
|
293
|
+
size: { default: "md" },
|
|
294
|
+
ariaLabel: { default: "" },
|
|
295
|
+
presets: { default: void 0 },
|
|
296
|
+
allowCustom: {
|
|
297
|
+
type: Boolean,
|
|
298
|
+
default: void 0
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
emits: ["update:modelValue"],
|
|
302
|
+
setup(r, { emit: o }) {
|
|
303
|
+
let s = r, g = o, { t: S } = M(), C = a(!1), T = a(), E = a(), D = a(!1);
|
|
304
|
+
te(T, () => {
|
|
305
|
+
C.value = !1;
|
|
306
|
+
}, { ignore: [E] });
|
|
307
|
+
let O = p(() => !s.modelValue), k = p(() => oe(s.modelValue)), ee = p(() => oe(s.modelValue || s.seedColor)), A = p(() => !s.disabled && !O.value), j = e(ie, ae), N = p(() => [...new Set(s.presets ?? j.presets)]), ue = p(() => s.allowCustom ?? j.allowCustom), P = p(() => N.value.length > 0), I = p(() => ue.value || !P.value), L = p(() => ce(s.modelValue));
|
|
308
|
+
function R(e) {
|
|
309
|
+
return L.value !== "" && ce(e) === L.value;
|
|
310
|
+
}
|
|
311
|
+
function z(e) {
|
|
312
|
+
g("update:modelValue", e);
|
|
313
|
+
}
|
|
314
|
+
let B = p(() => P.value && !I.value);
|
|
315
|
+
function V(e) {
|
|
316
|
+
return B.value ? e + 1 : e;
|
|
317
|
+
}
|
|
318
|
+
let H = p(() => {
|
|
319
|
+
if (B.value && O.value) return 0;
|
|
320
|
+
let e = N.value.findIndex((e) => R(e));
|
|
321
|
+
return e === -1 ? 0 : V(e);
|
|
322
|
+
});
|
|
323
|
+
function fe() {
|
|
324
|
+
return H.value === 0 ? 0 : -1;
|
|
325
|
+
}
|
|
326
|
+
function U(e) {
|
|
327
|
+
return V(e) === H.value ? 0 : -1;
|
|
328
|
+
}
|
|
329
|
+
function pe(e) {
|
|
330
|
+
if (![
|
|
331
|
+
"ArrowRight",
|
|
332
|
+
"ArrowDown",
|
|
333
|
+
"ArrowLeft",
|
|
334
|
+
"ArrowUp"
|
|
335
|
+
].includes(e.key)) return;
|
|
336
|
+
let t = Array.from(e.currentTarget.querySelectorAll("[role=\"radio\"]")), n = e.target.closest("[role=\"radio\"]"), r = n ? t.indexOf(n) : -1;
|
|
337
|
+
r !== -1 && (t[(r + (e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus(), e.preventDefault());
|
|
338
|
+
}
|
|
339
|
+
function W(e) {
|
|
340
|
+
D.value = !0, g("update:modelValue", e.detail.value);
|
|
341
|
+
}
|
|
342
|
+
function me() {
|
|
343
|
+
D.value = !1;
|
|
344
|
+
}
|
|
345
|
+
function he() {
|
|
346
|
+
!D.value && O.value && g("update:modelValue", ee.value);
|
|
347
|
+
}
|
|
348
|
+
function G(e) {
|
|
349
|
+
g("update:modelValue", e.target.value);
|
|
350
|
+
}
|
|
351
|
+
function K() {
|
|
352
|
+
g("update:modelValue", "");
|
|
353
|
+
}
|
|
354
|
+
let q = se(), { toLocal: J } = le(), Y = e(ne, null), X = e(re, null), Z = a({
|
|
355
|
+
top: 0,
|
|
356
|
+
left: 0
|
|
357
|
+
});
|
|
358
|
+
function ge() {
|
|
359
|
+
if (!s.disabled) {
|
|
360
|
+
if (!C.value) {
|
|
361
|
+
let e = E.value?.getBoundingClientRect();
|
|
362
|
+
if (e) {
|
|
363
|
+
let t = e.bottom + 8 + 240 <= window.innerHeight ? e.bottom + 8 : Math.max(8, e.top - 240 - 8);
|
|
364
|
+
Z.value = J({
|
|
365
|
+
top: t,
|
|
366
|
+
left: e.left
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
C.value = !C.value;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return (e, a) => (i(), m("div", { class: d(["tpl:flex tpl:items-center tpl:gap-2 tpl:relative", r.disabled && "tpl:opacity-60 tpl:cursor-not-allowed"]) }, [
|
|
374
|
+
x("button", {
|
|
375
|
+
ref_key: "swatchRef",
|
|
376
|
+
ref: E,
|
|
377
|
+
type: "button",
|
|
378
|
+
disabled: r.disabled,
|
|
379
|
+
"aria-label": r.ariaLabel || c(S).colorPicker.pickColor,
|
|
380
|
+
title: r.ariaLabel || void 0,
|
|
381
|
+
"aria-expanded": C.value,
|
|
382
|
+
class: d([
|
|
383
|
+
"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)]",
|
|
384
|
+
r.disabled ? "tpl:cursor-not-allowed" : "tpl:cursor-pointer",
|
|
385
|
+
C.value ? "tpl:border-[var(--tpl-primary)] tpl:shadow-[var(--tpl-ring)]" : !r.disabled && "tpl:hover:border-[var(--tpl-text-dim)]",
|
|
386
|
+
r.size === "sm" ? "tpl:size-8" : "tpl:size-10"
|
|
387
|
+
]),
|
|
388
|
+
onClick: ge
|
|
389
|
+
}, [x("span", {
|
|
390
|
+
class: d(["tpl:block tpl:size-full tpl:rounded-[calc(var(--tpl-radius-sm)-2px)]", { "tpl-color-swatch-empty": O.value }]),
|
|
391
|
+
style: v(O.value ? void 0 : { backgroundColor: k.value })
|
|
392
|
+
}, null, 6)], 10, Ne),
|
|
393
|
+
!r.swatchOnly && I.value ? (i(), m("div", Pe, [x("input", {
|
|
394
|
+
type: "text",
|
|
395
|
+
class: d([c(de), "tpl:w-full"]),
|
|
396
|
+
style: v(A.value ? { paddingRight: "2.25rem" } : void 0),
|
|
397
|
+
value: k.value,
|
|
398
|
+
placeholder: r.placeholder || c(S).colorPicker.notSet,
|
|
399
|
+
disabled: r.disabled,
|
|
400
|
+
"aria-label": c(S).colorPicker.hexValue,
|
|
401
|
+
onInput: G
|
|
402
|
+
}, null, 46, Fe), A.value ? (i(), m("button", {
|
|
403
|
+
key: 0,
|
|
404
|
+
type: "button",
|
|
405
|
+
"aria-label": c(S).colorPicker.clear,
|
|
406
|
+
title: c(S).colorPicker.clear,
|
|
407
|
+
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)]",
|
|
408
|
+
onClick: K
|
|
409
|
+
}, [l(c(F), {
|
|
410
|
+
size: 14,
|
|
411
|
+
"stroke-width": 1.5
|
|
412
|
+
})], 8, Ie)) : h("", !0)])) : h("", !0),
|
|
413
|
+
(i(), y(f, {
|
|
414
|
+
to: c(q),
|
|
415
|
+
disabled: !c(q)
|
|
416
|
+
}, [l(b, {
|
|
417
|
+
"enter-active-class": "tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
418
|
+
"enter-from-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1",
|
|
419
|
+
"enter-to-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
420
|
+
"leave-active-class": "tpl:transition-all tpl:duration-[80ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
421
|
+
"leave-from-class": "tpl:opacity-100 tpl:scale-100 tpl:translate-y-0",
|
|
422
|
+
"leave-to-class": "tpl:opacity-0 tpl:scale-95 tpl:translate-y-1"
|
|
423
|
+
}, {
|
|
424
|
+
default: n(() => [C.value ? (i(), m("div", {
|
|
425
|
+
key: 0,
|
|
426
|
+
ref_key: "popoverRef",
|
|
427
|
+
ref: T,
|
|
428
|
+
"data-tpl-theme": c(X),
|
|
429
|
+
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)]",
|
|
430
|
+
style: v({
|
|
431
|
+
top: `${Z.value.top}px`,
|
|
432
|
+
left: `${Z.value.left}px`,
|
|
433
|
+
...c(Y)
|
|
434
|
+
})
|
|
435
|
+
}, [
|
|
436
|
+
P.value ? (i(), m("div", {
|
|
437
|
+
key: 0,
|
|
438
|
+
role: "radiogroup",
|
|
439
|
+
"aria-label": c(S).colorPicker.presetColors,
|
|
440
|
+
class: d(["tpl:flex tpl:flex-wrap tpl:gap-1.5", I.value && "tpl:mb-2"]),
|
|
441
|
+
onKeydown: pe
|
|
442
|
+
}, [B.value ? (i(), m("button", {
|
|
443
|
+
key: 0,
|
|
444
|
+
type: "button",
|
|
445
|
+
role: "radio",
|
|
446
|
+
"aria-label": c(S).colorPicker.clear,
|
|
447
|
+
title: c(S).colorPicker.clear,
|
|
448
|
+
"aria-checked": O.value,
|
|
449
|
+
tabindex: fe(),
|
|
450
|
+
class: d(["tpl-color-swatch-empty tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", O.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)]"]),
|
|
451
|
+
onClick: K
|
|
452
|
+
}, null, 10, ze)) : h("", !0), (i(!0), m(w, null, t(N.value, (e, t) => (i(), m("button", {
|
|
453
|
+
key: e,
|
|
454
|
+
type: "button",
|
|
455
|
+
role: "radio",
|
|
456
|
+
"aria-label": e,
|
|
457
|
+
title: e,
|
|
458
|
+
"aria-checked": R(e),
|
|
459
|
+
tabindex: U(t),
|
|
460
|
+
style: v({ backgroundColor: e }),
|
|
461
|
+
class: d(["tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:focus-visible:ring-2 tpl:focus-visible:ring-[var(--tpl-primary)] tpl:focus-visible:ring-offset-1 tpl:focus-visible:ring-offset-[var(--tpl-bg-elevated)]", R(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)]"]),
|
|
462
|
+
onClick: (t) => z(e)
|
|
463
|
+
}, null, 14, Be))), 128))], 42, Re)) : h("", !0),
|
|
464
|
+
I.value ? (i(), m("hex-color-picker", {
|
|
465
|
+
key: 1,
|
|
466
|
+
color: ee.value,
|
|
467
|
+
"aria-label": c(S).colorPicker.pickColor,
|
|
468
|
+
onColorChanged: W,
|
|
469
|
+
onPointerdown: me,
|
|
470
|
+
onPointerup: he,
|
|
471
|
+
onKeydown: a[0] ||= u((e) => C.value = !1, ["escape"])
|
|
472
|
+
}, null, 40, Ve)) : h("", !0),
|
|
473
|
+
r.swatchOnly && I.value ? (i(), m("div", He, [x("input", {
|
|
474
|
+
type: "text",
|
|
475
|
+
class: d([c(de), "tpl:w-full"]),
|
|
476
|
+
style: v(A.value ? { paddingRight: "2.25rem" } : void 0),
|
|
477
|
+
value: k.value,
|
|
478
|
+
placeholder: r.placeholder || c(S).colorPicker.notSet,
|
|
479
|
+
disabled: r.disabled,
|
|
480
|
+
"aria-label": c(S).colorPicker.hexValue,
|
|
481
|
+
onChange: G,
|
|
482
|
+
onKeydown: a[1] ||= u(_((e) => e.target.blur(), ["prevent"]), ["enter"])
|
|
483
|
+
}, null, 46, Ue), A.value ? (i(), m("button", {
|
|
484
|
+
key: 0,
|
|
485
|
+
type: "button",
|
|
486
|
+
"aria-label": c(S).colorPicker.clear,
|
|
487
|
+
title: c(S).colorPicker.clear,
|
|
488
|
+
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)]",
|
|
489
|
+
onClick: K
|
|
490
|
+
}, [l(c(F), {
|
|
491
|
+
size: 14,
|
|
492
|
+
"stroke-width": 1.5
|
|
493
|
+
})], 8, We)) : h("", !0)])) : h("", !0)
|
|
494
|
+
], 12, Le)) : h("", !0)]),
|
|
495
|
+
_: 1
|
|
496
|
+
})], 8, ["to", "disabled"]))
|
|
497
|
+
], 2));
|
|
498
|
+
}
|
|
499
|
+
}), Ke = ["id"], qe = {
|
|
500
|
+
key: 0,
|
|
501
|
+
class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
502
|
+
"data-testid": "merge-tag-suggestion-empty"
|
|
503
|
+
}, Je = [
|
|
504
|
+
"id",
|
|
505
|
+
"aria-selected",
|
|
506
|
+
"data-selected",
|
|
507
|
+
"data-merge-tag-value",
|
|
508
|
+
"onMousedown",
|
|
509
|
+
"onMousemove"
|
|
510
|
+
], Ye = { class: "tpl:font-medium" }, Xe = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, Ze = /* @__PURE__ */ o({
|
|
511
|
+
__name: "MergeTagSuggestionList",
|
|
512
|
+
props: {
|
|
513
|
+
items: {},
|
|
514
|
+
selectedIndex: {},
|
|
515
|
+
emptyText: {},
|
|
516
|
+
listId: {}
|
|
517
|
+
},
|
|
518
|
+
emits: ["select", "hover"],
|
|
519
|
+
setup(e) {
|
|
520
|
+
let n = e;
|
|
521
|
+
function r(e) {
|
|
522
|
+
return n.listId ? `${n.listId}-opt-${e}` : void 0;
|
|
523
|
+
}
|
|
524
|
+
return (n, a) => (i(), m("div", {
|
|
525
|
+
id: e.listId,
|
|
526
|
+
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)]",
|
|
527
|
+
role: "listbox",
|
|
528
|
+
"data-testid": "merge-tag-suggestion-list"
|
|
529
|
+
}, [e.items.length === 0 ? (i(), m("div", qe, T(e.emptyText), 1)) : h("", !0), (i(!0), m(w, null, t(e.items, (t, a) => (i(), m("button", {
|
|
530
|
+
key: t.value,
|
|
531
|
+
id: r(a),
|
|
532
|
+
type: "button",
|
|
533
|
+
role: "option",
|
|
534
|
+
"aria-selected": a === e.selectedIndex,
|
|
535
|
+
"data-selected": a === e.selectedIndex ? "true" : "false",
|
|
536
|
+
"data-merge-tag-value": t.value,
|
|
537
|
+
class: d(["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)]"]),
|
|
538
|
+
onMousedown: _((e) => n.$emit("select", t), ["prevent", "stop"]),
|
|
539
|
+
onMousemove: (t) => a !== e.selectedIndex && n.$emit("hover", a)
|
|
540
|
+
}, [x("span", Ye, T(t.label), 1), x("span", Xe, T(t.value), 1)], 42, Je))), 128))], 8, Ke));
|
|
541
|
+
}
|
|
542
|
+
}), Qe = 10, $e = 0;
|
|
543
|
+
function et(e, t) {
|
|
544
|
+
let n = t.trim().toLowerCase();
|
|
545
|
+
return n === "" ? e.slice(0, Qe) : e.filter((e) => {
|
|
546
|
+
let t = e.label.toLowerCase(), r = e.value.toLowerCase();
|
|
547
|
+
return t.includes(n) || r.includes(n);
|
|
548
|
+
}).slice(0, Qe);
|
|
549
|
+
}
|
|
550
|
+
function tt(e, t, n, r) {
|
|
551
|
+
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;
|
|
552
|
+
}
|
|
553
|
+
function nt(e, t) {
|
|
554
|
+
let n = null, r = null, i = null, o = a([]), s = a(0), c = null, l = `tpl-merge-tag-suggestion-${++$e}`, u = null, d = [], f = null;
|
|
555
|
+
function p() {
|
|
556
|
+
v(u?.() ?? null);
|
|
557
|
+
}
|
|
558
|
+
function m() {
|
|
559
|
+
p(), f !== null && cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
560
|
+
f = null, p();
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
function h(e) {
|
|
564
|
+
let t = [], n = e?.parentElement ?? null;
|
|
565
|
+
for (; n && n !== document.body && n !== document.documentElement;) {
|
|
566
|
+
let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
|
|
567
|
+
/(auto|scroll|overlay)/.test(r) && t.push(n), n = n.parentElement;
|
|
568
|
+
}
|
|
569
|
+
return t;
|
|
570
|
+
}
|
|
571
|
+
function g(e) {
|
|
572
|
+
d = [window, ...h(e)];
|
|
573
|
+
for (let e of d) e.addEventListener("scroll", p, {
|
|
574
|
+
passive: !0,
|
|
575
|
+
capture: !0
|
|
576
|
+
});
|
|
577
|
+
window.addEventListener("resize", p, { passive: !0 });
|
|
578
|
+
}
|
|
579
|
+
function _() {
|
|
580
|
+
for (let e of d) e.removeEventListener("scroll", p, { capture: !0 });
|
|
581
|
+
window.removeEventListener("resize", p), d = [];
|
|
582
|
+
}
|
|
583
|
+
function v(e) {
|
|
584
|
+
if (!r || !e || e.bottom < 0 || e.top > window.innerHeight) return;
|
|
585
|
+
r.style.position = "absolute", r.style.zIndex = "9999";
|
|
586
|
+
let t = r.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0;
|
|
587
|
+
r.style.left = `${e.left - (t?.left ?? 0)}px`, r.style.top = `${e.bottom - n}px`;
|
|
588
|
+
let i = r.offsetHeight;
|
|
589
|
+
if (i !== 0 && window.innerHeight - e.bottom < i) {
|
|
590
|
+
let t = Math.max(0, e.top - i);
|
|
591
|
+
r.style.top = `${t - n}px`;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
function y(e, t) {
|
|
595
|
+
let n = t?.closest("[data-tpl-theme]");
|
|
596
|
+
if (!n) return;
|
|
597
|
+
let r = n.getAttribute("data-tpl-theme");
|
|
598
|
+
r && e.setAttribute("data-tpl-theme", r);
|
|
599
|
+
let i = window.getComputedStyle(n);
|
|
600
|
+
for (let t = 0; t < i.length; t++) {
|
|
601
|
+
let n = i[t];
|
|
602
|
+
n.startsWith("--tpl-") && e.style.setProperty(n, i.getPropertyValue(n));
|
|
603
|
+
}
|
|
604
|
+
e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
|
|
605
|
+
}
|
|
606
|
+
function b(e) {
|
|
607
|
+
i && (e ? (i.setAttribute("role", "combobox"), i.setAttribute("aria-haspopup", "listbox"), i.setAttribute("aria-expanded", "true"), i.setAttribute("aria-controls", l)) : (i.removeAttribute("aria-expanded"), i.removeAttribute("aria-controls"), i.removeAttribute("aria-activedescendant"), i.removeAttribute("aria-haspopup"), i.removeAttribute("role")));
|
|
608
|
+
}
|
|
609
|
+
function x() {
|
|
610
|
+
if (i) {
|
|
611
|
+
if (o.value.length === 0) {
|
|
612
|
+
i.removeAttribute("aria-activedescendant");
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
i.setAttribute("aria-activedescendant", `${l}-opt-${s.value}`);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
function S(e) {
|
|
619
|
+
c?.(e);
|
|
620
|
+
}
|
|
621
|
+
return {
|
|
622
|
+
open: ({ items: a, getRect: d, anchorEl: f, onCommand: p }) => {
|
|
623
|
+
o.value = a, s.value = 0, c = p, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), i = f, y(r, f), (t?.value ?? document.body).appendChild(r), n = C({ render() {
|
|
624
|
+
return E(Ze, {
|
|
625
|
+
items: o.value,
|
|
626
|
+
selectedIndex: s.value,
|
|
627
|
+
emptyText: e,
|
|
628
|
+
listId: l,
|
|
629
|
+
onSelect: (e) => S(e),
|
|
630
|
+
onHover: (e) => {
|
|
631
|
+
s.value = e, x();
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
} }), n.mount(r), b(!0), x(), u = d, m(), g(f);
|
|
635
|
+
},
|
|
636
|
+
update: ({ items: e, getRect: t, onCommand: n }) => {
|
|
637
|
+
o.value = e, s.value >= e.length && (s.value = 0), c = n, x(), u = t, m();
|
|
638
|
+
},
|
|
639
|
+
handleKeyDown: (e) => {
|
|
640
|
+
let t = tt(e, o.value, s, S);
|
|
641
|
+
return t && x(), t;
|
|
642
|
+
},
|
|
643
|
+
close: () => {
|
|
644
|
+
r !== null && (f !== null && (cancelAnimationFrame(f), f = null), _(), b(!1), n?.unmount(), r.remove(), n = null, r = null, i = null, c = null, u = null);
|
|
645
|
+
},
|
|
646
|
+
isOpen: () => r !== null
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/utils/mergeTagTrigger.ts
|
|
651
|
+
function rt(e, t, n, r) {
|
|
652
|
+
if (!n) return null;
|
|
653
|
+
let i = e.slice(0, t), a = i.lastIndexOf(n);
|
|
654
|
+
if (a === -1) return null;
|
|
655
|
+
let o = i.slice(a + n.length);
|
|
656
|
+
return /\s/.test(o) || r && o.includes(r) ? null : {
|
|
657
|
+
triggerStart: a,
|
|
658
|
+
caret: t,
|
|
659
|
+
query: o
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region src/utils/textFieldCaret.ts
|
|
664
|
+
var it = /* @__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(".");
|
|
665
|
+
function at(e, t, n) {
|
|
666
|
+
return {
|
|
667
|
+
left: e,
|
|
668
|
+
top: t,
|
|
669
|
+
bottom: n,
|
|
670
|
+
right: e,
|
|
671
|
+
width: 0,
|
|
672
|
+
height: n - t,
|
|
673
|
+
x: e,
|
|
674
|
+
y: t,
|
|
675
|
+
toJSON: () => ({})
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
function ot(e, t) {
|
|
679
|
+
let n = e.ownerDocument, r = n.defaultView;
|
|
680
|
+
if (!r) return null;
|
|
681
|
+
let i = e.tagName === "INPUT", a = r.getComputedStyle(e), o = n.createElement("div");
|
|
682
|
+
o.setAttribute("aria-hidden", "true");
|
|
683
|
+
let s = o.style;
|
|
684
|
+
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";
|
|
685
|
+
let c = s, l = a;
|
|
686
|
+
for (let e of it) c[e] = l[e];
|
|
687
|
+
i && (s.width = "auto", s.whiteSpace = "pre");
|
|
688
|
+
let u = e.value, d = u.slice(0, t);
|
|
689
|
+
i && (d = d.replace(/\s/g, "\xA0")), o.textContent = d;
|
|
690
|
+
let f = n.createElement("span");
|
|
691
|
+
f.textContent = u.slice(t) || ".", o.appendChild(f), n.body.appendChild(o);
|
|
692
|
+
let p = f.offsetTop, m = f.offsetLeft;
|
|
693
|
+
n.body.removeChild(o);
|
|
694
|
+
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;
|
|
695
|
+
if (i) return at(y, h.top, h.bottom);
|
|
696
|
+
let b = h.top + p + g - e.scrollTop;
|
|
697
|
+
return at(y, b, b + v);
|
|
698
|
+
}
|
|
699
|
+
//#endregion
|
|
700
|
+
//#region src/composables/useMergeTagAutocomplete.ts
|
|
701
|
+
var st = /* @__PURE__ */ new Set([
|
|
702
|
+
"ArrowLeft",
|
|
703
|
+
"ArrowRight",
|
|
704
|
+
"Home",
|
|
705
|
+
"End"
|
|
706
|
+
]);
|
|
707
|
+
function ct(t) {
|
|
708
|
+
let { elementRef: n, modelValue: i, emit: a, mergeTags: o, syntax: c, enabled: l, onInsert: u } = t, d = A(c), f = k(c), m = p(() => l && d !== null && o.value.length > 0), h = e(j, null), _ = nt((S(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", se()), v = !1;
|
|
709
|
+
r() && s(() => {
|
|
710
|
+
v = !0, _.close();
|
|
711
|
+
});
|
|
712
|
+
function y(e) {
|
|
713
|
+
let t = e.value ?? "";
|
|
714
|
+
return rt(t, e.selectionStart ?? t.length, d, f);
|
|
715
|
+
}
|
|
716
|
+
function b(e, t, r) {
|
|
717
|
+
let o = e.value ?? i(), s = o.slice(t.caret), c = f && s.startsWith(f) ? f.length : 0, l = o.slice(0, t.triggerStart), d = o.slice(t.caret + c), p = l + r.value + d, m = l.length + r.value.length;
|
|
718
|
+
u?.(), a(p), _.close(), g(() => {
|
|
719
|
+
if (v) return;
|
|
720
|
+
let e = n.value;
|
|
721
|
+
e?.focus(), e?.setSelectionRange(m, m);
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
function x() {
|
|
725
|
+
if (!m.value || v) return;
|
|
726
|
+
let e = n.value;
|
|
727
|
+
if (!e) {
|
|
728
|
+
_.close();
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
let t = y(e);
|
|
732
|
+
if (!t) {
|
|
733
|
+
_.close();
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
let r = et(o.value, t.query), i = () => ot(e, t.triggerStart), a = (n) => b(e, t, n);
|
|
737
|
+
_.isOpen() ? _.update({
|
|
738
|
+
items: r,
|
|
739
|
+
getRect: i,
|
|
740
|
+
onCommand: a
|
|
741
|
+
}) : _.open({
|
|
742
|
+
items: r,
|
|
743
|
+
getRect: i,
|
|
744
|
+
anchorEl: e,
|
|
745
|
+
onCommand: a
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
function C(e) {
|
|
749
|
+
return _.isOpen() ? e.key === "Escape" ? (_.close(), !0) : st.has(e.key) ? (_.close(), !1) : _.handleKeyDown(e) : !1;
|
|
750
|
+
}
|
|
751
|
+
return {
|
|
752
|
+
available: m,
|
|
753
|
+
refresh: x,
|
|
754
|
+
handleKeydown: C,
|
|
755
|
+
close: () => _.close(),
|
|
756
|
+
isOpen: () => _.isOpen()
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region src/composables/useMergeTagField.ts
|
|
761
|
+
function lt(e) {
|
|
762
|
+
let { modelValue: t, emit: n, elementRef: i } = e, { mergeTags: o, canRequestMergeTag: c, isRequesting: l, isMergeTagValue: u, getMergeTagDisplayLabel: d, findMergeTag: f, requestMergeTag: m, syntax: h, autocomplete: _ } = I(), { canInsertLogicTag: v, isRequesting: y, requestLogicTag: b } = L(), x = a(!1), S = !1, C = !1;
|
|
763
|
+
r() && s(() => {
|
|
764
|
+
C = !0;
|
|
765
|
+
});
|
|
766
|
+
let w = ct({
|
|
767
|
+
elementRef: i,
|
|
768
|
+
modelValue: t,
|
|
769
|
+
emit: n,
|
|
770
|
+
mergeTags: o,
|
|
771
|
+
syntax: h,
|
|
772
|
+
enabled: _,
|
|
773
|
+
onInsert: () => {
|
|
774
|
+
x.value = !0;
|
|
775
|
+
}
|
|
776
|
+
}), T = p(() => {
|
|
777
|
+
let e = t();
|
|
778
|
+
if (!e) return [];
|
|
779
|
+
let n = [], r = `(${h.value.source}|${h.logic.source})`, i = new RegExp(r, "g"), a = 0, o;
|
|
780
|
+
for (; (o = i.exec(e)) !== null;) {
|
|
781
|
+
o.index > a && n.push({
|
|
782
|
+
type: "text",
|
|
783
|
+
value: e.slice(a, o.index)
|
|
784
|
+
});
|
|
785
|
+
let t = o[0];
|
|
786
|
+
u(t) ? n.push({
|
|
787
|
+
type: "mergeTag",
|
|
788
|
+
value: t,
|
|
789
|
+
label: d(t)
|
|
790
|
+
}) : ee(t, h) ? n.push({
|
|
791
|
+
type: "logicMergeTag",
|
|
792
|
+
value: t,
|
|
793
|
+
keyword: O(t, h)
|
|
794
|
+
}) : n.push({
|
|
795
|
+
type: "text",
|
|
796
|
+
value: t
|
|
797
|
+
}), a = o.index + t.length;
|
|
798
|
+
}
|
|
799
|
+
return a < e.length && n.push({
|
|
800
|
+
type: "text",
|
|
801
|
+
value: e.slice(a)
|
|
802
|
+
}), n;
|
|
803
|
+
}), E = p(() => T.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
804
|
+
function D() {
|
|
805
|
+
x.value = !0, g(() => {
|
|
806
|
+
i.value?.focus();
|
|
807
|
+
let e = t()?.length || 0;
|
|
808
|
+
i.value?.setSelectionRange(e, e);
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
function k() {
|
|
812
|
+
S || (x.value = !1);
|
|
813
|
+
}
|
|
814
|
+
function A(e) {
|
|
815
|
+
n(e.target.value), w.refresh();
|
|
816
|
+
}
|
|
817
|
+
function te(e) {
|
|
818
|
+
return w.handleKeydown(e) ? (e.preventDefault(), !0) : (e.key === "Escape" && k(), !1);
|
|
819
|
+
}
|
|
820
|
+
function ne() {
|
|
821
|
+
w.refresh();
|
|
822
|
+
}
|
|
823
|
+
function re() {
|
|
824
|
+
w.close(), k();
|
|
825
|
+
}
|
|
826
|
+
function ie() {
|
|
827
|
+
n("");
|
|
828
|
+
}
|
|
829
|
+
async function j() {
|
|
830
|
+
let e = x.value && i.value ? i.value.selectionStart ?? t().length : t().length;
|
|
831
|
+
S = !0;
|
|
832
|
+
let r;
|
|
833
|
+
try {
|
|
834
|
+
r = await m();
|
|
835
|
+
} finally {
|
|
836
|
+
S = !1;
|
|
837
|
+
}
|
|
838
|
+
if (!C && r) {
|
|
839
|
+
let a = t().slice(0, e), o = t().slice(e), s = a + r.value + o;
|
|
840
|
+
n(s), x.value = !0, g(() => {
|
|
841
|
+
if (C) return;
|
|
842
|
+
let t = e + r.value.length;
|
|
843
|
+
i.value?.focus(), i.value?.setSelectionRange(t, t);
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
async function M(e) {
|
|
848
|
+
let t = T.value, r = t[e];
|
|
849
|
+
if (r?.type !== "mergeTag") return;
|
|
850
|
+
S = !0;
|
|
851
|
+
let i;
|
|
852
|
+
try {
|
|
853
|
+
i = await m({
|
|
854
|
+
reason: "edit",
|
|
855
|
+
current: f(r.value)
|
|
856
|
+
});
|
|
857
|
+
} finally {
|
|
858
|
+
S = !1;
|
|
859
|
+
}
|
|
860
|
+
!C && i && n(t.map((t, n) => n === e ? i.value : t.value).join(""));
|
|
861
|
+
}
|
|
862
|
+
async function ae() {
|
|
863
|
+
let e = i.value, r = e?.selectionStart ?? t().length, a = e?.selectionEnd ?? r;
|
|
864
|
+
S = !0;
|
|
865
|
+
let o;
|
|
866
|
+
try {
|
|
867
|
+
o = await b();
|
|
868
|
+
} finally {
|
|
869
|
+
S = !1;
|
|
870
|
+
}
|
|
871
|
+
if (C || !o) return;
|
|
872
|
+
let s = t(), c, l;
|
|
873
|
+
"before" in o ? (c = s.slice(0, r) + o.before + s.slice(r, a) + o.after + s.slice(a), l = r + o.before.length + (a - r)) : (c = s.slice(0, r) + o.value + s.slice(r), l = r + o.value.length), n(c), x.value = !0, g(() => {
|
|
874
|
+
C || (i.value?.focus(), i.value?.setSelectionRange(l, l));
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
return {
|
|
878
|
+
segments: T,
|
|
879
|
+
hasMergeTags: E,
|
|
880
|
+
canRequestMergeTag: c,
|
|
881
|
+
isRequestingMergeTag: l,
|
|
882
|
+
canInsertLogicTag: v,
|
|
883
|
+
isRequestingLogicTag: y,
|
|
884
|
+
isEditing: x,
|
|
885
|
+
startEditing: D,
|
|
886
|
+
stopEditing: k,
|
|
887
|
+
handleInput: A,
|
|
888
|
+
handleKeydown: te,
|
|
889
|
+
handleClick: ne,
|
|
890
|
+
handleBlur: re,
|
|
891
|
+
clearValue: ie,
|
|
892
|
+
insertMergeTag: j,
|
|
893
|
+
replaceMergeTagAt: M,
|
|
894
|
+
insertLogicTag: ae,
|
|
895
|
+
autocompleteAvailable: w.available
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
//#endregion
|
|
899
|
+
//#region src/components/MergeTagSegments.vue?vue&type=script&setup=true&lang.ts
|
|
900
|
+
var ut = ["aria-label"], dt = [
|
|
901
|
+
"data-tooltip",
|
|
902
|
+
"aria-label",
|
|
903
|
+
"onClick"
|
|
904
|
+
], ft = ["data-tooltip"], pt = ["data-tooltip"], mt = {
|
|
905
|
+
key: 3,
|
|
906
|
+
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
907
|
+
}, ht = ["aria-label", "title"], gt = ["aria-label", "title"], _t = /* @__PURE__ */ o({
|
|
908
|
+
__name: "MergeTagSegments",
|
|
909
|
+
props: {
|
|
910
|
+
segments: {},
|
|
911
|
+
displayClass: {},
|
|
912
|
+
pulse: { type: Boolean }
|
|
913
|
+
},
|
|
914
|
+
emits: [
|
|
915
|
+
"edit",
|
|
916
|
+
"clear",
|
|
917
|
+
"repick"
|
|
918
|
+
],
|
|
919
|
+
setup(e, { emit: n }) {
|
|
920
|
+
let r = n, { t: a, format: o } = M(), { canRepickMergeTag: s, showRawValue: u } = I();
|
|
921
|
+
function f() {
|
|
922
|
+
r("edit");
|
|
923
|
+
}
|
|
924
|
+
return (n, p) => (i(), m("div", {
|
|
925
|
+
role: "group",
|
|
926
|
+
"aria-label": c(a).mergeTag.fieldGroup,
|
|
927
|
+
class: d([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
928
|
+
onClick: f
|
|
929
|
+
}, [
|
|
930
|
+
(i(!0), m(w, null, t(e.segments, (e, t) => (i(), m(w, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" && c(s)(e.value) ? (i(), m("button", {
|
|
931
|
+
key: 0,
|
|
932
|
+
type: "button",
|
|
933
|
+
class: d(["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", c(u) ? "tpl-tooltip" : ""]),
|
|
934
|
+
"data-tooltip": c(u) ? e.value : void 0,
|
|
935
|
+
"aria-label": c(o)(c(a).mergeTag.changeTag, { label: e.label }),
|
|
936
|
+
"data-testid": "merge-tag-field-chip",
|
|
937
|
+
style: {
|
|
938
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
939
|
+
color: "var(--tpl-primary)"
|
|
940
|
+
},
|
|
941
|
+
onClick: _((e) => r("repick", t), ["stop"])
|
|
942
|
+
}, T(e.label), 11, dt)) : e.type === "mergeTag" ? (i(), m("span", {
|
|
943
|
+
key: 1,
|
|
944
|
+
class: d(["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", c(u) ? "tpl-tooltip" : ""]),
|
|
945
|
+
"data-tooltip": c(u) ? e.value : void 0,
|
|
946
|
+
style: {
|
|
947
|
+
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
948
|
+
color: "var(--tpl-primary)"
|
|
949
|
+
}
|
|
950
|
+
}, T(e.label), 11, ft)) : e.type === "logicMergeTag" ? (i(), m("span", {
|
|
951
|
+
key: 2,
|
|
952
|
+
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",
|
|
953
|
+
"data-tooltip": e.value,
|
|
954
|
+
style: {
|
|
955
|
+
"background-color": "transparent",
|
|
956
|
+
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
957
|
+
color: "var(--tpl-primary)"
|
|
958
|
+
}
|
|
959
|
+
}, T(e.keyword), 9, pt)) : (i(), m("span", mt, T(e.value), 1))], 64))), 128)),
|
|
960
|
+
x("button", {
|
|
961
|
+
type: "button",
|
|
962
|
+
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",
|
|
963
|
+
"aria-label": c(a).mergeTag.editAsText,
|
|
964
|
+
title: c(a).mergeTag.editAsText,
|
|
965
|
+
"data-testid": "merge-tag-field-edit",
|
|
966
|
+
onClick: _(f, ["stop"])
|
|
967
|
+
}, [l(c(N), {
|
|
968
|
+
size: 12,
|
|
969
|
+
"stroke-width": 2
|
|
970
|
+
})], 8, ht),
|
|
971
|
+
x("button", {
|
|
972
|
+
type: "button",
|
|
973
|
+
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",
|
|
974
|
+
"aria-label": c(a).mergeTag.remove,
|
|
975
|
+
title: c(a).mergeTag.remove,
|
|
976
|
+
"data-testid": "merge-tag-field-clear",
|
|
977
|
+
onClick: p[0] ||= _((e) => r("clear"), ["stop"])
|
|
978
|
+
}, [l(c(F), {
|
|
979
|
+
size: 12,
|
|
980
|
+
"stroke-width": 2.5
|
|
981
|
+
})], 8, gt)
|
|
982
|
+
], 10, ut));
|
|
983
|
+
}
|
|
984
|
+
}), vt = [
|
|
985
|
+
"aria-label",
|
|
986
|
+
"title",
|
|
987
|
+
"disabled"
|
|
988
|
+
], yt = "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)]", bt = /* @__PURE__ */ o({
|
|
989
|
+
__name: "MergeTagInsertButton",
|
|
990
|
+
props: { disabled: { type: Boolean } },
|
|
991
|
+
emits: ["insert"],
|
|
992
|
+
setup(e) {
|
|
993
|
+
let { t } = M();
|
|
994
|
+
return (n, r) => (i(), m("button", {
|
|
995
|
+
type: "button",
|
|
996
|
+
class: d([yt, "tpl:mt-1.5"]),
|
|
997
|
+
"aria-label": c(t).mergeTag.insert,
|
|
998
|
+
title: c(t).mergeTag.insert,
|
|
999
|
+
disabled: e.disabled,
|
|
1000
|
+
onMousedown: r[0] ||= _(() => {}, ["prevent"]),
|
|
1001
|
+
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
1002
|
+
}, [l(c(ue), {
|
|
1003
|
+
size: 12,
|
|
1004
|
+
"stroke-width": 2
|
|
1005
|
+
}), D(" " + T(c(t).mergeTag.insertShort), 1)], 42, vt));
|
|
1006
|
+
}
|
|
1007
|
+
}), xt = [
|
|
1008
|
+
"aria-label",
|
|
1009
|
+
"title",
|
|
1010
|
+
"disabled"
|
|
1011
|
+
], St = "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)]", Ct = /* @__PURE__ */ o({
|
|
1012
|
+
__name: "LogicTagInsertButton",
|
|
1013
|
+
props: { disabled: { type: Boolean } },
|
|
1014
|
+
emits: ["insert"],
|
|
1015
|
+
setup(e) {
|
|
1016
|
+
let { t } = M();
|
|
1017
|
+
return (n, r) => (i(), m("button", {
|
|
1018
|
+
type: "button",
|
|
1019
|
+
class: d([St, "tpl:mt-1.5"]),
|
|
1020
|
+
"aria-label": c(t).logicTag.insert,
|
|
1021
|
+
title: c(t).logicTag.insert,
|
|
1022
|
+
disabled: e.disabled,
|
|
1023
|
+
"data-testid": "field-insert-logic-button",
|
|
1024
|
+
onMousedown: r[0] ||= _(() => {}, ["prevent"]),
|
|
1025
|
+
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
1026
|
+
}, [l(c(P), {
|
|
1027
|
+
size: 12,
|
|
1028
|
+
"stroke-width": 2
|
|
1029
|
+
}), D(" " + T(c(t).logicTag.insertShort), 1)], 42, xt));
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
//#endregion
|
|
1033
|
+
export { nt as a, Ge as c, lt as i, bt as n, et as o, _t as r, tt as s, Ct as t };
|
|
1034
|
+
|
|
1035
|
+
//# sourceMappingURL=LogicTagInsertButton-DpyPozop.js.map
|