better-react-email-editor 0.1.6 → 0.1.7

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.
package/dist/index.js CHANGED
@@ -5,49 +5,50 @@ import { EmailNode as _, composeReactEmail as v } from "@react-email/editor/core
5
5
  import { Button as y, StarterKit as b } from "@react-email/editor/extensions";
6
6
  import { EmailTheming as x, extendTheme as S, getEmailTheming as C, setGlobalStyles as w, useEditorImage as T } from "@react-email/editor/plugins";
7
7
  import { Fragment as E } from "@tiptap/pm/model";
8
- import { NodeSelection as D, Plugin as O, PluginKey as ee, Selection as k, TextSelection as A } from "@tiptap/pm/state";
9
- import { generateJSON as te } from "@tiptap/html";
10
- import { Extension as ne, mergeAttributes as re } from "@tiptap/core";
11
- import { ReplaceStep as ie } from "@tiptap/pm/transform";
12
- import { AlignCenterIcon as ae, AlignLeftIcon as oe, AlignRightIcon as se, BoldIcon as j, BubbleMenu as ce, CodeIcon as le, Columns2Icon as ue, Columns3Icon as de, Columns4Icon as fe, EditorFocusScope as M, Heading1Icon as pe, ImageIcon as me, Inspector as N, ItalicIcon as he, LayoutIcon as ge, LinkIcon as _e, ListIcon as ve, ListOrderedIcon as ye, MinusIcon as be, MousePointerClickIcon as xe, PanelLeftIcon as P, PanelTopIcon as Se, PlusIcon as Ce, SlashCommand as F, SquareCodeIcon as we, StrikethroughIcon as Te, TableIcon as Ee, TextQuoteIcon as De, TypeIcon as Oe, UnderlineIcon as ke, XIcon as Ae, defaultSlashCommands as je } from "@react-email/editor/ui";
13
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
14
- import * as Me from "@radix-ui/react-popover";
15
- import { HexColorInput as Ne, HexColorPicker as Pe } from "react-colorful";
16
- import { Column as Fe, Img as Ie, Link as Le, Row as Re, Section as ze } from "react-email";
17
- import { createPortal as Be } from "react-dom";
8
+ import { NodeSelection as D, Plugin as O, PluginKey as k, Selection as A, TextSelection as j } from "@tiptap/pm/state";
9
+ import { generateJSON as ee } from "@tiptap/html";
10
+ import { Extension as te, mergeAttributes as ne } from "@tiptap/core";
11
+ import { ReplaceStep as re } from "@tiptap/pm/transform";
12
+ import { Decoration as ie, DecorationSet as ae } from "@tiptap/pm/view";
13
+ import { AlignCenterIcon as oe, AlignLeftIcon as se, AlignRightIcon as ce, BoldIcon as le, BubbleMenu as ue, CodeIcon as de, Columns2Icon as fe, Columns3Icon as pe, Columns4Icon as me, EditorFocusScope as M, Heading1Icon as he, ImageIcon as ge, Inspector as N, ItalicIcon as _e, LayoutIcon as ve, LinkIcon as ye, ListIcon as be, ListOrderedIcon as xe, MinusIcon as Se, MousePointerClickIcon as P, PanelLeftIcon as Ce, PanelTopIcon as we, PlusIcon as F, SlashCommand as Te, SquareCodeIcon as Ee, StrikethroughIcon as De, TableIcon as Oe, TextQuoteIcon as ke, TypeIcon as Ae, UnderlineIcon as je, XIcon as Me, defaultSlashCommands as Ne } from "@react-email/editor/ui";
14
+ import { Fragment as Pe, jsx as I, jsxs as L } from "react/jsx-runtime";
15
+ import * as Fe from "@radix-ui/react-popover";
16
+ import { HexColorInput as Ie, HexColorPicker as Le } from "react-colorful";
17
+ import { Column as Re, Img as ze, Link as Be, Row as Ve, Section as He } from "react-email";
18
+ import { createPortal as Ue } from "react-dom";
18
19
  //#region \0rolldown/runtime.js
