@aswin.dev/editor 0.6.3 → 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 (85) hide show
  1. package/README.md +3 -3
  2. package/dist/AccessibilityPanel-COL6Wm7p.js +108 -0
  3. package/dist/AiChatSidebar-DWGPVtvC.js +229 -0
  4. package/dist/AiFeatureMenu-duUFSfDf.js +63 -0
  5. package/dist/BlockA11yBadge-Qs6HtXid.js +34 -0
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/CollaboratorBar-Bw-lbt61.js +95 -0
  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-BSH7uNP_.js +276 -0
  12. package/dist/LoadingTrack-Ba2pfF57.js +10 -0
  13. package/dist/ModuleBrowserModal-6phxZSKI.js +206 -0
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/NumberWithSuffix-BpUzQOJt.js +422 -0
  16. package/dist/ParagraphEditor-DNSzAB-I.js +695 -0
  17. package/dist/RichTextEditorContent-CrqPQdnk.js +137 -0
  18. package/dist/SaveModuleDialog-zMQTpez7.js +123 -0
  19. package/dist/SnapshotHistory-Do-A5rYU.js +122 -0
  20. package/dist/TemplateScoringPanel-CS7o62zS.js +256 -0
  21. package/dist/TestEmailModal-DGj_9V1u.js +94 -0
  22. package/dist/TitleEditor-C7IDnAoS.js +172 -0
  23. package/dist/TplModal-BAsVzcTb.js +44 -0
  24. package/dist/_plugin-vue_export-helper-BVAJ4lgT.js +8 -0
  25. package/dist/accessibility-BU09xZrQ.js +27 -0
  26. package/dist/blockTypeIcons-C6LDKvmd.js +140 -0
  27. package/dist/bundle-stats.json +10 -0
  28. package/dist/check-DJrpDKO_.js +7 -0
  29. package/dist/chevron-down-C5oBUhT8.js +7 -0
  30. package/dist/chevron-right-BqCptpdp.js +10 -0
  31. package/dist/circle-alert-ZQQc98HC.js +25 -0
  32. package/dist/clock-ik2pRJKG.js +12 -0
  33. package/dist/cloud-6ZmAvF0j.js +1791 -0
  34. package/dist/createLucideIcon-ClREiSx3.js +43 -0
  35. package/dist/de-DWcgp-7T.js +729 -0
  36. package/dist/de-GOtR9DwW.js +207 -0
  37. package/dist/dist-BUzw1buG.js +35 -0
  38. package/dist/dist-BZyY-SS4.js +74 -0
  39. package/dist/dist-BadNx4qo.js +5 -0
  40. package/dist/dist-BesOh2mk.js +35 -0
  41. package/dist/dist-Bz3M4RXG.js +2082 -0
  42. package/dist/dist-C04s_fLA.js +563 -0
  43. package/dist/dist-C3T2AKtB.js +776 -0
  44. package/dist/dist-C9ckKEZL.js +519 -0
  45. package/dist/dist-CBItRG-Z.js +47 -0
  46. package/dist/dist-COSzWQUs.js +5 -0
  47. package/dist/dist-CivF9P8b.js +382 -0
  48. package/dist/dist-DXa1uAMh.js +10658 -0
  49. package/dist/dist-DtiDUrX-.js +189 -0
  50. package/dist/dist-Dzt5foyL.js +61 -0
  51. package/dist/emojiData-DrBuvEoP.js +17 -0
  52. package/dist/en-Cxd4fhNm.js +729 -0
  53. package/dist/en-dFFQVzNn.js +207 -0
  54. package/dist/extensions-D__hOlV1.js +799 -0
  55. package/dist/formatRelativeTime-BhhO8yCl.js +12 -0
  56. package/dist/image-up-DT7gcJLN.js +23 -0
  57. package/dist/index.d.ts +352 -0
  58. package/dist/info-BSPGcsSM.js +19 -0
  59. package/dist/keys-CvX8D-8C.js +10 -0
  60. package/dist/liquid.browser-BvCyLQII.js +3277 -0
  61. package/dist/loader-circle-Balo8p3d.js +7 -0
  62. package/dist/message-circle-B39qAHxs.js +7 -0
  63. package/dist/pencil-BZJPNYWR.js +10 -0
  64. package/dist/readableTextColor-DVuzNX1y.js +30 -0
  65. package/dist/refresh-cw-DwDqGUM0.js +29 -0
  66. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  67. package/dist/scan-line-CzfFJO1o.js +25 -0
  68. package/dist/send-D2eSo4GH.js +10 -0
  69. package/dist/shield-check-jkpgcC0-.js +10 -0
  70. package/dist/sparkles-Chm5CZfb.js +23 -0
  71. package/dist/style.css +2 -0
  72. package/dist/styleConstants-34eUKPOZ.js +55 -0
  73. package/dist/styles-B4tjX5SP.js +5224 -0
  74. package/dist/templatical-editor.js +312 -0
  75. package/dist/text-align-start-CzBnJsW8.js +43 -0
  76. package/dist/timeouts-BSGxjuUF.js +4 -0
  77. package/dist/trash-2-CtK2apEH.js +25 -0
  78. package/dist/triangle-alert-KpDVNbpn.js +17 -0
  79. package/dist/useCloudI18n-DOKSZql1.js +23 -0
  80. package/dist/useEditorCore-wslttMH-.js +9517 -0
  81. package/dist/useI18n-C2xQZ6K9.js +17 -0
  82. package/dist/useMergeTag-DX0XG5V9.js +34 -0
  83. package/dist/vue.runtime.esm-bundler-CjauPXjj.js +5775 -0
  84. package/dist/x-BkaOMosX.js +10 -0
  85. package/package.json +10 -10
