@lit-pigeon/editor 0.3.3 → 0.3.4

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
@@ -1,13 +1,12 @@
1
- import { css as b, LitElement as g, html as l, nothing as te } from "lit";
2
- import { property as p, state as d, customElement as u } from "lit/decorators.js";
3
- import { t as s, c as Bt, r as po } from "./templates.js";
4
- import { P as Kr } from "./templates.js";
5
- import { getAllBlockDefinitions as co, getBlockDefinition as yt, updateBlock as ct, createBlock as Ve, insertBlock as ce, createColumn as Ie, insertRow as oe, createRow as Te, cloneRowWithNewIds as jt, createBodySelection as Mt, deleteBlock as ho, deleteRow as Rt, duplicateBlock as go, duplicateRow as Lt, generateId as zt, EditorState as Ht, createHistoryPlugin as Ft, undo as uo, redo as bo, InMemoryTemplateStorage as vo, InMemoryRowLibraryStorage as fo, SYSTEM_LINK_TYPES as mo, createDocStep as dt, createDefaultDocument as _o, HISTORY_PLUGIN_NAME as Nt, canUndo as yo, canRedo as xo, createBlockSelection as ht, createRowSelection as Ut, createColumnSelection as $o, moveRow as wo, moveBlock as ko, updateRowAttributes as Co, addColumn as Io, removeColumn as To, resizeColumns as Po } from "@lit-pigeon/core";
6
- import { unsafeHTML as eo } from "lit/directives/unsafe-html.js";
7
- import { l as xt, r as So } from "./rich-text-bridge.js";
8
- import { styleMap as Oo } from "lit/directives/style-map.js";
9
- import "./rich-text.js";
10
- const Kt = b`
1
+ import { css as g, LitElement as d, html as l, nothing as J } from "lit";
2
+ import { property as p, state as c, customElement as h } from "lit/decorators.js";
3
+ import { t as s, l as Ge, r as Pt, c as ct, a as Tt } from "./rich-text-bridge.js";
4
+ import { getAllBlockDefinitions as St, getBlockDefinition as Je, updateBlock as Ke, createBlock as Ee, insertBlock as oe, createColumn as fe, insertRow as G, createRow as me, cloneRowWithNewIds as dt, createBodySelection as ht, deleteBlock as Ot, deleteRow as gt, duplicateBlock as Et, duplicateRow as ut, generateId as bt, EditorState as vt, createHistoryPlugin as ft, undo as Dt, redo as Bt, InMemoryTemplateStorage as jt, InMemoryRowLibraryStorage as Rt, SYSTEM_LINK_TYPES as Lt, createDocStep as Ne, createDefaultDocument as zt, HISTORY_PLUGIN_NAME as mt, canUndo as Mt, canRedo as At, createBlockSelection as We, createRowSelection as _t, createColumnSelection as Ft, moveRow as Ht, moveBlock as Ut, updateRowAttributes as Kt, addColumn as Nt, removeColumn as Wt, resizeColumns as qt } from "@lit-pigeon/core";
5
+ import { unsafeHTML as $t } from "lit/directives/unsafe-html.js";
6
+ import { createRef as ie, ref as re } from "lit/directives/ref.js";
7
+ import { styleMap as Yt } from "lit/directives/style-map.js";
8
+ import { PigeonTemplatePicker as Ni } from "./templates.js";
9
+ const yt = g`
11
10
  /* base palette */
12
11
  --pigeon-bg: #0f172a; /* slate-900 */
13
12
  --pigeon-surface: #1e293b; /* slate-800 */
@@ -43,7 +42,7 @@ const Kt = b`
43
42
  0 2px 4px -2px rgb(0 0 0 / 0.4);
44
43
  --pigeon-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
45
44
  0 4px 6px -4px rgb(0 0 0 / 0.5);
46
- `, Eo = b`
45
+ `, Vt = g`
47
46
  :host {
48
47
  /* base palette */
49
48
  --pigeon-bg: #ffffff;
@@ -104,21 +103,21 @@ const Kt = b`
104
103
  }
105
104
 
106
105
  :host(.pigeon-dark) {
107
- ${Kt}
106
+ ${yt}
108
107
  }
109
108
 
110
109
  @media (prefers-color-scheme: dark) {
111
110
  :host(.pigeon-auto) {
112
- ${Kt}
111
+ ${yt}
113
112
  }
114
113
  }
115
114
  `;
116
- var Do = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, xe = (e, t, o, r) => {
117
- for (var i = r > 1 ? void 0 : r ? Ao(t, o) : t, n = e.length - 1, a; n >= 0; n--)
115
+ var Xt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, he = (e, t, o, r) => {
116
+ for (var i = r > 1 ? void 0 : r ? Jt(t, o) : t, n = e.length - 1, a; n >= 0; n--)
118
117
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
119
- return r && i && Do(t, o, i), i;
118
+ return r && i && Xt(t, o, i), i;
120
119
  };
121
- let V = class extends g {
120
+ let H = class extends d {
122
121
  constructor() {
123
122
  super(...arguments), this.canUndo = !1, this.canRedo = !1, this.device = "desktop", this.fullscreen = !1, this._exportMenuOpen = !1;
124
123
  }
@@ -343,7 +342,7 @@ let V = class extends g {
343
342
  }));
344
343
  }
345
344
  };
346
- V.styles = b`
345
+ H.styles = g`
347
346
  :host {
348
347
  display: flex;
349
348
  align-items: center;
@@ -473,52 +472,52 @@ V.styles = b`
473
472
  font-weight: 400;
474
473
  }
475
474
  `;
476
- xe([
475
+ he([
477
476
  p({ type: Boolean, attribute: "can-undo" })
478
- ], V.prototype, "canUndo", 2);
479
- xe([
477
+ ], H.prototype, "canUndo", 2);
478
+ he([
480
479
  p({ type: Boolean, attribute: "can-redo" })
481
- ], V.prototype, "canRedo", 2);
482
- xe([
480
+ ], H.prototype, "canRedo", 2);
481
+ he([
483
482
  p({ type: String })
484
- ], V.prototype, "device", 2);
485
- xe([
483
+ ], H.prototype, "device", 2);
484
+ he([
486
485
  p({ type: Boolean })
487
- ], V.prototype, "fullscreen", 2);
488
- xe([
489
- d()
490
- ], V.prototype, "_exportMenuOpen", 2);
491
- V = xe([
492
- u("pigeon-toolbar")
493
- ], V);
494
- let $t = null;
495
- function Bo(e) {
496
- $t = e;
486
+ ], H.prototype, "fullscreen", 2);
487
+ he([
488
+ c()
489
+ ], H.prototype, "_exportMenuOpen", 2);
490
+ H = he([
491
+ h("pigeon-toolbar")
492
+ ], H);
493
+ let Ze = null;
494
+ function Gt(e) {
495
+ Ze = e;
497
496
  }
498
- function Ee() {
499
- return $t;
497
+ function _e() {
498
+ return Ze;
500
499
  }
501
- function Xe() {
502
- $t = null;
500
+ function Be() {
501
+ Ze = null;
503
502
  }
504
- function wt(e, t) {
505
- e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), Bo(t);
503
+ function Qe(e, t) {
504
+ e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), Gt(t);
506
505
  }
507
- function Fr(e) {
506
+ function Hi(e) {
508
507
  if (e.dataTransfer)
509
508
  try {
510
509
  const t = e.dataTransfer.getData("application/json");
511
510
  if (t) return JSON.parse(t);
512
511
  } catch {
513
512
  }
514
- return Ee();
513
+ return _e();
515
514
  }
516
- var jo = Object.defineProperty, Mo = Object.getOwnPropertyDescriptor, $e = (e, t, o, r) => {
517
- for (var i = r > 1 ? void 0 : r ? Mo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
515
+ var Zt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, ge = (e, t, o, r) => {
516
+ for (var i = r > 1 ? void 0 : r ? Qt(t, o) : t, n = e.length - 1, a; n >= 0; n--)
518
517
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
519
- return r && i && jo(t, o, i), i;
518
+ return r && i && Zt(t, o, i), i;
520
519
  };
521
- const Ro = {
520
+ const eo = {
522
521
  text: "T",
523
522
  image: "[]",
524
523
  button: "[B]",
@@ -527,12 +526,12 @@ const Ro = {
527
526
  social: "@",
528
527
  html: "</>"
529
528
  };
530
- let Y = class extends g {
529
+ let U = class extends d {
531
530
  constructor() {
532
531
  super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1, this._didDrag = !1;
533
532
  }
534
533
  render() {
535
- const e = Ro[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
534
+ const e = eo[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
536
535
  return l`
537
536
  <div
538
537
  class="item"
@@ -575,7 +574,7 @@ let Y = class extends g {
575
574
  );
576
575
  }
