@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.
Files changed (182) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +3 -3
  3. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
  4. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
  5. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
  6. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
  7. package/dist/CloudEditor-zo9PjjvY.js +1214 -0
  8. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
  9. package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
  10. package/dist/CountdownBlock-BCi7-DAM.js +92 -0
  11. package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
  12. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
  13. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
  14. package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
  15. package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
  16. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
  17. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
  18. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
  19. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
  20. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
  21. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
  22. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
  23. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
  24. package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
  25. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  26. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
  27. package/dist/bundle-stats.json +7 -7
  28. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
  29. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
  30. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
  31. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  32. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
  33. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
  34. package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
  35. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  36. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
  37. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  38. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  39. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  40. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  41. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  42. package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
  43. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  45. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  46. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
  47. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
  49. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
  51. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
  53. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  54. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
  55. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  57. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  58. package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
  59. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
  61. package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
  62. package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
  63. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  64. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
  65. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
  67. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
  69. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  70. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
  71. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  72. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
  73. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  74. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
  75. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  76. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
  77. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  78. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  79. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  80. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  81. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  82. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
  83. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
  84. package/dist/cdn/editor.css +1 -1
  85. package/dist/cdn/editor.js +211 -123
  86. package/dist/cdn/editor.js.map +1 -1
  87. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  88. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  89. package/dist/chevron-right-BqCptpdp.js +10 -0
  90. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  91. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  92. package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
  93. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  94. package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
  95. package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
  96. package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
  97. package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
  98. package/dist/dist-Bmir0gYb.js +1167 -0
  99. package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
  100. package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
  101. package/dist/dist-CivF9P8b.js +382 -0
  102. package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
  103. package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
  104. package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
  105. package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
  106. package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
  107. package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
  108. package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
  109. package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
  110. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  111. package/dist/index.d.ts +102 -14
  112. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  113. package/dist/keys-CvX8D-8C.js +10 -0
  114. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  115. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  116. package/dist/pencil-BZJPNYWR.js +10 -0
  117. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  118. package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
  119. package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
  120. package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
  121. package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
  122. package/dist/style.css +1 -1
  123. package/dist/styleConstants-wWRbcuEK.js +55 -0
  124. package/dist/styles-CavWjvol.js +5487 -0
  125. package/dist/templatical-editor.js +211 -119
  126. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
  127. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
  128. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
  129. package/dist/undo-2-Cg8I7obC.js +16 -0
  130. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
  131. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
  132. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  133. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
  134. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  135. package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
  136. package/package.json +15 -15
  137. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  138. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  139. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  140. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  141. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  142. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  143. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  144. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  145. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  146. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  147. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  148. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  149. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  150. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  151. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  152. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  153. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  156. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  157. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  158. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  160. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  161. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  162. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  163. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  164. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  165. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  166. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  167. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  168. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  169. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  170. package/dist/dist-B1IR0bpH.js +0 -326
  171. package/dist/dist-DJmnUmW9.js +0 -362
  172. package/dist/keys-ciNfSSGj.js +0 -10
  173. package/dist/styleConstants-fWzlIIwN.js +0 -55
  174. package/dist/styles-DEXEkBvg.js +0 -3176
  175. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  176. /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
  177. /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
  178. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
  179. /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
  180. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  181. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
  182. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
