@aswin.dev/editor 0.7.0 → 0.7.2
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/LICENSE +56 -0
- package/README.md +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
- package/dist/CloudEditor-zo9PjjvY.js +1214 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
- package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
- package/dist/CountdownBlock-BCi7-DAM.js +92 -0
- package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
- package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
- package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
- package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
- package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
- package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
- package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
- package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
- package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
- package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
- package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
- package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
- package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
- package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
- package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
- package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
- package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
- package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
- package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
- package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
- package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +211 -123
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
- package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
- package/dist/dist-Bmir0gYb.js +1167 -0
- package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
- package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
- package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +102 -14
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-wWRbcuEK.js +55 -0
- package/dist/styles-CavWjvol.js +5487 -0
- package/dist/templatical-editor.js +211 -119
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
- package/dist/undo-2-Cg8I7obC.js +16 -0
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
- package/package.json +15 -15
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
|
@@ -1,122 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { C as te, c as I, i as L, l as R, n as z, u as ne, w as B, x as V } from "./keys-ciNfSSGj.js";
|
|
7
|
-
import { t as H } from "./useI18n-lb2DHDiu.js";
|
|
8
|
-
import { t as U } from "./createLucideIcon-C3pa2siy.js";
|
|
9
|
-
import { t as W } from "./check-Da05j8yl.js";
|
|
10
|
-
import { t as G } from "./circle-alert-DZuGWPX-.js";
|
|
11
|
-
import { a as K, c as re, i as q, l as ie, n as J, o as ae, r as oe, s as se, t as ce } from "./styles-DEXEkBvg.js";
|
|
12
|
-
import { t as Y } from "./clock-CRp2sIub.js";
|
|
13
|
-
import { t as X } from "./loader-circle-DsY5Yg33.js";
|
|
14
|
-
import { t as Z } from "./message-circle-yElBbR2C.js";
|
|
15
|
-
import { t as le } from "./send-DH4oDQqC.js";
|
|
16
|
-
import { t as ue } from "./sparkles-CvRXGqFs.js";
|
|
17
|
-
import { t as de } from "./triangle-alert-aOXceTSe.js";
|
|
18
|
-
import { t as fe } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
19
|
-
import { n as Q } from "./useCloudI18n-BuIwR6OE.js";
|
|
20
|
-
import { d as $ } from "./styleConstants-fWzlIIwN.js";
|
|
21
|
-
import { _ as pe, a as me, c as he, d as ge, f as _e, g as ve, h as ye, l as be, m as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, t as De, v as Oe, y as ke } from "./cloud-DEk_b4CR.js";
|
|
22
|
-
var Ae = U("save", [
|
|
23
|
-
["path", {
|
|
24
|
-
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
25
|
-
key: "1c8476"
|
|
26
|
-
}],
|
|
27
|
-
["path", {
|
|
28
|
-
d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",
|
|
29
|
-
key: "1ydtos"
|
|
30
|
-
}],
|
|
31
|
-
["path", {
|
|
32
|
-
d: "M7 3v4a1 1 0 0 0 1 1h7",
|
|
33
|
-
key: "t51u73"
|
|
34
|
-
}]
|
|
35
|
-
]);
|
|
36
|
-
//#endregion
|
|
1
|
+
import { C as e, F as t, G as n, H as r, I as i, M as a, N as o, P as s, Q as c, S as l, W as u, _ as d, b as f, ct as p, d as m, dt as h, f as g, ft as _, g as v, h as y, l as b, m as x, n as S, rt as C, tt as w, ut as T, v as E, x as D, y as O } from "./draggable-C-1_gch3.js";
|
|
2
|
+
import { C as k, D as A, Dt as j, Ft as ee, Gt as M, Kt as N, Lt as P, Mt as F, Nn as I, On as L, Ot as R, Pn as te, S as z, Vn as B, Vt as V, Wt as ne, X as re, _ as H, b as ie, bn as U, c as W, cn as ae, d as G, et as K, f as q, g as J, h as Y, in as oe, k as se, l as X, ln as Z, m as ce, nn as le, nt as ue, p as de, pt as fe, rn as pe, st as me, tn as he, tr as Q, u as ge, ut as $, v as _e, vt as ve, x as ye, y as be, yt as xe, zt as Se } from "./features-DIBEo4xl.js";
|
|
3
|
+
import { T as Ce, w as we } from "./icons-C1Gg-ov-.js";
|
|
4
|
+
import { a as Te, c as Ee, d as De, f as Oe, h as ke, i as Ae, l as je, m as Me, n as Ne, p as Pe, r as Fe, s as Ie, t as Le, u as Re } from "./styles-CQR6ed13.js";
|
|
5
|
+
import { d as ze } from "./styleConstants-PgmvNBzQ.js";
|
|
37
6
|
//#region src/cloud/composables/useSnapshotPreview.ts
|
|
38
|
-
function
|
|
39
|
-
let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s =
|
|
40
|
-
|
|
41
|
-
|
|
7
|
+
function Be(e) {
|
|
8
|
+
let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s = C(null), l = w(null), u = w(null), d = !1;
|
|
9
|
+
c(() => {
|
|
10
|
+
d = !0;
|
|
42
11
|
});
|
|
43
|
-
let
|
|
44
|
-
function
|
|
45
|
-
n.state.template?.id && !s.value && (s.value =
|
|
12
|
+
let f = x(() => l.value !== null), p = x(() => s.value?.snapshots.value ?? []), m = x(() => s.value?.isLoading.value ?? !1), h = x(() => s.value?.isRestoring.value ?? !1);
|
|
13
|
+
function g() {
|
|
14
|
+
n.state.template?.id && !s.value && (s.value = de({
|
|
46
15
|
authManager: t,
|
|
47
16
|
templateId: n.state.template.id,
|
|
48
|
-
onRestore:
|
|
17
|
+
onRestore: _,
|
|
49
18
|
onError: o
|
|
50
19
|
}), s.value.loadSnapshots());
|
|
51
20
|
}
|
|
52
|
-
function
|
|
21
|
+
function _(e) {
|
|
53
22
|
n.setContent(e.content, !1), r.clear(), i.reset();
|
|
54
23
|
}
|
|
55
|
-
async function
|
|
56
|
-
if (!
|
|
24
|
+
async function v(e) {
|
|
25
|
+
if (!d) {
|
|
57
26
|
if (l.value) {
|
|
58
27
|
l.value = e, n.setContent(e.content, !1);
|
|
59
28
|
return;
|
|
60
29
|
}
|
|
61
|
-
n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(),
|
|
30
|
+
n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(), d) || (u.value = structuredClone(n.content.value), a?.pause(), l.value = e, n.setContent(e.content, !1));
|
|
62
31
|
}
|
|
63
32
|
}
|
|
64
|
-
async function
|
|
33
|
+
async function y() {
|
|
65
34
|
if (!(!l.value || !s.value)) try {
|
|
66
|
-
if (await s.value.restoreSnapshot(l.value.id),
|
|
35
|
+
if (await s.value.restoreSnapshot(l.value.id), d || (await s.value.loadSnapshots(), d)) return;
|
|
67
36
|
} finally {
|
|
68
|
-
|
|
37
|
+
d || (l.value = null, u.value = null, a?.resume());
|
|
69
38
|
}
|
|
70
39
|
}
|
|
71
|
-
function
|
|
40
|
+
function b() {
|
|
72
41
|
!l.value || !u.value || (n.setContent(u.value, !1), l.value = null, u.value = null, a?.resume());
|
|
73
42
|
}
|
|
74
|
-
async function
|
|
75
|
-
|
|
43
|
+
async function S() {
|
|
44
|
+
d || s.value && await s.value.loadSnapshots();
|
|
76
45
|
}
|
|
77
46
|
return {
|
|
78
47
|
snapshotHistoryInstance: s,
|
|
79
48
|
previewingSnapshot: l,
|
|
80
49
|
contentBeforePreview: u,
|
|
81
|
-
isPreviewingSnapshot:
|
|
82
|
-
snapshotHistorySnapshots:
|
|
83
|
-
snapshotHistoryIsLoading:
|
|
84
|
-
snapshotHistoryIsRestoring:
|
|
85
|
-
initSnapshotHistory:
|
|
86
|
-
handleRestore:
|
|
87
|
-
handleSnapshotNavigate:
|
|
88
|
-
confirmRestoreSnapshot:
|
|
89
|
-
cancelPreview:
|
|
90
|
-
loadSnapshotHistory:
|
|
50
|
+
isPreviewingSnapshot: f,
|
|
51
|
+
snapshotHistorySnapshots: p,
|
|
52
|
+
snapshotHistoryIsLoading: m,
|
|
53
|
+
snapshotHistoryIsRestoring: h,
|
|
54
|
+
initSnapshotHistory: g,
|
|
55
|
+
handleRestore: _,
|
|
56
|
+
handleSnapshotNavigate: v,
|
|
57
|
+
confirmRestoreSnapshot: y,
|
|
58
|
+
cancelPreview: b,
|
|
59
|
+
loadSnapshotHistory: S
|
|
91
60
|
};
|
|
92
61
|
}
|
|
93
62
|
//#endregion
|
|
94
63
|
//#region src/cloud/composables/useCloudPanelState.ts
|
|
95
|
-
function
|
|
96
|
-
let e =
|
|
64
|
+
function Ve() {
|
|
65
|
+
let e = w(null), t = x({
|
|
97
66
|
get: () => e.value === "ai-chat",
|
|
98
67
|
set: (t) => e.value = t ? "ai-chat" : null
|
|
99
|
-
}), n =
|
|
68
|
+
}), n = x({
|
|
100
69
|
get: () => e.value === "scoring",
|
|
101
70
|
set: (t) => e.value = t ? "scoring" : null
|
|
102
|
-
}), r =
|
|
71
|
+
}), r = x({
|
|
103
72
|
get: () => e.value === "design-reference",
|
|
104
73
|
set: (t) => e.value = t ? "design-reference" : null
|
|
105
|
-
}), i =
|
|
74
|
+
}), i = x({
|
|
106
75
|
get: () => e.value === "comments",
|
|
107
76
|
set: (t) => e.value = t ? "comments" : null
|
|
108
|
-
}), a =
|
|
77
|
+
}), a = w(!1), o = w(!1), s = w(void 0), c = w(!1), l = w(null), u = x(() => e.value !== null), d = x(() => {
|
|
109
78
|
let t = e.value;
|
|
110
79
|
return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
|
|
111
|
-
}),
|
|
112
|
-
function
|
|
113
|
-
|
|
80
|
+
}), f = x(() => c.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
|
|
81
|
+
function p() {
|
|
82
|
+
c.value = !c.value;
|
|
114
83
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
84
|
+
function m(t) {
|
|
85
|
+
c.value = !1, e.value = e.value === t ? null : t;
|
|
117
86
|
}
|
|
118
|
-
return
|
|
119
|
-
|
|
87
|
+
return Z(l, () => {
|
|
88
|
+
c.value = !1;
|
|
120
89
|
}), {
|
|
121
90
|
activePanel: e,
|
|
122
91
|
aiChatOpen: t,
|
|
@@ -126,21 +95,21 @@ function Me() {
|
|
|
126
95
|
testEmailModalOpen: a,
|
|
127
96
|
mediaLibraryOpen: o,
|
|
128
97
|
mediaLibraryAccept: s,
|
|
129
|
-
aiMenuOpen:
|
|
130
|
-
aiMenuRef:
|
|
131
|
-
rightPanelOpen:
|
|
132
|
-
activeAiFeature:
|
|
133
|
-
aiButtonActive:
|
|
134
|
-
toggleAiMenu:
|
|
135
|
-
handleAiFeatureSelect:
|
|
98
|
+
aiMenuOpen: c,
|
|
99
|
+
aiMenuRef: l,
|
|
100
|
+
rightPanelOpen: u,
|
|
101
|
+
activeAiFeature: d,
|
|
102
|
+
aiButtonActive: f,
|
|
103
|
+
toggleAiMenu: p,
|
|
104
|
+
handleAiFeatureSelect: m
|
|
136
105
|
};
|
|
137
106
|
}
|
|
138
107
|
//#endregion
|
|
139
108
|
//#region src/cloud/composables/useCollabUndoWarning.ts
|
|
140
|
-
function
|
|
141
|
-
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i =
|
|
109
|
+
function He(e) {
|
|
110
|
+
let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = w(!1), a = w(!1), { start: o } = U(() => {
|
|
142
111
|
a.value = !1;
|
|
143
|
-
},
|
|
112
|
+
}, Q, { immediate: !1 });
|
|
144
113
|
function s() {
|
|
145
114
|
i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
|
|
146
115
|
}
|
|
@@ -151,26 +120,26 @@ function Ne(e) {
|
|
|
151
120
|
}
|
|
152
121
|
//#endregion
|
|
153
122
|
//#region src/cloud/composables/useCloudFeatureFlags.ts
|
|
154
|
-
function
|
|
155
|
-
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i =
|
|
156
|
-
|
|
123
|
+
function Ue(e) {
|
|
124
|
+
let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = x(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = x(() => t.hasFeature("test_email")), o = x(() => !!r.state.template?.id), s = x(() => t.hasFeature("white_label")), c = x(() => t.config.value?.limits.max_templates ?? null), l = x(() => t.config.value?.template_count ?? 0), u = w(!1), d = w("idle"), f = w(""), { start: p } = U(() => {
|
|
125
|
+
d.value = "idle";
|
|
157
126
|
}, 3e3, { immediate: !1 });
|
|
158
127
|
return {
|
|
159
128
|
canUseAiGeneration: i,
|
|
160
129
|
canSendTestEmail: a,
|
|
161
130
|
hasTemplateSaved: o,
|
|
162
131
|
isWhiteLabeled: s,
|
|
163
|
-
templateLimit:
|
|
164
|
-
templateCount:
|
|
165
|
-
isSaveExporting:
|
|
166
|
-
saveStatus:
|
|
167
|
-
saveErrorMessage:
|
|
168
|
-
startSaveStatusClear:
|
|
132
|
+
templateLimit: c,
|
|
133
|
+
templateCount: l,
|
|
134
|
+
isSaveExporting: u,
|
|
135
|
+
saveStatus: d,
|
|
136
|
+
saveErrorMessage: f,
|
|
137
|
+
startSaveStatusClear: p
|
|
169
138
|
};
|
|
170
139
|
}
|
|
171
140
|
//#endregion
|
|
172
141
|
//#region src/cloud/composables/useCloudMediaLibrary.ts
|
|
173
|
-
function
|
|
142
|
+
function We(e) {
|
|
174
143
|
let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r } = e, i = null;
|
|
175
144
|
async function a() {
|
|
176
145
|
if (t) {
|
|
@@ -195,7 +164,7 @@ function Fe(e) {
|
|
|
195
164
|
function s() {
|
|
196
165
|
n.value = !1, i?.(null), i = null;
|
|
197
166
|
}
|
|
198
|
-
return
|
|
167
|
+
return c(() => {
|
|
199
168
|
i &&= (i(null), null);
|
|
200
169
|
}), {
|
|
201
170
|
handleRequestMedia: a,
|
|
@@ -205,182 +174,183 @@ function Fe(e) {
|
|
|
205
174
|
}
|
|
206
175
|
//#endregion
|
|
207
176
|
//#region src/cloud/composables/useCloudInitialization.ts
|
|
208
|
-
function
|
|
209
|
-
let { config:
|
|
210
|
-
...
|
|
211
|
-
onError:
|
|
212
|
-
}), g =
|
|
177
|
+
function Ge(e) {
|
|
178
|
+
let { config: n, translations: i, fontsManager: a, emit: o, getCommentsSidebar: s } = e, c = w(!0), l = w(!1), u = w(null), d = !1, f = { value: null }, p = null, m = null, h = new A({
|
|
179
|
+
...n.auth,
|
|
180
|
+
onError: n.onError
|
|
181
|
+
}), g = ge({
|
|
213
182
|
authManager: h,
|
|
214
|
-
onError:
|
|
215
|
-
}), _ =
|
|
183
|
+
onError: n.onError
|
|
184
|
+
}), _ = w(/* @__PURE__ */ new Map()), v = z({
|
|
216
185
|
authManager: h,
|
|
217
|
-
defaultFontFamily:
|
|
218
|
-
templateDefaults:
|
|
219
|
-
onError:
|
|
186
|
+
defaultFontFamily: n.fonts?.defaultFont,
|
|
187
|
+
templateDefaults: n.templateDefaults,
|
|
188
|
+
onError: n.onError,
|
|
220
189
|
lockedBlocks: _
|
|
221
|
-
}), y =
|
|
190
|
+
}), y = Y({
|
|
222
191
|
authManager: h,
|
|
223
|
-
onError:
|
|
192
|
+
onError: n.onError
|
|
224
193
|
});
|
|
225
|
-
|
|
194
|
+
n.mcp?.enabled && W({
|
|
226
195
|
editor: v,
|
|
227
196
|
channel: y.channel,
|
|
228
|
-
onOperation:
|
|
197
|
+
onOperation: n.mcp.onOperation
|
|
229
198
|
});
|
|
230
199
|
let b = null;
|
|
231
|
-
|
|
200
|
+
n.collaboration?.enabled && (b = H({
|
|
232
201
|
authManager: h,
|
|
233
202
|
editor: v,
|
|
234
203
|
channel: y.channel,
|
|
235
|
-
onError:
|
|
236
|
-
onCollaboratorJoined:
|
|
237
|
-
onCollaboratorLeft:
|
|
238
|
-
onBlockLocked:
|
|
239
|
-
onBlockUnlocked:
|
|
240
|
-
}),
|
|
204
|
+
onError: n.onError,
|
|
205
|
+
onCollaboratorJoined: n.collaboration.onCollaboratorJoined,
|
|
206
|
+
onCollaboratorLeft: n.collaboration.onCollaboratorLeft,
|
|
207
|
+
onBlockLocked: n.collaboration.onBlockLocked,
|
|
208
|
+
onBlockUnlocked: n.collaboration.onBlockUnlocked
|
|
209
|
+
}), r(() => b.lockedBlocks.value, (e) => {
|
|
241
210
|
_.value = e;
|
|
242
|
-
}, { immediate: !0 }),
|
|
243
|
-
let
|
|
211
|
+
}, { immediate: !0 }), J(v, b));
|
|
212
|
+
let S = x(() => !!n.collaboration?.enabled && g.hasFeature("collaboration")), C = se({
|
|
244
213
|
editor: v,
|
|
245
214
|
config: {
|
|
246
|
-
uiTheme:
|
|
215
|
+
uiTheme: n.uiTheme,
|
|
247
216
|
theme: void 0,
|
|
248
|
-
blockDefaults:
|
|
217
|
+
blockDefaults: n.blockDefaults,
|
|
249
218
|
customBlocks: [],
|
|
250
|
-
mergeTags:
|
|
251
|
-
displayConditions:
|
|
219
|
+
mergeTags: n.mergeTags,
|
|
220
|
+
displayConditions: n.displayConditions,
|
|
252
221
|
onRequestMedia: null,
|
|
253
|
-
|
|
222
|
+
editorType: n.editorType,
|
|
223
|
+
accessibility: ke(n),
|
|
254
224
|
onSave: () => {
|
|
255
225
|
f.value?.().catch((e) => {
|
|
256
|
-
|
|
226
|
+
n.onError?.(e);
|
|
257
227
|
});
|
|
258
228
|
}
|
|
259
229
|
},
|
|
260
|
-
translations:
|
|
261
|
-
fontsManager:
|
|
230
|
+
translations: i,
|
|
231
|
+
fontsManager: a,
|
|
262
232
|
historyOptions: b ? { isRemoteOperation: () => b._isProcessingRemoteOperation() } : void 0,
|
|
263
233
|
autoSaveOptions: {
|
|
264
234
|
onChange: async () => {
|
|
265
235
|
v.hasTemplate() && (await v.createSnapshot(), p?.snapshotHistoryInstance.value?.loadSnapshots());
|
|
266
236
|
},
|
|
267
|
-
debounce:
|
|
268
|
-
enabled: () =>
|
|
237
|
+
debounce: n.autoSaveDebounce ?? 5e3,
|
|
238
|
+
enabled: () => n.autoSave !== !1 && g.hasFeature("auto_save")
|
|
269
239
|
},
|
|
270
|
-
themeExtraStyles: () => ({ "--tpl-drop-text": `"${
|
|
240
|
+
themeExtraStyles: () => ({ "--tpl-drop-text": `"${i.canvas.dropHere}"` }),
|
|
271
241
|
keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() }
|
|
272
|
-
}),
|
|
273
|
-
isCollaborationEnabled:
|
|
242
|
+
}), T = He({
|
|
243
|
+
isCollaborationEnabled: S,
|
|
274
244
|
getCollaboratorCount: () => b?.collaborators.value.length ?? 0,
|
|
275
245
|
canUndo: C.history.canUndo
|
|
276
246
|
});
|
|
277
|
-
m =
|
|
278
|
-
let
|
|
247
|
+
m = T;
|
|
248
|
+
let E = Be({
|
|
279
249
|
authManager: h,
|
|
280
250
|
editor: v,
|
|
281
251
|
history: C.history,
|
|
282
252
|
conditionPreview: C.conditionPreview,
|
|
283
253
|
autoSave: C.autoSave,
|
|
284
|
-
onError:
|
|
254
|
+
onError: n.onError
|
|
285
255
|
});
|
|
286
|
-
p =
|
|
287
|
-
let
|
|
256
|
+
p = E;
|
|
257
|
+
let D = Ve(), O = ye(n.ai), k = Ue({
|
|
288
258
|
planConfigInstance: g,
|
|
289
|
-
aiConfig:
|
|
259
|
+
aiConfig: O,
|
|
290
260
|
editor: v
|
|
291
|
-
}),
|
|
292
|
-
onRequestMedia:
|
|
293
|
-
mediaLibraryOpen:
|
|
294
|
-
mediaLibraryAccept:
|
|
261
|
+
}), j = We({
|
|
262
|
+
onRequestMedia: n.onRequestMedia,
|
|
263
|
+
mediaLibraryOpen: D.mediaLibraryOpen,
|
|
264
|
+
mediaLibraryAccept: D.mediaLibraryAccept
|
|
295
265
|
});
|
|
296
|
-
|
|
266
|
+
re({
|
|
297
267
|
onBlockMove: v.moveBlock,
|
|
298
268
|
onBlockAdd: v.addBlock
|
|
299
269
|
});
|
|
300
|
-
let
|
|
270
|
+
let M = G({
|
|
301
271
|
authManager: h,
|
|
302
|
-
getFontsConfig: () =>
|
|
272
|
+
getFontsConfig: () => n.fonts,
|
|
303
273
|
canUseCustomFonts: () => g.hasFeature("custom_fonts")
|
|
304
|
-
}), P =
|
|
274
|
+
}), P = q({
|
|
305
275
|
authManager: h,
|
|
306
276
|
getTemplateId: () => v.state.template?.id ?? null,
|
|
307
277
|
save: () => v.save(),
|
|
308
|
-
exportHtml: (e) =>
|
|
309
|
-
onError:
|
|
278
|
+
exportHtml: (e) => M.exportHtml(e),
|
|
279
|
+
onError: n.onError,
|
|
310
280
|
isAuthReady: l,
|
|
311
|
-
onBeforeTestEmail:
|
|
281
|
+
onBeforeTestEmail: n.onBeforeTestEmail
|
|
312
282
|
}), F = be({
|
|
313
283
|
authManager: h,
|
|
314
284
|
getTemplateId: () => v.state.template?.id ?? null,
|
|
315
285
|
getSocketId: () => y.getSocketId(),
|
|
316
|
-
onComment:
|
|
317
|
-
onError:
|
|
286
|
+
onComment: n.onComment,
|
|
287
|
+
onError: n.onError,
|
|
318
288
|
isAuthReady: l,
|
|
319
|
-
hasCommentingFeature: () =>
|
|
289
|
+
hasCommentingFeature: () => n.commenting !== !1 && g.hasFeature("commenting")
|
|
320
290
|
});
|
|
321
|
-
|
|
291
|
+
_e({
|
|
322
292
|
comments: F,
|
|
323
293
|
channel: y.channel
|
|
324
294
|
});
|
|
325
|
-
let
|
|
295
|
+
let I = ce({
|
|
326
296
|
authManager: h,
|
|
327
|
-
onError:
|
|
328
|
-
}),
|
|
297
|
+
onError: n.onError
|
|
298
|
+
}), L = w(!1), R = w(null), te = w(!1), B = ie({
|
|
329
299
|
authManager: h,
|
|
330
300
|
getTemplateId: () => v.state.template?.id ?? null
|
|
331
301
|
});
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
|
|
302
|
+
function U(e) {
|
|
303
|
+
D.commentsOpen.value = !0, queueMicrotask(() => {
|
|
304
|
+
s()?.filterByBlock(e);
|
|
335
305
|
});
|
|
336
306
|
}
|
|
337
|
-
|
|
307
|
+
t(he, j.handleRequestMedia), t(V, h), t(Se, O), t(N, F), t(pe, I), t(oe, B), t(ne, {
|
|
338
308
|
plan: g,
|
|
339
|
-
ai:
|
|
309
|
+
ai: O,
|
|
340
310
|
comments: {
|
|
341
311
|
getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
|
|
342
|
-
openForBlock:
|
|
312
|
+
openForBlock: U
|
|
343
313
|
},
|
|
344
314
|
savedModules: {
|
|
345
315
|
openSaveDialog: (e) => {
|
|
346
|
-
|
|
316
|
+
R.value = e ?? null, L.value = !0;
|
|
347
317
|
},
|
|
348
318
|
openBrowser: () => {
|
|
349
|
-
|
|
319
|
+
te.value = !0;
|
|
350
320
|
},
|
|
351
|
-
moduleCount:
|
|
321
|
+
moduleCount: x(() => I.modules.value.length)
|
|
352
322
|
}
|
|
353
323
|
});
|
|
354
|
-
function
|
|
324
|
+
function ae(e) {
|
|
355
325
|
g.hasFeature("theme_customization") && (C.themeOverrides.value = e);
|
|
356
326
|
}
|
|
357
|
-
function
|
|
327
|
+
function K(e) {
|
|
358
328
|
v.setUiTheme(e);
|
|
359
329
|
}
|
|
360
|
-
async function
|
|
361
|
-
|
|
330
|
+
async function Z() {
|
|
331
|
+
c.value = !0, u.value = null;
|
|
362
332
|
try {
|
|
363
333
|
if (await h.initialize(), d) return;
|
|
364
334
|
l.value = !0;
|
|
365
|
-
let e = await
|
|
335
|
+
let e = await X({ authManager: h });
|
|
366
336
|
if (d) return;
|
|
367
337
|
if (!e.api.ok) throw Error("Health check failed: API is not reachable");
|
|
368
338
|
if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
|
|
369
|
-
if (e.websocket.ok ||
|
|
370
|
-
|
|
339
|
+
if (e.websocket.ok || ee.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await g.fetchConfig(), d) return;
|
|
340
|
+
a.setCustomFontsEnabled(g.hasFeature("custom_fonts")), n.customBlocks?.length && g.hasFeature("custom_blocks") && C.registerCustomBlocks(n.customBlocks), n.theme && g.hasFeature("theme_customization") && (C.themeOverrides.value = n.theme), n.modules !== !1 && g.hasFeature("saved_modules") && I.loadModules(), o("ready");
|
|
371
341
|
} catch (e) {
|
|
372
342
|
if (d) return;
|
|
373
|
-
let
|
|
374
|
-
u.value =
|
|
343
|
+
let t = e instanceof Error ? e : Error("Initialization failed", { cause: e });
|
|
344
|
+
u.value = t, n.onError?.(t);
|
|
375
345
|
} finally {
|
|
376
|
-
d || (
|
|
346
|
+
d || (c.value = !1);
|
|
377
347
|
}
|
|
378
348
|
}
|
|
379
|
-
function
|
|
380
|
-
d = !0,
|
|
349
|
+
function le() {
|
|
350
|
+
d = !0, a.cleanupFontLinks(), y.disconnect(), C.destroy(), n.onUnmount?.();
|
|
381
351
|
}
|
|
382
352
|
return {
|
|
383
|
-
isInitializing:
|
|
353
|
+
isInitializing: c,
|
|
384
354
|
isAuthReady: l,
|
|
385
355
|
initError: u,
|
|
386
356
|
isDestroyed: () => d,
|
|
@@ -388,36 +358,36 @@ function Ie(e) {
|
|
|
388
358
|
planConfigInstance: g,
|
|
389
359
|
websocket: y,
|
|
390
360
|
collaboration: b,
|
|
391
|
-
isCollaborationEnabled:
|
|
361
|
+
isCollaborationEnabled: S,
|
|
392
362
|
editor: v,
|
|
393
363
|
core: C,
|
|
394
|
-
aiConfig:
|
|
364
|
+
aiConfig: O,
|
|
395
365
|
featureFlags: k,
|
|
396
|
-
mediaLib:
|
|
397
|
-
exporter:
|
|
366
|
+
mediaLib: j,
|
|
367
|
+
exporter: M,
|
|
398
368
|
testEmail: P,
|
|
399
369
|
commentsInstance: F,
|
|
400
|
-
savedModulesHeadless:
|
|
401
|
-
scoringInstance:
|
|
402
|
-
panelState:
|
|
403
|
-
snapshotPreview:
|
|
404
|
-
collabWarning:
|
|
405
|
-
showSaveModuleDialog:
|
|
406
|
-
showModuleBrowserModal:
|
|
407
|
-
saveModulePreSelectedBlockId:
|
|
370
|
+
savedModulesHeadless: I,
|
|
371
|
+
scoringInstance: B,
|
|
372
|
+
panelState: D,
|
|
373
|
+
snapshotPreview: E,
|
|
374
|
+
collabWarning: T,
|
|
375
|
+
showSaveModuleDialog: L,
|
|
376
|
+
showModuleBrowserModal: te,
|
|
377
|
+
saveModulePreSelectedBlockId: R,
|
|
408
378
|
onSaveHook: f,
|
|
409
|
-
initialize:
|
|
410
|
-
destroy:
|
|
411
|
-
setThemeOverrides:
|
|
412
|
-
setUiTheme:
|
|
413
|
-
openCommentsForBlock:
|
|
379
|
+
initialize: Z,
|
|
380
|
+
destroy: le,
|
|
381
|
+
setThemeOverrides: ae,
|
|
382
|
+
setUiTheme: K,
|
|
383
|
+
openCommentsForBlock: U
|
|
414
384
|
};
|
|
415
385
|
}
|
|
416
386
|
//#endregion
|
|
417
387
|
//#region src/utils/preRenderCustomBlocks.ts
|
|
418
|
-
async function
|
|
388
|
+
async function Ke(e, t) {
|
|
419
389
|
let n = async (e) => {
|
|
420
|
-
if (
|
|
390
|
+
if (B(e)) {
|
|
421
391
|
let n = e;
|
|
422
392
|
try {
|
|
423
393
|
n.renderedHtml = await t.renderCustomBlock(n);
|
|
@@ -434,10 +404,10 @@ async function Le(e, t) {
|
|
|
434
404
|
}
|
|
435
405
|
//#endregion
|
|
436
406
|
//#region src/cloud/composables/useCloudLifecycle.ts
|
|
437
|
-
function
|
|
407
|
+
function qe(e) {
|
|
438
408
|
let { config: t, editor: n, websocket: r, planConfigInstance: i, snapshotPreview: a, core: o, exporter: s, featureFlags: c, isDestroyed: l } = e;
|
|
439
409
|
function u() {
|
|
440
|
-
return
|
|
410
|
+
return k(i.config.value.websocket);
|
|
441
411
|
}
|
|
442
412
|
async function d(e) {
|
|
443
413
|
let i = await n.create(e);
|
|
@@ -450,7 +420,7 @@ function Re(e) {
|
|
|
450
420
|
async function p() {
|
|
451
421
|
c.isSaveExporting.value = !0, c.saveStatus.value = "idle";
|
|
452
422
|
try {
|
|
453
|
-
if (await
|
|
423
|
+
if (await Ke(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
|
|
454
424
|
let e = await n.save();
|
|
455
425
|
if (l()) throw Error("Component unmounted during save");
|
|
456
426
|
a.initSnapshotHistory(), a.snapshotHistoryInstance.value?.loadSnapshots();
|
|
@@ -477,8 +447,8 @@ function Re(e) {
|
|
|
477
447
|
}
|
|
478
448
|
//#endregion
|
|
479
449
|
//#region src/cloud/composables/useCloudSaveGate.ts
|
|
480
|
-
function
|
|
481
|
-
let t =
|
|
450
|
+
function Je(e) {
|
|
451
|
+
let t = w(!1), n = null, r = x(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = x(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = x(() => i.value.length > 0);
|
|
482
452
|
async function o(e) {
|
|
483
453
|
return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
|
|
484
454
|
}
|
|
@@ -486,7 +456,7 @@ function ze(e) {
|
|
|
486
456
|
let e = n;
|
|
487
457
|
n = null, t.value = !1, e && await e();
|
|
488
458
|
}
|
|
489
|
-
function
|
|
459
|
+
function c() {
|
|
490
460
|
n = null, t.value = !1;
|
|
491
461
|
}
|
|
492
462
|
return {
|
|
@@ -495,12 +465,12 @@ function ze(e) {
|
|
|
495
465
|
modalOpen: t,
|
|
496
466
|
tryRunSave: o,
|
|
497
467
|
confirmAndSave: s,
|
|
498
|
-
cancel:
|
|
468
|
+
cancel: c
|
|
499
469
|
};
|
|
500
470
|
}
|
|
501
471
|
//#endregion
|
|
502
472
|
//#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
|
|
503
|
-
var
|
|
473
|
+
var Ye = ["aria-label"], Xe = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, Ze = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qe = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, $e = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, et = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, tt = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, nt = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, rt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, it = /* @__PURE__ */ e({
|
|
504
474
|
__name: "CloudSaveGateModal",
|
|
505
475
|
props: {
|
|
506
476
|
open: { type: Boolean },
|
|
@@ -508,45 +478,45 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
508
478
|
},
|
|
509
479
|
emits: ["cancel", "confirm"],
|
|
510
480
|
setup(e, { emit: t }) {
|
|
511
|
-
let n = t, { t:
|
|
512
|
-
return (t,
|
|
481
|
+
let n = t, { t: r } = K();
|
|
482
|
+
return (t, a) => (s(), v(S, {
|
|
513
483
|
"enter-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
514
484
|
"leave-active-class": "tpl:transition-opacity tpl:duration-150",
|
|
515
485
|
"enter-from-class": "tpl:opacity-0",
|
|
516
486
|
"leave-to-class": "tpl:opacity-0"
|
|
517
487
|
}, {
|
|
518
|
-
default: u(() => [e.open ? (
|
|
488
|
+
default: u(() => [e.open ? (s(), E("div", {
|
|
519
489
|
key: 0,
|
|
520
490
|
role: "dialog",
|
|
521
491
|
"aria-modal": "true",
|
|
522
|
-
"aria-label":
|
|
492
|
+
"aria-label": p(r).saveGate.title,
|
|
523
493
|
class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
|
|
524
|
-
onClick:
|
|
525
|
-
}, [
|
|
526
|
-
|
|
494
|
+
onClick: a[2] ||= m((e) => n("cancel"), ["self"])
|
|
495
|
+
}, [y("div", Xe, [
|
|
496
|
+
y("header", Ze, [D(p(me), {
|
|
527
497
|
size: 18,
|
|
528
498
|
"stroke-width": 2,
|
|
529
499
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
|
|
500
|
+
}), y("h2", Qe, _(p(r).saveGate.title), 1)]),
|
|
501
|
+
y("p", $e, _(p(r).saveGate.body), 1),
|
|
502
|
+
y("ul", et, [(s(!0), E(g, null, i(e.issues, (e) => (s(), E("li", {
|
|
533
503
|
key: `${e.ruleId}-${e.blockId ?? "template"}`,
|
|
534
504
|
class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
|
|
535
|
-
}, [
|
|
536
|
-
|
|
505
|
+
}, [y("span", tt, _(e.message), 1), y("span", nt, _(e.ruleId), 1)]))), 128))]),
|
|
506
|
+
y("footer", rt, [y("button", {
|
|
537
507
|
type: "button",
|
|
538
508
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
|
|
539
|
-
onClick:
|
|
540
|
-
},
|
|
509
|
+
onClick: a[0] ||= (e) => n("cancel")
|
|
510
|
+
}, _(p(r).saveGate.cancel), 1), y("button", {
|
|
541
511
|
type: "button",
|
|
542
512
|
class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
|
|
543
|
-
onClick:
|
|
544
|
-
},
|
|
545
|
-
])], 8,
|
|
513
|
+
onClick: a[1] ||= (e) => n("confirm")
|
|
514
|
+
}, _(p(r).saveGate.confirm), 1)])
|
|
515
|
+
])], 8, Ye)) : d("", !0)]),
|
|
546
516
|
_: 1
|
|
547
517
|
}));
|
|
548
518
|
}
|
|
549
|
-
}),
|
|
519
|
+
}), at = {
|
|
550
520
|
class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4",
|
|
551
521
|
style: {
|
|
552
522
|
"background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
|
|
@@ -555,28 +525,28 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
555
525
|
"box-shadow": "var(--tpl-shadow-md)",
|
|
556
526
|
"border-bottom": "1px solid var(--tpl-border)"
|
|
557
527
|
}
|
|
558
|
-
},
|
|
528
|
+
}, ot = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, st = {
|
|
559
529
|
key: 0,
|
|
560
530
|
class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
|
|
561
|
-
},
|
|
531
|
+
}, ct = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, lt = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, ut = ["data-tooltip"], dt = {
|
|
562
532
|
key: 1,
|
|
563
533
|
"aria-live": "polite",
|
|
564
534
|
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-success)]"
|
|
565
|
-
},
|
|
535
|
+
}, ft = {
|
|
566
536
|
key: 2,
|
|
567
537
|
"aria-live": "polite",
|
|
568
538
|
class: "tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
569
|
-
},
|
|
539
|
+
}, pt = ["aria-label", "aria-expanded"], mt = {
|
|
570
540
|
key: 0,
|
|
571
541
|
class: "tpl:inline-flex tpl:size-4.5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
572
|
-
},
|
|
542
|
+
}, ht = ["aria-expanded"], gt = {
|
|
573
543
|
key: 0,
|
|
574
544
|
class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
|
|
575
|
-
},
|
|
545
|
+
}, _t = ["disabled"], vt = ["disabled"], yt = /* @__PURE__ */ e({
|
|
576
546
|
__name: "CloudHeader",
|
|
577
547
|
props: {
|
|
578
548
|
editor: {},
|
|
579
|
-
|
|
549
|
+
onBeforeHistoryUndo: { type: Function },
|
|
580
550
|
featureFlags: {},
|
|
581
551
|
panelState: {},
|
|
582
552
|
snapshotPreview: {},
|
|
@@ -590,31 +560,32 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
590
560
|
},
|
|
591
561
|
emits: ["save"],
|
|
592
562
|
setup(e) {
|
|
593
|
-
let
|
|
594
|
-
return (
|
|
595
|
-
|
|
563
|
+
let t = l(() => import("./CollaboratorBar-YBiIjiRh.js")), n = l(() => import("./features-DIBEo4xl.js").then((e) => e.r)), r = l(() => import("./AiFeatureMenu-B2mhscyP.js")), { t: i, format: a } = K();
|
|
564
|
+
return (o, c) => (s(), E("header", at, [
|
|
565
|
+
y("div", ot, [e.featureFlags.templateLimit.value === null ? d("", !0) : (s(), E("span", st, _(p(a)(p(i).header.templatesUsed, {
|
|
596
566
|
used: e.featureFlags.templateCount.value,
|
|
597
567
|
max: e.featureFlags.templateLimit.value
|
|
598
568
|
})), 1))]),
|
|
599
|
-
|
|
600
|
-
|
|
569
|
+
y("div", ct, [
|
|
570
|
+
D(De, { "on-before-undo": e.onBeforeHistoryUndo }, null, 8, ["on-before-undo"]),
|
|
571
|
+
D(Re, {
|
|
601
572
|
viewport: e.editor.state.viewport,
|
|
602
573
|
onChange: e.editor.setViewport
|
|
603
574
|
}, null, 8, ["viewport", "onChange"]),
|
|
604
|
-
|
|
575
|
+
D(Ee, {
|
|
605
576
|
"dark-mode": e.editor.state.darkMode,
|
|
606
577
|
onChange: e.editor.setDarkMode
|
|
607
578
|
}, null, 8, ["dark-mode", "onChange"]),
|
|
608
|
-
|
|
579
|
+
D(je, {
|
|
609
580
|
"preview-mode": e.editor.state.previewMode,
|
|
610
581
|
onChange: e.editor.setPreviewMode
|
|
611
582
|
}, null, 8, ["preview-mode", "onChange"]),
|
|
612
|
-
e.collaboration && e.isCollaborationEnabled ? (
|
|
583
|
+
e.collaboration && e.isCollaborationEnabled ? (s(), v(p(t), {
|
|
613
584
|
key: 0,
|
|
614
585
|
collaborators: e.collaboration.collaborators.value,
|
|
615
586
|
"is-connected": e.websocket.isConnected.value
|
|
616
|
-
}, null, 8, ["collaborators", "is-connected"])) :
|
|
617
|
-
e.snapshotPreview.snapshotHistoryInstance.value ? (
|
|
587
|
+
}, null, 8, ["collaborators", "is-connected"])) : d("", !0),
|
|
588
|
+
e.snapshotPreview.snapshotHistoryInstance.value ? (s(), v(p(n), {
|
|
618
589
|
key: 1,
|
|
619
590
|
snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
|
|
620
591
|
"is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
|
|
@@ -627,53 +598,53 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
627
598
|
"is-restoring",
|
|
628
599
|
"onLoad",
|
|
629
600
|
"onNavigate"
|
|
630
|
-
])) :
|
|
601
|
+
])) : d("", !0)
|
|
631
602
|
]),
|
|
632
|
-
|
|
633
|
-
e.featureFlags.saveStatus.value === "error" ? (
|
|
603
|
+
y("div", lt, [
|
|
604
|
+
e.featureFlags.saveStatus.value === "error" ? (s(), E("div", {
|
|
634
605
|
key: 0,
|
|
635
606
|
"aria-live": "assertive",
|
|
636
607
|
class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
|
|
637
608
|
"data-tooltip": e.featureFlags.saveErrorMessage.value
|
|
638
|
-
}, [p(
|
|
609
|
+
}, [D(p(R), {
|
|
639
610
|
size: 12,
|
|
640
611
|
"stroke-width": 2.5
|
|
641
|
-
}),
|
|
612
|
+
}), f(" " + _(p(i).header.saveFailed), 1)], 8, ut)) : e.featureFlags.saveStatus.value === "saved" ? (s(), E("div", dt, [D(p(F), {
|
|
642
613
|
size: 12,
|
|
643
614
|
"stroke-width": 2.5
|
|
644
|
-
}),
|
|
645
|
-
e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (
|
|
615
|
+
}), f(" " + _(p(i).header.saved), 1)])) : e.editor.state.isDirty ? (s(), E("div", ft, [c[4] ||= y("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), f(" " + _(p(i).header.unsaved), 1)])) : d("", !0),
|
|
616
|
+
e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (s(), E("button", {
|
|
646
617
|
key: 3,
|
|
647
|
-
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${
|
|
618
|
+
"aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${p(i).comments.button} (${e.commentsInstance.unresolvedCount.value})` : p(i).comments.button,
|
|
648
619
|
"aria-expanded": e.panelState.commentsOpen.value,
|
|
649
|
-
class:
|
|
650
|
-
style:
|
|
620
|
+
class: T(p(ze)),
|
|
621
|
+
style: h({
|
|
651
622
|
backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
|
|
652
623
|
color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
|
|
653
624
|
borderColor: "var(--tpl-primary)"
|
|
654
625
|
}),
|
|
655
|
-
onClick:
|
|
626
|
+
onClick: c[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
|
|
656
627
|
}, [
|
|
657
|
-
p(
|
|
628
|
+
D(p(ve), {
|
|
658
629
|
size: 16,
|
|
659
630
|
"stroke-width": 2
|
|
660
631
|
}),
|
|
661
|
-
|
|
662
|
-
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (
|
|
663
|
-
], 14,
|
|
664
|
-
e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (
|
|
632
|
+
f(" " + _(p(i).comments.button) + " ", 1),
|
|
633
|
+
e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (s(), E("span", mt, _(e.commentsInstance.unresolvedCount.value), 1)) : d("", !0)
|
|
634
|
+
], 14, pt)) : d("", !0),
|
|
635
|
+
e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (s(), E("div", {
|
|
665
636
|
key: 4,
|
|
666
637
|
ref: (t) => e.panelState.aiMenuRef.value = t,
|
|
667
638
|
class: "tpl:relative"
|
|
668
|
-
}, [
|
|
639
|
+
}, [y("button", {
|
|
669
640
|
"aria-expanded": e.panelState.aiMenuOpen.value,
|
|
670
|
-
class:
|
|
671
|
-
onClick:
|
|
672
|
-
}, [p(
|
|
641
|
+
class: T(["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"]),
|
|
642
|
+
onClick: c[1] ||= m((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
|
|
643
|
+
}, [D(p($), {
|
|
673
644
|
size: 16,
|
|
674
645
|
"stroke-width": 2,
|
|
675
646
|
class: "tpl-ai-btn-icon"
|
|
676
|
-
}),
|
|
647
|
+
}), f(" " + _(p(i).aiChat.button), 1)], 10, ht), D(S, {
|
|
677
648
|
"enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
|
|
678
649
|
"enter-from-class": "tpl:scale-95 tpl:opacity-0",
|
|
679
650
|
"enter-to-class": "tpl:scale-100 tpl:opacity-100",
|
|
@@ -681,55 +652,55 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
681
652
|
"leave-from-class": "tpl:scale-100 tpl:opacity-100",
|
|
682
653
|
"leave-to-class": "tpl:scale-95 tpl:opacity-0"
|
|
683
654
|
}, {
|
|
684
|
-
default: u(() => [e.panelState.aiMenuOpen.value ? (
|
|
655
|
+
default: u(() => [e.panelState.aiMenuOpen.value ? (s(), E("div", gt, [D(p(r), {
|
|
685
656
|
"active-feature": e.panelState.activeAiFeature.value,
|
|
686
657
|
onSelect: e.panelState.handleAiFeatureSelect
|
|
687
|
-
}, null, 8, ["active-feature", "onSelect"])])) :
|
|
658
|
+
}, null, 8, ["active-feature", "onSelect"])])) : d("", !0)]),
|
|
688
659
|
_: 1
|
|
689
|
-
})], 512)) :
|
|
690
|
-
e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (
|
|
660
|
+
})], 512)) : d("", !0),
|
|
661
|
+
e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (s(), E("button", {
|
|
691
662
|
key: 5,
|
|
692
|
-
class:
|
|
663
|
+
class: T(p(ze)),
|
|
693
664
|
style: {
|
|
694
665
|
"background-color": "transparent",
|
|
695
666
|
color: "var(--tpl-primary)",
|
|
696
667
|
"border-color": "var(--tpl-primary)"
|
|
697
668
|
},
|
|
698
669
|
disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
|
|
699
|
-
onClick:
|
|
700
|
-
}, [e.testEmail.isSending.value ? (
|
|
670
|
+
onClick: c[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
|
|
671
|
+
}, [e.testEmail.isSending.value ? (s(), v(p(xe), {
|
|
701
672
|
key: 1,
|
|
702
673
|
class: "tpl-spinner",
|
|
703
674
|
size: 16,
|
|
704
675
|
"stroke-width": 2
|
|
705
|
-
})) : (
|
|
676
|
+
})) : (s(), v(p(fe), {
|
|
706
677
|
key: 0,
|
|
707
678
|
size: 16,
|
|
708
679
|
"stroke-width": 2
|
|
709
|
-
})),
|
|
710
|
-
|
|
711
|
-
class:
|
|
680
|
+
})), f(" " + _(p(i).testEmail.button), 1)], 10, _t)) : d("", !0),
|
|
681
|
+
y("button", {
|
|
682
|
+
class: T(p(ze)),
|
|
712
683
|
style: {
|
|
713
684
|
"background-color": "transparent",
|
|
714
685
|
color: "var(--tpl-primary)",
|
|
715
686
|
"border-color": "var(--tpl-primary)"
|
|
716
687
|
},
|
|
717
688
|
disabled: e.isSaveDisabled,
|
|
718
|
-
onClick:
|
|
719
|
-
}, [e.isSaving ? (
|
|
689
|
+
onClick: c[3] ||= (e) => o.$emit("save")
|
|
690
|
+
}, [e.isSaving ? (s(), v(p(xe), {
|
|
720
691
|
key: 1,
|
|
721
692
|
class: "tpl-spinner",
|
|
722
693
|
size: 16,
|
|
723
694
|
"stroke-width": 2
|
|
724
|
-
})) : (
|
|
695
|
+
})) : (s(), v(p(we), {
|
|
725
696
|
key: 0,
|
|
726
697
|
size: 16,
|
|
727
698
|
"stroke-width": 2
|
|
728
|
-
})),
|
|
699
|
+
})), f(" " + _(e.isSaving ? p(i).header.saving : p(i).header.save), 1)], 10, vt)
|
|
729
700
|
])
|
|
730
701
|
]));
|
|
731
702
|
}
|
|
732
|
-
}),
|
|
703
|
+
}), bt = /* @__PURE__ */ e({
|
|
733
704
|
__name: "CloudPanels",
|
|
734
705
|
props: {
|
|
735
706
|
config: {},
|
|
@@ -752,45 +723,45 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
752
723
|
"module-insert"
|
|
753
724
|
],
|
|
754
725
|
setup(e, { expose: t, emit: n }) {
|
|
755
|
-
let
|
|
756
|
-
function
|
|
726
|
+
let r = l(() => import("./features-DIBEo4xl.js").then((e) => e.s)), i = l(() => import("./features-DIBEo4xl.js").then((e) => e.o)), a = l(() => import("./features-DIBEo4xl.js").then((e) => e.a)), o = l(() => import("./features-DIBEo4xl.js").then((e) => e.n)), c = l(() => import("./features-DIBEo4xl.js").then((e) => e.t)), u = l(() => import("./SaveModuleDialog-AwL0tkCV.js")), f = l(() => import("./ModuleBrowserModal-C2CDWKW6.js")), m = l(async () => (await import("./src-RKexlYjA.js")).MediaLibraryModal), h = n;
|
|
727
|
+
function _(e, t, n) {
|
|
757
728
|
t.history.record(), n.setContent(e), t.conditionPreview.reset();
|
|
758
729
|
}
|
|
759
|
-
function
|
|
760
|
-
|
|
730
|
+
function y(e, t) {
|
|
731
|
+
h("module-insert", e, t);
|
|
761
732
|
}
|
|
762
|
-
let
|
|
763
|
-
function
|
|
764
|
-
|
|
733
|
+
let b = w(null);
|
|
734
|
+
function x(e) {
|
|
735
|
+
b.value?.filterByBlock(e);
|
|
765
736
|
}
|
|
766
|
-
return t({ filterCommentsByBlock:
|
|
767
|
-
p(
|
|
737
|
+
return t({ filterCommentsByBlock: x }), (t, n) => (s(), E(g, null, [
|
|
738
|
+
D(p(r), {
|
|
768
739
|
visible: e.panelState.aiChatOpen.value,
|
|
769
|
-
"on-apply": (t) =>
|
|
740
|
+
"on-apply": (t) => _(t, e.core, e.editor),
|
|
770
741
|
onClose: n[0] ||= (t) => e.panelState.aiChatOpen.value = !1
|
|
771
742
|
}, null, 8, ["visible", "on-apply"]),
|
|
772
|
-
p(
|
|
743
|
+
D(p(o), {
|
|
773
744
|
visible: e.panelState.scoringPanelOpen.value,
|
|
774
745
|
onClose: n[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
|
|
775
746
|
}, null, 8, ["visible"]),
|
|
776
|
-
p(
|
|
747
|
+
D(p(a), {
|
|
777
748
|
visible: e.panelState.designReferenceOpen.value,
|
|
778
749
|
"has-existing-blocks": e.editor.content.value.blocks.length > 0,
|
|
779
750
|
onClose: n[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
|
|
780
|
-
onApply: n[3] ||= (t) =>
|
|
751
|
+
onApply: n[3] ||= (t) => _(t, e.core, e.editor)
|
|
781
752
|
}, null, 8, ["visible", "has-existing-blocks"]),
|
|
782
|
-
p(
|
|
753
|
+
D(p(i), {
|
|
783
754
|
ref_key: "commentsSidebar",
|
|
784
|
-
ref:
|
|
755
|
+
ref: b,
|
|
785
756
|
visible: e.panelState.commentsOpen.value,
|
|
786
757
|
onClose: n[4] ||= (t) => e.panelState.commentsOpen.value = !1
|
|
787
758
|
}, null, 8, ["visible"]),
|
|
788
|
-
p(
|
|
759
|
+
D(p(c), {
|
|
789
760
|
visible: e.panelState.testEmailModalOpen.value,
|
|
790
761
|
"allowed-emails": e.testEmail.allowedEmails.value,
|
|
791
762
|
"is-sending": e.testEmail.isSending.value,
|
|
792
763
|
error: e.testEmail.error.value,
|
|
793
|
-
onSend: n[5] ||= (e) =>
|
|
764
|
+
onSend: n[5] ||= (e) => h("send-test-email", e),
|
|
794
765
|
onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
|
|
795
766
|
}, null, 8, [
|
|
796
767
|
"visible",
|
|
@@ -798,22 +769,22 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
798
769
|
"is-sending",
|
|
799
770
|
"error"
|
|
800
771
|
]),
|
|
801
|
-
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (
|
|
772
|
+
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(p(u), {
|
|
802
773
|
key: 0,
|
|
803
774
|
visible: e.showSaveModuleDialog,
|
|
804
775
|
"pre-selected-block-id": e.saveModulePreSelectedBlockId,
|
|
805
776
|
onClose: n[7] ||= (e) => {
|
|
806
|
-
|
|
777
|
+
h("update:showSaveModuleDialog", !1), h("update:saveModulePreSelectedBlockId", null);
|
|
807
778
|
},
|
|
808
779
|
onSaved: n[8] ||= (t) => e.savedModulesHeadless.loadModules()
|
|
809
|
-
}, null, 8, ["visible", "pre-selected-block-id"])) :
|
|
810
|
-
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (
|
|
780
|
+
}, null, 8, ["visible", "pre-selected-block-id"])) : d("", !0),
|
|
781
|
+
e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(p(f), {
|
|
811
782
|
key: 1,
|
|
812
783
|
visible: e.showModuleBrowserModal,
|
|
813
|
-
onClose: n[9] ||= (e) =>
|
|
814
|
-
onInsert:
|
|
815
|
-
}, null, 8, ["visible"])) :
|
|
816
|
-
p(
|
|
784
|
+
onClose: n[9] ||= (e) => h("update:showModuleBrowserModal", !1),
|
|
785
|
+
onInsert: y
|
|
786
|
+
}, null, 8, ["visible"])) : d("", !0),
|
|
787
|
+
D(p(m), {
|
|
817
788
|
visible: e.panelState.mediaLibraryOpen.value,
|
|
818
789
|
accept: e.panelState.mediaLibraryAccept.value,
|
|
819
790
|
onSelect: e.mediaLib.handleMediaSelect,
|
|
@@ -826,23 +797,23 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
826
797
|
])
|
|
827
798
|
], 64));
|
|
828
799
|
}
|
|
829
|
-
}),
|
|
800
|
+
}), xt = {
|
|
830
801
|
key: 0,
|
|
831
802
|
class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
|
|
832
|
-
},
|
|
803
|
+
}, St = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, Ct = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, wt = /* @__PURE__ */ e({
|
|
833
804
|
__name: "CloudLoadingOverlay",
|
|
834
805
|
props: { visible: { type: Boolean } },
|
|
835
806
|
setup(e) {
|
|
836
|
-
return (t, n) => e.visible ? (
|
|
807
|
+
return (t, n) => e.visible ? (s(), E("div", xt, [n[1] ||= O("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), y("div", St, [y("div", Ct, [(s(), E(g, null, i(5, (e) => y("div", {
|
|
837
808
|
key: e,
|
|
838
809
|
class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
|
|
839
|
-
})), 64))]), n[0] ||=
|
|
810
|
+
})), 64))]), n[0] ||= O("<div class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"><div class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div></div><div class=\"tpl:py-4\"><div class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div></div><div class=\"tpl:flex tpl:justify-center tpl:py-4\"><div class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"></div></div></div></div><div class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div></div>", 2)])])) : d("", !0);
|
|
840
811
|
}
|
|
841
|
-
}),
|
|
812
|
+
}), Tt = {
|
|
842
813
|
key: 0,
|
|
843
814
|
role: "alert",
|
|
844
815
|
class: "tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]"
|
|
845
|
-
},
|
|
816
|
+
}, Et = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Dt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, Ot = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, At = /* @__PURE__ */ e({
|
|
846
817
|
__name: "CloudErrorOverlay",
|
|
847
818
|
props: {
|
|
848
819
|
error: {},
|
|
@@ -850,50 +821,50 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
850
821
|
},
|
|
851
822
|
emits: ["retry"],
|
|
852
823
|
setup(e, { emit: t }) {
|
|
853
|
-
let n = t, { t:
|
|
854
|
-
function
|
|
855
|
-
return "isUnauthorized" in e && e.isUnauthorized ?
|
|
824
|
+
let n = t, { t: r } = K();
|
|
825
|
+
function i(e) {
|
|
826
|
+
return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
|
|
856
827
|
}
|
|
857
|
-
function
|
|
828
|
+
function a(e) {
|
|
858
829
|
return "isNotFound" in e && !!e.isNotFound;
|
|
859
830
|
}
|
|
860
|
-
return (t,
|
|
861
|
-
|
|
831
|
+
return (t, o) => e.visible && e.error ? (s(), E("div", Tt, [
|
|
832
|
+
y("div", Et, [D(p(R), {
|
|
862
833
|
size: 32,
|
|
863
834
|
"stroke-width": 1.5,
|
|
864
835
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
865
836
|
})]),
|
|
866
|
-
|
|
867
|
-
|
|
837
|
+
y("div", Dt, [y("h2", Ot, _(p(r).error.title), 1), y("p", kt, _(i(e.error)), 1)]),
|
|
838
|
+
a(e.error) ? d("", !0) : (s(), E("button", {
|
|
868
839
|
key: 0,
|
|
869
840
|
class: "tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
870
|
-
onClick:
|
|
871
|
-
},
|
|
872
|
-
])) :
|
|
841
|
+
onClick: o[0] ||= (e) => n("retry")
|
|
842
|
+
}, _(p(r).error.retry), 1))
|
|
843
|
+
])) : d("", !0);
|
|
873
844
|
}
|
|
874
|
-
}),
|
|
845
|
+
}), jt = {
|
|
875
846
|
key: 0,
|
|
876
847
|
class: "tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]"
|
|
877
|
-
},
|
|
848
|
+
}, Mt = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, Nt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Pt = /* @__PURE__ */ e({
|
|
878
849
|
__name: "SnapshotPreviewBanner",
|
|
879
850
|
props: { visible: { type: Boolean } },
|
|
880
851
|
emits: ["cancel", "confirm"],
|
|
881
852
|
setup(e, { emit: t }) {
|
|
882
|
-
let n = t, { t:
|
|
883
|
-
return (t,
|
|
853
|
+
let n = t, { t: r } = K();
|
|
854
|
+
return (t, i) => e.visible ? (s(), E("div", jt, [y("div", Mt, [D(p(j), {
|
|
884
855
|
size: 18,
|
|
885
856
|
"stroke-width": 2,
|
|
886
857
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
887
|
-
}),
|
|
858
|
+
}), y("span", null, _(p(r).snapshotPreview.message), 1)]), y("div", Nt, [y("button", {
|
|
888
859
|
class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
889
860
|
style: { "background-color": "transparent" },
|
|
890
|
-
onClick:
|
|
891
|
-
},
|
|
861
|
+
onClick: i[0] ||= (e) => n("cancel")
|
|
862
|
+
}, _(p(r).snapshotPreview.cancel), 1), y("button", {
|
|
892
863
|
class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
893
|
-
onClick:
|
|
894
|
-
},
|
|
864
|
+
onClick: i[1] ||= (e) => n("confirm")
|
|
865
|
+
}, _(p(r).snapshotPreview.restore), 1)])])) : d("", !0);
|
|
895
866
|
}
|
|
896
|
-
}),
|
|
867
|
+
}), Ft = {
|
|
897
868
|
key: 0,
|
|
898
869
|
role: "status",
|
|
899
870
|
"aria-live": "polite",
|
|
@@ -903,14 +874,14 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
903
874
|
color: "var(--tpl-text)",
|
|
904
875
|
border: "1px solid var(--tpl-warning)"
|
|
905
876
|
}
|
|
906
|
-
},
|
|
877
|
+
}, It = /* @__PURE__ */ e({
|
|
907
878
|
__name: "CollabUndoToast",
|
|
908
879
|
props: { visible: { type: Boolean } },
|
|
909
880
|
setup(e) {
|
|
910
|
-
let { t } =
|
|
911
|
-
return (n,
|
|
881
|
+
let { t } = P();
|
|
882
|
+
return (n, r) => e.visible ? (s(), E("div", Ft, _(p(t).history.collabWarning), 1)) : d("", !0);
|
|
912
883
|
}
|
|
913
|
-
}),
|
|
884
|
+
}), Lt = ["data-tpl-theme"], Rt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, zt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Bt = ["aria-label"], Vt = /* @__PURE__ */ ue(/* @__PURE__ */ e({
|
|
914
885
|
__name: "CloudEditor",
|
|
915
886
|
props: {
|
|
916
887
|
config: {},
|
|
@@ -919,64 +890,90 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
919
890
|
fontsManager: {}
|
|
920
891
|
},
|
|
921
892
|
emits: ["ready"],
|
|
922
|
-
setup(
|
|
923
|
-
let
|
|
924
|
-
|
|
925
|
-
let
|
|
926
|
-
config:
|
|
927
|
-
translations:
|
|
928
|
-
fontsManager:
|
|
929
|
-
emit:
|
|
930
|
-
getCommentsSidebar: () =>
|
|
931
|
-
}), { isInitializing:
|
|
932
|
-
|
|
893
|
+
setup(e, { expose: i, emit: c }) {
|
|
894
|
+
let l = e;
|
|
895
|
+
t(M, l.cloudTranslations);
|
|
896
|
+
let m = c, C = w(null), O = w(null), k = Ge({
|
|
897
|
+
config: l.config,
|
|
898
|
+
translations: l.translations,
|
|
899
|
+
fontsManager: l.fontsManager,
|
|
900
|
+
emit: m,
|
|
901
|
+
getCommentsSidebar: () => C.value ? { filterByBlock: C.value.filterCommentsByBlock } : null
|
|
902
|
+
}), { isInitializing: A, isAuthReady: j, initError: ee, planConfigInstance: N, websocket: P, collaboration: F, isCollaborationEnabled: R, editor: z, core: B, featureFlags: V, mediaLib: ne, exporter: re, testEmail: H, commentsInstance: ie, savedModulesHeadless: U, panelState: W, snapshotPreview: G, collabWarning: K, showSaveModuleDialog: q, showModuleBrowserModal: J, saveModulePreSelectedBlockId: Y, setThemeOverrides: oe, setUiTheme: se } = k, X = w("blocks");
|
|
903
|
+
t(le, X);
|
|
904
|
+
let Z = x(() => ae(l.config.editorType) === "popup"), ce = x(() => Z.value && X.value === "displayRules"), ue = x(() => Z.value && X.value === "schedule"), de = x(() => X.value === "design"), fe = x(() => Z.value && (ce.value || ue.value || de.value)), pe = x(() => ce.value || ue.value);
|
|
905
|
+
r(() => [j.value, z.content.value.settings.popup], ([e]) => {
|
|
906
|
+
if (!e || !Z.value || z.content.value.settings.popup) return;
|
|
907
|
+
let t = te();
|
|
908
|
+
z.updateSettings({
|
|
909
|
+
popup: t,
|
|
910
|
+
width: I[t.design.sizePreset]
|
|
911
|
+
});
|
|
912
|
+
}, { immediate: !0 });
|
|
913
|
+
async function me(e) {
|
|
933
914
|
try {
|
|
934
|
-
await
|
|
915
|
+
await H.sendTestEmail(e), W.testEmailModalOpen.value = !1;
|
|
935
916
|
} catch {}
|
|
936
917
|
}
|
|
937
|
-
function
|
|
918
|
+
function he(e, t) {
|
|
938
919
|
for (let n = 0; n < e.content.length; n++) {
|
|
939
|
-
let r =
|
|
940
|
-
|
|
920
|
+
let r = L(e.content[n]), i = t === void 0 ? void 0 : t + n;
|
|
921
|
+
z.addBlock(r, void 0, void 0, i);
|
|
941
922
|
}
|
|
942
|
-
|
|
923
|
+
J.value = !1;
|
|
943
924
|
}
|
|
944
|
-
let
|
|
945
|
-
config:
|
|
946
|
-
editor:
|
|
947
|
-
websocket:
|
|
948
|
-
planConfigInstance:
|
|
949
|
-
snapshotPreview:
|
|
950
|
-
core:
|
|
951
|
-
exporter:
|
|
952
|
-
featureFlags:
|
|
953
|
-
isDestroyed:
|
|
954
|
-
}),
|
|
955
|
-
|
|
956
|
-
|
|
925
|
+
let Q = qe({
|
|
926
|
+
config: l.config,
|
|
927
|
+
editor: z,
|
|
928
|
+
websocket: P,
|
|
929
|
+
planConfigInstance: N,
|
|
930
|
+
snapshotPreview: G,
|
|
931
|
+
core: B,
|
|
932
|
+
exporter: re,
|
|
933
|
+
featureFlags: V,
|
|
934
|
+
isDestroyed: k.isDestroyed
|
|
935
|
+
}), ge = x(() => {
|
|
936
|
+
if (z.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
|
|
937
|
+
let e = W.rightPanelOpen.value ? "tpl:right-[680px]" : "tpl:right-[320px]";
|
|
938
|
+
if (!Z.value) return ["tpl:left-12", e];
|
|
939
|
+
let t;
|
|
940
|
+
return t = X.value === "blocks" ? "tpl:left-[272px]" : de.value ? "tpl:left-[392px]" : "tpl:left-[72px]", [t, fe.value ? "tpl:right-0" : e];
|
|
941
|
+
}), $ = Je({
|
|
942
|
+
issues: B.accessibilityLint ? B.accessibilityLint.issues : w([]),
|
|
943
|
+
planConfig: N.config
|
|
957
944
|
});
|
|
958
|
-
async function
|
|
959
|
-
await
|
|
945
|
+
async function _e() {
|
|
946
|
+
await $.tryRunSave(() => Q.saveTemplate().catch((e) => l.config.onError?.(e)));
|
|
960
947
|
}
|
|
961
|
-
return
|
|
962
|
-
|
|
963
|
-
}),
|
|
964
|
-
|
|
965
|
-
}),
|
|
966
|
-
getContent: () =>
|
|
967
|
-
setContent: (e) =>
|
|
968
|
-
setTheme:
|
|
969
|
-
setThemeOverrides:
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
948
|
+
return k.onSaveHook.value = _e, a(() => {
|
|
949
|
+
k.initialize();
|
|
950
|
+
}), o(() => {
|
|
951
|
+
k.destroy();
|
|
952
|
+
}), i({
|
|
953
|
+
getContent: () => z.content.value,
|
|
954
|
+
setContent: (e) => z.setContent(e),
|
|
955
|
+
setTheme: se,
|
|
956
|
+
setThemeOverrides: oe,
|
|
957
|
+
undo: () => {
|
|
958
|
+
K.showCollabUndoWarning(), B.history.undo();
|
|
959
|
+
},
|
|
960
|
+
redo: () => B.history.redo(),
|
|
961
|
+
canUndo: () => B.history.canUndo.value,
|
|
962
|
+
canRedo: () => B.history.canRedo.value,
|
|
963
|
+
create: Q.createTemplate,
|
|
964
|
+
load: Q.loadTemplate,
|
|
965
|
+
save: Q.saveTemplate,
|
|
966
|
+
sendTestEmail: H.sendTestEmail,
|
|
967
|
+
startTour: (e) => O.value?.start(e),
|
|
968
|
+
dismissTour: () => O.value?.dismiss(),
|
|
969
|
+
resetTourDismissed: () => Ae(l.config.tour),
|
|
970
|
+
isTourDismissed: () => l.config.tour ? Te(l.config.tour) : !0
|
|
971
|
+
}), (t, r) => (s(), E("div", {
|
|
972
|
+
class: T(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": p(z).state.darkMode }]),
|
|
973
|
+
"data-tpl-theme": p(B).resolvedTheme.value,
|
|
974
|
+
style: h(p(B).themeStyles.value)
|
|
978
975
|
}, [
|
|
979
|
-
|
|
976
|
+
D(S, {
|
|
980
977
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
981
978
|
"enter-from-class": "tpl:opacity-100",
|
|
982
979
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -984,10 +981,10 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
984
981
|
"leave-from-class": "tpl:opacity-100",
|
|
985
982
|
"leave-to-class": "tpl:opacity-0"
|
|
986
983
|
}, {
|
|
987
|
-
default: u(() => [
|
|
984
|
+
default: u(() => [D(wt, { visible: p(A) || p(z).state.isLoading }, null, 8, ["visible"])]),
|
|
988
985
|
_: 1
|
|
989
986
|
}),
|
|
990
|
-
|
|
987
|
+
D(S, {
|
|
991
988
|
"enter-active-class": "tpl:transition-opacity tpl:duration-200",
|
|
992
989
|
"enter-from-class": "tpl:opacity-0",
|
|
993
990
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -995,10 +992,10 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
995
992
|
"leave-from-class": "tpl:opacity-100",
|
|
996
993
|
"leave-to-class": "tpl:opacity-0"
|
|
997
994
|
}, {
|
|
998
|
-
default: u(() => [
|
|
999
|
-
error:
|
|
1000
|
-
visible: !!
|
|
1001
|
-
onRetry:
|
|
995
|
+
default: u(() => [D(At, {
|
|
996
|
+
error: p(ee),
|
|
997
|
+
visible: !!p(ee) && !p(A),
|
|
998
|
+
onRetry: p(k).initialize
|
|
1002
999
|
}, null, 8, [
|
|
1003
1000
|
"error",
|
|
1004
1001
|
"visible",
|
|
@@ -1006,23 +1003,23 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1006
1003
|
])]),
|
|
1007
1004
|
_: 1
|
|
1008
1005
|
}),
|
|
1009
|
-
|
|
1010
|
-
editor:
|
|
1011
|
-
|
|
1012
|
-
"feature-flags":
|
|
1013
|
-
"panel-state":
|
|
1014
|
-
"snapshot-preview":
|
|
1015
|
-
"comments-instance":
|
|
1016
|
-
"test-email":
|
|
1017
|
-
websocket:
|
|
1018
|
-
collaboration:
|
|
1019
|
-
"is-collaboration-enabled":
|
|
1020
|
-
"is-saving":
|
|
1021
|
-
"is-save-disabled":
|
|
1022
|
-
onSave:
|
|
1006
|
+
D(yt, {
|
|
1007
|
+
editor: p(z),
|
|
1008
|
+
"on-before-history-undo": p(K).showCollabUndoWarning,
|
|
1009
|
+
"feature-flags": p(V),
|
|
1010
|
+
"panel-state": p(W),
|
|
1011
|
+
"snapshot-preview": p(G),
|
|
1012
|
+
"comments-instance": p(ie),
|
|
1013
|
+
"test-email": p(H),
|
|
1014
|
+
websocket: p(P),
|
|
1015
|
+
collaboration: p(F),
|
|
1016
|
+
"is-collaboration-enabled": p(R),
|
|
1017
|
+
"is-saving": p(z).state.isSaving || p(V).isSaveExporting.value,
|
|
1018
|
+
"is-save-disabled": p(z).state.isSaving || p(V).isSaveExporting.value || !p(z).state.isDirty,
|
|
1019
|
+
onSave: _e
|
|
1023
1020
|
}, null, 8, [
|
|
1024
1021
|
"editor",
|
|
1025
|
-
"
|
|
1022
|
+
"on-before-history-undo",
|
|
1026
1023
|
"feature-flags",
|
|
1027
1024
|
"panel-state",
|
|
1028
1025
|
"snapshot-preview",
|
|
@@ -1034,27 +1031,27 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1034
1031
|
"is-saving",
|
|
1035
1032
|
"is-save-disabled"
|
|
1036
1033
|
]),
|
|
1037
|
-
|
|
1038
|
-
open:
|
|
1039
|
-
issues:
|
|
1040
|
-
onCancel:
|
|
1041
|
-
onConfirm:
|
|
1034
|
+
D(it, {
|
|
1035
|
+
open: p($).modalOpen.value,
|
|
1036
|
+
issues: p($).blockingIssues.value,
|
|
1037
|
+
onCancel: p($).cancel,
|
|
1038
|
+
onConfirm: p($).confirmAndSave
|
|
1042
1039
|
}, null, 8, [
|
|
1043
1040
|
"open",
|
|
1044
1041
|
"issues",
|
|
1045
1042
|
"onCancel",
|
|
1046
1043
|
"onConfirm"
|
|
1047
1044
|
]),
|
|
1048
|
-
|
|
1049
|
-
visible:
|
|
1050
|
-
onCancel:
|
|
1051
|
-
onConfirm:
|
|
1045
|
+
D(Pt, {
|
|
1046
|
+
visible: p(G).isPreviewingSnapshot.value,
|
|
1047
|
+
onCancel: p(G).cancelPreview,
|
|
1048
|
+
onConfirm: p(G).confirmRestoreSnapshot
|
|
1052
1049
|
}, null, 8, [
|
|
1053
1050
|
"visible",
|
|
1054
1051
|
"onCancel",
|
|
1055
1052
|
"onConfirm"
|
|
1056
1053
|
]),
|
|
1057
|
-
|
|
1054
|
+
D(S, {
|
|
1058
1055
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
1059
1056
|
"enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
|
|
1060
1057
|
"enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
@@ -1062,18 +1059,21 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1062
1059
|
"leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
|
|
1063
1060
|
"leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
|
|
1064
1061
|
}, {
|
|
1065
|
-
default: u(() => [
|
|
1062
|
+
default: u(() => [D(It, { visible: p(K).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
|
|
1066
1063
|
_: 1
|
|
1067
1064
|
}),
|
|
1068
|
-
n(
|
|
1069
|
-
|
|
1070
|
-
class:
|
|
1071
|
-
style: {
|
|
1065
|
+
n(D(Pe, null, null, 512), [[b, !p(z).state.previewMode]]),
|
|
1066
|
+
y("div", {
|
|
1067
|
+
class: T(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...ge.value, p(G).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
|
|
1068
|
+
style: h({
|
|
1072
1069
|
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
1073
|
-
"
|
|
1074
|
-
}
|
|
1075
|
-
}, [
|
|
1076
|
-
|
|
1070
|
+
backgroundColor: pe.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
|
|
1071
|
+
})
|
|
1072
|
+
}, [Z.value && X.value === "displayRules" ? (s(), v(Ne, { key: 0 })) : Z.value && X.value === "schedule" ? (s(), v(Le, {
|
|
1073
|
+
key: 1,
|
|
1074
|
+
layout: "standalone"
|
|
1075
|
+
})) : (s(), E(g, { key: 2 }, [y("div", Rt, [D(S, { name: "tpl-restore-btn" }, {
|
|
1076
|
+
default: u(() => [p(B).conditionPreview.hasHiddenBlocks.value ? (s(), E("button", {
|
|
1077
1077
|
key: 0,
|
|
1078
1078
|
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",
|
|
1079
1079
|
style: {
|
|
@@ -1082,76 +1082,78 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1082
1082
|
"border-color": "var(--tpl-warning)",
|
|
1083
1083
|
"backdrop-filter": "blur(8px)"
|
|
1084
1084
|
},
|
|
1085
|
-
onClick:
|
|
1086
|
-
}, [p(
|
|
1085
|
+
onClick: r[0] ||= (e) => p(B).conditionPreview.reset()
|
|
1086
|
+
}, [D(p(Ce), {
|
|
1087
1087
|
size: 13,
|
|
1088
1088
|
"stroke-width": 2
|
|
1089
|
-
}),
|
|
1089
|
+
}), f(" " + _(p(B).t.blockSettings.restoreHiddenBlocks), 1)])) : d("", !0)]),
|
|
1090
1090
|
_: 1
|
|
1091
|
-
})]),
|
|
1092
|
-
viewport:
|
|
1093
|
-
content:
|
|
1094
|
-
"selected-block-id":
|
|
1095
|
-
"dark-mode":
|
|
1096
|
-
"preview-mode":
|
|
1097
|
-
"
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1091
|
+
})]), y("main", zt, [D(Me, {
|
|
1092
|
+
viewport: p(z).state.viewport,
|
|
1093
|
+
content: p(z).content.value,
|
|
1094
|
+
"selected-block-id": p(z).state.selectedBlockId,
|
|
1095
|
+
"dark-mode": p(z).state.darkMode,
|
|
1096
|
+
"preview-mode": p(z).state.previewMode,
|
|
1097
|
+
"multi-page-canvas": e.config.multiPageCanvas ?? !1,
|
|
1098
|
+
"locked-blocks": p(F)?.lockedBlocks.value ?? void 0,
|
|
1099
|
+
onSelectBlock: p(z).selectBlock,
|
|
1100
|
+
onOpenAiChat: r[1] ||= (e) => p(W).aiChatOpen.value = !0,
|
|
1101
|
+
onOpenDesignReference: r[2] ||= (e) => p(W).designReferenceOpen.value = !0
|
|
1101
1102
|
}, null, 8, [
|
|
1102
1103
|
"viewport",
|
|
1103
1104
|
"content",
|
|
1104
1105
|
"selected-block-id",
|
|
1105
1106
|
"dark-mode",
|
|
1106
1107
|
"preview-mode",
|
|
1108
|
+
"multi-page-canvas",
|
|
1107
1109
|
"locked-blocks",
|
|
1108
1110
|
"onSelectBlock"
|
|
1109
|
-
])])],
|
|
1110
|
-
|
|
1111
|
+
])])], 64))], 6),
|
|
1112
|
+
e.config.branding !== !1 && !p(V).isWhiteLabeled.value ? (s(), v(Ie, {
|
|
1111
1113
|
key: 0,
|
|
1112
|
-
"position-class":
|
|
1113
|
-
}, null, 8, ["position-class"])) :
|
|
1114
|
-
|
|
1114
|
+
"position-class": ge.value
|
|
1115
|
+
}, null, 8, ["position-class"])) : d("", !0),
|
|
1116
|
+
y("div", {
|
|
1115
1117
|
class: "tpl-sr-only",
|
|
1116
1118
|
role: "status",
|
|
1117
1119
|
"aria-live": "polite",
|
|
1118
1120
|
"aria-atomic": "true",
|
|
1119
|
-
"aria-label":
|
|
1120
|
-
},
|
|
1121
|
-
n(
|
|
1122
|
-
"selected-block":
|
|
1123
|
-
settings:
|
|
1124
|
-
"shifted-left":
|
|
1125
|
-
onUpdateBlock:
|
|
1126
|
-
onDeleteBlock:
|
|
1127
|
-
onDuplicateBlock:
|
|
1128
|
-
onUpdateSettings:
|
|
1121
|
+
"aria-label": p(B).t.landmarks.reorderAnnouncements
|
|
1122
|
+
}, _(p(B).keyboardReorder.announcement.value), 9, Bt),
|
|
1123
|
+
n(D(Oe, {
|
|
1124
|
+
"selected-block": p(z).selectedBlock.value,
|
|
1125
|
+
settings: p(z).content.value.settings,
|
|
1126
|
+
"shifted-left": p(W).rightPanelOpen.value,
|
|
1127
|
+
onUpdateBlock: r[3] ||= (e) => p(z).updateBlock(p(z).selectedBlock.value.id, e),
|
|
1128
|
+
onDeleteBlock: r[4] ||= (e) => p(B).blockActions.deleteBlock(p(z).selectedBlock.value.id),
|
|
1129
|
+
onDuplicateBlock: r[5] ||= (e) => p(B).blockActions.duplicateBlock(p(z).selectedBlock.value),
|
|
1130
|
+
onUpdateSettings: p(z).updateSettings
|
|
1129
1131
|
}, null, 8, [
|
|
1130
1132
|
"selected-block",
|
|
1131
1133
|
"settings",
|
|
1132
1134
|
"shifted-left",
|
|
1133
1135
|
"onUpdateSettings"
|
|
1134
|
-
]), [[
|
|
1135
|
-
!
|
|
1136
|
+
]), [[b, !p(z).state.previewMode && !fe.value]]),
|
|
1137
|
+
!p(A) && p(j) ? (s(), v(bt, {
|
|
1136
1138
|
key: 1,
|
|
1137
1139
|
ref_key: "cloudPanelsRef",
|
|
1138
|
-
ref:
|
|
1139
|
-
config:
|
|
1140
|
-
editor:
|
|
1141
|
-
core:
|
|
1142
|
-
"panel-state":
|
|
1143
|
-
"plan-config-instance":
|
|
1144
|
-
"test-email":
|
|
1145
|
-
"media-lib":
|
|
1146
|
-
"saved-modules-headless":
|
|
1147
|
-
"show-save-module-dialog":
|
|
1148
|
-
"save-module-pre-selected-block-id":
|
|
1149
|
-
"show-module-browser-modal":
|
|
1150
|
-
"onUpdate:showSaveModuleDialog":
|
|
1151
|
-
"onUpdate:saveModulePreSelectedBlockId":
|
|
1152
|
-
"onUpdate:showModuleBrowserModal":
|
|
1153
|
-
onSendTestEmail:
|
|
1154
|
-
onModuleInsert:
|
|
1140
|
+
ref: C,
|
|
1141
|
+
config: l.config,
|
|
1142
|
+
editor: p(z),
|
|
1143
|
+
core: p(B),
|
|
1144
|
+
"panel-state": p(W),
|
|
1145
|
+
"plan-config-instance": p(N),
|
|
1146
|
+
"test-email": p(H),
|
|
1147
|
+
"media-lib": p(ne),
|
|
1148
|
+
"saved-modules-headless": p(U),
|
|
1149
|
+
"show-save-module-dialog": p(q),
|
|
1150
|
+
"save-module-pre-selected-block-id": p(Y),
|
|
1151
|
+
"show-module-browser-modal": p(J),
|
|
1152
|
+
"onUpdate:showSaveModuleDialog": r[6] ||= (e) => q.value = e,
|
|
1153
|
+
"onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => Y.value = e,
|
|
1154
|
+
"onUpdate:showModuleBrowserModal": r[8] ||= (e) => J.value = e,
|
|
1155
|
+
onSendTestEmail: me,
|
|
1156
|
+
onModuleInsert: he
|
|
1155
1157
|
}, null, 8, [
|
|
1156
1158
|
"config",
|
|
1157
1159
|
"editor",
|
|
@@ -1164,9 +1166,18 @@ var Be = ["aria-label"], Ve = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
|
|
|
1164
1166
|
"show-save-module-dialog",
|
|
1165
1167
|
"save-module-pre-selected-block-id",
|
|
1166
1168
|
"show-module-browser-modal"
|
|
1167
|
-
])) :
|
|
1168
|
-
|
|
1169
|
+
])) : d("", !0),
|
|
1170
|
+
e.config.tour ? (s(), v(Fe, {
|
|
1171
|
+
key: 2,
|
|
1172
|
+
ref_key: "editorTourRef",
|
|
1173
|
+
ref: O,
|
|
1174
|
+
"tour-config": e.config.tour,
|
|
1175
|
+
"dark-mode": p(z).state.darkMode
|
|
1176
|
+
}, null, 8, ["tour-config", "dark-mode"])) : d("", !0)
|
|
1177
|
+
], 14, Lt));
|
|
1169
1178
|
}
|
|
1170
|
-
}), [["__scopeId", "data-v-
|
|
1179
|
+
}), [["__scopeId", "data-v-6985a9ad"]]);
|
|
1171
1180
|
//#endregion
|
|
1172
|
-
export {
|
|
1181
|
+
export { Vt as default };
|
|
1182
|
+
|
|
1183
|
+
//# sourceMappingURL=CloudEditor-Btyr0b0_.js.map
|