@aswin.dev/editor 0.7.0 → 0.7.1

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 (169) hide show
  1. package/README.md +3 -3
  2. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
  3. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
  4. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
  5. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
  12. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
  13. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
  16. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
  17. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
  18. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
  19. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
  20. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
  21. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
  22. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
  23. package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
  24. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  25. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
  26. package/dist/bundle-stats.json +7 -7
  27. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  28. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  29. package/dist/chevron-right-BqCptpdp.js +10 -0
  30. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  31. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  32. package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
  33. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  34. package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
  35. package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
  36. package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
  37. package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
  38. package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
  39. package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
  40. package/dist/dist-C04s_fLA.js +563 -0
  41. package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
  42. package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
  43. package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
  44. package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
  45. package/dist/dist-CivF9P8b.js +382 -0
  46. package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
  47. package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
  48. package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
  49. package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
  50. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  51. package/dist/index.d.ts +88 -11
  52. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  53. package/dist/keys-CvX8D-8C.js +10 -0
  54. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  55. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  56. package/dist/pencil-BZJPNYWR.js +10 -0
  57. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  58. package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
  59. package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
  60. package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
  61. package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/styleConstants-34eUKPOZ.js +55 -0
  64. package/dist/styles-B4tjX5SP.js +5224 -0
  65. package/dist/templatical-editor.js +189 -126
  66. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
  67. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
  68. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
  69. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
  70. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
  71. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  72. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
  73. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  74. package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
  75. package/package.json +10 -10
  76. package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
  77. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  78. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  79. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  80. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  81. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
  82. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
  83. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
  84. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  85. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
  86. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
  87. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  88. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  89. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
  90. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  91. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  92. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  93. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  94. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  95. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  96. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  97. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  98. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  99. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
  100. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
  101. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
  102. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
  103. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
  104. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
  105. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
  106. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  107. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
  108. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  109. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  110. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  111. package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
  112. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
  113. package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
  114. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  115. package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
  116. package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
  117. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  118. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  119. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
  120. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
  121. package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
  122. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  123. package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
  124. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
  125. package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
  126. package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
  127. package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
  128. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  129. package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
  130. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  131. package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
  132. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  133. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
  134. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  135. package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
  136. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  137. package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
  138. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
  139. package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
  140. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  141. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
  142. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
  144. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  145. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  146. package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
  147. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  148. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  149. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  150. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  151. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
  153. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
  154. package/dist/cdn/editor.css +0 -2
  155. package/dist/cdn/editor.js +0 -250
  156. package/dist/cdn/editor.js.map +0 -1
  157. package/dist/dist-B1IR0bpH.js +0 -326
  158. package/dist/dist-DJmnUmW9.js +0 -362
  159. package/dist/keys-ciNfSSGj.js +0 -10
  160. package/dist/styleConstants-fWzlIIwN.js +0 -55
  161. package/dist/styles-DEXEkBvg.js +0 -3176
  162. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
  163. /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
  164. /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
  165. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
  166. /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
  167. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
  168. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
  169. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
@@ -1,219 +1,270 @@
1
- import { A as e, Dt as t, H as n, M as r, Mt as i, Ot as a, Q as o, S as s, V as c, _ as l, b as u, c as d, g as f, h as p, it as m, j as h, m as g, n as _, t as ee, w as v, y } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { r as b } from "./timeouts-BSGxjuUF.js";
3
- import { L as x, t as S, x as C } from "./useEditorCore-C6ost42Q.js";
4
- import { a as w, c as T, i as E, l as te, n as ne, o as re, r as D, s as O, t as k } from "./styles-DEXEkBvg.js";
5
- import { t as A } from "./_plugin-vue_export-helper-B0hnzhyu.js";
1
+ import { At as e, C as t, Ft as n, M as r, N as i, P as a, T as o, U as s, W as c, _ as l, b as u, et as d, f, g as p, h as m, j as ee, jt as h, l as g, m as _, n as v, st as y, t as te, v as b, x } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { r as S } from "./timeouts-BSGxjuUF.js";
3
+ import { f as ne, r as re } from "./dist-C04s_fLA.js";
4
+ import { L as C, S as w, t as ie, z as ae } from "./useEditorCore-wslttMH-.js";
5
+ import { w as oe } from "./keys-CvX8D-8C.js";
6
+ import { a as se, c as ce, d as le, f as ue, h as de, i as fe, l as pe, m as me, n as he, o as T, p as E, r as D, s as O, t as k, u as A } from "./styles-B4tjX5SP.js";
7
+ import { t as j } from "./_plugin-vue_export-helper-BVAJ4lgT.js";
6
8
  //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