@@ -1,122 +1,91 @@
1
- import { A as e, Dt as t, H as n, M as r, Mt as i, N as a, Ot as o, P as s, Q as c, S as l, V as u, Y as d, _ as f, b as p, c as m, d as h, et as g, g as _, h as v, it as y, j as b, m as x, p as S, t as C, u as w, v as T, x as E, y as D, z as O } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { t as k } from "./timeouts-BSGxjuUF.js";
3
- import { E as A, i as j } from "./dist-DJmnUmW9.js";
4
- import { P as M, S as ee, t as N } from "./useEditorCore-C6ost42Q.js";
5
- import { s as P, t as F } from "./dist-B1IR0bpH.js";
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 je(e) {
39
- let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: o } = e, s = g(null), l = c(null), u = c(null), f = !1;
40
- d(() => {
41
- f = !0;
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 p = S(() => l.value !== null), m = S(() => s.value?.snapshots.value ?? []), h = S(() => s.value?.isLoading.value ?? !1), _ = S(() => s.value?.isRestoring.value ?? !1);
44
- function v() {
45
- n.state.template?.id && !s.value && (s.value = ve({
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: y,
17
+ onRestore: _,
49
18
  onError: o
50
19
  }), s.value.loadSnapshots());
51
20
  }
52
- function y(e) {
21
+ function _(e) {
53
22
  n.setContent(e.content, !1), r.clear(), i.reset();
54
23
  }
55
- async function b(e) {
56
- if (!f) {
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(), f) || (u.value = structuredClone(n.content.value), a?.pause(), l.value = e, n.setContent(e.content, !1));
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 x() {
33
+ async function y() {
65
34
  if (!(!l.value || !s.value)) try {
66
- if (await s.value.restoreSnapshot(l.value.id), f || (await s.value.loadSnapshots(), f)) return;
35
+ if (await s.value.restoreSnapshot(l.value.id), d || (await s.value.loadSnapshots(), d)) return;
67
36
  } finally {
68
- f || (l.value = null, u.value = null, a?.resume());
37
+ d || (l.value = null, u.value = null, a?.resume());
69
38
  }
70
39
  }
71
- function C() {
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 w() {
75
- f || s.value && await s.value.loadSnapshots();
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: p,
82
- snapshotHistorySnapshots: m,
83
- snapshotHistoryIsLoading: h,
84
- snapshotHistoryIsRestoring: _,
85
- initSnapshotHistory: v,
86
- handleRestore: y,
87
- handleSnapshotNavigate: b,
88
- confirmRestoreSnapshot: x,
89
- cancelPreview: C,
90
- loadSnapshotHistory: w
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 Me() {
96
- let e = c(null), t = S({
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 = S({
68
+ }), n = x({
100
69
  get: () => e.value === "scoring",
101
70
  set: (t) => e.value = t ? "scoring" : null
102
- }), r = S({
71
+ }), r = x({
103
72
  get: () => e.value === "design-reference",
104
73
  set: (t) => e.value = t ? "design-reference" : null
105
- }), i = S({
74
+ }), i = x({
106
75
  get: () => e.value === "comments",
107
76
  set: (t) => e.value = t ? "comments" : null
108
- }), a = c(!1), o = c(!1), s = c(void 0), l = c(!1), u = c(null), d = S(() => e.value !== null), f = S(() => {
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
- }), p = S(() => l.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
112
- function m() {
113
- l.value = !l.value;
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 h(t) {
116
- l.value = !1, e.value = e.value === t ? null : t;
84
+ function m(t) {
85
+ c.value = !1, e.value = e.value === t ? null : t;
117
86
  }
118
- return F(u, () => {
119
- l.value = !1;
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: l,
130
- aiMenuRef: u,
131
- rightPanelOpen: d,
132
- activeAiFeature: f,
133
- aiButtonActive: p,
134
- toggleAiMenu: m,
135
- handleAiFeatureSelect: h
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 Ne(e) {
141
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = c(!1), a = c(!1), { start: o } = P(() => {
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
- }, k, { immediate: !1 });
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 Pe(e) {
155
- let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = S(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = S(() => t.hasFeature("test_email")), o = S(() => !!r.state.template?.id), s = S(() => t.hasFeature("white_label")), l = S(() => t.config.value?.limits.max_templates ?? null), u = S(() => t.config.value?.template_count ?? 0), d = c(!1), f = c("idle"), p = c(""), { start: m } = P(() => {
156
- f.value = "idle";
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: l,
164
- templateCount: u,
165
- isSaveExporting: d,
166
- saveStatus: f,
167
- saveErrorMessage: p,
168
- startSaveStatusClear: m
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 Fe(e) {
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 d(() => {
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 Ie(e) {
209
- let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = c(!0), l = c(!1), u = c(null), d = !1, f = { value: null }, p = null, m = null, h = new De({
210
- ...t.auth,
211
- onError: t.onError
212
- }), g = xe({
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: t.onError
215
- }), _ = c(/* @__PURE__ */ new Map()), v = ge({
183
+ onError: n.onError
184
+ }), _ = w(/* @__PURE__ */ new Map()), v = z({
216
185
  authManager: h,
217
- defaultFontFamily: t.fonts?.defaultFont,
218
- templateDefaults: t.templateDefaults,
219
- onError: t.onError,
186
+ defaultFontFamily: n.fonts?.defaultFont,
187
+ templateDefaults: n.templateDefaults,
188
+ onError: n.onError,
220
189
  lockedBlocks: _
221
- }), y = ke({
190
+ }), y = Y({
222
191
  authManager: h,
223
- onError: t.onError
192
+ onError: n.onError
224
193
  });
225
- t.mcp?.enabled && we({
194
+ n.mcp?.enabled && W({
226
195
  editor: v,
227
196
  channel: y.channel,
228
- onOperation: t.mcp.onOperation
197
+ onOperation: n.mcp.onOperation
229
198
  });
230
199
  let b = null;
231
- t.collaboration?.enabled && (b = Ce({
200
+ n.collaboration?.enabled && (b = H({
232
201
  authManager: h,
233
202
  editor: v,
234
203
  channel: y.channel,
235
- onError: t.onError,
236
- onCollaboratorJoined: t.collaboration.onCollaboratorJoined,
237
- onCollaboratorLeft: t.collaboration.onCollaboratorLeft,
238
- onBlockLocked: t.collaboration.onBlockLocked,
239
- onBlockUnlocked: t.collaboration.onBlockUnlocked
240
- }), O(() => b.lockedBlocks.value, (e) => {
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 }), Ee(v, b));
243
- let x = S(() => !!t.collaboration?.enabled && g.hasFeature("collaboration")), C = N({
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: t.uiTheme,
215
+ uiTheme: n.uiTheme,
247
216
  theme: void 0,
248
- blockDefaults: t.blockDefaults,
217
+ blockDefaults: n.blockDefaults,
249
218
  customBlocks: [],
250
- mergeTags: t.mergeTags,
251
- displayConditions: t.displayConditions,
219
+ mergeTags: n.mergeTags,
220
+ displayConditions: n.displayConditions,
252
221
  onRequestMedia: null,
253
- accessibility: re(t),
222
+ editorType: n.editorType,
223
+ accessibility: ke(n),
254
224
  onSave: () => {
255
225
  f.value?.().catch((e) => {
256
- t.onError?.(e);
226
+ n.onError?.(e);
257
227
  });
258
228
  }
259
229
  },
260
- translations: n,
261
- fontsManager: r,
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: t.autoSaveDebounce ?? 5e3,
268
- enabled: () => t.autoSave !== !1 && g.hasFeature("auto_save")
237
+ debounce: n.autoSaveDebounce ?? 5e3,
238
+ enabled: () => n.autoSave !== !1 && g.hasFeature("auto_save")
269
239
  },
270
- themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
240
+ themeExtraStyles: () => ({ "--tpl-drop-text": `"${i.canvas.dropHere}"` }),
271
241
  keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() }
272
- }), w = Ne({
273
- isCollaborationEnabled: x,
242
+ }), T = He({
243
+ isCollaborationEnabled: S,
274
244
  getCollaboratorCount: () => b?.collaborators.value.length ?? 0,
275
245
  canUndo: C.history.canUndo
276
246
  });
277
- m = w;
278
- let T = je({
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: t.onError
254
+ onError: n.onError
285
255
  });
286
- p = T;
287
- let E = Me(), D = me(t.ai), k = Pe({
256
+ p = E;
257
+ let D = Ve(), O = ye(n.ai), k = Ue({
288
258
  planConfigInstance: g,
289
- aiConfig: D,
259
+ aiConfig: O,
290
260
  editor: v
291
- }), A = Fe({
292
- onRequestMedia: t.onRequestMedia,
293
- mediaLibraryOpen: E.mediaLibraryOpen,
294
- mediaLibraryAccept: E.mediaLibraryAccept
261
+ }), j = We({
262
+ onRequestMedia: n.onRequestMedia,
263
+ mediaLibraryOpen: D.mediaLibraryOpen,
264
+ mediaLibraryAccept: D.mediaLibraryAccept
295
265
  });
296
- ee({
266
+ re({
297
267
  onBlockMove: v.moveBlock,
298
268
  onBlockAdd: v.addBlock
299
269
  });
300
- let j = _e({
270
+ let M = G({
301
271
  authManager: h,
302
- getFontsConfig: () => t.fonts,
272
+ getFontsConfig: () => n.fonts,
303
273
  canUseCustomFonts: () => g.hasFeature("custom_fonts")
304
- }), P = Oe({
274
+ }), P = q({
305
275
  authManager: h,
306
276
  getTemplateId: () => v.state.template?.id ?? null,
307
277
  save: () => v.save(),
308
- exportHtml: (e) => j.exportHtml(e),
309
- onError: t.onError,
278
+ exportHtml: (e) => M.exportHtml(e),
279
+ onError: n.onError,
310
280
  isAuthReady: l,
311
- onBeforeTestEmail: t.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: t.onComment,
317
- onError: t.onError,
286
+ onComment: n.onComment,
287
+ onError: n.onError,
318
288
  isAuthReady: l,
319
- hasCommentingFeature: () => t.commenting !== !1 && g.hasFeature("commenting")
289
+ hasCommentingFeature: () => n.commenting !== !1 && g.hasFeature("commenting")
320
290
  });
321
- he({
291
+ _e({
322
292
  comments: F,
323
293
  channel: y.channel
324
294
  });
325
- let R = ye({
295
+ let I = ce({
326
296
  authManager: h,
327
- onError: t.onError
328
- }), H = c(!1), U = c(null), W = c(!1), G = pe({
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 K(e) {
333
- E.commentsOpen.value = !0, queueMicrotask(() => {
334
- o()?.filterByBlock(e);
302
+ function U(e) {
303
+ D.commentsOpen.value = !0, queueMicrotask(() => {
304
+ s()?.filterByBlock(e);
335
305
  });
336
306
  }
337
- a(V, A.handleRequestMedia), a(L, h), a(z, D), a(ne, F), a(te, R), a(B, G), a(I, {
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: D,
309
+ ai: O,
340
310
  comments: {
341
311
  getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
342
- openForBlock: K
312
+ openForBlock: U
343
313
  },
344
314
  savedModules: {
345
315
  openSaveDialog: (e) => {
346
- U.value = e ?? null, H.value = !0;
316
+ R.value = e ?? null, L.value = !0;
347
317
  },
348
318
  openBrowser: () => {
349
- W.value = !0;
319
+ te.value = !0;
350
320
  },
351
- moduleCount: S(() => R.modules.value.length)
321
+ moduleCount: x(() => I.modules.value.length)
352
322
  }
353
323
  });
354
- function q(e) {
324
+ function ae(e) {
355
325
  g.hasFeature("theme_customization") && (C.themeOverrides.value = e);
356
326
  }
357
- function ie(e) {
327
+ function K(e) {
358
328
  v.setUiTheme(e);
359
329
  }
360
- async function J() {
361
- s.value = !0, u.value = null;
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 Se({ authManager: h });
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 || M.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await g.fetchConfig(), d) return;
370
- r.setCustomFontsEnabled(g.hasFeature("custom_fonts")), t.customBlocks?.length && g.hasFeature("custom_blocks") && C.registerCustomBlocks(t.customBlocks), t.theme && g.hasFeature("theme_customization") && (C.themeOverrides.value = t.theme), t.modules !== !1 && g.hasFeature("saved_modules") && R.loadModules(), i("ready");
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 n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
374
- u.value = n, t.onError?.(n);
343
+ let t = e instanceof Error ? e : Error("Initialization failed", { cause: e });
344
+ u.value = t, n.onError?.(t);
375
345
  } finally {
376
- d || (s.value = !1);
346
+ d || (c.value = !1);
377
347
  }
378
348
  }
379
- function ae() {
380
- d = !0, r.cleanupFontLinks(), y.disconnect(), C.destroy(), t.onUnmount?.();
349
+ function le() {
350
+ d = !0, a.cleanupFontLinks(), y.disconnect(), C.destroy(), n.onUnmount?.();
381
351
  }
382
352
  return {
383
- isInitializing: s,
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: x,
361
+ isCollaborationEnabled: S,
392
362
  editor: v,
393
363
  core: C,
394
- aiConfig: D,
364
+ aiConfig: O,
395
365
  featureFlags: k,
396
- mediaLib: A,
397
- exporter: j,
366
+ mediaLib: j,
367
+ exporter: M,
398
368
  testEmail: P,
399
369
  commentsInstance: F,
400
- savedModulesHeadless: R,
401
- scoringInstance: G,
402
- panelState: E,
403
- snapshotPreview: T,
404
- collabWarning: w,
405
- showSaveModuleDialog: H,
406
- showModuleBrowserModal: W,
407
- saveModulePreSelectedBlockId: U,
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: J,
410
- destroy: ae,
411
- setThemeOverrides: q,
412
- setUiTheme: ie,
413
- openCommentsForBlock: K
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 Le(e, t) {
388
+ async function Ke(e, t) {
419
389
  let n = async (e) => {
420
- if (A(e)) {
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 Re(e) {
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 Te(i.config.value.websocket);
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 Le(n.content.value, o.registry), l()) throw Error("Component unmounted during save");
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 ze(e) {
481
- let t = c(!1), n = null, r = S(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = S(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = S(() => i.value.length > 0);
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 l() {
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: l
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 Be = ["aria-label"], Ve = { 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)]" }, He = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ue = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, We = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ge = { 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" }, Ke = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, qe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Je = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ye = /* @__PURE__ */ l({
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: a } = Q();
512
- return (t, o) => (r(), v(C, {
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 ? (r(), f("div", {
488
+ default: u(() => [e.open ? (s(), E("div", {
519
489
  key: 0,
520
490
  role: "dialog",
521
491
  "aria-modal": "true",
522
- "aria-label": y(a).saveGate.title,
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: o[2] ||= w((e) => n("cancel"), ["self"])
525
- }, [x("div", Ve, [
526
- x("header", He, [p(y(de), {
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
- }), x("h2", Ue, i(y(a).saveGate.title), 1)]),
531
- x("p", We, i(y(a).saveGate.body), 1),
532
- x("ul", Ge, [(r(!0), f(h, null, s(e.issues, (e) => (r(), f("li", {
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
- }, [x("span", Ke, i(e.message), 1), x("span", qe, i(e.ruleId), 1)]))), 128))]),
536
- x("footer", Je, [x("button", {
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: o[0] ||= (e) => n("cancel")
540
- }, i(y(a).saveGate.cancel), 1), x("button", {
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: o[1] ||= (e) => n("confirm")
544
- }, i(y(a).saveGate.confirm), 1)])
545
- ])], 8, Be)) : _("", !0)]),
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
- }), Xe = {
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
- }, Ze = { class: "tpl-header-left tpl:flex tpl:min-w-[200px] tpl:items-center tpl:gap-3" }, Qe = {
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
- }, $e = { class: "tpl-header-center tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, et = { class: "tpl-header-right tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, tt = ["data-tooltip"], nt = {
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
- }, rt = {
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
- }, it = ["aria-label", "aria-expanded"], at = {
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
- }, ot = ["aria-expanded"], st = {
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
- }, ct = ["disabled"], lt = ["disabled"], ut = /* @__PURE__ */ l({
545
+ }, _t = ["disabled"], vt = ["disabled"], yt = /* @__PURE__ */ e({
576
546
  __name: "CloudHeader",
577
547
  props: {
578
548
  editor: {},
579
- core: {},
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 n = E(() => import("./CollaboratorBar-DuPYW5iF.js")), a = E(() => import("./SnapshotHistory-BR3eV120.js")), s = E(() => import("./AiFeatureMenu-BLLKoOos.js")), { t: c, format: l } = Q();
594
- return (d, m) => (r(), f("header", Xe, [
595
- x("div", Ze, [e.featureFlags.templateLimit.value === null ? _("", !0) : (r(), f("span", Qe, i(y(l)(y(c).header.templatesUsed, {
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
- x("div", $e, [
600
- p(q, {
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
- p(J, {
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
- p(oe, {
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 ? (r(), v(y(n), {
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"])) : _("", !0),
617
- e.snapshotPreview.snapshotHistoryInstance.value ? (r(), v(y(a), {
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
- ])) : _("", !0)
601
+ ])) : d("", !0)
631
602
  ]),
632
- x("div", et, [
633
- e.featureFlags.saveStatus.value === "error" ? (r(), f("div", {
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(y(G), {
609
+ }, [D(p(R), {
639
610
  size: 12,
640
611
  "stroke-width": 2.5
641
- }), D(" " + i(y(c).header.saveFailed), 1)], 8, tt)) : e.featureFlags.saveStatus.value === "saved" ? (r(), f("div", nt, [p(y(W), {
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
- }), D(" " + i(y(c).header.saved), 1)])) : e.editor.state.isDirty ? (r(), f("div", rt, [m[4] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), D(" " + i(y(c).header.unsaved), 1)])) : _("", !0),
645
- e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (r(), f("button", {
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 ? `${y(c).comments.button} (${e.commentsInstance.unresolvedCount.value})` : y(c).comments.button,
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: t(y($)),
650
- style: o({
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: m[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
626
+ onClick: c[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
656
627
  }, [
657
- p(y(Z), {
628
+ D(p(ve), {
658
629
  size: 16,
659
630
  "stroke-width": 2
660
631
  }),
661
- D(" " + i(y(c).comments.button) + " ", 1),
662
- e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (r(), f("span", at, i(e.commentsInstance.unresolvedCount.value), 1)) : _("", !0)
663
- ], 14, it)) : _("", !0),
664
- e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (r(), f("div", {
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
- }, [x("button", {
639
+ }, [y("button", {
669
640
  "aria-expanded": e.panelState.aiMenuOpen.value,
670
- 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"]),
671
- onClick: m[1] ||= w((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
672
- }, [p(y(ue), {
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
- }), D(" " + i(y(c).aiChat.button), 1)], 10, ot), p(C, {
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 ? (r(), f("div", st, [p(y(s), {
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"])])) : _("", !0)]),
658
+ }, null, 8, ["active-feature", "onSelect"])])) : d("", !0)]),
688
659
  _: 1
689
- })], 512)) : _("", !0),
690
- e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (r(), f("button", {
660
+ })], 512)) : d("", !0),
661
+ e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (s(), E("button", {
691
662
  key: 5,
692
- class: t(y($)),
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: m[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
700
- }, [e.testEmail.isSending.value ? (r(), v(y(X), {
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
- })) : (r(), v(y(le), {
676
+ })) : (s(), v(p(fe), {
706
677
  key: 0,
707
678
  size: 16,
708
679
  "stroke-width": 2
709
- })), D(" " + i(y(c).testEmail.button), 1)], 10, ct)) : _("", !0),
710
- x("button", {
711
- class: t(y($)),
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: m[3] ||= (e) => d.$emit("save")
719
- }, [e.isSaving ? (r(), v(y(X), {
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
- })) : (r(), v(y(Ae), {
695
+ })) : (s(), v(p(we), {
725
696
  key: 0,
726
697
  size: 16,
727
698
  "stroke-width": 2
728
- })), D(" " + i(e.isSaving ? y(c).header.saving : y(c).header.save), 1)], 10, lt)
699
+ })), f(" " + _(e.isSaving ? p(i).header.saving : p(i).header.save), 1)], 10, vt)
729
700
  ])
730
701
  ]));
731
702
  }
732
- }), dt = /* @__PURE__ */ l({
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 i = E(() => import("./AiChatSidebar-B3SJIKG_.js")), a = E(() => import("./CommentsSidebar-B1pvJdqF.js")), o = E(() => import("./DesignReferenceSidebar-B8V_F2yF.js")), s = E(() => import("./TemplateScoringPanel-4GTNHej5.js")), l = E(() => import("./TestEmailModal--ue5w9fT.js")), u = E(() => import("./SaveModuleDialog-FZ9lxY7_.js")), d = E(() => import("./ModuleBrowserModal-DrUFMTDx.js")), m = E(async () => (await import("@templatical/media-library")).MediaLibraryModal), g = n;
756
- function b(e, t, n) {
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 x(e, t) {
760
- g("module-insert", e, t);
730
+ function y(e, t) {
731
+ h("module-insert", e, t);
761
732
  }
762
- let S = c(null);
763
- function C(e) {
764
- S.value?.filterByBlock(e);
733
+ let b = w(null);
734
+ function x(e) {
735
+ b.value?.filterByBlock(e);
765
736
  }
766
- return t({ filterCommentsByBlock: C }), (t, n) => (r(), f(h, null, [
767
- p(y(i), {
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) => b(t, e.core, e.editor),
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(y(s), {
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(y(o), {
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) => b(t, e.core, e.editor)
751
+ onApply: n[3] ||= (t) => _(t, e.core, e.editor)
781
752
  }, null, 8, ["visible", "has-existing-blocks"]),
782
- p(y(a), {
753
+ D(p(i), {
783
754
  ref_key: "commentsSidebar",
784
- ref: S,
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(y(l), {
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) => g("send-test-email", 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 ? (r(), v(y(u), {
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
- g("update:showSaveModuleDialog", !1), g("update:saveModulePreSelectedBlockId", null);
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"])) : _("", !0),
810
- e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (r(), v(y(d), {
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) => g("update:showModuleBrowserModal", !1),
814
- onInsert: x
815
- }, null, 8, ["visible"])) : _("", !0),
816
- p(y(m), {
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
- }), ft = {
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
- }, pt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, mt = { 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)]" }, ht = /* @__PURE__ */ l({
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 ? (r(), f("div", ft, [n[1] ||= T("<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), x("div", pt, [x("div", mt, [(r(), f(h, null, s(5, (e) => x("div", {
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] ||= T("<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)])])) : _("", !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
- }), gt = {
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
- }, _t = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, vt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, yt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, bt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xt = /* @__PURE__ */ l({
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: a } = Q();
854
- function o(e) {
855
- return "isUnauthorized" in e && e.isUnauthorized ? a.error.authFailed : "isNotFound" in e && e.isNotFound ? a.error.templateNotFound : a.error.defaultMessage;
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 s(e) {
828
+ function a(e) {
858
829
  return "isNotFound" in e && !!e.isNotFound;
859
830
  }
860
- return (t, c) => e.visible && e.error ? (r(), f("div", gt, [
861
- x("div", _t, [p(y(G), {
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
- x("div", vt, [x("h2", yt, i(y(a).error.title), 1), x("p", bt, i(o(e.error)), 1)]),
867
- s(e.error) ? _("", !0) : (r(), f("button", {
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: c[0] ||= (e) => n("retry")
871
- }, i(y(a).error.retry), 1))
872
- ])) : _("", !0);
841
+ onClick: o[0] ||= (e) => n("retry")
842
+ }, _(p(r).error.retry), 1))
843
+ ])) : d("", !0);
873
844
  }
874
- }), St = {
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
- }, Ct = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, wt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Tt = /* @__PURE__ */ l({
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: a } = Q();
883
- return (t, o) => e.visible ? (r(), f("div", St, [x("div", Ct, [p(y(Y), {
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
- }), x("span", null, i(y(a).snapshotPreview.message), 1)]), x("div", wt, [x("button", {
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: o[0] ||= (e) => n("cancel")
891
- }, i(y(a).snapshotPreview.cancel), 1), x("button", {
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: o[1] ||= (e) => n("confirm")
894
- }, i(y(a).snapshotPreview.restore), 1)])])) : _("", !0);
864
+ onClick: i[1] ||= (e) => n("confirm")
865
+ }, _(p(r).snapshotPreview.restore), 1)])])) : d("", !0);
895
866
  }
896
- }), Et = {
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
- }, Dt = /* @__PURE__ */ l({
877
+ }, It = /* @__PURE__ */ e({
907
878
  __name: "CollabUndoToast",
908
879
  props: { visible: { type: Boolean } },
909
880
  setup(e) {
910
- let { t } = H();
911
- return (n, a) => e.visible ? (r(), f("div", Et, i(y(t).history.collabWarning), 1)) : _("", !0);
881
+ let { t } = P();
882
+ return (n, r) => e.visible ? (s(), E("div", Ft, _(p(t).history.collabWarning), 1)) : d("", !0);
912
883
  }
913
- }), Ot = ["data-tpl-theme"], kt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, At = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, jt = ["aria-label"], Mt = /* @__PURE__ */ fe(/* @__PURE__ */ l({
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(s, { expose: l, emit: d }) {
923
- let h = s;
924
- a(R, h.cloudTranslations);
925
- let g = d, S = c(null), w = Ie({
926
- config: h.config,
927
- translations: h.translations,
928
- fontsManager: h.fontsManager,
929
- emit: g,
930
- getCommentsSidebar: () => S.value ? { filterByBlock: S.value.filterCommentsByBlock } : null
931
- }), { isInitializing: T, isAuthReady: E, initError: O, planConfigInstance: k, websocket: A, collaboration: M, isCollaborationEnabled: ee, editor: N, core: P, featureFlags: F, mediaLib: te, exporter: I, testEmail: L, commentsInstance: z, savedModulesHeadless: ne, panelState: B, snapshotPreview: V, collabWarning: H, showSaveModuleDialog: U, showModuleBrowserModal: W, saveModulePreSelectedBlockId: G, setThemeOverrides: re, setUiTheme: q } = w;
932
- async function J(e) {
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 L.sendTestEmail(e), B.testEmailModalOpen.value = !1;
915
+ await H.sendTestEmail(e), W.testEmailModalOpen.value = !1;
935
916
  } catch {}
936
917
  }
937
- function oe(e, t) {
918
+ function he(e, t) {
938
919
  for (let n = 0; n < e.content.length; n++) {
939
- let r = j(e.content[n]), i = t === void 0 ? void 0 : t + n;
940
- N.addBlock(r, void 0, void 0, i);
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
- W.value = !1;
923
+ J.value = !1;
943
924
  }
944
- let Y = Re({
945
- config: h.config,
946
- editor: N,
947
- websocket: A,
948
- planConfigInstance: k,
949
- snapshotPreview: V,
950
- core: P,
951
- exporter: I,
952
- featureFlags: F,
953
- isDestroyed: w.isDestroyed
954
- }), X = ze({
955
- issues: P.accessibilityLint ? P.accessibilityLint.issues : c([]),
956
- planConfig: k.config
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 Z() {
959
- await X.tryRunSave(() => Y.saveTemplate().catch((e) => h.config.onError?.(e)));
945
+ async function _e() {
946
+ await $.tryRunSave(() => Q.saveTemplate().catch((e) => l.config.onError?.(e)));
960
947
  }
961
- return w.onSaveHook.value = Z, e(() => {
962
- w.initialize();
963
- }), b(() => {
964
- w.destroy();
965
- }), l({
966
- getContent: () => N.content.value,
967
- setContent: (e) => N.setContent(e),
968
- setTheme: q,
969
- setThemeOverrides: re,
970
- create: Y.createTemplate,
971
- load: Y.loadTemplate,
972
- save: Y.saveTemplate,
973
- sendTestEmail: L.sendTestEmail
974
- }), (e, a) => (r(), f("div", {
975
- class: t(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": y(N).state.darkMode }]),
976
- "data-tpl-theme": y(P).resolvedTheme.value,
977
- style: o(y(P).themeStyles.value)
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
- p(C, {
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(() => [p(ht, { visible: y(T) || y(N).state.isLoading }, null, 8, ["visible"])]),
984
+ default: u(() => [D(wt, { visible: p(A) || p(z).state.isLoading }, null, 8, ["visible"])]),
988
985
  _: 1
989
986
  }),
990
- p(C, {
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(() => [p(xt, {
999
- error: y(O),
1000
- visible: !!y(O) && !y(T),
1001
- onRetry: y(w).initialize
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
- p(ut, {
1010
- editor: y(N),
1011
- core: y(P),
1012
- "feature-flags": y(F),
1013
- "panel-state": y(B),
1014
- "snapshot-preview": y(V),
1015
- "comments-instance": y(z),
1016
- "test-email": y(L),
1017
- websocket: y(A),
1018
- collaboration: y(M),
1019
- "is-collaboration-enabled": y(ee),
1020
- "is-saving": y(N).state.isSaving || y(F).isSaveExporting.value,
1021
- "is-save-disabled": y(N).state.isSaving || y(F).isSaveExporting.value || !y(N).state.isDirty,
1022
- onSave: Z
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
- "core",
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
- p(Ye, {
1038
- open: y(X).modalOpen.value,
1039
- issues: y(X).blockingIssues.value,
1040
- onCancel: y(X).cancel,
1041
- onConfirm: y(X).confirmAndSave
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
- p(Tt, {
1049
- visible: y(V).isPreviewingSnapshot.value,
1050
- onCancel: y(V).cancelPreview,
1051
- onConfirm: y(V).confirmRestoreSnapshot
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
- p(C, {
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(() => [p(Dt, { visible: y(H).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1062
+ default: u(() => [D(It, { visible: p(K).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1066
1063
  _: 1
1067
1064
  }),
1068
- n(p(ae, null, null, 512), [[m, !y(N).state.previewMode]]),
1069
- x("div", {
1070
- class: t(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [y(N).state.previewMode ? "tpl:left-0 tpl:right-0" : y(B).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", y(V).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
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
- "background-color": "var(--tpl-canvas-bg)"
1074
- }
1075
- }, [x("div", kt, [p(C, { name: "tpl-restore-btn" }, {
1076
- default: u(() => [y(P).conditionPreview.hasHiddenBlocks.value ? (r(), f("button", {
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: a[0] ||= (e) => y(P).conditionPreview.reset()
1086
- }, [p(y(ie), {
1085
+ onClick: r[0] ||= (e) => p(B).conditionPreview.reset()
1086
+ }, [D(p(Ce), {
1087
1087
  size: 13,
1088
1088
  "stroke-width": 2
1089
- }), D(" " + i(y(P).t.blockSettings.restoreHiddenBlocks), 1)])) : _("", !0)]),
1089
+ }), f(" " + _(p(B).t.blockSettings.restoreHiddenBlocks), 1)])) : d("", !0)]),
1090
1090
  _: 1
1091
- })]), x("main", At, [p(se, {
1092
- viewport: y(N).state.viewport,
1093
- content: y(N).content.value,
1094
- "selected-block-id": y(N).state.selectedBlockId,
1095
- "dark-mode": y(N).state.darkMode,
1096
- "preview-mode": y(N).state.previewMode,
1097
- "locked-blocks": y(M)?.lockedBlocks.value ?? void 0,
1098
- onSelectBlock: y(N).selectBlock,
1099
- onOpenAiChat: a[1] ||= (e) => y(B).aiChatOpen.value = !0,
1100
- onOpenDesignReference: a[2] ||= (e) => y(B).designReferenceOpen.value = !0
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
- ])])], 2),
1110
- s.config.branding !== !1 && !y(F).isWhiteLabeled.value ? (r(), v(ce, {
1111
+ ])])], 64))], 6),
1112
+ e.config.branding !== !1 && !p(V).isWhiteLabeled.value ? (s(), v(Ie, {
1111
1113
  key: 0,
1112
- "position-class": [y(N).state.previewMode ? "tpl:left-0 tpl:right-0" : y(B).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1113
- }, null, 8, ["position-class"])) : _("", !0),
1114
- x("div", {
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": y(P).t.landmarks.reorderAnnouncements
1120
- }, i(y(P).keyboardReorder.announcement.value), 9, jt),
1121
- n(p(K, {
1122
- "selected-block": y(N).selectedBlock.value,
1123
- settings: y(N).content.value.settings,
1124
- "shifted-left": y(B).rightPanelOpen.value,
1125
- onUpdateBlock: a[3] ||= (e) => y(N).updateBlock(y(N).selectedBlock.value.id, e),
1126
- onDeleteBlock: a[4] ||= (e) => y(P).blockActions.deleteBlock(y(N).selectedBlock.value.id),
1127
- onDuplicateBlock: a[5] ||= (e) => y(P).blockActions.duplicateBlock(y(N).selectedBlock.value),
1128
- onUpdateSettings: y(N).updateSettings
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
- ]), [[m, !y(N).state.previewMode]]),
1135
- !y(T) && y(E) ? (r(), v(dt, {
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: S,
1139
- config: h.config,
1140
- editor: y(N),
1141
- core: y(P),
1142
- "panel-state": y(B),
1143
- "plan-config-instance": y(k),
1144
- "test-email": y(L),
1145
- "media-lib": y(te),
1146
- "saved-modules-headless": y(ne),
1147
- "show-save-module-dialog": y(U),
1148
- "save-module-pre-selected-block-id": y(G),
1149
- "show-module-browser-modal": y(W),
1150
- "onUpdate:showSaveModuleDialog": a[6] ||= (e) => U.value = e,
1151
- "onUpdate:saveModulePreSelectedBlockId": a[7] ||= (e) => G.value = e,
1152
- "onUpdate:showModuleBrowserModal": a[8] ||= (e) => W.value = e,
1153
- onSendTestEmail: J,
1154
- onModuleInsert: oe
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
- ])) : _("", !0)
1168
- ], 14, Ot));
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-b332971f"]]);
1179
+ }), [["__scopeId", "data-v-6985a9ad"]]);
1171
1180
  //#endregion
1172
- export { Mt as default };
1181
+ export { Vt as default };
1182
+
1183
+ //# sourceMappingURL=CloudEditor-Btyr0b0_.js.map