@aswin.dev/editor 0.6.3 → 0.7.0

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 (158) hide show
  1. package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
  2. package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
  3. package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
  4. package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
  5. package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
  6. package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
  7. package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
  8. package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
  9. package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
  10. package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
  11. package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
  12. package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
  13. package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
  14. package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
  15. package/dist/ParagraphEditor-D75wl3BX.js +695 -0
  16. package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
  17. package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
  18. package/dist/SnapshotHistory-BR3eV120.js +127 -0
  19. package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
  20. package/dist/TestEmailModal--ue5w9fT.js +94 -0
  21. package/dist/TitleEditor-fStSADI-.js +172 -0
  22. package/dist/TplModal-BwSfxIHf.js +44 -0
  23. package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
  24. package/dist/accessibility-e8JYu_zd.js +27 -0
  25. package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
  26. package/dist/bundle-stats.json +10 -0
  27. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
  28. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
  29. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
  30. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
  31. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
  32. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
  33. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
  34. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
  35. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
  36. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
  38. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
  39. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
  40. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
  41. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
  42. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
  43. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
  45. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
  46. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
  47. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
  48. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
  49. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
  50. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
  51. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
  52. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
  53. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
  54. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
  55. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
  57. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  58. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  59. package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
  60. package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
  61. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  62. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  63. package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
  64. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
  65. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  66. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  67. package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
  68. package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
  69. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  70. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  71. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  72. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  73. package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
  74. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
  75. package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
  76. package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
  77. package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
  78. package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
  79. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  80. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  81. package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
  82. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
  83. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  84. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  85. package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
  86. package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
  87. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  88. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  89. package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
  90. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
  91. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  92. package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
  93. package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
  94. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
  95. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
  96. package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
  97. package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
  98. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
  99. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
  100. package/dist/cdn/editor.css +2 -0
  101. package/dist/cdn/editor.js +250 -0
  102. package/dist/cdn/editor.js.map +1 -0
  103. package/dist/check-Da05j8yl.js +7 -0
  104. package/dist/chevron-down-R2uY34iD.js +7 -0
  105. package/dist/circle-alert-DZuGWPX-.js +25 -0
  106. package/dist/clock-CRp2sIub.js +12 -0
  107. package/dist/cloud-DEk_b4CR.js +1733 -0
  108. package/dist/createLucideIcon-C3pa2siy.js +43 -0
  109. package/dist/de-Brqvgr43.js +521 -0
  110. package/dist/de-DCaaCE5s.js +207 -0
  111. package/dist/dist-B1IR0bpH.js +326 -0
  112. package/dist/dist-BFawx6IS.js +519 -0
  113. package/dist/dist-BaQIYPsn.js +35 -0
  114. package/dist/dist-Cp0zXPAD.js +189 -0
  115. package/dist/dist-D6uC2xhi.js +5 -0
  116. package/dist/dist-D90y8dvT.js +2082 -0
  117. package/dist/dist-DDJIWTRY.js +776 -0
  118. package/dist/dist-DJmnUmW9.js +362 -0
  119. package/dist/dist-DjviJBCi.js +74 -0
  120. package/dist/dist-KoBJjK1G.js +61 -0
  121. package/dist/dist-aRzjfSRN.js +35 -0
  122. package/dist/dist-iLBdeBDR.js +10658 -0
  123. package/dist/dist-us-RpCWN.js +47 -0
  124. package/dist/dist-wzMIGj-D.js +5 -0
  125. package/dist/emojiData-PQyVa4bU.js +17 -0
  126. package/dist/en-DXCyK4-X.js +207 -0
  127. package/dist/en-WDVp87TE.js +521 -0
  128. package/dist/extensions-CUcl9Ok4.js +799 -0
  129. package/dist/formatRelativeTime-BOEf47hq.js +12 -0
  130. package/dist/image-up-MBZKKg9p.js +23 -0
  131. package/dist/index.d.ts +275 -0
  132. package/dist/info-CJEC7piy.js +19 -0
  133. package/dist/keys-ciNfSSGj.js +10 -0
  134. package/dist/liquid.browser-CdMv1BTn.js +3277 -0
  135. package/dist/loader-circle-DsY5Yg33.js +7 -0
  136. package/dist/message-circle-yElBbR2C.js +7 -0
  137. package/dist/readableTextColor-CY3SiRnt.js +30 -0
  138. package/dist/refresh-cw-CE_AGtn8.js +29 -0
  139. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  140. package/dist/scan-line-D0vcUekt.js +25 -0
  141. package/dist/send-DH4oDQqC.js +10 -0
  142. package/dist/shield-check-CfJgs2Hd.js +10 -0
  143. package/dist/sparkles-CvRXGqFs.js +23 -0
  144. package/dist/style.css +2 -0
  145. package/dist/styleConstants-fWzlIIwN.js +55 -0
  146. package/dist/styles-DEXEkBvg.js +3176 -0
  147. package/dist/templatical-editor.js +249 -0
  148. package/dist/text-align-start-BT9VUDxK.js +43 -0
  149. package/dist/timeouts-BSGxjuUF.js +4 -0
  150. package/dist/trash-2-DbP2Y6t2.js +25 -0
  151. package/dist/triangle-alert-aOXceTSe.js +17 -0
  152. package/dist/useCloudI18n-BuIwR6OE.js +23 -0
  153. package/dist/useEditorCore-C6ost42Q.js +9342 -0
  154. package/dist/useI18n-lb2DHDiu.js +17 -0
  155. package/dist/useMergeTag-CBwKnnNB.js +34 -0
  156. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
  157. package/dist/x-u2oVmjN_.js +10 -0
  158. package/package.json +1 -1
