@lit-pigeon/editor 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +25 -1
- package/dist/index.js +807 -736
- package/dist/rich-text.js +332 -302
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as l, state as d, customElement as
|
|
3
|
-
import { getAllBlockDefinitions as Zt, getBlockDefinition as
|
|
1
|
+
import { css as u, LitElement as h, html as a, nothing as me } from "lit";
|
|
2
|
+
import { property as l, state as d, customElement as g } from "lit/decorators.js";
|
|
3
|
+
import { getAllBlockDefinitions as Zt, getBlockDefinition as ct, createBodySelection as Ct, deleteBlock as Qt, deleteRow as It, duplicateBlock as eo, duplicateRow as Pt, generateId as Ot, insertBlock as ze, EditorState as Tt, createHistoryPlugin as St, undo as to, redo as oo, InMemoryTemplateStorage as io, createDefaultDocument as ro, HISTORY_PLUGIN_NAME as Dt, canUndo as no, canRedo as so, createBlockSelection as rt, updateBlock as At, createRowSelection as Et, createColumnSelection as ao, moveRow as lo, createColumn as Le, createRow as He, insertRow as Ne, createBlock as nt, moveBlock as po, updateRowAttributes as co, addColumn as ho, removeColumn as go, resizeColumns as uo, createDocStep as jt } from "@lit-pigeon/core";
|
|
4
4
|
import { unsafeHTML as Ft } from "lit/directives/unsafe-html.js";
|
|
5
|
-
import { l as
|
|
6
|
-
import { PigeonTemplatePicker as
|
|
7
|
-
const
|
|
5
|
+
import { l as dt, r as bo } from "./rich-text.js";
|
|
6
|
+
import { PigeonTemplatePicker as $r } from "./templates.js";
|
|
7
|
+
const Bt = u`
|
|
8
8
|
/* base palette */
|
|
9
9
|
--pigeon-bg: #0f172a; /* slate-900 */
|
|
10
10
|
--pigeon-surface: #1e293b; /* slate-800 */
|
|
@@ -40,7 +40,7 @@ const jt = g`
|
|
|
40
40
|
0 2px 4px -2px rgb(0 0 0 / 0.4);
|
|
41
41
|
--pigeon-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
|
|
42
42
|
0 4px 6px -4px rgb(0 0 0 / 0.5);
|
|
43
|
-
`,
|
|
43
|
+
`, vo = u`
|
|
44
44
|
:host {
|
|
45
45
|
/* base palette */
|
|
46
46
|
--pigeon-bg: #ffffff;
|
|
@@ -101,21 +101,21 @@ const jt = g`
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
:host(.pigeon-dark) {
|
|
104
|
-
${
|
|
104
|
+
${Bt}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
@media (prefers-color-scheme: dark) {
|
|
108
108
|
:host(.pigeon-auto) {
|
|
109
|
-
${
|
|
109
|
+
${Bt}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
`;
|
|
113
|
-
var
|
|
114
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
113
|
+
var fo = Object.defineProperty, mo = Object.getOwnPropertyDescriptor, he = (e, t, o, r) => {
|
|
114
|
+
for (var i = r > 1 ? void 0 : r ? mo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
115
115
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
116
|
-
return r && i &&
|
|
116
|
+
return r && i && fo(t, o, i), i;
|
|
117
117
|
};
|
|
118
|
-
let
|
|
118
|
+
let z = class extends h {
|
|
119
119
|
constructor() {
|
|
120
120
|
super(...arguments), this.canUndo = !1, this.canRedo = !1, this.device = "desktop", this.fullscreen = !1, this._exportMenuOpen = !1;
|
|
121
121
|
}
|
|
@@ -337,7 +337,7 @@ let R = class extends h {
|
|
|
337
337
|
}));
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
|
-
|
|
340
|
+
z.styles = u`
|
|
341
341
|
:host {
|
|
342
342
|
display: flex;
|
|
343
343
|
align-items: center;
|
|
@@ -467,38 +467,38 @@ R.styles = g`
|
|
|
467
467
|
font-weight: 400;
|
|
468
468
|
}
|
|
469
469
|
`;
|
|
470
|
-
|
|
470
|
+
he([
|
|
471
471
|
l({ type: Boolean, attribute: "can-undo" })
|
|
472
|
-
],
|
|
473
|
-
|
|
472
|
+
], z.prototype, "canUndo", 2);
|
|
473
|
+
he([
|
|
474
474
|
l({ type: Boolean, attribute: "can-redo" })
|
|
475
|
-
],
|
|
476
|
-
|
|
475
|
+
], z.prototype, "canRedo", 2);
|
|
476
|
+
he([
|
|
477
477
|
l({ type: String })
|
|
478
|
-
],
|
|
479
|
-
|
|
478
|
+
], z.prototype, "device", 2);
|
|
479
|
+
he([
|
|
480
480
|
l({ type: Boolean })
|
|
481
|
-
],
|
|
482
|
-
|
|
481
|
+
], z.prototype, "fullscreen", 2);
|
|
482
|
+
he([
|
|
483
483
|
d()
|
|
484
|
-
],
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
],
|
|
488
|
-
let
|
|
489
|
-
function
|
|
490
|
-
|
|
484
|
+
], z.prototype, "_exportMenuOpen", 2);
|
|
485
|
+
z = he([
|
|
486
|
+
g("pigeon-toolbar")
|
|
487
|
+
], z);
|
|
488
|
+
let ht = null;
|
|
489
|
+
function _o(e) {
|
|
490
|
+
ht = e;
|
|
491
491
|
}
|
|
492
492
|
function we() {
|
|
493
|
-
return
|
|
493
|
+
return ht;
|
|
494
494
|
}
|
|
495
495
|
function gt() {
|
|
496
|
-
|
|
496
|
+
ht = null;
|
|
497
497
|
}
|
|
498
498
|
function Wt(e, t) {
|
|
499
|
-
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"),
|
|
499
|
+
e.dataTransfer && (e.dataTransfer.setData("application/json", JSON.stringify(t)), e.dataTransfer.effectAllowed = "move"), _o(t);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function xr(e) {
|
|
502
502
|
if (e.dataTransfer)
|
|
503
503
|
try {
|
|
504
504
|
const t = e.dataTransfer.getData("application/json");
|
|
@@ -507,12 +507,12 @@ function _r(e) {
|
|
|
507
507
|
}
|
|
508
508
|
return we();
|
|
509
509
|
}
|
|
510
|
-
var
|
|
511
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
510
|
+
var xo = Object.defineProperty, yo = Object.getOwnPropertyDescriptor, ge = (e, t, o, r) => {
|
|
511
|
+
for (var i = r > 1 ? void 0 : r ? yo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
512
512
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
513
|
-
return r && i &&
|
|
513
|
+
return r && i && xo(t, o, i), i;
|
|
514
514
|
};
|
|
515
|
-
const
|
|
515
|
+
const wo = {
|
|
516
516
|
text: "T",
|
|
517
517
|
image: "[]",
|
|
518
518
|
button: "[B]",
|
|
@@ -521,12 +521,12 @@ const yo = {
|
|
|
521
521
|
social: "@",
|
|
522
522
|
html: "</>"
|
|
523
523
|
};
|
|
524
|
-
let
|
|
524
|
+
let L = class extends h {
|
|
525
525
|
constructor() {
|
|
526
526
|
super(...arguments), this.label = "", this.icon = "", this.dragType = "palette-block", this.blockType = "", this.columnCount = 1;
|
|
527
527
|
}
|
|
528
528
|
render() {
|
|
529
|
-
const e =
|
|
529
|
+
const e = wo[this.icon] ?? this.icon ?? "?", t = this.dragType === "palette-row" ? "Add layout" : "Add block";
|
|
530
530
|
return a`
|
|
531
531
|
<div
|
|
532
532
|
class="item"
|
|
@@ -581,7 +581,7 @@ let z = class extends h {
|
|
|
581
581
|
}));
|
|
582
582
|
}
|
|
583
583
|
};
|
|
584
|
-
|
|
584
|
+
L.styles = u`
|
|
585
585
|
:host {
|
|
586
586
|
display: block;
|
|
587
587
|
}
|
|
@@ -639,30 +639,30 @@ z.styles = g`
|
|
|
639
639
|
color: var(--pigeon-text, #1e293b);
|
|
640
640
|
}
|
|
641
641
|
`;
|
|
642
|
-
|
|
642
|
+
ge([
|
|
643
643
|
l({ type: String })
|
|
644
|
-
],
|
|
645
|
-
|
|
644
|
+
], L.prototype, "label", 2);
|
|
645
|
+
ge([
|
|
646
646
|
l({ type: String })
|
|
647
|
-
],
|
|
648
|
-
|
|
647
|
+
], L.prototype, "icon", 2);
|
|
648
|
+
ge([
|
|
649
649
|
l({ type: String, attribute: "drag-type" })
|
|
650
|
-
],
|
|
651
|
-
|
|
650
|
+
], L.prototype, "dragType", 2);
|
|
651
|
+
ge([
|
|
652
652
|
l({ type: String, attribute: "block-type" })
|
|
653
|
-
],
|
|
654
|
-
|
|
653
|
+
], L.prototype, "blockType", 2);
|
|
654
|
+
ge([
|
|
655
655
|
l({ type: Number, attribute: "column-count" })
|
|
656
|
-
],
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
],
|
|
660
|
-
var
|
|
661
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
656
|
+
], L.prototype, "columnCount", 2);
|
|
657
|
+
L = ge([
|
|
658
|
+
g("pigeon-palette-item")
|
|
659
|
+
], L);
|
|
660
|
+
var $o = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, ut = (e, t, o, r) => {
|
|
661
|
+
for (var i = r > 1 ? void 0 : r ? ko(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
662
662
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
663
|
-
return r && i &&
|
|
663
|
+
return r && i && $o(t, o, i), i;
|
|
664
664
|
};
|
|
665
|
-
const
|
|
665
|
+
const Co = {
|
|
666
666
|
text: "T",
|
|
667
667
|
image: "Img",
|
|
668
668
|
button: "Btn",
|
|
@@ -706,7 +706,7 @@ let $e = class extends h {
|
|
|
706
706
|
}
|
|
707
707
|
_renderBlock(e, t, o) {
|
|
708
708
|
var s;
|
|
709
|
-
const r = ((s = this.selection) == null ? void 0 : s.type) === "block" && this.selection.blockId === e.id, i =
|
|
709
|
+
const r = ((s = this.selection) == null ? void 0 : s.type) === "block" && this.selection.blockId === e.id, i = Co[e.type] ?? "?", n = e.type.charAt(0).toUpperCase() + e.type.slice(1);
|
|
710
710
|
return a`
|
|
711
711
|
<div
|
|
712
712
|
class="tree-item indent-3 ${r ? "selected" : ""}"
|
|
@@ -732,7 +732,7 @@ let $e = class extends h {
|
|
|
732
732
|
}));
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
|
-
$e.styles =
|
|
735
|
+
$e.styles = u`
|
|
736
736
|
:host {
|
|
737
737
|
display: block;
|
|
738
738
|
font-family: var(--pigeon-font);
|
|
@@ -796,27 +796,27 @@ $e.styles = g`
|
|
|
796
796
|
padding: 8px 8px 4px;
|
|
797
797
|
}
|
|
798
798
|
`;
|
|
799
|
-
|
|
799
|
+
ut([
|
|
800
800
|
l({ type: Object })
|
|
801
801
|
], $e.prototype, "doc", 2);
|
|
802
|
-
|
|
802
|
+
ut([
|
|
803
803
|
l({ type: Object })
|
|
804
804
|
], $e.prototype, "selection", 2);
|
|
805
|
-
$e =
|
|
806
|
-
|
|
805
|
+
$e = ut([
|
|
806
|
+
g("pigeon-layers")
|
|
807
807
|
], $e);
|
|
808
|
-
var
|
|
809
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
808
|
+
var Io = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, Re = (e, t, o, r) => {
|
|
809
|
+
for (var i = r > 1 ? void 0 : r ? Po(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
810
810
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
811
|
-
return r && i &&
|
|
811
|
+
return r && i && Io(t, o, i), i;
|
|
812
812
|
};
|
|
813
|
-
const
|
|
813
|
+
const Oo = [
|
|
814
814
|
{ label: "1 Column", columns: 1, icon: "[=]" },
|
|
815
815
|
{ label: "2 Columns", columns: 2, icon: "[||]" },
|
|
816
816
|
{ label: "3 Columns", columns: 3, icon: "[|||]" },
|
|
817
817
|
{ label: "4 Columns", columns: 4, icon: "[||||]" }
|
|
818
818
|
];
|
|
819
|
-
let
|
|
819
|
+
let G = class extends h {
|
|
820
820
|
constructor() {
|
|
821
821
|
super(...arguments), this.selection = null, this._blockDefs = [], this._activeTab = "content";
|
|
822
822
|
}
|
|
@@ -874,7 +874,7 @@ let X = class extends h {
|
|
|
874
874
|
<div class="section">
|
|
875
875
|
<div class="section-header">Layout</div>
|
|
876
876
|
<div class="items">
|
|
877
|
-
${
|
|
877
|
+
${Oo.map((e) => a`
|
|
878
878
|
<pigeon-palette-item part="palette-item"
|
|
879
879
|
label="${e.label}"
|
|
880
880
|
icon="${e.icon}"
|
|
@@ -895,7 +895,7 @@ let X = class extends h {
|
|
|
895
895
|
`;
|
|
896
896
|
}
|
|
897
897
|
};
|
|
898
|
-
|
|
898
|
+
G.styles = u`
|
|
899
899
|
:host {
|
|
900
900
|
display: block;
|
|
901
901
|
width: var(--pigeon-palette-width, 240px);
|
|
@@ -974,22 +974,22 @@ X.styles = g`
|
|
|
974
974
|
gap: 6px;
|
|
975
975
|
}
|
|
976
976
|
`;
|
|
977
|
-
|
|
977
|
+
Re([
|
|
978
978
|
l({ type: Object })
|
|
979
|
-
],
|
|
980
|
-
|
|
979
|
+
], G.prototype, "doc", 2);
|
|
980
|
+
Re([
|
|
981
981
|
l({ type: Object })
|
|
982
|
-
],
|
|
983
|
-
|
|
982
|
+
], G.prototype, "selection", 2);
|
|
983
|
+
Re([
|
|
984
984
|
d()
|
|
985
|
-
],
|
|
986
|
-
|
|
985
|
+
], G.prototype, "_blockDefs", 2);
|
|
986
|
+
Re([
|
|
987
987
|
d()
|
|
988
|
-
],
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
],
|
|
992
|
-
function
|
|
988
|
+
], G.prototype, "_activeTab", 2);
|
|
989
|
+
G = Re([
|
|
990
|
+
g("pigeon-palette")
|
|
991
|
+
], G);
|
|
992
|
+
function To(e, t) {
|
|
993
993
|
if (t.length === 0) return 0;
|
|
994
994
|
for (let o = 0; o < t.length; o++) {
|
|
995
995
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -998,7 +998,7 @@ function Oo(e, t) {
|
|
|
998
998
|
}
|
|
999
999
|
return t.length;
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1001
|
+
function So(e, t) {
|
|
1002
1002
|
if (t.length === 0) return 0;
|
|
1003
1003
|
for (let o = 0; o < t.length; o++) {
|
|
1004
1004
|
const r = t[o].getBoundingClientRect(), i = r.top + r.height / 2;
|
|
@@ -1007,13 +1007,13 @@ function To(e, t) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
return t.length;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function Do(e, t) {
|
|
1011
1011
|
return e < 0 || t === e || t === e + 1 ? null : t > e ? t - 1 : t;
|
|
1012
1012
|
}
|
|
1013
|
-
var
|
|
1014
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1013
|
+
var Ao = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, Vt = (e, t, o, r) => {
|
|
1014
|
+
for (var i = r > 1 ? void 0 : r ? Eo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1015
1015
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1016
|
-
return r && i &&
|
|
1016
|
+
return r && i && Ao(t, o, i), i;
|
|
1017
1017
|
};
|
|
1018
1018
|
let Fe = class extends h {
|
|
1019
1019
|
constructor() {
|
|
@@ -1028,7 +1028,7 @@ let Fe = class extends h {
|
|
|
1028
1028
|
`;
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
|
-
Fe.styles =
|
|
1031
|
+
Fe.styles = u`
|
|
1032
1032
|
:host {
|
|
1033
1033
|
display: block;
|
|
1034
1034
|
height: 4px;
|
|
@@ -1076,12 +1076,12 @@ Vt([
|
|
|
1076
1076
|
l({ type: Boolean, reflect: !0 })
|
|
1077
1077
|
], Fe.prototype, "visible", 2);
|
|
1078
1078
|
Fe = Vt([
|
|
1079
|
-
|
|
1079
|
+
g("pigeon-drop-indicator")
|
|
1080
1080
|
], Fe);
|
|
1081
|
-
var
|
|
1082
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1081
|
+
var jo = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor, Xe = (e, t, o, r) => {
|
|
1082
|
+
for (var i = r > 1 ? void 0 : r ? Bo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1083
1083
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1084
|
-
return r && i &&
|
|
1084
|
+
return r && i && jo(t, o, i), i;
|
|
1085
1085
|
};
|
|
1086
1086
|
let te = class extends h {
|
|
1087
1087
|
constructor() {
|
|
@@ -1111,7 +1111,7 @@ let te = class extends h {
|
|
|
1111
1111
|
const e = this.renderRoot.querySelector(".content");
|
|
1112
1112
|
if (!e) return;
|
|
1113
1113
|
this._editorHost = e;
|
|
1114
|
-
const t = await
|
|
1114
|
+
const t = await dt();
|
|
1115
1115
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1116
1116
|
element: this._editorHost,
|
|
1117
1117
|
initialHTML: this.block.values.content,
|
|
@@ -1155,7 +1155,7 @@ let te = class extends h {
|
|
|
1155
1155
|
}));
|
|
1156
1156
|
}
|
|
1157
1157
|
};
|
|
1158
|
-
te.styles =
|
|
1158
|
+
te.styles = u`
|
|
1159
1159
|
:host {
|
|
1160
1160
|
display: block;
|
|
1161
1161
|
cursor: pointer;
|
|
@@ -1205,12 +1205,12 @@ Xe([
|
|
|
1205
1205
|
l({ type: Boolean, reflect: !0 })
|
|
1206
1206
|
], te.prototype, "editing", 2);
|
|
1207
1207
|
te = Xe([
|
|
1208
|
-
|
|
1208
|
+
g("pigeon-text-block")
|
|
1209
1209
|
], te);
|
|
1210
|
-
var
|
|
1210
|
+
var Ro = Object.defineProperty, Mo = Object.getOwnPropertyDescriptor, bt = (e, t, o, r) => {
|
|
1211
1211
|
for (var i = r > 1 ? void 0 : r ? Mo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1212
1212
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1213
|
-
return r && i &&
|
|
1213
|
+
return r && i && Ro(t, o, i), i;
|
|
1214
1214
|
};
|
|
1215
1215
|
let ke = class extends h {
|
|
1216
1216
|
constructor() {
|
|
@@ -1250,7 +1250,7 @@ let ke = class extends h {
|
|
|
1250
1250
|
}));
|
|
1251
1251
|
}
|
|
1252
1252
|
};
|
|
1253
|
-
ke.styles =
|
|
1253
|
+
ke.styles = u`
|
|
1254
1254
|
:host {
|
|
1255
1255
|
display: block;
|
|
1256
1256
|
cursor: pointer;
|
|
@@ -1298,19 +1298,19 @@ ke.styles = g`
|
|
|
1298
1298
|
opacity: 0.5;
|
|
1299
1299
|
}
|
|
1300
1300
|
`;
|
|
1301
|
-
|
|
1301
|
+
bt([
|
|
1302
1302
|
l({ type: Object })
|
|
1303
1303
|
], ke.prototype, "block", 2);
|
|
1304
|
-
|
|
1304
|
+
bt([
|
|
1305
1305
|
l({ type: Boolean, reflect: !0 })
|
|
1306
1306
|
], ke.prototype, "selected", 2);
|
|
1307
|
-
ke =
|
|
1308
|
-
|
|
1307
|
+
ke = bt([
|
|
1308
|
+
g("pigeon-image-block")
|
|
1309
1309
|
], ke);
|
|
1310
|
-
var
|
|
1311
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1310
|
+
var zo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Ge = (e, t, o, r) => {
|
|
1311
|
+
for (var i = r > 1 ? void 0 : r ? Lo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1312
1312
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1313
|
-
return r && i &&
|
|
1313
|
+
return r && i && zo(t, o, i), i;
|
|
1314
1314
|
};
|
|
1315
1315
|
let oe = class extends h {
|
|
1316
1316
|
constructor() {
|
|
@@ -1352,7 +1352,7 @@ let oe = class extends h {
|
|
|
1352
1352
|
const e = this.renderRoot.querySelector(".button");
|
|
1353
1353
|
if (!e) return;
|
|
1354
1354
|
this._editorHost = e;
|
|
1355
|
-
const t = await
|
|
1355
|
+
const t = await dt();
|
|
1356
1356
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1357
1357
|
element: this._editorHost,
|
|
1358
1358
|
initialHTML: this.block.values.content,
|
|
@@ -1399,7 +1399,7 @@ let oe = class extends h {
|
|
|
1399
1399
|
}));
|
|
1400
1400
|
}
|
|
1401
1401
|
};
|
|
1402
|
-
oe.styles =
|
|
1402
|
+
oe.styles = u`
|
|
1403
1403
|
:host {
|
|
1404
1404
|
display: block;
|
|
1405
1405
|
cursor: pointer;
|
|
@@ -1460,12 +1460,12 @@ Ge([
|
|
|
1460
1460
|
l({ type: Boolean, reflect: !0 })
|
|
1461
1461
|
], oe.prototype, "editing", 2);
|
|
1462
1462
|
oe = Ge([
|
|
1463
|
-
|
|
1463
|
+
g("pigeon-button-block")
|
|
1464
1464
|
], oe);
|
|
1465
|
-
var
|
|
1466
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1465
|
+
var Ho = Object.defineProperty, No = Object.getOwnPropertyDescriptor, vt = (e, t, o, r) => {
|
|
1466
|
+
for (var i = r > 1 ? void 0 : r ? No(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1467
1467
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1468
|
-
return r && i &&
|
|
1468
|
+
return r && i && Ho(t, o, i), i;
|
|
1469
1469
|
};
|
|
1470
1470
|
let Ce = class extends h {
|
|
1471
1471
|
constructor() {
|
|
@@ -1495,7 +1495,7 @@ let Ce = class extends h {
|
|
|
1495
1495
|
}));
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
|
-
Ce.styles =
|
|
1498
|
+
Ce.styles = u`
|
|
1499
1499
|
:host {
|
|
1500
1500
|
display: block;
|
|
1501
1501
|
cursor: pointer;
|
|
@@ -1522,17 +1522,17 @@ Ce.styles = g`
|
|
|
1522
1522
|
margin: 0;
|
|
1523
1523
|
}
|
|
1524
1524
|
`;
|
|
1525
|
-
|
|
1525
|
+
vt([
|
|
1526
1526
|
l({ type: Object })
|
|
1527
1527
|
], Ce.prototype, "block", 2);
|
|
1528
|
-
|
|
1528
|
+
vt([
|
|
1529
1529
|
l({ type: Boolean, reflect: !0 })
|
|
1530
1530
|
], Ce.prototype, "selected", 2);
|
|
1531
|
-
Ce =
|
|
1532
|
-
|
|
1531
|
+
Ce = vt([
|
|
1532
|
+
g("pigeon-divider-block")
|
|
1533
1533
|
], Ce);
|
|
1534
|
-
var Uo = Object.defineProperty,
|
|
1535
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1534
|
+
var Uo = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, ft = (e, t, o, r) => {
|
|
1535
|
+
for (var i = r > 1 ? void 0 : r ? Fo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1536
1536
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1537
1537
|
return r && i && Uo(t, o, i), i;
|
|
1538
1538
|
};
|
|
@@ -1561,7 +1561,7 @@ let Ie = class extends h {
|
|
|
1561
1561
|
}));
|
|
1562
1562
|
}
|
|
1563
1563
|
};
|
|
1564
|
-
Ie.styles =
|
|
1564
|
+
Ie.styles = u`
|
|
1565
1565
|
:host {
|
|
1566
1566
|
display: block;
|
|
1567
1567
|
cursor: pointer;
|
|
@@ -1603,21 +1603,21 @@ Ie.styles = g`
|
|
|
1603
1603
|
opacity: 1;
|
|
1604
1604
|
}
|
|
1605
1605
|
`;
|
|
1606
|
-
|
|
1606
|
+
ft([
|
|
1607
1607
|
l({ type: Object })
|
|
1608
1608
|
], Ie.prototype, "block", 2);
|
|
1609
|
-
|
|
1609
|
+
ft([
|
|
1610
1610
|
l({ type: Boolean, reflect: !0 })
|
|
1611
1611
|
], Ie.prototype, "selected", 2);
|
|
1612
|
-
Ie =
|
|
1613
|
-
|
|
1612
|
+
Ie = ft([
|
|
1613
|
+
g("pigeon-spacer-block")
|
|
1614
1614
|
], Ie);
|
|
1615
|
-
var
|
|
1616
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1615
|
+
var Wo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, mt = (e, t, o, r) => {
|
|
1616
|
+
for (var i = r > 1 ? void 0 : r ? Vo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1617
1617
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1618
|
-
return r && i &&
|
|
1618
|
+
return r && i && Wo(t, o, i), i;
|
|
1619
1619
|
};
|
|
1620
|
-
const
|
|
1620
|
+
const Yo = {
|
|
1621
1621
|
facebook: "f",
|
|
1622
1622
|
twitter: "𝕏",
|
|
1623
1623
|
instagram: "ig",
|
|
@@ -1625,7 +1625,7 @@ const Vo = {
|
|
|
1625
1625
|
youtube: "▶",
|
|
1626
1626
|
tiktok: "♪",
|
|
1627
1627
|
custom: "★"
|
|
1628
|
-
},
|
|
1628
|
+
}, qo = {
|
|
1629
1629
|
facebook: "#1877F2",
|
|
1630
1630
|
twitter: "#000000",
|
|
1631
1631
|
instagram: "#E4405F",
|
|
@@ -1654,7 +1654,7 @@ let Pe = class extends h {
|
|
|
1654
1654
|
${e.icons.length === 0 ? a`<div class="empty-state">Add social icons in properties</div>` : a`
|
|
1655
1655
|
<div class="icons-container" style="justify-content: ${o[e.alignment]}; gap: ${e.spacing}px;">
|
|
1656
1656
|
${e.icons.map((r) => {
|
|
1657
|
-
const i =
|
|
1657
|
+
const i = qo[r.type] ?? "#6b7280", n = Yo[r.type] ?? "?";
|
|
1658
1658
|
return a`
|
|
1659
1659
|
<a
|
|
1660
1660
|
class="social-icon"
|
|
@@ -1681,7 +1681,7 @@ let Pe = class extends h {
|
|
|
1681
1681
|
}));
|
|
1682
1682
|
}
|
|
1683
1683
|
};
|
|
1684
|
-
Pe.styles =
|
|
1684
|
+
Pe.styles = u`
|
|
1685
1685
|
:host {
|
|
1686
1686
|
display: block;
|
|
1687
1687
|
cursor: pointer;
|
|
@@ -1729,19 +1729,19 @@ Pe.styles = g`
|
|
|
1729
1729
|
font-size: 13px;
|
|
1730
1730
|
}
|
|
1731
1731
|
`;
|
|
1732
|
-
|
|
1732
|
+
mt([
|
|
1733
1733
|
l({ type: Object })
|
|
1734
1734
|
], Pe.prototype, "block", 2);
|
|
1735
|
-
|
|
1735
|
+
mt([
|
|
1736
1736
|
l({ type: Boolean, reflect: !0 })
|
|
1737
1737
|
], Pe.prototype, "selected", 2);
|
|
1738
|
-
Pe =
|
|
1739
|
-
|
|
1738
|
+
Pe = mt([
|
|
1739
|
+
g("pigeon-social-block")
|
|
1740
1740
|
], Pe);
|
|
1741
|
-
var
|
|
1742
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1741
|
+
var Xo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, _t = (e, t, o, r) => {
|
|
1742
|
+
for (var i = r > 1 ? void 0 : r ? Go(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1743
1743
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1744
|
-
return r && i &&
|
|
1744
|
+
return r && i && Xo(t, o, i), i;
|
|
1745
1745
|
};
|
|
1746
1746
|
let Oe = class extends h {
|
|
1747
1747
|
constructor() {
|
|
@@ -1768,7 +1768,7 @@ let Oe = class extends h {
|
|
|
1768
1768
|
}));
|
|
1769
1769
|
}
|
|
1770
1770
|
};
|
|
1771
|
-
Oe.styles =
|
|
1771
|
+
Oe.styles = u`
|
|
1772
1772
|
:host {
|
|
1773
1773
|
display: block;
|
|
1774
1774
|
cursor: pointer;
|
|
@@ -1808,19 +1808,19 @@ Oe.styles = g`
|
|
|
1808
1808
|
font-size: 13px;
|
|
1809
1809
|
}
|
|
1810
1810
|
`;
|
|
1811
|
-
|
|
1811
|
+
_t([
|
|
1812
1812
|
l({ type: Object })
|
|
1813
1813
|
], Oe.prototype, "block", 2);
|
|
1814
|
-
|
|
1814
|
+
_t([
|
|
1815
1815
|
l({ type: Boolean, reflect: !0 })
|
|
1816
1816
|
], Oe.prototype, "selected", 2);
|
|
1817
|
-
Oe =
|
|
1818
|
-
|
|
1817
|
+
Oe = _t([
|
|
1818
|
+
g("pigeon-html-block")
|
|
1819
1819
|
], Oe);
|
|
1820
|
-
var
|
|
1821
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1820
|
+
var Ko = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, Ke = (e, t, o, r) => {
|
|
1821
|
+
for (var i = r > 1 ? void 0 : r ? Jo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1822
1822
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1823
|
-
return r && i &&
|
|
1823
|
+
return r && i && Ko(t, o, i), i;
|
|
1824
1824
|
};
|
|
1825
1825
|
let ie = class extends h {
|
|
1826
1826
|
constructor() {
|
|
@@ -1863,7 +1863,7 @@ let ie = class extends h {
|
|
|
1863
1863
|
const e = this.renderRoot.querySelector(".content");
|
|
1864
1864
|
if (!e) return;
|
|
1865
1865
|
this._editorHost = e;
|
|
1866
|
-
const t = await
|
|
1866
|
+
const t = await dt();
|
|
1867
1867
|
!this.editing || !this._editorHost || (this._editor = t.createEditor({
|
|
1868
1868
|
element: this._editorHost,
|
|
1869
1869
|
initialHTML: this.block.values.content || "<p></p>",
|
|
@@ -1907,7 +1907,7 @@ let ie = class extends h {
|
|
|
1907
1907
|
}));
|
|
1908
1908
|
}
|
|
1909
1909
|
};
|
|
1910
|
-
ie.styles =
|
|
1910
|
+
ie.styles = u`
|
|
1911
1911
|
:host {
|
|
1912
1912
|
display: block;
|
|
1913
1913
|
cursor: pointer;
|
|
@@ -1977,12 +1977,12 @@ Ke([
|
|
|
1977
1977
|
l({ type: Boolean, reflect: !0 })
|
|
1978
1978
|
], ie.prototype, "editing", 2);
|
|
1979
1979
|
ie = Ke([
|
|
1980
|
-
|
|
1980
|
+
g("pigeon-hero-block")
|
|
1981
1981
|
], ie);
|
|
1982
|
-
var
|
|
1983
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
1982
|
+
var Zo = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, xt = (e, t, o, r) => {
|
|
1983
|
+
for (var i = r > 1 ? void 0 : r ? Qo(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1984
1984
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
1985
|
-
return r && i &&
|
|
1985
|
+
return r && i && Zo(t, o, i), i;
|
|
1986
1986
|
};
|
|
1987
1987
|
let Te = class extends h {
|
|
1988
1988
|
constructor() {
|
|
@@ -2027,7 +2027,7 @@ let Te = class extends h {
|
|
|
2027
2027
|
}));
|
|
2028
2028
|
}
|
|
2029
2029
|
};
|
|
2030
|
-
Te.styles =
|
|
2030
|
+
Te.styles = u`
|
|
2031
2031
|
:host {
|
|
2032
2032
|
display: block;
|
|
2033
2033
|
cursor: pointer;
|
|
@@ -2075,21 +2075,21 @@ Te.styles = g`
|
|
|
2075
2075
|
font-size: 13px;
|
|
2076
2076
|
}
|
|
2077
2077
|
`;
|
|
2078
|
-
|
|
2078
|
+
xt([
|
|
2079
2079
|
l({ type: Object })
|
|
2080
2080
|
], Te.prototype, "block", 2);
|
|
2081
|
-
|
|
2081
|
+
xt([
|
|
2082
2082
|
l({ type: Boolean, reflect: !0 })
|
|
2083
2083
|
], Te.prototype, "selected", 2);
|
|
2084
|
-
Te =
|
|
2085
|
-
|
|
2084
|
+
Te = xt([
|
|
2085
|
+
g("pigeon-navbar-block")
|
|
2086
2086
|
], Te);
|
|
2087
|
-
var
|
|
2088
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2087
|
+
var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, J = (e, t, o, r) => {
|
|
2088
|
+
for (var i = r > 1 ? void 0 : r ? ti(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2089
2089
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
2090
|
-
return r && i &&
|
|
2090
|
+
return r && i && ei(t, o, i), i;
|
|
2091
2091
|
};
|
|
2092
|
-
let
|
|
2092
|
+
let D = class extends h {
|
|
2093
2093
|
constructor() {
|
|
2094
2094
|
super(...arguments), this.rowId = "", this.selection = null, this.editingBlockId = null, this._dropIndex = -1, this._isDragOver = !1;
|
|
2095
2095
|
}
|
|
@@ -2161,7 +2161,7 @@ let S = class extends h {
|
|
|
2161
2161
|
* failing with "Unknown block type".
|
|
2162
2162
|
*/
|
|
2163
2163
|
_renderCustomBlock(e, t) {
|
|
2164
|
-
const o =
|
|
2164
|
+
const o = ct(e.type), r = e, i = o != null && o.renderCanvas ? Ft(o.renderCanvas(r)) : a`<span class="custom-block__label"
|
|
2165
2165
|
>${(o == null ? void 0 : o.label) ?? e.type}</span
|
|
2166
2166
|
>`;
|
|
2167
2167
|
return a`<div
|
|
@@ -2185,23 +2185,23 @@ let S = class extends h {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
_onDragOver(e) {
|
|
2187
2187
|
const t = we();
|
|
2188
|
-
if (!t || t.type
|
|
2188
|
+
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2189
2189
|
e.preventDefault(), e.stopPropagation(), e.dataTransfer && (e.dataTransfer.dropEffect = "copy"), this._isDragOver = !0;
|
|
2190
2190
|
const o = Array.from(
|
|
2191
2191
|
this.renderRoot.querySelectorAll(
|
|
2192
2192
|
"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"
|
|
2193
2193
|
)
|
|
2194
2194
|
);
|
|
2195
|
-
this._dropIndex =
|
|
2195
|
+
this._dropIndex = So(e.clientY, o);
|
|
2196
2196
|
}
|
|
2197
2197
|
_onDragLeave(e) {
|
|
2198
2198
|
const t = this.getBoundingClientRect();
|
|
2199
2199
|
e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom || (this._isDragOver = !1, this._dropIndex = -1);
|
|
2200
2200
|
}
|
|
2201
2201
|
_onDrop(e) {
|
|
2202
|
-
e.preventDefault(), e.stopPropagation();
|
|
2203
2202
|
const t = we();
|
|
2204
|
-
if (!t || t.type
|
|
2203
|
+
if (!t || t.type !== "palette-block" && t.type !== "existing-block") return;
|
|
2204
|
+
e.preventDefault(), e.stopPropagation();
|
|
2205
2205
|
const o = this._dropIndex >= 0 ? this._dropIndex : this.column.blocks.length;
|
|
2206
2206
|
this.dispatchEvent(new CustomEvent("block-drop", {
|
|
2207
2207
|
detail: {
|
|
@@ -2215,7 +2215,7 @@ let S = class extends h {
|
|
|
2215
2215
|
})), this._isDragOver = !1, this._dropIndex = -1, gt();
|
|
2216
2216
|
}
|
|
2217
2217
|
};
|
|
2218
|
-
|
|
2218
|
+
D.styles = u`
|
|
2219
2219
|
:host {
|
|
2220
2220
|
display: block;
|
|
2221
2221
|
min-height: 40px;
|
|
@@ -2282,35 +2282,35 @@ S.styles = g`
|
|
|
2282
2282
|
text-align: center;
|
|
2283
2283
|
}
|
|
2284
2284
|
`;
|
|
2285
|
-
|
|
2285
|
+
J([
|
|
2286
2286
|
l({ type: Object })
|
|
2287
|
-
],
|
|
2288
|
-
|
|
2287
|
+
], D.prototype, "column", 2);
|
|
2288
|
+
J([
|
|
2289
2289
|
l({ type: String, attribute: "row-id" })
|
|
2290
|
-
],
|
|
2291
|
-
|
|
2290
|
+
], D.prototype, "rowId", 2);
|
|
2291
|
+
J([
|
|
2292
2292
|
l({ type: Object })
|
|
2293
|
-
],
|
|
2294
|
-
|
|
2293
|
+
], D.prototype, "selection", 2);
|
|
2294
|
+
J([
|
|
2295
2295
|
l({ type: String, attribute: "editing-block-id" })
|
|
2296
|
-
],
|
|
2297
|
-
|
|
2296
|
+
], D.prototype, "editingBlockId", 2);
|
|
2297
|
+
J([
|
|
2298
2298
|
d()
|
|
2299
|
-
],
|
|
2300
|
-
|
|
2299
|
+
], D.prototype, "_dropIndex", 2);
|
|
2300
|
+
J([
|
|
2301
2301
|
d()
|
|
2302
|
-
],
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
],
|
|
2306
|
-
var
|
|
2307
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2302
|
+
], D.prototype, "_isDragOver", 2);
|
|
2303
|
+
D = J([
|
|
2304
|
+
g("pigeon-column")
|
|
2305
|
+
], D);
|
|
2306
|
+
var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, W = (e, t, o, r) => {
|
|
2307
|
+
for (var i = r > 1 ? void 0 : r ? ii(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2308
2308
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
2309
|
-
return r && i &&
|
|
2309
|
+
return r && i && oi(t, o, i), i;
|
|
2310
2310
|
};
|
|
2311
|
-
let
|
|
2311
|
+
let I = class extends h {
|
|
2312
2312
|
constructor() {
|
|
2313
|
-
super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this._dragging = !1;
|
|
2313
|
+
super(...arguments), this.index = 0, this.totalRows = 0, this.selection = null, this.editingBlockId = null, this.showActions = !1, this._dragging = !1;
|
|
2314
2314
|
}
|
|
2315
2315
|
render() {
|
|
2316
2316
|
var n;
|
|
@@ -2452,7 +2452,7 @@ let D = class extends h {
|
|
|
2452
2452
|
this._dragging = !1, gt();
|
|
2453
2453
|
}
|
|
2454
2454
|
};
|
|
2455
|
-
|
|
2455
|
+
I.styles = u`
|
|
2456
2456
|
:host {
|
|
2457
2457
|
display: block;
|
|
2458
2458
|
position: relative;
|
|
@@ -2504,6 +2504,11 @@ D.styles = g`
|
|
|
2504
2504
|
position: absolute;
|
|
2505
2505
|
top: -1px;
|
|
2506
2506
|
right: -40px;
|
|
2507
|
+
/* Transparent left padding bridges the gap between the row's right edge
|
|
2508
|
+
and the buttons so the hover region stays contiguous — otherwise the
|
|
2509
|
+
cursor crosses dead space, :host(:hover) drops, and the bar fades out
|
|
2510
|
+
before it can be reached. The buttons stay put (anchored by right). */
|
|
2511
|
+
padding-left: 16px;
|
|
2507
2512
|
display: flex;
|
|
2508
2513
|
flex-direction: column;
|
|
2509
2514
|
gap: 2px;
|
|
@@ -2513,8 +2518,7 @@ D.styles = g`
|
|
|
2513
2518
|
z-index: 10;
|
|
2514
2519
|
}
|
|
2515
2520
|
|
|
2516
|
-
:host(
|
|
2517
|
-
.row-wrapper.selected .actions {
|
|
2521
|
+
:host([show-actions]) .actions {
|
|
2518
2522
|
opacity: 1;
|
|
2519
2523
|
pointer-events: auto;
|
|
2520
2524
|
}
|
|
@@ -2574,40 +2578,49 @@ D.styles = g`
|
|
|
2574
2578
|
white-space: nowrap;
|
|
2575
2579
|
}
|
|
2576
2580
|
|
|
2577
|
-
:host(
|
|
2581
|
+
:host([show-actions]) .row-label,
|
|
2578
2582
|
.row-wrapper.selected .row-label {
|
|
2579
2583
|
opacity: 1;
|
|
2580
2584
|
}
|
|
2581
2585
|
`;
|
|
2582
|
-
|
|
2586
|
+
W([
|
|
2583
2587
|
l({ type: Object })
|
|
2584
|
-
],
|
|
2585
|
-
|
|
2588
|
+
], I.prototype, "row", 2);
|
|
2589
|
+
W([
|
|
2586
2590
|
l({ type: Number })
|
|
2587
|
-
],
|
|
2588
|
-
|
|
2591
|
+
], I.prototype, "index", 2);
|
|
2592
|
+
W([
|
|
2589
2593
|
l({ type: Number, attribute: "total-rows" })
|
|
2590
|
-
],
|
|
2591
|
-
|
|
2594
|
+
], I.prototype, "totalRows", 2);
|
|
2595
|
+
W([
|
|
2592
2596
|
l({ type: Object })
|
|
2593
|
-
],
|
|
2594
|
-
|
|
2597
|
+
], I.prototype, "selection", 2);
|
|
2598
|
+
W([
|
|
2595
2599
|
l({ type: String, attribute: "editing-block-id" })
|
|
2596
|
-
],
|
|
2597
|
-
|
|
2600
|
+
], I.prototype, "editingBlockId", 2);
|
|
2601
|
+
W([
|
|
2602
|
+
l({ type: Boolean, attribute: "show-actions", reflect: !0 })
|
|
2603
|
+
], I.prototype, "showActions", 2);
|
|
2604
|
+
W([
|
|
2598
2605
|
d()
|
|
2599
|
-
],
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
],
|
|
2603
|
-
var
|
|
2604
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
2606
|
+
], I.prototype, "_dragging", 2);
|
|
2607
|
+
I = W([
|
|
2608
|
+
g("pigeon-row")
|
|
2609
|
+
], I);
|
|
2610
|
+
var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, B = (e, t, o, r) => {
|
|
2611
|
+
for (var i = r > 1 ? void 0 : r ? ni(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
2605
2612
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
2606
|
-
return r && i &&
|
|
2613
|
+
return r && i && ri(t, o, i), i;
|
|
2607
2614
|
};
|
|
2608
2615
|
let C = class extends h {
|
|
2609
2616
|
constructor() {
|
|
2610
|
-
super(...arguments), this.selection = null, this.editingBlockId = null, this.previewWidth = 0, this.device = "desktop", this._rowDropIndex = -1, this._isDragOver = !1
|
|
2617
|
+
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) => {
|
|
2618
|
+
var r;
|
|
2619
|
+
const t = e.composedPath().find(
|
|
2620
|
+
(i) => i instanceof HTMLElement && i.tagName.toLowerCase() === "pigeon-row"
|
|
2621
|
+
), o = ((r = t == null ? void 0 : t.row) == null ? void 0 : r.id) ?? null;
|
|
2622
|
+
o !== this._hoveredRowId && (this._hoveredRowId = o);
|
|
2623
|
+
};
|
|
2611
2624
|
}
|
|
2612
2625
|
render() {
|
|
2613
2626
|
if (!this.doc) return a``;
|
|
@@ -2617,6 +2630,7 @@ let C = class extends h {
|
|
|
2617
2630
|
class="canvas-scroll"
|
|
2618
2631
|
style=${o ? "" : `background: ${t};`}
|
|
2619
2632
|
@click=${this._onCanvasClick}
|
|
2633
|
+
@mouseover=${this._onPointerOverRow}
|
|
2620
2634
|
>
|
|
2621
2635
|
${o ? a`
|
|
2622
2636
|
<div class="device-bar">
|
|
@@ -2642,7 +2656,8 @@ let C = class extends h {
|
|
|
2642
2656
|
* the frame stays neutral).
|
|
2643
2657
|
*/
|
|
2644
2658
|
_renderCanvasArea(e, t) {
|
|
2645
|
-
|
|
2659
|
+
var n;
|
|
2660
|
+
const o = this.doc.body.rows, r = t ? `background: ${t};` : "", i = ((n = this.selection) == null ? void 0 : n.type) === "row" ? this.selection.rowId : null;
|
|
2646
2661
|
return a`
|
|
2647
2662
|
<div
|
|
2648
2663
|
class="canvas-area"
|
|
@@ -2665,16 +2680,17 @@ let C = class extends h {
|
|
|
2665
2680
|
` : a`
|
|
2666
2681
|
<div class="rows-container">
|
|
2667
2682
|
${o.map(
|
|
2668
|
-
(
|
|
2683
|
+
(s, c) => a`
|
|
2669
2684
|
<pigeon-drop-indicator
|
|
2670
|
-
?visible=${this._isDragOver && this._rowDropIndex ===
|
|
2685
|
+
?visible=${this._isDragOver && this._rowDropIndex === c}
|
|
2671
2686
|
></pigeon-drop-indicator>
|
|
2672
2687
|
<pigeon-row
|
|
2673
|
-
.row=${
|
|
2674
|
-
.index=${
|
|
2688
|
+
.row=${s}
|
|
2689
|
+
.index=${c}
|
|
2675
2690
|
.totalRows=${o.length}
|
|
2676
2691
|
.selection=${this.selection}
|
|
2677
2692
|
.editingBlockId=${this.editingBlockId}
|
|
2693
|
+
?show-actions=${this._hoveredRowId === s.id || this._hoveredRowId === null && i === s.id}
|
|
2678
2694
|
></pigeon-row>
|
|
2679
2695
|
`
|
|
2680
2696
|
)}
|
|
@@ -2700,7 +2716,7 @@ let C = class extends h {
|
|
|
2700
2716
|
const o = Array.from(
|
|
2701
2717
|
this.renderRoot.querySelectorAll("pigeon-row")
|
|
2702
2718
|
);
|
|
2703
|
-
this._rowDropIndex =
|
|
2719
|
+
this._rowDropIndex = To(e.clientY, o);
|
|
2704
2720
|
}
|
|
2705
2721
|
}
|
|
2706
2722
|
_onDragLeave(e) {
|
|
@@ -2726,7 +2742,7 @@ let C = class extends h {
|
|
|
2726
2742
|
composed: !0
|
|
2727
2743
|
}));
|
|
2728
2744
|
} else if (t.type === "existing-row" && t.rowId) {
|
|
2729
|
-
const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i =
|
|
2745
|
+
const o = this.doc.body.rows.findIndex((n) => n.id === t.rowId), r = this._rowDropIndex >= 0 ? this._rowDropIndex : this.doc.body.rows.length, i = Do(o, r);
|
|
2730
2746
|
i !== null && this.dispatchEvent(new CustomEvent("row-move", {
|
|
2731
2747
|
detail: { rowId: t.rowId, toIndex: i },
|
|
2732
2748
|
bubbles: !0,
|
|
@@ -2746,7 +2762,7 @@ let C = class extends h {
|
|
|
2746
2762
|
this._isDragOver = !1, this._rowDropIndex = -1, gt();
|
|
2747
2763
|
}
|
|
2748
2764
|
};
|
|
2749
|
-
C.styles =
|
|
2765
|
+
C.styles = u`
|
|
2750
2766
|
:host {
|
|
2751
2767
|
display: block;
|
|
2752
2768
|
flex: 1;
|
|
@@ -2875,51 +2891,54 @@ C.styles = g`
|
|
|
2875
2891
|
border-radius: var(--pigeon-radius, 6px);
|
|
2876
2892
|
}
|
|
2877
2893
|
`;
|
|
2878
|
-
|
|
2894
|
+
B([
|
|
2879
2895
|
l({ type: Object })
|
|
2880
2896
|
], C.prototype, "doc", 2);
|
|
2881
|
-
|
|
2897
|
+
B([
|
|
2882
2898
|
l({ type: Object })
|
|
2883
2899
|
], C.prototype, "selection", 2);
|
|
2884
|
-
|
|
2900
|
+
B([
|
|
2885
2901
|
l({ type: String, attribute: "editing-block-id" })
|
|
2886
2902
|
], C.prototype, "editingBlockId", 2);
|
|
2887
|
-
|
|
2903
|
+
B([
|
|
2888
2904
|
l({ type: Number, attribute: "preview-width" })
|
|
2889
2905
|
], C.prototype, "previewWidth", 2);
|
|
2890
|
-
|
|
2906
|
+
B([
|
|
2891
2907
|
l({ type: String })
|
|
2892
2908
|
], C.prototype, "device", 2);
|
|
2893
|
-
|
|
2909
|
+
B([
|
|
2894
2910
|
d()
|
|
2895
2911
|
], C.prototype, "_rowDropIndex", 2);
|
|
2896
|
-
|
|
2912
|
+
B([
|
|
2897
2913
|
d()
|
|
2898
2914
|
], C.prototype, "_isDragOver", 2);
|
|
2899
|
-
|
|
2900
|
-
|
|
2915
|
+
B([
|
|
2916
|
+
d()
|
|
2917
|
+
], C.prototype, "_hoveredRowId", 2);
|
|
2918
|
+
C = B([
|
|
2919
|
+
g("pigeon-canvas")
|
|
2901
2920
|
], C);
|
|
2902
2921
|
/**
|
|
2903
2922
|
* @license
|
|
2904
2923
|
* Copyright 2017 Google LLC
|
|
2905
2924
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2906
2925
|
*/
|
|
2907
|
-
const xe = globalThis,
|
|
2908
|
-
\f\r]`, _e = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
2909
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
2926
|
+
const xe = globalThis, Rt = (e) => e, We = xe.trustedTypes, Mt = We ? We.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Yt = "$lit$", M = `lit$${Math.random().toFixed(9).slice(2)}$`, qt = "?" + M, si = `<${qt}>`, K = document, Ve = () => K.createComment(""), Se = (e) => e === null || typeof e != "object" && typeof e != "function", yt = Array.isArray, ai = (e) => yt(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", st = `[
|
|
2927
|
+
\f\r]`, _e = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, zt = /-->/g, Lt = />/g, q = RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
|
|
2928
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Nt = /"/g, Xt = /^(?:script|style|textarea|title)$/i, De = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Ut = /* @__PURE__ */ new WeakMap(), X = K.createTreeWalker(K, 129);
|
|
2910
2929
|
function Gt(e, t) {
|
|
2911
|
-
if (!
|
|
2930
|
+
if (!yt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
2912
2931
|
return Mt !== void 0 ? Mt.createHTML(t) : t;
|
|
2913
2932
|
}
|
|
2914
|
-
const
|
|
2933
|
+
const li = (e, t) => {
|
|
2915
2934
|
const o = e.length - 1, r = [];
|
|
2916
2935
|
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = _e;
|
|
2917
2936
|
for (let c = 0; c < o; c++) {
|
|
2918
2937
|
const p = e[c];
|
|
2919
|
-
let b, f, v = -1,
|
|
2920
|
-
for (;
|
|
2921
|
-
const
|
|
2922
|
-
n += s === _e ? p +
|
|
2938
|
+
let b, f, v = -1, S = 0;
|
|
2939
|
+
for (; S < p.length && (s.lastIndex = S, f = s.exec(p), f !== null); ) S = s.lastIndex, s === _e ? f[1] === "!--" ? s = zt : f[1] !== void 0 ? s = Lt : f[2] !== void 0 ? (Xt.test(f[2]) && (i = RegExp("</" + f[2], "g")), s = q) : f[3] !== void 0 && (s = q) : s === q ? f[0] === ">" ? (s = i ?? _e, v = -1) : f[1] === void 0 ? v = -2 : (v = s.lastIndex - f[2].length, b = f[1], s = f[3] === void 0 ? q : f[3] === '"' ? Nt : Ht) : s === Nt || s === Ht ? s = q : s === zt || s === Lt ? s = _e : (s = q, i = void 0);
|
|
2940
|
+
const R = s === q && e[c + 1].startsWith("/>") ? " " : "";
|
|
2941
|
+
n += s === _e ? p + si : v >= 0 ? (r.push(b), p.slice(0, v) + Yt + p.slice(v) + M + R) : p + M + (v === -2 ? c : R);
|
|
2923
2942
|
}
|
|
2924
2943
|
return [Gt(e, n + (e[o] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
2925
2944
|
};
|
|
@@ -2928,23 +2947,23 @@ class Ae {
|
|
|
2928
2947
|
let i;
|
|
2929
2948
|
this.parts = [];
|
|
2930
2949
|
let n = 0, s = 0;
|
|
2931
|
-
const c = t.length - 1, p = this.parts, [b, f] =
|
|
2932
|
-
if (this.el = Ae.createElement(b, r),
|
|
2950
|
+
const c = t.length - 1, p = this.parts, [b, f] = li(t, o);
|
|
2951
|
+
if (this.el = Ae.createElement(b, r), X.currentNode = this.el.content, o === 2 || o === 3) {
|
|
2933
2952
|
const v = this.el.content.firstChild;
|
|
2934
2953
|
v.replaceWith(...v.childNodes);
|
|
2935
2954
|
}
|
|
2936
|
-
for (; (i =
|
|
2955
|
+
for (; (i = X.nextNode()) !== null && p.length < c; ) {
|
|
2937
2956
|
if (i.nodeType === 1) {
|
|
2938
2957
|
if (i.hasAttributes()) for (const v of i.getAttributeNames()) if (v.endsWith(Yt)) {
|
|
2939
|
-
const
|
|
2940
|
-
p.push({ type: 1, index: n, name:
|
|
2958
|
+
const S = f[s++], R = i.getAttribute(v).split(M), Me = /([.?@])?(.*)/.exec(S);
|
|
2959
|
+
p.push({ type: 1, index: n, name: Me[2], strings: R, ctor: Me[1] === "." ? ci : Me[1] === "?" ? di : Me[1] === "@" ? hi : Ze }), i.removeAttribute(v);
|
|
2941
2960
|
} else v.startsWith(M) && (p.push({ type: 6, index: n }), i.removeAttribute(v));
|
|
2942
2961
|
if (Xt.test(i.tagName)) {
|
|
2943
|
-
const v = i.textContent.split(M),
|
|
2944
|
-
if (
|
|
2962
|
+
const v = i.textContent.split(M), S = v.length - 1;
|
|
2963
|
+
if (S > 0) {
|
|
2945
2964
|
i.textContent = We ? We.emptyScript : "";
|
|
2946
|
-
for (let
|
|
2947
|
-
i.append(v[
|
|
2965
|
+
for (let R = 0; R < S; R++) i.append(v[R], Ve()), X.nextNode(), p.push({ type: 2, index: ++n });
|
|
2966
|
+
i.append(v[S], Ve());
|
|
2948
2967
|
}
|
|
2949
2968
|
}
|
|
2950
2969
|
} else if (i.nodeType === 8) if (i.data === qt) p.push({ type: 2, index: n });
|
|
@@ -2956,7 +2975,7 @@ class Ae {
|
|
|
2956
2975
|
}
|
|
2957
2976
|
}
|
|
2958
2977
|
static createElement(t, o) {
|
|
2959
|
-
const r =
|
|
2978
|
+
const r = K.createElement("template");
|
|
2960
2979
|
return r.innerHTML = t, r;
|
|
2961
2980
|
}
|
|
2962
2981
|
}
|
|
@@ -2967,7 +2986,7 @@ function re(e, t, o = e, r) {
|
|
|
2967
2986
|
const n = Se(t) ? void 0 : t._$litDirective$;
|
|
2968
2987
|
return (i == null ? void 0 : i.constructor) !== n && ((c = i == null ? void 0 : i._$AO) == null || c.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 = re(e, i._$AS(e, t.values), i, r)), t;
|
|
2969
2988
|
}
|
|
2970
|
-
class
|
|
2989
|
+
class pi {
|
|
2971
2990
|
constructor(t, o) {
|
|
2972
2991
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = o;
|
|
2973
2992
|
}
|
|
@@ -2978,17 +2997,17 @@ class li {
|
|
|
2978
2997
|
return this._$AM._$AU;
|
|
2979
2998
|
}
|
|
2980
2999
|
u(t) {
|
|
2981
|
-
const { el: { content: o }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ??
|
|
2982
|
-
|
|
2983
|
-
let n =
|
|
3000
|
+
const { el: { content: o }, parts: r } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? K).importNode(o, !0);
|
|
3001
|
+
X.currentNode = i;
|
|
3002
|
+
let n = X.nextNode(), s = 0, c = 0, p = r[0];
|
|
2984
3003
|
for (; p !== void 0; ) {
|
|
2985
3004
|
if (s === p.index) {
|
|
2986
3005
|
let b;
|
|
2987
3006
|
p.type === 2 ? b = new Je(n, n.nextSibling, this, t) : p.type === 1 ? b = new p.ctor(n, p.name, p.strings, this, t) : p.type === 6 && (b = new gi(n, this, t)), this._$AV.push(b), p = r[++c];
|
|
2988
3007
|
}
|
|
2989
|
-
s !== (p == null ? void 0 : p.index) && (n =
|
|
3008
|
+
s !== (p == null ? void 0 : p.index) && (n = X.nextNode(), s++);
|
|
2990
3009
|
}
|
|
2991
|
-
return
|
|
3010
|
+
return X.currentNode = K, i;
|
|
2992
3011
|
}
|
|
2993
3012
|
p(t) {
|
|
2994
3013
|
let o = 0;
|
|
@@ -3015,7 +3034,7 @@ class Je {
|
|
|
3015
3034
|
return this._$AB;
|
|
3016
3035
|
}
|
|
3017
3036
|
_$AI(t, o = this) {
|
|
3018
|
-
t = re(this, t, o), Se(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== De && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
3037
|
+
t = re(this, t, o), Se(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== De && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ai(t) ? this.k(t) : this._(t);
|
|
3019
3038
|
}
|
|
3020
3039
|
O(t) {
|
|
3021
3040
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -3024,14 +3043,14 @@ class Je {
|
|
|
3024
3043
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
3025
3044
|
}
|
|
3026
3045
|
_(t) {
|
|
3027
|
-
this._$AH !== m && Se(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
3046
|
+
this._$AH !== m && Se(this._$AH) ? this._$AA.nextSibling.data = t : this.T(K.createTextNode(t)), this._$AH = t;
|
|
3028
3047
|
}
|
|
3029
3048
|
$(t) {
|
|
3030
3049
|
var n;
|
|
3031
3050
|
const { values: o, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Ae.createElement(Gt(r.h, r.h[0]), this.options)), r);
|
|
3032
3051
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(o);
|
|
3033
3052
|
else {
|
|
3034
|
-
const s = new
|
|
3053
|
+
const s = new pi(i, this), c = s.u(this.options);
|
|
3035
3054
|
s.p(o), this.T(c), this._$AH = s;
|
|
3036
3055
|
}
|
|
3037
3056
|
}
|
|
@@ -3040,7 +3059,7 @@ class Je {
|
|
|
3040
3059
|
return o === void 0 && Ut.set(t.strings, o = new Ae(t)), o;
|
|
3041
3060
|
}
|
|
3042
3061
|
k(t) {
|
|
3043
|
-
|
|
3062
|
+
yt(this._$AH) || (this._$AH = [], this._$AR());
|
|
3044
3063
|
const o = this._$AH;
|
|
3045
3064
|
let r, i = 0;
|
|
3046
3065
|
for (const n of t) i === o.length ? o.push(r = new Je(this.O(Ve()), this.O(Ve()), this, this.options)) : r = o[i], r._$AI(n), i++;
|
|
@@ -3049,8 +3068,8 @@ class Je {
|
|
|
3049
3068
|
_$AR(t = this._$AA.nextSibling, o) {
|
|
3050
3069
|
var r;
|
|
3051
3070
|
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, o); t !== this._$AB; ) {
|
|
3052
|
-
const i =
|
|
3053
|
-
|
|
3071
|
+
const i = Rt(t).nextSibling;
|
|
3072
|
+
Rt(t).remove(), t = i;
|
|
3054
3073
|
}
|
|
3055
3074
|
}
|
|
3056
3075
|
setConnected(t) {
|
|
@@ -3083,7 +3102,7 @@ class Ze {
|
|
|
3083
3102
|
t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
3084
3103
|
}
|
|
3085
3104
|
}
|
|
3086
|
-
class
|
|
3105
|
+
class ci extends Ze {
|
|
3087
3106
|
constructor() {
|
|
3088
3107
|
super(...arguments), this.type = 3;
|
|
3089
3108
|
}
|
|
@@ -3091,7 +3110,7 @@ class pi extends Ze {
|
|
|
3091
3110
|
this.element[this.name] = t === m ? void 0 : t;
|
|
3092
3111
|
}
|
|
3093
3112
|
}
|
|
3094
|
-
class
|
|
3113
|
+
class di extends Ze {
|
|
3095
3114
|
constructor() {
|
|
3096
3115
|
super(...arguments), this.type = 4;
|
|
3097
3116
|
}
|
|
@@ -3099,7 +3118,7 @@ class ci extends Ze {
|
|
|
3099
3118
|
this.element.toggleAttribute(this.name, !!t && t !== m);
|
|
3100
3119
|
}
|
|
3101
3120
|
}
|
|
3102
|
-
class
|
|
3121
|
+
class hi extends Ze {
|
|
3103
3122
|
constructor(t, o, r, i, n) {
|
|
3104
3123
|
super(t, o, r, i, n), this.type = 5;
|
|
3105
3124
|
}
|
|
@@ -3131,14 +3150,14 @@ at == null || at(Ae, Je), (xe.litHtmlVersions ?? (xe.litHtmlVersions = [])).push
|
|
|
3131
3150
|
* Copyright 2020 Google LLC
|
|
3132
3151
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3133
3152
|
*/
|
|
3134
|
-
const
|
|
3153
|
+
const ui = (e) => e.strings === void 0;
|
|
3135
3154
|
/**
|
|
3136
3155
|
* @license
|
|
3137
3156
|
* Copyright 2017 Google LLC
|
|
3138
3157
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3139
3158
|
*/
|
|
3140
|
-
const
|
|
3141
|
-
class
|
|
3159
|
+
const bi = { CHILD: 2 }, vi = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
3160
|
+
class fi {
|
|
3142
3161
|
constructor(t) {
|
|
3143
3162
|
}
|
|
3144
3163
|
get _$AU() {
|
|
@@ -3176,22 +3195,22 @@ const ye = (e, t) => {
|
|
|
3176
3195
|
let o = t._$AN;
|
|
3177
3196
|
if (o === void 0) t._$AN = o = /* @__PURE__ */ new Set();
|
|
3178
3197
|
else if (o.has(e)) break;
|
|
3179
|
-
o.add(e),
|
|
3198
|
+
o.add(e), xi(t);
|
|
3180
3199
|
}
|
|
3181
3200
|
};
|
|
3182
|
-
function
|
|
3201
|
+
function mi(e) {
|
|
3183
3202
|
this._$AN !== void 0 ? (Ye(this), this._$AM = e, Kt(this)) : this._$AM = e;
|
|
3184
3203
|
}
|
|
3185
|
-
function
|
|
3204
|
+
function _i(e, t = !1, o = 0) {
|
|
3186
3205
|
const r = this._$AH, i = this._$AN;
|
|
3187
3206
|
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let n = o; n < r.length; n++) ye(r[n], !1), Ye(r[n]);
|
|
3188
3207
|
else r != null && (ye(r, !1), Ye(r));
|
|
3189
3208
|
else ye(this, e);
|
|
3190
3209
|
}
|
|
3191
|
-
const
|
|
3192
|
-
e.type ==
|
|
3210
|
+
const xi = (e) => {
|
|
3211
|
+
e.type == bi.CHILD && (e._$AP ?? (e._$AP = _i), e._$AQ ?? (e._$AQ = mi));
|
|
3193
3212
|
};
|
|
3194
|
-
class
|
|
3213
|
+
class yi extends fi {
|
|
3195
3214
|
constructor() {
|
|
3196
3215
|
super(...arguments), this._$AN = void 0;
|
|
3197
3216
|
}
|
|
@@ -3203,7 +3222,7 @@ class xi extends vi {
|
|
|
3203
3222
|
t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (i = this.disconnected) == null || i.call(this)), o && (ye(this, t), Ye(this));
|
|
3204
3223
|
}
|
|
3205
3224
|
setValue(t) {
|
|
3206
|
-
if (
|
|
3225
|
+
if (ui(this._$Ct)) this._$Ct._$AI(t, this);
|
|
3207
3226
|
else {
|
|
3208
3227
|
const o = [...this._$Ct._$AH];
|
|
3209
3228
|
o[this._$Ci] = t, this._$Ct._$AI(o, this, 0);
|
|
@@ -3219,10 +3238,10 @@ class xi extends vi {
|
|
|
3219
3238
|
* Copyright 2020 Google LLC
|
|
3220
3239
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3221
3240
|
*/
|
|
3222
|
-
const ne = () => new
|
|
3223
|
-
class
|
|
3241
|
+
const ne = () => new wi();
|
|
3242
|
+
class wi {
|
|
3224
3243
|
}
|
|
3225
|
-
const lt = /* @__PURE__ */ new WeakMap(), se =
|
|
3244
|
+
const lt = /* @__PURE__ */ new WeakMap(), se = vi(class extends yi {
|
|
3226
3245
|
render(e) {
|
|
3227
3246
|
return m;
|
|
3228
3247
|
}
|
|
@@ -3248,7 +3267,7 @@ const lt = /* @__PURE__ */ new WeakMap(), se = bi(class extends xi {
|
|
|
3248
3267
|
reconnected() {
|
|
3249
3268
|
this.rt(this.ct);
|
|
3250
3269
|
}
|
|
3251
|
-
}), k =
|
|
3270
|
+
}), k = u`
|
|
3252
3271
|
:host {
|
|
3253
3272
|
display: block;
|
|
3254
3273
|
}
|
|
@@ -3363,11 +3382,111 @@ const lt = /* @__PURE__ */ new WeakMap(), se = bi(class extends xi {
|
|
|
3363
3382
|
-webkit-appearance: none;
|
|
3364
3383
|
margin: 0;
|
|
3365
3384
|
}
|
|
3385
|
+
|
|
3386
|
+
/* Toggle switch — label left, switch right. Shared by the Full Width rows
|
|
3387
|
+
(button/row panels) and the schema-driven checkbox field, so boolean
|
|
3388
|
+
options look the same everywhere instead of falling back to the native
|
|
3389
|
+
checkbox. */
|
|
3390
|
+
.toggle-row {
|
|
3391
|
+
display: flex;
|
|
3392
|
+
align-items: center;
|
|
3393
|
+
justify-content: space-between;
|
|
3394
|
+
margin-bottom: 14px;
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3397
|
+
.toggle-label {
|
|
3398
|
+
font-size: 12px;
|
|
3399
|
+
font-weight: 500;
|
|
3400
|
+
color: var(--pigeon-text-secondary, #64748b);
|
|
3401
|
+
font-family: var(--pigeon-font);
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3404
|
+
.toggle {
|
|
3405
|
+
position: relative;
|
|
3406
|
+
width: 40px;
|
|
3407
|
+
height: 22px;
|
|
3408
|
+
flex-shrink: 0;
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
.toggle input {
|
|
3412
|
+
opacity: 0;
|
|
3413
|
+
width: 0;
|
|
3414
|
+
height: 0;
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3417
|
+
.toggle-track {
|
|
3418
|
+
position: absolute;
|
|
3419
|
+
cursor: pointer;
|
|
3420
|
+
top: 0;
|
|
3421
|
+
left: 0;
|
|
3422
|
+
right: 0;
|
|
3423
|
+
bottom: 0;
|
|
3424
|
+
background: var(--pigeon-border, #e2e8f0);
|
|
3425
|
+
border-radius: 11px;
|
|
3426
|
+
transition: background 0.2s ease;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
.toggle-track::after {
|
|
3430
|
+
content: '';
|
|
3431
|
+
position: absolute;
|
|
3432
|
+
width: 18px;
|
|
3433
|
+
height: 18px;
|
|
3434
|
+
left: 2px;
|
|
3435
|
+
top: 2px;
|
|
3436
|
+
background: white;
|
|
3437
|
+
border-radius: 50%;
|
|
3438
|
+
transition: transform 0.2s ease;
|
|
3439
|
+
box-shadow: var(--pigeon-shadow-sm);
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
.toggle input:checked + .toggle-track {
|
|
3443
|
+
background: var(--pigeon-primary, #4f46e5);
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
.toggle input:checked + .toggle-track::after {
|
|
3447
|
+
transform: translateX(18px);
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
.toggle input:focus-visible + .toggle-track {
|
|
3451
|
+
box-shadow: var(--pigeon-ring-shadow);
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
/* Secondary action button (e.g. "Upload Image") — matches the input
|
|
3455
|
+
chrome so panel actions don't read as unstyled native buttons. */
|
|
3456
|
+
.btn-secondary {
|
|
3457
|
+
height: 32px;
|
|
3458
|
+
padding: 0 12px;
|
|
3459
|
+
border: 1px solid var(--pigeon-input, #cbd5e1);
|
|
3460
|
+
border-radius: var(--pigeon-radius-sm, 6px);
|
|
3461
|
+
background: var(--pigeon-bg, #ffffff);
|
|
3462
|
+
color: var(--pigeon-text, #1e293b);
|
|
3463
|
+
cursor: pointer;
|
|
3464
|
+
font-family: var(--pigeon-font);
|
|
3465
|
+
font-size: 12px;
|
|
3466
|
+
font-weight: 500;
|
|
3467
|
+
transition: background 0.15s ease, border-color 0.15s ease,
|
|
3468
|
+
box-shadow 0.15s ease;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
.btn-secondary:hover {
|
|
3472
|
+
background: var(--pigeon-surface-hover, #f1f5f9);
|
|
3473
|
+
border-color: color-mix(
|
|
3474
|
+
in srgb,
|
|
3475
|
+
var(--pigeon-input, #cbd5e1) 60%,
|
|
3476
|
+
var(--pigeon-text, #0f172a)
|
|
3477
|
+
);
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
.btn-secondary:focus-visible {
|
|
3481
|
+
outline: none;
|
|
3482
|
+
border-color: var(--pigeon-ring);
|
|
3483
|
+
box-shadow: var(--pigeon-ring-shadow);
|
|
3484
|
+
}
|
|
3366
3485
|
`;
|
|
3367
|
-
var
|
|
3368
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3486
|
+
var $i = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, wt = (e, t, o, r) => {
|
|
3487
|
+
for (var i = r > 1 ? void 0 : r ? ki(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
3369
3488
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
3370
|
-
return r && i &&
|
|
3489
|
+
return r && i && $i(t, o, i), i;
|
|
3371
3490
|
};
|
|
3372
3491
|
let Ee = class extends h {
|
|
3373
3492
|
constructor() {
|
|
@@ -3427,7 +3546,7 @@ let Ee = class extends h {
|
|
|
3427
3546
|
}));
|
|
3428
3547
|
}
|
|
3429
3548
|
};
|
|
3430
|
-
Ee.styles =
|
|
3549
|
+
Ee.styles = u`
|
|
3431
3550
|
:host {
|
|
3432
3551
|
display: block;
|
|
3433
3552
|
margin-bottom: 12px;
|
|
@@ -3490,19 +3609,19 @@ Ee.styles = g`
|
|
|
3490
3609
|
height: 16px;
|
|
3491
3610
|
}
|
|
3492
3611
|
`;
|
|
3493
|
-
|
|
3612
|
+
wt([
|
|
3494
3613
|
l({ type: String })
|
|
3495
3614
|
], Ee.prototype, "label", 2);
|
|
3496
|
-
|
|
3615
|
+
wt([
|
|
3497
3616
|
l({ type: String })
|
|
3498
3617
|
], Ee.prototype, "value", 2);
|
|
3499
|
-
Ee =
|
|
3500
|
-
|
|
3618
|
+
Ee = wt([
|
|
3619
|
+
g("pigeon-alignment-picker")
|
|
3501
3620
|
], Ee);
|
|
3502
|
-
var
|
|
3503
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3621
|
+
var Ci = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, $t = (e, t, o, r) => {
|
|
3622
|
+
for (var i = r > 1 ? void 0 : r ? Ii(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
3504
3623
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
3505
|
-
return r && i &&
|
|
3624
|
+
return r && i && Ci(t, o, i), i;
|
|
3506
3625
|
};
|
|
3507
3626
|
let je = class extends h {
|
|
3508
3627
|
constructor() {
|
|
@@ -3510,42 +3629,47 @@ let je = class extends h {
|
|
|
3510
3629
|
}
|
|
3511
3630
|
render() {
|
|
3512
3631
|
return a`
|
|
3513
|
-
<span class="label">${this.label}</span>
|
|
3514
|
-
<div class="
|
|
3632
|
+
<span class="label" id="spacing-label">${this.label}</span>
|
|
3633
|
+
<div class="group" role="group" aria-labelledby="spacing-label">
|
|
3515
3634
|
<input
|
|
3516
|
-
class="top"
|
|
3517
3635
|
type="number"
|
|
3518
3636
|
.value=${String(this.value.top)}
|
|
3519
3637
|
min="0"
|
|
3520
3638
|
@change=${(e) => this._onChange("top", e)}
|
|
3521
|
-
title="Top"
|
|
3639
|
+
title="Top (px)"
|
|
3640
|
+
aria-label="Top"
|
|
3522
3641
|
/>
|
|
3523
3642
|
<input
|
|
3524
|
-
class="left"
|
|
3525
|
-
type="number"
|
|
3526
|
-
.value=${String(this.value.left)}
|
|
3527
|
-
min="0"
|
|
3528
|
-
@change=${(e) => this._onChange("left", e)}
|
|
3529
|
-
title="Left"
|
|
3530
|
-
/>
|
|
3531
|
-
<span class="center-label">px</span>
|
|
3532
|
-
<input
|
|
3533
|
-
class="right"
|
|
3534
3643
|
type="number"
|
|
3535
3644
|
.value=${String(this.value.right)}
|
|
3536
3645
|
min="0"
|
|
3537
3646
|
@change=${(e) => this._onChange("right", e)}
|
|
3538
|
-
title="Right"
|
|
3647
|
+
title="Right (px)"
|
|
3648
|
+
aria-label="Right"
|
|
3539
3649
|
/>
|
|
3540
3650
|
<input
|
|
3541
|
-
class="bottom"
|
|
3542
3651
|
type="number"
|
|
3543
3652
|
.value=${String(this.value.bottom)}
|
|
3544
3653
|
min="0"
|
|
3545
3654
|
@change=${(e) => this._onChange("bottom", e)}
|
|
3546
|
-
title="Bottom"
|
|
3655
|
+
title="Bottom (px)"
|
|
3656
|
+
aria-label="Bottom"
|
|
3657
|
+
/>
|
|
3658
|
+
<input
|
|
3659
|
+
type="number"
|
|
3660
|
+
.value=${String(this.value.left)}
|
|
3661
|
+
min="0"
|
|
3662
|
+
@change=${(e) => this._onChange("left", e)}
|
|
3663
|
+
title="Left (px)"
|
|
3664
|
+
aria-label="Left"
|
|
3547
3665
|
/>
|
|
3548
3666
|
</div>
|
|
3667
|
+
<div class="sides" aria-hidden="true">
|
|
3668
|
+
<span class="side">Top</span>
|
|
3669
|
+
<span class="side">Right</span>
|
|
3670
|
+
<span class="side">Bottom</span>
|
|
3671
|
+
<span class="side">Left</span>
|
|
3672
|
+
</div>
|
|
3549
3673
|
`;
|
|
3550
3674
|
}
|
|
3551
3675
|
_onChange(e, t) {
|
|
@@ -3557,10 +3681,10 @@ let je = class extends h {
|
|
|
3557
3681
|
}));
|
|
3558
3682
|
}
|
|
3559
3683
|
};
|
|
3560
|
-
je.styles =
|
|
3684
|
+
je.styles = u`
|
|
3561
3685
|
:host {
|
|
3562
3686
|
display: block;
|
|
3563
|
-
margin-bottom:
|
|
3687
|
+
margin-bottom: 14px;
|
|
3564
3688
|
}
|
|
3565
3689
|
|
|
3566
3690
|
.label {
|
|
@@ -3572,65 +3696,64 @@ je.styles = g`
|
|
|
3572
3696
|
font-family: var(--pigeon-font);
|
|
3573
3697
|
}
|
|
3574
3698
|
|
|
3575
|
-
|
|
3699
|
+
/* Four joined cells in one bordered group (Figma-style) instead of the
|
|
3700
|
+
old box-model diamond — half the height, and the group reads as a
|
|
3701
|
+
single control. The ring sits on the group via :focus-within. */
|
|
3702
|
+
.group {
|
|
3576
3703
|
display: grid;
|
|
3577
|
-
grid-template-columns:
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
}
|
|
3584
|
-
|
|
3585
|
-
.top {
|
|
3586
|
-
grid-column: 2;
|
|
3587
|
-
grid-row: 1;
|
|
3588
|
-
}
|
|
3589
|
-
|
|
3590
|
-
.left {
|
|
3591
|
-
grid-column: 1;
|
|
3592
|
-
grid-row: 2;
|
|
3593
|
-
}
|
|
3594
|
-
|
|
3595
|
-
.center-label {
|
|
3596
|
-
grid-column: 2;
|
|
3597
|
-
grid-row: 2;
|
|
3598
|
-
font-size: 10px;
|
|
3599
|
-
color: var(--pigeon-text-secondary, #64748b);
|
|
3600
|
-
font-family: var(--pigeon-font);
|
|
3601
|
-
text-transform: uppercase;
|
|
3602
|
-
letter-spacing: 0.5px;
|
|
3704
|
+
grid-template-columns: repeat(4, 1fr);
|
|
3705
|
+
border: 1px solid var(--pigeon-input, #cbd5e1);
|
|
3706
|
+
border-radius: var(--pigeon-radius-sm, 6px);
|
|
3707
|
+
background: var(--pigeon-bg, #ffffff);
|
|
3708
|
+
overflow: hidden;
|
|
3709
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
3603
3710
|
}
|
|
3604
3711
|
|
|
3605
|
-
.
|
|
3606
|
-
|
|
3607
|
-
|
|
3712
|
+
.group:focus-within {
|
|
3713
|
+
border-color: var(--pigeon-ring);
|
|
3714
|
+
box-shadow: var(--pigeon-ring-shadow);
|
|
3608
3715
|
}
|
|
3609
3716
|
|
|
3610
|
-
.
|
|
3611
|
-
|
|
3612
|
-
|
|
3717
|
+
.group:hover:not(:focus-within) {
|
|
3718
|
+
border-color: color-mix(
|
|
3719
|
+
in srgb,
|
|
3720
|
+
var(--pigeon-input, #cbd5e1) 60%,
|
|
3721
|
+
var(--pigeon-text, #0f172a)
|
|
3722
|
+
);
|
|
3613
3723
|
}
|
|
3614
3724
|
|
|
3615
3725
|
input[type='number'] {
|
|
3616
|
-
width:
|
|
3617
|
-
height:
|
|
3618
|
-
border:
|
|
3619
|
-
|
|
3620
|
-
padding: 0
|
|
3726
|
+
width: 100%;
|
|
3727
|
+
height: 32px;
|
|
3728
|
+
border: none;
|
|
3729
|
+
outline: none;
|
|
3730
|
+
padding: 0 2px;
|
|
3621
3731
|
font-family: var(--pigeon-font-mono);
|
|
3622
3732
|
font-size: 12px;
|
|
3623
3733
|
color: var(--pigeon-text, #1e293b);
|
|
3624
|
-
background:
|
|
3734
|
+
background: transparent;
|
|
3625
3735
|
text-align: center;
|
|
3626
|
-
outline: none;
|
|
3627
3736
|
box-sizing: border-box;
|
|
3628
|
-
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
3629
3737
|
}
|
|
3630
3738
|
|
|
3631
|
-
input[type='number']:
|
|
3632
|
-
border-
|
|
3633
|
-
|
|
3739
|
+
input[type='number']:not(:first-child) {
|
|
3740
|
+
border-left: 1px solid var(--pigeon-border, #e2e8f0);
|
|
3741
|
+
}
|
|
3742
|
+
|
|
3743
|
+
.sides {
|
|
3744
|
+
display: grid;
|
|
3745
|
+
grid-template-columns: repeat(4, 1fr);
|
|
3746
|
+
margin-top: 3px;
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
.side {
|
|
3750
|
+
text-align: center;
|
|
3751
|
+
font-size: 9px;
|
|
3752
|
+
font-weight: 500;
|
|
3753
|
+
letter-spacing: 0.5px;
|
|
3754
|
+
text-transform: uppercase;
|
|
3755
|
+
color: var(--pigeon-text-muted, #94a3b8);
|
|
3756
|
+
font-family: var(--pigeon-font);
|
|
3634
3757
|
}
|
|
3635
3758
|
|
|
3636
3759
|
/* Hide spinner arrows */
|
|
@@ -3643,19 +3766,19 @@ je.styles = g`
|
|
|
3643
3766
|
-moz-appearance: textfield;
|
|
3644
3767
|
}
|
|
3645
3768
|
`;
|
|
3646
|
-
|
|
3769
|
+
$t([
|
|
3647
3770
|
l({ type: String })
|
|
3648
3771
|
], je.prototype, "label", 2);
|
|
3649
|
-
|
|
3772
|
+
$t([
|
|
3650
3773
|
l({ type: Object })
|
|
3651
3774
|
], je.prototype, "value", 2);
|
|
3652
|
-
je =
|
|
3653
|
-
|
|
3775
|
+
je = $t([
|
|
3776
|
+
g("pigeon-spacing-input")
|
|
3654
3777
|
], je);
|
|
3655
|
-
var
|
|
3656
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3778
|
+
var Pi = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, Z = (e, t, o, r) => {
|
|
3779
|
+
for (var i = r > 1 ? void 0 : r ? Oi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
3657
3780
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
3658
|
-
return r && i &&
|
|
3781
|
+
return r && i && Pi(t, o, i), i;
|
|
3659
3782
|
};
|
|
3660
3783
|
let A = class extends h {
|
|
3661
3784
|
constructor() {
|
|
@@ -3704,7 +3827,7 @@ let A = class extends h {
|
|
|
3704
3827
|
}));
|
|
3705
3828
|
}
|
|
3706
3829
|
};
|
|
3707
|
-
A.styles =
|
|
3830
|
+
A.styles = u`
|
|
3708
3831
|
:host {
|
|
3709
3832
|
display: block;
|
|
3710
3833
|
margin-bottom: 12px;
|
|
@@ -3823,14 +3946,14 @@ Z([
|
|
|
3823
3946
|
l({ type: String })
|
|
3824
3947
|
], A.prototype, "unit", 2);
|
|
3825
3948
|
A = Z([
|
|
3826
|
-
|
|
3949
|
+
g("pigeon-slider-input")
|
|
3827
3950
|
], A);
|
|
3828
|
-
var
|
|
3829
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
3951
|
+
var Ti = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, ue = (e, t, o, r) => {
|
|
3952
|
+
for (var i = r > 1 ? void 0 : r ? Si(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
3830
3953
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
3831
|
-
return r && i &&
|
|
3954
|
+
return r && i && Ti(t, o, i), i;
|
|
3832
3955
|
};
|
|
3833
|
-
let
|
|
3956
|
+
let H = class extends h {
|
|
3834
3957
|
constructor() {
|
|
3835
3958
|
super(...arguments), this.tags = [], this.open = !1, this.x = 0, this.y = 0, this._search = "";
|
|
3836
3959
|
}
|
|
@@ -3886,7 +4009,7 @@ let L = class extends h {
|
|
|
3886
4009
|
})), this.open = !1, this._search = "";
|
|
3887
4010
|
}
|
|
3888
4011
|
};
|
|
3889
|
-
|
|
4012
|
+
H.styles = u`
|
|
3890
4013
|
:host {
|
|
3891
4014
|
display: none;
|
|
3892
4015
|
}
|
|
@@ -3979,28 +4102,28 @@ L.styles = g`
|
|
|
3979
4102
|
`;
|
|
3980
4103
|
ue([
|
|
3981
4104
|
l({ type: Array })
|
|
3982
|
-
],
|
|
4105
|
+
], H.prototype, "tags", 2);
|
|
3983
4106
|
ue([
|
|
3984
4107
|
l({ type: Boolean, reflect: !0 })
|
|
3985
|
-
],
|
|
4108
|
+
], H.prototype, "open", 2);
|
|
3986
4109
|
ue([
|
|
3987
4110
|
l({ type: Number })
|
|
3988
|
-
],
|
|
4111
|
+
], H.prototype, "x", 2);
|
|
3989
4112
|
ue([
|
|
3990
4113
|
l({ type: Number })
|
|
3991
|
-
],
|
|
4114
|
+
], H.prototype, "y", 2);
|
|
3992
4115
|
ue([
|
|
3993
4116
|
d()
|
|
3994
|
-
],
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
],
|
|
3998
|
-
var
|
|
3999
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4117
|
+
], H.prototype, "_search", 2);
|
|
4118
|
+
H = ue([
|
|
4119
|
+
g("pigeon-merge-tag-picker")
|
|
4120
|
+
], H);
|
|
4121
|
+
var Di = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, V = (e, t, o, r) => {
|
|
4122
|
+
for (var i = r > 1 ? void 0 : r ? Ai(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
4000
4123
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
4001
|
-
return r && i &&
|
|
4124
|
+
return r && i && Di(t, o, i), i;
|
|
4002
4125
|
};
|
|
4003
|
-
let
|
|
4126
|
+
let P = class extends h {
|
|
4004
4127
|
constructor() {
|
|
4005
4128
|
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ne(), this._triggerRef = ne();
|
|
4006
4129
|
}
|
|
@@ -4073,7 +4196,7 @@ let I = class extends h {
|
|
|
4073
4196
|
}
|
|
4074
4197
|
}
|
|
4075
4198
|
_onMergeTagInsert(e) {
|
|
4076
|
-
const t =
|
|
4199
|
+
const t = bo.getActive();
|
|
4077
4200
|
if (t && !t.isDestroyed) {
|
|
4078
4201
|
const b = this._extractTagName(e.detail.tag.name);
|
|
4079
4202
|
t.chain().focus().insertContent({ type: "mergeTag", attrs: { name: b } }).run(), this._pickerOpen = !1;
|
|
@@ -4118,9 +4241,9 @@ let I = class extends h {
|
|
|
4118
4241
|
this._emit({ padding: e.detail.value });
|
|
4119
4242
|
}
|
|
4120
4243
|
};
|
|
4121
|
-
|
|
4244
|
+
P.styles = [
|
|
4122
4245
|
k,
|
|
4123
|
-
|
|
4246
|
+
u`
|
|
4124
4247
|
/* Content textarea uses the monospace face so the HTML payload is
|
|
4125
4248
|
readable to authors editing the raw markup. */
|
|
4126
4249
|
textarea {
|
|
@@ -4163,39 +4286,39 @@ I.styles = [
|
|
|
4163
4286
|
}
|
|
4164
4287
|
`
|
|
4165
4288
|
];
|
|
4166
|
-
|
|
4289
|
+
V([
|
|
4167
4290
|
l({ type: Object })
|
|
4168
|
-
],
|
|
4169
|
-
|
|
4291
|
+
], P.prototype, "block", 2);
|
|
4292
|
+
V([
|
|
4170
4293
|
l({ type: String })
|
|
4171
|
-
],
|
|
4172
|
-
|
|
4294
|
+
], P.prototype, "rowId", 2);
|
|
4295
|
+
V([
|
|
4173
4296
|
l({ type: String })
|
|
4174
|
-
],
|
|
4175
|
-
|
|
4297
|
+
], P.prototype, "columnId", 2);
|
|
4298
|
+
V([
|
|
4176
4299
|
l({ type: Array })
|
|
4177
|
-
],
|
|
4178
|
-
|
|
4300
|
+
], P.prototype, "mergeTags", 2);
|
|
4301
|
+
V([
|
|
4179
4302
|
d()
|
|
4180
|
-
],
|
|
4181
|
-
|
|
4303
|
+
], P.prototype, "_pickerOpen", 2);
|
|
4304
|
+
V([
|
|
4182
4305
|
d()
|
|
4183
|
-
],
|
|
4184
|
-
|
|
4306
|
+
], P.prototype, "_pickerX", 2);
|
|
4307
|
+
V([
|
|
4185
4308
|
d()
|
|
4186
|
-
],
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
],
|
|
4190
|
-
var
|
|
4191
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
4309
|
+
], P.prototype, "_pickerY", 2);
|
|
4310
|
+
P = V([
|
|
4311
|
+
g("pigeon-text-panel")
|
|
4312
|
+
], P);
|
|
4313
|
+
var Ei = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, w = (e, t, o, r) => {
|
|
4314
|
+
for (var i = r > 1 ? void 0 : r ? ji(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
4192
4315
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
4193
|
-
return r && i &&
|
|
4316
|
+
return r && i && Ei(t, o, i), i;
|
|
4194
4317
|
};
|
|
4195
|
-
const
|
|
4318
|
+
const Bi = 250, Ue = "__all__";
|
|
4196
4319
|
let x = class extends h {
|
|
4197
4320
|
constructor() {
|
|
4198
|
-
super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder =
|
|
4321
|
+
super(...arguments), this.config = {}, this.open = !1, this._tab = null, this._dragOver = !1, this._uploading = !1, this._progress = 0, this._error = "", this._urlInput = "", this._folder = Ue, this._search = "", this._selectedTags = [], this._folders = [], this._assets = [], this._libraryLoading = !1, this._libraryError = "", this._searchTimer = null, this._libraryToken = 0;
|
|
4199
4322
|
}
|
|
4200
4323
|
/* ----------------------------------------------------------------- */
|
|
4201
4324
|
/* Lifecycle */
|
|
@@ -4257,7 +4380,7 @@ let x = class extends h {
|
|
|
4257
4380
|
.value=${this._folder}
|
|
4258
4381
|
@change=${this._onFolderChange}
|
|
4259
4382
|
>
|
|
4260
|
-
<option value=${
|
|
4383
|
+
<option value=${Ue}>All folders</option>
|
|
4261
4384
|
${this._folders.map(
|
|
4262
4385
|
(e) => a`<option value=${e} ?selected=${this._folder === e}>${e}</option>`
|
|
4263
4386
|
)}
|
|
@@ -4281,7 +4404,7 @@ let x = class extends h {
|
|
|
4281
4404
|
</div>` : me}
|
|
4282
4405
|
${this._libraryError ? a`<div class="error">${this._libraryError}</div>` : me}
|
|
4283
4406
|
${this._libraryLoading ? a`<div class="library-spinner">Loading…</div>` : this._assets.length === 0 ? a`<div class="empty-library">
|
|
4284
|
-
${this._search || this._selectedTags.length > 0 || this._folder !==
|
|
4407
|
+
${this._search || this._selectedTags.length > 0 || this._folder !== Ue ? "No assets match your filters." : "No saved assets yet. Upload one to get started."}
|
|
4285
4408
|
</div>` : a`<div class="asset-grid">
|
|
4286
4409
|
${this._assets.map((e) => this._renderAssetCard(e))}
|
|
4287
4410
|
</div>`}
|
|
@@ -4359,7 +4482,7 @@ let x = class extends h {
|
|
|
4359
4482
|
this._libraryLoading = !0, this._libraryError = "";
|
|
4360
4483
|
try {
|
|
4361
4484
|
const t = await this.storage.list({
|
|
4362
|
-
folder: this._folder ===
|
|
4485
|
+
folder: this._folder === Ue ? void 0 : this._folder,
|
|
4363
4486
|
search: this._search.trim() || void 0,
|
|
4364
4487
|
tags: this._selectedTags.length > 0 ? this._selectedTags : void 0
|
|
4365
4488
|
});
|
|
@@ -4384,7 +4507,7 @@ let x = class extends h {
|
|
|
4384
4507
|
this._folder = e.target.value, this._loadAssets();
|
|
4385
4508
|
}
|
|
4386
4509
|
_onSearchInput(e) {
|
|
4387
|
-
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(),
|
|
4510
|
+
this._search = e.target.value, this._searchTimer && clearTimeout(this._searchTimer), this._searchTimer = setTimeout(() => this._loadAssets(), Bi);
|
|
4388
4511
|
}
|
|
4389
4512
|
_toggleTag(e) {
|
|
4390
4513
|
this._selectedTags = this._selectedTags.includes(e) ? this._selectedTags.filter((t) => t !== e) : [...this._selectedTags, e], this._loadAssets();
|
|
@@ -4516,7 +4639,7 @@ let x = class extends h {
|
|
|
4516
4639
|
), this._close();
|
|
4517
4640
|
}
|
|
4518
4641
|
};
|
|
4519
|
-
x.styles =
|
|
4642
|
+
x.styles = u`
|
|
4520
4643
|
:host {
|
|
4521
4644
|
display: none;
|
|
4522
4645
|
}
|
|
@@ -4896,12 +5019,12 @@ w([
|
|
|
4896
5019
|
d()
|
|
4897
5020
|
], x.prototype, "_libraryError", 2);
|
|
4898
5021
|
x = w([
|
|
4899
|
-
|
|
5022
|
+
g("pigeon-asset-manager")
|
|
4900
5023
|
], x);
|
|
4901
|
-
var
|
|
5024
|
+
var Ri = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Q = (e, t, o, r) => {
|
|
4902
5025
|
for (var i = r > 1 ? void 0 : r ? Mi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
4903
5026
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
4904
|
-
return r && i &&
|
|
5027
|
+
return r && i && Ri(t, o, i), i;
|
|
4905
5028
|
};
|
|
4906
5029
|
let E = class extends h {
|
|
4907
5030
|
constructor() {
|
|
@@ -4922,7 +5045,7 @@ let E = class extends h {
|
|
|
4922
5045
|
placeholder="https://example.com/image.jpg"
|
|
4923
5046
|
@change=${this._onSrcChange}
|
|
4924
5047
|
/>
|
|
4925
|
-
${o ? a`<button class="upload-btn" @click=${this._openAssetManager}>Upload Image</button>` : ""}
|
|
5048
|
+
${o ? a`<button class="btn-secondary upload-btn" @click=${this._openAssetManager}>Upload Image</button>` : ""}
|
|
4926
5049
|
</div>
|
|
4927
5050
|
|
|
4928
5051
|
${o ? a`<pigeon-asset-manager
|
|
@@ -4943,12 +5066,12 @@ let E = class extends h {
|
|
|
4943
5066
|
</div>
|
|
4944
5067
|
|
|
4945
5068
|
<pigeon-slider-input
|
|
4946
|
-
label="Width"
|
|
5069
|
+
label="Width (0 = auto)"
|
|
4947
5070
|
.value=${t}
|
|
4948
5071
|
min=${0}
|
|
4949
5072
|
max=${800}
|
|
4950
5073
|
step=${1}
|
|
4951
|
-
unit="px
|
|
5074
|
+
unit="px"
|
|
4952
5075
|
@slider-change=${this._onWidthChange}
|
|
4953
5076
|
></pigeon-slider-input>
|
|
4954
5077
|
|
|
@@ -5026,24 +5149,9 @@ let E = class extends h {
|
|
|
5026
5149
|
};
|
|
5027
5150
|
E.styles = [
|
|
5028
5151
|
k,
|
|
5029
|
-
|
|
5152
|
+
u`
|
|
5030
5153
|
.upload-btn {
|
|
5031
|
-
|
|
5032
|
-
padding: 0 12px;
|
|
5033
|
-
border: 1px solid var(--pigeon-border, #e2e8f0);
|
|
5034
|
-
border-radius: var(--pigeon-radius-sm, 4px);
|
|
5035
|
-
background: var(--pigeon-surface, #f8fafc);
|
|
5036
|
-
color: var(--pigeon-text, #1e293b);
|
|
5037
|
-
cursor: pointer;
|
|
5038
|
-
font-family: var(--pigeon-font);
|
|
5039
|
-
font-size: 12px;
|
|
5040
|
-
font-weight: 500;
|
|
5041
|
-
margin-top: 4px;
|
|
5042
|
-
}
|
|
5043
|
-
|
|
5044
|
-
.upload-btn:hover {
|
|
5045
|
-
background: var(--pigeon-surface-hover, #f1f5f9);
|
|
5046
|
-
border-color: var(--pigeon-primary, #3b82f6);
|
|
5154
|
+
margin-top: 6px;
|
|
5047
5155
|
}
|
|
5048
5156
|
`
|
|
5049
5157
|
];
|
|
@@ -5066,12 +5174,12 @@ Q([
|
|
|
5066
5174
|
d()
|
|
5067
5175
|
], E.prototype, "_assetManagerOpen", 2);
|
|
5068
5176
|
E = Q([
|
|
5069
|
-
|
|
5177
|
+
g("pigeon-image-panel")
|
|
5070
5178
|
], E);
|
|
5071
|
-
var
|
|
5072
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5179
|
+
var zi = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, kt = (e, t, o, r) => {
|
|
5180
|
+
for (var i = r > 1 ? void 0 : r ? Li(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
5073
5181
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
5074
|
-
return r && i &&
|
|
5182
|
+
return r && i && zi(t, o, i), i;
|
|
5075
5183
|
};
|
|
5076
5184
|
let Be = class extends h {
|
|
5077
5185
|
constructor() {
|
|
@@ -5111,7 +5219,7 @@ let Be = class extends h {
|
|
|
5111
5219
|
}));
|
|
5112
5220
|
}
|
|
5113
5221
|
};
|
|
5114
|
-
Be.styles =
|
|
5222
|
+
Be.styles = u`
|
|
5115
5223
|
:host {
|
|
5116
5224
|
display: block;
|
|
5117
5225
|
margin-bottom: 12px;
|
|
@@ -5180,19 +5288,19 @@ Be.styles = g`
|
|
|
5180
5288
|
box-shadow: var(--pigeon-ring-shadow);
|
|
5181
5289
|
}
|
|
5182
5290
|
`;
|
|
5183
|
-
|
|
5291
|
+
kt([
|
|
5184
5292
|
l({ type: String })
|
|
5185
5293
|
], Be.prototype, "label", 2);
|
|
5186
|
-
|
|
5294
|
+
kt([
|
|
5187
5295
|
l({ type: String })
|
|
5188
5296
|
], Be.prototype, "value", 2);
|
|
5189
|
-
Be =
|
|
5190
|
-
|
|
5297
|
+
Be = kt([
|
|
5298
|
+
g("pigeon-color-picker")
|
|
5191
5299
|
], Be);
|
|
5192
|
-
var
|
|
5193
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5300
|
+
var Hi = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, Qe = (e, t, o, r) => {
|
|
5301
|
+
for (var i = r > 1 ? void 0 : r ? Ni(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
5194
5302
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
5195
|
-
return r && i &&
|
|
5303
|
+
return r && i && Hi(t, o, i), i;
|
|
5196
5304
|
};
|
|
5197
5305
|
let ae = class extends h {
|
|
5198
5306
|
constructor() {
|
|
@@ -5346,69 +5454,7 @@ let ae = class extends h {
|
|
|
5346
5454
|
this._emit({ innerPadding: e.detail.value });
|
|
5347
5455
|
}
|
|
5348
5456
|
};
|
|
5349
|
-
ae.styles =
|
|
5350
|
-
k,
|
|
5351
|
-
g`
|
|
5352
|
-
.toggle-row {
|
|
5353
|
-
display: flex;
|
|
5354
|
-
align-items: center;
|
|
5355
|
-
justify-content: space-between;
|
|
5356
|
-
margin-bottom: 12px;
|
|
5357
|
-
}
|
|
5358
|
-
|
|
5359
|
-
.toggle-label {
|
|
5360
|
-
font-size: 12px;
|
|
5361
|
-
font-weight: 500;
|
|
5362
|
-
color: var(--pigeon-text-secondary, #64748b);
|
|
5363
|
-
font-family: var(--pigeon-font);
|
|
5364
|
-
}
|
|
5365
|
-
|
|
5366
|
-
.toggle {
|
|
5367
|
-
position: relative;
|
|
5368
|
-
width: 40px;
|
|
5369
|
-
height: 22px;
|
|
5370
|
-
}
|
|
5371
|
-
|
|
5372
|
-
.toggle input {
|
|
5373
|
-
opacity: 0;
|
|
5374
|
-
width: 0;
|
|
5375
|
-
height: 0;
|
|
5376
|
-
}
|
|
5377
|
-
|
|
5378
|
-
.toggle-track {
|
|
5379
|
-
position: absolute;
|
|
5380
|
-
cursor: pointer;
|
|
5381
|
-
top: 0;
|
|
5382
|
-
left: 0;
|
|
5383
|
-
right: 0;
|
|
5384
|
-
bottom: 0;
|
|
5385
|
-
background: var(--pigeon-border, #e2e8f0);
|
|
5386
|
-
border-radius: 11px;
|
|
5387
|
-
transition: background 0.2s ease;
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
|
-
.toggle-track::after {
|
|
5391
|
-
content: '';
|
|
5392
|
-
position: absolute;
|
|
5393
|
-
width: 18px;
|
|
5394
|
-
height: 18px;
|
|
5395
|
-
left: 2px;
|
|
5396
|
-
top: 2px;
|
|
5397
|
-
background: white;
|
|
5398
|
-
border-radius: 50%;
|
|
5399
|
-
transition: transform 0.2s ease;
|
|
5400
|
-
box-shadow: var(--pigeon-shadow-sm);
|
|
5401
|
-
}
|
|
5402
|
-
|
|
5403
|
-
.toggle input:checked + .toggle-track {
|
|
5404
|
-
background: var(--pigeon-primary, #3b82f6);
|
|
5405
|
-
}
|
|
5406
|
-
|
|
5407
|
-
.toggle input:checked + .toggle-track::after {
|
|
5408
|
-
transform: translateX(18px);
|
|
5409
|
-
}
|
|
5410
|
-
`
|
|
5411
|
-
];
|
|
5457
|
+
ae.styles = k;
|
|
5412
5458
|
Qe([
|
|
5413
5459
|
l({ type: Object })
|
|
5414
5460
|
], ae.prototype, "block", 2);
|
|
@@ -5419,10 +5465,10 @@ Qe([
|
|
|
5419
5465
|
l({ type: String })
|
|
5420
5466
|
], ae.prototype, "columnId", 2);
|
|
5421
5467
|
ae = Qe([
|
|
5422
|
-
|
|
5468
|
+
g("pigeon-button-panel")
|
|
5423
5469
|
], ae);
|
|
5424
|
-
var Ui = Object.defineProperty,
|
|
5425
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5470
|
+
var Ui = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Jt = (e, t, o, r) => {
|
|
5471
|
+
for (var i = r > 1 ? void 0 : r ? Fi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
5426
5472
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
5427
5473
|
return r && i && Ui(t, o, i), i;
|
|
5428
5474
|
};
|
|
@@ -5547,7 +5593,7 @@ let qe = class extends h {
|
|
|
5547
5593
|
};
|
|
5548
5594
|
qe.styles = [
|
|
5549
5595
|
k,
|
|
5550
|
-
|
|
5596
|
+
u`
|
|
5551
5597
|
.hint {
|
|
5552
5598
|
margin: 4px 0 0;
|
|
5553
5599
|
font-size: 11px;
|
|
@@ -5564,65 +5610,6 @@ qe.styles = [
|
|
|
5564
5610
|
border-radius: 3px;
|
|
5565
5611
|
}
|
|
5566
5612
|
|
|
5567
|
-
.toggle-row {
|
|
5568
|
-
display: flex;
|
|
5569
|
-
align-items: center;
|
|
5570
|
-
justify-content: space-between;
|
|
5571
|
-
margin-bottom: 14px;
|
|
5572
|
-
}
|
|
5573
|
-
|
|
5574
|
-
.toggle-label {
|
|
5575
|
-
font-size: 12px;
|
|
5576
|
-
font-weight: 500;
|
|
5577
|
-
color: var(--pigeon-text-secondary, #64748b);
|
|
5578
|
-
font-family: var(--pigeon-font);
|
|
5579
|
-
}
|
|
5580
|
-
|
|
5581
|
-
.toggle {
|
|
5582
|
-
position: relative;
|
|
5583
|
-
width: 40px;
|
|
5584
|
-
height: 22px;
|
|
5585
|
-
}
|
|
5586
|
-
|
|
5587
|
-
.toggle input {
|
|
5588
|
-
opacity: 0;
|
|
5589
|
-
width: 0;
|
|
5590
|
-
height: 0;
|
|
5591
|
-
}
|
|
5592
|
-
|
|
5593
|
-
.toggle-track {
|
|
5594
|
-
position: absolute;
|
|
5595
|
-
cursor: pointer;
|
|
5596
|
-
top: 0;
|
|
5597
|
-
left: 0;
|
|
5598
|
-
right: 0;
|
|
5599
|
-
bottom: 0;
|
|
5600
|
-
background: var(--pigeon-border, #e2e8f0);
|
|
5601
|
-
border-radius: 11px;
|
|
5602
|
-
transition: background 0.2s ease;
|
|
5603
|
-
}
|
|
5604
|
-
|
|
5605
|
-
.toggle-track::after {
|
|
5606
|
-
content: '';
|
|
5607
|
-
position: absolute;
|
|
5608
|
-
width: 18px;
|
|
5609
|
-
height: 18px;
|
|
5610
|
-
left: 2px;
|
|
5611
|
-
top: 2px;
|
|
5612
|
-
background: white;
|
|
5613
|
-
border-radius: 50%;
|
|
5614
|
-
transition: transform 0.2s ease;
|
|
5615
|
-
box-shadow: var(--pigeon-shadow-sm);
|
|
5616
|
-
}
|
|
5617
|
-
|
|
5618
|
-
.toggle input:checked + .toggle-track {
|
|
5619
|
-
background: var(--pigeon-primary, #4f46e5);
|
|
5620
|
-
}
|
|
5621
|
-
|
|
5622
|
-
.toggle input:checked + .toggle-track::after {
|
|
5623
|
-
transform: translateX(18px);
|
|
5624
|
-
}
|
|
5625
|
-
|
|
5626
5613
|
.section-label {
|
|
5627
5614
|
display: block;
|
|
5628
5615
|
font-size: 12px;
|
|
@@ -5679,14 +5666,14 @@ Jt([
|
|
|
5679
5666
|
l({ type: Object })
|
|
5680
5667
|
], qe.prototype, "row", 2);
|
|
5681
5668
|
qe = Jt([
|
|
5682
|
-
|
|
5669
|
+
g("pigeon-row-panel")
|
|
5683
5670
|
], qe);
|
|
5684
|
-
var
|
|
5685
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5671
|
+
var Wi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, be = (e, t, o, r) => {
|
|
5672
|
+
for (var i = r > 1 ? void 0 : r ? Vi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
5686
5673
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
5687
|
-
return r && i &&
|
|
5674
|
+
return r && i && Wi(t, o, i), i;
|
|
5688
5675
|
};
|
|
5689
|
-
let
|
|
5676
|
+
let N = class extends h {
|
|
5690
5677
|
constructor() {
|
|
5691
5678
|
super(...arguments), this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._previewInputRef = ne(), this._triggerRef = ne(), this._fontFamilies = [
|
|
5692
5679
|
"Arial, Helvetica, sans-serif",
|
|
@@ -5824,9 +5811,9 @@ let H = class extends h {
|
|
|
5824
5811
|
this._emit({ metaField: "previewText", value: e.target.value });
|
|
5825
5812
|
}
|
|
5826
5813
|
};
|
|
5827
|
-
|
|
5814
|
+
N.styles = [
|
|
5828
5815
|
k,
|
|
5829
|
-
|
|
5816
|
+
u`
|
|
5830
5817
|
.alignment-buttons {
|
|
5831
5818
|
display: flex;
|
|
5832
5819
|
gap: 0;
|
|
@@ -5900,26 +5887,26 @@ H.styles = [
|
|
|
5900
5887
|
];
|
|
5901
5888
|
be([
|
|
5902
5889
|
l({ type: Object })
|
|
5903
|
-
],
|
|
5890
|
+
], N.prototype, "doc", 2);
|
|
5904
5891
|
be([
|
|
5905
5892
|
l({ type: Array })
|
|
5906
|
-
],
|
|
5893
|
+
], N.prototype, "mergeTags", 2);
|
|
5907
5894
|
be([
|
|
5908
5895
|
d()
|
|
5909
|
-
],
|
|
5896
|
+
], N.prototype, "_pickerOpen", 2);
|
|
5910
5897
|
be([
|
|
5911
5898
|
d()
|
|
5912
|
-
],
|
|
5899
|
+
], N.prototype, "_pickerX", 2);
|
|
5913
5900
|
be([
|
|
5914
5901
|
d()
|
|
5915
|
-
],
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
],
|
|
5919
|
-
var
|
|
5920
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
5902
|
+
], N.prototype, "_pickerY", 2);
|
|
5903
|
+
N = be([
|
|
5904
|
+
g("pigeon-body-panel")
|
|
5905
|
+
], N);
|
|
5906
|
+
var Yi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, ee = (e, t, o, r) => {
|
|
5907
|
+
for (var i = r > 1 ? void 0 : r ? qi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
5921
5908
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
5922
|
-
return r && i &&
|
|
5909
|
+
return r && i && Yi(t, o, i), i;
|
|
5923
5910
|
};
|
|
5924
5911
|
let j = class extends h {
|
|
5925
5912
|
constructor() {
|
|
@@ -6093,12 +6080,12 @@ ee([
|
|
|
6093
6080
|
d()
|
|
6094
6081
|
], j.prototype, "_assetManagerOpen", 2);
|
|
6095
6082
|
j = ee([
|
|
6096
|
-
|
|
6083
|
+
g("pigeon-hero-panel")
|
|
6097
6084
|
], j);
|
|
6098
|
-
var
|
|
6099
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6085
|
+
var Xi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, et = (e, t, o, r) => {
|
|
6086
|
+
for (var i = r > 1 ? void 0 : r ? Gi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6100
6087
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6101
|
-
return r && i &&
|
|
6088
|
+
return r && i && Xi(t, o, i), i;
|
|
6102
6089
|
};
|
|
6103
6090
|
let le = class extends h {
|
|
6104
6091
|
constructor() {
|
|
@@ -6238,7 +6225,7 @@ let le = class extends h {
|
|
|
6238
6225
|
};
|
|
6239
6226
|
le.styles = [
|
|
6240
6227
|
k,
|
|
6241
|
-
|
|
6228
|
+
u`
|
|
6242
6229
|
h4 {
|
|
6243
6230
|
margin: 0 0 8px;
|
|
6244
6231
|
font-size: 12px;
|
|
@@ -6306,12 +6293,12 @@ et([
|
|
|
6306
6293
|
l({ type: String })
|
|
6307
6294
|
], le.prototype, "columnId", 2);
|
|
6308
6295
|
le = et([
|
|
6309
|
-
|
|
6296
|
+
g("pigeon-navbar-panel")
|
|
6310
6297
|
], le);
|
|
6311
|
-
var
|
|
6312
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6298
|
+
var Ki = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, tt = (e, t, o, r) => {
|
|
6299
|
+
for (var i = r > 1 ? void 0 : r ? Ji(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6313
6300
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6314
|
-
return r && i &&
|
|
6301
|
+
return r && i && Ki(t, o, i), i;
|
|
6315
6302
|
};
|
|
6316
6303
|
let pe = class extends h {
|
|
6317
6304
|
constructor() {
|
|
@@ -6404,12 +6391,12 @@ tt([
|
|
|
6404
6391
|
l({ type: String })
|
|
6405
6392
|
], pe.prototype, "columnId", 2);
|
|
6406
6393
|
pe = tt([
|
|
6407
|
-
|
|
6394
|
+
g("pigeon-divider-panel")
|
|
6408
6395
|
], pe);
|
|
6409
|
-
var
|
|
6410
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6396
|
+
var Zi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, ot = (e, t, o, r) => {
|
|
6397
|
+
for (var i = r > 1 ? void 0 : r ? Qi(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6411
6398
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6412
|
-
return r && i &&
|
|
6399
|
+
return r && i && Zi(t, o, i), i;
|
|
6413
6400
|
};
|
|
6414
6401
|
let ce = class extends h {
|
|
6415
6402
|
constructor() {
|
|
@@ -6459,14 +6446,14 @@ ot([
|
|
|
6459
6446
|
l({ type: String })
|
|
6460
6447
|
], ce.prototype, "columnId", 2);
|
|
6461
6448
|
ce = ot([
|
|
6462
|
-
|
|
6449
|
+
g("pigeon-spacer-panel")
|
|
6463
6450
|
], ce);
|
|
6464
|
-
var
|
|
6465
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6451
|
+
var er = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, it = (e, t, o, r) => {
|
|
6452
|
+
for (var i = r > 1 ? void 0 : r ? tr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6466
6453
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6467
|
-
return r && i &&
|
|
6454
|
+
return r && i && er(t, o, i), i;
|
|
6468
6455
|
};
|
|
6469
|
-
const
|
|
6456
|
+
const or = [
|
|
6470
6457
|
"facebook",
|
|
6471
6458
|
"twitter",
|
|
6472
6459
|
"instagram",
|
|
@@ -6495,7 +6482,7 @@ let de = class extends h {
|
|
|
6495
6482
|
<div class="field">
|
|
6496
6483
|
<label>Network</label>
|
|
6497
6484
|
<select @change=${(r) => this._onIconTypeChange(o, r)}>
|
|
6498
|
-
${
|
|
6485
|
+
${or.map((r) => a`
|
|
6499
6486
|
<option value=${r} ?selected=${t.type === r}>${r}</option>
|
|
6500
6487
|
`)}
|
|
6501
6488
|
</select>
|
|
@@ -6621,7 +6608,7 @@ let de = class extends h {
|
|
|
6621
6608
|
};
|
|
6622
6609
|
de.styles = [
|
|
6623
6610
|
k,
|
|
6624
|
-
|
|
6611
|
+
u`
|
|
6625
6612
|
h4 {
|
|
6626
6613
|
margin: 0 0 8px;
|
|
6627
6614
|
font-size: 12px;
|
|
@@ -6689,14 +6676,14 @@ it([
|
|
|
6689
6676
|
l({ type: String })
|
|
6690
6677
|
], de.prototype, "columnId", 2);
|
|
6691
6678
|
de = it([
|
|
6692
|
-
|
|
6679
|
+
g("pigeon-social-panel")
|
|
6693
6680
|
], de);
|
|
6694
|
-
var
|
|
6695
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6681
|
+
var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, Y = (e, t, o, r) => {
|
|
6682
|
+
for (var i = r > 1 ? void 0 : r ? rr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6696
6683
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6697
|
-
return r && i &&
|
|
6684
|
+
return r && i && ir(t, o, i), i;
|
|
6698
6685
|
};
|
|
6699
|
-
let
|
|
6686
|
+
let O = class extends h {
|
|
6700
6687
|
constructor() {
|
|
6701
6688
|
super(...arguments), this.rowId = "", this.columnId = "", this.mergeTags = [], this._pickerOpen = !1, this._pickerX = 0, this._pickerY = 0, this._textareaRef = ne(), this._triggerRef = ne();
|
|
6702
6689
|
}
|
|
@@ -6776,9 +6763,9 @@ let P = class extends h {
|
|
|
6776
6763
|
t.setSelectionRange(c, c), t.focus(), this._emit({ content: s }), this._pickerOpen = !1;
|
|
6777
6764
|
}
|
|
6778
6765
|
};
|
|
6779
|
-
|
|
6766
|
+
O.styles = [
|
|
6780
6767
|
k,
|
|
6781
|
-
|
|
6768
|
+
u`
|
|
6782
6769
|
/* HTML payload is raw markup — show in monospace and taller than the
|
|
6783
6770
|
default textarea so authors have room to work. */
|
|
6784
6771
|
textarea {
|
|
@@ -6821,34 +6808,34 @@ P.styles = [
|
|
|
6821
6808
|
}
|
|
6822
6809
|
`
|
|
6823
6810
|
];
|
|
6824
|
-
|
|
6811
|
+
Y([
|
|
6825
6812
|
l({ type: Object })
|
|
6826
|
-
],
|
|
6827
|
-
|
|
6813
|
+
], O.prototype, "block", 2);
|
|
6814
|
+
Y([
|
|
6828
6815
|
l({ type: String })
|
|
6829
|
-
],
|
|
6830
|
-
|
|
6816
|
+
], O.prototype, "rowId", 2);
|
|
6817
|
+
Y([
|
|
6831
6818
|
l({ type: String })
|
|
6832
|
-
],
|
|
6833
|
-
|
|
6819
|
+
], O.prototype, "columnId", 2);
|
|
6820
|
+
Y([
|
|
6834
6821
|
l({ type: Array })
|
|
6835
|
-
],
|
|
6836
|
-
|
|
6822
|
+
], O.prototype, "mergeTags", 2);
|
|
6823
|
+
Y([
|
|
6837
6824
|
d()
|
|
6838
|
-
],
|
|
6839
|
-
|
|
6825
|
+
], O.prototype, "_pickerOpen", 2);
|
|
6826
|
+
Y([
|
|
6840
6827
|
d()
|
|
6841
|
-
],
|
|
6842
|
-
|
|
6828
|
+
], O.prototype, "_pickerX", 2);
|
|
6829
|
+
Y([
|
|
6843
6830
|
d()
|
|
6844
|
-
],
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
],
|
|
6848
|
-
var
|
|
6849
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6831
|
+
], O.prototype, "_pickerY", 2);
|
|
6832
|
+
O = Y([
|
|
6833
|
+
g("pigeon-html-panel")
|
|
6834
|
+
], O);
|
|
6835
|
+
var nr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, ve = (e, t, o, r) => {
|
|
6836
|
+
for (var i = r > 1 ? void 0 : r ? sr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6850
6837
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6851
|
-
return r && i &&
|
|
6838
|
+
return r && i && nr(t, o, i), i;
|
|
6852
6839
|
};
|
|
6853
6840
|
let U = class extends h {
|
|
6854
6841
|
constructor() {
|
|
@@ -6901,14 +6888,17 @@ let U = class extends h {
|
|
|
6901
6888
|
`;
|
|
6902
6889
|
case "checkbox":
|
|
6903
6890
|
return a`
|
|
6904
|
-
<div class="
|
|
6905
|
-
<
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6891
|
+
<div class="toggle-row">
|
|
6892
|
+
<label class="toggle-label" for=${e.key}>${e.label}</label>
|
|
6893
|
+
<label class="toggle">
|
|
6894
|
+
<input
|
|
6895
|
+
id=${e.key}
|
|
6896
|
+
type="checkbox"
|
|
6897
|
+
.checked=${!!t}
|
|
6898
|
+
@change=${(o) => this._emit(e.key, o.target.checked)}
|
|
6899
|
+
/>
|
|
6900
|
+
<span class="toggle-track"></span>
|
|
6901
|
+
</label>
|
|
6912
6902
|
</div>
|
|
6913
6903
|
`;
|
|
6914
6904
|
case "select":
|
|
@@ -6957,24 +6947,7 @@ let U = class extends h {
|
|
|
6957
6947
|
);
|
|
6958
6948
|
}
|
|
6959
6949
|
};
|
|
6960
|
-
U.styles =
|
|
6961
|
-
k,
|
|
6962
|
-
g`
|
|
6963
|
-
:host {
|
|
6964
|
-
display: block;
|
|
6965
|
-
}
|
|
6966
|
-
|
|
6967
|
-
.checkbox-row {
|
|
6968
|
-
display: flex;
|
|
6969
|
-
align-items: center;
|
|
6970
|
-
gap: 8px;
|
|
6971
|
-
}
|
|
6972
|
-
|
|
6973
|
-
.checkbox-row label {
|
|
6974
|
-
margin-bottom: 0;
|
|
6975
|
-
}
|
|
6976
|
-
`
|
|
6977
|
-
];
|
|
6950
|
+
U.styles = k;
|
|
6978
6951
|
ve([
|
|
6979
6952
|
l({ type: Object })
|
|
6980
6953
|
], U.prototype, "block", 2);
|
|
@@ -6991,14 +6964,14 @@ ve([
|
|
|
6991
6964
|
l({ type: Array })
|
|
6992
6965
|
], U.prototype, "schema", 2);
|
|
6993
6966
|
U = ve([
|
|
6994
|
-
|
|
6967
|
+
g("pigeon-custom-panel")
|
|
6995
6968
|
], U);
|
|
6996
|
-
var
|
|
6997
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6969
|
+
var ar = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, fe = (e, t, o, r) => {
|
|
6970
|
+
for (var i = r > 1 ? void 0 : r ? lr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
6998
6971
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
6999
|
-
return r && i &&
|
|
6972
|
+
return r && i && ar(t, o, i), i;
|
|
7000
6973
|
};
|
|
7001
|
-
let
|
|
6974
|
+
let F = class extends h {
|
|
7002
6975
|
constructor() {
|
|
7003
6976
|
super(...arguments), this.selection = null, this.mergeTags = [];
|
|
7004
6977
|
}
|
|
@@ -7024,12 +6997,14 @@ let N = class extends h {
|
|
|
7024
6997
|
if (e)
|
|
7025
6998
|
return a`
|
|
7026
6999
|
<div class="panel-wrapper" part="panel">
|
|
7000
|
+
${this._renderBreadcrumb(this.selection.rowId, this.selection.columnId, this._blockLabel(e))}
|
|
7027
7001
|
${this._renderBlockPanel(e, this.selection.rowId, this.selection.columnId)}
|
|
7028
7002
|
</div>
|
|
7029
7003
|
`;
|
|
7030
7004
|
}
|
|
7031
7005
|
return this.selection.type === "column" ? a`
|
|
7032
7006
|
<div class="panel-wrapper" part="panel">
|
|
7007
|
+
${this.selection.rowId && this.selection.columnId ? this._renderBreadcrumb(this.selection.rowId, this.selection.columnId) : ""}
|
|
7033
7008
|
<div class="empty-state">
|
|
7034
7009
|
<p>Column selected. Select a block within the column to edit its properties.</p>
|
|
7035
7010
|
</div>
|
|
@@ -7045,6 +7020,51 @@ let N = class extends h {
|
|
|
7045
7020
|
</div>
|
|
7046
7021
|
`;
|
|
7047
7022
|
}
|
|
7023
|
+
/**
|
|
7024
|
+
* Renders the parent-selection trail. `Row` is always a clickable jump to
|
|
7025
|
+
* the parent row. When a block is selected (`current` set), `Column` is also
|
|
7026
|
+
* clickable and the block label is the trailing, non-interactive crumb. For
|
|
7027
|
+
* a column selection (`current` omitted) `Column` is the trailing crumb.
|
|
7028
|
+
*/
|
|
7029
|
+
_renderBreadcrumb(e, t, o) {
|
|
7030
|
+
return a`
|
|
7031
|
+
<nav class="breadcrumb" aria-label="Selection path">
|
|
7032
|
+
<button class="crumb" title="Select row" @click=${() => this._select("row-select", { rowId: e })}>
|
|
7033
|
+
Row
|
|
7034
|
+
</button>
|
|
7035
|
+
${t ? a`
|
|
7036
|
+
<span class="sep" aria-hidden="true">▸</span>
|
|
7037
|
+
${o ? a`<button
|
|
7038
|
+
class="crumb"
|
|
7039
|
+
title="Select column"
|
|
7040
|
+
@click=${() => this._select("column-select", { rowId: e, columnId: t })}
|
|
7041
|
+
>
|
|
7042
|
+
Column
|
|
7043
|
+
</button>` : a`<span class="crumb current">Column</span>`}
|
|
7044
|
+
` : ""}
|
|
7045
|
+
${o ? a`<span class="sep" aria-hidden="true">▸</span>
|
|
7046
|
+
<span class="crumb current">${o}</span>` : ""}
|
|
7047
|
+
</nav>
|
|
7048
|
+
`;
|
|
7049
|
+
}
|
|
7050
|
+
_select(e, t) {
|
|
7051
|
+
this.dispatchEvent(new CustomEvent(e, { detail: t, bubbles: !0, composed: !0 }));
|
|
7052
|
+
}
|
|
7053
|
+
_blockLabel(e) {
|
|
7054
|
+
var r;
|
|
7055
|
+
const t = {
|
|
7056
|
+
text: "Text",
|
|
7057
|
+
image: "Image",
|
|
7058
|
+
button: "Button",
|
|
7059
|
+
divider: "Divider",
|
|
7060
|
+
spacer: "Spacer",
|
|
7061
|
+
social: "Social",
|
|
7062
|
+
html: "HTML",
|
|
7063
|
+
hero: "Hero",
|
|
7064
|
+
navbar: "Navbar"
|
|
7065
|
+
}, o = e.type;
|
|
7066
|
+
return t[o] ?? ((r = ct(o)) == null ? void 0 : r.label) ?? o;
|
|
7067
|
+
}
|
|
7048
7068
|
_renderBlockPanel(e, t, o) {
|
|
7049
7069
|
switch (e.type) {
|
|
7050
7070
|
case "text":
|
|
@@ -7078,7 +7098,7 @@ let N = class extends h {
|
|
|
7078
7098
|
case "html":
|
|
7079
7099
|
return a`<pigeon-html-panel .block=${e} .rowId=${t} .columnId=${o} .mergeTags=${this.mergeTags}></pigeon-html-panel>`;
|
|
7080
7100
|
default: {
|
|
7081
|
-
const r = e.type ?? "unknown", i =
|
|
7101
|
+
const r = e.type ?? "unknown", i = ct(r);
|
|
7082
7102
|
return i != null && i.propertySchema && i.propertySchema.length > 0 ? a`<pigeon-custom-panel
|
|
7083
7103
|
.block=${e}
|
|
7084
7104
|
.rowId=${t}
|
|
@@ -7107,7 +7127,7 @@ let N = class extends h {
|
|
|
7107
7127
|
return i.blocks.find((n) => n.id === o);
|
|
7108
7128
|
}
|
|
7109
7129
|
};
|
|
7110
|
-
|
|
7130
|
+
F.styles = u`
|
|
7111
7131
|
:host {
|
|
7112
7132
|
display: block;
|
|
7113
7133
|
width: var(--pigeon-properties-width, 300px);
|
|
@@ -7122,6 +7142,49 @@ N.styles = g`
|
|
|
7122
7142
|
padding: 16px;
|
|
7123
7143
|
}
|
|
7124
7144
|
|
|
7145
|
+
/* Parent-selection breadcrumb shown above block/column panels so the
|
|
7146
|
+
row (and column) that contain the selected block are always reachable
|
|
7147
|
+
in one click — clicking a block on the canvas selects the block, and
|
|
7148
|
+
this trail is how you step back out to its parent. */
|
|
7149
|
+
.breadcrumb {
|
|
7150
|
+
display: flex;
|
|
7151
|
+
align-items: center;
|
|
7152
|
+
flex-wrap: wrap;
|
|
7153
|
+
gap: 2px;
|
|
7154
|
+
margin-bottom: 12px;
|
|
7155
|
+
font-family: var(--pigeon-font);
|
|
7156
|
+
font-size: 11px;
|
|
7157
|
+
}
|
|
7158
|
+
|
|
7159
|
+
.breadcrumb .crumb {
|
|
7160
|
+
background: none;
|
|
7161
|
+
border: none;
|
|
7162
|
+
padding: 2px 6px;
|
|
7163
|
+
border-radius: var(--pigeon-radius-sm, 4px);
|
|
7164
|
+
color: var(--pigeon-primary, #4f46e5);
|
|
7165
|
+
cursor: pointer;
|
|
7166
|
+
font: inherit;
|
|
7167
|
+
font-weight: 500;
|
|
7168
|
+
}
|
|
7169
|
+
|
|
7170
|
+
.breadcrumb .crumb:hover {
|
|
7171
|
+
background: var(--pigeon-surface-hover, #f1f5f9);
|
|
7172
|
+
}
|
|
7173
|
+
|
|
7174
|
+
.breadcrumb .crumb.current {
|
|
7175
|
+
color: var(--pigeon-text-secondary, #64748b);
|
|
7176
|
+
cursor: default;
|
|
7177
|
+
}
|
|
7178
|
+
|
|
7179
|
+
.breadcrumb .crumb.current:hover {
|
|
7180
|
+
background: none;
|
|
7181
|
+
}
|
|
7182
|
+
|
|
7183
|
+
.breadcrumb .sep {
|
|
7184
|
+
color: var(--pigeon-text-muted, #94a3b8);
|
|
7185
|
+
font-size: 10px;
|
|
7186
|
+
}
|
|
7187
|
+
|
|
7125
7188
|
.empty-state {
|
|
7126
7189
|
display: flex;
|
|
7127
7190
|
flex-direction: column;
|
|
@@ -7149,26 +7212,26 @@ N.styles = g`
|
|
|
7149
7212
|
`;
|
|
7150
7213
|
fe([
|
|
7151
7214
|
l({ type: Object })
|
|
7152
|
-
],
|
|
7215
|
+
], F.prototype, "doc", 2);
|
|
7153
7216
|
fe([
|
|
7154
7217
|
l({ type: Object })
|
|
7155
|
-
],
|
|
7218
|
+
], F.prototype, "selection", 2);
|
|
7156
7219
|
fe([
|
|
7157
7220
|
l({ type: Array })
|
|
7158
|
-
],
|
|
7221
|
+
], F.prototype, "mergeTags", 2);
|
|
7159
7222
|
fe([
|
|
7160
7223
|
l({ attribute: !1 })
|
|
7161
|
-
],
|
|
7224
|
+
], F.prototype, "assetManagerConfig", 2);
|
|
7162
7225
|
fe([
|
|
7163
7226
|
l({ attribute: !1 })
|
|
7164
|
-
],
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
],
|
|
7168
|
-
var
|
|
7169
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7227
|
+
], F.prototype, "assetStorage", 2);
|
|
7228
|
+
F = fe([
|
|
7229
|
+
g("pigeon-properties")
|
|
7230
|
+
], F);
|
|
7231
|
+
var pr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, T = (e, t, o, r) => {
|
|
7232
|
+
for (var i = r > 1 ? void 0 : r ? cr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
7170
7233
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
7171
|
-
return r && i &&
|
|
7234
|
+
return r && i && pr(t, o, i), i;
|
|
7172
7235
|
};
|
|
7173
7236
|
let $ = class extends h {
|
|
7174
7237
|
constructor() {
|
|
@@ -7287,7 +7350,7 @@ let $ = class extends h {
|
|
|
7287
7350
|
this.open = !1;
|
|
7288
7351
|
}
|
|
7289
7352
|
};
|
|
7290
|
-
$.styles =
|
|
7353
|
+
$.styles = u`
|
|
7291
7354
|
:host {
|
|
7292
7355
|
display: none;
|
|
7293
7356
|
}
|
|
@@ -7464,46 +7527,46 @@ $.styles = g`
|
|
|
7464
7527
|
font-size: 14px;
|
|
7465
7528
|
}
|
|
7466
7529
|
`;
|
|
7467
|
-
|
|
7530
|
+
T([
|
|
7468
7531
|
l({ type: Object })
|
|
7469
7532
|
], $.prototype, "renderer", 2);
|
|
7470
|
-
|
|
7533
|
+
T([
|
|
7471
7534
|
l({ type: Object })
|
|
7472
7535
|
], $.prototype, "doc", 2);
|
|
7473
|
-
|
|
7536
|
+
T([
|
|
7474
7537
|
l({ type: Object })
|
|
7475
7538
|
], $.prototype, "documentToMjml", 2);
|
|
7476
|
-
|
|
7539
|
+
T([
|
|
7477
7540
|
l({ type: Boolean, reflect: !0 })
|
|
7478
7541
|
], $.prototype, "open", 2);
|
|
7479
|
-
|
|
7542
|
+
T([
|
|
7480
7543
|
d()
|
|
7481
7544
|
], $.prototype, "_viewMode", 2);
|
|
7482
|
-
|
|
7545
|
+
T([
|
|
7483
7546
|
d()
|
|
7484
7547
|
], $.prototype, "_device", 2);
|
|
7485
|
-
|
|
7548
|
+
T([
|
|
7486
7549
|
d()
|
|
7487
7550
|
], $.prototype, "_htmlContent", 2);
|
|
7488
|
-
|
|
7551
|
+
T([
|
|
7489
7552
|
d()
|
|
7490
7553
|
], $.prototype, "_mjmlContent", 2);
|
|
7491
|
-
|
|
7554
|
+
T([
|
|
7492
7555
|
d()
|
|
7493
7556
|
], $.prototype, "_loading", 2);
|
|
7494
|
-
$ =
|
|
7495
|
-
|
|
7557
|
+
$ = T([
|
|
7558
|
+
g("pigeon-preview")
|
|
7496
7559
|
], $);
|
|
7497
|
-
var
|
|
7498
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
7560
|
+
var dr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, y = (e, t, o, r) => {
|
|
7561
|
+
for (var i = r > 1 ? void 0 : r ? hr(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
7499
7562
|
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
7500
|
-
return r && i &&
|
|
7563
|
+
return r && i && dr(t, o, i), i;
|
|
7501
7564
|
};
|
|
7502
7565
|
let pt = null;
|
|
7503
7566
|
function gr() {
|
|
7504
7567
|
return pt || (pt = import("./templates.js")), pt;
|
|
7505
7568
|
}
|
|
7506
|
-
function
|
|
7569
|
+
function ur(e) {
|
|
7507
7570
|
return e.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || `template-${Date.now()}`;
|
|
7508
7571
|
}
|
|
7509
7572
|
let _ = class extends h {
|
|
@@ -7523,16 +7586,16 @@ let _ = class extends h {
|
|
|
7523
7586
|
}
|
|
7524
7587
|
if (e.key === "Escape") {
|
|
7525
7588
|
const r = this._state.createTransaction();
|
|
7526
|
-
r.setSelection(
|
|
7589
|
+
r.setSelection(Ct()), this._dispatch(r);
|
|
7527
7590
|
return;
|
|
7528
7591
|
}
|
|
7529
7592
|
if (o) {
|
|
7530
7593
|
if (e.key === "Delete" || e.key === "Backspace") {
|
|
7531
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Qt(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(),
|
|
7594
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), Qt(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), It(o.rowId)(this._state, this._dispatch));
|
|
7532
7595
|
return;
|
|
7533
7596
|
}
|
|
7534
7597
|
if (t && e.key.toLowerCase() === "d") {
|
|
7535
|
-
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), eo(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(),
|
|
7598
|
+
o.type === "block" && o.rowId && o.columnId && o.blockId ? (e.preventDefault(), eo(o.rowId, o.columnId, o.blockId)(this._state, this._dispatch)) : o.type === "row" && o.rowId && (e.preventDefault(), Pt(o.rowId)(this._state, this._dispatch));
|
|
7536
7599
|
return;
|
|
7537
7600
|
}
|
|
7538
7601
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
@@ -7552,13 +7615,13 @@ let _ = class extends h {
|
|
|
7552
7615
|
if (o.type === "block" && o.rowId && o.columnId && o.blockId) {
|
|
7553
7616
|
e.preventDefault();
|
|
7554
7617
|
const r = structuredClone(this._clipboard);
|
|
7555
|
-
r.id =
|
|
7618
|
+
r.id = Ot();
|
|
7556
7619
|
const i = this._findBlockIndex(o.rowId, o.columnId, o.blockId), n = i >= 0 ? i + 1 : void 0;
|
|
7557
7620
|
ze(o.rowId, o.columnId, r, n)(this._state, this._dispatch);
|
|
7558
7621
|
} else if (o.type === "column" && o.rowId && o.columnId) {
|
|
7559
7622
|
e.preventDefault();
|
|
7560
7623
|
const r = structuredClone(this._clipboard);
|
|
7561
|
-
r.id =
|
|
7624
|
+
r.id = Ot(), ze(o.rowId, o.columnId, r)(this._state, this._dispatch);
|
|
7562
7625
|
}
|
|
7563
7626
|
return;
|
|
7564
7627
|
}
|
|
@@ -7601,9 +7664,9 @@ let _ = class extends h {
|
|
|
7601
7664
|
}
|
|
7602
7665
|
/** Replaces the document entirely (resets history). */
|
|
7603
7666
|
loadDocument(e) {
|
|
7604
|
-
this._state =
|
|
7667
|
+
this._state = Tt.create({
|
|
7605
7668
|
doc: e,
|
|
7606
|
-
plugins: [
|
|
7669
|
+
plugins: [St()],
|
|
7607
7670
|
...this.config
|
|
7608
7671
|
}), this._syncHistoryFlags(), this.requestUpdate(), this._fireChange();
|
|
7609
7672
|
}
|
|
@@ -7707,6 +7770,8 @@ let _ = class extends h {
|
|
|
7707
7770
|
@row-property-change=${this._handleRowPropertyChange}
|
|
7708
7771
|
@row-layout-change=${this._handleRowLayoutChange}
|
|
7709
7772
|
@body-property-change=${this._handleBodyPropertyChange}
|
|
7773
|
+
@row-select=${this._handleRowSelect}
|
|
7774
|
+
@column-select=${this._handleColumnSelect}
|
|
7710
7775
|
></pigeon-properties>
|
|
7711
7776
|
</div>
|
|
7712
7777
|
|
|
@@ -7749,7 +7814,7 @@ let _ = class extends h {
|
|
|
7749
7814
|
async _handleTemplateSave(e) {
|
|
7750
7815
|
e.stopPropagation();
|
|
7751
7816
|
const { name: t, description: o, category: r } = e.detail, i = this._resolveTemplateStorage(), n = (/* @__PURE__ */ new Date()).toISOString(), s = {
|
|
7752
|
-
id:
|
|
7817
|
+
id: ur(t),
|
|
7753
7818
|
name: t,
|
|
7754
7819
|
description: o,
|
|
7755
7820
|
category: r,
|
|
@@ -7768,10 +7833,10 @@ let _ = class extends h {
|
|
|
7768
7833
|
/* ------------------------------------------------------------------ */
|
|
7769
7834
|
_initState() {
|
|
7770
7835
|
const e = this.document ?? ro(), t = this.config.plugins ?? [];
|
|
7771
|
-
t.some((r) => r.name ===
|
|
7836
|
+
t.some((r) => r.name === Dt) || t.unshift(St()), this._state = Tt.create({ doc: e, plugins: t }), this._syncHistoryFlags();
|
|
7772
7837
|
}
|
|
7773
7838
|
_syncHistoryFlags() {
|
|
7774
|
-
const e = this._state.getPluginState(
|
|
7839
|
+
const e = this._state.getPluginState(Dt);
|
|
7775
7840
|
this._canUndo = e ? no(e) : !1, this._canRedo = e ? so(e) : !1;
|
|
7776
7841
|
}
|
|
7777
7842
|
/* ------------------------------------------------------------------ */
|
|
@@ -7855,7 +7920,7 @@ let _ = class extends h {
|
|
|
7855
7920
|
const r = o.blocks.find((n) => n.id === e.detail.blockId);
|
|
7856
7921
|
if (!r) continue;
|
|
7857
7922
|
const i = r.values.content;
|
|
7858
|
-
typeof i == "string" && i !== e.detail.content &&
|
|
7923
|
+
typeof i == "string" && i !== e.detail.content && At(t.id, o.id, r.id, { content: e.detail.content })(this._state, this._dispatch), this._editingBlockId = null;
|
|
7859
7924
|
return;
|
|
7860
7925
|
}
|
|
7861
7926
|
this._editingBlockId = null;
|
|
@@ -7873,25 +7938,31 @@ let _ = class extends h {
|
|
|
7873
7938
|
}
|
|
7874
7939
|
}
|
|
7875
7940
|
_handleRowSelect(e) {
|
|
7941
|
+
this._editingBlockId = null;
|
|
7942
|
+
const t = this._state.createTransaction();
|
|
7943
|
+
t.setSelection(Et(e.detail.rowId)), this._dispatch(t);
|
|
7944
|
+
}
|
|
7945
|
+
_handleColumnSelect(e) {
|
|
7946
|
+
this._editingBlockId = null;
|
|
7876
7947
|
const t = this._state.createTransaction();
|
|
7877
|
-
t.setSelection(
|
|
7948
|
+
t.setSelection(ao(e.detail.rowId, e.detail.columnId)), this._dispatch(t);
|
|
7878
7949
|
}
|
|
7879
7950
|
_handleBodySelect() {
|
|
7880
7951
|
this._editingBlockId = null;
|
|
7881
7952
|
const e = this._state.createTransaction();
|
|
7882
|
-
e.setSelection(
|
|
7953
|
+
e.setSelection(Ct()), this._dispatch(e);
|
|
7883
7954
|
}
|
|
7884
7955
|
/* ------------------------------------------------------------------ */
|
|
7885
7956
|
/* Row action handlers */
|
|
7886
7957
|
/* ------------------------------------------------------------------ */
|
|
7887
7958
|
_handleRowMove(e) {
|
|
7888
|
-
|
|
7959
|
+
lo(e.detail.rowId, e.detail.toIndex)(this._state, this._dispatch);
|
|
7889
7960
|
}
|
|
7890
7961
|
_handleRowDuplicate(e) {
|
|
7891
|
-
|
|
7962
|
+
Pt(e.detail.rowId)(this._state, this._dispatch);
|
|
7892
7963
|
}
|
|
7893
7964
|
_handleRowDelete(e) {
|
|
7894
|
-
|
|
7965
|
+
It(e.detail.rowId)(this._state, this._dispatch);
|
|
7895
7966
|
}
|
|
7896
7967
|
/* ------------------------------------------------------------------ */
|
|
7897
7968
|
/* Keyboard shortcuts */
|
|
@@ -7936,7 +8007,7 @@ let _ = class extends h {
|
|
|
7936
8007
|
const i = r + e;
|
|
7937
8008
|
if (i < 0 || i >= o.length) return;
|
|
7938
8009
|
const n = this._state.createTransaction();
|
|
7939
|
-
n.setSelection(
|
|
8010
|
+
n.setSelection(Et(o[i].id)), this._dispatch(n);
|
|
7940
8011
|
}
|
|
7941
8012
|
_findBlock(e, t, o) {
|
|
7942
8013
|
const r = this._state.doc.body.rows.find((n) => n.id === e);
|
|
@@ -7956,14 +8027,14 @@ let _ = class extends h {
|
|
|
7956
8027
|
/* ------------------------------------------------------------------ */
|
|
7957
8028
|
_handleRowDrop(e) {
|
|
7958
8029
|
const { index: t, columnCount: o } = e.detail, r = Array.from({ length: o }, () => Le()), i = He(r);
|
|
7959
|
-
|
|
8030
|
+
Ne(i, t)(this._state, this._dispatch);
|
|
7960
8031
|
}
|
|
7961
8032
|
_handleBlockDrop(e) {
|
|
7962
8033
|
const { rowId: t, columnId: o, index: r, dragData: i } = e.detail;
|
|
7963
8034
|
if (i.type === "palette-block" && i.blockType) {
|
|
7964
8035
|
const n = nt(i.blockType);
|
|
7965
8036
|
ze(t, o, n, r)(this._state, this._dispatch);
|
|
7966
|
-
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId &&
|
|
8037
|
+
} else i.type === "existing-block" && i.blockId && i.rowId && i.columnId && po(
|
|
7967
8038
|
i.rowId,
|
|
7968
8039
|
i.columnId,
|
|
7969
8040
|
i.blockId,
|
|
@@ -7974,7 +8045,7 @@ let _ = class extends h {
|
|
|
7974
8045
|
}
|
|
7975
8046
|
_handleBlockDropNewRow(e) {
|
|
7976
8047
|
const { blockType: t, rowIndex: o } = e.detail, r = nt(t), i = Le([r]), n = He([i]);
|
|
7977
|
-
|
|
8048
|
+
Ne(n, o)(this._state, this._dispatch);
|
|
7978
8049
|
}
|
|
7979
8050
|
/**
|
|
7980
8051
|
* Keyboard equivalent of dragging a palette item onto the canvas: append the
|
|
@@ -7985,7 +8056,7 @@ let _ = class extends h {
|
|
|
7985
8056
|
const { type: t, blockType: o, columnCount: r } = e.detail, i = this._state.doc.body.rows;
|
|
7986
8057
|
if (t === "palette-row") {
|
|
7987
8058
|
const s = Array.from({ length: r }, () => Le());
|
|
7988
|
-
|
|
8059
|
+
Ne(He(s), i.length)(this._state, this._dispatch);
|
|
7989
8060
|
return;
|
|
7990
8061
|
}
|
|
7991
8062
|
if (!o) return;
|
|
@@ -7998,7 +8069,7 @@ let _ = class extends h {
|
|
|
7998
8069
|
);
|
|
7999
8070
|
} else {
|
|
8000
8071
|
const s = Le([n]);
|
|
8001
|
-
|
|
8072
|
+
Ne(He([s]), 0)(this._state, this._dispatch);
|
|
8002
8073
|
}
|
|
8003
8074
|
}
|
|
8004
8075
|
/* ------------------------------------------------------------------ */
|
|
@@ -8006,11 +8077,11 @@ let _ = class extends h {
|
|
|
8006
8077
|
/* ------------------------------------------------------------------ */
|
|
8007
8078
|
_handlePropertyChange(e) {
|
|
8008
8079
|
const { rowId: t, columnId: o, blockId: r, values: i } = e.detail;
|
|
8009
|
-
|
|
8080
|
+
At(t, o, r, i)(this._state, this._dispatch);
|
|
8010
8081
|
}
|
|
8011
8082
|
_handleRowPropertyChange(e) {
|
|
8012
8083
|
const { rowId: t, attributes: o } = e.detail;
|
|
8013
|
-
|
|
8084
|
+
co(t, o)(this._state, this._dispatch);
|
|
8014
8085
|
}
|
|
8015
8086
|
_handleRowLayoutChange(e) {
|
|
8016
8087
|
const { rowId: t, ratios: o, columnCount: r } = e.detail, i = this._state.doc.body.rows.find((p) => p.id === t);
|
|
@@ -8018,7 +8089,7 @@ let _ = class extends h {
|
|
|
8018
8089
|
const n = i.columns.length, s = r;
|
|
8019
8090
|
if (s > n)
|
|
8020
8091
|
for (let p = 0; p < s - n; p++)
|
|
8021
|
-
|
|
8092
|
+
ho(t)(this._state, this._dispatch);
|
|
8022
8093
|
else if (s < n)
|
|
8023
8094
|
for (let p = 0; p < n - s; p++) {
|
|
8024
8095
|
const b = this._state.doc.body.rows.find((f) => f.id === t);
|
|
@@ -8028,12 +8099,12 @@ let _ = class extends h {
|
|
|
8028
8099
|
}
|
|
8029
8100
|
}
|
|
8030
8101
|
const c = this._state.doc.body.rows.find((p) => p.id === t);
|
|
8031
|
-
c && c.columns.length === o.length &&
|
|
8102
|
+
c && c.columns.length === o.length && uo(t, o)(this._state, this._dispatch);
|
|
8032
8103
|
}
|
|
8033
8104
|
_handleBodyPropertyChange(e) {
|
|
8034
8105
|
const { attribute: t, metaField: o, value: r } = e.detail, i = this._state.createTransaction();
|
|
8035
8106
|
if (t) {
|
|
8036
|
-
const s = this._state.doc.body.attributes[t], c =
|
|
8107
|
+
const s = this._state.doc.body.attributes[t], c = jt(
|
|
8037
8108
|
"updateBodyAttribute",
|
|
8038
8109
|
`body.attributes.${t}`,
|
|
8039
8110
|
(p) => {
|
|
@@ -8046,7 +8117,7 @@ let _ = class extends h {
|
|
|
8046
8117
|
i.addStep(c);
|
|
8047
8118
|
}
|
|
8048
8119
|
if (o) {
|
|
8049
|
-
const s = this._state.doc.metadata[o], c =
|
|
8120
|
+
const s = this._state.doc.metadata[o], c = jt(
|
|
8050
8121
|
"updateMetadata",
|
|
8051
8122
|
`metadata.${o}`,
|
|
8052
8123
|
(p) => {
|
|
@@ -8062,8 +8133,8 @@ let _ = class extends h {
|
|
|
8062
8133
|
}
|
|
8063
8134
|
};
|
|
8064
8135
|
_.styles = [
|
|
8065
|
-
|
|
8066
|
-
|
|
8136
|
+
vo,
|
|
8137
|
+
u`
|
|
8067
8138
|
:host {
|
|
8068
8139
|
display: flex;
|
|
8069
8140
|
flex-direction: column;
|
|
@@ -8141,17 +8212,17 @@ y([
|
|
|
8141
8212
|
d()
|
|
8142
8213
|
], _.prototype, "_editingBlockId", 2);
|
|
8143
8214
|
_ = y([
|
|
8144
|
-
|
|
8215
|
+
g("pigeon-editor")
|
|
8145
8216
|
], _);
|
|
8146
8217
|
export {
|
|
8147
8218
|
Ee as PigeonAlignmentPicker,
|
|
8148
8219
|
x as PigeonAssetManager,
|
|
8149
|
-
|
|
8220
|
+
N as PigeonBodyPanel,
|
|
8150
8221
|
oe as PigeonButtonBlock,
|
|
8151
8222
|
ae as PigeonButtonPanel,
|
|
8152
8223
|
C as PigeonCanvas,
|
|
8153
8224
|
Be as PigeonColorPicker,
|
|
8154
|
-
|
|
8225
|
+
D as PigeonColumn,
|
|
8155
8226
|
Ce as PigeonDividerBlock,
|
|
8156
8227
|
Fe as PigeonDropIndicator,
|
|
8157
8228
|
_ as PigeonEditor,
|
|
@@ -8161,28 +8232,28 @@ export {
|
|
|
8161
8232
|
ke as PigeonImageBlock,
|
|
8162
8233
|
E as PigeonImagePanel,
|
|
8163
8234
|
$e as PigeonLayers,
|
|
8164
|
-
|
|
8235
|
+
H as PigeonMergeTagPicker,
|
|
8165
8236
|
Te as PigeonNavBarBlock,
|
|
8166
8237
|
le as PigeonNavBarPanel,
|
|
8167
|
-
|
|
8168
|
-
|
|
8238
|
+
G as PigeonPalette,
|
|
8239
|
+
L as PigeonPaletteItem,
|
|
8169
8240
|
$ as PigeonPreview,
|
|
8170
|
-
|
|
8171
|
-
|
|
8241
|
+
F as PigeonProperties,
|
|
8242
|
+
I as PigeonRow,
|
|
8172
8243
|
qe as PigeonRowPanel,
|
|
8173
8244
|
A as PigeonSliderInput,
|
|
8174
8245
|
Pe as PigeonSocialBlock,
|
|
8175
8246
|
Ie as PigeonSpacerBlock,
|
|
8176
8247
|
je as PigeonSpacingInput,
|
|
8177
|
-
|
|
8248
|
+
$r as PigeonTemplatePicker,
|
|
8178
8249
|
te as PigeonTextBlock,
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8250
|
+
P as PigeonTextPanel,
|
|
8251
|
+
z as PigeonToolbar,
|
|
8252
|
+
So as calculateBlockDropIndex,
|
|
8253
|
+
To as calculateRowDropIndex,
|
|
8183
8254
|
gt as clearDragData,
|
|
8184
8255
|
we as getDragData,
|
|
8185
|
-
|
|
8186
|
-
|
|
8256
|
+
xr as readDragTransfer,
|
|
8257
|
+
_o as setDragData,
|
|
8187
8258
|
Wt as writeDragTransfer
|
|
8188
8259
|
};
|