7
- var j = ["data-tpl-theme"], M = {
9
+ var M = ["data-tpl-theme"], N = {
8
10
  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 tpl:shadow-[var(--tpl-shadow-md)] tpl:border-b tpl:border-[var(--tpl-border)]",
9
11
  style: {
10
12
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
11
13
  "backdrop-filter": "blur(12px)",
12
14
  "-webkit-backdrop-filter": "blur(12px)"
13
15
  }
14
- }, N = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, P = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, F = { class: "tpl:flex tpl:justify-center tpl:p-8" }, I = ["aria-label"], L = /* @__PURE__ */ A(/* @__PURE__ */ s({
16
+ }, P = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, F = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, I = { class: "tpl:flex tpl:justify-center tpl:p-8" }, L = ["aria-label"], R = /* @__PURE__ */ j(/* @__PURE__ */ t({
15
17
  __name: "Editor",
16
18
  props: {
17
19
  config: {},
18
20
  translations: {},
19
21
  fontsManager: {}
20
22
  },
21
- setup(o, { expose: s }) {
22
- let _ = o, v = x({
23
- content: _.config.content,
24
- templateDefaults: _.config.templateDefaults
25
- }), b = S({
26
- editor: v,
23
+ setup(t, { expose: o }) {
24
+ let v = d(null), S = t, w = ae({
25
+ content: S.config.content,
26
+ templateDefaults: S.config.templateDefaults
27
+ }), T = ie({
28
+ editor: w,
27
29
  config: {
28
- uiTheme: _.config.uiTheme,
29
- theme: _.config.theme,
30
- blockDefaults: _.config.blockDefaults,
31
- customBlocks: _.config.customBlocks,
32
- mergeTags: _.config.mergeTags,
33
- displayConditions: _.config.displayConditions,
34
- onRequestMedia: _.config.onRequestMedia,
35
- accessibility: T(_.config),
36
- onSave: _.config.onSave ? () => _.config.onSave(JSON.parse(JSON.stringify(v.state.content))) : void 0
30
+ uiTheme: S.config.uiTheme,
31
+ theme: S.config.theme,
32
+ blockDefaults: S.config.blockDefaults,
33
+ customBlocks: S.config.customBlocks,
34
+ mergeTags: S.config.mergeTags,
35
+ displayConditions: S.config.displayConditions,
36
+ onRequestMedia: S.config.onRequestMedia,
37
+ editorType: S.config.editorType,
38
+ accessibility: me(S.config),
39
+ onSave: S.config.onSave ? () => S.config.onSave(JSON.parse(JSON.stringify(w.state.content))) : void 0
37
40
  },
38
- translations: _.translations,
39
- fontsManager: _.fontsManager,
40
- autoSaveOptions: _.config.onChange ? { onChange: () => _.config.onChange(JSON.parse(JSON.stringify(v.state.content))) } : null
41
+ translations: S.translations,
42
+ fontsManager: S.fontsManager,
43
+ autoSaveOptions: S.config.onChange ? { onChange: () => S.config.onChange(JSON.parse(JSON.stringify(w.state.content))) } : null
41
44
  });
42
- return e(async () => {
43
- await _.fontsManager.loadCustomFonts();
44
- }), h(() => {
45
- _.fontsManager.cleanupFontLinks(), b.destroy();
46
- }), s({
47
- getContent: () => v.content.value,
48
- setContent: (e) => v.setContent(e),
49
- setTheme: (e) => v.setUiTheme(e),
50
- renderCustomBlock: b.registry.renderCustomBlock
51
- }), (e, s) => (r(), l("div", {
52
- class: t(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": m(v).state.darkMode }]),
53
- "data-tpl-theme": m(b).resolvedTheme.value,
54
- style: a(m(b).themeStyles.value)
45
+ ee(async () => {
46
+ if (await S.fontsManager.loadCustomFonts(), C(S.config.editorType) === "popup" && !w.content.value.settings.popup) {
47
+ let e = ne();
48
+ w.updateSettings({
49
+ popup: e,
50
+ width: re[e.design.sizePreset]
51
+ });
52
+ }
53
+ }), r(() => {
54
+ S.fontsManager.cleanupFontLinks(), T.destroy();
55
+ });
56
+ let j = d("blocks");
57
+ a(oe, j);
58
+ let R = _(() => C(S.config.editorType) === "popup"), z = _(() => R.value && j.value === "displayRules"), B = _(() => R.value && j.value === "schedule"), V = _(() => j.value === "design"), H = _(() => R.value && (z.value || B.value || V.value)), U = _(() => {
59
+ if (w.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
60
+ if (!R.value) return ["tpl:left-12", "tpl:right-[320px]"];
61
+ let e;
62
+ e = j.value === "blocks" ? "tpl:left-[272px]" : V.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
63
+ let t = H.value ? "tpl:right-0" : "tpl:right-[320px]";
64
+ return [e, t];
65
+ }), W = _(() => z.value || B.value);
66
+ return o({
67
+ getContent: () => w.content.value,
68
+ setContent: (e) => w.setContent(e),
69
+ setTheme: (e) => w.setUiTheme(e),
70
+ renderCustomBlock: T.registry.renderCustomBlock,
71
+ startTour: (e) => v.value?.start(e),
72
+ dismissTour: () => v.value?.dismiss(),
73
+ resetTourDismissed: () => fe(S.config.tour),
74
+ isTourDismissed: () => S.config.tour ? se(S.config.tour) : !0
75
+ }), (r, a) => (i(), b("div", {
76
+ class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": y(w).state.darkMode }]),
77
+ "data-tpl-theme": y(T).resolvedTheme.value,
78
+ style: h(y(T).themeStyles.value)
55
79
  }, [
56
- g("header", M, [
57
- s[5] ||= g("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
58
- g("div", N, [
59
- u(E, {
60
- viewport: m(v).state.viewport,
61
- onChange: m(v).setViewport
80
+ m("header", N, [
81
+ a[5] ||= m("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
82
+ m("div", P, [
83
+ x(A, {
84
+ viewport: y(w).state.viewport,
85
+ onChange: y(w).setViewport
62
86
  }, null, 8, ["viewport", "onChange"]),
63
- u(ne, {
64
- "dark-mode": m(v).state.darkMode,
65
- onChange: m(v).setDarkMode
87
+ x(ce, {
88
+ "dark-mode": y(w).state.darkMode,
89
+ onChange: y(w).setDarkMode
66
90
  }, null, 8, ["dark-mode", "onChange"]),
67
- u(D, {
68
- "preview-mode": m(v).state.previewMode,
69
- onChange: m(v).setPreviewMode
91
+ x(pe, {
92
+ "preview-mode": y(w).state.previewMode,
93
+ onChange: y(w).setPreviewMode
70
94
  }, null, 8, ["preview-mode", "onChange"])
71
95
  ]),
72
- s[6] ||= g("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
96
+ a[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
73
97
  ]),
74
- n(u(re, null, null, 512), [[d, !m(v).state.previewMode]]),
75
- g("div", {
76
- class: t(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [m(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
77
- style: { transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)" }
78
- }, [g("div", P, [u(ee, { name: "tpl-restore-btn" }, {
79
- default: c(() => [m(b).conditionPreview.hasHiddenBlocks.value ? (r(), l("button", {
98
+ c(x(ue, null, null, 512), [[g, !y(w).state.previewMode]]),
99
+ m("div", {
100
+ class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...U.value, "tpl:top-14"]]),
101
+ style: h({
102
+ transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
103
+ backgroundColor: W.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
104
+ })
105
+ }, [R.value && j.value === "displayRules" ? (i(), p(he, { key: 0 })) : R.value && j.value === "schedule" ? (i(), p(k, {
106
+ key: 1,
107
+ layout: "standalone"
108
+ })) : (i(), b(f, { key: 2 }, [m("div", F, [x(te, { name: "tpl-restore-btn" }, {
109
+ default: s(() => [y(T).conditionPreview.hasHiddenBlocks.value ? (i(), b("button", {
80
110
  key: 0,
81
111
  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 tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)] tpl:border-[var(--tpl-warning)]",
82
112
  style: { "backdrop-filter": "blur(8px)" },
83
- onClick: s[0] ||= (e) => m(b).conditionPreview.reset()
84
- }, [u(m(te), {
113
+ onClick: a[0] ||= (e) => y(T).conditionPreview.reset()
114
+ }, [x(y(de), {
85
115
  size: 13,
86
116
  "stroke-width": 2
87
- }), y(" " + i(m(b).t.blockSettings.restoreHiddenBlocks), 1)])) : f("", !0)]),
117
+ }), u(" " + n(y(T).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
88
118
  _: 1
89
- })]), g("div", F, [u(O, {
90
- viewport: m(v).state.viewport,
91
- content: m(v).content.value,
92
- "selected-block-id": m(v).state.selectedBlockId,
93
- "dark-mode": m(v).state.darkMode,
94
- "preview-mode": m(v).state.previewMode,
95
- onSelectBlock: m(v).selectBlock
119
+ })]), m("div", I, [x(E, {
120
+ viewport: y(w).state.viewport,
121
+ content: y(w).content.value,
122
+ "selected-block-id": y(w).state.selectedBlockId,
123
+ "dark-mode": y(w).state.darkMode,
124
+ "preview-mode": y(w).state.previewMode,
125
+ "multi-page-canvas": t.config.multiPageCanvas ?? !1,
126
+ onSelectBlock: y(w).selectBlock
96
127
  }, null, 8, [
97
128
  "viewport",
98
129
  "content",
99
130
  "selected-block-id",
100
131
  "dark-mode",
101
132
  "preview-mode",
133
+ "multi-page-canvas",
102
134
  "onSelectBlock"
103
- ])])], 2),
104
- o.config.branding === !1 ? f("", !0) : (r(), p(k, {
135
+ ])])], 64))], 6),
136
+ t.config.branding === !1 ? l("", !0) : (i(), p(O, {
105
137
  key: 0,
106
- "position-class": [m(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
138
+ "position-class": U.value
107
139
  }, null, 8, ["position-class"])),
108
- g("div", {
140
+ m("div", {
109
141
  class: "tpl-sr-only",
110
142
  role: "status",
111
143
  "aria-live": "polite",
112
144
  "aria-atomic": "true",
113
- "aria-label": m(b).t.landmarks.reorderAnnouncements
114
- }, i(m(b).keyboardReorder.announcement.value), 9, I),
115
- n(u(w, {
116
- "selected-block": m(v).selectedBlock.value,
117
- settings: m(v).content.value.settings,
118
- onUpdateBlock: s[1] ||= (e) => m(v).updateBlock(m(v).state.selectedBlockId, e),
119
- onDeleteBlock: s[2] ||= () => {
120
- m(v).state.selectedBlockId && m(b).blockActions.deleteBlock(m(v).state.selectedBlockId);
145
+ "aria-label": y(T).t.landmarks.reorderAnnouncements
146
+ }, n(y(T).keyboardReorder.announcement.value), 9, L),
147
+ c(x(le, {
148
+ "selected-block": y(w).selectedBlock.value,
149
+ settings: y(w).content.value.settings,
150
+ onUpdateBlock: a[1] ||= (e) => y(w).updateBlock(y(w).state.selectedBlockId, e),
151
+ onDeleteBlock: a[2] ||= () => {
152
+ y(w).state.selectedBlockId && y(T).blockActions.deleteBlock(y(w).state.selectedBlockId);
121
153
  },
122
- onDuplicateBlock: s[3] ||= () => {
123
- m(v).selectedBlock.value && m(b).blockActions.duplicateBlock(m(v).selectedBlock.value);
154
+ onDuplicateBlock: a[3] ||= () => {
155
+ y(w).selectedBlock.value && y(T).blockActions.duplicateBlock(y(w).selectedBlock.value);
124
156
  },
125
- onUpdateSettings: s[4] ||= (e) => m(v).updateSettings(e)
126
- }, null, 8, ["selected-block", "settings"]), [[d, !m(v).state.previewMode]])
127
- ], 14, j));
157
+ onUpdateSettings: a[4] ||= (e) => y(w).updateSettings(e)
158
+ }, null, 8, ["selected-block", "settings"]), [[g, !y(w).state.previewMode && !H.value]]),
159
+ t.config.tour ? (i(), p(D, {
160
+ key: 1,
161
+ ref_key: "editorTourRef",
162
+ ref: v,
163
+ "tour-config": t.config.tour,
164
+ "dark-mode": y(w).state.darkMode
165
+ }, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
166
+ ], 14, M));
128
167
  }
129
- }), [["__scopeId", "data-v-9ffdcb5e"]]), R = /* @__PURE__ */ Object.assign({
130
- "./locales/de.ts": () => import("./de-Brqvgr43.js"),
131
- "./locales/en.ts": () => import("./en-WDVp87TE.js")
132
- }), z = /* @__PURE__ */ Object.assign({
133
- "./locales/cloud/de.ts": () => import("./de-DCaaCE5s.js"),
134
- "./locales/cloud/en.ts": () => import("./en-DXCyK4-X.js")
168
+ }), [["__scopeId", "data-v-8467ac4c"]]), z = /* @__PURE__ */ Object.assign({
169
+ "./locales/de.ts": () => import("./de-DWcgp-7T.js"),
170
+ "./locales/en.ts": () => import("./en-Cxd4fhNm.js")
171
+ }), B = /* @__PURE__ */ Object.assign({
172
+ "./locales/cloud/de.ts": () => import("./de-GOtR9DwW.js"),
173
+ "./locales/cloud/en.ts": () => import("./en-dFFQVzNn.js")
135
174
  });
136
- function B(e) {
175
+ function V(e) {
137
176
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
138
177
  }
139
- var V = B(R), H = B(z);
140
- function U(e) {
178
+ var H = V(z), U = V(B);
179
+ function W(e) {
141
180
  return e.split("-")[0].toLowerCase();
142
181
  }
143
- function W(e, t) {
144
- let n = U(e);
182
+ function G(e, t) {
183
+ let n = W(e);
145
184
  return t.includes(n) ? n : "en";
146
185
  }
147
- async function G(e) {
148
- let t = R[`./locales/${W(e, V)}.ts`];
186
+ async function K(e) {
187
+ let t = z[`./locales/${G(e, H)}.ts`];
149
188
  return (await t()).default;
150
189
  }
151
- async function K(e) {
152
- let t = z[`./locales/cloud/${W(e, H)}.ts`];
190
+ async function ge(e) {
191
+ let t = B[`./locales/cloud/${G(e, U)}.ts`];
153
192
  return (await t()).default;
154
193
  }
155
194
  //#endregion
156
195
  //#region src/utils/toMjml.ts
157
- async function q(e) {
196
+ async function _e(e) {
158
197
  let t;
159
198
  try {
160
- t = await import("@templatical/renderer");
199
+ t = await import("@aswin.dev/renderer");
161
200
  } catch {
162
- throw Error("[Templatical] toMjml() requires the @templatical/renderer package. Please install it.");
201
+ throw Error("[Templatical] toMjml() requires the @aswin.dev/renderer package. Please install it.");
163
202
  }
164
203
  return t.renderToMjml(e.getContent(), { renderCustomBlock: e.renderCustomBlock });
165
204
  }
166
205
  //#endregion
167
206
  //#region src/index.ts
168
- var J = null, Y = o(null);
169
- async function ie(e) {
207
+ var q = null, J = d(null);
208
+ async function Y(e) {
170
209
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
171
210
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
172
- let n = await G(e.locale ?? "en"), r = C(e.fonts);
173
- J && Q(), J = _({ setup() {
174
- return () => v(L, {
211
+ let n = await K(e.locale ?? "en"), r = w(e.fonts);
212
+ q && Q(), q = v({ setup() {
213
+ return () => o(R, {
175
214
  config: e,
176
215
  translations: n,
177
216
  fontsManager: r,
178
- ref: Y
217
+ ref: J
179
218
  });
180
- } }), J.mount(t);
219
+ } }), q.mount(t);
181
220
  let i = {
182
221
  getContent() {
183
- return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(e.content));
222
+ return J.value ? JSON.parse(JSON.stringify(J.value.getContent())) : JSON.parse(JSON.stringify(e.content));
184
223
  },
185
224
  setContent(t) {
186
- Y.value && Y.value.setContent(t), e.content = t;
225
+ J.value && J.value.setContent(t), e.content = t;
187
226
  },
188
227
  setTheme(e) {
189
- Y.value && Y.value.setTheme(e);
228
+ J.value && J.value.setTheme(e);
190
229
  },
191
230
  unmount: Q,
231
+ startTour(e) {
232
+ J.value?.startTour?.(e);
233
+ },
234
+ dismissTour() {
235
+ J.value?.dismissTour?.();
236
+ },
237
+ resetTourDismissed() {
238
+ J.value?.resetTourDismissed?.();
239
+ },
240
+ isTourDismissed() {
241
+ return J.value?.isTourDismissed?.() ?? !0;
242
+ },
192
243
  renderCustomBlock(e) {
193
- return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
244
+ return J.value ? J.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
194
245
  },
195
- toMjml: () => q(i)
246
+ toMjml: () => _e(i)
196
247
  };
197
248
  return i;
198
249
  }
199
- var X = null, Z = o(null);
200
- async function ae(e) {
250
+ var X = null, Z = d(null);
251
+ async function ve(e) {
201
252
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
202
253
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
203
- let { default: n } = await import("./CloudEditor-BCz1ZTYC.js"), [r, i] = await Promise.all([G(e.locale ?? "en"), K(e.locale ?? "en")]), a = C(e.fonts);
204
- return X && $(), await new Promise((o, s) => {
205
- let c = setTimeout(() => {
206
- s(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
207
- }, b);
208
- X = _({ setup() {
209
- return () => v(n, {
254
+ let { default: n } = await import("./CloudEditor-CFldoCOb.js"), [r, i] = await Promise.all([K(e.locale ?? "en"), ge(e.locale ?? "en")]), a = w(e.fonts);
255
+ return X && $(), await new Promise((s, c) => {
256
+ let l = setTimeout(() => {
257
+ c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
258
+ }, S);
259
+ X = v({ setup() {
260
+ return () => o(n, {
210
261
  config: e,
211
262
  translations: r,
212
263
  cloudTranslations: i,
213
264
  fontsManager: a,
214
265
  ref: Z,
215
266
  onReady: () => {
216
- clearTimeout(c), o();
267
+ clearTimeout(l), s();
217
268
  }
218
269
  });
219
270
  } }), X.mount(t);
@@ -228,6 +279,18 @@ async function ae(e) {
228
279
  Z.value && Z.value.setTheme(e);
229
280
  },
230
281
  unmount: $,
282
+ startTour(e) {
283
+ Z.value?.startTour?.(e);
284
+ },
285
+ dismissTour() {
286
+ Z.value?.dismissTour?.();
287
+ },
288
+ resetTourDismissed() {
289
+ Z.value?.resetTourDismissed?.();
290
+ },
291
+ isTourDismissed() {
292
+ return Z.value?.isTourDismissed?.() ?? !0;
293
+ },
231
294
  create(e) {
232
295
  return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
233
296
  },
@@ -240,10 +303,10 @@ async function ae(e) {
240
303
  };
241
304
  }
242
305
  function Q() {
243
- J && (J.unmount(), J = null, Y.value = null);
306
+ q && (q.unmount(), q = null, J.value = null);
244
307
  }
245
308
  function $() {
246
309
  X && (X.unmount(), X = null, Z.value = null);
247
310
  }
248
311
  //#endregion
249
- export { ie as init, ae as initCloud, Q as unmount, C as useFonts };
312
+ export { T as DEFAULT_EDITOR_TOUR_STORAGE_KEY, Y as init, ve as initCloud, Q as unmount, w as useFonts };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-C3pa2siy.js";
1
+ import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
2
  var t = e("text-align-center", [
3
3
  ["path", {
4
4
  d: "M21 5H3",
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-C3pa2siy.js";
1
+ import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
2
  var t = e("trash-2", [
3
3
  ["path", {
4
4
  d: "M10 11v6",
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-C3pa2siy.js";
1
+ import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
2
  var t = e("triangle-alert", [
3
3
  ["path", {
4
4
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
@@ -1,5 +1,5 @@
1
- import { E as e, q as t } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import { l as n } from "./keys-ciNfSSGj.js";
1
+ import { D as e, Y as t } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { l as n } from "./keys-CvX8D-8C.js";
3
3
  //#region src/composables/useCloudI18n.ts
4
4
  function r(e, t) {
5
5
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);