@templatical/editor 0.18.0 → 0.19.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-DAQTFuvi.js} +3 -3
- package/dist/{AiFeatureMenu-IoLW8c6m.js → AiFeatureMenu-aFSO20PR.js} +4 -4
- package/dist/{BlockIssueBadge-FbyZBJlf.js → BlockIssueBadge-BQmq1bxn.js} +2 -2
- package/dist/{CloudEditor-txLsdvcR.js → CloudEditor-D0K-m1GA.js} +14 -12
- package/dist/{CollaboratorBar-CpLOFt43.js → CollaboratorBar-CJO3l6Dt.js} +2 -2
- package/dist/ColorPicker-BsgpTJqK.js +552 -0
- package/dist/{CommentsSidebar-C8xFu9qy.js → CommentsSidebar-BYMVucZh.js} +4 -4
- package/dist/{CountdownBlock-CaU40Htk.js → CountdownBlock-Bn5w7C-p.js} +1 -1
- package/dist/{CountdownToolbar-CBbGAxmF.js → CountdownToolbar-PJI3ffi1.js} +3 -3
- package/dist/{DesignReferenceSidebar-BWZgqmT-.js → DesignReferenceSidebar-QfAV8XT9.js} +5 -5
- package/dist/{IssuesPanel-CBzfmzRM.js → IssuesPanel-CTjRgz8w.js} +2 -2
- package/dist/{ModuleBrowserModal-C9qHpjaS.js → ModuleBrowserModal-BNalLx0k.js} +7 -7
- package/dist/{ModulePreviewCanvas-xEMWMJwf.js → ModulePreviewCanvas-BwObwisa.js} +2 -2
- package/dist/{NumberWithSuffix-BreqtON_.js → NumberWithSuffix-D3BKz66W.js} +1 -1
- package/dist/{ParagraphEditor-iRJI_YbA.js → ParagraphEditor-Cf75UfSo.js} +42 -42
- package/dist/{RichTextEditorContent-DkXai9qP.js → RichTextEditorContent-MdaLz6Q3.js} +5 -5
- package/dist/{SaveModuleDialog-DqDmk0rO.js → SaveModuleDialog-MTjwiF9D.js} +6 -6
- package/dist/{SnapshotHistory-BVe5aCHi.js → SnapshotHistory-C_Y1LzAY.js} +4 -4
- package/dist/{TemplateScoringPanel-CRqt9-T5.js → TemplateScoringPanel-DikuKc6i.js} +77 -77
- package/dist/{TestEmailModal-jpy4hnYZ.js → TestEmailModal-BW8aTtzf.js} +3 -3
- package/dist/{TitleEditor-Bf6Jv2qI.js → TitleEditor-CCUkbRN0.js} +7 -7
- package/dist/{TplModal-DAtccv6o.js → TplModal-DoOwUKlT.js} +3 -3
- package/dist/{blockTypeIcons-CnlwyvkL.js → blockTypeIcons-BlPKjD7M.js} +1 -1
- 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-RwJiaPXZ.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-B4oJlFQI.js.map → AiFeatureMenu-RwJiaPXZ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C7Ts7bT7.js → BlockIssueBadge-DM-TDKbr.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C7Ts7bT7.js.map → BlockIssueBadge-DM-TDKbr.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BRO-2CcF.js → CloudEditor-Dufl354p.js} +132 -130
- package/dist/cdn/chunks/CloudEditor-Dufl354p.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BsWOjOCS.js → CollaboratorBar-xsU20iPl.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BsWOjOCS.js.map → CollaboratorBar-xsU20iPl.js.map} +1 -1
- package/dist/{ColorPicker-BXCcUYsZ.js → cdn/chunks/ColorPicker-y_obnw4o.js} +234 -157
- package/dist/cdn/chunks/ColorPicker-y_obnw4o.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BUGxk8GI.js → CountdownBlock-sHsRMe1q.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-BUGxk8GI.js.map → CountdownBlock-sHsRMe1q.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C8tWWfGw.js → CountdownToolbar-Ckc_jEi-.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C8tWWfGw.js.map → CountdownToolbar-Ckc_jEi-.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C5izyrbm.js → IssuesPanel-DF5Ajuna.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-C5izyrbm.js.map → IssuesPanel-DF5Ajuna.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DySKXKFF.js → ModuleBrowserModal-DG4AVFjH.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DySKXKFF.js.map → ModuleBrowserModal-DG4AVFjH.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-qqEvLBp2.js → ModulePreviewCanvas-Bc_PcJuc.js} +24 -24
- package/dist/cdn/chunks/{ModulePreviewCanvas-qqEvLBp2.js.map → ModulePreviewCanvas-Bc_PcJuc.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-DttdbXsh.js → NumberWithSuffix-8fOO-LC_.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-DttdbXsh.js.map → NumberWithSuffix-8fOO-LC_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CQJ23PXU.js → ParagraphEditor-BkafKSju.js} +107 -107
- package/dist/cdn/chunks/{ParagraphEditor-CQJ23PXU.js.map → ParagraphEditor-BkafKSju.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4vxiXng.js → RichTextEditorContent-BthhzOZS.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-C4vxiXng.js.map → RichTextEditorContent-BthhzOZS.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D5eddgzd.js → SaveModuleDialog-DhsfYf2n.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-D5eddgzd.js.map → SaveModuleDialog-DhsfYf2n.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-5TkwDrPL.js → TitleEditor-DLv9cXba.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-5TkwDrPL.js.map → TitleEditor-DLv9cXba.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CbmN4aSw.js → blockTypeIcons-B0uibGX7.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-CbmN4aSw.js.map → blockTypeIcons-B0uibGX7.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-DLHvZ0UH.js} +19 -19
- package/dist/cdn/chunks/{extensions-B3M4IqhZ.js.map → extensions-DLHvZ0UH.js.map} +1 -1
- package/dist/cdn/chunks/{features-HBwOEo4D.js → features-Cnfv4QAY.js} +1382 -1298
- package/dist/cdn/chunks/features-Cnfv4QAY.js.map +1 -0
- package/dist/cdn/chunks/{icons-D4vTsN4p.js → icons-DbcM69bb.js} +2 -2
- package/dist/cdn/chunks/{icons-D4vTsN4p.js.map → icons-DbcM69bb.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CfExuiSG.js → media-library-DpSMwHd4.js} +524 -524
- package/dist/cdn/chunks/{media-library-CfExuiSG.js.map → media-library-DpSMwHd4.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/{quality-nh1R42eb.js → quality-D9QqkRcU.js} +77 -77
- package/dist/cdn/chunks/{quality-nh1R42eb.js.map → quality-D9QqkRcU.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BLvlUayY.js → renderer-BsLQZNXU.js} +14 -14
- package/dist/cdn/chunks/{renderer-BLvlUayY.js.map → renderer-BsLQZNXU.js.map} +1 -1
- package/dist/cdn/chunks/{src-Cks4RrLL.js → src-zu1ehVNN.js} +6 -6
- package/dist/cdn/chunks/{src-Cks4RrLL.js.map → src-zu1ehVNN.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CPCN13az.js → styles-Dx-jXeCd.js} +184 -184
- package/dist/cdn/chunks/{styles-CPCN13az.js.map → styles-Dx-jXeCd.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +54 -52
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-BogxOeZu.js → cloud-B-RebwxI.js} +5 -5
- 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/index.d.ts +31 -0
- package/dist/keys-DFaIbGR8.js +10 -0
- package/dist/{pt-BR-C74zfEWH.js → pt-BR-Bcc5Tjed.js} +2 -1
- package/dist/style.css +1 -1
- package/dist/{styles-CJ6WmkYL.js → styles-64uLkPJV.js} +47 -47
- package/dist/templatical-editor.js +13 -11
- package/dist/{useCloudI18n-DIn74fK2.js → useCloudI18n-PCDOC2kz.js} +1 -1
- package/dist/{useEditorCore-LJJNXXqC.js → useEditorCore-ea9OrrH3.js} +798 -755
- 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/package.json +7 -7
- 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/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 be, x as xe } from "./icons-
|
|
4
|
-
import { a as Se, c as Ce, d as we, f as Te, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me, u as Ne } from "./styles-
|
|
5
|
-
import { d as Pe } from "./ColorPicker-
|
|
2
|
+
import { At as k, Bt as A, E as j, Gt as M, Hn as N, Ht as P, In as ee, Jt as F, Pt as I, S as L, St as R, Tn as z, Ut as B, X as V, Yt as H, Zt as te, _ as ne, _t as U, at as W, b as re, c as G, d as K, dt as q, f as J, g as ie, gn as Y, h as ae, jt as X, k as oe, l as Z, ln as Q, m as $, mt as se, p as ce, s as le, sn as ue, st as de, tr as fe, tt as pe, u as me, un as he, v as ge, x as _e, xt as ve, y as ye } from "./features-Cnfv4QAY.js";
|
|
3
|
+
import { S as be, x as xe } from "./icons-DbcM69bb.js";
|
|
4
|
+
import { a as Se, c as Ce, d as we, f as Te, i as Ee, l as De, n as Oe, o as ke, r as Ae, s as je, t as Me, u as Ne } from "./styles-Dx-jXeCd.js";
|
|
5
|
+
import { d as Pe } from "./ColorPicker-y_obnw4o.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 = J({
|
|
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 Y(u, () => {
|
|
90
90
|
l.value = !1;
|
|
91
91
|
}), {
|
|
92
92
|
activePanel: e,
|
|
@@ -111,7 +111,7 @@ function Ie() {
|
|
|
111
111
|
function Le(e) {
|
|
112
112
|
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = z(() => {
|
|
113
113
|
a.value = !1;
|
|
114
|
-
},
|
|
114
|
+
}, fe, { 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
|
}
|
|
@@ -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-zu1ehVNN.js");
|
|
179
179
|
return l(await new t(a).uploadMedia(e));
|
|
180
180
|
} catch (e) {
|
|
181
181
|
return s?.(e), null;
|
|
@@ -216,11 +216,11 @@ function Be(e) {
|
|
|
216
216
|
templateDefaults: t.templateDefaults,
|
|
217
217
|
onError: t.onError,
|
|
218
218
|
lockedBlocks: v
|
|
219
|
-
}), b =
|
|
219
|
+
}), b = $({
|
|
220
220
|
authManager: g,
|
|
221
221
|
onError: t.onError
|
|
222
222
|
});
|
|
223
|
-
t.mcp?.enabled &&
|
|
223
|
+
t.mcp?.enabled && le({
|
|
224
224
|
editor: y,
|
|
225
225
|
channel: b.channel,
|
|
226
226
|
onOperation: t.mcp.onOperation
|
|
@@ -238,15 +238,17 @@ function Be(e) {
|
|
|
238
238
|
}), O(() => x.lockedBlocks.value, (e) => {
|
|
239
239
|
v.value = e;
|
|
240
240
|
}, { immediate: !0 }), ae(y, x));
|
|
241
|
-
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C =
|
|
241
|
+
let S = f(() => !!t.collaboration?.enabled && _.hasFeature("collaboration")), C = oe({
|
|
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,
|
|
@@ -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 = re(t.ai), k = Re({
|
|
291
293
|
planConfigInstance: _,
|
|
292
294
|
aiConfig: D,
|
|
293
295
|
editor: y
|
|
294
|
-
}),
|
|
296
|
+
}), N = 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
|
+
pe({
|
|
303
305
|
onBlockMove: y.moveBlock,
|
|
304
306
|
onBlockAdd: y.addBlock
|
|
305
307
|
});
|
|
306
|
-
let
|
|
308
|
+
let P = me({
|
|
307
309
|
authManager: g,
|
|
308
310
|
getFontsConfig: () => t.fonts,
|
|
309
311
|
canUseCustomFonts: () => _.hasFeature("custom_fonts")
|
|
310
|
-
}),
|
|
312
|
+
}), ee = K({
|
|
311
313
|
authManager: g,
|
|
312
314
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
313
315
|
save: () => y.save(),
|
|
314
|
-
exportHtml: (e) =>
|
|
316
|
+
exportHtml: (e) => P.exportHtml(e),
|
|
315
317
|
onError: t.onError,
|
|
316
318
|
isAuthReady: l,
|
|
317
319
|
onBeforeTestEmail: t.onBeforeTestEmail
|
|
318
|
-
}),
|
|
320
|
+
}), I = ge({
|
|
319
321
|
authManager: g,
|
|
320
322
|
getTemplateId: () => y.state.template?.id ?? null,
|
|
321
323
|
getSocketId: () => b.getSocketId(),
|
|
@@ -324,40 +326,40 @@ function Be(e) {
|
|
|
324
326
|
isAuthReady: l,
|
|
325
327
|
hasCommentingFeature: () => t.commenting !== !1 && _.hasFeature("commenting")
|
|
326
328
|
});
|
|
327
|
-
|
|
328
|
-
comments:
|
|
329
|
+
ne({
|
|
330
|
+
comments: I,
|
|
329
331
|
channel: b.channel
|
|
330
332
|
});
|
|
331
|
-
let
|
|
333
|
+
let L = ce({
|
|
332
334
|
authManager: g,
|
|
333
335
|
onError: t.onError
|
|
334
|
-
}), R = c(!1), z = c(null),
|
|
336
|
+
}), R = c(!1), z = c(null), V = c(!1), H = ye({
|
|
335
337
|
authManager: g,
|
|
336
338
|
getTemplateId: () => y.state.template?.id ?? null
|
|
337
339
|
});
|
|
338
|
-
function
|
|
340
|
+
function U(e) {
|
|
339
341
|
E.commentsOpen.value = !0, queueMicrotask(() => {
|
|
340
342
|
o()?.filterByBlock(e);
|
|
341
343
|
});
|
|
342
344
|
}
|
|
343
|
-
a(
|
|
345
|
+
a(ue, N.handleRequestMedia), a(M, g), a(B, D), a(te, I), a(Q, L), a(he, H), a(F, {
|
|
344
346
|
plan: _,
|
|
345
347
|
ai: D,
|
|
346
348
|
comments: {
|
|
347
|
-
getBlockCount: (e) =>
|
|
348
|
-
openForBlock:
|
|
349
|
+
getBlockCount: (e) => I.commentCountByBlock.value.get(e) ?? 0,
|
|
350
|
+
openForBlock: U
|
|
349
351
|
},
|
|
350
352
|
savedModules: {
|
|
351
353
|
openSaveDialog: (e) => {
|
|
352
354
|
z.value = e ?? null, R.value = !0;
|
|
353
355
|
},
|
|
354
356
|
openBrowser: () => {
|
|
355
|
-
|
|
357
|
+
V.value = !0;
|
|
356
358
|
},
|
|
357
|
-
moduleCount: f(() =>
|
|
359
|
+
moduleCount: f(() => L.modules.value.length)
|
|
358
360
|
}
|
|
359
361
|
});
|
|
360
|
-
function
|
|
362
|
+
function W(e) {
|
|
361
363
|
_.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
362
364
|
}
|
|
363
365
|
function q(e) {
|
|
@@ -368,12 +370,12 @@ 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 G({ 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 ||
|
|
376
|
-
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") &&
|
|
377
|
+
if (e.websocket.ok || A.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await _.fetchConfig(), d) return;
|
|
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") && L.loadModules(), i("ready");
|
|
377
379
|
} catch (e) {
|
|
378
380
|
if (d) return;
|
|
379
381
|
let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
@@ -399,31 +401,31 @@ function Be(e) {
|
|
|
399
401
|
core: C,
|
|
400
402
|
aiConfig: D,
|
|
401
403
|
featureFlags: k,
|
|
402
|
-
mediaLib:
|
|
403
|
-
exporter:
|
|
404
|
-
testEmail:
|
|
405
|
-
commentsInstance:
|
|
406
|
-
savedModulesHeadless:
|
|
407
|
-
scoringInstance:
|
|
404
|
+
mediaLib: N,
|
|
405
|
+
exporter: P,
|
|
406
|
+
testEmail: ee,
|
|
407
|
+
commentsInstance: I,
|
|
408
|
+
savedModulesHeadless: L,
|
|
409
|
+
scoringInstance: H,
|
|
408
410
|
panelState: E,
|
|
409
411
|
snapshotPreview: T,
|
|
410
412
|
collabWarning: w,
|
|
411
413
|
showSaveModuleDialog: R,
|
|
412
|
-
showModuleBrowserModal:
|
|
414
|
+
showModuleBrowserModal: V,
|
|
413
415
|
saveModulePreSelectedBlockId: z,
|
|
414
416
|
onSaveHook: p,
|
|
415
417
|
initialize: J,
|
|
416
418
|
destroy: Y,
|
|
417
|
-
setThemeOverrides:
|
|
419
|
+
setThemeOverrides: W,
|
|
418
420
|
setUiTheme: q,
|
|
419
|
-
openCommentsForBlock:
|
|
421
|
+
openCommentsForBlock: U
|
|
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 (N(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 L(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",
|
|
@@ -596,7 +598,7 @@ 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-xsU20iPl.js")), n = u(() => import("./features-Cnfv4QAY.js").then((e) => e.r)), r = u(() => import("./AiFeatureMenu-RwJiaPXZ.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,
|
|
@@ -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(I), {
|
|
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),
|
|
@@ -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(ve), {
|
|
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(se), {
|
|
679
681
|
size: 16,
|
|
680
682
|
"stroke-width": 2,
|
|
681
683
|
class: "tpl-ai-btn-icon"
|
|
@@ -703,12 +705,12 @@ 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(R), {
|
|
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
|
|
@@ -722,7 +724,7 @@ 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(R), {
|
|
726
728
|
key: 1,
|
|
727
729
|
class: "tpl-spinner",
|
|
728
730
|
size: 16,
|
|
@@ -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-Cnfv4QAY.js").then((e) => e.o)), a = u(() => import("./features-Cnfv4QAY.js").then((e) => e.a)), o = u(() => import("./features-Cnfv4QAY.js").then((e) => e.i)), s = u(() => import("./features-Cnfv4QAY.js").then((e) => e.n)), l = u(() => import("./features-Cnfv4QAY.js").then((e) => e.t)), d = u(() => import("./SaveModuleDialog-DhsfYf2n.js")), f = u(() => import("./ModuleBrowserModal-DG4AVFjH.js")), g = u(async () => {
|
|
762
764
|
try {
|
|
763
|
-
return (await import("./src-
|
|
765
|
+
return (await import("./src-zu1ehVNN.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 } = P();
|
|
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__*/ de(/* @__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(H, 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,58 +947,58 @@ 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: N, isCollaborationEnabled:
|
|
949
|
-
async function
|
|
950
|
+
}), { isInitializing: O, isAuthReady: k, initError: A, planConfigInstance: j, websocket: M, collaboration: N, isCollaborationEnabled: P, editor: F, core: I, featureFlags: L, mediaLib: R, exporter: z, testEmail: B, commentsInstance: te, savedModulesHeadless: ne, panelState: U, snapshotPreview: W, collabWarning: re, showSaveModuleDialog: G, showModuleBrowserModal: K, saveModulePreSelectedBlockId: q, setThemeOverrides: J, setUiTheme: ie } = E, { showNotice: Y } = V(() => l.config.smallScreenNotice);
|
|
951
|
+
async function ae(e) {
|
|
950
952
|
try {
|
|
951
|
-
await B.sendTestEmail(e),
|
|
953
|
+
await B.sendTestEmail(e), U.testEmailModalOpen.value = !1;
|
|
952
954
|
} catch {}
|
|
953
955
|
}
|
|
954
|
-
async function
|
|
956
|
+
async function X() {
|
|
955
957
|
try {
|
|
956
|
-
await
|
|
958
|
+
await W.confirmRestoreSnapshot();
|
|
957
959
|
} catch {}
|
|
958
960
|
}
|
|
959
|
-
function
|
|
961
|
+
function oe(e, t) {
|
|
960
962
|
for (let n = 0; n < e.content.length; n++) {
|
|
961
|
-
let r =
|
|
962
|
-
|
|
963
|
+
let r = ee(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
|
-
let
|
|
968
|
+
let Z = He({
|
|
967
969
|
config: l.config,
|
|
968
|
-
editor:
|
|
970
|
+
editor: F,
|
|
969
971
|
websocket: M,
|
|
970
972
|
planConfigInstance: j,
|
|
971
|
-
snapshotPreview:
|
|
973
|
+
snapshotPreview: W,
|
|
972
974
|
core: I,
|
|
973
975
|
exporter: z,
|
|
974
976
|
featureFlags: L,
|
|
975
977
|
isDestroyed: E.isDestroyed
|
|
976
|
-
}),
|
|
978
|
+
}), Q = Ue({
|
|
977
979
|
issues: I.templateLint ? I.templateLint.issues : c([]),
|
|
978
980
|
planConfig: j.config
|
|
979
981
|
});
|
|
980
|
-
async function
|
|
981
|
-
await
|
|
982
|
+
async function $() {
|
|
983
|
+
await Q.tryRunSave(() => Z.saveTemplate().catch((e) => l.config.onError?.(e)));
|
|
982
984
|
}
|
|
983
|
-
return E.onSaveHook.value =
|
|
985
|
+
return E.onSaveHook.value = $, t(() => {
|
|
984
986
|
E.initialize();
|
|
985
987
|
}), g(() => {
|
|
986
988
|
E.destroy();
|
|
987
989
|
}), r({
|
|
988
|
-
getContent: () =>
|
|
989
|
-
setContent: (e) =>
|
|
990
|
+
getContent: () => F.content.value,
|
|
991
|
+
setContent: (e) => F.setContent(e),
|
|
990
992
|
setTheme: ie,
|
|
991
|
-
setThemeOverrides:
|
|
992
|
-
create:
|
|
993
|
-
load:
|
|
994
|
-
save:
|
|
993
|
+
setThemeOverrides: J,
|
|
994
|
+
create: Z.createTemplate,
|
|
995
|
+
load: Z.loadTemplate,
|
|
996
|
+
save: Z.saveTemplate,
|
|
995
997
|
sendTestEmail: B.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"]),
|
|
@@ -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,19 +1036,19 @@ 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
|
-
"panel-state": h(
|
|
1041
|
-
"snapshot-preview": h(
|
|
1042
|
+
"panel-state": h(U),
|
|
1043
|
+
"snapshot-preview": h(W),
|
|
1042
1044
|
"comments-instance": h(te),
|
|
1043
1045
|
"test-email": h(B),
|
|
1044
1046
|
websocket: h(M),
|
|
1045
1047
|
collaboration: h(N),
|
|
1046
|
-
"is-collaboration-enabled": h(
|
|
1047
|
-
"is-saving": h(
|
|
1048
|
-
"is-save-disabled": h(
|
|
1049
|
-
onSave:
|
|
1048
|
+
"is-collaboration-enabled": h(P),
|
|
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,
|
|
1051
|
+
onSave: $
|
|
1050
1052
|
}, null, 8, [
|
|
1051
1053
|
"editor",
|
|
1052
1054
|
"core",
|
|
@@ -1062,10 +1064,10 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1062
1064
|
"is-save-disabled"
|
|
1063
1065
|
]),
|
|
1064
1066
|
D($e, {
|
|
1065
|
-
open: h(
|
|
1066
|
-
issues: h(
|
|
1067
|
-
onCancel: h(
|
|
1068
|
-
onConfirm: h(
|
|
1067
|
+
open: h(Q).modalOpen.value,
|
|
1068
|
+
issues: h(Q).blockingIssues.value,
|
|
1069
|
+
onCancel: h(Q).cancel,
|
|
1070
|
+
onConfirm: h(Q).confirmAndSave
|
|
1069
1071
|
}, null, 8, [
|
|
1070
1072
|
"open",
|
|
1071
1073
|
"issues",
|
|
@@ -1073,9 +1075,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1073
1075
|
"onConfirm"
|
|
1074
1076
|
]),
|
|
1075
1077
|
D(kt, {
|
|
1076
|
-
visible: h(
|
|
1077
|
-
onCancel: h(
|
|
1078
|
-
onConfirm:
|
|
1078
|
+
visible: h(W).isPreviewingSnapshot.value,
|
|
1079
|
+
onCancel: h(W).cancelPreview,
|
|
1080
|
+
onConfirm: X
|
|
1079
1081
|
}, null, 8, ["visible", "onCancel"]),
|
|
1080
1082
|
D(y, {
|
|
1081
1083
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
@@ -1088,9 +1090,9 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1088
1090
|
default: s(() => [D(jt, { visible: h(re).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1089
1091
|
_: 1
|
|
1090
1092
|
}),
|
|
1091
|
-
n(D(De, null, null, 512), [[S, !h(
|
|
1093
|
+
n(D(De, 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(U).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(W).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)"
|
|
@@ -1112,15 +1114,15 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1112
1114
|
}), T(" " + d(h(I).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
|
|
1113
1115
|
_: 1
|
|
1114
1116
|
})]), x("main", Pt, [D(we, {
|
|
1115
|
-
viewport: h(
|
|
1116
|
-
content: h(
|
|
1117
|
-
"selected-block-id": h(
|
|
1118
|
-
"dark-mode": h(
|
|
1119
|
-
"preview-mode": h(
|
|
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,
|
|
1120
1122
|
"locked-blocks": h(N)?.lockedBlocks.value ?? void 0,
|
|
1121
|
-
onSelectBlock: h(
|
|
1122
|
-
onOpenAiChat: r[1] ||= (e) => h(
|
|
1123
|
-
onOpenDesignReference: r[2] ||= (e) => h(
|
|
1123
|
+
onSelectBlock: h(F).selectBlock,
|
|
1124
|
+
onOpenAiChat: r[1] ||= (e) => h(U).aiChatOpen.value = !0,
|
|
1125
|
+
onOpenDesignReference: r[2] ||= (e) => h(U).designReferenceOpen.value = !0
|
|
1124
1126
|
}, null, 8, [
|
|
1125
1127
|
"viewport",
|
|
1126
1128
|
"content",
|
|
@@ -1132,7 +1134,7 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1132
1134
|
])])], 2),
|
|
1133
1135
|
e.config.branding !== !1 && !h(L).isWhiteLabeled.value ? (i(), v(Ae, {
|
|
1134
1136
|
key: 0,
|
|
1135
|
-
"position-class": [h(
|
|
1137
|
+
"position-class": [h(F).state.previewMode ? "tpl:left-0 tpl:right-0" : h(U).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",
|
|
@@ -1142,39 +1144,39 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1142
1144
|
"aria-label": h(I).t.landmarks.reorderAnnouncements
|
|
1143
1145
|
}, d(h(I).keyboardReorder.announcement.value), 9, Ft),
|
|
1144
1146
|
n(D(Ce, {
|
|
1145
|
-
"selected-block": h(
|
|
1146
|
-
settings: h(
|
|
1147
|
-
"shifted-left": h(
|
|
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(
|
|
1147
|
+
"selected-block": h(F).selectedBlock.value,
|
|
1148
|
+
settings: h(F).content.value.settings,
|
|
1149
|
+
"shifted-left": h(U).rightPanelOpen.value,
|
|
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
|
-
"panel-state": h(
|
|
1167
|
+
"panel-state": h(U),
|
|
1166
1168
|
"plan-config-instance": h(j),
|
|
1167
1169
|
"test-email": h(B),
|
|
1168
1170
|
"media-lib": h(R),
|
|
1169
1171
|
"saved-modules-headless": h(ne),
|
|
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:
|
|
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: ae,
|
|
1179
|
+
onModuleInsert: oe
|
|
1178
1180
|
}, null, 8, [
|
|
1179
1181
|
"config",
|
|
1180
1182
|
"editor",
|
|
@@ -1194,11 +1196,11 @@ var We = ["aria-label"], Ge = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1194
1196
|
}, null, 512),
|
|
1195
1197
|
D(Oe),
|
|
1196
1198
|
D(Me),
|
|
1197
|
-
h(
|
|
1199
|
+
h(Y) ? (i(), v(je, { 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-Dufl354p.js.map
|