better-react-email-editor 0.1.6 → 0.1.8

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