19
- var Ve = Object.defineProperty, He = (e, t) => {
20
+ var We = Object.defineProperty, Ge = (e, t) => {
20
21
  let n = {};
21
- for (var r in e) Ve(n, r, {
22
+ for (var r in e) We(n, r, {
22
23
  get: e[r],
23
24
  enumerable: !0
24
25
  });
25
- return t || Ve(n, Symbol.toStringTag, { value: "Module" }), n;
26
+ return t || We(n, Symbol.toStringTag, { value: "Module" }), n;
26
27
  };
27
28
  //#endregion
28
29
  //#region src/core/cx.ts
29
- function z(...e) {
30
+ function R(...e) {
30
31
  return e.filter(Boolean).join(" ");
31
32
  }
32
33
  //#endregion
33
34
  //#region src/core/dnd.ts
34
- var Ue = /* @__PURE__ */ new Set([
35
+ var Ke = /* @__PURE__ */ new Set([
35
36
  "container",
36
37
  "section",
37
38
  "columnsColumn"
38
- ]), We = /* @__PURE__ */ new Set([
39
+ ]), qe = /* @__PURE__ */ new Set([
39
40
  "twoColumns",
40
41
  "threeColumns",
41
42
  "fourColumns"
42
- ]), Ge = "application/x-email-block";
43
- function Ke(e, t) {
43
+ ]), Je = "application/x-email-block";
44
+ function Ye(e, t) {
44
45
  let n = e.nodeDOM(t);
45
46
  return n instanceof HTMLElement ? n.getBoundingClientRect() : null;
46
47
  }
47
- function qe(e, t, n) {
48
+ function Xe(e, t, n) {
48
49
  let r = [];
49
50
  return t.forEach((t, i) => {
50
- let a = n + 1 + i, o = Ke(e, a);
51
+ let a = n + 1 + i, o = Ye(e, a);
51
52
  o && r.push({
52
53
  node: t,
53
54
  pos: a,
@@ -55,10 +56,10 @@ function qe(e, t, n) {
55
56
  });
56
57
  }), r;
57
58
  }
58
- function Je(e) {
59
+ function Ze(e) {
59
60
  return e.type.name === "paragraph" && e.childCount === 0;
60
61
  }
61
- function Ye(e) {
62
+ function Qe(e) {
62
63
  let t = null;
63
64
  return e.forEach((e, n) => {
64
65
  !t && e.type.name === "container" && (t = {
@@ -67,28 +68,28 @@ function Ye(e) {
67
68
  });
68
69
  }), t;
69
70
  }
70
- function Xe(e, t, n, r, i) {
71
- let a = Ye(e.state.doc);
71
+ function $e(e, t, n, r, i) {
72
+ let a = Qe(e.state.doc);
72
73
  if (!a) return null;
73
74
  let o = (e) => !!i && e >= i.from && e < i.to, s = (i, a) => {
74
- let c = qe(e, i, a), l = Ke(e, a);
75
+ let c = Xe(e, i, a), l = Ye(e, a);
75
76
  if (!l) return null;
76
77
  for (let r of c) {
77
78
  let { rect: i } = r, a = Math.min(12, i.height / 4), c = n > i.top + a && n < i.bottom - a, l = t >= i.left && t <= i.right;
78
79
  if (!c || !l || o(r.pos)) continue;
79
80
  let u = r.node.type.name;
80
- if (Ue.has(u)) {
81
+ if (Ke.has(u)) {
81
82
  let e = s(r.node, r.pos);
82
83
  if (e) return e;
83
- } else if (We.has(u)) {
84
- let n = qe(e, r.node, r.pos), i = n.find((e) => t >= e.rect.left && t <= e.rect.right) ?? (t < n[0]?.rect.left ? n[0] : n[n.length - 1]);
84
+ } else if (qe.has(u)) {
85
+ let n = Xe(e, r.node, r.pos), i = n.find((e) => t >= e.rect.left && t <= e.rect.right) ?? (t < n[0]?.rect.left ? n[0] : n[n.length - 1]);
85
86
  if (i && !o(i.pos)) {
86
87
  let e = s(i.node, i.pos);
87
88
  if (e) return e;
88
89
  }
89
90
  }
90
91
  }
91
- if (c.length === 1 && Je(c[0].node) && !o(c[0].pos)) {
92
+ if (c.length === 1 && Ze(c[0].node) && !o(c[0].pos)) {
92
93
  let e = c[0];
93
94
  return i.type.validContent(r) ? {
94
95
  pos: e.pos,
@@ -133,7 +134,7 @@ function Xe(e, t, n, r, i) {
133
134
  };
134
135
  return s(a.node, a.pos);
135
136
  }
136
- function Ze(e, t) {
137
+ function et(e, t) {
137
138
  let { schema: n, doc: r } = e.state;
138
139
  if (t.kind === "new") try {
139
140
  return E.fromArray(t.content().map((e) => n.nodeFromJSON(e)));
@@ -143,49 +144,49 @@ function Ze(e, t) {
143
144
  let i = r.nodeAt(t.pos);
144
145
  return i ? E.from(i) : null;
145
146
  }
146
- function Qe(e, t) {
147
+ function tt(e, t) {
147
148
  let n = e.doc.nodeAt(t);
148
- n && (n.isAtom || n.type.name === "horizontalRule" ? e.setSelection(D.create(e.doc, t)) : e.setSelection(A.near(e.doc.resolve(t + 1))));
149
+ n && (n.isAtom || n.type.name === "horizontalRule" ? e.setSelection(D.create(e.doc, t)) : e.setSelection(j.near(e.doc.resolve(t + 1))));
149
150
  }
150
- function $e(e) {
151
+ function nt(e) {
151
152
  let { selection: t, doc: n } = e.state;
152
- t instanceof D && e.dispatch(e.state.tr.setSelection(k.near(n.resolve(t.from))));
153
+ t instanceof D && e.dispatch(e.state.tr.setSelection(A.near(n.resolve(t.from))));
153
154
  }
154
- function et(e, t) {
155
+ function rt(e, t) {
155
156
  if (t.replaceTo !== void 0) return t;
156
157
  let n = e.resolve(t.pos), r = n.parent, i = r.lastChild;
157
- return n.index() !== r.childCount || !i || r.childCount < 2 || !Je(i) ? t : {
158
+ return n.index() !== r.childCount || !i || r.childCount < 2 || !Ze(i) ? t : {
158
159
  ...t,
159
160
  pos: t.pos - i.nodeSize
160
161
  };
161
162
  }
162
- function tt(e, t, n) {
163
+ function it(e, t, n) {
163
164
  let { view: r } = e;
164
- $e(r);
165
- let i = Ze(r, t);
165
+ nt(r);
166
+ let i = et(r, t);
166
167
  if (!i) return !1;
167
- let a = et(r.state.doc, n), o = r.state.tr;
168
- if (t.kind === "new") a.replaceTo === void 0 ? o.insert(a.pos, i) : o.replaceWith(a.pos, a.replaceTo, i), Qe(o, a.pos);
168
+ let a = rt(r.state.doc, n), o = r.state.tr;
169
+ if (t.kind === "new") a.replaceTo === void 0 ? o.insert(a.pos, i) : o.replaceWith(a.pos, a.replaceTo, i), tt(o, a.pos);
169
170
  else {
170
171
  let e = r.state.doc.nodeAt(t.pos);
171
172
  if (!e) return !1;
172
173
  let n = t.pos, i = n + e.nodeSize;
173
174
  if (a.replaceTo === void 0 && (a.pos === n || a.pos === i)) return !1;
174
- nt(o, n, i);
175
+ at(o, n, i);
175
176
  let s = o.mapping.map(a.pos, -1);
176
177
  if (a.replaceTo !== void 0) {
177
178
  let t = o.mapping.map(a.replaceTo, 1);
178
179
  o.replaceWith(s, t, e);
179
180
  } else o.insert(s, e);
180
- Qe(o, s);
181
+ tt(o, s);
181
182
  }
182
183
  return r.dispatch(o.scrollIntoView()), r.focus(), !0;
183
184
  }
184
- function nt(e, t, n) {
185
+ function at(e, t, n) {
185
186
  let r = e.doc.resolve(t).parent;
186
- r.childCount === 1 && Ue.has(r.type.name) ? e.replaceWith(t, n, e.doc.type.schema.nodes.paragraph.create()) : e.delete(t, n);
187
+ r.childCount === 1 && Ke.has(r.type.name) ? e.replaceWith(t, n, e.doc.type.schema.nodes.paragraph.create()) : e.delete(t, n);
187
188
  }
188
- function rt(e, t, n = !0) {
189
+ function z(e, t, n = !0) {
189
190
  if (t < 0 || t > e.content.size) return null;
190
191
  let r = [], i = e.nodeAt(t);
191
192
  n && i && r.push({
@@ -199,55 +200,55 @@ function rt(e, t, n = !0) {
199
200
  });
200
201
  for (let t of r) {
201
202
  let n = e.resolve(t.pos).parent.type.name;
202
- if (Ue.has(n) || We.has(n)) return t;
203
+ if (Ke.has(n) || qe.has(n)) return t;
203
204
  }
204
205
  return null;
205
206
  }
206
- function it(e) {
207
+ function ot(e) {
207
208
  return e.node.type.name === "columnsColumn";
208
209
  }
209
- function at(e, t) {
210
+ function st(e, t) {
210
211
  let n = e.resolve(t.pos);
211
212
  for (let r = n.depth; r > 0; r--) {
212
- let i = rt(e, n.before(r));
213
+ let i = z(e, n.before(r));
213
214
  if (i && i.pos !== t.pos) return i;
214
215
  }
215
216
  return null;
216
217
  }
217
- function ot(e) {
218
+ function ct(e) {
218
219
  let { selection: t, doc: n } = e.state;
219
- return t instanceof D ? rt(n, t.from) ?? {
220
+ return t instanceof D ? z(n, t.from) ?? {
220
221
  pos: t.from,
221
222
  node: t.node
222
- } : rt(n, t.from, !1);
223
+ } : z(n, t.from, !1);
223
224
  }
224
- function st(e, t) {
225
+ function lt(e, t) {
225
226
  let { view: n } = e, r = n.state.tr.setSelection(D.create(n.state.doc, t.pos));
226
227
  n.dispatch(r), n.focus();
227
228
  }
228
- function ct(e, t) {
229
+ function ut(e, t) {
229
230
  let { view: n } = e;
230
- $e(n);
231
+ nt(n);
231
232
  let r = n.state.doc.nodeAt(t.pos);
232
233
  if (!r) return;
233
234
  let i = t.pos + r.nodeSize, a = n.state.tr.insert(i, r.copy(r.content));
234
235
  a.setSelection(D.create(a.doc, i)), n.dispatch(a.scrollIntoView()), n.focus();
235
236
  }
236
- function lt(e, t) {
237
+ function dt(e, t) {
237
238
  let { view: n } = e, r = n.state.doc.nodeAt(t.pos);
238
239
  if (!r) return;
239
240
  let i = n.state.tr;
240
- nt(i, t.pos, t.pos + r.nodeSize), n.dispatch(i);
241
+ at(i, t.pos, t.pos + r.nodeSize), n.dispatch(i);
241
242
  }
242
- function ut(e, t) {
243
- let n = Ye(e.state.doc);
243
+ function ft(e, t) {
244
+ let n = Qe(e.state.doc);
244
245
  if (!n) return;
245
246
  let r = n.node.lastChild, i = n.pos + n.node.nodeSize - 1;
246
- tt(e, {
247
+ it(e, {
247
248
  kind: "new",
248
249
  label: "",
249
250
  content: () => t
250
- }, r && Je(r) && n.node.childCount > 1 ? {
251
+ }, r && Ze(r) && n.node.childCount > 1 ? {
251
252
  pos: i - r.nodeSize,
252
253
  replaceTo: i,
253
254
  line: {
@@ -266,7 +267,7 @@ function ut(e, t) {
266
267
  }
267
268
  //#endregion
268
269
  //#region src/core/paste.ts
269
- var dt = y.extend({ parseHTML() {
270
+ var pt = y.extend({ parseHTML() {
270
271
  return [{
271
272
  tag: "a[data-id=\"react-email-button\"]",
272
273
  getAttrs: (e) => {
@@ -281,29 +282,29 @@ var dt = y.extend({ parseHTML() {
281
282
  }
282
283
  }];
283
284
  } });
284
- function ft(e, t) {
285
+ function mt(e, t) {
285
286
  let n = t.clipboardData?.getData("text/html") ?? "", r = n.includes("data-pm-slice");
286
287
  if ((t.clipboardData?.files?.length ?? 0) > 0) return !1;
287
288
  let { view: i } = e, { state: a } = i, { selection: o } = a;
288
289
  if (o instanceof D && o.node.isBlock) {
289
290
  let e = o.node, t = e.type.name === "columnsColumn" ? o.from + e.nodeSize - 1 : o.from + e.nodeSize, n = a.doc.resolve(t), r = a.schema.nodes.paragraph;
290
- if (We.has(n.parent.type.name) || !n.parent.canReplaceWith(n.index(), n.index(), r)) return !1;
291
- i.dispatch(a.tr.setSelection(A.near(n)));
291
+ if (qe.has(n.parent.type.name) || !n.parent.canReplaceWith(n.index(), n.index(), r)) return !1;
292
+ i.dispatch(a.tr.setSelection(j.near(n)));
292
293
  let s = i.state.tr.insert(t, r.create());
293
- s.setSelection(A.create(s.doc, t + 1)), i.dispatch(s);
294
+ s.setSelection(j.create(s.doc, t + 1)), i.dispatch(s);
294
295
  }
295
296
  return r ? (t.preventDefault(), t.stopPropagation(), i.pasteHTML(n), !0) : !1;
296
297
  }
297
298
  //#endregion
298
299
  //#region src/core/paste-handler.ts
299
- var pt = /class="[^"]*node-/, mt = [
300
+ var ht = /class="[^"]*node-/, gt = [
300
301
  "script",
301
302
  "iframe",
302
303
  "object",
303
304
  "embed",
304
305
  "meta",
305
306
  "base"
306
- ], ht = ["href", "src"], gt = {
307
+ ], _t = ["href", "src"], vt = {
307
308
  a: [
308
309
  "href",
309
310
  "target",
@@ -328,49 +329,49 @@ var pt = /class="[^"]*node-/, mt = [
328
329
  ],
329
330
  "*": ["id"]
330
331
  };
331
- function _t(e, t) {
332
+ function yt(e, t) {
332
333
  let n = e.trim().toLowerCase();
333
334
  return n.startsWith("javascript:") || n.startsWith("vbscript:") ? !1 : !n.startsWith("data:") || t && n.startsWith("data:image/");
334
335
  }
335
- function vt(e) {
336
- let t = /* @__PURE__ */ new Set([...gt[e.tagName.toLowerCase()] ?? [], ...gt["*"]]);
336
+ function bt(e) {
337
+ let t = /* @__PURE__ */ new Set([...vt[e.tagName.toLowerCase()] ?? [], ...vt["*"]]);
337
338
  for (let n of Array.from(e.attributes)) (n.name.startsWith("data-") || !t.has(n.name)) && e.removeAttribute(n.name);
338
339
  }
339
- function yt(e) {
340
- e.nodeType === Node.ELEMENT_NODE && vt(e);
341
- for (let t of Array.from(e.childNodes)) yt(t);
340
+ function xt(e) {
341
+ e.nodeType === Node.ELEMENT_NODE && bt(e);
342
+ for (let t of Array.from(e.childNodes)) xt(t);
342
343
  }
343
- function bt(e) {
344
+ function St(e) {
344
345
  let t = new DOMParser().parseFromString(e, "text/html");
345
- for (let e of mt) for (let n of Array.from(t.body.getElementsByTagName(e))) n.remove();
346
+ for (let e of gt) for (let n of Array.from(t.body.getElementsByTagName(e))) n.remove();
346
347
  for (let e of Array.from(t.body.querySelectorAll("[href], [src]"))) {
347
348
  let t = e.tagName.toLowerCase() === "img";
348
- for (let n of ht) {
349
+ for (let n of _t) {
349
350
  let r = e.getAttribute(n);
350
- r !== null && !_t(r, t) && e.removeAttribute(n);
351
+ r !== null && !yt(r, t) && e.removeAttribute(n);
351
352
  }
352
353
  }
353
- return pt.test(e) || yt(t.body), t.body.innerHTML;
354
+ return ht.test(e) || xt(t.body), t.body.innerHTML;
354
355
  }
355
- function xt(e) {
356
+ function Ct(e) {
356
357
  return (t, n, r) => {
357
358
  if (r.content.childCount === 1) return !1;
358
359
  let i = n.clipboardData?.getData?.("text/html");
359
360
  if (!i) return !1;
360
361
  n.preventDefault();
361
- let a = te(bt(i), e), o = t.state.schema.nodeFromJSON(a);
362
+ let a = ee(St(i), e), o = t.state.schema.nodeFromJSON(a);
362
363
  return t.dispatch(t.state.tr.replaceSelectionWith(o, !1)), !0;
363
364
  };
364
365
  }
365
366
  //#endregion
366
367
  //#region src/core/select-all.ts
367
- var St = /* @__PURE__ */ new Set(["columnsColumn", "codeBlock"]), Ct = ne.create({
368
+ var wt = /* @__PURE__ */ new Set(["columnsColumn", "codeBlock"]), Tt = te.create({
368
369
  name: "selectAllFix",
369
370
  priority: 101,
370
371
  addKeyboardShortcuts() {
371
372
  return { "Mod-a": ({ editor: e }) => {
372
373
  let { state: t } = e, { $from: n } = t.selection;
373
- for (let e = n.depth; e > 0; e--) if (St.has(n.node(e).type.name) && (t.selection.from !== n.start(e) || t.selection.to !== n.end(e))) return !1;
374
+ for (let e = n.depth; e > 0; e--) if (wt.has(n.node(e).type.name) && (t.selection.from !== n.start(e) || t.selection.to !== n.end(e))) return !1;
374
375
  let r = -1;
375
376
  t.doc.forEach((e, t) => {
376
377
  r < 0 && e.type.name === "container" && (r = t);
@@ -378,25 +379,46 @@ var St = /* @__PURE__ */ new Set(["columnsColumn", "codeBlock"]), Ct = ne.create
378
379
  let i = r < 0 ? null : t.doc.nodeAt(r);
379
380
  if (!i) return !1;
380
381
  let a = r + 1, o = r + i.nodeSize - 1;
381
- return (t.selection.from !== a || t.selection.to !== o) && e.view.dispatch(t.tr.setSelection(A.create(t.doc, a, o))), !0;
382
+ return (t.selection.from !== a || t.selection.to !== o) && e.view.dispatch(t.tr.setSelection(j.create(t.doc, a, o))), !0;
382
383
  } };
383
384
  },
384
385
  addProseMirrorPlugins() {
385
386
  return [new O({
386
- key: new ee("selectAllFix"),
387
+ key: new k("selectAllFix"),
387
388
  appendTransaction(e, t, n) {
388
389
  let r = t.selection;
389
- if (!(r instanceof A) || r.$from.parent.inlineContent && r.$to.parent.inlineContent || !e.some((e) => e.steps.some((e) => e instanceof ie && e.from === r.from && e.to === r.to))) return null;
390
+ if (!(r instanceof j) || r.$from.parent.inlineContent && r.$to.parent.inlineContent || !e.some((e) => e.steps.some((e) => e instanceof re && e.from === r.from && e.to === r.to))) return null;
390
391
  let i = r.from, a = r.to;
391
392
  for (let t of e) i = t.mapping.map(i, -1), a = t.mapping.map(a, 1);
392
393
  let { selection: o } = n;
393
- if (o instanceof A && o.from >= i && o.to <= a) return null;
394
+ if (o instanceof j && o.from >= i && o.to <= a) return null;
394
395
  let s = n.doc.resolve(i);
395
- return n.tr.setSelection(k.findFrom(s, 1, !0) ?? k.near(s));
396
+ return n.tr.setSelection(A.findFrom(s, 1, !0) ?? A.near(s));
397
+ }
398
+ })];
399
+ }
400
+ }), Et = te.create({
401
+ name: "focusedSpellcheck",
402
+ addProseMirrorPlugins() {
403
+ let { editor: e } = this;
404
+ return [new O({
405
+ key: new k("focusedSpellcheck"),
406
+ props: {
407
+ attributes: { spellcheck: "false" },
408
+ decorations: (t) => {
409
+ if (!e.isFocused) return ae.empty;
410
+ let { from: n, to: r, $from: i } = t.selection, a = [];
411
+ return t.doc.nodesBetween(n, r, (e, t) => !e.isTextblock || (a.push(ie.node(t, t + e.nodeSize, { spellcheck: "true" })), !1)), !a.length && i.parent.isTextblock && i.depth > 0 && a.push(ie.node(i.before(), i.after(), { spellcheck: "true" })), ae.create(t.doc, a);
412
+ }
396
413
  }
397
414
  })];
398
415
  }
399
- }), wt = [
416
+ }), Dt = [
417
+ {
418
+ label: "Inter",
419
+ value: "Inter, Arial, Helvetica, sans-serif",
420
+ href: "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap"
421
+ },
400
422
  {
401
423
  label: "Arial",
402
424
  value: "Arial, Helvetica, sans-serif"
@@ -418,17 +440,26 @@ var St = /* @__PURE__ */ new Set(["columnsColumn", "codeBlock"]), Ct = ne.create
418
440
  value: "'Times New Roman', Times, serif"
419
441
  }
420
442
  ];
421
- function Tt(e) {
443
+ function Ot(e) {
422
444
  return e.split(",")[0].trim().replace(/^['"]|['"]$/g, "").toLowerCase();
423
445
  }
424
- function Et(e, t) {
446
+ function kt(e, t) {
425
447
  if (!t) return;
426
- let n = Tt(t);
427
- return e.find((e) => Tt(e.value) === n);
448
+ let n = Ot(t);
449
+ return e.find((e) => Ot(e.value) === n);
450
+ }
451
+ function At(e, t) {
452
+ let n = /* @__PURE__ */ new Set();
453
+ for (let t of e.matchAll(/font-family:\s*([^;"]+)/gi)) n.add(Ot(t[1].replace(/&#x27;|&quot;/g, "'")));
454
+ return t.filter((e) => e.href && n.has(Ot(e.value)));
455
+ }
456
+ function jt(e, t) {
457
+ let n = At(e, t).map((e) => `<link href="${e.href.replace(/&/g, "&amp;")}" rel="stylesheet" />`).join("");
458
+ return n ? e.replace("</head>", `${n}</head>`) : e;
428
459
  }
429
460
  //#endregion
430
461
  //#region src/core/stores.ts
431
- function Dt() {
462
+ function Mt() {
432
463
  let e = null;
433
464
  return {
434
465
  get: () => e,
@@ -440,7 +471,7 @@ function Dt() {
440
471
  }
441
472
  };
442
473
  }
443
- function Ot() {
474
+ function Nt() {
444
475
  let e = null, t = /* @__PURE__ */ new Set();
445
476
  return {
446
477
  get: () => e,
@@ -457,7 +488,7 @@ function Ot() {
457
488
  }
458
489
  //#endregion
459
490
  //#region src/i18n/en.ts
460
- var kt = {
491
+ var Pt = {
461
492
  topBar: {
462
493
  layers: "Layers",
463
494
  toggleLayers: "Show / hide layers",
@@ -736,7 +767,7 @@ var kt = {
736
767
  starterTitle: "Our favourites"
737
768
  },
738
769
  slashCommands: {}
739
- }, At = {
770
+ }, Ft = {
740
771
  topBar: {
741
772
  layers: "Calques",
742
773
  toggleLayers: "Afficher / masquer les calques",
@@ -1072,43 +1103,43 @@ var kt = {
1072
1103
  description: "Mise en page sur quatre colonnes"
1073
1104
  }
1074
1105
  }
1075
- }, jt = {
1076
- en: kt,
1077
- fr: At
1106
+ }, It = {
1107
+ en: Pt,
1108
+ fr: Ft
1078
1109
  };
1079
- function Mt(e, t) {
1110
+ function Lt(e, t) {
1080
1111
  return typeof e == "function" ? e(t) : e;
1081
1112
  }
1082
- function Nt(e) {
1113
+ function Rt(e) {
1083
1114
  return typeof e == "object" && !!e && !Array.isArray(e);
1084
1115
  }
1085
- function Pt(e, t) {
1086
- if (!Nt(t) || !Nt(e)) return t ?? e;
1116
+ function zt(e, t) {
1117
+ if (!Rt(t) || !Rt(e)) return t ?? e;
1087
1118
  let n = { ...e };
1088
- for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = Nt(r) && Nt(n[e]) ? Pt(n[e], r) : r);
1119
+ for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = Rt(r) && Rt(n[e]) ? zt(n[e], r) : r);
1089
1120
  return n;
1090
1121
  }
1091
- function Ft(e, t) {
1092
- let n = jt[e] ?? kt;
1093
- return t ? Pt(n, t) : n;
1122
+ function Bt(e, t) {
1123
+ let n = It[e] ?? Pt;
1124
+ return t ? zt(n, t) : n;
1094
1125
  }
1095
1126
  //#endregion
1096
1127
  //#region src/components/icons.tsx
1097
- var It = /* @__PURE__ */ He({
1098
- CopyIcon: () => Rt,
1099
- DesktopIcon: () => Ut,
1100
- GripIcon: () => Lt,
1101
- LayersIcon: () => Gt,
1102
- MobileIcon: () => Wt,
1103
- OneColumnIcon: () => Xt,
1104
- ParentIcon: () => Bt,
1105
- PipetteIcon: () => Kt,
1106
- RedoIcon: () => Ht,
1107
- SocialIcon: () => Yt,
1108
- SpacerIcon: () => qt,
1109
- SpacerTileIcon: () => Jt,
1110
- TrashIcon: () => zt,
1111
- UndoIcon: () => Vt
1128
+ var Vt = /* @__PURE__ */ Ge({
1129
+ CopyIcon: () => Ut,
1130
+ DesktopIcon: () => Jt,
1131
+ GripIcon: () => Ht,
1132
+ LayersIcon: () => Xt,
1133
+ MobileIcon: () => Yt,
1134
+ OneColumnIcon: () => tn,
1135
+ ParentIcon: () => Gt,
1136
+ PipetteIcon: () => Zt,
1137
+ RedoIcon: () => qt,
1138
+ SocialIcon: () => en,
1139
+ SpacerIcon: () => Qt,
1140
+ SpacerTileIcon: () => $t,
1141
+ TrashIcon: () => Wt,
1142
+ UndoIcon: () => Kt
1112
1143
  }), B = (e, t = 2) => ({
1113
1144
  viewBox: "0 0 24 24",
1114
1145
  width: e,
@@ -1119,7 +1150,7 @@ var It = /* @__PURE__ */ He({
1119
1150
  strokeLinecap: "round",
1120
1151
  strokeLinejoin: "round",
1121
1152
  "aria-hidden": !0
1122
- }), Lt = ({ size: e = 14 }) => /* @__PURE__ */ L("svg", {
1153
+ }), Ht = ({ size: e = 14 }) => /* @__PURE__ */ I("svg", {
1123
1154
  viewBox: "0 0 24 24",
1124
1155
  width: e,
1125
1156
  height: e,
@@ -1129,93 +1160,93 @@ var It = /* @__PURE__ */ He({
1129
1160
  6,
1130
1161
  12,
1131
1162
  18
1132
- ].map((e) => /* @__PURE__ */ R("g", { children: [/* @__PURE__ */ L("circle", {
1163
+ ].map((e) => /* @__PURE__ */ L("g", { children: [/* @__PURE__ */ I("circle", {
1133
1164
  cx: "9",
1134
1165
  cy: e,
1135
1166
  r: "1.6"
1136
- }), /* @__PURE__ */ L("circle", {
1167
+ }), /* @__PURE__ */ I("circle", {
1137
1168
  cx: "15",
1138
1169
  cy: e,
1139
1170
  r: "1.6"
1140
1171
  })] }, e))
1141
- }), Rt = ({ size: e = 14 }) => /* @__PURE__ */ R("svg", {
1172
+ }), Ut = ({ size: e = 14 }) => /* @__PURE__ */ L("svg", {
1142
1173
  ...B(e),
1143
- children: [/* @__PURE__ */ L("rect", {
1174
+ children: [/* @__PURE__ */ I("rect", {
1144
1175
  x: "8",
1145
1176
  y: "8",
1146
1177
  width: "12",
1147
1178
  height: "12",
1148
1179
  rx: "2"
1149
- }), /* @__PURE__ */ L("path", { d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" })]
1150
- }), zt = ({ size: e = 14 }) => /* @__PURE__ */ L("svg", {
1180
+ }), /* @__PURE__ */ I("path", { d: "M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2" })]
1181
+ }), Wt = ({ size: e = 14 }) => /* @__PURE__ */ I("svg", {
1151
1182
  ...B(e),
1152
- children: /* @__PURE__ */ L("path", { d: "M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3" })
1153
- }), Bt = ({ size: e = 14 }) => /* @__PURE__ */ L("svg", {
1183
+ children: /* @__PURE__ */ I("path", { d: "M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4h6v3" })
1184
+ }), Gt = ({ size: e = 14 }) => /* @__PURE__ */ I("svg", {
1154
1185
  ...B(e),
1155
- children: /* @__PURE__ */ L("path", { d: "M12 19V5M6 11l6-6 6 6" })
1156
- }), Vt = ({ size: e = 16 }) => /* @__PURE__ */ R("svg", {
1186
+ children: /* @__PURE__ */ I("path", { d: "M12 19V5M6 11l6-6 6 6" })
1187
+ }), Kt = ({ size: e = 16 }) => /* @__PURE__ */ L("svg", {
1157
1188
  ...B(e),
1158
- children: [/* @__PURE__ */ L("path", { d: "M9 14 4 9l5-5" }), /* @__PURE__ */ L("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" })]
1159
- }), Ht = ({ size: e = 16 }) => /* @__PURE__ */ R("svg", {
1189
+ children: [/* @__PURE__ */ I("path", { d: "M9 14 4 9l5-5" }), /* @__PURE__ */ I("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" })]
1190
+ }), qt = ({ size: e = 16 }) => /* @__PURE__ */ L("svg", {
1160
1191
  ...B(e),
1161
- children: [/* @__PURE__ */ L("path", { d: "m15 14 5-5-5-5" }), /* @__PURE__ */ L("path", { d: "M20 9H9.5a5.5 5.5 0 0 0 0 11H13" })]
1162
- }), Ut = ({ size: e = 16 }) => /* @__PURE__ */ R("svg", {
1192
+ children: [/* @__PURE__ */ I("path", { d: "m15 14 5-5-5-5" }), /* @__PURE__ */ I("path", { d: "M20 9H9.5a5.5 5.5 0 0 0 0 11H13" })]
1193
+ }), Jt = ({ size: e = 16 }) => /* @__PURE__ */ L("svg", {
1163
1194
  ...B(e),
1164
- children: [/* @__PURE__ */ L("rect", {
1195
+ children: [/* @__PURE__ */ I("rect", {
1165
1196
  x: "3",
1166
1197
  y: "4",
1167
1198
  width: "18",
1168
1199
  height: "12",
1169
1200
  rx: "2"
1170
- }), /* @__PURE__ */ L("path", { d: "M8 20h8M12 16v4" })]
1171
- }), Wt = ({ size: e = 16 }) => /* @__PURE__ */ R("svg", {
1201
+ }), /* @__PURE__ */ I("path", { d: "M8 20h8M12 16v4" })]
1202
+ }), Yt = ({ size: e = 16 }) => /* @__PURE__ */ L("svg", {
1172
1203
  ...B(e),
1173
- children: [/* @__PURE__ */ L("rect", {
1204
+ children: [/* @__PURE__ */ I("rect", {
1174
1205
  x: "7",
1175
1206
  y: "2",
1176
1207
  width: "10",
1177
1208
  height: "20",
1178
1209
  rx: "2"
1179
- }), /* @__PURE__ */ L("path", { d: "M11 18h2" })]
1180
- }), Gt = ({ size: e = 16 }) => /* @__PURE__ */ R("svg", {
1210
+ }), /* @__PURE__ */ I("path", { d: "M11 18h2" })]
1211
+ }), Xt = ({ size: e = 16 }) => /* @__PURE__ */ L("svg", {
1181
1212
  ...B(e),
1182
- children: [/* @__PURE__ */ L("path", { d: "m12 3 9 5-9 5-9-5 9-5Z" }), /* @__PURE__ */ L("path", { d: "m3 13 9 5 9-5" })]
1183
- }), Kt = ({ size: e = 15 }) => /* @__PURE__ */ R("svg", {
1213
+ children: [/* @__PURE__ */ I("path", { d: "m12 3 9 5-9 5-9-5 9-5Z" }), /* @__PURE__ */ I("path", { d: "m3 13 9 5 9-5" })]
1214
+ }), Zt = ({ size: e = 15 }) => /* @__PURE__ */ L("svg", {
1184
1215
  ...B(e),
1185
1216
  children: [
1186
- /* @__PURE__ */ L("path", { d: "m2 22 1-1h3l9-9" }),
1187
- /* @__PURE__ */ L("path", { d: "M3 21v-3l9-9" }),
1188
- /* @__PURE__ */ L("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
1217
+ /* @__PURE__ */ I("path", { d: "m2 22 1-1h3l9-9" }),
1218
+ /* @__PURE__ */ I("path", { d: "M3 21v-3l9-9" }),
1219
+ /* @__PURE__ */ I("path", { d: "m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z" })
1189
1220
  ]
1190
- }), qt = ({ size: e = 14 }) => /* @__PURE__ */ L("svg", {
1221
+ }), Qt = ({ size: e = 14 }) => /* @__PURE__ */ I("svg", {
1191
1222
  ...B(e),
1192
- children: /* @__PURE__ */ L("path", { d: "M4 4h16M4 20h16M12 8v8" })
1193
- }), Jt = ({ size: e = 22 }) => /* @__PURE__ */ L("svg", {
1223
+ children: /* @__PURE__ */ I("path", { d: "M4 4h16M4 20h16M12 8v8" })
1224
+ }), $t = ({ size: e = 22 }) => /* @__PURE__ */ I("svg", {
1194
1225
  ...B(e, 1.8),
1195
- children: /* @__PURE__ */ L("path", { d: "M4 4h16M4 20h16M12 7v10M9 9.5 12 7l3 2.5M9 14.5l3 2.5 3-2.5" })
1196
- }), Yt = ({ size: e = 22 }) => /* @__PURE__ */ R("svg", {
1226
+ children: /* @__PURE__ */ I("path", { d: "M4 4h16M4 20h16M12 7v10M9 9.5 12 7l3 2.5M9 14.5l3 2.5 3-2.5" })
1227
+ }), en = ({ size: e = 22 }) => /* @__PURE__ */ L("svg", {
1197
1228
  ...B(e, 1.8),
1198
1229
  children: [
1199
- /* @__PURE__ */ L("circle", {
1230
+ /* @__PURE__ */ I("circle", {
1200
1231
  cx: "6",
1201
1232
  cy: "12",
1202
1233
  r: "2.5"
1203
1234
  }),
1204
- /* @__PURE__ */ L("circle", {
1235
+ /* @__PURE__ */ I("circle", {
1205
1236
  cx: "18",
1206
1237
  cy: "6",
1207
1238
  r: "2.5"
1208
1239
  }),
1209
- /* @__PURE__ */ L("circle", {
1240
+ /* @__PURE__ */ I("circle", {
1210
1241
  cx: "18",
1211
1242
  cy: "18",
1212
1243
  r: "2.5"
1213
1244
  }),
1214
- /* @__PURE__ */ L("path", { d: "m8.2 10.8 7.6-3.6M8.2 13.2l7.6 3.6" })
1245
+ /* @__PURE__ */ I("path", { d: "m8.2 10.8 7.6-3.6M8.2 13.2l7.6 3.6" })
1215
1246
  ]
1216
- }), Xt = ({ size: e = 22 }) => /* @__PURE__ */ L("svg", {
1247
+ }), tn = ({ size: e = 22 }) => /* @__PURE__ */ I("svg", {
1217
1248
  ...B(e, 1.8),
1218
- children: /* @__PURE__ */ L("rect", {
1249
+ children: /* @__PURE__ */ I("rect", {
1219
1250
  x: "4",
1220
1251
  y: "4",
1221
1252
  width: "16",
@@ -1227,46 +1258,46 @@ var It = /* @__PURE__ */ He({
1227
1258
  //#region src/components/fields.tsx
1228
1259
  function V({ title: e, children: t, defaultOpen: n = !0, className: r, style: i }) {
1229
1260
  let [a, o] = u(n);
1230
- return /* @__PURE__ */ R("section", {
1231
- className: z("bree-group", r),
1261
+ return /* @__PURE__ */ L("section", {
1262
+ className: R("bree-group", r),
1232
1263
  style: i,
1233
- children: [/* @__PURE__ */ R("button", {
1264
+ children: [/* @__PURE__ */ L("button", {
1234
1265
  type: "button",
1235
1266
  className: "bree-group-header",
1236
1267
  onClick: () => o(!a),
1237
1268
  "aria-expanded": a,
1238
- children: [/* @__PURE__ */ L("span", { children: e }), /* @__PURE__ */ L("span", {
1239
- className: z("bree-chevron", a && "bree-open"),
1269
+ children: [/* @__PURE__ */ I("span", { children: e }), /* @__PURE__ */ I("span", {
1270
+ className: R("bree-chevron", a && "bree-open"),
1240
1271
  "aria-hidden": !0,
1241
1272
  children: "›"
1242
1273
  })]
1243
- }), a && /* @__PURE__ */ L("div", {
1274
+ }), a && /* @__PURE__ */ I("div", {
1244
1275
  className: "bree-group-body",
1245
1276
  children: t
1246
1277
  })]
1247
1278
  });
1248
1279
  }
1249
1280
  function H({ label: e, children: t, stacked: n, className: r, style: i }) {
1250
- return /* @__PURE__ */ R("label", {
1251
- className: z("bree-field", n && "bree-stacked", r),
1281
+ return /* @__PURE__ */ L("label", {
1282
+ className: R("bree-field", n && "bree-stacked", r),
1252
1283
  style: i,
1253
- children: [/* @__PURE__ */ L("span", {
1284
+ children: [/* @__PURE__ */ I("span", {
1254
1285
  className: "bree-field-label",
1255
1286
  children: e
1256
- }), /* @__PURE__ */ L("span", {
1287
+ }), /* @__PURE__ */ I("span", {
1257
1288
  className: "bree-field-control",
1258
1289
  children: t
1259
1290
  })]
1260
1291
  });
1261
1292
  }
1262
- function Zt(e) {
1293
+ function nn(e) {
1263
1294
  let [t, n] = u(e), [r, i] = u(e);
1264
1295
  return Object.is(e, r) || (i(e), n(e)), [t, n];
1265
1296
  }
1266
1297
  function U({ value: e, onChange: t, placeholder: n, type: r = "text", className: i, style: a }) {
1267
- let [o, s] = Zt(e);
1268
- return /* @__PURE__ */ L("input", {
1269
- className: z("bree-input", i),
1298
+ let [o, s] = nn(e);
1299
+ return /* @__PURE__ */ I("input", {
1300
+ className: R("bree-input", i),
1270
1301
  style: a,
1271
1302
  type: r,
1272
1303
  value: o,
@@ -1278,10 +1309,10 @@ function U({ value: e, onChange: t, placeholder: n, type: r = "text", className:
1278
1309
  }
1279
1310
  });
1280
1311
  }
1281
- function Qt({ value: e, onChange: t, rows: n = 8, className: r, style: i }) {
1282
- let [a, o] = Zt(e);
1283
- return /* @__PURE__ */ L("textarea", {
1284
- className: z("bree-input bree-textarea", r),
1312
+ function rn({ value: e, onChange: t, rows: n = 8, className: r, style: i }) {
1313
+ let [a, o] = nn(e);
1314
+ return /* @__PURE__ */ I("textarea", {
1315
+ className: R("bree-input bree-textarea", r),
1285
1316
  style: i,
1286
1317
  rows: n,
1287
1318
  value: a,
@@ -1290,21 +1321,21 @@ function Qt({ value: e, onChange: t, rows: n = 8, className: r, style: i }) {
1290
1321
  onBlur: () => a !== e && t(a)
1291
1322
  });
1292
1323
  }
1293
- function $t(e) {
1324
+ function an(e) {
1294
1325
  if (e == null || e === "" || e === "auto") return "";
1295
1326
  let t = Number.parseFloat(String(e));
1296
1327
  return Number.isFinite(t) ? t : "";
1297
1328
  }
1298
1329
  function W({ value: e, onChange: t, unit: n = "px", min: r = 0, max: i, step: a = 1, placeholder: o, className: s, style: c }) {
1299
- let l = $(), [u, d] = Zt(String($t(e))), f = (e) => {
1330
+ let l = $(), [u, d] = nn(String(an(e))), f = (e) => {
1300
1331
  if (e.trim() === "") return t("");
1301
1332
  let n = Number.parseFloat(e);
1302
1333
  Number.isFinite(n) && t(Math.max(r, i === void 0 ? n : Math.min(i, n)));
1303
1334
  };
1304
- return /* @__PURE__ */ R("span", {
1305
- className: z("bree-number", s),
1335
+ return /* @__PURE__ */ L("span", {
1336
+ className: R("bree-number", s),
1306
1337
  style: c,
1307
- children: [/* @__PURE__ */ L("input", {
1338
+ children: [/* @__PURE__ */ I("input", {
1308
1339
  className: "bree-input",
1309
1340
  inputMode: "decimal",
1310
1341
  value: u,
@@ -1314,34 +1345,34 @@ function W({ value: e, onChange: t, unit: n = "px", min: r = 0, max: i, step: a
1314
1345
  onKeyDown: (e) => {
1315
1346
  if (e.key === "Enter" && f(u), e.key === "ArrowUp" || e.key === "ArrowDown") {
1316
1347
  e.preventDefault();
1317
- let t = ($t(u) || 0) + (e.key === "ArrowUp" ? a : -a) * (e.shiftKey ? 10 : 1);
1348
+ let t = (an(u) || 0) + (e.key === "ArrowUp" ? a : -a) * (e.shiftKey ? 10 : 1);
1318
1349
  d(String(t)), f(String(t));
1319
1350
  }
1320
1351
  }
1321
- }), n && /* @__PURE__ */ L("span", {
1352
+ }), n && /* @__PURE__ */ I("span", {
1322
1353
  className: "bree-unit",
1323
1354
  children: n
1324
1355
  })]
1325
1356
  });
1326
1357
  }
1327
- function en({ value: e, onChange: t, min: n, max: r, unit: i = "px", className: a, style: o }) {
1328
- let s = $t(e) || n;
1329
- return /* @__PURE__ */ R("span", {
1330
- className: z("bree-range", a),
1358
+ function on({ value: e, onChange: t, min: n, max: r, unit: i = "px", className: a, style: o }) {
1359
+ let s = an(e) || n;
1360
+ return /* @__PURE__ */ L("span", {
1361
+ className: R("bree-range", a),
1331
1362
  style: o,
1332
- children: [/* @__PURE__ */ L("input", {
1363
+ children: [/* @__PURE__ */ I("input", {
1333
1364
  type: "range",
1334
1365
  min: n,
1335
1366
  max: r,
1336
1367
  value: s,
1337
1368
  onChange: (e) => t(Number(e.target.value))
1338
- }), /* @__PURE__ */ R("span", {
1369
+ }), /* @__PURE__ */ L("span", {
1339
1370
  className: "bree-range-value",
1340
1371
  children: [s, i]
1341
1372
  })]
1342
1373
  });
1343
1374
  }
1344
- var tn = [
1375
+ var sn = [
1345
1376
  "#111827",
1346
1377
  "#374151",
1347
1378
  "#6b7280",
@@ -1361,15 +1392,15 @@ var tn = [
1361
1392
  "#ecfdf5",
1362
1393
  "#fef3c7"
1363
1394
  ];
1364
- function nn(e) {
1395
+ function cn(e) {
1365
1396
  let t = e.trim().toLowerCase();
1366
1397
  if (/^#[0-9a-f]{6}$/.test(t)) return t;
1367
1398
  if (/^#[0-9a-f]{3}$/.test(t)) return `#${[...t.slice(1)].map((e) => e + e).join("")}`;
1368
1399
  let n = t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);
1369
1400
  return n ? `#${n.slice(1, 4).map((e) => Number(e).toString(16).padStart(2, "0")).join("")}` : null;
1370
1401
  }
1371
- function G({ value: e, onChange: t, presets: n = [], swatches: r = tn, placeholder: a, className: o, style: s, popoverClassName: c }) {
1372
- let d = $(), f = a ?? d.fields.colorDefault, p = typeof e == "string" ? e : "", m = nn(p), [h, g] = u(!1), [_, v] = u(m ?? "#ffffff"), y = l(t);
1402
+ function G({ value: e, onChange: t, presets: n = [], swatches: r = sn, placeholder: a, className: o, style: s, popoverClassName: c }) {
1403
+ let d = $(), f = a ?? d.fields.colorDefault, p = typeof e == "string" ? e : "", m = cn(p), [h, g] = u(!1), [_, v] = u(m ?? "#ffffff"), y = l(t);
1373
1404
  i(() => {
1374
1405
  y.current = t;
1375
1406
  });
@@ -1378,71 +1409,71 @@ function G({ value: e, onChange: t, presets: n = [], swatches: r = tn, placehold
1378
1409
  }, C = (e) => {
1379
1410
  v(e), b.current = e, x.current ||= window.setTimeout(S, 60);
1380
1411
  }, w = (e) => {
1381
- b.current = null, window.clearTimeout(x.current), x.current = 0, v(nn(e) ?? _), y.current(e);
1382
- }, T = typeof window < "u" ? window.EyeDropper : void 0, E = [...new Set(n.map((e) => nn(e)).filter((e) => !!e))].slice(0, 9);
1383
- return /* @__PURE__ */ R(Me.Root, {
1412
+ b.current = null, window.clearTimeout(x.current), x.current = 0, v(cn(e) ?? _), y.current(e);
1413
+ }, T = typeof window < "u" ? window.EyeDropper : void 0, E = [...new Set(n.map((e) => cn(e)).filter((e) => !!e))].slice(0, 9);
1414
+ return /* @__PURE__ */ L(Fe.Root, {
1384
1415
  open: h,
1385
1416
  onOpenChange: (e) => {
1386
1417
  e ? v(m ?? "#ffffff") : S(), g(e);
1387
1418
  },
1388
- children: [/* @__PURE__ */ R("span", {
1389
- className: z("bree-color-field", o),
1419
+ children: [/* @__PURE__ */ L("span", {
1420
+ className: R("bree-color-field", o),
1390
1421
  style: s,
1391
- children: [/* @__PURE__ */ L(Me.Trigger, {
1422
+ children: [/* @__PURE__ */ I(Fe.Trigger, {
1392
1423
  asChild: !0,
1393
- children: /* @__PURE__ */ L("button", {
1424
+ children: /* @__PURE__ */ I("button", {
1394
1425
  type: "button",
1395
- className: z("bree-color-trigger", !m && "bree-empty"),
1426
+ className: R("bree-color-trigger", !m && "bree-empty"),
1396
1427
  style: m ? { background: m } : void 0,
1397
1428
  "aria-label": d.fields.chooseColor(p || f)
1398
1429
  })
1399
- }), /* @__PURE__ */ L(U, {
1430
+ }), /* @__PURE__ */ I(U, {
1400
1431
  value: p,
1401
1432
  onChange: t,
1402
1433
  placeholder: f
1403
1434
  })]
1404
- }), /* @__PURE__ */ L(Me.Portal, { children: /* @__PURE__ */ L(M, { children: /* @__PURE__ */ R(Me.Content, {
1405
- className: z("bree bree-color-popover", c),
1435
+ }), /* @__PURE__ */ I(Fe.Portal, { children: /* @__PURE__ */ I(M, { children: /* @__PURE__ */ L(Fe.Content, {
1436
+ className: R("bree bree-color-popover", c),
1406
1437
  side: "left",
1407
1438
  align: "start",
1408
1439
  sideOffset: 10,
1409
1440
  collisionPadding: 12,
1410
1441
  onOpenAutoFocus: (e) => e.preventDefault(),
1411
1442
  children: [
1412
- /* @__PURE__ */ L(Pe, {
1443
+ /* @__PURE__ */ I(Le, {
1413
1444
  color: _,
1414
1445
  onChange: C
1415
1446
  }),
1416
- /* @__PURE__ */ R("div", {
1447
+ /* @__PURE__ */ L("div", {
1417
1448
  className: "bree-color-popover-row",
1418
1449
  children: [
1419
- /* @__PURE__ */ L("span", {
1450
+ /* @__PURE__ */ I("span", {
1420
1451
  className: "bree-color-preview",
1421
1452
  style: { background: _ }
1422
1453
  }),
1423
- /* @__PURE__ */ R("label", {
1454
+ /* @__PURE__ */ L("label", {
1424
1455
  className: "bree-hex-field",
1425
- children: [/* @__PURE__ */ L("span", { children: "#" }), /* @__PURE__ */ L(Ne, {
1456
+ children: [/* @__PURE__ */ I("span", { children: "#" }), /* @__PURE__ */ I(Ie, {
1426
1457
  color: _,
1427
1458
  onChange: w,
1428
1459
  "aria-label": d.fields.hexCode
1429
1460
  })]
1430
1461
  }),
1431
- T && /* @__PURE__ */ L("button", {
1462
+ T && /* @__PURE__ */ I("button", {
1432
1463
  type: "button",
1433
1464
  className: "bree-icon-button",
1434
1465
  title: d.fields.eyedropper,
1435
1466
  onClick: () => new T().open().then((e) => w(e.sRGBHex)).catch(() => {}),
1436
- children: /* @__PURE__ */ L(Kt, {})
1467
+ children: /* @__PURE__ */ I(Zt, {})
1437
1468
  })
1438
1469
  ]
1439
1470
  }),
1440
- E.length > 0 && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("span", {
1471
+ E.length > 0 && /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("span", {
1441
1472
  className: "bree-color-popover-title",
1442
1473
  children: d.fields.documentColors
1443
- }), /* @__PURE__ */ L("div", {
1474
+ }), /* @__PURE__ */ I("div", {
1444
1475
  className: "bree-swatches",
1445
- children: E.map((e) => /* @__PURE__ */ L("button", {
1476
+ children: E.map((e) => /* @__PURE__ */ I("button", {
1446
1477
  type: "button",
1447
1478
  className: "bree-swatch",
1448
1479
  style: { background: e },
@@ -1450,21 +1481,21 @@ function G({ value: e, onChange: t, presets: n = [], swatches: r = tn, placehold
1450
1481
  onClick: () => w(e)
1451
1482
  }, e))
1452
1483
  })] }),
1453
- /* @__PURE__ */ L("span", {
1484
+ /* @__PURE__ */ I("span", {
1454
1485
  className: "bree-color-popover-title",
1455
1486
  children: d.fields.palette
1456
1487
  }),
1457
- /* @__PURE__ */ L("div", {
1488
+ /* @__PURE__ */ I("div", {
1458
1489
  className: "bree-swatches",
1459
- children: r.map((e) => /* @__PURE__ */ L("button", {
1490
+ children: r.map((e) => /* @__PURE__ */ I("button", {
1460
1491
  type: "button",
1461
- className: z("bree-swatch", e === _ && "bree-active"),
1492
+ className: R("bree-swatch", e === _ && "bree-active"),
1462
1493
  style: { background: e },
1463
1494
  title: e,
1464
1495
  onClick: () => w(e)
1465
1496
  }, e))
1466
1497
  }),
1467
- /* @__PURE__ */ L("button", {
1498
+ /* @__PURE__ */ I("button", {
1468
1499
  type: "button",
1469
1500
  className: "bree-color-reset",
1470
1501
  onClick: () => {
@@ -1476,61 +1507,61 @@ function G({ value: e, onChange: t, presets: n = [], swatches: r = tn, placehold
1476
1507
  }) }) })]
1477
1508
  });
1478
1509
  }
1479
- function rn({ value: e, onChange: t, options: n, className: r, style: i }) {
1480
- return /* @__PURE__ */ L("select", {
1481
- className: z("bree-input bree-select", r),
1510
+ function ln({ value: e, onChange: t, options: n, className: r, style: i }) {
1511
+ return /* @__PURE__ */ I("select", {
1512
+ className: R("bree-input bree-select", r),
1482
1513
  style: i,
1483
1514
  value: e,
1484
1515
  onChange: (e) => t(e.target.value),
1485
- children: n.map(([e, t]) => /* @__PURE__ */ L("option", {
1516
+ children: n.map(([e, t]) => /* @__PURE__ */ I("option", {
1486
1517
  value: e,
1487
1518
  children: t
1488
1519
  }, e))
1489
1520
  });
1490
1521
  }
1491
- function an({ value: e, onChange: t, emptyLabel: n, className: r, style: i }) {
1492
- let a = Zn()?.fonts ?? wt, o = Et(a, e), s = e && !o ? {
1522
+ function un({ value: e, onChange: t, emptyLabel: n, className: r, style: i }) {
1523
+ let a = nr()?.fonts ?? Dt, o = kt(a, e), s = e && !o ? {
1493
1524
  label: e.split(",")[0].replace(/['"]/g, "").trim(),
1494
1525
  value: e
1495
1526
  } : null, c = s ? [...a, s] : a;
1496
- return /* @__PURE__ */ R("select", {
1497
- className: z("bree-input bree-select", r),
1527
+ return /* @__PURE__ */ L("select", {
1528
+ className: R("bree-input bree-select", r),
1498
1529
  style: {
1499
1530
  fontFamily: e || void 0,
1500
1531
  ...i
1501
1532
  },
1502
1533
  value: o?.value ?? e ?? "",
1503
1534
  onChange: (e) => t(e.target.value),
1504
- children: [(n !== void 0 || !e) && /* @__PURE__ */ L("option", {
1535
+ children: [(n !== void 0 || !e) && /* @__PURE__ */ I("option", {
1505
1536
  value: "",
1506
1537
  children: n ?? ""
1507
- }), c.map((e) => /* @__PURE__ */ L("option", {
1538
+ }), c.map((e) => /* @__PURE__ */ I("option", {
1508
1539
  value: e.value,
1509
1540
  style: { fontFamily: e.value },
1510
1541
  children: e.label
1511
1542
  }, e.value))]
1512
1543
  });
1513
1544
  }
1514
- function on({ value: e, onChange: t, options: n, ariaLabel: r, className: i, style: a }) {
1515
- return /* @__PURE__ */ L("span", {
1516
- className: z("bree-segmented", i),
1545
+ function dn({ value: e, onChange: t, options: n, ariaLabel: r, className: i, style: a }) {
1546
+ return /* @__PURE__ */ I("span", {
1547
+ className: R("bree-segmented", i),
1517
1548
  style: a,
1518
1549
  role: "radiogroup",
1519
1550
  "aria-label": r,
1520
- children: n.map((n) => /* @__PURE__ */ L("button", {
1551
+ children: n.map((n) => /* @__PURE__ */ I("button", {
1521
1552
  type: "button",
1522
1553
  role: "radio",
1523
1554
  "aria-checked": e === n.value,
1524
1555
  title: n.title,
1525
- className: z(e === n.value && "bree-active"),
1556
+ className: R(e === n.value && "bree-active"),
1526
1557
  onClick: () => t(n.value),
1527
1558
  children: n.label
1528
1559
  }, n.value))
1529
1560
  });
1530
1561
  }
1531
- function sn({ value: e, onChange: t, className: n, style: r }) {
1562
+ function fn({ value: e, onChange: t, className: n, style: r }) {
1532
1563
  let i = $();
1533
- return /* @__PURE__ */ L(on, {
1564
+ return /* @__PURE__ */ I(dn, {
1534
1565
  className: n,
1535
1566
  style: r,
1536
1567
  value: e || "left",
@@ -1538,52 +1569,52 @@ function sn({ value: e, onChange: t, className: n, style: r }) {
1538
1569
  options: [
1539
1570
  {
1540
1571
  value: "left",
1541
- label: /* @__PURE__ */ L(oe, { size: 14 }),
1572
+ label: /* @__PURE__ */ I(se, { size: 14 }),
1542
1573
  title: i.fields.alignLeft
1543
1574
  },
1544
1575
  {
1545
1576
  value: "center",
1546
- label: /* @__PURE__ */ L(ae, { size: 14 }),
1577
+ label: /* @__PURE__ */ I(oe, { size: 14 }),
1547
1578
  title: i.fields.alignCenter
1548
1579
  },
1549
1580
  {
1550
1581
  value: "right",
1551
- label: /* @__PURE__ */ L(se, { size: 14 }),
1582
+ label: /* @__PURE__ */ I(ce, { size: 14 }),
1552
1583
  title: i.fields.alignRight
1553
1584
  }
1554
1585
  ]
1555
1586
  });
1556
1587
  }
1557
- function cn({ get: e, set: t, className: n, style: r }) {
1588
+ function pn({ get: e, set: t, className: n, style: r }) {
1558
1589
  let i = $(), a = [
1559
1590
  "Top",
1560
1591
  "Right",
1561
1592
  "Bottom",
1562
1593
  "Left"
1563
- ], o = a.map((t) => $t(e(t))), s = o.every((e) => e === o[0]), [c, l] = u(!s), d = {
1594
+ ], o = a.map((t) => an(e(t))), s = o.every((e) => e === o[0]), [c, l] = u(!s), d = {
1564
1595
  Top: i.fields.top,
1565
1596
  Right: i.fields.right,
1566
1597
  Bottom: i.fields.bottom,
1567
1598
  Left: i.fields.left
1568
1599
  };
1569
- return /* @__PURE__ */ R("div", {
1570
- className: z("bree-padding", n),
1600
+ return /* @__PURE__ */ L("div", {
1601
+ className: R("bree-padding", n),
1571
1602
  style: r,
1572
- children: [c ? /* @__PURE__ */ L("div", {
1603
+ children: [c ? /* @__PURE__ */ I("div", {
1573
1604
  className: "bree-padding-grid",
1574
- children: a.map((e, n) => /* @__PURE__ */ R("label", {
1605
+ children: a.map((e, n) => /* @__PURE__ */ L("label", {
1575
1606
  className: "bree-padding-side",
1576
- children: [/* @__PURE__ */ L("span", { children: d[e] }), /* @__PURE__ */ L(W, {
1607
+ children: [/* @__PURE__ */ I("span", { children: d[e] }), /* @__PURE__ */ I(W, {
1577
1608
  value: o[n],
1578
1609
  onChange: (n) => t([[e, n]])
1579
1610
  })]
1580
1611
  }, e))
1581
- }) : /* @__PURE__ */ L(W, {
1612
+ }) : /* @__PURE__ */ I(W, {
1582
1613
  value: o[0],
1583
1614
  onChange: (e) => t(a.map((t) => [t, e]))
1584
- }), /* @__PURE__ */ R("label", {
1615
+ }), /* @__PURE__ */ L("label", {
1585
1616
  className: "bree-checkbox",
1586
- children: [/* @__PURE__ */ L("input", {
1617
+ children: [/* @__PURE__ */ I("input", {
1587
1618
  type: "checkbox",
1588
1619
  checked: c,
1589
1620
  onChange: (e) => l(e.target.checked)
@@ -1594,42 +1625,42 @@ function cn({ get: e, set: t, className: n, style: r }) {
1594
1625
  //#endregion
1595
1626
  //#region src/components/inspectors/groups.tsx
1596
1627
  var K = (e) => e;
1597
- function ln({ ctx: e, alignment: t, setAlignment: n, className: r, style: i }) {
1628
+ function mn({ ctx: e, alignment: t, setAlignment: n, className: r, style: i }) {
1598
1629
  let a = $().inspector;
1599
- return /* @__PURE__ */ R(V, {
1630
+ return /* @__PURE__ */ L(V, {
1600
1631
  title: a.typography,
1601
1632
  className: r,
1602
1633
  style: i,
1603
1634
  children: [
1604
- /* @__PURE__ */ L(H, {
1635
+ /* @__PURE__ */ I(H, {
1605
1636
  label: a.font,
1606
- children: /* @__PURE__ */ L(an, {
1637
+ children: /* @__PURE__ */ I(un, {
1607
1638
  value: e.getStyle(K("fontFamily")),
1608
1639
  emptyLabel: a.fontDefault,
1609
1640
  onChange: (t) => e.setStyle(K("fontFamily"), t)
1610
1641
  })
1611
1642
  }),
1612
- /* @__PURE__ */ L(H, {
1643
+ /* @__PURE__ */ I(H, {
1613
1644
  label: a.color,
1614
1645
  stacked: !0,
1615
- children: /* @__PURE__ */ L(G, {
1646
+ children: /* @__PURE__ */ I(G, {
1616
1647
  value: e.getStyle(K("color")),
1617
1648
  presets: e.presetColors,
1618
1649
  onChange: (t) => e.setStyle(K("color"), t)
1619
1650
  })
1620
1651
  }),
1621
- /* @__PURE__ */ L(H, {
1652
+ /* @__PURE__ */ I(H, {
1622
1653
  label: a.size,
1623
- children: /* @__PURE__ */ L(W, {
1654
+ children: /* @__PURE__ */ I(W, {
1624
1655
  value: e.getStyle(K("fontSize")),
1625
1656
  onChange: (t) => e.setStyle(K("fontSize"), t),
1626
1657
  min: 8,
1627
1658
  max: 96
1628
1659
  })
1629
1660
  }),
1630
- /* @__PURE__ */ L(H, {
1661
+ /* @__PURE__ */ I(H, {
1631
1662
  label: a.weight,
1632
- children: /* @__PURE__ */ L(rn, {
1663
+ children: /* @__PURE__ */ I(ln, {
1633
1664
  value: String(e.getStyle(K("fontWeight")) ?? "400"),
1634
1665
  onChange: (t) => e.setStyle(K("fontWeight"), t),
1635
1666
  options: [
@@ -1641,9 +1672,9 @@ function ln({ ctx: e, alignment: t, setAlignment: n, className: r, style: i }) {
1641
1672
  ]
1642
1673
  })
1643
1674
  }),
1644
- /* @__PURE__ */ L(H, {
1675
+ /* @__PURE__ */ I(H, {
1645
1676
  label: a.lineHeight,
1646
- children: /* @__PURE__ */ L(W, {
1677
+ children: /* @__PURE__ */ I(W, {
1647
1678
  value: e.getStyle(K("lineHeight")),
1648
1679
  unit: "%",
1649
1680
  onChange: (t) => e.setStyle(K("lineHeight"), t),
@@ -1652,9 +1683,9 @@ function ln({ ctx: e, alignment: t, setAlignment: n, className: r, style: i }) {
1652
1683
  step: 5
1653
1684
  })
1654
1685
  }),
1655
- n && /* @__PURE__ */ L(H, {
1686
+ n && /* @__PURE__ */ I(H, {
1656
1687
  label: a.alignment,
1657
- children: /* @__PURE__ */ L(sn, {
1688
+ children: /* @__PURE__ */ I(fn, {
1658
1689
  value: t ?? "left",
1659
1690
  onChange: n
1660
1691
  })
@@ -1664,14 +1695,14 @@ function ln({ ctx: e, alignment: t, setAlignment: n, className: r, style: i }) {
1664
1695
  }
1665
1696
  function q({ ctx: e, title: t, className: n, style: r }) {
1666
1697
  let i = $();
1667
- return /* @__PURE__ */ L(V, {
1698
+ return /* @__PURE__ */ I(V, {
1668
1699
  title: t ?? i.inspector.spacing,
1669
1700
  className: n,
1670
1701
  style: r,
1671
- children: /* @__PURE__ */ L(H, {
1702
+ children: /* @__PURE__ */ I(H, {
1672
1703
  label: i.inspector.padding,
1673
1704
  stacked: !0,
1674
- children: /* @__PURE__ */ L(cn, {
1705
+ children: /* @__PURE__ */ I(pn, {
1675
1706
  get: (t) => e.getStyle(K(`padding${t}`)) ?? e.getStyle(K("padding")),
1676
1707
  set: (t) => e.batchSetStyle([{
1677
1708
  prop: K("padding"),
@@ -1684,32 +1715,32 @@ function q({ ctx: e, title: t, className: n, style: r }) {
1684
1715
  })
1685
1716
  });
1686
1717
  }
1687
- function un({ ctx: e, className: t, style: n }) {
1718
+ function hn({ ctx: e, className: t, style: n }) {
1688
1719
  let r = $().inspector;
1689
- return /* @__PURE__ */ R(V, {
1720
+ return /* @__PURE__ */ L(V, {
1690
1721
  title: r.box,
1691
1722
  className: t,
1692
1723
  style: n,
1693
1724
  children: [
1694
- /* @__PURE__ */ L(H, {
1725
+ /* @__PURE__ */ I(H, {
1695
1726
  label: r.backgroundColor,
1696
1727
  stacked: !0,
1697
- children: /* @__PURE__ */ L(G, {
1728
+ children: /* @__PURE__ */ I(G, {
1698
1729
  value: e.getStyle(K("backgroundColor")),
1699
1730
  presets: e.presetColors,
1700
1731
  onChange: (t) => e.setStyle(K("backgroundColor"), t)
1701
1732
  })
1702
1733
  }),
1703
- /* @__PURE__ */ L(H, {
1734
+ /* @__PURE__ */ I(H, {
1704
1735
  label: r.radius,
1705
- children: /* @__PURE__ */ L(W, {
1736
+ children: /* @__PURE__ */ I(W, {
1706
1737
  value: e.getStyle(K("borderRadius")),
1707
1738
  onChange: (t) => e.setStyle(K("borderRadius"), t)
1708
1739
  })
1709
1740
  }),
1710
- /* @__PURE__ */ L(H, {
1741
+ /* @__PURE__ */ I(H, {
1711
1742
  label: r.border,
1712
- children: /* @__PURE__ */ L(W, {
1743
+ children: /* @__PURE__ */ I(W, {
1713
1744
  value: e.getStyle(K("borderWidth")),
1714
1745
  onChange: (t) => e.batchSetStyle([{
1715
1746
  prop: K("borderWidth"),
@@ -1720,10 +1751,10 @@ function un({ ctx: e, className: t, style: n }) {
1720
1751
  }])
1721
1752
  })
1722
1753
  }),
1723
- /* @__PURE__ */ L(H, {
1754
+ /* @__PURE__ */ I(H, {
1724
1755
  label: r.borderColor,
1725
1756
  stacked: !0,
1726
- children: /* @__PURE__ */ L(G, {
1757
+ children: /* @__PURE__ */ I(G, {
1727
1758
  value: e.getStyle(K("borderColor")),
1728
1759
  presets: e.presetColors,
1729
1760
  onChange: (t) => e.setStyle(K("borderColor"), t)
@@ -1734,71 +1765,71 @@ function un({ ctx: e, className: t, style: n }) {
1734
1765
  }
1735
1766
  //#endregion
1736
1767
  //#region src/components/inspectors/ButtonInspector.tsx
1737
- function dn({ ctx: e, className: t, style: n }) {
1768
+ function gn({ ctx: e, className: t, style: n }) {
1738
1769
  let r = $().inspector;
1739
- return /* @__PURE__ */ R("div", {
1740
- className: z("bree-inspector", t),
1770
+ return /* @__PURE__ */ L("div", {
1771
+ className: R("bree-inspector", t),
1741
1772
  style: n,
1742
1773
  children: [
1743
- /* @__PURE__ */ L(V, {
1774
+ /* @__PURE__ */ I(V, {
1744
1775
  title: r.action,
1745
- children: /* @__PURE__ */ L(H, {
1776
+ children: /* @__PURE__ */ I(H, {
1746
1777
  label: r.linkUrl,
1747
1778
  stacked: !0,
1748
- children: /* @__PURE__ */ L(U, {
1779
+ children: /* @__PURE__ */ I(U, {
1749
1780
  value: String(e.getAttr("href") ?? ""),
1750
1781
  onChange: (t) => e.setAttr("href", t),
1751
1782
  placeholder: "https://"
1752
1783
  })
1753
1784
  })
1754
1785
  }),
1755
- /* @__PURE__ */ R(V, {
1786
+ /* @__PURE__ */ L(V, {
1756
1787
  title: r.button,
1757
1788
  children: [
1758
- /* @__PURE__ */ L(H, {
1789
+ /* @__PURE__ */ I(H, {
1759
1790
  label: r.alignment,
1760
- children: /* @__PURE__ */ L(sn, {
1791
+ children: /* @__PURE__ */ I(fn, {
1761
1792
  value: String(e.getAttr("alignment") ?? "left"),
1762
1793
  onChange: (t) => e.setAttr("alignment", t)
1763
1794
  })
1764
1795
  }),
1765
- /* @__PURE__ */ L(H, {
1796
+ /* @__PURE__ */ I(H, {
1766
1797
  label: r.backgroundColor,
1767
1798
  stacked: !0,
1768
- children: /* @__PURE__ */ L(G, {
1799
+ children: /* @__PURE__ */ I(G, {
1769
1800
  value: e.getStyle(K("backgroundColor")),
1770
1801
  presets: e.presetColors,
1771
1802
  onChange: (t) => e.setStyle(K("backgroundColor"), t)
1772
1803
  })
1773
1804
  }),
1774
- /* @__PURE__ */ L(H, {
1805
+ /* @__PURE__ */ I(H, {
1775
1806
  label: r.textColor,
1776
1807
  stacked: !0,
1777
- children: /* @__PURE__ */ L(G, {
1808
+ children: /* @__PURE__ */ I(G, {
1778
1809
  value: e.getStyle(K("color")),
1779
1810
  presets: e.presetColors,
1780
1811
  onChange: (t) => e.setStyle(K("color"), t)
1781
1812
  })
1782
1813
  }),
1783
- /* @__PURE__ */ L(H, {
1814
+ /* @__PURE__ */ I(H, {
1784
1815
  label: r.textSize,
1785
- children: /* @__PURE__ */ L(W, {
1816
+ children: /* @__PURE__ */ I(W, {
1786
1817
  value: e.getStyle(K("fontSize")),
1787
1818
  onChange: (t) => e.setStyle(K("fontSize"), t),
1788
1819
  min: 8,
1789
1820
  max: 48
1790
1821
  })
1791
1822
  }),
1792
- /* @__PURE__ */ L(H, {
1823
+ /* @__PURE__ */ I(H, {
1793
1824
  label: r.radius,
1794
- children: /* @__PURE__ */ L(W, {
1825
+ children: /* @__PURE__ */ I(W, {
1795
1826
  value: e.getStyle(K("borderRadius")),
1796
1827
  onChange: (t) => e.setStyle(K("borderRadius"), t)
1797
1828
  })
1798
1829
  })
1799
1830
  ]
1800
1831
  }),
1801
- /* @__PURE__ */ L(q, {
1832
+ /* @__PURE__ */ I(q, {
1802
1833
  ctx: e,
1803
1834
  title: r.buttonPadding
1804
1835
  })
@@ -1807,7 +1838,7 @@ function dn({ ctx: e, className: t, style: n }) {
1807
1838
  }
1808
1839
  //#endregion
1809
1840
  //#region src/components/inspectors/ColumnsInspector.tsx
1810
- function fn({ ctx: e, className: t, style: n }) {
1841
+ function _n({ ctx: e, className: t, style: n }) {
1811
1842
  let { editor: r, t: i } = Q(), a = i.inspector, o = {
1812
1843
  twoColumns: 2,
1813
1844
  threeColumns: 3,
@@ -1842,36 +1873,36 @@ function fn({ ctx: e, className: t, style: n }) {
1842
1873
  });
1843
1874
  }), n.selection instanceof D && a.setSelection(D.create(a.doc, e.nodePos.pos)), r.view.dispatch(a);
1844
1875
  };
1845
- return /* @__PURE__ */ L("div", {
1846
- className: z("bree-inspector", t),
1876
+ return /* @__PURE__ */ I("div", {
1877
+ className: R("bree-inspector", t),
1847
1878
  style: n,
1848
- children: /* @__PURE__ */ R(V, {
1879
+ children: /* @__PURE__ */ L(V, {
1849
1880
  title: a.columns,
1850
1881
  children: [
1851
- /* @__PURE__ */ L(H, {
1882
+ /* @__PURE__ */ I(H, {
1852
1883
  label: a.distribution,
1853
1884
  stacked: !0,
1854
- children: /* @__PURE__ */ L("div", {
1885
+ children: /* @__PURE__ */ I("div", {
1855
1886
  className: "bree-ratio-grid",
1856
- children: s.map(([e, t]) => /* @__PURE__ */ R("button", {
1887
+ children: s.map(([e, t]) => /* @__PURE__ */ L("button", {
1857
1888
  type: "button",
1858
1889
  className: "bree-ratio",
1859
1890
  onClick: () => c(t),
1860
- children: [/* @__PURE__ */ L("span", {
1891
+ children: [/* @__PURE__ */ I("span", {
1861
1892
  className: "bree-ratio-bars",
1862
- children: t.map((e, t) => /* @__PURE__ */ L("i", { style: { flex: e } }, t))
1893
+ children: t.map((e, t) => /* @__PURE__ */ I("i", { style: { flex: e } }, t))
1863
1894
  }), e]
1864
1895
  }, e))
1865
1896
  })
1866
1897
  }),
1867
- /* @__PURE__ */ L(H, {
1898
+ /* @__PURE__ */ I(H, {
1868
1899
  label: a.columnGap,
1869
- children: /* @__PURE__ */ L(W, {
1900
+ children: /* @__PURE__ */ I(W, {
1870
1901
  value: e.getAttr("cellspacing") ?? 0,
1871
1902
  onChange: (t) => e.setAttr("cellspacing", t === "" ? null : t)
1872
1903
  })
1873
1904
  }),
1874
- /* @__PURE__ */ L("p", {
1905
+ /* @__PURE__ */ I("p", {
1875
1906
  className: "bree-hint",
1876
1907
  children: a.columnsHint
1877
1908
  })
@@ -1881,17 +1912,17 @@ function fn({ ctx: e, className: t, style: n }) {
1881
1912
  }
1882
1913
  //#endregion
1883
1914
  //#region src/components/inspectors/HeadingInspector.tsx
1884
- function pn({ ctx: e, className: t, style: n }) {
1915
+ function vn({ ctx: e, className: t, style: n }) {
1885
1916
  let r = $();
1886
- return /* @__PURE__ */ R("div", {
1887
- className: z("bree-inspector", t),
1917
+ return /* @__PURE__ */ L("div", {
1918
+ className: R("bree-inspector", t),
1888
1919
  style: n,
1889
1920
  children: [
1890
- /* @__PURE__ */ L(V, {
1921
+ /* @__PURE__ */ I(V, {
1891
1922
  title: r.inspector.heading,
1892
- children: /* @__PURE__ */ L(H, {
1923
+ children: /* @__PURE__ */ I(H, {
1893
1924
  label: r.inspector.level,
1894
- children: /* @__PURE__ */ L(on, {
1925
+ children: /* @__PURE__ */ I(dn, {
1895
1926
  value: String(e.getAttr("level") ?? 1),
1896
1927
  onChange: (t) => e.setAttr("level", Number(t)),
1897
1928
  options: [
@@ -1911,37 +1942,37 @@ function pn({ ctx: e, className: t, style: n }) {
1911
1942
  })
1912
1943
  })
1913
1944
  }),
1914
- /* @__PURE__ */ L(ln, {
1945
+ /* @__PURE__ */ I(mn, {
1915
1946
  ctx: e,
1916
1947
  alignment: String(e.getAttr("alignment") ?? "left"),
1917
1948
  setAlignment: (t) => e.setAttr("alignment", t)
1918
1949
  }),
1919
- /* @__PURE__ */ L(q, { ctx: e }),
1920
- /* @__PURE__ */ L(un, { ctx: e })
1950
+ /* @__PURE__ */ I(q, { ctx: e }),
1951
+ /* @__PURE__ */ I(hn, { ctx: e })
1921
1952
  ]
1922
1953
  });
1923
1954
  }
1924
1955
  //#endregion
1925
1956
  //#region src/components/inspectors/ImageInspector.tsx
1926
- function mn({ ctx: e, className: t, style: n }) {
1957
+ function yn({ ctx: e, className: t, style: n }) {
1927
1958
  let { t: r, uploadImage: i } = Q(), a = r.inspector, o = String(e.getAttr("width") ?? "auto");
1928
- return /* @__PURE__ */ R("div", {
1929
- className: z("bree-inspector", t),
1959
+ return /* @__PURE__ */ L("div", {
1960
+ className: R("bree-inspector", t),
1930
1961
  style: n,
1931
1962
  children: [
1932
- /* @__PURE__ */ R(V, {
1963
+ /* @__PURE__ */ L(V, {
1933
1964
  title: a.image,
1934
1965
  children: [
1935
- /* @__PURE__ */ L("div", {
1966
+ /* @__PURE__ */ I("div", {
1936
1967
  className: "bree-image-preview",
1937
- children: e.getAttr("src") ? /* @__PURE__ */ L("img", {
1968
+ children: e.getAttr("src") ? /* @__PURE__ */ I("img", {
1938
1969
  src: String(e.getAttr("src")),
1939
1970
  alt: ""
1940
1971
  }) : null
1941
1972
  }),
1942
- /* @__PURE__ */ R("label", {
1973
+ /* @__PURE__ */ L("label", {
1943
1974
  className: "bree-button-like",
1944
- children: [a.uploadImage, /* @__PURE__ */ L("input", {
1975
+ children: [a.uploadImage, /* @__PURE__ */ I("input", {
1945
1976
  type: "file",
1946
1977
  accept: "image/*",
1947
1978
  hidden: !0,
@@ -1951,18 +1982,18 @@ function mn({ ctx: e, className: t, style: n }) {
1951
1982
  }
1952
1983
  })]
1953
1984
  }),
1954
- /* @__PURE__ */ L(H, {
1985
+ /* @__PURE__ */ I(H, {
1955
1986
  label: a.imageUrl,
1956
1987
  stacked: !0,
1957
- children: /* @__PURE__ */ L(U, {
1988
+ children: /* @__PURE__ */ I(U, {
1958
1989
  value: String(e.getAttr("src") ?? ""),
1959
1990
  onChange: (t) => e.setAttr("src", t)
1960
1991
  })
1961
1992
  }),
1962
- /* @__PURE__ */ L(H, {
1993
+ /* @__PURE__ */ I(H, {
1963
1994
  label: a.altText,
1964
1995
  stacked: !0,
1965
- children: /* @__PURE__ */ L(U, {
1996
+ children: /* @__PURE__ */ I(U, {
1966
1997
  value: String(e.getAttr("alt") ?? ""),
1967
1998
  onChange: (t) => e.setAttr("alt", t),
1968
1999
  placeholder: a.altPlaceholder
@@ -1970,70 +2001,70 @@ function mn({ ctx: e, className: t, style: n }) {
1970
2001
  })
1971
2002
  ]
1972
2003
  }),
1973
- /* @__PURE__ */ R(V, {
2004
+ /* @__PURE__ */ L(V, {
1974
2005
  title: a.layout,
1975
2006
  children: [
1976
- /* @__PURE__ */ L(H, {
2007
+ /* @__PURE__ */ I(H, {
1977
2008
  label: a.autoWidth,
1978
- children: /* @__PURE__ */ L("input", {
2009
+ children: /* @__PURE__ */ I("input", {
1979
2010
  type: "checkbox",
1980
2011
  checked: o === "auto",
1981
2012
  onChange: (t) => e.setAttr("width", t.target.checked ? "auto" : "300")
1982
2013
  })
1983
2014
  }),
1984
- o !== "auto" && /* @__PURE__ */ L(H, {
2015
+ o !== "auto" && /* @__PURE__ */ I(H, {
1985
2016
  label: a.width,
1986
- children: /* @__PURE__ */ L(en, {
2017
+ children: /* @__PURE__ */ I(on, {
1987
2018
  value: o,
1988
2019
  min: 20,
1989
2020
  max: 900,
1990
2021
  onChange: (t) => e.setAttr("width", String(t))
1991
2022
  })
1992
2023
  }),
1993
- /* @__PURE__ */ L(H, {
2024
+ /* @__PURE__ */ I(H, {
1994
2025
  label: a.alignment,
1995
- children: /* @__PURE__ */ L(sn, {
2026
+ children: /* @__PURE__ */ I(fn, {
1996
2027
  value: String(e.getAttr("alignment") ?? "center"),
1997
2028
  onChange: (t) => e.setAttr("alignment", t)
1998
2029
  })
1999
2030
  }),
2000
- /* @__PURE__ */ L(H, {
2031
+ /* @__PURE__ */ I(H, {
2001
2032
  label: a.radius,
2002
- children: /* @__PURE__ */ L(W, {
2033
+ children: /* @__PURE__ */ I(W, {
2003
2034
  value: e.getStyle(K("borderRadius")),
2004
2035
  onChange: (t) => e.setStyle(K("borderRadius"), t)
2005
2036
  })
2006
2037
  })
2007
2038
  ]
2008
2039
  }),
2009
- /* @__PURE__ */ L(V, {
2040
+ /* @__PURE__ */ I(V, {
2010
2041
  title: a.action,
2011
- children: /* @__PURE__ */ L(H, {
2042
+ children: /* @__PURE__ */ I(H, {
2012
2043
  label: a.clickLink,
2013
2044
  stacked: !0,
2014
- children: /* @__PURE__ */ L(U, {
2045
+ children: /* @__PURE__ */ I(U, {
2015
2046
  value: String(e.getAttr("href") ?? ""),
2016
2047
  onChange: (t) => e.setAttr("href", t || null),
2017
2048
  placeholder: "https://"
2018
2049
  })
2019
2050
  })
2020
2051
  }),
2021
- /* @__PURE__ */ L(q, { ctx: e })
2052
+ /* @__PURE__ */ I(q, { ctx: e })
2022
2053
  ]
2023
2054
  });
2024
2055
  }
2025
2056
  //#endregion
2026
2057
  //#region src/components/inspectors/SimpleInspectors.tsx
2027
- function hn({ ctx: e, className: t, style: n }) {
2058
+ function bn({ ctx: e, className: t, style: n }) {
2028
2059
  let r = $();
2029
- return /* @__PURE__ */ L("div", {
2030
- className: z("bree-inspector", t),
2060
+ return /* @__PURE__ */ I("div", {
2061
+ className: R("bree-inspector", t),
2031
2062
  style: n,
2032
- children: /* @__PURE__ */ L(V, {
2063
+ children: /* @__PURE__ */ I(V, {
2033
2064
  title: r.inspector.spacer,
2034
- children: /* @__PURE__ */ L(H, {
2065
+ children: /* @__PURE__ */ I(H, {
2035
2066
  label: r.inspector.height,
2036
- children: /* @__PURE__ */ L(en, {
2067
+ children: /* @__PURE__ */ I(on, {
2037
2068
  value: e.getAttr("height"),
2038
2069
  min: 4,
2039
2070
  max: 160,
@@ -2043,44 +2074,44 @@ function hn({ ctx: e, className: t, style: n }) {
2043
2074
  })
2044
2075
  });
2045
2076
  }
2046
- function gn({ ctx: e, className: t, style: n }) {
2077
+ function xn({ ctx: e, className: t, style: n }) {
2047
2078
  let r = $();
2048
- return /* @__PURE__ */ L("div", {
2049
- className: z("bree-inspector", t),
2079
+ return /* @__PURE__ */ I("div", {
2080
+ className: R("bree-inspector", t),
2050
2081
  style: n,
2051
- children: /* @__PURE__ */ R(V, {
2082
+ children: /* @__PURE__ */ L(V, {
2052
2083
  title: r.inspector.htmlCode,
2053
- children: [/* @__PURE__ */ L(Qt, {
2084
+ children: [/* @__PURE__ */ I(rn, {
2054
2085
  value: String(e.getAttr("html") ?? ""),
2055
2086
  onChange: (t) => e.setAttr("html", t),
2056
2087
  rows: 14
2057
- }), /* @__PURE__ */ L("p", {
2088
+ }), /* @__PURE__ */ I("p", {
2058
2089
  className: "bree-hint",
2059
2090
  children: r.inspector.htmlHint
2060
2091
  })]
2061
2092
  })
2062
2093
  });
2063
2094
  }
2064
- function _n({ ctx: e, className: t, style: n }) {
2095
+ function Sn({ ctx: e, className: t, style: n }) {
2065
2096
  let r = $().inspector;
2066
- return /* @__PURE__ */ L("div", {
2067
- className: z("bree-inspector", t),
2097
+ return /* @__PURE__ */ I("div", {
2098
+ className: R("bree-inspector", t),
2068
2099
  style: n,
2069
- children: /* @__PURE__ */ R(V, {
2100
+ children: /* @__PURE__ */ L(V, {
2070
2101
  title: r.line,
2071
2102
  children: [
2072
- /* @__PURE__ */ L(H, {
2103
+ /* @__PURE__ */ I(H, {
2073
2104
  label: r.color,
2074
2105
  stacked: !0,
2075
- children: /* @__PURE__ */ L(G, {
2106
+ children: /* @__PURE__ */ I(G, {
2076
2107
  value: e.getStyle(K("borderTopColor")),
2077
2108
  presets: e.presetColors,
2078
2109
  onChange: (t) => e.setStyle(K("borderTopColor"), t)
2079
2110
  })
2080
2111
  }),
2081
- /* @__PURE__ */ L(H, {
2112
+ /* @__PURE__ */ I(H, {
2082
2113
  label: r.thickness,
2083
- children: /* @__PURE__ */ L(W, {
2114
+ children: /* @__PURE__ */ I(W, {
2084
2115
  value: e.getStyle(K("borderTopWidth")) ?? 1,
2085
2116
  onChange: (t) => e.batchSetStyle([{
2086
2117
  prop: K("borderTopWidth"),
@@ -2093,9 +2124,9 @@ function _n({ ctx: e, className: t, style: n }) {
2093
2124
  max: 12
2094
2125
  })
2095
2126
  }),
2096
- /* @__PURE__ */ L(H, {
2127
+ /* @__PURE__ */ I(H, {
2097
2128
  label: r.lineStyle,
2098
- children: /* @__PURE__ */ L(on, {
2129
+ children: /* @__PURE__ */ I(dn, {
2099
2130
  value: String(e.getStyle(K("borderTopStyle")) ?? "solid"),
2100
2131
  onChange: (t) => e.setStyle(K("borderTopStyle"), t),
2101
2132
  options: [
@@ -2118,16 +2149,16 @@ function _n({ ctx: e, className: t, style: n }) {
2118
2149
  })
2119
2150
  });
2120
2151
  }
2121
- function vn({ ctx: e, className: t, style: n }) {
2122
- return /* @__PURE__ */ R("div", {
2123
- className: z("bree-inspector", t),
2152
+ function Cn({ ctx: e, className: t, style: n }) {
2153
+ return /* @__PURE__ */ L("div", {
2154
+ className: R("bree-inspector", t),
2124
2155
  style: n,
2125
- children: [/* @__PURE__ */ L(un, { ctx: e }), /* @__PURE__ */ L(q, { ctx: e })]
2156
+ children: [/* @__PURE__ */ I(hn, { ctx: e }), /* @__PURE__ */ I(q, { ctx: e })]
2126
2157
  });
2127
2158
  }
2128
2159
  //#endregion
2129
2160
  //#region src/core/style-utils.ts
2130
- function yn(e) {
2161
+ function wn(e) {
2131
2162
  if (typeof e != "string" || !e.trim()) return {};
2132
2163
  let t = {};
2133
2164
  for (let n of e.split(";")) {
@@ -2140,18 +2171,18 @@ function yn(e) {
2140
2171
  }
2141
2172
  //#endregion
2142
2173
  //#region src/nodes/custom-nodes.tsx
2143
- var bn = { style: {
2174
+ var Tn = { style: {
2144
2175
  default: null,
2145
2176
  parseHTML: (e) => e.getAttribute("style"),
2146
2177
  renderHTML: (e) => e.style ? { style: e.style } : {}
2147
- } }, xn = _.create({
2178
+ } }, En = _.create({
2148
2179
  name: "spacer",
2149
2180
  group: "block",
2150
2181
  atom: !0,
2151
2182
  selectable: !0,
2152
2183
  addAttributes() {
2153
2184
  return {
2154
- ...bn,
2185
+ ...Tn,
2155
2186
  height: {
2156
2187
  default: 32,
2157
2188
  parseHTML: (e) => Number(e.dataset.height) || 32,
@@ -2163,7 +2194,7 @@ var bn = { style: {
2163
2194
  return [{ tag: "div[data-type=\"spacer\"]" }];
2164
2195
  },
2165
2196
  renderHTML({ node: e, HTMLAttributes: t }) {
2166
- return ["div", re(t, {
2197
+ return ["div", ne(t, {
2167
2198
  "data-type": "spacer",
2168
2199
  class: "node-spacer",
2169
2200
  style: `height:${Number(e.attrs.height)}px`
@@ -2171,17 +2202,17 @@ var bn = { style: {
2171
2202
  },
2172
2203
  renderToReactEmail({ node: e }) {
2173
2204
  let t = Number(e.attrs?.height ?? 32);
2174
- return /* @__PURE__ */ L(ze, {
2205
+ return /* @__PURE__ */ I(He, {
2175
2206
  style: {
2176
2207
  height: t,
2177
2208
  lineHeight: `${t}px`,
2178
2209
  fontSize: "1px",
2179
- ...yn(e.attrs?.style)
2210
+ ...wn(e.attrs?.style)
2180
2211
  },
2181
2212
  children: "\xA0"
2182
2213
  });
2183
2214
  }
2184
- }), Sn = {
2215
+ }), Dn = {
2185
2216
  facebook: {
2186
2217
  label: "Facebook",
2187
2218
  slug: "facebook",
@@ -2217,13 +2248,13 @@ var bn = { style: {
2217
2248
  slug: "github",
2218
2249
  color: "181717"
2219
2250
  }
2220
- }, Cn = { linkedin: "https://cdn.jsdelivr.net/npm/simple-icons@9.21.0/icons/linkedin.svg" };
2221
- function wn(e) {
2222
- if (Cn[e]) return Cn[e];
2223
- let t = Sn[e] ?? Sn.facebook;
2251
+ }, On = { linkedin: "https://cdn.jsdelivr.net/npm/simple-icons@9.21.0/icons/linkedin.svg" };
2252
+ function kn(e) {
2253
+ if (On[e]) return On[e];
2254
+ let t = Dn[e] ?? Dn.facebook;
2224
2255
  return `https://cdn.simpleicons.org/${t.slug}/${t.color}`;
2225
2256
  }
2226
- function Tn(e) {
2257
+ function An(e) {
2227
2258
  if (Array.isArray(e)) return e;
2228
2259
  if (typeof e == "string") try {
2229
2260
  return JSON.parse(e);
@@ -2232,14 +2263,14 @@ function Tn(e) {
2232
2263
  }
2233
2264
  return [];
2234
2265
  }
2235
- var En = _.create({
2266
+ var jn = _.create({
2236
2267
  name: "socialLinks",
2237
2268
  group: "block",
2238
2269
  atom: !0,
2239
2270
  selectable: !0,
2240
2271
  addAttributes() {
2241
2272
  return {
2242
- ...bn,
2273
+ ...Tn,
2243
2274
  links: {
2244
2275
  default: [
2245
2276
  {
@@ -2259,7 +2290,7 @@ var En = _.create({
2259
2290
  url: "https://linkedin.com/"
2260
2291
  }
2261
2292
  ],
2262
- parseHTML: (e) => Tn(e.dataset.links),
2293
+ parseHTML: (e) => An(e.dataset.links),
2263
2294
  renderHTML: (e) => ({ "data-links": JSON.stringify(e.links ?? []) })
2264
2295
  },
2265
2296
  size: { default: 28 },
@@ -2271,10 +2302,10 @@ var En = _.create({
2271
2302
  return [{ tag: "div[data-type=\"social-links\"]" }];
2272
2303
  },
2273
2304
  renderHTML({ node: e, HTMLAttributes: t }) {
2274
- let n = Number(e.attrs.size), r = Number(e.attrs.gap), i = Tn(e.attrs.links);
2305
+ let n = Number(e.attrs.size), r = Number(e.attrs.gap), i = An(e.attrs.links);
2275
2306
  return [
2276
2307
  "div",
2277
- re(t, {
2308
+ ne(t, {
2278
2309
  "data-type": "social-links",
2279
2310
  class: "node-socialLinks",
2280
2311
  alignment: e.attrs.alignment
@@ -2286,37 +2317,37 @@ var En = _.create({
2286
2317
  style: `margin-left:${t === 0 ? 0 : r}px`
2287
2318
  },
2288
2319
  ["img", {
2289
- src: wn(e.network),
2320
+ src: kn(e.network),
2290
2321
  width: String(n),
2291
2322
  height: String(n),
2292
- alt: Sn[e.network]?.label ?? e.network
2323
+ alt: Dn[e.network]?.label ?? e.network
2293
2324
  }]
2294
2325
  ])
2295
2326
  ];
2296
2327
  },
2297
2328
  renderToReactEmail({ node: e }) {
2298
- let t = Number(e.attrs?.size ?? 28), n = Number(e.attrs?.gap ?? 12), r = Tn(e.attrs?.links), i = e.attrs?.alignment ?? "center";
2299
- return /* @__PURE__ */ L(ze, {
2300
- style: yn(e.attrs?.style),
2301
- children: /* @__PURE__ */ L(Re, { children: /* @__PURE__ */ L(Fe, {
2329
+ let t = Number(e.attrs?.size ?? 28), n = Number(e.attrs?.gap ?? 12), r = An(e.attrs?.links), i = e.attrs?.alignment ?? "center";
2330
+ return /* @__PURE__ */ I(He, {
2331
+ style: wn(e.attrs?.style),
2332
+ children: /* @__PURE__ */ I(Ve, { children: /* @__PURE__ */ I(Re, {
2302
2333
  align: i,
2303
- children: r.map((e, r) => /* @__PURE__ */ L(Le, {
2334
+ children: r.map((e, r) => /* @__PURE__ */ I(Be, {
2304
2335
  href: e.url,
2305
2336
  style: {
2306
2337
  display: "inline-block",
2307
2338
  marginLeft: r === 0 ? 0 : n
2308
2339
  },
2309
- children: /* @__PURE__ */ L(Ie, {
2310
- src: wn(e.network),
2340
+ children: /* @__PURE__ */ I(ze, {
2341
+ src: kn(e.network),
2311
2342
  width: t,
2312
2343
  height: t,
2313
- alt: Sn[e.network]?.label ?? e.network
2344
+ alt: Dn[e.network]?.label ?? e.network
2314
2345
  })
2315
2346
  }, `${e.network}-${r}`))
2316
2347
  }) })
2317
2348
  });
2318
2349
  }
2319
- }), Dn = _.create({
2350
+ }), Mn = _.create({
2320
2351
  name: "htmlBlock",
2321
2352
  group: "block",
2322
2353
  atom: !0,
@@ -2332,7 +2363,7 @@ var En = _.create({
2332
2363
  return [{ tag: "div[data-type=\"html-block\"]" }];
2333
2364
  },
2334
2365
  renderHTML({ node: e, HTMLAttributes: t }) {
2335
- return ["div", re(t, {
2366
+ return ["div", ne(t, {
2336
2367
  "data-type": "html-block",
2337
2368
  class: "node-htmlBlock",
2338
2369
  "data-html": e.attrs.html
@@ -2351,49 +2382,49 @@ var En = _.create({
2351
2382
  };
2352
2383
  },
2353
2384
  renderToReactEmail({ node: e }) {
2354
- return /* @__PURE__ */ L("div", { dangerouslySetInnerHTML: { __html: e.attrs?.html ?? "" } });
2385
+ return /* @__PURE__ */ I("div", { dangerouslySetInnerHTML: { __html: e.attrs?.html ?? "" } });
2355
2386
  }
2356
2387
  });
2357
2388
  //#endregion
2358
2389
  //#region src/components/inspectors/SocialLinksInspector.tsx
2359
- function On({ ctx: e, className: t, style: n }) {
2390
+ function Nn({ ctx: e, className: t, style: n }) {
2360
2391
  let r = $().inspector, i = e.getAttr("links"), a = Array.isArray(i) ? i : [], o = (t) => e.setAttr("links", t);
2361
- return /* @__PURE__ */ R("div", {
2362
- className: z("bree-inspector", t),
2392
+ return /* @__PURE__ */ L("div", {
2393
+ className: R("bree-inspector", t),
2363
2394
  style: n,
2364
2395
  children: [
2365
- /* @__PURE__ */ R(V, {
2396
+ /* @__PURE__ */ L(V, {
2366
2397
  title: r.networks,
2367
- children: [/* @__PURE__ */ L("div", {
2398
+ children: [/* @__PURE__ */ I("div", {
2368
2399
  className: "bree-social-list",
2369
- children: a.map((e, t) => /* @__PURE__ */ R("div", {
2400
+ children: a.map((e, t) => /* @__PURE__ */ L("div", {
2370
2401
  className: "bree-social-row",
2371
2402
  children: [
2372
- /* @__PURE__ */ L(rn, {
2403
+ /* @__PURE__ */ I(ln, {
2373
2404
  value: e.network,
2374
2405
  onChange: (e) => o(a.map((n, r) => r === t ? {
2375
2406
  ...n,
2376
2407
  network: e
2377
2408
  } : n)),
2378
- options: Object.entries(Sn).map(([e, t]) => [e, t.label])
2409
+ options: Object.entries(Dn).map(([e, t]) => [e, t.label])
2379
2410
  }),
2380
- /* @__PURE__ */ L(U, {
2411
+ /* @__PURE__ */ I(U, {
2381
2412
  value: e.url,
2382
2413
  onChange: (e) => o(a.map((n, r) => r === t ? {
2383
2414
  ...n,
2384
2415
  url: e
2385
2416
  } : n))
2386
2417
  }),
2387
- /* @__PURE__ */ L("button", {
2418
+ /* @__PURE__ */ I("button", {
2388
2419
  type: "button",
2389
2420
  className: "bree-icon-button",
2390
2421
  title: r.removeNetwork,
2391
2422
  onClick: () => o(a.filter((e, n) => n !== t)),
2392
- children: /* @__PURE__ */ L(Ae, { size: 14 })
2423
+ children: /* @__PURE__ */ I(Me, { size: 14 })
2393
2424
  })
2394
2425
  ]
2395
2426
  }, t))
2396
- }), /* @__PURE__ */ L("button", {
2427
+ }), /* @__PURE__ */ I("button", {
2397
2428
  type: "button",
2398
2429
  className: "bree-button-like",
2399
2430
  onClick: () => o([...a, {
@@ -2403,68 +2434,68 @@ function On({ ctx: e, className: t, style: n }) {
2403
2434
  children: r.addNetwork
2404
2435
  })]
2405
2436
  }),
2406
- /* @__PURE__ */ R(V, {
2437
+ /* @__PURE__ */ L(V, {
2407
2438
  title: r.appearance,
2408
2439
  children: [
2409
- /* @__PURE__ */ L(H, {
2440
+ /* @__PURE__ */ I(H, {
2410
2441
  label: r.iconSize,
2411
- children: /* @__PURE__ */ L(en, {
2442
+ children: /* @__PURE__ */ I(on, {
2412
2443
  value: e.getAttr("size"),
2413
2444
  min: 16,
2414
2445
  max: 64,
2415
2446
  onChange: (t) => e.setAttr("size", t)
2416
2447
  })
2417
2448
  }),
2418
- /* @__PURE__ */ L(H, {
2449
+ /* @__PURE__ */ I(H, {
2419
2450
  label: r.gap,
2420
- children: /* @__PURE__ */ L(en, {
2451
+ children: /* @__PURE__ */ I(on, {
2421
2452
  value: e.getAttr("gap"),
2422
2453
  min: 0,
2423
2454
  max: 40,
2424
2455
  onChange: (t) => e.setAttr("gap", t)
2425
2456
  })
2426
2457
  }),
2427
- /* @__PURE__ */ L(H, {
2458
+ /* @__PURE__ */ I(H, {
2428
2459
  label: r.alignment,
2429
- children: /* @__PURE__ */ L(sn, {
2460
+ children: /* @__PURE__ */ I(fn, {
2430
2461
  value: String(e.getAttr("alignment") ?? "center"),
2431
2462
  onChange: (t) => e.setAttr("alignment", t)
2432
2463
  })
2433
2464
  })
2434
2465
  ]
2435
2466
  }),
2436
- /* @__PURE__ */ L(q, { ctx: e })
2467
+ /* @__PURE__ */ I(q, { ctx: e })
2437
2468
  ]
2438
2469
  });
2439
2470
  }
2440
2471
  //#endregion
2441
2472
  //#region src/registry/default-nodes.tsx
2442
- function kn(e, t = 36) {
2473
+ function Pn(e, t = 36) {
2443
2474
  let n = e.replace(/\s+/g, " ").trim();
2444
2475
  return n.length > t ? `${n.slice(0, t)}…` : n;
2445
2476
  }
2446
- var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn = [
2477
+ var Fn = (e, { t }) => Pn(e.textContent) || t.layers.empty, In = () => "", Ln = [
2447
2478
  {
2448
2479
  type: "paragraph",
2449
- icon: Oe
2480
+ icon: Ae
2450
2481
  },
2451
2482
  {
2452
2483
  type: "heading",
2453
- icon: pe,
2454
- inspector: pn
2484
+ icon: he,
2485
+ inspector: vn
2455
2486
  },
2456
2487
  {
2457
2488
  type: "image",
2458
- icon: me,
2459
- inspector: mn,
2489
+ icon: ge,
2490
+ inspector: yn,
2460
2491
  preview: (e, { t }) => {
2461
2492
  let { attrs: n } = e;
2462
- if (n.alt) return kn(n.alt);
2493
+ if (n.alt) return Pn(n.alt);
2463
2494
  let r = String(n.src ?? "");
2464
2495
  if (r.startsWith("data:")) return t.layers.uploadedImage;
2465
2496
  try {
2466
2497
  let e = new URL(r);
2467
- return kn(e.searchParams.get("text") ?? decodeURIComponent(e.pathname.split("/").pop() ?? ""));
2498
+ return Pn(e.searchParams.get("text") ?? decodeURIComponent(e.pathname.split("/").pop() ?? ""));
2468
2499
  } catch {
2469
2500
  return "";
2470
2501
  }
@@ -2472,99 +2503,99 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2472
2503
  },
2473
2504
  {
2474
2505
  type: "button",
2475
- icon: xe,
2476
- inspector: dn
2506
+ icon: P,
2507
+ inspector: gn
2477
2508
  },
2478
2509
  {
2479
2510
  type: "horizontalRule",
2480
- icon: be,
2481
- inspector: _n,
2482
- preview: jn
2511
+ icon: Se,
2512
+ inspector: Sn,
2513
+ preview: In
2483
2514
  },
2484
2515
  {
2485
2516
  type: "spacer",
2486
- icon: qt,
2487
- inspector: hn,
2517
+ icon: Qt,
2518
+ inspector: bn,
2488
2519
  preview: (e) => `${e.attrs.height}px`,
2489
- extensions: [xn]
2520
+ extensions: [En]
2490
2521
  },
2491
2522
  {
2492
2523
  type: "socialLinks",
2493
- icon: _e,
2494
- inspector: On,
2524
+ icon: ye,
2525
+ inspector: Nn,
2495
2526
  preview: (e) => Array.isArray(e.attrs.links) ? e.attrs.links.map((e) => e.network).join(", ") : "",
2496
- extensions: [En]
2527
+ extensions: [jn]
2497
2528
  },
2498
2529
  {
2499
2530
  type: "htmlBlock",
2500
- icon: we,
2501
- inspector: gn,
2502
- preview: (e) => kn(String(e.attrs.html ?? "").replace(/<[^>]+>/g, " ")),
2503
- extensions: [Dn]
2531
+ icon: Ee,
2532
+ inspector: xn,
2533
+ preview: (e) => Pn(String(e.attrs.html ?? "").replace(/<[^>]+>/g, " ")),
2534
+ extensions: [Mn]
2504
2535
  },
2505
2536
  {
2506
2537
  type: "section",
2507
- icon: ge,
2508
- inspector: vn,
2509
- preview: jn
2538
+ icon: ve,
2539
+ inspector: Cn,
2540
+ preview: In
2510
2541
  },
2511
2542
  {
2512
2543
  type: "columnsColumn",
2513
- icon: P,
2514
- inspector: vn,
2515
- preview: jn
2544
+ icon: Ce,
2545
+ inspector: Cn,
2546
+ preview: In
2516
2547
  },
2517
2548
  {
2518
2549
  type: "twoColumns",
2519
- icon: ue,
2520
- inspector: fn,
2521
- preview: jn
2550
+ icon: fe,
2551
+ inspector: _n,
2552
+ preview: In
2522
2553
  },
2523
2554
  {
2524
2555
  type: "threeColumns",
2525
- icon: de,
2526
- inspector: fn,
2527
- preview: jn
2556
+ icon: pe,
2557
+ inspector: _n,
2558
+ preview: In
2528
2559
  },
2529
2560
  {
2530
2561
  type: "fourColumns",
2531
- icon: fe,
2532
- inspector: fn,
2533
- preview: jn
2562
+ icon: me,
2563
+ inspector: _n,
2564
+ preview: In
2534
2565
  },
2535
2566
  {
2536
2567
  type: "bulletList",
2537
- icon: ve
2568
+ icon: be
2538
2569
  },
2539
2570
  {
2540
2571
  type: "orderedList",
2541
- icon: ye
2572
+ icon: xe
2542
2573
  },
2543
2574
  {
2544
2575
  type: "blockquote",
2545
- icon: De
2576
+ icon: ke
2546
2577
  },
2547
2578
  {
2548
2579
  type: "codeBlock",
2549
- icon: le
2580
+ icon: de
2550
2581
  },
2551
2582
  {
2552
2583
  type: "table",
2553
- icon: Ee
2584
+ icon: Oe
2554
2585
  }
2555
- ], Nn = /* @__PURE__ */ He({
2556
- button: () => Fn,
2557
- column: () => Ln,
2586
+ ], Rn = /* @__PURE__ */ Ge({
2587
+ button: () => Bn,
2588
+ column: () => Hn,
2558
2589
  columns: () => X,
2559
- doc: () => Un,
2560
- heading: () => Pn,
2561
- image: () => In,
2562
- link: () => Vn,
2563
- padding: () => Bn,
2590
+ doc: () => Jn,
2591
+ heading: () => zn,
2592
+ image: () => Vn,
2593
+ link: () => Kn,
2594
+ padding: () => Gn,
2564
2595
  paragraph: () => Y,
2565
- placeholderImage: () => Hn,
2566
- section: () => zn,
2567
- sized: () => Rn,
2596
+ placeholderImage: () => qn,
2597
+ section: () => Wn,
2598
+ sized: () => Un,
2568
2599
  text: () => J
2569
2600
  }), J = (e, t) => ({
2570
2601
  type: "text",
@@ -2574,14 +2605,14 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2574
2605
  type: "paragraph",
2575
2606
  attrs: t,
2576
2607
  content: typeof e == "string" ? e ? [J(e)] : [] : e
2577
- }), Pn = (e, t, n = {}) => ({
2608
+ }), zn = (e, t, n = {}) => ({
2578
2609
  type: "heading",
2579
2610
  attrs: {
2580
2611
  level: e,
2581
2612
  ...n
2582
2613
  },
2583
2614
  content: [J(t)]
2584
- }), Fn = (e, t = {}) => ({
2615
+ }), Bn = (e, t = {}) => ({
2585
2616
  type: "button",
2586
2617
  attrs: {
2587
2618
  href: "https://example.com",
@@ -2589,7 +2620,7 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2589
2620
  ...t
2590
2621
  },
2591
2622
  content: [J(e)]
2592
- }), In = (e, t = {}) => ({
2623
+ }), Vn = (e, t = {}) => ({
2593
2624
  type: "image",
2594
2625
  attrs: {
2595
2626
  src: e,
@@ -2597,10 +2628,10 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2597
2628
  alignment: "center",
2598
2629
  ...t
2599
2630
  }
2600
- }), Ln = (...e) => ({
2631
+ }), Hn = (...e) => ({
2601
2632
  type: "columnsColumn",
2602
2633
  content: e.length ? e : [Y()]
2603
- }), Rn = (e, t) => ({
2634
+ }), Un = (e, t) => ({
2604
2635
  ...e,
2605
2636
  attrs: {
2606
2637
  ...e.attrs,
@@ -2613,100 +2644,100 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2613
2644
  4: "fourColumns"
2614
2645
  }[e],
2615
2646
  ...n ? { attrs: n } : {},
2616
- content: t ?? Array.from({ length: e }, () => Ln())
2617
- }), zn = (e, ...t) => ({
2647
+ content: t ?? Array.from({ length: e }, () => Hn())
2648
+ }), Wn = (e, ...t) => ({
2618
2649
  type: "section",
2619
2650
  attrs: { style: e },
2620
2651
  content: t
2621
- }), Bn = (e, t = e) => `padding-top:${e}px;padding-right:${t}px;padding-bottom:${e}px;padding-left:${t}px`, Vn = (e) => [{
2652
+ }), Gn = (e, t = e) => `padding-top:${e}px;padding-right:${t}px;padding-bottom:${e}px;padding-left:${t}px`, Kn = (e) => [{
2622
2653
  type: "link",
2623
2654
  attrs: { href: e }
2624
- }], Hn = (e, t, n = "Image") => `https://placehold.co/${e}x${t}/e2e8f0/64748b/png?text=${encodeURIComponent(n)}`, Un = (...e) => ({
2655
+ }], qn = (e, t, n = "Image") => `https://placehold.co/${e}x${t}/e2e8f0/64748b/png?text=${encodeURIComponent(n)}`, Jn = (...e) => ({
2625
2656
  type: "doc",
2626
2657
  content: e
2627
- }), Wn = ({ t: e }, t = "center") => Y([
2628
- J(e.content.menuHome, Vn("https://example.com")),
2658
+ }), Yn = ({ t: e }, t = "center") => Y([
2659
+ J(e.content.menuHome, Kn("https://example.com")),
2629
2660
  J(" · "),
2630
- J(e.content.menuShop, Vn("https://example.com/shop")),
2661
+ J(e.content.menuShop, Kn("https://example.com/shop")),
2631
2662
  J(" · "),
2632
- J(e.content.menuBlog, Vn("https://example.com/blog")),
2663
+ J(e.content.menuBlog, Kn("https://example.com/blog")),
2633
2664
  J(" · "),
2634
- J(e.content.menuContact, Vn("https://example.com/contact"))
2635
- ], { alignment: t }), Gn = [{
2665
+ J(e.content.menuContact, Kn("https://example.com/contact"))
2666
+ ], { alignment: t }), Xn = [{
2636
2667
  id: "layout",
2637
2668
  title: ({ t: e }) => e.sidebar.layoutTitle
2638
2669
  }, {
2639
2670
  id: "content",
2640
2671
  title: ({ t: e }) => e.sidebar.contentTitle
2641
- }], Kn = [
2672
+ }], Zn = [
2642
2673
  {
2643
2674
  id: "section",
2644
2675
  group: "layout",
2645
2676
  label: ({ t: e }) => e.palette.oneColumn,
2646
- icon: /* @__PURE__ */ L(Xt, {}),
2647
- content: () => [zn(Bn(16), Y())]
2677
+ icon: /* @__PURE__ */ I(tn, {}),
2678
+ content: () => [Wn(Gn(16), Y())]
2648
2679
  },
2649
2680
  {
2650
2681
  id: "columns-2",
2651
2682
  group: "layout",
2652
2683
  label: ({ t: e }) => e.palette.twoColumns,
2653
- icon: /* @__PURE__ */ L(ue, { size: 22 }),
2684
+ icon: /* @__PURE__ */ I(fe, { size: 22 }),
2654
2685
  content: () => [X(2)]
2655
2686
  },
2656
2687
  {
2657
2688
  id: "columns-3",
2658
2689
  group: "layout",
2659
2690
  label: ({ t: e }) => e.palette.threeColumns,
2660
- icon: /* @__PURE__ */ L(de, { size: 22 }),
2691
+ icon: /* @__PURE__ */ I(pe, { size: 22 }),
2661
2692
  content: () => [X(3)]
2662
2693
  },
2663
2694
  {
2664
2695
  id: "columns-4",
2665
2696
  group: "layout",
2666
2697
  label: ({ t: e }) => e.palette.fourColumns,
2667
- icon: /* @__PURE__ */ L(fe, { size: 22 }),
2698
+ icon: /* @__PURE__ */ I(me, { size: 22 }),
2668
2699
  content: () => [X(4)]
2669
2700
  },
2670
2701
  {
2671
2702
  id: "heading",
2672
2703
  group: "content",
2673
2704
  label: ({ t: e }) => e.palette.heading,
2674
- icon: /* @__PURE__ */ L(pe, { size: 22 }),
2675
- content: ({ t: e }) => [Pn(2, e.content.heading)]
2705
+ icon: /* @__PURE__ */ I(he, { size: 22 }),
2706
+ content: ({ t: e }) => [zn(2, e.content.heading)]
2676
2707
  },
2677
2708
  {
2678
2709
  id: "text",
2679
2710
  group: "content",
2680
2711
  label: ({ t: e }) => e.palette.text,
2681
- icon: /* @__PURE__ */ L(Oe, { size: 22 }),
2712
+ icon: /* @__PURE__ */ I(Ae, { size: 22 }),
2682
2713
  content: ({ t: e }) => [Y(e.content.text)]
2683
2714
  },
2684
2715
  {
2685
2716
  id: "button",
2686
2717
  group: "content",
2687
2718
  label: ({ t: e }) => e.palette.button,
2688
- icon: /* @__PURE__ */ L(xe, { size: 22 }),
2689
- content: ({ t: e }) => [Fn(e.content.button)]
2719
+ icon: /* @__PURE__ */ I(P, { size: 22 }),
2720
+ content: ({ t: e }) => [Bn(e.content.button)]
2690
2721
  },
2691
2722
  {
2692
2723
  id: "image",
2693
2724
  group: "content",
2694
2725
  label: ({ t: e }) => e.palette.image,
2695
- icon: /* @__PURE__ */ L(me, { size: 22 }),
2696
- content: ({ t: e }) => [In(Hn(600, 300, e.content.image))]
2726
+ icon: /* @__PURE__ */ I(ge, { size: 22 }),
2727
+ content: ({ t: e }) => [Vn(qn(600, 300, e.content.image))]
2697
2728
  },
2698
2729
  {
2699
2730
  id: "divider",
2700
2731
  group: "content",
2701
2732
  label: ({ t: e }) => e.palette.divider,
2702
- icon: /* @__PURE__ */ L(be, { size: 22 }),
2733
+ icon: /* @__PURE__ */ I(Se, { size: 22 }),
2703
2734
  content: () => [{ type: "horizontalRule" }]
2704
2735
  },
2705
2736
  {
2706
2737
  id: "spacer",
2707
2738
  group: "content",
2708
2739
  label: ({ t: e }) => e.palette.spacer,
2709
- icon: /* @__PURE__ */ L(Jt, {}),
2740
+ icon: /* @__PURE__ */ I($t, {}),
2710
2741
  content: () => [{
2711
2742
  type: "spacer",
2712
2743
  attrs: { height: 32 }
@@ -2716,21 +2747,21 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2716
2747
  id: "social",
2717
2748
  group: "content",
2718
2749
  label: ({ t: e }) => e.palette.social,
2719
- icon: /* @__PURE__ */ L(Yt, {}),
2750
+ icon: /* @__PURE__ */ I(en, {}),
2720
2751
  content: () => [{ type: "socialLinks" }]
2721
2752
  },
2722
2753
  {
2723
2754
  id: "menu",
2724
2755
  group: "content",
2725
2756
  label: ({ t: e }) => e.palette.menu,
2726
- icon: /* @__PURE__ */ L(Se, { size: 22 }),
2727
- content: (e) => [Wn(e)]
2757
+ icon: /* @__PURE__ */ I(we, { size: 22 }),
2758
+ content: (e) => [Yn(e)]
2728
2759
  },
2729
2760
  {
2730
2761
  id: "list",
2731
2762
  group: "content",
2732
2763
  label: ({ t: e }) => e.palette.list,
2733
- icon: /* @__PURE__ */ L(ve, { size: 22 }),
2764
+ icon: /* @__PURE__ */ I(be, { size: 22 }),
2734
2765
  content: ({ t: e }) => [{
2735
2766
  type: "bulletList",
2736
2767
  content: e.content.listItems.map((e) => ({
@@ -2743,7 +2774,7 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2743
2774
  id: "quote",
2744
2775
  group: "content",
2745
2776
  label: ({ t: e }) => e.palette.quote,
2746
- icon: /* @__PURE__ */ L(De, { size: 22 }),
2777
+ icon: /* @__PURE__ */ I(ke, { size: 22 }),
2747
2778
  content: ({ t: e }) => [{
2748
2779
  type: "blockquote",
2749
2780
  content: [Y(e.content.quote)]
@@ -2753,7 +2784,7 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2753
2784
  id: "html",
2754
2785
  group: "content",
2755
2786
  label: ({ t: e }) => e.palette.html,
2756
- icon: /* @__PURE__ */ L(we, { size: 22 }),
2787
+ icon: /* @__PURE__ */ I(Ee, { size: 22 }),
2757
2788
  content: ({ t: e }) => [{
2758
2789
  type: "htmlBlock",
2759
2790
  attrs: { html: e.content.html }
@@ -2763,61 +2794,61 @@ var An = (e, { t }) => kn(e.textContent) || t.layers.empty, jn = () => "", Mn =
2763
2794
  id: "card",
2764
2795
  group: "content",
2765
2796
  label: ({ t: e }) => e.palette.card,
2766
- icon: /* @__PURE__ */ L(ge, { size: 22 }),
2767
- content: ({ t: e }) => [zn(`${Bn(24)};background-color:#f1f5f9;border-radius:12px`, Pn(3, e.content.cardTitle), Y(e.content.cardText))]
2797
+ icon: /* @__PURE__ */ I(ve, { size: 22 }),
2798
+ content: ({ t: e }) => [Wn(`${Gn(24)};background-color:#f1f5f9;border-radius:12px`, zn(3, e.content.cardTitle), Y(e.content.cardText))]
2768
2799
  }
2769
2800
  ];
2770
2801
  //#endregion
2771
2802
  //#region src/registry/default-templates.tsx
2772
2803
  function Z({ variant: e }) {
2773
- return /* @__PURE__ */ R("span", {
2804
+ return /* @__PURE__ */ L("span", {
2774
2805
  className: `bree-block-thumb bree-thumb-${e}`,
2775
2806
  "aria-hidden": !0,
2776
2807
  children: [
2777
- /* @__PURE__ */ L("i", {}),
2778
- /* @__PURE__ */ L("i", {}),
2779
- /* @__PURE__ */ L("i", {})
2808
+ /* @__PURE__ */ I("i", {}),
2809
+ /* @__PURE__ */ I("i", {}),
2810
+ /* @__PURE__ */ I("i", {})
2780
2811
  ]
2781
2812
  });
2782
2813
  }
2783
- var qn = [
2814
+ var Qn = [
2784
2815
  {
2785
2816
  id: "header",
2786
2817
  label: ({ t: e }) => e.templates.header,
2787
2818
  description: ({ t: e }) => e.templates.headerDescription,
2788
- thumbnail: /* @__PURE__ */ L(Z, { variant: "header" }),
2789
- content: (e) => [X(2, [Rn(Ln(In(Hn(140, 40, e.t.content.logo), {
2819
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "header" }),
2820
+ content: (e) => [X(2, [Un(Hn(Vn(qn(140, 40, e.t.content.logo), {
2790
2821
  alignment: "left",
2791
2822
  width: "140"
2792
- })), 33), Rn(Ln(Wn(e, "right")), 67)])]
2823
+ })), 33), Un(Hn(Yn(e, "right")), 67)])]
2793
2824
  },
2794
2825
  {
2795
2826
  id: "hero",
2796
2827
  label: ({ t: e }) => e.templates.hero,
2797
2828
  description: ({ t: e }) => e.templates.heroDescription,
2798
- thumbnail: /* @__PURE__ */ L(Z, { variant: "hero" }),
2799
- content: ({ t: e }) => [zn(`${Bn(40, 24)};background-color:#eef2ff;border-radius:12px`, Pn(1, e.content.heroTitle, { alignment: "center" }), Y(e.content.heroText, { alignment: "center" }), Fn(e.content.heroButton, { style: `background-color:#4f46e5;color:#ffffff;${Bn(12, 24)};border-radius:8px` }))]
2829
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "hero" }),
2830
+ content: ({ t: e }) => [Wn(`${Gn(40, 24)};background-color:#eef2ff;border-radius:12px`, zn(1, e.content.heroTitle, { alignment: "center" }), Y(e.content.heroText, { alignment: "center" }), Bn(e.content.heroButton, { style: `background-color:#4f46e5;color:#ffffff;${Gn(12, 24)};border-radius:8px` }))]
2800
2831
  },
2801
2832
  {
2802
2833
  id: "products",
2803
2834
  label: ({ t: e }) => e.templates.products,
2804
2835
  description: ({ t: e }) => e.templates.productsDescription,
2805
- thumbnail: /* @__PURE__ */ L(Z, { variant: "products" }),
2806
- content: ({ t: e }) => [X(2, [e.content.productA, e.content.productB].map((t) => Ln(In(Hn(280, 200, t)), Pn(3, t, { alignment: "center" }), Y(e.content.productText, { alignment: "center" }), Fn(e.content.productButton))), { cellspacing: 16 })]
2836
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "products" }),
2837
+ content: ({ t: e }) => [X(2, [e.content.productA, e.content.productB].map((t) => Hn(Vn(qn(280, 200, t)), zn(3, t, { alignment: "center" }), Y(e.content.productText, { alignment: "center" }), Bn(e.content.productButton))), { cellspacing: 16 })]
2807
2838
  },
2808
2839
  {
2809
2840
  id: "features",
2810
2841
  label: ({ t: e }) => e.templates.features,
2811
2842
  description: ({ t: e }) => e.templates.featuresDescription,
2812
- thumbnail: /* @__PURE__ */ L(Z, { variant: "features" }),
2813
- content: ({ t: e }) => [X(3, e.content.features.map((t) => Ln(Pn(3, t, { alignment: "center" }), Y(e.content.featureText, { alignment: "center" }))))]
2843
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "features" }),
2844
+ content: ({ t: e }) => [X(3, e.content.features.map((t) => Hn(zn(3, t, { alignment: "center" }), Y(e.content.featureText, { alignment: "center" }))))]
2814
2845
  },
2815
2846
  {
2816
2847
  id: "testimonial",
2817
2848
  label: ({ t: e }) => e.templates.testimonial,
2818
2849
  description: ({ t: e }) => e.templates.testimonialDescription,
2819
- thumbnail: /* @__PURE__ */ L(Z, { variant: "testimonial" }),
2820
- content: ({ t: e }) => [zn(`${Bn(24)};background-color:#f8fafc;border-radius:12px`, {
2850
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "testimonial" }),
2851
+ content: ({ t: e }) => [Wn(`${Gn(24)};background-color:#f8fafc;border-radius:12px`, {
2821
2852
  type: "blockquote",
2822
2853
  content: [Y(e.content.testimonialQuote)]
2823
2854
  }, Y(e.content.testimonialAuthor, {
@@ -2829,7 +2860,7 @@ var qn = [
2829
2860
  id: "footer",
2830
2861
  label: ({ t: e }) => e.templates.footer,
2831
2862
  description: ({ t: e }) => e.templates.footerDescription,
2832
- thumbnail: /* @__PURE__ */ L(Z, { variant: "footer" }),
2863
+ thumbnail: /* @__PURE__ */ I(Z, { variant: "footer" }),
2833
2864
  content: ({ t: e }) => [
2834
2865
  { type: "horizontalRule" },
2835
2866
  { type: "socialLinks" },
@@ -2837,14 +2868,14 @@ var qn = [
2837
2868
  alignment: "center",
2838
2869
  style: "color:#94a3b8;font-size:12px"
2839
2870
  }),
2840
- Y([J(e.content.unsubscribe, Vn("https://example.com/unsubscribe"))], {
2871
+ Y([J(e.content.unsubscribe, Kn("https://example.com/unsubscribe"))], {
2841
2872
  alignment: "center",
2842
2873
  style: "font-size:12px"
2843
2874
  })
2844
2875
  ]
2845
2876
  }
2846
- ], Jn = (e, t) => qn.find((t) => t.id === e)?.content(t) ?? [];
2847
- function Yn(e) {
2877
+ ], $n = (e, t) => Qn.find((t) => t.id === e)?.content(t) ?? [];
2878
+ function er(e) {
2848
2879
  let t = {
2849
2880
  type: "spacer",
2850
2881
  attrs: { height: 16 }
@@ -2852,39 +2883,39 @@ function Yn(e) {
2852
2883
  return {
2853
2884
  type: "doc",
2854
2885
  content: [
2855
- ...Jn("header", e),
2886
+ ...$n("header", e),
2856
2887
  t,
2857
- ...Jn("hero", e),
2888
+ ...$n("hero", e),
2858
2889
  t,
2859
- Pn(2, e.t.content.starterTitle, { alignment: "center" }),
2860
- ...Jn("products", e),
2890
+ zn(2, e.t.content.starterTitle, { alignment: "center" }),
2891
+ ...$n("products", e),
2861
2892
  t,
2862
- ...Jn("footer", e)
2893
+ ...$n("footer", e)
2863
2894
  ]
2864
2895
  };
2865
2896
  }
2866
2897
  //#endregion
2867
2898
  //#region src/context.tsx
2868
- var Xn = e(null);
2899
+ var tr = e(null);
2869
2900
  function Q() {
2870
- let e = r(Xn);
2901
+ let e = r(tr);
2871
2902
  if (!e) throw Error("useEmailEditor must be used inside <EditorRoot> or <BetterEmailEditor>.");
2872
2903
  return e;
2873
2904
  }
2874
- function Zn() {
2875
- return r(Xn);
2905
+ function nr() {
2906
+ return r(tr);
2876
2907
  }
2877
2908
  function $() {
2878
- return r(Xn)?.t ?? kt;
2909
+ return r(tr)?.t ?? Pt;
2879
2910
  }
2880
- function Qn() {
2911
+ function rr() {
2881
2912
  let { locale: e, t } = Q();
2882
2913
  return c(() => ({
2883
2914
  locale: e,
2884
2915
  t
2885
2916
  }), [e, t]);
2886
2917
  }
2887
- var $n = S("basic", {
2918
+ var ir = S("basic", {
2888
2919
  body: {
2889
2920
  backgroundColor: "#eef1f5",
2890
2921
  padding: "32px 16px"
@@ -2894,22 +2925,22 @@ var $n = S("basic", {
2894
2925
  padding: "24px",
2895
2926
  borderRadius: "12px"
2896
2927
  }
2897
- }), er = (e) => new Promise((t, n) => {
2928
+ }), ar = (e) => new Promise((t, n) => {
2898
2929
  let r = new FileReader();
2899
2930
  r.onload = () => t({ url: String(r.result) }), r.onerror = n, r.readAsDataURL(e);
2900
- }), tr = {
2931
+ }), or = {
2901
2932
  type: "doc",
2902
2933
  content: [{ type: "paragraph" }]
2903
2934
  };
2904
- function nr(e) {
2935
+ function sr(e) {
2905
2936
  return typeof e == "object" && !!e && "doc" in e;
2906
2937
  }
2907
- function rr(e) {
2938
+ function cr(e) {
2908
2939
  let t = {
2909
2940
  subject: "",
2910
2941
  previewText: ""
2911
2942
  };
2912
- return e ? nr(e) ? {
2943
+ return e ? sr(e) ? {
2913
2944
  doc: e.doc,
2914
2945
  settings: {
2915
2946
  ...t,
@@ -2920,31 +2951,32 @@ function rr(e) {
2920
2951
  doc: e,
2921
2952
  settings: t
2922
2953
  } : {
2923
- doc: tr,
2954
+ doc: or,
2924
2955
  settings: t
2925
2956
  };
2926
2957
  }
2927
- function ir(e, t, r) {
2958
+ function lr(e, t, r) {
2928
2959
  let [i, a] = u(t);
2929
2960
  return [e === void 0 ? i : e, n((t) => {
2930
2961
  e === void 0 && a(t), r?.(t);
2931
2962
  }, [e, r])];
2932
2963
  }
2933
- var ar = t(function({ defaultValue: e, onChange: t, onReady: r, locale: a = "en", messages: d, nodes: p = Mn, palette: g = Kn, paletteGroups: _ = Gn, templates: y = qn, fonts: S = wt, starterDocument: C = Yn, extensions: w, theme: E = $n, uploadImage: D = er, editable: O = !0, device: ee, defaultDevice: k = "desktop", onDeviceChange: A, layersOpen: te, defaultLayersOpen: ne = !0, onLayersOpenChange: re, className: ie, style: ae, children: oe }, se) {
2934
- let j = c(() => Ft(a, d), [a, d]), [ce] = u(() => rr(e)), [le, ue] = u(ce.settings), de = l(le), fe = l(j), M = l(t), pe = l(r), me = l(D);
2964
+ var ur = t(function({ defaultValue: e, onChange: t, onReady: r, locale: a = "en", messages: d, nodes: p = Ln, palette: g = Zn, paletteGroups: _ = Xn, templates: y = Qn, fonts: S = Dt, starterDocument: C = er, extensions: w, theme: E = ir, uploadImage: D = ar, editable: O = !0, device: k, defaultDevice: A = "desktop", onDeviceChange: j, layersOpen: ee, defaultLayersOpen: te = !0, onLayersOpenChange: ne, className: re, style: ie, children: ae }, oe) {
2965
+ let se = c(() => Bt(a, d), [a, d]), [ce] = u(() => cr(e)), [le, ue] = u(ce.settings), de = l(le), fe = l(se), pe = l(t), me = l(r), M = l(D), he = l(S);
2935
2966
  s(() => {
2936
- fe.current = j, M.current = t, pe.current = r, me.current = D;
2967
+ fe.current = se, pe.current = t, me.current = r, M.current = D, he.current = S;
2937
2968
  });
2938
- let [N, he] = ir(ee, k, A), [ge, _e] = ir(te, ne, re), [ve] = u(() => ({
2939
- dragSession: Dt(),
2940
- hoverStore: Ot()
2941
- })), ye = n((e) => me.current(e), []), be = T({ uploadImage: ye }), [xe] = u(() => [
2969
+ let [ge, N] = lr(k, A, j), [_e, ve] = lr(ee, te, ne), [ye] = u(() => ({
2970
+ dragSession: Mt(),
2971
+ hoverStore: Nt()
2972
+ })), be = n((e) => M.current(e), []), xe = T({ uploadImage: be }), [Se] = u(() => [
2942
2973
  b.configure({
2943
2974
  TiptapStarterKit: { dropcursor: !1 },
2944
2975
  Button: !1
2945
2976
  }),
2946
- dt,
2947
- Ct,
2977
+ pt,
2978
+ Tt,
2979
+ Et,
2948
2980
  f.configure({
2949
2981
  placeholder: ({ node: e }) => e.type.name === "heading" ? fe.current.placeholder.heading : fe.current.placeholder.paragraph,
2950
2982
  includeChildren: !0
@@ -2952,134 +2984,148 @@ var ar = t(function({ defaultValue: e, onChange: t, onReady: r, locale: a = "en"
2952
2984
  x.configure({ theme: E }),
2953
2985
  ...p.flatMap((e) => e.extensions ?? []),
2954
2986
  ...w ?? [],
2955
- be
2987
+ xe
2956
2988
  ]), P = h({
2957
- extensions: xe,
2989
+ extensions: Se,
2958
2990
  content: ce.doc,
2959
2991
  editable: O,
2960
2992
  immediatelyRender: !1,
2961
- editorProps: { handlePaste: xt(xe) }
2993
+ editorProps: { handlePaste: Ct(Se) }
2962
2994
  }, []);
2963
2995
  i(() => {
2964
2996
  P?.setEditable(O);
2965
2997
  }, [P, O]);
2966
- let Se = n(() => ({
2967
- doc: P?.getJSON() ?? tr,
2998
+ let Ce = n(() => ({
2999
+ doc: P?.getJSON() ?? or,
2968
3000
  settings: de.current
2969
- }), [P]), Ce = n((e) => {
3001
+ }), [P]), we = n((e) => {
2970
3002
  let t = {
2971
3003
  ...de.current,
2972
3004
  ...e
2973
3005
  };
2974
- de.current = t, ue(t), P && M.current?.({
3006
+ de.current = t, ue(t), P && pe.current?.({
2975
3007
  doc: P.getJSON(),
2976
3008
  settings: t
2977
3009
  });
2978
3010
  }, [P]), F = c(() => {
2979
- let e = async () => P ? v({
2980
- editor: P,
2981
- preview: de.current.previewText || void 0
2982
- }) : {
2983
- html: "",
2984
- text: "",
2985
- unformattedHtml: ""
3011
+ let e = async () => {
3012
+ if (!P) return {
3013
+ html: "",
3014
+ text: "",
3015
+ unformattedHtml: ""
3016
+ };
3017
+ let e = await v({
3018
+ editor: P,
3019
+ preview: de.current.previewText || void 0
3020
+ });
3021
+ return {
3022
+ ...e,
3023
+ html: jt(e.html, he.current),
3024
+ unformattedHtml: jt(e.unformattedHtml, he.current)
3025
+ };
2986
3026
  };
2987
3027
  return {
2988
3028
  editor: P,
2989
- getValue: Se,
2990
- getJSON: () => P?.getJSON() ?? tr,
3029
+ getValue: Ce,
3030
+ getJSON: () => P?.getJSON() ?? or,
2991
3031
  setValue: (e) => {
2992
- let t = rr(e);
3032
+ let t = cr(e);
2993
3033
  de.current = t.settings, ue(t.settings), P?.commands.setContent(t.doc, { emitUpdate: !0 });
2994
3034
  },
2995
3035
  exportEmail: e,
2996
3036
  getHtml: async () => (await e()).html,
2997
3037
  getText: async () => (await e()).text,
2998
3038
  insertBlocks: (e) => {
2999
- P && ut(P, e);
3039
+ P && ft(P, e);
3000
3040
  }
3001
3041
  };
3002
- }, [P, Se]);
3003
- o(se, () => F, [F]), i(() => {
3042
+ }, [P, Ce]);
3043
+ o(oe, () => F, [F]), i(() => {
3004
3044
  if (!P) return;
3005
- pe.current?.(F);
3006
- let e = () => M.current?.(Se());
3045
+ me.current?.(F);
3046
+ let e = () => pe.current?.(Ce());
3007
3047
  return P.on("update", e), () => {
3008
3048
  P.off("update", e);
3009
3049
  };
3010
3050
  }, [
3011
3051
  P,
3012
3052
  F,
3013
- Se
3014
- ]);
3015
- let we = c(() => new Map(p.map((e) => [e.type, e])), [p]), Te = c(() => {
3053
+ Ce
3054
+ ]), i(() => {
3055
+ for (let { href: e } of S) {
3056
+ if (!e || document.querySelector(`link[data-bree-font="${CSS.escape(e)}"]`)) continue;
3057
+ let t = document.createElement("link");
3058
+ t.rel = "stylesheet", t.href = e, t.dataset.breeFont = e, document.head.appendChild(t);
3059
+ }
3060
+ }, [S]);
3061
+ let Te = c(() => new Map(p.map((e) => [e.type, e])), [p]), Ee = c(() => {
3016
3062
  if (!P) return null;
3017
3063
  let e = {
3018
3064
  locale: a,
3019
- t: j
3065
+ t: se
3020
3066
  };
3021
3067
  return {
3022
3068
  ...e,
3023
3069
  editor: P,
3024
3070
  handle: F,
3025
- nodes: we,
3071
+ nodes: Te,
3026
3072
  nodeLabel: (t) => {
3027
- let n = we.get(t)?.label;
3028
- return n ? Mt(n, e) : j.nodes[t] ?? t;
3073
+ let n = Te.get(t)?.label;
3074
+ return n ? Lt(n, e) : se.nodes[t] ?? t;
3029
3075
  },
3030
3076
  palette: g,
3031
3077
  paletteGroups: _,
3032
3078
  templates: y,
3033
3079
  fonts: S,
3034
3080
  starterDocument: C,
3035
- uploadImage: ye,
3036
- ...ve,
3037
- device: N,
3038
- setDevice: he,
3039
- layersOpen: ge,
3040
- setLayersOpen: _e,
3081
+ uploadImage: be,
3082
+ ...ye,
3083
+ device: ge,
3084
+ setDevice: N,
3085
+ layersOpen: _e,
3086
+ setLayersOpen: ve,
3041
3087
  settings: le,
3042
- updateSettings: Ce
3088
+ updateSettings: we
3043
3089
  };
3044
3090
  }, [
3045
3091
  P,
3046
3092
  a,
3047
- j,
3093
+ se,
3048
3094
  F,
3049
- we,
3095
+ Te,
3050
3096
  g,
3051
3097
  _,
3052
3098
  y,
3053
3099
  S,
3054
3100
  C,
3101
+ be,
3055
3102
  ye,
3056
- ve,
3057
- N,
3058
- he,
3059
3103
  ge,
3104
+ N,
3060
3105
  _e,
3106
+ ve,
3061
3107
  le,
3062
- Ce
3063
- ]), Ee = c(() => ({ editor: P }), [P]), De = {
3064
- "--bree-empty-zone-label": JSON.stringify(j.canvas.emptyZone),
3065
- ...ae
3108
+ we
3109
+ ]), De = c(() => ({ editor: P }), [P]), Oe = {
3110
+ "--bree-empty-zone-label": JSON.stringify(se.canvas.emptyZone),
3111
+ ...ie
3066
3112
  };
3067
- return /* @__PURE__ */ L("div", {
3068
- className: z("bree bree-root", ie),
3069
- style: De,
3113
+ return /* @__PURE__ */ I("div", {
3114
+ className: R("bree bree-root", re),
3115
+ style: Oe,
3070
3116
  lang: a,
3071
- children: Te && /* @__PURE__ */ L(m.Provider, {
3072
- value: Ee,
3073
- children: /* @__PURE__ */ L(Xn.Provider, {
3074
- value: Te,
3075
- children: oe
3117
+ children: Ee && /* @__PURE__ */ I(m.Provider, {
3118
+ value: De,
3119
+ children: /* @__PURE__ */ I(tr.Provider, {
3120
+ value: Ee,
3121
+ children: ae
3076
3122
  })
3077
3123
  })
3078
3124
  });
3079
3125
  });
3080
3126
  //#endregion
3081
3127
  //#region src/components/CanvasOverlay.tsx
3082
- function or(e, t) {
3128
+ function dr(e, t) {
3083
3129
  let n = e.getBoundingClientRect();
3084
3130
  return {
3085
3131
  top: t.top - n.top + e.scrollTop,
@@ -3088,23 +3134,23 @@ function or(e, t) {
3088
3134
  height: t.height ?? 0
3089
3135
  };
3090
3136
  }
3091
- function sr(e, t, n) {
3137
+ function fr(e, t, n) {
3092
3138
  if (!n) return null;
3093
3139
  let r = e.view.nodeDOM(n.pos);
3094
- return r instanceof HTMLElement ? or(t, r.getBoundingClientRect()) : null;
3140
+ return r instanceof HTMLElement ? dr(t, r.getBoundingClientRect()) : null;
3095
3141
  }
3096
- function cr(e, t, n) {
3142
+ function pr(e, t, n) {
3097
3143
  let r = e.view.posAtCoords({
3098
3144
  left: t,
3099
3145
  top: n
3100
3146
  });
3101
- return r && r.inside >= 0 ? rt(e.state.doc, r.inside) : null;
3147
+ return r && r.inside >= 0 ? z(e.state.doc, r.inside) : null;
3102
3148
  }
3103
- function lr(e) {
3149
+ function mr(e) {
3104
3150
  let t = e.node.type.name;
3105
- return Ue.has(t) || We.has(t);
3151
+ return Ke.has(t) || qe.has(t);
3106
3152
  }
3107
- function ur({ editor: e, host: t }) {
3153
+ function hr({ editor: e, host: t }) {
3108
3154
  let { dragSession: r, hoverStore: a, nodeLabel: o, t: c } = Q(), f = l(o);
3109
3155
  s(() => {
3110
3156
  f.current = o;
@@ -3116,10 +3162,10 @@ function ur({ editor: e, host: t }) {
3116
3162
  editor: e,
3117
3163
  selector: ({ editor: e }) => {
3118
3164
  if (!e?.isFocused) return null;
3119
- let t = ot(e);
3165
+ let t = ct(e);
3120
3166
  return t ? `${t.pos}:${t.node.type.name}:${e.state.doc.content.size}` : null;
3121
3167
  }
3122
- }) ? ot(e) : null;
3168
+ }) ? ct(e) : null;
3123
3169
  i(() => {
3124
3170
  let n = () => S(), r = () => {
3125
3171
  a.set(null), S();
@@ -3137,7 +3183,7 @@ function ur({ editor: e, host: t }) {
3137
3183
  ]), i(() => {
3138
3184
  let n = 0, i = (t) => {
3139
3185
  r.get() || t.target.closest(".bree-ov-toolbar, .bree-ov-handle, .bree-ov-tag") || (cancelAnimationFrame(n), n = requestAnimationFrame(() => {
3140
- a.set(cr(e, t.clientX, t.clientY)?.pos ?? null);
3186
+ a.set(pr(e, t.clientX, t.clientY)?.pos ?? null);
3141
3187
  }));
3142
3188
  }, o = () => a.set(null);
3143
3189
  return t.addEventListener("mousemove", i), t.addEventListener("mouseleave", o), () => {
@@ -3161,14 +3207,14 @@ function ur({ editor: e, host: t }) {
3161
3207
  t instanceof HTMLElement && t.blur(), e.commands.blur();
3162
3208
  return;
3163
3209
  }
3164
- let r = cr(e, n.clientX, n.clientY);
3165
- if (r && lr(r)) {
3166
- n.preventDefault(), st(e, r);
3210
+ let r = pr(e, n.clientX, n.clientY);
3211
+ if (r && mr(r)) {
3212
+ n.preventDefault(), lt(e, r);
3167
3213
  return;
3168
3214
  }
3169
3215
  !e.isFocused && e.state.selection instanceof D && e.view.focus();
3170
3216
  }, r = (t) => {
3171
- e.view.dom.contains(t.target) && ft(e, t);
3217
+ e.view.dom.contains(t.target) && mt(e, t);
3172
3218
  };
3173
3219
  return t.addEventListener("mousedown", n, !0), t.addEventListener("paste", r, !0), () => {
3174
3220
  t.removeEventListener("mousedown", n, !0), t.removeEventListener("paste", r, !0);
@@ -3176,12 +3222,12 @@ function ur({ editor: e, host: t }) {
3176
3222
  }, [e, t]), i(() => {
3177
3223
  let n = 0, i = null, o = null, s = (t) => {
3178
3224
  let n = r.get();
3179
- if (!n || (i !== n && (i = n, o = Ze(e.view, n)), !o)) return null;
3225
+ if (!n || (i !== n && (i = n, o = et(e.view, n)), !o)) return null;
3180
3226
  let a = n.kind === "move" ? {
3181
3227
  from: n.pos,
3182
3228
  to: n.pos + (e.state.doc.nodeAt(n.pos)?.nodeSize ?? 0)
3183
3229
  } : void 0;
3184
- return Xe(e.view, t.clientX, t.clientY, o, a);
3230
+ return $e(e.view, t.clientX, t.clientY, o, a);
3185
3231
  }, c = (e) => {
3186
3232
  let t = r.get();
3187
3233
  t && (e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = t.kind === "move" ? "move" : "copy"), cancelAnimationFrame(n), n = requestAnimationFrame(() => v(s(e))));
@@ -3190,7 +3236,7 @@ function ur({ editor: e, host: t }) {
3190
3236
  if (!i) return;
3191
3237
  t.preventDefault(), t.stopPropagation(), cancelAnimationFrame(n);
3192
3238
  let o = s(t);
3193
- o && tt(e, i, o), e.view.dragging = null, r.end(), v(null), b(null), a.set(null);
3239
+ o && it(e, i, o), e.view.dragging = null, r.end(), v(null), b(null), a.set(null);
3194
3240
  }, u = (e) => {
3195
3241
  r.get() && (t.contains(e.relatedTarget) || (cancelAnimationFrame(n), v(null)));
3196
3242
  }, d = () => {
@@ -3198,16 +3244,16 @@ function ur({ editor: e, host: t }) {
3198
3244
  }, p = (t) => {
3199
3245
  let n = t.target;
3200
3246
  if (r.get() || n.tagName !== "IMG" || !e.view.dom.contains(n)) return;
3201
- let i = e.view.posAtDOM(n, 0), a = rt(e.state.doc, i);
3202
- a && !it(a) && (r.start({
3247
+ let i = e.view.posAtDOM(n, 0), a = z(e.state.doc, i);
3248
+ a && !ot(a) && (r.start({
3203
3249
  kind: "move",
3204
3250
  pos: a.pos,
3205
3251
  label: f.current(a.node.type.name)
3206
3252
  }), requestAnimationFrame(() => b(a.pos)));
3207
3253
  }, m = (t) => {
3208
3254
  if (t.key !== "Escape" || !e.isFocused) return;
3209
- let n = ot(e), r = n ? at(e.state.doc, n) : null;
3210
- if (t.preventDefault(), r) st(e, r);
3255
+ let n = ct(e), r = n ? st(e.state.doc, n) : null;
3256
+ if (t.preventDefault(), r) lt(e, r);
3211
3257
  else {
3212
3258
  let t = document.activeElement;
3213
3259
  t instanceof HTMLElement && t.blur(), e.commands.blur();
@@ -3228,36 +3274,36 @@ function ur({ editor: e, host: t }) {
3228
3274
  kind: "move",
3229
3275
  pos: n.pos,
3230
3276
  label: o(n.node.type.name)
3231
- }), t.dataTransfer.setData(Ge, "move"), t.dataTransfer.effectAllowed = "move", i instanceof HTMLElement) {
3277
+ }), t.dataTransfer.setData(Je, "move"), t.dataTransfer.effectAllowed = "move", i instanceof HTMLElement) {
3232
3278
  let e = i.getBoundingClientRect();
3233
3279
  t.dataTransfer.setDragImage(i, Math.min(24, e.width / 2), Math.min(24, e.height / 2));
3234
3280
  }
3235
3281
  requestAnimationFrame(() => b(n.pos));
3236
- }, T = y !== null, E = h && h.pos !== C?.pos ? sr(e, t, h) : null, O = sr(e, t, C), ee = T ? sr(e, t, rt(e.state.doc, y)) : null, k = C ? at(e.state.doc, C) : null;
3237
- return /* @__PURE__ */ R("div", {
3282
+ }, T = y !== null, E = h && h.pos !== C?.pos ? fr(e, t, h) : null, O = fr(e, t, C), k = T ? fr(e, t, z(e.state.doc, y)) : null, A = C ? st(e.state.doc, C) : null;
3283
+ return /* @__PURE__ */ L("div", {
3238
3284
  className: "bree-ov-layer",
3239
3285
  children: [
3240
- E && h && /* @__PURE__ */ L("div", {
3241
- className: z("bree-ov-frame bree-ov-hover", T && "bree-ov-ghost"),
3286
+ E && h && /* @__PURE__ */ I("div", {
3287
+ className: R("bree-ov-frame bree-ov-hover", T && "bree-ov-ghost"),
3242
3288
  style: E,
3243
- children: /* @__PURE__ */ L("button", {
3289
+ children: /* @__PURE__ */ I("button", {
3244
3290
  type: "button",
3245
3291
  className: "bree-ov-tag",
3246
3292
  onMouseDown: (t) => {
3247
- t.preventDefault(), st(e, h);
3293
+ t.preventDefault(), lt(e, h);
3248
3294
  },
3249
3295
  children: o(h.node.type.name)
3250
3296
  })
3251
3297
  }),
3252
- O && C && /* @__PURE__ */ R("div", {
3253
- className: z("bree-ov-frame bree-ov-selected", T && "bree-ov-ghost"),
3298
+ O && C && /* @__PURE__ */ L("div", {
3299
+ className: R("bree-ov-frame bree-ov-selected", T && "bree-ov-ghost"),
3254
3300
  style: O,
3255
3301
  children: [
3256
- /* @__PURE__ */ L("span", {
3302
+ /* @__PURE__ */ I("span", {
3257
3303
  className: "bree-ov-tag bree-ov-tag-selected",
3258
3304
  children: o(C.node.type.name)
3259
3305
  }),
3260
- !it(C) && /* @__PURE__ */ L(M, { children: /* @__PURE__ */ L("span", {
3306
+ !ot(C) && /* @__PURE__ */ I(M, { children: /* @__PURE__ */ I("span", {
3261
3307
  className: "bree-ov-handle",
3262
3308
  role: "button",
3263
3309
  tabIndex: -1,
@@ -3265,38 +3311,38 @@ function ur({ editor: e, host: t }) {
3265
3311
  title: c.canvas.move,
3266
3312
  "aria-label": c.canvas.moveLabel(o(C.node.type.name)),
3267
3313
  onDragStart: (e) => w(e, C),
3268
- children: /* @__PURE__ */ L(Lt, {})
3314
+ children: /* @__PURE__ */ I(Ht, {})
3269
3315
  }) }),
3270
- /* @__PURE__ */ L(M, { children: /* @__PURE__ */ R("div", {
3316
+ /* @__PURE__ */ I(M, { children: /* @__PURE__ */ L("div", {
3271
3317
  className: "bree-ov-toolbar",
3272
3318
  onMouseDown: (e) => e.preventDefault(),
3273
- children: [k && /* @__PURE__ */ L("button", {
3319
+ children: [A && /* @__PURE__ */ I("button", {
3274
3320
  type: "button",
3275
3321
  className: "bree-ov-tool",
3276
- title: c.canvas.selectParent(o(k.node.type.name)),
3277
- onClick: () => st(e, k),
3278
- children: /* @__PURE__ */ L(Bt, {})
3279
- }), !it(C) && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("button", {
3322
+ title: c.canvas.selectParent(o(A.node.type.name)),
3323
+ onClick: () => lt(e, A),
3324
+ children: /* @__PURE__ */ I(Gt, {})
3325
+ }), !ot(C) && /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("button", {
3280
3326
  type: "button",
3281
3327
  className: "bree-ov-tool",
3282
3328
  title: c.canvas.duplicate,
3283
- onClick: () => ct(e, C),
3284
- children: /* @__PURE__ */ L(Rt, {})
3285
- }), /* @__PURE__ */ L("button", {
3329
+ onClick: () => ut(e, C),
3330
+ children: /* @__PURE__ */ I(Ut, {})
3331
+ }), /* @__PURE__ */ I("button", {
3286
3332
  type: "button",
3287
3333
  className: "bree-ov-tool bree-ov-danger",
3288
3334
  title: c.canvas.delete,
3289
- onClick: () => lt(e, C),
3290
- children: /* @__PURE__ */ L(zt, {})
3335
+ onClick: () => dt(e, C),
3336
+ children: /* @__PURE__ */ I(Wt, {})
3291
3337
  })] })]
3292
3338
  }) })
3293
3339
  ]
3294
3340
  }),
3295
- ee && /* @__PURE__ */ L("div", {
3341
+ k && /* @__PURE__ */ I("div", {
3296
3342
  className: "bree-ov-frame bree-ov-source",
3297
- style: ee
3343
+ style: k
3298
3344
  }),
3299
- _ && /* @__PURE__ */ L(dr, {
3345
+ _ && /* @__PURE__ */ I(gr, {
3300
3346
  host: t,
3301
3347
  target: _,
3302
3348
  label: r.get()?.label ?? "",
@@ -3305,32 +3351,32 @@ function ur({ editor: e, host: t }) {
3305
3351
  ]
3306
3352
  });
3307
3353
  }
3308
- function dr({ host: e, target: t, label: n, messages: r }) {
3354
+ function gr({ host: e, target: t, label: n, messages: r }) {
3309
3355
  if (t.emptyZone) {
3310
- let i = or(e, t.emptyZone);
3311
- return /* @__PURE__ */ L("div", {
3356
+ let i = dr(e, t.emptyZone);
3357
+ return /* @__PURE__ */ I("div", {
3312
3358
  className: "bree-ov-dropzone",
3313
3359
  style: i,
3314
- children: /* @__PURE__ */ R("span", { children: [
3315
- /* @__PURE__ */ L(Ce, { size: 14 }),
3360
+ children: /* @__PURE__ */ L("span", { children: [
3361
+ /* @__PURE__ */ I(F, { size: 14 }),
3316
3362
  " ",
3317
3363
  r.canvas.dropLabel(n)
3318
3364
  ] })
3319
3365
  });
3320
3366
  }
3321
3367
  if (!t.line) return null;
3322
- let i = or(e, {
3368
+ let i = dr(e, {
3323
3369
  ...t.line,
3324
3370
  height: 0
3325
3371
  });
3326
- return /* @__PURE__ */ L("div", {
3372
+ return /* @__PURE__ */ I("div", {
3327
3373
  className: "bree-ov-dropline",
3328
3374
  style: {
3329
3375
  top: i.top,
3330
3376
  left: i.left,
3331
3377
  width: i.width
3332
3378
  },
3333
- children: /* @__PURE__ */ L("span", {
3379
+ children: /* @__PURE__ */ I("span", {
3334
3380
  className: "bree-ov-dropline-label",
3335
3381
  children: r.canvas.dropHere
3336
3382
  })
@@ -3338,29 +3384,29 @@ function dr({ host: e, target: t, label: n, messages: r }) {
3338
3384
  }
3339
3385
  //#endregion
3340
3386
  //#region src/components/EmailHeader.tsx
3341
- function fr({ className: e, style: t }) {
3387
+ function _r({ className: e, style: t }) {
3342
3388
  let { settings: n, updateSettings: r, t: i } = Q(), o = i.emailHeader, s = a();
3343
- return /* @__PURE__ */ R("div", {
3344
- className: z("bree-email-header", e),
3389
+ return /* @__PURE__ */ L("div", {
3390
+ className: R("bree-email-header", e),
3345
3391
  style: t,
3346
- children: [/* @__PURE__ */ R("div", {
3392
+ children: [/* @__PURE__ */ L("div", {
3347
3393
  className: "bree-email-header-row",
3348
- children: [/* @__PURE__ */ L("label", {
3394
+ children: [/* @__PURE__ */ I("label", {
3349
3395
  htmlFor: `${s}-subject`,
3350
3396
  children: o.subject
3351
- }), /* @__PURE__ */ L("input", {
3397
+ }), /* @__PURE__ */ I("input", {
3352
3398
  id: `${s}-subject`,
3353
3399
  className: "bree-email-header-subject",
3354
3400
  value: n.subject ?? "",
3355
3401
  placeholder: o.subjectPlaceholder,
3356
3402
  onChange: (e) => r({ subject: e.target.value })
3357
3403
  })]
3358
- }), /* @__PURE__ */ R("div", {
3404
+ }), /* @__PURE__ */ L("div", {
3359
3405
  className: "bree-email-header-row",
3360
- children: [/* @__PURE__ */ L("label", {
3406
+ children: [/* @__PURE__ */ I("label", {
3361
3407
  htmlFor: `${s}-preview`,
3362
3408
  children: o.previewText
3363
- }), /* @__PURE__ */ L("input", {
3409
+ }), /* @__PURE__ */ I("input", {
3364
3410
  id: `${s}-preview`,
3365
3411
  value: n.previewText,
3366
3412
  placeholder: o.previewTextPlaceholder,
@@ -3371,7 +3417,7 @@ function fr({ className: e, style: t }) {
3371
3417
  }
3372
3418
  //#endregion
3373
3419
  //#region src/components/Canvas.tsx
3374
- function pr(e, t, n) {
3420
+ function vr(e, t, n) {
3375
3421
  let [r, a] = u(null);
3376
3422
  return i(() => {
3377
3423
  if (!t || !n) return;
@@ -3401,19 +3447,19 @@ function pr(e, t, n) {
3401
3447
  n
3402
3448
  ]), n ? r : null;
3403
3449
  }
3404
- function mr({ overlay: e = !0, bubbleMenu: t = !0, slashCommands: n = !0, header: r = !1, className: i, style: a, children: o }) {
3405
- let { editor: s, device: l, t: d } = Q(), [f, m] = u(null), [h, g] = u(null), _ = pr(s, f, r ? h : null), v = c(() => Array.isArray(n) ? n : je.map((e) => ({
3450
+ function yr({ overlay: e = !0, bubbleMenu: t = !0, slashCommands: n = !0, header: r = !1, className: i, style: a, children: o }) {
3451
+ let { editor: s, device: l, t: d } = Q(), [f, m] = u(null), [h, g] = u(null), _ = vr(s, f, r ? h : null), v = c(() => Array.isArray(n) ? n : Ne.map((e) => ({
3406
3452
  ...e,
3407
3453
  ...d.slashCommands[e.title]
3408
3454
  })), [n, d]);
3409
- return /* @__PURE__ */ R("div", {
3455
+ return /* @__PURE__ */ L("div", {
3410
3456
  ref: m,
3411
- className: z("bree-canvas", i),
3457
+ className: R("bree-canvas", i),
3412
3458
  style: a,
3413
3459
  "data-device": l,
3414
3460
  "data-email-header": r || void 0,
3415
3461
  children: [
3416
- r && /* @__PURE__ */ L("div", {
3462
+ r && /* @__PURE__ */ I("div", {
3417
3463
  ref: g,
3418
3464
  className: "bree-canvas-header",
3419
3465
  "data-placed": _ ? "" : void 0,
@@ -3424,23 +3470,23 @@ function mr({ overlay: e = !0, bubbleMenu: t = !0, slashCommands: n = !0, header
3424
3470
  width: _.width,
3425
3471
  "--bree-email-header-radius": _.radius
3426
3472
  } : void 0,
3427
- children: /* @__PURE__ */ L(fr, {})
3473
+ children: /* @__PURE__ */ I(_r, {})
3428
3474
  }),
3429
- /* @__PURE__ */ L(p, {
3475
+ /* @__PURE__ */ I(p, {
3430
3476
  editor: s,
3431
3477
  className: "bree-canvas-content"
3432
3478
  }),
3433
- t && /* @__PURE__ */ R(I, { children: [
3434
- /* @__PURE__ */ L(ce, {
3479
+ t && /* @__PURE__ */ L(Pe, { children: [
3480
+ /* @__PURE__ */ I(ue, {
3435
3481
  hideWhenActiveNodes: ["button", "horizontalRule"],
3436
3482
  hideWhenActiveMarks: ["link"]
3437
3483
  }),
3438
- /* @__PURE__ */ L(ce.LinkDefault, {}),
3439
- /* @__PURE__ */ L(ce.ButtonDefault, {}),
3440
- /* @__PURE__ */ L(ce.ImageDefault, {})
3484
+ /* @__PURE__ */ I(ue.LinkDefault, {}),
3485
+ /* @__PURE__ */ I(ue.ButtonDefault, {}),
3486
+ /* @__PURE__ */ I(ue.ImageDefault, {})
3441
3487
  ] }),
3442
- n !== !1 && /* @__PURE__ */ L(F, { items: v }),
3443
- e && f && /* @__PURE__ */ L(ur, {
3488
+ n !== !1 && /* @__PURE__ */ I(Te, { items: v }),
3489
+ e && f && /* @__PURE__ */ I(hr, {
3444
3490
  editor: s,
3445
3491
  host: f
3446
3492
  }),
@@ -3450,36 +3496,36 @@ function mr({ overlay: e = !0, bubbleMenu: t = !0, slashCommands: n = !0, header
3450
3496
  }
3451
3497
  //#endregion
3452
3498
  //#region src/core/layers.ts
3453
- function hr(e, t) {
3499
+ function br(e, t) {
3454
3500
  let n = e.child(t);
3455
- return t === e.childCount - 1 && e.childCount > 1 && Je(n) && e.child(t - 1).type.name !== "paragraph";
3501
+ return t === e.childCount - 1 && e.childCount > 1 && Ze(n) && e.child(t - 1).type.name !== "paragraph";
3456
3502
  }
3457
- function gr(e, t, n, r) {
3503
+ function xr(e, t, n, r) {
3458
3504
  let i = [];
3459
3505
  return e.forEach((a, o, s) => {
3460
- if (hr(e, s)) return;
3461
- let c = t + 1 + o, l = a.type.name, u = `${r}${s}`, d = Ue.has(l), f = d && a.childCount === 1 && Je(a.firstChild), p = d || We.has(l);
3506
+ if (br(e, s)) return;
3507
+ let c = t + 1 + o, l = a.type.name, u = `${r}${s}`, d = Ke.has(l), f = d && a.childCount === 1 && Ze(a.firstChild), p = d || qe.has(l);
3462
3508
  i.push({
3463
3509
  key: u,
3464
3510
  pos: c,
3465
3511
  node: a,
3466
3512
  depth: n,
3467
3513
  index: s + 1,
3468
- children: p && !f ? gr(a, c, n + 1, `${u}.`) : [],
3514
+ children: p && !f ? xr(a, c, n + 1, `${u}.`) : [],
3469
3515
  accepts: d,
3470
3516
  fixed: l === "columnsColumn",
3471
3517
  empty: f
3472
3518
  });
3473
3519
  }), i;
3474
3520
  }
3475
- function _r(e) {
3476
- let t = Ye(e);
3477
- return t ? gr(t.node, t.pos, 0, "") : [];
3521
+ function Sr(e) {
3522
+ let t = Qe(e);
3523
+ return t ? xr(t.node, t.pos, 0, "") : [];
3478
3524
  }
3479
- function vr(e, t) {
3525
+ function Cr(e, t) {
3480
3526
  return e.fixed ? "inside" : e.accepts ? t < .25 ? "before" : t > .75 ? "after" : "inside" : t < .5 ? "before" : "after";
3481
3527
  }
3482
- function yr(e, t, n, r, i) {
3528
+ function wr(e, t, n, r, i) {
3483
3529
  let a, o;
3484
3530
  if (n === "inside") {
3485
3531
  if (!t.accepts) return null;
@@ -3497,8 +3543,8 @@ function yr(e, t, n, r, i) {
3497
3543
  }
3498
3544
  //#endregion
3499
3545
  //#region src/components/LayersPanel.tsx
3500
- function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r, style: a }) {
3501
- let { editor: o, t: s, locale: f, nodes: p, nodeLabel: m, dragSession: h, hoverStore: _ } = Q(), v = (e) => e.node.type.name === "columnsColumn" ? s.layers.column(e.index) : m(e.node.type.name), y = (e) => (p.get(e.node.type.name)?.preview ?? An)(e.node, {
3546
+ function Tr({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r, style: a }) {
3547
+ let { editor: o, t: s, locale: f, nodes: p, nodeLabel: m, dragSession: h, hoverStore: _ } = Q(), v = (e) => e.node.type.name === "columnsColumn" ? s.layers.column(e.index) : m(e.node.type.name), y = (e) => (p.get(e.node.type.name)?.preview ?? Fn)(e.node, {
3502
3548
  locale: f,
3503
3549
  t: s
3504
3550
  }), b = g({
@@ -3507,16 +3553,16 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3507
3553
  equalityFn: (e, t) => e === t
3508
3554
  }), x = g({
3509
3555
  editor: o,
3510
- selector: ({ editor: e }) => e?.isFocused ? ot(e)?.pos ?? null : null
3511
- }), S = d(_.subscribe, _.get), C = c(() => b ? _r(b) : [], [b]), [w, T] = u(() => /* @__PURE__ */ new Set()), [E, D] = u(null), O = l(null);
3556
+ selector: ({ editor: e }) => e?.isFocused ? ct(e)?.pos ?? null : null
3557
+ }), S = d(_.subscribe, _.get), C = c(() => b ? Sr(b) : [], [b]), [w, T] = u(() => /* @__PURE__ */ new Set()), [E, D] = u(null), O = l(null);
3512
3558
  i(() => {
3513
3559
  x !== null && O.current?.querySelector("[aria-selected=\"true\"]")?.scrollIntoView({ block: "nearest" });
3514
3560
  }, [x]);
3515
- let ee = (e) => T((t) => {
3561
+ let k = (e) => T((t) => {
3516
3562
  let n = new Set(t);
3517
3563
  return n.has(e) ? n.delete(e) : n.add(e), n;
3518
- }), k = (e) => {
3519
- st(o, {
3564
+ }), A = (e) => {
3565
+ lt(o, {
3520
3566
  pos: e.pos,
3521
3567
  node: e.node
3522
3568
  });
@@ -3525,41 +3571,41 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3525
3571
  block: "nearest",
3526
3572
  behavior: "smooth"
3527
3573
  });
3528
- }, A = (e, t) => {
3574
+ }, j = (e, t) => {
3529
3575
  let n = h.get();
3530
3576
  if (!n) return null;
3531
- let r = Ze(o.view, n);
3577
+ let r = et(o.view, n);
3532
3578
  if (!r) return null;
3533
- let i = e.currentTarget.getBoundingClientRect(), a = vr(t, (e.clientY - i.top) / i.height), s = n.kind === "move" ? o.state.doc.nodeAt(n.pos) : null, c = n.kind === "move" && s ? {
3579
+ let i = e.currentTarget.getBoundingClientRect(), a = Cr(t, (e.clientY - i.top) / i.height), s = n.kind === "move" ? o.state.doc.nodeAt(n.pos) : null, c = n.kind === "move" && s ? {
3534
3580
  from: n.pos,
3535
3581
  to: n.pos + s.nodeSize
3536
- } : void 0, l = yr(o.state.doc, t, a, r, c);
3582
+ } : void 0, l = wr(o.state.doc, t, a, r, c);
3537
3583
  return l ? {
3538
3584
  zone: a,
3539
3585
  target: l,
3540
3586
  payload: n
3541
3587
  } : null;
3542
- }, te = () => {
3588
+ }, ee = () => {
3543
3589
  h.end(), D(null);
3544
- }, ne = (e) => e.map((e) => {
3545
- let t = p.get(e.node.type.name)?.icon ?? ge, n = e.children.length > 0, r = w.has(e.key), i = y(e), a = E?.key === e.key ? E.zone : null;
3546
- return /* @__PURE__ */ R("div", {
3590
+ }, te = (e) => e.map((e) => {
3591
+ let t = p.get(e.node.type.name)?.icon ?? ve, n = e.children.length > 0, r = w.has(e.key), i = y(e), a = E?.key === e.key ? E.zone : null;
3592
+ return /* @__PURE__ */ L("div", {
3547
3593
  role: "none",
3548
3594
  children: [
3549
- /* @__PURE__ */ R("div", {
3595
+ /* @__PURE__ */ L("div", {
3550
3596
  role: "treeitem",
3551
3597
  tabIndex: x === e.pos || x === null && e.key === "0" ? 0 : -1,
3552
3598
  "aria-level": e.depth + 1,
3553
3599
  "aria-selected": x === e.pos,
3554
3600
  "aria-expanded": n ? !r : void 0,
3555
- className: z("bree-layer", x === e.pos && "bree-selected", S === e.pos && "bree-hovered", a && `bree-drop-${a}`, e.fixed && "bree-fixed"),
3601
+ className: R("bree-layer", x === e.pos && "bree-selected", S === e.pos && "bree-hovered", a && `bree-drop-${a}`, e.fixed && "bree-fixed"),
3556
3602
  style: { paddingLeft: 6 + e.depth * 16 },
3557
3603
  draggable: !e.fixed,
3558
3604
  title: e.fixed ? s.layers.fixedHint : s.layers.itemHint,
3559
- onClick: () => k(e),
3605
+ onClick: () => A(e),
3560
3606
  onKeyDown: (t) => {
3561
- if (t.key === "Enter" || t.key === " ") t.preventDefault(), k(e);
3562
- else if (t.key === "ArrowLeft" && n && !r || t.key === "ArrowRight" && r) ee(e.key);
3607
+ if (t.key === "Enter" || t.key === " ") t.preventDefault(), A(e);
3608
+ else if (t.key === "ArrowLeft" && n && !r || t.key === "ArrowRight" && r) k(e.key);
3563
3609
  else if (t.key === "ArrowDown" || t.key === "ArrowUp") {
3564
3610
  t.preventDefault();
3565
3611
  let e = [...O.current?.querySelectorAll("[role=\"treeitem\"]") ?? []];
@@ -3573,11 +3619,11 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3573
3619
  kind: "move",
3574
3620
  pos: e.pos,
3575
3621
  label: v(e)
3576
- }), t.dataTransfer.setData(Ge, "move"), t.dataTransfer.effectAllowed = "move";
3622
+ }), t.dataTransfer.setData(Je, "move"), t.dataTransfer.effectAllowed = "move";
3577
3623
  },
3578
- onDragEnd: te,
3624
+ onDragEnd: ee,
3579
3625
  onDragOver: (t) => {
3580
- let n = A(t, e);
3626
+ let n = j(t, e);
3581
3627
  if (!n) {
3582
3628
  E?.key === e.key && D(null);
3583
3629
  return;
@@ -3588,63 +3634,63 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3588
3634
  });
3589
3635
  },
3590
3636
  onDrop: (t) => {
3591
- let n = A(t, e);
3592
- t.preventDefault(), n && tt(o, n.payload, n.target), te();
3637
+ let n = j(t, e);
3638
+ t.preventDefault(), n && it(o, n.payload, n.target), ee();
3593
3639
  },
3594
3640
  children: [
3595
- n ? /* @__PURE__ */ L("button", {
3641
+ n ? /* @__PURE__ */ I("button", {
3596
3642
  type: "button",
3597
- className: z("bree-layer-caret", !r && "bree-open"),
3643
+ className: R("bree-layer-caret", !r && "bree-open"),
3598
3644
  "aria-label": r ? s.layers.expand : s.layers.collapse,
3599
3645
  tabIndex: -1,
3600
3646
  onClick: (t) => {
3601
- t.stopPropagation(), ee(e.key);
3647
+ t.stopPropagation(), k(e.key);
3602
3648
  },
3603
3649
  children: "›"
3604
- }) : /* @__PURE__ */ L("span", { className: "bree-layer-caret-spacer" }),
3605
- /* @__PURE__ */ L("span", {
3650
+ }) : /* @__PURE__ */ I("span", { className: "bree-layer-caret-spacer" }),
3651
+ /* @__PURE__ */ I("span", {
3606
3652
  className: "bree-layer-icon",
3607
- children: /* @__PURE__ */ L(t, { size: 14 })
3653
+ children: /* @__PURE__ */ I(t, { size: 14 })
3608
3654
  }),
3609
- /* @__PURE__ */ L("span", {
3655
+ /* @__PURE__ */ I("span", {
3610
3656
  className: "bree-layer-label",
3611
3657
  children: v(e)
3612
3658
  }),
3613
- i && /* @__PURE__ */ L("span", {
3659
+ i && /* @__PURE__ */ I("span", {
3614
3660
  className: "bree-layer-preview",
3615
3661
  children: i
3616
3662
  })
3617
3663
  ]
3618
3664
  }),
3619
- e.empty && /* @__PURE__ */ L("div", {
3665
+ e.empty && /* @__PURE__ */ I("div", {
3620
3666
  className: "bree-layer-empty",
3621
3667
  style: { paddingLeft: 6 + (e.depth + 1) * 16 + 18 },
3622
3668
  children: s.layers.emptyZone
3623
3669
  }),
3624
- n && !r && /* @__PURE__ */ L("div", {
3670
+ n && !r && /* @__PURE__ */ I("div", {
3625
3671
  role: "group",
3626
- children: ne(e.children)
3672
+ children: te(e.children)
3627
3673
  })
3628
3674
  ]
3629
3675
  }, e.key);
3630
3676
  });
3631
- return /* @__PURE__ */ L(M, { children: /* @__PURE__ */ R("aside", {
3632
- className: z("bree-layers", r),
3677
+ return /* @__PURE__ */ I(M, { children: /* @__PURE__ */ L("aside", {
3678
+ className: R("bree-layers", r),
3633
3679
  style: a,
3634
3680
  "aria-label": t ?? s.layers.title,
3635
3681
  tabIndex: -1,
3636
3682
  onDragLeave: (e) => !e.currentTarget.contains(e.relatedTarget) && D(null),
3637
- children: [/* @__PURE__ */ R("header", {
3683
+ children: [/* @__PURE__ */ L("header", {
3638
3684
  className: "bree-layers-header",
3639
- children: [/* @__PURE__ */ L("h2", { children: t ?? s.layers.title }), /* @__PURE__ */ R("div", {
3685
+ children: [/* @__PURE__ */ I("h2", { children: t ?? s.layers.title }), /* @__PURE__ */ L("div", {
3640
3686
  className: "bree-layers-actions",
3641
- children: [n && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("button", {
3687
+ children: [n && /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("button", {
3642
3688
  type: "button",
3643
3689
  className: "bree-icon-button bree-small",
3644
3690
  title: s.layers.expandAll,
3645
3691
  onClick: () => T(/* @__PURE__ */ new Set()),
3646
3692
  children: "⊞"
3647
- }), /* @__PURE__ */ L("button", {
3693
+ }), /* @__PURE__ */ I("button", {
3648
3694
  type: "button",
3649
3695
  className: "bree-icon-button bree-small",
3650
3696
  title: s.layers.collapseAll,
@@ -3655,20 +3701,20 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3655
3701
  t(C), T(e);
3656
3702
  },
3657
3703
  children: "⊟"
3658
- })] }), e && /* @__PURE__ */ L("button", {
3704
+ })] }), e && /* @__PURE__ */ I("button", {
3659
3705
  type: "button",
3660
3706
  className: "bree-icon-button bree-small",
3661
3707
  title: s.layers.close,
3662
3708
  onClick: e,
3663
- children: /* @__PURE__ */ L(Ae, { size: 14 })
3709
+ children: /* @__PURE__ */ I(Me, { size: 14 })
3664
3710
  })]
3665
3711
  })]
3666
- }), /* @__PURE__ */ L("div", {
3712
+ }), /* @__PURE__ */ I("div", {
3667
3713
  className: "bree-layers-list",
3668
3714
  role: "tree",
3669
3715
  "aria-label": s.layers.tree,
3670
3716
  ref: O,
3671
- children: C.length ? ne(C) : /* @__PURE__ */ L("p", {
3717
+ children: C.length ? te(C) : /* @__PURE__ */ I("p", {
3672
3718
  className: "bree-hint",
3673
3719
  children: s.layers.emptyEmail
3674
3720
  })
@@ -3677,58 +3723,58 @@ function br({ onClose: e, title: t, expandCollapseButtons: n = !0, className: r,
3677
3723
  }
3678
3724
  //#endregion
3679
3725
  //#region src/components/inspectors/DefaultInspector.tsx
3680
- function xr({ ctx: e, className: t, style: n }) {
3681
- return /* @__PURE__ */ R("div", {
3682
- className: z("bree-inspector", t),
3726
+ function Er({ ctx: e, className: t, style: n }) {
3727
+ return /* @__PURE__ */ L("div", {
3728
+ className: R("bree-inspector", t),
3683
3729
  style: n,
3684
3730
  children: [
3685
- /* @__PURE__ */ L(ln, {
3731
+ /* @__PURE__ */ I(mn, {
3686
3732
  ctx: e,
3687
3733
  alignment: String(e.getAttr("alignment") ?? "left"),
3688
3734
  setAlignment: (t) => e.setAttr("alignment", t)
3689
3735
  }),
3690
- /* @__PURE__ */ L(q, { ctx: e }),
3691
- /* @__PURE__ */ L(un, { ctx: e })
3736
+ /* @__PURE__ */ I(q, { ctx: e }),
3737
+ /* @__PURE__ */ I(hn, { ctx: e })
3692
3738
  ]
3693
3739
  });
3694
3740
  }
3695
3741
  //#endregion
3696
3742
  //#region src/components/PropertiesPanel.tsx
3697
- function Sr() {
3743
+ function Dr() {
3698
3744
  let { editor: e } = Q();
3699
3745
  return () => {
3700
3746
  let t = document.activeElement;
3701
3747
  t instanceof HTMLElement && t.blur(), e.commands.blur();
3702
3748
  };
3703
3749
  }
3704
- function Cr({ title: e, children: t, breadcrumb: n = !0, className: r, style: i }) {
3705
- let { t: a, nodeLabel: o } = Q(), s = Sr();
3706
- return /* @__PURE__ */ R("div", {
3707
- className: z("bree-properties", r),
3750
+ function Or({ title: e, children: t, breadcrumb: n = !0, className: r, style: i }) {
3751
+ let { t: a, nodeLabel: o } = Q(), s = Dr();
3752
+ return /* @__PURE__ */ L("div", {
3753
+ className: R("bree-properties", r),
3708
3754
  style: i,
3709
3755
  children: [
3710
- /* @__PURE__ */ R("header", {
3756
+ /* @__PURE__ */ L("header", {
3711
3757
  className: "bree-properties-header",
3712
- children: [/* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("span", {
3758
+ children: [/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("span", {
3713
3759
  className: "bree-eyebrow",
3714
3760
  children: a.sidebar.propertiesEyebrow
3715
- }), /* @__PURE__ */ L("h2", { children: e })] }), /* @__PURE__ */ L("button", {
3761
+ }), /* @__PURE__ */ I("h2", { children: e })] }), /* @__PURE__ */ I("button", {
3716
3762
  type: "button",
3717
3763
  className: "bree-icon-button",
3718
3764
  title: a.sidebar.closeProperties,
3719
3765
  onClick: s,
3720
- children: /* @__PURE__ */ L(Ae, { size: 16 })
3766
+ children: /* @__PURE__ */ I(Me, { size: 16 })
3721
3767
  })]
3722
3768
  }),
3723
- n && /* @__PURE__ */ L(N.Breadcrumb, { children: (e) => e.length > 1 && /* @__PURE__ */ L("nav", {
3769
+ n && /* @__PURE__ */ I(N.Breadcrumb, { children: (e) => e.length > 1 && /* @__PURE__ */ I("nav", {
3724
3770
  className: "bree-breadcrumb",
3725
3771
  "aria-label": a.sidebar.breadcrumb,
3726
- children: e.map((t, n) => /* @__PURE__ */ R("span", {
3772
+ children: e.map((t, n) => /* @__PURE__ */ L("span", {
3727
3773
  className: "bree-crumb",
3728
- children: [n > 0 && /* @__PURE__ */ L("span", {
3774
+ children: [n > 0 && /* @__PURE__ */ I("span", {
3729
3775
  className: "bree-crumb-sep",
3730
3776
  children: "/"
3731
- }), /* @__PURE__ */ L("button", {
3777
+ }), /* @__PURE__ */ I("button", {
3732
3778
  type: "button",
3733
3779
  disabled: n === e.length - 1,
3734
3780
  onClick: t.focus,
@@ -3736,7 +3782,7 @@ function Cr({ title: e, children: t, breadcrumb: n = !0, className: r, style: i
3736
3782
  })]
3737
3783
  }, `${t.node.nodeType}-${t.node.nodePos.pos}`))
3738
3784
  }) }),
3739
- /* @__PURE__ */ L("div", {
3785
+ /* @__PURE__ */ I("div", {
3740
3786
  className: "bree-panel-scroll",
3741
3787
  children: t
3742
3788
  })
@@ -3745,18 +3791,18 @@ function Cr({ title: e, children: t, breadcrumb: n = !0, className: r, style: i
3745
3791
  }
3746
3792
  //#endregion
3747
3793
  //#region src/components/BlockProperties.tsx
3748
- function wr({ ctx: e, className: t, style: n }) {
3749
- let { nodes: r, nodeLabel: i } = Q(), a = r.get(e.nodeType)?.inspector ?? xr;
3750
- return /* @__PURE__ */ L(Cr, {
3794
+ function kr({ ctx: e, className: t, style: n }) {
3795
+ let { nodes: r, nodeLabel: i } = Q(), a = r.get(e.nodeType)?.inspector ?? Er;
3796
+ return /* @__PURE__ */ I(Or, {
3751
3797
  title: i(e.nodeType),
3752
3798
  className: t,
3753
3799
  style: n,
3754
- children: /* @__PURE__ */ L(a, { ctx: e }, `${e.nodeType}-${e.nodePos.pos}`)
3800
+ children: /* @__PURE__ */ I(a, { ctx: e }, `${e.nodeType}-${e.nodePos.pos}`)
3755
3801
  });
3756
3802
  }
3757
3803
  //#endregion
3758
3804
  //#region src/components/useDraggableBlock.ts
3759
- function Tr(e, t) {
3805
+ function Ar(e, t) {
3760
3806
  let { editor: n, dragSession: r } = Q();
3761
3807
  return {
3762
3808
  draggable: !0,
@@ -3765,50 +3811,50 @@ function Tr(e, t) {
3765
3811
  kind: "new",
3766
3812
  label: e,
3767
3813
  content: t
3768
- }), n.dataTransfer.setData(Ge, e), n.dataTransfer.effectAllowed = "copy";
3814
+ }), n.dataTransfer.setData(Je, e), n.dataTransfer.effectAllowed = "copy";
3769
3815
  },
3770
3816
  onDragEnd: () => r.end(),
3771
- onClick: () => ut(n, t())
3817
+ onClick: () => ft(n, t())
3772
3818
  };
3773
3819
  }
3774
3820
  //#endregion
3775
3821
  //#region src/components/BlocksTab.tsx
3776
- function Er({ template: e, className: t, style: n }) {
3777
- let r = Qn(), i = Mt(e.label, r), a = Tr(i, () => e.content(r));
3778
- return /* @__PURE__ */ R("button", {
3822
+ function jr({ template: e, className: t, style: n }) {
3823
+ let r = rr(), i = Lt(e.label, r), a = Ar(i, () => e.content(r));
3824
+ return /* @__PURE__ */ L("button", {
3779
3825
  type: "button",
3780
- className: z("bree-block-card", t),
3826
+ className: R("bree-block-card", t),
3781
3827
  style: n,
3782
3828
  ...a,
3783
- children: [e.thumbnail ?? /* @__PURE__ */ L(Z, { variant: "default" }), /* @__PURE__ */ R("span", {
3829
+ children: [e.thumbnail ?? /* @__PURE__ */ I(Z, { variant: "default" }), /* @__PURE__ */ L("span", {
3784
3830
  className: "bree-block-text",
3785
- children: [/* @__PURE__ */ L("strong", { children: i }), e.description && /* @__PURE__ */ L("span", { children: Mt(e.description, r) })]
3831
+ children: [/* @__PURE__ */ I("strong", { children: i }), e.description && /* @__PURE__ */ I("span", { children: Lt(e.description, r) })]
3786
3832
  })]
3787
3833
  });
3788
3834
  }
3789
- function Dr({ templates: e, className: t, style: n }) {
3835
+ function Mr({ templates: e, className: t, style: n }) {
3790
3836
  let r = Q();
3791
- return /* @__PURE__ */ L("div", {
3792
- className: z("bree-block-list", t),
3837
+ return /* @__PURE__ */ I("div", {
3838
+ className: R("bree-block-list", t),
3793
3839
  style: n,
3794
- children: (e ?? r.templates).map((e) => /* @__PURE__ */ L(Er, { template: e }, e.id))
3840
+ children: (e ?? r.templates).map((e) => /* @__PURE__ */ I(jr, { template: e }, e.id))
3795
3841
  });
3796
3842
  }
3797
3843
  //#endregion
3798
3844
  //#region src/core/email-font.ts
3799
- var Or = ["body", "blockquote"];
3800
- function kr(e) {
3845
+ var Nr = ["body", "blockquote"];
3846
+ function Pr(e) {
3801
3847
  let { styles: t } = C(e), n = t.flatMap((e) => e.inputs).find((e) => e.prop === "fontFamily" && e.classReference === "body");
3802
3848
  return String(n?.value ?? "");
3803
3849
  }
3804
- function Ar(e, t) {
3805
- let { styles: n } = C(e), r = (e) => e.prop === "fontFamily" && Or.includes(e.classReference ?? ""), i = Math.max(0, n.findIndex((e) => e.id === "body")), a = n.map((e, n) => {
3850
+ function Fr(e, t) {
3851
+ let { styles: n } = C(e), r = (e) => e.prop === "fontFamily" && Nr.includes(e.classReference ?? ""), i = Math.max(0, n.findIndex((e) => e.id === "body")), a = n.map((e, n) => {
3806
3852
  let a = e.inputs.filter((e) => !r(e));
3807
3853
  if (n !== i || !t) return {
3808
3854
  ...e,
3809
3855
  inputs: a
3810
3856
  };
3811
- let o = Or.map((e) => ({
3857
+ let o = Nr.map((e) => ({
3812
3858
  label: "Font",
3813
3859
  type: "text",
3814
3860
  prop: "fontFamily",
@@ -3824,100 +3870,100 @@ function Ar(e, t) {
3824
3870
  }
3825
3871
  //#endregion
3826
3872
  //#region src/components/BodyTab.tsx
3827
- function jr({ ctx: e, className: t, style: n }) {
3873
+ function Ir({ ctx: e, className: t, style: n }) {
3828
3874
  let { editor: r, settings: i, updateSettings: a, t: o } = Q(), s = o.body, { findStyleValue: c, setGlobalStyle: l } = e;
3829
- return /* @__PURE__ */ R("div", {
3830
- className: z("bree-body-tab", t),
3875
+ return /* @__PURE__ */ L("div", {
3876
+ className: R("bree-body-tab", t),
3831
3877
  style: n,
3832
3878
  children: [
3833
- /* @__PURE__ */ L(V, {
3879
+ /* @__PURE__ */ I(V, {
3834
3880
  title: s.general,
3835
- children: /* @__PURE__ */ L(H, {
3881
+ children: /* @__PURE__ */ I(H, {
3836
3882
  label: s.previewText,
3837
3883
  stacked: !0,
3838
- children: /* @__PURE__ */ L(U, {
3884
+ children: /* @__PURE__ */ I(U, {
3839
3885
  value: i.previewText,
3840
3886
  onChange: (e) => a({ previewText: e }),
3841
3887
  placeholder: s.previewTextPlaceholder
3842
3888
  })
3843
3889
  })
3844
3890
  }),
3845
- /* @__PURE__ */ R(V, {
3891
+ /* @__PURE__ */ L(V, {
3846
3892
  title: s.background,
3847
- children: [/* @__PURE__ */ L(H, {
3893
+ children: [/* @__PURE__ */ I(H, {
3848
3894
  label: s.backgroundColor,
3849
3895
  stacked: !0,
3850
- children: /* @__PURE__ */ L(G, {
3896
+ children: /* @__PURE__ */ I(G, {
3851
3897
  value: c("body", "backgroundColor"),
3852
3898
  onChange: (e) => l("body", "backgroundColor", e)
3853
3899
  })
3854
- }), /* @__PURE__ */ L(H, {
3900
+ }), /* @__PURE__ */ I(H, {
3855
3901
  label: s.outerPadding,
3856
- children: /* @__PURE__ */ L(W, {
3902
+ children: /* @__PURE__ */ I(W, {
3857
3903
  value: c("body", "padding"),
3858
3904
  onChange: (e) => l("body", "padding", e)
3859
3905
  })
3860
3906
  })]
3861
3907
  }),
3862
- /* @__PURE__ */ R(V, {
3908
+ /* @__PURE__ */ L(V, {
3863
3909
  title: s.content,
3864
3910
  children: [
3865
- /* @__PURE__ */ L(H, {
3911
+ /* @__PURE__ */ I(H, {
3866
3912
  label: s.width,
3867
- children: /* @__PURE__ */ L(W, {
3913
+ children: /* @__PURE__ */ I(W, {
3868
3914
  value: c("container", "width"),
3869
3915
  onChange: (e) => l("container", "width", e),
3870
3916
  min: 320,
3871
3917
  max: 900
3872
3918
  })
3873
3919
  }),
3874
- /* @__PURE__ */ L(H, {
3920
+ /* @__PURE__ */ I(H, {
3875
3921
  label: s.contentColor,
3876
3922
  stacked: !0,
3877
- children: /* @__PURE__ */ L(G, {
3923
+ children: /* @__PURE__ */ I(G, {
3878
3924
  value: c("container", "backgroundColor"),
3879
3925
  onChange: (e) => l("container", "backgroundColor", e)
3880
3926
  })
3881
3927
  }),
3882
- /* @__PURE__ */ L(H, {
3928
+ /* @__PURE__ */ I(H, {
3883
3929
  label: s.innerPadding,
3884
- children: /* @__PURE__ */ L(W, {
3930
+ children: /* @__PURE__ */ I(W, {
3885
3931
  value: c("container", "padding"),
3886
3932
  onChange: (e) => l("container", "padding", e)
3887
3933
  })
3888
3934
  }),
3889
- /* @__PURE__ */ L(H, {
3935
+ /* @__PURE__ */ I(H, {
3890
3936
  label: s.radius,
3891
- children: /* @__PURE__ */ L(W, {
3937
+ children: /* @__PURE__ */ I(W, {
3892
3938
  value: c("container", "borderRadius"),
3893
3939
  onChange: (e) => l("container", "borderRadius", e)
3894
3940
  })
3895
3941
  })
3896
3942
  ]
3897
3943
  }),
3898
- /* @__PURE__ */ R(V, {
3944
+ /* @__PURE__ */ L(V, {
3899
3945
  title: s.defaultStyles,
3900
3946
  children: [
3901
- /* @__PURE__ */ L(H, {
3947
+ /* @__PURE__ */ I(H, {
3902
3948
  label: s.font,
3903
- children: /* @__PURE__ */ L(an, {
3904
- value: kr(r),
3949
+ children: /* @__PURE__ */ I(un, {
3950
+ value: Pr(r),
3905
3951
  emptyLabel: s.fontDefault,
3906
- onChange: (e) => Ar(r, e)
3952
+ onChange: (e) => Fr(r, e)
3907
3953
  })
3908
3954
  }),
3909
- /* @__PURE__ */ L(H, {
3955
+ /* @__PURE__ */ I(H, {
3910
3956
  label: s.text,
3911
3957
  stacked: !0,
3912
- children: /* @__PURE__ */ L(G, {
3958
+ children: /* @__PURE__ */ I(G, {
3913
3959
  value: c("paragraph", "color"),
3914
3960
  onChange: (e) => l("paragraph", "color", e)
3915
3961
  })
3916
3962
  }),
3917
- /* @__PURE__ */ L(H, {
3963
+ /* @__PURE__ */ I(H, {
3918
3964
  label: s.headings,
3919
3965
  stacked: !0,
3920
- children: /* @__PURE__ */ L(G, {
3966
+ children: /* @__PURE__ */ I(G, {
3921
3967
  value: c("h1", "color"),
3922
3968
  onChange: (t) => e.batchSetGlobalStyle([
3923
3969
  "h1",
@@ -3930,26 +3976,26 @@ function jr({ ctx: e, className: t, style: n }) {
3930
3976
  })))
3931
3977
  })
3932
3978
  }),
3933
- /* @__PURE__ */ L(H, {
3979
+ /* @__PURE__ */ I(H, {
3934
3980
  label: s.links,
3935
3981
  stacked: !0,
3936
- children: /* @__PURE__ */ L(G, {
3982
+ children: /* @__PURE__ */ I(G, {
3937
3983
  value: c("link", "color"),
3938
3984
  onChange: (e) => l("link", "color", e)
3939
3985
  })
3940
3986
  }),
3941
- /* @__PURE__ */ L(H, {
3987
+ /* @__PURE__ */ I(H, {
3942
3988
  label: s.buttonBackground,
3943
3989
  stacked: !0,
3944
- children: /* @__PURE__ */ L(G, {
3990
+ children: /* @__PURE__ */ I(G, {
3945
3991
  value: c("button", "backgroundColor"),
3946
3992
  onChange: (e) => l("button", "backgroundColor", e)
3947
3993
  })
3948
3994
  }),
3949
- /* @__PURE__ */ L(H, {
3995
+ /* @__PURE__ */ I(H, {
3950
3996
  label: s.buttonText,
3951
3997
  stacked: !0,
3952
- children: /* @__PURE__ */ L(G, {
3998
+ children: /* @__PURE__ */ I(G, {
3953
3999
  value: c("button", "color"),
3954
4000
  onChange: (e) => l("button", "color", e)
3955
4001
  })
@@ -3961,41 +4007,41 @@ function jr({ ctx: e, className: t, style: n }) {
3961
4007
  }
3962
4008
  //#endregion
3963
4009
  //#region src/components/ContentTab.tsx
3964
- function Mr({ item: e, className: t, style: n }) {
3965
- let r = Qn(), i = Mt(e.label, r), a = Tr(i, () => e.content(r));
3966
- return /* @__PURE__ */ R("button", {
4010
+ function Lr({ item: e, className: t, style: n }) {
4011
+ let r = rr(), i = Lt(e.label, r), a = Ar(i, () => e.content(r));
4012
+ return /* @__PURE__ */ L("button", {
3967
4013
  type: "button",
3968
- className: z("bree-tile", t),
4014
+ className: R("bree-tile", t),
3969
4015
  style: n,
3970
4016
  title: r.t.sidebar.tileTitle(i),
3971
4017
  ...a,
3972
- children: [/* @__PURE__ */ L("span", {
4018
+ children: [/* @__PURE__ */ I("span", {
3973
4019
  className: "bree-tile-icon",
3974
4020
  children: e.icon
3975
- }), /* @__PURE__ */ L("span", {
4021
+ }), /* @__PURE__ */ I("span", {
3976
4022
  className: "bree-tile-label",
3977
4023
  children: i
3978
4024
  })]
3979
4025
  });
3980
4026
  }
3981
- function Nr({ items: e, groups: t, hint: n, className: r, style: i }) {
4027
+ function Rr({ items: e, groups: t, hint: n, className: r, style: i }) {
3982
4028
  let a = Q(), o = e ?? a.palette, s = t ?? a.paletteGroups, c = [...s, ...[...new Set(o.map((e) => e.group))].filter((e) => !s.some((t) => t.id === e)).map((e) => ({
3983
4029
  id: e,
3984
4030
  title: e
3985
4031
  }))];
3986
- return /* @__PURE__ */ R("div", {
3987
- className: z("bree-content-tab", r),
4032
+ return /* @__PURE__ */ L("div", {
4033
+ className: R("bree-content-tab", r),
3988
4034
  style: i,
3989
4035
  children: [c.map((e) => {
3990
4036
  let t = o.filter((t) => t.group === e.id);
3991
- return t.length ? /* @__PURE__ */ R("section", { children: [/* @__PURE__ */ L("h3", {
4037
+ return t.length ? /* @__PURE__ */ L("section", { children: [/* @__PURE__ */ I("h3", {
3992
4038
  className: "bree-panel-title",
3993
- children: Mt(e.title, a)
3994
- }), /* @__PURE__ */ L("div", {
4039
+ children: Lt(e.title, a)
4040
+ }), /* @__PURE__ */ I("div", {
3995
4041
  className: "bree-tiles",
3996
- children: t.map((e) => /* @__PURE__ */ L(Mr, { item: e }, e.id))
4042
+ children: t.map((e) => /* @__PURE__ */ I(Lr, { item: e }, e.id))
3997
4043
  })] }, e.id) : null;
3998
- }), n !== null && /* @__PURE__ */ L("p", {
4044
+ }), n !== null && /* @__PURE__ */ I("p", {
3999
4045
  className: "bree-hint",
4000
4046
  children: n ?? a.t.sidebar.dragHint
4001
4047
  })]
@@ -4003,7 +4049,7 @@ function Nr({ items: e, groups: t, hint: n, className: r, style: i }) {
4003
4049
  }
4004
4050
  //#endregion
4005
4051
  //#region src/components/ContentPanel.tsx
4006
- function Pr({ ctx: e, tabs: t = [
4052
+ function zr({ ctx: e, tabs: t = [
4007
4053
  "content",
4008
4054
  "blocks",
4009
4055
  "body"
@@ -4012,34 +4058,34 @@ function Pr({ ctx: e, tabs: t = [
4012
4058
  content: {
4013
4059
  id: "content",
4014
4060
  label: a.sidebar.tabContent,
4015
- render: () => /* @__PURE__ */ L(Nr, {})
4061
+ render: () => /* @__PURE__ */ I(Rr, {})
4016
4062
  },
4017
4063
  blocks: {
4018
4064
  id: "blocks",
4019
4065
  label: a.sidebar.tabBlocks,
4020
- render: () => /* @__PURE__ */ L(Dr, {})
4066
+ render: () => /* @__PURE__ */ I(Mr, {})
4021
4067
  },
4022
4068
  body: {
4023
4069
  id: "body",
4024
4070
  label: a.sidebar.tabBody,
4025
- render: (e) => /* @__PURE__ */ L(jr, { ctx: e })
4071
+ render: (e) => /* @__PURE__ */ I(Ir, { ctx: e })
4026
4072
  }
4027
4073
  }, s = t.map((e) => typeof e == "string" ? o[e] : e), [c, l] = u(n ?? s[0]?.id), d = s.find((e) => e.id === c) ?? s[0];
4028
- return /* @__PURE__ */ R("div", {
4029
- className: z("bree-content-panel", r),
4074
+ return /* @__PURE__ */ L("div", {
4075
+ className: R("bree-content-panel", r),
4030
4076
  style: i,
4031
- children: [s.length > 1 && /* @__PURE__ */ L("nav", {
4077
+ children: [s.length > 1 && /* @__PURE__ */ I("nav", {
4032
4078
  className: "bree-tabs",
4033
4079
  role: "tablist",
4034
- children: s.map((e) => /* @__PURE__ */ L("button", {
4080
+ children: s.map((e) => /* @__PURE__ */ I("button", {
4035
4081
  type: "button",
4036
4082
  role: "tab",
4037
4083
  "aria-selected": e.id === d?.id,
4038
- className: z(e.id === d?.id && "bree-active"),
4084
+ className: R(e.id === d?.id && "bree-active"),
4039
4085
  onClick: () => l(e.id),
4040
4086
  children: e.label
4041
4087
  }, e.id))
4042
- }), /* @__PURE__ */ L("div", {
4088
+ }), /* @__PURE__ */ I("div", {
4043
4089
  className: "bree-panel-scroll",
4044
4090
  children: d?.render(e)
4045
4091
  })]
@@ -4047,66 +4093,66 @@ function Pr({ ctx: e, tabs: t = [
4047
4093
  }
4048
4094
  //#endregion
4049
4095
  //#region src/components/TextProperties.tsx
4050
- function Fr({ ctx: e, className: t, style: n }) {
4096
+ function Br({ ctx: e, className: t, style: n }) {
4051
4097
  let r = $(), i = r.inspector, a = [
4052
4098
  {
4053
4099
  mark: "bold",
4054
- Icon: j,
4100
+ Icon: le,
4055
4101
  title: i.bold
4056
4102
  },
4057
4103
  {
4058
4104
  mark: "italic",
4059
- Icon: he,
4105
+ Icon: _e,
4060
4106
  title: i.italic
4061
4107
  },
4062
4108
  {
4063
4109
  mark: "underline",
4064
- Icon: ke,
4110
+ Icon: je,
4065
4111
  title: i.underline
4066
4112
  },
4067
4113
  {
4068
4114
  mark: "strike",
4069
- Icon: Te,
4115
+ Icon: De,
4070
4116
  title: i.strike
4071
4117
  }
4072
4118
  ];
4073
- return /* @__PURE__ */ R(Cr, {
4119
+ return /* @__PURE__ */ L(Or, {
4074
4120
  title: r.sidebar.selectedText,
4075
4121
  className: t,
4076
4122
  style: n,
4077
4123
  children: [
4078
- /* @__PURE__ */ L(V, {
4124
+ /* @__PURE__ */ I(V, {
4079
4125
  title: i.formatting,
4080
- children: /* @__PURE__ */ L("div", {
4126
+ children: /* @__PURE__ */ I("div", {
4081
4127
  className: "bree-mark-row",
4082
- children: a.map(({ mark: t, Icon: n, title: r }) => /* @__PURE__ */ L("button", {
4128
+ children: a.map(({ mark: t, Icon: n, title: r }) => /* @__PURE__ */ I("button", {
4083
4129
  type: "button",
4084
4130
  title: r,
4085
4131
  "aria-pressed": !!e.marks[t],
4086
- className: z("bree-mark", e.marks[t] && "bree-active"),
4132
+ className: R("bree-mark", e.marks[t] && "bree-active"),
4087
4133
  onClick: () => e.toggleMark(t),
4088
- children: /* @__PURE__ */ L(n, { size: 14 })
4134
+ children: /* @__PURE__ */ I(n, { size: 14 })
4089
4135
  }, t))
4090
4136
  })
4091
4137
  }),
4092
- /* @__PURE__ */ L(ln, {
4138
+ /* @__PURE__ */ I(mn, {
4093
4139
  ctx: e,
4094
4140
  alignment: e.alignment,
4095
4141
  setAlignment: e.setAlignment
4096
4142
  }),
4097
- e.isLinkActive && /* @__PURE__ */ R(V, {
4143
+ e.isLinkActive && /* @__PURE__ */ L(V, {
4098
4144
  title: i.link,
4099
- children: [/* @__PURE__ */ L(H, {
4145
+ children: [/* @__PURE__ */ I(H, {
4100
4146
  label: i.url,
4101
4147
  stacked: !0,
4102
- children: /* @__PURE__ */ L("span", {
4148
+ children: /* @__PURE__ */ I("span", {
4103
4149
  className: "bree-readonly",
4104
4150
  children: e.linkHref
4105
4151
  })
4106
- }), /* @__PURE__ */ L(H, {
4152
+ }), /* @__PURE__ */ I(H, {
4107
4153
  label: i.linkColor,
4108
4154
  stacked: !0,
4109
- children: /* @__PURE__ */ L(G, {
4155
+ children: /* @__PURE__ */ I(G, {
4110
4156
  value: e.linkColor,
4111
4157
  presets: e.presetColors,
4112
4158
  onChange: e.setLinkColor
@@ -4118,26 +4164,26 @@ function Fr({ ctx: e, className: t, style: n }) {
4118
4164
  }
4119
4165
  //#endregion
4120
4166
  //#region src/components/Sidebar.tsx
4121
- function Ir({ renderDocument: e = (e) => /* @__PURE__ */ L(Pr, { ctx: e }), renderNode: t = (e) => /* @__PURE__ */ L(wr, { ctx: e }), renderText: n = (e) => /* @__PURE__ */ L(Fr, { ctx: e }), className: r, style: i }) {
4167
+ function Vr({ renderDocument: e = (e) => /* @__PURE__ */ I(zr, { ctx: e }), renderNode: t = (e) => /* @__PURE__ */ I(kr, { ctx: e }), renderText: n = (e) => /* @__PURE__ */ I(Br, { ctx: e }), className: r, style: i }) {
4122
4168
  let { t: a } = Q();
4123
- return /* @__PURE__ */ R(N.Root, {
4124
- className: z("bree-sidebar", r),
4169
+ return /* @__PURE__ */ L(N.Root, {
4170
+ className: R("bree-sidebar", r),
4125
4171
  style: i,
4126
4172
  "aria-label": a.sidebar.label,
4127
4173
  children: [
4128
- /* @__PURE__ */ L(N.Document, { children: e }),
4129
- /* @__PURE__ */ L(N.Node, { children: t }),
4130
- /* @__PURE__ */ L(N.Text, { children: n })
4174
+ /* @__PURE__ */ I(N.Document, { children: e }),
4175
+ /* @__PURE__ */ I(N.Node, { children: t }),
4176
+ /* @__PURE__ */ I(N.Text, { children: n })
4131
4177
  ]
4132
4178
  });
4133
4179
  }
4134
4180
  //#endregion
4135
4181
  //#region src/components/PreviewDialog.tsx
4136
- function Lr(e, t, n) {
4182
+ function Hr(e, t, n) {
4137
4183
  let r = URL.createObjectURL(new Blob([t], { type: n })), i = document.createElement("a");
4138
4184
  i.href = r, i.download = e, i.click(), URL.revokeObjectURL(r);
4139
4185
  }
4140
- function Rr({ onClose: e, defaultView: t = "desktop", views: n = [
4186
+ function Ur({ onClose: e, defaultView: t = "desktop", views: n = [
4141
4187
  "desktop",
4142
4188
  "mobile",
4143
4189
  "html",
@@ -4156,76 +4202,76 @@ function Rr({ onClose: e, defaultView: t = "desktop", views: n = [
4156
4202
  let y = async () => {
4157
4203
  p && (await navigator.clipboard.writeText(d === "text" ? p.text : p.html), v(!0), setTimeout(() => v(!1), 1500));
4158
4204
  }, b = l.preview;
4159
- return Be(/* @__PURE__ */ L(M, { children: /* @__PURE__ */ L("div", {
4205
+ return Ue(/* @__PURE__ */ I(M, { children: /* @__PURE__ */ I("div", {
4160
4206
  className: "bree bree-modal-backdrop",
4161
4207
  onMouseDown: (t) => t.target === t.currentTarget && e(),
4162
- children: /* @__PURE__ */ R("div", {
4163
- className: z("bree-modal", a),
4208
+ children: /* @__PURE__ */ L("div", {
4209
+ className: R("bree-modal", a),
4164
4210
  style: o,
4165
4211
  role: "dialog",
4166
4212
  "aria-modal": "true",
4167
4213
  "aria-label": b.dialogLabel,
4168
- children: [/* @__PURE__ */ R("header", {
4214
+ children: [/* @__PURE__ */ L("header", {
4169
4215
  className: "bree-modal-header",
4170
- children: [/* @__PURE__ */ L("nav", {
4216
+ children: [/* @__PURE__ */ I("nav", {
4171
4217
  className: "bree-tabs bree-compact",
4172
4218
  role: "tablist",
4173
- children: n.map((e) => /* @__PURE__ */ L("button", {
4219
+ children: n.map((e) => /* @__PURE__ */ I("button", {
4174
4220
  type: "button",
4175
4221
  role: "tab",
4176
4222
  "aria-selected": d === e,
4177
- className: z(d === e && "bree-active"),
4223
+ className: R(d === e && "bree-active"),
4178
4224
  onClick: () => f(e),
4179
4225
  children: b[e]
4180
4226
  }, e))
4181
- }), /* @__PURE__ */ R("div", {
4227
+ }), /* @__PURE__ */ L("div", {
4182
4228
  className: "bree-modal-actions",
4183
4229
  children: [
4184
- p && (d === "html" || d === "text") && /* @__PURE__ */ L("button", {
4230
+ p && (d === "html" || d === "text") && /* @__PURE__ */ I("button", {
4185
4231
  type: "button",
4186
4232
  className: "bree-btn",
4187
4233
  onClick: y,
4188
4234
  children: _ ? b.copied : b.copy
4189
4235
  }),
4190
- p && /* @__PURE__ */ L("button", {
4236
+ p && /* @__PURE__ */ I("button", {
4191
4237
  type: "button",
4192
4238
  className: "bree-btn bree-primary",
4193
- onClick: () => Lr(r, p.unformattedHtml, "text/html"),
4239
+ onClick: () => Hr(r, p.unformattedHtml, "text/html"),
4194
4240
  children: b.download
4195
4241
  }),
4196
- /* @__PURE__ */ L("button", {
4242
+ /* @__PURE__ */ I("button", {
4197
4243
  type: "button",
4198
4244
  className: "bree-icon-button",
4199
4245
  onClick: e,
4200
4246
  title: b.close,
4201
- children: /* @__PURE__ */ L(Ae, { size: 18 })
4247
+ children: /* @__PURE__ */ I(Me, { size: 18 })
4202
4248
  })
4203
4249
  ]
4204
4250
  })]
4205
- }), /* @__PURE__ */ R("div", {
4251
+ }), /* @__PURE__ */ L("div", {
4206
4252
  className: "bree-modal-body",
4207
4253
  children: [
4208
- h && /* @__PURE__ */ L("p", {
4254
+ h && /* @__PURE__ */ I("p", {
4209
4255
  className: "bree-error",
4210
4256
  children: b.renderError(h)
4211
4257
  }),
4212
- !p && !h && /* @__PURE__ */ L("p", {
4258
+ !p && !h && /* @__PURE__ */ I("p", {
4213
4259
  className: "bree-loading",
4214
4260
  children: b.rendering
4215
4261
  }),
4216
- p && (d === "desktop" || d === "mobile") && /* @__PURE__ */ L("div", {
4217
- className: z("bree-preview-frame", `bree-preview-${d}`),
4218
- children: /* @__PURE__ */ L("iframe", {
4262
+ p && (d === "desktop" || d === "mobile") && /* @__PURE__ */ I("div", {
4263
+ className: R("bree-preview-frame", `bree-preview-${d}`),
4264
+ children: /* @__PURE__ */ I("iframe", {
4219
4265
  title: b.iframeTitle,
4220
4266
  srcDoc: p.html,
4221
4267
  sandbox: "allow-same-origin allow-popups"
4222
4268
  })
4223
4269
  }),
4224
- p && d === "html" && /* @__PURE__ */ L("pre", {
4270
+ p && d === "html" && /* @__PURE__ */ I("pre", {
4225
4271
  className: "bree-code",
4226
4272
  children: p.html
4227
4273
  }),
4228
- p && d === "text" && /* @__PURE__ */ L("pre", {
4274
+ p && d === "text" && /* @__PURE__ */ I("pre", {
4229
4275
  className: "bree-code",
4230
4276
  children: p.text
4231
4277
  })
@@ -4236,23 +4282,23 @@ function Rr({ onClose: e, defaultView: t = "desktop", views: n = [
4236
4282
  }
4237
4283
  //#endregion
4238
4284
  //#region src/components/TopBar.tsx
4239
- function zr({ className: e, style: t }) {
4285
+ function Wr({ className: e, style: t }) {
4240
4286
  let { layersOpen: n, setLayersOpen: r, t: i } = Q();
4241
- return /* @__PURE__ */ R("button", {
4287
+ return /* @__PURE__ */ L("button", {
4242
4288
  type: "button",
4243
- className: z("bree-btn bree-ghost bree-layers-toggle", n && "bree-active", e),
4289
+ className: R("bree-btn bree-ghost bree-layers-toggle", n && "bree-active", e),
4244
4290
  style: t,
4245
4291
  "aria-pressed": n,
4246
4292
  onClick: () => r(!n),
4247
4293
  title: i.topBar.toggleLayers,
4248
4294
  children: [
4249
- /* @__PURE__ */ L(Gt, {}),
4295
+ /* @__PURE__ */ I(Xt, {}),
4250
4296
  " ",
4251
4297
  i.topBar.layers
4252
4298
  ]
4253
4299
  });
4254
4300
  }
4255
- function Br({ className: e, style: t }) {
4301
+ function Gr({ className: e, style: t }) {
4256
4302
  let { editor: n, t: r } = Q(), i = g({
4257
4303
  editor: n,
4258
4304
  selector: ({ editor: e }) => ({
@@ -4260,57 +4306,57 @@ function Br({ className: e, style: t }) {
4260
4306
  redo: !!e?.can().redo()
4261
4307
  })
4262
4308
  });
4263
- return /* @__PURE__ */ R("div", {
4264
- className: z("bree-btn-group", e),
4309
+ return /* @__PURE__ */ L("div", {
4310
+ className: R("bree-btn-group", e),
4265
4311
  style: t,
4266
- children: [/* @__PURE__ */ L("button", {
4312
+ children: [/* @__PURE__ */ I("button", {
4267
4313
  type: "button",
4268
4314
  className: "bree-icon-button",
4269
4315
  title: r.topBar.undo,
4270
4316
  disabled: !i?.undo,
4271
4317
  onClick: () => n.chain().focus().undo().run(),
4272
- children: /* @__PURE__ */ L(Vt, {})
4273
- }), /* @__PURE__ */ L("button", {
4318
+ children: /* @__PURE__ */ I(Kt, {})
4319
+ }), /* @__PURE__ */ I("button", {
4274
4320
  type: "button",
4275
4321
  className: "bree-icon-button",
4276
4322
  title: r.topBar.redo,
4277
4323
  disabled: !i?.redo,
4278
4324
  onClick: () => n.chain().focus().redo().run(),
4279
- children: /* @__PURE__ */ L(Ht, {})
4325
+ children: /* @__PURE__ */ I(qt, {})
4280
4326
  })]
4281
4327
  });
4282
4328
  }
4283
- function Vr({ className: e, style: t }) {
4329
+ function Kr({ className: e, style: t }) {
4284
4330
  let { device: n, setDevice: r, t: i } = Q(), a = [{
4285
4331
  id: "desktop",
4286
4332
  label: i.topBar.desktop,
4287
- Icon: Ut
4333
+ Icon: Jt
4288
4334
  }, {
4289
4335
  id: "mobile",
4290
4336
  label: i.topBar.mobile,
4291
- Icon: Wt
4337
+ Icon: Yt
4292
4338
  }];
4293
- return /* @__PURE__ */ L("div", {
4294
- className: z("bree-segmented bree-device-toggle", e),
4339
+ return /* @__PURE__ */ I("div", {
4340
+ className: R("bree-segmented bree-device-toggle", e),
4295
4341
  style: t,
4296
4342
  role: "radiogroup",
4297
4343
  "aria-label": i.topBar.canvasWidth,
4298
- children: a.map(({ id: e, label: t, Icon: i }) => /* @__PURE__ */ L("button", {
4344
+ children: a.map(({ id: e, label: t, Icon: i }) => /* @__PURE__ */ I("button", {
4299
4345
  type: "button",
4300
4346
  role: "radio",
4301
4347
  "aria-checked": n === e,
4302
- className: z(n === e && "bree-active"),
4348
+ className: R(n === e && "bree-active"),
4303
4349
  onClick: () => r(e),
4304
4350
  title: t,
4305
- children: /* @__PURE__ */ L(i, {})
4351
+ children: /* @__PURE__ */ I(i, {})
4306
4352
  }, e))
4307
4353
  });
4308
4354
  }
4309
- function Hr({ className: e, style: t }) {
4355
+ function qr({ className: e, style: t }) {
4310
4356
  let { editor: n, starterDocument: r, locale: i, t: a } = Q();
4311
- return /* @__PURE__ */ L("button", {
4357
+ return /* @__PURE__ */ I("button", {
4312
4358
  type: "button",
4313
- className: z("bree-btn bree-ghost", e),
4359
+ className: R("bree-btn bree-ghost", e),
4314
4360
  style: t,
4315
4361
  onClick: () => {
4316
4362
  confirm(a.topBar.confirmTemplate) && n.commands.setContent(r({
@@ -4321,7 +4367,7 @@ function Hr({ className: e, style: t }) {
4321
4367
  children: a.topBar.template
4322
4368
  });
4323
4369
  }
4324
- function Ur({ className: e, style: t }) {
4370
+ function Jr({ className: e, style: t }) {
4325
4371
  let { handle: n, t: r } = Q(), i = l(null), a = async (e) => {
4326
4372
  try {
4327
4373
  n.setValue(JSON.parse(await e.text()));
@@ -4329,13 +4375,13 @@ function Ur({ className: e, style: t }) {
4329
4375
  alert(r.topBar.invalidFile(e instanceof Error ? e.message : String(e)));
4330
4376
  }
4331
4377
  };
4332
- return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("button", {
4378
+ return /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("button", {
4333
4379
  type: "button",
4334
- className: z("bree-btn bree-ghost", e),
4380
+ className: R("bree-btn bree-ghost", e),
4335
4381
  style: t,
4336
4382
  onClick: () => i.current?.click(),
4337
4383
  children: r.topBar.import
4338
- }), /* @__PURE__ */ L("input", {
4384
+ }), /* @__PURE__ */ I("input", {
4339
4385
  ref: i,
4340
4386
  type: "file",
4341
4387
  accept: "application/json,.json",
@@ -4346,76 +4392,76 @@ function Ur({ className: e, style: t }) {
4346
4392
  }
4347
4393
  })] });
4348
4394
  }
4349
- function Wr({ className: e, style: t, filename: n = "email.json" }) {
4395
+ function Yr({ className: e, style: t, filename: n = "email.json" }) {
4350
4396
  let { handle: r, t: i } = Q();
4351
- return /* @__PURE__ */ L("button", {
4397
+ return /* @__PURE__ */ I("button", {
4352
4398
  type: "button",
4353
- className: z("bree-btn bree-ghost", e),
4399
+ className: R("bree-btn bree-ghost", e),
4354
4400
  style: t,
4355
- onClick: () => Lr(n, JSON.stringify(r.getValue(), null, 2), "application/json"),
4401
+ onClick: () => Hr(n, JSON.stringify(r.getValue(), null, 2), "application/json"),
4356
4402
  children: i.topBar.exportJson
4357
4403
  });
4358
4404
  }
4359
- function Gr({ view: e = "desktop", variant: t = "default", children: n, className: r, style: i }) {
4405
+ function Xr({ view: e = "desktop", variant: t = "default", children: n, className: r, style: i }) {
4360
4406
  let { t: a } = Q(), [o, s] = u(!1);
4361
- return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("button", {
4407
+ return /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("button", {
4362
4408
  type: "button",
4363
- className: z("bree-btn", t !== "default" && `bree-${t}`, r),
4409
+ className: R("bree-btn", t !== "default" && `bree-${t}`, r),
4364
4410
  style: i,
4365
4411
  onClick: () => s(!0),
4366
4412
  children: n ?? a.topBar.preview
4367
- }), o && /* @__PURE__ */ L(Rr, {
4413
+ }), o && /* @__PURE__ */ I(Ur, {
4368
4414
  defaultView: e,
4369
4415
  onClose: () => s(!1)
4370
4416
  })] });
4371
4417
  }
4372
- function Kr(e) {
4418
+ function Zr(e) {
4373
4419
  let { t } = Q();
4374
- return /* @__PURE__ */ L(Gr, {
4420
+ return /* @__PURE__ */ I(Xr, {
4375
4421
  view: "html",
4376
4422
  variant: "primary",
4377
4423
  ...e,
4378
4424
  children: t.topBar.exportHtml
4379
4425
  });
4380
4426
  }
4381
- function qr({ brand: e, actions: t, children: n, className: r, style: i }) {
4382
- return /* @__PURE__ */ L(M, { children: /* @__PURE__ */ R("header", {
4383
- className: z("bree-topbar", r),
4427
+ function Qr({ brand: e, actions: t, children: n, className: r, style: i }) {
4428
+ return /* @__PURE__ */ I(M, { children: /* @__PURE__ */ L("header", {
4429
+ className: R("bree-topbar", r),
4384
4430
  style: i,
4385
- children: [/* @__PURE__ */ L("div", {
4431
+ children: [/* @__PURE__ */ I("div", {
4386
4432
  className: "bree-topbar-start",
4387
4433
  children: e
4388
- }), n ?? /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L("div", {
4434
+ }), n ?? /* @__PURE__ */ L(Pe, { children: [/* @__PURE__ */ I("div", {
4389
4435
  className: "bree-topbar-center",
4390
- children: /* @__PURE__ */ L(Vr, {})
4391
- }), /* @__PURE__ */ R("div", {
4436
+ children: /* @__PURE__ */ I(Kr, {})
4437
+ }), /* @__PURE__ */ L("div", {
4392
4438
  className: "bree-topbar-actions",
4393
- children: [t, /* @__PURE__ */ L(Kr, {})]
4439
+ children: [t, /* @__PURE__ */ I(Zr, {})]
4394
4440
  })] })]
4395
4441
  }) });
4396
4442
  }
4397
4443
  //#endregion
4398
4444
  //#region src/components/BetterEmailEditor.tsx
4399
- function Jr({ showTopBar: e = !0, showLayers: t = !0, showSidebar: n = !0, showEmailHeader: r = !1, components: i = {}, slotProps: a = {} }) {
4400
- let { layersOpen: o } = Q(), { TopBar: s = qr, LayersPanel: c = br, Canvas: l = mr, Sidebar: u = Ir } = i, d = t && o;
4401
- return /* @__PURE__ */ R("div", {
4402
- className: z("bree-layout", e && "bree-with-topbar", d && "bree-with-layers", n && "bree-with-sidebar"),
4445
+ function $r({ showTopBar: e = !0, showLayers: t = !0, showSidebar: n = !0, showEmailHeader: r = !1, components: i = {}, slotProps: a = {} }) {
4446
+ let { layersOpen: o } = Q(), { TopBar: s = Qr, LayersPanel: c = Tr, Canvas: l = yr, Sidebar: u = Vr } = i, d = t && o;
4447
+ return /* @__PURE__ */ L("div", {
4448
+ className: R("bree-layout", e && "bree-with-topbar", d && "bree-with-layers", n && "bree-with-sidebar"),
4403
4449
  children: [
4404
- e && /* @__PURE__ */ L(s, { ...a.topBar }),
4405
- d && /* @__PURE__ */ L(c, { ...a.layersPanel }),
4406
- /* @__PURE__ */ L(l, {
4450
+ e && /* @__PURE__ */ I(s, { ...a.topBar }),
4451
+ d && /* @__PURE__ */ I(c, { ...a.layersPanel }),
4452
+ /* @__PURE__ */ I(l, {
4407
4453
  header: r,
4408
4454
  ...a.canvas
4409
4455
  }),
4410
- n && /* @__PURE__ */ L(u, { ...a.sidebar })
4456
+ n && /* @__PURE__ */ I(u, { ...a.sidebar })
4411
4457
  ]
4412
4458
  });
4413
4459
  }
4414
- var Yr = t(function({ showTopBar: e, showLayers: t, showSidebar: n, showEmailHeader: r, components: i, slotProps: a, ...o }, s) {
4415
- return /* @__PURE__ */ L(ar, {
4460
+ var ei = t(function({ showTopBar: e, showLayers: t, showSidebar: n, showEmailHeader: r, components: i, slotProps: a, ...o }, s) {
4461
+ return /* @__PURE__ */ I(ur, {
4416
4462
  ref: s,
4417
4463
  ...o,
4418
- children: /* @__PURE__ */ L(Jr, {
4464
+ children: /* @__PURE__ */ I($r, {
4419
4465
  showTopBar: e,
4420
4466
  showLayers: t,
4421
4467
  showSidebar: n,
@@ -4426,6 +4472,6 @@ var Yr = t(function({ showTopBar: e, showLayers: t, showSidebar: n, showEmailHea
4426
4472
  });
4427
4473
  });
4428
4474
  //#endregion
4429
- export { sn as AlignInput, Ue as BLOCK_CONTAINERS, Yr as BetterEmailEditor, wr as BlockProperties, Dr as BlocksTab, jr as BodyTab, un as BoxGroup, dn as ButtonInspector, We as COLUMN_PARENTS, mr as Canvas, ur as CanvasOverlay, G as ColorInput, fn as ColumnsInspector, vn as ContainerInspector, Pr as ContentPanel, Nr as ContentTab, tn as DEFAULT_SWATCHES, xr as DefaultInspector, Vr as DeviceToggle, _n as DividerInspector, ar as EditorRoot, dt as EmailButton, fr as EmailHeader, Kr as ExportHtmlButton, Wr as ExportJsonButton, H as Field, an as FontInput, V as Group, pn as HeadingInspector, Dn as HtmlBlock, gn as HtmlInspector, mn as ImageInspector, Ur as ImportButton, br as LayersPanel, zr as LayersToggle, W as NumberInput, cn as PaddingInput, Mr as PaletteTile, Gr as PreviewButton, Rr as PreviewDialog, Cr as PropertiesPanel, en as RangeInput, Sn as SOCIAL_NETWORKS, on as Segmented, rn as Select, Ir as Sidebar, En as SocialLinks, On as SocialLinksInspector, xn as Spacer, hn as SpacerInspector, q as SpacingGroup, Hr as TemplateButton, Er as TemplateCard, Z as TemplateThumbnail, Qt as TextArea, U as TextInput, Fr as TextProperties, qr as TopBar, ln as TypographyGroup, Br as UndoRedo, ut as appendBlocks, tt as applyDrop, Nn as content, Yn as createStarterDocument, K as css, z as cx, wt as defaultFonts, Mn as defaultNodes, Kn as defaultPalette, Gn as defaultPaletteGroups, qn as defaultTemplates, $n as defaultTheme, lt as deleteUnit, Lr as download, ct as duplicateUnit, kt as en, Xe as findDropTarget, Et as findFont, At as fr, wn as iconUrl, It as icons, yn as inlineStyleToObject, jt as locales, Wn as menuParagraph, at as parentUnit, er as readFileAsDataUrl, Mt as resolveLabel, Ft as resolveMessages, st as selectUnit, ot as selectedUnit, An as textPreview, nn as toHex, kn as truncate, rt as unitAt, Sr as useDeselect, Tr as useDraggableBlock, Q as useEmailEditor, Qn as useI18n, $ as useMessages, Zn as useOptionalEmailEditor };
4475
+ export { fn as AlignInput, Ke as BLOCK_CONTAINERS, ei as BetterEmailEditor, kr as BlockProperties, Mr as BlocksTab, Ir as BodyTab, hn as BoxGroup, gn as ButtonInspector, qe as COLUMN_PARENTS, yr as Canvas, hr as CanvasOverlay, G as ColorInput, _n as ColumnsInspector, Cn as ContainerInspector, zr as ContentPanel, Rr as ContentTab, sn as DEFAULT_SWATCHES, Er as DefaultInspector, Kr as DeviceToggle, Sn as DividerInspector, ur as EditorRoot, pt as EmailButton, _r as EmailHeader, Zr as ExportHtmlButton, Yr as ExportJsonButton, H as Field, un as FontInput, V as Group, vn as HeadingInspector, Mn as HtmlBlock, xn as HtmlInspector, yn as ImageInspector, Jr as ImportButton, Tr as LayersPanel, Wr as LayersToggle, W as NumberInput, pn as PaddingInput, Lr as PaletteTile, Xr as PreviewButton, Ur as PreviewDialog, Or as PropertiesPanel, on as RangeInput, Dn as SOCIAL_NETWORKS, dn as Segmented, ln as Select, Vr as Sidebar, jn as SocialLinks, Nn as SocialLinksInspector, En as Spacer, bn as SpacerInspector, q as SpacingGroup, qr as TemplateButton, jr as TemplateCard, Z as TemplateThumbnail, rn as TextArea, U as TextInput, Br as TextProperties, Qr as TopBar, mn as TypographyGroup, Gr as UndoRedo, ft as appendBlocks, it as applyDrop, Rn as content, er as createStarterDocument, K as css, R as cx, Dt as defaultFonts, Ln as defaultNodes, Zn as defaultPalette, Xn as defaultPaletteGroups, Qn as defaultTemplates, ir as defaultTheme, dt as deleteUnit, Hr as download, ut as duplicateUnit, Pt as en, $e as findDropTarget, kt as findFont, Ft as fr, kn as iconUrl, Vt as icons, wn as inlineStyleToObject, jt as linkWebFonts, It as locales, Yn as menuParagraph, st as parentUnit, ar as readFileAsDataUrl, Lt as resolveLabel, Bt as resolveMessages, lt as selectUnit, ct as selectedUnit, Fn as textPreview, cn as toHex, Pn as truncate, z as unitAt, Dr as useDeselect, Ar as useDraggableBlock, Q as useEmailEditor, rr as useI18n, $ as useMessages, nr as useOptionalEmailEditor, At as usedWebFonts };
4430
4476
 
4431
4477
  //# sourceMappingURL=index.js.map