@lit-pigeon/editor 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +20 -3
- package/dist/index.js +491 -420
- package/dist/rich-text-bridge.js +47 -0
- package/dist/rich-text.js +1997 -1955
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { css as b, LitElement as g, html as l, nothing as te } from "lit";
|
|
2
2
|
import { property as p, state as d, customElement as u } from "lit/decorators.js";
|
|
3
3
|
import { t as s, c as Bt, r as po } from "./templates.js";
|
|
4
|
-
import { P as
|
|
5
|
-
import { getAllBlockDefinitions as co, getBlockDefinition as yt, updateBlock as ct, createBlock as
|
|
4
|
+
import { P as Kr } from "./templates.js";
|
|
5
|
+
import { getAllBlockDefinitions as co, getBlockDefinition as yt, updateBlock as ct, createBlock as Ve, insertBlock as ce, createColumn as Ie, insertRow as oe, createRow as Te, cloneRowWithNewIds as jt, createBodySelection as Mt, deleteBlock as ho, deleteRow as Rt, duplicateBlock as go, duplicateRow as Lt, generateId as zt, EditorState as Ht, createHistoryPlugin as Ft, undo as uo, redo as bo, InMemoryTemplateStorage as vo, InMemoryRowLibraryStorage as fo, SYSTEM_LINK_TYPES as mo, createDocStep as dt, createDefaultDocument as _o, HISTORY_PLUGIN_NAME as Nt, canUndo as yo, canRedo as xo, createBlockSelection as ht, createRowSelection as Ut, createColumnSelection as $o, moveRow as wo, moveBlock as ko, updateRowAttributes as Co, addColumn as Io, removeColumn as To, resizeColumns as Po } from "@lit-pigeon/core";
|
|
6
6
|
import { unsafeHTML as eo } from "lit/directives/unsafe-html.js";
|
|
7
|
-
import { l as xt, r as So } from "./rich-text.js";
|
|
7
|
+
import { l as xt, r as So } from "./rich-text-bridge.js";
|
|
8
8
|
import { styleMap as Oo } from "lit/directives/style-map.js";
|
|
9
|
+
import "./rich-text.js";
|
|
9
10
|
const Kt = b`
|
|
10
11
|
/* base palette */
|
|
11
12
|
--pigeon-bg: #0f172a; /* slate-900 */
|
|
@@ -42,7 +43,7 @@ const Kt = b`
|
|
|
42
43
|
0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
43
44
|
--pigeon-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
|
|
44
45
|
0 4px 6px -4px rgb(0 0 0 / 0.5);
|
|
45
|
-
`,
|
|
46
|
+
`, Eo = b`
|
|
46
47
|
:host {
|
|
47
48
|
/* base palette */
|
|
48
49
|
--pigeon-bg: #ffffff;
|
|
@@ -112,12 +113,12 @@ const Kt = b`
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
`;
|
|
115
|
-
var
|
|
116
|
+
var Do = Object.defineProperty, Ao = Object.getOwnPropertyDescriptor, xe = (e, t, o, r) => {
|
|
116
117
|
for (var i = r > 1 ? void 0 : r ? Ao(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
117
118
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
118
|
-
return r && i &&
|
|
119
|
+
return r && i && Do(t, o, i), i;
|
|
119
120
|
};
|
|
120
|
-
let
|
|
121
|
+
let V = class extends g {
|
|
121
122
|
constructor() {
|
|
122
123
|
super(...arguments), this.canUndo = !1, this.canRedo = !1, this.device = "desktop", this.fullscreen = !1, this._exportMenuOpen = !1;
|
|
123
124
|
}
|
|
@@ -318,7 +319,10 @@ let K = class extends g {
|
|
|
318
319
|
}));
|
|
319
320
|
}
|
|
320
321
|
_toggleExportMenu() {
|
|
321
|
-
this._exportMenuOpen = !this._exportMenuOpen
|
|
322
|
+
this._exportMenuOpen = !this._exportMenuOpen, this._exportMenuOpen && this.dispatchEvent(new CustomEvent("toolbar-export", {
|
|
323
|
+
bubbles: !0,
|
|
324
|
+
composed: !0
|
|
325
|
+
}));
|
|
322
326
|
}
|
|
323
327
|
_onExportHtml() {
|
|
324
328
|
this._exportMenuOpen = !1, this.dispatchEvent(new CustomEvent("pigeon:export-html", {
|
|
@@ -339,7 +343,7 @@ let K = class extends g {
|
|
|
339
343
|
}));
|
|
340
344
|
}
|
|
341
345
|
};
|
|
342
|
-
|
|
346
|
+
V.styles = b`
|
|
343
347
|
:host {
|
|
344
348
|
display: flex;
|
|
345
349
|
align-items: center;
|
|
@@ -471,27 +475,27 @@ K.styles = b`
|
|
|
471
475
|
`;
|
|
472
476
|
xe([
|
|
473
477
|
p({ type: Boolean, attribute: "can-undo" })
|
|
474
|
-
],
|
|
478
|
+
], V.prototype, "canUndo", 2);
|
|
475
479
|
xe([
|
|
476
480
|
p({ type: Boolean, attribute: "can-redo" })
|
|
477
|
-
],
|
|
481
|
+
], V.prototype, "canRedo", 2);
|
|
478
482
|
xe([
|
|
479
483
|
p({ type: String })
|
|
480
|
-
],
|
|
484
|
+
], V.prototype, "device", 2);
|
|
481
485
|
xe([
|
|
482
486
|
p({ type: Boolean })
|
|
483
|
-
],
|
|
487
|
+
], V.prototype, "fullscreen", 2);
|
|
484
488
|
xe([
|
|
485
489
|
d()
|
|
486
|
-
],
|
|
487
|
-
|
|
490
|
+
], V.prototype, "_exportMenuOpen", 2);
|
|
491
|
+
V = xe([
|
|
488
492
|
u("pigeon-toolbar")
|
|
489
|
-
],
|
|
493
|
+
], V);
|
|
490
494
|
let $t = null;
|
|
491
495
|
function Bo(e) {
|
|
492
496
|
$t = e;
|
|
493
497
|
}
|
|
494
|
-
function
|
|
498
|
+
function Ee() {
|
|
495
499
|
return $t;
|
|
496
500
|
}
|
|
497
501
|
function Xe() {
|
|
@@ -500,21 +504,21 @@ function Xe() {
|
|
|
500
504
|
function wt(e, t) {
|
|
501
505
|
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), Bo(t);
|
|
502
506
|
}
|
|
503
|
-
function
|
|
507
|
+
function Fr(e) {
|
|
504
508
|
if (e.dataTransfer)
|
|
505
509
|
try {
|
|
506
510
|
const t = e.dataTransfer.getData("application/json");
|
|
507
511
|
if (t) return JSON.parse(t);
|
|
508
512
|
} catch {
|
|
509
513
|
}
|
|
510
|
-
return
|
|
514
|
+
return Ee();
|
|
511
515
|
}
|
|
512
|
-
var jo = Object.defineProperty,
|
|
513
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
516
|
+
var jo = Object.defineProperty, Mo = Object.getOwnPropertyDescriptor, $e = (e, t, o, r) => {
|
|
517
|
+
for (var i = r > 1 ? void 0 : r ? Mo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
514
518
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
515
519
|
return r && i && jo(t, o, i), i;
|
|
516
520
|
};
|
|
517
|
-
const
|
|
521
|
+
const Ro = {
|
|
518
522
|
text: "T",
|
|
519
523
|
image: "[]",
|
|
520
524
|
button: "[B]",
|
|
@@ -523,12 +527,12 @@ const Lo = {
|
|
|
523
527
|
social: "@",
|
|
524
528
|
html: "</>"
|
|
525
529
|
};
|
|
526
|
-
let
|
|
530
|
+
let Y = class extends g {
|
|
527
531
|
constructor() {
|
|
528
|
-
super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1;
|
|
532
|
+
super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1, this._didDrag = !1;
|
|
529
533
|
}
|
|
530
534
|
render() {
|
|
531
|
-
const e =
|
|
535
|
+
const e = Ro[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
|
|
532
536
|
return l`
|
|
533
537
|
<div
|
|
534
538
|
class="item"
|
|
@@ -536,7 +540,8 @@ let W = class extends g {
|
|
|
536
540
|
role="button"
|
|
537
541
|
tabindex="0"
|
|
538
542
|
aria-label="${t}: ${this.label}"
|
|
539
|
-
title="
|
|
543
|
+
title="Click to add, or drag onto the canvas"
|
|
544
|
+
@click=${this._onClick}
|
|
540
545
|
@dragstart=${this._onDragStart}
|
|
541
546
|
@dragend=${this._onDragEnd}
|
|
542
547
|
@keydown=${this._onKeyDown}
|
|
@@ -546,8 +551,18 @@ let W = class extends g {
|
|
|
546
551
|
</div>
|
|
547
552
|
`;
|
|
548
553
|
}
|
|
554
|
+
_onClick() {
|
|
555
|
+
this._didDrag || this._activate();
|
|
556
|
+
}
|
|
549
557
|
_onKeyDown(e) {
|
|
550
|
-
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), this.
|
|
558
|
+
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), this._activate());
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Click/keyboard equivalent of dragging this item onto the canvas: ask the
|
|
562
|
+
* editor to append the block/layout to the document.
|
|
563
|
+
*/
|
|
564
|
+
_activate() {
|
|
565
|
+
this.dispatchEvent(
|
|
551
566
|
new CustomEvent("palette-item-activate", {
|
|
552
567
|
detail: {
|
|
553
568
|
type: this.dragType,
|
|
@@ -557,10 +572,10 @@ let W = class extends g {
|
|
|
557
572
|
bubbles: !0,
|
|
558
573
|
composed: !0
|
|
559
574
|
})
|
|
560
|
-
)
|
|
575
|
+
);
|
|
561
576
|
}
|
|
562
577
|
_onDragStart(e) {
|
|
563
|
-
wt(e, {
|
|
578
|
+
this._didDrag = !0, wt(e, {
|
|
564
579
|
type: this.dragType,
|
|
565
580
|
blockType: this.blockType || void 0,
|
|
566
581
|
columnCount: this.columnCount
|
|
@@ -577,13 +592,15 @@ let W = class extends g {
|
|
|
577
592
|
});
|
|
578
593
|
}
|
|
579
594
|
_onDragEnd() {
|
|
580
|
-
|
|
595
|
+
setTimeout(() => {
|
|
596
|
+
this._didDrag = !1;
|
|
597
|
+
}, 0), this.dispatchEvent(new CustomEvent("palette-drag-end", {
|
|
581
598
|
bubbles: !0,
|
|
582
599
|
composed: !0
|
|
583
600
|
}));
|
|
584
601
|
}
|
|
585
602
|
};
|
|
586
|
-
|
|
603
|
+
Y.styles = b`
|
|
587
604
|
:host {
|
|
588
605
|
display: block;
|
|
589
606
|
}
|
|
@@ -643,26 +660,26 @@ W.styles = b`
|
|
|
643
660
|
`;
|
|
644
661
|
$e([
|
|
645
662
|
p({ type: String })
|
|
646
|
-
],
|
|
663
|
+
], Y.prototype, "label", 2);
|
|
647
664
|
$e([
|
|
648
665
|
p({ type: String })
|
|
649
|
-
],
|
|
666
|
+
], Y.prototype, "icon", 2);
|
|
650
667
|
$e([
|
|
651
668
|
p({ type: String, attribute: "drag-type" })
|
|
652
|
-
],
|
|
669
|
+
], Y.prototype, "dragType", 2);
|
|
653
670
|
$e([
|
|
654
671
|
p({ type: String, attribute: "block-type" })
|
|
655
|
-
],
|
|
672
|
+
], Y.prototype, "blockType", 2);
|
|
656
673
|
$e([
|
|
657
674
|
p({ type: Number, attribute: "column-count" })
|
|
658
|
-
],
|
|
659
|
-
|
|
675
|
+
], Y.prototype, "columnCount", 2);
|
|
676
|
+
Y = $e([
|
|
660
677
|
u("pigeon-palette-item")
|
|
661
|
-
],
|
|
662
|
-
var
|
|
663
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
678
|
+
], Y);
|
|
679
|
+
var Lo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, kt = (e, t, o, r) => {
|
|
680
|
+
for (var i = r > 1 ? void 0 : r ? zo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
664
681
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
665
|
-
return r && i &&
|
|
682
|
+
return r && i && Lo(t, o, i), i;
|
|
666
683
|
};
|
|
667
684
|
const Ho = {
|
|
668
685
|
text: "T",
|
|
@@ -675,7 +692,7 @@ const Ho = {
|
|
|
675
692
|
hero: "H",
|
|
676
693
|
navbar: "Nav"
|
|
677
694
|
};
|
|
678
|
-
let
|
|
695
|
+
let De = class extends g {
|
|
679
696
|
constructor() {
|
|
680
697
|
super(...arguments), this.selection = null;
|
|
681
698
|
}
|
|
@@ -734,7 +751,7 @@ let Ee = class extends g {
|
|
|
734
751
|
}));
|
|
735
752
|
}
|
|
736
753
|
};
|
|
737
|
-
|
|
754
|
+
De.styles = b`
|
|
738
755
|
:host {
|
|
739
756
|
display: block;
|
|
740
757
|
font-family: var(--pigeon-font);
|
|
@@ -800,14 +817,14 @@ Ee.styles = b`
|
|
|
800
817
|
`;
|
|
801
818
|
kt([
|
|
802
819
|
p({ type: Object })
|
|
803
|
-
],
|
|
820
|
+
], De.prototype, "doc", 2);
|
|
804
821
|
kt([
|
|
805
822
|
p({ type: Object })
|
|
806
|
-
],
|
|
807
|
-
|
|
823
|
+
], De.prototype, "selection", 2);
|
|
824
|
+
De = kt([
|
|
808
825
|
u("pigeon-layers")
|
|
809
|
-
],
|
|
810
|
-
var Fo = Object.defineProperty, No = Object.getOwnPropertyDescriptor,
|
|
826
|
+
], De);
|
|
827
|
+
var Fo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, H = (e, t, o, r) => {
|
|
811
828
|
for (var i = r > 1 ? void 0 : r ? No(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
812
829
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
813
830
|
return r && i && Fo(t, o, i), i;
|
|
@@ -826,7 +843,7 @@ const Wo = [
|
|
|
826
843
|
{ labelKey: "palette.layout.3-col", columns: 3, icon: "[|||]" },
|
|
827
844
|
{ labelKey: "palette.layout.4-col", columns: 4, icon: "[||||]" }
|
|
828
845
|
];
|
|
829
|
-
let
|
|
846
|
+
let T = class extends g {
|
|
830
847
|
constructor() {
|
|
831
848
|
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 () => {
|
|
832
849
|
this._activeTab = "brand", this._brandTabLoaded || (await Uo(), this._brandTabLoaded = !0);
|
|
@@ -936,7 +953,7 @@ let I = class extends g {
|
|
|
936
953
|
return this._savedTabLoaded ? l`<pigeon-saved-tab .storage=${this.rowLibrary}></pigeon-saved-tab>` : l``;
|
|
937
954
|
}
|
|
938
955
|
};
|
|
939
|
-
|
|
956
|
+
T.styles = b`
|
|
940
957
|
:host {
|
|
941
958
|
display: block;
|
|
942
959
|
width: var(--pigeon-palette-width, 240px);
|
|
@@ -1015,34 +1032,34 @@ I.styles = b`
|
|
|
1015
1032
|
gap: 6px;
|
|
1016
1033
|
}
|
|
1017
1034
|
`;
|
|
1018
|
-
|
|
1035
|
+
H([
|
|
1019
1036
|
p({ type: Object })
|
|
1020
|
-
],
|
|
1021
|
-
|
|
1037
|
+
], T.prototype, "doc", 2);
|
|
1038
|
+
H([
|
|
1022
1039
|
p({ type: Object })
|
|
1023
|
-
],
|
|
1024
|
-
|
|
1040
|
+
], T.prototype, "selection", 2);
|
|
1041
|
+
H([
|
|
1025
1042
|
p({ attribute: !1 })
|
|
1026
|
-
],
|
|
1027
|
-
|
|
1043
|
+
], T.prototype, "brandKit", 2);
|
|
1044
|
+
H([
|
|
1028
1045
|
p({ attribute: !1 })
|
|
1029
|
-
],
|
|
1030
|
-
|
|
1046
|
+
], T.prototype, "rowLibrary", 2);
|
|
1047
|
+
H([
|
|
1031
1048
|
d()
|
|
1032
|
-
],
|
|
1033
|
-
|
|
1049
|
+
], T.prototype, "_blockDefs", 2);
|
|
1050
|
+
H([
|
|
1034
1051
|
d()
|
|
1035
|
-
],
|
|
1036
|
-
|
|
1052
|
+
], T.prototype, "_activeTab", 2);
|
|
1053
|
+
H([
|
|
1037
1054
|
d()
|
|
1038
|
-
],
|
|
1039
|
-
|
|
1055
|
+
], T.prototype, "_brandTabLoaded", 2);
|
|
1056
|
+
H([
|
|
1040
1057
|
d()
|
|
1041
|
-
],
|
|
1042
|
-
|
|
1058
|
+
], T.prototype, "_savedTabLoaded", 2);
|
|
1059
|
+
T = H([
|
|
1043
1060
|
u("pigeon-palette")
|
|
1044
|
-
],
|
|
1045
|
-
function
|
|
1061
|
+
], T);
|
|
1062
|
+
function qo(e, t) {
|
|
1046
1063
|
if (t.length === 0) return 0;
|
|
1047
1064
|
for (let o = 0; o < t.length; o++) {
|
|
1048
1065
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1051,7 +1068,7 @@ function Vo(e, t) {
|
|
|
1051
1068
|
}
|
|
1052
1069
|
return t.length;
|
|
1053
1070
|
}
|
|
1054
|
-
function
|
|
1071
|
+
function Vo(e, t) {
|
|
1055
1072
|
if (t.length === 0) return 0;
|
|
1056
1073
|
for (let o = 0; o < t.length; o++) {
|
|
1057
1074
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1063,10 +1080,10 @@ function Yo(e, t) {
|
|
|
1063
1080
|
function to(e, t) {
|
|
1064
1081
|
return e < 0 || t === e || t === e + 1 ? null : t > e ? t - 1 : t;
|
|
1065
1082
|
}
|
|
1066
|
-
var
|
|
1083
|
+
var Yo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, oo = (e, t, o, r) => {
|
|
1067
1084
|
for (var i = r > 1 ? void 0 : r ? Xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1068
1085
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1069
|
-
return r && i &&
|
|
1086
|
+
return r && i && Yo(t, o, i), i;
|
|
1070
1087
|
};
|
|
1071
1088
|
let Ge = class extends g {
|
|
1072
1089
|
constructor() {
|
|
@@ -1169,7 +1186,7 @@ let de = class extends g {
|
|
|
1169
1186
|
element: this._editorHost,
|
|
1170
1187
|
initialHTML: this.block.values.content,
|
|
1171
1188
|
onBlur: (o) => this._commit(o),
|
|
1172
|
-
onEscape: () => this.
|
|
1189
|
+
onEscape: (o) => this._commit(o)
|
|
1173
1190
|
}));
|
|
1174
1191
|
}
|
|
1175
1192
|
_teardownEditor() {
|
|
@@ -1189,10 +1206,6 @@ let de = class extends g {
|
|
|
1189
1206
|
composed: !0
|
|
1190
1207
|
}));
|
|
1191
1208
|
}
|
|
1192
|
-
_exit() {
|
|
1193
|
-
const e = this._editor ? this._editor.getHTML() : this.block.values.content;
|
|
1194
|
-
this._commit(e);
|
|
1195
|
-
}
|
|
1196
1209
|
_handleClick(e) {
|
|
1197
1210
|
e.stopPropagation(), !this.editing && this.dispatchEvent(new CustomEvent("block-select", {
|
|
1198
1211
|
detail: { blockId: this.block.id },
|
|
@@ -1584,7 +1597,7 @@ It([
|
|
|
1584
1597
|
Be = It([
|
|
1585
1598
|
u("pigeon-divider-block")
|
|
1586
1599
|
], Be);
|
|
1587
|
-
var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor,
|
|
1600
|
+
var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, Tt = (e, t, o, r) => {
|
|
1588
1601
|
for (var i = r > 1 ? void 0 : r ? ni(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1589
1602
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1590
1603
|
return r && i && ri(t, o, i), i;
|
|
@@ -1656,16 +1669,16 @@ je.styles = b`
|
|
|
1656
1669
|
opacity: 1;
|
|
1657
1670
|
}
|
|
1658
1671
|
`;
|
|
1659
|
-
|
|
1672
|
+
Tt([
|
|
1660
1673
|
p({ type: Object })
|
|
1661
1674
|
], je.prototype, "block", 2);
|
|
1662
|
-
|
|
1675
|
+
Tt([
|
|
1663
1676
|
p({ type: Boolean, reflect: !0 })
|
|
1664
1677
|
], je.prototype, "selected", 2);
|
|
1665
|
-
je =
|
|
1678
|
+
je = Tt([
|
|
1666
1679
|
u("pigeon-spacer-block")
|
|
1667
1680
|
], je);
|
|
1668
|
-
var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor,
|
|
1681
|
+
var ai = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Pt = (e, t, o, r) => {
|
|
1669
1682
|
for (var i = r > 1 ? void 0 : r ? si(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1670
1683
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1671
1684
|
return r && i && ai(t, o, i), i;
|
|
@@ -1687,7 +1700,7 @@ const li = {
|
|
|
1687
1700
|
tiktok: "#000000",
|
|
1688
1701
|
custom: "#6b7280"
|
|
1689
1702
|
};
|
|
1690
|
-
let
|
|
1703
|
+
let Me = class extends g {
|
|
1691
1704
|
constructor() {
|
|
1692
1705
|
super(...arguments), this.selected = !1;
|
|
1693
1706
|
}
|
|
@@ -1734,7 +1747,7 @@ let Re = class extends g {
|
|
|
1734
1747
|
}));
|
|
1735
1748
|
}
|
|
1736
1749
|
};
|
|
1737
|
-
|
|
1750
|
+
Me.styles = b`
|
|
1738
1751
|
:host {
|
|
1739
1752
|
display: block;
|
|
1740
1753
|
cursor: pointer;
|
|
@@ -1782,21 +1795,21 @@ Re.styles = b`
|
|
|
1782
1795
|
font-size: 13px;
|
|
1783
1796
|
}
|
|
1784
1797
|
`;
|
|
1785
|
-
|
|
1798
|
+
Pt([
|
|
1786
1799
|
p({ type: Object })
|
|
1787
|
-
],
|
|
1788
|
-
|
|
1800
|
+
], Me.prototype, "block", 2);
|
|
1801
|
+
Pt([
|
|
1789
1802
|
p({ type: Boolean, reflect: !0 })
|
|
1790
|
-
],
|
|
1791
|
-
|
|
1803
|
+
], Me.prototype, "selected", 2);
|
|
1804
|
+
Me = Pt([
|
|
1792
1805
|
u("pigeon-social-block")
|
|
1793
|
-
],
|
|
1806
|
+
], Me);
|
|
1794
1807
|
var ci = Object.defineProperty, di = Object.getOwnPropertyDescriptor, St = (e, t, o, r) => {
|
|
1795
1808
|
for (var i = r > 1 ? void 0 : r ? di(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1796
1809
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
1797
1810
|
return r && i && ci(t, o, i), i;
|
|
1798
1811
|
};
|
|
1799
|
-
let
|
|
1812
|
+
let Re = class extends g {
|
|
1800
1813
|
constructor() {
|
|
1801
1814
|
super(...arguments), this.selected = !1;
|
|
1802
1815
|
}
|
|
@@ -1809,10 +1822,24 @@ let Le = class extends g {
|
|
|
1809
1822
|
style="${t}"
|
|
1810
1823
|
@click=${this._handleClick}
|
|
1811
1824
|
>
|
|
1812
|
-
${e.content ? l`<
|
|
1825
|
+
${e.content ? l`<iframe
|
|
1826
|
+
class="content"
|
|
1827
|
+
title="Custom HTML"
|
|
1828
|
+
sandbox="allow-same-origin"
|
|
1829
|
+
.srcdoc=${`<style>body{margin:0;display:flow-root}</style>${e.content}`}
|
|
1830
|
+
@load=${this._fit}
|
|
1831
|
+
></iframe>` : l`<div class="empty-state"></> Custom HTML</div>`}
|
|
1813
1832
|
</div>
|
|
1814
1833
|
`;
|
|
1815
1834
|
}
|
|
1835
|
+
/** No scripts run inside the sandbox, so the parent sizes the frame to its content. */
|
|
1836
|
+
_fit(e) {
|
|
1837
|
+
var o;
|
|
1838
|
+
const t = e.target;
|
|
1839
|
+
(o = this._resizer) == null || o.disconnect(), this._resizer = new ResizeObserver(() => {
|
|
1840
|
+
t.style.height = `${t.contentDocument.body.scrollHeight}px`;
|
|
1841
|
+
}), this._resizer.observe(t);
|
|
1842
|
+
}
|
|
1816
1843
|
_handleClick(e) {
|
|
1817
1844
|
e.stopPropagation(), this.dispatchEvent(new CustomEvent("block-select", {
|
|
1818
1845
|
detail: { blockId: this.block.id },
|
|
@@ -1821,7 +1848,7 @@ let Le = class extends g {
|
|
|
1821
1848
|
}));
|
|
1822
1849
|
}
|
|
1823
1850
|
};
|
|
1824
|
-
|
|
1851
|
+
Re.styles = b`
|
|
1825
1852
|
:host {
|
|
1826
1853
|
display: block;
|
|
1827
1854
|
cursor: pointer;
|
|
@@ -1844,8 +1871,10 @@ Le.styles = b`
|
|
|
1844
1871
|
}
|
|
1845
1872
|
|
|
1846
1873
|
.content {
|
|
1847
|
-
|
|
1848
|
-
|
|
1874
|
+
display: block;
|
|
1875
|
+
width: 100%;
|
|
1876
|
+
border: 0;
|
|
1877
|
+
pointer-events: none;
|
|
1849
1878
|
}
|
|
1850
1879
|
|
|
1851
1880
|
.empty-state {
|
|
@@ -1863,13 +1892,13 @@ Le.styles = b`
|
|
|
1863
1892
|
`;
|
|
1864
1893
|
St([
|
|
1865
1894
|
p({ type: Object })
|
|
1866
|
-
],
|
|
1895
|
+
], Re.prototype, "block", 2);
|
|
1867
1896
|
St([
|
|
1868
1897
|
p({ type: Boolean, reflect: !0 })
|
|
1869
|
-
],
|
|
1870
|
-
|
|
1898
|
+
], Re.prototype, "selected", 2);
|
|
1899
|
+
Re = St([
|
|
1871
1900
|
u("pigeon-html-block")
|
|
1872
|
-
],
|
|
1901
|
+
], Re);
|
|
1873
1902
|
var hi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, it = (e, t, o, r) => {
|
|
1874
1903
|
for (var i = r > 1 ? void 0 : r ? gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1875
1904
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
@@ -2037,7 +2066,7 @@ var ui = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ot = (e, t
|
|
|
2037
2066
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2038
2067
|
return r && i && ui(t, o, i), i;
|
|
2039
2068
|
};
|
|
2040
|
-
let
|
|
2069
|
+
let Le = class extends g {
|
|
2041
2070
|
constructor() {
|
|
2042
2071
|
super(...arguments), this.selected = !1;
|
|
2043
2072
|
}
|
|
@@ -2080,7 +2109,7 @@ let ze = class extends g {
|
|
|
2080
2109
|
}));
|
|
2081
2110
|
}
|
|
2082
2111
|
};
|
|
2083
|
-
|
|
2112
|
+
Le.styles = b`
|
|
2084
2113
|
:host {
|
|
2085
2114
|
display: block;
|
|
2086
2115
|
cursor: pointer;
|
|
@@ -2130,19 +2159,19 @@ ze.styles = b`
|
|
|
2130
2159
|
`;
|
|
2131
2160
|
Ot([
|
|
2132
2161
|
p({ type: Object })
|
|
2133
|
-
],
|
|
2162
|
+
], Le.prototype, "block", 2);
|
|
2134
2163
|
Ot([
|
|
2135
2164
|
p({ type: Boolean, reflect: !0 })
|
|
2136
|
-
],
|
|
2137
|
-
|
|
2165
|
+
], Le.prototype, "selected", 2);
|
|
2166
|
+
Le = Ot([
|
|
2138
2167
|
u("pigeon-navbar-block")
|
|
2139
|
-
],
|
|
2140
|
-
var vi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor,
|
|
2168
|
+
], Le);
|
|
2169
|
+
var vi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, Z = (e, t, o, r) => {
|
|
2141
2170
|
for (var i = r > 1 ? void 0 : r ? fi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2142
2171
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2143
2172
|
return r && i && vi(t, o, i), i;
|
|
2144
2173
|
};
|
|
2145
|
-
let
|
|
2174
|
+
let A = class extends g {
|
|
2146
2175
|
constructor() {
|
|
2147
2176
|
super(...arguments), this.rowId = "", this.selection = null, this.editingBlockId = null, this._dropIndex = -1, this._isDragOver = !1, this._draggingBlockId = null;
|
|
2148
2177
|
}
|
|
@@ -2251,7 +2280,7 @@ let O = class extends g {
|
|
|
2251
2280
|
);
|
|
2252
2281
|
}
|
|
2253
2282
|
_onDragOver(e) {
|
|
2254
|
-
const t =
|
|
2283
|
+
const t = Ee();
|
|
2255
2284
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2256
2285
|
e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = t.type === "existing-block" ? "move" : "copy"), this._isDragOver = !0;
|
|
2257
2286
|
const o = Array.from(
|
|
@@ -2259,14 +2288,14 @@ let O = class extends g {
|
|
|
2259
2288
|
"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"
|
|
2260
2289
|
)
|
|
2261
2290
|
);
|
|
2262
|
-
this._dropIndex =
|
|
2291
|
+
this._dropIndex = Vo(e.clientY, o);
|
|
2263
2292
|
}
|
|
2264
2293
|
_onDragLeave(e) {
|
|
2265
2294
|
const t = this.getBoundingClientRect();
|
|
2266
2295
|
e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (this._isDragOver = !1, this._dropIndex = -1);
|
|
2267
2296
|
}
|
|
2268
2297
|
_onDrop(e) {
|
|
2269
|
-
const t =
|
|
2298
|
+
const t = Ee();
|
|
2270
2299
|
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2271
2300
|
e.preventDefault(), e.stopPropagation();
|
|
2272
2301
|
let o = this._dropIndex >= 0 ? this._dropIndex : this.column.blocks.length;
|
|
@@ -2308,7 +2337,7 @@ let O = class extends g {
|
|
|
2308
2337
|
this._draggingBlockId = null, Xe();
|
|
2309
2338
|
}
|
|
2310
2339
|
};
|
|
2311
|
-
|
|
2340
|
+
A.styles = b`
|
|
2312
2341
|
:host {
|
|
2313
2342
|
display: block;
|
|
2314
2343
|
min-height: 40px;
|
|
@@ -2424,36 +2453,36 @@ O.styles = b`
|
|
|
2424
2453
|
text-align: center;
|
|
2425
2454
|
}
|
|
2426
2455
|
`;
|
|
2427
|
-
|
|
2456
|
+
Z([
|
|
2428
2457
|
p({ type: Object })
|
|
2429
|
-
],
|
|
2430
|
-
|
|
2458
|
+
], A.prototype, "column", 2);
|
|
2459
|
+
Z([
|
|
2431
2460
|
p({ type: String, attribute: "row-id" })
|
|
2432
|
-
],
|
|
2433
|
-
|
|
2461
|
+
], A.prototype, "rowId", 2);
|
|
2462
|
+
Z([
|
|
2434
2463
|
p({ type: Object })
|
|
2435
|
-
],
|
|
2436
|
-
|
|
2464
|
+
], A.prototype, "selection", 2);
|
|
2465
|
+
Z([
|
|
2437
2466
|
p({ type: String, attribute: "editing-block-id" })
|
|
2438
|
-
],
|
|
2439
|
-
|
|
2467
|
+
], A.prototype, "editingBlockId", 2);
|
|
2468
|
+
Z([
|
|
2440
2469
|
d()
|
|
2441
|
-
],
|
|
2442
|
-
|
|
2470
|
+
], A.prototype, "_dropIndex", 2);
|
|
2471
|
+
Z([
|
|
2443
2472
|
d()
|
|
2444
|
-
],
|
|
2445
|
-
|
|
2473
|
+
], A.prototype, "_isDragOver", 2);
|
|
2474
|
+
Z([
|
|
2446
2475
|
d()
|
|
2447
|
-
],
|
|
2448
|
-
|
|
2476
|
+
], A.prototype, "_draggingBlockId", 2);
|
|
2477
|
+
A = Z([
|
|
2449
2478
|
u("pigeon-column")
|
|
2450
|
-
],
|
|
2451
|
-
var mi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor,
|
|
2479
|
+
], A);
|
|
2480
|
+
var mi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, Q = (e, t, o, r) => {
|
|
2452
2481
|
for (var i = r > 1 ? void 0 : r ? _i(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2453
2482
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2454
2483
|
return r && i && mi(t, o, i), i;
|
|
2455
2484
|
};
|
|
2456
|
-
let
|
|
2485
|
+
let B = class extends g {
|
|
2457
2486
|
constructor() {
|
|
2458
2487
|
super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this.showActions = !1, this._dragging = !1;
|
|
2459
2488
|
}
|
|
@@ -2613,7 +2642,7 @@ let D = class extends g {
|
|
|
2613
2642
|
this._dragging = !1, Xe();
|
|
2614
2643
|
}
|
|
2615
2644
|
};
|
|
2616
|
-
|
|
2645
|
+
B.styles = b`
|
|
2617
2646
|
:host {
|
|
2618
2647
|
display: block;
|
|
2619
2648
|
position: relative;
|
|
@@ -2744,31 +2773,31 @@ D.styles = b`
|
|
|
2744
2773
|
opacity: 1;
|
|
2745
2774
|
}
|
|
2746
2775
|
`;
|
|
2747
|
-
|
|
2776
|
+
Q([
|
|
2748
2777
|
p({ type: Object })
|
|
2749
|
-
],
|
|
2750
|
-
|
|
2778
|
+
], B.prototype, "row", 2);
|
|
2779
|
+
Q([
|
|
2751
2780
|
p({ type: Number })
|
|
2752
|
-
],
|
|
2753
|
-
|
|
2781
|
+
], B.prototype, "index", 2);
|
|
2782
|
+
Q([
|
|
2754
2783
|
p({ type: Number, attribute: "total-rows" })
|
|
2755
|
-
],
|
|
2756
|
-
|
|
2784
|
+
], B.prototype, "totalRows", 2);
|
|
2785
|
+
Q([
|
|
2757
2786
|
p({ type: Object })
|
|
2758
|
-
],
|
|
2759
|
-
|
|
2787
|
+
], B.prototype, "selection", 2);
|
|
2788
|
+
Q([
|
|
2760
2789
|
p({ type: String, attribute: "editing-block-id" })
|
|
2761
|
-
],
|
|
2762
|
-
|
|
2790
|
+
], B.prototype, "editingBlockId", 2);
|
|
2791
|
+
Q([
|
|
2763
2792
|
p({ type: Boolean, attribute: "show-actions", reflect: !0 })
|
|
2764
|
-
],
|
|
2765
|
-
|
|
2793
|
+
], B.prototype, "showActions", 2);
|
|
2794
|
+
Q([
|
|
2766
2795
|
d()
|
|
2767
|
-
],
|
|
2768
|
-
|
|
2796
|
+
], B.prototype, "_dragging", 2);
|
|
2797
|
+
B = Q([
|
|
2769
2798
|
u("pigeon-row")
|
|
2770
|
-
],
|
|
2771
|
-
var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor,
|
|
2799
|
+
], B);
|
|
2800
|
+
var yi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, F = (e, t, o, r) => {
|
|
2772
2801
|
for (var i = r > 1 ? void 0 : r ? xi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2773
2802
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
2774
2803
|
return r && i && yi(t, o, i), i;
|
|
@@ -2872,12 +2901,12 @@ let P = class extends g {
|
|
|
2872
2901
|
}));
|
|
2873
2902
|
}
|
|
2874
2903
|
_onDragOver(e) {
|
|
2875
|
-
const t =
|
|
2904
|
+
const t = Ee();
|
|
2876
2905
|
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)) {
|
|
2877
2906
|
const o = Array.from(
|
|
2878
2907
|
this.renderRoot.querySelectorAll("pigeon-row")
|
|
2879
2908
|
);
|
|
2880
|
-
this._rowDropIndex =
|
|
2909
|
+
this._rowDropIndex = qo(e.clientY, o);
|
|
2881
2910
|
}
|
|
2882
2911
|
}
|
|
2883
2912
|
_onDragLeave(e) {
|
|
@@ -2887,7 +2916,7 @@ let P = class extends g {
|
|
|
2887
2916
|
}
|
|
2888
2917
|
_onDrop(e) {
|
|
2889
2918
|
e.preventDefault();
|
|
2890
|
-
const t =
|
|
2919
|
+
const t = Ee();
|
|
2891
2920
|
if (!t) {
|
|
2892
2921
|
this._resetDragState();
|
|
2893
2922
|
return;
|
|
@@ -3059,31 +3088,31 @@ P.styles = b`
|
|
|
3059
3088
|
border-radius: var(--pigeon-radius, 6px);
|
|
3060
3089
|
}
|
|
3061
3090
|
`;
|
|
3062
|
-
|
|
3091
|
+
F([
|
|
3063
3092
|
p({ type: Object })
|
|
3064
3093
|
], P.prototype, "doc", 2);
|
|
3065
|
-
|
|
3094
|
+
F([
|
|
3066
3095
|
p({ type: Object })
|
|
3067
3096
|
], P.prototype, "selection", 2);
|
|
3068
|
-
|
|
3097
|
+
F([
|
|
3069
3098
|
p({ type: String, attribute: "editing-block-id" })
|
|
3070
3099
|
], P.prototype, "editingBlockId", 2);
|
|
3071
|
-
|
|
3100
|
+
F([
|
|
3072
3101
|
p({ type: Number, attribute: "preview-width" })
|
|
3073
3102
|
], P.prototype, "previewWidth", 2);
|
|
3074
|
-
|
|
3103
|
+
F([
|
|
3075
3104
|
p({ type: String })
|
|
3076
3105
|
], P.prototype, "device", 2);
|
|
3077
|
-
|
|
3106
|
+
F([
|
|
3078
3107
|
d()
|
|
3079
3108
|
], P.prototype, "_rowDropIndex", 2);
|
|
3080
|
-
|
|
3109
|
+
F([
|
|
3081
3110
|
d()
|
|
3082
3111
|
], P.prototype, "_isDragOver", 2);
|
|
3083
|
-
|
|
3112
|
+
F([
|
|
3084
3113
|
d()
|
|
3085
3114
|
], P.prototype, "_hoveredRowId", 2);
|
|
3086
|
-
P =
|
|
3115
|
+
P = F([
|
|
3087
3116
|
u("pigeon-canvas")
|
|
3088
3117
|
], P);
|
|
3089
3118
|
/**
|
|
@@ -3091,22 +3120,22 @@ P = H([
|
|
|
3091
3120
|
* Copyright 2017 Google LLC
|
|
3092
3121
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3093
3122
|
*/
|
|
3094
|
-
const Se = globalThis, Wt = (e) => e, Je = Se.trustedTypes,
|
|
3095
|
-
\f\r]`,
|
|
3123
|
+
const Se = globalThis, Wt = (e) => e, Je = Se.trustedTypes, qt = Je ? Je.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, io = "$lit$", q = `lit$${Math.random().toFixed(9).slice(2)}$`, ro = "?" + q, $i = `<${ro}>`, ne = document, Ze = () => ne.createComment(""), ze = (e) => e === null || typeof e != "object" && typeof e != "function", Et = Array.isArray, wi = (e) => Et(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", bt = `[
|
|
3124
|
+
\f\r]`, Pe = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, Yt = />/g, ie = RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
|
|
3096
3125
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Xt = /'/g, Gt = /"/g, no = /^(?:script|style|textarea|title)$/i, He = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), re = ne.createTreeWalker(ne, 129);
|
|
3097
3126
|
function ao(e, t) {
|
|
3098
|
-
if (!
|
|
3099
|
-
return
|
|
3127
|
+
if (!Et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
3128
|
+
return qt !== void 0 ? qt.createHTML(t) : t;
|
|
3100
3129
|
}
|
|
3101
3130
|
const ki = (e, t) => {
|
|
3102
3131
|
const o = e.length - 1, r = [];
|
|
3103
|
-
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a =
|
|
3132
|
+
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = Pe;
|
|
3104
3133
|
for (let h = 0; h < o; h++) {
|
|
3105
3134
|
const c = e[h];
|
|
3106
3135
|
let v, m, f = -1, R = 0;
|
|
3107
|
-
for (; R < c.length && (a.lastIndex = R, m = a.exec(c), m !== null); ) R = a.lastIndex, a ===
|
|
3108
|
-
const
|
|
3109
|
-
n += a ===
|
|
3136
|
+
for (; R < c.length && (a.lastIndex = R, m = a.exec(c), m !== null); ) R = a.lastIndex, a === Pe ? m[1] === "!--" ? a = Vt : m[1] !== void 0 ? a = Yt : m[2] !== void 0 ? (no.test(m[2]) && (i = RegExp("</" + m[2], "g")), a = ie) : m[3] !== void 0 && (a = ie) : a === ie ? m[0] === ">" ? (a = i ?? Pe, f = -1) : m[1] === void 0 ? f = -2 : (f = a.lastIndex - m[2].length, v = m[1], a = m[3] === void 0 ? ie : m[3] === '"' ? Gt : Xt) : a === Gt || a === Xt ? a = ie : a === Vt || a === Yt ? a = Pe : (a = ie, i = void 0);
|
|
3137
|
+
const W = a === ie && e[h + 1].startsWith("/>") ? " " : "";
|
|
3138
|
+
n += a === Pe ? c + $i : f >= 0 ? (r.push(v), c.slice(0, f) + io + c.slice(f) + q + W) : c + q + (f === -2 ? h : W);
|
|
3110
3139
|
}
|
|
3111
3140
|
return [ao(e, n + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
3112
3141
|
};
|
|
@@ -3123,21 +3152,21 @@ class Fe {
|
|
|
3123
3152
|
for (; (i = re.nextNode()) !== null && c.length < h; ) {
|
|
3124
3153
|
if (i.nodeType === 1) {
|
|
3125
3154
|
if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(io)) {
|
|
3126
|
-
const R = m[a++],
|
|
3127
|
-
c.push({ type: 1, index: n, name:
|
|
3128
|
-
} else f.startsWith(
|
|
3155
|
+
const R = m[a++], W = i.getAttribute(f).split(q), qe = /([.?@])?(.*)/.exec(R);
|
|
3156
|
+
c.push({ type: 1, index: n, name: qe[2], strings: W, ctor: qe[1] === "." ? Ii : qe[1] === "?" ? Ti : qe[1] === "@" ? Pi : nt }), i.removeAttribute(f);
|
|
3157
|
+
} else f.startsWith(q) && (c.push({ type: 6, index: n }), i.removeAttribute(f));
|
|
3129
3158
|
if (no.test(i.tagName)) {
|
|
3130
|
-
const f = i.textContent.split(
|
|
3159
|
+
const f = i.textContent.split(q), R = f.length - 1;
|
|
3131
3160
|
if (R > 0) {
|
|
3132
3161
|
i.textContent = Je ? Je.emptyScript : "";
|
|
3133
|
-
for (let
|
|
3162
|
+
for (let W = 0; W < R; W++) i.append(f[W], Ze()), re.nextNode(), c.push({ type: 2, index: ++n });
|
|
3134
3163
|
i.append(f[R], Ze());
|
|
3135
3164
|
}
|
|
3136
3165
|
}
|
|
3137
3166
|
} else if (i.nodeType === 8) if (i.data === ro) c.push({ type: 2, index: n });
|
|
3138
3167
|
else {
|
|
3139
3168
|
let f = -1;
|
|
3140
|
-
for (; (f = i.data.indexOf(
|
|
3169
|
+
for (; (f = i.data.indexOf(q, f + 1)) !== -1; ) c.push({ type: 7, index: n }), f += q.length - 1;
|
|
3141
3170
|
}
|
|
3142
3171
|
n++;
|
|
3143
3172
|
}
|
|
@@ -3151,7 +3180,7 @@ function ue(e, t, o = e, r) {
|
|
|
3151
3180
|
var a, h;
|
|
3152
3181
|
if (t === He) return t;
|
|
3153
3182
|
let i = r !== void 0 ? (a = o._$Co) == null ? void 0 : a[r] : o._$Cl;
|
|
3154
|
-
const n =
|
|
3183
|
+
const n = ze(t) ? void 0 : t._$litDirective$;
|
|
3155
3184
|
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(e), i._$AT(e, o, r)), r !== void 0 ? (o._$Co ?? (o._$Co = []))[r] = i : o._$Cl = i), i !== void 0 && (t = ue(e, i._$AS(e, t.values), i, r)), t;
|
|
3156
3185
|
}
|
|
3157
3186
|
class Ci {
|
|
@@ -3202,7 +3231,7 @@ class rt {
|
|
|
3202
3231
|
return this._$AB;
|
|
3203
3232
|
}
|
|
3204
3233
|
_$AI(t, o = this) {
|
|
3205
|
-
t = ue(this, t, o),
|
|
3234
|
+
t = ue(this, t, o), ze(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== He && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : wi(t) ? this.k(t) : this._(t);
|
|
3206
3235
|
}
|
|
3207
3236
|
O(t) {
|
|
3208
3237
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -3211,7 +3240,7 @@ class rt {
|
|
|
3211
3240
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
3212
3241
|
}
|
|
3213
3242
|
_(t) {
|
|
3214
|
-
this._$AH !== y &&
|
|
3243
|
+
this._$AH !== y && ze(this._$AH) ? this._$AA.nextSibling.data = t : this.T(ne.createTextNode(t)), this._$AH = t;
|
|
3215
3244
|
}
|
|
3216
3245
|
$(t) {
|
|
3217
3246
|
var n;
|
|
@@ -3227,7 +3256,7 @@ class rt {
|
|
|
3227
3256
|
return o === void 0 && Jt.set(t.strings, o = new Fe(t)), o;
|
|
3228
3257
|
}
|
|
3229
3258
|
k(t) {
|
|
3230
|
-
|
|
3259
|
+
Et(this._$AH) || (this._$AH = [], this._$AR());
|
|
3231
3260
|
const o = this._$AH;
|
|
3232
3261
|
let r, i = 0;
|
|
3233
3262
|
for (const n of t) i === o.length ? o.push(r = new rt(this.O(Ze()), this.O(Ze()), this, this.options)) : r = o[i], r._$AI(n), i++;
|
|
@@ -3258,11 +3287,11 @@ class nt {
|
|
|
3258
3287
|
_$AI(t, o = this, r, i) {
|
|
3259
3288
|
const n = this.strings;
|
|
3260
3289
|
let a = !1;
|
|
3261
|
-
if (n === void 0) t = ue(this, t, o, 0), a = !
|
|
3290
|
+
if (n === void 0) t = ue(this, t, o, 0), a = !ze(t) || t !== this._$AH && t !== He, a && (this._$AH = t);
|
|
3262
3291
|
else {
|
|
3263
3292
|
const h = t;
|
|
3264
3293
|
let c, v;
|
|
3265
|
-
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 = !
|
|
3294
|
+
for (t = n[0], c = 0; c < n.length - 1; c++) v = ue(this, h[r + c], o, c), v === He && (v = this._$AH[c]), a || (a = !ze(v) || v !== this._$AH[c]), v === y ? t = y : t !== y && (t += (v ?? "") + n[c + 1]), this._$AH[c] = v;
|
|
3266
3295
|
}
|
|
3267
3296
|
a && !i && this.j(t);
|
|
3268
3297
|
}
|
|
@@ -3278,7 +3307,7 @@ class Ii extends nt {
|
|
|
3278
3307
|
this.element[this.name] = t === y ? void 0 : t;
|
|
3279
3308
|
}
|
|
3280
3309
|
}
|
|
3281
|
-
class
|
|
3310
|
+
class Ti extends nt {
|
|
3282
3311
|
constructor() {
|
|
3283
3312
|
super(...arguments), this.type = 4;
|
|
3284
3313
|
}
|
|
@@ -3286,7 +3315,7 @@ class Pi extends nt {
|
|
|
3286
3315
|
this.element.toggleAttribute(this.name, !!t && t !== y);
|
|
3287
3316
|
}
|
|
3288
3317
|
}
|
|
3289
|
-
class
|
|
3318
|
+
class Pi extends nt {
|
|
3290
3319
|
constructor(t, o, r, i, n) {
|
|
3291
3320
|
super(t, o, r, i, n), this.type = 5;
|
|
3292
3321
|
}
|
|
@@ -3312,7 +3341,7 @@ class Si {
|
|
|
3312
3341
|
}
|
|
3313
3342
|
}
|
|
3314
3343
|
const vt = Se.litHtmlPolyfillSupport;
|
|
3315
|
-
vt == null || vt(Fe, rt), (Se.litHtmlVersions ?? (Se.litHtmlVersions = [])).push("3.3.
|
|
3344
|
+
vt == null || vt(Fe, rt), (Se.litHtmlVersions ?? (Se.litHtmlVersions = [])).push("3.3.3");
|
|
3316
3345
|
/**
|
|
3317
3346
|
* @license
|
|
3318
3347
|
* Copyright 2020 Google LLC
|
|
@@ -3324,7 +3353,7 @@ const Oi = (e) => e.strings === void 0;
|
|
|
3324
3353
|
* Copyright 2017 Google LLC
|
|
3325
3354
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3326
3355
|
*/
|
|
3327
|
-
const
|
|
3356
|
+
const Ei = { CHILD: 2 }, Di = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
3328
3357
|
class Ai {
|
|
3329
3358
|
constructor(t) {
|
|
3330
3359
|
}
|
|
@@ -3363,7 +3392,7 @@ const Oe = (e, t) => {
|
|
|
3363
3392
|
let o = t._$AN;
|
|
3364
3393
|
if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
|
|
3365
3394
|
else if (o.has(e)) break;
|
|
3366
|
-
o.add(e),
|
|
3395
|
+
o.add(e), Mi(t);
|
|
3367
3396
|
}
|
|
3368
3397
|
};
|
|
3369
3398
|
function Bi(e) {
|
|
@@ -3375,10 +3404,10 @@ function ji(e, t = !1, o = 0) {
|
|
|
3375
3404
|
else r != null && (Oe(r, !1), Qe(r));
|
|
3376
3405
|
else Oe(this, e);
|
|
3377
3406
|
}
|
|
3378
|
-
const
|
|
3379
|
-
e.type ==
|
|
3407
|
+
const Mi = (e) => {
|
|
3408
|
+
e.type == Ei.CHILD && (e._$AP ?? (e._$AP = ji), e._$AQ ?? (e._$AQ = Bi));
|
|
3380
3409
|
};
|
|
3381
|
-
class
|
|
3410
|
+
class Ri extends Ai {
|
|
3382
3411
|
constructor() {
|
|
3383
3412
|
super(...arguments), this._$AN = void 0;
|
|
3384
3413
|
}
|
|
@@ -3406,20 +3435,20 @@ class Li extends Ai {
|
|
|
3406
3435
|
* Copyright 2020 Google LLC
|
|
3407
3436
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3408
3437
|
*/
|
|
3409
|
-
const be = () => new
|
|
3410
|
-
class
|
|
3438
|
+
const be = () => new Li();
|
|
3439
|
+
class Li {
|
|
3411
3440
|
}
|
|
3412
|
-
const ft = /* @__PURE__ */ new WeakMap(), ve =
|
|
3441
|
+
const ft = /* @__PURE__ */ new WeakMap(), ve = Di(class extends Ri {
|
|
3413
3442
|
render(e) {
|
|
3414
3443
|
return y;
|
|
3415
3444
|
}
|
|
3416
3445
|
update(e, [t]) {
|
|
3417
3446
|
var r;
|
|
3418
3447
|
const o = t !== this.G;
|
|
3419
|
-
return o && this.
|
|
3448
|
+
return o && this.rt(void 0), (o || this.lt !== this.ct) && (this.G = t, this.ht = (r = e.options) == null ? void 0 : r.host, this.rt(this.ct = e.element)), y;
|
|
3420
3449
|
}
|
|
3421
3450
|
rt(e) {
|
|
3422
|
-
if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
3451
|
+
if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
|
|
3423
3452
|
const t = this.ht ?? globalThis;
|
|
3424
3453
|
let o = ft.get(t);
|
|
3425
3454
|
o === void 0 && (o = /* @__PURE__ */ new WeakMap(), ft.set(t, o)), o.get(this.G) !== void 0 && this.G.call(this.ht, void 0), o.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
|
|
@@ -3435,7 +3464,7 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ei(class extends Li {
|
|
|
3435
3464
|
reconnected() {
|
|
3436
3465
|
this.rt(this.ct);
|
|
3437
3466
|
}
|
|
3438
|
-
}),
|
|
3467
|
+
}), I = b`
|
|
3439
3468
|
:host {
|
|
3440
3469
|
display: block;
|
|
3441
3470
|
}
|
|
@@ -3651,10 +3680,10 @@ const ft = /* @__PURE__ */ new WeakMap(), ve = Ei(class extends Li {
|
|
|
3651
3680
|
box-shadow: var(--pigeon-ring-shadow);
|
|
3652
3681
|
}
|
|
3653
3682
|
`;
|
|
3654
|
-
var
|
|
3683
|
+
var zi = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, Dt = (e, t, o, r) => {
|
|
3655
3684
|
for (var i = r > 1 ? void 0 : r ? Hi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
3656
3685
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
3657
|
-
return r && i &&
|
|
3686
|
+
return r && i && zi(t, o, i), i;
|
|
3658
3687
|
};
|
|
3659
3688
|
let Ne = class extends g {
|
|
3660
3689
|
constructor() {
|
|
@@ -3777,13 +3806,13 @@ Ne.styles = b`
|
|
|
3777
3806
|
height: 16px;
|
|
3778
3807
|
}
|
|
3779
3808
|
`;
|
|
3780
|
-
|
|
3809
|
+
Dt([
|
|
3781
3810
|
p({ type: String })
|
|
3782
3811
|
], Ne.prototype, "label", 2);
|
|
3783
|
-
|
|
3812
|
+
Dt([
|
|
3784
3813
|
p({ type: String })
|
|
3785
3814
|
], Ne.prototype, "value", 2);
|
|
3786
|
-
Ne =
|
|
3815
|
+
Ne = Dt([
|
|
3787
3816
|
u("pigeon-alignment-picker")
|
|
3788
3817
|
], Ne);
|
|
3789
3818
|
var Fi = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, At = (e, t, o, r) => {
|
|
@@ -4116,19 +4145,19 @@ le([
|
|
|
4116
4145
|
L = le([
|
|
4117
4146
|
u("pigeon-slider-input")
|
|
4118
4147
|
], L);
|
|
4119
|
-
var Wi = Object.defineProperty,
|
|
4120
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4148
|
+
var Wi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, we = (e, t, o, r) => {
|
|
4149
|
+
for (var i = r > 1 ? void 0 : r ? qi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4121
4150
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4122
4151
|
return r && i && Wi(t, o, i), i;
|
|
4123
4152
|
};
|
|
4124
|
-
let
|
|
4153
|
+
let X = class extends g {
|
|
4125
4154
|
constructor() {
|
|
4126
4155
|
super(...arguments), this.tags = [], this.open = !1, this.x = 0, this.y = 0, this._search = "";
|
|
4127
4156
|
}
|
|
4128
4157
|
render() {
|
|
4129
4158
|
const e = this._getFilteredTags(), t = this._groupByCategory(e);
|
|
4130
4159
|
return l`
|
|
4131
|
-
<div class="picker" style="position:
|
|
4160
|
+
<div class="picker" style="position: fixed; left: ${this.x}px; top: ${this.y}px;">
|
|
4132
4161
|
<div class="search-box">
|
|
4133
4162
|
<input
|
|
4134
4163
|
type="text"
|
|
@@ -4177,7 +4206,7 @@ let V = class extends g {
|
|
|
4177
4206
|
})), this.open = !1, this._search = "";
|
|
4178
4207
|
}
|
|
4179
4208
|
};
|
|
4180
|
-
|
|
4209
|
+
X.styles = b`
|
|
4181
4210
|
:host {
|
|
4182
4211
|
display: none;
|
|
4183
4212
|
}
|
|
@@ -4270,30 +4299,30 @@ V.styles = b`
|
|
|
4270
4299
|
`;
|
|
4271
4300
|
we([
|
|
4272
4301
|
p({ type: Array })
|
|
4273
|
-
],
|
|
4302
|
+
], X.prototype, "tags", 2);
|
|
4274
4303
|
we([
|
|
4275
4304
|
p({ type: Boolean, reflect: !0 })
|
|
4276
|
-
],
|
|
4305
|
+
], X.prototype, "open", 2);
|
|
4277
4306
|
we([
|
|
4278
4307
|
p({ type: Number })
|
|
4279
|
-
],
|
|
4308
|
+
], X.prototype, "x", 2);
|
|
4280
4309
|
we([
|
|
4281
4310
|
p({ type: Number })
|
|
4282
|
-
],
|
|
4311
|
+
], X.prototype, "y", 2);
|
|
4283
4312
|
we([
|
|
4284
4313
|
d()
|
|
4285
|
-
],
|
|
4286
|
-
|
|
4314
|
+
], X.prototype, "_search", 2);
|
|
4315
|
+
X = we([
|
|
4287
4316
|
u("pigeon-merge-tag-picker")
|
|
4288
|
-
],
|
|
4289
|
-
var
|
|
4290
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4317
|
+
], X);
|
|
4318
|
+
var Vi = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, N = (e, t, o, r) => {
|
|
4319
|
+
for (var i = r > 1 ? void 0 : r ? Yi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4291
4320
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
4292
|
-
return r && i &&
|
|
4321
|
+
return r && i && Vi(t, o, i), i;
|
|
4293
4322
|
};
|
|
4294
|
-
let
|
|
4323
|
+
let S = class extends g {
|
|
4295
4324
|
constructor() {
|
|
4296
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
|
|
4325
|
+
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
|
|
4297
4326
|
}
|
|
4298
4327
|
render() {
|
|
4299
4328
|
if (!this.block) return l``;
|
|
@@ -4304,7 +4333,7 @@ let E = class extends g {
|
|
|
4304
4333
|
<div class="field">
|
|
4305
4334
|
<div class="label-row">
|
|
4306
4335
|
<label>${s("panel.common.contentHtml")}</label>
|
|
4307
|
-
${t ? l`
|
|
4336
|
+
${t || this.requestMergeTags ? l`
|
|
4308
4337
|
<button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
4309
4338
|
${s("panel.common.tagBtn")}
|
|
4310
4339
|
</button>
|
|
@@ -4354,6 +4383,10 @@ let E = class extends g {
|
|
|
4354
4383
|
`;
|
|
4355
4384
|
}
|
|
4356
4385
|
_togglePicker() {
|
|
4386
|
+
if (!this.mergeTags.length) {
|
|
4387
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
4388
|
+
return;
|
|
4389
|
+
}
|
|
4357
4390
|
const e = this._triggerRef.value;
|
|
4358
4391
|
if (e) {
|
|
4359
4392
|
if (!this._pickerOpen) {
|
|
@@ -4409,8 +4442,8 @@ let E = class extends g {
|
|
|
4409
4442
|
this._emit({ padding: e.detail.value });
|
|
4410
4443
|
}
|
|
4411
4444
|
};
|
|
4412
|
-
|
|
4413
|
-
|
|
4445
|
+
S.styles = [
|
|
4446
|
+
I,
|
|
4414
4447
|
b`
|
|
4415
4448
|
/* Content textarea uses the monospace face so the HTML payload is
|
|
4416
4449
|
readable to authors editing the raw markup. */
|
|
@@ -4454,30 +4487,33 @@ E.styles = [
|
|
|
4454
4487
|
}
|
|
4455
4488
|
`
|
|
4456
4489
|
];
|
|
4457
|
-
|
|
4490
|
+
N([
|
|
4458
4491
|
p({ type: Object })
|
|
4459
|
-
],
|
|
4460
|
-
|
|
4492
|
+
], S.prototype, "block", 2);
|
|
4493
|
+
N([
|
|
4461
4494
|
p({ type: String })
|
|
4462
|
-
],
|
|
4463
|
-
|
|
4495
|
+
], S.prototype, "rowId", 2);
|
|
4496
|
+
N([
|
|
4464
4497
|
p({ type: String })
|
|
4465
|
-
],
|
|
4466
|
-
|
|
4498
|
+
], S.prototype, "columnId", 2);
|
|
4499
|
+
N([
|
|
4467
4500
|
p({ type: Array })
|
|
4468
|
-
],
|
|
4469
|
-
|
|
4501
|
+
], S.prototype, "mergeTags", 2);
|
|
4502
|
+
N([
|
|
4503
|
+
p({ attribute: !1 })
|
|
4504
|
+
], S.prototype, "requestMergeTags", 2);
|
|
4505
|
+
N([
|
|
4470
4506
|
d()
|
|
4471
|
-
],
|
|
4472
|
-
|
|
4507
|
+
], S.prototype, "_pickerOpen", 2);
|
|
4508
|
+
N([
|
|
4473
4509
|
d()
|
|
4474
|
-
],
|
|
4475
|
-
|
|
4510
|
+
], S.prototype, "_pickerX", 2);
|
|
4511
|
+
N([
|
|
4476
4512
|
d()
|
|
4477
|
-
],
|
|
4478
|
-
|
|
4513
|
+
], S.prototype, "_pickerY", 2);
|
|
4514
|
+
S = N([
|
|
4479
4515
|
u("pigeon-text-panel")
|
|
4480
|
-
],
|
|
4516
|
+
], S);
|
|
4481
4517
|
var Xi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, w = (e, t, o, r) => {
|
|
4482
4518
|
for (var i = r > 1 ? void 0 : r ? Gi(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
4483
4519
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
@@ -4487,10 +4523,10 @@ let mt = null;
|
|
|
4487
4523
|
function Ji() {
|
|
4488
4524
|
return mt || (mt = import("./pigeon-stock-tab.js")), mt;
|
|
4489
4525
|
}
|
|
4490
|
-
const Zi = 250,
|
|
4526
|
+
const Zi = 250, Ye = "__all__";
|
|
4491
4527
|
let x = class extends g {
|
|
4492
4528
|
constructor() {
|
|
4493
|
-
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 =
|
|
4529
|
+
super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._stockTabLoaded = !1, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder = Ye, this._search = "", this._selectedTags = [], this._folders = [], this._assets = [], this._libraryLoading = !1, this._libraryError = "", this._searchTimer = null, this._libraryToken = 0, this._handleStockTabClick = async () => {
|
|
4494
4530
|
this._tab = "stock", this._stockTabLoaded || (await Ji(), this._stockTabLoaded = !0);
|
|
4495
4531
|
};
|
|
4496
4532
|
}
|
|
@@ -4569,7 +4605,7 @@ let x = class extends g {
|
|
|
4569
4605
|
.value=${this._folder}
|
|
4570
4606
|
@change=${this._onFolderChange}
|
|
4571
4607
|
>
|
|
4572
|
-
<option value=${
|
|
4608
|
+
<option value=${Ye}>${s("asset.folder.all")}</option>
|
|
4573
4609
|
${this._folders.map(
|
|
4574
4610
|
(e) => l`<option value=${e} ?selected=${this._folder === e}>${e}</option>`
|
|
4575
4611
|
)}
|
|
@@ -4593,7 +4629,7 @@ let x = class extends g {
|
|
|
4593
4629
|
</div>` : te}
|
|
4594
4630
|
${this._libraryError ? l`<div class="error">${this._libraryError}</div>` : te}
|
|
4595
4631
|
${this._libraryLoading ? l`<div class="library-spinner">${s("asset.loading")}</div>` : this._assets.length === 0 ? l`<div class="empty-library">
|
|
4596
|
-
${this._search || this._selectedTags.length > 0 || this._folder !==
|
|
4632
|
+
${this._search || this._selectedTags.length > 0 || this._folder !== Ye ? s("asset.empty.filtered") : s("asset.empty.no-assets")}
|
|
4597
4633
|
</div>` : l`<div class="asset-grid">
|
|
4598
4634
|
${this._assets.map((e) => this._renderAssetCard(e))}
|
|
4599
4635
|
</div>`}
|
|
@@ -4671,7 +4707,7 @@ let x = class extends g {
|
|
|
4671
4707
|
this._libraryLoading = !0, this._libraryError = "";
|
|
4672
4708
|
try {
|
|
4673
4709
|
const t = await this.storage.list({
|
|
4674
|
-
folder: this._folder ===
|
|
4710
|
+
folder: this._folder === Ye ? void 0 : this._folder,
|
|
4675
4711
|
search: this._search.trim() || void 0,
|
|
4676
4712
|
tags: this._selectedTags.length > 0 ? this._selectedTags : void 0
|
|
4677
4713
|
});
|
|
@@ -5340,7 +5376,7 @@ let z = class extends g {
|
|
|
5340
5376
|
}
|
|
5341
5377
|
};
|
|
5342
5378
|
z.styles = [
|
|
5343
|
-
|
|
5379
|
+
I,
|
|
5344
5380
|
b`
|
|
5345
5381
|
.upload-btn {
|
|
5346
5382
|
margin-top: 6px;
|
|
@@ -5530,7 +5566,7 @@ var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, ke = (e, t
|
|
|
5530
5566
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5531
5567
|
return r && i && ir(t, o, i), i;
|
|
5532
5568
|
};
|
|
5533
|
-
let
|
|
5569
|
+
let G = class extends g {
|
|
5534
5570
|
constructor() {
|
|
5535
5571
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this.linkTypes = [];
|
|
5536
5572
|
}
|
|
@@ -5692,25 +5728,25 @@ let Y = class extends g {
|
|
|
5692
5728
|
this._emit({ innerPadding: e.detail.value });
|
|
5693
5729
|
}
|
|
5694
5730
|
};
|
|
5695
|
-
|
|
5731
|
+
G.styles = I;
|
|
5696
5732
|
ke([
|
|
5697
5733
|
p({ type: Object })
|
|
5698
|
-
],
|
|
5734
|
+
], G.prototype, "block", 2);
|
|
5699
5735
|
ke([
|
|
5700
5736
|
p({ type: String })
|
|
5701
|
-
],
|
|
5737
|
+
], G.prototype, "rowId", 2);
|
|
5702
5738
|
ke([
|
|
5703
5739
|
p({ type: String })
|
|
5704
|
-
],
|
|
5740
|
+
], G.prototype, "columnId", 2);
|
|
5705
5741
|
ke([
|
|
5706
5742
|
p({ attribute: !1 })
|
|
5707
|
-
],
|
|
5743
|
+
], G.prototype, "swatches", 2);
|
|
5708
5744
|
ke([
|
|
5709
5745
|
p({ attribute: !1 })
|
|
5710
|
-
],
|
|
5711
|
-
|
|
5746
|
+
], G.prototype, "linkTypes", 2);
|
|
5747
|
+
G = ke([
|
|
5712
5748
|
u("pigeon-button-panel")
|
|
5713
|
-
],
|
|
5749
|
+
], G);
|
|
5714
5750
|
var nr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, lo = (e, t, o, r) => {
|
|
5715
5751
|
for (var i = r > 1 ? void 0 : r ? ar(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5716
5752
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
@@ -5836,7 +5872,7 @@ let et = class extends g {
|
|
|
5836
5872
|
}
|
|
5837
5873
|
};
|
|
5838
5874
|
et.styles = [
|
|
5839
|
-
|
|
5875
|
+
I,
|
|
5840
5876
|
b`
|
|
5841
5877
|
.hint {
|
|
5842
5878
|
margin: 4px 0 0;
|
|
@@ -5992,14 +6028,14 @@ st([
|
|
|
5992
6028
|
me = st([
|
|
5993
6029
|
u("pigeon-font-picker")
|
|
5994
6030
|
], me);
|
|
5995
|
-
var pr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor,
|
|
6031
|
+
var pr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, U = (e, t, o, r) => {
|
|
5996
6032
|
for (var i = r > 1 ? void 0 : r ? cr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
5997
6033
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
5998
6034
|
return r && i && pr(t, o, i), i;
|
|
5999
6035
|
};
|
|
6000
|
-
let
|
|
6036
|
+
let O = class extends g {
|
|
6001
6037
|
constructor() {
|
|
6002
|
-
super(...arguments), this.mergeTags = [], this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = be(), this._triggerRef = be();
|
|
6038
|
+
super(...arguments), this.mergeTags = [], this.requestMergeTags = !1, this.swatches = [], this.brandFonts = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = be(), this._triggerRef = be();
|
|
6003
6039
|
}
|
|
6004
6040
|
render() {
|
|
6005
6041
|
if (!this.doc) return l``;
|
|
@@ -6056,7 +6092,7 @@ let A = class extends g {
|
|
|
6056
6092
|
<div class="field">
|
|
6057
6093
|
<div class="label-row">
|
|
6058
6094
|
<label>${s("panel.body.previewText")}</label>
|
|
6059
|
-
${this.mergeTags.length > 0 ? l`
|
|
6095
|
+
${this.mergeTags.length > 0 || this.requestMergeTags ? l`
|
|
6060
6096
|
<button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
6061
6097
|
${s("panel.common.tagBtn")}
|
|
6062
6098
|
</button>
|
|
@@ -6083,6 +6119,10 @@ let A = class extends g {
|
|
|
6083
6119
|
`;
|
|
6084
6120
|
}
|
|
6085
6121
|
_togglePicker() {
|
|
6122
|
+
if (!this.mergeTags.length) {
|
|
6123
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
6124
|
+
return;
|
|
6125
|
+
}
|
|
6086
6126
|
const e = this._triggerRef.value;
|
|
6087
6127
|
if (e) {
|
|
6088
6128
|
if (!this._pickerOpen) {
|
|
@@ -6126,8 +6166,8 @@ let A = class extends g {
|
|
|
6126
6166
|
this._emit({ metaField: "previewText", value: e.target.value });
|
|
6127
6167
|
}
|
|
6128
6168
|
};
|
|
6129
|
-
|
|
6130
|
-
|
|
6169
|
+
O.styles = [
|
|
6170
|
+
I,
|
|
6131
6171
|
b`
|
|
6132
6172
|
.alignment-buttons {
|
|
6133
6173
|
display: flex;
|
|
@@ -6200,36 +6240,39 @@ A.styles = [
|
|
|
6200
6240
|
}
|
|
6201
6241
|
`
|
|
6202
6242
|
];
|
|
6203
|
-
|
|
6243
|
+
U([
|
|
6204
6244
|
p({ type: Object })
|
|
6205
|
-
],
|
|
6206
|
-
|
|
6245
|
+
], O.prototype, "doc", 2);
|
|
6246
|
+
U([
|
|
6207
6247
|
p({ type: Array })
|
|
6208
|
-
],
|
|
6209
|
-
|
|
6248
|
+
], O.prototype, "mergeTags", 2);
|
|
6249
|
+
U([
|
|
6210
6250
|
p({ attribute: !1 })
|
|
6211
|
-
],
|
|
6212
|
-
|
|
6251
|
+
], O.prototype, "requestMergeTags", 2);
|
|
6252
|
+
U([
|
|
6213
6253
|
p({ attribute: !1 })
|
|
6214
|
-
],
|
|
6215
|
-
|
|
6254
|
+
], O.prototype, "swatches", 2);
|
|
6255
|
+
U([
|
|
6256
|
+
p({ attribute: !1 })
|
|
6257
|
+
], O.prototype, "brandFonts", 2);
|
|
6258
|
+
U([
|
|
6216
6259
|
d()
|
|
6217
|
-
],
|
|
6218
|
-
|
|
6260
|
+
], O.prototype, "_pickerOpen", 2);
|
|
6261
|
+
U([
|
|
6219
6262
|
d()
|
|
6220
|
-
],
|
|
6221
|
-
|
|
6263
|
+
], O.prototype, "_pickerX", 2);
|
|
6264
|
+
U([
|
|
6222
6265
|
d()
|
|
6223
|
-
],
|
|
6224
|
-
|
|
6266
|
+
], O.prototype, "_pickerY", 2);
|
|
6267
|
+
O = U([
|
|
6225
6268
|
u("pigeon-body-panel")
|
|
6226
|
-
],
|
|
6227
|
-
var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor,
|
|
6269
|
+
], O);
|
|
6270
|
+
var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, ee = (e, t, o, r) => {
|
|
6228
6271
|
for (var i = r > 1 ? void 0 : r ? hr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6229
6272
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
6230
6273
|
return r && i && dr(t, o, i), i;
|
|
6231
6274
|
};
|
|
6232
|
-
let
|
|
6275
|
+
let j = class extends g {
|
|
6233
6276
|
constructor() {
|
|
6234
6277
|
super(...arguments), this.rowId = "", this.columnId = "", this.swatches = [], this._assetManagerOpen = !1;
|
|
6235
6278
|
}
|
|
@@ -6382,31 +6425,31 @@ let B = class extends g {
|
|
|
6382
6425
|
this._emit({ backgroundUrl: e.detail.url }), this._assetManagerOpen = !1;
|
|
6383
6426
|
}
|
|
6384
6427
|
};
|
|
6385
|
-
|
|
6386
|
-
|
|
6428
|
+
j.styles = [I];
|
|
6429
|
+
ee([
|
|
6387
6430
|
p({ type: Object })
|
|
6388
|
-
],
|
|
6389
|
-
|
|
6431
|
+
], j.prototype, "block", 2);
|
|
6432
|
+
ee([
|
|
6390
6433
|
p({ type: String })
|
|
6391
|
-
],
|
|
6392
|
-
|
|
6434
|
+
], j.prototype, "rowId", 2);
|
|
6435
|
+
ee([
|
|
6393
6436
|
p({ type: String })
|
|
6394
|
-
],
|
|
6395
|
-
|
|
6437
|
+
], j.prototype, "columnId", 2);
|
|
6438
|
+
ee([
|
|
6396
6439
|
p({ type: Object })
|
|
6397
|
-
],
|
|
6398
|
-
|
|
6440
|
+
], j.prototype, "assetManagerConfig", 2);
|
|
6441
|
+
ee([
|
|
6399
6442
|
p({ attribute: !1 })
|
|
6400
|
-
],
|
|
6401
|
-
|
|
6443
|
+
], j.prototype, "assetStorage", 2);
|
|
6444
|
+
ee([
|
|
6402
6445
|
p({ attribute: !1 })
|
|
6403
|
-
],
|
|
6404
|
-
|
|
6446
|
+
], j.prototype, "swatches", 2);
|
|
6447
|
+
ee([
|
|
6405
6448
|
d()
|
|
6406
|
-
],
|
|
6407
|
-
|
|
6449
|
+
], j.prototype, "_assetManagerOpen", 2);
|
|
6450
|
+
j = ee([
|
|
6408
6451
|
u("pigeon-hero-panel")
|
|
6409
|
-
],
|
|
6452
|
+
], j);
|
|
6410
6453
|
var gr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, Ke = (e, t, o, r) => {
|
|
6411
6454
|
for (var i = r > 1 ? void 0 : r ? ur(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
6412
6455
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
@@ -6550,7 +6593,7 @@ let ae = class extends g {
|
|
|
6550
6593
|
}
|
|
6551
6594
|
};
|
|
6552
6595
|
ae.styles = [
|
|
6553
|
-
|
|
6596
|
+
I,
|
|
6554
6597
|
b`
|
|
6555
6598
|
h4 {
|
|
6556
6599
|
margin: 0 0 8px;
|
|
@@ -6710,7 +6753,7 @@ let se = class extends g {
|
|
|
6710
6753
|
this._emit({ padding: e.detail.value });
|
|
6711
6754
|
}
|
|
6712
6755
|
};
|
|
6713
|
-
se.styles =
|
|
6756
|
+
se.styles = I;
|
|
6714
6757
|
We([
|
|
6715
6758
|
p({ type: Object })
|
|
6716
6759
|
], se.prototype, "block", 2);
|
|
@@ -6768,7 +6811,7 @@ let _e = class extends g {
|
|
|
6768
6811
|
this._emit({ height: e.detail.value });
|
|
6769
6812
|
}
|
|
6770
6813
|
};
|
|
6771
|
-
_e.styles =
|
|
6814
|
+
_e.styles = I;
|
|
6772
6815
|
lt([
|
|
6773
6816
|
p({ type: Object })
|
|
6774
6817
|
], _e.prototype, "block", 2);
|
|
@@ -6940,7 +6983,7 @@ let ye = class extends g {
|
|
|
6940
6983
|
}
|
|
6941
6984
|
};
|
|
6942
6985
|
ye.styles = [
|
|
6943
|
-
|
|
6986
|
+
I,
|
|
6944
6987
|
b`
|
|
6945
6988
|
h4 {
|
|
6946
6989
|
margin: 0 0 8px;
|
|
@@ -7011,14 +7054,14 @@ pt([
|
|
|
7011
7054
|
ye = pt([
|
|
7012
7055
|
u("pigeon-social-panel")
|
|
7013
7056
|
], ye);
|
|
7014
|
-
var $r = Object.defineProperty, wr = Object.getOwnPropertyDescriptor,
|
|
7057
|
+
var $r = Object.defineProperty, wr = Object.getOwnPropertyDescriptor, K = (e, t, o, r) => {
|
|
7015
7058
|
for (var i = r > 1 ? void 0 : r ? wr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7016
7059
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7017
7060
|
return r && i && $r(t, o, i), i;
|
|
7018
7061
|
};
|
|
7019
|
-
let
|
|
7062
|
+
let E = class extends g {
|
|
7020
7063
|
constructor() {
|
|
7021
|
-
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
|
|
7064
|
+
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this.requestMergeTags = !1, this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = be(), this._triggerRef = be();
|
|
7022
7065
|
}
|
|
7023
7066
|
render() {
|
|
7024
7067
|
if (!this.block) return l``;
|
|
@@ -7029,7 +7072,7 @@ let j = class extends g {
|
|
|
7029
7072
|
<div class="field">
|
|
7030
7073
|
<div class="label-row">
|
|
7031
7074
|
<label>${s("panel.html.rawHtml")}</label>
|
|
7032
|
-
${t ? l`
|
|
7075
|
+
${t || this.requestMergeTags ? l`
|
|
7033
7076
|
<button class="tag-btn" ${ve(this._triggerRef)} @click=${this._togglePicker} title=${s("panel.common.insertMergeTag")}>
|
|
7034
7077
|
${s("panel.common.tagBtn")}
|
|
7035
7078
|
</button>
|
|
@@ -7078,6 +7121,10 @@ let j = class extends g {
|
|
|
7078
7121
|
this._emit({ padding: e.detail.value });
|
|
7079
7122
|
}
|
|
7080
7123
|
_togglePicker() {
|
|
7124
|
+
if (!this.mergeTags.length) {
|
|
7125
|
+
this.dispatchEvent(new CustomEvent("pigeon:merge-tag-request", { bubbles: !0, composed: !0 }));
|
|
7126
|
+
return;
|
|
7127
|
+
}
|
|
7081
7128
|
const e = this._triggerRef.value;
|
|
7082
7129
|
if (e) {
|
|
7083
7130
|
if (!this._pickerOpen) {
|
|
@@ -7096,8 +7143,8 @@ let j = class extends g {
|
|
|
7096
7143
|
t.setSelectionRange(h, h), t.focus(), this._emit({ content: a }), this._pickerOpen = !1;
|
|
7097
7144
|
}
|
|
7098
7145
|
};
|
|
7099
|
-
|
|
7100
|
-
|
|
7146
|
+
E.styles = [
|
|
7147
|
+
I,
|
|
7101
7148
|
b`
|
|
7102
7149
|
/* HTML payload is raw markup — show in monospace and taller than the
|
|
7103
7150
|
default textarea so authors have room to work. */
|
|
@@ -7141,36 +7188,39 @@ j.styles = [
|
|
|
7141
7188
|
}
|
|
7142
7189
|
`
|
|
7143
7190
|
];
|
|
7144
|
-
|
|
7191
|
+
K([
|
|
7145
7192
|
p({ type: Object })
|
|
7146
|
-
],
|
|
7147
|
-
|
|
7193
|
+
], E.prototype, "block", 2);
|
|
7194
|
+
K([
|
|
7148
7195
|
p({ type: String })
|
|
7149
|
-
],
|
|
7150
|
-
|
|
7196
|
+
], E.prototype, "rowId", 2);
|
|
7197
|
+
K([
|
|
7151
7198
|
p({ type: String })
|
|
7152
|
-
],
|
|
7153
|
-
|
|
7199
|
+
], E.prototype, "columnId", 2);
|
|
7200
|
+
K([
|
|
7154
7201
|
p({ type: Array })
|
|
7155
|
-
],
|
|
7156
|
-
|
|
7202
|
+
], E.prototype, "mergeTags", 2);
|
|
7203
|
+
K([
|
|
7204
|
+
p({ attribute: !1 })
|
|
7205
|
+
], E.prototype, "requestMergeTags", 2);
|
|
7206
|
+
K([
|
|
7157
7207
|
d()
|
|
7158
|
-
],
|
|
7159
|
-
|
|
7208
|
+
], E.prototype, "_pickerOpen", 2);
|
|
7209
|
+
K([
|
|
7160
7210
|
d()
|
|
7161
|
-
],
|
|
7162
|
-
|
|
7211
|
+
], E.prototype, "_pickerX", 2);
|
|
7212
|
+
K([
|
|
7163
7213
|
d()
|
|
7164
|
-
],
|
|
7165
|
-
|
|
7214
|
+
], E.prototype, "_pickerY", 2);
|
|
7215
|
+
E = K([
|
|
7166
7216
|
u("pigeon-html-panel")
|
|
7167
|
-
],
|
|
7217
|
+
], E);
|
|
7168
7218
|
var kr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Ce = (e, t, o, r) => {
|
|
7169
7219
|
for (var i = r > 1 ? void 0 : r ? Cr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7170
7220
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7171
7221
|
return r && i && kr(t, o, i), i;
|
|
7172
7222
|
};
|
|
7173
|
-
let
|
|
7223
|
+
let J = class extends g {
|
|
7174
7224
|
constructor() {
|
|
7175
7225
|
super(...arguments), this.rowId = "", this.columnId = "", this.label = "Block", this.schema = [];
|
|
7176
7226
|
}
|
|
@@ -7280,33 +7330,33 @@ let q = class extends g {
|
|
|
7280
7330
|
);
|
|
7281
7331
|
}
|
|
7282
7332
|
};
|
|
7283
|
-
|
|
7333
|
+
J.styles = I;
|
|
7284
7334
|
Ce([
|
|
7285
7335
|
p({ type: Object })
|
|
7286
|
-
],
|
|
7336
|
+
], J.prototype, "block", 2);
|
|
7287
7337
|
Ce([
|
|
7288
7338
|
p({ type: String })
|
|
7289
|
-
],
|
|
7339
|
+
], J.prototype, "rowId", 2);
|
|
7290
7340
|
Ce([
|
|
7291
7341
|
p({ type: String })
|
|
7292
|
-
],
|
|
7342
|
+
], J.prototype, "columnId", 2);
|
|
7293
7343
|
Ce([
|
|
7294
7344
|
p({ type: String })
|
|
7295
|
-
],
|
|
7345
|
+
], J.prototype, "label", 2);
|
|
7296
7346
|
Ce([
|
|
7297
7347
|
p({ type: Array })
|
|
7298
|
-
],
|
|
7299
|
-
|
|
7348
|
+
], J.prototype, "schema", 2);
|
|
7349
|
+
J = Ce([
|
|
7300
7350
|
u("pigeon-custom-panel")
|
|
7301
|
-
],
|
|
7302
|
-
var Ir = Object.defineProperty,
|
|
7303
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7351
|
+
], J);
|
|
7352
|
+
var Ir = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, M = (e, t, o, r) => {
|
|
7353
|
+
for (var i = r > 1 ? void 0 : r ? Tr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7304
7354
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7305
7355
|
return r && i && Ir(t, o, i), i;
|
|
7306
7356
|
};
|
|
7307
|
-
let
|
|
7357
|
+
let C = class extends g {
|
|
7308
7358
|
constructor() {
|
|
7309
|
-
super(...arguments), this.selection = null, this.mergeTags = [], this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
|
|
7359
|
+
super(...arguments), this.selection = null, this.mergeTags = [], this.requestMergeTags = !1, this.brandKit = null, this.fontConfig = [], this.linkTypes = [];
|
|
7310
7360
|
}
|
|
7311
7361
|
get _swatches() {
|
|
7312
7362
|
var e;
|
|
@@ -7325,6 +7375,7 @@ let T = class extends g {
|
|
|
7325
7375
|
<pigeon-body-panel
|
|
7326
7376
|
.doc=${this.doc}
|
|
7327
7377
|
.mergeTags=${this.mergeTags}
|
|
7378
|
+
.requestMergeTags=${this.requestMergeTags}
|
|
7328
7379
|
.swatches=${this._swatches}
|
|
7329
7380
|
.brandFonts=${this._brandFonts}
|
|
7330
7381
|
></pigeon-body-panel>
|
|
@@ -7415,7 +7466,7 @@ let T = class extends g {
|
|
|
7415
7466
|
_renderBlockPanel(e, t, o) {
|
|
7416
7467
|
switch (e.type) {
|
|
7417
7468
|
case "text":
|
|
7418
|
-
return l`<pigeon-text-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags}></pigeon-text-panel>`;
|
|
7469
|
+
return l`<pigeon-text-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-text-panel>`;
|
|
7419
7470
|
case "image":
|
|
7420
7471
|
return l`<pigeon-image-panel
|
|
7421
7472
|
.block=${e}
|
|
@@ -7444,7 +7495,7 @@ let T = class extends g {
|
|
|
7444
7495
|
case "social":
|
|
7445
7496
|
return l`<pigeon-social-panel .block=${e} .rowId=${t} .columnId=${o}></pigeon-social-panel>`;
|
|
7446
7497
|
case "html":
|
|
7447
|
-
return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags}></pigeon-html-panel>`;
|
|
7498
|
+
return l`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags} .requestMergeTags=${this.requestMergeTags}></pigeon-html-panel>`;
|
|
7448
7499
|
default: {
|
|
7449
7500
|
const r = e.type ?? "unknown", i = yt(r);
|
|
7450
7501
|
return i != null && i.propertySchema && i.propertySchema.length > 0 ? l`<pigeon-custom-panel
|
|
@@ -7475,7 +7526,7 @@ let T = class extends g {
|
|
|
7475
7526
|
return i.blocks.find((n) => n.id === o);
|
|
7476
7527
|
}
|
|
7477
7528
|
};
|
|
7478
|
-
|
|
7529
|
+
C.styles = b`
|
|
7479
7530
|
:host {
|
|
7480
7531
|
display: block;
|
|
7481
7532
|
width: var(--pigeon-properties-width, 300px);
|
|
@@ -7558,37 +7609,40 @@ T.styles = b`
|
|
|
7558
7609
|
line-height: 1.5;
|
|
7559
7610
|
}
|
|
7560
7611
|
`;
|
|
7561
|
-
|
|
7612
|
+
M([
|
|
7562
7613
|
p({ type: Object })
|
|
7563
|
-
],
|
|
7564
|
-
|
|
7614
|
+
], C.prototype, "doc", 2);
|
|
7615
|
+
M([
|
|
7565
7616
|
p({ type: Object })
|
|
7566
|
-
],
|
|
7567
|
-
|
|
7617
|
+
], C.prototype, "selection", 2);
|
|
7618
|
+
M([
|
|
7568
7619
|
p({ type: Array })
|
|
7569
|
-
],
|
|
7570
|
-
|
|
7620
|
+
], C.prototype, "mergeTags", 2);
|
|
7621
|
+
M([
|
|
7571
7622
|
p({ attribute: !1 })
|
|
7572
|
-
],
|
|
7573
|
-
|
|
7623
|
+
], C.prototype, "requestMergeTags", 2);
|
|
7624
|
+
M([
|
|
7574
7625
|
p({ attribute: !1 })
|
|
7575
|
-
],
|
|
7576
|
-
|
|
7626
|
+
], C.prototype, "assetManagerConfig", 2);
|
|
7627
|
+
M([
|
|
7577
7628
|
p({ attribute: !1 })
|
|
7578
|
-
],
|
|
7579
|
-
|
|
7629
|
+
], C.prototype, "assetStorage", 2);
|
|
7630
|
+
M([
|
|
7580
7631
|
p({ attribute: !1 })
|
|
7581
|
-
],
|
|
7582
|
-
|
|
7632
|
+
], C.prototype, "brandKit", 2);
|
|
7633
|
+
M([
|
|
7583
7634
|
p({ attribute: !1 })
|
|
7584
|
-
],
|
|
7585
|
-
|
|
7635
|
+
], C.prototype, "fontConfig", 2);
|
|
7636
|
+
M([
|
|
7637
|
+
p({ attribute: !1 })
|
|
7638
|
+
], C.prototype, "linkTypes", 2);
|
|
7639
|
+
C = M([
|
|
7586
7640
|
u("pigeon-properties")
|
|
7587
|
-
],
|
|
7588
|
-
var
|
|
7641
|
+
], C);
|
|
7642
|
+
var Pr = Object.defineProperty, Sr = Object.getOwnPropertyDescriptor, D = (e, t, o, r) => {
|
|
7589
7643
|
for (var i = r > 1 ? void 0 : r ? Sr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7590
7644
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7591
|
-
return r && i &&
|
|
7645
|
+
return r && i && Pr(t, o, i), i;
|
|
7592
7646
|
};
|
|
7593
7647
|
let k = class extends g {
|
|
7594
7648
|
constructor() {
|
|
@@ -7677,6 +7731,7 @@ let k = class extends g {
|
|
|
7677
7731
|
return l`
|
|
7678
7732
|
<iframe
|
|
7679
7733
|
style="width: ${this._device === "mobile" ? "375px" : "100%"}; height: 100%;"
|
|
7734
|
+
sandbox="allow-popups allow-popups-to-escape-sandbox"
|
|
7680
7735
|
srcdoc=${this._htmlContent}
|
|
7681
7736
|
></iframe>
|
|
7682
7737
|
`;
|
|
@@ -7884,46 +7939,46 @@ k.styles = b`
|
|
|
7884
7939
|
font-size: 14px;
|
|
7885
7940
|
}
|
|
7886
7941
|
`;
|
|
7887
|
-
|
|
7942
|
+
D([
|
|
7888
7943
|
p({ type: Object })
|
|
7889
7944
|
], k.prototype, "renderer", 2);
|
|
7890
|
-
|
|
7945
|
+
D([
|
|
7891
7946
|
p({ type: Object })
|
|
7892
7947
|
], k.prototype, "doc", 2);
|
|
7893
|
-
|
|
7948
|
+
D([
|
|
7894
7949
|
p({ attribute: !1 })
|
|
7895
7950
|
], k.prototype, "documentToMjml", 2);
|
|
7896
|
-
|
|
7951
|
+
D([
|
|
7897
7952
|
p({ attribute: !1 })
|
|
7898
7953
|
], k.prototype, "fonts", 2);
|
|
7899
|
-
|
|
7954
|
+
D([
|
|
7900
7955
|
p({ type: Boolean, reflect: !0 })
|
|
7901
7956
|
], k.prototype, "open", 2);
|
|
7902
|
-
|
|
7957
|
+
D([
|
|
7903
7958
|
d()
|
|
7904
7959
|
], k.prototype, "_viewMode", 2);
|
|
7905
|
-
|
|
7960
|
+
D([
|
|
7906
7961
|
d()
|
|
7907
7962
|
], k.prototype, "_device", 2);
|
|
7908
|
-
|
|
7963
|
+
D([
|
|
7909
7964
|
d()
|
|
7910
7965
|
], k.prototype, "_htmlContent", 2);
|
|
7911
|
-
|
|
7966
|
+
D([
|
|
7912
7967
|
d()
|
|
7913
7968
|
], k.prototype, "_mjmlContent", 2);
|
|
7914
|
-
|
|
7969
|
+
D([
|
|
7915
7970
|
d()
|
|
7916
7971
|
], k.prototype, "_loading", 2);
|
|
7917
|
-
k =
|
|
7972
|
+
k = D([
|
|
7918
7973
|
u("pigeon-preview")
|
|
7919
7974
|
], k);
|
|
7920
|
-
var Or = Object.defineProperty,
|
|
7921
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7975
|
+
var Or = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, $ = (e, t, o, r) => {
|
|
7976
|
+
for (var i = r > 1 ? void 0 : r ? Er(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
7922
7977
|
(a = e[n]) && (i = (r ? a(t, o, i) : a(i)) || i);
|
|
7923
7978
|
return r && i && Or(t, o, i), i;
|
|
7924
7979
|
};
|
|
7925
7980
|
let _t = null;
|
|
7926
|
-
function
|
|
7981
|
+
function Dr() {
|
|
7927
7982
|
return _t || (_t = import("./templates.js").then((e) => e.p)), _t;
|
|
7928
7983
|
}
|
|
7929
7984
|
function Qt(e) {
|
|
@@ -7959,7 +8014,7 @@ let _ = class extends g {
|
|
|
7959
8014
|
e.stopPropagation(), this._applyBodyAttribute("fontFamily", e.detail.family);
|
|
7960
8015
|
}, this._handleBrandLogoInsert = (e) => {
|
|
7961
8016
|
e.stopPropagation();
|
|
7962
|
-
const { logo: t } = e.detail, o =
|
|
8017
|
+
const { logo: t } = e.detail, o = Ve("image");
|
|
7963
8018
|
o.values.src = t.src, o.values.alt = t.name, t.width && (o.values.width = t.width);
|
|
7964
8019
|
const r = this._state.selection;
|
|
7965
8020
|
if (r != null && r.rowId && (r != null && r.columnId)) {
|
|
@@ -7972,7 +8027,7 @@ let _ = class extends g {
|
|
|
7972
8027
|
ce(n.id, a.id, o, a.blocks.length)(this._state, this._dispatch);
|
|
7973
8028
|
} else {
|
|
7974
8029
|
const n = Ie([o]);
|
|
7975
|
-
oe(
|
|
8030
|
+
oe(Te([n]), 0)(this._state, this._dispatch);
|
|
7976
8031
|
}
|
|
7977
8032
|
}, this._dispatch = (e) => {
|
|
7978
8033
|
this._state = this._state.apply(e), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange(), this._fireSelect();
|
|
@@ -8007,7 +8062,7 @@ let _ = class extends g {
|
|
|
8007
8062
|
this._emitRowLibraryError(t, "delete");
|
|
8008
8063
|
}
|
|
8009
8064
|
}, this._handleKeyDown = (e) => {
|
|
8010
|
-
if (!this._state || this._isInTextInput(e) || this._editingBlockId !== null) return;
|
|
8065
|
+
if (!this._state || !this._isForEditor(e) || this._isInTextInput(e) || this._editingBlockId !== null) return;
|
|
8011
8066
|
const t = e.metaKey || e.ctrlKey, o = this._state.selection;
|
|
8012
8067
|
if (t && !e.shiftKey && e.key.toLowerCase() === "z") {
|
|
8013
8068
|
e.preventDefault(), this.undo();
|
|
@@ -8019,16 +8074,16 @@ let _ = class extends g {
|
|
|
8019
8074
|
}
|
|
8020
8075
|
if (e.key === "Escape") {
|
|
8021
8076
|
const r = this._state.createTransaction();
|
|
8022
|
-
r.setSelection(
|
|
8077
|
+
r.setSelection(Mt()), this._dispatch(r);
|
|
8023
8078
|
return;
|
|
8024
8079
|
}
|
|
8025
8080
|
if (o) {
|
|
8026
8081
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
8027
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), ho(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(),
|
|
8082
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), ho(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), Rt(o.rowId)(this._state, this._dispatch));
|
|
8028
8083
|
return;
|
|
8029
8084
|
}
|
|
8030
8085
|
if (t && e.key.toLowerCase() === "d") {
|
|
8031
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), go(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(),
|
|
8086
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), go(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), Lt(o.rowId)(this._state, this._dispatch));
|
|
8032
8087
|
return;
|
|
8033
8088
|
}
|
|
8034
8089
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -8048,13 +8103,13 @@ let _ = class extends g {
|
|
|
8048
8103
|
if (o.type === "block" && o.rowId && o.columnId && o.blockId) {
|
|
8049
8104
|
e.preventDefault();
|
|
8050
8105
|
const r = structuredClone(this._clipboard);
|
|
8051
|
-
r.id =
|
|
8106
|
+
r.id = zt();
|
|
8052
8107
|
const i = this._findBlockIndex(o.rowId, o.columnId, o.blockId), n = i >= 0 ? i + 1 : void 0;
|
|
8053
8108
|
ce(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
|
|
8054
8109
|
} else if (o.type === "column" && o.rowId && o.columnId) {
|
|
8055
8110
|
e.preventDefault();
|
|
8056
8111
|
const r = structuredClone(this._clipboard);
|
|
8057
|
-
r.id =
|
|
8112
|
+
r.id = zt(), ce(o.rowId, o.columnId, r)(this._state, this._dispatch);
|
|
8058
8113
|
}
|
|
8059
8114
|
return;
|
|
8060
8115
|
}
|
|
@@ -8065,7 +8120,7 @@ let _ = class extends g {
|
|
|
8065
8120
|
/* Lifecycle */
|
|
8066
8121
|
/* ------------------------------------------------------------------ */
|
|
8067
8122
|
connectedCallback() {
|
|
8068
|
-
super.connectedCallback(), Bt(this.config.locale, this.config.messages), 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);
|
|
8123
|
+
super.connectedCallback(), Bt(this.config.locale, this.config.messages), this._state || this._initState(), this._applyDir(), this._resolveBrandKit(), this._applyTheme(), document.addEventListener("keydown", this._handleKeyDown), this.addEventListener("brand-kit-edit", this._handleBrandKitEdit), this.addEventListener("brand-color-apply", this._handleBrandColorApply), this.addEventListener("brand-font-apply", this._handleBrandFontApply), this.addEventListener("brand-logo-insert", this._handleBrandLogoInsert);
|
|
8069
8124
|
}
|
|
8070
8125
|
disconnectedCallback() {
|
|
8071
8126
|
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);
|
|
@@ -8140,7 +8195,7 @@ let _ = class extends g {
|
|
|
8140
8195
|
/* Render */
|
|
8141
8196
|
/* ------------------------------------------------------------------ */
|
|
8142
8197
|
render() {
|
|
8143
|
-
var r;
|
|
8198
|
+
var r, i;
|
|
8144
8199
|
if (!this._state) return l``;
|
|
8145
8200
|
const e = this._state.doc, t = this._state.selection, o = this._device === "mobile" ? 375 : this._device === "tablet" ? 768 : 0;
|
|
8146
8201
|
return l`
|
|
@@ -8156,6 +8211,7 @@ let _ = class extends g {
|
|
|
8156
8211
|
@toolbar-device=${this._handleDevice}
|
|
8157
8212
|
@toolbar-fullscreen=${this._handleFullscreen}
|
|
8158
8213
|
@toolbar-templates=${this._handleTemplatesOpen}
|
|
8214
|
+
@toolbar-export=${this._handleExport}
|
|
8159
8215
|
@pigeon:preview=${this._handlePreview}
|
|
8160
8216
|
@pigeon:export-html=${this._handleExportHtml}
|
|
8161
8217
|
@pigeon:export-mjml=${this._handleExportMjml}
|
|
@@ -8212,6 +8268,7 @@ let _ = class extends g {
|
|
|
8212
8268
|
.doc=${e}
|
|
8213
8269
|
.selection=${t}
|
|
8214
8270
|
.mergeTags=${((r = this.config.mergeTags) == null ? void 0 : r.tags) ?? []}
|
|
8271
|
+
.requestMergeTags=${!!this.config.mergeTags && !((i = this.config.mergeTags.tags) != null && i.length)}
|
|
8215
8272
|
.assetManagerConfig=${this.config.assetManager ?? {}}
|
|
8216
8273
|
.assetStorage=${this.assetStorage ?? this.config.assetStorage}
|
|
8217
8274
|
.brandKit=${this._activeBrandKit}
|
|
@@ -8232,9 +8289,9 @@ let _ = class extends g {
|
|
|
8232
8289
|
.renderer=${this.renderer}
|
|
8233
8290
|
.documentToMjml=${this.documentToMjml}
|
|
8234
8291
|
.fonts=${this._renderFonts()}
|
|
8235
|
-
@click=${(
|
|
8236
|
-
var
|
|
8237
|
-
(
|
|
8292
|
+
@click=${(n) => {
|
|
8293
|
+
var a;
|
|
8294
|
+
(a = n.target.classList) != null && a.contains("overlay") && (this._previewOpen = !1);
|
|
8238
8295
|
}}
|
|
8239
8296
|
></pigeon-preview>
|
|
8240
8297
|
|
|
@@ -8312,7 +8369,7 @@ let _ = class extends g {
|
|
|
8312
8369
|
o.addStep(n), this._dispatch(o);
|
|
8313
8370
|
}
|
|
8314
8371
|
async _handleTemplatesOpen() {
|
|
8315
|
-
this._templatePickerLoaded || (await
|
|
8372
|
+
this._templatePickerLoaded || (await Dr(), this._templatePickerLoaded = !0), this._templatePickerOpen = !0;
|
|
8316
8373
|
}
|
|
8317
8374
|
_handleTemplateLoad(e) {
|
|
8318
8375
|
var o;
|
|
@@ -8386,23 +8443,32 @@ let _ = class extends g {
|
|
|
8386
8443
|
composed: !0
|
|
8387
8444
|
}));
|
|
8388
8445
|
}
|
|
8389
|
-
|
|
8446
|
+
_handleExport() {
|
|
8447
|
+
this.dispatchEvent(new CustomEvent("pigeon:export", {
|
|
8448
|
+
bubbles: !0,
|
|
8449
|
+
composed: !0
|
|
8450
|
+
}));
|
|
8451
|
+
}
|
|
8452
|
+
async _handleExportHtml(e) {
|
|
8453
|
+
e.stopPropagation();
|
|
8454
|
+
const t = this._state.doc, o = await this.exportHtml();
|
|
8390
8455
|
this.dispatchEvent(new CustomEvent("pigeon:export-html", {
|
|
8391
|
-
detail: { document:
|
|
8456
|
+
detail: { document: t, html: o },
|
|
8392
8457
|
bubbles: !0,
|
|
8393
8458
|
composed: !0
|
|
8394
8459
|
}));
|
|
8395
8460
|
}
|
|
8396
|
-
_handleExportMjml() {
|
|
8397
|
-
|
|
8461
|
+
_handleExportMjml(e) {
|
|
8462
|
+
e.stopPropagation();
|
|
8463
|
+
const t = this.documentToMjml ? this.documentToMjml(this._state.doc, { fonts: this._renderFonts() }) : null;
|
|
8398
8464
|
this.dispatchEvent(new CustomEvent("pigeon:export-mjml", {
|
|
8399
|
-
detail: { document: this._state.doc, mjml:
|
|
8465
|
+
detail: { document: this._state.doc, mjml: t },
|
|
8400
8466
|
bubbles: !0,
|
|
8401
8467
|
composed: !0
|
|
8402
8468
|
}));
|
|
8403
8469
|
}
|
|
8404
|
-
_handleExportJson() {
|
|
8405
|
-
this.dispatchEvent(new CustomEvent("pigeon:export-json", {
|
|
8470
|
+
_handleExportJson(e) {
|
|
8471
|
+
e.stopPropagation(), this.dispatchEvent(new CustomEvent("pigeon:export-json", {
|
|
8406
8472
|
detail: { document: this._state.doc },
|
|
8407
8473
|
bubbles: !0,
|
|
8408
8474
|
composed: !0
|
|
@@ -8459,7 +8525,7 @@ let _ = class extends g {
|
|
|
8459
8525
|
_handleBodySelect() {
|
|
8460
8526
|
this._editingBlockId = null;
|
|
8461
8527
|
const e = this._state.createTransaction();
|
|
8462
|
-
e.setSelection(
|
|
8528
|
+
e.setSelection(Mt()), this._dispatch(e);
|
|
8463
8529
|
}
|
|
8464
8530
|
/* ------------------------------------------------------------------ */
|
|
8465
8531
|
/* Row action handlers */
|
|
@@ -8468,10 +8534,10 @@ let _ = class extends g {
|
|
|
8468
8534
|
wo(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
|
|
8469
8535
|
}
|
|
8470
8536
|
_handleRowDuplicate(e) {
|
|
8471
|
-
|
|
8537
|
+
Lt(e.detail.rowId)(this._state, this._dispatch);
|
|
8472
8538
|
}
|
|
8473
8539
|
_handleRowDelete(e) {
|
|
8474
|
-
|
|
8540
|
+
Rt(e.detail.rowId)(this._state, this._dispatch);
|
|
8475
8541
|
}
|
|
8476
8542
|
async _refreshSavedTab() {
|
|
8477
8543
|
var o;
|
|
@@ -8502,6 +8568,11 @@ let _ = class extends g {
|
|
|
8502
8568
|
}
|
|
8503
8569
|
return !1;
|
|
8504
8570
|
}
|
|
8571
|
+
/** True when the key press is aimed at the editor, or at nothing else on the page. */
|
|
8572
|
+
_isForEditor(e) {
|
|
8573
|
+
const t = e.composedPath()[0];
|
|
8574
|
+
return t === document || t === document.body || t === document.documentElement ? !0 : e.composedPath().includes(this);
|
|
8575
|
+
}
|
|
8505
8576
|
_flattenBlockLocations() {
|
|
8506
8577
|
const e = [];
|
|
8507
8578
|
for (const t of this._state.doc.body.rows)
|
|
@@ -8547,13 +8618,13 @@ let _ = class extends g {
|
|
|
8547
8618
|
/* DnD handlers */
|
|
8548
8619
|
/* ------------------------------------------------------------------ */
|
|
8549
8620
|
_handleRowDrop(e) {
|
|
8550
|
-
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => Ie()), i =
|
|
8621
|
+
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => Ie()), i = Te(r);
|
|
8551
8622
|
oe(i, t)(this._state, this._dispatch);
|
|
8552
8623
|
}
|
|
8553
8624
|
_handleBlockDrop(e) {
|
|
8554
8625
|
const { rowId: t, columnId: o, index: r, dragData: i } = e.detail;
|
|
8555
8626
|
if (i.type === "palette-block" && i.blockType) {
|
|
8556
|
-
const n =
|
|
8627
|
+
const n = Ve(i.blockType);
|
|
8557
8628
|
ce(t, o, n, r)(this._state, this._dispatch);
|
|
8558
8629
|
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId && ko(
|
|
8559
8630
|
i.rowId,
|
|
@@ -8565,7 +8636,7 @@ let _ = class extends g {
|
|
|
8565
8636
|
)(this._state, this._dispatch);
|
|
8566
8637
|
}
|
|
8567
8638
|
_handleBlockDropNewRow(e) {
|
|
8568
|
-
const { blockType: t, rowIndex: o } = e.detail, r =
|
|
8639
|
+
const { blockType: t, rowIndex: o } = e.detail, r = Ve(t), i = Ie([r]), n = Te([i]);
|
|
8569
8640
|
oe(n, o)(this._state, this._dispatch);
|
|
8570
8641
|
}
|
|
8571
8642
|
/**
|
|
@@ -8577,11 +8648,11 @@ let _ = class extends g {
|
|
|
8577
8648
|
const { type: t, blockType: o, columnCount: r } = e.detail, i = this._state.doc.body.rows;
|
|
8578
8649
|
if (t === "palette-row") {
|
|
8579
8650
|
const a = Array.from({ length: r }, () => Ie());
|
|
8580
|
-
oe(
|
|
8651
|
+
oe(Te(a), i.length)(this._state, this._dispatch);
|
|
8581
8652
|
return;
|
|
8582
8653
|
}
|
|
8583
8654
|
if (!o) return;
|
|
8584
|
-
const n =
|
|
8655
|
+
const n = Ve(o);
|
|
8585
8656
|
if (i.length > 0) {
|
|
8586
8657
|
const a = i[i.length - 1], h = a.columns[0];
|
|
8587
8658
|
ce(a.id, h.id, n, h.blocks.length)(
|
|
@@ -8590,7 +8661,7 @@ let _ = class extends g {
|
|
|
8590
8661
|
);
|
|
8591
8662
|
} else {
|
|
8592
8663
|
const a = Ie([n]);
|
|
8593
|
-
oe(
|
|
8664
|
+
oe(Te([a]), 0)(this._state, this._dispatch);
|
|
8594
8665
|
}
|
|
8595
8666
|
}
|
|
8596
8667
|
/* ------------------------------------------------------------------ */
|
|
@@ -8616,11 +8687,11 @@ let _ = class extends g {
|
|
|
8616
8687
|
const v = this._state.doc.body.rows.find((m) => m.id === t);
|
|
8617
8688
|
if (v && v.columns.length > 1) {
|
|
8618
8689
|
const m = v.columns[v.columns.length - 1];
|
|
8619
|
-
|
|
8690
|
+
To(t, m.id)(this._state, this._dispatch);
|
|
8620
8691
|
}
|
|
8621
8692
|
}
|
|
8622
8693
|
const h = this._state.doc.body.rows.find((c) => c.id === t);
|
|
8623
|
-
h && h.columns.length === o.length &&
|
|
8694
|
+
h && h.columns.length === o.length && Po(t, o)(this._state, this._dispatch);
|
|
8624
8695
|
}
|
|
8625
8696
|
_handleBodyPropertyChange(e) {
|
|
8626
8697
|
const { attribute: t, metaField: o, value: r } = e.detail, i = this._state.createTransaction();
|
|
@@ -8654,7 +8725,7 @@ let _ = class extends g {
|
|
|
8654
8725
|
}
|
|
8655
8726
|
};
|
|
8656
8727
|
_.styles = [
|
|
8657
|
-
|
|
8728
|
+
Eo,
|
|
8658
8729
|
b`
|
|
8659
8730
|
:host {
|
|
8660
8731
|
display: flex;
|
|
@@ -8741,43 +8812,43 @@ _ = $([
|
|
|
8741
8812
|
export {
|
|
8742
8813
|
Ne as PigeonAlignmentPicker,
|
|
8743
8814
|
x as PigeonAssetManager,
|
|
8744
|
-
|
|
8815
|
+
O as PigeonBodyPanel,
|
|
8745
8816
|
he as PigeonButtonBlock,
|
|
8746
|
-
|
|
8817
|
+
G as PigeonButtonPanel,
|
|
8747
8818
|
P as PigeonCanvas,
|
|
8748
8819
|
fe as PigeonColorPicker,
|
|
8749
|
-
|
|
8820
|
+
A as PigeonColumn,
|
|
8750
8821
|
Be as PigeonDividerBlock,
|
|
8751
8822
|
Ge as PigeonDropIndicator,
|
|
8752
8823
|
_ as PigeonEditor,
|
|
8753
8824
|
ge as PigeonHeroBlock,
|
|
8754
|
-
|
|
8755
|
-
|
|
8825
|
+
j as PigeonHeroPanel,
|
|
8826
|
+
Re as PigeonHtmlBlock,
|
|
8756
8827
|
Ae as PigeonImageBlock,
|
|
8757
8828
|
z as PigeonImagePanel,
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8829
|
+
De as PigeonLayers,
|
|
8830
|
+
X as PigeonMergeTagPicker,
|
|
8831
|
+
Le as PigeonNavBarBlock,
|
|
8761
8832
|
ae as PigeonNavBarPanel,
|
|
8762
|
-
|
|
8763
|
-
|
|
8833
|
+
T as PigeonPalette,
|
|
8834
|
+
Y as PigeonPaletteItem,
|
|
8764
8835
|
k as PigeonPreview,
|
|
8765
|
-
|
|
8766
|
-
|
|
8836
|
+
C as PigeonProperties,
|
|
8837
|
+
B as PigeonRow,
|
|
8767
8838
|
et as PigeonRowPanel,
|
|
8768
8839
|
L as PigeonSliderInput,
|
|
8769
|
-
|
|
8840
|
+
Me as PigeonSocialBlock,
|
|
8770
8841
|
je as PigeonSpacerBlock,
|
|
8771
8842
|
Ue as PigeonSpacingInput,
|
|
8772
|
-
|
|
8843
|
+
Kr as PigeonTemplatePicker,
|
|
8773
8844
|
de as PigeonTextBlock,
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8845
|
+
S as PigeonTextPanel,
|
|
8846
|
+
V as PigeonToolbar,
|
|
8847
|
+
Vo as calculateBlockDropIndex,
|
|
8848
|
+
qo as calculateRowDropIndex,
|
|
8778
8849
|
Xe as clearDragData,
|
|
8779
|
-
|
|
8780
|
-
|
|
8850
|
+
Ee as getDragData,
|
|
8851
|
+
Fr as readDragTransfer,
|
|
8781
8852
|
Bo as setDragData,
|
|
8782
8853
|
wt as writeDragTransfer
|
|
8783
8854
|
};
|