577
576
  _onDragStart(e) {
578
- this._didDrag = !0, wt(e, {
577
+ this._didDrag = !0, Qe(e, {
579
578
  type: this.dragType,
580
579
  blockType: this.blockType || void 0,
581
580
  columnCount: this.columnCount
@@ -600,7 +599,7 @@ let Y = class extends g {
600
599
  }));
601
600
  }
602
601
  };
603
- Y.styles = b`
602
+ U.styles = g`
604
603
  :host {
605
604
  display: block;
606
605
  }
@@ -658,30 +657,30 @@ Y.styles = b`
658
657
  color: var(--pigeon-text, #1e293b);
659
658
  }
660
659
  `;
661
- $e([
660
+ ge([
662
661
  p({ type: String })
663
- ], Y.prototype, "label", 2);
664
- $e([
662
+ ], U.prototype, "label", 2);
663
+ ge([
665
664
  p({ type: String })
666
- ], Y.prototype, "icon", 2);
667
- $e([
665
+ ], U.prototype, "icon", 2);
666
+ ge([
668
667
  p({ type: String, attribute: "drag-type" })
669
- ], Y.prototype, "dragType", 2);
670
- $e([
668
+ ], U.prototype, "dragType", 2);
669
+ ge([
671
670
  p({ type: String, attribute: "block-type" })
672
- ], Y.prototype, "blockType", 2);
673
- $e([
671
+ ], U.prototype, "blockType", 2);
672
+ ge([
674
673
  p({ type: Number, attribute: "column-count" })
675
- ], Y.prototype, "columnCount", 2);
676
- Y = $e([
677
- u("pigeon-palette-item")
678
- ], Y);
679
- var Lo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, kt = (e, t, o, r) => {
680
- for (var i = r > 1 ? void 0 : r ? zo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
674
+ ], U.prototype, "columnCount", 2);
675
+ U = ge([
676
+ h("pigeon-palette-item")
677
+ ], U);
678
+ var to = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, et = (e, t, o, r) => {
679
+ for (var i = r > 1 ? void 0 : r ? oo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
681
680
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
682
- return r && i && Lo(t, o, i), i;
681
+ return r && i && to(t, o, i), i;
683
682
  };
684
- const Ho = {
683
+ const io = {
685
684
  text: "T",
686
685
  image: "Img",
687
686
  button: "Btn",
@@ -692,7 +691,7 @@ const Ho = {
692
691
  hero: "H",
693
692
  navbar: "Nav"
694
693
  };
695
- let De = class extends g {
694
+ let ye = class extends d {
696
695
  constructor() {
697
696
  super(...arguments), this.selection = null;
698
697
  }
@@ -725,7 +724,7 @@ let De = class extends g {
725
724
  }
726
725
  _renderBlock(e, t, o) {
727
726
  var a;
728
- const r = ((a = this.selection) == null ? void 0 : a.type) === "block" && this.selection.blockId === e.id, i = Ho[e.type] ?? "?", n = e.type.charAt(0).toUpperCase() + e.type.slice(1);
727
+ const r = ((a = this.selection) == null ? void 0 : a.type) === "block" && this.selection.blockId === e.id, i = io[e.type] ?? "?", n = e.type.charAt(0).toUpperCase() + e.type.slice(1);
729
728
  return l`
730
729
  <div
731
730
  class="tree-item indent-3 ${r ? "selected" : ""}"
@@ -751,7 +750,7 @@ let De = class extends g {
751
750
  }));
752
751
  }
753
752
  };
754
- De.styles = b`
753
+ ye.styles = g`
755
754
  :host {
756
755
  display: block;
757
756
  font-family: var(--pigeon-font);
@@ -815,44 +814,44 @@ De.styles = b`
815
814
  padding: 8px 8px 4px;
816
815
  }
817
816
  `;
818
- kt([
817
+ et([
819
818
  p({ type: Object })
820
- ], De.prototype, "doc", 2);
821
- kt([
819
+ ], ye.prototype, "doc", 2);
820
+ et([
822
821
  p({ type: Object })
823
- ], De.prototype, "selection", 2);
824
- De = kt([
825
- u("pigeon-layers")
826
- ], De);
827
- var Fo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, H = (e, t, o, r) => {
828
- for (var i = r > 1 ? void 0 : r ? No(t, o) : t, n = e.length - 1, a; n >= 0; n--)
822
+ ], ye.prototype, "selection", 2);
823
+ ye = et([
824
+ h("pigeon-layers")
825
+ ], ye);
826
+ var ro = Object.defineProperty, no = Object.getOwnPropertyDescriptor, L = (e, t, o, r) => {
827
+ for (var i = r > 1 ? void 0 : r ? no(t, o) : t, n = e.length - 1, a; n >= 0; n--)
829
828
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
830
- return r && i && Fo(t, o, i), i;
829
+ return r && i && ro(t, o, i), i;
831
830
  };
832
- let gt = null;
833
- function Uo() {
834
- return gt || (gt = import("./pigeon-brand-tab.js")), gt;
831
+ let qe = null;
832
+ function ao() {
833
+ return qe || (qe = import("./pigeon-brand-tab.js")), qe;
835
834
  }
836
- let ut = null;
837
- function Ko() {
838
- return ut || (ut = import("./pigeon-saved-tab.js")), ut;
835
+ let Ye = null;
836
+ function so() {
837
+ return Ye || (Ye = import("./pigeon-saved-tab.js")), Ye;
839
838
  }
840
- const Wo = [
839
+ const lo = [
841
840
  { labelKey: "palette.layout.1-col", columns: 1, icon: "[=]" },
842
841
  { labelKey: "palette.layout.2-col", columns: 2, icon: "[||]" },
843
842
  { labelKey: "palette.layout.3-col", columns: 3, icon: "[|||]" },
844
843
  { labelKey: "palette.layout.4-col", columns: 4, icon: "[||||]" }
845
844
  ];
846
- let T = class extends g {
845
+ let k = class extends d {
847
846
  constructor() {
848
847
  super(...arguments), this.selection = null, this.brandKit = null, this.rowLibrary = null, this._blockDefs = [], this._activeTab = "content", this._brandTabLoaded = !1, this._savedTabLoaded = !1, this._handleBrandTabClick = async () => {
849
- this._activeTab = "brand", this._brandTabLoaded || (await Uo(), this._brandTabLoaded = !0);
848
+ this._activeTab = "brand", this._brandTabLoaded || (await ao(), this._brandTabLoaded = !0);
850
849
  }, this._handleSavedTabClick = async () => {
851
- this._activeTab = "saved", this._savedTabLoaded || (await Ko(), this._savedTabLoaded = !0);
850
+ this._activeTab = "saved", this._savedTabLoaded || (await so(), this._savedTabLoaded = !0);
852
851
  };
853
852
  }
854
853
  connectedCallback() {
855
- super.connectedCallback(), this._blockDefs = co();
854
+ super.connectedCallback(), this._blockDefs = St();
856
855
  }
857
856
  updated(e) {
858
857
  e.has("brandKit") && !this.brandKit && this._activeTab === "brand" && (this._activeTab = "content");
@@ -926,7 +925,7 @@ let T = class extends g {
926
925
  <div class="section">
927
926
  <div class="section-header">${s("palette.layout.section-layout")}</div>
928
927
  <div class="items">
929
- ${Wo.map((e) => l`
928
+ ${lo.map((e) => l`
930
929
  <pigeon-palette-item part="palette-item"
931
930
  label="${s(e.labelKey)}"
932
931
  icon="${e.icon}"
@@ -953,7 +952,7 @@ let T = class extends g {
953
952
  return this._savedTabLoaded ? l`<pigeon-saved-tab .storage=${this.rowLibrary}></pigeon-saved-tab>` : l``;
954
953
  }
955
954
  };
956
- T.styles = b`
955
+ k.styles = g`
957
956
  :host {
958
957
  display: block;
959
958
  width: var(--pigeon-palette-width, 240px);
@@ -1032,34 +1031,34 @@ T.styles = b`
1032
1031
  gap: 6px;
1033
1032
  }
1034
1033
  `;
1035
- H([
1034
+ L([
1036
1035
  p({ type: Object })
1037
- ], T.prototype, "doc", 2);
1038
- H([
1036
+ ], k.prototype, "doc", 2);
1037
+ L([
1039
1038
  p({ type: Object })
1040
- ], T.prototype, "selection", 2);
1041
- H([
1039
+ ], k.prototype, "selection", 2);
1040
+ L([
1042
1041
  p({ attribute: !1 })
1043
- ], T.prototype, "brandKit", 2);
1044
- H([
1042
+ ], k.prototype, "brandKit", 2);
1043
+ L([
1045
1044
  p({ attribute: !1 })
1046
- ], T.prototype, "rowLibrary", 2);
1047
- H([
1048
- d()
1049
- ], T.prototype, "_blockDefs", 2);
1050
- H([
1051
- d()
1052
- ], T.prototype, "_activeTab", 2);
1053
- H([
1054
- d()
1055
- ], T.prototype, "_brandTabLoaded", 2);
1056
- H([
1057
- d()
1058
- ], T.prototype, "_savedTabLoaded", 2);
1059
- T = H([
1060
- u("pigeon-palette")
1061
- ], T);
1062
- function qo(e, t) {
1045
+ ], k.prototype, "rowLibrary", 2);
1046
+ L([
1047
+ c()
1048
+ ], k.prototype, "_blockDefs", 2);
1049
+ L([
1050
+ c()
1051
+ ], k.prototype, "_activeTab", 2);
1052
+ L([
1053
+ c()
1054
+ ], k.prototype, "_brandTabLoaded", 2);
1055
+ L([
1056
+ c()
1057
+ ], k.prototype, "_savedTabLoaded", 2);
1058
+ k = L([
1059
+ h("pigeon-palette")
1060
+ ], k);
1061
+ function po(e, t) {
1063
1062
  if (t.length === 0) return 0;
1064
1063
  for (let o = 0; o < t.length; o++) {
1065
1064
  const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
@@ -1068,7 +1067,7 @@ function qo(e, t) {
1068
1067
  }
1069
1068
  return t.length;
1070
1069
  }
1071
- function Vo(e, t) {
1070
+ function co(e, t) {
1072
1071
  if (t.length === 0) return 0;
1073
1072
  for (let o = 0; o < t.length; o++) {
1074
1073
  const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
@@ -1077,15 +1076,15 @@ function Vo(e, t) {
1077
1076
  }
1078
1077
  return t.length;
1079
1078
  }
1080
- function to(e, t) {
1079
+ function kt(e, t) {
1081
1080
  return e < 0 || t === e || t === e + 1 ? null : t > e ? t - 1 : t;
1082
1081
  }
1083
- var Yo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, oo = (e, t, o, r) => {
1084
- for (var i = r > 1 ? void 0 : r ? Xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1082
+ var ho = Object.defineProperty, go = Object.getOwnPropertyDescriptor, Ct = (e, t, o, r) => {
1083
+ for (var i = r > 1 ? void 0 : r ? go(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1085
1084
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1086
- return r && i && Yo(t, o, i), i;
1085
+ return r && i && ho(t, o, i), i;
1087
1086
  };
1088
- let Ge = class extends g {
1087
+ let je = class extends d {
1089
1088
  constructor() {
1090
1089
  super(...arguments), this.visible = !1;
1091
1090
  }
@@ -1098,7 +1097,7 @@ let Ge = class extends g {
1098
1097
  `;
1099
1098
  }
1100
1099
  };
1101
- Ge.styles = b`
1100
+ je.styles = g`
1102
1101
  :host {
1103
1102
  display: block;
1104
1103
  height: 4px;
@@ -1142,18 +1141,18 @@ Ge.styles = b`
1142
1141
  right: 4px;
1143
1142
  }
1144
1143
  `;
1145
- oo([
1144
+ Ct([
1146
1145
  p({ type: Boolean, reflect: !0 })
1147
- ], Ge.prototype, "visible", 2);
1148
- Ge = oo([
1149
- u("pigeon-drop-indicator")
1150
- ], Ge);
1151
- var Go = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, tt = (e, t, o, r) => {
1152
- for (var i = r > 1 ? void 0 : r ? Jo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1146
+ ], je.prototype, "visible", 2);
1147
+ je = Ct([
1148
+ h("pigeon-drop-indicator")
1149
+ ], je);
1150
+ var uo = Object.defineProperty, bo = Object.getOwnPropertyDescriptor, Le = (e, t, o, r) => {
1151
+ for (var i = r > 1 ? void 0 : r ? bo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1153
1152
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1154
- return r && i && Go(t, o, i), i;
1153
+ return r && i && uo(t, o, i), i;
1155
1154
  };
1156
- let de = class extends g {
1155
+ let ne = class extends d {
1157
1156
  constructor() {
1158
1157
  super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
1159
1158
  }
@@ -1181,7 +1180,7 @@ let de = class extends g {
1181
1180
  const e = this.renderRoot.querySelector(".content");
1182
1181
  if (!e) return;
1183
1182
  this._editorHost = e;
1184
- const t = await xt();
1183
+ const t = await Ge();
1185
1184
  !this.editing || !this._editorHost || (this._editor = t.createEditor({
1186
1185
  element: this._editorHost,
1187
1186
  initialHTML: this.block.values.content,
@@ -1221,7 +1220,7 @@ let de = class extends g {
1221
1220
  }));
1222
1221
  }
1223
1222
  };
1224
- de.styles = b`
1223
+ ne.styles = g`
1225
1224
  :host {
1226
1225
  display: block;
1227
1226
  cursor: pointer;
@@ -1261,24 +1260,24 @@ de.styles = b`
1261
1260
  outline: none;
1262
1261
  }
1263
1262
  `;
1264
- tt([
1263
+ Le([
1265
1264
  p({ type: Object })
1266
- ], de.prototype, "block", 2);
1267
- tt([
1265
+ ], ne.prototype, "block", 2);
1266
+ Le([
1268
1267
  p({ type: Boolean, reflect: !0 })
1269
- ], de.prototype, "selected", 2);
1270
- tt([
1268
+ ], ne.prototype, "selected", 2);
1269
+ Le([
1271
1270
  p({ type: Boolean, reflect: !0 })
1272
- ], de.prototype, "editing", 2);
1273
- de = tt([
1274
- u("pigeon-text-block")
1275
- ], de);
1276
- var Zo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, Ct = (e, t, o, r) => {
1277
- for (var i = r > 1 ? void 0 : r ? Qo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1271
+ ], ne.prototype, "editing", 2);
1272
+ ne = Le([
1273
+ h("pigeon-text-block")
1274
+ ], ne);
1275
+ var vo = Object.defineProperty, fo = Object.getOwnPropertyDescriptor, tt = (e, t, o, r) => {
1276
+ for (var i = r > 1 ? void 0 : r ? fo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1278
1277
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1279
- return r && i && Zo(t, o, i), i;
1278
+ return r && i && vo(t, o, i), i;
1280
1279
  };
1281
- let Ae = class extends g {
1280
+ let xe = class extends d {
1282
1281
  constructor() {
1283
1282
  super(...arguments), this.selected = !1;
1284
1283
  }
@@ -1316,7 +1315,7 @@ let Ae = class extends g {
1316
1315
  }));
1317
1316
  }
1318
1317
  };
1319
- Ae.styles = b`
1318
+ xe.styles = g`
1320
1319
  :host {
1321
1320
  display: block;
1322
1321
  cursor: pointer;
@@ -1364,21 +1363,21 @@ Ae.styles = b`
1364
1363
  opacity: 0.5;
1365
1364
  }
1366
1365
  `;
1367
- Ct([
1366
+ tt([
1368
1367
  p({ type: Object })
1369
- ], Ae.prototype, "block", 2);
1370
- Ct([
1368
+ ], xe.prototype, "block", 2);
1369
+ tt([
1371
1370
  p({ type: Boolean, reflect: !0 })
1372
- ], Ae.prototype, "selected", 2);
1373
- Ae = Ct([
1374
- u("pigeon-image-block")
1375
- ], Ae);
1376
- var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ot = (e, t, o, r) => {
1377
- for (var i = r > 1 ? void 0 : r ? ti(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1371
+ ], xe.prototype, "selected", 2);
1372
+ xe = tt([
1373
+ h("pigeon-image-block")
1374
+ ], xe);
1375
+ var mo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, ze = (e, t, o, r) => {
1376
+ for (var i = r > 1 ? void 0 : r ? _o(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1378
1377
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1379
- return r && i && ei(t, o, i), i;
1378
+ return r && i && mo(t, o, i), i;
1380
1379
  };
1381
- let he = class extends g {
1380
+ let ae = class extends d {
1382
1381
  constructor() {
1383
1382
  super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
1384
1383
  }
@@ -1404,7 +1403,7 @@ let he = class extends g {
1404
1403
  href="${e.href}"
1405
1404
  style="${i}"
1406
1405
  @click=${this._preventNav}
1407
- >${this.editing ? l`` : eo(n)}</a>
1406
+ >${this.editing ? l`` : $t(n)}</a>
1408
1407
  </div>
1409
1408
  `;
1410
1409
  }
@@ -1418,7 +1417,7 @@ let he = class extends g {
1418
1417
  const e = this.renderRoot.querySelector(".button");
1419
1418
  if (!e) return;
1420
1419
  this._editorHost = e;
1421
- const t = await xt();
1420
+ const t = await Ge();
1422
1421
  !this.editing || !this._editorHost || (this._editor = t.createEditor({
1423
1422
  element: this._editorHost,
1424
1423
  initialHTML: this.block.values.content,
@@ -1465,7 +1464,7 @@ let he = class extends g {
1465
1464
  }));
1466
1465
  }
1467
1466
  };
1468
- he.styles = b`
1467
+ ae.styles = g`
1469
1468
  :host {
1470
1469
  display: block;
1471
1470
  cursor: pointer;
@@ -1516,24 +1515,24 @@ he.styles = b`
1516
1515
  display: inline;
1517
1516
  }
1518
1517
  `;
1519
- ot([
1518
+ ze([
1520
1519
  p({ type: Object })
1521
- ], he.prototype, "block", 2);
1522
- ot([
1520
+ ], ae.prototype, "block", 2);
1521
+ ze([
1523
1522
  p({ type: Boolean, reflect: !0 })
1524
- ], he.prototype, "selected", 2);
1525
- ot([
1523
+ ], ae.prototype, "selected", 2);
1524
+ ze([
1526
1525
  p({ type: Boolean, reflect: !0 })
1527
- ], he.prototype, "editing", 2);
1528
- he = ot([
1529
- u("pigeon-button-block")
1530
- ], he);
1531
- var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, It = (e, t, o, r) => {
1532
- for (var i = r > 1 ? void 0 : r ? ii(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1526
+ ], ae.prototype, "editing", 2);
1527
+ ae = ze([
1528
+ h("pigeon-button-block")
1529
+ ], ae);
1530
+ var yo = Object.defineProperty, xo = Object.getOwnPropertyDescriptor, ot = (e, t, o, r) => {
1531
+ for (var i = r > 1 ? void 0 : r ? xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1533
1532
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1534
- return r && i && oi(t, o, i), i;
1533
+ return r && i && yo(t, o, i), i;
1535
1534
  };
1536
- let Be = class extends g {
1535
+ let we = class extends d {
1537
1536
  constructor() {
1538
1537
  super(...arguments), this.selected = !1;
1539
1538
  }
@@ -1561,7 +1560,7 @@ let Be = class extends g {
1561
1560
  }));
1562
1561
  }
1563
1562
  };
1564
- Be.styles = b`
1563
+ we.styles = g`
1565
1564
  :host {
1566
1565
  display: block;
1567
1566
  cursor: pointer;
@@ -1588,21 +1587,21 @@ Be.styles = b`
1588
1587
  margin: 0;
1589
1588
  }
1590
1589
  `;
1591
- It([
1590
+ ot([
1592
1591
  p({ type: Object })
1593
- ], Be.prototype, "block", 2);
1594
- It([
1592
+ ], we.prototype, "block", 2);
1593
+ ot([
1595
1594
  p({ type: Boolean, reflect: !0 })
1596
- ], Be.prototype, "selected", 2);
1597
- Be = It([
1598
- u("pigeon-divider-block")
1599
- ], Be);
1600
- var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
1601
- for (var i = r > 1 ? void 0 : r ? ni(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1595
+ ], we.prototype, "selected", 2);
1596
+ we = ot([
1597
+ h("pigeon-divider-block")
1598
+ ], we);
1599
+ var wo = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, it = (e, t, o, r) => {
1600
+ for (var i = r > 1 ? void 0 : r ? $o(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1602
1601
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1603
- return r && i && ri(t, o, i), i;
1602
+ return r && i && wo(t, o, i), i;
1604
1603
  };
1605
- let je = class extends g {
1604
+ let $e = class extends d {
1606
1605
  constructor() {
1607
1606
  super(...arguments), this.selected = !1;
1608
1607
  }
@@ -1627,7 +1626,7 @@ let je = class extends g {
1627
1626
  }));
1628
1627
  }
1629
1628
  };
1630
- je.styles = b`
1629
+ $e.styles = g`
1631
1630
  :host {
1632
1631
  display: block;
1633
1632
  cursor: pointer;
@@ -1669,21 +1668,21 @@ je.styles = b`
1669
1668
  opacity: 1;
1670
1669
  }
1671
1670
  `;
1672
- Tt([
1671
+ it([
1673
1672
  p({ type: Object })
1674
- ], je.prototype, "block", 2);
1675
- Tt([
1673
+ ], $e.prototype, "block", 2);
1674
+ it([
1676
1675
  p({ type: Boolean, reflect: !0 })
1677
- ], je.prototype, "selected", 2);
1678
- je = Tt([
1679
- u("pigeon-spacer-block")
1680
- ], je);
1681
- var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Pt = (e, t, o, r) => {
1682
- for (var i = r > 1 ? void 0 : r ? si(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1676
+ ], $e.prototype, "selected", 2);
1677
+ $e = it([
1678
+ h("pigeon-spacer-block")
1679
+ ], $e);
1680
+ var ko = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, rt = (e, t, o, r) => {
1681
+ for (var i = r > 1 ? void 0 : r ? Co(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1683
1682
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1684
- return r && i && ai(t, o, i), i;
1683
+ return r && i && ko(t, o, i), i;
1685
1684
  };
1686
- const li = {
1685
+ const Io = {
1687
1686
  facebook: "f",
1688
1687
  twitter: "𝕏",
1689
1688
  instagram: "ig",
@@ -1691,7 +1690,7 @@ const li = {
1691
1690
  youtube: "▶",
1692
1691
  tiktok: "♪",
1693
1692
  custom: "★"
1694
- }, pi = {
1693
+ }, Po = {
1695
1694
  facebook: "#1877F2",
1696
1695
  twitter: "#000000",
1697
1696
  instagram: "#E4405F",
@@ -1700,7 +1699,7 @@ const li = {
1700
1699
  tiktok: "#000000",
1701
1700
  custom: "#6b7280"
1702
1701
  };
1703
- let Me = class extends g {
1702
+ let ke = class extends d {
1704
1703
  constructor() {
1705
1704
  super(...arguments), this.selected = !1;
1706
1705
  }
@@ -1720,7 +1719,7 @@ let Me = class extends g {
1720
1719
  ${e.icons.length === 0 ? l`<div class="empty-state">Add social icons in properties</div>` : l`
1721
1720
  <div class="icons-container" style="justify-content: ${o[e.alignment]}; gap: ${e.spacing}px;">
1722
1721
  ${e.icons.map((r) => {
1723
- const i = pi[r.type] ?? "#6b7280", n = li[r.type] ?? "?";
1722
+ const i = Po[r.type] ?? "#6b7280", n = Io[r.type] ?? "?";
1724
1723
  return l`
1725
1724
  <a
1726
1725
  class="social-icon"
@@ -1747,7 +1746,7 @@ let Me = class extends g {
1747
1746
  }));
1748
1747
  }
1749
1748
  };
1750
- Me.styles = b`
1749
+ ke.styles = g`
1751
1750
  :host {
1752
1751
  display: block;
1753
1752
  cursor: pointer;
@@ -1795,21 +1794,21 @@ Me.styles = b`
1795
1794
  font-size: 13px;
1796
1795
  }
1797
1796
  `;
1798
- Pt([
1797
+ rt([
1799
1798
  p({ type: Object })
1800
- ], Me.prototype, "block", 2);
1801
- Pt([
1799
+ ], ke.prototype, "block", 2);
1800
+ rt([
1802
1801
  p({ type: Boolean, reflect: !0 })
1803
- ], Me.prototype, "selected", 2);
1804
- Me = Pt([
1805
- u("pigeon-social-block")
1806
- ], Me);
1807
- var ci = Object.defineProperty, di = Object.getOwnPropertyDescriptor, St = (e, t, o, r) => {
1808
- for (var i = r > 1 ? void 0 : r ? di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1802
+ ], ke.prototype, "selected", 2);
1803
+ ke = rt([
1804
+ h("pigeon-social-block")
1805
+ ], ke);
1806
+ var To = Object.defineProperty, So = Object.getOwnPropertyDescriptor, nt = (e, t, o, r) => {
1807
+ for (var i = r > 1 ? void 0 : r ? So(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1809
1808
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1810
- return r && i && ci(t, o, i), i;
1809
+ return r && i && To(t, o, i), i;
1811
1810
  };
1812
- let Re = class extends g {
1811
+ let Ce = class extends d {
1813
1812
  constructor() {
1814
1813
  super(...arguments), this.selected = !1;
1815
1814
  }
@@ -1848,7 +1847,7 @@ let Re = class extends g {
1848
1847
  }));
1849
1848
  }
1850
1849
  };
1851
- Re.styles = b`
1850
+ Ce.styles = g`
1852
1851
  :host {
1853
1852
  display: block;
1854
1853
  cursor: pointer;
@@ -1890,21 +1889,21 @@ Re.styles = b`
1890
1889
  font-size: 13px;
1891
1890
  }
1892
1891
  `;
1893
- St([
1892
+ nt([
1894
1893
  p({ type: Object })
1895
- ], Re.prototype, "block", 2);
1896
- St([
1894
+ ], Ce.prototype, "block", 2);
1895
+ nt([
1897
1896
  p({ type: Boolean, reflect: !0 })
1898
- ], Re.prototype, "selected", 2);
1899
- Re = St([
1900
- u("pigeon-html-block")
1901
- ], Re);
1902
- var hi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, it = (e, t, o, r) => {
1903
- for (var i = r > 1 ? void 0 : r ? gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1897
+ ], Ce.prototype, "selected", 2);
1898
+ Ce = nt([
1899
+ h("pigeon-html-block")
1900
+ ], Ce);
1901
+ var Oo = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, Me = (e, t, o, r) => {
1902
+ for (var i = r > 1 ? void 0 : r ? Eo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
1904
1903
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
1905
- return r && i && hi(t, o, i), i;
1904
+ return r && i && Oo(t, o, i), i;
1906
1905
  };
1907
- let ge = class extends g {
1906
+ let se = class extends d {
1908
1907
  constructor() {
1909
1908
  super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
1910
1909
  }
@@ -1914,7 +1913,7 @@ let ge = class extends g {
1914
1913
  top: "flex-start",
1915
1914
  middle: "center",
1916
1915
  bottom: "flex-end"
1917
- }, i = e.backgroundUrl ? `background-image: url(${e.backgroundUrl}); background-position: ${e.backgroundPosition};` : `background-color: ${e.backgroundColor};`, n = e.mode === "fixed-height" ? `height: ${e.height}px;` : `min-height: ${e.height}px;`, a = e.backgroundUrl || e.content, h = this.editing;
1916
+ }, i = e.backgroundUrl ? `background-image: url(${e.backgroundUrl}); background-position: ${e.backgroundPosition};` : `background-color: ${e.backgroundColor};`, n = e.mode === "fixed-height" ? `height: ${e.height}px;` : `min-height: ${e.height}px;`, a = e.backgroundUrl || e.content, u = this.editing;
1918
1917
  return l`
1919
1918
  <div
1920
1919
  class="wrapper"
@@ -1922,7 +1921,7 @@ let ge = class extends g {
1922
1921
  @click=${this._handleClick}
1923
1922
  @dblclick=${this._handleDblClick}
1924
1923
  >
1925
- ${h ? l`<div class="content" style="${o}"></div>` : a ? l`<div class="content" style="${o}" .innerHTML=${e.content}></div>` : l`
1924
+ ${u ? l`<div class="content" style="${o}"></div>` : a ? l`<div class="content" style="${o}" .innerHTML=${e.content}></div>` : l`
1926
1925
  <div class="empty-state">
1927
1926
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
1928
1927
  <rect x="2" y="2" width="20" height="20" rx="2"/>
@@ -1945,7 +1944,7 @@ let ge = class extends g {
1945
1944
  const e = this.renderRoot.querySelector(".content");
1946
1945
  if (!e) return;
1947
1946
  this._editorHost = e;
1948
- const t = await xt();
1947
+ const t = await Ge();
1949
1948
  !this.editing || !this._editorHost || (this._editor = t.createEditor({
1950
1949
  element: this._editorHost,
1951
1950
  initialHTML: this.block.values.content || "<p></p>",
@@ -1989,7 +1988,7 @@ let ge = class extends g {
1989
1988
  }));
1990
1989
  }
1991
1990
  };
1992
- ge.styles = b`
1991
+ se.styles = g`
1993
1992
  :host {
1994
1993
  display: block;
1995
1994
  cursor: pointer;
@@ -2049,24 +2048,24 @@ ge.styles = b`
2049
2048
  outline: none;
2050
2049
  }
2051
2050
  `;
2052
- it([
2051
+ Me([
2053
2052
  p({ type: Object })
2054
- ], ge.prototype, "block", 2);
2055
- it([
2053
+ ], se.prototype, "block", 2);
2054
+ Me([
2056
2055
  p({ type: Boolean, reflect: !0 })
2057
- ], ge.prototype, "selected", 2);
2058
- it([
2056
+ ], se.prototype, "selected", 2);
2057
+ Me([
2059
2058
  p({ type: Boolean, reflect: !0 })
2060
- ], ge.prototype, "editing", 2);
2061
- ge = it([
2062
- u("pigeon-hero-block")
2063
- ], ge);
2064
- var ui = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ot = (e, t, o, r) => {
2065
- for (var i = r > 1 ? void 0 : r ? bi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2059
+ ], se.prototype, "editing", 2);
2060
+ se = Me([
2061
+ h("pigeon-hero-block")
2062
+ ], se);
2063
+ var Do = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor, at = (e, t, o, r) => {
2064
+ for (var i = r > 1 ? void 0 : r ? Bo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2066
2065
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
2067
- return r && i && ui(t, o, i), i;
2066
+ return r && i && Do(t, o, i), i;
2068
2067
  };
2069
- let Le = class extends g {
2068
+ let Ie = class extends d {
2070
2069
  constructor() {
2071
2070
  super(...arguments), this.selected = !1;
2072
2071
  }
@@ -2109,7 +2108,7 @@ let Le = class extends g {
2109
2108
  }));
2110
2109
  }
2111
2110
  };
2112
- Le.styles = b`
2111
+ Ie.styles = g`
2113
2112
  :host {
2114
2113
  display: block;
2115
2114
  cursor: pointer;
@@ -2157,21 +2156,21 @@ Le.styles = b`
2157
2156
  font-size: 13px;
2158
2157
  }
2159
2158
  `;
2160
- Ot([
2159
+ at([
2161
2160
  p({ type: Object })
2162
- ], Le.prototype, "block", 2);
2163
- Ot([
2161
+ ], Ie.prototype, "block", 2);
2162
+ at([
2164
2163
  p({ type: Boolean, reflect: !0 })
2165
- ], Le.prototype, "selected", 2);
2166
- Le = Ot([
2167
- u("pigeon-navbar-block")
2168
- ], Le);
2169
- var vi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, Z = (e, t, o, r) => {
2170
- for (var i = r > 1 ? void 0 : r ? fi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2164
+ ], Ie.prototype, "selected", 2);
2165
+ Ie = at([
2166
+ h("pigeon-navbar-block")
2167
+ ], Ie);
2168
+ var jo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, q = (e, t, o, r) => {
2169
+ for (var i = r > 1 ? void 0 : r ? Ro(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2171
2170
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
2172
- return r && i && vi(t, o, i), i;
2171
+ return r && i && jo(t, o, i), i;
2173
2172
  };
2174
- let A = class extends g {
2173
+ let O = class extends d {
2175
2174
  constructor() {
2176
2175
  super(...arguments), this.rowId = "", this.selection = null, this.editingBlockId = null, this._dropIndex = -1, this._isDragOver = !1, this._draggingBlockId = null;
2177
2176
  }
@@ -2257,7 +2256,7 @@ let A = class extends g {
2257
2256
  * failing with "Unknown block type".
2258
2257
  */
2259
2258
  _renderCustomBlock(e, t) {
2260
- const o = yt(e.type), r = e, i = o != null && o.renderCanvas ? eo(o.renderCanvas(r)) : l`<span class="custom-block__label"
2259
+ const o = Je(e.type), r = e, i = o != null && o.renderCanvas ? $t(o.renderCanvas(r)) : l`<span class="custom-block__label"
2261
2260
  >${(o == null ? void 0 : o.label) ?? e.type}</span
2262
2261
  >`;
2263
2262
  return l`<div
@@ -2280,7 +2279,7 @@ let A = class extends g {
2280
2279
  );
2281
2280
  }
2282
2281
  _onDragOver(e) {
2283
- const t = Ee();
2282
+ const t = _e();
2284
2283
  if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
2285
2284
  e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-block" ? "move" : "copy"), this._isDragOver = !0;
2286
2285
  const o = Array.from(
@@ -2288,19 +2287,19 @@ let A = class extends g {
2288
2287
  "pigeon-text-block, pigeon-image-block, pigeon-button-block, pigeon-divider-block, pigeon-spacer-block, pigeon-social-block, pigeon-html-block, pigeon-hero-block, pigeon-navbar-block, .custom-block"
2289
2288
  )
2290
2289
  );
2291
- this._dropIndex = Vo(e.clientY, o);
2290
+ this._dropIndex = co(e.clientY, o);
2292
2291
  }
2293
2292
  _onDragLeave(e) {
2294
2293
  const t = this.getBoundingClientRect();
2295
2294
  e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (this._isDragOver = !1, this._dropIndex = -1);
2296
2295
  }
2297
2296
  _onDrop(e) {
2298
- const t = Ee();
2297
+ const t = _e();
2299
2298
  if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
2300
2299
  e.preventDefault(), e.stopPropagation();
2301
2300
  let o = this._dropIndex >= 0 ? this._dropIndex : this.column.blocks.length;
2302
2301
  if (t.type === "existing-block" && t.rowId === this.rowId && t.columnId === this.column.id) {
2303
- const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i = to(r, o);
2302
+ const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i = kt(r, o);
2304
2303
  if (i === null) {
2305
2304
  this._resetDragState();
2306
2305
  return;
@@ -2319,10 +2318,10 @@ let A = class extends g {
2319
2318
  })), this._resetDragState();
2320
2319
  }
2321
2320
  _resetDragState() {
2322
- this._isDragOver = !1, this._dropIndex = -1, Xe();
2321
+ this._isDragOver = !1, this._dropIndex = -1, Be();
2323
2322
  }
2324
2323
  _onBlockDragStart(e, t) {
2325
- if (wt(e, {
2324
+ if (Qe(e, {
2326
2325
  type: "existing-block",
2327
2326
  blockId: t,
2328
2327
  rowId: this.rowId,
@@ -2334,10 +2333,10 @@ let A = class extends g {
2334
2333
  this._draggingBlockId = t;
2335
2334
  }
2336
2335
  _onBlockDragEnd() {
2337
- this._draggingBlockId = null, Xe();
2336
+ this._draggingBlockId = null, Be();
2338
2337
  }
2339
2338
  };
2340
- A.styles = b`
2339
+ O.styles = g`
2341
2340
  :host {
2342
2341
  display: block;
2343
2342
  min-height: 40px;
@@ -2453,36 +2452,36 @@ A.styles = b`
2453
2452
  text-align: center;
2454
2453
  }
2455
2454
  `;
2456
- Z([
2455
+ q([
2457
2456
  p({ type: Object })
2458
- ], A.prototype, "column", 2);
2459
- Z([
2457
+ ], O.prototype, "column", 2);
2458
+ q([
2460
2459
  p({ type: String, attribute: "row-id" })
2461
- ], A.prototype, "rowId", 2);
2462
- Z([
2460
+ ], O.prototype, "rowId", 2);
2461
+ q([
2463
2462
  p({ type: Object })
2464
- ], A.prototype, "selection", 2);
2465
- Z([
2463
+ ], O.prototype, "selection", 2);
2464
+ q([
2466
2465
  p({ type: String, attribute: "editing-block-id" })
2467
- ], A.prototype, "editingBlockId", 2);
2468
- Z([
2469
- d()
2470
- ], A.prototype, "_dropIndex", 2);
2471
- Z([
2472
- d()
2473
- ], A.prototype, "_isDragOver", 2);
2474
- Z([
2475
- d()
2476
- ], A.prototype, "_draggingBlockId", 2);
2477
- A = Z([
2478
- u("pigeon-column")
2479
- ], A);
2480
- var mi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, Q = (e, t, o, r) => {
2481
- for (var i = r > 1 ? void 0 : r ? _i(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2466
+ ], O.prototype, "editingBlockId", 2);
2467
+ q([
2468
+ c()
2469
+ ], O.prototype, "_dropIndex", 2);
2470
+ q([
2471
+ c()
2472
+ ], O.prototype, "_isDragOver", 2);
2473
+ q([
2474
+ c()
2475
+ ], O.prototype, "_draggingBlockId", 2);
2476
+ O = q([
2477
+ h("pigeon-column")
2478
+ ], O);
2479
+ var Lo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, Y = (e, t, o, r) => {
2480
+ for (var i = r > 1 ? void 0 : r ? zo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2482
2481
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
2483
- return r && i && mi(t, o, i), i;
2482
+ return r && i && Lo(t, o, i), i;
2484
2483
  };
2485
- let B = class extends g {
2484
+ let E = class extends d {
2486
2485
  constructor() {
2487
2486
  super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this.showActions = !1, this._dragging = !1;
2488
2487
  }
@@ -2499,10 +2498,10 @@ let B = class extends g {
2499
2498
  <div class="row-label">Row</div>
2500
2499
 
2501
2500
  <div class="columns">
2502
- ${this.row.columns.map((a, h) => {
2503
- const v = (this.row.columnRatios[h] ?? 1) / 12 * 100;
2501
+ ${this.row.columns.map((a, u) => {
2502
+ const y = (this.row.columnRatios[u] ?? 1) / 12 * 100;
2504
2503
  return l`
2505
- <div class="column-wrapper" style="width: ${v}%;">
2504
+ <div class="column-wrapper" style="width: ${y}%;">
2506
2505
  <pigeon-column
2507
2506
  .column=${a}
2508
2507
  row-id="${this.row.id}"
@@ -2629,7 +2628,7 @@ let B = class extends g {
2629
2628
  }));
2630
2629
  }
2631
2630
  _onDragStart(e) {
2632
- if (wt(e, {
2631
+ if (Qe(e, {
2633
2632
  type: "existing-row",
2634
2633
  rowId: this.row.id
2635
2634
  }), e.dataTransfer) {
@@ -2639,10 +2638,10 @@ let B = class extends g {
2639
2638
  this._dragging = !0;
2640
2639
  }
2641
2640
  _onDragEnd() {
2642
- this._dragging = !1, Xe();
2641
+ this._dragging = !1, Be();
2643
2642
  }
2644
2643
  };
2645
- B.styles = b`
2644
+ E.styles = g`
2646
2645
  :host {
2647
2646
  display: block;
2648
2647
  position: relative;
@@ -2773,36 +2772,36 @@ B.styles = b`
2773
2772
  opacity: 1;
2774
2773
  }
2775
2774
  `;
2776
- Q([
2775
+ Y([
2777
2776
  p({ type: Object })
2778
- ], B.prototype, "row", 2);
2779
- Q([
2777
+ ], E.prototype, "row", 2);
2778
+ Y([
2780
2779
  p({ type: Number })
2781
- ], B.prototype, "index", 2);
2782
- Q([
2780
+ ], E.prototype, "index", 2);
2781
+ Y([
2783
2782
  p({ type: Number, attribute: "total-rows" })
2784
- ], B.prototype, "totalRows", 2);
2785
- Q([
2783
+ ], E.prototype, "totalRows", 2);
2784
+ Y([
2786
2785
  p({ type: Object })
2787
- ], B.prototype, "selection", 2);
2788
- Q([
2786
+ ], E.prototype, "selection", 2);
2787
+ Y([
2789
2788
  p({ type: String, attribute: "editing-block-id" })
2790
- ], B.prototype, "editingBlockId", 2);
2791
- Q([
2789
+ ], E.prototype, "editingBlockId", 2);
2790
+ Y([
2792
2791
  p({ type: Boolean, attribute: "show-actions", reflect: !0 })
2793
- ], B.prototype, "showActions", 2);
2794
- Q([
2795
- d()
2796
- ], B.prototype, "_dragging", 2);
2797
- B = Q([
2798
- u("pigeon-row")
2799
- ], B);
2800
- var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
2801
- for (var i = r > 1 ? void 0 : r ? xi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2792
+ ], E.prototype, "showActions", 2);
2793
+ Y([
2794
+ c()
2795
+ ], E.prototype, "_dragging", 2);
2796
+ E = Y([
2797
+ h("pigeon-row")
2798
+ ], E);
2799
+ var Mo = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, z = (e, t, o, r) => {
2800
+ for (var i = r > 1 ? void 0 : r ? Ao(t, o) : t, n = e.length - 1, a; n >= 0; n--)
2802
2801
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
2803
- return r && i && yi(t, o, i), i;
2802
+ return r && i && Mo(t, o, i), i;
2804
2803
  };
2805
- let P = class extends g {
2804
+ let C = class extends d {
2806
2805
  constructor() {
2807
2806
  super(...arguments), this.selection = null, this.editingBlockId = null, this.previewWidth = 0, this.device = "desktop", this._rowDropIndex = -1, this._isDragOver = !1, this._hoveredRowId = null, this._onPointerOverRow = (e) => {
2808
2807
  var r;
@@ -2870,13 +2869,13 @@ let P = class extends g {
2870
2869
  ` : l`
2871
2870
  <div class="rows-container">
2872
2871
  ${o.map(
2873
- (a, h) => l`
2872
+ (a, u) => l`
2874
2873
  <pigeon-drop-indicator
2875
- ?visible=${this._isDragOver && this._rowDropIndex === h}
2874
+ ?visible=${this._isDragOver && this._rowDropIndex === u}
2876
2875
  ></pigeon-drop-indicator>
2877
2876
  <pigeon-row
2878
2877
  .row=${a}
2879
- .index=${h}
2878
+ .index=${u}
2880
2879
  .totalRows=${o.length}
2881
2880
  .selection=${this.selection}
2882
2881
  .editingBlockId=${this.editingBlockId}
@@ -2901,12 +2900,12 @@ let P = class extends g {
2901
2900
  }));
2902
2901
  }
2903
2902
  _onDragOver(e) {
2904
- const t = Ee();
2903
+ const t = _e();
2905
2904
  if (t && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-row" ? "move" : "copy"), this._isDragOver = !0, t.type === "palette-row" || t.type === "existing-row" || t.type === "library-row" || this.doc.body.rows.length === 0)) {
2906
2905
  const o = Array.from(
2907
2906
  this.renderRoot.querySelectorAll("pigeon-row")
2908
2907
  );
2909
- this._rowDropIndex = qo(e.clientY, o);
2908
+ this._rowDropIndex = po(e.clientY, o);
2910
2909
  }
2911
2910
  }
2912
2911
  _onDragLeave(e) {
@@ -2916,7 +2915,7 @@ let P = class extends g {
2916
2915
  }
2917
2916
  _onDrop(e) {
2918
2917
  e.preventDefault();
2919
- const t = Ee();
2918
+ const t = _e();
2920
2919
  if (!t) {
2921
2920
  this._resetDragState();
2922
2921
  return;
@@ -2939,7 +2938,7 @@ let P = class extends g {
2939
2938
  composed: !0
2940
2939
  }));
2941
2940
  } else if (t.type === "existing-row" && t.rowId) {
2942
- const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i = to(o, r);
2941
+ const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i = kt(o, r);
2943
2942
  i !== null && this.dispatchEvent(new CustomEvent("row-move", {
2944
2943
  detail: { rowId: t.rowId, toIndex: i },
2945
2944
  bubbles: !0,
@@ -2956,10 +2955,10 @@ let P = class extends g {
2956
2955
  this._resetDragState();
2957
2956
  }
2958
2957
  _resetDragState() {
2959
- this._isDragOver = !1, this._rowDropIndex = -1, Xe();
2958
+ this._isDragOver = !1, this._rowDropIndex = -1, Be();
2960
2959
  }
2961
2960
  };
2962
- P.styles = b`
2961
+ C.styles = g`
2963
2962
  :host {
2964
2963
  display: block;
2965
2964
  flex: 1;
@@ -3088,383 +3087,34 @@ P.styles = b`
3088
3087
  border-radius: var(--pigeon-radius, 6px);
3089
3088
  }
3090
3089
  `;
3091
- F([
3090
+ z([
3092
3091
  p({ type: Object })
3093
- ], P.prototype, "doc", 2);
3094
- F([
3092
+ ], C.prototype, "doc", 2);
3093
+ z([
3095
3094
  p({ type: Object })
3096
- ], P.prototype, "selection", 2);
3097
- F([
3095
+ ], C.prototype, "selection", 2);
3096
+ z([
3098
3097
  p({ type: String, attribute: "editing-block-id" })
3099
- ], P.prototype, "editingBlockId", 2);
3100
- F([
3098
+ ], C.prototype, "editingBlockId", 2);
3099
+ z([
3101
3100
  p({ type: Number, attribute: "preview-width" })
3102
- ], P.prototype, "previewWidth", 2);
3103
- F([
3101
+ ], C.prototype, "previewWidth", 2);
3102
+ z([
3104
3103
  p({ type: String })
3105
- ], P.prototype, "device", 2);
3106
- F([
3107
- d()
3108
- ], P.prototype, "_rowDropIndex", 2);
3109
- F([
3110
- d()
3111
- ], P.prototype, "_isDragOver", 2);
3112
- F([
3113
- d()
3114
- ], P.prototype, "_hoveredRowId", 2);
3115
- P = F([
3116
- u("pigeon-canvas")
3117
- ], P);
3118
- /**
3119
- * @license
3120
- * Copyright 2017 Google LLC
3121
- * SPDX-License-Identifier: BSD-3-Clause
3122
- */
3123
- const Se = globalThis, Wt = (e) => e, Je = Se.trustedTypes, qt = Je ? Je.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, io = "$lit$", q = `lit$${Math.random().toFixed(9).slice(2)}$`, ro = "?" + q, $i = `<${ro}>`, ne = document, Ze = () => ne.createComment(""), ze = (e) => e === null || typeof e != "object" && typeof e != "function", Et = Array.isArray, wi = (e) => Et(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
3124
- \f\r]`, Pe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, Yt = />/g, ie = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
3125
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Xt = /'/g, Gt = /"/g, no = /^(?:script|style|textarea|title)$/i, He = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), re = ne.createTreeWalker(ne, 129);
3126
- function ao(e, t) {
3127
- if (!Et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
3128
- return qt !== void 0 ? qt.createHTML(t) : t;
3129
- }
3130
- const ki = (e, t) => {
3131
- const o = e.length - 1, r = [];
3132
- let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Pe;
3133
- for (let h = 0; h < o; h++) {
3134
- const c = e[h];
3135
- let v, m, f = -1, R = 0;
3136
- for (; R < c.length && (a.lastIndex = R, m = a.exec(c), m !== null); ) R = a.lastIndex, a === Pe ? m[1] === "!--" ? a = Vt : m[1] !== void 0 ? a = Yt : m[2] !== void 0 ? (no.test(m[2]) && (i = RegExp("</" + m[2], "g")), a = ie) : m[3] !== void 0 && (a = ie) : a === ie ? m[0] === ">" ? (a = i ?? Pe, f = -1) : m[1] === void 0 ? f = -2 : (f = a.lastIndex - m[2].length, v = m[1], a = m[3] === void 0 ? ie : m[3] === '"' ? Gt : Xt) : a === Gt || a === Xt ? a = ie : a === Vt || a === Yt ? a = Pe : (a = ie, i = void 0);
3137
- const W = a === ie && e[h + 1].startsWith("/>") ? " " : "";
3138
- n += a === Pe ? c + $i : f >= 0 ? (r.push(v), c.slice(0, f) + io + c.slice(f) + q + W) : c + q + (f === -2 ? h : W);
3139
- }
3140
- return [ao(e, n + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
3141
- };
3142
- class Fe {
3143
- constructor({ strings: t, _$litType$: o }, r) {
3144
- let i;
3145
- this.parts = [];
3146
- let n = 0, a = 0;
3147
- const h = t.length - 1, c = this.parts, [v, m] = ki(t, o);
3148
- if (this.el = Fe.createElement(v, r), re.currentNode = this.el.content, o === 2 || o === 3) {
3149
- const f = this.el.content.firstChild;
3150
- f.replaceWith(...f.childNodes);
3151
- }
3152
- for (; (i = re.nextNode()) !== null && c.length < h; ) {
3153
- if (i.nodeType === 1) {
3154
- if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(io)) {
3155
- const R = m[a++], W = i.getAttribute(f).split(q), qe = /([.?@])?(.*)/.exec(R);
3156
- c.push({ type: 1, index: n, name: qe[2], strings: W, ctor: qe[1] === "." ? Ii : qe[1] === "?" ? Ti : qe[1] === "@" ? Pi : nt }), i.removeAttribute(f);
3157
- } else f.startsWith(q) && (c.push({ type: 6, index: n }), i.removeAttribute(f));
3158
- if (no.test(i.tagName)) {
3159
- const f = i.textContent.split(q), R = f.length - 1;
3160
- if (R > 0) {
3161
- i.textContent = Je ? Je.emptyScript : "";
3162
- for (let W = 0; W < R; W++) i.append(f[W], Ze()), re.nextNode(), c.push({ type: 2, index: ++n });
3163
- i.append(f[R], Ze());
3164
- }
3165
- }
3166
- } else if (i.nodeType === 8) if (i.data === ro) c.push({ type: 2, index: n });
3167
- else {
3168
- let f = -1;
3169
- for (; (f = i.data.indexOf(q, f + 1)) !== -1; ) c.push({ type: 7, index: n }), f += q.length - 1;
3170
- }
3171
- n++;
3172
- }
3173
- }
3174
- static createElement(t, o) {
3175
- const r = ne.createElement("template");
3176
- return r.innerHTML = t, r;
3177
- }
3178
- }
3179
- function ue(e, t, o = e, r) {
3180
- var a, h;
3181
- if (t === He) return t;
3182
- let i = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
3183
- const n = ze(t) ? void 0 : t._$litDirective$;
3184
- return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = i : o._$Cl = i), i !== void 0 && (t = ue(e, i._$AS(e, t.values), i, r)), t;
3185
- }
3186
- class Ci {
3187
- constructor(t, o) {
3188
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
3189
- }
3190
- get parentNode() {
3191
- return this._$AM.parentNode;
3192
- }
3193
- get _$AU() {
3194
- return this._$AM._$AU;
3195
- }
3196
- u(t) {
3197
- const { el: { content: o }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? ne).importNode(o, !0);
3198
- re.currentNode = i;
3199
- let n = re.nextNode(), a = 0, h = 0, c = r[0];
3200
- for (; c !== void 0; ) {
3201
- if (a === c.index) {
3202
- let v;
3203
- c.type === 2 ? v = new rt(n, n.nextSibling, this, t) : c.type === 1 ? v = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (v = new Si(n, this, t)), this._$AV.push(v), c = r[++h];
3204
- }
3205
- a !== (c == null ? void 0 : c.index) && (n = re.nextNode(), a++);
3206
- }
3207
- return re.currentNode = ne, i;
3208
- }
3209
- p(t) {
3210
- let o = 0;
3211
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, o), o += r.strings.length - 2) : r._$AI(t[o])), o++;
3212
- }
3213
- }
3214
- class rt {
3215
- get _$AU() {
3216
- var t;
3217
- return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
3218
- }
3219
- constructor(t, o, r, i) {
3220
- this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = o, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
3221
- }
3222
- get parentNode() {
3223
- let t = this._$AA.parentNode;
3224
- const o = this._$AM;
3225
- return o !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = o.parentNode), t;
3226
- }
3227
- get startNode() {
3228
- return this._$AA;
3229
- }
3230
- get endNode() {
3231
- return this._$AB;
3232
- }
3233
- _$AI(t, o = this) {
3234
- t = ue(this, t, o), ze(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== He && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : wi(t) ? this.k(t) : this._(t);
3235
- }
3236
- O(t) {
3237
- return this._$AA.parentNode.insertBefore(t, this._$AB);
3238
- }
3239
- T(t) {
3240
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
3241
- }
3242
- _(t) {
3243
- this._$AH !== y && ze(this._$AH) ? this._$AA.nextSibling.data = t : this.T(ne.createTextNode(t)), this._$AH = t;
3244
- }
3245
- $(t) {
3246
- var n;
3247
- const { values: o, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Fe.createElement(ao(r.h, r.h[0]), this.options)), r);
3248
- if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(o);
3249
- else {
3250
- const a = new Ci(i, this), h = a.u(this.options);
3251
- a.p(o), this.T(h), this._$AH = a;
3252
- }
3253
- }
3254
- _$AC(t) {
3255
- let o = Jt.get(t.strings);
3256
- return o === void 0 && Jt.set(t.strings, o = new Fe(t)), o;
3257
- }
3258
- k(t) {
3259
- Et(this._$AH) || (this._$AH = [], this._$AR());
3260
- const o = this._$AH;
3261
- let r, i = 0;
3262
- for (const n of t) i === o.length ? o.push(r = new rt(this.O(Ze()), this.O(Ze()), this, this.options)) : r = o[i], r._$AI(n), i++;
3263
- i < o.length && (this._$AR(r && r._$AB.nextSibling, i), o.length = i);
3264
- }
3265
- _$AR(t = this._$AA.nextSibling, o) {
3266
- var r;
3267
- for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, o); t !== this._$AB; ) {
3268
- const i = Wt(t).nextSibling;
3269
- Wt(t).remove(), t = i;
3270
- }
3271
- }
3272
- setConnected(t) {
3273
- var o;
3274
- this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
3275
- }
3276
- }
3277
- class nt {
3278
- get tagName() {
3279
- return this.element.tagName;
3280
- }
3281
- get _$AU() {
3282
- return this._$AM._$AU;
3283
- }
3284
- constructor(t, o, r, i, n) {
3285
- this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = o, this._$AM = i, this.options = n, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = y;
3286
- }
3287
- _$AI(t, o = this, r, i) {
3288
- const n = this.strings;
3289
- let a = !1;
3290
- if (n === void 0) t = ue(this, t, o, 0), a = !ze(t) || t !== this._$AH && t !== He, a && (this._$AH = t);
3291
- else {
3292
- const h = t;
3293
- let c, v;
3294
- for (t = n[0], c = 0; c < n.length - 1; c++) v = ue(this, h[r + c], o, c), v === He && (v = this._$AH[c]), a || (a = !ze(v) || v !== this._$AH[c]), v === y ? t = y : t !== y && (t += (v ?? "") + n[c + 1]), this._$AH[c] = v;
3295
- }
3296
- a && !i && this.j(t);
3297
- }
3298
- j(t) {
3299
- t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
3300
- }
3301
- }
3302
- class Ii extends nt {
3303
- constructor() {
3304
- super(...arguments), this.type = 3;
3305
- }
3306
- j(t) {
3307
- this.element[this.name] = t === y ? void 0 : t;
3308
- }
3309
- }
3310
- class Ti extends nt {
3311
- constructor() {
3312
- super(...arguments), this.type = 4;
3313
- }
3314
- j(t) {
3315
- this.element.toggleAttribute(this.name, !!t && t !== y);
3316
- }
3317
- }
3318
- class Pi extends nt {
3319
- constructor(t, o, r, i, n) {
3320
- super(t, o, r, i, n), this.type = 5;
3321
- }
3322
- _$AI(t, o = this) {
3323
- if ((t = ue(this, t, o, 0) ?? y) === He) return;
3324
- const r = this._$AH, i = t === y && r !== y || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== y && (r === y || i);
3325
- i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
3326
- }
3327
- handleEvent(t) {
3328
- var o;
3329
- typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
3330
- }
3331
- }
3332
- class Si {
3333
- constructor(t, o, r) {
3334
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
3335
- }
3336
- get _$AU() {
3337
- return this._$AM._$AU;
3338
- }
3339
- _$AI(t) {
3340
- ue(this, t);
3341
- }
3342
- }
3343
- const vt = Se.litHtmlPolyfillSupport;
3344
- vt == null || vt(Fe, rt), (Se.litHtmlVersions ?? (Se.litHtmlVersions = [])).push("3.3.3");
3345
- /**
3346
- * @license
3347
- * Copyright 2020 Google LLC
3348
- * SPDX-License-Identifier: BSD-3-Clause
3349
- */
3350
- const Oi = (e) => e.strings === void 0;
3351
- /**
3352
- * @license
3353
- * Copyright 2017 Google LLC
3354
- * SPDX-License-Identifier: BSD-3-Clause
3355
- */
3356
- const Ei = { CHILD: 2 }, Di = (e) => (...t) => ({ _$litDirective$: e, values: t });
3357
- class Ai {
3358
- constructor(t) {
3359
- }
3360
- get _$AU() {
3361
- return this._$AM._$AU;
3362
- }
3363
- _$AT(t, o, r) {
3364
- this._$Ct = t, this._$AM = o, this._$Ci = r;
3365
- }
3366
- _$AS(t, o) {
3367
- return this.update(t, o);
3368
- }
3369
- update(t, o) {
3370
- return this.render(...o);
3371
- }
3372
- }
3373
- /**
3374
- * @license
3375
- * Copyright 2017 Google LLC
3376
- * SPDX-License-Identifier: BSD-3-Clause
3377
- */
3378
- const Oe = (e, t) => {
3379
- var r;
3380
- const o = e._$AN;
3381
- if (o === void 0) return !1;
3382
- for (const i of o) (r = i._$AO) == null || r.call(i, t, !1), Oe(i, t);
3383
- return !0;
3384
- }, Qe = (e) => {
3385
- let t, o;
3386
- do {
3387
- if ((t = e._$AM) === void 0) break;
3388
- o = t._$AN, o.delete(e), e = t;
3389
- } while ((o == null ? void 0 : o.size) === 0);
3390
- }, so = (e) => {
3391
- for (let t; t = e._$AM; e = t) {
3392
- let o = t._$AN;
3393
- if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
3394
- else if (o.has(e)) break;
3395
- o.add(e), Mi(t);
3396
- }
3397
- };
3398
- function Bi(e) {
3399
- this._$AN !== void 0 ? (Qe(this), this._$AM = e, so(this)) : this._$AM = e;
3400
- }
3401
- function ji(e, t = !1, o = 0) {
3402
- const r = this._$AH, i = this._$AN;
3403
- if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let n = o; n < r.length; n++) Oe(r[n], !1), Qe(r[n]);
3404
- else r != null && (Oe(r, !1), Qe(r));
3405
- else Oe(this, e);
3406
- }
3407
- const Mi = (e) => {
3408
- e.type == Ei.CHILD && (e._$AP ?? (e._$AP = ji), e._$AQ ?? (e._$AQ = Bi));
3409
- };
3410
- class Ri extends Ai {
3411
- constructor() {
3412
- super(...arguments), this._$AN = void 0;
3413
- }
3414
- _$AT(t, o, r) {
3415
- super._$AT(t, o, r), so(this), this.isConnected = t._$AU;
3416
- }
3417
- _$AO(t, o = !0) {
3418
- var r, i;
3419
- t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (i = this.disconnected) == null || i.call(this)), o && (Oe(this, t), Qe(this));
3420
- }
3421
- setValue(t) {
3422
- if (Oi(this._$Ct)) this._$Ct._$AI(t, this);
3423
- else {
3424
- const o = [...this._$Ct._$AH];
3425
- o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
3426
- }
3427
- }
3428
- disconnected() {
3429
- }
3430
- reconnected() {
3431
- }
3432
- }
3433
- /**
3434
- * @license
3435
- * Copyright 2020 Google LLC
3436
- * SPDX-License-Identifier: BSD-3-Clause
3437
- */
3438
- const be = () => new Li();
3439
- class Li {
3440
- }
3441
- const ft = /* @__PURE__ */ new WeakMap(), ve = Di(class extends Ri {
3442
- render(e) {
3443
- return y;
3444
- }
3445
- update(e, [t]) {
3446
- var r;
3447
- const o = t !== this.G;
3448
- return o && this.rt(void 0), (o || this.lt !== this.ct) && (this.G = t, this.ht = (r = e.options) == null ? void 0 : r.host, this.rt(this.ct = e.element)), y;
3449
- }
3450
- rt(e) {
3451
- if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
3452
- const t = this.ht ?? globalThis;
3453
- let o = ft.get(t);
3454
- o === void 0 && (o = /* @__PURE__ */ new WeakMap(), ft.set(t, o)), o.get(this.G) !== void 0 && this.G.call(this.ht, void 0), o.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
3455
- } else this.G.value = e;
3456
- }
3457
- get lt() {
3458
- var e, t;
3459
- return typeof this.G == "function" ? (e = ft.get(this.ht ?? globalThis)) == null ? void 0 : e.get(this.G) : (t = this.G) == null ? void 0 : t.value;
3460
- }
3461
- disconnected() {
3462
- this.lt === this.ct && this.rt(void 0);
3463
- }
3464
- reconnected() {
3465
- this.rt(this.ct);
3466
- }
3467
- }), I = b`
3104
+ ], C.prototype, "device", 2);
3105
+ z([
3106
+ c()
3107
+ ], C.prototype, "_rowDropIndex", 2);
3108
+ z([
3109
+ c()
3110
+ ], C.prototype, "_isDragOver", 2);
3111
+ z([
3112
+ c()
3113
+ ], C.prototype, "_hoveredRowId", 2);
3114
+ C = z([
3115
+ h("pigeon-canvas")
3116
+ ], C);
3117
+ const $ = g`
3468
3118
  :host {
3469
3119
  display: block;
3470
3120
  }
@@ -3680,12 +3330,12 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Di(class extends Ri {
3680
3330
  box-shadow: var(--pigeon-ring-shadow);
3681
3331
  }
3682
3332
  `;
3683
- var zi = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, Dt = (e, t, o, r) => {
3684
- for (var i = r > 1 ? void 0 : r ? Hi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3333
+ var Fo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
3334
+ for (var i = r > 1 ? void 0 : r ? Ho(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3685
3335
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
3686
- return r && i && zi(t, o, i), i;
3336
+ return r && i && Fo(t, o, i), i;
3687
3337
  };
3688
- let Ne = class extends g {
3338
+ let Pe = class extends d {
3689
3339
  constructor() {
3690
3340
  super(...arguments), this.label = "Alignment", this.value = "left";
3691
3341
  }
@@ -3743,7 +3393,7 @@ let Ne = class extends g {
3743
3393
  }));
3744
3394
  }
3745
3395
  };
3746
- Ne.styles = b`
3396
+ Pe.styles = g`
3747
3397
  :host {
3748
3398
  display: block;
3749
3399
  margin-bottom: 12px;
@@ -3806,21 +3456,21 @@ Ne.styles = b`
3806
3456
  height: 16px;
3807
3457
  }
3808
3458
  `;
3809
- Dt([
3459
+ st([
3810
3460
  p({ type: String })
3811
- ], Ne.prototype, "label", 2);
3812
- Dt([
3461
+ ], Pe.prototype, "label", 2);
3462
+ st([
3813
3463
  p({ type: String })
3814
- ], Ne.prototype, "value", 2);
3815
- Ne = Dt([
3816
- u("pigeon-alignment-picker")
3817
- ], Ne);
3818
- var Fi = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, At = (e, t, o, r) => {
3819
- for (var i = r > 1 ? void 0 : r ? Ni(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3464
+ ], Pe.prototype, "value", 2);
3465
+ Pe = st([
3466
+ h("pigeon-alignment-picker")
3467
+ ], Pe);
3468
+ var Uo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, lt = (e, t, o, r) => {
3469
+ for (var i = r > 1 ? void 0 : r ? Ko(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3820
3470
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
3821
- return r && i && Fi(t, o, i), i;
3471
+ return r && i && Uo(t, o, i), i;
3822
3472
  };
3823
- let Ue = class extends g {
3473
+ let Te = class extends d {
3824
3474
  constructor() {
3825
3475
  super(...arguments), this.label = "Padding", this.value = { top: 0, right: 0, bottom: 0, left: 0 };
3826
3476
  }
@@ -3878,7 +3528,7 @@ let Ue = class extends g {
3878
3528
  }));
3879
3529
  }
3880
3530
  };
3881
- Ue.styles = b`
3531
+ Te.styles = g`
3882
3532
  :host {
3883
3533
  display: block;
3884
3534
  margin-bottom: 14px;
@@ -3963,21 +3613,21 @@ Ue.styles = b`
3963
3613
  -moz-appearance: textfield;
3964
3614
  }
3965
3615
  `;
3966
- At([
3616
+ lt([
3967
3617
  p({ type: String })
3968
- ], Ue.prototype, "label", 2);
3969
- At([
3618
+ ], Te.prototype, "label", 2);
3619
+ lt([
3970
3620
  p({ type: Object })
3971
- ], Ue.prototype, "value", 2);
3972
- Ue = At([
3973
- u("pigeon-spacing-input")
3974
- ], Ue);
3975
- var Ui = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, le = (e, t, o, r) => {
3976
- for (var i = r > 1 ? void 0 : r ? Ki(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3621
+ ], Te.prototype, "value", 2);
3622
+ Te = lt([
3623
+ h("pigeon-spacing-input")
3624
+ ], Te);
3625
+ var No = Object.defineProperty, Wo = Object.getOwnPropertyDescriptor, ee = (e, t, o, r) => {
3626
+ for (var i = r > 1 ? void 0 : r ? Wo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3977
3627
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
3978
- return r && i && Ui(t, o, i), i;
3628
+ return r && i && No(t, o, i), i;
3979
3629
  };
3980
- let L = class extends g {
3630
+ let j = class extends d {
3981
3631
  constructor() {
3982
3632
  super(...arguments), this.label = "", this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.unit = "px";
3983
3633
  }
@@ -4024,7 +3674,7 @@ let L = class extends g {
4024
3674
  }));
4025
3675
  }
4026
3676
  };
4027
- L.styles = b`
3677
+ j.styles = g`
4028
3678
  :host {
4029
3679
  display: block;
4030
3680
  margin-bottom: 12px;
@@ -4124,33 +3774,33 @@ L.styles = b`
4124
3774
  -moz-appearance: textfield;
4125
3775
  }
4126
3776
  `;
4127
- le([
3777
+ ee([
4128
3778
  p({ type: String })
4129
- ], L.prototype, "label", 2);
4130
- le([
3779
+ ], j.prototype, "label", 2);
3780
+ ee([
4131
3781
  p({ type: Number })
4132
- ], L.prototype, "value", 2);
4133
- le([
3782
+ ], j.prototype, "value", 2);
3783
+ ee([
4134
3784
  p({ type: Number })
4135
- ], L.prototype, "min", 2);
4136
- le([
3785
+ ], j.prototype, "min", 2);
3786
+ ee([
4137
3787
  p({ type: Number })
4138
- ], L.prototype, "max", 2);
4139
- le([
3788
+ ], j.prototype, "max", 2);
3789
+ ee([
4140
3790
  p({ type: Number })
4141
- ], L.prototype, "step", 2);
4142
- le([
3791
+ ], j.prototype, "step", 2);
3792
+ ee([
4143
3793
  p({ type: String })
4144
- ], L.prototype, "unit", 2);
4145
- L = le([
4146
- u("pigeon-slider-input")
4147
- ], L);
4148
- var Wi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, we = (e, t, o, r) => {
4149
- for (var i = r > 1 ? void 0 : r ? qi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3794
+ ], j.prototype, "unit", 2);
3795
+ j = ee([
3796
+ h("pigeon-slider-input")
3797
+ ], j);
3798
+ var qo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ue = (e, t, o, r) => {
3799
+ for (var i = r > 1 ? void 0 : r ? Yo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
4150
3800
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
4151
- return r && i && Wi(t, o, i), i;
3801
+ return r && i && qo(t, o, i), i;
4152
3802
  };
4153
- let X = class extends g {
3803
+ let K = class extends d {
4154
3804
  constructor() {
4155
3805
  super(...arguments), this.tags = [], this.open = !1, this.x = 0, this.y = 0, this._search = "";
4156
3806
  }
@@ -4206,7 +3856,7 @@ let X = class extends g {
4206
3856
  })), this.open = !1, this._search = "";
4207
3857
  }
4208
3858
  };
4209
- X.styles = b`
3859
+ K.styles = g`
4210
3860
  :host {
4211
3861
  display: none;
4212
3862
  }
@@ -4297,32 +3947,32 @@ X.styles = b`
4297
3947
  font-size: 13px;
4298
3948
  }
4299
3949
  `;
4300
- we([
3950
+ ue([
4301
3951
  p({ type: Array })
4302
- ], X.prototype, "tags", 2);
4303
- we([
3952
+ ], K.prototype, "tags", 2);
3953
+ ue([
4304
3954
  p({ type: Boolean, reflect: !0 })
4305
- ], X.prototype, "open", 2);
4306
- we([
3955
+ ], K.prototype, "open", 2);
3956
+ ue([
4307
3957
  p({ type: Number })
4308
- ], X.prototype, "x", 2);
4309
- we([
3958
+ ], K.prototype, "x", 2);
3959
+ ue([
4310
3960
  p({ type: Number })
4311
- ], X.prototype, "y", 2);
4312
- we([
4313
- d()
4314
- ], X.prototype, "_search", 2);
4315
- X = we([
4316
- u("pigeon-merge-tag-picker")
4317
- ], X);
4318
- var Vi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, N = (e, t, o, r) => {
4319
- for (var i = r > 1 ? void 0 : r ? Yi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
3961
+ ], K.prototype, "y", 2);
3962
+ ue([
3963
+ c()
3964
+ ], K.prototype, "_search", 2);
3965
+ K = ue([
3966
+ h("pigeon-merge-tag-picker")
3967
+ ], K);
3968
+ var Vo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, M = (e, t, o, r) => {
3969
+ for (var i = r > 1 ? void 0 : r ? Xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
4320
3970
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
4321
- return r && i && Vi(t, o, i), i;
3971
+ return r && i && Vo(t, o, i), i;
4322
3972
  };
4323
- let S = class extends g {
3973
+ let I = class extends d {
4324
3974
  constructor() {
4325
- super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
3975
+ super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ie(), this._triggerRef = ie();
4326
3976
  }
4327
3977
  render() {
4328
3978
  if (!this.block) return l``;
@@ -4334,13 +3984,13 @@ let S = class extends g {
4334
3984
  <div class="label-row">
4335
3985
  <label>${s("panel.common.contentHtml")}</label>
4336
3986
  ${t || this.requestMergeTags ? l`
4337
- <button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
3987
+ <button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
4338
3988
  ${s("panel.common.tagBtn")}
4339
3989
  </button>
4340
3990
  ` : ""}
4341
3991
  </div>
4342
3992
  <textarea
4343
- ${ve(this._textareaRef)}
3993
+ ${re(this._textareaRef)}
4344
3994
  .value=${e.content}
4345
3995
  @change=${this._onContentChange}
4346
3996
  ></textarea>
@@ -4397,18 +4047,18 @@ let S = class extends g {
4397
4047
  }
4398
4048
  }
4399
4049
  _onMergeTagInsert(e) {
4400
- const t = So.getActive();
4050
+ const t = Pt.getActive();
4401
4051
  if (t && !t.isDestroyed) {
4402
- const v = this._extractTagName(e.detail.tag.name);
4403
- t.chain().focus().insertContent({ type: "mergeTag", attrs: { name: v } }).run(), this._pickerOpen = !1;
4052
+ const y = this._extractTagName(e.detail.tag.name);
4053
+ t.chain().focus().insertContent({ type: "mergeTag", attrs: { name: y } }).run(), this._pickerOpen = !1;
4404
4054
  return;
4405
4055
  }
4406
4056
  const o = this._textareaRef.value;
4407
4057
  if (!o) return;
4408
- const r = o.selectionStart, i = o.selectionEnd, n = o.value, a = e.detail.tag.name, h = n.substring(0, r) + a + n.substring(i);
4409
- o.value = h;
4410
- const c = r + a.length;
4411
- o.setSelectionRange(c, c), o.focus(), this._emit({ content: h }), this._pickerOpen = !1;
4058
+ const r = o.selectionStart, i = o.selectionEnd, n = o.value, a = e.detail.tag.name, u = n.substring(0, r) + a + n.substring(i);
4059
+ o.value = u;
4060
+ const b = r + a.length;
4061
+ o.setSelectionRange(b, b), o.focus(), this._emit({ content: u }), this._pickerOpen = !1;
4412
4062
  }
4413
4063
  /** Strip `{{` and `}}` from a tag name string. */
4414
4064
  _extractTagName(e) {
@@ -4442,9 +4092,9 @@ let S = class extends g {
4442
4092
  this._emit({ padding: e.detail.value });
4443
4093
  }
4444
4094
  };
4445
- S.styles = [
4446
- I,
4447
- b`
4095
+ I.styles = [
4096
+ $,
4097
+ g`
4448
4098
  /* Content textarea uses the monospace face so the HTML payload is
4449
4099
  readable to authors editing the raw markup. */
4450
4100
  textarea {
@@ -4487,47 +4137,47 @@ S.styles = [
4487
4137
  }
4488
4138
  `
4489
4139
  ];
4490
- N([
4140
+ M([
4491
4141
  p({ type: Object })
4492
- ], S.prototype, "block", 2);
4493
- N([
4142
+ ], I.prototype, "block", 2);
4143
+ M([
4494
4144
  p({ type: String })
4495
- ], S.prototype, "rowId", 2);
4496
- N([
4145
+ ], I.prototype, "rowId", 2);
4146
+ M([
4497
4147
  p({ type: String })
4498
- ], S.prototype, "columnId", 2);
4499
- N([
4148
+ ], I.prototype, "columnId", 2);
4149
+ M([
4500
4150
  p({ type: Array })
4501
- ], S.prototype, "mergeTags", 2);
4502
- N([
4151
+ ], I.prototype, "mergeTags", 2);
4152
+ M([
4503
4153
  p({ attribute: !1 })
4504
- ], S.prototype, "requestMergeTags", 2);
4505
- N([
4506
- d()
4507
- ], S.prototype, "_pickerOpen", 2);
4508
- N([
4509
- d()
4510
- ], S.prototype, "_pickerX", 2);
4511
- N([
4512
- d()
4513
- ], S.prototype, "_pickerY", 2);
4514
- S = N([
4515
- u("pigeon-text-panel")
4516
- ], S);
4517
- var Xi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, w = (e, t, o, r) => {
4518
- for (var i = r > 1 ? void 0 : r ? Gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
4154
+ ], I.prototype, "requestMergeTags", 2);
4155
+ M([
4156
+ c()
4157
+ ], I.prototype, "_pickerOpen", 2);
4158
+ M([
4159
+ c()
4160
+ ], I.prototype, "_pickerX", 2);
4161
+ M([
4162
+ c()
4163
+ ], I.prototype, "_pickerY", 2);
4164
+ I = M([
4165
+ h("pigeon-text-panel")
4166
+ ], I);
4167
+ var Jo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, _ = (e, t, o, r) => {
4168
+ for (var i = r > 1 ? void 0 : r ? Go(t, o) : t, n = e.length - 1, a; n >= 0; n--)
4519
4169
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
4520
- return r && i && Xi(t, o, i), i;
4170
+ return r && i && Jo(t, o, i), i;
4521
4171
  };
4522
- let mt = null;
4523
- function Ji() {
4524
- return mt || (mt = import("./pigeon-stock-tab.js")), mt;
4172
+ let Ve = null;
4173
+ function Zo() {
4174
+ return Ve || (Ve = import("./pigeon-stock-tab.js")), Ve;
4525
4175
  }
4526
- const Zi = 250, Ye = "__all__";
4527
- let x = class extends g {
4176
+ const Qo = 250, De = "__all__";
4177
+ let f = class extends d {
4528
4178
  constructor() {
4529
- super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._stockTabLoaded = !1, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder = Ye, this._search = "", this._selectedTags = [], this._folders = [], this._assets = [], this._libraryLoading = !1, this._libraryError = "", this._searchTimer = null, this._libraryToken = 0, this._handleStockTabClick = async () => {
4530
- this._tab = "stock", this._stockTabLoaded || (await Ji(), this._stockTabLoaded = !0);
4179
+ super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._stockTabLoaded = !1, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder = De, this._search = "", this._selectedTags = [], this._folders = [], this._assets = [], this._libraryLoading = !1, this._libraryError = "", this._searchTimer = null, this._libraryToken = 0, this._handleStockTabClick = async () => {
4180
+ this._tab = "stock", this._stockTabLoaded || (await Zo(), this._stockTabLoaded = !0);
4531
4181
  };
4532
4182
  }
4533
4183
  /* ----------------------------------------------------------------- */
@@ -4557,7 +4207,7 @@ let x = class extends g {
4557
4207
  <h3>${e ? s("asset.title") : s("asset.title-upload")}</h3>
4558
4208
  <button class="close-btn" @click=${this._close} aria-label=${s("asset.close")}>&times;</button>
4559
4209
  </div>
4560
- ${t ? this._renderTabs(e) : te}
4210
+ ${t ? this._renderTabs(e) : J}
4561
4211
  <div class="body">
4562
4212
  ${this._activeTab === "stock" && this._hasStock ? this._renderStock() : e && this._activeTab === "library" ? this._renderLibrary() : this._renderUpload()}
4563
4213
  </div>
@@ -4573,7 +4223,7 @@ let x = class extends g {
4573
4223
  role="tab"
4574
4224
  aria-selected=${t === "library"}
4575
4225
  @click=${() => this._tab = "library"}
4576
- >${s("asset.tab.library")}</button>` : te}
4226
+ >${s("asset.tab.library")}</button>` : J}
4577
4227
  <button
4578
4228
  class="tab ${t === "upload" ? "active" : ""}"
4579
4229
  role="tab"
@@ -4587,7 +4237,7 @@ let x = class extends g {
4587
4237
  role="tab"
4588
4238
  aria-selected=${t === "stock"}
4589
4239
  @click=${this._handleStockTabClick}
4590
- >${s("asset.tab.stock")}</button>` : te}
4240
+ >${s("asset.tab.stock")}</button>` : J}
4591
4241
  </div>
4592
4242
  `;
4593
4243
  }
@@ -4605,7 +4255,7 @@ let x = class extends g {
4605
4255
  .value=${this._folder}
4606
4256
  @change=${this._onFolderChange}
4607
4257
  >
4608
- <option value=${Ye}>${s("asset.folder.all")}</option>
4258
+ <option value=${De}>${s("asset.folder.all")}</option>
4609
4259
  ${this._folders.map(
4610
4260
  (e) => l`<option value=${e} ?selected=${this._folder === e}>${e}</option>`
4611
4261
  )}
@@ -4626,10 +4276,10 @@ let x = class extends g {
4626
4276
  @click=${() => this._toggleTag(e)}
4627
4277
  >${e}</button>`
4628
4278
  )}
4629
- </div>` : te}
4630
- ${this._libraryError ? l`<div class="error">${this._libraryError}</div>` : te}
4279
+ </div>` : J}
4280
+ ${this._libraryError ? l`<div class="error">${this._libraryError}</div>` : J}
4631
4281
  ${this._libraryLoading ? l`<div class="library-spinner">${s("asset.loading")}</div>` : this._assets.length === 0 ? l`<div class="empty-library">
4632
- ${this._search || this._selectedTags.length > 0 || this._folder !== Ye ? s("asset.empty.filtered") : s("asset.empty.no-assets")}
4282
+ ${this._search || this._selectedTags.length > 0 || this._folder !== De ? s("asset.empty.filtered") : s("asset.empty.no-assets")}
4633
4283
  </div>` : l`<div class="asset-grid">
4634
4284
  ${this._assets.map((e) => this._renderAssetCard(e))}
4635
4285
  </div>`}
@@ -4672,9 +4322,9 @@ let x = class extends g {
4672
4322
 
4673
4323
  ${this._uploading ? l`<div class="progress-bar">
4674
4324
  <div class="progress-fill" style="width: ${this._progress}%"></div>
4675
- </div>` : te}
4325
+ </div>` : J}
4676
4326
 
4677
- ${this._error ? l`<div class="error">${this._error}</div>` : te}
4327
+ ${this._error ? l`<div class="error">${this._error}</div>` : J}
4678
4328
 
4679
4329
  <div class="separator">${s("asset.url.separator")}</div>
4680
4330
 
@@ -4707,7 +4357,7 @@ let x = class extends g {
4707
4357
  this._libraryLoading = !0, this._libraryError = "";
4708
4358
  try {
4709
4359
  const t = await this.storage.list({
4710
- folder: this._folder === Ye ? void 0 : this._folder,
4360
+ folder: this._folder === De ? void 0 : this._folder,
4711
4361
  search: this._search.trim() || void 0,
4712
4362
  tags: this._selectedTags.length > 0 ? this._selectedTags : void 0
4713
4363
  });
@@ -4732,7 +4382,7 @@ let x = class extends g {
4732
4382
  this._folder = e.target.value, this._loadAssets();
4733
4383
  }
4734
4384
  _onSearchInput(e) {
4735
- this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(), Zi);
4385
+ this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(), Qo);
4736
4386
  }
4737
4387
  _toggleTag(e) {
4738
4388
  this._selectedTags = this._selectedTags.includes(e) ? this._selectedTags.filter((t) => t !== e) : [...this._selectedTags, e], this._loadAssets();
@@ -4808,15 +4458,15 @@ let x = class extends g {
4808
4458
  const i = await this.config.presignedUpload.getUploadParams(e);
4809
4459
  this._progress = 40;
4810
4460
  const n = i.method ?? "PUT", a = { ...i.headers ?? {} };
4811
- let h;
4461
+ let u;
4812
4462
  if (n === "POST") {
4813
- const v = new FormData();
4814
- for (const [m, f] of Object.entries(i.fields ?? {})) v.append(m, f);
4815
- v.append("file", e), h = v;
4463
+ const y = new FormData();
4464
+ for (const [X, pt] of Object.entries(i.fields ?? {})) y.append(X, pt);
4465
+ y.append("file", e), u = y;
4816
4466
  } else
4817
- h = e, Object.keys(a).some((m) => m.toLowerCase() === "content-type") || (a["Content-Type"] = e.type);
4818
- const c = await fetch(i.uploadUrl, { method: n, headers: a, body: h });
4819
- if (this._progress = 90, !c.ok) throw new Error(`Upload failed: ${c.status} ${c.statusText}`);
4467
+ u = e, Object.keys(a).some((X) => X.toLowerCase() === "content-type") || (a["Content-Type"] = e.type);
4468
+ const b = await fetch(i.uploadUrl, { method: n, headers: a, body: u });
4469
+ if (this._progress = 90, !b.ok) throw new Error(`Upload failed: ${b.status} ${b.statusText}`);
4820
4470
  this._progress = 100, this._selectAsset(i.publicUrl);
4821
4471
  } catch (i) {
4822
4472
  this._error = i instanceof Error ? i.message : "Upload failed";
@@ -4836,9 +4486,9 @@ let x = class extends g {
4836
4486
  body: i
4837
4487
  });
4838
4488
  if (this._progress = 80, !n.ok) throw new Error(`Upload failed: ${n.statusText}`);
4839
- const a = await n.json(), h = a.url || a.src || a.location;
4840
- if (!h) throw new Error("No URL in upload response");
4841
- this._progress = 100, this._selectAsset(h);
4489
+ const a = await n.json(), u = a.url || a.src || a.location;
4490
+ if (!u) throw new Error("No URL in upload response");
4491
+ this._progress = 100, this._selectAsset(u);
4842
4492
  } catch (i) {
4843
4493
  this._error = i instanceof Error ? i.message : "Upload failed";
4844
4494
  } finally {
@@ -4864,7 +4514,7 @@ let x = class extends g {
4864
4514
  ), this._close();
4865
4515
  }
4866
4516
  };
4867
- x.styles = b`
4517
+ f.styles = g`
4868
4518
  :host {
4869
4519
  display: none;
4870
4520
  }
@@ -5195,66 +4845,66 @@ x.styles = b`
5195
4845
  margin-top: 8px;
5196
4846
  }
5197
4847
  `;
5198
- w([
4848
+ _([
5199
4849
  p({ type: Object })
5200
- ], x.prototype, "config", 2);
5201
- w([
4850
+ ], f.prototype, "config", 2);
4851
+ _([
5202
4852
  p({ attribute: !1 })
5203
- ], x.prototype, "storage", 2);
5204
- w([
4853
+ ], f.prototype, "storage", 2);
4854
+ _([
5205
4855
  p({ type: Boolean, reflect: !0 })
5206
- ], x.prototype, "open", 2);
5207
- w([
5208
- d()
5209
- ], x.prototype, "_tab", 2);
5210
- w([
5211
- d()
5212
- ], x.prototype, "_stockTabLoaded", 2);
5213
- w([
5214
- d()
5215
- ], x.prototype, "_dragOver", 2);
5216
- w([
5217
- d()
5218
- ], x.prototype, "_uploading", 2);
5219
- w([
5220
- d()
5221
- ], x.prototype, "_progress", 2);
5222
- w([
5223
- d()
5224
- ], x.prototype, "_error", 2);
5225
- w([
5226
- d()
5227
- ], x.prototype, "_urlInput", 2);
5228
- w([
5229
- d()
5230
- ], x.prototype, "_folder", 2);
5231
- w([
5232
- d()
5233
- ], x.prototype, "_search", 2);
5234
- w([
5235
- d()
5236
- ], x.prototype, "_selectedTags", 2);
5237
- w([
5238
- d()
5239
- ], x.prototype, "_folders", 2);
5240
- w([
5241
- d()
5242
- ], x.prototype, "_assets", 2);
5243
- w([
5244
- d()
5245
- ], x.prototype, "_libraryLoading", 2);
5246
- w([
5247
- d()
5248
- ], x.prototype, "_libraryError", 2);
5249
- x = w([
5250
- u("pigeon-asset-manager")
5251
- ], x);
5252
- var Qi = Object.defineProperty, er = Object.getOwnPropertyDescriptor, pe = (e, t, o, r) => {
5253
- for (var i = r > 1 ? void 0 : r ? er(t, o) : t, n = e.length - 1, a; n >= 0; n--)
4856
+ ], f.prototype, "open", 2);
4857
+ _([
4858
+ c()
4859
+ ], f.prototype, "_tab", 2);
4860
+ _([
4861
+ c()
4862
+ ], f.prototype, "_stockTabLoaded", 2);
4863
+ _([
4864
+ c()
4865
+ ], f.prototype, "_dragOver", 2);
4866
+ _([
4867
+ c()
4868
+ ], f.prototype, "_uploading", 2);
4869
+ _([
4870
+ c()
4871
+ ], f.prototype, "_progress", 2);
4872
+ _([
4873
+ c()
4874
+ ], f.prototype, "_error", 2);
4875
+ _([
4876
+ c()
4877
+ ], f.prototype, "_urlInput", 2);
4878
+ _([
4879
+ c()
4880
+ ], f.prototype, "_folder", 2);
4881
+ _([
4882
+ c()
4883
+ ], f.prototype, "_search", 2);
4884
+ _([
4885
+ c()
4886
+ ], f.prototype, "_selectedTags", 2);
4887
+ _([
4888
+ c()
4889
+ ], f.prototype, "_folders", 2);
4890
+ _([
4891
+ c()
4892
+ ], f.prototype, "_assets", 2);
4893
+ _([
4894
+ c()
4895
+ ], f.prototype, "_libraryLoading", 2);
4896
+ _([
4897
+ c()
4898
+ ], f.prototype, "_libraryError", 2);
4899
+ f = _([
4900
+ h("pigeon-asset-manager")
4901
+ ], f);
4902
+ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, te = (e, t, o, r) => {
4903
+ for (var i = r > 1 ? void 0 : r ? ti(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5254
4904
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
5255
- return r && i && Qi(t, o, i), i;
4905
+ return r && i && ei(t, o, i), i;
5256
4906
  };
5257
- let z = class extends g {
4907
+ let R = class extends d {
5258
4908
  constructor() {
5259
4909
  super(...arguments), this.rowId = "", this.columnId = "", this._assetManagerOpen = !1;
5260
4910
  }
@@ -5375,41 +5025,41 @@ let z = class extends g {
5375
5025
  this._emit({ src: e.detail.url }), this._assetManagerOpen = !1;
5376
5026
  }
5377
5027
  };
5378
- z.styles = [
5379
- I,
5380
- b`
5028
+ R.styles = [
5029
+ $,
5030
+ g`
5381
5031
  .upload-btn {
5382
5032
  margin-top: 6px;
5383
5033
  }
5384
5034
  `
5385
5035
  ];
5386
- pe([
5036
+ te([
5387
5037
  p({ type: Object })
5388
- ], z.prototype, "block", 2);
5389
- pe([
5038
+ ], R.prototype, "block", 2);
5039
+ te([
5390
5040
  p({ type: String })
5391
- ], z.prototype, "rowId", 2);
5392
- pe([
5041
+ ], R.prototype, "rowId", 2);
5042
+ te([
5393
5043
  p({ type: String })
5394
- ], z.prototype, "columnId", 2);
5395
- pe([
5044
+ ], R.prototype, "columnId", 2);
5045
+ te([
5396
5046
  p({ type: Object })
5397
- ], z.prototype, "assetManagerConfig", 2);
5398
- pe([
5047
+ ], R.prototype, "assetManagerConfig", 2);
5048
+ te([
5399
5049
  p({ attribute: !1 })
5400
- ], z.prototype, "assetStorage", 2);
5401
- pe([
5402
- d()
5403
- ], z.prototype, "_assetManagerOpen", 2);
5404
- z = pe([
5405
- u("pigeon-image-panel")
5406
- ], z);
5407
- var tr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, at = (e, t, o, r) => {
5408
- for (var i = r > 1 ? void 0 : r ? or(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5050
+ ], R.prototype, "assetStorage", 2);
5051
+ te([
5052
+ c()
5053
+ ], R.prototype, "_assetManagerOpen", 2);
5054
+ R = te([
5055
+ h("pigeon-image-panel")
5056
+ ], R);
5057
+ var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, Ae = (e, t, o, r) => {
5058
+ for (var i = r > 1 ? void 0 : r ? ii(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5409
5059
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
5410
- return r && i && tr(t, o, i), i;
5060
+ return r && i && oi(t, o, i), i;
5411
5061
  };
5412
- let fe = class extends g {
5062
+ let le = class extends d {
5413
5063
  constructor() {
5414
5064
  super(...arguments), this.label = s("control.color.label"), this.value = "#000000", this.swatches = [];
5415
5065
  }
@@ -5428,7 +5078,7 @@ let fe = class extends g {
5428
5078
  type="button"
5429
5079
  title=${`${e.name} (${e.value})`}
5430
5080
  aria-label=${e.name}
5431
- style=${Oo({ background: e.value })}
5081
+ style=${Yt({ background: e.value })}
5432
5082
  @click=${() => this._applySwatch(e.value)}
5433
5083
  ></button>`
5434
5084
  )}
@@ -5454,7 +5104,7 @@ let fe = class extends g {
5454
5104
  }));
5455
5105
  }
5456
5106
  };
5457
- fe.styles = b`
5107
+ le.styles = g`
5458
5108
  :host {
5459
5109
  display: block;
5460
5110
  margin-bottom: 12px;
@@ -5549,24 +5199,24 @@ fe.styles = b`
5549
5199
  box-shadow: var(--pigeon-ring-shadow);
5550
5200
  }
5551
5201
  `;
5552
- at([
5202
+ Ae([
5553
5203
  p({ type: String })
5554
- ], fe.prototype, "label", 2);
5555
- at([
5204
+ ], le.prototype, "label", 2);
5205
+ Ae([
5556
5206
  p({ type: String })
5557
- ], fe.prototype, "value", 2);
5558
- at([
5207
+ ], le.prototype, "value", 2);
5208
+ Ae([
5559
5209
  p({ attribute: !1 })
5560
- ], fe.prototype, "swatches", 2);
5561
- fe = at([
5562
- u("pigeon-color-picker")
5563
- ], fe);
5564
- var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ke = (e, t, o, r) => {
5565
- for (var i = r > 1 ? void 0 : r ? rr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5210
+ ], le.prototype, "swatches", 2);
5211
+ le = Ae([
5212
+ h("pigeon-color-picker")
5213
+ ], le);
5214
+ var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, be = (e, t, o, r) => {
5215
+ for (var i = r > 1 ? void 0 : r ? ni(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5566
5216
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
5567
- return r && i && ir(t, o, i), i;
5217
+ return r && i && ri(t, o, i), i;
5568
5218
  };
5569
- let G = class extends g {
5219
+ let N = class extends d {
5570
5220
  constructor() {
5571
5221
  super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this.linkTypes = [];
5572
5222
  }
@@ -5728,31 +5378,31 @@ let G = class extends g {
5728
5378
  this._emit({ innerPadding: e.detail.value });
5729
5379
  }
5730
5380
  };
5731
- G.styles = I;
5732
- ke([
5381
+ N.styles = $;
5382
+ be([
5733
5383
  p({ type: Object })
5734
- ], G.prototype, "block", 2);
5735
- ke([
5384
+ ], N.prototype, "block", 2);
5385
+ be([
5736
5386
  p({ type: String })
5737
- ], G.prototype, "rowId", 2);
5738
- ke([
5387
+ ], N.prototype, "rowId", 2);
5388
+ be([
5739
5389
  p({ type: String })
5740
- ], G.prototype, "columnId", 2);
5741
- ke([
5390
+ ], N.prototype, "columnId", 2);
5391
+ be([
5742
5392
  p({ attribute: !1 })
5743
- ], G.prototype, "swatches", 2);
5744
- ke([
5393
+ ], N.prototype, "swatches", 2);
5394
+ be([
5745
5395
  p({ attribute: !1 })
5746
- ], G.prototype, "linkTypes", 2);
5747
- G = ke([
5748
- u("pigeon-button-panel")
5749
- ], G);
5750
- var nr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, lo = (e, t, o, r) => {
5751
- for (var i = r > 1 ? void 0 : r ? ar(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5396
+ ], N.prototype, "linkTypes", 2);
5397
+ N = be([
5398
+ h("pigeon-button-panel")
5399
+ ], N);
5400
+ var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor, It = (e, t, o, r) => {
5401
+ for (var i = r > 1 ? void 0 : r ? si(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5752
5402
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
5753
- return r && i && nr(t, o, i), i;
5403
+ return r && i && ai(t, o, i), i;
5754
5404
  };
5755
- let et = class extends g {
5405
+ let Re = class extends d {
5756
5406
  get _layouts() {
5757
5407
  return [
5758
5408
  { label: s("panel.row.layout1col"), ratios: [12] },
@@ -5871,9 +5521,9 @@ let et = class extends g {
5871
5521
  this._emitRowUpdate({ condition: t || void 0 });
5872
5522
  }
5873
5523
  };
5874
- et.styles = [
5875
- I,
5876
- b`
5524
+ Re.styles = [
5525
+ $,
5526
+ g`
5877
5527
  .hint {
5878
5528
  margin: 4px 0 0;
5879
5529
  font-size: 11px;
@@ -5942,18 +5592,18 @@ et.styles = [
5942
5592
  }
5943
5593
  `
5944
5594
  ];
5945
- lo([
5595
+ It([
5946
5596
  p({ type: Object })
5947
- ], et.prototype, "row", 2);
5948
- et = lo([
5949
- u("pigeon-row-panel")
5950
- ], et);
5951
- var sr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, st = (e, t, o, r) => {
5952
- for (var i = r > 1 ? void 0 : r ? lr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5597
+ ], Re.prototype, "row", 2);
5598
+ Re = It([
5599
+ h("pigeon-row-panel")
5600
+ ], Re);
5601
+ var li = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, Fe = (e, t, o, r) => {
5602
+ for (var i = r > 1 ? void 0 : r ? pi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5953
5603
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
5954
- return r && i && sr(t, o, i), i;
5604
+ return r && i && li(t, o, i), i;
5955
5605
  };
5956
- const Zt = [
5606
+ const xt = [
5957
5607
  { label: "Arial", value: "Arial, Helvetica, sans-serif" },
5958
5608
  { label: "Georgia", value: "Georgia, Times, serif" },
5959
5609
  { label: "Courier New", value: "'Courier New', Courier, monospace" },
@@ -5962,13 +5612,13 @@ const Zt = [
5962
5612
  { label: "Trebuchet MS", value: "'Trebuchet MS', sans-serif" },
5963
5613
  { label: "Times New Roman", value: "'Times New Roman', Times, serif" }
5964
5614
  ];
5965
- let me = class extends g {
5615
+ let pe = class extends d {
5966
5616
  constructor() {
5967
5617
  super(...arguments), this.label = s("control.fontPicker.label"), this.value = "", this.brandFonts = [];
5968
5618
  }
5969
5619
  get _options() {
5970
- const e = new Set(Zt.map((o) => o.value)), t = this.brandFonts.filter((o) => !e.has(o.family)).map((o) => ({ label: o.name, value: o.family }));
5971
- return [...Zt, ...t];
5620
+ const e = new Set(xt.map((o) => o.value)), t = this.brandFonts.filter((o) => !e.has(o.family)).map((o) => ({ label: o.name, value: o.family }));
5621
+ return [...xt, ...t];
5972
5622
  }
5973
5623
  render() {
5974
5624
  return l`
@@ -5990,7 +5640,7 @@ let me = class extends g {
5990
5640
  );
5991
5641
  }
5992
5642
  };
5993
- me.styles = b`
5643
+ pe.styles = g`
5994
5644
  :host {
5995
5645
  display: block;
5996
5646
  margin-bottom: 12px;
@@ -6016,26 +5666,26 @@ me.styles = b`
6016
5666
  box-sizing: border-box;
6017
5667
  }
6018
5668
  `;
6019
- st([
5669
+ Fe([
6020
5670
  p({ type: String })
6021
- ], me.prototype, "label", 2);
6022
- st([
5671
+ ], pe.prototype, "label", 2);
5672
+ Fe([
6023
5673
  p({ type: String })
6024
- ], me.prototype, "value", 2);
6025
- st([
5674
+ ], pe.prototype, "value", 2);
5675
+ Fe([
6026
5676
  p({ attribute: !1 })
6027
- ], me.prototype, "brandFonts", 2);
6028
- me = st([
6029
- u("pigeon-font-picker")
6030
- ], me);
6031
- var pr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, U = (e, t, o, r) => {
6032
- for (var i = r > 1 ? void 0 : r ? cr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5677
+ ], pe.prototype, "brandFonts", 2);
5678
+ pe = Fe([
5679
+ h("pigeon-font-picker")
5680
+ ], pe);
5681
+ var ci = Object.defineProperty, di = Object.getOwnPropertyDescriptor, A = (e, t, o, r) => {
5682
+ for (var i = r > 1 ? void 0 : r ? di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6033
5683
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6034
- return r && i && pr(t, o, i), i;
5684
+ return r && i && ci(t, o, i), i;
6035
5685
  };
6036
- let O = class extends g {
5686
+ let P = class extends d {
6037
5687
  constructor() {
6038
- super(...arguments), this.mergeTags = [], this.requestMergeTags = !1, this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = be(), this._triggerRef = be();
5688
+ super(...arguments), this.mergeTags = [], this.requestMergeTags = !1, this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = ie(), this._triggerRef = ie();
6039
5689
  }
6040
5690
  render() {
6041
5691
  if (!this.doc) return l``;
@@ -6093,14 +5743,14 @@ let O = class extends g {
6093
5743
  <div class="label-row">
6094
5744
  <label>${s("panel.body.previewText")}</label>
6095
5745
  ${this.mergeTags.length > 0 || this.requestMergeTags ? l`
6096
- <button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
5746
+ <button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
6097
5747
  ${s("panel.common.tagBtn")}
6098
5748
  </button>
6099
5749
  ` : ""}
6100
5750
  </div>
6101
5751
  <input
6102
5752
  type="text"
6103
- ${ve(this._previewInputRef)}
5753
+ ${re(this._previewInputRef)}
6104
5754
  .value=${this.doc.metadata.previewText ?? ""}
6105
5755
  placeholder=${s("panel.body.previewTextPlaceholder")}
6106
5756
  @change=${this._onPreviewTextChange}
@@ -6166,9 +5816,9 @@ let O = class extends g {
6166
5816
  this._emit({ metaField: "previewText", value: e.target.value });
6167
5817
  }
6168
5818
  };
6169
- O.styles = [
6170
- I,
6171
- b`
5819
+ P.styles = [
5820
+ $,
5821
+ g`
6172
5822
  .alignment-buttons {
6173
5823
  display: flex;
6174
5824
  gap: 0;
@@ -6240,39 +5890,39 @@ O.styles = [
6240
5890
  }
6241
5891
  `
6242
5892
  ];
6243
- U([
5893
+ A([
6244
5894
  p({ type: Object })
6245
- ], O.prototype, "doc", 2);
6246
- U([
5895
+ ], P.prototype, "doc", 2);
5896
+ A([
6247
5897
  p({ type: Array })
6248
- ], O.prototype, "mergeTags", 2);
6249
- U([
5898
+ ], P.prototype, "mergeTags", 2);
5899
+ A([
6250
5900
  p({ attribute: !1 })
6251
- ], O.prototype, "requestMergeTags", 2);
6252
- U([
5901
+ ], P.prototype, "requestMergeTags", 2);
5902
+ A([
6253
5903
  p({ attribute: !1 })
6254
- ], O.prototype, "swatches", 2);
6255
- U([
5904
+ ], P.prototype, "swatches", 2);
5905
+ A([
6256
5906
  p({ attribute: !1 })
6257
- ], O.prototype, "brandFonts", 2);
6258
- U([
6259
- d()
6260
- ], O.prototype, "_pickerOpen", 2);
6261
- U([
6262
- d()
6263
- ], O.prototype, "_pickerX", 2);
6264
- U([
6265
- d()
6266
- ], O.prototype, "_pickerY", 2);
6267
- O = U([
6268
- u("pigeon-body-panel")
6269
- ], O);
6270
- var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, ee = (e, t, o, r) => {
6271
- for (var i = r > 1 ? void 0 : r ? hr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
5907
+ ], P.prototype, "brandFonts", 2);
5908
+ A([
5909
+ c()
5910
+ ], P.prototype, "_pickerOpen", 2);
5911
+ A([
5912
+ c()
5913
+ ], P.prototype, "_pickerX", 2);
5914
+ A([
5915
+ c()
5916
+ ], P.prototype, "_pickerY", 2);
5917
+ P = A([
5918
+ h("pigeon-body-panel")
5919
+ ], P);
5920
+ var hi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, V = (e, t, o, r) => {
5921
+ for (var i = r > 1 ? void 0 : r ? gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6272
5922
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6273
- return r && i && dr(t, o, i), i;
5923
+ return r && i && hi(t, o, i), i;
6274
5924
  };
6275
- let j = class extends g {
5925
+ let D = class extends d {
6276
5926
  constructor() {
6277
5927
  super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this._assetManagerOpen = !1;
6278
5928
  }
@@ -6425,37 +6075,37 @@ let j = class extends g {
6425
6075
  this._emit({ backgroundUrl: e.detail.url }), this._assetManagerOpen = !1;
6426
6076
  }
6427
6077
  };
6428
- j.styles = [I];
6429
- ee([
6078
+ D.styles = [$];
6079
+ V([
6430
6080
  p({ type: Object })
6431
- ], j.prototype, "block", 2);
6432
- ee([
6081
+ ], D.prototype, "block", 2);
6082
+ V([
6433
6083
  p({ type: String })
6434
- ], j.prototype, "rowId", 2);
6435
- ee([
6084
+ ], D.prototype, "rowId", 2);
6085
+ V([
6436
6086
  p({ type: String })
6437
- ], j.prototype, "columnId", 2);
6438
- ee([
6087
+ ], D.prototype, "columnId", 2);
6088
+ V([
6439
6089
  p({ type: Object })
6440
- ], j.prototype, "assetManagerConfig", 2);
6441
- ee([
6090
+ ], D.prototype, "assetManagerConfig", 2);
6091
+ V([
6442
6092
  p({ attribute: !1 })
6443
- ], j.prototype, "assetStorage", 2);
6444
- ee([
6093
+ ], D.prototype, "assetStorage", 2);
6094
+ V([
6445
6095
  p({ attribute: !1 })
6446
- ], j.prototype, "swatches", 2);
6447
- ee([
6448
- d()
6449
- ], j.prototype, "_assetManagerOpen", 2);
6450
- j = ee([
6451
- u("pigeon-hero-panel")
6452
- ], j);
6453
- var gr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, Ke = (e, t, o, r) => {
6454
- for (var i = r > 1 ? void 0 : r ? ur(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6096
+ ], D.prototype, "swatches", 2);
6097
+ V([
6098
+ c()
6099
+ ], D.prototype, "_assetManagerOpen", 2);
6100
+ D = V([
6101
+ h("pigeon-hero-panel")
6102
+ ], D);
6103
+ var ui = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Se = (e, t, o, r) => {
6104
+ for (var i = r > 1 ? void 0 : r ? bi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6455
6105
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6456
- return r && i && gr(t, o, i), i;
6106
+ return r && i && ui(t, o, i), i;
6457
6107
  };
6458
- let ae = class extends g {
6108
+ let Z = class extends d {
6459
6109
  constructor() {
6460
6110
  super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
6461
6111
  }
@@ -6592,9 +6242,9 @@ let ae = class extends g {
6592
6242
  this._emit({ padding: e.detail.value });
6593
6243
  }
6594
6244
  };
6595
- ae.styles = [
6596
- I,
6597
- b`
6245
+ Z.styles = [
6246
+ $,
6247
+ g`
6598
6248
  h4 {
6599
6249
  margin: 0 0 8px;
6600
6250
  font-size: 12px;
@@ -6652,27 +6302,27 @@ ae.styles = [
6652
6302
  }
6653
6303
  `
6654
6304
  ];
6655
- Ke([
6305
+ Se([
6656
6306
  p({ type: Object })
6657
- ], ae.prototype, "block", 2);
6658
- Ke([
6307
+ ], Z.prototype, "block", 2);
6308
+ Se([
6659
6309
  p({ type: String })
6660
- ], ae.prototype, "rowId", 2);
6661
- Ke([
6310
+ ], Z.prototype, "rowId", 2);
6311
+ Se([
6662
6312
  p({ type: String })
6663
- ], ae.prototype, "columnId", 2);
6664
- Ke([
6313
+ ], Z.prototype, "columnId", 2);
6314
+ Se([
6665
6315
  p({ attribute: !1 })
6666
- ], ae.prototype, "swatches", 2);
6667
- ae = Ke([
6668
- u("pigeon-navbar-panel")
6669
- ], ae);
6670
- var br = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, We = (e, t, o, r) => {
6671
- for (var i = r > 1 ? void 0 : r ? vr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6316
+ ], Z.prototype, "swatches", 2);
6317
+ Z = Se([
6318
+ h("pigeon-navbar-panel")
6319
+ ], Z);
6320
+ var vi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, Oe = (e, t, o, r) => {
6321
+ for (var i = r > 1 ? void 0 : r ? fi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6672
6322
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6673
- return r && i && br(t, o, i), i;
6323
+ return r && i && vi(t, o, i), i;
6674
6324
  };
6675
- let se = class extends g {
6325
+ let Q = class extends d {
6676
6326
  constructor() {
6677
6327
  super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
6678
6328
  }
@@ -6753,28 +6403,28 @@ let se = class extends g {
6753
6403
  this._emit({ padding: e.detail.value });
6754
6404
  }
6755
6405
  };
6756
- se.styles = I;
6757
- We([
6406
+ Q.styles = $;
6407
+ Oe([
6758
6408
  p({ type: Object })
6759
- ], se.prototype, "block", 2);
6760
- We([
6409
+ ], Q.prototype, "block", 2);
6410
+ Oe([
6761
6411
  p({ type: String })
6762
- ], se.prototype, "rowId", 2);
6763
- We([
6412
+ ], Q.prototype, "rowId", 2);
6413
+ Oe([
6764
6414
  p({ type: String })
6765
- ], se.prototype, "columnId", 2);
6766
- We([
6415
+ ], Q.prototype, "columnId", 2);
6416
+ Oe([
6767
6417
  p({ attribute: !1 })
6768
- ], se.prototype, "swatches", 2);
6769
- se = We([
6770
- u("pigeon-divider-panel")
6771
- ], se);
6772
- var fr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, lt = (e, t, o, r) => {
6773
- for (var i = r > 1 ? void 0 : r ? mr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6418
+ ], Q.prototype, "swatches", 2);
6419
+ Q = Oe([
6420
+ h("pigeon-divider-panel")
6421
+ ], Q);
6422
+ var mi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, He = (e, t, o, r) => {
6423
+ for (var i = r > 1 ? void 0 : r ? _i(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6774
6424
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6775
- return r && i && fr(t, o, i), i;
6425
+ return r && i && mi(t, o, i), i;
6776
6426
  };
6777
- let _e = class extends g {
6427
+ let ce = class extends d {
6778
6428
  constructor() {
6779
6429
  super(...arguments), this.rowId = "", this.columnId = "";
6780
6430
  }
@@ -6811,25 +6461,25 @@ let _e = class extends g {
6811
6461
  this._emit({ height: e.detail.value });
6812
6462
  }
6813
6463
  };
6814
- _e.styles = I;
6815
- lt([
6464
+ ce.styles = $;
6465
+ He([
6816
6466
  p({ type: Object })
6817
- ], _e.prototype, "block", 2);
6818
- lt([
6467
+ ], ce.prototype, "block", 2);
6468
+ He([
6819
6469
  p({ type: String })
6820
- ], _e.prototype, "rowId", 2);
6821
- lt([
6470
+ ], ce.prototype, "rowId", 2);
6471
+ He([
6822
6472
  p({ type: String })
6823
- ], _e.prototype, "columnId", 2);
6824
- _e = lt([
6825
- u("pigeon-spacer-panel")
6826
- ], _e);
6827
- var _r = Object.defineProperty, yr = Object.getOwnPropertyDescriptor, pt = (e, t, o, r) => {
6828
- for (var i = r > 1 ? void 0 : r ? yr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6473
+ ], ce.prototype, "columnId", 2);
6474
+ ce = He([
6475
+ h("pigeon-spacer-panel")
6476
+ ], ce);
6477
+ var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Ue = (e, t, o, r) => {
6478
+ for (var i = r > 1 ? void 0 : r ? xi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6829
6479
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
6830
- return r && i && _r(t, o, i), i;
6480
+ return r && i && yi(t, o, i), i;
6831
6481
  };
6832
- const xr = [
6482
+ const wi = [
6833
6483
  "facebook",
6834
6484
  "twitter",
6835
6485
  "instagram",
@@ -6838,7 +6488,7 @@ const xr = [
6838
6488
  "tiktok",
6839
6489
  "custom"
6840
6490
  ];
6841
- let ye = class extends g {
6491
+ let de = class extends d {
6842
6492
  constructor() {
6843
6493
  super(...arguments), this.rowId = "", this.columnId = "";
6844
6494
  }
@@ -6858,7 +6508,7 @@ let ye = class extends g {
6858
6508
  <div class="field">
6859
6509
  <label>${s("panel.social.network")}</label>
6860
6510
  <select @change=${(r) => this._onIconTypeChange(o, r)}>
6861
- ${xr.map((r) => l`
6511
+ ${wi.map((r) => l`
6862
6512
  <option value=${r} ?selected=${t.type === r}>${r}</option>
6863
6513
  `)}
6864
6514
  </select>
@@ -6982,9 +6632,9 @@ let ye = class extends g {
6982
6632
  this._emit({ padding: e.detail.value });
6983
6633
  }
6984
6634
  };
6985
- ye.styles = [
6986
- I,
6987
- b`
6635
+ de.styles = [
6636
+ $,
6637
+ g`
6988
6638
  h4 {
6989
6639
  margin: 0 0 8px;
6990
6640
  font-size: 12px;
@@ -7042,26 +6692,26 @@ ye.styles = [
7042
6692
  }
7043
6693
  `
7044
6694
  ];
7045
- pt([
6695
+ Ue([
7046
6696
  p({ type: Object })
7047
- ], ye.prototype, "block", 2);
7048
- pt([
6697
+ ], de.prototype, "block", 2);
6698
+ Ue([
7049
6699
  p({ type: String })
7050
- ], ye.prototype, "rowId", 2);
7051
- pt([
6700
+ ], de.prototype, "rowId", 2);
6701
+ Ue([
7052
6702
  p({ type: String })
7053
- ], ye.prototype, "columnId", 2);
7054
- ye = pt([
7055
- u("pigeon-social-panel")
7056
- ], ye);
7057
- var $r = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, K = (e, t, o, r) => {
7058
- for (var i = r > 1 ? void 0 : r ? wr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6703
+ ], de.prototype, "columnId", 2);
6704
+ de = Ue([
6705
+ h("pigeon-social-panel")
6706
+ ], de);
6707
+ var $i = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
6708
+ for (var i = r > 1 ? void 0 : r ? ki(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7059
6709
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
7060
- return r && i && $r(t, o, i), i;
6710
+ return r && i && $i(t, o, i), i;
7061
6711
  };
7062
- let E = class extends g {
6712
+ let T = class extends d {
7063
6713
  constructor() {
7064
- super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
6714
+ super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ie(), this._triggerRef = ie();
7065
6715
  }
7066
6716
  render() {
7067
6717
  if (!this.block) return l``;
@@ -7073,13 +6723,13 @@ let E = class extends g {
7073
6723
  <div class="label-row">
7074
6724
  <label>${s("panel.html.rawHtml")}</label>
7075
6725
  ${t || this.requestMergeTags ? l`
7076
- <button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
6726
+ <button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
7077
6727
  ${s("panel.common.tagBtn")}
7078
6728
  </button>
7079
6729
  ` : ""}
7080
6730
  </div>
7081
6731
  <textarea
7082
- ${ve(this._textareaRef)}
6732
+ ${re(this._textareaRef)}
7083
6733
  .value=${e.content}
7084
6734
  @change=${this._onContentChange}
7085
6735
  ></textarea>
@@ -7139,13 +6789,13 @@ let E = class extends g {
7139
6789
  if (!t) return;
7140
6790
  const o = t.selectionStart, r = t.selectionEnd, i = t.value, n = e.detail.tag.name, a = i.substring(0, o) + n + i.substring(r);
7141
6791
  t.value = a;
7142
- const h = o + n.length;
7143
- t.setSelectionRange(h, h), t.focus(), this._emit({ content: a }), this._pickerOpen = !1;
6792
+ const u = o + n.length;
6793
+ t.setSelectionRange(u, u), t.focus(), this._emit({ content: a }), this._pickerOpen = !1;
7144
6794
  }
7145
6795
  };
7146
- E.styles = [
7147
- I,
7148
- b`
6796
+ T.styles = [
6797
+ $,
6798
+ g`
7149
6799
  /* HTML payload is raw markup — show in monospace and taller than the
7150
6800
  default textarea so authors have room to work. */
7151
6801
  textarea {
@@ -7188,39 +6838,39 @@ E.styles = [
7188
6838
  }
7189
6839
  `
7190
6840
  ];
7191
- K([
6841
+ F([
7192
6842
  p({ type: Object })
7193
- ], E.prototype, "block", 2);
7194
- K([
6843
+ ], T.prototype, "block", 2);
6844
+ F([
7195
6845
  p({ type: String })
7196
- ], E.prototype, "rowId", 2);
7197
- K([
6846
+ ], T.prototype, "rowId", 2);
6847
+ F([
7198
6848
  p({ type: String })
7199
- ], E.prototype, "columnId", 2);
7200
- K([
6849
+ ], T.prototype, "columnId", 2);
6850
+ F([
7201
6851
  p({ type: Array })
7202
- ], E.prototype, "mergeTags", 2);
7203
- K([
6852
+ ], T.prototype, "mergeTags", 2);
6853
+ F([
7204
6854
  p({ attribute: !1 })
7205
- ], E.prototype, "requestMergeTags", 2);
7206
- K([
7207
- d()
7208
- ], E.prototype, "_pickerOpen", 2);
7209
- K([
7210
- d()
7211
- ], E.prototype, "_pickerX", 2);
7212
- K([
7213
- d()
7214
- ], E.prototype, "_pickerY", 2);
7215
- E = K([
7216
- u("pigeon-html-panel")
7217
- ], E);
7218
- var kr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Ce = (e, t, o, r) => {
7219
- for (var i = r > 1 ? void 0 : r ? Cr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6855
+ ], T.prototype, "requestMergeTags", 2);
6856
+ F([
6857
+ c()
6858
+ ], T.prototype, "_pickerOpen", 2);
6859
+ F([
6860
+ c()
6861
+ ], T.prototype, "_pickerX", 2);
6862
+ F([
6863
+ c()
6864
+ ], T.prototype, "_pickerY", 2);
6865
+ T = F([
6866
+ h("pigeon-html-panel")
6867
+ ], T);
6868
+ var Ci = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, ve = (e, t, o, r) => {
6869
+ for (var i = r > 1 ? void 0 : r ? Ii(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7220
6870
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
7221
- return r && i && kr(t, o, i), i;
6871
+ return r && i && Ci(t, o, i), i;
7222
6872
  };
7223
- let J = class extends g {
6873
+ let W = class extends d {
7224
6874
  constructor() {
7225
6875
  super(...arguments), this.rowId = "", this.columnId = "", this.label = "Block", this.schema = [];
7226
6876
  }
@@ -7330,31 +6980,31 @@ let J = class extends g {
7330
6980
  );
7331
6981
  }
7332
6982
  };
7333
- J.styles = I;
7334
- Ce([
6983
+ W.styles = $;
6984
+ ve([
7335
6985
  p({ type: Object })
7336
- ], J.prototype, "block", 2);
7337
- Ce([
6986
+ ], W.prototype, "block", 2);
6987
+ ve([
7338
6988
  p({ type: String })
7339
- ], J.prototype, "rowId", 2);
7340
- Ce([
6989
+ ], W.prototype, "rowId", 2);
6990
+ ve([
7341
6991
  p({ type: String })
7342
- ], J.prototype, "columnId", 2);
7343
- Ce([
6992
+ ], W.prototype, "columnId", 2);
6993
+ ve([
7344
6994
  p({ type: String })
7345
- ], J.prototype, "label", 2);
7346
- Ce([
6995
+ ], W.prototype, "label", 2);
6996
+ ve([
7347
6997
  p({ type: Array })
7348
- ], J.prototype, "schema", 2);
7349
- J = Ce([
7350
- u("pigeon-custom-panel")
7351
- ], J);
7352
- var Ir = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, M = (e, t, o, r) => {
7353
- for (var i = r > 1 ? void 0 : r ? Tr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
6998
+ ], W.prototype, "schema", 2);
6999
+ W = ve([
7000
+ h("pigeon-custom-panel")
7001
+ ], W);
7002
+ var Pi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, B = (e, t, o, r) => {
7003
+ for (var i = r > 1 ? void 0 : r ? Ti(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7354
7004
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
7355
- return r && i && Ir(t, o, i), i;
7005
+ return r && i && Pi(t, o, i), i;
7356
7006
  };
7357
- let C = class extends g {
7007
+ let w = class extends d {
7358
7008
  constructor() {
7359
7009
  super(...arguments), this.selection = null, this.mergeTags = [], this.requestMergeTags = !1, this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
7360
7010
  }
@@ -7461,7 +7111,7 @@ let C = class extends g {
7461
7111
  hero: "Hero",
7462
7112
  navbar: "Navbar"
7463
7113
  }, o = e.type;
7464
- return t[o] ?? ((r = yt(o)) == null ? void 0 : r.label) ?? o;
7114
+ return t[o] ?? ((r = Je(o)) == null ? void 0 : r.label) ?? o;
7465
7115
  }
7466
7116
  _renderBlockPanel(e, t, o) {
7467
7117
  switch (e.type) {
@@ -7497,7 +7147,7 @@ let C = class extends g {
7497
7147
  case "html":
7498
7148
  return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-html-panel>`;
7499
7149
  default: {
7500
- const r = e.type ?? "unknown", i = yt(r);
7150
+ const r = e.type ?? "unknown", i = Je(r);
7501
7151
  return i != null && i.propertySchema && i.propertySchema.length > 0 ? l`<pigeon-custom-panel
7502
7152
  .block=${e}
7503
7153
  .rowId=${t}
@@ -7526,7 +7176,7 @@ let C = class extends g {
7526
7176
  return i.blocks.find((n) => n.id === o);
7527
7177
  }
7528
7178
  };
7529
- C.styles = b`
7179
+ w.styles = g`
7530
7180
  :host {
7531
7181
  display: block;
7532
7182
  width: var(--pigeon-properties-width, 300px);
@@ -7609,42 +7259,42 @@ C.styles = b`
7609
7259
  line-height: 1.5;
7610
7260
  }
7611
7261
  `;
7612
- M([
7262
+ B([
7613
7263
  p({ type: Object })
7614
- ], C.prototype, "doc", 2);
7615
- M([
7264
+ ], w.prototype, "doc", 2);
7265
+ B([
7616
7266
  p({ type: Object })
7617
- ], C.prototype, "selection", 2);
7618
- M([
7267
+ ], w.prototype, "selection", 2);
7268
+ B([
7619
7269
  p({ type: Array })
7620
- ], C.prototype, "mergeTags", 2);
7621
- M([
7270
+ ], w.prototype, "mergeTags", 2);
7271
+ B([
7622
7272
  p({ attribute: !1 })
7623
- ], C.prototype, "requestMergeTags", 2);
7624
- M([
7273
+ ], w.prototype, "requestMergeTags", 2);
7274
+ B([
7625
7275
  p({ attribute: !1 })
7626
- ], C.prototype, "assetManagerConfig", 2);
7627
- M([
7276
+ ], w.prototype, "assetManagerConfig", 2);
7277
+ B([
7628
7278
  p({ attribute: !1 })
7629
- ], C.prototype, "assetStorage", 2);
7630
- M([
7279
+ ], w.prototype, "assetStorage", 2);
7280
+ B([
7631
7281
  p({ attribute: !1 })
7632
- ], C.prototype, "brandKit", 2);
7633
- M([
7282
+ ], w.prototype, "brandKit", 2);
7283
+ B([
7634
7284
  p({ attribute: !1 })
7635
- ], C.prototype, "fontConfig", 2);
7636
- M([
7285
+ ], w.prototype, "fontConfig", 2);
7286
+ B([
7637
7287
  p({ attribute: !1 })
7638
- ], C.prototype, "linkTypes", 2);
7639
- C = M([
7640
- u("pigeon-properties")
7641
- ], C);
7642
- var Pr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, D = (e, t, o, r) => {
7643
- for (var i = r > 1 ? void 0 : r ? Sr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7288
+ ], w.prototype, "linkTypes", 2);
7289
+ w = B([
7290
+ h("pigeon-properties")
7291
+ ], w);
7292
+ var Si = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, S = (e, t, o, r) => {
7293
+ for (var i = r > 1 ? void 0 : r ? Oi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7644
7294
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
7645
- return r && i && Pr(t, o, i), i;
7295
+ return r && i && Si(t, o, i), i;
7646
7296
  };
7647
- let k = class extends g {
7297
+ let x = class extends d {
7648
7298
  constructor() {
7649
7299
  super(...arguments), this.fonts = [], this.open = !1, this._viewMode = "preview", this._device = "desktop", this._htmlContent = "", this._mjmlContent = "", this._loading = !1, this._previouslyFocused = null, this._onKeyDown = (e) => {
7650
7300
  this.open && (e.key === "Escape" ? (e.stopPropagation(), this._close()) : e.key === "Tab" && this._trapTab(e));
@@ -7762,7 +7412,7 @@ let k = class extends g {
7762
7412
  this.open = !1;
7763
7413
  }
7764
7414
  };
7765
- k.styles = b`
7415
+ x.styles = g`
7766
7416
  :host {
7767
7417
  display: none;
7768
7418
  }
@@ -7939,52 +7589,52 @@ k.styles = b`
7939
7589
  font-size: 14px;
7940
7590
  }
7941
7591
  `;
7942
- D([
7592
+ S([
7943
7593
  p({ type: Object })
7944
- ], k.prototype, "renderer", 2);
7945
- D([
7594
+ ], x.prototype, "renderer", 2);
7595
+ S([
7946
7596
  p({ type: Object })
7947
- ], k.prototype, "doc", 2);
7948
- D([
7597
+ ], x.prototype, "doc", 2);
7598
+ S([
7949
7599
  p({ attribute: !1 })
7950
- ], k.prototype, "documentToMjml", 2);
7951
- D([
7600
+ ], x.prototype, "documentToMjml", 2);
7601
+ S([
7952
7602
  p({ attribute: !1 })
7953
- ], k.prototype, "fonts", 2);
7954
- D([
7603
+ ], x.prototype, "fonts", 2);
7604
+ S([
7955
7605
  p({ type: Boolean, reflect: !0 })
7956
- ], k.prototype, "open", 2);
7957
- D([
7958
- d()
7959
- ], k.prototype, "_viewMode", 2);
7960
- D([
7961
- d()
7962
- ], k.prototype, "_device", 2);
7963
- D([
7964
- d()
7965
- ], k.prototype, "_htmlContent", 2);
7966
- D([
7967
- d()
7968
- ], k.prototype, "_mjmlContent", 2);
7969
- D([
7970
- d()
7971
- ], k.prototype, "_loading", 2);
7972
- k = D([
7973
- u("pigeon-preview")
7974
- ], k);
7975
- var Or = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, $ = (e, t, o, r) => {
7976
- for (var i = r > 1 ? void 0 : r ? Er(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7606
+ ], x.prototype, "open", 2);
7607
+ S([
7608
+ c()
7609
+ ], x.prototype, "_viewMode", 2);
7610
+ S([
7611
+ c()
7612
+ ], x.prototype, "_device", 2);
7613
+ S([
7614
+ c()
7615
+ ], x.prototype, "_htmlContent", 2);
7616
+ S([
7617
+ c()
7618
+ ], x.prototype, "_mjmlContent", 2);
7619
+ S([
7620
+ c()
7621
+ ], x.prototype, "_loading", 2);
7622
+ x = S([
7623
+ h("pigeon-preview")
7624
+ ], x);
7625
+ var Ei = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, m = (e, t, o, r) => {
7626
+ for (var i = r > 1 ? void 0 : r ? Di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
7977
7627
  (a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
7978
- return r && i && Or(t, o, i), i;
7628
+ return r && i && Ei(t, o, i), i;
7979
7629
  };
7980
- let _t = null;
7981
- function Dr() {
7982
- return _t || (_t = import("./templates.js").then((e) => e.p)), _t;
7630
+ let Xe = null;
7631
+ function Bi() {
7632
+ return Xe || (Xe = import("./templates.js")), Xe;
7983
7633
  }
7984
- function Qt(e) {
7634
+ function wt(e) {
7985
7635
  return e.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || `template-${Date.now()}`;
7986
7636
  }
7987
- let _ = class extends g {
7637
+ let v = class extends d {
7988
7638
  constructor() {
7989
7639
  super(...arguments), this.theme = "light", this.themeOverrides = {}, this.config = {}, this._canUndo = !1, this._canRedo = !1, this._device = "desktop", this._fullscreen = !1, this._previewOpen = !1, this._templatePickerOpen = !1, this._templatePickerLoaded = !1, this._editingBlockId = null, this._clipboard = null, this._activeBrandKit = null, this._brandKitStorage = null, this._handleBrandKitEdit = async (e) => {
7990
7640
  e.stopPropagation();
@@ -8006,7 +7656,7 @@ let _ = class extends g {
8006
7656
  const t = e.detail.value, o = this._state.selection;
8007
7657
  if ((o == null ? void 0 : o.type) === "block" && o.rowId && o.columnId && o.blockId) {
8008
7658
  const r = this._findBlock(o.rowId, o.columnId, o.blockId);
8009
- (r == null ? void 0 : r.type) === "button" && ct(o.rowId, o.columnId, o.blockId, { backgroundColor: t })(this._state, this._dispatch);
7659
+ (r == null ? void 0 : r.type) === "button" && Ke(o.rowId, o.columnId, o.blockId, { backgroundColor: t })(this._state, this._dispatch);
8010
7660
  return;
8011
7661
  }
8012
7662
  this._applyBodyAttribute("backgroundColor", t);
@@ -8014,20 +7664,20 @@ let _ = class extends g {
8014
7664
  e.stopPropagation(), this._applyBodyAttribute("fontFamily", e.detail.family);
8015
7665
  }, this._handleBrandLogoInsert = (e) => {
8016
7666
  e.stopPropagation();
8017
- const { logo: t } = e.detail, o = Ve("image");
7667
+ const { logo: t } = e.detail, o = Ee("image");
8018
7668
  o.values.src = t.src, o.values.alt = t.name, t.width && (o.values.width = t.width);
8019
7669
  const r = this._state.selection;
8020
7670
  if (r != null && r.rowId && (r != null && r.columnId)) {
8021
- ce(r.rowId, r.columnId, o)(this._state, this._dispatch);
7671
+ oe(r.rowId, r.columnId, o)(this._state, this._dispatch);
8022
7672
  return;
8023
7673
  }
8024
7674
  const i = this._state.doc.body.rows;
8025
7675
  if (i.length > 0) {
8026
7676
  const n = i[i.length - 1], a = n.columns[0];
8027
- ce(n.id, a.id, o, a.blocks.length)(this._state, this._dispatch);
7677
+ oe(n.id, a.id, o, a.blocks.length)(this._state, this._dispatch);
8028
7678
  } else {
8029
- const n = Ie([o]);
8030
- oe(Te([n]), 0)(this._state, this._dispatch);
7679
+ const n = fe([o]);
7680
+ G(me([n]), 0)(this._state, this._dispatch);
8031
7681
  }
8032
7682
  }, this._dispatch = (e) => {
8033
7683
  this._state = this._state.apply(e), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange(), this._fireSelect();
@@ -8037,7 +7687,7 @@ let _ = class extends g {
8037
7687
  const o = window.prompt("Name this saved row");
8038
7688
  if (!o || !o.trim()) return;
8039
7689
  const r = (/* @__PURE__ */ new Date()).toISOString(), i = {
8040
- id: Qt(o),
7690
+ id: wt(o),
8041
7691
  name: o.trim(),
8042
7692
  kind: "row",
8043
7693
  node: structuredClone(t),
@@ -8050,11 +7700,11 @@ let _ = class extends g {
8050
7700
  this._emitRowLibraryError(n, "save");
8051
7701
  }
8052
7702
  }, this._handleRowInsertSaved = (e) => {
8053
- const t = jt(e.detail.node);
8054
- oe(t, e.detail.index)(this._state, this._dispatch);
7703
+ const t = dt(e.detail.node);
7704
+ G(t, e.detail.index)(this._state, this._dispatch);
8055
7705
  }, this._handleLibraryInsert = (e) => {
8056
- const t = jt(e.detail.node);
8057
- oe(t, this._state.doc.body.rows.length)(this._state, this._dispatch);
7706
+ const t = dt(e.detail.node);
7707
+ G(t, this._state.doc.body.rows.length)(this._state, this._dispatch);
8058
7708
  }, this._handleLibraryDelete = async (e) => {
8059
7709
  try {
8060
7710
  await this._resolveRowLibrary().delete(e.detail.id), await this._refreshSavedTab();
@@ -8074,16 +7724,16 @@ let _ = class extends g {
8074
7724
  }
8075
7725
  if (e.key === "Escape") {
8076
7726
  const r = this._state.createTransaction();
8077
- r.setSelection(Mt()), this._dispatch(r);
7727
+ r.setSelection(ht()), this._dispatch(r);
8078
7728
  return;
8079
7729
  }
8080
7730
  if (o) {
8081
7731
  if (e.key === "Delete" || e.key === "Backspace") {
8082
- o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), ho(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), Rt(o.rowId)(this._state, this._dispatch));
7732
+ o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Ot(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), gt(o.rowId)(this._state, this._dispatch));
8083
7733
  return;
8084
7734
  }
8085
7735
  if (t && e.key.toLowerCase() === "d") {
8086
- o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), go(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), Lt(o.rowId)(this._state, this._dispatch));
7736
+ o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Et(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), ut(o.rowId)(this._state, this._dispatch));
8087
7737
  return;
8088
7738
  }
8089
7739
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
@@ -8103,13 +7753,13 @@ let _ = class extends g {
8103
7753
  if (o.type === "block" && o.rowId && o.columnId && o.blockId) {
8104
7754
  e.preventDefault();
8105
7755
  const r = structuredClone(this._clipboard);
8106
- r.id = zt();
7756
+ r.id = bt();
8107
7757
  const i = this._findBlockIndex(o.rowId, o.columnId, o.blockId), n = i >= 0 ? i + 1 : void 0;
8108
- ce(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
7758
+ oe(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
8109
7759
  } else if (o.type === "column" && o.rowId && o.columnId) {
8110
7760
  e.preventDefault();
8111
7761
  const r = structuredClone(this._clipboard);
8112
- r.id = zt(), ce(o.rowId, o.columnId, r)(this._state, this._dispatch);
7762
+ r.id = bt(), oe(o.rowId, o.columnId, r)(this._state, this._dispatch);
8113
7763
  }
8114
7764
  return;
8115
7765
  }
@@ -8120,13 +7770,13 @@ let _ = class extends g {
8120
7770
  /* Lifecycle */
8121
7771
  /* ------------------------------------------------------------------ */
8122
7772
  connectedCallback() {
8123
- super.connectedCallback(), Bt(this.config.locale, this.config.messages), this._state || this._initState(), this._applyDir(), this._resolveBrandKit(), this._applyTheme(), document.addEventListener("keydown", this._handleKeyDown), this.addEventListener("brand-kit-edit", this._handleBrandKitEdit), this.addEventListener("brand-color-apply", this._handleBrandColorApply), this.addEventListener("brand-font-apply", this._handleBrandFontApply), this.addEventListener("brand-logo-insert", this._handleBrandLogoInsert);
7773
+ super.connectedCallback(), ct(this.config.locale, this.config.messages), this._state || this._initState(), this._applyDir(), this._resolveBrandKit(), this._applyTheme(), document.addEventListener("keydown", this._handleKeyDown), this.addEventListener("brand-kit-edit", this._handleBrandKitEdit), this.addEventListener("brand-color-apply", this._handleBrandColorApply), this.addEventListener("brand-font-apply", this._handleBrandFontApply), this.addEventListener("brand-logo-insert", this._handleBrandLogoInsert);
8124
7774
  }
8125
7775
  disconnectedCallback() {
8126
7776
  super.disconnectedCallback(), document.removeEventListener("keydown", this._handleKeyDown), this.removeEventListener("brand-kit-edit", this._handleBrandKitEdit), this.removeEventListener("brand-color-apply", this._handleBrandColorApply), this.removeEventListener("brand-font-apply", this._handleBrandFontApply), this.removeEventListener("brand-logo-insert", this._handleBrandLogoInsert);
8127
7777
  }
8128
7778
  updated(e) {
8129
- e.has("document") && this._state && this.document && this.document !== this._state.doc && this.loadDocument(this.document), e.has("_fullscreen") && (this._fullscreen ? this.setAttribute("fullscreen", "") : this.removeAttribute("fullscreen")), (e.has("theme") || e.has("themeOverrides")) && this._applyTheme(), e.has("config") && (Bt(this.config.locale, this.config.messages), this._applyDir(), this._resolveBrandKit());
7779
+ e.has("document") && this._state && this.document && this.document !== this._state.doc && this.loadDocument(this.document), e.has("_fullscreen") && (this._fullscreen ? this.setAttribute("fullscreen", "") : this.removeAttribute("fullscreen")), (e.has("theme") || e.has("themeOverrides")) && this._applyTheme(), e.has("config") && (ct(this.config.locale, this.config.messages), this._applyDir(), this._resolveBrandKit());
8130
7780
  }
8131
7781
  /**
8132
7782
  * Set the host `dir` attribute based on `config.locale` and `config.dir`.
@@ -8135,7 +7785,7 @@ let _ = class extends g {
8135
7785
  * bidirectional layout support.
8136
7786
  */
8137
7787
  _applyDir() {
8138
- this.setAttribute("dir", po(this.config.locale, this.config.dir));
7788
+ this.setAttribute("dir", Tt(this.config.locale, this.config.dir));
8139
7789
  }
8140
7790
  /**
8141
7791
  * Sync the active `theme` to the host classes the token sheet keys off, and
@@ -8161,19 +7811,19 @@ let _ = class extends g {
8161
7811
  }
8162
7812
  /** Replaces the document entirely (resets history). */
8163
7813
  loadDocument(e) {
8164
- this._state = Ht.create({
7814
+ this._state = vt.create({
8165
7815
  doc: e,
8166
- plugins: [Ft()],
7816
+ plugins: [ft()],
8167
7817
  ...this.config
8168
7818
  }), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange();
8169
7819
  }
8170
7820
  /** Undo the last change. */
8171
7821
  undo() {
8172
- return uo(this._state, this._dispatch);
7822
+ return Dt(this._state, this._dispatch);
8173
7823
  }
8174
7824
  /** Redo the last undone change. */
8175
7825
  redo() {
8176
- return bo(this._state, this._dispatch);
7826
+ return Bt(this._state, this._dispatch);
8177
7827
  }
8178
7828
  /** Export the document as JSON. */
8179
7829
  exportJson() {
@@ -8309,13 +7959,13 @@ let _ = class extends g {
8309
7959
  /* Templates */
8310
7960
  /* ------------------------------------------------------------------ */
8311
7961
  _resolveTemplateStorage() {
8312
- return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new vo()), this._defaultTemplateStorage);
7962
+ return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new jt()), this._defaultTemplateStorage);
8313
7963
  }
8314
7964
  _resolveRowLibrary() {
8315
- return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new fo()), this._defaultRowLibrary);
7965
+ return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new Rt()), this._defaultRowLibrary);
8316
7966
  }
8317
7967
  _linkTypes() {
8318
- return [...mo, ...this.config.linkTypes ?? []];
7968
+ return [...Lt, ...this.config.linkTypes ?? []];
8319
7969
  }
8320
7970
  /**
8321
7971
  * Resolve `config.brandKit` into a single active kit. A plain `BrandKit` is
@@ -8356,7 +8006,7 @@ let _ = class extends g {
8356
8006
  }
8357
8007
  /** Apply a single body attribute through an undoable transaction. */
8358
8008
  _applyBodyAttribute(e, t) {
8359
- const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n = dt(
8009
+ const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n = Ne(
8360
8010
  "updateBodyAttribute",
8361
8011
  `body.attributes.${e}`,
8362
8012
  (a) => {
@@ -8369,7 +8019,7 @@ let _ = class extends g {
8369
8019
  o.addStep(n), this._dispatch(o);
8370
8020
  }
8371
8021
  async _handleTemplatesOpen() {
8372
- this._templatePickerLoaded || (await Dr(), this._templatePickerLoaded = !0), this._templatePickerOpen = !0;
8022
+ this._templatePickerLoaded || (await Bi(), this._templatePickerLoaded = !0), this._templatePickerOpen = !0;
8373
8023
  }
8374
8024
  _handleTemplateLoad(e) {
8375
8025
  var o;
@@ -8380,7 +8030,7 @@ let _ = class extends g {
8380
8030
  async _handleTemplateSave(e) {
8381
8031
  e.stopPropagation();
8382
8032
  const { name: t, description: o, category: r } = e.detail, i = this._resolveTemplateStorage(), n = (/* @__PURE__ */ new Date()).toISOString(), a = {
8383
- id: Qt(t),
8033
+ id: wt(t),
8384
8034
  name: t,
8385
8035
  description: o,
8386
8036
  category: r,
@@ -8389,21 +8039,21 @@ let _ = class extends g {
8389
8039
  updatedAt: n
8390
8040
  };
8391
8041
  await i.save(a);
8392
- const h = this.renderRoot.querySelector(
8042
+ const u = this.renderRoot.querySelector(
8393
8043
  "pigeon-template-picker"
8394
8044
  );
8395
- h && await h.refresh(), this._templatePickerOpen = !1;
8045
+ u && await u.refresh(), this._templatePickerOpen = !1;
8396
8046
  }
8397
8047
  /* ------------------------------------------------------------------ */
8398
8048
  /* Internal: state init & dispatch */
8399
8049
  /* ------------------------------------------------------------------ */
8400
8050
  _initState() {
8401
- const e = this.document ?? this.config.doc ?? _o(), t = this.config.plugins ?? [];
8402
- t.some((r) => r.name === Nt) || t.unshift(Ft()), this._state = Ht.create({ doc: e, plugins: t }), this._syncHistoryFlags();
8051
+ const e = this.document ?? this.config.doc ?? zt(), t = this.config.plugins ?? [];
8052
+ t.some((r) => r.name === mt) || t.unshift(ft()), this._state = vt.create({ doc: e, plugins: t }), this._syncHistoryFlags();
8403
8053
  }
8404
8054
  _syncHistoryFlags() {
8405
- const e = this._state.getPluginState(Nt);
8406
- this._canUndo = e ? yo(e) : !1, this._canRedo = e ? xo(e) : !1;
8055
+ const e = this._state.getPluginState(mt);
8056
+ this._canUndo = e ? Mt(e) : !1, this._canRedo = e ? At(e) : !1;
8407
8057
  }
8408
8058
  /* ------------------------------------------------------------------ */
8409
8059
  /* Internal: event emitters */
@@ -8484,7 +8134,7 @@ let _ = class extends g {
8484
8134
  for (const r of o.columns)
8485
8135
  if (r.blocks.find((n) => n.id === t)) {
8486
8136
  const n = this._state.createTransaction();
8487
- n.setSelection(ht(o.id, r.id, t)), this._dispatch(n), this._editingBlockId = t;
8137
+ n.setSelection(We(o.id, r.id, t)), this._dispatch(n), this._editingBlockId = t;
8488
8138
  return;
8489
8139
  }
8490
8140
  }
@@ -8495,7 +8145,7 @@ let _ = class extends g {
8495
8145
  const r = o.blocks.find((n) => n.id === e.detail.blockId);
8496
8146
  if (!r) continue;
8497
8147
  const i = r.values.content;
8498
- typeof i == "string" && i !== e.detail.content && ct(t.id, o.id, r.id, { content: e.detail.content })(this._state, this._dispatch), this._editingBlockId = null;
8148
+ typeof i == "string" && i !== e.detail.content && Ke(t.id, o.id, r.id, { content: e.detail.content })(this._state, this._dispatch), this._editingBlockId = null;
8499
8149
  return;
8500
8150
  }
8501
8151
  this._editingBlockId = null;
@@ -8508,36 +8158,36 @@ let _ = class extends g {
8508
8158
  for (const r of o.columns)
8509
8159
  if (r.blocks.find((n) => n.id === t)) {
8510
8160
  const n = this._state.createTransaction();
8511
- n.setSelection(ht(o.id, r.id, t)), this._dispatch(n);
8161
+ n.setSelection(We(o.id, r.id, t)), this._dispatch(n);
8512
8162
  return;
8513
8163
  }
8514
8164
  }
8515
8165
  _handleRowSelect(e) {
8516
8166
  this._editingBlockId = null;
8517
8167
  const t = this._state.createTransaction();
8518
- t.setSelection(Ut(e.detail.rowId)), this._dispatch(t);
8168
+ t.setSelection(_t(e.detail.rowId)), this._dispatch(t);
8519
8169
  }
8520
8170
  _handleColumnSelect(e) {
8521
8171
  this._editingBlockId = null;
8522
8172
  const t = this._state.createTransaction();
8523
- t.setSelection($o(e.detail.rowId, e.detail.columnId)), this._dispatch(t);
8173
+ t.setSelection(Ft(e.detail.rowId, e.detail.columnId)), this._dispatch(t);
8524
8174
  }
8525
8175
  _handleBodySelect() {
8526
8176
  this._editingBlockId = null;
8527
8177
  const e = this._state.createTransaction();
8528
- e.setSelection(Mt()), this._dispatch(e);
8178
+ e.setSelection(ht()), this._dispatch(e);
8529
8179
  }
8530
8180
  /* ------------------------------------------------------------------ */
8531
8181
  /* Row action handlers */
8532
8182
  /* ------------------------------------------------------------------ */
8533
8183
  _handleRowMove(e) {
8534
- wo(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
8184
+ Ht(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
8535
8185
  }
8536
8186
  _handleRowDuplicate(e) {
8537
- Lt(e.detail.rowId)(this._state, this._dispatch);
8187
+ ut(e.detail.rowId)(this._state, this._dispatch);
8538
8188
  }
8539
8189
  _handleRowDelete(e) {
8540
- Rt(e.detail.rowId)(this._state, this._dispatch);
8190
+ gt(e.detail.rowId)(this._state, this._dispatch);
8541
8191
  }
8542
8192
  async _refreshSavedTab() {
8543
8193
  var o;
@@ -8584,12 +8234,12 @@ let _ = class extends g {
8584
8234
  _moveBlockSelection(e) {
8585
8235
  const t = this._state.selection;
8586
8236
  if (!t || t.type !== "block" || !t.blockId) return;
8587
- const o = this._flattenBlockLocations(), r = o.findIndex((h) => h.blockId === t.blockId);
8237
+ const o = this._flattenBlockLocations(), r = o.findIndex((u) => u.blockId === t.blockId);
8588
8238
  if (r === -1) return;
8589
8239
  const i = r + e;
8590
8240
  if (i < 0 || i >= o.length) return;
8591
8241
  const n = o[i], a = this._state.createTransaction();
8592
- a.setSelection(ht(n.rowId, n.columnId, n.blockId)), this._dispatch(a);
8242
+ a.setSelection(We(n.rowId, n.columnId, n.blockId)), this._dispatch(a);
8593
8243
  }
8594
8244
  _moveRowSelection(e) {
8595
8245
  const t = this._state.selection;
@@ -8599,7 +8249,7 @@ let _ = class extends g {
8599
8249
  const i = r + e;
8600
8250
  if (i < 0 || i >= o.length) return;
8601
8251
  const n = this._state.createTransaction();
8602
- n.setSelection(Ut(o[i].id)), this._dispatch(n);
8252
+ n.setSelection(_t(o[i].id)), this._dispatch(n);
8603
8253
  }
8604
8254
  _findBlock(e, t, o) {
8605
8255
  const r = this._state.doc.body.rows.find((n) => n.id === e);
@@ -8618,15 +8268,15 @@ let _ = class extends g {
8618
8268
  /* DnD handlers */
8619
8269
  /* ------------------------------------------------------------------ */
8620
8270
  _handleRowDrop(e) {
8621
- const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => Ie()), i = Te(r);
8622
- oe(i, t)(this._state, this._dispatch);
8271
+ const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => fe()), i = me(r);
8272
+ G(i, t)(this._state, this._dispatch);
8623
8273
  }
8624
8274
  _handleBlockDrop(e) {
8625
8275
  const { rowId: t, columnId: o, index: r, dragData: i } = e.detail;
8626
8276
  if (i.type === "palette-block" && i.blockType) {
8627
- const n = Ve(i.blockType);
8628
- ce(t, o, n, r)(this._state, this._dispatch);
8629
- } else i.type === "existing-block" && i.blockId && i.rowId && i.columnId && ko(
8277
+ const n = Ee(i.blockType);
8278
+ oe(t, o, n, r)(this._state, this._dispatch);
8279
+ } else i.type === "existing-block" && i.blockId && i.rowId && i.columnId && Ut(
8630
8280
  i.rowId,
8631
8281
  i.columnId,
8632
8282
  i.blockId,
@@ -8636,8 +8286,8 @@ let _ = class extends g {
8636
8286
  )(this._state, this._dispatch);
8637
8287
  }
8638
8288
  _handleBlockDropNewRow(e) {
8639
- const { blockType: t, rowIndex: o } = e.detail, r = Ve(t), i = Ie([r]), n = Te([i]);
8640
- oe(n, o)(this._state, this._dispatch);
8289
+ const { blockType: t, rowIndex: o } = e.detail, r = Ee(t), i = fe([r]), n = me([i]);
8290
+ G(n, o)(this._state, this._dispatch);
8641
8291
  }
8642
8292
  /**
8643
8293
  * Keyboard equivalent of dragging a palette item onto the canvas: append the
@@ -8647,21 +8297,21 @@ let _ = class extends g {
8647
8297
  _handlePaletteActivate(e) {
8648
8298
  const { type: t, blockType: o, columnCount: r } = e.detail, i = this._state.doc.body.rows;
8649
8299
  if (t === "palette-row") {
8650
- const a = Array.from({ length: r }, () => Ie());
8651
- oe(Te(a), i.length)(this._state, this._dispatch);
8300
+ const a = Array.from({ length: r }, () => fe());
8301
+ G(me(a), i.length)(this._state, this._dispatch);
8652
8302
  return;
8653
8303
  }
8654
8304
  if (!o) return;
8655
- const n = Ve(o);
8305
+ const n = Ee(o);
8656
8306
  if (i.length > 0) {
8657
- const a = i[i.length - 1], h = a.columns[0];
8658
- ce(a.id, h.id, n, h.blocks.length)(
8307
+ const a = i[i.length - 1], u = a.columns[0];
8308
+ oe(a.id, u.id, n, u.blocks.length)(
8659
8309
  this._state,
8660
8310
  this._dispatch
8661
8311
  );
8662
8312
  } else {
8663
- const a = Ie([n]);
8664
- oe(Te([a]), 0)(this._state, this._dispatch);
8313
+ const a = fe([n]);
8314
+ G(me([a]), 0)(this._state, this._dispatch);
8665
8315
  }
8666
8316
  }
8667
8317
  /* ------------------------------------------------------------------ */
@@ -8669,64 +8319,64 @@ let _ = class extends g {
8669
8319
  /* ------------------------------------------------------------------ */
8670
8320
  _handlePropertyChange(e) {
8671
8321
  const { rowId: t, columnId: o, blockId: r, values: i } = e.detail;
8672
- ct(t, o, r, i)(this._state, this._dispatch);
8322
+ Ke(t, o, r, i)(this._state, this._dispatch);
8673
8323
  }
8674
8324
  _handleRowPropertyChange(e) {
8675
8325
  const { rowId: t, attributes: o } = e.detail;
8676
- Co(t, o)(this._state, this._dispatch);
8326
+ Kt(t, o)(this._state, this._dispatch);
8677
8327
  }
8678
8328
  _handleRowLayoutChange(e) {
8679
- const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((c) => c.id === t);
8329
+ const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((b) => b.id === t);
8680
8330
  if (!i) return;
8681
8331
  const n = i.columns.length, a = r;
8682
8332
  if (a > n)
8683
- for (let c = 0; c < a - n; c++)
8684
- Io(t)(this._state, this._dispatch);
8333
+ for (let b = 0; b < a - n; b++)
8334
+ Nt(t)(this._state, this._dispatch);
8685
8335
  else if (a < n)
8686
- for (let c = 0; c < n - a; c++) {
8687
- const v = this._state.doc.body.rows.find((m) => m.id === t);
8688
- if (v && v.columns.length > 1) {
8689
- const m = v.columns[v.columns.length - 1];
8690
- To(t, m.id)(this._state, this._dispatch);
8336
+ for (let b = 0; b < n - a; b++) {
8337
+ const y = this._state.doc.body.rows.find((X) => X.id === t);
8338
+ if (y && y.columns.length > 1) {
8339
+ const X = y.columns[y.columns.length - 1];
8340
+ Wt(t, X.id)(this._state, this._dispatch);
8691
8341
  }
8692
8342
  }
8693
- const h = this._state.doc.body.rows.find((c) => c.id === t);
8694
- h && h.columns.length === o.length && Po(t, o)(this._state, this._dispatch);
8343
+ const u = this._state.doc.body.rows.find((b) => b.id === t);
8344
+ u && u.columns.length === o.length && qt(t, o)(this._state, this._dispatch);
8695
8345
  }
8696
8346
  _handleBodyPropertyChange(e) {
8697
8347
  const { attribute: t, metaField: o, value: r } = e.detail, i = this._state.createTransaction();
8698
8348
  if (t) {
8699
- const a = this._state.doc.body.attributes[t], h = dt(
8349
+ const a = this._state.doc.body.attributes[t], u = Ne(
8700
8350
  "updateBodyAttribute",
8701
8351
  `body.attributes.${t}`,
8702
- (c) => {
8703
- c.body.attributes[t] = r;
8352
+ (b) => {
8353
+ b.body.attributes[t] = r;
8704
8354
  },
8705
- (c) => {
8706
- c.body.attributes[t] = a;
8355
+ (b) => {
8356
+ b.body.attributes[t] = a;
8707
8357
  }
8708
8358
  );
8709
- i.addStep(h);
8359
+ i.addStep(u);
8710
8360
  }
8711
8361
  if (o) {
8712
- const a = this._state.doc.metadata[o], h = dt(
8362
+ const a = this._state.doc.metadata[o], u = Ne(
8713
8363
  "updateMetadata",
8714
8364
  `metadata.${o}`,
8715
- (c) => {
8716
- c.metadata[o] = r;
8365
+ (b) => {
8366
+ b.metadata[o] = r;
8717
8367
  },
8718
- (c) => {
8719
- c.metadata[o] = a;
8368
+ (b) => {
8369
+ b.metadata[o] = a;
8720
8370
  }
8721
8371
  );
8722
- i.addStep(h);
8372
+ i.addStep(u);
8723
8373
  }
8724
8374
  this._dispatch(i);
8725
8375
  }
8726
8376
  };
8727
- _.styles = [
8728
- Eo,
8729
- b`
8377
+ v.styles = [
8378
+ Vt,
8379
+ g`
8730
8380
  :host {
8731
8381
  display: flex;
8732
8382
  flex-direction: column;
@@ -8752,103 +8402,103 @@ _.styles = [
8752
8402
  }
8753
8403
  `
8754
8404
  ];
8755
- $([
8405
+ m([
8756
8406
  p({ type: Object })
8757
- ], _.prototype, "document", 2);
8758
- $([
8407
+ ], v.prototype, "document", 2);
8408
+ m([
8759
8409
  p({ type: String, reflect: !0 })
8760
- ], _.prototype, "theme", 2);
8761
- $([
8410
+ ], v.prototype, "theme", 2);
8411
+ m([
8762
8412
  p({ attribute: !1 })
8763
- ], _.prototype, "themeOverrides", 2);
8764
- $([
8413
+ ], v.prototype, "themeOverrides", 2);
8414
+ m([
8765
8415
  p({ type: Object })
8766
- ], _.prototype, "config", 2);
8767
- $([
8416
+ ], v.prototype, "config", 2);
8417
+ m([
8768
8418
  p({ type: Object })
8769
- ], _.prototype, "renderer", 2);
8770
- $([
8419
+ ], v.prototype, "renderer", 2);
8420
+ m([
8771
8421
  p({ type: Object })
8772
- ], _.prototype, "documentToMjml", 2);
8773
- $([
8422
+ ], v.prototype, "documentToMjml", 2);
8423
+ m([
8774
8424
  p({ attribute: !1 })
8775
- ], _.prototype, "templateStorage", 2);
8776
- $([
8425
+ ], v.prototype, "templateStorage", 2);
8426
+ m([
8777
8427
  p({ attribute: !1 })
8778
- ], _.prototype, "assetStorage", 2);
8779
- $([
8780
- d()
8781
- ], _.prototype, "_state", 2);
8782
- $([
8783
- d()
8784
- ], _.prototype, "_canUndo", 2);
8785
- $([
8786
- d()
8787
- ], _.prototype, "_canRedo", 2);
8788
- $([
8789
- d()
8790
- ], _.prototype, "_device", 2);
8791
- $([
8792
- d()
8793
- ], _.prototype, "_fullscreen", 2);
8794
- $([
8795
- d()
8796
- ], _.prototype, "_previewOpen", 2);
8797
- $([
8798
- d()
8799
- ], _.prototype, "_templatePickerOpen", 2);
8800
- $([
8801
- d()
8802
- ], _.prototype, "_templatePickerLoaded", 2);
8803
- $([
8804
- d()
8805
- ], _.prototype, "_editingBlockId", 2);
8806
- $([
8807
- d()
8808
- ], _.prototype, "_activeBrandKit", 2);
8809
- _ = $([
8810
- u("pigeon-editor")
8811
- ], _);
8428
+ ], v.prototype, "assetStorage", 2);
8429
+ m([
8430
+ c()
8431
+ ], v.prototype, "_state", 2);
8432
+ m([
8433
+ c()
8434
+ ], v.prototype, "_canUndo", 2);
8435
+ m([
8436
+ c()
8437
+ ], v.prototype, "_canRedo", 2);
8438
+ m([
8439
+ c()
8440
+ ], v.prototype, "_device", 2);
8441
+ m([
8442
+ c()
8443
+ ], v.prototype, "_fullscreen", 2);
8444
+ m([
8445
+ c()
8446
+ ], v.prototype, "_previewOpen", 2);
8447
+ m([
8448
+ c()
8449
+ ], v.prototype, "_templatePickerOpen", 2);
8450
+ m([
8451
+ c()
8452
+ ], v.prototype, "_templatePickerLoaded", 2);
8453
+ m([
8454
+ c()
8455
+ ], v.prototype, "_editingBlockId", 2);
8456
+ m([
8457
+ c()
8458
+ ], v.prototype, "_activeBrandKit", 2);
8459
+ v = m([
8460
+ h("pigeon-editor")
8461
+ ], v);
8812
8462
  export {
8813
- Ne as PigeonAlignmentPicker,
8814
- x as PigeonAssetManager,
8815
- O as PigeonBodyPanel,
8816
- he as PigeonButtonBlock,
8817
- G as PigeonButtonPanel,
8818
- P as PigeonCanvas,
8819
- fe as PigeonColorPicker,
8820
- A as PigeonColumn,
8821
- Be as PigeonDividerBlock,
8822
- Ge as PigeonDropIndicator,
8823
- _ as PigeonEditor,
8824
- ge as PigeonHeroBlock,
8825
- j as PigeonHeroPanel,
8826
- Re as PigeonHtmlBlock,
8827
- Ae as PigeonImageBlock,
8828
- z as PigeonImagePanel,
8829
- De as PigeonLayers,
8830
- X as PigeonMergeTagPicker,
8831
- Le as PigeonNavBarBlock,
8832
- ae as PigeonNavBarPanel,
8833
- T as PigeonPalette,
8834
- Y as PigeonPaletteItem,
8835
- k as PigeonPreview,
8836
- C as PigeonProperties,
8837
- B as PigeonRow,
8838
- et as PigeonRowPanel,
8839
- L as PigeonSliderInput,
8840
- Me as PigeonSocialBlock,
8841
- je as PigeonSpacerBlock,
8842
- Ue as PigeonSpacingInput,
8843
- Kr as PigeonTemplatePicker,
8844
- de as PigeonTextBlock,
8845
- S as PigeonTextPanel,
8846
- V as PigeonToolbar,
8847
- Vo as calculateBlockDropIndex,
8848
- qo as calculateRowDropIndex,
8849
- Xe as clearDragData,
8850
- Ee as getDragData,
8851
- Fr as readDragTransfer,
8852
- Bo as setDragData,
8853
- wt as writeDragTransfer
8463
+ Pe as PigeonAlignmentPicker,
8464
+ f as PigeonAssetManager,
8465
+ P as PigeonBodyPanel,
8466
+ ae as PigeonButtonBlock,
8467
+ N as PigeonButtonPanel,
8468
+ C as PigeonCanvas,
8469
+ le as PigeonColorPicker,
8470
+ O as PigeonColumn,
8471
+ we as PigeonDividerBlock,
8472
+ je as PigeonDropIndicator,
8473
+ v as PigeonEditor,
8474
+ se as PigeonHeroBlock,
8475
+ D as PigeonHeroPanel,
8476
+ Ce as PigeonHtmlBlock,
8477
+ xe as PigeonImageBlock,
8478
+ R as PigeonImagePanel,
8479
+ ye as PigeonLayers,
8480
+ K as PigeonMergeTagPicker,
8481
+ Ie as PigeonNavBarBlock,
8482
+ Z as PigeonNavBarPanel,
8483
+ k as PigeonPalette,
8484
+ U as PigeonPaletteItem,
8485
+ x as PigeonPreview,
8486
+ w as PigeonProperties,
8487
+ E as PigeonRow,
8488
+ Re as PigeonRowPanel,
8489
+ j as PigeonSliderInput,
8490
+ ke as PigeonSocialBlock,
8491
+ $e as PigeonSpacerBlock,
8492
+ Te as PigeonSpacingInput,
8493
+ Ni as PigeonTemplatePicker,
8494
+ ne as PigeonTextBlock,
8495
+ I as PigeonTextPanel,
8496
+ H as PigeonToolbar,
8497
+ co as calculateBlockDropIndex,
8498
+ po as calculateRowDropIndex,
8499
+ Be as clearDragData,
8500
+ _e as getDragData,
8501
+ Hi as readDragTransfer,
8502
+ Gt as setDragData,
8503
+ Qe as writeDragTransfer
8854
8504
  };