@boxcc/maildeno-editor 0.0.0-stage → 0.4.13

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 (57) hide show
  1. package/CHANGELOG.md +479 -0
  2. package/README.md +441 -2
  3. package/dist/DatePicker-AdfGW0Tw.js +5347 -0
  4. package/dist/DatePicker-aNFlsoOb.js +5347 -0
  5. package/dist/Dialog-By0JLN8s.js +6294 -0
  6. package/dist/HealthIndicator-4Iw6N-g_.js +1216 -0
  7. package/dist/HealthIndicator-ZohgzF2_.js +1217 -0
  8. package/dist/PopperContent-N2nAEFeH.js +2538 -0
  9. package/dist/PopperContent-eLmz1Gjd.js +2578 -0
  10. package/dist/PreviewCanvas-DzpLghCo.js +534 -0
  11. package/dist/PreviewCanvas-QN4C68KA.js +534 -0
  12. package/dist/RichTextEditor-CmM4XRFC.js +12218 -0
  13. package/dist/RichTextEditor-Cz1-_ZtA.js +12217 -0
  14. package/dist/RowPreviewChildren-BYaMZID3.js +4 -0
  15. package/dist/RowPreviewChildren-_A9gPQCs.js +4 -0
  16. package/dist/RowPreviewLegacyComponent-Df_1HTly.js +403 -0
  17. package/dist/RowPreviewLegacyComponent-NECG3wpn.js +403 -0
  18. package/dist/RowPreviewRow-DPaSbxmB.js +81 -0
  19. package/dist/RowPreviewRow-Dx4ExtSN.js +81 -0
  20. package/dist/SavedRowsPanel-DqSHB6Jk.js +492 -0
  21. package/dist/SavedRowsPanel-DyXjSOEt.js +493 -0
  22. package/dist/_plugin-vue_export-helper-Dj7HTbfw.js +8 -0
  23. package/dist/adapters/errors.d.ts +59 -0
  24. package/dist/adapters/localStorageAdapter.d.ts +6 -0
  25. package/dist/adapters/types.d.ts +151 -0
  26. package/dist/babel-DV7WPQI0.js +10043 -0
  27. package/dist/blocks/registry.d.ts +23 -0
  28. package/dist/blocks/types.d.ts +73 -0
  29. package/dist/borderRadius-CkSa1lQ9.js +75 -0
  30. package/dist/components/features/emailBuilder/EmailEditor.vue.d.ts +182 -0
  31. package/dist/composables/emailBuilder/export/logic/espLogicWrapper.d.ts +76 -0
  32. package/dist/composables/emailBuilder/persistence/useEmailBuilderPersistence.d.ts +38 -0
  33. package/dist/composables/emailBuilder/transform/pipeline/optimize.d.ts +100 -0
  34. package/dist/composables/system/useColorScheme.d.ts +16 -0
  35. package/dist/element-B3gq8Xvd.js +21500 -0
  36. package/dist/element.d.ts +6 -0
  37. package/dist/element.js +5 -0
  38. package/dist/esp/registry.d.ts +33 -0
  39. package/dist/estree-DY9POgc0.js +8195 -0
  40. package/dist/html-wb0gSX1o.js +7273 -0
  41. package/dist/index.d.ts +17 -0
  42. package/dist/index.js +14992 -0
  43. package/dist/init.d.ts +178 -0
  44. package/dist/init.js +137 -0
  45. package/dist/maildeno-editor.css +2 -0
  46. package/dist/merge-tags/registry.d.ts +33 -0
  47. package/dist/mergeTagDefinitions-Cler19nv.js +27 -0
  48. package/dist/standalone-DHvJ30Td.js +3554 -0
  49. package/dist/theme.d.ts +206 -0
  50. package/dist/types/assistant.d.ts +56 -0
  51. package/dist/useEmailBuilder-B19p-2yp.js +4924 -0
  52. package/dist/useEmailBuilder-BR4wfai1.js +4924 -0
  53. package/dist/useToast-DD11IxqP.js +194 -0
  54. package/dist/utils/border.d.ts +15 -0
  55. package/dist/utils/borderRadius.d.ts +10 -0
  56. package/dist/vue.runtime.esm-bundler-D2AjRP90.js +6117 -0
  57. package/package.json +100 -4
