@templatical/editor 0.56.0 → 0.56.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/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-CpZ7UeAZ.js} +3 -3
- package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
- package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cy05P-iO.js} +53 -53
- package/dist/{AiPanels-DAsnX-a3.js → AiPanels-CwKmXzyr.js} +1 -1
- package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-DgqJHnza.js} +8 -8
- package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-CxHJmuOh.js} +3 -3
- package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-DEmNZkEG.js} +44 -44
- package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-Bmlf05Il.js} +11 -11
- package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-C27GCMvK.js} +7 -7
- package/dist/{CommentsPanel-C5qG17Ki.js → CommentsPanel-B5NqPMmY.js} +1 -1
- package/dist/{CommentsSidebar-C7CWcUYZ.js → CommentsSidebar-BDrcrDxS.js} +42 -42
- package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-D8dqjm3F.js} +6 -6
- package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
- package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-uwuzeMSW.js} +87 -87
- package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
- package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-CDK_9D7P.js} +8 -8
- package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-BSolF7Fd.js} +3 -3
- package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-C8yc9dxt.js} +7 -7
- package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-FI4I8asn.js} +1 -1
- package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-B1nl2ZMT.js} +12 -12
- package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-DJlf3VbS.js} +1 -1
- package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-Dqco128s.js} +156 -156
- package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
- package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-xIEF0Y3Z.js} +2 -2
- package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CQlCP_XC.js} +46 -46
- package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-BXA32Fx6.js} +23 -23
- package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
- package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
- package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-CYFtR8zv.js} +41 -41
- package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-BbaL17HO.js} +20 -20
- package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-DhB1CSpg.js} +1 -1
- package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-3BRl8u5l.js} +21 -21
- package/dist/{Toolbar-XT-uGA9J.js → Toolbar-pzNIakGM.js} +656 -656
- package/dist/{TplModal-7NQq5-VW.js → TplModal-WNuWhHZm.js} +4 -4
- package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu--T-Qp_mH.js} +15 -15
- package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
- package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
- package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-CjfCPceb.js} +11 -11
- package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-12OMwVyN.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-PFjTrl0y.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-BMjzvApH.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-C2gpq4kP.js} +107 -107
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js → AiPanels-Cx3PE2mE.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-jMLVaiKx.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-CnkyjPEu.js} +11 -11
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DncZ-HDf.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-B3HkuENF.js.map → BlockPreviewCanvas-CCSEzL46.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-CRztnw4M.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-IuLYT2x7.js} +8 -8
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js → CommentsPanel-lgjJNrrY.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-EtdTzTmq.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js → CommentsSidebar-DTold7iy.js} +214 -214
- package/dist/cdn/chunks/{CommentsSidebar-Qmj049QX.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-8aPSExrv.js} +7 -7
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-CnWQEW5g.js} +50 -50
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-CrplCzo8.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-B6MNInCL.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-TxeAl8Iq.js} +9 -9
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-DvSVx2DB.js} +4 -4
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-DvSVx2DB.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-tGK6htBl.js} +8 -8
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BVrQYz2C.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-DeuNH3re.js} +13 -13
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B2xxIU3e.js} +2 -2
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-Dze4C9VI.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-YwwRbxPc.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-BiFP2Cbx.js} +20 -20
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-BrivPMk2.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CzPkkL2s.js} +19 -19
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-VH07SzX7.js} +550 -550
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js.map → Toolbar-VH07SzX7.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-DMe6J811.js} +6 -6
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-DMe6J811.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-DkwbKhBl.js} +15 -15
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-CCCIcqe2.js} +12 -12
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-CCCIcqe2.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-D3lsO7Io.js} +925 -925
- package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-CE79GB1H.js} +15 -15
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
- package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CN69NlOK.js} +170 -170
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CN69NlOK.js.map} +1 -1
- package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-8dlM-fU4.js} +96 -96
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-8dlM-fU4.js.map} +1 -1
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js → sanitizeHtml-B3njfkSy.js} +11 -11
- package/dist/cdn/chunks/{sanitizeHtml-DJI7vvET.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-BFgc3qqJ.js} +2 -2
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-GgKlXNxy.js} +2 -2
- package/dist/cdn/chunks/{src-Bfj1jHnn.js.map → src-GgKlXNxy.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-B0PDeDxl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BSU75bKk.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
- package/dist/cdn/editor.js +325 -325
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-CRX6rncm.js → composables-DreAt_0A.js} +1031 -1031
- package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-CL4tUlDC.js} +14 -14
- package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
- package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
- package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
- package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
- package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
- package/dist/dist-CiYotUR8.js +406 -0
- package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
- package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
- package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
- package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
- package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
- package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
- package/dist/{editor-modal-D9HT9bD6.js → editor-modal-BD32TXws.js} +106 -106
- package/dist/en-Dgs_-NBw.js +1 -0
- package/dist/{extensions-Cm6K4SRX.js → extensions-DKxHlSd7.js} +179 -179
- package/dist/{socialIcons-CJD6OsI7.js → socialIcons-oo4uL16Y.js} +1 -1
- package/dist/templatical-editor.js +526 -526
- package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-B4Zpk3eo.js} +3 -3
- package/dist/{useMergeTag-IoWOO679.js → useMergeTag-B5qlq8px.js} +7 -7
- package/package.json +7 -7
- package/dist/LanguageMenu-B981Av-6.js +0 -403
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/en-De3uAutQ.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { g as e } from "./dist-BMUUt3zJ.js";
|
|
2
|
+
import { et as t, w as n } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
3
3
|
import { A as r, B as i, M as a, N as o, U as s, j as c } from "./keys-w_VRjoMu.js";
|
|
4
4
|
// src/composables/useLogicTag.ts
|
|
5
5
|
function l() {
|
|
6
|
-
let l =
|
|
6
|
+
let l = n(c, []), u = n(r, []), d = n(i, e.liquid), f = n(s, null), p = n(a, null), m = n(o, null) ?? t(!1), h = !!f || l.length > 0 || u.length > 0, g = l.length > 0 || u.length > 0;
|
|
7
7
|
async function _() {
|
|
8
8
|
if (f) {
|
|
9
9
|
m.value = !0;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { bt as e, g as t, ut as n } from "./dist-BMUUt3zJ.js";
|
|
2
|
+
import { c as r, et as i, w as a } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
3
3
|
import { B as o, F as s, G as c, I as l, L as u, P as d, V as f, nt as p, z as m } from "./keys-w_VRjoMu.js";
|
|
4
4
|
// src/composables/useMergeTag.ts
|
|
5
5
|
function h() {
|
|
6
|
-
let h =
|
|
7
|
-
function C(
|
|
8
|
-
return
|
|
6
|
+
let h = a(d, f), g = a(o, t.liquid), _ = a(c, null), v = a(s, !0), y = a(l, null), b = a(m, !0), x = a(p, null)?.mergeTag.unknownLabel ?? "Merge tag", S = a(u, null) ?? i(!1);
|
|
7
|
+
function C(t) {
|
|
8
|
+
return e(t, g);
|
|
9
9
|
}
|
|
10
10
|
function w(e) {
|
|
11
|
-
return
|
|
11
|
+
return n(e, h.value);
|
|
12
12
|
}
|
|
13
13
|
function T(e) {
|
|
14
14
|
return h.value.find((t) => t.value === e);
|
|
@@ -42,7 +42,7 @@ function h() {
|
|
|
42
42
|
return {
|
|
43
43
|
mergeTags: h,
|
|
44
44
|
isRequesting: S,
|
|
45
|
-
canRequestMergeTag:
|
|
45
|
+
canRequestMergeTag: r(() => !!_ || h.value.length > 0),
|
|
46
46
|
autocomplete: v,
|
|
47
47
|
syntax: g,
|
|
48
48
|
isMergeTagValue: C,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.56.
|
|
4
|
+
"version": "0.56.1",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@lucide/vue": "^1.67.0",
|
|
8
|
-
"@templatical/core": "0.56.
|
|
9
|
-
"@templatical/media-library": "0.56.
|
|
10
|
-
"@templatical/types": "0.56.
|
|
8
|
+
"@templatical/core": "0.56.1",
|
|
9
|
+
"@templatical/media-library": "0.56.1",
|
|
10
|
+
"@templatical/types": "0.56.1",
|
|
11
11
|
"@tiptap/core": "^3.32.2",
|
|
12
12
|
"@tiptap/extension-color": "^3.32.2",
|
|
13
13
|
"@tiptap/extension-font-family": "^3.32.2",
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"license": "FSL-1.1-MIT",
|
|
66
66
|
"module": "./dist/templatical-editor.js",
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@templatical/quality": "0.56.
|
|
68
|
+
"@templatical/quality": "0.56.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@templatical/quality": "0.56.
|
|
72
|
-
"@templatical/renderer": "0.56.
|
|
71
|
+
"@templatical/quality": "0.56.1",
|
|
72
|
+
"@templatical/renderer": "0.56.1",
|
|
73
73
|
"pusher-js": "^8.6.0"
|
|
74
74
|
},
|
|
75
75
|
"peerDependenciesMeta": {
|
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
import { B as e, Ft as t, M as n, Mt as r, O as i, P as a, U as ee, _ as o, c as s, ct as c, d as l, et as u, f as d, g as f, l as p, r as m, u as h, w as g, y as _ } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
|
-
import { At as te, et as ne, jt as v, st as re, tt as ie } from "./dist-BMUUt3zJ.js";
|
|
3
|
-
import { t as y } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
4
|
-
import { t as b } from "./createLucideIcon-CfBdtoUw.js";
|
|
5
|
-
import { t as x } from "./check-CcuCoJDh.js";
|
|
6
|
-
import { t as ae } from "./chevron-down-BfYIbFbC.js";
|
|
7
|
-
import { t as oe } from "./chevron-right-DyjFqY35.js";
|
|
8
|
-
import { t as se } from "./plus-DxZiv9YC.js";
|
|
9
|
-
import { t as ce } from "./trash-Cr7rD5Hh.js";
|
|
10
|
-
import { t as S } from "./triangle-alert-CKcpwtUj.js";
|
|
11
|
-
import { E as le, h as ue, it as de, t as fe } from "./keys-w_VRjoMu.js";
|
|
12
|
-
import { t as pe } from "./useI18n-zeWYtWSv.js";
|
|
13
|
-
import { t as me } from "./useLocalizedDisplay-Cbhx208c.js";
|
|
14
|
-
import { t as C } from "./plural-CyxrJXL1.js";
|
|
15
|
-
import { t as w } from "./languageName-DEEOhDWI.js";
|
|
16
|
-
import { C as he, b as ge, f as _e, u as ve, w as ye } from "./styleConstants-CgiNKdnc.js";
|
|
17
|
-
import { t as be } from "./dist-0alKVRc_.js";
|
|
18
|
-
import { t as xe } from "./TplModal-7NQq5-VW.js";
|
|
19
|
-
var Se = b({
|
|
20
|
-
name: "arrow-up-to-line",
|
|
21
|
-
size: 24,
|
|
22
|
-
node: [
|
|
23
|
-
["path", {
|
|
24
|
-
d: "M5 3h14",
|
|
25
|
-
key: "7usisc"
|
|
26
|
-
}],
|
|
27
|
-
["path", {
|
|
28
|
-
d: "m18 13-6-6-6 6",
|
|
29
|
-
key: "1kf1n9"
|
|
30
|
-
}],
|
|
31
|
-
["path", {
|
|
32
|
-
d: "M12 7v14",
|
|
33
|
-
key: "1akyts"
|
|
34
|
-
}]
|
|
35
|
-
]
|
|
36
|
-
}), Ce = b({
|
|
37
|
-
name: "ellipsis",
|
|
38
|
-
size: 24,
|
|
39
|
-
node: [
|
|
40
|
-
["circle", {
|
|
41
|
-
cx: "12",
|
|
42
|
-
cy: "12",
|
|
43
|
-
r: "1",
|
|
44
|
-
key: "41hilf"
|
|
45
|
-
}],
|
|
46
|
-
["circle", {
|
|
47
|
-
cx: "19",
|
|
48
|
-
cy: "12",
|
|
49
|
-
r: "1",
|
|
50
|
-
key: "1wjl8i"
|
|
51
|
-
}],
|
|
52
|
-
["circle", {
|
|
53
|
-
cx: "5",
|
|
54
|
-
cy: "12",
|
|
55
|
-
r: "1",
|
|
56
|
-
key: "1pcz8c"
|
|
57
|
-
}]
|
|
58
|
-
],
|
|
59
|
-
aliases: ["more-horizontal"]
|
|
60
|
-
}), we = [
|
|
61
|
-
"aria-expanded",
|
|
62
|
-
"title",
|
|
63
|
-
"aria-label"
|
|
64
|
-
], Te = { class: "tpl-language-name" }, Ee = {
|
|
65
|
-
class: "tpl-language-tag tpl:truncate",
|
|
66
|
-
"aria-hidden": "true"
|
|
67
|
-
}, De = { class: "tpl-language-count tpl:shrink-0 tpl:tabular-nums" }, Oe = ["aria-label"], ke = { class: "tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ae = { class: "tpl:max-h-64 tpl:overflow-y-auto" }, je = ["data-active"], Me = [
|
|
68
|
-
"aria-checked",
|
|
69
|
-
"data-testid",
|
|
70
|
-
"onClick"
|
|
71
|
-
], Ne = { class: "tpl:flex tpl:w-3 tpl:shrink-0" }, Pe = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, Fe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ie = ["data-testid"], Le = [
|
|
72
|
-
"data-testid",
|
|
73
|
-
"aria-expanded",
|
|
74
|
-
"aria-label",
|
|
75
|
-
"onClick"
|
|
76
|
-
], Re = ["aria-label"], ze = [
|
|
77
|
-
"data-testid",
|
|
78
|
-
"aria-disabled",
|
|
79
|
-
"aria-label",
|
|
80
|
-
"aria-describedby",
|
|
81
|
-
"onClick"
|
|
82
|
-
], Be = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-1" }, Ve = ["data-testid", "onClick"], He = {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: "tpl:relative tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
85
|
-
}, Ue = ["aria-expanded"], We = ["aria-label"], Ge = ["data-testid", "onClick"], Ke = ["aria-label"], qe = { class: "tpl:m-0 tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Je = {
|
|
86
|
-
key: 0,
|
|
87
|
-
class: "tpl:mb-4 tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
88
|
-
}, Ye = {
|
|
89
|
-
key: 1,
|
|
90
|
-
class: "tpl:mb-4 tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
91
|
-
}, Xe = {
|
|
92
|
-
key: 2,
|
|
93
|
-
role: "alert",
|
|
94
|
-
"data-testid": "language-default-error",
|
|
95
|
-
class: "tpl:mb-4 tpl:flex tpl:items-start tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-danger)]"
|
|
96
|
-
}, Ze = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Qe = ["data-testid"], $e = ["data-testid", "disabled"], T = "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:border-0 tpl:bg-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", E = "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:shadow-[var(--tpl-shadow-md)]", D = /*#__PURE__*/ y(/* @__PURE__ */ _({
|
|
97
|
-
__name: "LanguageMenu",
|
|
98
|
-
props: {
|
|
99
|
-
editor: {},
|
|
100
|
-
locales: {}
|
|
101
|
-
},
|
|
102
|
-
setup(_) {
|
|
103
|
-
let y = _, { t: b, format: D } = pe(), O = g(de, void 0) ?? "en", et = g(le, null), k = g(ue, []), A = u(null), j = u(null), M = `tpl-language-reason-${re()}`, N = u(!1), P = u(null), F = u(null), I = u(null), L = u(null), R = u(null), z = s(() => ie(y.editor.content.value)), B = s(() => y.editor.activeLocale?.value ?? z.value), V = s(() => y.editor.content.value.settings.locales ?? []), H = s(() => y.locales.filter((e) => e !== z.value && !V.value.includes(e))), U = s(() => B.value === z.value || y.locales.includes(B.value)), W = g(fe, null) ?? me(y.editor, k), tt = s(() => N.value ? [z.value, ...V.value].map((e) => ({
|
|
104
|
-
locale: e,
|
|
105
|
-
coverage: e === z.value ? null : e === B.value ? W.value : te(y.editor.content.value, e, k)
|
|
106
|
-
})) : []), nt = s(() => P.value && V.value.includes(P.value) && U.value && y.locales.includes(P.value) ? v(y.editor.content.value, P.value) : []), G = s(() => y.locales.includes(z.value)), K = s(() => nt.value.length > 0 || !G.value), q = s(() => (W.value?.missing.length ?? 0) + (W.value?.stale.length ?? 0)), J = s(() => q.value ? D(b.localization.gapTooltip, {
|
|
107
|
-
missing: W.value.missing.length,
|
|
108
|
-
stale: W.value.stale.length
|
|
109
|
-
}) : w(B.value)), rt = s(() => q.value ? `${w(B.value)} ${q.value} (${B.value}), ${J.value}` : `${w(B.value)} (${B.value})`);
|
|
110
|
-
function it(e) {
|
|
111
|
-
let t = [];
|
|
112
|
-
return e.missing.length && t.push(C(b.localization.missingCount, e.missing.length, O)), e.stale.length && t.push(C(b.localization.staleCount, e.stale.length, O)), t.join(" · ") || b.localization.complete;
|
|
113
|
-
}
|
|
114
|
-
function Y() {
|
|
115
|
-
N.value = !1, P.value = null, i(() => j.value?.focus());
|
|
116
|
-
}
|
|
117
|
-
async function at() {
|
|
118
|
-
N.value ? Y() : (N.value = !0, await i(), A.value?.querySelector("[role=\"menuitemradio\"]")?.focus());
|
|
119
|
-
}
|
|
120
|
-
async function X(e) {
|
|
121
|
-
P.value = P.value === e ? null : e, await i(), A.value?.querySelector("[data-language-submenu] [role=\"menuitem\"]:not(:disabled)")?.focus();
|
|
122
|
-
}
|
|
123
|
-
function ot() {
|
|
124
|
-
let e = P.value;
|
|
125
|
-
P.value = null, A.value?.querySelector(`[data-testid="${e === "add" ? "language-add" : `language-actions-${e}`}"]`)?.focus();
|
|
126
|
-
}
|
|
127
|
-
function st(e) {
|
|
128
|
-
let t = e.target;
|
|
129
|
-
if (t.closest("[role=\"dialog\"]")) return;
|
|
130
|
-
if (e.key === "Escape" || e.key === "ArrowLeft" && P.value) {
|
|
131
|
-
e.preventDefault(), e.stopPropagation(), P.value ? ot() : Y();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (t === j.value && ["ArrowDown", "ArrowUp"].includes(e.key)) {
|
|
135
|
-
e.preventDefault(), N.value || at();
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (e.key === "ArrowRight" && !t.closest("[data-language-submenu]")) {
|
|
139
|
-
let n = t.dataset.testid ?? "", r = n.replace(/^language-(option|actions)-/, "");
|
|
140
|
-
(n === "language-add" || r !== z.value && U.value && y.locales.includes(r)) && (e.preventDefault(), X(n === "language-add" ? "add" : r));
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (![
|
|
144
|
-
"ArrowDown",
|
|
145
|
-
"ArrowUp",
|
|
146
|
-
"Home",
|
|
147
|
-
"End"
|
|
148
|
-
].includes(e.key)) return;
|
|
149
|
-
e.preventDefault();
|
|
150
|
-
let n = t.closest("[role=\"menu\"]"), r = Array.from(n?.querySelectorAll("[role^=\"menuitem\"]:not(:disabled)") ?? []).filter((e) => e.closest("[role=\"menu\"]") === n), i = r.indexOf(t);
|
|
151
|
-
r[e.key === "Home" ? 0 : e.key === "End" ? r.length - 1 : (i + (e.key === "ArrowDown" ? 1 : -1) + r.length) % r.length]?.focus();
|
|
152
|
-
}
|
|
153
|
-
function ct(e) {
|
|
154
|
-
y.editor.setActiveLocale?.(e === z.value ? null : e), Y();
|
|
155
|
-
}
|
|
156
|
-
function lt(e) {
|
|
157
|
-
U.value && H.value.includes(e) && (y.editor.addLocale?.(e), Y());
|
|
158
|
-
}
|
|
159
|
-
function ut() {
|
|
160
|
-
L.value = null, R.value = {
|
|
161
|
-
templateId: y.editor.state.template?.id ?? null,
|
|
162
|
-
loadVersion: y.editor.loadVersion?.value
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function dt() {
|
|
166
|
-
return R.value !== null && R.value.templateId === (y.editor.state.template?.id ?? null) && R.value.loadVersion === y.editor.loadVersion?.value;
|
|
167
|
-
}
|
|
168
|
-
function ft(e) {
|
|
169
|
-
ut(), F.value = e, P.value = null;
|
|
170
|
-
}
|
|
171
|
-
function Z(e) {
|
|
172
|
-
return U.value && V.value.includes(e) && y.locales.includes(e) && G.value && v(y.editor.content.value, e).length === 0;
|
|
173
|
-
}
|
|
174
|
-
function pt(e) {
|
|
175
|
-
Z(e) && (ut(), I.value = { locale: e }, P.value = null);
|
|
176
|
-
}
|
|
177
|
-
let mt = s(() => I.value ? ne(y.editor.content.value, I.value.locale, k).length : 0), Q = s(() => I.value ? D(b.localization.makeDefaultConfirmation, { language: w(I.value.locale) }) : D(b.localization.removeConfirmation, { language: w(F.value ?? z.value) }));
|
|
178
|
-
function $() {
|
|
179
|
-
let e = I.value?.locale ?? F.value;
|
|
180
|
-
R.value = null, L.value = null, I.value = null, F.value = null, i(() => {
|
|
181
|
-
if (!N.value) {
|
|
182
|
-
j.value?.focus();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
let t = `language-actions-${e}`;
|
|
186
|
-
A.value?.querySelector(`[data-testid="${t}"]`)?.focus();
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
function ht() {
|
|
190
|
-
if (!dt()) $(), Y();
|
|
191
|
-
else if (U.value) {
|
|
192
|
-
if (I.value) {
|
|
193
|
-
let e = I.value.locale;
|
|
194
|
-
if (!Z(e)) return;
|
|
195
|
-
let t = et?.setDefaultLocale(e);
|
|
196
|
-
if (!t) return;
|
|
197
|
-
if (!t.applied) {
|
|
198
|
-
L.value = D(b.localization.defaultRefused, {
|
|
199
|
-
language: w(e),
|
|
200
|
-
reason: t.error.code === "locked_by_others" || t.error.code === "lock_held" ? b.localization.defaultLockedReason : t.error.message
|
|
201
|
-
});
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
} else F.value && y.locales.includes(F.value) && y.editor.removeLocale?.(F.value);
|
|
205
|
-
$(), Y();
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return e([() => y.editor.state.template?.id ?? null, () => y.editor.loadVersion?.value], () => {
|
|
209
|
-
(N.value || R.value !== null) && ($(), Y());
|
|
210
|
-
}, { flush: "sync" }), e(() => I.value !== null && !Z(I.value.locale), (e) => {
|
|
211
|
-
e && ($(), Y());
|
|
212
|
-
}), be(A, () => {
|
|
213
|
-
N.value = !1, P.value = null;
|
|
214
|
-
}), (e, i) => (n(), d("div", {
|
|
215
|
-
ref_key: "root",
|
|
216
|
-
ref: A,
|
|
217
|
-
class: "tpl-language-control tpl:relative tpl:min-w-0 tpl:shrink-0",
|
|
218
|
-
onKeydown: st
|
|
219
|
-
}, [
|
|
220
|
-
p("button", {
|
|
221
|
-
ref_key: "trigger",
|
|
222
|
-
ref: j,
|
|
223
|
-
type: "button",
|
|
224
|
-
"data-testid": "language-menu",
|
|
225
|
-
"aria-haspopup": "menu",
|
|
226
|
-
"aria-expanded": N.value,
|
|
227
|
-
title: J.value,
|
|
228
|
-
"aria-label": rt.value,
|
|
229
|
-
class: r([c(ye), "tpl-language-trigger"]),
|
|
230
|
-
onClick: at
|
|
231
|
-
}, [
|
|
232
|
-
p("span", Te, t(c(w)(B.value)), 1),
|
|
233
|
-
p("span", Ee, t(B.value), 1),
|
|
234
|
-
q.value ? (n(), d(m, { key: 0 }, [o(c(S), {
|
|
235
|
-
size: 12,
|
|
236
|
-
"aria-hidden": "true",
|
|
237
|
-
class: "tpl:shrink-0 tpl:text-[var(--tpl-warning)]"
|
|
238
|
-
}), p("span", De, t(q.value), 1)], 64)) : l("", !0),
|
|
239
|
-
o(c(ae), {
|
|
240
|
-
size: 12,
|
|
241
|
-
"aria-hidden": "true",
|
|
242
|
-
class: "tpl-language-chevron tpl:shrink-0"
|
|
243
|
-
})
|
|
244
|
-
], 10, we),
|
|
245
|
-
N.value ? (n(), d("div", {
|
|
246
|
-
key: 0,
|
|
247
|
-
role: "menu",
|
|
248
|
-
"aria-label": c(b).localization.languages,
|
|
249
|
-
class: r([E, "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:w-72"])
|
|
250
|
-
}, [
|
|
251
|
-
p("div", ke, t(c(b).localization.languages), 1),
|
|
252
|
-
p("div", Ae, [(n(!0), d(m, null, a(tt.value, (e) => (n(), d("div", {
|
|
253
|
-
key: e.locale,
|
|
254
|
-
class: "tpl-language-row tpl:flex tpl:items-center",
|
|
255
|
-
"data-active": B.value === e.locale
|
|
256
|
-
}, [p("button", {
|
|
257
|
-
type: "button",
|
|
258
|
-
role: "menuitemradio",
|
|
259
|
-
"aria-checked": B.value === e.locale,
|
|
260
|
-
"data-testid": `language-option-${e.locale}`,
|
|
261
|
-
class: r(T),
|
|
262
|
-
onClick: (t) => ct(e.locale)
|
|
263
|
-
}, [p("span", Ne, [B.value === e.locale ? (n(), h(c(x), {
|
|
264
|
-
key: 0,
|
|
265
|
-
size: 12,
|
|
266
|
-
"aria-hidden": "true"
|
|
267
|
-
})) : l("", !0)]), p("span", Pe, [p("span", Fe, [p("span", null, t(c(w)(e.locale)), 1), e.locale === z.value || !_.locales.includes(e.locale) ? (n(), d("span", {
|
|
268
|
-
key: 0,
|
|
269
|
-
class: r(["tpl-language-pill", c(ve)])
|
|
270
|
-
}, t(e.locale === z.value ? c(b).localization.default : c(b).localization.notEnabled), 3)) : l("", !0)]), e.coverage ? (n(), d("span", {
|
|
271
|
-
key: 0,
|
|
272
|
-
"data-testid": `language-status-${e.locale}`,
|
|
273
|
-
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
274
|
-
}, [e.coverage.missing.length || e.coverage.stale.length ? (n(), h(c(S), {
|
|
275
|
-
key: 0,
|
|
276
|
-
size: 10,
|
|
277
|
-
"aria-hidden": "true",
|
|
278
|
-
class: "tpl:text-[var(--tpl-warning)]"
|
|
279
|
-
})) : (n(), h(c(x), {
|
|
280
|
-
key: 1,
|
|
281
|
-
size: 10,
|
|
282
|
-
"aria-hidden": "true",
|
|
283
|
-
class: "tpl:text-[var(--tpl-success)]"
|
|
284
|
-
})), f(" " + t(it(e.coverage)), 1)], 8, Ie)) : l("", !0)])], 8, Me), e.locale !== z.value && U.value && _.locales.includes(e.locale) ? (n(), d("button", {
|
|
285
|
-
key: 0,
|
|
286
|
-
type: "button",
|
|
287
|
-
"data-testid": `language-actions-${e.locale}`,
|
|
288
|
-
"aria-haspopup": "menu",
|
|
289
|
-
"aria-expanded": P.value === e.locale,
|
|
290
|
-
"aria-label": c(D)(c(b).localization.moreActions, { language: c(w)(e.locale) }),
|
|
291
|
-
class: "tpl-language-actions tpl:mr-2 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-0 tpl:bg-transparent tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)]",
|
|
292
|
-
onClick: (t) => X(e.locale)
|
|
293
|
-
}, [o(c(Ce), {
|
|
294
|
-
size: 14,
|
|
295
|
-
"aria-hidden": "true"
|
|
296
|
-
})], 8, Le)) : l("", !0)], 8, je))), 128))]),
|
|
297
|
-
(n(!0), d(m, null, a(tt.value.filter((e) => e.locale === P.value && U.value && _.locales.includes(e.locale)), (e) => (n(), d("div", {
|
|
298
|
-
key: e.locale,
|
|
299
|
-
role: "menu",
|
|
300
|
-
"data-language-submenu": "",
|
|
301
|
-
"aria-label": c(D)(c(b).localization.moreActions, { language: c(w)(e.locale) }),
|
|
302
|
-
class: r([E, "tpl-language-submenu tpl:absolute tpl:left-full tpl:top-0 tpl:ml-1 tpl:w-64 tpl:overflow-hidden"])
|
|
303
|
-
}, [p("button", {
|
|
304
|
-
type: "button",
|
|
305
|
-
role: "menuitem",
|
|
306
|
-
"data-testid": `language-make-default-${e.locale}`,
|
|
307
|
-
class: r(T),
|
|
308
|
-
"aria-disabled": K.value,
|
|
309
|
-
"aria-label": c(b).localization.makeDefaultLanguage,
|
|
310
|
-
"aria-describedby": K.value ? M : void 0,
|
|
311
|
-
onClick: (t) => pt(e.locale)
|
|
312
|
-
}, [o(c(Se), {
|
|
313
|
-
size: 14,
|
|
314
|
-
"aria-hidden": "true",
|
|
315
|
-
class: "tpl:shrink-0"
|
|
316
|
-
}), p("span", Be, [p("span", null, t(c(b).localization.makeDefaultLanguage), 1), K.value ? (n(), d("span", {
|
|
317
|
-
key: 0,
|
|
318
|
-
id: M,
|
|
319
|
-
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
320
|
-
}, t(G.value ? c(C)(c(b).localization.hiddenBeforeDefault, nt.value.length, c(O), { language: c(w)(e.locale) }) : c(D)(c(b).localization.defaultNotEnabled, { default: c(w)(z.value) })), 1)) : l("", !0)])], 8, ze), p("button", {
|
|
321
|
-
type: "button",
|
|
322
|
-
role: "menuitem",
|
|
323
|
-
"data-testid": `language-remove-${e.locale}`,
|
|
324
|
-
class: r([T, "tpl:text-[var(--tpl-danger)]"]),
|
|
325
|
-
onClick: (t) => ft(e.locale)
|
|
326
|
-
}, [o(c(ce), {
|
|
327
|
-
size: 14,
|
|
328
|
-
"aria-hidden": "true"
|
|
329
|
-
}), f(t(c(D)(c(b).localization.removeLanguage, { language: c(w)(e.locale) })) + "… ", 1)], 8, Ve)], 8, Re))), 128)),
|
|
330
|
-
H.value.length && U.value ? (n(), d("div", He, [p("button", {
|
|
331
|
-
type: "button",
|
|
332
|
-
role: "menuitem",
|
|
333
|
-
"data-testid": "language-add",
|
|
334
|
-
"aria-haspopup": "menu",
|
|
335
|
-
"aria-expanded": P.value === "add",
|
|
336
|
-
class: r(T),
|
|
337
|
-
onClick: i[0] ||= (e) => X("add")
|
|
338
|
-
}, [
|
|
339
|
-
o(c(se), {
|
|
340
|
-
size: 14,
|
|
341
|
-
"aria-hidden": "true"
|
|
342
|
-
}),
|
|
343
|
-
f(t(c(b).localization.addLanguage), 1),
|
|
344
|
-
o(c(oe), {
|
|
345
|
-
size: 12,
|
|
346
|
-
"aria-hidden": "true",
|
|
347
|
-
class: "tpl:ml-auto"
|
|
348
|
-
})
|
|
349
|
-
], 8, Ue), P.value === "add" ? (n(), d("div", {
|
|
350
|
-
key: 0,
|
|
351
|
-
role: "menu",
|
|
352
|
-
"data-language-submenu": "",
|
|
353
|
-
"aria-label": c(b).localization.addLanguage,
|
|
354
|
-
class: r([E, "tpl-language-submenu tpl:absolute tpl:left-full tpl:bottom-0 tpl:ml-1 tpl:max-h-64 tpl:w-48 tpl:overflow-y-auto"])
|
|
355
|
-
}, [(n(!0), d(m, null, a(H.value, (e) => (n(), d("button", {
|
|
356
|
-
key: e,
|
|
357
|
-
type: "button",
|
|
358
|
-
role: "menuitem",
|
|
359
|
-
"data-testid": `language-add-${e}`,
|
|
360
|
-
class: r(T),
|
|
361
|
-
onClick: (t) => lt(e)
|
|
362
|
-
}, t(c(w)(e)), 9, Ge))), 128))], 8, We)) : l("", !0)])) : l("", !0)
|
|
363
|
-
], 8, Oe)) : l("", !0),
|
|
364
|
-
o(xe, {
|
|
365
|
-
visible: F.value !== null || I.value !== null,
|
|
366
|
-
onClose: $
|
|
367
|
-
}, {
|
|
368
|
-
default: ee(() => [p("section", {
|
|
369
|
-
role: "dialog",
|
|
370
|
-
"aria-modal": "true",
|
|
371
|
-
"aria-label": Q.value,
|
|
372
|
-
class: "tpl:w-80 tpl:max-w-full tpl:max-h-[90%] tpl:overflow-y-auto tpl:box-border tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
373
|
-
}, [
|
|
374
|
-
p("h3", qe, t(Q.value), 1),
|
|
375
|
-
I.value && mt.value ? (n(), d("p", Je, t(c(C)(c(b).localization.defaultGaps, mt.value, c(O), {
|
|
376
|
-
language: c(w)(I.value.locale),
|
|
377
|
-
default: c(w)(z.value)
|
|
378
|
-
})), 1)) : l("", !0),
|
|
379
|
-
F.value ? (n(), d("p", Ye, t(c(D)(c(b).localization.removeDescription, { language: c(w)(F.value) })), 1)) : l("", !0),
|
|
380
|
-
L.value ? (n(), d("p", Xe, [o(c(S), {
|
|
381
|
-
size: 14,
|
|
382
|
-
"aria-hidden": "true",
|
|
383
|
-
class: "tpl:shrink-0"
|
|
384
|
-
}), p("span", null, t(L.value), 1)])) : l("", !0),
|
|
385
|
-
p("div", Ze, [p("button", {
|
|
386
|
-
type: "button",
|
|
387
|
-
"data-testid": I.value ? "language-default-cancel" : "language-remove-cancel",
|
|
388
|
-
class: r(c(he)),
|
|
389
|
-
onClick: $
|
|
390
|
-
}, t(c(b).localization.cancel), 11, Qe), p("button", {
|
|
391
|
-
type: "button",
|
|
392
|
-
"data-testid": I.value ? "language-default-confirm" : "language-remove-confirm",
|
|
393
|
-
class: r(F.value ? c(_e) : c(ge)),
|
|
394
|
-
disabled: !U.value,
|
|
395
|
-
onClick: ht
|
|
396
|
-
}, t(I.value ? c(b).localization.makeDefault : c(D)(c(b).localization.removeLanguage, { language: c(w)(F.value ?? z.value) })), 11, $e)])
|
|
397
|
-
], 8, Ke)]),
|
|
398
|
-
_: 1
|
|
399
|
-
}, 8, ["visible"])
|
|
400
|
-
], 544));
|
|
401
|
-
}
|
|
402
|
-
}), [["__scopeId", "data-v-9b071249"]]);
|
|
403
|
-
export { D as default };
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
-
import { B as t, C as n, F as r, I as i, L as a, O as o, _ as s, ct as c, h as l, m as u, p as d, pt as f, u as p, z as m } from "./draggable-DepKdldn.js";
|
|
3
|
-
import { H as h, dt as g } from "./src-mXG-Of9A.js";
|
|
4
|
-
import { c as _, l as v, o as y } from "./socialIcons-Qw9rHc8C.js";
|
|
5
|
-
import { B as b, C as ee, R as x, b as te, l as S, m as C, ot as w, st as T, v as E } from "./keys-BUmIvYy3.js";
|
|
6
|
-
import { E as D, O, T as k, _ as A, a as j, b as M, g as N, h as P, i as F, m as I, o as L, p as R, r as z, u as B, v as V, w as H, x as U } from "./composables-CsfQlmcf.js";
|
|
7
|
-
import { t as W } from "./WrapperBlock-TXDSDXUP.js";
|
|
8
|
-
// src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var G = { class: "tpl:w-full" }, K = { class: "tpl:flex tpl:gap-0" }, q = /* @__PURE__ */ n({
|
|
10
|
-
name: "PreviewSectionBlock",
|
|
11
|
-
__name: "PreviewSectionBlock",
|
|
12
|
-
props: {
|
|
13
|
-
block: {},
|
|
14
|
-
viewport: {}
|
|
15
|
-
},
|
|
16
|
-
setup(e) {
|
|
17
|
-
let n = {
|
|
18
|
-
title: B,
|
|
19
|
-
paragraph: R,
|
|
20
|
-
image: P,
|
|
21
|
-
video: z,
|
|
22
|
-
button: M,
|
|
23
|
-
divider: A,
|
|
24
|
-
social: L,
|
|
25
|
-
menu: I,
|
|
26
|
-
table: F,
|
|
27
|
-
spacer: j,
|
|
28
|
-
html: N,
|
|
29
|
-
custom: V
|
|
30
|
-
}, i = e, h = o(S, null), g = d(() => {
|
|
31
|
-
switch (i.block.columns) {
|
|
32
|
-
case "2": return ["50%", "50%"];
|
|
33
|
-
case "3": return [
|
|
34
|
-
"33.33%",
|
|
35
|
-
"33.33%",
|
|
36
|
-
"33.33%"
|
|
37
|
-
];
|
|
38
|
-
case "4": return [
|
|
39
|
-
"25%",
|
|
40
|
-
"25%",
|
|
41
|
-
"25%",
|
|
42
|
-
"25%"
|
|
43
|
-
];
|
|
44
|
-
case "1-2": return ["33.33%", "66.67%"];
|
|
45
|
-
case "2-1": return ["66.67%", "33.33%"];
|
|
46
|
-
case "1-3": return ["25%", "75%"];
|
|
47
|
-
case "3-1": return ["75%", "25%"];
|
|
48
|
-
case "1-2-1": return [
|
|
49
|
-
"25%",
|
|
50
|
-
"50%",
|
|
51
|
-
"25%"
|
|
52
|
-
];
|
|
53
|
-
default: return ["100%"];
|
|
54
|
-
}
|
|
55
|
-
}), _ = d(() => {
|
|
56
|
-
let e = g.value.length, t = [...i.block.children];
|
|
57
|
-
for (; t.length < e;) t.push([]);
|
|
58
|
-
return t.slice(0, e);
|
|
59
|
-
});
|
|
60
|
-
function v(e) {
|
|
61
|
-
return _.value[e] || [];
|
|
62
|
-
}
|
|
63
|
-
function y(e) {
|
|
64
|
-
return O(e, h, n);
|
|
65
|
-
}
|
|
66
|
-
return (e, n) => {
|
|
67
|
-
let i = m("PreviewSectionBlock", !0);
|
|
68
|
-
return r(), s("div", G, [u("div", K, [(r(!0), s(p, null, a(_.value, (e, n) => (r(), s("div", {
|
|
69
|
-
key: n,
|
|
70
|
-
style: f({ width: g.value[n] })
|
|
71
|
-
}, [(r(!0), s(p, null, a(v(n), (e) => (r(), s("div", {
|
|
72
|
-
key: e.id,
|
|
73
|
-
style: f(c(H)(e))
|
|
74
|
-
}, [e.type === "section" ? (r(), l(i, {
|
|
75
|
-
key: 0,
|
|
76
|
-
block: e,
|
|
77
|
-
viewport: "desktop"
|
|
78
|
-
}, null, 8, ["block"])) : (r(), l(t(y(e)), {
|
|
79
|
-
key: 1,
|
|
80
|
-
block: e,
|
|
81
|
-
viewport: "desktop"
|
|
82
|
-
}, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}), J = ["lang", "dir"], Y = /*@__PURE__*/ n({
|
|
86
|
-
__name: "BlockPreviewCanvas",
|
|
87
|
-
props: {
|
|
88
|
-
blocks: {},
|
|
89
|
-
viewport: { default: "desktop" },
|
|
90
|
-
applyConditionFilter: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !0
|
|
93
|
-
},
|
|
94
|
-
settings: { default: void 0 }
|
|
95
|
-
},
|
|
96
|
-
setup(e) {
|
|
97
|
-
let n = e, m = o(S), H = o(E, null), G = o(C, null), K = T(te, "BlockPreviewCanvas"), Y = o(ee, null), X = o(b, h.liquid), Z = o(x, null);
|
|
98
|
-
i(w, d(() => Z?.value ?? !1));
|
|
99
|
-
let ne = d(() => n.applyConditionFilter ? n.blocks.filter((e) => !G?.isHidden(e.id)) : n.blocks), Q = d(() => n.settings ?? H?.content.value.settings), $ = d(() => v(Q.value, n.viewport)), re = d(() => Q.value ? D(Q.value, K.resolveFontFamily) : {}), ie = d(() => Q.value?.locale?.trim() || void 0), ae = d(() => g(Q.value ?? { locale: "en" })), oe = d(() => Q.value?.backgroundColor || "var(--tpl-canvas-bg)"), se = d(() => $.value + 192), ce = {
|
|
100
|
-
section: q,
|
|
101
|
-
title: B,
|
|
102
|
-
paragraph: R,
|
|
103
|
-
image: P,
|
|
104
|
-
video: z,
|
|
105
|
-
button: M,
|
|
106
|
-
divider: A,
|
|
107
|
-
social: L,
|
|
108
|
-
menu: I,
|
|
109
|
-
table: F,
|
|
110
|
-
spacer: j,
|
|
111
|
-
html: N,
|
|
112
|
-
custom: V,
|
|
113
|
-
wrapper: W
|
|
114
|
-
};
|
|
115
|
-
function le(e) {
|
|
116
|
-
return O(e, m, ce);
|
|
117
|
-
}
|
|
118
|
-
function ue(e) {
|
|
119
|
-
let t = Q.value;
|
|
120
|
-
return k(e, Y, X, y(e, t ? {
|
|
121
|
-
blocks: n.blocks,
|
|
122
|
-
settings: t
|
|
123
|
-
} : void 0));
|
|
124
|
-
}
|
|
125
|
-
return (n, i) => (r(), s("div", {
|
|
126
|
-
"data-testid": "block-preview-stage",
|
|
127
|
-
class: "tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg",
|
|
128
|
-
style: f({
|
|
129
|
-
width: `${se.value}px`,
|
|
130
|
-
minWidth: `${$.value}px`,
|
|
131
|
-
maxWidth: "100%",
|
|
132
|
-
backgroundColor: oe.value,
|
|
133
|
-
boxShadow: "var(--tpl-shadow-sm)"
|
|
134
|
-
})
|
|
135
|
-
}, [u("div", {
|
|
136
|
-
"data-testid": "block-preview-canvas",
|
|
137
|
-
lang: ie.value,
|
|
138
|
-
dir: ae.value,
|
|
139
|
-
style: f({
|
|
140
|
-
width: `${$.value}px`,
|
|
141
|
-
[c(U)]: `${$.value}px`,
|
|
142
|
-
transition: c(_),
|
|
143
|
-
...re.value
|
|
144
|
-
})
|
|
145
|
-
}, [(r(!0), s(p, null, a(ne.value, (n) => (r(), s("div", {
|
|
146
|
-
key: n.id,
|
|
147
|
-
style: f(ue(n))
|
|
148
|
-
}, [(r(), l(t(le(n)), {
|
|
149
|
-
block: n,
|
|
150
|
-
viewport: e.viewport
|
|
151
|
-
}, null, 8, ["block", "viewport"]))], 4))), 128))], 12, J)], 4));
|
|
152
|
-
}
|
|
153
|
-
}), X = /* @__PURE__ */ e({ default: () => Z }), Z = Y;
|
|
154
|
-
export { X as n, Z as t };
|
|
155
|
-
|
|
156
|
-
//# sourceMappingURL=BlockPreviewCanvas-B3HkuENF.js.map
|