better-react-email-editor 0.1.1 → 0.1.3

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