@@ -0,0 +1,382 @@
1
+ import { $ as e, D as t, E as n, H as r, K as i, V as a, Y as o, Z as s, at as c, et as l, it as u, j as d, k as f, m as p, nt as m, q as h, st as g, tt as _, w as v } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
3
+ function y(e, t) {
4
+ return h() ? (s(e, t), !0) : !1;
5
+ }
6
+ var b = /* @__PURE__ */ new WeakMap(), x = (...e) => {
7
+ let r = e[0], i = v()?.proxy ?? h();
8
+ if (i == null && !n()) throw Error("injectLocal must be called in setup");
9
+ return i && b.has(i) && r in b.get(i) ? b.get(i)[r] : t(...e);
10
+ }, S = typeof window < "u" && typeof document < "u";
11
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
12
+ var ee = (e) => e != null, C = Object.prototype.toString, w = (e) => C.call(e) === "[object Object]", T = () => {}, E = /* @__PURE__ */ D();
13
+ function D() {
14
+ var e, t;
15
+ return S && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
16
+ }
17
+ function O(...t) {
18
+ if (t.length !== 1) return u(...t);
19
+ let n = t[0];
20
+ return typeof n == "function" ? e(i(() => ({
21
+ get: n,
22
+ set: T
23
+ }))) : l(n);
24
+ }
25
+ function k(e, t) {
26
+ function n(...n) {
27
+ return new Promise((r, i) => {
28
+ Promise.resolve(e(() => t.apply(this, n), {
29
+ fn: t,
30
+ thisArg: this,
31
+ args: n
32
+ })).then(r).catch(i);
33
+ });
34
+ }
35
+ return n;
36
+ }
37
+ var A = (e) => e();
38
+ function j(e, t = {}) {
39
+ let n, r, i = T, a = (e) => {
40
+ clearTimeout(e), i(), i = T;
41
+ }, o;
42
+ return (s) => {
43
+ let l = c(e), u = c(t.maxWait);
44
+ return n && a(n), l <= 0 || u !== void 0 && u <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, c) => {
45
+ i = t.rejectOnCancel ? c : e, o = s, u && !r && (r = setTimeout(() => {
46
+ n && a(n), r = void 0, e(o());
47
+ }, u)), n = setTimeout(() => {
48
+ r && a(r), r = void 0, e(s());
49
+ }, l);
50
+ });
51
+ };
52
+ }
53
+ function M(e) {
54
+ return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
55
+ }
56
+ function N(e) {
57
+ return Array.isArray(e) ? e : [e];
58
+ }
59
+ function te(e) {
60
+ return e || v();
61
+ }
62
+ function ne(e, t = 200, n = {}) {
63
+ return k(j(t, n), e);
64
+ }
65
+ function re(e, t, n = {}) {
66
+ let { eventFilter: r = A, ...i } = n;
67
+ return a(e, k(r, t), i);
68
+ }
69
+ function P(e, t = !0, n) {
70
+ te(n) ? d(e, n) : t ? e() : f(e);
71
+ }
72
+ function F(e, t = 1e3, n = {}) {
73
+ let { immediate: r = !0, immediateCallback: i = !1 } = n, s = null, l = m(!1);
74
+ function u() {
75
+ s &&= (clearInterval(s), null);
76
+ }
77
+ function d() {
78
+ l.value = !1, u();
79
+ }
80
+ function f() {
81
+ let n = c(t);
82
+ n <= 0 || (l.value = !0, i && e(), u(), l.value && (s = setInterval(e, n)));
83
+ }
84
+ return r && S && f(), (o(t) || typeof t == "function") && y(a(t, () => {
85
+ l.value && S && f();
86
+ })), y(d), {
87
+ isActive: _(l),
88
+ pause: d,
89
+ resume: f
90
+ };
91
+ }
92
+ function I(e, t, n = {}) {
93
+ let { immediate: r = !0, immediateCallback: i = !1 } = n, a = m(!1), o;
94
+ function s() {
95
+ o &&= (clearTimeout(o), void 0);
96
+ }
97
+ function l() {
98
+ a.value = !1, s();
99
+ }
100
+ function u(...n) {
101
+ i && e(), s(), a.value = !0, o = setTimeout(() => {
102
+ a.value = !1, o = void 0, e(...n);
103
+ }, c(t));
104
+ }
105
+ return r && (a.value = !0, S && u()), y(l), {
106
+ isPending: _(a),
107
+ start: u,
108
+ stop: l
109
+ };
110
+ }
111
+ function L(e = !1, t = {}) {
112
+ let { truthyValue: n = !0, falsyValue: r = !1 } = t, i = o(e), a = m(e);
113
+ function s(e) {
114
+ if (arguments.length) return a.value = e, a.value;
115
+ {
116
+ let e = c(n);
117
+ return a.value = a.value === e ? c(r) : e, a.value;
118
+ }
119
+ }
120
+ return i ? s : [a, s];
121
+ }
122
+ function R(e, t, n = {}) {
123
+ let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
124
+ return re(e, t, {
125
+ ...a,
126
+ eventFilter: j(r, { maxWait: i })
127
+ });
128
+ }
129
+ function z(e, t, n) {
130
+ return a(e, t, {
131
+ ...n,
132
+ immediate: !0
133
+ });
134
+ }
135
+ //#endregion
136
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.33_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
137
+ var B = S ? window : void 0;
138
+ S && window.document, S && window.navigator, S && window.location;
139
+ function V(e) {
140
+ let t = c(e);
141
+ return t?.$el ?? t;
142
+ }
143
+ function H(...e) {
144
+ let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = p(() => {
145
+ let t = N(c(e[0])).filter((e) => e != null);
146
+ return t.every((e) => typeof e != "string") ? t : void 0;
147
+ });
148
+ return z(() => [
149
+ n.value?.map((e) => V(e)) ?? [B].filter((e) => e != null),
150
+ N(c(n.value ? e[1] : e[0])),
151
+ N(g(n.value ? e[2] : e[1])),
152
+ c(n.value ? e[3] : e[2])
153
+ ], ([e, n, r, i], a, o) => {
154
+ if (!e?.length || !n?.length || !r?.length) return;
155
+ let s = w(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
156
+ o(() => {
157
+ c.forEach((e) => e());
158
+ });
159
+ }, { flush: "post" });
160
+ }
161
+ var U = !1;
162
+ function W(e, t, n = {}) {
163
+ let { window: r = B, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
164
+ if (!r) return s ? {
165
+ stop: T,
166
+ cancel: T,
167
+ trigger: T
168
+ } : T;
169
+ if (E && !U) {
170
+ U = !0;
171
+ let e = { passive: !0 };
172
+ Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", T, e)), r.document.documentElement.addEventListener("click", T, e);
173
+ }
174
+ let l = !0, u = (e) => c(i).some((t) => {
175
+ if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
176
+ {
177
+ let n = V(t);
178
+ return n && (e.target === n || e.composedPath().includes(n));
179
+ }
180
+ });
181
+ function d(e) {
182
+ let t = c(e);
183
+ return t && t.$.subTree.shapeFlag === 16;
184
+ }
185
+ function f(e, t) {
186
+ let n = c(e), r = n.$.subTree && n.$.subTree.children;
187
+ return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
188
+ }
189
+ let p = (n) => {
190
+ let r = V(e);
191
+ if (n.target != null && !(!(r instanceof Element) && d(e) && f(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
192
+ if ("detail" in n && n.detail === 0 && (l = !u(n)), !l) {
193
+ l = !0;
194
+ return;
195
+ }
196
+ t(n);
197
+ }
198
+ }, m = !1, h = [
199
+ H(r, "click", (e) => {
200
+ m || (m = !0, setTimeout(() => {
201
+ m = !1;
202
+ }, 0), p(e));
203
+ }, {
204
+ passive: !0,
205
+ capture: a
206
+ }),
207
+ H(r, "pointerdown", (t) => {
208
+ let n = V(e);
209
+ l = !u(t) && !!(n && !t.composedPath().includes(n));
210
+ }, { passive: !0 }),
211
+ o && H(r, "blur", (n) => {
212
+ setTimeout(() => {
213
+ let i = V(e);
214
+ r.document.activeElement?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
215
+ }, 0);
216
+ }, { passive: !0 })
217
+ ].filter(Boolean), g = () => h.forEach((e) => e());
218
+ return s ? {
219
+ stop: g,
220
+ cancel: () => {
221
+ l = !1;
222
+ },
223
+ trigger: (e) => {
224
+ l = !0, p(e), l = !1;
225
+ }
226
+ } : g;
227
+ }
228
+ function G() {
229
+ let e = m(!1), t = v();
230
+ return t && d(() => {
231
+ e.value = !0;
232
+ }, t), e;
233
+ }
234
+ /* @__NO_SIDE_EFFECTS__ */
235
+ function K(e) {
236
+ let t = G();
237
+ return p(() => (t.value, !!e()));
238
+ }
239
+ function q(e, t, n = {}) {
240
+ let { window: r = B, ...i } = n, o, s = /* @__PURE__ */ K(() => r && "MutationObserver" in r), l = () => {
241
+ o &&= (o.disconnect(), void 0);
242
+ }, u = a(p(() => {
243
+ let t = N(c(e)).map(V).filter(ee);
244
+ return new Set(t);
245
+ }), (e) => {
246
+ l(), s.value && e.size && (o = new MutationObserver(t), e.forEach((e) => o.observe(e, i)));
247
+ }, {
248
+ immediate: !0,
249
+ flush: "post"
250
+ }), d = () => o?.takeRecords(), f = () => {
251
+ u(), l();
252
+ };
253
+ return y(f), {
254
+ isSupported: s,
255
+ stop: f,
256
+ takeRecords: d
257
+ };
258
+ }
259
+ var J = Symbol("vueuse-ssr-width");
260
+ /* @__NO_SIDE_EFFECTS__ */
261
+ function Y() {
262
+ let e = n() ? x(J, null) : null;
263
+ return typeof e == "number" ? e : void 0;
264
+ }
265
+ function X(e, t = {}) {
266
+ let { window: n = B, ssrWidth: i = /* @__PURE__ */ Y() } = t, a = /* @__PURE__ */ K(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), o = m(typeof i == "number"), s = m(), l = m(!1);
267
+ return r(() => {
268
+ if (o.value) {
269
+ o.value = !a.value, l.value = c(e).split(",").some((e) => {
270
+ let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || r);
271
+ return n && a && (a = i >= M(n[1])), r && a && (a = i <= M(r[1])), t ? !a : a;
272
+ });
273
+ return;
274
+ }
275
+ a.value && (s.value = n.matchMedia(c(e)), l.value = s.value.matches);
276
+ }), H(s, "change", (e) => {
277
+ l.value = e.matches;
278
+ }, { passive: !0 }), p(() => l.value);
279
+ }
280
+ function ie(e, t, n = {}) {
281
+ let { window: r = B, ...i } = n, o, s = /* @__PURE__ */ K(() => r && "ResizeObserver" in r), l = () => {
282
+ o &&= (o.disconnect(), void 0);
283
+ }, u = a(p(() => {
284
+ let t = c(e);
285
+ return Array.isArray(t) ? t.map((e) => V(e)) : [V(t)];
286
+ }), (e) => {
287
+ if (l(), s.value && r) {
288
+ o = new ResizeObserver(t);
289
+ for (let t of e) t && o.observe(t, i);
290
+ }
291
+ }, {
292
+ immediate: !0,
293
+ flush: "post"
294
+ }), d = () => {
295
+ l(), u();
296
+ };
297
+ return y(d), {
298
+ isSupported: s,
299
+ stop: d
300
+ };
301
+ }
302
+ function ae(e, t = {}) {
303
+ let { reset: n = !0, windowResize: r = !0, windowScroll: i = !0, immediate: o = !0, updateTiming: s = "sync" } = t, c = m(0), l = m(0), u = m(0), d = m(0), f = m(0), p = m(0), h = m(0), g = m(0);
304
+ function _() {
305
+ let t = V(e);
306
+ if (!t) {
307
+ n && (c.value = 0, l.value = 0, u.value = 0, d.value = 0, f.value = 0, p.value = 0, h.value = 0, g.value = 0);
308
+ return;
309
+ }
310
+ let r = t.getBoundingClientRect();
311
+ c.value = r.height, l.value = r.bottom, u.value = r.left, d.value = r.right, f.value = r.top, p.value = r.width, h.value = r.x, g.value = r.y;
312
+ }
313
+ function v() {
314
+ s === "sync" ? _() : s === "next-frame" && requestAnimationFrame(() => _());
315
+ }
316
+ return ie(e, v), a(() => V(e), (e) => !e && v()), q(e, v, { attributeFilter: ["style", "class"] }), i && H("scroll", v, {
317
+ capture: !0,
318
+ passive: !0
319
+ }), r && H("resize", v, { passive: !0 }), P(() => {
320
+ o && v();
321
+ }), {
322
+ height: c,
323
+ bottom: l,
324
+ left: u,
325
+ right: d,
326
+ top: f,
327
+ width: p,
328
+ x: h,
329
+ y: g,
330
+ update: v
331
+ };
332
+ }
333
+ function Z(e) {
334
+ return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
335
+ }
336
+ function oe(e) {
337
+ let t = X("(prefers-reduced-motion: reduce)", e);
338
+ return p(() => t.value ? "reduce" : "no-preference");
339
+ }
340
+ function Q(e) {
341
+ let t = window.getComputedStyle(e);
342
+ if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
343
+ {
344
+ let t = e.parentNode;
345
+ return !t || t.tagName === "BODY" ? !1 : Q(t);
346
+ }
347
+ }
348
+ function se(e) {
349
+ let t = e || window.event, n = t.target;
350
+ return Q(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
351
+ }
352
+ var $ = /* @__PURE__ */ new WeakMap();
353
+ function ce(e, t = !1) {
354
+ let n = m(t), r = null, i = "";
355
+ a(O(e), (e) => {
356
+ let t = Z(c(e));
357
+ if (t) {
358
+ let e = t;
359
+ if ($.get(e) || $.set(e, e.style.overflow), e.style.overflow !== "hidden" && (i = e.style.overflow), e.style.overflow === "hidden") return n.value = !0;
360
+ if (n.value) return e.style.overflow = "hidden";
361
+ }
362
+ }, { immediate: !0 });
363
+ let o = () => {
364
+ let t = Z(c(e));
365
+ !t || n.value || (E && (r = H(t, "touchmove", (e) => {
366
+ se(e);
367
+ }, { passive: !1 })), t.style.overflow = "hidden", n.value = !0);
368
+ }, s = () => {
369
+ let t = Z(c(e));
370
+ !t || !n.value || (E && r?.(), t.style.overflow = i, $.delete(t), n.value = !1);
371
+ };
372
+ return y(s), p({
373
+ get() {
374
+ return n.value;
375
+ },
376
+ set(e) {
377
+ e ? o() : s();
378
+ }
379
+ });
380
+ }
381
+ //#endregion
382
+ export { oe as a, F as c, R as d, X as i, I as l, ae as n, ce as o, H as r, ne as s, W as t, L as u };