@templatical/editor 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BWIzNePR.js → AiChatSidebar-ChrE6pUq.js} +10 -10
- package/dist/{AiFeatureMenu-IoLW8c6m.js → AiFeatureMenu-DkQ9HhQ6.js} +7 -7
- package/dist/{BlockIssueBadge-FbyZBJlf.js → BlockIssueBadge-B4QjePax.js} +4 -4
- package/dist/{CloudEditor-txLsdvcR.js → CloudEditor-CfX-aMiV.js} +24 -22
- package/dist/{CollaboratorBar-CpLOFt43.js → CollaboratorBar-DTibhQ1j.js} +3 -3
- package/dist/ColorPicker-4vDYhdGe.js +552 -0
- package/dist/{CommentsSidebar-C8xFu9qy.js → CommentsSidebar-D-o5Stlg.js} +12 -12
- package/dist/{CountdownBlock-CaU40Htk.js → CountdownBlock-Bn5w7C-p.js} +1 -1
- package/dist/{CountdownToolbar-CBbGAxmF.js → CountdownToolbar-D7yQqnA2.js} +3 -3
- package/dist/{DesignReferenceSidebar-BWZgqmT-.js → DesignReferenceSidebar-DnO6ZdwS.js} +10 -10
- package/dist/{IssuesPanel-CBzfmzRM.js → IssuesPanel-X_vkNGrs.js} +7 -7
- package/dist/{ModuleBrowserModal-C9qHpjaS.js → ModuleBrowserModal-AJt--JPh.js} +9 -9
- package/dist/{ModulePreviewCanvas-xEMWMJwf.js → ModulePreviewCanvas-BKYOcVCh.js} +2 -2
- package/dist/{NumberWithSuffix-BreqtON_.js → NumberWithSuffix-Bf3rNxza.js} +1 -1
- package/dist/{ParagraphEditor-iRJI_YbA.js → ParagraphEditor-C5ixOIYb.js} +46 -46
- package/dist/{RichTextEditorContent-DkXai9qP.js → RichTextEditorContent-DwhDnMsG.js} +7 -7
- package/dist/{SaveModuleDialog-DqDmk0rO.js → SaveModuleDialog-B4QX9eiv.js} +7 -7
- package/dist/{SnapshotHistory-BVe5aCHi.js → SnapshotHistory-DaVueFv6.js} +8 -8
- package/dist/{TemplateScoringPanel-CRqt9-T5.js → TemplateScoringPanel-B0UHoTLx.js} +77 -77
- package/dist/{TestEmailModal-jpy4hnYZ.js → TestEmailModal-BkauxF7j.js} +4 -4
- package/dist/{TitleEditor-Bf6Jv2qI.js → TitleEditor-n6WDVDjW.js} +9 -9
- package/dist/{TplModal-DAtccv6o.js → TplModal-BDDyvT-C.js} +3 -3
- package/dist/{blockTypeIcons-CnlwyvkL.js → blockTypeIcons-4D0aFXNg.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-CSl--oWR.js → ca-DbWoy4rG.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B4oJlFQI.js → AiFeatureMenu-CIBHAGSz.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-B4oJlFQI.js.map → AiFeatureMenu-CIBHAGSz.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C7Ts7bT7.js → BlockIssueBadge-CxMiLo3p.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-C7Ts7bT7.js.map → BlockIssueBadge-CxMiLo3p.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BRO-2CcF.js → CloudEditor-CEa3Xgqh.js} +133 -131
- package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BsWOjOCS.js → CollaboratorBar-Bk1gD02G.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BsWOjOCS.js.map → CollaboratorBar-Bk1gD02G.js.map} +1 -1
- package/dist/cdn/chunks/ColorPicker-ll8pynws.js +550 -0
- package/dist/cdn/chunks/ColorPicker-ll8pynws.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BUGxk8GI.js → CountdownBlock-eGUE7hhw.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BUGxk8GI.js.map → CountdownBlock-eGUE7hhw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C8tWWfGw.js → CountdownToolbar-C1bkSjUR.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C8tWWfGw.js.map → CountdownToolbar-C1bkSjUR.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C5izyrbm.js → IssuesPanel-Csasylf_.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-C5izyrbm.js.map → IssuesPanel-Csasylf_.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DySKXKFF.js → ModuleBrowserModal-DznWWtBI.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DySKXKFF.js.map → ModuleBrowserModal-DznWWtBI.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-qqEvLBp2.js → ModulePreviewCanvas-D-h7fr87.js} +8 -8
- package/dist/cdn/chunks/{ModulePreviewCanvas-qqEvLBp2.js.map → ModulePreviewCanvas-D-h7fr87.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DttdbXsh.js → NumberWithSuffix-Dt-0odUN.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-DttdbXsh.js.map → NumberWithSuffix-Dt-0odUN.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CQJ23PXU.js → ParagraphEditor-v0_XEL-v.js} +110 -110
- package/dist/cdn/chunks/{ParagraphEditor-CQJ23PXU.js.map → ParagraphEditor-v0_XEL-v.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4vxiXng.js → RichTextEditorContent-NQExNsaV.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-C4vxiXng.js.map → RichTextEditorContent-NQExNsaV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D5eddgzd.js → SaveModuleDialog-BpFhTi-k.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-D5eddgzd.js.map → SaveModuleDialog-BpFhTi-k.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-5TkwDrPL.js → TitleEditor-CS-_MzYs.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-5TkwDrPL.js.map → TitleEditor-CS-_MzYs.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CbmN4aSw.js → blockTypeIcons-B0Hjh42a.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-CbmN4aSw.js.map → blockTypeIcons-B0Hjh42a.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CSl--oWR.js → ca-DbWoy4rG.js} +3 -2
- package/dist/cdn/chunks/{ca-CSl--oWR.js.map → ca-DbWoy4rG.js.map} +1 -1
- package/dist/{de-ZaffrKDP.js → cdn/chunks/de-CgGOnerg.js} +4 -1
- package/dist/cdn/chunks/{de-ZaffrKDP.js.map → de-CgGOnerg.js.map} +1 -1
- package/dist/cdn/chunks/{en-CHuXeJDt.js → en-DrUV9xth.js} +3 -2
- package/dist/cdn/chunks/{en-CHuXeJDt.js.map → en-DrUV9xth.js.map} +1 -1
- package/dist/{es-CaC8VQjO.js → cdn/chunks/es-DwbKjU7q.js} +4 -1
- package/dist/cdn/chunks/{es-CaC8VQjO.js.map → es-DwbKjU7q.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-B3M4IqhZ.js → extensions-Di3hdIRT.js} +25 -25
- package/dist/cdn/chunks/{extensions-B3M4IqhZ.js.map → extensions-Di3hdIRT.js.map} +1 -1
- package/dist/cdn/chunks/{features-HBwOEo4D.js → features-CLIZ7Q-Y.js} +1129 -1002
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +1 -0
- package/dist/cdn/chunks/{icons-D4vTsN4p.js → icons-GX40Qm2W.js} +2 -2
- package/dist/cdn/chunks/{icons-D4vTsN4p.js.map → icons-GX40Qm2W.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CfExuiSG.js → media-library-yYAkAagU.js} +537 -537
- package/dist/cdn/chunks/{media-library-CfExuiSG.js.map → media-library-yYAkAagU.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-C74zfEWH.js → pt-BR-Bcc5Tjed.js} +3 -2
- package/dist/cdn/chunks/{pt-BR-C74zfEWH.js.map → pt-BR-Bcc5Tjed.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CIwiKF8H.js → pusher-R0v5p99W.js} +27 -22
- package/dist/cdn/chunks/pusher-R0v5p99W.js.map +1 -0
- package/dist/cdn/chunks/quality-DffYv9j5.js +2180 -0
- package/dist/cdn/chunks/{quality-nh1R42eb.js.map → quality-DffYv9j5.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BLvlUayY.js → renderer-DpBGiXOg.js} +16 -16
- package/dist/cdn/chunks/{renderer-BLvlUayY.js.map → renderer-DpBGiXOg.js.map} +1 -1
- package/dist/cdn/chunks/{src-Cks4RrLL.js → src-9K6uFiuK.js} +6 -6
- package/dist/cdn/chunks/{src-Cks4RrLL.js.map → src-9K6uFiuK.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CPCN13az.js → styles-DHSmjlpX.js} +820 -816
- package/dist/cdn/chunks/styles-DHSmjlpX.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +54 -52
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Cg6Mc2pP.js → check-Bl4J_tYV.js} +1 -1
- package/dist/{chevron-down-dClfxKrJ.js → chevron-down-COEcl2iP.js} +1 -1
- package/dist/{circle-alert-Bhzm-fNA.js → circle-alert-CvHi5etc.js} +1 -1
- package/dist/{clock-m7TwQw4b.js → clock-CZZw62e8.js} +1 -1
- package/dist/{cloud-BogxOeZu.js → cloud-B-RebwxI.js} +5 -5
- package/dist/{createLucideIcon-FSF4peHQ.js → createLucideIcon-_peTZQtY.js} +2 -2
- package/dist/{cdn/chunks/de-ZaffrKDP.js → de-CgGOnerg.js} +2 -3
- package/dist/{dist-DoRIUsfz.js → dist-BJbqgyPn.js} +108 -94
- package/dist/{en-CHuXeJDt.js → en-DrUV9xth.js} +2 -1
- package/dist/{cdn/chunks/es-CaC8VQjO.js → es-DwbKjU7q.js} +2 -3
- package/dist/{extensions-gpFdCinj.js → extensions-BCA9pyer.js} +11 -11
- package/dist/{image-up-CDEgJqwA.js → image-up-D26rNdfX.js} +1 -1
- package/dist/index.d.ts +31 -0
- package/dist/{info-BNP8yGsK.js → info-CE3JSTqk.js} +1 -1
- package/dist/keys-DFaIbGR8.js +10 -0
- package/dist/{list-checks-jepi4iYr.js → list-checks-BQsLrtBB.js} +1 -1
- package/dist/{loader-circle-BT38qSm3.js → loader-circle-s9Rh5lLd.js} +1 -1
- package/dist/{message-circle-BAHcL9S-.js → message-circle-CI62d690.js} +1 -1
- package/dist/{pt-BR-C74zfEWH.js → pt-BR-Bcc5Tjed.js} +2 -1
- package/dist/{refresh-cw-as5Bmg4X.js → refresh-cw-DlYfl65Y.js} +1 -1
- package/dist/{scan-line-IAMjPtRw.js → scan-line-CHadrYVb.js} +1 -1
- package/dist/{send-DvMay6bt.js → send-CbP40otC.js} +1 -1
- package/dist/{shield-check-YYDhGroE.js → shield-check-Bnj9aRoJ.js} +1 -1
- package/dist/{sparkles-CCwQMMMZ.js → sparkles-CncWT57a.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-CJ6WmkYL.js → styles-DkF_-uX8.js} +677 -673
- package/dist/templatical-editor.js +14 -12
- package/dist/{text-align-start-BwsA6QzC.js → text-align-start-B458vzYw.js} +1 -1
- package/dist/{trash-2-CRBDolnR.js → trash-2-DO0yjSU1.js} +1 -1
- package/dist/{triangle-alert-B2g0ALvq.js → triangle-alert-C18_ima6.js} +1 -1
- package/dist/{upload-y4gxiFp5.js → upload-DsCd2zTR.js} +1 -1
- package/dist/{useCloudI18n-DIn74fK2.js → useCloudI18n-PCDOC2kz.js} +1 -1
- package/dist/{useEditorCore-LJJNXXqC.js → useEditorCore-kKUemYY6.js} +1047 -961
- package/dist/{useI18n-OaMLWqhY.js → useI18n-BNMzZTM5.js} +1 -1
- package/dist/{useMergeTag-CZMgwVvr.js → useMergeTag-DfEY0eK5.js} +5 -5
- package/dist/{usePopoverPosition-QDY09q9H.js → usePopoverPosition-F9STHRIr.js} +33 -6
- package/dist/{x-Ctg_250T.js → x-BCFQuE_q.js} +1 -1
- package/package.json +10 -10
- package/dist/ColorPicker-BXCcUYsZ.js +0 -473
- package/dist/cdn/chunks/CloudEditor-BRO-2CcF.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-DEtVX4gN.js +0 -471
- package/dist/cdn/chunks/ColorPicker-DEtVX4gN.js.map +0 -1
- package/dist/cdn/chunks/features-HBwOEo4D.js.map +0 -1
- package/dist/cdn/chunks/pusher-CIwiKF8H.js.map +0 -1
- package/dist/cdn/chunks/quality-nh1R42eb.js +0 -2180
- package/dist/cdn/chunks/styles-CPCN13az.js.map +0 -1
- package/dist/keys-DAxnnmXs.js +0 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, m as v, n as y, ot as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-D840DIZB.js";
|
|
2
|
-
import {
|
|
3
|
-
import { S as
|
|
4
|
-
import { a as
|
|
5
|
-
import { d as
|
|
2
|
+
import { At as k, E as A, En as j, Kt as M, Ln as N, Pt as P, Qt as ee, S as F, St as I, Un as L, Ut as R, Vt as te, Wt as z, X as B, Xt as V, Yt as ne, _ as re, _n as H, _t as U, at as W, b as G, c as K, cn as q, d as ie, dn as ae, dt as J, f as Y, g as oe, h as se, jt as X, k as Z, l as Q, m as ce, mt as le, nr as ue, p as de, s as fe, st as pe, tt as me, u as he, un as ge, v as _e, x as ve, xt as ye, y as be } from "./features-CLIZ7Q-Y.js";
|
|
3
|
+
import { S as xe, x as Se } from "./icons-GX40Qm2W.js";
|
|
4
|
+
import { a as Ce, c as we, d as Te, f as Ee, i as De, l as Oe, n as ke, o as Ae, r as je, s as Me, t as Ne, u as Pe } from "./styles-DHSmjlpX.js";
|
|
5
|
+
import { d as $ } from "./ColorPicker-ll8pynws.js";
|
|
6
6
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
7
7
|
function Fe(t) {
|
|
8
8
|
let { authManager: n, editor: i, history: a, conditionPreview: o, autoSave: s, onError: l } = t, u = e(null), d = c(null), p = c(null), m = !1;
|
|
@@ -11,7 +11,7 @@ function Fe(t) {
|
|
|
11
11
|
});
|
|
12
12
|
let h = f(() => d.value !== null), g = f(() => u.value?.snapshots.value ?? []), _ = f(() => u.value?.isLoading.value ?? !1), v = f(() => u.value?.isRestoring.value ?? !1);
|
|
13
13
|
function y() {
|
|
14
|
-
i.state.template?.id && !u.value && (u.value =
|
|
14
|
+
i.state.template?.id && !u.value && (u.value = Y({
|
|
15
15
|
authManager: n,
|
|
16
16
|
templateId: i.state.template.id,
|
|
17
17
|
onRestore: b,
|
|
@@ -86,7 +86,7 @@ function Ie() {
|
|
|
86
86
|
function g(t) {
|
|
87
87
|
l.value = !1, e.value = e.value === t ? null : t;
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return H(u, () => {
|
|
90
90
|
l.value = !1;
|
|
91
91
|
}), {
|
|
92
92
|
activePanel: e,
|
|
@@ -109,9 +109,9 @@ function Ie() {
|
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
111
111
|
function Le(e) {
|
|
112
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } =
|
|
112
|
+
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = j(() => {
|
|
113
113
|
a.value = !1;
|
|
114
|
-
},
|
|
114
|
+
}, ue, { immediate: !1 });
|
|
115
115
|
function s() {
|
|
116
116
|
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
117
117
|
}
|
|
@@ -123,7 +123,7 @@ function Le(e) {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
125
125
|
function Re(e) {
|
|
126
|
-
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } =
|
|
126
|
+
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = f(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = f(() => t.hasFeature("test_email")), o = f(() => !!r.state.template?.id), s = f(() => t.hasFeature("white_label")), l = f(() => t.config.value?.limits.max_templates ?? null), u = f(() => t.config.value?.template_count ?? 0), d = c(!1), p = c("idle"), m = c(""), { start: h } = j(() => {
|
|
127
127
|
p.value = "idle";
|
|
128
128
|
}, 3e3, { immediate: !1 });
|
|
129
129
|
return {
|
|
@@ -175,7 +175,7 @@ function ze(e) {
|
|
|
175
175
|
let t = f(e);
|
|
176
176
|
if (t) return s?.(t), null;
|
|
177
177
|
try {
|
|
178
|
-
let { MediaApiClient: t } = await import("./src-
|
|
178
|
+
let { MediaApiClient: t } = await import("./src-9K6uFiuK.js");
|
|
179
179
|
return l(await new t(a).uploadMedia(e));
|
|
180
180
|
} catch (e) {
|
|
181
181
|
return s?.(e), null;
|
|
@@ -204,19 +204,19 @@ function ze(e) {
|
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region src/cloud/composables/useCloudInitialization.ts
|
|
206
206
|
function Be(e) {
|
|
207
|
-
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new
|
|
207
|
+
let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, p = { value: null }, m = null, h = null, g = new A({
|
|
208
208
|
...t.auth,
|
|
209
209
|
onError: t.onError
|
|
210
|
-
}), _ =
|
|
210
|
+
}), _ = Q({
|
|
211
211
|
authManager: g,
|
|
212
212
|
onError: t.onError
|
|
213
|
-
}), v = c(/* @__PURE__ */ new Map()), y =
|
|
213
|
+
}), v = c(/* @__PURE__ */ new Map()), y = ve({
|
|
214
214
|
authManager: g,
|
|
215
215
|
defaultFontFamily: t.fonts?.defaultFont,
|
|
216
216
|
templateDefaults: t.templateDefaults,
|
|
217
217
|
onError: t.onError,
|
|
218
218
|
lockedBlocks: v
|
|
219
|
-
}), b =
|
|
219
|
+
}), b = ce({
|
|
220
220
|
authManager: g,
|
|
221
221
|
onError: t.onError
|
|
222
222
|
});
|
|
@@ -226,7 +226,7 @@ function Be(e) {
|
|
|
226
226
|
onOperation: t.mcp.onOperation
|
|
227
227
|
});
|
|
228
228
|
let x = null;
|
|
229
|
-
t.collaboration?.enabled && (x =
|
|
229
|
+
t.collaboration?.enabled && (x = oe({
|
|
230
230
|
authManager: g,
|
|
231
231
|
editor: y,
|
|
232
232
|
channel: b.channel,
|
|
@@ -237,21 +237,23 @@ function Be(e) {
|
|
|
237
237
|
onBlockUnlocked: t.collaboration.onBlockUnlocked
|
|
238
238
|
}), O(() => x.lockedBlocks.value, (e) => {
|
|
239
239
|
v.value = e;
|
|
240
|
-
}, { immediate: !0 }),
|
|
241
|
-
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C =
|
|
240
|
+
}, { immediate: !0 }), se(y, x));
|
|
241
|
+
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = Z({
|
|
242
242
|
editor: y,
|
|
243
243
|
config: {
|
|
244
244
|
uiTheme: t.uiTheme,
|
|
245
245
|
theme: void 0,
|
|
246
246
|
blockDefaults: t.blockDefaults,
|
|
247
|
+
templateDefaults: t.templateDefaults,
|
|
247
248
|
customBlocks: [],
|
|
248
249
|
paletteBlocks: t.paletteBlocks,
|
|
249
250
|
htmlBlockPreview: t.htmlBlockPreview,
|
|
251
|
+
colors: t.colors,
|
|
250
252
|
mergeTags: t.mergeTags,
|
|
251
253
|
logicTags: t.logicTags,
|
|
252
254
|
displayConditions: t.displayConditions,
|
|
253
255
|
onRequestMedia: null,
|
|
254
|
-
lint:
|
|
256
|
+
lint: Ee(t),
|
|
255
257
|
onSave: () => {
|
|
256
258
|
p.value?.().catch((e) => {
|
|
257
259
|
t.onError?.(e);
|
|
@@ -287,11 +289,11 @@ function Be(e) {
|
|
|
287
289
|
onError: t.onError
|
|
288
290
|
});
|
|
289
291
|
m = T;
|
|
290
|
-
let E = Ie(), D =
|
|
292
|
+
let E = Ie(), D = G(t.ai), k = Re({
|
|
291
293
|
planConfigInstance: _,
|
|
292
294
|
aiConfig: D,
|
|
293
295
|
editor: y
|
|
294
|
-
}),
|
|
296
|
+
}), j = ze({
|
|
295
297
|
onRequestMedia: t.onRequestMedia,
|
|
296
298
|
mediaLibraryOpen: E.mediaLibraryOpen,
|
|
297
299
|
mediaLibraryAccept: E.mediaLibraryAccept,
|
|
@@ -299,23 +301,23 @@ function Be(e) {
|
|
|
299
301
|
getMediaConfig: () => _.config.value?.media ?? null,
|
|
300
302
|
onError: t.onError
|
|
301
303
|
});
|
|
302
|
-
|
|
304
|
+
me({
|
|
303
305
|
onBlockMove: y.moveBlock,
|
|
304
306
|
onBlockAdd: y.addBlock
|
|
305
307
|
});
|
|
306
|
-
let
|
|
308
|
+
let N = he({
|
|
307
309
|
authManager: g,
|
|
308
310
|
getFontsConfig: () => t.fonts,
|
|
309
311
|
canUseCustomFonts: () => _.hasFeature("custom_fonts")
|
|
310
|
-
}), P =
|
|
312
|
+
}), P = ie({
|
|
311
313
|
authManager: g,
|
|
312
314
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
313
315
|
save: () => y.save(),
|
|
314
|
-
exportHtml: (e) =>
|
|
316
|
+
exportHtml: (e) => N.exportHtml(e),
|
|
315
317
|
onError: t.onError,
|
|
316
318
|
isAuthReady: l,
|
|
317
319
|
onBeforeTestEmail: t.onBeforeTestEmail
|
|
318
|
-
}), F =
|
|
320
|
+
}), F = _e({
|
|
319
321
|
authManager: g,
|
|
320
322
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
321
323
|
getSocketId: () => b.getSocketId(),
|
|
@@ -324,32 +326,32 @@ function Be(e) {
|
|
|
324
326
|
isAuthReady: l,
|
|
325
327
|
hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
|
|
326
328
|
});
|
|
327
|
-
|
|
329
|
+
re({
|
|
328
330
|
comments: F,
|
|
329
331
|
channel: b.channel
|
|
330
332
|
});
|
|
331
|
-
let I =
|
|
333
|
+
let I = de({
|
|
332
334
|
authManager: g,
|
|
333
335
|
onError: t.onError
|
|
334
|
-
}),
|
|
336
|
+
}), L = c(!1), R = c(null), B = c(!1), V = be({
|
|
335
337
|
authManager: g,
|
|
336
338
|
getTemplateId: () => y.state.template?.id ?? null
|
|
337
339
|
});
|
|
338
|
-
function
|
|
340
|
+
function H(e) {
|
|
339
341
|
E.commentsOpen.value = !0, queueMicrotask(() => {
|
|
340
342
|
o()?.filterByBlock(e);
|
|
341
343
|
});
|
|
342
344
|
}
|
|
343
|
-
a(
|
|
345
|
+
a(q, j.handleRequestMedia), a(M, g), a(z, D), a(ee, F), a(ge, I), a(ae, V), a(ne, {
|
|
344
346
|
plan: _,
|
|
345
347
|
ai: D,
|
|
346
348
|
comments: {
|
|
347
349
|
getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
|
|
348
|
-
openForBlock:
|
|
350
|
+
openForBlock: H
|
|
349
351
|
},
|
|
350
352
|
savedModules: {
|
|
351
353
|
openSaveDialog: (e) => {
|
|
352
|
-
|
|
354
|
+
R.value = e ?? null, L.value = !0;
|
|
353
355
|
},
|
|
354
356
|
openBrowser: () => {
|
|
355
357
|
B.value = !0;
|
|
@@ -357,10 +359,10 @@ function Be(e) {
|
|
|
357
359
|
moduleCount: f(() => I.modules.value.length)
|
|
358
360
|
}
|
|
359
361
|
});
|
|
360
|
-
function
|
|
362
|
+
function U(e) {
|
|
361
363
|
_.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
362
364
|
}
|
|
363
|
-
function
|
|
365
|
+
function W(e) {
|
|
364
366
|
y.setUiTheme(e);
|
|
365
367
|
}
|
|
366
368
|
async function J() {
|
|
@@ -368,11 +370,11 @@ function Be(e) {
|
|
|
368
370
|
try {
|
|
369
371
|
if (await g.initialize(), d) return;
|
|
370
372
|
l.value = !0;
|
|
371
|
-
let e = await
|
|
373
|
+
let e = await K({ authManager: g });
|
|
372
374
|
if (d) return;
|
|
373
375
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
374
376
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
375
|
-
if (e.websocket.ok ||
|
|
377
|
+
if (e.websocket.ok || te.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
|
|
376
378
|
r.setCustomFontsEnabled(_.hasFeature("custom_fonts")), t.customBlocks?.length && _.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && _.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), t.modules !== !1 && _.hasFeature("saved_modules") && I.loadModules(), i("ready");
|
|
377
379
|
} catch (e) {
|
|
378
380
|
if (d) return;
|
|
@@ -399,8 +401,8 @@ function Be(e) {
|
|
|
399
401
|
core: C,
|
|
400
402
|
aiConfig: D,
|
|
401
403
|
featureFlags: k,
|
|
402
|
-
mediaLib:
|
|
403
|
-
exporter:
|
|
404
|
+
mediaLib: j,
|
|
405
|
+
exporter: N,
|
|
404
406
|
testEmail: P,
|
|
405
407
|
commentsInstance: F,
|
|
406
408
|
savedModulesHeadless: I,
|
|
@@ -408,22 +410,22 @@ function Be(e) {
|
|
|
408
410
|
panelState: E,
|
|
409
411
|
snapshotPreview: T,
|
|
410
412
|
collabWarning: w,
|
|
411
|
-
showSaveModuleDialog:
|
|
413
|
+
showSaveModuleDialog: L,
|
|
412
414
|
showModuleBrowserModal: B,
|
|
413
|
-
saveModulePreSelectedBlockId:
|
|
415
|
+
saveModulePreSelectedBlockId: R,
|
|
414
416
|
onSaveHook: p,
|
|
415
417
|
initialize: J,
|
|
416
418
|
destroy: Y,
|
|
417
|
-
setThemeOverrides:
|
|
418
|
-
setUiTheme:
|
|
419
|
-
openCommentsForBlock:
|
|
419
|
+
setThemeOverrides: U,
|
|
420
|
+
setUiTheme: W,
|
|
421
|
+
openCommentsForBlock: H
|
|
420
422
|
};
|
|
421
423
|
}
|
|
422
424
|
//#endregion
|
|
423
425
|
//#region src/utils/preRenderCustomBlocks.ts
|
|
424
426
|
async function Ve(e, t) {
|
|
425
427
|
let n = async (e) => {
|
|
426
|
-
if (
|
|
428
|
+
if (L(e)) {
|
|
427
429
|
let n = e;
|
|
428
430
|
try {
|
|
429
431
|
n.renderedHtml = await t.renderCustomBlock(n);
|
|
@@ -443,7 +445,7 @@ async function Ve(e, t) {
|
|
|
443
445
|
function He(e) {
|
|
444
446
|
let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
|
|
445
447
|
function u() {
|
|
446
|
-
return
|
|
448
|
+
return F(i.config.value.websocket);
|
|
447
449
|
}
|
|
448
450
|
async function d(e) {
|
|
449
451
|
let i = await n.create(e);
|
|
@@ -514,7 +516,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
514
516
|
},
|
|
515
517
|
emits: ["cancel", "confirm"],
|
|
516
518
|
setup(e, { emit: t }) {
|
|
517
|
-
let n = t, { t: r } =
|
|
519
|
+
let n = t, { t: r } = W();
|
|
518
520
|
return (t, a) => (i(), v(y, {
|
|
519
521
|
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
520
522
|
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
@@ -529,7 +531,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
529
531
|
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
530
532
|
onClick: a[2] ||= _((e) => n("cancel"), ["self"])
|
|
531
533
|
}, [x("div", Ge, [
|
|
532
|
-
x("header", Ke, [D(h(
|
|
534
|
+
x("header", Ke, [D(h(J), {
|
|
533
535
|
size: 18,
|
|
534
536
|
"stroke-width": 2,
|
|
535
537
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
@@ -596,22 +598,22 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
596
598
|
},
|
|
597
599
|
emits: ["save"],
|
|
598
600
|
setup(e) {
|
|
599
|
-
let t = u(() => import("./CollaboratorBar-
|
|
601
|
+
let t = u(() => import("./CollaboratorBar-Bk1gD02G.js")), n = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-CIBHAGSz.js")), { t: a, format: o } = W();
|
|
600
602
|
return (c, l) => (i(), p("header", et, [
|
|
601
603
|
x("div", tt, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", nt, d(h(o)(h(a).header.templatesUsed, {
|
|
602
604
|
used: e.featureFlags.templateCount.value,
|
|
603
605
|
max: e.featureFlags.templateLimit.value
|
|
604
606
|
})), 1))]),
|
|
605
607
|
x("div", rt, [
|
|
606
|
-
D(
|
|
608
|
+
D(Ae, {
|
|
607
609
|
viewport: e.editor.state.viewport,
|
|
608
610
|
onChange: e.editor.setViewport
|
|
609
611
|
}, null, 8, ["viewport", "onChange"]),
|
|
610
|
-
D(
|
|
612
|
+
D(De, {
|
|
611
613
|
"dark-mode": e.editor.state.darkMode,
|
|
612
614
|
onChange: e.editor.setDarkMode
|
|
613
615
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
614
|
-
D(
|
|
616
|
+
D(Ce, {
|
|
615
617
|
"preview-mode": e.editor.state.previewMode,
|
|
616
618
|
onChange: e.editor.setPreviewMode
|
|
617
619
|
}, null, 8, ["preview-mode", "onChange"]),
|
|
@@ -641,10 +643,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
641
643
|
"aria-live": "assertive",
|
|
642
644
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
643
645
|
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
644
|
-
}, [D(h(
|
|
646
|
+
}, [D(h(X), {
|
|
645
647
|
size: 12,
|
|
646
648
|
"stroke-width": 2.5
|
|
647
|
-
}), T(" " + d(h(a).header.saveFailed), 1)], 8, at)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ot, [D(h(
|
|
649
|
+
}), T(" " + d(h(a).header.saveFailed), 1)], 8, at)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", ot, [D(h(P), {
|
|
648
650
|
size: 12,
|
|
649
651
|
"stroke-width": 2.5
|
|
650
652
|
}), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", st, [l[4] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + d(h(a).header.unsaved), 1)])) : m("", !0),
|
|
@@ -652,7 +654,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
652
654
|
key: 3,
|
|
653
655
|
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(a).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(a).comments.button,
|
|
654
656
|
"aria-expanded": e.panelState.commentsOpen.value,
|
|
655
|
-
class: b(h(
|
|
657
|
+
class: b(h($)),
|
|
656
658
|
style: C({
|
|
657
659
|
backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
|
|
658
660
|
color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
@@ -660,7 +662,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
660
662
|
}),
|
|
661
663
|
onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
662
664
|
}, [
|
|
663
|
-
D(h(
|
|
665
|
+
D(h(ye), {
|
|
664
666
|
size: 16,
|
|
665
667
|
"stroke-width": 2
|
|
666
668
|
}),
|
|
@@ -675,7 +677,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
675
677
|
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
676
678
|
class: b(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
|
|
677
679
|
onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
678
|
-
}, [D(h(
|
|
680
|
+
}, [D(h(le), {
|
|
679
681
|
size: 16,
|
|
680
682
|
"stroke-width": 2,
|
|
681
683
|
class: "tpl-ai-btn-icon"
|
|
@@ -695,7 +697,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
695
697
|
})], 512)) : m("", !0),
|
|
696
698
|
e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (i(), p("button", {
|
|
697
699
|
key: 5,
|
|
698
|
-
class: b(h(
|
|
700
|
+
class: b(h($)),
|
|
699
701
|
style: {
|
|
700
702
|
"background-color": "transparent",
|
|
701
703
|
color: "var(--tpl-primary)",
|
|
@@ -703,18 +705,18 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
703
705
|
},
|
|
704
706
|
disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
|
|
705
707
|
onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
|
|
706
|
-
}, [e.testEmail.isSending.value ? (i(), v(h(
|
|
708
|
+
}, [e.testEmail.isSending.value ? (i(), v(h(I), {
|
|
707
709
|
key: 1,
|
|
708
710
|
class: "tpl-spinner",
|
|
709
711
|
size: 16,
|
|
710
712
|
"stroke-width": 2
|
|
711
|
-
})) : (i(), v(h(
|
|
713
|
+
})) : (i(), v(h(U), {
|
|
712
714
|
key: 0,
|
|
713
715
|
size: 16,
|
|
714
716
|
"stroke-width": 2
|
|
715
717
|
})), T(" " + d(h(a).testEmail.button), 1)], 10, ft)) : m("", !0),
|
|
716
718
|
x("button", {
|
|
717
|
-
class: b(h(
|
|
719
|
+
class: b(h($)),
|
|
718
720
|
style: {
|
|
719
721
|
"background-color": "transparent",
|
|
720
722
|
color: "var(--tpl-primary)",
|
|
@@ -722,12 +724,12 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
722
724
|
},
|
|
723
725
|
disabled: e.isSaveDisabled,
|
|
724
726
|
onClick: l[3] ||= (e) => c.$emit("save")
|
|
725
|
-
}, [e.isSaving ? (i(), v(h(
|
|
727
|
+
}, [e.isSaving ? (i(), v(h(I), {
|
|
726
728
|
key: 1,
|
|
727
729
|
class: "tpl-spinner",
|
|
728
730
|
size: 16,
|
|
729
731
|
"stroke-width": 2
|
|
730
|
-
})) : (i(), v(h(
|
|
732
|
+
})) : (i(), v(h(Se), {
|
|
731
733
|
key: 0,
|
|
732
734
|
size: 16,
|
|
733
735
|
"stroke-width": 2
|
|
@@ -758,9 +760,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
758
760
|
"module-insert"
|
|
759
761
|
],
|
|
760
762
|
setup(e, { expose: t, emit: n }) {
|
|
761
|
-
let r = u(() => import("./features-
|
|
763
|
+
let r = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.o)), a = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.a)), o = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.i)), s = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.n)), l = u(() => import("./features-CLIZ7Q-Y.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-BpFhTi-k.js")), f = u(() => import("./ModuleBrowserModal-DznWWtBI.js")), g = u(async () => {
|
|
762
764
|
try {
|
|
763
|
-
return (await import("./src-
|
|
765
|
+
return (await import("./src-9K6uFiuK.js")).MediaLibraryModal;
|
|
764
766
|
} catch {
|
|
765
767
|
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
766
768
|
}
|
|
@@ -864,7 +866,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
864
866
|
},
|
|
865
867
|
emits: ["retry"],
|
|
866
868
|
setup(e, { emit: t }) {
|
|
867
|
-
let n = t, { t: r } =
|
|
869
|
+
let n = t, { t: r } = W();
|
|
868
870
|
function a(e) {
|
|
869
871
|
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
870
872
|
}
|
|
@@ -872,7 +874,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
872
874
|
return "isNotFound" in e && !!e.isNotFound;
|
|
873
875
|
}
|
|
874
876
|
return (t, s) => e.visible && e.error ? (i(), p("div", bt, [
|
|
875
|
-
x("div", xt, [D(h(
|
|
877
|
+
x("div", xt, [D(h(X), {
|
|
876
878
|
size: 32,
|
|
877
879
|
"stroke-width": 1.5,
|
|
878
880
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
@@ -893,8 +895,8 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
893
895
|
props: { visible: { type: Boolean } },
|
|
894
896
|
emits: ["cancel", "confirm"],
|
|
895
897
|
setup(e, { emit: t }) {
|
|
896
|
-
let n = t, { t: r } =
|
|
897
|
-
return (t, a) => e.visible ? (i(), p("div", Et, [x("div", Dt, [D(h(
|
|
898
|
+
let n = t, { t: r } = W();
|
|
899
|
+
return (t, a) => e.visible ? (i(), p("div", Et, [x("div", Dt, [D(h(k), {
|
|
898
900
|
size: 18,
|
|
899
901
|
"stroke-width": 2,
|
|
900
902
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
@@ -921,10 +923,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
921
923
|
__name: "CollabUndoToast",
|
|
922
924
|
props: { visible: { type: Boolean } },
|
|
923
925
|
setup(e) {
|
|
924
|
-
let { t } =
|
|
926
|
+
let { t } = R();
|
|
925
927
|
return (n, r) => e.visible ? (i(), p("div", At, d(h(t).history.collabWarning), 1)) : m("", !0);
|
|
926
928
|
}
|
|
927
|
-
}), Mt = ["data-tpl-theme"], Nt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Pt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ft = ["aria-label"], It = /*#__PURE__*/
|
|
929
|
+
}), Mt = ["data-tpl-theme"], Nt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Pt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Ft = ["aria-label"], It = /*#__PURE__*/ pe(/* @__PURE__ */ E({
|
|
928
930
|
__name: "CloudEditor",
|
|
929
931
|
props: {
|
|
930
932
|
config: {},
|
|
@@ -936,7 +938,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
936
938
|
emits: ["ready"],
|
|
937
939
|
setup(e, { expose: r, emit: o }) {
|
|
938
940
|
let l = e;
|
|
939
|
-
a(
|
|
941
|
+
a(V, l.cloudTranslations);
|
|
940
942
|
let u = o, f = c(null), w = c(null), E = Be({
|
|
941
943
|
config: l.config,
|
|
942
944
|
translations: l.translations,
|
|
@@ -945,10 +947,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
945
947
|
getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null,
|
|
946
948
|
editorRoot: l.shadowRoot,
|
|
947
949
|
containerEl: w
|
|
948
|
-
}), { isInitializing: O, isAuthReady: k, initError: A, planConfigInstance: j, websocket: M, collaboration:
|
|
949
|
-
async function
|
|
950
|
+
}), { isInitializing: O, isAuthReady: k, initError: A, planConfigInstance: j, websocket: M, collaboration: P, isCollaborationEnabled: ee, editor: F, core: I, featureFlags: L, mediaLib: R, exporter: te, testEmail: z, commentsInstance: ne, savedModulesHeadless: re, panelState: H, snapshotPreview: U, collabWarning: W, showSaveModuleDialog: G, showModuleBrowserModal: K, saveModulePreSelectedBlockId: q, setThemeOverrides: ie, setUiTheme: ae } = E, { showNotice: J } = B(() => l.config.smallScreenNotice);
|
|
951
|
+
async function Y(e) {
|
|
950
952
|
try {
|
|
951
|
-
await
|
|
953
|
+
await z.sendTestEmail(e), H.testEmailModalOpen.value = !1;
|
|
952
954
|
} catch {}
|
|
953
955
|
}
|
|
954
956
|
async function oe() {
|
|
@@ -956,21 +958,21 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
956
958
|
await U.confirmRestoreSnapshot();
|
|
957
959
|
} catch {}
|
|
958
960
|
}
|
|
959
|
-
function
|
|
961
|
+
function se(e, t) {
|
|
960
962
|
for (let n = 0; n < e.content.length; n++) {
|
|
961
|
-
let r =
|
|
962
|
-
|
|
963
|
+
let r = N(e.content[n]), i = t === void 0 ? void 0 : t + n;
|
|
964
|
+
F.addBlock(r, void 0, void 0, i);
|
|
963
965
|
}
|
|
964
|
-
|
|
966
|
+
K.value = !1;
|
|
965
967
|
}
|
|
966
968
|
let X = He({
|
|
967
969
|
config: l.config,
|
|
968
|
-
editor:
|
|
970
|
+
editor: F,
|
|
969
971
|
websocket: M,
|
|
970
972
|
planConfigInstance: j,
|
|
971
973
|
snapshotPreview: U,
|
|
972
974
|
core: I,
|
|
973
|
-
exporter:
|
|
975
|
+
exporter: te,
|
|
974
976
|
featureFlags: L,
|
|
975
977
|
isDestroyed: E.isDestroyed
|
|
976
978
|
}), Z = Ue({
|
|
@@ -985,24 +987,24 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
985
987
|
}), g(() => {
|
|
986
988
|
E.destroy();
|
|
987
989
|
}), r({
|
|
988
|
-
getContent: () =>
|
|
989
|
-
setContent: (e) =>
|
|
990
|
-
setTheme:
|
|
991
|
-
setThemeOverrides:
|
|
990
|
+
getContent: () => F.content.value,
|
|
991
|
+
setContent: (e) => F.setContent(e),
|
|
992
|
+
setTheme: ae,
|
|
993
|
+
setThemeOverrides: ie,
|
|
992
994
|
create: X.createTemplate,
|
|
993
995
|
load: X.loadTemplate,
|
|
994
996
|
save: X.saveTemplate,
|
|
995
|
-
sendTestEmail:
|
|
997
|
+
sendTestEmail: z.sendTestEmail
|
|
996
998
|
}), (t, r) => (i(), p("div", {
|
|
997
999
|
ref_key: "rootEl",
|
|
998
1000
|
ref: w,
|
|
999
|
-
class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(
|
|
1001
|
+
class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(F).state.darkMode }]),
|
|
1000
1002
|
"data-tpl-theme": h(I).resolvedTheme.value,
|
|
1001
1003
|
style: C(h(I).themeStyles.value),
|
|
1002
1004
|
onDragover: r[9] ||= _(() => {}, ["prevent"]),
|
|
1003
1005
|
onDrop: r[10] ||= _(() => {}, ["prevent"])
|
|
1004
1006
|
}, [
|
|
1005
|
-
D(
|
|
1007
|
+
D(Pe),
|
|
1006
1008
|
D(y, {
|
|
1007
1009
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
1008
1010
|
"enter-from-class": "tpl:opacity-100",
|
|
@@ -1011,7 +1013,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1011
1013
|
"leave-from-class": "tpl:opacity-100",
|
|
1012
1014
|
"leave-to-class": "tpl:opacity-0"
|
|
1013
1015
|
}, {
|
|
1014
|
-
default: s(() => [D(yt, { visible: h(O) || h(
|
|
1016
|
+
default: s(() => [D(yt, { visible: h(O) || h(F).state.isLoading }, null, 8, ["visible"])]),
|
|
1015
1017
|
_: 1
|
|
1016
1018
|
}),
|
|
1017
1019
|
D(y, {
|
|
@@ -1034,18 +1036,18 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1034
1036
|
_: 1
|
|
1035
1037
|
}),
|
|
1036
1038
|
D(mt, {
|
|
1037
|
-
editor: h(
|
|
1039
|
+
editor: h(F),
|
|
1038
1040
|
core: h(I),
|
|
1039
1041
|
"feature-flags": h(L),
|
|
1040
1042
|
"panel-state": h(H),
|
|
1041
1043
|
"snapshot-preview": h(U),
|
|
1042
|
-
"comments-instance": h(
|
|
1043
|
-
"test-email": h(
|
|
1044
|
+
"comments-instance": h(ne),
|
|
1045
|
+
"test-email": h(z),
|
|
1044
1046
|
websocket: h(M),
|
|
1045
|
-
collaboration: h(
|
|
1047
|
+
collaboration: h(P),
|
|
1046
1048
|
"is-collaboration-enabled": h(ee),
|
|
1047
|
-
"is-saving": h(
|
|
1048
|
-
"is-save-disabled": h(
|
|
1049
|
+
"is-saving": h(F).state.isSaving || h(L).isSaveExporting.value,
|
|
1050
|
+
"is-save-disabled": h(F).state.isSaving || h(L).isSaveExporting.value || !h(F).state.isDirty,
|
|
1049
1051
|
onSave: Q
|
|
1050
1052
|
}, null, 8, [
|
|
1051
1053
|
"editor",
|
|
@@ -1085,12 +1087,12 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1085
1087
|
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1086
1088
|
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1087
1089
|
}, {
|
|
1088
|
-
default: s(() => [D(jt, { visible: h(
|
|
1090
|
+
default: s(() => [D(jt, { visible: h(W).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1089
1091
|
_: 1
|
|
1090
1092
|
}),
|
|
1091
|
-
n(D(
|
|
1093
|
+
n(D(Oe, null, null, 512), [[S, !h(F).state.previewMode]]),
|
|
1092
1094
|
x("div", {
|
|
1093
|
-
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(
|
|
1095
|
+
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(F).state.previewMode ? "tpl:left-0 tpl:right-0" : h(H).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(U).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1094
1096
|
style: {
|
|
1095
1097
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1096
1098
|
"background-color": "var(--tpl-canvas-bg)"
|
|
@@ -1106,19 +1108,19 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1106
1108
|
"backdrop-filter": "blur(8px)"
|
|
1107
1109
|
},
|
|
1108
1110
|
onClick: r[0] ||= (e) => h(I).conditionPreview.reset()
|
|
1109
|
-
}, [D(h(
|
|
1111
|
+
}, [D(h(xe), {
|
|
1110
1112
|
size: 13,
|
|
1111
1113
|
"stroke-width": 2
|
|
1112
1114
|
}), T(" " + d(h(I).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
|
|
1113
1115
|
_: 1
|
|
1114
|
-
})]), x("main", Pt, [D(
|
|
1115
|
-
viewport: h(
|
|
1116
|
-
content: h(
|
|
1117
|
-
"selected-block-id": h(
|
|
1118
|
-
"dark-mode": h(
|
|
1119
|
-
"preview-mode": h(
|
|
1120
|
-
"locked-blocks": h(
|
|
1121
|
-
onSelectBlock: h(
|
|
1116
|
+
})]), x("main", Pt, [D(Te, {
|
|
1117
|
+
viewport: h(F).state.viewport,
|
|
1118
|
+
content: h(F).content.value,
|
|
1119
|
+
"selected-block-id": h(F).state.selectedBlockId,
|
|
1120
|
+
"dark-mode": h(F).state.darkMode,
|
|
1121
|
+
"preview-mode": h(F).state.previewMode,
|
|
1122
|
+
"locked-blocks": h(P)?.lockedBlocks.value ?? void 0,
|
|
1123
|
+
onSelectBlock: h(F).selectBlock,
|
|
1122
1124
|
onOpenAiChat: r[1] ||= (e) => h(H).aiChatOpen.value = !0,
|
|
1123
1125
|
onOpenDesignReference: r[2] ||= (e) => h(H).designReferenceOpen.value = !0
|
|
1124
1126
|
}, null, 8, [
|
|
@@ -1130,9 +1132,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1130
1132
|
"locked-blocks",
|
|
1131
1133
|
"onSelectBlock"
|
|
1132
1134
|
])])], 2),
|
|
1133
|
-
e.config.branding !== !1 && !h(L).isWhiteLabeled.value ? (i(), v(
|
|
1135
|
+
e.config.branding !== !1 && !h(L).isWhiteLabeled.value ? (i(), v(je, {
|
|
1134
1136
|
key: 0,
|
|
1135
|
-
"position-class": [h(
|
|
1137
|
+
"position-class": [h(F).state.previewMode ? "tpl:left-0 tpl:right-0" : h(H).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1136
1138
|
}, null, 8, ["position-class"])) : m("", !0),
|
|
1137
1139
|
x("div", {
|
|
1138
1140
|
class: "tpl-sr-only",
|
|
@@ -1141,40 +1143,40 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1141
1143
|
"aria-atomic": "true",
|
|
1142
1144
|
"aria-label": h(I).t.landmarks.reorderAnnouncements
|
|
1143
1145
|
}, d(h(I).keyboardReorder.announcement.value), 9, Ft),
|
|
1144
|
-
n(D(
|
|
1145
|
-
"selected-block": h(
|
|
1146
|
-
settings: h(
|
|
1146
|
+
n(D(we, {
|
|
1147
|
+
"selected-block": h(F).selectedBlock.value,
|
|
1148
|
+
settings: h(F).content.value.settings,
|
|
1147
1149
|
"shifted-left": h(H).rightPanelOpen.value,
|
|
1148
|
-
onUpdateBlock: r[3] ||= (e) => h(
|
|
1149
|
-
onDeleteBlock: r[4] ||= (e) => h(I).blockActions.deleteBlock(h(
|
|
1150
|
-
onDuplicateBlock: r[5] ||= (e) => h(I).blockActions.duplicateBlock(h(
|
|
1151
|
-
onUpdateSettings: h(
|
|
1150
|
+
onUpdateBlock: r[3] ||= (e) => h(F).updateBlock(h(F).selectedBlock.value.id, e),
|
|
1151
|
+
onDeleteBlock: r[4] ||= (e) => h(I).blockActions.deleteBlock(h(F).selectedBlock.value.id),
|
|
1152
|
+
onDuplicateBlock: r[5] ||= (e) => h(I).blockActions.duplicateBlock(h(F).selectedBlock.value),
|
|
1153
|
+
onUpdateSettings: h(F).updateSettings
|
|
1152
1154
|
}, null, 8, [
|
|
1153
1155
|
"selected-block",
|
|
1154
1156
|
"settings",
|
|
1155
1157
|
"shifted-left",
|
|
1156
1158
|
"onUpdateSettings"
|
|
1157
|
-
]), [[S, !h(
|
|
1159
|
+
]), [[S, !h(F).state.previewMode]]),
|
|
1158
1160
|
!h(O) && h(k) ? (i(), v(ht, {
|
|
1159
1161
|
key: 1,
|
|
1160
1162
|
ref_key: "cloudPanelsRef",
|
|
1161
1163
|
ref: f,
|
|
1162
1164
|
config: l.config,
|
|
1163
|
-
editor: h(
|
|
1165
|
+
editor: h(F),
|
|
1164
1166
|
core: h(I),
|
|
1165
1167
|
"panel-state": h(H),
|
|
1166
1168
|
"plan-config-instance": h(j),
|
|
1167
|
-
"test-email": h(
|
|
1169
|
+
"test-email": h(z),
|
|
1168
1170
|
"media-lib": h(R),
|
|
1169
|
-
"saved-modules-headless": h(
|
|
1170
|
-
"show-save-module-dialog": h(
|
|
1171
|
-
"save-module-pre-selected-block-id": h(
|
|
1172
|
-
"show-module-browser-modal": h(
|
|
1173
|
-
"onUpdate:showSaveModuleDialog": r[6] ||= (e) =>
|
|
1174
|
-
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) =>
|
|
1175
|
-
"onUpdate:showModuleBrowserModal": r[8] ||= (e) =>
|
|
1176
|
-
onSendTestEmail:
|
|
1177
|
-
onModuleInsert:
|
|
1171
|
+
"saved-modules-headless": h(re),
|
|
1172
|
+
"show-save-module-dialog": h(G),
|
|
1173
|
+
"save-module-pre-selected-block-id": h(q),
|
|
1174
|
+
"show-module-browser-modal": h(K),
|
|
1175
|
+
"onUpdate:showSaveModuleDialog": r[6] ||= (e) => G.value = e,
|
|
1176
|
+
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => q.value = e,
|
|
1177
|
+
"onUpdate:showModuleBrowserModal": r[8] ||= (e) => K.value = e,
|
|
1178
|
+
onSendTestEmail: Y,
|
|
1179
|
+
onModuleInsert: se
|
|
1178
1180
|
}, null, 8, [
|
|
1179
1181
|
"config",
|
|
1180
1182
|
"editor",
|
|
@@ -1192,13 +1194,13 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1192
1194
|
ref: (e) => h(I).popoverRoot.value = e,
|
|
1193
1195
|
class: "tpl-popover-root"
|
|
1194
1196
|
}, null, 512),
|
|
1195
|
-
D(
|
|
1196
|
-
D(
|
|
1197
|
-
h(
|
|
1197
|
+
D(ke),
|
|
1198
|
+
D(Ne),
|
|
1199
|
+
h(J) ? (i(), v(Me, { key: 2 })) : m("", !0)
|
|
1198
1200
|
], 46, Mt));
|
|
1199
1201
|
}
|
|
1200
1202
|
}), [["__scopeId", "data-v-3fc6c906"]]);
|
|
1201
1203
|
//#endregion
|
|
1202
1204
|
export { It as default };
|
|
1203
1205
|
|
|
1204
|
-
//# sourceMappingURL=CloudEditor-
|
|
1206
|
+
//# sourceMappingURL=CloudEditor-CEa3Xgqh.js.map
|