@lit-pigeon/editor 0.3.2 → 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.d.ts +12 -3
- package/dist/index.js +1098 -1391
- package/dist/pigeon-brand-tab.js +1 -1
- package/dist/pigeon-saved-tab.js +1 -1
- package/dist/pigeon-stock-tab.js +1 -1
- package/dist/rich-text-bridge.js +328 -8
- package/dist/rich-text.js +2005 -1974
- package/dist/templates.js +58 -326
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as p, state as
|
|
3
|
-
import { t as s,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
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
|
-
`,
|
|
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
|
-
${
|
|
106
|
+
${yt}
|
|
108
107
|
}
|
|
109
108
|
|
|
110
109
|
@media (prefers-color-scheme: dark) {
|
|
111
110
|
:host(.pigeon-auto) {
|
|
112
|
-
${
|
|
111
|
+
${yt}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
114
|
`;
|
|
116
|
-
var
|
|
117
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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 &&
|
|
118
|
+
return r && i && Xt(t, o, i), i;
|
|
120
119
|
};
|
|
121
|
-
let
|
|
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
|
}
|
|
@@ -319,7 +318,10 @@ let K = class extends g {
|
|
|
319
318
|
}));
|
|
320
319
|
}
|
|
321
320
|
_toggleExportMenu() {
|
|
322
|
-
this._exportMenuOpen = !this._exportMenuOpen
|
|
321
|
+
this._exportMenuOpen = !this._exportMenuOpen, this._exportMenuOpen && this.dispatchEvent(new CustomEvent("toolbar-export", {
|
|
322
|
+
bubbles: !0,
|
|
323
|
+
composed: !0
|
|
324
|
+
}));
|
|
323
325
|
}
|
|
324
326
|
_onExportHtml() {
|
|
325
327
|
this._exportMenuOpen = !1, this.dispatchEvent(new CustomEvent("pigeon:export-html", {
|
|
@@ -340,7 +342,7 @@ let K = class extends g {
|
|
|
340
342
|
}));
|
|
341
343
|
}
|
|
342
344
|
};
|
|
343
|
-
|
|
345
|
+
H.styles = g`
|
|
344
346
|
:host {
|
|
345
347
|
display: flex;
|
|
346
348
|
align-items: center;
|
|
@@ -470,52 +472,52 @@ K.styles = b`
|
|
|
470
472
|
font-weight: 400;
|
|
471
473
|
}
|
|
472
474
|
`;
|
|
473
|
-
|
|
475
|
+
he([
|
|
474
476
|
p({ type: Boolean, attribute: "can-undo" })
|
|
475
|
-
],
|
|
476
|
-
|
|
477
|
+
], H.prototype, "canUndo", 2);
|
|
478
|
+
he([
|
|
477
479
|
p({ type: Boolean, attribute: "can-redo" })
|
|
478
|
-
],
|
|
479
|
-
|
|
480
|
+
], H.prototype, "canRedo", 2);
|
|
481
|
+
he([
|
|
480
482
|
p({ type: String })
|
|
481
|
-
],
|
|
482
|
-
|
|
483
|
+
], H.prototype, "device", 2);
|
|
484
|
+
he([
|
|
483
485
|
p({ type: Boolean })
|
|
484
|
-
],
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
],
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
],
|
|
491
|
-
let
|
|
492
|
-
function
|
|
493
|
-
|
|
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;
|
|
494
496
|
}
|
|
495
|
-
function
|
|
496
|
-
return
|
|
497
|
+
function _e() {
|
|
498
|
+
return Ze;
|
|
497
499
|
}
|
|
498
|
-
function
|
|
499
|
-
|
|
500
|
+
function Be() {
|
|
501
|
+
Ze = null;
|
|
500
502
|
}
|
|
501
|
-
function
|
|
502
|
-
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"),
|
|
503
|
+
function Qe(e, t) {
|
|
504
|
+
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), Gt(t);
|
|
503
505
|
}
|
|
504
|
-
function
|
|
506
|
+
function Hi(e) {
|
|
505
507
|
if (e.dataTransfer)
|
|
506
508
|
try {
|
|
507
509
|
const t = e.dataTransfer.getData("application/json");
|
|
508
510
|
if (t) return JSON.parse(t);
|
|
509
511
|
} catch {
|
|
510
512
|
}
|
|
511
|
-
return
|
|
513
|
+
return _e();
|
|
512
514
|
}
|
|
513
|
-
var
|
|
514
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
515
517
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
516
|
-
return r && i &&
|
|
518
|
+
return r && i && Zt(t, o, i), i;
|
|
517
519
|
};
|
|
518
|
-
const
|
|
520
|
+
const eo = {
|
|
519
521
|
text: "T",
|
|
520
522
|
image: "[]",
|
|
521
523
|
button: "[B]",
|
|
@@ -524,12 +526,12 @@ const Lo = {
|
|
|
524
526
|
social: "@",
|
|
525
527
|
html: "</>"
|
|
526
528
|
};
|
|
527
|
-
let
|
|
529
|
+
let U = class extends d {
|
|
528
530
|
constructor() {
|
|
529
531
|
super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1, this._didDrag = !1;
|
|
530
532
|
}
|
|
531
533
|
render() {
|
|
532
|
-
const e =
|
|
534
|
+
const e = eo[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
|
|
533
535
|
return l`
|
|
534
536
|
<div
|
|
535
537
|
class="item"
|
|
@@ -572,7 +574,7 @@ let W = class extends g {
|
|
|
572
574
|
);
|
|
573
575
|
}
|
|
574
576
|
_onDragStart(e) {
|
|
575
|
-
this._didDrag = !0,
|
|
577
|
+
this._didDrag = !0, Qe(e, {
|
|
576
578
|
type: this.dragType,
|
|
577
579
|
blockType: this.blockType || void 0,
|
|
578
580
|
columnCount: this.columnCount
|
|
@@ -597,7 +599,7 @@ let W = class extends g {
|
|
|
597
599
|
}));
|
|
598
600
|
}
|
|
599
601
|
};
|
|
600
|
-
|
|
602
|
+
U.styles = g`
|
|
601
603
|
:host {
|
|
602
604
|
display: block;
|
|
603
605
|
}
|
|
@@ -655,30 +657,30 @@ W.styles = b`
|
|
|
655
657
|
color: var(--pigeon-text, #1e293b);
|
|
656
658
|
}
|
|
657
659
|
`;
|
|
658
|
-
|
|
660
|
+
ge([
|
|
659
661
|
p({ type: String })
|
|
660
|
-
],
|
|
661
|
-
|
|
662
|
+
], U.prototype, "label", 2);
|
|
663
|
+
ge([
|
|
662
664
|
p({ type: String })
|
|
663
|
-
],
|
|
664
|
-
|
|
665
|
+
], U.prototype, "icon", 2);
|
|
666
|
+
ge([
|
|
665
667
|
p({ type: String, attribute: "drag-type" })
|
|
666
|
-
],
|
|
667
|
-
|
|
668
|
+
], U.prototype, "dragType", 2);
|
|
669
|
+
ge([
|
|
668
670
|
p({ type: String, attribute: "block-type" })
|
|
669
|
-
],
|
|
670
|
-
|
|
671
|
+
], U.prototype, "blockType", 2);
|
|
672
|
+
ge([
|
|
671
673
|
p({ type: Number, attribute: "column-count" })
|
|
672
|
-
],
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
],
|
|
676
|
-
var
|
|
677
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
678
680
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
679
|
-
return r && i &&
|
|
681
|
+
return r && i && to(t, o, i), i;
|
|
680
682
|
};
|
|
681
|
-
const
|
|
683
|
+
const io = {
|
|
682
684
|
text: "T",
|
|
683
685
|
image: "Img",
|
|
684
686
|
button: "Btn",
|
|
@@ -689,7 +691,7 @@ const Ho = {
|
|
|
689
691
|
hero: "H",
|
|
690
692
|
navbar: "Nav"
|
|
691
693
|
};
|
|
692
|
-
let
|
|
694
|
+
let ye = class extends d {
|
|
693
695
|
constructor() {
|
|
694
696
|
super(...arguments), this.selection = null;
|
|
695
697
|
}
|
|
@@ -722,7 +724,7 @@ let Ee = class extends g {
|
|
|
722
724
|
}
|
|
723
725
|
_renderBlock(e, t, o) {
|
|
724
726
|
var a;
|
|
725
|
-
const r = ((a = this.selection) == null ? void 0 : a.type) === "block" && this.selection.blockId === e.id, i =
|
|
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);
|
|
726
728
|
return l`
|
|
727
729
|
<div
|
|
728
730
|
class="tree-item indent-3 ${r ? "selected" : ""}"
|
|
@@ -748,7 +750,7 @@ let Ee = class extends g {
|
|
|
748
750
|
}));
|
|
749
751
|
}
|
|
750
752
|
};
|
|
751
|
-
|
|
753
|
+
ye.styles = g`
|
|
752
754
|
:host {
|
|
753
755
|
display: block;
|
|
754
756
|
font-family: var(--pigeon-font);
|
|
@@ -812,44 +814,44 @@ Ee.styles = b`
|
|
|
812
814
|
padding: 8px 8px 4px;
|
|
813
815
|
}
|
|
814
816
|
`;
|
|
815
|
-
|
|
817
|
+
et([
|
|
816
818
|
p({ type: Object })
|
|
817
|
-
],
|
|
818
|
-
|
|
819
|
+
], ye.prototype, "doc", 2);
|
|
820
|
+
et([
|
|
819
821
|
p({ type: Object })
|
|
820
|
-
],
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
],
|
|
824
|
-
var
|
|
825
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
826
828
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
827
|
-
return r && i &&
|
|
829
|
+
return r && i && ro(t, o, i), i;
|
|
828
830
|
};
|
|
829
|
-
let
|
|
830
|
-
function
|
|
831
|
-
return
|
|
831
|
+
let qe = null;
|
|
832
|
+
function ao() {
|
|
833
|
+
return qe || (qe = import("./pigeon-brand-tab.js")), qe;
|
|
832
834
|
}
|
|
833
|
-
let
|
|
834
|
-
function
|
|
835
|
-
return
|
|
835
|
+
let Ye = null;
|
|
836
|
+
function so() {
|
|
837
|
+
return Ye || (Ye = import("./pigeon-saved-tab.js")), Ye;
|
|
836
838
|
}
|
|
837
|
-
const
|
|
839
|
+
const lo = [
|
|
838
840
|
{ labelKey: "palette.layout.1-col", columns: 1, icon: "[=]" },
|
|
839
841
|
{ labelKey: "palette.layout.2-col", columns: 2, icon: "[||]" },
|
|
840
842
|
{ labelKey: "palette.layout.3-col", columns: 3, icon: "[|||]" },
|
|
841
843
|
{ labelKey: "palette.layout.4-col", columns: 4, icon: "[||||]" }
|
|
842
844
|
];
|
|
843
|
-
let
|
|
845
|
+
let k = class extends d {
|
|
844
846
|
constructor() {
|
|
845
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 () => {
|
|
846
|
-
this._activeTab = "brand", this._brandTabLoaded || (await
|
|
848
|
+
this._activeTab = "brand", this._brandTabLoaded || (await ao(), this._brandTabLoaded = !0);
|
|
847
849
|
}, this._handleSavedTabClick = async () => {
|
|
848
|
-
this._activeTab = "saved", this._savedTabLoaded || (await
|
|
850
|
+
this._activeTab = "saved", this._savedTabLoaded || (await so(), this._savedTabLoaded = !0);
|
|
849
851
|
};
|
|
850
852
|
}
|
|
851
853
|
connectedCallback() {
|
|
852
|
-
super.connectedCallback(), this._blockDefs =
|
|
854
|
+
super.connectedCallback(), this._blockDefs = St();
|
|
853
855
|
}
|
|
854
856
|
updated(e) {
|
|
855
857
|
e.has("brandKit") && !this.brandKit && this._activeTab === "brand" && (this._activeTab = "content");
|
|
@@ -923,7 +925,7 @@ let I = class extends g {
|
|
|
923
925
|
<div class="section">
|
|
924
926
|
<div class="section-header">${s("palette.layout.section-layout")}</div>
|
|
925
927
|
<div class="items">
|
|
926
|
-
${
|
|
928
|
+
${lo.map((e) => l`
|
|
927
929
|
<pigeon-palette-item part="palette-item"
|
|
928
930
|
label="${s(e.labelKey)}"
|
|
929
931
|
icon="${e.icon}"
|
|
@@ -950,7 +952,7 @@ let I = class extends g {
|
|
|
950
952
|
return this._savedTabLoaded ? l`<pigeon-saved-tab .storage=${this.rowLibrary}></pigeon-saved-tab>` : l``;
|
|
951
953
|
}
|
|
952
954
|
};
|
|
953
|
-
|
|
955
|
+
k.styles = g`
|
|
954
956
|
:host {
|
|
955
957
|
display: block;
|
|
956
958
|
width: var(--pigeon-palette-width, 240px);
|
|
@@ -1029,34 +1031,34 @@ I.styles = b`
|
|
|
1029
1031
|
gap: 6px;
|
|
1030
1032
|
}
|
|
1031
1033
|
`;
|
|
1032
|
-
|
|
1034
|
+
L([
|
|
1033
1035
|
p({ type: Object })
|
|
1034
|
-
],
|
|
1035
|
-
|
|
1036
|
+
], k.prototype, "doc", 2);
|
|
1037
|
+
L([
|
|
1036
1038
|
p({ type: Object })
|
|
1037
|
-
],
|
|
1038
|
-
|
|
1039
|
+
], k.prototype, "selection", 2);
|
|
1040
|
+
L([
|
|
1039
1041
|
p({ attribute: !1 })
|
|
1040
|
-
],
|
|
1041
|
-
|
|
1042
|
+
], k.prototype, "brandKit", 2);
|
|
1043
|
+
L([
|
|
1042
1044
|
p({ attribute: !1 })
|
|
1043
|
-
],
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
],
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
],
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
],
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
],
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
],
|
|
1059
|
-
function
|
|
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) {
|
|
1060
1062
|
if (t.length === 0) return 0;
|
|
1061
1063
|
for (let o = 0; o < t.length; o++) {
|
|
1062
1064
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1065,7 +1067,7 @@ function Vo(e, t) {
|
|
|
1065
1067
|
}
|
|
1066
1068
|
return t.length;
|
|
1067
1069
|
}
|
|
1068
|
-
function
|
|
1070
|
+
function co(e, t) {
|
|
1069
1071
|
if (t.length === 0) return 0;
|
|
1070
1072
|
for (let o = 0; o < t.length; o++) {
|
|
1071
1073
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1074,15 +1076,15 @@ function Yo(e, t) {
|
|
|
1074
1076
|
}
|
|
1075
1077
|
return t.length;
|
|
1076
1078
|
}
|
|
1077
|
-
function
|
|
1079
|
+
function kt(e, t) {
|
|
1078
1080
|
return e < 0 || t === e || t === e + 1 ? null : t > e ? t - 1 : t;
|
|
1079
1081
|
}
|
|
1080
|
-
var
|
|
1081
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1082
1084
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1083
|
-
return r && i &&
|
|
1085
|
+
return r && i && ho(t, o, i), i;
|
|
1084
1086
|
};
|
|
1085
|
-
let
|
|
1087
|
+
let je = class extends d {
|
|
1086
1088
|
constructor() {
|
|
1087
1089
|
super(...arguments), this.visible = !1;
|
|
1088
1090
|
}
|
|
@@ -1095,7 +1097,7 @@ let Ge = class extends g {
|
|
|
1095
1097
|
`;
|
|
1096
1098
|
}
|
|
1097
1099
|
};
|
|
1098
|
-
|
|
1100
|
+
je.styles = g`
|
|
1099
1101
|
:host {
|
|
1100
1102
|
display: block;
|
|
1101
1103
|
height: 4px;
|
|
@@ -1139,18 +1141,18 @@ Ge.styles = b`
|
|
|
1139
1141
|
right: 4px;
|
|
1140
1142
|
}
|
|
1141
1143
|
`;
|
|
1142
|
-
|
|
1144
|
+
Ct([
|
|
1143
1145
|
p({ type: Boolean, reflect: !0 })
|
|
1144
|
-
],
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
],
|
|
1148
|
-
var
|
|
1149
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1150
1152
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1151
|
-
return r && i &&
|
|
1153
|
+
return r && i && uo(t, o, i), i;
|
|
1152
1154
|
};
|
|
1153
|
-
let
|
|
1155
|
+
let ne = class extends d {
|
|
1154
1156
|
constructor() {
|
|
1155
1157
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1156
1158
|
}
|
|
@@ -1178,12 +1180,12 @@ let de = class extends g {
|
|
|
1178
1180
|
const e = this.renderRoot.querySelector(".content");
|
|
1179
1181
|
if (!e) return;
|
|
1180
1182
|
this._editorHost = e;
|
|
1181
|
-
const t = await
|
|
1183
|
+
const t = await Ge();
|
|
1182
1184
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1183
1185
|
element: this._editorHost,
|
|
1184
1186
|
initialHTML: this.block.values.content,
|
|
1185
1187
|
onBlur: (o) => this._commit(o),
|
|
1186
|
-
onEscape: () => this.
|
|
1188
|
+
onEscape: (o) => this._commit(o)
|
|
1187
1189
|
}));
|
|
1188
1190
|
}
|
|
1189
1191
|
_teardownEditor() {
|
|
@@ -1203,10 +1205,6 @@ let de = class extends g {
|
|
|
1203
1205
|
composed: !0
|
|
1204
1206
|
}));
|
|
1205
1207
|
}
|
|
1206
|
-
_exit() {
|
|
1207
|
-
const e = this._editor ? this._editor.getHTML() : this.block.values.content;
|
|
1208
|
-
this._commit(e);
|
|
1209
|
-
}
|
|
1210
1208
|
_handleClick(e) {
|
|
1211
1209
|
e.stopPropagation(), !this.editing && this.dispatchEvent(new CustomEvent("block-select", {
|
|
1212
1210
|
detail: { blockId: this.block.id },
|
|
@@ -1222,7 +1220,7 @@ let de = class extends g {
|
|
|
1222
1220
|
}));
|
|
1223
1221
|
}
|
|
1224
1222
|
};
|
|
1225
|
-
|
|
1223
|
+
ne.styles = g`
|
|
1226
1224
|
:host {
|
|
1227
1225
|
display: block;
|
|
1228
1226
|
cursor: pointer;
|
|
@@ -1262,24 +1260,24 @@ de.styles = b`
|
|
|
1262
1260
|
outline: none;
|
|
1263
1261
|
}
|
|
1264
1262
|
`;
|
|
1265
|
-
|
|
1263
|
+
Le([
|
|
1266
1264
|
p({ type: Object })
|
|
1267
|
-
],
|
|
1268
|
-
|
|
1265
|
+
], ne.prototype, "block", 2);
|
|
1266
|
+
Le([
|
|
1269
1267
|
p({ type: Boolean, reflect: !0 })
|
|
1270
|
-
],
|
|
1271
|
-
|
|
1268
|
+
], ne.prototype, "selected", 2);
|
|
1269
|
+
Le([
|
|
1272
1270
|
p({ type: Boolean, reflect: !0 })
|
|
1273
|
-
],
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
],
|
|
1277
|
-
var
|
|
1278
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1279
1277
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1280
|
-
return r && i &&
|
|
1278
|
+
return r && i && vo(t, o, i), i;
|
|
1281
1279
|
};
|
|
1282
|
-
let
|
|
1280
|
+
let xe = class extends d {
|
|
1283
1281
|
constructor() {
|
|
1284
1282
|
super(...arguments), this.selected = !1;
|
|
1285
1283
|
}
|
|
@@ -1317,7 +1315,7 @@ let Ae = class extends g {
|
|
|
1317
1315
|
}));
|
|
1318
1316
|
}
|
|
1319
1317
|
};
|
|
1320
|
-
|
|
1318
|
+
xe.styles = g`
|
|
1321
1319
|
:host {
|
|
1322
1320
|
display: block;
|
|
1323
1321
|
cursor: pointer;
|
|
@@ -1365,21 +1363,21 @@ Ae.styles = b`
|
|
|
1365
1363
|
opacity: 0.5;
|
|
1366
1364
|
}
|
|
1367
1365
|
`;
|
|
1368
|
-
|
|
1366
|
+
tt([
|
|
1369
1367
|
p({ type: Object })
|
|
1370
|
-
],
|
|
1371
|
-
|
|
1368
|
+
], xe.prototype, "block", 2);
|
|
1369
|
+
tt([
|
|
1372
1370
|
p({ type: Boolean, reflect: !0 })
|
|
1373
|
-
],
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
],
|
|
1377
|
-
var
|
|
1378
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1379
1377
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1380
|
-
return r && i &&
|
|
1378
|
+
return r && i && mo(t, o, i), i;
|
|
1381
1379
|
};
|
|
1382
|
-
let
|
|
1380
|
+
let ae = class extends d {
|
|
1383
1381
|
constructor() {
|
|
1384
1382
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1385
1383
|
}
|
|
@@ -1405,7 +1403,7 @@ let he = class extends g {
|
|
|
1405
1403
|
href="${e.href}"
|
|
1406
1404
|
style="${i}"
|
|
1407
1405
|
@click=${this._preventNav}
|
|
1408
|
-
>${this.editing ? l`` :
|
|
1406
|
+
>${this.editing ? l`` : $t(n)}</a>
|
|
1409
1407
|
</div>
|
|
1410
1408
|
`;
|
|
1411
1409
|
}
|
|
@@ -1419,7 +1417,7 @@ let he = class extends g {
|
|
|
1419
1417
|
const e = this.renderRoot.querySelector(".button");
|
|
1420
1418
|
if (!e) return;
|
|
1421
1419
|
this._editorHost = e;
|
|
1422
|
-
const t = await
|
|
1420
|
+
const t = await Ge();
|
|
1423
1421
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1424
1422
|
element: this._editorHost,
|
|
1425
1423
|
initialHTML: this.block.values.content,
|
|
@@ -1466,7 +1464,7 @@ let he = class extends g {
|
|
|
1466
1464
|
}));
|
|
1467
1465
|
}
|
|
1468
1466
|
};
|
|
1469
|
-
|
|
1467
|
+
ae.styles = g`
|
|
1470
1468
|
:host {
|
|
1471
1469
|
display: block;
|
|
1472
1470
|
cursor: pointer;
|
|
@@ -1517,24 +1515,24 @@ he.styles = b`
|
|
|
1517
1515
|
display: inline;
|
|
1518
1516
|
}
|
|
1519
1517
|
`;
|
|
1520
|
-
|
|
1518
|
+
ze([
|
|
1521
1519
|
p({ type: Object })
|
|
1522
|
-
],
|
|
1523
|
-
|
|
1520
|
+
], ae.prototype, "block", 2);
|
|
1521
|
+
ze([
|
|
1524
1522
|
p({ type: Boolean, reflect: !0 })
|
|
1525
|
-
],
|
|
1526
|
-
|
|
1523
|
+
], ae.prototype, "selected", 2);
|
|
1524
|
+
ze([
|
|
1527
1525
|
p({ type: Boolean, reflect: !0 })
|
|
1528
|
-
],
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
],
|
|
1532
|
-
var
|
|
1533
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1534
1532
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1535
|
-
return r && i &&
|
|
1533
|
+
return r && i && yo(t, o, i), i;
|
|
1536
1534
|
};
|
|
1537
|
-
let
|
|
1535
|
+
let we = class extends d {
|
|
1538
1536
|
constructor() {
|
|
1539
1537
|
super(...arguments), this.selected = !1;
|
|
1540
1538
|
}
|
|
@@ -1562,7 +1560,7 @@ let Be = class extends g {
|
|
|
1562
1560
|
}));
|
|
1563
1561
|
}
|
|
1564
1562
|
};
|
|
1565
|
-
|
|
1563
|
+
we.styles = g`
|
|
1566
1564
|
:host {
|
|
1567
1565
|
display: block;
|
|
1568
1566
|
cursor: pointer;
|
|
@@ -1589,21 +1587,21 @@ Be.styles = b`
|
|
|
1589
1587
|
margin: 0;
|
|
1590
1588
|
}
|
|
1591
1589
|
`;
|
|
1592
|
-
|
|
1590
|
+
ot([
|
|
1593
1591
|
p({ type: Object })
|
|
1594
|
-
],
|
|
1595
|
-
|
|
1592
|
+
], we.prototype, "block", 2);
|
|
1593
|
+
ot([
|
|
1596
1594
|
p({ type: Boolean, reflect: !0 })
|
|
1597
|
-
],
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
],
|
|
1601
|
-
var
|
|
1602
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1603
1601
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1604
|
-
return r && i &&
|
|
1602
|
+
return r && i && wo(t, o, i), i;
|
|
1605
1603
|
};
|
|
1606
|
-
let
|
|
1604
|
+
let $e = class extends d {
|
|
1607
1605
|
constructor() {
|
|
1608
1606
|
super(...arguments), this.selected = !1;
|
|
1609
1607
|
}
|
|
@@ -1628,7 +1626,7 @@ let je = class extends g {
|
|
|
1628
1626
|
}));
|
|
1629
1627
|
}
|
|
1630
1628
|
};
|
|
1631
|
-
|
|
1629
|
+
$e.styles = g`
|
|
1632
1630
|
:host {
|
|
1633
1631
|
display: block;
|
|
1634
1632
|
cursor: pointer;
|
|
@@ -1670,21 +1668,21 @@ je.styles = b`
|
|
|
1670
1668
|
opacity: 1;
|
|
1671
1669
|
}
|
|
1672
1670
|
`;
|
|
1673
|
-
|
|
1671
|
+
it([
|
|
1674
1672
|
p({ type: Object })
|
|
1675
|
-
],
|
|
1676
|
-
|
|
1673
|
+
], $e.prototype, "block", 2);
|
|
1674
|
+
it([
|
|
1677
1675
|
p({ type: Boolean, reflect: !0 })
|
|
1678
|
-
],
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
],
|
|
1682
|
-
var
|
|
1683
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1684
1682
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1685
|
-
return r && i &&
|
|
1683
|
+
return r && i && ko(t, o, i), i;
|
|
1686
1684
|
};
|
|
1687
|
-
const
|
|
1685
|
+
const Io = {
|
|
1688
1686
|
facebook: "f",
|
|
1689
1687
|
twitter: "𝕏",
|
|
1690
1688
|
instagram: "ig",
|
|
@@ -1692,7 +1690,7 @@ const li = {
|
|
|
1692
1690
|
youtube: "▶",
|
|
1693
1691
|
tiktok: "♪",
|
|
1694
1692
|
custom: "★"
|
|
1695
|
-
},
|
|
1693
|
+
}, Po = {
|
|
1696
1694
|
facebook: "#1877F2",
|
|
1697
1695
|
twitter: "#000000",
|
|
1698
1696
|
instagram: "#E4405F",
|
|
@@ -1701,7 +1699,7 @@ const li = {
|
|
|
1701
1699
|
tiktok: "#000000",
|
|
1702
1700
|
custom: "#6b7280"
|
|
1703
1701
|
};
|
|
1704
|
-
let
|
|
1702
|
+
let ke = class extends d {
|
|
1705
1703
|
constructor() {
|
|
1706
1704
|
super(...arguments), this.selected = !1;
|
|
1707
1705
|
}
|
|
@@ -1721,7 +1719,7 @@ let Re = class extends g {
|
|
|
1721
1719
|
${e.icons.length === 0 ? l`<div class="empty-state">Add social icons in properties</div>` : l`
|
|
1722
1720
|
<div class="icons-container" style="justify-content: ${o[e.alignment]}; gap: ${e.spacing}px;">
|
|
1723
1721
|
${e.icons.map((r) => {
|
|
1724
|
-
const i =
|
|
1722
|
+
const i = Po[r.type] ?? "#6b7280", n = Io[r.type] ?? "?";
|
|
1725
1723
|
return l`
|
|
1726
1724
|
<a
|
|
1727
1725
|
class="social-icon"
|
|
@@ -1748,7 +1746,7 @@ let Re = class extends g {
|
|
|
1748
1746
|
}));
|
|
1749
1747
|
}
|
|
1750
1748
|
};
|
|
1751
|
-
|
|
1749
|
+
ke.styles = g`
|
|
1752
1750
|
:host {
|
|
1753
1751
|
display: block;
|
|
1754
1752
|
cursor: pointer;
|
|
@@ -1796,21 +1794,21 @@ Re.styles = b`
|
|
|
1796
1794
|
font-size: 13px;
|
|
1797
1795
|
}
|
|
1798
1796
|
`;
|
|
1799
|
-
|
|
1797
|
+
rt([
|
|
1800
1798
|
p({ type: Object })
|
|
1801
|
-
],
|
|
1802
|
-
|
|
1799
|
+
], ke.prototype, "block", 2);
|
|
1800
|
+
rt([
|
|
1803
1801
|
p({ type: Boolean, reflect: !0 })
|
|
1804
|
-
],
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
],
|
|
1808
|
-
var
|
|
1809
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1810
1808
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1811
|
-
return r && i &&
|
|
1809
|
+
return r && i && To(t, o, i), i;
|
|
1812
1810
|
};
|
|
1813
|
-
let
|
|
1811
|
+
let Ce = class extends d {
|
|
1814
1812
|
constructor() {
|
|
1815
1813
|
super(...arguments), this.selected = !1;
|
|
1816
1814
|
}
|
|
@@ -1823,10 +1821,24 @@ let Le = class extends g {
|
|
|
1823
1821
|
style="${t}"
|
|
1824
1822
|
@click=${this._handleClick}
|
|
1825
1823
|
>
|
|
1826
|
-
${e.content ? l`<
|
|
1824
|
+
${e.content ? l`<iframe
|
|
1825
|
+
class="content"
|
|
1826
|
+
title="Custom HTML"
|
|
1827
|
+
sandbox="allow-same-origin"
|
|
1828
|
+
.srcdoc=${`<style>body{margin:0;display:flow-root}</style>${e.content}`}
|
|
1829
|
+
@load=${this._fit}
|
|
1830
|
+
></iframe>` : l`<div class="empty-state"></> Custom HTML</div>`}
|
|
1827
1831
|
</div>
|
|
1828
1832
|
`;
|
|
1829
1833
|
}
|
|
1834
|
+
/** No scripts run inside the sandbox, so the parent sizes the frame to its content. */
|
|
1835
|
+
_fit(e) {
|
|
1836
|
+
var o;
|
|
1837
|
+
const t = e.target;
|
|
1838
|
+
(o = this._resizer) == null || o.disconnect(), this._resizer = new ResizeObserver(() => {
|
|
1839
|
+
t.style.height = `${t.contentDocument.body.scrollHeight}px`;
|
|
1840
|
+
}), this._resizer.observe(t);
|
|
1841
|
+
}
|
|
1830
1842
|
_handleClick(e) {
|
|
1831
1843
|
e.stopPropagation(), this.dispatchEvent(new CustomEvent("block-select", {
|
|
1832
1844
|
detail: { blockId: this.block.id },
|
|
@@ -1835,7 +1847,7 @@ let Le = class extends g {
|
|
|
1835
1847
|
}));
|
|
1836
1848
|
}
|
|
1837
1849
|
};
|
|
1838
|
-
|
|
1850
|
+
Ce.styles = g`
|
|
1839
1851
|
:host {
|
|
1840
1852
|
display: block;
|
|
1841
1853
|
cursor: pointer;
|
|
@@ -1858,8 +1870,10 @@ Le.styles = b`
|
|
|
1858
1870
|
}
|
|
1859
1871
|
|
|
1860
1872
|
.content {
|
|
1861
|
-
|
|
1862
|
-
|
|
1873
|
+
display: block;
|
|
1874
|
+
width: 100%;
|
|
1875
|
+
border: 0;
|
|
1876
|
+
pointer-events: none;
|
|
1863
1877
|
}
|
|
1864
1878
|
|
|
1865
1879
|
.empty-state {
|
|
@@ -1875,21 +1889,21 @@ Le.styles = b`
|
|
|
1875
1889
|
font-size: 13px;
|
|
1876
1890
|
}
|
|
1877
1891
|
`;
|
|
1878
|
-
|
|
1892
|
+
nt([
|
|
1879
1893
|
p({ type: Object })
|
|
1880
|
-
],
|
|
1881
|
-
|
|
1894
|
+
], Ce.prototype, "block", 2);
|
|
1895
|
+
nt([
|
|
1882
1896
|
p({ type: Boolean, reflect: !0 })
|
|
1883
|
-
],
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
],
|
|
1887
|
-
var
|
|
1888
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
1889
1903
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1890
|
-
return r && i &&
|
|
1904
|
+
return r && i && Oo(t, o, i), i;
|
|
1891
1905
|
};
|
|
1892
|
-
let
|
|
1906
|
+
let se = class extends d {
|
|
1893
1907
|
constructor() {
|
|
1894
1908
|
super(...arguments), this.selected = !1, this.editing = !1, this._editor = null, this._editorHost = null;
|
|
1895
1909
|
}
|
|
@@ -1899,7 +1913,7 @@ let ge = class extends g {
|
|
|
1899
1913
|
top: "flex-start",
|
|
1900
1914
|
middle: "center",
|
|
1901
1915
|
bottom: "flex-end"
|
|
1902
|
-
}, 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,
|
|
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;
|
|
1903
1917
|
return l`
|
|
1904
1918
|
<div
|
|
1905
1919
|
class="wrapper"
|
|
@@ -1907,7 +1921,7 @@ let ge = class extends g {
|
|
|
1907
1921
|
@click=${this._handleClick}
|
|
1908
1922
|
@dblclick=${this._handleDblClick}
|
|
1909
1923
|
>
|
|
1910
|
-
${
|
|
1924
|
+
${u ? l`<div class="content" style="${o}"></div>` : a ? l`<div class="content" style="${o}" .innerHTML=${e.content}></div>` : l`
|
|
1911
1925
|
<div class="empty-state">
|
|
1912
1926
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
1913
1927
|
<rect x="2" y="2" width="20" height="20" rx="2"/>
|
|
@@ -1930,7 +1944,7 @@ let ge = class extends g {
|
|
|
1930
1944
|
const e = this.renderRoot.querySelector(".content");
|
|
1931
1945
|
if (!e) return;
|
|
1932
1946
|
this._editorHost = e;
|
|
1933
|
-
const t = await
|
|
1947
|
+
const t = await Ge();
|
|
1934
1948
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1935
1949
|
element: this._editorHost,
|
|
1936
1950
|
initialHTML: this.block.values.content || "<p></p>",
|
|
@@ -1974,7 +1988,7 @@ let ge = class extends g {
|
|
|
1974
1988
|
}));
|
|
1975
1989
|
}
|
|
1976
1990
|
};
|
|
1977
|
-
|
|
1991
|
+
se.styles = g`
|
|
1978
1992
|
:host {
|
|
1979
1993
|
display: block;
|
|
1980
1994
|
cursor: pointer;
|
|
@@ -2034,24 +2048,24 @@ ge.styles = b`
|
|
|
2034
2048
|
outline: none;
|
|
2035
2049
|
}
|
|
2036
2050
|
`;
|
|
2037
|
-
|
|
2051
|
+
Me([
|
|
2038
2052
|
p({ type: Object })
|
|
2039
|
-
],
|
|
2040
|
-
|
|
2053
|
+
], se.prototype, "block", 2);
|
|
2054
|
+
Me([
|
|
2041
2055
|
p({ type: Boolean, reflect: !0 })
|
|
2042
|
-
],
|
|
2043
|
-
|
|
2056
|
+
], se.prototype, "selected", 2);
|
|
2057
|
+
Me([
|
|
2044
2058
|
p({ type: Boolean, reflect: !0 })
|
|
2045
|
-
],
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
],
|
|
2049
|
-
var
|
|
2050
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
2051
2065
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2052
|
-
return r && i &&
|
|
2066
|
+
return r && i && Do(t, o, i), i;
|
|
2053
2067
|
};
|
|
2054
|
-
let
|
|
2068
|
+
let Ie = class extends d {
|
|
2055
2069
|
constructor() {
|
|
2056
2070
|
super(...arguments), this.selected = !1;
|
|
2057
2071
|
}
|
|
@@ -2094,7 +2108,7 @@ let ze = class extends g {
|
|
|
2094
2108
|
}));
|
|
2095
2109
|
}
|
|
2096
2110
|
};
|
|
2097
|
-
|
|
2111
|
+
Ie.styles = g`
|
|
2098
2112
|
:host {
|
|
2099
2113
|
display: block;
|
|
2100
2114
|
cursor: pointer;
|
|
@@ -2142,21 +2156,21 @@ ze.styles = b`
|
|
|
2142
2156
|
font-size: 13px;
|
|
2143
2157
|
}
|
|
2144
2158
|
`;
|
|
2145
|
-
|
|
2159
|
+
at([
|
|
2146
2160
|
p({ type: Object })
|
|
2147
|
-
],
|
|
2148
|
-
|
|
2161
|
+
], Ie.prototype, "block", 2);
|
|
2162
|
+
at([
|
|
2149
2163
|
p({ type: Boolean, reflect: !0 })
|
|
2150
|
-
],
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
],
|
|
2154
|
-
var
|
|
2155
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
2156
2170
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2157
|
-
return r && i &&
|
|
2171
|
+
return r && i && jo(t, o, i), i;
|
|
2158
2172
|
};
|
|
2159
|
-
let O = class extends
|
|
2173
|
+
let O = class extends d {
|
|
2160
2174
|
constructor() {
|
|
2161
2175
|
super(...arguments), this.rowId = "", this.selection = null, this.editingBlockId = null, this._dropIndex = -1, this._isDragOver = !1, this._draggingBlockId = null;
|
|
2162
2176
|
}
|
|
@@ -2242,7 +2256,7 @@ let O = class extends g {
|
|
|
2242
2256
|
* failing with "Unknown block type".
|
|
2243
2257
|
*/
|
|
2244
2258
|
_renderCustomBlock(e, t) {
|
|
2245
|
-
const o =
|
|
2259
|
+
const o = Je(e.type), r = e, i = o != null && o.renderCanvas ? $t(o.renderCanvas(r)) : l`<span class="custom-block__label"
|
|
2246
2260
|
>${(o == null ? void 0 : o.label) ?? e.type}</span
|
|
2247
2261
|
>`;
|
|
2248
2262
|
return l`<div
|
|
@@ -2265,7 +2279,7 @@ let O = class extends g {
|
|
|
2265
2279
|
);
|
|
2266
2280
|
}
|
|
2267
2281
|
_onDragOver(e) {
|
|
2268
|
-
const t =
|
|
2282
|
+
const t = _e();
|
|
2269
2283
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2270
2284
|
e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-block" ? "move" : "copy"), this._isDragOver = !0;
|
|
2271
2285
|
const o = Array.from(
|
|
@@ -2273,19 +2287,19 @@ let O = class extends g {
|
|
|
2273
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"
|
|
2274
2288
|
)
|
|
2275
2289
|
);
|
|
2276
|
-
this._dropIndex =
|
|
2290
|
+
this._dropIndex = co(e.clientY, o);
|
|
2277
2291
|
}
|
|
2278
2292
|
_onDragLeave(e) {
|
|
2279
2293
|
const t = this.getBoundingClientRect();
|
|
2280
2294
|
e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (this._isDragOver = !1, this._dropIndex = -1);
|
|
2281
2295
|
}
|
|
2282
2296
|
_onDrop(e) {
|
|
2283
|
-
const t =
|
|
2297
|
+
const t = _e();
|
|
2284
2298
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2285
2299
|
e.preventDefault(), e.stopPropagation();
|
|
2286
2300
|
let o = this._dropIndex >= 0 ? this._dropIndex : this.column.blocks.length;
|
|
2287
2301
|
if (t.type === "existing-block" && t.rowId === this.rowId && t.columnId === this.column.id) {
|
|
2288
|
-
const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i =
|
|
2302
|
+
const r = this.column.blocks.findIndex((n) => n.id === t.blockId), i = kt(r, o);
|
|
2289
2303
|
if (i === null) {
|
|
2290
2304
|
this._resetDragState();
|
|
2291
2305
|
return;
|
|
@@ -2304,10 +2318,10 @@ let O = class extends g {
|
|
|
2304
2318
|
})), this._resetDragState();
|
|
2305
2319
|
}
|
|
2306
2320
|
_resetDragState() {
|
|
2307
|
-
this._isDragOver = !1, this._dropIndex = -1,
|
|
2321
|
+
this._isDragOver = !1, this._dropIndex = -1, Be();
|
|
2308
2322
|
}
|
|
2309
2323
|
_onBlockDragStart(e, t) {
|
|
2310
|
-
if (
|
|
2324
|
+
if (Qe(e, {
|
|
2311
2325
|
type: "existing-block",
|
|
2312
2326
|
blockId: t,
|
|
2313
2327
|
rowId: this.rowId,
|
|
@@ -2319,10 +2333,10 @@ let O = class extends g {
|
|
|
2319
2333
|
this._draggingBlockId = t;
|
|
2320
2334
|
}
|
|
2321
2335
|
_onBlockDragEnd() {
|
|
2322
|
-
this._draggingBlockId = null,
|
|
2336
|
+
this._draggingBlockId = null, Be();
|
|
2323
2337
|
}
|
|
2324
2338
|
};
|
|
2325
|
-
O.styles =
|
|
2339
|
+
O.styles = g`
|
|
2326
2340
|
:host {
|
|
2327
2341
|
display: block;
|
|
2328
2342
|
min-height: 40px;
|
|
@@ -2438,36 +2452,36 @@ O.styles = b`
|
|
|
2438
2452
|
text-align: center;
|
|
2439
2453
|
}
|
|
2440
2454
|
`;
|
|
2441
|
-
|
|
2455
|
+
q([
|
|
2442
2456
|
p({ type: Object })
|
|
2443
2457
|
], O.prototype, "column", 2);
|
|
2444
|
-
|
|
2458
|
+
q([
|
|
2445
2459
|
p({ type: String, attribute: "row-id" })
|
|
2446
2460
|
], O.prototype, "rowId", 2);
|
|
2447
|
-
|
|
2461
|
+
q([
|
|
2448
2462
|
p({ type: Object })
|
|
2449
2463
|
], O.prototype, "selection", 2);
|
|
2450
|
-
|
|
2464
|
+
q([
|
|
2451
2465
|
p({ type: String, attribute: "editing-block-id" })
|
|
2452
2466
|
], O.prototype, "editingBlockId", 2);
|
|
2453
|
-
|
|
2454
|
-
|
|
2467
|
+
q([
|
|
2468
|
+
c()
|
|
2455
2469
|
], O.prototype, "_dropIndex", 2);
|
|
2456
|
-
|
|
2457
|
-
|
|
2470
|
+
q([
|
|
2471
|
+
c()
|
|
2458
2472
|
], O.prototype, "_isDragOver", 2);
|
|
2459
|
-
|
|
2460
|
-
|
|
2473
|
+
q([
|
|
2474
|
+
c()
|
|
2461
2475
|
], O.prototype, "_draggingBlockId", 2);
|
|
2462
|
-
O =
|
|
2463
|
-
|
|
2476
|
+
O = q([
|
|
2477
|
+
h("pigeon-column")
|
|
2464
2478
|
], O);
|
|
2465
|
-
var
|
|
2466
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
2467
2481
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2468
|
-
return r && i &&
|
|
2482
|
+
return r && i && Lo(t, o, i), i;
|
|
2469
2483
|
};
|
|
2470
|
-
let
|
|
2484
|
+
let E = class extends d {
|
|
2471
2485
|
constructor() {
|
|
2472
2486
|
super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this.showActions = !1, this._dragging = !1;
|
|
2473
2487
|
}
|
|
@@ -2484,10 +2498,10 @@ let D = class extends g {
|
|
|
2484
2498
|
<div class="row-label">Row</div>
|
|
2485
2499
|
|
|
2486
2500
|
<div class="columns">
|
|
2487
|
-
${this.row.columns.map((a,
|
|
2488
|
-
const
|
|
2501
|
+
${this.row.columns.map((a, u) => {
|
|
2502
|
+
const y = (this.row.columnRatios[u] ?? 1) / 12 * 100;
|
|
2489
2503
|
return l`
|
|
2490
|
-
<div class="column-wrapper" style="width: ${
|
|
2504
|
+
<div class="column-wrapper" style="width: ${y}%;">
|
|
2491
2505
|
<pigeon-column
|
|
2492
2506
|
.column=${a}
|
|
2493
2507
|
row-id="${this.row.id}"
|
|
@@ -2614,7 +2628,7 @@ let D = class extends g {
|
|
|
2614
2628
|
}));
|
|
2615
2629
|
}
|
|
2616
2630
|
_onDragStart(e) {
|
|
2617
|
-
if (
|
|
2631
|
+
if (Qe(e, {
|
|
2618
2632
|
type: "existing-row",
|
|
2619
2633
|
rowId: this.row.id
|
|
2620
2634
|
}), e.dataTransfer) {
|
|
@@ -2624,10 +2638,10 @@ let D = class extends g {
|
|
|
2624
2638
|
this._dragging = !0;
|
|
2625
2639
|
}
|
|
2626
2640
|
_onDragEnd() {
|
|
2627
|
-
this._dragging = !1,
|
|
2641
|
+
this._dragging = !1, Be();
|
|
2628
2642
|
}
|
|
2629
2643
|
};
|
|
2630
|
-
|
|
2644
|
+
E.styles = g`
|
|
2631
2645
|
:host {
|
|
2632
2646
|
display: block;
|
|
2633
2647
|
position: relative;
|
|
@@ -2758,36 +2772,36 @@ D.styles = b`
|
|
|
2758
2772
|
opacity: 1;
|
|
2759
2773
|
}
|
|
2760
2774
|
`;
|
|
2761
|
-
|
|
2775
|
+
Y([
|
|
2762
2776
|
p({ type: Object })
|
|
2763
|
-
],
|
|
2764
|
-
|
|
2777
|
+
], E.prototype, "row", 2);
|
|
2778
|
+
Y([
|
|
2765
2779
|
p({ type: Number })
|
|
2766
|
-
],
|
|
2767
|
-
|
|
2780
|
+
], E.prototype, "index", 2);
|
|
2781
|
+
Y([
|
|
2768
2782
|
p({ type: Number, attribute: "total-rows" })
|
|
2769
|
-
],
|
|
2770
|
-
|
|
2783
|
+
], E.prototype, "totalRows", 2);
|
|
2784
|
+
Y([
|
|
2771
2785
|
p({ type: Object })
|
|
2772
|
-
],
|
|
2773
|
-
|
|
2786
|
+
], E.prototype, "selection", 2);
|
|
2787
|
+
Y([
|
|
2774
2788
|
p({ type: String, attribute: "editing-block-id" })
|
|
2775
|
-
],
|
|
2776
|
-
|
|
2789
|
+
], E.prototype, "editingBlockId", 2);
|
|
2790
|
+
Y([
|
|
2777
2791
|
p({ type: Boolean, attribute: "show-actions", reflect: !0 })
|
|
2778
|
-
],
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
],
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
],
|
|
2785
|
-
var
|
|
2786
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
2787
2801
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2788
|
-
return r && i &&
|
|
2802
|
+
return r && i && Mo(t, o, i), i;
|
|
2789
2803
|
};
|
|
2790
|
-
let
|
|
2804
|
+
let C = class extends d {
|
|
2791
2805
|
constructor() {
|
|
2792
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) => {
|
|
2793
2807
|
var r;
|
|
@@ -2855,13 +2869,13 @@ let P = class extends g {
|
|
|
2855
2869
|
` : l`
|
|
2856
2870
|
<div class="rows-container">
|
|
2857
2871
|
${o.map(
|
|
2858
|
-
(a,
|
|
2872
|
+
(a, u) => l`
|
|
2859
2873
|
<pigeon-drop-indicator
|
|
2860
|
-
?visible=${this._isDragOver && this._rowDropIndex ===
|
|
2874
|
+
?visible=${this._isDragOver && this._rowDropIndex === u}
|
|
2861
2875
|
></pigeon-drop-indicator>
|
|
2862
2876
|
<pigeon-row
|
|
2863
2877
|
.row=${a}
|
|
2864
|
-
.index=${
|
|
2878
|
+
.index=${u}
|
|
2865
2879
|
.totalRows=${o.length}
|
|
2866
2880
|
.selection=${this.selection}
|
|
2867
2881
|
.editingBlockId=${this.editingBlockId}
|
|
@@ -2886,12 +2900,12 @@ let P = class extends g {
|
|
|
2886
2900
|
}));
|
|
2887
2901
|
}
|
|
2888
2902
|
_onDragOver(e) {
|
|
2889
|
-
const t =
|
|
2903
|
+
const t = _e();
|
|
2890
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)) {
|
|
2891
2905
|
const o = Array.from(
|
|
2892
2906
|
this.renderRoot.querySelectorAll("pigeon-row")
|
|
2893
2907
|
);
|
|
2894
|
-
this._rowDropIndex =
|
|
2908
|
+
this._rowDropIndex = po(e.clientY, o);
|
|
2895
2909
|
}
|
|
2896
2910
|
}
|
|
2897
2911
|
_onDragLeave(e) {
|
|
@@ -2901,7 +2915,7 @@ let P = class extends g {
|
|
|
2901
2915
|
}
|
|
2902
2916
|
_onDrop(e) {
|
|
2903
2917
|
e.preventDefault();
|
|
2904
|
-
const t =
|
|
2918
|
+
const t = _e();
|
|
2905
2919
|
if (!t) {
|
|
2906
2920
|
this._resetDragState();
|
|
2907
2921
|
return;
|
|
@@ -2924,7 +2938,7 @@ let P = class extends g {
|
|
|
2924
2938
|
composed: !0
|
|
2925
2939
|
}));
|
|
2926
2940
|
} else if (t.type === "existing-row" && t.rowId) {
|
|
2927
|
-
const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i =
|
|
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);
|
|
2928
2942
|
i !== null && this.dispatchEvent(new CustomEvent("row-move", {
|
|
2929
2943
|
detail: { rowId: t.rowId, toIndex: i },
|
|
2930
2944
|
bubbles: !0,
|
|
@@ -2941,10 +2955,10 @@ let P = class extends g {
|
|
|
2941
2955
|
this._resetDragState();
|
|
2942
2956
|
}
|
|
2943
2957
|
_resetDragState() {
|
|
2944
|
-
this._isDragOver = !1, this._rowDropIndex = -1,
|
|
2958
|
+
this._isDragOver = !1, this._rowDropIndex = -1, Be();
|
|
2945
2959
|
}
|
|
2946
2960
|
};
|
|
2947
|
-
|
|
2961
|
+
C.styles = g`
|
|
2948
2962
|
:host {
|
|
2949
2963
|
display: block;
|
|
2950
2964
|
flex: 1;
|
|
@@ -3073,383 +3087,34 @@ P.styles = b`
|
|
|
3073
3087
|
border-radius: var(--pigeon-radius, 6px);
|
|
3074
3088
|
}
|
|
3075
3089
|
`;
|
|
3076
|
-
|
|
3090
|
+
z([
|
|
3077
3091
|
p({ type: Object })
|
|
3078
|
-
],
|
|
3079
|
-
|
|
3092
|
+
], C.prototype, "doc", 2);
|
|
3093
|
+
z([
|
|
3080
3094
|
p({ type: Object })
|
|
3081
|
-
],
|
|
3082
|
-
|
|
3095
|
+
], C.prototype, "selection", 2);
|
|
3096
|
+
z([
|
|
3083
3097
|
p({ type: String, attribute: "editing-block-id" })
|
|
3084
|
-
],
|
|
3085
|
-
|
|
3098
|
+
], C.prototype, "editingBlockId", 2);
|
|
3099
|
+
z([
|
|
3086
3100
|
p({ type: Number, attribute: "preview-width" })
|
|
3087
|
-
],
|
|
3088
|
-
|
|
3101
|
+
], C.prototype, "previewWidth", 2);
|
|
3102
|
+
z([
|
|
3089
3103
|
p({ type: String })
|
|
3090
|
-
],
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
],
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
],
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
],
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
],
|
|
3103
|
-
|
|
3104
|
-
* @license
|
|
3105
|
-
* Copyright 2017 Google LLC
|
|
3106
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3107
|
-
*/
|
|
3108
|
-
const Se = globalThis, Wt = (e) => e, Je = Se.trustedTypes, Vt = Je ? Je.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, io = "$lit$", U = `lit$${Math.random().toFixed(9).slice(2)}$`, ro = "?" + U, $i = `<${ro}>`, ne = document, Ze = () => ne.createComment(""), Me = (e) => e === null || typeof e != "object" && typeof e != "function", Dt = Array.isArray, wi = (e) => Dt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
3109
|
-
\f\r]`, Te = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Yt = /-->/g, qt = />/g, ie = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
3110
|
-
\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);
|
|
3111
|
-
function ao(e, t) {
|
|
3112
|
-
if (!Dt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
3113
|
-
return Vt !== void 0 ? Vt.createHTML(t) : t;
|
|
3114
|
-
}
|
|
3115
|
-
const ki = (e, t) => {
|
|
3116
|
-
const o = e.length - 1, r = [];
|
|
3117
|
-
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Te;
|
|
3118
|
-
for (let h = 0; h < o; h++) {
|
|
3119
|
-
const c = e[h];
|
|
3120
|
-
let v, m, f = -1, R = 0;
|
|
3121
|
-
for (; R < c.length && (a.lastIndex = R, m = a.exec(c), m !== null); ) R = a.lastIndex, a === Te ? m[1] === "!--" ? a = Yt : m[1] !== void 0 ? a = qt : 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 ?? Te, 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 === Yt || a === qt ? a = Te : (a = ie, i = void 0);
|
|
3122
|
-
const N = a === ie && e[h + 1].startsWith("/>") ? " " : "";
|
|
3123
|
-
n += a === Te ? c + $i : f >= 0 ? (r.push(v), c.slice(0, f) + io + c.slice(f) + U + N) : c + U + (f === -2 ? h : N);
|
|
3124
|
-
}
|
|
3125
|
-
return [ao(e, n + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
3126
|
-
};
|
|
3127
|
-
class Fe {
|
|
3128
|
-
constructor({ strings: t, _$litType$: o }, r) {
|
|
3129
|
-
let i;
|
|
3130
|
-
this.parts = [];
|
|
3131
|
-
let n = 0, a = 0;
|
|
3132
|
-
const h = t.length - 1, c = this.parts, [v, m] = ki(t, o);
|
|
3133
|
-
if (this.el = Fe.createElement(v, r), re.currentNode = this.el.content, o === 2 || o === 3) {
|
|
3134
|
-
const f = this.el.content.firstChild;
|
|
3135
|
-
f.replaceWith(...f.childNodes);
|
|
3136
|
-
}
|
|
3137
|
-
for (; (i = re.nextNode()) !== null && c.length < h; ) {
|
|
3138
|
-
if (i.nodeType === 1) {
|
|
3139
|
-
if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(io)) {
|
|
3140
|
-
const R = m[a++], N = i.getAttribute(f).split(U), Ve = /([.?@])?(.*)/.exec(R);
|
|
3141
|
-
c.push({ type: 1, index: n, name: Ve[2], strings: N, ctor: Ve[1] === "." ? Ii : Ve[1] === "?" ? Pi : Ve[1] === "@" ? Ti : nt }), i.removeAttribute(f);
|
|
3142
|
-
} else f.startsWith(U) && (c.push({ type: 6, index: n }), i.removeAttribute(f));
|
|
3143
|
-
if (no.test(i.tagName)) {
|
|
3144
|
-
const f = i.textContent.split(U), R = f.length - 1;
|
|
3145
|
-
if (R > 0) {
|
|
3146
|
-
i.textContent = Je ? Je.emptyScript : "";
|
|
3147
|
-
for (let N = 0; N < R; N++) i.append(f[N], Ze()), re.nextNode(), c.push({ type: 2, index: ++n });
|
|
3148
|
-
i.append(f[R], Ze());
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
} else if (i.nodeType === 8) if (i.data === ro) c.push({ type: 2, index: n });
|
|
3152
|
-
else {
|
|
3153
|
-
let f = -1;
|
|
3154
|
-
for (; (f = i.data.indexOf(U, f + 1)) !== -1; ) c.push({ type: 7, index: n }), f += U.length - 1;
|
|
3155
|
-
}
|
|
3156
|
-
n++;
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
static createElement(t, o) {
|
|
3160
|
-
const r = ne.createElement("template");
|
|
3161
|
-
return r.innerHTML = t, r;
|
|
3162
|
-
}
|
|
3163
|
-
}
|
|
3164
|
-
function ue(e, t, o = e, r) {
|
|
3165
|
-
var a, h;
|
|
3166
|
-
if (t === He) return t;
|
|
3167
|
-
let i = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
|
|
3168
|
-
const n = Me(t) ? void 0 : t._$litDirective$;
|
|
3169
|
-
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;
|
|
3170
|
-
}
|
|
3171
|
-
class Ci {
|
|
3172
|
-
constructor(t, o) {
|
|
3173
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
|
|
3174
|
-
}
|
|
3175
|
-
get parentNode() {
|
|
3176
|
-
return this._$AM.parentNode;
|
|
3177
|
-
}
|
|
3178
|
-
get _$AU() {
|
|
3179
|
-
return this._$AM._$AU;
|
|
3180
|
-
}
|
|
3181
|
-
u(t) {
|
|
3182
|
-
const { el: { content: o }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? ne).importNode(o, !0);
|
|
3183
|
-
re.currentNode = i;
|
|
3184
|
-
let n = re.nextNode(), a = 0, h = 0, c = r[0];
|
|
3185
|
-
for (; c !== void 0; ) {
|
|
3186
|
-
if (a === c.index) {
|
|
3187
|
-
let v;
|
|
3188
|
-
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];
|
|
3189
|
-
}
|
|
3190
|
-
a !== (c == null ? void 0 : c.index) && (n = re.nextNode(), a++);
|
|
3191
|
-
}
|
|
3192
|
-
return re.currentNode = ne, i;
|
|
3193
|
-
}
|
|
3194
|
-
p(t) {
|
|
3195
|
-
let o = 0;
|
|
3196
|
-
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++;
|
|
3197
|
-
}
|
|
3198
|
-
}
|
|
3199
|
-
class rt {
|
|
3200
|
-
get _$AU() {
|
|
3201
|
-
var t;
|
|
3202
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
3203
|
-
}
|
|
3204
|
-
constructor(t, o, r, i) {
|
|
3205
|
-
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;
|
|
3206
|
-
}
|
|
3207
|
-
get parentNode() {
|
|
3208
|
-
let t = this._$AA.parentNode;
|
|
3209
|
-
const o = this._$AM;
|
|
3210
|
-
return o !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = o.parentNode), t;
|
|
3211
|
-
}
|
|
3212
|
-
get startNode() {
|
|
3213
|
-
return this._$AA;
|
|
3214
|
-
}
|
|
3215
|
-
get endNode() {
|
|
3216
|
-
return this._$AB;
|
|
3217
|
-
}
|
|
3218
|
-
_$AI(t, o = this) {
|
|
3219
|
-
t = ue(this, t, o), Me(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);
|
|
3220
|
-
}
|
|
3221
|
-
O(t) {
|
|
3222
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
3223
|
-
}
|
|
3224
|
-
T(t) {
|
|
3225
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
3226
|
-
}
|
|
3227
|
-
_(t) {
|
|
3228
|
-
this._$AH !== y && Me(this._$AH) ? this._$AA.nextSibling.data = t : this.T(ne.createTextNode(t)), this._$AH = t;
|
|
3229
|
-
}
|
|
3230
|
-
$(t) {
|
|
3231
|
-
var n;
|
|
3232
|
-
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);
|
|
3233
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(o);
|
|
3234
|
-
else {
|
|
3235
|
-
const a = new Ci(i, this), h = a.u(this.options);
|
|
3236
|
-
a.p(o), this.T(h), this._$AH = a;
|
|
3237
|
-
}
|
|
3238
|
-
}
|
|
3239
|
-
_$AC(t) {
|
|
3240
|
-
let o = Jt.get(t.strings);
|
|
3241
|
-
return o === void 0 && Jt.set(t.strings, o = new Fe(t)), o;
|
|
3242
|
-
}
|
|
3243
|
-
k(t) {
|
|
3244
|
-
Dt(this._$AH) || (this._$AH = [], this._$AR());
|
|
3245
|
-
const o = this._$AH;
|
|
3246
|
-
let r, i = 0;
|
|
3247
|
-
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++;
|
|
3248
|
-
i < o.length && (this._$AR(r && r._$AB.nextSibling, i), o.length = i);
|
|
3249
|
-
}
|
|
3250
|
-
_$AR(t = this._$AA.nextSibling, o) {
|
|
3251
|
-
var r;
|
|
3252
|
-
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, o); t !== this._$AB; ) {
|
|
3253
|
-
const i = Wt(t).nextSibling;
|
|
3254
|
-
Wt(t).remove(), t = i;
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
setConnected(t) {
|
|
3258
|
-
var o;
|
|
3259
|
-
this._$AM === void 0 && (this._$Cv = t, (o = this._$AP) == null || o.call(this, t));
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
class nt {
|
|
3263
|
-
get tagName() {
|
|
3264
|
-
return this.element.tagName;
|
|
3265
|
-
}
|
|
3266
|
-
get _$AU() {
|
|
3267
|
-
return this._$AM._$AU;
|
|
3268
|
-
}
|
|
3269
|
-
constructor(t, o, r, i, n) {
|
|
3270
|
-
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;
|
|
3271
|
-
}
|
|
3272
|
-
_$AI(t, o = this, r, i) {
|
|
3273
|
-
const n = this.strings;
|
|
3274
|
-
let a = !1;
|
|
3275
|
-
if (n === void 0) t = ue(this, t, o, 0), a = !Me(t) || t !== this._$AH && t !== He, a && (this._$AH = t);
|
|
3276
|
-
else {
|
|
3277
|
-
const h = t;
|
|
3278
|
-
let c, v;
|
|
3279
|
-
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 = !Me(v) || v !== this._$AH[c]), v === y ? t = y : t !== y && (t += (v ?? "") + n[c + 1]), this._$AH[c] = v;
|
|
3280
|
-
}
|
|
3281
|
-
a && !i && this.j(t);
|
|
3282
|
-
}
|
|
3283
|
-
j(t) {
|
|
3284
|
-
t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
3285
|
-
}
|
|
3286
|
-
}
|
|
3287
|
-
class Ii extends nt {
|
|
3288
|
-
constructor() {
|
|
3289
|
-
super(...arguments), this.type = 3;
|
|
3290
|
-
}
|
|
3291
|
-
j(t) {
|
|
3292
|
-
this.element[this.name] = t === y ? void 0 : t;
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3295
|
-
class Pi extends nt {
|
|
3296
|
-
constructor() {
|
|
3297
|
-
super(...arguments), this.type = 4;
|
|
3298
|
-
}
|
|
3299
|
-
j(t) {
|
|
3300
|
-
this.element.toggleAttribute(this.name, !!t && t !== y);
|
|
3301
|
-
}
|
|
3302
|
-
}
|
|
3303
|
-
class Ti extends nt {
|
|
3304
|
-
constructor(t, o, r, i, n) {
|
|
3305
|
-
super(t, o, r, i, n), this.type = 5;
|
|
3306
|
-
}
|
|
3307
|
-
_$AI(t, o = this) {
|
|
3308
|
-
if ((t = ue(this, t, o, 0) ?? y) === He) return;
|
|
3309
|
-
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);
|
|
3310
|
-
i && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
3311
|
-
}
|
|
3312
|
-
handleEvent(t) {
|
|
3313
|
-
var o;
|
|
3314
|
-
typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
3315
|
-
}
|
|
3316
|
-
}
|
|
3317
|
-
class Si {
|
|
3318
|
-
constructor(t, o, r) {
|
|
3319
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
|
|
3320
|
-
}
|
|
3321
|
-
get _$AU() {
|
|
3322
|
-
return this._$AM._$AU;
|
|
3323
|
-
}
|
|
3324
|
-
_$AI(t) {
|
|
3325
|
-
ue(this, t);
|
|
3326
|
-
}
|
|
3327
|
-
}
|
|
3328
|
-
const vt = Se.litHtmlPolyfillSupport;
|
|
3329
|
-
vt == null || vt(Fe, rt), (Se.litHtmlVersions ?? (Se.litHtmlVersions = [])).push("3.3.2");
|
|
3330
|
-
/**
|
|
3331
|
-
* @license
|
|
3332
|
-
* Copyright 2020 Google LLC
|
|
3333
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3334
|
-
*/
|
|
3335
|
-
const Oi = (e) => e.strings === void 0;
|
|
3336
|
-
/**
|
|
3337
|
-
* @license
|
|
3338
|
-
* Copyright 2017 Google LLC
|
|
3339
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3340
|
-
*/
|
|
3341
|
-
const Di = { CHILD: 2 }, Ei = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
3342
|
-
class Ai {
|
|
3343
|
-
constructor(t) {
|
|
3344
|
-
}
|
|
3345
|
-
get _$AU() {
|
|
3346
|
-
return this._$AM._$AU;
|
|
3347
|
-
}
|
|
3348
|
-
_$AT(t, o, r) {
|
|
3349
|
-
this._$Ct = t, this._$AM = o, this._$Ci = r;
|
|
3350
|
-
}
|
|
3351
|
-
_$AS(t, o) {
|
|
3352
|
-
return this.update(t, o);
|
|
3353
|
-
}
|
|
3354
|
-
update(t, o) {
|
|
3355
|
-
return this.render(...o);
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
/**
|
|
3359
|
-
* @license
|
|
3360
|
-
* Copyright 2017 Google LLC
|
|
3361
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3362
|
-
*/
|
|
3363
|
-
const Oe = (e, t) => {
|
|
3364
|
-
var r;
|
|
3365
|
-
const o = e._$AN;
|
|
3366
|
-
if (o === void 0) return !1;
|
|
3367
|
-
for (const i of o) (r = i._$AO) == null || r.call(i, t, !1), Oe(i, t);
|
|
3368
|
-
return !0;
|
|
3369
|
-
}, Qe = (e) => {
|
|
3370
|
-
let t, o;
|
|
3371
|
-
do {
|
|
3372
|
-
if ((t = e._$AM) === void 0) break;
|
|
3373
|
-
o = t._$AN, o.delete(e), e = t;
|
|
3374
|
-
} while ((o == null ? void 0 : o.size) === 0);
|
|
3375
|
-
}, so = (e) => {
|
|
3376
|
-
for (let t; t = e._$AM; e = t) {
|
|
3377
|
-
let o = t._$AN;
|
|
3378
|
-
if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
|
|
3379
|
-
else if (o.has(e)) break;
|
|
3380
|
-
o.add(e), Ri(t);
|
|
3381
|
-
}
|
|
3382
|
-
};
|
|
3383
|
-
function Bi(e) {
|
|
3384
|
-
this._$AN !== void 0 ? (Qe(this), this._$AM = e, so(this)) : this._$AM = e;
|
|
3385
|
-
}
|
|
3386
|
-
function ji(e, t = !1, o = 0) {
|
|
3387
|
-
const r = this._$AH, i = this._$AN;
|
|
3388
|
-
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]);
|
|
3389
|
-
else r != null && (Oe(r, !1), Qe(r));
|
|
3390
|
-
else Oe(this, e);
|
|
3391
|
-
}
|
|
3392
|
-
const Ri = (e) => {
|
|
3393
|
-
e.type == Di.CHILD && (e._$AP ?? (e._$AP = ji), e._$AQ ?? (e._$AQ = Bi));
|
|
3394
|
-
};
|
|
3395
|
-
class Li extends Ai {
|
|
3396
|
-
constructor() {
|
|
3397
|
-
super(...arguments), this._$AN = void 0;
|
|
3398
|
-
}
|
|
3399
|
-
_$AT(t, o, r) {
|
|
3400
|
-
super._$AT(t, o, r), so(this), this.isConnected = t._$AU;
|
|
3401
|
-
}
|
|
3402
|
-
_$AO(t, o = !0) {
|
|
3403
|
-
var r, i;
|
|
3404
|
-
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));
|
|
3405
|
-
}
|
|
3406
|
-
setValue(t) {
|
|
3407
|
-
if (Oi(this._$Ct)) this._$Ct._$AI(t, this);
|
|
3408
|
-
else {
|
|
3409
|
-
const o = [...this._$Ct._$AH];
|
|
3410
|
-
o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
|
|
3411
|
-
}
|
|
3412
|
-
}
|
|
3413
|
-
disconnected() {
|
|
3414
|
-
}
|
|
3415
|
-
reconnected() {
|
|
3416
|
-
}
|
|
3417
|
-
}
|
|
3418
|
-
/**
|
|
3419
|
-
* @license
|
|
3420
|
-
* Copyright 2020 Google LLC
|
|
3421
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3422
|
-
*/
|
|
3423
|
-
const be = () => new zi();
|
|
3424
|
-
class zi {
|
|
3425
|
-
}
|
|
3426
|
-
const ft = /* @__PURE__ */ new WeakMap(), ve = Ei(class extends Li {
|
|
3427
|
-
render(e) {
|
|
3428
|
-
return y;
|
|
3429
|
-
}
|
|
3430
|
-
update(e, [t]) {
|
|
3431
|
-
var r;
|
|
3432
|
-
const o = t !== this.G;
|
|
3433
|
-
return o && this.G !== void 0 && 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;
|
|
3434
|
-
}
|
|
3435
|
-
rt(e) {
|
|
3436
|
-
if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
3437
|
-
const t = this.ht ?? globalThis;
|
|
3438
|
-
let o = ft.get(t);
|
|
3439
|
-
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);
|
|
3440
|
-
} else this.G.value = e;
|
|
3441
|
-
}
|
|
3442
|
-
get lt() {
|
|
3443
|
-
var e, t;
|
|
3444
|
-
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;
|
|
3445
|
-
}
|
|
3446
|
-
disconnected() {
|
|
3447
|
-
this.lt === this.ct && this.rt(void 0);
|
|
3448
|
-
}
|
|
3449
|
-
reconnected() {
|
|
3450
|
-
this.rt(this.ct);
|
|
3451
|
-
}
|
|
3452
|
-
}), C = 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`
|
|
3453
3118
|
:host {
|
|
3454
3119
|
display: block;
|
|
3455
3120
|
}
|
|
@@ -3665,12 +3330,12 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ei(class extends Li {
|
|
|
3665
3330
|
box-shadow: var(--pigeon-ring-shadow);
|
|
3666
3331
|
}
|
|
3667
3332
|
`;
|
|
3668
|
-
var
|
|
3669
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
3670
3335
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3671
|
-
return r && i &&
|
|
3336
|
+
return r && i && Fo(t, o, i), i;
|
|
3672
3337
|
};
|
|
3673
|
-
let
|
|
3338
|
+
let Pe = class extends d {
|
|
3674
3339
|
constructor() {
|
|
3675
3340
|
super(...arguments), this.label = "Alignment", this.value = "left";
|
|
3676
3341
|
}
|
|
@@ -3728,7 +3393,7 @@ let Ne = class extends g {
|
|
|
3728
3393
|
}));
|
|
3729
3394
|
}
|
|
3730
3395
|
};
|
|
3731
|
-
|
|
3396
|
+
Pe.styles = g`
|
|
3732
3397
|
:host {
|
|
3733
3398
|
display: block;
|
|
3734
3399
|
margin-bottom: 12px;
|
|
@@ -3791,21 +3456,21 @@ Ne.styles = b`
|
|
|
3791
3456
|
height: 16px;
|
|
3792
3457
|
}
|
|
3793
3458
|
`;
|
|
3794
|
-
|
|
3459
|
+
st([
|
|
3795
3460
|
p({ type: String })
|
|
3796
|
-
],
|
|
3797
|
-
|
|
3461
|
+
], Pe.prototype, "label", 2);
|
|
3462
|
+
st([
|
|
3798
3463
|
p({ type: String })
|
|
3799
|
-
],
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
],
|
|
3803
|
-
var
|
|
3804
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
3805
3470
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3806
|
-
return r && i &&
|
|
3471
|
+
return r && i && Uo(t, o, i), i;
|
|
3807
3472
|
};
|
|
3808
|
-
let
|
|
3473
|
+
let Te = class extends d {
|
|
3809
3474
|
constructor() {
|
|
3810
3475
|
super(...arguments), this.label = "Padding", this.value = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
3811
3476
|
}
|
|
@@ -3863,7 +3528,7 @@ let Ue = class extends g {
|
|
|
3863
3528
|
}));
|
|
3864
3529
|
}
|
|
3865
3530
|
};
|
|
3866
|
-
|
|
3531
|
+
Te.styles = g`
|
|
3867
3532
|
:host {
|
|
3868
3533
|
display: block;
|
|
3869
3534
|
margin-bottom: 14px;
|
|
@@ -3948,21 +3613,21 @@ Ue.styles = b`
|
|
|
3948
3613
|
-moz-appearance: textfield;
|
|
3949
3614
|
}
|
|
3950
3615
|
`;
|
|
3951
|
-
|
|
3616
|
+
lt([
|
|
3952
3617
|
p({ type: String })
|
|
3953
|
-
],
|
|
3954
|
-
|
|
3618
|
+
], Te.prototype, "label", 2);
|
|
3619
|
+
lt([
|
|
3955
3620
|
p({ type: Object })
|
|
3956
|
-
],
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
],
|
|
3960
|
-
var
|
|
3961
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
3962
3627
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3963
|
-
return r && i &&
|
|
3628
|
+
return r && i && No(t, o, i), i;
|
|
3964
3629
|
};
|
|
3965
|
-
let
|
|
3630
|
+
let j = class extends d {
|
|
3966
3631
|
constructor() {
|
|
3967
3632
|
super(...arguments), this.label = "", this.value = 0, this.min = 0, this.max = 100, this.step = 1, this.unit = "px";
|
|
3968
3633
|
}
|
|
@@ -4009,7 +3674,7 @@ let L = class extends g {
|
|
|
4009
3674
|
}));
|
|
4010
3675
|
}
|
|
4011
3676
|
};
|
|
4012
|
-
|
|
3677
|
+
j.styles = g`
|
|
4013
3678
|
:host {
|
|
4014
3679
|
display: block;
|
|
4015
3680
|
margin-bottom: 12px;
|
|
@@ -4109,40 +3774,40 @@ L.styles = b`
|
|
|
4109
3774
|
-moz-appearance: textfield;
|
|
4110
3775
|
}
|
|
4111
3776
|
`;
|
|
4112
|
-
|
|
3777
|
+
ee([
|
|
4113
3778
|
p({ type: String })
|
|
4114
|
-
],
|
|
4115
|
-
|
|
3779
|
+
], j.prototype, "label", 2);
|
|
3780
|
+
ee([
|
|
4116
3781
|
p({ type: Number })
|
|
4117
|
-
],
|
|
4118
|
-
|
|
3782
|
+
], j.prototype, "value", 2);
|
|
3783
|
+
ee([
|
|
4119
3784
|
p({ type: Number })
|
|
4120
|
-
],
|
|
4121
|
-
|
|
3785
|
+
], j.prototype, "min", 2);
|
|
3786
|
+
ee([
|
|
4122
3787
|
p({ type: Number })
|
|
4123
|
-
],
|
|
4124
|
-
|
|
3788
|
+
], j.prototype, "max", 2);
|
|
3789
|
+
ee([
|
|
4125
3790
|
p({ type: Number })
|
|
4126
|
-
],
|
|
4127
|
-
|
|
3791
|
+
], j.prototype, "step", 2);
|
|
3792
|
+
ee([
|
|
4128
3793
|
p({ type: String })
|
|
4129
|
-
],
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
],
|
|
4133
|
-
var
|
|
4134
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
4135
3800
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4136
|
-
return r && i &&
|
|
3801
|
+
return r && i && qo(t, o, i), i;
|
|
4137
3802
|
};
|
|
4138
|
-
let
|
|
3803
|
+
let K = class extends d {
|
|
4139
3804
|
constructor() {
|
|
4140
3805
|
super(...arguments), this.tags = [], this.open = !1, this.x = 0, this.y = 0, this._search = "";
|
|
4141
3806
|
}
|
|
4142
3807
|
render() {
|
|
4143
3808
|
const e = this._getFilteredTags(), t = this._groupByCategory(e);
|
|
4144
3809
|
return l`
|
|
4145
|
-
<div class="picker" style="position:
|
|
3810
|
+
<div class="picker" style="position: fixed; left: ${this.x}px; top: ${this.y}px;">
|
|
4146
3811
|
<div class="search-box">
|
|
4147
3812
|
<input
|
|
4148
3813
|
type="text"
|
|
@@ -4191,7 +3856,7 @@ let V = class extends g {
|
|
|
4191
3856
|
})), this.open = !1, this._search = "";
|
|
4192
3857
|
}
|
|
4193
3858
|
};
|
|
4194
|
-
|
|
3859
|
+
K.styles = g`
|
|
4195
3860
|
:host {
|
|
4196
3861
|
display: none;
|
|
4197
3862
|
}
|
|
@@ -4282,32 +3947,32 @@ V.styles = b`
|
|
|
4282
3947
|
font-size: 13px;
|
|
4283
3948
|
}
|
|
4284
3949
|
`;
|
|
4285
|
-
|
|
3950
|
+
ue([
|
|
4286
3951
|
p({ type: Array })
|
|
4287
|
-
],
|
|
4288
|
-
|
|
3952
|
+
], K.prototype, "tags", 2);
|
|
3953
|
+
ue([
|
|
4289
3954
|
p({ type: Boolean, reflect: !0 })
|
|
4290
|
-
],
|
|
4291
|
-
|
|
3955
|
+
], K.prototype, "open", 2);
|
|
3956
|
+
ue([
|
|
4292
3957
|
p({ type: Number })
|
|
4293
|
-
],
|
|
4294
|
-
|
|
3958
|
+
], K.prototype, "x", 2);
|
|
3959
|
+
ue([
|
|
4295
3960
|
p({ type: Number })
|
|
4296
|
-
],
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
],
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
],
|
|
4303
|
-
var
|
|
4304
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
4305
3970
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4306
|
-
return r && i &&
|
|
3971
|
+
return r && i && Vo(t, o, i), i;
|
|
4307
3972
|
};
|
|
4308
|
-
let
|
|
3973
|
+
let I = class extends d {
|
|
4309
3974
|
constructor() {
|
|
4310
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef =
|
|
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();
|
|
4311
3976
|
}
|
|
4312
3977
|
render() {
|
|
4313
3978
|
if (!this.block) return l``;
|
|
@@ -4318,14 +3983,14 @@ let E = class extends g {
|
|
|
4318
3983
|
<div class="field">
|
|
4319
3984
|
<div class="label-row">
|
|
4320
3985
|
<label>${s("panel.common.contentHtml")}</label>
|
|
4321
|
-
${t ? l`
|
|
4322
|
-
<button class="tag-btn" ${
|
|
3986
|
+
${t || this.requestMergeTags ? l`
|
|
3987
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
4323
3988
|
${s("panel.common.tagBtn")}
|
|
4324
3989
|
</button>
|
|
4325
3990
|
` : ""}
|
|
4326
3991
|
</div>
|
|
4327
3992
|
<textarea
|
|
4328
|
-
${
|
|
3993
|
+
${re(this._textareaRef)}
|
|
4329
3994
|
.value=${e.content}
|
|
4330
3995
|
@change=${this._onContentChange}
|
|
4331
3996
|
></textarea>
|
|
@@ -4368,6 +4033,10 @@ let E = class extends g {
|
|
|
4368
4033
|
`;
|
|
4369
4034
|
}
|
|
4370
4035
|
_togglePicker() {
|
|
4036
|
+
if (!this.mergeTags.length) {
|
|
4037
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
4038
|
+
return;
|
|
4039
|
+
}
|
|
4371
4040
|
const e = this._triggerRef.value;
|
|
4372
4041
|
if (e) {
|
|
4373
4042
|
if (!this._pickerOpen) {
|
|
@@ -4378,18 +4047,18 @@ let E = class extends g {
|
|
|
4378
4047
|
}
|
|
4379
4048
|
}
|
|
4380
4049
|
_onMergeTagInsert(e) {
|
|
4381
|
-
const t =
|
|
4050
|
+
const t = Pt.getActive();
|
|
4382
4051
|
if (t && !t.isDestroyed) {
|
|
4383
|
-
const
|
|
4384
|
-
t.chain().focus().insertContent({ type: "mergeTag", attrs: { name:
|
|
4052
|
+
const y = this._extractTagName(e.detail.tag.name);
|
|
4053
|
+
t.chain().focus().insertContent({ type: "mergeTag", attrs: { name: y } }).run(), this._pickerOpen = !1;
|
|
4385
4054
|
return;
|
|
4386
4055
|
}
|
|
4387
4056
|
const o = this._textareaRef.value;
|
|
4388
4057
|
if (!o) return;
|
|
4389
|
-
const r = o.selectionStart, i = o.selectionEnd, n = o.value, a = e.detail.tag.name,
|
|
4390
|
-
o.value =
|
|
4391
|
-
const
|
|
4392
|
-
o.setSelectionRange(
|
|
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;
|
|
4393
4062
|
}
|
|
4394
4063
|
/** Strip `{{` and `}}` from a tag name string. */
|
|
4395
4064
|
_extractTagName(e) {
|
|
@@ -4423,9 +4092,9 @@ let E = class extends g {
|
|
|
4423
4092
|
this._emit({ padding: e.detail.value });
|
|
4424
4093
|
}
|
|
4425
4094
|
};
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4095
|
+
I.styles = [
|
|
4096
|
+
$,
|
|
4097
|
+
g`
|
|
4429
4098
|
/* Content textarea uses the monospace face so the HTML payload is
|
|
4430
4099
|
readable to authors editing the raw markup. */
|
|
4431
4100
|
textarea {
|
|
@@ -4468,44 +4137,47 @@ E.styles = [
|
|
|
4468
4137
|
}
|
|
4469
4138
|
`
|
|
4470
4139
|
];
|
|
4471
|
-
|
|
4140
|
+
M([
|
|
4472
4141
|
p({ type: Object })
|
|
4473
|
-
],
|
|
4474
|
-
|
|
4142
|
+
], I.prototype, "block", 2);
|
|
4143
|
+
M([
|
|
4475
4144
|
p({ type: String })
|
|
4476
|
-
],
|
|
4477
|
-
|
|
4145
|
+
], I.prototype, "rowId", 2);
|
|
4146
|
+
M([
|
|
4478
4147
|
p({ type: String })
|
|
4479
|
-
],
|
|
4480
|
-
|
|
4148
|
+
], I.prototype, "columnId", 2);
|
|
4149
|
+
M([
|
|
4481
4150
|
p({ type: Array })
|
|
4482
|
-
],
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
],
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
],
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
],
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
],
|
|
4495
|
-
|
|
4496
|
-
|
|
4151
|
+
], I.prototype, "mergeTags", 2);
|
|
4152
|
+
M([
|
|
4153
|
+
p({ attribute: !1 })
|
|
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--)
|
|
4497
4169
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4498
|
-
return r && i &&
|
|
4170
|
+
return r && i && Jo(t, o, i), i;
|
|
4499
4171
|
};
|
|
4500
|
-
let
|
|
4501
|
-
function
|
|
4502
|
-
return
|
|
4172
|
+
let Ve = null;
|
|
4173
|
+
function Zo() {
|
|
4174
|
+
return Ve || (Ve = import("./pigeon-stock-tab.js")), Ve;
|
|
4503
4175
|
}
|
|
4504
|
-
const
|
|
4505
|
-
let
|
|
4176
|
+
const Qo = 250, De = "__all__";
|
|
4177
|
+
let f = class extends d {
|
|
4506
4178
|
constructor() {
|
|
4507
|
-
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 =
|
|
4508
|
-
this._tab = "stock", this._stockTabLoaded || (await
|
|
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);
|
|
4509
4181
|
};
|
|
4510
4182
|
}
|
|
4511
4183
|
/* ----------------------------------------------------------------- */
|
|
@@ -4535,7 +4207,7 @@ let x = class extends g {
|
|
|
4535
4207
|
<h3>${e ? s("asset.title") : s("asset.title-upload")}</h3>
|
|
4536
4208
|
<button class="close-btn" @click=${this._close} aria-label=${s("asset.close")}>×</button>
|
|
4537
4209
|
</div>
|
|
4538
|
-
${t ? this._renderTabs(e) :
|
|
4210
|
+
${t ? this._renderTabs(e) : J}
|
|
4539
4211
|
<div class="body">
|
|
4540
4212
|
${this._activeTab === "stock" && this._hasStock ? this._renderStock() : e && this._activeTab === "library" ? this._renderLibrary() : this._renderUpload()}
|
|
4541
4213
|
</div>
|
|
@@ -4551,7 +4223,7 @@ let x = class extends g {
|
|
|
4551
4223
|
role="tab"
|
|
4552
4224
|
aria-selected=${t === "library"}
|
|
4553
4225
|
@click=${() => this._tab = "library"}
|
|
4554
|
-
>${s("asset.tab.library")}</button>` :
|
|
4226
|
+
>${s("asset.tab.library")}</button>` : J}
|
|
4555
4227
|
<button
|
|
4556
4228
|
class="tab ${t === "upload" ? "active" : ""}"
|
|
4557
4229
|
role="tab"
|
|
@@ -4565,7 +4237,7 @@ let x = class extends g {
|
|
|
4565
4237
|
role="tab"
|
|
4566
4238
|
aria-selected=${t === "stock"}
|
|
4567
4239
|
@click=${this._handleStockTabClick}
|
|
4568
|
-
>${s("asset.tab.stock")}</button>` :
|
|
4240
|
+
>${s("asset.tab.stock")}</button>` : J}
|
|
4569
4241
|
</div>
|
|
4570
4242
|
`;
|
|
4571
4243
|
}
|
|
@@ -4583,7 +4255,7 @@ let x = class extends g {
|
|
|
4583
4255
|
.value=${this._folder}
|
|
4584
4256
|
@change=${this._onFolderChange}
|
|
4585
4257
|
>
|
|
4586
|
-
<option value=${
|
|
4258
|
+
<option value=${De}>${s("asset.folder.all")}</option>
|
|
4587
4259
|
${this._folders.map(
|
|
4588
4260
|
(e) => l`<option value=${e} ?selected=${this._folder === e}>${e}</option>`
|
|
4589
4261
|
)}
|
|
@@ -4604,10 +4276,10 @@ let x = class extends g {
|
|
|
4604
4276
|
@click=${() => this._toggleTag(e)}
|
|
4605
4277
|
>${e}</button>`
|
|
4606
4278
|
)}
|
|
4607
|
-
</div>` :
|
|
4608
|
-
${this._libraryError ? l`<div class="error">${this._libraryError}</div>` :
|
|
4279
|
+
</div>` : J}
|
|
4280
|
+
${this._libraryError ? l`<div class="error">${this._libraryError}</div>` : J}
|
|
4609
4281
|
${this._libraryLoading ? l`<div class="library-spinner">${s("asset.loading")}</div>` : this._assets.length === 0 ? l`<div class="empty-library">
|
|
4610
|
-
${this._search || this._selectedTags.length > 0 || this._folder !==
|
|
4282
|
+
${this._search || this._selectedTags.length > 0 || this._folder !== De ? s("asset.empty.filtered") : s("asset.empty.no-assets")}
|
|
4611
4283
|
</div>` : l`<div class="asset-grid">
|
|
4612
4284
|
${this._assets.map((e) => this._renderAssetCard(e))}
|
|
4613
4285
|
</div>`}
|
|
@@ -4650,9 +4322,9 @@ let x = class extends g {
|
|
|
4650
4322
|
|
|
4651
4323
|
${this._uploading ? l`<div class="progress-bar">
|
|
4652
4324
|
<div class="progress-fill" style="width: ${this._progress}%"></div>
|
|
4653
|
-
</div>` :
|
|
4325
|
+
</div>` : J}
|
|
4654
4326
|
|
|
4655
|
-
${this._error ? l`<div class="error">${this._error}</div>` :
|
|
4327
|
+
${this._error ? l`<div class="error">${this._error}</div>` : J}
|
|
4656
4328
|
|
|
4657
4329
|
<div class="separator">${s("asset.url.separator")}</div>
|
|
4658
4330
|
|
|
@@ -4685,7 +4357,7 @@ let x = class extends g {
|
|
|
4685
4357
|
this._libraryLoading = !0, this._libraryError = "";
|
|
4686
4358
|
try {
|
|
4687
4359
|
const t = await this.storage.list({
|
|
4688
|
-
folder: this._folder ===
|
|
4360
|
+
folder: this._folder === De ? void 0 : this._folder,
|
|
4689
4361
|
search: this._search.trim() || void 0,
|
|
4690
4362
|
tags: this._selectedTags.length > 0 ? this._selectedTags : void 0
|
|
4691
4363
|
});
|
|
@@ -4710,7 +4382,7 @@ let x = class extends g {
|
|
|
4710
4382
|
this._folder = e.target.value, this._loadAssets();
|
|
4711
4383
|
}
|
|
4712
4384
|
_onSearchInput(e) {
|
|
4713
|
-
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(),
|
|
4385
|
+
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(), Qo);
|
|
4714
4386
|
}
|
|
4715
4387
|
_toggleTag(e) {
|
|
4716
4388
|
this._selectedTags = this._selectedTags.includes(e) ? this._selectedTags.filter((t) => t !== e) : [...this._selectedTags, e], this._loadAssets();
|
|
@@ -4786,15 +4458,15 @@ let x = class extends g {
|
|
|
4786
4458
|
const i = await this.config.presignedUpload.getUploadParams(e);
|
|
4787
4459
|
this._progress = 40;
|
|
4788
4460
|
const n = i.method ?? "PUT", a = { ...i.headers ?? {} };
|
|
4789
|
-
let
|
|
4461
|
+
let u;
|
|
4790
4462
|
if (n === "POST") {
|
|
4791
|
-
const
|
|
4792
|
-
for (const [
|
|
4793
|
-
|
|
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;
|
|
4794
4466
|
} else
|
|
4795
|
-
|
|
4796
|
-
const
|
|
4797
|
-
if (this._progress = 90, !
|
|
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}`);
|
|
4798
4470
|
this._progress = 100, this._selectAsset(i.publicUrl);
|
|
4799
4471
|
} catch (i) {
|
|
4800
4472
|
this._error = i instanceof Error ? i.message : "Upload failed";
|
|
@@ -4814,9 +4486,9 @@ let x = class extends g {
|
|
|
4814
4486
|
body: i
|
|
4815
4487
|
});
|
|
4816
4488
|
if (this._progress = 80, !n.ok) throw new Error(`Upload failed: ${n.statusText}`);
|
|
4817
|
-
const a = await n.json(),
|
|
4818
|
-
if (!
|
|
4819
|
-
this._progress = 100, this._selectAsset(
|
|
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);
|
|
4820
4492
|
} catch (i) {
|
|
4821
4493
|
this._error = i instanceof Error ? i.message : "Upload failed";
|
|
4822
4494
|
} finally {
|
|
@@ -4842,7 +4514,7 @@ let x = class extends g {
|
|
|
4842
4514
|
), this._close();
|
|
4843
4515
|
}
|
|
4844
4516
|
};
|
|
4845
|
-
|
|
4517
|
+
f.styles = g`
|
|
4846
4518
|
:host {
|
|
4847
4519
|
display: none;
|
|
4848
4520
|
}
|
|
@@ -5173,66 +4845,66 @@ x.styles = b`
|
|
|
5173
4845
|
margin-top: 8px;
|
|
5174
4846
|
}
|
|
5175
4847
|
`;
|
|
5176
|
-
|
|
4848
|
+
_([
|
|
5177
4849
|
p({ type: Object })
|
|
5178
|
-
],
|
|
5179
|
-
|
|
4850
|
+
], f.prototype, "config", 2);
|
|
4851
|
+
_([
|
|
5180
4852
|
p({ attribute: !1 })
|
|
5181
|
-
],
|
|
5182
|
-
|
|
4853
|
+
], f.prototype, "storage", 2);
|
|
4854
|
+
_([
|
|
5183
4855
|
p({ type: Boolean, reflect: !0 })
|
|
5184
|
-
],
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
],
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
],
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
],
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
],
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
],
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
],
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
],
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
],
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
],
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
],
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
],
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
],
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
],
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
],
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
],
|
|
5230
|
-
var
|
|
5231
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
5232
4904
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5233
|
-
return r && i &&
|
|
4905
|
+
return r && i && ei(t, o, i), i;
|
|
5234
4906
|
};
|
|
5235
|
-
let
|
|
4907
|
+
let R = class extends d {
|
|
5236
4908
|
constructor() {
|
|
5237
4909
|
super(...arguments), this.rowId = "", this.columnId = "", this._assetManagerOpen = !1;
|
|
5238
4910
|
}
|
|
@@ -5353,41 +5025,41 @@ let z = class extends g {
|
|
|
5353
5025
|
this._emit({ src: e.detail.url }), this._assetManagerOpen = !1;
|
|
5354
5026
|
}
|
|
5355
5027
|
};
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5028
|
+
R.styles = [
|
|
5029
|
+
$,
|
|
5030
|
+
g`
|
|
5359
5031
|
.upload-btn {
|
|
5360
5032
|
margin-top: 6px;
|
|
5361
5033
|
}
|
|
5362
5034
|
`
|
|
5363
5035
|
];
|
|
5364
|
-
|
|
5036
|
+
te([
|
|
5365
5037
|
p({ type: Object })
|
|
5366
|
-
],
|
|
5367
|
-
|
|
5038
|
+
], R.prototype, "block", 2);
|
|
5039
|
+
te([
|
|
5368
5040
|
p({ type: String })
|
|
5369
|
-
],
|
|
5370
|
-
|
|
5041
|
+
], R.prototype, "rowId", 2);
|
|
5042
|
+
te([
|
|
5371
5043
|
p({ type: String })
|
|
5372
|
-
],
|
|
5373
|
-
|
|
5044
|
+
], R.prototype, "columnId", 2);
|
|
5045
|
+
te([
|
|
5374
5046
|
p({ type: Object })
|
|
5375
|
-
],
|
|
5376
|
-
|
|
5047
|
+
], R.prototype, "assetManagerConfig", 2);
|
|
5048
|
+
te([
|
|
5377
5049
|
p({ attribute: !1 })
|
|
5378
|
-
],
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
],
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
],
|
|
5385
|
-
var
|
|
5386
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
5387
5059
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5388
|
-
return r && i &&
|
|
5060
|
+
return r && i && oi(t, o, i), i;
|
|
5389
5061
|
};
|
|
5390
|
-
let
|
|
5062
|
+
let le = class extends d {
|
|
5391
5063
|
constructor() {
|
|
5392
5064
|
super(...arguments), this.label = s("control.color.label"), this.value = "#000000", this.swatches = [];
|
|
5393
5065
|
}
|
|
@@ -5406,7 +5078,7 @@ let fe = class extends g {
|
|
|
5406
5078
|
type="button"
|
|
5407
5079
|
title=${`${e.name} (${e.value})`}
|
|
5408
5080
|
aria-label=${e.name}
|
|
5409
|
-
style=${
|
|
5081
|
+
style=${Yt({ background: e.value })}
|
|
5410
5082
|
@click=${() => this._applySwatch(e.value)}
|
|
5411
5083
|
></button>`
|
|
5412
5084
|
)}
|
|
@@ -5432,7 +5104,7 @@ let fe = class extends g {
|
|
|
5432
5104
|
}));
|
|
5433
5105
|
}
|
|
5434
5106
|
};
|
|
5435
|
-
|
|
5107
|
+
le.styles = g`
|
|
5436
5108
|
:host {
|
|
5437
5109
|
display: block;
|
|
5438
5110
|
margin-bottom: 12px;
|
|
@@ -5527,24 +5199,24 @@ fe.styles = b`
|
|
|
5527
5199
|
box-shadow: var(--pigeon-ring-shadow);
|
|
5528
5200
|
}
|
|
5529
5201
|
`;
|
|
5530
|
-
|
|
5202
|
+
Ae([
|
|
5531
5203
|
p({ type: String })
|
|
5532
|
-
],
|
|
5533
|
-
|
|
5204
|
+
], le.prototype, "label", 2);
|
|
5205
|
+
Ae([
|
|
5534
5206
|
p({ type: String })
|
|
5535
|
-
],
|
|
5536
|
-
|
|
5207
|
+
], le.prototype, "value", 2);
|
|
5208
|
+
Ae([
|
|
5537
5209
|
p({ attribute: !1 })
|
|
5538
|
-
],
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
],
|
|
5542
|
-
var
|
|
5543
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
5544
5216
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5545
|
-
return r && i &&
|
|
5217
|
+
return r && i && ri(t, o, i), i;
|
|
5546
5218
|
};
|
|
5547
|
-
let
|
|
5219
|
+
let N = class extends d {
|
|
5548
5220
|
constructor() {
|
|
5549
5221
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this.linkTypes = [];
|
|
5550
5222
|
}
|
|
@@ -5706,31 +5378,31 @@ let Y = class extends g {
|
|
|
5706
5378
|
this._emit({ innerPadding: e.detail.value });
|
|
5707
5379
|
}
|
|
5708
5380
|
};
|
|
5709
|
-
|
|
5710
|
-
|
|
5381
|
+
N.styles = $;
|
|
5382
|
+
be([
|
|
5711
5383
|
p({ type: Object })
|
|
5712
|
-
],
|
|
5713
|
-
|
|
5384
|
+
], N.prototype, "block", 2);
|
|
5385
|
+
be([
|
|
5714
5386
|
p({ type: String })
|
|
5715
|
-
],
|
|
5716
|
-
|
|
5387
|
+
], N.prototype, "rowId", 2);
|
|
5388
|
+
be([
|
|
5717
5389
|
p({ type: String })
|
|
5718
|
-
],
|
|
5719
|
-
|
|
5390
|
+
], N.prototype, "columnId", 2);
|
|
5391
|
+
be([
|
|
5720
5392
|
p({ attribute: !1 })
|
|
5721
|
-
],
|
|
5722
|
-
|
|
5393
|
+
], N.prototype, "swatches", 2);
|
|
5394
|
+
be([
|
|
5723
5395
|
p({ attribute: !1 })
|
|
5724
|
-
],
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
],
|
|
5728
|
-
var
|
|
5729
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
5730
5402
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5731
|
-
return r && i &&
|
|
5403
|
+
return r && i && ai(t, o, i), i;
|
|
5732
5404
|
};
|
|
5733
|
-
let
|
|
5405
|
+
let Re = class extends d {
|
|
5734
5406
|
get _layouts() {
|
|
5735
5407
|
return [
|
|
5736
5408
|
{ label: s("panel.row.layout1col"), ratios: [12] },
|
|
@@ -5849,9 +5521,9 @@ let et = class extends g {
|
|
|
5849
5521
|
this._emitRowUpdate({ condition: t || void 0 });
|
|
5850
5522
|
}
|
|
5851
5523
|
};
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5524
|
+
Re.styles = [
|
|
5525
|
+
$,
|
|
5526
|
+
g`
|
|
5855
5527
|
.hint {
|
|
5856
5528
|
margin: 4px 0 0;
|
|
5857
5529
|
font-size: 11px;
|
|
@@ -5920,18 +5592,18 @@ et.styles = [
|
|
|
5920
5592
|
}
|
|
5921
5593
|
`
|
|
5922
5594
|
];
|
|
5923
|
-
|
|
5595
|
+
It([
|
|
5924
5596
|
p({ type: Object })
|
|
5925
|
-
],
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
],
|
|
5929
|
-
var
|
|
5930
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
5931
5603
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5932
|
-
return r && i &&
|
|
5604
|
+
return r && i && li(t, o, i), i;
|
|
5933
5605
|
};
|
|
5934
|
-
const
|
|
5606
|
+
const xt = [
|
|
5935
5607
|
{ label: "Arial", value: "Arial, Helvetica, sans-serif" },
|
|
5936
5608
|
{ label: "Georgia", value: "Georgia, Times, serif" },
|
|
5937
5609
|
{ label: "Courier New", value: "'Courier New', Courier, monospace" },
|
|
@@ -5940,13 +5612,13 @@ const Zt = [
|
|
|
5940
5612
|
{ label: "Trebuchet MS", value: "'Trebuchet MS', sans-serif" },
|
|
5941
5613
|
{ label: "Times New Roman", value: "'Times New Roman', Times, serif" }
|
|
5942
5614
|
];
|
|
5943
|
-
let
|
|
5615
|
+
let pe = class extends d {
|
|
5944
5616
|
constructor() {
|
|
5945
5617
|
super(...arguments), this.label = s("control.fontPicker.label"), this.value = "", this.brandFonts = [];
|
|
5946
5618
|
}
|
|
5947
5619
|
get _options() {
|
|
5948
|
-
const e = new Set(
|
|
5949
|
-
return [...
|
|
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];
|
|
5950
5622
|
}
|
|
5951
5623
|
render() {
|
|
5952
5624
|
return l`
|
|
@@ -5968,7 +5640,7 @@ let me = class extends g {
|
|
|
5968
5640
|
);
|
|
5969
5641
|
}
|
|
5970
5642
|
};
|
|
5971
|
-
|
|
5643
|
+
pe.styles = g`
|
|
5972
5644
|
:host {
|
|
5973
5645
|
display: block;
|
|
5974
5646
|
margin-bottom: 12px;
|
|
@@ -5994,26 +5666,26 @@ me.styles = b`
|
|
|
5994
5666
|
box-sizing: border-box;
|
|
5995
5667
|
}
|
|
5996
5668
|
`;
|
|
5997
|
-
|
|
5669
|
+
Fe([
|
|
5998
5670
|
p({ type: String })
|
|
5999
|
-
],
|
|
6000
|
-
|
|
5671
|
+
], pe.prototype, "label", 2);
|
|
5672
|
+
Fe([
|
|
6001
5673
|
p({ type: String })
|
|
6002
|
-
],
|
|
6003
|
-
|
|
5674
|
+
], pe.prototype, "value", 2);
|
|
5675
|
+
Fe([
|
|
6004
5676
|
p({ attribute: !1 })
|
|
6005
|
-
],
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
],
|
|
6009
|
-
var
|
|
6010
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
6011
5683
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6012
|
-
return r && i &&
|
|
5684
|
+
return r && i && ci(t, o, i), i;
|
|
6013
5685
|
};
|
|
6014
|
-
let
|
|
5686
|
+
let P = class extends d {
|
|
6015
5687
|
constructor() {
|
|
6016
|
-
super(...arguments), this.mergeTags = [], this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef =
|
|
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();
|
|
6017
5689
|
}
|
|
6018
5690
|
render() {
|
|
6019
5691
|
if (!this.doc) return l``;
|
|
@@ -6070,15 +5742,15 @@ let A = class extends g {
|
|
|
6070
5742
|
<div class="field">
|
|
6071
5743
|
<div class="label-row">
|
|
6072
5744
|
<label>${s("panel.body.previewText")}</label>
|
|
6073
|
-
${this.mergeTags.length > 0 ? l`
|
|
6074
|
-
<button class="tag-btn" ${
|
|
5745
|
+
${this.mergeTags.length > 0 || this.requestMergeTags ? l`
|
|
5746
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
6075
5747
|
${s("panel.common.tagBtn")}
|
|
6076
5748
|
</button>
|
|
6077
5749
|
` : ""}
|
|
6078
5750
|
</div>
|
|
6079
5751
|
<input
|
|
6080
5752
|
type="text"
|
|
6081
|
-
${
|
|
5753
|
+
${re(this._previewInputRef)}
|
|
6082
5754
|
.value=${this.doc.metadata.previewText ?? ""}
|
|
6083
5755
|
placeholder=${s("panel.body.previewTextPlaceholder")}
|
|
6084
5756
|
@change=${this._onPreviewTextChange}
|
|
@@ -6097,6 +5769,10 @@ let A = class extends g {
|
|
|
6097
5769
|
`;
|
|
6098
5770
|
}
|
|
6099
5771
|
_togglePicker() {
|
|
5772
|
+
if (!this.mergeTags.length) {
|
|
5773
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
5774
|
+
return;
|
|
5775
|
+
}
|
|
6100
5776
|
const e = this._triggerRef.value;
|
|
6101
5777
|
if (e) {
|
|
6102
5778
|
if (!this._pickerOpen) {
|
|
@@ -6140,9 +5816,9 @@ let A = class extends g {
|
|
|
6140
5816
|
this._emit({ metaField: "previewText", value: e.target.value });
|
|
6141
5817
|
}
|
|
6142
5818
|
};
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
5819
|
+
P.styles = [
|
|
5820
|
+
$,
|
|
5821
|
+
g`
|
|
6146
5822
|
.alignment-buttons {
|
|
6147
5823
|
display: flex;
|
|
6148
5824
|
gap: 0;
|
|
@@ -6214,36 +5890,39 @@ A.styles = [
|
|
|
6214
5890
|
}
|
|
6215
5891
|
`
|
|
6216
5892
|
];
|
|
6217
|
-
|
|
5893
|
+
A([
|
|
6218
5894
|
p({ type: Object })
|
|
6219
|
-
],
|
|
6220
|
-
|
|
5895
|
+
], P.prototype, "doc", 2);
|
|
5896
|
+
A([
|
|
6221
5897
|
p({ type: Array })
|
|
6222
|
-
],
|
|
6223
|
-
|
|
5898
|
+
], P.prototype, "mergeTags", 2);
|
|
5899
|
+
A([
|
|
6224
5900
|
p({ attribute: !1 })
|
|
6225
|
-
],
|
|
6226
|
-
|
|
5901
|
+
], P.prototype, "requestMergeTags", 2);
|
|
5902
|
+
A([
|
|
6227
5903
|
p({ attribute: !1 })
|
|
6228
|
-
],
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
],
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
],
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
],
|
|
6238
|
-
A
|
|
6239
|
-
|
|
6240
|
-
],
|
|
6241
|
-
|
|
6242
|
-
|
|
5904
|
+
], P.prototype, "swatches", 2);
|
|
5905
|
+
A([
|
|
5906
|
+
p({ attribute: !1 })
|
|
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--)
|
|
6243
5922
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6244
|
-
return r && i &&
|
|
5923
|
+
return r && i && hi(t, o, i), i;
|
|
6245
5924
|
};
|
|
6246
|
-
let
|
|
5925
|
+
let D = class extends d {
|
|
6247
5926
|
constructor() {
|
|
6248
5927
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this._assetManagerOpen = !1;
|
|
6249
5928
|
}
|
|
@@ -6396,37 +6075,37 @@ let B = class extends g {
|
|
|
6396
6075
|
this._emit({ backgroundUrl: e.detail.url }), this._assetManagerOpen = !1;
|
|
6397
6076
|
}
|
|
6398
6077
|
};
|
|
6399
|
-
|
|
6400
|
-
|
|
6078
|
+
D.styles = [$];
|
|
6079
|
+
V([
|
|
6401
6080
|
p({ type: Object })
|
|
6402
|
-
],
|
|
6403
|
-
|
|
6081
|
+
], D.prototype, "block", 2);
|
|
6082
|
+
V([
|
|
6404
6083
|
p({ type: String })
|
|
6405
|
-
],
|
|
6406
|
-
|
|
6084
|
+
], D.prototype, "rowId", 2);
|
|
6085
|
+
V([
|
|
6407
6086
|
p({ type: String })
|
|
6408
|
-
],
|
|
6409
|
-
|
|
6087
|
+
], D.prototype, "columnId", 2);
|
|
6088
|
+
V([
|
|
6410
6089
|
p({ type: Object })
|
|
6411
|
-
],
|
|
6412
|
-
|
|
6090
|
+
], D.prototype, "assetManagerConfig", 2);
|
|
6091
|
+
V([
|
|
6413
6092
|
p({ attribute: !1 })
|
|
6414
|
-
],
|
|
6415
|
-
|
|
6093
|
+
], D.prototype, "assetStorage", 2);
|
|
6094
|
+
V([
|
|
6416
6095
|
p({ attribute: !1 })
|
|
6417
|
-
],
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
],
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
],
|
|
6424
|
-
var
|
|
6425
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
6426
6105
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6427
|
-
return r && i &&
|
|
6106
|
+
return r && i && ui(t, o, i), i;
|
|
6428
6107
|
};
|
|
6429
|
-
let
|
|
6108
|
+
let Z = class extends d {
|
|
6430
6109
|
constructor() {
|
|
6431
6110
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
|
|
6432
6111
|
}
|
|
@@ -6563,9 +6242,9 @@ let ae = class extends g {
|
|
|
6563
6242
|
this._emit({ padding: e.detail.value });
|
|
6564
6243
|
}
|
|
6565
6244
|
};
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6245
|
+
Z.styles = [
|
|
6246
|
+
$,
|
|
6247
|
+
g`
|
|
6569
6248
|
h4 {
|
|
6570
6249
|
margin: 0 0 8px;
|
|
6571
6250
|
font-size: 12px;
|
|
@@ -6623,27 +6302,27 @@ ae.styles = [
|
|
|
6623
6302
|
}
|
|
6624
6303
|
`
|
|
6625
6304
|
];
|
|
6626
|
-
|
|
6305
|
+
Se([
|
|
6627
6306
|
p({ type: Object })
|
|
6628
|
-
],
|
|
6629
|
-
|
|
6307
|
+
], Z.prototype, "block", 2);
|
|
6308
|
+
Se([
|
|
6630
6309
|
p({ type: String })
|
|
6631
|
-
],
|
|
6632
|
-
|
|
6310
|
+
], Z.prototype, "rowId", 2);
|
|
6311
|
+
Se([
|
|
6633
6312
|
p({ type: String })
|
|
6634
|
-
],
|
|
6635
|
-
|
|
6313
|
+
], Z.prototype, "columnId", 2);
|
|
6314
|
+
Se([
|
|
6636
6315
|
p({ attribute: !1 })
|
|
6637
|
-
],
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
],
|
|
6641
|
-
var
|
|
6642
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
6643
6322
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6644
|
-
return r && i &&
|
|
6323
|
+
return r && i && vi(t, o, i), i;
|
|
6645
6324
|
};
|
|
6646
|
-
let
|
|
6325
|
+
let Q = class extends d {
|
|
6647
6326
|
constructor() {
|
|
6648
6327
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [];
|
|
6649
6328
|
}
|
|
@@ -6724,28 +6403,28 @@ let se = class extends g {
|
|
|
6724
6403
|
this._emit({ padding: e.detail.value });
|
|
6725
6404
|
}
|
|
6726
6405
|
};
|
|
6727
|
-
|
|
6728
|
-
|
|
6406
|
+
Q.styles = $;
|
|
6407
|
+
Oe([
|
|
6729
6408
|
p({ type: Object })
|
|
6730
|
-
],
|
|
6731
|
-
|
|
6409
|
+
], Q.prototype, "block", 2);
|
|
6410
|
+
Oe([
|
|
6732
6411
|
p({ type: String })
|
|
6733
|
-
],
|
|
6734
|
-
|
|
6412
|
+
], Q.prototype, "rowId", 2);
|
|
6413
|
+
Oe([
|
|
6735
6414
|
p({ type: String })
|
|
6736
|
-
],
|
|
6737
|
-
|
|
6415
|
+
], Q.prototype, "columnId", 2);
|
|
6416
|
+
Oe([
|
|
6738
6417
|
p({ attribute: !1 })
|
|
6739
|
-
],
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
],
|
|
6743
|
-
var
|
|
6744
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
6745
6424
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6746
|
-
return r && i &&
|
|
6425
|
+
return r && i && mi(t, o, i), i;
|
|
6747
6426
|
};
|
|
6748
|
-
let
|
|
6427
|
+
let ce = class extends d {
|
|
6749
6428
|
constructor() {
|
|
6750
6429
|
super(...arguments), this.rowId = "", this.columnId = "";
|
|
6751
6430
|
}
|
|
@@ -6782,25 +6461,25 @@ let _e = class extends g {
|
|
|
6782
6461
|
this._emit({ height: e.detail.value });
|
|
6783
6462
|
}
|
|
6784
6463
|
};
|
|
6785
|
-
|
|
6786
|
-
|
|
6464
|
+
ce.styles = $;
|
|
6465
|
+
He([
|
|
6787
6466
|
p({ type: Object })
|
|
6788
|
-
],
|
|
6789
|
-
|
|
6467
|
+
], ce.prototype, "block", 2);
|
|
6468
|
+
He([
|
|
6790
6469
|
p({ type: String })
|
|
6791
|
-
],
|
|
6792
|
-
|
|
6470
|
+
], ce.prototype, "rowId", 2);
|
|
6471
|
+
He([
|
|
6793
6472
|
p({ type: String })
|
|
6794
|
-
],
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
],
|
|
6798
|
-
var
|
|
6799
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
6800
6479
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6801
|
-
return r && i &&
|
|
6480
|
+
return r && i && yi(t, o, i), i;
|
|
6802
6481
|
};
|
|
6803
|
-
const
|
|
6482
|
+
const wi = [
|
|
6804
6483
|
"facebook",
|
|
6805
6484
|
"twitter",
|
|
6806
6485
|
"instagram",
|
|
@@ -6809,7 +6488,7 @@ const xr = [
|
|
|
6809
6488
|
"tiktok",
|
|
6810
6489
|
"custom"
|
|
6811
6490
|
];
|
|
6812
|
-
let
|
|
6491
|
+
let de = class extends d {
|
|
6813
6492
|
constructor() {
|
|
6814
6493
|
super(...arguments), this.rowId = "", this.columnId = "";
|
|
6815
6494
|
}
|
|
@@ -6829,7 +6508,7 @@ let ye = class extends g {
|
|
|
6829
6508
|
<div class="field">
|
|
6830
6509
|
<label>${s("panel.social.network")}</label>
|
|
6831
6510
|
<select @change=${(r) => this._onIconTypeChange(o, r)}>
|
|
6832
|
-
${
|
|
6511
|
+
${wi.map((r) => l`
|
|
6833
6512
|
<option value=${r} ?selected=${t.type === r}>${r}</option>
|
|
6834
6513
|
`)}
|
|
6835
6514
|
</select>
|
|
@@ -6953,9 +6632,9 @@ let ye = class extends g {
|
|
|
6953
6632
|
this._emit({ padding: e.detail.value });
|
|
6954
6633
|
}
|
|
6955
6634
|
};
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6635
|
+
de.styles = [
|
|
6636
|
+
$,
|
|
6637
|
+
g`
|
|
6959
6638
|
h4 {
|
|
6960
6639
|
margin: 0 0 8px;
|
|
6961
6640
|
font-size: 12px;
|
|
@@ -7013,26 +6692,26 @@ ye.styles = [
|
|
|
7013
6692
|
}
|
|
7014
6693
|
`
|
|
7015
6694
|
];
|
|
7016
|
-
|
|
6695
|
+
Ue([
|
|
7017
6696
|
p({ type: Object })
|
|
7018
|
-
],
|
|
7019
|
-
|
|
6697
|
+
], de.prototype, "block", 2);
|
|
6698
|
+
Ue([
|
|
7020
6699
|
p({ type: String })
|
|
7021
|
-
],
|
|
7022
|
-
|
|
6700
|
+
], de.prototype, "rowId", 2);
|
|
6701
|
+
Ue([
|
|
7023
6702
|
p({ type: String })
|
|
7024
|
-
],
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
],
|
|
7028
|
-
var $
|
|
7029
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
7030
6709
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7031
|
-
return r && i && $
|
|
6710
|
+
return r && i && $i(t, o, i), i;
|
|
7032
6711
|
};
|
|
7033
|
-
let
|
|
6712
|
+
let T = class extends d {
|
|
7034
6713
|
constructor() {
|
|
7035
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef =
|
|
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();
|
|
7036
6715
|
}
|
|
7037
6716
|
render() {
|
|
7038
6717
|
if (!this.block) return l``;
|
|
@@ -7043,14 +6722,14 @@ let j = class extends g {
|
|
|
7043
6722
|
<div class="field">
|
|
7044
6723
|
<div class="label-row">
|
|
7045
6724
|
<label>${s("panel.html.rawHtml")}</label>
|
|
7046
|
-
${t ? l`
|
|
7047
|
-
<button class="tag-btn" ${
|
|
6725
|
+
${t || this.requestMergeTags ? l`
|
|
6726
|
+
<button class="tag-btn" ${re(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
7048
6727
|
${s("panel.common.tagBtn")}
|
|
7049
6728
|
</button>
|
|
7050
6729
|
` : ""}
|
|
7051
6730
|
</div>
|
|
7052
6731
|
<textarea
|
|
7053
|
-
${
|
|
6732
|
+
${re(this._textareaRef)}
|
|
7054
6733
|
.value=${e.content}
|
|
7055
6734
|
@change=${this._onContentChange}
|
|
7056
6735
|
></textarea>
|
|
@@ -7092,6 +6771,10 @@ let j = class extends g {
|
|
|
7092
6771
|
this._emit({ padding: e.detail.value });
|
|
7093
6772
|
}
|
|
7094
6773
|
_togglePicker() {
|
|
6774
|
+
if (!this.mergeTags.length) {
|
|
6775
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
6776
|
+
return;
|
|
6777
|
+
}
|
|
7095
6778
|
const e = this._triggerRef.value;
|
|
7096
6779
|
if (e) {
|
|
7097
6780
|
if (!this._pickerOpen) {
|
|
@@ -7106,13 +6789,13 @@ let j = class extends g {
|
|
|
7106
6789
|
if (!t) return;
|
|
7107
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);
|
|
7108
6791
|
t.value = a;
|
|
7109
|
-
const
|
|
7110
|
-
t.setSelectionRange(
|
|
6792
|
+
const u = o + n.length;
|
|
6793
|
+
t.setSelectionRange(u, u), t.focus(), this._emit({ content: a }), this._pickerOpen = !1;
|
|
7111
6794
|
}
|
|
7112
6795
|
};
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
6796
|
+
T.styles = [
|
|
6797
|
+
$,
|
|
6798
|
+
g`
|
|
7116
6799
|
/* HTML payload is raw markup — show in monospace and taller than the
|
|
7117
6800
|
default textarea so authors have room to work. */
|
|
7118
6801
|
textarea {
|
|
@@ -7155,36 +6838,39 @@ j.styles = [
|
|
|
7155
6838
|
}
|
|
7156
6839
|
`
|
|
7157
6840
|
];
|
|
7158
|
-
|
|
6841
|
+
F([
|
|
7159
6842
|
p({ type: Object })
|
|
7160
|
-
],
|
|
7161
|
-
|
|
6843
|
+
], T.prototype, "block", 2);
|
|
6844
|
+
F([
|
|
7162
6845
|
p({ type: String })
|
|
7163
|
-
],
|
|
7164
|
-
|
|
6846
|
+
], T.prototype, "rowId", 2);
|
|
6847
|
+
F([
|
|
7165
6848
|
p({ type: String })
|
|
7166
|
-
],
|
|
7167
|
-
|
|
6849
|
+
], T.prototype, "columnId", 2);
|
|
6850
|
+
F([
|
|
7168
6851
|
p({ type: Array })
|
|
7169
|
-
],
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
],
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
],
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
],
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
],
|
|
7182
|
-
|
|
7183
|
-
|
|
6852
|
+
], T.prototype, "mergeTags", 2);
|
|
6853
|
+
F([
|
|
6854
|
+
p({ attribute: !1 })
|
|
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--)
|
|
7184
6870
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7185
|
-
return r && i &&
|
|
6871
|
+
return r && i && Ci(t, o, i), i;
|
|
7186
6872
|
};
|
|
7187
|
-
let
|
|
6873
|
+
let W = class extends d {
|
|
7188
6874
|
constructor() {
|
|
7189
6875
|
super(...arguments), this.rowId = "", this.columnId = "", this.label = "Block", this.schema = [];
|
|
7190
6876
|
}
|
|
@@ -7294,33 +6980,33 @@ let q = class extends g {
|
|
|
7294
6980
|
);
|
|
7295
6981
|
}
|
|
7296
6982
|
};
|
|
7297
|
-
|
|
7298
|
-
|
|
6983
|
+
W.styles = $;
|
|
6984
|
+
ve([
|
|
7299
6985
|
p({ type: Object })
|
|
7300
|
-
],
|
|
7301
|
-
|
|
6986
|
+
], W.prototype, "block", 2);
|
|
6987
|
+
ve([
|
|
7302
6988
|
p({ type: String })
|
|
7303
|
-
],
|
|
7304
|
-
|
|
6989
|
+
], W.prototype, "rowId", 2);
|
|
6990
|
+
ve([
|
|
7305
6991
|
p({ type: String })
|
|
7306
|
-
],
|
|
7307
|
-
|
|
6992
|
+
], W.prototype, "columnId", 2);
|
|
6993
|
+
ve([
|
|
7308
6994
|
p({ type: String })
|
|
7309
|
-
],
|
|
7310
|
-
|
|
6995
|
+
], W.prototype, "label", 2);
|
|
6996
|
+
ve([
|
|
7311
6997
|
p({ type: Array })
|
|
7312
|
-
],
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
],
|
|
7316
|
-
var
|
|
7317
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
7318
7004
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7319
|
-
return r && i &&
|
|
7005
|
+
return r && i && Pi(t, o, i), i;
|
|
7320
7006
|
};
|
|
7321
|
-
let
|
|
7007
|
+
let w = class extends d {
|
|
7322
7008
|
constructor() {
|
|
7323
|
-
super(...arguments), this.selection = null, this.mergeTags = [], this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
|
|
7009
|
+
super(...arguments), this.selection = null, this.mergeTags = [], this.requestMergeTags = !1, this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
|
|
7324
7010
|
}
|
|
7325
7011
|
get _swatches() {
|
|
7326
7012
|
var e;
|
|
@@ -7339,6 +7025,7 @@ let T = class extends g {
|
|
|
7339
7025
|
<pigeon-body-panel
|
|
7340
7026
|
.doc=${this.doc}
|
|
7341
7027
|
.mergeTags=${this.mergeTags}
|
|
7028
|
+
.requestMergeTags=${this.requestMergeTags}
|
|
7342
7029
|
.swatches=${this._swatches}
|
|
7343
7030
|
.brandFonts=${this._brandFonts}
|
|
7344
7031
|
></pigeon-body-panel>
|
|
@@ -7424,12 +7111,12 @@ let T = class extends g {
|
|
|
7424
7111
|
hero: "Hero",
|
|
7425
7112
|
navbar: "Navbar"
|
|
7426
7113
|
}, o = e.type;
|
|
7427
|
-
return t[o] ?? ((r =
|
|
7114
|
+
return t[o] ?? ((r = Je(o)) == null ? void 0 : r.label) ?? o;
|
|
7428
7115
|
}
|
|
7429
7116
|
_renderBlockPanel(e, t, o) {
|
|
7430
7117
|
switch (e.type) {
|
|
7431
7118
|
case "text":
|
|
7432
|
-
return l`<pigeon-text-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags}></pigeon-text-panel>`;
|
|
7119
|
+
return l`<pigeon-text-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-text-panel>`;
|
|
7433
7120
|
case "image":
|
|
7434
7121
|
return l`<pigeon-image-panel
|
|
7435
7122
|
.block=${e}
|
|
@@ -7458,9 +7145,9 @@ let T = class extends g {
|
|
|
7458
7145
|
case "social":
|
|
7459
7146
|
return l`<pigeon-social-panel .block=${e} .rowId=${t} .columnId=${o}></pigeon-social-panel>`;
|
|
7460
7147
|
case "html":
|
|
7461
|
-
return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags}></pigeon-html-panel>`;
|
|
7148
|
+
return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-html-panel>`;
|
|
7462
7149
|
default: {
|
|
7463
|
-
const r = e.type ?? "unknown", i =
|
|
7150
|
+
const r = e.type ?? "unknown", i = Je(r);
|
|
7464
7151
|
return i != null && i.propertySchema && i.propertySchema.length > 0 ? l`<pigeon-custom-panel
|
|
7465
7152
|
.block=${e}
|
|
7466
7153
|
.rowId=${t}
|
|
@@ -7489,7 +7176,7 @@ let T = class extends g {
|
|
|
7489
7176
|
return i.blocks.find((n) => n.id === o);
|
|
7490
7177
|
}
|
|
7491
7178
|
};
|
|
7492
|
-
|
|
7179
|
+
w.styles = g`
|
|
7493
7180
|
:host {
|
|
7494
7181
|
display: block;
|
|
7495
7182
|
width: var(--pigeon-properties-width, 300px);
|
|
@@ -7572,39 +7259,42 @@ T.styles = b`
|
|
|
7572
7259
|
line-height: 1.5;
|
|
7573
7260
|
}
|
|
7574
7261
|
`;
|
|
7575
|
-
|
|
7262
|
+
B([
|
|
7576
7263
|
p({ type: Object })
|
|
7577
|
-
],
|
|
7578
|
-
|
|
7264
|
+
], w.prototype, "doc", 2);
|
|
7265
|
+
B([
|
|
7579
7266
|
p({ type: Object })
|
|
7580
|
-
],
|
|
7581
|
-
|
|
7267
|
+
], w.prototype, "selection", 2);
|
|
7268
|
+
B([
|
|
7582
7269
|
p({ type: Array })
|
|
7583
|
-
],
|
|
7584
|
-
|
|
7270
|
+
], w.prototype, "mergeTags", 2);
|
|
7271
|
+
B([
|
|
7585
7272
|
p({ attribute: !1 })
|
|
7586
|
-
],
|
|
7587
|
-
|
|
7273
|
+
], w.prototype, "requestMergeTags", 2);
|
|
7274
|
+
B([
|
|
7588
7275
|
p({ attribute: !1 })
|
|
7589
|
-
],
|
|
7590
|
-
|
|
7276
|
+
], w.prototype, "assetManagerConfig", 2);
|
|
7277
|
+
B([
|
|
7591
7278
|
p({ attribute: !1 })
|
|
7592
|
-
],
|
|
7593
|
-
|
|
7279
|
+
], w.prototype, "assetStorage", 2);
|
|
7280
|
+
B([
|
|
7594
7281
|
p({ attribute: !1 })
|
|
7595
|
-
],
|
|
7596
|
-
|
|
7282
|
+
], w.prototype, "brandKit", 2);
|
|
7283
|
+
B([
|
|
7597
7284
|
p({ attribute: !1 })
|
|
7598
|
-
],
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
],
|
|
7602
|
-
|
|
7603
|
-
|
|
7285
|
+
], w.prototype, "fontConfig", 2);
|
|
7286
|
+
B([
|
|
7287
|
+
p({ attribute: !1 })
|
|
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--)
|
|
7604
7294
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7605
|
-
return r && i &&
|
|
7295
|
+
return r && i && Si(t, o, i), i;
|
|
7606
7296
|
};
|
|
7607
|
-
let
|
|
7297
|
+
let x = class extends d {
|
|
7608
7298
|
constructor() {
|
|
7609
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) => {
|
|
7610
7300
|
this.open && (e.key === "Escape" ? (e.stopPropagation(), this._close()) : e.key === "Tab" && this._trapTab(e));
|
|
@@ -7691,6 +7381,7 @@ let k = class extends g {
|
|
|
7691
7381
|
return l`
|
|
7692
7382
|
<iframe
|
|
7693
7383
|
style="width: ${this._device === "mobile" ? "375px" : "100%"}; height: 100%;"
|
|
7384
|
+
sandbox="allow-popups allow-popups-to-escape-sandbox"
|
|
7694
7385
|
srcdoc=${this._htmlContent}
|
|
7695
7386
|
></iframe>
|
|
7696
7387
|
`;
|
|
@@ -7721,7 +7412,7 @@ let k = class extends g {
|
|
|
7721
7412
|
this.open = !1;
|
|
7722
7413
|
}
|
|
7723
7414
|
};
|
|
7724
|
-
|
|
7415
|
+
x.styles = g`
|
|
7725
7416
|
:host {
|
|
7726
7417
|
display: none;
|
|
7727
7418
|
}
|
|
@@ -7900,50 +7591,50 @@ k.styles = b`
|
|
|
7900
7591
|
`;
|
|
7901
7592
|
S([
|
|
7902
7593
|
p({ type: Object })
|
|
7903
|
-
],
|
|
7594
|
+
], x.prototype, "renderer", 2);
|
|
7904
7595
|
S([
|
|
7905
7596
|
p({ type: Object })
|
|
7906
|
-
],
|
|
7597
|
+
], x.prototype, "doc", 2);
|
|
7907
7598
|
S([
|
|
7908
7599
|
p({ attribute: !1 })
|
|
7909
|
-
],
|
|
7600
|
+
], x.prototype, "documentToMjml", 2);
|
|
7910
7601
|
S([
|
|
7911
7602
|
p({ attribute: !1 })
|
|
7912
|
-
],
|
|
7603
|
+
], x.prototype, "fonts", 2);
|
|
7913
7604
|
S([
|
|
7914
7605
|
p({ type: Boolean, reflect: !0 })
|
|
7915
|
-
],
|
|
7606
|
+
], x.prototype, "open", 2);
|
|
7916
7607
|
S([
|
|
7917
|
-
|
|
7918
|
-
],
|
|
7608
|
+
c()
|
|
7609
|
+
], x.prototype, "_viewMode", 2);
|
|
7919
7610
|
S([
|
|
7920
|
-
|
|
7921
|
-
],
|
|
7611
|
+
c()
|
|
7612
|
+
], x.prototype, "_device", 2);
|
|
7922
7613
|
S([
|
|
7923
|
-
|
|
7924
|
-
],
|
|
7614
|
+
c()
|
|
7615
|
+
], x.prototype, "_htmlContent", 2);
|
|
7925
7616
|
S([
|
|
7926
|
-
|
|
7927
|
-
],
|
|
7617
|
+
c()
|
|
7618
|
+
], x.prototype, "_mjmlContent", 2);
|
|
7928
7619
|
S([
|
|
7929
|
-
|
|
7930
|
-
],
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
],
|
|
7934
|
-
var
|
|
7935
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
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--)
|
|
7936
7627
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7937
|
-
return r && i &&
|
|
7628
|
+
return r && i && Ei(t, o, i), i;
|
|
7938
7629
|
};
|
|
7939
|
-
let
|
|
7940
|
-
function
|
|
7941
|
-
return
|
|
7630
|
+
let Xe = null;
|
|
7631
|
+
function Bi() {
|
|
7632
|
+
return Xe || (Xe = import("./templates.js")), Xe;
|
|
7942
7633
|
}
|
|
7943
|
-
function
|
|
7634
|
+
function wt(e) {
|
|
7944
7635
|
return e.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || `template-${Date.now()}`;
|
|
7945
7636
|
}
|
|
7946
|
-
let
|
|
7637
|
+
let v = class extends d {
|
|
7947
7638
|
constructor() {
|
|
7948
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) => {
|
|
7949
7640
|
e.stopPropagation();
|
|
@@ -7965,7 +7656,7 @@ let _ = class extends g {
|
|
|
7965
7656
|
const t = e.detail.value, o = this._state.selection;
|
|
7966
7657
|
if ((o == null ? void 0 : o.type) === "block" && o.rowId && o.columnId && o.blockId) {
|
|
7967
7658
|
const r = this._findBlock(o.rowId, o.columnId, o.blockId);
|
|
7968
|
-
(r == null ? void 0 : r.type) === "button" &&
|
|
7659
|
+
(r == null ? void 0 : r.type) === "button" && Ke(o.rowId, o.columnId, o.blockId, { backgroundColor: t })(this._state, this._dispatch);
|
|
7969
7660
|
return;
|
|
7970
7661
|
}
|
|
7971
7662
|
this._applyBodyAttribute("backgroundColor", t);
|
|
@@ -7973,20 +7664,20 @@ let _ = class extends g {
|
|
|
7973
7664
|
e.stopPropagation(), this._applyBodyAttribute("fontFamily", e.detail.family);
|
|
7974
7665
|
}, this._handleBrandLogoInsert = (e) => {
|
|
7975
7666
|
e.stopPropagation();
|
|
7976
|
-
const { logo: t } = e.detail, o =
|
|
7667
|
+
const { logo: t } = e.detail, o = Ee("image");
|
|
7977
7668
|
o.values.src = t.src, o.values.alt = t.name, t.width && (o.values.width = t.width);
|
|
7978
7669
|
const r = this._state.selection;
|
|
7979
7670
|
if (r != null && r.rowId && (r != null && r.columnId)) {
|
|
7980
|
-
|
|
7671
|
+
oe(r.rowId, r.columnId, o)(this._state, this._dispatch);
|
|
7981
7672
|
return;
|
|
7982
7673
|
}
|
|
7983
7674
|
const i = this._state.doc.body.rows;
|
|
7984
7675
|
if (i.length > 0) {
|
|
7985
7676
|
const n = i[i.length - 1], a = n.columns[0];
|
|
7986
|
-
|
|
7677
|
+
oe(n.id, a.id, o, a.blocks.length)(this._state, this._dispatch);
|
|
7987
7678
|
} else {
|
|
7988
|
-
const n =
|
|
7989
|
-
|
|
7679
|
+
const n = fe([o]);
|
|
7680
|
+
G(me([n]), 0)(this._state, this._dispatch);
|
|
7990
7681
|
}
|
|
7991
7682
|
}, this._dispatch = (e) => {
|
|
7992
7683
|
this._state = this._state.apply(e), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange(), this._fireSelect();
|
|
@@ -7996,7 +7687,7 @@ let _ = class extends g {
|
|
|
7996
7687
|
const o = window.prompt("Name this saved row");
|
|
7997
7688
|
if (!o || !o.trim()) return;
|
|
7998
7689
|
const r = (/* @__PURE__ */ new Date()).toISOString(), i = {
|
|
7999
|
-
id:
|
|
7690
|
+
id: wt(o),
|
|
8000
7691
|
name: o.trim(),
|
|
8001
7692
|
kind: "row",
|
|
8002
7693
|
node: structuredClone(t),
|
|
@@ -8009,11 +7700,11 @@ let _ = class extends g {
|
|
|
8009
7700
|
this._emitRowLibraryError(n, "save");
|
|
8010
7701
|
}
|
|
8011
7702
|
}, this._handleRowInsertSaved = (e) => {
|
|
8012
|
-
const t =
|
|
8013
|
-
|
|
7703
|
+
const t = dt(e.detail.node);
|
|
7704
|
+
G(t, e.detail.index)(this._state, this._dispatch);
|
|
8014
7705
|
}, this._handleLibraryInsert = (e) => {
|
|
8015
|
-
const t =
|
|
8016
|
-
|
|
7706
|
+
const t = dt(e.detail.node);
|
|
7707
|
+
G(t, this._state.doc.body.rows.length)(this._state, this._dispatch);
|
|
8017
7708
|
}, this._handleLibraryDelete = async (e) => {
|
|
8018
7709
|
try {
|
|
8019
7710
|
await this._resolveRowLibrary().delete(e.detail.id), await this._refreshSavedTab();
|
|
@@ -8021,7 +7712,7 @@ let _ = class extends g {
|
|
|
8021
7712
|
this._emitRowLibraryError(t, "delete");
|
|
8022
7713
|
}
|
|
8023
7714
|
}, this._handleKeyDown = (e) => {
|
|
8024
|
-
if (!this._state || this._isInTextInput(e) || this._editingBlockId !== null) return;
|
|
7715
|
+
if (!this._state || !this._isForEditor(e) || this._isInTextInput(e) || this._editingBlockId !== null) return;
|
|
8025
7716
|
const t = e.metaKey || e.ctrlKey, o = this._state.selection;
|
|
8026
7717
|
if (t && !e.shiftKey && e.key.toLowerCase() === "z") {
|
|
8027
7718
|
e.preventDefault(), this.undo();
|
|
@@ -8033,16 +7724,16 @@ let _ = class extends g {
|
|
|
8033
7724
|
}
|
|
8034
7725
|
if (e.key === "Escape") {
|
|
8035
7726
|
const r = this._state.createTransaction();
|
|
8036
|
-
r.setSelection(
|
|
7727
|
+
r.setSelection(ht()), this._dispatch(r);
|
|
8037
7728
|
return;
|
|
8038
7729
|
}
|
|
8039
7730
|
if (o) {
|
|
8040
7731
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
8041
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(),
|
|
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));
|
|
8042
7733
|
return;
|
|
8043
7734
|
}
|
|
8044
7735
|
if (t && e.key.toLowerCase() === "d") {
|
|
8045
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(),
|
|
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));
|
|
8046
7737
|
return;
|
|
8047
7738
|
}
|
|
8048
7739
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -8062,13 +7753,13 @@ let _ = class extends g {
|
|
|
8062
7753
|
if (o.type === "block" && o.rowId && o.columnId && o.blockId) {
|
|
8063
7754
|
e.preventDefault();
|
|
8064
7755
|
const r = structuredClone(this._clipboard);
|
|
8065
|
-
r.id =
|
|
7756
|
+
r.id = bt();
|
|
8066
7757
|
const i = this._findBlockIndex(o.rowId, o.columnId, o.blockId), n = i >= 0 ? i + 1 : void 0;
|
|
8067
|
-
|
|
7758
|
+
oe(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
|
|
8068
7759
|
} else if (o.type === "column" && o.rowId && o.columnId) {
|
|
8069
7760
|
e.preventDefault();
|
|
8070
7761
|
const r = structuredClone(this._clipboard);
|
|
8071
|
-
r.id =
|
|
7762
|
+
r.id = bt(), oe(o.rowId, o.columnId, r)(this._state, this._dispatch);
|
|
8072
7763
|
}
|
|
8073
7764
|
return;
|
|
8074
7765
|
}
|
|
@@ -8079,13 +7770,13 @@ let _ = class extends g {
|
|
|
8079
7770
|
/* Lifecycle */
|
|
8080
7771
|
/* ------------------------------------------------------------------ */
|
|
8081
7772
|
connectedCallback() {
|
|
8082
|
-
super.connectedCallback(),
|
|
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);
|
|
8083
7774
|
}
|
|
8084
7775
|
disconnectedCallback() {
|
|
8085
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);
|
|
8086
7777
|
}
|
|
8087
7778
|
updated(e) {
|
|
8088
|
-
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") && (
|
|
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());
|
|
8089
7780
|
}
|
|
8090
7781
|
/**
|
|
8091
7782
|
* Set the host `dir` attribute based on `config.locale` and `config.dir`.
|
|
@@ -8094,7 +7785,7 @@ let _ = class extends g {
|
|
|
8094
7785
|
* bidirectional layout support.
|
|
8095
7786
|
*/
|
|
8096
7787
|
_applyDir() {
|
|
8097
|
-
this.setAttribute("dir",
|
|
7788
|
+
this.setAttribute("dir", Tt(this.config.locale, this.config.dir));
|
|
8098
7789
|
}
|
|
8099
7790
|
/**
|
|
8100
7791
|
* Sync the active `theme` to the host classes the token sheet keys off, and
|
|
@@ -8120,19 +7811,19 @@ let _ = class extends g {
|
|
|
8120
7811
|
}
|
|
8121
7812
|
/** Replaces the document entirely (resets history). */
|
|
8122
7813
|
loadDocument(e) {
|
|
8123
|
-
this._state =
|
|
7814
|
+
this._state = vt.create({
|
|
8124
7815
|
doc: e,
|
|
8125
|
-
plugins: [
|
|
7816
|
+
plugins: [ft()],
|
|
8126
7817
|
...this.config
|
|
8127
7818
|
}), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange();
|
|
8128
7819
|
}
|
|
8129
7820
|
/** Undo the last change. */
|
|
8130
7821
|
undo() {
|
|
8131
|
-
return
|
|
7822
|
+
return Dt(this._state, this._dispatch);
|
|
8132
7823
|
}
|
|
8133
7824
|
/** Redo the last undone change. */
|
|
8134
7825
|
redo() {
|
|
8135
|
-
return
|
|
7826
|
+
return Bt(this._state, this._dispatch);
|
|
8136
7827
|
}
|
|
8137
7828
|
/** Export the document as JSON. */
|
|
8138
7829
|
exportJson() {
|
|
@@ -8154,7 +7845,7 @@ let _ = class extends g {
|
|
|
8154
7845
|
/* Render */
|
|
8155
7846
|
/* ------------------------------------------------------------------ */
|
|
8156
7847
|
render() {
|
|
8157
|
-
var r;
|
|
7848
|
+
var r, i;
|
|
8158
7849
|
if (!this._state) return l``;
|
|
8159
7850
|
const e = this._state.doc, t = this._state.selection, o = this._device === "mobile" ? 375 : this._device === "tablet" ? 768 : 0;
|
|
8160
7851
|
return l`
|
|
@@ -8170,6 +7861,7 @@ let _ = class extends g {
|
|
|
8170
7861
|
@toolbar-device=${this._handleDevice}
|
|
8171
7862
|
@toolbar-fullscreen=${this._handleFullscreen}
|
|
8172
7863
|
@toolbar-templates=${this._handleTemplatesOpen}
|
|
7864
|
+
@toolbar-export=${this._handleExport}
|
|
8173
7865
|
@pigeon:preview=${this._handlePreview}
|
|
8174
7866
|
@pigeon:export-html=${this._handleExportHtml}
|
|
8175
7867
|
@pigeon:export-mjml=${this._handleExportMjml}
|
|
@@ -8226,6 +7918,7 @@ let _ = class extends g {
|
|
|
8226
7918
|
.doc=${e}
|
|
8227
7919
|
.selection=${t}
|
|
8228
7920
|
.mergeTags=${((r = this.config.mergeTags) == null ? void 0 : r.tags) ?? []}
|
|
7921
|
+
.requestMergeTags=${!!this.config.mergeTags && !((i = this.config.mergeTags.tags) != null && i.length)}
|
|
8229
7922
|
.assetManagerConfig=${this.config.assetManager ?? {}}
|
|
8230
7923
|
.assetStorage=${this.assetStorage ?? this.config.assetStorage}
|
|
8231
7924
|
.brandKit=${this._activeBrandKit}
|
|
@@ -8246,9 +7939,9 @@ let _ = class extends g {
|
|
|
8246
7939
|
.renderer=${this.renderer}
|
|
8247
7940
|
.documentToMjml=${this.documentToMjml}
|
|
8248
7941
|
.fonts=${this._renderFonts()}
|
|
8249
|
-
@click=${(
|
|
8250
|
-
var
|
|
8251
|
-
(
|
|
7942
|
+
@click=${(n) => {
|
|
7943
|
+
var a;
|
|
7944
|
+
(a = n.target.classList) != null && a.contains("overlay") && (this._previewOpen = !1);
|
|
8252
7945
|
}}
|
|
8253
7946
|
></pigeon-preview>
|
|
8254
7947
|
|
|
@@ -8266,13 +7959,13 @@ let _ = class extends g {
|
|
|
8266
7959
|
/* Templates */
|
|
8267
7960
|
/* ------------------------------------------------------------------ */
|
|
8268
7961
|
_resolveTemplateStorage() {
|
|
8269
|
-
return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new
|
|
7962
|
+
return this.templateStorage ? this.templateStorage : (this._defaultTemplateStorage || (this._defaultTemplateStorage = new jt()), this._defaultTemplateStorage);
|
|
8270
7963
|
}
|
|
8271
7964
|
_resolveRowLibrary() {
|
|
8272
|
-
return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new
|
|
7965
|
+
return this.config.rowLibrary ? this.config.rowLibrary : (this._defaultRowLibrary || (this._defaultRowLibrary = new Rt()), this._defaultRowLibrary);
|
|
8273
7966
|
}
|
|
8274
7967
|
_linkTypes() {
|
|
8275
|
-
return [...
|
|
7968
|
+
return [...Lt, ...this.config.linkTypes ?? []];
|
|
8276
7969
|
}
|
|
8277
7970
|
/**
|
|
8278
7971
|
* Resolve `config.brandKit` into a single active kit. A plain `BrandKit` is
|
|
@@ -8313,7 +8006,7 @@ let _ = class extends g {
|
|
|
8313
8006
|
}
|
|
8314
8007
|
/** Apply a single body attribute through an undoable transaction. */
|
|
8315
8008
|
_applyBodyAttribute(e, t) {
|
|
8316
|
-
const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n =
|
|
8009
|
+
const o = this._state.createTransaction(), i = this._state.doc.body.attributes[e], n = Ne(
|
|
8317
8010
|
"updateBodyAttribute",
|
|
8318
8011
|
`body.attributes.${e}`,
|
|
8319
8012
|
(a) => {
|
|
@@ -8326,7 +8019,7 @@ let _ = class extends g {
|
|
|
8326
8019
|
o.addStep(n), this._dispatch(o);
|
|
8327
8020
|
}
|
|
8328
8021
|
async _handleTemplatesOpen() {
|
|
8329
|
-
this._templatePickerLoaded || (await
|
|
8022
|
+
this._templatePickerLoaded || (await Bi(), this._templatePickerLoaded = !0), this._templatePickerOpen = !0;
|
|
8330
8023
|
}
|
|
8331
8024
|
_handleTemplateLoad(e) {
|
|
8332
8025
|
var o;
|
|
@@ -8337,7 +8030,7 @@ let _ = class extends g {
|
|
|
8337
8030
|
async _handleTemplateSave(e) {
|
|
8338
8031
|
e.stopPropagation();
|
|
8339
8032
|
const { name: t, description: o, category: r } = e.detail, i = this._resolveTemplateStorage(), n = (/* @__PURE__ */ new Date()).toISOString(), a = {
|
|
8340
|
-
id:
|
|
8033
|
+
id: wt(t),
|
|
8341
8034
|
name: t,
|
|
8342
8035
|
description: o,
|
|
8343
8036
|
category: r,
|
|
@@ -8346,21 +8039,21 @@ let _ = class extends g {
|
|
|
8346
8039
|
updatedAt: n
|
|
8347
8040
|
};
|
|
8348
8041
|
await i.save(a);
|
|
8349
|
-
const
|
|
8042
|
+
const u = this.renderRoot.querySelector(
|
|
8350
8043
|
"pigeon-template-picker"
|
|
8351
8044
|
);
|
|
8352
|
-
|
|
8045
|
+
u && await u.refresh(), this._templatePickerOpen = !1;
|
|
8353
8046
|
}
|
|
8354
8047
|
/* ------------------------------------------------------------------ */
|
|
8355
8048
|
/* Internal: state init & dispatch */
|
|
8356
8049
|
/* ------------------------------------------------------------------ */
|
|
8357
8050
|
_initState() {
|
|
8358
|
-
const e = this.document ?? this.config.doc ??
|
|
8359
|
-
t.some((r) => r.name ===
|
|
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();
|
|
8360
8053
|
}
|
|
8361
8054
|
_syncHistoryFlags() {
|
|
8362
|
-
const e = this._state.getPluginState(
|
|
8363
|
-
this._canUndo = e ?
|
|
8055
|
+
const e = this._state.getPluginState(mt);
|
|
8056
|
+
this._canUndo = e ? Mt(e) : !1, this._canRedo = e ? At(e) : !1;
|
|
8364
8057
|
}
|
|
8365
8058
|
/* ------------------------------------------------------------------ */
|
|
8366
8059
|
/* Internal: event emitters */
|
|
@@ -8400,23 +8093,32 @@ let _ = class extends g {
|
|
|
8400
8093
|
composed: !0
|
|
8401
8094
|
}));
|
|
8402
8095
|
}
|
|
8403
|
-
|
|
8096
|
+
_handleExport() {
|
|
8097
|
+
this.dispatchEvent(new CustomEvent("pigeon:export", {
|
|
8098
|
+
bubbles: !0,
|
|
8099
|
+
composed: !0
|
|
8100
|
+
}));
|
|
8101
|
+
}
|
|
8102
|
+
async _handleExportHtml(e) {
|
|
8103
|
+
e.stopPropagation();
|
|
8104
|
+
const t = this._state.doc, o = await this.exportHtml();
|
|
8404
8105
|
this.dispatchEvent(new CustomEvent("pigeon:export-html", {
|
|
8405
|
-
detail: { document:
|
|
8106
|
+
detail: { document: t, html: o },
|
|
8406
8107
|
bubbles: !0,
|
|
8407
8108
|
composed: !0
|
|
8408
8109
|
}));
|
|
8409
8110
|
}
|
|
8410
|
-
_handleExportMjml() {
|
|
8411
|
-
|
|
8111
|
+
_handleExportMjml(e) {
|
|
8112
|
+
e.stopPropagation();
|
|
8113
|
+
const t = this.documentToMjml ? this.documentToMjml(this._state.doc, { fonts: this._renderFonts() }) : null;
|
|
8412
8114
|
this.dispatchEvent(new CustomEvent("pigeon:export-mjml", {
|
|
8413
|
-
detail: { document: this._state.doc, mjml:
|
|
8115
|
+
detail: { document: this._state.doc, mjml: t },
|
|
8414
8116
|
bubbles: !0,
|
|
8415
8117
|
composed: !0
|
|
8416
8118
|
}));
|
|
8417
8119
|
}
|
|
8418
|
-
_handleExportJson() {
|
|
8419
|
-
this.dispatchEvent(new CustomEvent("pigeon:export-json", {
|
|
8120
|
+
_handleExportJson(e) {
|
|
8121
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent("pigeon:export-json", {
|
|
8420
8122
|
detail: { document: this._state.doc },
|
|
8421
8123
|
bubbles: !0,
|
|
8422
8124
|
composed: !0
|
|
@@ -8432,7 +8134,7 @@ let _ = class extends g {
|
|
|
8432
8134
|
for (const r of o.columns)
|
|
8433
8135
|
if (r.blocks.find((n) => n.id === t)) {
|
|
8434
8136
|
const n = this._state.createTransaction();
|
|
8435
|
-
n.setSelection(
|
|
8137
|
+
n.setSelection(We(o.id, r.id, t)), this._dispatch(n), this._editingBlockId = t;
|
|
8436
8138
|
return;
|
|
8437
8139
|
}
|
|
8438
8140
|
}
|
|
@@ -8443,7 +8145,7 @@ let _ = class extends g {
|
|
|
8443
8145
|
const r = o.blocks.find((n) => n.id === e.detail.blockId);
|
|
8444
8146
|
if (!r) continue;
|
|
8445
8147
|
const i = r.values.content;
|
|
8446
|
-
typeof i == "string" && i !== e.detail.content &&
|
|
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;
|
|
8447
8149
|
return;
|
|
8448
8150
|
}
|
|
8449
8151
|
this._editingBlockId = null;
|
|
@@ -8456,36 +8158,36 @@ let _ = class extends g {
|
|
|
8456
8158
|
for (const r of o.columns)
|
|
8457
8159
|
if (r.blocks.find((n) => n.id === t)) {
|
|
8458
8160
|
const n = this._state.createTransaction();
|
|
8459
|
-
n.setSelection(
|
|
8161
|
+
n.setSelection(We(o.id, r.id, t)), this._dispatch(n);
|
|
8460
8162
|
return;
|
|
8461
8163
|
}
|
|
8462
8164
|
}
|
|
8463
8165
|
_handleRowSelect(e) {
|
|
8464
8166
|
this._editingBlockId = null;
|
|
8465
8167
|
const t = this._state.createTransaction();
|
|
8466
|
-
t.setSelection(
|
|
8168
|
+
t.setSelection(_t(e.detail.rowId)), this._dispatch(t);
|
|
8467
8169
|
}
|
|
8468
8170
|
_handleColumnSelect(e) {
|
|
8469
8171
|
this._editingBlockId = null;
|
|
8470
8172
|
const t = this._state.createTransaction();
|
|
8471
|
-
t.setSelection(
|
|
8173
|
+
t.setSelection(Ft(e.detail.rowId, e.detail.columnId)), this._dispatch(t);
|
|
8472
8174
|
}
|
|
8473
8175
|
_handleBodySelect() {
|
|
8474
8176
|
this._editingBlockId = null;
|
|
8475
8177
|
const e = this._state.createTransaction();
|
|
8476
|
-
e.setSelection(
|
|
8178
|
+
e.setSelection(ht()), this._dispatch(e);
|
|
8477
8179
|
}
|
|
8478
8180
|
/* ------------------------------------------------------------------ */
|
|
8479
8181
|
/* Row action handlers */
|
|
8480
8182
|
/* ------------------------------------------------------------------ */
|
|
8481
8183
|
_handleRowMove(e) {
|
|
8482
|
-
|
|
8184
|
+
Ht(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
|
|
8483
8185
|
}
|
|
8484
8186
|
_handleRowDuplicate(e) {
|
|
8485
|
-
|
|
8187
|
+
ut(e.detail.rowId)(this._state, this._dispatch);
|
|
8486
8188
|
}
|
|
8487
8189
|
_handleRowDelete(e) {
|
|
8488
|
-
|
|
8190
|
+
gt(e.detail.rowId)(this._state, this._dispatch);
|
|
8489
8191
|
}
|
|
8490
8192
|
async _refreshSavedTab() {
|
|
8491
8193
|
var o;
|
|
@@ -8516,6 +8218,11 @@ let _ = class extends g {
|
|
|
8516
8218
|
}
|
|
8517
8219
|
return !1;
|
|
8518
8220
|
}
|
|
8221
|
+
/** True when the key press is aimed at the editor, or at nothing else on the page. */
|
|
8222
|
+
_isForEditor(e) {
|
|
8223
|
+
const t = e.composedPath()[0];
|
|
8224
|
+
return t === document || t === document.body || t === document.documentElement ? !0 : e.composedPath().includes(this);
|
|
8225
|
+
}
|
|
8519
8226
|
_flattenBlockLocations() {
|
|
8520
8227
|
const e = [];
|
|
8521
8228
|
for (const t of this._state.doc.body.rows)
|
|
@@ -8527,12 +8234,12 @@ let _ = class extends g {
|
|
|
8527
8234
|
_moveBlockSelection(e) {
|
|
8528
8235
|
const t = this._state.selection;
|
|
8529
8236
|
if (!t || t.type !== "block" || !t.blockId) return;
|
|
8530
|
-
const o = this._flattenBlockLocations(), r = o.findIndex((
|
|
8237
|
+
const o = this._flattenBlockLocations(), r = o.findIndex((u) => u.blockId === t.blockId);
|
|
8531
8238
|
if (r === -1) return;
|
|
8532
8239
|
const i = r + e;
|
|
8533
8240
|
if (i < 0 || i >= o.length) return;
|
|
8534
8241
|
const n = o[i], a = this._state.createTransaction();
|
|
8535
|
-
a.setSelection(
|
|
8242
|
+
a.setSelection(We(n.rowId, n.columnId, n.blockId)), this._dispatch(a);
|
|
8536
8243
|
}
|
|
8537
8244
|
_moveRowSelection(e) {
|
|
8538
8245
|
const t = this._state.selection;
|
|
@@ -8542,7 +8249,7 @@ let _ = class extends g {
|
|
|
8542
8249
|
const i = r + e;
|
|
8543
8250
|
if (i < 0 || i >= o.length) return;
|
|
8544
8251
|
const n = this._state.createTransaction();
|
|
8545
|
-
n.setSelection(
|
|
8252
|
+
n.setSelection(_t(o[i].id)), this._dispatch(n);
|
|
8546
8253
|
}
|
|
8547
8254
|
_findBlock(e, t, o) {
|
|
8548
8255
|
const r = this._state.doc.body.rows.find((n) => n.id === e);
|
|
@@ -8561,15 +8268,15 @@ let _ = class extends g {
|
|
|
8561
8268
|
/* DnD handlers */
|
|
8562
8269
|
/* ------------------------------------------------------------------ */
|
|
8563
8270
|
_handleRowDrop(e) {
|
|
8564
|
-
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () =>
|
|
8565
|
-
|
|
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);
|
|
8566
8273
|
}
|
|
8567
8274
|
_handleBlockDrop(e) {
|
|
8568
8275
|
const { rowId: t, columnId: o, index: r, dragData: i } = e.detail;
|
|
8569
8276
|
if (i.type === "palette-block" && i.blockType) {
|
|
8570
|
-
const n =
|
|
8571
|
-
|
|
8572
|
-
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId &&
|
|
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(
|
|
8573
8280
|
i.rowId,
|
|
8574
8281
|
i.columnId,
|
|
8575
8282
|
i.blockId,
|
|
@@ -8579,8 +8286,8 @@ let _ = class extends g {
|
|
|
8579
8286
|
)(this._state, this._dispatch);
|
|
8580
8287
|
}
|
|
8581
8288
|
_handleBlockDropNewRow(e) {
|
|
8582
|
-
const { blockType: t, rowIndex: o } = e.detail, r =
|
|
8583
|
-
|
|
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);
|
|
8584
8291
|
}
|
|
8585
8292
|
/**
|
|
8586
8293
|
* Keyboard equivalent of dragging a palette item onto the canvas: append the
|
|
@@ -8590,21 +8297,21 @@ let _ = class extends g {
|
|
|
8590
8297
|
_handlePaletteActivate(e) {
|
|
8591
8298
|
const { type: t, blockType: o, columnCount: r } = e.detail, i = this._state.doc.body.rows;
|
|
8592
8299
|
if (t === "palette-row") {
|
|
8593
|
-
const a = Array.from({ length: r }, () =>
|
|
8594
|
-
|
|
8300
|
+
const a = Array.from({ length: r }, () => fe());
|
|
8301
|
+
G(me(a), i.length)(this._state, this._dispatch);
|
|
8595
8302
|
return;
|
|
8596
8303
|
}
|
|
8597
8304
|
if (!o) return;
|
|
8598
|
-
const n =
|
|
8305
|
+
const n = Ee(o);
|
|
8599
8306
|
if (i.length > 0) {
|
|
8600
|
-
const a = i[i.length - 1],
|
|
8601
|
-
|
|
8307
|
+
const a = i[i.length - 1], u = a.columns[0];
|
|
8308
|
+
oe(a.id, u.id, n, u.blocks.length)(
|
|
8602
8309
|
this._state,
|
|
8603
8310
|
this._dispatch
|
|
8604
8311
|
);
|
|
8605
8312
|
} else {
|
|
8606
|
-
const a =
|
|
8607
|
-
|
|
8313
|
+
const a = fe([n]);
|
|
8314
|
+
G(me([a]), 0)(this._state, this._dispatch);
|
|
8608
8315
|
}
|
|
8609
8316
|
}
|
|
8610
8317
|
/* ------------------------------------------------------------------ */
|
|
@@ -8612,64 +8319,64 @@ let _ = class extends g {
|
|
|
8612
8319
|
/* ------------------------------------------------------------------ */
|
|
8613
8320
|
_handlePropertyChange(e) {
|
|
8614
8321
|
const { rowId: t, columnId: o, blockId: r, values: i } = e.detail;
|
|
8615
|
-
|
|
8322
|
+
Ke(t, o, r, i)(this._state, this._dispatch);
|
|
8616
8323
|
}
|
|
8617
8324
|
_handleRowPropertyChange(e) {
|
|
8618
8325
|
const { rowId: t, attributes: o } = e.detail;
|
|
8619
|
-
|
|
8326
|
+
Kt(t, o)(this._state, this._dispatch);
|
|
8620
8327
|
}
|
|
8621
8328
|
_handleRowLayoutChange(e) {
|
|
8622
|
-
const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((
|
|
8329
|
+
const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((b) => b.id === t);
|
|
8623
8330
|
if (!i) return;
|
|
8624
8331
|
const n = i.columns.length, a = r;
|
|
8625
8332
|
if (a > n)
|
|
8626
|
-
for (let
|
|
8627
|
-
|
|
8333
|
+
for (let b = 0; b < a - n; b++)
|
|
8334
|
+
Nt(t)(this._state, this._dispatch);
|
|
8628
8335
|
else if (a < n)
|
|
8629
|
-
for (let
|
|
8630
|
-
const
|
|
8631
|
-
if (
|
|
8632
|
-
const
|
|
8633
|
-
|
|
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);
|
|
8634
8341
|
}
|
|
8635
8342
|
}
|
|
8636
|
-
const
|
|
8637
|
-
|
|
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);
|
|
8638
8345
|
}
|
|
8639
8346
|
_handleBodyPropertyChange(e) {
|
|
8640
8347
|
const { attribute: t, metaField: o, value: r } = e.detail, i = this._state.createTransaction();
|
|
8641
8348
|
if (t) {
|
|
8642
|
-
const a = this._state.doc.body.attributes[t],
|
|
8349
|
+
const a = this._state.doc.body.attributes[t], u = Ne(
|
|
8643
8350
|
"updateBodyAttribute",
|
|
8644
8351
|
`body.attributes.${t}`,
|
|
8645
|
-
(
|
|
8646
|
-
|
|
8352
|
+
(b) => {
|
|
8353
|
+
b.body.attributes[t] = r;
|
|
8647
8354
|
},
|
|
8648
|
-
(
|
|
8649
|
-
|
|
8355
|
+
(b) => {
|
|
8356
|
+
b.body.attributes[t] = a;
|
|
8650
8357
|
}
|
|
8651
8358
|
);
|
|
8652
|
-
i.addStep(
|
|
8359
|
+
i.addStep(u);
|
|
8653
8360
|
}
|
|
8654
8361
|
if (o) {
|
|
8655
|
-
const a = this._state.doc.metadata[o],
|
|
8362
|
+
const a = this._state.doc.metadata[o], u = Ne(
|
|
8656
8363
|
"updateMetadata",
|
|
8657
8364
|
`metadata.${o}`,
|
|
8658
|
-
(
|
|
8659
|
-
|
|
8365
|
+
(b) => {
|
|
8366
|
+
b.metadata[o] = r;
|
|
8660
8367
|
},
|
|
8661
|
-
(
|
|
8662
|
-
|
|
8368
|
+
(b) => {
|
|
8369
|
+
b.metadata[o] = a;
|
|
8663
8370
|
}
|
|
8664
8371
|
);
|
|
8665
|
-
i.addStep(
|
|
8372
|
+
i.addStep(u);
|
|
8666
8373
|
}
|
|
8667
8374
|
this._dispatch(i);
|
|
8668
8375
|
}
|
|
8669
8376
|
};
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8377
|
+
v.styles = [
|
|
8378
|
+
Vt,
|
|
8379
|
+
g`
|
|
8673
8380
|
:host {
|
|
8674
8381
|
display: flex;
|
|
8675
8382
|
flex-direction: column;
|
|
@@ -8695,103 +8402,103 @@ _.styles = [
|
|
|
8695
8402
|
}
|
|
8696
8403
|
`
|
|
8697
8404
|
];
|
|
8698
|
-
|
|
8405
|
+
m([
|
|
8699
8406
|
p({ type: Object })
|
|
8700
|
-
],
|
|
8701
|
-
|
|
8407
|
+
], v.prototype, "document", 2);
|
|
8408
|
+
m([
|
|
8702
8409
|
p({ type: String, reflect: !0 })
|
|
8703
|
-
],
|
|
8704
|
-
|
|
8410
|
+
], v.prototype, "theme", 2);
|
|
8411
|
+
m([
|
|
8705
8412
|
p({ attribute: !1 })
|
|
8706
|
-
],
|
|
8707
|
-
|
|
8413
|
+
], v.prototype, "themeOverrides", 2);
|
|
8414
|
+
m([
|
|
8708
8415
|
p({ type: Object })
|
|
8709
|
-
],
|
|
8710
|
-
|
|
8416
|
+
], v.prototype, "config", 2);
|
|
8417
|
+
m([
|
|
8711
8418
|
p({ type: Object })
|
|
8712
|
-
],
|
|
8713
|
-
|
|
8419
|
+
], v.prototype, "renderer", 2);
|
|
8420
|
+
m([
|
|
8714
8421
|
p({ type: Object })
|
|
8715
|
-
],
|
|
8716
|
-
|
|
8422
|
+
], v.prototype, "documentToMjml", 2);
|
|
8423
|
+
m([
|
|
8717
8424
|
p({ attribute: !1 })
|
|
8718
|
-
],
|
|
8719
|
-
|
|
8425
|
+
], v.prototype, "templateStorage", 2);
|
|
8426
|
+
m([
|
|
8720
8427
|
p({ attribute: !1 })
|
|
8721
|
-
],
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
],
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
],
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
],
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
],
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
],
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
],
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
],
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
],
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
],
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
],
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
],
|
|
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);
|
|
8755
8462
|
export {
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8762
|
-
|
|
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,
|
|
8763
8470
|
O as PigeonColumn,
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
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
|
|
8797
8504
|
};
|