@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,177 +1,221 @@
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 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";
6
8
  //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
7
- var j = ["data-tpl-theme"], M = {
9
+ var N = ["data-tpl-theme"], P = {
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
+ }, 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({
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 y = d(null), C = t, T = ie({
25
+ content: C.config.content,
26
+ templateDefaults: C.config.templateDefaults
27
+ }), E = re({
28
+ editor: T,
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: 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
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: C.translations,
42
+ fontsManager: C.fontsManager,
43
+ autoSaveOptions: C.config.onChange ? { onChange: () => C.config.onChange(JSON.parse(JSON.stringify(T.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
+ 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
+ popup: e,
50
+ width: ne[e.design.sizePreset]
51
+ });
52
+ }
53
+ }), r(() => {
54
+ C.fontsManager.cleanupFontLinks(), E.destroy();
55
+ });
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
+ let e;
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
+ return [e, t];
65
+ }), G = v(() => B.value || V.value);
66
+ return o({
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)
55
83
  }, [
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
84
+ m("header", P, [
85
+ a[5] ||= m("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
86
+ m("div", F, [
87
+ S(ce),
88
+ S(j, {
89
+ viewport: b(T).state.viewport,
90
+ onChange: b(T).setViewport
62
91
  }, null, 8, ["viewport", "onChange"]),
63
- u(ne, {
64
- "dark-mode": m(v).state.darkMode,
65
- onChange: m(v).setDarkMode
92
+ S(se, {
93
+ "dark-mode": b(T).state.darkMode,
94
+ onChange: b(T).setDarkMode
66
95
  }, null, 8, ["dark-mode", "onChange"]),
67
- u(D, {
68
- "preview-mode": m(v).state.previewMode,
69
- onChange: m(v).setPreviewMode
96
+ S(pe, {
97
+ "preview-mode": b(T).state.previewMode,
98
+ onChange: b(T).setPreviewMode
70
99
  }, null, 8, ["preview-mode", "onChange"])
71
100
  ]),
72
- s[6] ||= g("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
101
+ a[6] ||= m("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
73
102
  ]),
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", {
103
+ c(S(D, null, null, 512), [[_, !b(T).state.previewMode]]),
104
+ m("div", {
105
+ class: e(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [...W.value, "tpl:top-14"]]),
106
+ style: g({
107
+ transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
108
+ backgroundColor: G.value ? "var(--tpl-bg)" : "var(--tpl-canvas-bg)"
109
+ })
110
+ }, [z.value && M.value === "displayRules" ? (i(), p(he, { key: 0 })) : z.value && M.value === "schedule" ? (i(), p(A, {
111
+ key: 1,
112
+ layout: "standalone"
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", {
80
115
  key: 0,
81
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)]",
82
117
  style: { "backdrop-filter": "blur(8px)" },
83
- onClick: s[0] ||= (e) => m(b).conditionPreview.reset()
84
- }, [u(m(te), {
118
+ onClick: a[0] ||= (e) => b(E).conditionPreview.reset()
119
+ }, [S(b(ue), {
85
120
  size: 13,
86
121
  "stroke-width": 2
87
- }), y(" " + i(m(b).t.blockSettings.restoreHiddenBlocks), 1)])) : f("", !0)]),
122
+ }), u(" " + n(b(E).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
88
123
  _: 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
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,
130
+ "multi-page-canvas": t.config.multiPageCanvas ?? !1,
131
+ onSelectBlock: b(T).selectBlock
96
132
  }, null, 8, [
97
133
  "viewport",
98
134
  "content",
99
135
  "selected-block-id",
100
136
  "dark-mode",
101
137
  "preview-mode",
138
+ "multi-page-canvas",
102
139
  "onSelectBlock"
103
- ])])], 2),
104
- o.config.branding === !1 ? f("", !0) : (r(), p(k, {
140
+ ])])], 64))], 6),
141
+ t.config.branding === !1 ? l("", !0) : (i(), p(k, {
105
142
  key: 0,
106
- "position-class": [m(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
143
+ "position-class": W.value
107
144
  }, null, 8, ["position-class"])),
108
- g("div", {
145
+ m("div", {
109
146
  class: "tpl-sr-only",
110
147
  role: "status",
111
148
  "aria-live": "polite",
112
149
  "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);
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),
156
+ onDeleteBlock: a[2] ||= () => {
157
+ b(T).state.selectedBlockId && b(E).blockActions.deleteBlock(b(T).state.selectedBlockId);
121
158
  },
122
- onDuplicateBlock: s[3] ||= () => {
123
- m(v).selectedBlock.value && m(b).blockActions.duplicateBlock(m(v).selectedBlock.value);
159
+ onDuplicateBlock: a[3] ||= () => {
160
+ b(T).selectedBlock.value && b(E).blockActions.duplicateBlock(b(T).selectedBlock.value);
124
161
  },
125
- onUpdateSettings: s[4] ||= (e) => m(v).updateSettings(e)
126
- }, null, 8, ["selected-block", "settings"]), [[d, !m(v).state.previewMode]])
127
- ], 14, j));
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, {
165
+ key: 1,
166
+ ref_key: "editorTourRef",
167
+ ref: y,
168
+ "tour-config": t.config.tour,
169
+ "dark-mode": b(T).state.darkMode
170
+ }, null, 8, ["tour-config", "dark-mode"])) : l("", !0)
171
+ ], 14, N));
128
172
  }
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")
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")
135
179
  });
