@templatical/editor 0.7.1 → 0.7.3
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-BwLECwsO.js → AiChatSidebar-H7SIsxeC.js} +49 -59
- package/dist/{AiFeatureMenu-CVHKharv.js → AiFeatureMenu-CJGX-fP5.js} +1 -1
- package/dist/{CloudEditor-S7AzuNwC.js → CloudEditor-BBs3p-mW.js} +124 -120
- package/dist/{CollaboratorBar-VZKOv_Zn.js → CollaboratorBar-CiEo25lb.js} +2 -2
- package/dist/{CommentsSidebar-BiRtaXYD.js → CommentsSidebar-DikjSLtH.js} +1 -1
- package/dist/{CountdownToolbar-CojjlZet.js → CountdownToolbar-Bn4RwJVN.js} +2 -2
- package/dist/{DesignReferenceSidebar-Ci9HIGbf.js → DesignReferenceSidebar-D08CLZPA.js} +1 -1
- package/dist/{ModuleBrowserModal-D7IYx1Nh.js → ModuleBrowserModal-D6637s8j.js} +4 -4
- package/dist/{ModulePreviewCanvas-I-uMcK5G.js → ModulePreviewCanvas-DBFmwq-y.js} +1 -1
- package/dist/{NumberWithSuffix-CLTBb2Rj.js → NumberWithSuffix-CyFX9w1e.js} +1 -1
- package/dist/{ParagraphEditor-BRQTNDFO.js → ParagraphEditor-DC2jOjNh.js} +16 -16
- package/dist/{RichTextEditorContent-C3QSg7gd.js → RichTextEditorContent-8NkjTIua.js} +1 -1
- package/dist/{SaveModuleDialog-DGGGNZfm.js → SaveModuleDialog-NKT7bWWs.js} +2 -2
- package/dist/{SnapshotHistory-C97Iw6xw.js → SnapshotHistory-XNqYxPBj.js} +2 -2
- package/dist/{TestEmailModal-B7S8H-VG.js → TestEmailModal-B_-Qo5Us.js} +2 -2
- package/dist/{TitleEditor-DhFTYzrw.js → TitleEditor-DnH3yyTr.js} +7 -7
- package/dist/{TplModal-BgABm6ju.js → TplModal-BoEZFe3U.js} +2 -2
- package/dist/{blockTypeIcons-BSf-3RJ-.js → blockTypeIcons-CUcYuWAO.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js → AccessibilityPanel-CQt87OMk.js} +5 -5
- package/dist/cdn/chunks/{AccessibilityPanel-kgNBRaZV.js.map → AccessibilityPanel-CQt87OMk.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js → AiFeatureMenu-SxIqfqA0.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CRkzwdMg.js.map → AiFeatureMenu-SxIqfqA0.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js → BlockA11yBadge-QqW6nomn.js} +3 -3
- package/dist/cdn/chunks/{BlockA11yBadge-BfuH2Hrg.js.map → BlockA11yBadge-QqW6nomn.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BGiN3M_f.js → CloudEditor-ChWUIMw7.js} +165 -161
- package/dist/cdn/chunks/CloudEditor-ChWUIMw7.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js → CollaboratorBar-73LfbzqF.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CMl3lAZU.js.map → CollaboratorBar-73LfbzqF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js → CountdownBlock-WYz9b9Ex.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-D1RoaOgF.js.map → CountdownBlock-WYz9b9Ex.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js → CountdownToolbar-B9fPfFqp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-DltwuOer.js.map → CountdownToolbar-B9fPfFqp.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js → ModuleBrowserModal-DfnJQBkM.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-3uu2mXR9.js.map → ModuleBrowserModal-DfnJQBkM.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js → ModulePreviewCanvas-DE4_oHA_.js} +20 -20
- package/dist/cdn/chunks/{ModulePreviewCanvas-K9CQFr7p.js.map → ModulePreviewCanvas-DE4_oHA_.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js → NumberWithSuffix-BST0yRor.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-BIFgtqGs.js.map → NumberWithSuffix-BST0yRor.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js → ParagraphEditor-CQfijF3i.js} +36 -36
- package/dist/cdn/chunks/{ParagraphEditor-DlpZX_x4.js.map → ParagraphEditor-CQfijF3i.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js → RichTextEditorContent-CBds8dnm.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-CPGT8h-O.js.map → RichTextEditorContent-CBds8dnm.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js → SaveModuleDialog-DXhuZgZ4.js} +13 -13
- package/dist/cdn/chunks/{SaveModuleDialog-_uaJscj1.js.map → SaveModuleDialog-DXhuZgZ4.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js → TitleEditor-BdQvH7eK.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-Kerz6US8.js.map → TitleEditor-BdQvH7eK.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js → blockTypeIcons-D3CGFW5P.js} +8 -8
- package/dist/cdn/chunks/{blockTypeIcons-BeOhGtoo.js.map → blockTypeIcons-D3CGFW5P.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BZYkPlKr.js → extensions-BE81zpqP.js} +50 -48
- package/dist/cdn/chunks/{extensions-BZYkPlKr.js.map → extensions-BE81zpqP.js.map} +1 -1
- package/dist/cdn/chunks/{features-DzIN-Nua.js → features-CXF_YKlL.js} +1313 -1122
- package/dist/cdn/chunks/features-CXF_YKlL.js.map +1 -0
- package/dist/cdn/chunks/{icons-Nvr6w13E.js → icons-KbmhF7rg.js} +2 -2
- package/dist/cdn/chunks/{icons-Nvr6w13E.js.map → icons-KbmhF7rg.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BzT7BoGU.js → media-library-BERe10wA.js} +103 -103
- package/dist/cdn/chunks/{media-library-BzT7BoGU.js.map → media-library-BERe10wA.js.map} +1 -1
- package/dist/cdn/chunks/{quality-C328caFm.js → quality-CmkY1kMU.js} +309 -309
- package/dist/cdn/chunks/{quality-C328caFm.js.map → quality-CmkY1kMU.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-eDlxzlJI.js → renderer-OttGEYkY.js} +50 -50
- package/dist/cdn/chunks/{renderer-eDlxzlJI.js.map → renderer-OttGEYkY.js.map} +1 -1
- package/dist/cdn/chunks/{src-DKNTQJVO.js → src-C21GI0p6.js} +6 -6
- package/dist/cdn/chunks/{src-DKNTQJVO.js.map → src-C21GI0p6.js.map} +1 -1
- package/dist/cdn/chunks/styles-Cy-My9zK.js +2976 -0
- package/dist/cdn/chunks/styles-Cy-My9zK.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -106
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-a3VovHva.js → cloud-k0DgeCo2.js} +11 -0
- package/dist/{dist-DDJIWTRY.js → dist-B2jcQhv8.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BYt3jdCR.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-CISFttkF.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-CfQPBf15.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-DD-9hatO.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-DUvhjQ2-.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-DVwOAodp.js} +1 -1
- package/dist/{dist-Cp0zXPAD.js → dist-DxD1kSdH.js} +1 -1
- package/dist/{dist-Pk4MhWMP.js → dist-U5guDm2w.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-hfu7I2rO.js} +3 -3
- package/dist/{dist-us-RpCWN.js → dist-v8h02hhE.js} +1 -1
- package/dist/{extensions-D-J02CiP.js → extensions-p6UBqXfg.js} +30 -28
- package/dist/index.d.ts +8 -8
- package/dist/style.css +1 -1
- package/dist/{styles-DeNciUTX.js → styles-BP15QmP3.js} +1078 -1056
- package/dist/templatical-editor.js +108 -105
- package/dist/useAliveFlag-D8GoB4VE.js +10 -0
- package/dist/{useEditorCore-uCU9Ny0M.js → useEditorCore-_rbu6iMu.js} +969 -791
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-BGiN3M_f.js.map +0 -1
- package/dist/cdn/chunks/features-DzIN-Nua.js.map +0 -1
- package/dist/cdn/chunks/styles-lcwmaOou.js +0 -2955
- package/dist/cdn/chunks/styles-lcwmaOou.js.map +0 -1
- /package/dist/{AccessibilityPanel-D-PqmHdH.js → AccessibilityPanel-BeUibrUb.js} +0 -0
- /package/dist/{BlockA11yBadge-BFIw0h1m.js → BlockA11yBadge-BhyoMZJ9.js} +0 -0
- /package/dist/{CountdownBlock-Cq8A8WrM.js → CountdownBlock-ByJ0_8Pk.js} +0 -0
- /package/dist/{TemplateScoringPanel-V79yrEPC.js → TemplateScoringPanel-kYOGtac3.js} +0 -0
- /package/dist/{de-BhIWu_bO.js → de-C9hp3n_a.js} +0 -0
- /package/dist/{de-Di4MEjjx.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-CQQS9SRN.js} +0 -0
- /package/dist/{emojiData-DX3E0XT-.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-D7HRbYah.js → en-Dv776AqL.js} +0 -0
- /package/dist/{en-BSuzi-Pd.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-bvx5sFh5.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-DX8ZHRdq.js} +0 -0
- /package/dist/{pt-BR-K32lt6YP.js → pt-BR-6n58Fl_q.js} +0 -0
- /package/dist/{pt-BR-CCVBRais.js → pt-BR-iOr79aDg.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-CXzrEnNb.js} +0 -0
- /package/dist/{styleConstants-fWzlIIwN.js → styleConstants-DkfOPzGu.js} +0 -0
- /package/dist/{usePopoverRoot-BxJrqnMD.js → usePopoverRoot-BwzFSPLy.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
2
|
-
import { A as k,
|
|
3
|
-
import { C as be, S as xe } from "./icons-
|
|
4
|
-
import { a as Se, c as Ce, i as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./styles-
|
|
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 ee } from "./draggable-P6QWzy4g.js";
|
|
2
|
+
import { $t as O, A as k, At as A, C as j, Dt as M, Et as N, Ft as P, Ht as F, Ln as I, Lt as L, Nt as R, O as te, Qt as ne, S as z, Ut as B, Wt as V, Z as re, Zt as H, _ as U, _t as W, b as ie, d as ae, dn as G, f as oe, g as K, h as q, l as J, m as Y, p as se, pt as X, rn as Z, rt as ce, st as le, tt as Q, u as ue, ut as de, v as fe, vt as pe, w as me, wn as he, x as ge, y as _e, yn as ve, zt as ye } from "./features-CXF_YKlL.js";
|
|
3
|
+
import { C as be, S as xe } from "./icons-KbmhF7rg.js";
|
|
4
|
+
import { a as Se, c as Ce, i as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./styles-Cy-My9zK.js";
|
|
5
5
|
import { d as $ } from "./styleConstants-DP1VOca8.js";
|
|
6
6
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
7
7
|
function Ae(t) {
|
|
@@ -11,7 +11,7 @@ function Ae(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,
|
|
@@ -84,7 +84,7 @@ function je() {
|
|
|
84
84
|
function g(t) {
|
|
85
85
|
l.value = !1, e.value = e.value === t ? null : t;
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return Z(u, () => {
|
|
88
88
|
l.value = !1;
|
|
89
89
|
}), {
|
|
90
90
|
activePanel: e,
|
|
@@ -107,9 +107,9 @@ function je() {
|
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
109
109
|
function Me(e) {
|
|
110
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } =
|
|
110
|
+
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = G(() => {
|
|
111
111
|
a.value = !1;
|
|
112
|
-
},
|
|
112
|
+
}, I, { immediate: !1 });
|
|
113
113
|
function s() {
|
|
114
114
|
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
115
115
|
}
|
|
@@ -121,7 +121,7 @@ function Me(e) {
|
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
123
123
|
function Ne(e) {
|
|
124
|
-
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 } =
|
|
124
|
+
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 } = G(() => {
|
|
125
125
|
p.value = "idle";
|
|
126
126
|
}, 3e3, { immediate: !1 });
|
|
127
127
|
return {
|
|
@@ -175,29 +175,29 @@ function Pe(e) {
|
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region src/cloud/composables/useCloudInitialization.ts
|
|
177
177
|
function Fe(e) {
|
|
178
|
-
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
|
|
178
|
+
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 te({
|
|
179
179
|
...t.auth,
|
|
180
180
|
onError: t.onError
|
|
181
|
-
}), _ =
|
|
181
|
+
}), _ = ae({
|
|
182
182
|
authManager: g,
|
|
183
183
|
onError: t.onError
|
|
184
|
-
}), v = c(/* @__PURE__ */ new Map()), y =
|
|
184
|
+
}), v = c(/* @__PURE__ */ new Map()), y = j({
|
|
185
185
|
authManager: g,
|
|
186
186
|
defaultFontFamily: t.fonts?.defaultFont,
|
|
187
187
|
templateDefaults: t.templateDefaults,
|
|
188
188
|
onError: t.onError,
|
|
189
189
|
lockedBlocks: v
|
|
190
|
-
}), b =
|
|
190
|
+
}), b = K({
|
|
191
191
|
authManager: g,
|
|
192
192
|
onError: t.onError
|
|
193
193
|
});
|
|
194
|
-
t.mcp?.enabled &&
|
|
194
|
+
t.mcp?.enabled && J({
|
|
195
195
|
editor: y,
|
|
196
196
|
channel: b.channel,
|
|
197
197
|
onOperation: t.mcp.onOperation
|
|
198
198
|
});
|
|
199
199
|
let x = null;
|
|
200
|
-
t.collaboration?.enabled && (x =
|
|
200
|
+
t.collaboration?.enabled && (x = fe({
|
|
201
201
|
authManager: g,
|
|
202
202
|
editor: y,
|
|
203
203
|
channel: b.channel,
|
|
@@ -206,9 +206,9 @@ function Fe(e) {
|
|
|
206
206
|
onCollaboratorLeft: t.collaboration.onCollaboratorLeft,
|
|
207
207
|
onBlockLocked: t.collaboration.onBlockLocked,
|
|
208
208
|
onBlockUnlocked: t.collaboration.onBlockUnlocked
|
|
209
|
-
}),
|
|
209
|
+
}), ee(() => x.lockedBlocks.value, (e) => {
|
|
210
210
|
v.value = e;
|
|
211
|
-
}, { immediate: !0 }),
|
|
211
|
+
}, { immediate: !0 }), U(y, x));
|
|
212
212
|
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = k({
|
|
213
213
|
editor: y,
|
|
214
214
|
config: {
|
|
@@ -238,7 +238,8 @@ function Fe(e) {
|
|
|
238
238
|
},
|
|
239
239
|
themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
|
|
240
240
|
keyboardOptions: { onBeforeUndo: () => h?.showCollabUndoWarning() },
|
|
241
|
-
editorRoot: e.editorRoot
|
|
241
|
+
editorRoot: e.editorRoot,
|
|
242
|
+
containerEl: e.containerEl
|
|
242
243
|
}), w = Me({
|
|
243
244
|
isCollaborationEnabled: S,
|
|
244
245
|
getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
|
|
@@ -254,7 +255,7 @@ function Fe(e) {
|
|
|
254
255
|
onError: t.onError
|
|
255
256
|
});
|
|
256
257
|
m = T;
|
|
257
|
-
let E = je(), D =
|
|
258
|
+
let E = je(), D = z(t.ai), A = Ne({
|
|
258
259
|
planConfigInstance: _,
|
|
259
260
|
aiConfig: D,
|
|
260
261
|
editor: y
|
|
@@ -263,15 +264,15 @@ function Fe(e) {
|
|
|
263
264
|
mediaLibraryOpen: E.mediaLibraryOpen,
|
|
264
265
|
mediaLibraryAccept: E.mediaLibraryAccept
|
|
265
266
|
});
|
|
266
|
-
|
|
267
|
+
re({
|
|
267
268
|
onBlockMove: y.moveBlock,
|
|
268
269
|
onBlockAdd: y.addBlock
|
|
269
270
|
});
|
|
270
|
-
let N =
|
|
271
|
+
let N = oe({
|
|
271
272
|
authManager: g,
|
|
272
273
|
getFontsConfig: () => t.fonts,
|
|
273
274
|
canUseCustomFonts: () => _.hasFeature("custom_fonts")
|
|
274
|
-
}), P =
|
|
275
|
+
}), P = se({
|
|
275
276
|
authManager: g,
|
|
276
277
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
277
278
|
save: () => y.save(),
|
|
@@ -279,7 +280,7 @@ function Fe(e) {
|
|
|
279
280
|
onError: t.onError,
|
|
280
281
|
isAuthReady: l,
|
|
281
282
|
onBeforeTestEmail: t.onBeforeTestEmail
|
|
282
|
-
}),
|
|
283
|
+
}), I = ie({
|
|
283
284
|
authManager: g,
|
|
284
285
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
285
286
|
getSocketId: () => b.getSocketId(),
|
|
@@ -288,55 +289,55 @@ function Fe(e) {
|
|
|
288
289
|
isAuthReady: l,
|
|
289
290
|
hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
|
|
290
291
|
});
|
|
291
|
-
|
|
292
|
-
comments:
|
|
292
|
+
_e({
|
|
293
|
+
comments: I,
|
|
293
294
|
channel: b.channel
|
|
294
295
|
});
|
|
295
|
-
let B =
|
|
296
|
+
let B = q({
|
|
296
297
|
authManager: g,
|
|
297
298
|
onError: t.onError
|
|
298
|
-
}),
|
|
299
|
+
}), W = c(!1), G = c(null), Y = c(!1), X = ge({
|
|
299
300
|
authManager: g,
|
|
300
301
|
getTemplateId: () => y.state.template?.id ?? null
|
|
301
302
|
});
|
|
302
|
-
function
|
|
303
|
+
function Z(e) {
|
|
303
304
|
E.commentsOpen.value = !0, queueMicrotask(() => {
|
|
304
305
|
o()?.filterByBlock(e);
|
|
305
306
|
});
|
|
306
307
|
}
|
|
307
|
-
a(
|
|
308
|
+
a(H, M.handleRequestMedia), a(ye, g), a(L, D), a(V, I), a(ne, B), a(O, X), a(F, {
|
|
308
309
|
plan: _,
|
|
309
310
|
ai: D,
|
|
310
311
|
comments: {
|
|
311
|
-
getBlockCount: (e) =>
|
|
312
|
-
openForBlock:
|
|
312
|
+
getBlockCount: (e) => I.commentCountByBlock.value.get(e) ?? 0,
|
|
313
|
+
openForBlock: Z
|
|
313
314
|
},
|
|
314
315
|
savedModules: {
|
|
315
316
|
openSaveDialog: (e) => {
|
|
316
|
-
|
|
317
|
+
G.value = e ?? null, W.value = !0;
|
|
317
318
|
},
|
|
318
319
|
openBrowser: () => {
|
|
319
|
-
|
|
320
|
+
Y.value = !0;
|
|
320
321
|
},
|
|
321
322
|
moduleCount: f(() => B.modules.value.length)
|
|
322
323
|
}
|
|
323
324
|
});
|
|
324
|
-
function
|
|
325
|
+
function ce(e) {
|
|
325
326
|
_.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function le(e) {
|
|
328
329
|
y.setUiTheme(e);
|
|
329
330
|
}
|
|
330
|
-
async function
|
|
331
|
+
async function Q() {
|
|
331
332
|
s.value = !0, u.value = null;
|
|
332
333
|
try {
|
|
333
334
|
if (await g.initialize(), d) return;
|
|
334
335
|
l.value = !0;
|
|
335
|
-
let e = await
|
|
336
|
+
let e = await ue({ authManager: g });
|
|
336
337
|
if (d) return;
|
|
337
338
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
338
339
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
339
|
-
if (e.websocket.ok ||
|
|
340
|
+
if (e.websocket.ok || R.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
|
|
340
341
|
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") && B.loadModules(), i("ready");
|
|
341
342
|
} catch (e) {
|
|
342
343
|
if (d) return;
|
|
@@ -346,7 +347,7 @@ function Fe(e) {
|
|
|
346
347
|
d || (s.value = !1);
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function de() {
|
|
350
351
|
d = !0, r.cleanupFontLinks(), b.disconnect(), C.destroy(), t.onUnmount?.();
|
|
351
352
|
}
|
|
352
353
|
return {
|
|
@@ -362,32 +363,32 @@ function Fe(e) {
|
|
|
362
363
|
editor: y,
|
|
363
364
|
core: C,
|
|
364
365
|
aiConfig: D,
|
|
365
|
-
featureFlags:
|
|
366
|
+
featureFlags: A,
|
|
366
367
|
mediaLib: M,
|
|
367
368
|
exporter: N,
|
|
368
369
|
testEmail: P,
|
|
369
|
-
commentsInstance:
|
|
370
|
+
commentsInstance: I,
|
|
370
371
|
savedModulesHeadless: B,
|
|
371
|
-
scoringInstance:
|
|
372
|
+
scoringInstance: X,
|
|
372
373
|
panelState: E,
|
|
373
374
|
snapshotPreview: T,
|
|
374
375
|
collabWarning: w,
|
|
375
|
-
showSaveModuleDialog:
|
|
376
|
-
showModuleBrowserModal:
|
|
377
|
-
saveModulePreSelectedBlockId:
|
|
376
|
+
showSaveModuleDialog: W,
|
|
377
|
+
showModuleBrowserModal: Y,
|
|
378
|
+
saveModulePreSelectedBlockId: G,
|
|
378
379
|
onSaveHook: p,
|
|
379
|
-
initialize:
|
|
380
|
-
destroy:
|
|
381
|
-
setThemeOverrides:
|
|
382
|
-
setUiTheme:
|
|
383
|
-
openCommentsForBlock:
|
|
380
|
+
initialize: Q,
|
|
381
|
+
destroy: de,
|
|
382
|
+
setThemeOverrides: ce,
|
|
383
|
+
setUiTheme: le,
|
|
384
|
+
openCommentsForBlock: Z
|
|
384
385
|
};
|
|
385
386
|
}
|
|
386
387
|
//#endregion
|
|
387
388
|
//#region src/utils/preRenderCustomBlocks.ts
|
|
388
389
|
async function Ie(e, t) {
|
|
389
390
|
let n = async (e) => {
|
|
390
|
-
if (
|
|
391
|
+
if (he(e)) {
|
|
391
392
|
let n = e;
|
|
392
393
|
try {
|
|
393
394
|
n.renderedHtml = await t.renderCustomBlock(n);
|
|
@@ -407,7 +408,7 @@ async function Ie(e, t) {
|
|
|
407
408
|
function Le(e) {
|
|
408
409
|
let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
|
|
409
410
|
function u() {
|
|
410
|
-
return
|
|
411
|
+
return me(i.config.value.websocket);
|
|
411
412
|
}
|
|
412
413
|
async function d(e) {
|
|
413
414
|
let i = await n.create(e);
|
|
@@ -478,7 +479,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
478
479
|
},
|
|
479
480
|
emits: ["cancel", "confirm"],
|
|
480
481
|
setup(e, { emit: t }) {
|
|
481
|
-
let n = t, { t: r } =
|
|
482
|
+
let n = t, { t: r } = Q();
|
|
482
483
|
return (t, a) => (i(), v(y, {
|
|
483
484
|
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
484
485
|
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
@@ -493,7 +494,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
493
494
|
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
494
495
|
onClick: a[2] ||= _((e) => n("cancel"), ["self"])
|
|
495
496
|
}, [x("div", Be, [
|
|
496
|
-
x("header", Ve, [D(h(
|
|
497
|
+
x("header", Ve, [D(h(le), {
|
|
497
498
|
size: 18,
|
|
498
499
|
"stroke-width": 2,
|
|
499
500
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
@@ -560,7 +561,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
560
561
|
},
|
|
561
562
|
emits: ["save"],
|
|
562
563
|
setup(e) {
|
|
563
|
-
let t = u(() => import("./CollaboratorBar-
|
|
564
|
+
let t = u(() => import("./CollaboratorBar-73LfbzqF.js")), n = u(() => import("./features-CXF_YKlL.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-SxIqfqA0.js")), { t: a, format: o } = Q();
|
|
564
565
|
return (c, l) => (i(), p("header", Ye, [
|
|
565
566
|
x("div", Xe, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", Ze, d(h(o)(h(a).header.templatesUsed, {
|
|
566
567
|
used: e.featureFlags.templateCount.value,
|
|
@@ -608,7 +609,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
608
609
|
}, [D(h(M), {
|
|
609
610
|
size: 12,
|
|
610
611
|
"stroke-width": 2.5
|
|
611
|
-
}), T(" " + d(h(a).header.saveFailed), 1)], 8, et)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", tt, [D(h(
|
|
612
|
+
}), T(" " + d(h(a).header.saveFailed), 1)], 8, et)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", tt, [D(h(A), {
|
|
612
613
|
size: 12,
|
|
613
614
|
"stroke-width": 2.5
|
|
614
615
|
}), T(" " + d(h(a).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", nt, [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),
|
|
@@ -624,7 +625,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
624
625
|
}),
|
|
625
626
|
onClick: l[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
626
627
|
}, [
|
|
627
|
-
D(h(
|
|
628
|
+
D(h(W), {
|
|
628
629
|
size: 16,
|
|
629
630
|
"stroke-width": 2
|
|
630
631
|
}),
|
|
@@ -639,7 +640,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
639
640
|
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
640
641
|
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"]),
|
|
641
642
|
onClick: l[1] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
642
|
-
}, [D(h(
|
|
643
|
+
}, [D(h(de), {
|
|
643
644
|
size: 16,
|
|
644
645
|
"stroke-width": 2,
|
|
645
646
|
class: "tpl-ai-btn-icon"
|
|
@@ -667,7 +668,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
667
668
|
},
|
|
668
669
|
disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
|
|
669
670
|
onClick: l[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
|
|
670
|
-
}, [e.testEmail.isSending.value ? (i(), v(h(
|
|
671
|
+
}, [e.testEmail.isSending.value ? (i(), v(h(pe), {
|
|
671
672
|
key: 1,
|
|
672
673
|
class: "tpl-spinner",
|
|
673
674
|
size: 16,
|
|
@@ -686,7 +687,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
686
687
|
},
|
|
687
688
|
disabled: e.isSaveDisabled,
|
|
688
689
|
onClick: l[3] ||= (e) => c.$emit("save")
|
|
689
|
-
}, [e.isSaving ? (i(), v(h(
|
|
690
|
+
}, [e.isSaving ? (i(), v(h(pe), {
|
|
690
691
|
key: 1,
|
|
691
692
|
class: "tpl-spinner",
|
|
692
693
|
size: 16,
|
|
@@ -722,9 +723,9 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
722
723
|
"module-insert"
|
|
723
724
|
],
|
|
724
725
|
setup(e, { expose: t, emit: n }) {
|
|
725
|
-
let r = u(() => import("./features-
|
|
726
|
+
let r = u(() => import("./features-CXF_YKlL.js").then((e) => e.c)), a = u(() => import("./features-CXF_YKlL.js").then((e) => e.s)), o = u(() => import("./features-CXF_YKlL.js").then((e) => e.o)), s = u(() => import("./features-CXF_YKlL.js").then((e) => e.n)), l = u(() => import("./features-CXF_YKlL.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-DXhuZgZ4.js")), f = u(() => import("./ModuleBrowserModal-DfnJQBkM.js")), g = u(async () => {
|
|
726
727
|
try {
|
|
727
|
-
return (await import("./src-
|
|
728
|
+
return (await import("./src-C21GI0p6.js")).MediaLibraryModal;
|
|
728
729
|
} catch {
|
|
729
730
|
throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
|
|
730
731
|
}
|
|
@@ -828,7 +829,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
828
829
|
},
|
|
829
830
|
emits: ["retry"],
|
|
830
831
|
setup(e, { emit: t }) {
|
|
831
|
-
let n = t, { t: r } =
|
|
832
|
+
let n = t, { t: r } = Q();
|
|
832
833
|
function a(e) {
|
|
833
834
|
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
834
835
|
}
|
|
@@ -857,8 +858,8 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
857
858
|
props: { visible: { type: Boolean } },
|
|
858
859
|
emits: ["cancel", "confirm"],
|
|
859
860
|
setup(e, { emit: t }) {
|
|
860
|
-
let n = t, { t: r } =
|
|
861
|
-
return (t, a) => e.visible ? (i(), p("div", xt, [x("div", St, [D(h(
|
|
861
|
+
let n = t, { t: r } = Q();
|
|
862
|
+
return (t, a) => e.visible ? (i(), p("div", xt, [x("div", St, [D(h(N), {
|
|
862
863
|
size: 18,
|
|
863
864
|
"stroke-width": 2,
|
|
864
865
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
@@ -885,10 +886,10 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
885
886
|
__name: "CollabUndoToast",
|
|
886
887
|
props: { visible: { type: Boolean } },
|
|
887
888
|
setup(e) {
|
|
888
|
-
let { t } =
|
|
889
|
+
let { t } = P();
|
|
889
890
|
return (n, r) => e.visible ? (i(), p("div", Tt, d(h(t).history.collabWarning), 1)) : m("", !0);
|
|
890
891
|
}
|
|
891
|
-
}), Dt = ["data-tpl-theme"], Ot = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, kt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, At = ["aria-label"], jt = /* @__PURE__ */
|
|
892
|
+
}), Dt = ["data-tpl-theme"], Ot = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, kt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, At = ["aria-label"], jt = /* @__PURE__ */ ce(/* @__PURE__ */ E({
|
|
892
893
|
__name: "CloudEditor",
|
|
893
894
|
props: {
|
|
894
895
|
config: {},
|
|
@@ -900,61 +901,64 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
900
901
|
emits: ["ready"],
|
|
901
902
|
setup(e, { expose: r, emit: o }) {
|
|
902
903
|
let l = e;
|
|
903
|
-
a(
|
|
904
|
-
let u = o, f = c(null), _ = Fe({
|
|
904
|
+
a(B, l.cloudTranslations);
|
|
905
|
+
let u = o, f = c(null), _ = c(null), w = Fe({
|
|
905
906
|
config: l.config,
|
|
906
907
|
translations: l.translations,
|
|
907
908
|
fontsManager: l.fontsManager,
|
|
908
909
|
emit: u,
|
|
909
910
|
getCommentsSidebar: () => f.value ? { filterByBlock: f.value.filterCommentsByBlock } : null,
|
|
910
|
-
editorRoot: l.shadowRoot
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
editorRoot: l.shadowRoot,
|
|
912
|
+
containerEl: _
|
|
913
|
+
}), { isInitializing: E, isAuthReady: ee, initError: O, planConfigInstance: k, websocket: A, collaboration: j, isCollaborationEnabled: M, editor: N, core: P, featureFlags: F, mediaLib: I, exporter: L, testEmail: R, commentsInstance: te, savedModulesHeadless: ne, panelState: z, snapshotPreview: V, collabWarning: re, showSaveModuleDialog: H, showModuleBrowserModal: U, saveModulePreSelectedBlockId: W, setThemeOverrides: ie, setUiTheme: ae } = w;
|
|
914
|
+
async function G(e) {
|
|
913
915
|
try {
|
|
914
|
-
await
|
|
916
|
+
await R.sendTestEmail(e), z.testEmailModalOpen.value = !1;
|
|
915
917
|
} catch {}
|
|
916
918
|
}
|
|
917
|
-
function
|
|
919
|
+
function oe(e, t) {
|
|
918
920
|
for (let n = 0; n < e.content.length; n++) {
|
|
919
|
-
let r =
|
|
920
|
-
|
|
921
|
+
let r = ve(e.content[n]), i = t === void 0 ? void 0 : t + n;
|
|
922
|
+
N.addBlock(r, void 0, void 0, i);
|
|
921
923
|
}
|
|
922
|
-
|
|
924
|
+
U.value = !1;
|
|
923
925
|
}
|
|
924
|
-
let
|
|
926
|
+
let K = Le({
|
|
925
927
|
config: l.config,
|
|
926
|
-
editor:
|
|
928
|
+
editor: N,
|
|
927
929
|
websocket: A,
|
|
928
930
|
planConfigInstance: k,
|
|
929
931
|
snapshotPreview: V,
|
|
930
|
-
core:
|
|
931
|
-
exporter:
|
|
932
|
-
featureFlags:
|
|
933
|
-
isDestroyed:
|
|
934
|
-
}),
|
|
935
|
-
issues:
|
|
932
|
+
core: P,
|
|
933
|
+
exporter: L,
|
|
934
|
+
featureFlags: F,
|
|
935
|
+
isDestroyed: w.isDestroyed
|
|
936
|
+
}), q = Re({
|
|
937
|
+
issues: P.accessibilityLint ? P.accessibilityLint.issues : c([]),
|
|
936
938
|
planConfig: k.config
|
|
937
939
|
});
|
|
938
|
-
async function
|
|
939
|
-
await
|
|
940
|
+
async function J() {
|
|
941
|
+
await q.tryRunSave(() => K.saveTemplate().catch((e) => l.config.onError?.(e)));
|
|
940
942
|
}
|
|
941
|
-
return
|
|
942
|
-
|
|
943
|
+
return w.onSaveHook.value = J, t(() => {
|
|
944
|
+
w.initialize();
|
|
943
945
|
}), g(() => {
|
|
944
|
-
|
|
946
|
+
w.destroy();
|
|
945
947
|
}), r({
|
|
946
|
-
getContent: () =>
|
|
947
|
-
setContent: (e) =>
|
|
948
|
-
setTheme:
|
|
949
|
-
setThemeOverrides:
|
|
950
|
-
create:
|
|
951
|
-
load:
|
|
952
|
-
save:
|
|
953
|
-
sendTestEmail:
|
|
948
|
+
getContent: () => N.content.value,
|
|
949
|
+
setContent: (e) => N.setContent(e),
|
|
950
|
+
setTheme: ae,
|
|
951
|
+
setThemeOverrides: ie,
|
|
952
|
+
create: K.createTemplate,
|
|
953
|
+
load: K.loadTemplate,
|
|
954
|
+
save: K.saveTemplate,
|
|
955
|
+
sendTestEmail: R.sendTestEmail
|
|
954
956
|
}), (t, r) => (i(), p("div", {
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
957
|
+
ref_key: "rootEl",
|
|
958
|
+
ref: _,
|
|
959
|
+
class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(N).state.darkMode }]),
|
|
960
|
+
"data-tpl-theme": h(P).resolvedTheme.value,
|
|
961
|
+
style: C(h(P).themeStyles.value)
|
|
958
962
|
}, [
|
|
959
963
|
D(y, {
|
|
960
964
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
@@ -964,7 +968,7 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
964
968
|
"leave-from-class": "tpl:opacity-100",
|
|
965
969
|
"leave-to-class": "tpl:opacity-0"
|
|
966
970
|
}, {
|
|
967
|
-
default: s(() => [D(mt, { visible: h(
|
|
971
|
+
default: s(() => [D(mt, { visible: h(E) || h(N).state.isLoading }, null, 8, ["visible"])]),
|
|
968
972
|
_: 1
|
|
969
973
|
}),
|
|
970
974
|
D(y, {
|
|
@@ -977,8 +981,8 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
977
981
|
}, {
|
|
978
982
|
default: s(() => [D(bt, {
|
|
979
983
|
error: h(O),
|
|
980
|
-
visible: !!h(O) && !h(
|
|
981
|
-
onRetry: h(
|
|
984
|
+
visible: !!h(O) && !h(E),
|
|
985
|
+
onRetry: h(w).initialize
|
|
982
986
|
}, null, 8, [
|
|
983
987
|
"error",
|
|
984
988
|
"visible",
|
|
@@ -987,19 +991,19 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
987
991
|
_: 1
|
|
988
992
|
}),
|
|
989
993
|
D(lt, {
|
|
990
|
-
editor: h(
|
|
991
|
-
core: h(
|
|
992
|
-
"feature-flags": h(
|
|
993
|
-
"panel-state": h(
|
|
994
|
+
editor: h(N),
|
|
995
|
+
core: h(P),
|
|
996
|
+
"feature-flags": h(F),
|
|
997
|
+
"panel-state": h(z),
|
|
994
998
|
"snapshot-preview": h(V),
|
|
995
|
-
"comments-instance": h(
|
|
996
|
-
"test-email": h(
|
|
999
|
+
"comments-instance": h(te),
|
|
1000
|
+
"test-email": h(R),
|
|
997
1001
|
websocket: h(A),
|
|
998
1002
|
collaboration: h(j),
|
|
999
1003
|
"is-collaboration-enabled": h(M),
|
|
1000
|
-
"is-saving": h(
|
|
1001
|
-
"is-save-disabled": h(
|
|
1002
|
-
onSave:
|
|
1004
|
+
"is-saving": h(N).state.isSaving || h(F).isSaveExporting.value,
|
|
1005
|
+
"is-save-disabled": h(N).state.isSaving || h(F).isSaveExporting.value || !h(N).state.isDirty,
|
|
1006
|
+
onSave: J
|
|
1003
1007
|
}, null, 8, [
|
|
1004
1008
|
"editor",
|
|
1005
1009
|
"core",
|
|
@@ -1015,10 +1019,10 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1015
1019
|
"is-save-disabled"
|
|
1016
1020
|
]),
|
|
1017
1021
|
D(Je, {
|
|
1018
|
-
open: h(
|
|
1019
|
-
issues: h(
|
|
1020
|
-
onCancel: h(
|
|
1021
|
-
onConfirm: h(
|
|
1022
|
+
open: h(q).modalOpen.value,
|
|
1023
|
+
issues: h(q).blockingIssues.value,
|
|
1024
|
+
onCancel: h(q).cancel,
|
|
1025
|
+
onConfirm: h(q).confirmAndSave
|
|
1022
1026
|
}, null, 8, [
|
|
1023
1027
|
"open",
|
|
1024
1028
|
"issues",
|
|
@@ -1042,18 +1046,18 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1042
1046
|
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1043
1047
|
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1044
1048
|
}, {
|
|
1045
|
-
default: s(() => [D(Et, { visible: h(
|
|
1049
|
+
default: s(() => [D(Et, { visible: h(re).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1046
1050
|
_: 1
|
|
1047
1051
|
}),
|
|
1048
|
-
n(D(Ee, null, null, 512), [[S, !h(
|
|
1052
|
+
n(D(Ee, null, null, 512), [[S, !h(N).state.previewMode]]),
|
|
1049
1053
|
x("div", {
|
|
1050
|
-
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(
|
|
1054
|
+
class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(N).state.previewMode ? "tpl:left-0 tpl:right-0" : h(z).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(V).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1051
1055
|
style: {
|
|
1052
1056
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1053
1057
|
"background-color": "var(--tpl-canvas-bg)"
|
|
1054
1058
|
}
|
|
1055
1059
|
}, [x("div", Ot, [D(y, { name: "tpl-restore-btn" }, {
|
|
1056
|
-
default: s(() => [h(
|
|
1060
|
+
default: s(() => [h(P).conditionPreview.hasHiddenBlocks.value ? (i(), p("button", {
|
|
1057
1061
|
key: 0,
|
|
1058
1062
|
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",
|
|
1059
1063
|
style: {
|
|
@@ -1062,22 +1066,22 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1062
1066
|
"border-color": "var(--tpl-warning)",
|
|
1063
1067
|
"backdrop-filter": "blur(8px)"
|
|
1064
1068
|
},
|
|
1065
|
-
onClick: r[0] ||= (e) => h(
|
|
1069
|
+
onClick: r[0] ||= (e) => h(P).conditionPreview.reset()
|
|
1066
1070
|
}, [D(h(be), {
|
|
1067
1071
|
size: 13,
|
|
1068
1072
|
"stroke-width": 2
|
|
1069
|
-
}), T(" " + d(h(
|
|
1073
|
+
}), T(" " + d(h(P).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
|
|
1070
1074
|
_: 1
|
|
1071
1075
|
})]), x("main", kt, [D(Oe, {
|
|
1072
|
-
viewport: h(
|
|
1073
|
-
content: h(
|
|
1074
|
-
"selected-block-id": h(
|
|
1075
|
-
"dark-mode": h(
|
|
1076
|
-
"preview-mode": h(
|
|
1076
|
+
viewport: h(N).state.viewport,
|
|
1077
|
+
content: h(N).content.value,
|
|
1078
|
+
"selected-block-id": h(N).state.selectedBlockId,
|
|
1079
|
+
"dark-mode": h(N).state.darkMode,
|
|
1080
|
+
"preview-mode": h(N).state.previewMode,
|
|
1077
1081
|
"locked-blocks": h(j)?.lockedBlocks.value ?? void 0,
|
|
1078
|
-
onSelectBlock: h(
|
|
1079
|
-
onOpenAiChat: r[1] ||= (e) => h(
|
|
1080
|
-
onOpenDesignReference: r[2] ||= (e) => h(
|
|
1082
|
+
onSelectBlock: h(N).selectBlock,
|
|
1083
|
+
onOpenAiChat: r[1] ||= (e) => h(z).aiChatOpen.value = !0,
|
|
1084
|
+
onOpenDesignReference: r[2] ||= (e) => h(z).designReferenceOpen.value = !0
|
|
1081
1085
|
}, null, 8, [
|
|
1082
1086
|
"viewport",
|
|
1083
1087
|
"content",
|
|
@@ -1087,51 +1091,51 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1087
1091
|
"locked-blocks",
|
|
1088
1092
|
"onSelectBlock"
|
|
1089
1093
|
])])], 2),
|
|
1090
|
-
e.config.branding !== !1 && !h(
|
|
1094
|
+
e.config.branding !== !1 && !h(F).isWhiteLabeled.value ? (i(), v(ke, {
|
|
1091
1095
|
key: 0,
|
|
1092
|
-
"position-class": [h(
|
|
1096
|
+
"position-class": [h(N).state.previewMode ? "tpl:left-0 tpl:right-0" : h(z).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
|
|
1093
1097
|
}, null, 8, ["position-class"])) : m("", !0),
|
|
1094
1098
|
x("div", {
|
|
1095
1099
|
class: "tpl-sr-only",
|
|
1096
1100
|
role: "status",
|
|
1097
1101
|
"aria-live": "polite",
|
|
1098
1102
|
"aria-atomic": "true",
|
|
1099
|
-
"aria-label": h(
|
|
1100
|
-
}, d(h(
|
|
1103
|
+
"aria-label": h(P).t.landmarks.reorderAnnouncements
|
|
1104
|
+
}, d(h(P).keyboardReorder.announcement.value), 9, At),
|
|
1101
1105
|
n(D(Se, {
|
|
1102
|
-
"selected-block": h(
|
|
1103
|
-
settings: h(
|
|
1104
|
-
"shifted-left": h(
|
|
1105
|
-
onUpdateBlock: r[3] ||= (e) => h(
|
|
1106
|
-
onDeleteBlock: r[4] ||= (e) => h(
|
|
1107
|
-
onDuplicateBlock: r[5] ||= (e) => h(
|
|
1108
|
-
onUpdateSettings: h(
|
|
1106
|
+
"selected-block": h(N).selectedBlock.value,
|
|
1107
|
+
settings: h(N).content.value.settings,
|
|
1108
|
+
"shifted-left": h(z).rightPanelOpen.value,
|
|
1109
|
+
onUpdateBlock: r[3] ||= (e) => h(N).updateBlock(h(N).selectedBlock.value.id, e),
|
|
1110
|
+
onDeleteBlock: r[4] ||= (e) => h(P).blockActions.deleteBlock(h(N).selectedBlock.value.id),
|
|
1111
|
+
onDuplicateBlock: r[5] ||= (e) => h(P).blockActions.duplicateBlock(h(N).selectedBlock.value),
|
|
1112
|
+
onUpdateSettings: h(N).updateSettings
|
|
1109
1113
|
}, null, 8, [
|
|
1110
1114
|
"selected-block",
|
|
1111
1115
|
"settings",
|
|
1112
1116
|
"shifted-left",
|
|
1113
1117
|
"onUpdateSettings"
|
|
1114
|
-
]), [[S, !h(
|
|
1115
|
-
!h(
|
|
1118
|
+
]), [[S, !h(N).state.previewMode]]),
|
|
1119
|
+
!h(E) && h(ee) ? (i(), v(ut, {
|
|
1116
1120
|
key: 1,
|
|
1117
1121
|
ref_key: "cloudPanelsRef",
|
|
1118
1122
|
ref: f,
|
|
1119
1123
|
config: l.config,
|
|
1120
|
-
editor: h(
|
|
1121
|
-
core: h(
|
|
1122
|
-
"panel-state": h(
|
|
1124
|
+
editor: h(N),
|
|
1125
|
+
core: h(P),
|
|
1126
|
+
"panel-state": h(z),
|
|
1123
1127
|
"plan-config-instance": h(k),
|
|
1124
|
-
"test-email": h(
|
|
1125
|
-
"media-lib": h(
|
|
1126
|
-
"saved-modules-headless": h(
|
|
1127
|
-
"show-save-module-dialog": h(
|
|
1128
|
-
"save-module-pre-selected-block-id": h(
|
|
1129
|
-
"show-module-browser-modal": h(
|
|
1130
|
-
"onUpdate:showSaveModuleDialog": r[6] ||= (e) =>
|
|
1131
|
-
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) =>
|
|
1132
|
-
"onUpdate:showModuleBrowserModal": r[8] ||= (e) =>
|
|
1133
|
-
onSendTestEmail:
|
|
1134
|
-
onModuleInsert:
|
|
1128
|
+
"test-email": h(R),
|
|
1129
|
+
"media-lib": h(I),
|
|
1130
|
+
"saved-modules-headless": h(ne),
|
|
1131
|
+
"show-save-module-dialog": h(H),
|
|
1132
|
+
"save-module-pre-selected-block-id": h(W),
|
|
1133
|
+
"show-module-browser-modal": h(U),
|
|
1134
|
+
"onUpdate:showSaveModuleDialog": r[6] ||= (e) => H.value = e,
|
|
1135
|
+
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => W.value = e,
|
|
1136
|
+
"onUpdate:showModuleBrowserModal": r[8] ||= (e) => U.value = e,
|
|
1137
|
+
onSendTestEmail: G,
|
|
1138
|
+
onModuleInsert: oe
|
|
1135
1139
|
}, null, 8, [
|
|
1136
1140
|
"config",
|
|
1137
1141
|
"editor",
|
|
@@ -1146,13 +1150,13 @@ var ze = ["aria-label"], Be = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1146
1150
|
"show-module-browser-modal"
|
|
1147
1151
|
])) : m("", !0),
|
|
1148
1152
|
x("div", {
|
|
1149
|
-
ref: (e) => h(
|
|
1153
|
+
ref: (e) => h(P).popoverRoot.value = e,
|
|
1150
1154
|
class: "tpl-popover-root"
|
|
1151
1155
|
}, null, 512)
|
|
1152
1156
|
], 14, Dt));
|
|
1153
1157
|
}
|
|
1154
|
-
}), [["__scopeId", "data-v-
|
|
1158
|
+
}), [["__scopeId", "data-v-1b4da1c7"]]);
|
|
1155
1159
|
//#endregion
|
|
1156
1160
|
export { jt as default };
|
|
1157
1161
|
|
|
1158
|
-
//# sourceMappingURL=CloudEditor-
|
|
1162
|
+
//# sourceMappingURL=CloudEditor-ChWUIMw7.js.map
|