@@ -0,0 +1,249 @@
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";
6
+ //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
7
+ var j = ["data-tpl-theme"], M = {
8
+ 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
+ style: {
10
+ "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
11
+ "backdrop-filter": "blur(12px)",
12
+ "-webkit-backdrop-filter": "blur(12px)"
13
+ }
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({
15
+ __name: "Editor",
16
+ props: {
17
+ config: {},
18
+ translations: {},
19
+ fontsManager: {}
20
+ },
21
+ setup(o, { expose: s }) {
22
+ let _ = o, v = x({
23
+ content: _.config.content,
24
+ templateDefaults: _.config.templateDefaults
25
+ }), b = S({
26
+ editor: v,
27
+ 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
37
+ },
38
+ translations: _.translations,
39
+ fontsManager: _.fontsManager,
40
+ autoSaveOptions: _.config.onChange ? { onChange: () => _.config.onChange(JSON.parse(JSON.stringify(v.state.content))) } : null
41
+ });
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)
55
+ }, [
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
62
+ }, null, 8, ["viewport", "onChange"]),
63
+ u(ne, {
64
+ "dark-mode": m(v).state.darkMode,
65
+ onChange: m(v).setDarkMode
66
+ }, null, 8, ["dark-mode", "onChange"]),
67
+ u(D, {
68
+ "preview-mode": m(v).state.previewMode,
69
+ onChange: m(v).setPreviewMode
70
+ }, null, 8, ["preview-mode", "onChange"])
71
+ ]),
72
+ s[6] ||= g("div", { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, null, -1)
73
+ ]),
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", {
80
+ key: 0,
81
+ 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
+ style: { "backdrop-filter": "blur(8px)" },
83
+ onClick: s[0] ||= (e) => m(b).conditionPreview.reset()
84
+ }, [u(m(te), {
85
+ size: 13,
86
+ "stroke-width": 2
87
+ }), y(" " + i(m(b).t.blockSettings.restoreHiddenBlocks), 1)])) : f("", !0)]),
88
+ _: 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
96
+ }, null, 8, [
97
+ "viewport",
98
+ "content",
99
+ "selected-block-id",
100
+ "dark-mode",
101
+ "preview-mode",
102
+ "onSelectBlock"
103
+ ])])], 2),
104
+ o.config.branding === !1 ? f("", !0) : (r(), p(k, {
105
+ key: 0,
106
+ "position-class": [m(v).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
107
+ }, null, 8, ["position-class"])),
108
+ g("div", {
109
+ class: "tpl-sr-only",
110
+ role: "status",
111
+ "aria-live": "polite",
112
+ "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);
121
+ },
122
+ onDuplicateBlock: s[3] ||= () => {
123
+ m(v).selectedBlock.value && m(b).blockActions.duplicateBlock(m(v).selectedBlock.value);
124
+ },
125
+ onUpdateSettings: s[4] ||= (e) => m(v).updateSettings(e)
126
+ }, null, 8, ["selected-block", "settings"]), [[d, !m(v).state.previewMode]])
127
+ ], 14, j));
128
+ }
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")
135
+ });
136
+ function B(e) {
137
+ return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
138
+ }
139
+ var V = B(R), H = B(z);
140
+ function U(e) {
141
+ return e.split("-")[0].toLowerCase();
142
+ }
143
+ function W(e, t) {
144
+ let n = U(e);
145
+ return t.includes(n) ? n : "en";
146
+ }
147
+ async function G(e) {
148
+ let t = R[`./locales/${W(e, V)}.ts`];
149
+ return (await t()).default;
150
+ }
151
+ async function K(e) {
152
+ let t = z[`./locales/cloud/${W(e, H)}.ts`];
153
+ return (await t()).default;
154
+ }
155
+ //#endregion
156
+ //#region src/utils/toMjml.ts
157
+ async function q(e) {
158
+ let t;
159
+ try {
160
+ t = await import("@templatical/renderer");
161
+ } catch {
162
+ throw Error("[Templatical] toMjml() requires the @templatical/renderer package. Please install it.");
163
+ }
164
+ return t.renderToMjml(e.getContent(), { renderCustomBlock: e.renderCustomBlock });
165
+ }
166
+ //#endregion
167
+ //#region src/index.ts
168
+ var J = null, Y = o(null);
169
+ async function ie(e) {
170
+ let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
171
+ 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, {
175
+ config: e,
176
+ translations: n,
177
+ fontsManager: r,
178
+ ref: Y
179
+ });
180
+ } }), J.mount(t);
181
+ let i = {
182
+ getContent() {
183
+ return Y.value ? JSON.parse(JSON.stringify(Y.value.getContent())) : JSON.parse(JSON.stringify(e.content));
184
+ },
185
+ setContent(t) {
186
+ Y.value && Y.value.setContent(t), e.content = t;
187
+ },
188
+ setTheme(e) {
189
+ Y.value && Y.value.setTheme(e);
190
+ },
191
+ unmount: Q,
192
+ renderCustomBlock(e) {
193
+ return Y.value ? Y.value.renderCustomBlock(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Editor not ready"));
194
+ },
195
+ toMjml: () => q(i)
196
+ };
197
+ return i;
198
+ }
199
+ var X = null, Z = o(null);
200
+ async function ae(e) {
201
+ let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
202
+ 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, {
210
+ config: e,
211
+ translations: r,
212
+ cloudTranslations: i,
213
+ fontsManager: a,
214
+ ref: Z,
215
+ onReady: () => {
216
+ clearTimeout(c), o();
217
+ }
218
+ });
219
+ } }), X.mount(t);
220
+ }), {
221
+ getContent() {
222
+ return Z.value ? JSON.parse(JSON.stringify(Z.value.getContent())) : JSON.parse(JSON.stringify(e.content));
223
+ },
224
+ setContent(e) {
225
+ Z.value && Z.value.setContent(e);
226
+ },
227
+ setTheme(e) {
228
+ Z.value && Z.value.setTheme(e);
229
+ },
230
+ unmount: $,
231
+ create(e) {
232
+ return Z.value ? Z.value.create(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
233
+ },
234
+ load(e) {
235
+ return Z.value ? Z.value.load(e) : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
236
+ },
237
+ save() {
238
+ return Z.value ? Z.value.save() : Promise.reject(/* @__PURE__ */ Error("[Templatical] Cloud editor not ready"));
239
+ }
240
+ };
241
+ }
242
+ function Q() {
243
+ J && (J.unmount(), J = null, Y.value = null);
244
+ }
245
+ function $() {
246
+ X && (X.unmount(), X = null, Z.value = null);
247
+ }
248
+ //#endregion
249
+ export { ie as init, ae as initCloud, Q as unmount, C as useFonts };
@@ -0,0 +1,43 @@
1
+ import { t as e } from "./createLucideIcon-C3pa2siy.js";
2
+ var t = e("text-align-center", [
3
+ ["path", {
4
+ d: "M21 5H3",
5
+ key: "1fi0y6"
6
+ }],
7
+ ["path", {
8
+ d: "M17 12H7",
9
+ key: "16if0g"
10
+ }],
11
+ ["path", {
12
+ d: "M19 19H5",
13
+ key: "vjpgq2"
14
+ }]
15
+ ]), n = e("text-align-end", [
16
+ ["path", {
17
+ d: "M21 5H3",
18
+ key: "1fi0y6"
19
+ }],
20
+ ["path", {
21
+ d: "M21 12H9",
22
+ key: "dn1m92"
23
+ }],
24
+ ["path", {
25
+ d: "M21 19H7",
26
+ key: "4cu937"
27
+ }]
28
+ ]), r = e("text-align-start", [
29
+ ["path", {
30
+ d: "M21 5H3",
31
+ key: "1fi0y6"
32
+ }],
33
+ ["path", {
34
+ d: "M15 12H3",
35
+ key: "6jk70r"
36
+ }],
37
+ ["path", {
38
+ d: "M17 19H3",
39
+ key: "z6ezky"
40
+ }]
41
+ ]);
42
+ //#endregion
43
+ export { n, t as r, r as t };
@@ -0,0 +1,4 @@
1
+ //#region src/constants/timeouts.ts
2
+ var e = 3e4, t = 4e3, n = 5e3, r = 10 * 1024 * 1024;
3
+ //#endregion
4
+ export { r as i, n, e as r, t };
@@ -0,0 +1,25 @@
1
+ import { t as e } from "./createLucideIcon-C3pa2siy.js";
2
+ var t = e("trash-2", [
3
+ ["path", {
4
+ d: "M10 11v6",
5
+ key: "nco0om"
6
+ }],
7
+ ["path", {
8
+ d: "M14 11v6",
9
+ key: "outv1u"
10
+ }],
11
+ ["path", {
12
+ d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
13
+ key: "miytrc"
14
+ }],
15
+ ["path", {
16
+ d: "M3 6h18",
17
+ key: "d0wm0j"
18
+ }],
19
+ ["path", {
20
+ d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
21
+ key: "e791ji"
22
+ }]
23
+ ]);
24
+ //#endregion
25
+ export { t };
@@ -0,0 +1,17 @@
1
+ import { t as e } from "./createLucideIcon-C3pa2siy.js";
2
+ var t = e("triangle-alert", [
3
+ ["path", {
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",
5
+ key: "wmoenq"
6
+ }],
7
+ ["path", {
8
+ d: "M12 9v4",
9
+ key: "juzpu7"
10
+ }],
11
+ ["path", {
12
+ d: "M12 17h.01",
13
+ key: "p32p05"
14
+ }]
15
+ ]);
16
+ //#endregion
17
+ export { t };
@@ -0,0 +1,23 @@
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";
3
+ //#region src/composables/useCloudI18n.ts
4
+ function r(e, t) {
5
+ return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
6
+ }
7
+ function i(i) {
8
+ let a = i ?? e(n, null);
9
+ return {
10
+ t: a ? t(a) ? a.value : a : null,
11
+ format: r
12
+ };
13
+ }
14
+ function a(e) {
15
+ let { t, format: n } = i(e);
16
+ if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
17
+ return {
18
+ t,
19
+ format: n
20
+ };
21
+ }
22
+ //#endregion
23
+ export { a as n, i as t };