@aswin.dev/editor 0.8.5 → 0.8.7
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/{AccessibilityPanel-COL6Wm7p.js → AccessibilityPanel-B39ct5ON.js} +2 -2
- package/dist/{AiChatSidebar-DAJOuHPG.js → AiChatSidebar-CYh7SPHW.js} +2 -2
- package/dist/{AiFeatureMenu-CKnEDzme.js → AiFeatureMenu-D9UhqJAa.js} +3 -3
- package/dist/{BlockA11yBadge-Qs6HtXid.js → BlockA11yBadge-Dr854uEe.js} +2 -2
- package/dist/{CloudEditor-BUlmUuhO.js → CloudEditor-BNEIze18.js} +281 -274
- package/dist/{CollaboratorBar-C6TfqpyV.js → CollaboratorBar-DZXuPSfU.js} +2 -2
- package/dist/{CommentsSidebar-DE6ZsM4D.js → CommentsSidebar-BVKFtxml.js} +4 -4
- package/dist/{CountdownBlock-Ba3T-i2X.js → CountdownBlock-CrpaDWze.js} +1 -1
- package/dist/{CountdownToolbar-B9IAZzeV.js → CountdownToolbar-D1tb2T_b.js} +2 -2
- package/dist/{DesignReferenceSidebar-C6yDJlD8.js → DesignReferenceSidebar-_QsmFpE_.js} +44 -44
- package/dist/{ModuleBrowserModal-DUKuDjS-.js → ModuleBrowserModal-Bth1crh_.js} +7 -7
- package/dist/{ModulePreviewCanvas-C9HTjfkN.js → ModulePreviewCanvas-96pndrb9.js} +3 -3
- package/dist/{ParagraphEditor-CFuaZKGk.js → ParagraphEditor-C2d9O2P4.js} +123 -123
- package/dist/{RichTextEditorContent-CrqPQdnk.js → RichTextEditorContent-Cn0ZU41b.js} +3 -3
- package/dist/{SaveModuleDialog-QjgPFEDg.js → SaveModuleDialog-B1EJtMGq.js} +17 -17
- package/dist/{SlidingPillSelect-DfcBdJqN.js → SlidingPillSelect-Dt34f5VF.js} +1 -1
- package/dist/{SnapshotHistory-Dblt21_W.js → SnapshotHistory-Cd-a_xGv.js} +3 -3
- package/dist/{TemplateScoringPanel-CS7o62zS.js → TemplateScoringPanel-C8WixDsv.js} +77 -77
- package/dist/{TestEmailModal-D_y3ZksG.js → TestEmailModal-CEj_81cQ.js} +3 -3
- package/dist/TitleEditor-C8Qyr_U3.js +172 -0
- package/dist/{TplModal-DinL7DhQ.js → TplModal-B_HcUS4S.js} +2 -2
- package/dist/{blockTypeIcons-JjmIZ_Vx.js → blockTypeIcons-CeaSm2Xd.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-BTADkTp2.js → AccessibilityPanel-C8vY7QIF.js} +3 -3
- package/dist/cdn/chunks/{AccessibilityPanel-BTADkTp2.js.map → AccessibilityPanel-C8vY7QIF.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-D99Pw32q.js → AiFeatureMenu-BaUpnF6T.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-D99Pw32q.js.map → AiFeatureMenu-BaUpnF6T.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-dtyeSSvY.js → BlockA11yBadge-BHkh4Otq.js} +2 -2
- package/dist/cdn/chunks/{BlockA11yBadge-dtyeSSvY.js.map → BlockA11yBadge-BHkh4Otq.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BBBkTBfW.js → CloudEditor-DUIjZDAS.js} +264 -257
- package/dist/cdn/chunks/{CloudEditor-BBBkTBfW.js.map → CloudEditor-DUIjZDAS.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Cuy1BusU.js → CollaboratorBar-pyuEO5Bm.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-Cuy1BusU.js.map → CollaboratorBar-pyuEO5Bm.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CqFM85Xv.js → CountdownToolbar-CCGHm6Gg.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CqFM85Xv.js.map → CountdownToolbar-CCGHm6Gg.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Dcxtq_dC.js → ModuleBrowserModal-DKsMddYS.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-Dcxtq_dC.js.map → ModuleBrowserModal-DKsMddYS.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-Didb4ZCU.js → ModulePreviewCanvas-E0mfCUJi.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-Didb4ZCU.js.map → ModulePreviewCanvas-E0mfCUJi.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BX2L35YF.js → ParagraphEditor-DwmzHg6F.js} +116 -116
- package/dist/cdn/chunks/ParagraphEditor-DwmzHg6F.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-ywrdsvHY.js → RichTextEditorContent-4-cNqB4H.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-ywrdsvHY.js.map → RichTextEditorContent-4-cNqB4H.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-Ddp-HCFB.js → SaveModuleDialog-COm3ptOF.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-Ddp-HCFB.js.map → SaveModuleDialog-COm3ptOF.js.map} +1 -1
- package/dist/cdn/chunks/{SlidingPillSelect-CS6N3vGq.js → SlidingPillSelect-DlgRynQN.js} +2 -2
- package/dist/cdn/chunks/{SlidingPillSelect-CS6N3vGq.js.map → SlidingPillSelect-DlgRynQN.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-CE8r8txX.js +171 -0
- package/dist/cdn/chunks/TitleEditor-CE8r8txX.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-B2x3gJsz.js → blockTypeIcons-BOf7hTFU.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-B2x3gJsz.js.map → blockTypeIcons-BOf7hTFU.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CdYSoz4B.js → extensions-B5e8Ov02.js} +17 -17
- package/dist/cdn/chunks/{extensions-CdYSoz4B.js.map → extensions-B5e8Ov02.js.map} +1 -1
- package/dist/cdn/chunks/{features-BZeMkHMs.js → features-BHTP4oRU.js} +734 -734
- package/dist/cdn/chunks/features-BHTP4oRU.js.map +1 -0
- package/dist/cdn/chunks/{icons-nP0Wj6Eq.js → icons-DS4IYWzG.js} +2 -2
- package/dist/cdn/chunks/{icons-nP0Wj6Eq.js.map → icons-DS4IYWzG.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-54Ezt5wL.js → media-library-BLLJsLwk.js} +508 -508
- package/dist/cdn/chunks/{media-library-54Ezt5wL.js.map → media-library-BLLJsLwk.js.map} +1 -1
- package/dist/cdn/chunks/{quality-Di1pUcCW.js → quality-DfKLOn8j.js} +290 -290
- package/dist/cdn/chunks/{quality-Di1pUcCW.js.map → quality-DfKLOn8j.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C4OuJhDG.js → renderer-fG9yLafB.js} +14 -14
- package/dist/cdn/chunks/{renderer-C4OuJhDG.js.map → renderer-fG9yLafB.js.map} +1 -1
- package/dist/cdn/chunks/{src-DF5NNH7S.js → src-DsfVhQaK.js} +4 -4
- package/dist/cdn/chunks/{src-DF5NNH7S.js.map → src-DsfVhQaK.js.map} +1 -1
- package/dist/cdn/chunks/{styles-C9P3yzMF.js → styles-CPUuKOlD.js} +210 -210
- package/dist/cdn/chunks/{styles-C9P3yzMF.js.map → styles-CPUuKOlD.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-CZ52Pj8k.js → tiptap-q69oUYhb.js} +2 -2
- package/dist/cdn/chunks/{tiptap-CZ52Pj8k.js.map → tiptap-q69oUYhb.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +130 -123
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-CNPdJw_8.js → extensions-mwqd2u9M.js} +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/keys-CqdzeWhT.js +10 -0
- package/dist/style.css +1 -1
- package/dist/{styles-ZIYLQwFf.js → styles-BRNubGRJ.js} +287 -287
- package/dist/templatical-editor.js +134 -127
- package/dist/{useCloudI18n-DOKSZql1.js → useCloudI18n-CDhjmAgB.js} +1 -1
- package/dist/{useEditorCore-BHSyoxSK.js → useEditorCore-DB4A_cje.js} +22 -22
- package/dist/{useI18n-C2xQZ6K9.js → useI18n-DLZJ6wNn.js} +1 -1
- package/dist/{useMergeTag-BfVcyNSv.js → useMergeTag-D-kqWENN.js} +2 -2
- package/package.json +7 -7
- package/dist/TitleEditor-CHmL3FFR.js +0 -172
- package/dist/cdn/chunks/ParagraphEditor-BX2L35YF.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BTtgZzci.js +0 -171
- package/dist/cdn/chunks/TitleEditor-BTtgZzci.js.map +0 -1
- package/dist/cdn/chunks/features-BZeMkHMs.js.map +0 -1
- package/dist/keys-CvX8D-8C.js +0 -10
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { At as e, C as t, Ft as n, M as r, N as i, P as a, T as o, U as s, W as c, _ as l, b as ee, et as u, f as te, g as d, h as f, j as
|
|
2
|
-
import { r as
|
|
3
|
-
import { f as
|
|
4
|
-
import { V as
|
|
5
|
-
import {
|
|
6
|
-
import { _ as
|
|
7
|
-
import { t as
|
|
1
|
+
import { At as e, C as t, Ft as n, M as r, N as i, P as a, T as o, U as s, W as c, _ as l, b as ee, et as u, f as te, g as d, h as f, j as p, jt as m, l as h, m as g, n as _, st as v, t as ne, v as y, x as b, y as re } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
+
import { r as x } from "./timeouts-BSGxjuUF.js";
|
|
3
|
+
import { f as S, r as ie } from "./dist-Bcqepqv3.js";
|
|
4
|
+
import { V as ae, t as oe, w as C, z as w } from "./useEditorCore-DB4A_cje.js";
|
|
5
|
+
import { T, m as se } from "./keys-CqdzeWhT.js";
|
|
6
|
+
import { _ as ce, a as le, c as ue, d as de, f as fe, g as pe, h as E, i as me, l as he, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P } from "./styles-BRNubGRJ.js";
|
|
7
|
+
import { t as F } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
|
|
8
8
|
//#region src/Editor.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var I = ["data-tpl-theme"], L = {
|
|
10
10
|
class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4 tpl:shadow-[var(--tpl-shadow-md)] tpl:border-b tpl:border-[var(--tpl-border)]",
|
|
11
11
|
style: {
|
|
12
12
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
13
13
|
"backdrop-filter": "blur(12px)",
|
|
14
14
|
"-webkit-backdrop-filter": "blur(12px)"
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, R = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, ge = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, _e = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "tpl:flex tpl:w-full tpl:flex-col tpl:gap-3 tpl:px-4 tpl:pt-4 tpl:pb-6"
|
|
19
|
-
},
|
|
19
|
+
}, ve = { class: "tpl-popup-browser-frame tpl:flex tpl:min-h-[calc(100vh-11rem)] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-xl tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-xl)]" }, ye = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3 tpl:p-8"
|
|
22
|
-
},
|
|
22
|
+
}, be = ["aria-label"], z = /* @__PURE__ */ F(/* @__PURE__ */ t({
|
|
23
23
|
__name: "Editor",
|
|
24
24
|
props: {
|
|
25
25
|
config: {},
|
|
@@ -27,118 +27,120 @@ var F = ["data-tpl-theme"], I = {
|
|
|
27
27
|
fontsManager: {}
|
|
28
28
|
},
|
|
29
29
|
setup(t, { expose: o }) {
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
let _ = u(null), x = u(null);
|
|
31
|
+
a(se, x);
|
|
32
|
+
let C = t, k = ae({
|
|
33
|
+
content: C.config.content,
|
|
34
|
+
templateDefaults: C.config.templateDefaults
|
|
35
|
+
}), F = oe({
|
|
36
|
+
editor: k,
|
|
35
37
|
config: {
|
|
36
|
-
uiTheme:
|
|
37
|
-
theme:
|
|
38
|
-
blockDefaults:
|
|
39
|
-
customBlocks:
|
|
40
|
-
mergeTags:
|
|
41
|
-
displayConditions:
|
|
42
|
-
onRequestMedia:
|
|
43
|
-
editorType:
|
|
44
|
-
accessibility:
|
|
45
|
-
onSave:
|
|
38
|
+
uiTheme: C.config.uiTheme,
|
|
39
|
+
theme: C.config.theme,
|
|
40
|
+
blockDefaults: C.config.blockDefaults,
|
|
41
|
+
customBlocks: C.config.customBlocks,
|
|
42
|
+
mergeTags: C.config.mergeTags,
|
|
43
|
+
displayConditions: C.config.displayConditions,
|
|
44
|
+
onRequestMedia: C.config.onRequestMedia,
|
|
45
|
+
editorType: C.config.editorType,
|
|
46
|
+
accessibility: pe(C.config),
|
|
47
|
+
onSave: C.config.onSave ? () => C.config.onSave(JSON.parse(JSON.stringify(k.state.content))) : void 0
|
|
46
48
|
},
|
|
47
|
-
translations:
|
|
48
|
-
fontsManager:
|
|
49
|
-
autoSaveOptions:
|
|
49
|
+
translations: C.translations,
|
|
50
|
+
fontsManager: C.fontsManager,
|
|
51
|
+
autoSaveOptions: C.config.onChange ? { onChange: () => C.config.onChange(JSON.parse(JSON.stringify(k.state.content))) } : null
|
|
50
52
|
});
|
|
51
|
-
|
|
52
|
-
if (await
|
|
53
|
-
let e =
|
|
54
|
-
|
|
53
|
+
p(async () => {
|
|
54
|
+
if (await C.fontsManager.loadCustomFonts(), w(C.config.editorType) === "popup" && !k.content.value.settings.popup) {
|
|
55
|
+
let e = S();
|
|
56
|
+
k.updateSettings({
|
|
55
57
|
popup: e,
|
|
56
|
-
width:
|
|
58
|
+
width: ie[e.design.sizePreset]
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
}), r(() => {
|
|
60
|
-
|
|
62
|
+
C.fontsManager.cleanupFontLinks(), F.destroy();
|
|
61
63
|
});
|
|
62
|
-
let
|
|
63
|
-
a(
|
|
64
|
-
let
|
|
65
|
-
if (
|
|
66
|
-
if (!
|
|
64
|
+
let z = u("blocks");
|
|
65
|
+
a(T, z);
|
|
66
|
+
let B = g(() => w(C.config.editorType) === "popup"), V = g(() => B.value && z.value === "displayRules"), H = g(() => B.value && z.value === "schedule"), U = g(() => z.value === "design"), W = g(() => B.value && (V.value || H.value || U.value)), G = g(() => {
|
|
67
|
+
if (k.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
|
|
68
|
+
if (!B.value) return ["tpl:left-12", "tpl:right-[320px]"];
|
|
67
69
|
let e;
|
|
68
|
-
e =
|
|
69
|
-
let t =
|
|
70
|
+
e = z.value === "blocks" ? "tpl:left-[272px]" : U.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
|
|
71
|
+
let t = W.value ? "tpl:right-0" : "tpl:right-[320px]";
|
|
70
72
|
return [e, t];
|
|
71
|
-
}),
|
|
73
|
+
}), K = g(() => V.value || H.value);
|
|
72
74
|
return o({
|
|
73
|
-
getContent: () =>
|
|
74
|
-
setContent: (e) =>
|
|
75
|
-
setTheme: (e) =>
|
|
76
|
-
undo: () =>
|
|
77
|
-
redo: () =>
|
|
78
|
-
canUndo: () =>
|
|
79
|
-
canRedo: () =>
|
|
80
|
-
renderCustomBlock:
|
|
81
|
-
startTour: (e) =>
|
|
82
|
-
dismissTour: () =>
|
|
83
|
-
resetTourDismissed: () =>
|
|
84
|
-
isTourDismissed: () =>
|
|
85
|
-
}), (r, a) => (i(),
|
|
86
|
-
class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark":
|
|
87
|
-
"data-tpl-theme":
|
|
88
|
-
style:
|
|
75
|
+
getContent: () => k.content.value,
|
|
76
|
+
setContent: (e) => k.setContent(e),
|
|
77
|
+
setTheme: (e) => k.setUiTheme(e),
|
|
78
|
+
undo: () => F.history.undo(),
|
|
79
|
+
redo: () => F.history.redo(),
|
|
80
|
+
canUndo: () => F.history.canUndo.value,
|
|
81
|
+
canRedo: () => F.history.canRedo.value,
|
|
82
|
+
renderCustomBlock: F.registry.renderCustomBlock,
|
|
83
|
+
startTour: (e) => _.value?.start(e),
|
|
84
|
+
dismissTour: () => _.value?.dismiss(),
|
|
85
|
+
resetTourDismissed: () => me(C.config.tour),
|
|
86
|
+
isTourDismissed: () => C.config.tour ? le(C.config.tour) : !0
|
|
87
|
+
}), (r, a) => (i(), y("div", {
|
|
88
|
+
class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": v(k).state.darkMode }]),
|
|
89
|
+
"data-tpl-theme": v(F).resolvedTheme.value,
|
|
90
|
+
style: m(v(F).themeStyles.value)
|
|
89
91
|
}, [
|
|
90
|
-
f("header",
|
|
92
|
+
f("header", L, [
|
|
91
93
|
a[5] ||= f("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
|
|
92
|
-
f("div",
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
viewport:
|
|
96
|
-
onChange:
|
|
94
|
+
f("div", R, [
|
|
95
|
+
b(de),
|
|
96
|
+
b(P, {
|
|
97
|
+
viewport: v(k).state.viewport,
|
|
98
|
+
onChange: v(k).setViewport
|
|
97
99
|
}, null, 8, ["viewport", "onChange"]),
|
|
98
|
-
|
|
99
|
-
"dark-mode":
|
|
100
|
-
onChange:
|
|
100
|
+
b(ue, {
|
|
101
|
+
"dark-mode": v(k).state.darkMode,
|
|
102
|
+
onChange: v(k).setDarkMode
|
|
101
103
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
102
|
-
|
|
103
|
-
"preview-mode":
|
|
104
|
-
onChange:
|
|
104
|
+
b(he, {
|
|
105
|
+
"preview-mode": v(k).state.previewMode,
|
|
106
|
+
onChange: v(k).setPreviewMode
|
|
105
107
|
}, null, 8, ["preview-mode", "onChange"])
|
|
106
108
|
]),
|
|
107
109
|
a[6] ||= f("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
|
|
108
110
|
]),
|
|
109
|
-
c(
|
|
111
|
+
c(b(A, null, null, 512), [[h, !v(k).state.previewMode]]),
|
|
110
112
|
f("div", {
|
|
111
|
-
class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...
|
|
112
|
-
style:
|
|
113
|
+
class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...G.value, "tpl:top-14"]]),
|
|
114
|
+
style: m({
|
|
113
115
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
114
|
-
backgroundColor:
|
|
116
|
+
backgroundColor: K.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
|
|
115
117
|
})
|
|
116
|
-
}, [
|
|
118
|
+
}, [B.value && z.value === "displayRules" ? (i(), d(O, { key: 0 })) : B.value && z.value === "schedule" ? (i(), d(N, {
|
|
117
119
|
key: 1,
|
|
118
120
|
layout: "standalone"
|
|
119
|
-
})) : (i(),
|
|
120
|
-
default: s(() => [
|
|
121
|
+
})) : (i(), y(te, { key: 2 }, [f("div", ge, [b(ne, { name: "tpl-restore-btn" }, {
|
|
122
|
+
default: s(() => [v(F).conditionPreview.hasHiddenBlocks.value ? (i(), y("button", {
|
|
121
123
|
key: 0,
|
|
122
124
|
class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80 tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)] tpl:border-[var(--tpl-warning)]",
|
|
123
125
|
style: { "backdrop-filter": "blur(8px)" },
|
|
124
|
-
onClick: a[0] ||= (e) =>
|
|
125
|
-
}, [
|
|
126
|
+
onClick: a[0] ||= (e) => v(F).conditionPreview.reset()
|
|
127
|
+
}, [b(v(ce), {
|
|
126
128
|
size: 13,
|
|
127
129
|
"stroke-width": 2
|
|
128
|
-
}), ee(" " + n(
|
|
130
|
+
}), ee(" " + n(v(F).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
|
|
129
131
|
_: 1
|
|
130
|
-
})]),
|
|
131
|
-
"preview-mode":
|
|
132
|
+
})]), B.value ? (i(), y("div", _e, [b(D, {
|
|
133
|
+
"preview-mode": v(k).state.previewMode,
|
|
132
134
|
"multi-page-canvas": t.config.multiPageCanvas ?? !1
|
|
133
|
-
}, null, 8, ["preview-mode", "multi-page-canvas"]), f("div",
|
|
135
|
+
}, null, 8, ["preview-mode", "multi-page-canvas"]), f("div", ve, [a[7] ||= re("<div class=\"tpl-popup-browser-bar tpl:relative tpl:flex tpl:h-9 tpl:items-center tpl:gap-1.5 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:px-3\" aria-hidden=\"true\" data-v-1fdbd0b6><span class=\"tpl:block tpl:size-3 tpl:rounded-full\" style=\"background-color:#ff5f57;\" data-v-1fdbd0b6></span><span class=\"tpl:block tpl:size-3 tpl:rounded-full\" style=\"background-color:#febc2e;\" data-v-1fdbd0b6></span><span class=\"tpl:block tpl:size-3 tpl:rounded-full\" style=\"background-color:#28c840;\" data-v-1fdbd0b6></span><div class=\"tpl:pointer-events-none tpl:absolute tpl:left-1/2 tpl:top-1/2 tpl:-translate-x-1/2 tpl:-translate-y-1/2 tpl:rounded-md tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:tracking-tight\" data-v-1fdbd0b6> yourstore.com </div></div>", 1), b(E, {
|
|
134
136
|
class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col",
|
|
135
|
-
viewport:
|
|
136
|
-
content:
|
|
137
|
-
"selected-block-id":
|
|
138
|
-
"dark-mode":
|
|
139
|
-
"preview-mode":
|
|
137
|
+
viewport: v(k).state.viewport,
|
|
138
|
+
content: v(k).content.value,
|
|
139
|
+
"selected-block-id": v(k).state.selectedBlockId,
|
|
140
|
+
"dark-mode": v(k).state.darkMode,
|
|
141
|
+
"preview-mode": v(k).state.previewMode,
|
|
140
142
|
"multi-page-canvas": t.config.multiPageCanvas ?? !1,
|
|
141
|
-
onSelectBlock:
|
|
143
|
+
onSelectBlock: v(k).selectBlock
|
|
142
144
|
}, null, 8, [
|
|
143
145
|
"viewport",
|
|
144
146
|
"content",
|
|
@@ -147,17 +149,17 @@ var F = ["data-tpl-theme"], I = {
|
|
|
147
149
|
"preview-mode",
|
|
148
150
|
"multi-page-canvas",
|
|
149
151
|
"onSelectBlock"
|
|
150
|
-
])])])) : (i(),
|
|
151
|
-
"preview-mode":
|
|
152
|
+
])])])) : (i(), y("div", ye, [b(D, {
|
|
153
|
+
"preview-mode": v(k).state.previewMode,
|
|
152
154
|
"multi-page-canvas": t.config.multiPageCanvas ?? !1
|
|
153
|
-
}, null, 8, ["preview-mode", "multi-page-canvas"]),
|
|
154
|
-
viewport:
|
|
155
|
-
content:
|
|
156
|
-
"selected-block-id":
|
|
157
|
-
"dark-mode":
|
|
158
|
-
"preview-mode":
|
|
155
|
+
}, null, 8, ["preview-mode", "multi-page-canvas"]), b(E, {
|
|
156
|
+
viewport: v(k).state.viewport,
|
|
157
|
+
content: v(k).content.value,
|
|
158
|
+
"selected-block-id": v(k).state.selectedBlockId,
|
|
159
|
+
"dark-mode": v(k).state.darkMode,
|
|
160
|
+
"preview-mode": v(k).state.previewMode,
|
|
159
161
|
"multi-page-canvas": t.config.multiPageCanvas ?? !1,
|
|
160
|
-
onSelectBlock:
|
|
162
|
+
onSelectBlock: v(k).selectBlock
|
|
161
163
|
}, null, 8, [
|
|
162
164
|
"viewport",
|
|
163
165
|
"content",
|
|
@@ -167,39 +169,44 @@ var F = ["data-tpl-theme"], I = {
|
|
|
167
169
|
"multi-page-canvas",
|
|
168
170
|
"onSelectBlock"
|
|
169
171
|
])]))], 64))], 6),
|
|
170
|
-
t.config.branding === !1 ? l("", !0) : (i(), d(
|
|
172
|
+
t.config.branding === !1 ? l("", !0) : (i(), d(M, {
|
|
171
173
|
key: 0,
|
|
172
|
-
"position-class":
|
|
174
|
+
"position-class": G.value
|
|
173
175
|
}, null, 8, ["position-class"])),
|
|
174
176
|
f("div", {
|
|
175
177
|
class: "tpl-sr-only",
|
|
176
178
|
role: "status",
|
|
177
179
|
"aria-live": "polite",
|
|
178
180
|
"aria-atomic": "true",
|
|
179
|
-
"aria-label":
|
|
180
|
-
}, n(
|
|
181
|
-
c(
|
|
182
|
-
"selected-block":
|
|
183
|
-
settings:
|
|
184
|
-
onUpdateBlock: a[1] ||= (e) =>
|
|
181
|
+
"aria-label": v(F).t.landmarks.reorderAnnouncements
|
|
182
|
+
}, n(v(F).keyboardReorder.announcement.value), 9, be),
|
|
183
|
+
c(b(fe, {
|
|
184
|
+
"selected-block": v(k).selectedBlock.value,
|
|
185
|
+
settings: v(k).content.value.settings,
|
|
186
|
+
onUpdateBlock: a[1] ||= (e) => v(k).updateBlock(v(k).state.selectedBlockId, e),
|
|
185
187
|
onDeleteBlock: a[2] ||= () => {
|
|
186
|
-
|
|
188
|
+
v(k).state.selectedBlockId && v(F).blockActions.deleteBlock(v(k).state.selectedBlockId);
|
|
187
189
|
},
|
|
188
190
|
onDuplicateBlock: a[3] ||= () => {
|
|
189
|
-
|
|
191
|
+
v(k).selectedBlock.value && v(F).blockActions.duplicateBlock(v(k).selectedBlock.value);
|
|
190
192
|
},
|
|
191
|
-
onUpdateSettings: a[4] ||= (e) =>
|
|
192
|
-
}, null, 8, ["selected-block", "settings"]), [[
|
|
193
|
-
|
|
193
|
+
onUpdateSettings: a[4] ||= (e) => v(k).updateSettings(e)
|
|
194
|
+
}, null, 8, ["selected-block", "settings"]), [[h, !v(k).state.previewMode && !W.value]]),
|
|
195
|
+
f("div", {
|
|
196
|
+
ref_key: "floatingUiTeleportEl",
|
|
197
|
+
ref: x,
|
|
198
|
+
class: "tpl-editor-floating-ui tpl:pointer-events-none tpl:fixed tpl:inset-0 tpl:z-[9999] tpl:overflow-visible"
|
|
199
|
+
}, null, 512),
|
|
200
|
+
t.config.tour ? (i(), d(j, {
|
|
194
201
|
key: 1,
|
|
195
202
|
ref_key: "editorTourRef",
|
|
196
|
-
ref:
|
|
203
|
+
ref: _,
|
|
197
204
|
"tour-config": t.config.tour,
|
|
198
|
-
"dark-mode":
|
|
205
|
+
"dark-mode": v(k).state.darkMode
|
|
199
206
|
}, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
|
|
200
|
-
], 14,
|
|
207
|
+
], 14, I));
|
|
201
208
|
}
|
|
202
|
-
}), [["__scopeId", "data-v-
|
|
209
|
+
}), [["__scopeId", "data-v-1fdbd0b6"]]), B = /* @__PURE__ */ Object.assign({
|
|
203
210
|
"./locales/de.ts": () => import("./de-DP4gn3tf.js"),
|
|
204
211
|
"./locales/en.ts": () => import("./en-CyZxmGTU.js")
|
|
205
212
|
}), V = /* @__PURE__ */ Object.assign({
|
|
@@ -221,13 +228,13 @@ async function q(e) {
|
|
|
221
228
|
let t = B[`./locales/${K(e, U)}.ts`];
|
|
222
229
|
return (await t()).default;
|
|
223
230
|
}
|
|
224
|
-
async function
|
|
231
|
+
async function xe(e) {
|
|
225
232
|
let t = V[`./locales/cloud/${K(e, W)}.ts`];
|
|
226
233
|
return (await t()).default;
|
|
227
234
|
}
|
|
228
235
|
//#endregion
|
|
229
236
|
//#region src/utils/toMjml.ts
|
|
230
|
-
async function
|
|
237
|
+
async function Se(e) {
|
|
231
238
|
let t;
|
|
232
239
|
try {
|
|
233
240
|
t = await import("@aswin.dev/renderer");
|
|
@@ -239,11 +246,11 @@ async function xe(e) {
|
|
|
239
246
|
//#endregion
|
|
240
247
|
//#region src/index.ts
|
|
241
248
|
var J = null, Y = u(null);
|
|
242
|
-
async function
|
|
249
|
+
async function Ce(e) {
|
|
243
250
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
244
251
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
245
|
-
let n = await q(e.locale ?? "en"), r =
|
|
246
|
-
J && Q(), J =
|
|
252
|
+
let n = await q(e.locale ?? "en"), r = C(e.fonts);
|
|
253
|
+
J && Q(), J = _({ setup() {
|
|
247
254
|
return () => o(z, {
|
|
248
255
|
config: e,
|
|
249
256
|
translations: n,
|
|
@@ -289,20 +296,20 @@ async function Se(e) {
|
|
|
289
296
|
renderCustomBlock(e) {
|
|
290
297
|
return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
|
|
291
298
|
},
|
|
292
|
-
toMjml: () =>
|
|
299
|
+
toMjml: () => Se(i)
|
|
293
300
|
};
|
|
294
301
|
return i;
|
|
295
302
|
}
|
|
296
303
|
var X = null, Z = u(null);
|
|
297
|
-
async function
|
|
304
|
+
async function we(e) {
|
|
298
305
|
let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
299
306
|
if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
|
|
300
|
-
let { default: n } = await import("./CloudEditor-
|
|
307
|
+
let { default: n } = await import("./CloudEditor-BNEIze18.js"), [r, i] = await Promise.all([q(e.locale ?? "en"), xe(e.locale ?? "en")]), a = C(e.fonts);
|
|
301
308
|
return X && $(), await new Promise((s, c) => {
|
|
302
309
|
let l = setTimeout(() => {
|
|
303
310
|
c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
|
|
304
|
-
},
|
|
305
|
-
X =
|
|
311
|
+
}, x);
|
|
312
|
+
X = _({ setup() {
|
|
306
313
|
return () => o(n, {
|
|
307
314
|
config: e,
|
|
308
315
|
translations: r,
|
|
@@ -367,4 +374,4 @@ function $() {
|
|
|
367
374
|
X && (X.unmount(), X = null, Z.value = null);
|
|
368
375
|
}
|
|
369
376
|
//#endregion
|
|
370
|
-
export {
|
|
377
|
+
export { k as DEFAULT_EDITOR_TOUR_STORAGE_KEY, Ce as init, we as initCloud, Q as unmount, C as useFonts };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as e, Y as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
|
-
import { l as n } from "./keys-
|
|
2
|
+
import { l as n } from "./keys-CqdzeWhT.js";
|
|
3
3
|
//#region src/composables/useCloudI18n.ts
|
|
4
4
|
function r(e, t) {
|
|
5
5
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
@@ -2,17 +2,17 @@ import { a as e, i as t, n, r, t as i } from "./rolldown-runtime-BZGGJVDF.js";
|
|
|
2
2
|
import { $ as a, A as o, At as s, C as c, Ct as l, D as u, Dt as d, Et as f, F as p, Ft as m, G as h, I as g, It as _, J as v, Mt as y, N as b, Nt as x, Ot as S, P as C, Pt as w, Q as T, R as E, S as D, St as O, Tt as ee, U as te, V as k, W as ne, Y as re, Z as ie, _ as ae, _t as oe, a as se, b as ce, bt as le, ct as ue, d as A, dt as de, et as j, f as fe, ft as pe, g as me, gt as he, h as M, ht as ge, j as _e, jt as N, k as ve, kt as ye, l as be, lt as xe, m as P, mt as Se, nt as Ce, o as we, ot as Te, pt as Ee, q as De, r as Oe, st as F, u as ke, ut as Ae, v as I, vt as je, wt as Me, x as L, xt as Ne, yt as Pe } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
3
3
|
import { C as Fe, D as Ie, E as Le, H as Re, M as ze, O as Be, S as Ve, T as He, U as Ue, V as We, b as Ge, c as Ke, d as qe, g as Je, h as Ye, k as Xe, l as Ze, p as Qe, s as $e, t as et, u as tt, v as nt, w as rt, x as it, y as at, z as ot } from "./dist-Bcqepqv3.js";
|
|
4
4
|
import { c as st, d as ct, f as lt, i as ut, n as dt, r as ft, u as pt } from "./dist-Djgi0A6k.js";
|
|
5
|
-
import { A as mt, C as ht,
|
|
6
|
-
import { t as Lt } from "./useI18n-
|
|
5
|
+
import { A as mt, C as ht, O as gt, S as _t, _ as vt, a as yt, b as bt, c as xt, d as St, f as Ct, g as wt, h as Tt, j as Et, k as Dt, o as Ot, p as kt, r as At, s as jt, t as Mt, v as Nt, w as Pt, x as Ft, y as It } from "./keys-CqdzeWhT.js";
|
|
6
|
+
import { t as Lt } from "./useI18n-DLZJ6wNn.js";
|
|
7
7
|
import { t as Rt } from "./createLucideIcon-ClREiSx3.js";
|
|
8
8
|
import { t as zt } from "./message-circle-B39qAHxs.js";
|
|
9
9
|
import { t as Bt } from "./trash-2-CtK2apEH.js";
|
|
10
10
|
import { t as Vt } from "./triangle-alert-KpDVNbpn.js";
|
|
11
11
|
import { t as Ht } from "./LoadingTrack-Ba2pfF57.js";
|
|
12
12
|
import { t as Ut } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
|
|
13
|
-
import "./useCloudI18n-
|
|
14
|
-
import { t as Wt } from "./useMergeTag-
|
|
15
|
-
import { t as Gt } from "./CountdownBlock-
|
|
13
|
+
import "./useCloudI18n-CDhjmAgB.js";
|
|
14
|
+
import { t as Wt } from "./useMergeTag-D-kqWENN.js";
|
|
15
|
+
import { t as Gt } from "./CountdownBlock-CrpaDWze.js";
|
|
16
16
|
//#region ../core/dist/index.js
|
|
17
17
|
v();
|
|
18
18
|
function Kt(e) {
|
|
@@ -797,7 +797,7 @@ var vn = { class: "tpl:text-center" }, yn = ["href"], bn = /* @__PURE__ */ c({
|
|
|
797
797
|
viewport: {}
|
|
798
798
|
},
|
|
799
799
|
setup(e) {
|
|
800
|
-
let t = e, n = u(
|
|
800
|
+
let t = e, n = u(Tt, null), r = P(() => t.block.clickAction ?? "none"), i = P(() => {
|
|
801
801
|
if (r.value === "scroll_anchor") {
|
|
802
802
|
let e = t.block.clickActionAnchorId?.trim().replace(/^#/, "") ?? "";
|
|
803
803
|
return e ? `#${e}` : t.block.url || "#";
|
|
@@ -1336,7 +1336,7 @@ function Gn(e) {
|
|
|
1336
1336
|
//#endregion
|
|
1337
1337
|
//#region src/composables/useRichTextEditor.ts
|
|
1338
1338
|
function Kn(e) {
|
|
1339
|
-
let t = u(
|
|
1339
|
+
let t = u(Tt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: s, autocomplete: c } = Wt(), l = u(Dt, null), d = (re(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = ze(s), p = Ce(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: v, removeLink: y, closeLinkDialog: b, handleLinkKeydown: x } = Gn(p), { start: S, stop: C } = pt(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), w = Ce(null), T = j(!0), E = j(null), D = !1;
|
|
1340
1340
|
async function O() {
|
|
1341
1341
|
E.value = null, T.value = !0;
|
|
1342
1342
|
try {
|
|
@@ -1435,7 +1435,7 @@ var qn = { class: "tpl:w-full" }, Jn = {
|
|
|
1435
1435
|
},
|
|
1436
1436
|
emits: ["fetchData"],
|
|
1437
1437
|
setup(e, { emit: t }) {
|
|
1438
|
-
let n = e, r = t, { t: i } = Lt(), a = u(
|
|
1438
|
+
let n = e, r = t, { t: i } = Lt(), a = u(jt, null), o = j(""), s = j(!1), c = P(() => a?.getDefinition(n.block.customType)), l = P(() => !!c.value), { isFetching: d, fetch: f, needsFetch: p, hasDataSource: h } = en({
|
|
1439
1439
|
definition: c,
|
|
1440
1440
|
block: P(() => n.block),
|
|
1441
1441
|
onUpdate: (e, t) => {
|
|
@@ -1505,7 +1505,7 @@ var qn = { class: "tpl:w-full" }, Jn = {
|
|
|
1505
1505
|
setup(e) {
|
|
1506
1506
|
let t = e, { t: n } = Lt();
|
|
1507
1507
|
t.viewport;
|
|
1508
|
-
let r = u(
|
|
1508
|
+
let r = u(Tt, null), i = P(() => {
|
|
1509
1509
|
let e = t.block;
|
|
1510
1510
|
return e.discountMode === "none" ? "" : e.discountMode === "manual_shopify" && e.manualDiscountCode.trim() || n.discountCoupon.previewSampleCode;
|
|
1511
1511
|
}), a = P(() => t.block.discountMode !== "none"), s = P(() => t.block.copyConfirmationText?.trim() || n.discountCoupon.copyCodeFlash), c = j(!1), l = null;
|
|
@@ -1619,7 +1619,7 @@ var qn = { class: "tpl:w-full" }, Jn = {
|
|
|
1619
1619
|
},
|
|
1620
1620
|
emits: ["update"],
|
|
1621
1621
|
setup(e, { emit: t }) {
|
|
1622
|
-
let n = e, r = t, { t: i } = Lt(), { syntax: a } = Wt(), o = u(
|
|
1622
|
+
let n = e, r = t, { t: i } = Lt(), { syntax: a } = Wt(), o = u(ht, null), s = P(() => !!o);
|
|
1623
1623
|
async function c() {
|
|
1624
1624
|
let e = await o?.({ accept: ["images"] });
|
|
1625
1625
|
if (e) {
|
|
@@ -1806,7 +1806,7 @@ var qn = { class: "tpl:w-full" }, Jn = {
|
|
|
1806
1806
|
//#endregion
|
|
1807
1807
|
//#region src/composables/useEditableTextBlock.ts
|
|
1808
1808
|
function Rr(e) {
|
|
1809
|
-
let t = u(
|
|
1809
|
+
let t = u(bt, []), { syntax: n } = Wt(), r = P(() => We(Re(e(), t), n)), i = j(!1), a = j(null), { top: o, left: s } = dt(a), c = P(() => ({
|
|
1810
1810
|
top: o.value - 8,
|
|
1811
1811
|
left: s.value
|
|
1812
1812
|
}));
|
|
@@ -1834,7 +1834,7 @@ var zr = ["innerHTML"], Br = /* @__PURE__ */ c({
|
|
|
1834
1834
|
viewport: {}
|
|
1835
1835
|
},
|
|
1836
1836
|
setup(e) {
|
|
1837
|
-
let t = e, n = D(() => import("./ParagraphEditor-
|
|
1837
|
+
let t = e, n = D(() => import("./ParagraphEditor-C2d9O2P4.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Rr(() => t.block.content);
|
|
1838
1838
|
return (t, l) => (b(), I("div", {
|
|
1839
1839
|
ref_key: "blockRef",
|
|
1840
1840
|
ref: i,
|
|
@@ -1898,7 +1898,7 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
|
1898
1898
|
},
|
|
1899
1899
|
emits: ["select"],
|
|
1900
1900
|
setup(e, { emit: t }) {
|
|
1901
|
-
let n = D(() => import("./BlockA11yBadge-
|
|
1901
|
+
let n = D(() => import("./BlockA11yBadge-Dr854uEe.js")), r = e, i = t, { t: a, format: o } = Lt(), c = u(It, null), l = j(null), d = P(() => c?.liftedBlockId.value === r.block.id), f = P(() => d.value ? o(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
1902
1902
|
async function p() {
|
|
1903
1903
|
await ve(), l.value?.focus();
|
|
1904
1904
|
}
|
|
@@ -1925,7 +1925,7 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
|
1925
1925
|
desktop: a.viewport.desktop,
|
|
1926
1926
|
tablet: a.viewport.tablet,
|
|
1927
1927
|
mobile: a.viewport.mobile
|
|
1928
|
-
}[r.viewport] ?? r.viewport : ""), y = P(() => !!r.block.displayCondition), x = u(
|
|
1928
|
+
}[r.viewport] ?? r.viewport : ""), y = P(() => !!r.block.displayCondition), x = u(yt, null), S = u(St, null), C = u(xt, {}), w = P(() => !!C.savedModules), T = P(() => C.comments?.getBlockCount(r.block.id) ?? 0), E = P(() => Hr(r.block));
|
|
1929
1929
|
function O(e) {
|
|
1930
1930
|
r.previewMode || (e.stopPropagation(), i("select"));
|
|
1931
1931
|
}
|
|
@@ -2351,7 +2351,7 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
|
2351
2351
|
viewport: {}
|
|
2352
2352
|
},
|
|
2353
2353
|
setup(e) {
|
|
2354
|
-
let t = e, n =
|
|
2354
|
+
let t = e, n = Et(Tt, "SpacerBlock"), r = P(() => ({
|
|
2355
2355
|
height: `${t.block.height}px`,
|
|
2356
2356
|
minHeight: `${t.block.height}px`,
|
|
2357
2357
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
@@ -2386,7 +2386,7 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
|
2386
2386
|
updated(e, t) {
|
|
2387
2387
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
2388
2388
|
}
|
|
2389
|
-
}, n = e, { t: r } = Lt(), i =
|
|
2389
|
+
}, n = e, { t: r } = Lt(), i = Et(Tt, "TableBlock"), a = P(() => n.block.rows.length > 0), o = P(() => ({
|
|
2390
2390
|
width: "100%",
|
|
2391
2391
|
borderCollapse: "collapse",
|
|
2392
2392
|
fontSize: `${n.block.fontSize}px`,
|
|
@@ -2446,7 +2446,7 @@ var Ur = ["data-block-id", "data-block-type"], Wr = ["aria-label"], Gr = [
|
|
|
2446
2446
|
viewport: {}
|
|
2447
2447
|
},
|
|
2448
2448
|
setup(e) {
|
|
2449
|
-
let t = e, n = D(() => import("./TitleEditor-
|
|
2449
|
+
let t = e, n = D(() => import("./TitleEditor-C8Qyr_U3.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Rr(() => t.block.content), l = P(() => {
|
|
2450
2450
|
let e = {
|
|
2451
2451
|
fontSize: `${et[t.block.level]}px`,
|
|
2452
2452
|
color: t.block.color,
|
|
@@ -9562,7 +9562,7 @@ var Kd, qd, Jd, Yd, Xd, Zd, Qd, $d, ef, tf, nf, rf, af, of, sf, cf, Y, lf, X, Z,
|
|
|
9562
9562
|
form: ci,
|
|
9563
9563
|
discountCoupon: dr,
|
|
9564
9564
|
custom: tr
|
|
9565
|
-
}, n = e, { t: r } = Lt(), i =
|
|
9565
|
+
}, n = e, { t: r } = Lt(), i = Et(Tt, "SectionBlock"), a = u(St, null), o = u(jt, null), c = P(() => {
|
|
9566
9566
|
switch (n.block.columns) {
|
|
9567
9567
|
case "2": return ["50%", "50%"];
|
|
9568
9568
|
case "3": return [
|
|
@@ -9659,7 +9659,7 @@ var Kd, qd, Jd, Yd, Xd, Zd, Qd, $d, ef, tf, nf, rf, af, of, sf, cf, Y, lf, X, Z,
|
|
|
9659
9659
|
table: Di,
|
|
9660
9660
|
spacer: xi,
|
|
9661
9661
|
html: vr,
|
|
9662
|
-
countdown: D(() => import("./CountdownBlock-
|
|
9662
|
+
countdown: D(() => import("./CountdownBlock-CrpaDWze.js").then((e) => e.n)),
|
|
9663
9663
|
discountCoupon: dr
|
|
9664
9664
|
};
|
|
9665
9665
|
function Tp(e) {
|
|
@@ -9707,16 +9707,16 @@ function Tp(e) {
|
|
|
9707
9707
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
9708
9708
|
});
|
|
9709
9709
|
}
|
|
9710
|
-
ft(document, "keydown", v), C(
|
|
9710
|
+
ft(document, "keydown", v), C(Dt, r), C(Tt, t), C(wt, nn(n.editorType)), C(Nt, u), C(yt, d), C(St, f), C(vt, i), C(gt, l), C(mt, s), C(Ot, n.blockDefaults), C(jt, g), C(Ct, n.customBlocks ?? []);
|
|
9711
9711
|
let y = Ue(n.mergeTags?.syntax);
|
|
9712
|
-
C(
|
|
9712
|
+
C(bt, n.mergeTags?.tags ?? []), C(_t, y), C(Pt, n.mergeTags?.onRequest ?? null), C(Ft, n.mergeTags?.autocomplete !== !1), C(ht, n.onRequestMedia ?? null), C(kt, n.displayConditions?.conditions ?? []), C(At, n.displayConditions?.allowCustom ?? !1), C(xt, e.capabilities ?? {}), C(It, h);
|
|
9713
9713
|
let b = n.accessibility?.disabled === !0 ? null : rn({
|
|
9714
9714
|
content: t.content,
|
|
9715
9715
|
options: n.accessibility ?? {},
|
|
9716
9716
|
updateBlock: t.updateBlock,
|
|
9717
9717
|
updateSettings: t.updateSettings
|
|
9718
9718
|
});
|
|
9719
|
-
C(
|
|
9719
|
+
C(Mt, b);
|
|
9720
9720
|
function x() {
|
|
9721
9721
|
m?.(), b?.destroy(), p?.destroy(), u.destroy();
|
|
9722
9722
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as e, et as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
|
|
2
2
|
import { F as n, i as r, j as i } from "./dist-Bcqepqv3.js";
|
|
3
|
-
import {
|
|
3
|
+
import { S as a, b as o, g as s, w as c, x as l } from "./keys-CqdzeWhT.js";
|
|
4
4
|
//#region src/composables/useMergeTag.ts
|
|
5
5
|
function u() {
|
|
6
|
-
let u = e(s, "email") === "popup", d = u ? [] : e(
|
|
6
|
+
let u = e(s, "email") === "popup", d = u ? [] : e(o, []), f = e(a, r.liquid), p = u ? null : e(c, null), m = u ? !1 : e(l, !0), h = t(!1);
|
|
7
7
|
function g(e) {
|
|
8
8
|
return n(e, f);
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aswin.dev/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.7",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@lucide/vue": "^1.11.0",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"vue": "^3.5.33",
|
|
34
34
|
"vue-tsc": "^3.2.7",
|
|
35
35
|
"vuedraggable": "^4.1.0",
|
|
36
|
-
"@aswin.dev/
|
|
37
|
-
"@aswin.dev/
|
|
38
|
-
"@aswin.dev/
|
|
36
|
+
"@aswin.dev/core": "0.8.7",
|
|
37
|
+
"@aswin.dev/types": "0.8.7",
|
|
38
|
+
"@aswin.dev/quality": "0.8.7"
|
|
39
39
|
},
|
|
40
40
|
"exports": {
|
|
41
41
|
".": {
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"license": "SEE LICENSE IN LICENSE",
|
|
64
64
|
"module": "./dist/templatical-editor.js",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@aswin.dev/media-library": "0.8.
|
|
67
|
-
"@aswin.dev/quality": "0.8.
|
|
68
|
-
"@aswin.dev/renderer": "0.8.
|
|
66
|
+
"@aswin.dev/media-library": "0.8.7",
|
|
67
|
+
"@aswin.dev/quality": "0.8.7",
|
|
68
|
+
"@aswin.dev/renderer": "0.8.7"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@aswin.dev/renderer": {
|