@aswin.dev/editor 0.7.1 → 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 (144) hide show
  1. package/LICENSE +56 -0
  2. package/dist/{AccessibilityPanel-COL6Wm7p.js → AccessibilityPanel-EmQ19wiS.js} +1 -1
  3. package/dist/{AiChatSidebar-DWGPVtvC.js → AiChatSidebar-DeB0w_32.js} +38 -52
  4. package/dist/{AiFeatureMenu-duUFSfDf.js → AiFeatureMenu-DoLD5Cde.js} +5 -5
  5. package/dist/{BlockA11yBadge-Qs6HtXid.js → BlockA11yBadge-DkNbDvJA.js} +1 -1
  6. package/dist/{CloudEditor-CFldoCOb.js → CloudEditor-zo9PjjvY.js} +255 -248
  7. package/dist/{CollaboratorBar-Bw-lbt61.js → CollaboratorBar-BsXMY-8e.js} +3 -3
  8. package/dist/{CommentsSidebar-BaD5F53-.js → CommentsSidebar-DIWIa4rS.js} +6 -6
  9. package/dist/{CountdownToolbar-Dg4F8MTk.js → CountdownToolbar-BuS8p5ju.js} +2 -2
  10. package/dist/{DesignReferenceSidebar-BSH7uNP_.js → DesignReferenceSidebar-RDlnhL-6.js} +5 -5
  11. package/dist/{LoadingTrack-Ba2pfF57.js → LoadingTrack-BJ59h9ok.js} +1 -1
  12. package/dist/{ModuleBrowserModal-6phxZSKI.js → ModuleBrowserModal-b7HbpByz.js} +7 -7
  13. package/dist/{ModulePreviewCanvas-BW8L3eQX.js → ModulePreviewCanvas-D__YlOLS.js} +1 -1
  14. package/dist/{NumberWithSuffix-BpUzQOJt.js → NumberWithSuffix-Ca3vNY84.js} +1 -1
  15. package/dist/{ParagraphEditor-DNSzAB-I.js → ParagraphEditor-B1aYPO-6.js} +18 -18
  16. package/dist/{RichTextEditorContent-CrqPQdnk.js → RichTextEditorContent-BmEVMrkJ.js} +1 -1
  17. package/dist/{SaveModuleDialog-zMQTpez7.js → SaveModuleDialog-ClovqI6h.js} +3 -3
  18. package/dist/{SnapshotHistory-Do-A5rYU.js → SnapshotHistory-DoqtH0cw.js} +3 -3
  19. package/dist/{TemplateScoringPanel-CS7o62zS.js → TemplateScoringPanel-DQv2ZAiL.js} +7 -7
  20. package/dist/{TestEmailModal-DGj_9V1u.js → TestEmailModal-iIeYJYsj.js} +3 -3
  21. package/dist/{TitleEditor-C7IDnAoS.js → TitleEditor-CTDIwRF_.js} +7 -7
  22. package/dist/{TplModal-BAsVzcTb.js → TplModal-CBq1J1pG.js} +1 -1
  23. package/dist/{blockTypeIcons-C6LDKvmd.js → blockTypeIcons-QkC6f5UE.js} +1 -1
  24. package/dist/bundle-stats.json +7 -7
  25. package/dist/cdn/chunks/AccessibilityPanel-BeU8nz7A.js +97 -0
  26. package/dist/cdn/chunks/AccessibilityPanel-BeU8nz7A.js.map +1 -0
  27. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js +59 -0
  28. package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
  29. package/dist/cdn/chunks/BlockA11yBadge-C4g77gF0.js +33 -0
  30. package/dist/cdn/chunks/BlockA11yBadge-C4g77gF0.js.map +1 -0
  31. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js +1183 -0
  32. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
  33. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js +51 -0
  34. package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
  35. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
  36. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
  38. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
  39. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js +195 -0
  40. package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
  41. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
  42. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
  43. package/dist/cdn/chunks/NumberWithSuffix-Ty1bp9vB.js +423 -0
  44. package/dist/cdn/chunks/NumberWithSuffix-Ty1bp9vB.js.map +1 -0
  45. package/dist/cdn/chunks/ParagraphEditor-BA1WbHI7.js +544 -0
  46. package/dist/cdn/chunks/ParagraphEditor-BA1WbHI7.js.map +1 -0
  47. package/dist/cdn/chunks/RichTextEditorContent-BtWCA_Oc.js +106 -0
  48. package/dist/cdn/chunks/RichTextEditorContent-BtWCA_Oc.js.map +1 -0
  49. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js +119 -0
  50. package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
  51. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js +171 -0
  52. package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
  53. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
  54. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
  55. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  56. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  57. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  58. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  59. package/dist/cdn/chunks/de-_tooy3Q8.js +771 -0
  60. package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
  61. package/dist/cdn/chunks/draggable-C-1_gch3.js +11572 -0
  62. package/dist/cdn/chunks/draggable-C-1_gch3.js.map +1 -0
  63. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  64. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  65. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  66. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  67. package/dist/cdn/chunks/en-CNqLoIm9.js +771 -0
  68. package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
  69. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  70. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  71. package/dist/cdn/chunks/extensions-BVKQw_sp.js +598 -0
  72. package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
  73. package/dist/cdn/chunks/features-DIBEo4xl.js +7913 -0
  74. package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
  75. package/dist/cdn/chunks/icons-C1Gg-ov-.js +992 -0
  76. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
  77. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  78. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  79. package/dist/cdn/chunks/media-library-BTF_Ko70.js +6014 -0
  80. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
  81. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  82. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  83. package/dist/cdn/chunks/quality-C5AmotmP.js +1456 -0
  84. package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
  85. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  86. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  87. package/dist/cdn/chunks/renderer-D0L44Vlp.js +642 -0
  88. package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
  89. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  90. package/dist/cdn/chunks/src-RKexlYjA.js +497 -0
  91. package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
  92. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
  93. package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
  94. package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
  95. package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
  96. package/dist/cdn/chunks/tiptap-CDzAbF2j.js +14654 -0
  97. package/dist/cdn/chunks/tiptap-CDzAbF2j.js.map +1 -0
  98. package/dist/cdn/editor.css +2 -0
  99. package/dist/cdn/editor.js +338 -0
  100. package/dist/cdn/editor.js.map +1 -0
  101. package/dist/{cloud-6ZmAvF0j.js → cloud-DJG4tb4_.js} +1 -1
  102. package/dist/{de-DWcgp-7T.js → de-2LEvILeZ.js} +40 -0
  103. package/dist/{dist-DtiDUrX-.js → dist-BHAeXaUY.js} +1 -1
  104. package/dist/{dist-BUzw1buG.js → dist-BSJvAvH3.js} +1 -1
  105. package/dist/{dist-COSzWQUs.js → dist-BeFnymxK.js} +1 -1
  106. package/dist/dist-Bmir0gYb.js +1167 -0
  107. package/dist/{dist-C3T2AKtB.js → dist-BvPgo-UK.js} +1 -1
  108. package/dist/{dist-C9ckKEZL.js → dist-CPVBKMmd.js} +1 -1
  109. package/dist/{dist-BadNx4qo.js → dist-Df4ie7vZ.js} +1 -1
  110. package/dist/{dist-CBItRG-Z.js → dist-DxOoemkW.js} +1 -1
  111. package/dist/{dist-Dzt5foyL.js → dist-HEQ52gTJ.js} +1 -1
  112. package/dist/{dist-BZyY-SS4.js → dist-b-XUqAoF.js} +1 -1
  113. package/dist/{dist-Bz3M4RXG.js → dist-kZfaVUpW.js} +3 -3
  114. package/dist/{dist-BesOh2mk.js → dist-wfAedlzi.js} +1 -1
  115. package/dist/{en-Cxd4fhNm.js → en-D2RU2Poj.js} +40 -0
  116. package/dist/{extensions-D__hOlV1.js → extensions-BQ1xXx3d.js} +21 -21
  117. package/dist/index.d.ts +17 -6
  118. package/dist/style.css +1 -1
  119. package/dist/{styles-B4tjX5SP.js → styles-CavWjvol.js} +1573 -1310
  120. package/dist/templatical-editor.js +161 -132
  121. package/dist/undo-2-Cg8I7obC.js +16 -0
  122. package/dist/{useEditorCore-wslttMH-.js → useEditorCore-BGnzcT7p.js} +37 -37
  123. package/dist/{useMergeTag-DX0XG5V9.js → useMergeTag-CfuZq2fF.js} +3 -3
  124. package/package.json +12 -12
  125. package/dist/dist-C04s_fLA.js +0 -563
  126. /package/dist/{CountdownBlock-DaYGxKqo.js → CountdownBlock-BCi7-DAM.js} +0 -0
  127. /package/dist/{_plugin-vue_export-helper-BVAJ4lgT.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
  128. /package/dist/{de-GOtR9DwW.js → de-D2npYjrZ.js} +0 -0
  129. /package/dist/{dist-DXa1uAMh.js → dist-DvHLtWVP.js} +0 -0
  130. /package/dist/{emojiData-DrBuvEoP.js → emojiData-DvQBBzmO.js} +0 -0
  131. /package/dist/{en-dFFQVzNn.js → en-ib-4h3_o.js} +0 -0
  132. /package/dist/{formatRelativeTime-BhhO8yCl.js → formatRelativeTime-CFDZnEIs.js} +0 -0
  133. /package/dist/{liquid.browser-BvCyLQII.js → liquid.browser-7Rv0QDiO.js} +0 -0
  134. /package/dist/{readableTextColor-DVuzNX1y.js → readableTextColor-C_9OpzBw.js} +0 -0
  135. /package/dist/{scan-line-CzfFJO1o.js → scan-line-DlghmhNf.js} +0 -0
  136. /package/dist/{send-D2eSo4GH.js → send-DDdhIRj8.js} +0 -0
  137. /package/dist/{shield-check-jkpgcC0-.js → shield-check-OSQ-JVTX.js} +0 -0
  138. /package/dist/{sparkles-Chm5CZfb.js → sparkles-BN4a-CoF.js} +0 -0
  139. /package/dist/{styleConstants-34eUKPOZ.js → styleConstants-wWRbcuEK.js} +0 -0
  140. /package/dist/{text-align-start-CzBnJsW8.js → text-align-start-D1weisjS.js} +0 -0
  141. /package/dist/{trash-2-CtK2apEH.js → trash-2-CMWvQ5KX.js} +0 -0
  142. /package/dist/{triangle-alert-KpDVNbpn.js → triangle-alert-DyidRNX_.js} +0 -0
  143. /package/dist/{useCloudI18n-DOKSZql1.js → useCloudI18n-BTTNBk5i.js} +0 -0
  144. /package/dist/{x-BkaOMosX.js → x-CgIhNcT9.js} +0 -0
@@ -1,19 +1,19 @@
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";
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 h, jt as g, l as _, m as v, n as y, st as b, t as ee, v as x, x as S } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { r as C } from "./timeouts-BSGxjuUF.js";
3
+ import { f as te, r as ne } from "./dist-Bmir0gYb.js";
4
+ import { L as w, S as T, t as re, z as ie } from "./useEditorCore-BGnzcT7p.js";
5
+ import { w as ae } from "./keys-CvX8D-8C.js";
6
+ import { a as oe, c as se, d as ce, f as le, g as ue, h as de, i as fe, l as pe, m as me, n as he, o as E, p as D, r as O, s as k, t as A, u as j } from "./styles-CavWjvol.js";
7
+ import { t as M } from "./_plugin-vue_export-helper-Bwh4ceeO.js";
8
8
  //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