@@ -0,0 +1,492 @@
1
+ import { C as G, K as O, L as s, M as ge, N as xe, P as ne, S as V, T as K, X as Z, Z as he, _ as H, f as S, g as t, gt as Q, h as R, l as ee, mt as T, n as be, r as we, s as ye, st as b, u as M, v as W, vt as I, w as te, y as d, yt as z, z as j } from "./vue.runtime.esm-bundler-D2AjRP90.js";
2
+ import { J as ke, K as _e, V as Ce, Y as Re, l as Se, q as $e, u as re } from "./element-B3gq8Xvd.js";
3
+ import { R as Pe, U as Te, _ as Ie, n as De } from "./useEmailBuilder-BR4wfai1.js";
4
+ import { o as oe, r as ae } from "./borderRadius-CkSa1lQ9.js";
5
+ var Fe = {
6
+ key: 1,
7
+ style: {
8
+ height: "4px",
9
+ width: "100%"
10
+ }
11
+ }, Me = /* @__PURE__ */ K({
12
+ __name: "RowPreviewChildren",
13
+ props: {
14
+ children: {},
15
+ scale: {},
16
+ depth: {}
17
+ },
18
+ setup(m) {
19
+ const w = te(() => import("./RowPreviewRow-Dx4ExtSN.js")), k = te(() => import("./RowPreviewLegacyComponent-NECG3wpn.js"));
20
+ function f(v) {
21
+ const g = v?.backgroundGradient;
22
+ if (g?.useGradient === !0 && Array.isArray(g?.gradient?.colors) && g.gradient.colors.length >= 2) {
23
+ const { type: c, direction: _, colors: D } = g.gradient, $ = D.map((r) => `${r.color} ${r.position}%`).join(", ");
24
+ return c === "radial" ? `radial-gradient(circle at center, ${$})` : `linear-gradient(${_}, ${$})`;
25
+ }
26
+ return v?.backgroundColor ?? v?.props?.backgroundColor ?? "transparent";
27
+ }
28
+ function p(v) {
29
+ return v.height ?? v.props?.height ?? 8;
30
+ }
31
+ return (v, g) => (s(!0), d(S, null, j(m.children, (c, _) => (s(), d(S, { key: c.id }, [(m.depth ?? 0) < 5 ? (s(), d(S, { key: 0 }, [c.type === "row" ? (s(), H(T(w), {
32
+ key: 0,
33
+ row: c,
34
+ scale: m.scale,
35
+ depth: (m.depth ?? 0) + 1
36
+ }, null, 8, [
37
+ "row",
38
+ "scale",
39
+ "depth"
40
+ ])) : c.type === "row-spacer" ? (s(), d("div", {
41
+ key: 1,
42
+ style: I({
43
+ width: "100%",
44
+ height: p(c) + "px",
45
+ background: f(c),
46
+ flexShrink: "0"
47
+ })
48
+ }, null, 4)) : c.type === "component" ? (s(), H(T(k), {
49
+ key: 2,
50
+ comp: {
51
+ ...c,
52
+ type: c.componentType ?? c.type
53
+ },
54
+ scale: m.scale
55
+ }, null, 8, ["comp", "scale"])) : (s(), H(T(k), {
56
+ key: 3,
57
+ comp: c,
58
+ scale: m.scale
59
+ }, null, 8, ["comp", "scale"]))], 64)) : (s(), d("div", Fe))], 64))), 128));
60
+ }
61
+ }), ze = Me, je = {
62
+ key: 0,
63
+ class: "w-full border border-dashed border-(--md-border) rounded",
64
+ style: { "min-height": "10px" }
65
+ }, Be = /* @__PURE__ */ K({
66
+ __name: "RowPreview",
67
+ props: {
68
+ row: {},
69
+ scale: {}
70
+ },
71
+ setup(m) {
72
+ const w = m, { WEB_SAFE_FONTS: k, FONTS_WITH_ITALICS: f, DEFAULT_WEIGHTS: p } = Ie(), v = (r) => {
73
+ const i = r?.backgroundGradient;
74
+ if (i?.useGradient === !0 && Array.isArray(i?.gradient?.colors) && i.gradient.colors.length >= 2) {
75
+ const { type: l, direction: u, colors: x } = i.gradient, h = x.map((y) => `${y.color} ${y.position}%`).join(", ");
76
+ return l === "radial" ? `radial-gradient(circle at center, ${h})` : `linear-gradient(${u}, ${h})`;
77
+ }
78
+ return r?.backgroundColor || "transparent";
79
+ }, g = (r) => {
80
+ if (f.has(r)) {
81
+ const i = p.map((u) => `0,${u}`), l = p.map((u) => `1,${u}`);
82
+ return `ital,wght@${[...i, ...l].join(";")}`;
83
+ }
84
+ return `wght@${p.join(";")}`;
85
+ }, c = (r) => {
86
+ if (!r || typeof document > "u" || k.has(r)) return;
87
+ const i = `https://fonts.googleapis.com/css2?family=${r.trim().replace(/\s+/g, "+")}:${g(r)}&display=swap`;
88
+ if (!document.querySelector(`link[href="${i}"]`)) {
89
+ const l = document.createElement("link");
90
+ l.rel = "stylesheet", l.href = i, document.head.appendChild(l);
91
+ }
92
+ }, _ = () => {
93
+ function r(i) {
94
+ for (const l of i) if (l.type === "row") for (const u of l.columns ?? []) r(u.children ?? u.components ?? []);
95
+ else {
96
+ const u = l.props;
97
+ if (!u?.fontFamily) continue;
98
+ const x = l.componentType ?? l.type;
99
+ [
100
+ "heading",
101
+ "paragraph",
102
+ "list",
103
+ "menu",
104
+ "button",
105
+ "anchor"
106
+ ].includes(x) && c(u.fontFamily);
107
+ }
108
+ }
109
+ for (const i of w.row.columns ?? []) r(i.children ?? i.components ?? []);
110
+ };
111
+ O(() => w.row, () => _(), {
112
+ deep: !0,
113
+ immediate: !0
114
+ }), ne(() => _());
115
+ const D = R(() => {
116
+ const r = w.row, i = {
117
+ display: "flex",
118
+ flexDirection: "row",
119
+ background: v(r),
120
+ padding: `${r.padding?.top ?? 0}px ${r.padding?.right ?? 0}px ${r.padding?.bottom ?? 0}px ${r.padding?.left ?? 0}px`,
121
+ alignItems: "stretch",
122
+ ...oe(r.border),
123
+ borderRadius: ae(r.border?.radius ?? 0),
124
+ gap: `${r.gap ?? 0}px`
125
+ };
126
+ return r.backgroundImage && (i.backgroundImage = `url(${r.backgroundImage})`, i.backgroundSize = r.backgroundSize || "cover", i.backgroundPosition = r.backgroundPosition || "center center"), i;
127
+ });
128
+ function $(r, i) {
129
+ const l = {
130
+ top: "flex-start",
131
+ middle: "center",
132
+ bottom: "flex-end"
133
+ }, u = r.width ?? 100, x = i?.columns?.length || 1, h = i?.gap ?? 0, y = x > 1 ? h * (x - 1) / x : 0, F = y > 0 ? `calc(${u}% - ${y}px)` : `${u}%`, C = {
134
+ flex: `0 0 ${F}`,
135
+ width: F,
136
+ maxWidth: F,
137
+ boxSizing: "border-box",
138
+ background: v(r),
139
+ padding: `${r.padding?.top ?? 10}px ${r.padding?.right ?? 10}px ${r.padding?.bottom ?? 10}px ${r.padding?.left ?? 10}px`,
140
+ ...oe(r.border),
141
+ borderRadius: ae(r.border?.radius ?? 0),
142
+ overflow: "hidden",
143
+ minWidth: "0",
144
+ display: "flex",
145
+ flexDirection: "column",
146
+ justifyContent: l[r.verticalAlign] || "flex-start"
147
+ };
148
+ return r.backgroundImage && (C.backgroundImage = `url(${r.backgroundImage})`, C.backgroundSize = r.backgroundSize || "cover", C.backgroundPosition = r.backgroundPosition || "center center", C.minHeight = "14px"), C;
149
+ }
150
+ return (r, i) => (s(), d("div", {
151
+ style: I(D.value),
152
+ class: "flex w-full pointer-events-none select-none"
153
+ }, [(s(!0), d(S, null, j(m.row.columns, (l) => (s(), d("div", {
154
+ key: l.id,
155
+ style: I($(l, m.row)),
156
+ class: "overflow-hidden shrink-0"
157
+ }, [G(ze, {
158
+ children: l.children ?? l.components ?? [],
159
+ scale: m.scale,
160
+ depth: 0
161
+ }, null, 8, ["children", "scale"]), (l.children ?? l.components ?? []).length === 0 ? (s(), d("div", je)) : W("", !0)], 4))), 128))], 4));
162
+ }
163
+ }), Ae = Be, Ee = {
164
+ key: 0,
165
+ class: "w-65 sticky top-16 h-[calc(100vh-5.25rem)] z-80"
166
+ }, Le = { class: "bg-(--md-surface) flex flex-col h-full border-r border-(--md-border)/80" }, He = { class: "flex items-center justify-between px-3.5 py-3 shrink-0" }, Ne = { class: "relative group/close" }, Ve = { class: "px-3.5 pb-2 shrink-0" }, Ge = {
167
+ key: 0,
168
+ class: "flex items-center gap-1"
169
+ }, Oe = ["aria-pressed", "onClick"], We = {
170
+ key: 1,
171
+ class: "text-[11px] font-medium text-(--md-text-subtle)"
172
+ }, Ke = { class: "flex-1 min-h-0 overflow-y-auto" }, Ue = {
173
+ key: 0,
174
+ class: "p-2 flex flex-col gap-2"
175
+ }, qe = {
176
+ key: 1,
177
+ class: "flex flex-col items-center gap-3 px-5 py-12 text-center"
178
+ }, Ye = {
179
+ key: 2,
180
+ class: "p-2 flex flex-col gap-1.5"
181
+ }, Je = ["onClick", "onDragstart"], Xe = ["onDblclick"], Ze = ["onBlur", "onKeyup"], Qe = { class: "text-[10px] text-(--md-text-subtle) shrink-0 tabular-nums" }, et = {
182
+ key: 2,
183
+ class: "relative group/del"
184
+ }, tt = ["onClick"], rt = {
185
+ key: 1,
186
+ class: "flex items-center gap-1.5 px-2 py-1.5"
187
+ }, ot = { class: "flex-1 text-[11px] font-medium text-(--md-text-muted) truncate" }, at = { class: "text-[10px] text-(--md-text-subtle) shrink-0 tabular-nums" }, st = 600, se = 25, nt = /* @__PURE__ */ K({
188
+ __name: "SavedRowsPanel",
189
+ setup(m) {
190
+ const { isOpen: w, close: k } = Re(), f = $e(), p = _e(), v = Pe(), g = Se(), c = Te(), { rows: _, saveToHistoryImmediate: D } = De(), { startLayoutDrag: $, endLayoutDrag: r } = ke(), i = {
191
+ rows: p.systemRows,
192
+ isFetching: p.isFetching,
193
+ ensureFetched: () => p.fetchRows(),
194
+ rename: () => {
195
+ throw new Error("Shared rows are read-only");
196
+ },
197
+ remove: () => {
198
+ throw new Error("Shared rows are read-only");
199
+ },
200
+ cloneForCanvas: (o) => p.cloneRowForCanvas(o)
201
+ }, l = {
202
+ rows: f.productRows,
203
+ isFetching: f.isFetching,
204
+ ensureFetched: () => f.fetchRows(),
205
+ rename: (o, e) => f.renameProductRow(o, e),
206
+ remove: (o) => f.deleteProductRow(o),
207
+ cloneForCanvas: (o) => f.cloneRowForCanvas(o)
208
+ }, u = b("user"), x = R(() => p.isSupported.value && p.systemRows.value.length > 0);
209
+ O(x, (o) => {
210
+ !o && u.value === "system" && (u.value = "user");
211
+ });
212
+ const h = R(() => u.value === "system" && x.value ? i : l), y = R(() => u.value === "system"), F = R(() => !y.value && c.value.rename !== !1), C = R(() => !y.value && c.value.delete !== !1);
213
+ O(w, async (o) => {
214
+ o && await Promise.all([f.fetchRows(), p.fetchRows()]);
215
+ }, { immediate: !0 });
216
+ const ie = R(() => h.value.rows.value), N = b(null);
217
+ function le(o, e) {
218
+ N.value = e, $(o, {
219
+ type: "product-row",
220
+ entryId: e
221
+ });
222
+ }
223
+ function de() {
224
+ N.value = null, r();
225
+ }
226
+ const U = b({}), q = b({});
227
+ function Y(o) {
228
+ const e = U.value[o];
229
+ return e && e > 0 ? e / st : 0;
230
+ }
231
+ function ue(o) {
232
+ const e = q.value[o];
233
+ return e ? Math.max(se, Math.round(e * Y(o))) : se;
234
+ }
235
+ const B = b(null), A = b(null);
236
+ function ce(o, e) {
237
+ !o || !B.value || (o.dataset.entryId = e, B.value.observe(o));
238
+ }
239
+ function pe(o, e) {
240
+ !o || !A.value || (o.dataset.entryId = e, A.value.observe(o));
241
+ }
242
+ ne(() => {
243
+ B.value = new ResizeObserver((o) => {
244
+ for (const e of o) {
245
+ const a = e.target.dataset.entryId;
246
+ if (a) {
247
+ const n = e.contentRect.width;
248
+ n > 0 && (U.value[a] = n);
249
+ }
250
+ }
251
+ }), A.value = new ResizeObserver((o) => {
252
+ for (const e of o) {
253
+ const a = e.target.dataset.entryId;
254
+ if (a) {
255
+ const n = e.borderBoxSize?.[0]?.blockSize ?? e.contentRect.height;
256
+ n > 0 && (q.value[a] = n);
257
+ }
258
+ }
259
+ });
260
+ }), xe(() => {
261
+ B.value?.disconnect(), A.value?.disconnect();
262
+ });
263
+ function me(o) {
264
+ if (P.value === o) return;
265
+ const e = h.value.cloneForCanvas(o);
266
+ e && (_.value.push(e), D("add-product-row"));
267
+ }
268
+ function ve(o) {
269
+ v.require({
270
+ message: "Remove this product row from the library?",
271
+ header: "Clear product",
272
+ acceptLabel: "Yes",
273
+ rejectLabel: "Cancel",
274
+ acceptClass: "!bg-[var(--md-danger)] !hover:opacity-90 !border-[var(--md-danger)] !px-6 !py-2",
275
+ rejectClass: "!bg-[var(--md-border)] !hover:bg-[var(--md-border-strong)] !text-[var(--md-text)] !border-[var(--md-border)] !px-6 !py-2",
276
+ accept: async () => {
277
+ try {
278
+ await h.value.remove(o);
279
+ } catch (e) {
280
+ console.error("[maildeno-editor] failed to delete saved row:", e), re(e) || g.add({
281
+ severity: "error",
282
+ summary: "Delete failed",
283
+ detail: "That row couldn't be removed.",
284
+ life: 4e3
285
+ });
286
+ }
287
+ },
288
+ reject: () => {
289
+ }
290
+ });
291
+ }
292
+ const P = b(null), E = b(""), L = b(null);
293
+ function fe(o) {
294
+ P.value = o.id, E.value = o.name, ge(() => {
295
+ (Array.isArray(L.value) ? L.value[0] : L.value)?.focus();
296
+ });
297
+ }
298
+ async function J(o) {
299
+ const e = "Saved";
300
+ if (P.value === o) {
301
+ const a = E.value.trim().toLowerCase().replace(/\s+/g, "_").replace(/[^a-z0-9_]/g, "");
302
+ try {
303
+ const n = await h.value.rename(o, a);
304
+ P.value = null, g.add({
305
+ severity: n ? "success" : "error",
306
+ summary: n ? "Rename successful" : "Save failed",
307
+ detail: n ? e : "Please try again",
308
+ life: 3e3
309
+ });
310
+ } catch (n) {
311
+ console.error("[maildeno-editor] failed to rename saved row:", n), re(n) || g.add({
312
+ severity: "error",
313
+ summary: "Rename failed",
314
+ detail: "Please try again",
315
+ life: 4e3
316
+ });
317
+ }
318
+ }
319
+ }
320
+ function X(o) {
321
+ return new Date(o).toLocaleDateString(void 0, {
322
+ month: "short",
323
+ day: "numeric"
324
+ });
325
+ }
326
+ return (o, e) => (s(), H(be, { name: "panel-slide" }, {
327
+ default: Z(() => [T(w) ? (s(), d("div", Ee, [t("div", Le, [
328
+ t("div", He, [e[8] || (e[8] = t("div", { class: "flex items-center gap-2" }, [t("svg", {
329
+ class: "w-3.5 h-3.5 text-(--md-text-subtle)",
330
+ viewBox: "0 0 24 24",
331
+ fill: "none",
332
+ stroke: "currentColor",
333
+ "stroke-width": "2",
334
+ "stroke-linecap": "round",
335
+ "stroke-linejoin": "round"
336
+ }, [t("path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" })]), t("span", { class: "text-[11px] font-semibold text-(--md-text-subtle) uppercase tracking-[.08em]" }, " Saved Rows ")], -1)), t("div", Ne, [t("button", {
337
+ onClick: e[0] || (e[0] = (...a) => T(k) && T(k)(...a)),
338
+ class: "w-6 h-6 flex items-center justify-center rounded-md text-(--md-text-subtle) hover:text-(--md-text-muted) hover:bg-(--md-surface-muted) transition-colors focus:outline-none"
339
+ }, [...e[6] || (e[6] = [t("svg", {
340
+ class: "w-3.5 h-3.5",
341
+ viewBox: "0 0 24 24",
342
+ fill: "none",
343
+ stroke: "currentColor",
344
+ "stroke-width": "2",
345
+ "stroke-linecap": "round",
346
+ "stroke-linejoin": "round"
347
+ }, [t("path", { d: "M18 6 6 18M6 6l12 12" })], -1)])]), e[7] || (e[7] = t("div", { class: "pointer-events-none absolute right-0 top-full mt-1.5 px-2 py-1 bg-(--md-tooltip-bg) text-(--md-tooltip-text) text-[10px] font-medium rounded-md whitespace-nowrap opacity-0 group-hover/close:opacity-100 -translate-y-0.5 group-hover/close:translate-y-0 transition-all duration-150 z-50 after:content-[''] after:absolute after:bottom-full after:right-2 after:border-4 after:border-transparent after:border-b-(--md-tooltip-bg)" }, " Close panel ", -1))])]),
348
+ t("div", Ve, [x.value ? (s(), d("div", Ge, [(s(), d(S, null, j(["user", "system"], (a) => t("button", {
349
+ key: a,
350
+ type: "button",
351
+ class: Q(["px-2 py-1 rounded-md text-[11px] font-medium transition-colors", u.value === a ? "bg-(--md-accent-bg) text-(--md-accent-text)" : "text-(--md-text-subtle) hover:text-(--md-text-muted) hover:bg-(--md-surface-muted)"]),
352
+ "aria-pressed": u.value === a,
353
+ onClick: (n) => u.value = a
354
+ }, z(a === "user" ? "My Rows" : "Shared"), 11, Oe)), 64))])) : (s(), d("span", We, "My Rows"))]),
355
+ t("div", Ke, [h.value.isFetching.value ? (s(), d("div", Ue, [(s(), d(S, null, j(3, (a) => t("div", {
356
+ key: a,
357
+ class: "rounded-lg border border-(--md-border) overflow-hidden"
358
+ }, [t("div", {
359
+ class: "bg-(--md-surface-muted) animate-pulse",
360
+ style: I({ height: 80 + a * 20 + "px" })
361
+ }, null, 4), e[9] || (e[9] = t("div", { class: "flex items-center gap-2 px-2.5 py-2" }, [t("div", { class: "h-2 flex-1 rounded-full bg-(--md-surface-muted) animate-pulse" }), t("div", { class: "h-2 w-7 rounded-full bg-(--md-surface-muted) animate-pulse" })], -1))])), 64))])) : h.value.rows.value.length === 0 ? (s(), d("div", qe, [...e[10] || (e[10] = [t("div", { class: "w-10 h-10 rounded-xl bg-(--md-surface-hover) border border-(--md-border)/80 flex items-center justify-center" }, [t("svg", {
362
+ class: "w-5 h-5 text-(--md-text-subtle)",
363
+ viewBox: "0 0 24 24",
364
+ fill: "none",
365
+ stroke: "currentColor",
366
+ "stroke-width": "1.5",
367
+ "stroke-linecap": "round",
368
+ "stroke-linejoin": "round"
369
+ }, [t("path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" })])], -1), t("div", { class: "space-y-1" }, [t("p", { class: "text-xs font-medium text-(--md-text-subtle)" }, " No saved rows yet "), t("p", { class: "text-[11px] text-(--md-text-subtle) leading-relaxed" }, [
370
+ V(" Select a row on the canvas,"),
371
+ t("br"),
372
+ V("then click "),
373
+ t("span", { class: "text-(--md-row-selection-fg) font-medium" }, "Save"),
374
+ V(" in the toolbar. ")
375
+ ])], -1)])])) : (s(), d("div", Ye, [G(we, { name: "row-list" }, {
376
+ default: Z(() => [(s(!0), d(S, null, j(ie.value, (a) => (s(), d("div", {
377
+ key: a.id,
378
+ draggable: "true",
379
+ class: Q(["group relative rounded-lg border bg-(--md-surface) overflow-hidden transition-all duration-150 select-none cursor-grab active:cursor-grabbing", [N.value === a.id ? "ring-2 ring-(--md-row-selection) ring-offset-1 opacity-60 border-(--md-row-selection)" : "border-(--md-border)/80 hover:border-(--md-border-strong) hover:shadow-[0_2px_8px_rgba(0,0,0,0.07)]"]]),
380
+ onClick: (n) => me(a.id),
381
+ onDragstart: (n) => le(n, a.id),
382
+ onDragend: de
383
+ }, [t("div", {
384
+ ref_for: !0,
385
+ ref: (n) => ce(n, a.id),
386
+ class: "relative overflow-hidden border-b border-(--md-border)",
387
+ style: I({
388
+ height: ue(a.id) + "px",
389
+ backgroundColor: a.row.backgroundColor || "#f9fafb"
390
+ })
391
+ }, [t("div", {
392
+ ref_for: !0,
393
+ ref: (n) => pe(n, a.id),
394
+ class: "absolute top-0 left-0 pointer-events-none",
395
+ style: I({
396
+ width: "600px",
397
+ transformOrigin: "top left",
398
+ transform: `scale(${Y(a.id)})`
399
+ })
400
+ }, [G(Ae, { row: a.row }, null, 8, ["row"])], 4), e[11] || (e[11] = t("div", { class: "absolute inset-0 bg-(--md-text)/0 group-hover:bg-(--md-text)/[0.03] transition-colors duration-150 flex items-center justify-center" }, [t("div", { class: "opacity-0 group-hover:opacity-100 transition-opacity duration-150 flex items-center gap-1.5 bg-(--md-surface)/90 backdrop-blur-sm border border-(--md-border) rounded-full px-2.5 py-1 shadow-sm" }, [t("svg", {
401
+ class: "w-3 h-3 text-(--md-text-subtle)",
402
+ viewBox: "0 0 24 24",
403
+ fill: "none",
404
+ stroke: "currentColor",
405
+ "stroke-width": "2",
406
+ "stroke-linecap": "round",
407
+ "stroke-linejoin": "round"
408
+ }, [t("path", { d: "M12 5v14M5 12l7-7 7 7" })]), t("span", { class: "text-[10px] font-medium text-(--md-text-muted)" }, "Click to insert")])], -1))], 4), F.value ? (s(), d("div", {
409
+ key: 0,
410
+ onClick: e[5] || (e[5] = M(() => {
411
+ }, ["stop"])),
412
+ class: "flex items-center gap-1.5 px-2 py-1.5"
413
+ }, [
414
+ e[14] || (e[14] = t("div", { class: "shrink-0 text-(--md-text-subtle) group-hover:text-(--md-text-muted) transition-colors cursor-grab active:cursor-grabbing" }, [t("svg", {
415
+ class: "w-3 h-3",
416
+ viewBox: "0 0 16 16",
417
+ fill: "currentColor"
418
+ }, [
419
+ t("circle", {
420
+ cx: "5",
421
+ cy: "4",
422
+ r: "1.2"
423
+ }),
424
+ t("circle", {
425
+ cx: "11",
426
+ cy: "4",
427
+ r: "1.2"
428
+ }),
429
+ t("circle", {
430
+ cx: "5",
431
+ cy: "8",
432
+ r: "1.2"
433
+ }),
434
+ t("circle", {
435
+ cx: "11",
436
+ cy: "8",
437
+ r: "1.2"
438
+ }),
439
+ t("circle", {
440
+ cx: "5",
441
+ cy: "12",
442
+ r: "1.2"
443
+ }),
444
+ t("circle", {
445
+ cx: "11",
446
+ cy: "12",
447
+ r: "1.2"
448
+ })
449
+ ])], -1)),
450
+ P.value !== a.id ? (s(), d("span", {
451
+ key: 0,
452
+ onDblclick: M((n) => fe(a), ["stop"]),
453
+ onClick: e[1] || (e[1] = M(() => {
454
+ }, ["stop"])),
455
+ class: "flex-1 text-[11px] font-medium text-(--md-text-muted) truncate cursor-text"
456
+ }, z(a.name), 41, Xe)) : he((s(), d("input", {
457
+ key: 1,
458
+ "onUpdate:modelValue": e[2] || (e[2] = (n) => E.value = n),
459
+ onBlur: (n) => J(a.id),
460
+ onKeyup: [ee((n) => J(a.id), ["enter"]), e[3] || (e[3] = ee((n) => P.value = null, ["escape"]))],
461
+ onClick: e[4] || (e[4] = M(() => {
462
+ }, ["stop"])),
463
+ class: "flex-1 text-[11px] text-(--md-text) border border-(--md-row-selection) bg-(--md-row-selection-bg)/40 rounded-md px-1.5 py-0.5 focus:outline-none focus:border-(--md-row-selection)",
464
+ ref_for: !0,
465
+ ref_key: "renameInputRef",
466
+ ref: L
467
+ }, null, 40, Ze)), [[ye, E.value]]),
468
+ t("span", Qe, z(X(a.createdAt)), 1),
469
+ C.value ? (s(), d("div", et, [t("button", {
470
+ onClick: M((n) => ve(a.id), ["stop"]),
471
+ class: "hidden group-hover:flex items-center justify-center w-5 h-5 shrink-0 rounded-md text-(--md-text-subtle) hover:text-(--md-danger) hover:bg-(--md-danger-bg) transition-colors focus:outline-none"
472
+ }, [...e[12] || (e[12] = [t("svg", {
473
+ class: "w-3 h-3",
474
+ viewBox: "0 0 24 24",
475
+ fill: "none",
476
+ stroke: "currentColor",
477
+ "stroke-width": "1.75",
478
+ "stroke-linecap": "round",
479
+ "stroke-linejoin": "round"
480
+ }, [t("path", { d: "M3 6h18M8 6V4h8v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), t("path", { d: "M10 11v6M14 11v6" })], -1)])], 8, tt), e[13] || (e[13] = t("div", { class: "pointer-events-none absolute bottom-full right-0 mb-1.5 px-2 py-1 bg-(--md-tooltip-bg) text-(--md-tooltip-text) text-[10px] font-medium rounded-md whitespace-nowrap opacity-0 group-hover/del:opacity-100 translate-y-0.5 group-hover/del:translate-y-0 transition-all duration-150 z-50 after:content-[''] after:absolute after:top-full after:right-2 after:border-4 after:border-transparent after:border-t-(--md-tooltip-bg)" }, " Remove ", -1))])) : W("", !0)
481
+ ])) : (s(), d("div", rt, [t("span", ot, z(a.name), 1), t("span", at, z(X(a.createdAt)), 1)]))], 42, Je))), 128))]),
482
+ _: 1
483
+ })]))])
484
+ ])])) : W("", !0)]),
485
+ _: 1
486
+ }));
487
+ }
488
+ }), ct = /* @__PURE__ */ Ce(nt, [["__scopeId", "data-v-ef885a8c"]]);
489
+ export {
490
+ ct as default,
491
+ ze as t
492
+ };