136
- function B(e) {
180
+ function H(e) {
137
181
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
138
182
  }
139
- var V = B(R), H = B(z);
140
- function U(e) {
183
+ var U = H(B), W = H(V);
184
+ function G(e) {
141
185
  return e.split("-")[0].toLowerCase();
142
186
  }
143
- function W(e, t) {
144
- let n = U(e);
187
+ function K(e, t) {
188
+ let n = G(e);
145
189
  return t.includes(n) ? n : "en";
146
190
  }
147
- async function G(e) {
148
- let t = R[`./locales/${W(e, V)}.ts`];
191
+ async function q(e) {
192
+ let t = B[`./locales/${K(e, U)}.ts`];
149
193
  return (await t()).default;
150
194
  }
151
- async function K(e) {
152
- let t = z[`./locales/cloud/${W(e, H)}.ts`];
195
+ async function ge(e) {
196
+ let t = V[`./locales/cloud/${K(e, W)}.ts`];
153
197
  return (await t()).default;
154
198
  }
155
199
  //#endregion
156
200
  //#region src/utils/toMjml.ts
157
- async function q(e) {
201
+ async function _e(e) {
158
202
  let t;
159
203
  try {
160
- t = await import("@templatical/renderer");
204
+ t = await import("@aswin.dev/renderer");
161
205
  } catch {
162
- throw Error("[Templatical] toMjml() requires the @templatical/renderer package. Please install it.");
206
+ throw Error("[Templatical] toMjml() requires the @aswin.dev/renderer package. Please install it.");
163
207
  }
164
208
  return t.renderToMjml(e.getContent(), { renderCustomBlock: e.renderCustomBlock });
165
209
  }
166
210
  //#endregion
167
211
  //#region src/index.ts
168
- var J = null, Y = o(null);
169
- async function ie(e) {
212
+ var J = null, Y = d(null);
213
+ async function ve(e) {
170
214
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
171
215
  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, {
216
+ let n = await q(e.locale ?? "en"), r = T(e.fonts);
217
+ J && Q(), J = y({ setup() {
218
+ return () => o(z, {
175
219
  config: e,
176
220
  translations: n,
177
221
  fontsManager: r,
@@ -189,31 +233,55 @@ async function ie(e) {
189
233
  Y.value && Y.value.setTheme(e);
190
234
  },
191
235
  unmount: Q,
236
+ startTour(e) {
237
+ Y.value?.startTour?.(e);
238
+ },
239
+ dismissTour() {
240
+ Y.value?.dismissTour?.();
241
+ },
242
+ resetTourDismissed() {
243
+ Y.value?.resetTourDismissed?.();
244
+ },
245
+ isTourDismissed() {
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;
259
+ },
192
260
  renderCustomBlock(e) {
193
261
  return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
194
262
  },
195
- toMjml: () => q(i)
263
+ toMjml: () => _e(i)
196
264
  };
197
265
  return i;
198
266
  }
199
- var X = null, Z = o(null);
200
- async function ae(e) {
267
+ var X = null, Z = d(null);
268
+ async function ye(e) {
201
269
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
202
270
  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, {
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);
272
+ return X && $(), await new Promise((s, c) => {
273
+ let l = setTimeout(() => {
274
+ c(/* @__PURE__ */ Error("[Templatical] Cloud editor initialization timed out"));
275
+ }, C);
276
+ X = y({ setup() {
277
+ return () => o(n, {
210
278
  config: e,
211
279
  translations: r,
212
280
  cloudTranslations: i,
213
281
  fontsManager: a,
214
282
  ref: Z,
215
283
  onReady: () => {
216
- clearTimeout(c), o();
284
+ clearTimeout(l), s();
217
285
  }
218
286
  });
219
287
  } }), X.mount(t);
@@ -228,6 +296,30 @@ async function ae(e) {
228
296
  Z.value && Z.value.setTheme(e);
229
297
  },
230
298
  unmount: $,
299
+ startTour(e) {
300
+ Z.value?.startTour?.(e);
301
+ },
302
+ dismissTour() {
303
+ Z.value?.dismissTour?.();
304
+ },
305
+ resetTourDismissed() {
306
+ Z.value?.resetTourDismissed?.();
307
+ },
308
+ isTourDismissed() {
309
+ return Z.value?.isTourDismissed?.() ?? !0;
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
+ },
231
323
  create(e) {
232
324
  return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
233
325
  },
@@ -246,4 +338,4 @@ function $() {
246
338
  X && (X.unmount(), X = null, Z.value = null);
247
339
  }
248
340
  //#endregion
249
- export { ie as init, ae as initCloud, Q as unmount, C as useFonts };
341
+ export { E as DEFAULT_EDITOR_TOUR_STORAGE_KEY, ve as init, ye as initCloud, Q as unmount, T 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",
@@ -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 };
@@ -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}}`);