9
- var M = ["data-tpl-theme"], N = {
9
+ var N = ["data-tpl-theme"], P = {
10
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)]",
11
11
  style: {
12
12
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
13
13
  "backdrop-filter": "blur(12px)",
14
14
  "-webkit-backdrop-filter": "blur(12px)"
15
15
  }
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({
16
+ }, F = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, I = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, L = { class: "tpl:flex tpl:justify-center tpl:p-8" }, R = ["aria-label"], z = /* @__PURE__ */ M(/* @__PURE__ */ t({
17
17
  __name: "Editor",
18
18
  props: {
19
19
  config: {},
@@ -21,109 +21,114 @@ var M = ["data-tpl-theme"], N = {
21
21
  fontsManager: {}
22
22
  },
23
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,
24
+ let y = d(null), C = t, T = ie({
25
+ content: C.config.content,
26
+ templateDefaults: C.config.templateDefaults
27
+ }), E = re({
28
+ editor: T,
29
29
  config: {
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
30
+ uiTheme: C.config.uiTheme,
31
+ theme: C.config.theme,
32
+ blockDefaults: C.config.blockDefaults,
33
+ customBlocks: C.config.customBlocks,
34
+ mergeTags: C.config.mergeTags,
35
+ displayConditions: C.config.displayConditions,
36
+ onRequestMedia: C.config.onRequestMedia,
37
+ editorType: C.config.editorType,
38
+ accessibility: de(C.config),
39
+ onSave: C.config.onSave ? () => C.config.onSave(JSON.parse(JSON.stringify(T.state.content))) : void 0
40
40
  },
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
+ translations: C.translations,
42
+ fontsManager: C.fontsManager,
43
+ autoSaveOptions: C.config.onChange ? { onChange: () => C.config.onChange(JSON.parse(JSON.stringify(T.state.content))) } : null
44
44
  });
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({
45
+ h(async () => {
46
+ if (await C.fontsManager.loadCustomFonts(), w(C.config.editorType) === "popup" && !T.content.value.settings.popup) {
47
+ let e = te();
48
+ T.updateSettings({
49
49
  popup: e,
50
- width: re[e.design.sizePreset]
50
+ width: ne[e.design.sizePreset]
51
51
  });
52
52
  }
53
53
  }), r(() => {
54
- S.fontsManager.cleanupFontLinks(), T.destroy();
54
+ C.fontsManager.cleanupFontLinks(), E.destroy();
55
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]"];
56
+ let M = d("blocks");
57
+ a(ae, M);
58
+ let z = v(() => w(C.config.editorType) === "popup"), B = v(() => z.value && M.value === "displayRules"), V = v(() => z.value && M.value === "schedule"), H = v(() => M.value === "design"), U = v(() => z.value && (B.value || V.value || H.value)), W = v(() => {
59
+ if (T.state.previewMode) return ["tpl:left-0", "tpl:right-0"];
60
+ if (!z.value) return ["tpl:left-12", "tpl:right-[320px]"];
61
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]";
62
+ e = M.value === "blocks" ? "tpl:left-[272px]" : H.value ? "tpl:left-[392px]" : "tpl:left-[72px]";
63
+ let t = U.value ? "tpl:right-0" : "tpl:right-[320px]";
64
64
  return [e, t];
65
- }), W = _(() => z.value || B.value);
65
+ }), G = v(() => B.value || V.value);
66
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)
67
+ getContent: () => T.content.value,
68
+ setContent: (e) => T.setContent(e),
69
+ setTheme: (e) => T.setUiTheme(e),
70
+ undo: () => E.history.undo(),
71
+ redo: () => E.history.redo(),
72
+ canUndo: () => E.history.canUndo.value,
73
+ canRedo: () => E.history.canRedo.value,
74
+ renderCustomBlock: E.registry.renderCustomBlock,
75
+ startTour: (e) => y.value?.start(e),
76
+ dismissTour: () => y.value?.dismiss(),
77
+ resetTourDismissed: () => fe(C.config.tour),
78
+ isTourDismissed: () => C.config.tour ? oe(C.config.tour) : !0
79
+ }), (r, a) => (i(), x("div", {
80
+ class: e(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(T).state.darkMode }]),
81
+ "data-tpl-theme": b(E).resolvedTheme.value,
82
+ style: g(b(E).themeStyles.value)
79
83
  }, [
80
- m("header", N, [
84
+ m("header", P, [
81
85
  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
86
+ m("div", F, [
87
+ S(ce),
88
+ S(j, {
89
+ viewport: b(T).state.viewport,
90
+ onChange: b(T).setViewport
86
91
  }, null, 8, ["viewport", "onChange"]),
87
- x(ce, {
88
- "dark-mode": y(w).state.darkMode,
89
- onChange: y(w).setDarkMode
92
+ S(se, {
93
+ "dark-mode": b(T).state.darkMode,
94
+ onChange: b(T).setDarkMode
90
95
  }, null, 8, ["dark-mode", "onChange"]),
91
- x(pe, {
92
- "preview-mode": y(w).state.previewMode,
93
- onChange: y(w).setPreviewMode
96
+ S(pe, {
97
+ "preview-mode": b(T).state.previewMode,
98
+ onChange: b(T).setPreviewMode
94
99
  }, null, 8, ["preview-mode", "onChange"])
95
100
  ]),
96
101
  a[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
97
102
  ]),
98
- c(x(ue, null, null, 512), [[g, !y(w).state.previewMode]]),
103
+ c(S(D, null, null, 512), [[_, !b(T).state.previewMode]]),
99
104
  m("div", {
100
- class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...U.value, "tpl:top-14"]]),
101
- style: h({
105
+ class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...W.value, "tpl:top-14"]]),
106
+ style: g({
102
107
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
103
- backgroundColor: W.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
108
+ backgroundColor: G.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
104
109
  })
105
- }, [R.value && j.value === "displayRules" ? (i(), p(he, { key: 0 })) : R.value && j.value === "schedule" ? (i(), p(k, {
110
+ }, [z.value && M.value === "displayRules" ? (i(), p(he, { key: 0 })) : z.value && M.value === "schedule" ? (i(), p(A, {
106
111
  key: 1,
107
112
  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", {
113
+ })) : (i(), x(f, { key: 2 }, [m("div", I, [S(ee, { name: "tpl-restore-btn" }, {
114
+ default: s(() => [b(E).conditionPreview.hasHiddenBlocks.value ? (i(), x("button", {
110
115
  key: 0,
111
116
  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)]",
112
117
  style: { "backdrop-filter": "blur(8px)" },
113
- onClick: a[0] ||= (e) => y(T).conditionPreview.reset()
114
- }, [x(y(de), {
118
+ onClick: a[0] ||= (e) => b(E).conditionPreview.reset()
119
+ }, [S(b(ue), {
115
120
  size: 13,
116
121
  "stroke-width": 2
117
- }), u(" " + n(y(T).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
122
+ }), u(" " + n(b(E).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
118
123
  _: 1
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,
124
+ })]), m("div", L, [S(me, {
125
+ viewport: b(T).state.viewport,
126
+ content: b(T).content.value,
127
+ "selected-block-id": b(T).state.selectedBlockId,
128
+ "dark-mode": b(T).state.darkMode,
129
+ "preview-mode": b(T).state.previewMode,
125
130
  "multi-page-canvas": t.config.multiPageCanvas ?? !1,
126
- onSelectBlock: y(w).selectBlock
131
+ onSelectBlock: b(T).selectBlock
127
132
  }, null, 8, [
128
133
  "viewport",
129
134
  "content",
@@ -133,62 +138,62 @@ var M = ["data-tpl-theme"], N = {
133
138
  "multi-page-canvas",
134
139
  "onSelectBlock"
135
140
  ])])], 64))], 6),
136
- t.config.branding === !1 ? l("", !0) : (i(), p(O, {
141
+ t.config.branding === !1 ? l("", !0) : (i(), p(k, {
137
142
  key: 0,
138
- "position-class": U.value
143
+ "position-class": W.value
139
144
  }, null, 8, ["position-class"])),
140
145
  m("div", {
141
146
  class: "tpl-sr-only",
142
147
  role: "status",
143
148
  "aria-live": "polite",
144
149
  "aria-atomic": "true",
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),
150
+ "aria-label": b(E).t.landmarks.reorderAnnouncements
151
+ }, n(b(E).keyboardReorder.announcement.value), 9, R),
152
+ c(S(le, {
153
+ "selected-block": b(T).selectedBlock.value,
154
+ settings: b(T).content.value.settings,
155
+ onUpdateBlock: a[1] ||= (e) => b(T).updateBlock(b(T).state.selectedBlockId, e),
151
156
  onDeleteBlock: a[2] ||= () => {
152
- y(w).state.selectedBlockId && y(T).blockActions.deleteBlock(y(w).state.selectedBlockId);
157
+ b(T).state.selectedBlockId && b(E).blockActions.deleteBlock(b(T).state.selectedBlockId);
153
158
  },
154
159
  onDuplicateBlock: a[3] ||= () => {
155
- y(w).selectedBlock.value && y(T).blockActions.duplicateBlock(y(w).selectedBlock.value);
160
+ b(T).selectedBlock.value && b(E).blockActions.duplicateBlock(b(T).selectedBlock.value);
156
161
  },
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, {
162
+ onUpdateSettings: a[4] ||= (e) => b(T).updateSettings(e)
163
+ }, null, 8, ["selected-block", "settings"]), [[_, !b(T).state.previewMode && !U.value]]),
164
+ t.config.tour ? (i(), p(O, {
160
165
  key: 1,
161
166
  ref_key: "editorTourRef",
162
- ref: v,
167
+ ref: y,
163
168
  "tour-config": t.config.tour,
164
- "dark-mode": y(w).state.darkMode
169
+ "dark-mode": b(T).state.darkMode
165
170
  }, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
166
- ], 14, M));
171
+ ], 14, N));
167
172
  }
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")
173
+ }), [["__scopeId", "data-v-040fed1e"]]), B = /* @__PURE__ */ Object.assign({
174
+ "./locales/de.ts": () => import("./de-2LEvILeZ.js"),
175
+ "./locales/en.ts": () => import("./en-D2RU2Poj.js")
176
+ }), V = /* @__PURE__ */ Object.assign({
177
+ "./locales/cloud/de.ts": () => import("./de-D2npYjrZ.js"),
178
+ "./locales/cloud/en.ts": () => import("./en-ib-4h3_o.js")
174
179
  });
175
- function V(e) {
180
+ function H(e) {
176
181
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
177
182
  }
178
- var H = V(z), U = V(B);
179
- function W(e) {
183
+ var U = H(B), W = H(V);
184
+ function G(e) {
180
185
  return e.split("-")[0].toLowerCase();
181
186
  }
182
- function G(e, t) {
183
- let n = W(e);
187
+ function K(e, t) {
188
+ let n = G(e);
184
189
  return t.includes(n) ? n : "en";
185
190
  }
186
- async function K(e) {
187
- let t = z[`./locales/${G(e, H)}.ts`];
191
+ async function q(e) {
192
+ let t = B[`./locales/${K(e, U)}.ts`];
188
193
  return (await t()).default;
189
194
  }
190
195
  async function ge(e) {
191
- let t = B[`./locales/cloud/${G(e, U)}.ts`];
196
+ let t = V[`./locales/cloud/${K(e, W)}.ts`];
192
197
  return (await t()).default;
193
198
  }
194
199
  //#endregion
@@ -204,59 +209,71 @@ async function _e(e) {
204
209
  }
205
210
  //#endregion
206
211
  //#region src/index.ts
207
- var q = null, J = d(null);
208
- async function Y(e) {
212
+ var J = null, Y = d(null);
213
+ async function ve(e) {
209
214
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
210
215
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
211
- let n = await K(e.locale ?? "en"), r = w(e.fonts);
212
- q && Q(), q = v({ setup() {
213
- return () => o(R, {
216
+ let n = await q(e.locale ?? "en"), r = T(e.fonts);
217
+ J && Q(), J = y({ setup() {
218
+ return () => o(z, {
214
219
  config: e,
215
220
  translations: n,
216
221
  fontsManager: r,
217
- ref: J
222
+ ref: Y
218
223
  });
219
- } }), q.mount(t);
224
+ } }), J.mount(t);
220
225
  let i = {
221
226
  getContent() {
222
- return J.value ? JSON.parse(JSON.stringify(J.value.getContent())) : JSON.parse(JSON.stringify(e.content));
227
+ return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(e.content));
223
228
  },
224
229
  setContent(t) {
225
- J.value && J.value.setContent(t), e.content = t;
230
+ Y.value && Y.value.setContent(t), e.content = t;
226
231
  },
227
232
  setTheme(e) {
228
- J.value && J.value.setTheme(e);
233
+ Y.value && Y.value.setTheme(e);
229
234
  },
230
235
  unmount: Q,
231
236
  startTour(e) {
232
- J.value?.startTour?.(e);
237
+ Y.value?.startTour?.(e);
233
238
  },
234
239
  dismissTour() {
235
- J.value?.dismissTour?.();
240
+ Y.value?.dismissTour?.();
236
241
  },
237
242
  resetTourDismissed() {
238
- J.value?.resetTourDismissed?.();
243
+ Y.value?.resetTourDismissed?.();
239
244
  },
240
245
  isTourDismissed() {
241
- return J.value?.isTourDismissed?.() ?? !0;
246
+ return Y.value?.isTourDismissed?.() ?? !0;
247
+ },
248
+ undo() {
249
+ Y.value?.undo?.();
250
+ },
251
+ redo() {
252
+ Y.value?.redo?.();
253
+ },
254
+ canUndo() {
255
+ return Y.value?.canUndo?.() ?? !1;
256
+ },
257
+ canRedo() {
258
+ return Y.value?.canRedo?.() ?? !1;
242
259
  },
243
260
  renderCustomBlock(e) {
244
- return J.value ? J.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
261
+ return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
245
262
  },
246
263
  toMjml: () => _e(i)
247
264
  };
248
265
  return i;
249
266
  }
250
267
  var X = null, Z = d(null);
251
- async function ve(e) {
268
+ async function ye(e) {
252
269
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
253
270
  if (!t) throw Error(`[Templatical] Container element not found: ${e.container}`);
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);
271
+ let { default: n } = await import("./CloudEditor-zo9PjjvY.js"), [r, i] = await Promise.all([q(e.locale ?? "en"), ge(e.locale ?? "en")]), a = T(e.fonts);
255
272
  return X && $(), await new Promise((s, c) => {
256
273
  let l = setTimeout(() => {
257
274
  c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
258
- }, S);
259
- X = v({ setup() {
275
+ }, C);
276
+ X = y({ setup() {
260
277
  return () => o(n, {
261
278
  config: e,
262
279
  translations: r,
@@ -291,6 +308,18 @@ async function ve(e) {
291
308
  isTourDismissed() {
292
309
  return Z.value?.isTourDismissed?.() ?? !0;
293
310
  },
311
+ undo() {
312
+ Z.value?.undo?.();
313
+ },
314
+ redo() {
315
+ Z.value?.redo?.();
316
+ },
317
+ canUndo() {
318
+ return Z.value?.canUndo?.() ?? !1;
319
+ },
320
+ canRedo() {
321
+ return Z.value?.canRedo?.() ?? !1;
322
+ },
294
323
  create(e) {
295
324
  return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
296
325
  },
@@ -303,10 +332,10 @@ async function ve(e) {
303
332
  };
304
333
  }
305
334
  function Q() {
306
- q && (q.unmount(), q = null, J.value = null);
335
+ J && (J.unmount(), J = null, Y.value = null);
307
336
  }
308
337
  function $() {
309
338
  X && (X.unmount(), X = null, Z.value = null);
310
339
  }
311
340
  //#endregion
312
- export { T as DEFAULT_EDITOR_TOUR_STORAGE_KEY, Y as init, ve as initCloud, Q as unmount, w as useFonts };
341
+ export { E as DEFAULT_EDITOR_TOUR_STORAGE_KEY, ve as init, ye as initCloud, Q as unmount, T as useFonts };
@@ -0,0 +1,16 @@
1
+ import { t as e } from "./createLucideIcon-ClREiSx3.js";
2
+ var t = e("redo-2", [["path", {
3
+ d: "m15 14 5-5-5-5",
4
+ key: "12vg1m"
5
+ }], ["path", {
6
+ d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
7
+ key: "6uklza"
8
+ }]]), n = e("undo-2", [["path", {
9
+ d: "M9 14 4 9l5-5",
10
+ key: "102s5s"
11
+ }], ["path", {
12
+ d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
13
+ key: "f3b9sd"
14
+ }]]);
15
+ //#endregion
16
+ export { t as n, n as t };