@plitzi/sdk-authoring 0.39.0 → 0.39.1
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/CHANGELOG.md +7 -0
- package/dist/index-src.js +457 -264
- package/dist/index.d.ts +151 -18
- package/dist/index.js +2 -2
- package/dist/node.d.ts +20 -3
- package/dist/node.js +2 -2
- package/package.json +6 -6
- package/skills/plitzi-authoring/reference/accessibility.md +3 -0
- package/skills/plitzi-authoring/reference/authoring-errors.md +4 -2
- package/skills/plitzi-authoring/reference/flows.md +9 -9
- package/skills/plitzi-authoring/reference/kept-state.md +12 -0
- package/skills/plitzi-authoring/reference/plugins.md +5 -2
- package/skills/plitzi-authoring/reference/testing.md +3 -3
package/dist/index-src.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e$
|
|
1
|
+
import { n as e$61, r as r$54 } from "./index-declare.js";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -12,7 +12,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region ../sdk-shared/dist/authoring/builder.mjs
|
|
15
|
-
var e$
|
|
15
|
+
var e$60 = {
|
|
16
16
|
text: "text",
|
|
17
17
|
textarea: "textarea",
|
|
18
18
|
select: "select",
|
|
@@ -23,8 +23,8 @@ var e$59 = {
|
|
|
23
23
|
elementIds: "elements"
|
|
24
24
|
};
|
|
25
25
|
var t$85 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[-_\s]+/).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");
|
|
26
|
-
var n$
|
|
27
|
-
type: r.builderType ?? e$
|
|
26
|
+
var n$70 = (n, r) => ({
|
|
27
|
+
type: r.builderType ?? e$60[r.type],
|
|
28
28
|
label: r.label ?? t$85(n),
|
|
29
29
|
...r.default === void 0 ? {} : { defaultValue: r.default },
|
|
30
30
|
...r.options ? { options: r.options.map((e) => ({
|
|
@@ -38,7 +38,7 @@ var n$69 = (n, r) => ({
|
|
|
38
38
|
var r$53 = /* @__PURE__ */ new WeakMap();
|
|
39
39
|
var i$47 = (e) => {
|
|
40
40
|
let t = r$53.get(e);
|
|
41
|
-
return t || (t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, n$
|
|
41
|
+
return t || (t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, n$70(e, t)])), r$53.set(e, t)), t;
|
|
42
42
|
};
|
|
43
43
|
var a$35 = (e, t, n, r = {}) => ({
|
|
44
44
|
action: e,
|
|
@@ -52,17 +52,17 @@ var a$35 = (e, t, n, r = {}) => ({
|
|
|
52
52
|
var o$32 = (e, t, n = {}) => Object.fromEntries(Object.keys(e).map((r) => [r, a$35(r, e[r], t[r], n[r] ?? {})]));
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
|
|
55
|
-
var e$
|
|
56
|
-
var t$84 = `(?:${e$
|
|
57
|
-
var n$
|
|
58
|
-
var r$52 = `${`${e$
|
|
55
|
+
var e$59 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
|
|
56
|
+
var t$84 = `(?:${e$59}|\\d+)`;
|
|
57
|
+
var n$69 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$59}(?:\\.${t$84})*)\\s*\\]`;
|
|
58
|
+
var r$52 = `${`${e$59}(?:${n$69})*(?:\\??\\.${t$84}(?:${n$69})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
|
|
59
59
|
var i$46 = `\\{\\{\\s*${r$52}\\s*\\}\\}`;
|
|
60
60
|
var a$34 = `(?:${`\\{\\{\\{\\s*${r$52}\\s*\\}\\}\\}`}|${i$46})`;
|
|
61
61
|
var o$31 = new RegExp(a$34, "g");
|
|
62
62
|
var s$31 = RegExp(`^${a$34}$`);
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
|
|
65
|
-
var n$
|
|
65
|
+
var n$68 = (n, r = !1) => {
|
|
66
66
|
if (typeof n != "string") return !1;
|
|
67
67
|
let i = r ? s$31 : o$31;
|
|
68
68
|
return i.lastIndex = 0, i.test(n.trim());
|
|
@@ -79,7 +79,7 @@ var t$83 = [
|
|
|
79
79
|
"json",
|
|
80
80
|
"elementIds"
|
|
81
81
|
];
|
|
82
|
-
var n$
|
|
82
|
+
var n$67 = (e, t, n) => {
|
|
83
83
|
let r = [];
|
|
84
84
|
for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
|
|
85
85
|
return r;
|
|
@@ -90,7 +90,7 @@ var r$51 = (e, t, n) => {
|
|
|
90
90
|
return r;
|
|
91
91
|
};
|
|
92
92
|
var i$45 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
|
|
93
|
-
var a$33 = (t) => typeof t == "string" && n$
|
|
93
|
+
var a$33 = (t) => typeof t == "string" && n$68(t);
|
|
94
94
|
var o$30 = (e, t) => {
|
|
95
95
|
switch (t.type) {
|
|
96
96
|
case "boolean": return typeof e == "boolean";
|
|
@@ -125,7 +125,7 @@ var c$27 = (e, t, n) => {
|
|
|
125
125
|
};
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region ../sdk-shared/dist/helpers/scroll.mjs
|
|
128
|
-
var e$
|
|
128
|
+
var e$58 = ["smooth", "auto"];
|
|
129
129
|
var t$82 = [
|
|
130
130
|
"start",
|
|
131
131
|
"center",
|
|
@@ -140,7 +140,7 @@ var r$50 = {
|
|
|
140
140
|
type: "select",
|
|
141
141
|
description: "How it moves: \"smooth\" glides there, \"auto\" jumps.",
|
|
142
142
|
default: "smooth",
|
|
143
|
-
options: [...e$
|
|
143
|
+
options: [...e$58]
|
|
144
144
|
};
|
|
145
145
|
var i$44 = {
|
|
146
146
|
scrollBy: {
|
|
@@ -279,7 +279,7 @@ var c$25 = (t, n) => {
|
|
|
279
279
|
};
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region ../sdk-shared/dist/authoring/spaceCallbacks.mjs
|
|
282
|
-
var e$
|
|
282
|
+
var e$57 = [
|
|
283
283
|
"top-right",
|
|
284
284
|
"top-center",
|
|
285
285
|
"top-left",
|
|
@@ -293,8 +293,8 @@ var t$81 = [
|
|
|
293
293
|
"warning",
|
|
294
294
|
"info"
|
|
295
295
|
];
|
|
296
|
-
var n$
|
|
297
|
-
let r = e$
|
|
296
|
+
var n$66 = (n) => {
|
|
297
|
+
let r = e$57.find((e) => e === n.placement), i = t$81.find((e) => e === n.appearance), { autoDismiss: a, autoDismissTimeout: o } = n, s = typeof o == "number" && Number.isFinite(o) && o > 0 ? o : void 0, c = {
|
|
298
298
|
placement: r !== void 0,
|
|
299
299
|
appearance: i !== void 0,
|
|
300
300
|
autoDismiss: typeof a == "boolean",
|
|
@@ -330,7 +330,7 @@ var i$43 = { addNotification: {
|
|
|
330
330
|
type: "select",
|
|
331
331
|
description: "Where the toast appears on screen.",
|
|
332
332
|
default: r$49.placement,
|
|
333
|
-
options: [...e$
|
|
333
|
+
options: [...e$57]
|
|
334
334
|
},
|
|
335
335
|
appearance: {
|
|
336
336
|
type: "select",
|
|
@@ -476,6 +476,7 @@ var elementAttributeNames = {
|
|
|
476
476
|
"src",
|
|
477
477
|
"title"
|
|
478
478
|
],
|
|
479
|
+
focusGroup: ["label", "subType"],
|
|
479
480
|
fontAwesome: [
|
|
480
481
|
"icon",
|
|
481
482
|
"iconAnimation",
|
|
@@ -491,6 +492,7 @@ var elementAttributeNames = {
|
|
|
491
492
|
"values"
|
|
492
493
|
],
|
|
493
494
|
formControl: [
|
|
495
|
+
"accept",
|
|
494
496
|
"autoComplete",
|
|
495
497
|
"autoFocus",
|
|
496
498
|
"defaultValue",
|
|
@@ -1043,7 +1045,7 @@ var t$75 = r$54()({
|
|
|
1043
1045
|
});
|
|
1044
1046
|
//#endregion
|
|
1045
1047
|
//#region ../sdk-elements/dist/elements/basic/Button/declaration.mjs
|
|
1046
|
-
var n$
|
|
1048
|
+
var n$65 = {
|
|
1047
1049
|
"padding-top": "6px",
|
|
1048
1050
|
"padding-left": "12px",
|
|
1049
1051
|
"padding-right": "12px",
|
|
@@ -1061,13 +1063,13 @@ var r$48 = r$54()({
|
|
|
1061
1063
|
type: "button",
|
|
1062
1064
|
contentAttributes: ["content"],
|
|
1063
1065
|
attributeValues: {
|
|
1064
|
-
subType: e$
|
|
1066
|
+
subType: e$61()([
|
|
1065
1067
|
"button",
|
|
1066
1068
|
"submit",
|
|
1067
1069
|
"reset"
|
|
1068
1070
|
]),
|
|
1069
|
-
contentPlacement: e$
|
|
1070
|
-
iconPlacement: e$
|
|
1071
|
+
contentPlacement: e$61()(["before", "after"]),
|
|
1072
|
+
iconPlacement: e$61()(["before", "after"])
|
|
1071
1073
|
},
|
|
1072
1074
|
content: {
|
|
1073
1075
|
placeholders: ["content"],
|
|
@@ -1090,22 +1092,22 @@ var r$48 = r$54()({
|
|
|
1090
1092
|
icon: "fa-solid fa-hand-pointer"
|
|
1091
1093
|
},
|
|
1092
1094
|
defaultStyle: {
|
|
1093
|
-
style: { base: { default: n$
|
|
1095
|
+
style: { base: { default: n$65 } },
|
|
1094
1096
|
subTypes: {
|
|
1095
1097
|
button: {
|
|
1096
1098
|
name: "Default Button",
|
|
1097
1099
|
displayMode: "desktop",
|
|
1098
|
-
style: { base: { default: n$
|
|
1100
|
+
style: { base: { default: n$65 } }
|
|
1099
1101
|
},
|
|
1100
1102
|
reset: {
|
|
1101
1103
|
name: "Reset Button",
|
|
1102
1104
|
displayMode: "desktop",
|
|
1103
|
-
style: { base: { default: n$
|
|
1105
|
+
style: { base: { default: n$65 } }
|
|
1104
1106
|
},
|
|
1105
1107
|
submit: {
|
|
1106
1108
|
name: "Submit Button",
|
|
1107
1109
|
displayMode: "desktop",
|
|
1108
|
-
style: { base: { default: n$
|
|
1110
|
+
style: { base: { default: n$65 } }
|
|
1109
1111
|
}
|
|
1110
1112
|
}
|
|
1111
1113
|
}
|
|
@@ -1113,16 +1115,16 @@ var r$48 = r$54()({
|
|
|
1113
1115
|
});
|
|
1114
1116
|
//#endregion
|
|
1115
1117
|
//#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
|
|
1116
|
-
var n$
|
|
1118
|
+
var n$64 = r$54()({
|
|
1117
1119
|
type: "dropdown",
|
|
1118
1120
|
attributeValues: {
|
|
1119
|
-
popupPlacement: e$
|
|
1121
|
+
popupPlacement: e$61()([
|
|
1120
1122
|
"left",
|
|
1121
1123
|
"right",
|
|
1122
1124
|
"top",
|
|
1123
1125
|
"bottom"
|
|
1124
1126
|
]),
|
|
1125
|
-
popupWidth: e$
|
|
1127
|
+
popupWidth: e$61()(["content", "trigger"])
|
|
1126
1128
|
},
|
|
1127
1129
|
callbacks: {
|
|
1128
1130
|
openDropdown: {
|
|
@@ -1241,10 +1243,10 @@ var t$74 = r$54()({
|
|
|
1241
1243
|
});
|
|
1242
1244
|
//#endregion
|
|
1243
1245
|
//#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
|
|
1244
|
-
var n$
|
|
1246
|
+
var n$63 = r$54()({
|
|
1245
1247
|
type: "heading",
|
|
1246
1248
|
contentAttributes: ["content"],
|
|
1247
|
-
attributeValues: { subType: e$
|
|
1249
|
+
attributeValues: { subType: e$61()([
|
|
1248
1250
|
"h1",
|
|
1249
1251
|
"h2",
|
|
1250
1252
|
"h3",
|
|
@@ -1345,7 +1347,7 @@ var n$62 = r$54()({
|
|
|
1345
1347
|
});
|
|
1346
1348
|
//#endregion
|
|
1347
1349
|
//#region ../sdk-elements/dist/elements/basic/Link/declaration.mjs
|
|
1348
|
-
var n$
|
|
1350
|
+
var n$62 = r$54()({
|
|
1349
1351
|
type: "link",
|
|
1350
1352
|
contentAttributes: [
|
|
1351
1353
|
"content",
|
|
@@ -1353,20 +1355,20 @@ var n$61 = r$54()({
|
|
|
1353
1355
|
"label"
|
|
1354
1356
|
],
|
|
1355
1357
|
attributeValues: {
|
|
1356
|
-
mode: e$
|
|
1358
|
+
mode: e$61()([
|
|
1357
1359
|
"page",
|
|
1358
1360
|
"internal",
|
|
1359
1361
|
"external"
|
|
1360
1362
|
]),
|
|
1361
|
-
target: e$
|
|
1363
|
+
target: e$61()([
|
|
1362
1364
|
"self",
|
|
1363
1365
|
"blank",
|
|
1364
1366
|
"parent",
|
|
1365
1367
|
"top"
|
|
1366
1368
|
]),
|
|
1367
|
-
contentPlacement: e$
|
|
1368
|
-
iconPlacement: e$
|
|
1369
|
-
current: e$
|
|
1369
|
+
contentPlacement: e$61()(["before", "after"]),
|
|
1370
|
+
iconPlacement: e$61()(["before", "after"]),
|
|
1371
|
+
current: e$61()(["page", "section"])
|
|
1370
1372
|
},
|
|
1371
1373
|
content: {
|
|
1372
1374
|
attributes: {
|
|
@@ -1476,10 +1478,10 @@ var t$72 = r$54()({
|
|
|
1476
1478
|
});
|
|
1477
1479
|
//#endregion
|
|
1478
1480
|
//#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
|
|
1479
|
-
var n$
|
|
1481
|
+
var n$61 = r$54()({
|
|
1480
1482
|
type: "richText",
|
|
1481
1483
|
contentAttributes: ["content"],
|
|
1482
|
-
attributeValues: { format: e$
|
|
1484
|
+
attributeValues: { format: e$61()([
|
|
1483
1485
|
"html",
|
|
1484
1486
|
"markdown",
|
|
1485
1487
|
"text"
|
|
@@ -1555,7 +1557,7 @@ var t$71 = r$54()({
|
|
|
1555
1557
|
});
|
|
1556
1558
|
//#endregion
|
|
1557
1559
|
//#region ../sdk-elements/dist/elements/basic/ThemeToggle/declaration.mjs
|
|
1558
|
-
var n$
|
|
1560
|
+
var n$60 = {
|
|
1559
1561
|
"margin-top": "0px",
|
|
1560
1562
|
"margin-right": "0px",
|
|
1561
1563
|
"margin-bottom": "0px",
|
|
@@ -1583,7 +1585,7 @@ var r$47 = r$54()({
|
|
|
1583
1585
|
"darkLabel",
|
|
1584
1586
|
"systemLabel"
|
|
1585
1587
|
],
|
|
1586
|
-
attributeValues: { subType: e$
|
|
1588
|
+
attributeValues: { subType: e$61()(["switch", "segmented"]) },
|
|
1587
1589
|
triggers: { onThemeChange: {
|
|
1588
1590
|
action: "onThemeChange",
|
|
1589
1591
|
title: "On Theme Change",
|
|
@@ -1614,10 +1616,10 @@ var r$47 = r$54()({
|
|
|
1614
1616
|
},
|
|
1615
1617
|
defaultStyle: {
|
|
1616
1618
|
style: {
|
|
1617
|
-
base: { default: n$
|
|
1619
|
+
base: { default: n$60 },
|
|
1618
1620
|
icon: { default: {} },
|
|
1619
1621
|
option: { default: {
|
|
1620
|
-
...n$
|
|
1622
|
+
...n$60,
|
|
1621
1623
|
"row-gap": "4px",
|
|
1622
1624
|
"column-gap": "4px"
|
|
1623
1625
|
} }
|
|
@@ -1628,9 +1630,9 @@ var r$47 = r$54()({
|
|
|
1628
1630
|
});
|
|
1629
1631
|
//#endregion
|
|
1630
1632
|
//#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
|
|
1631
|
-
var n$
|
|
1633
|
+
var n$59 = r$54()({
|
|
1632
1634
|
type: "form",
|
|
1633
|
-
attributeValues: { method: e$
|
|
1635
|
+
attributeValues: { method: e$61()(["get", "post"]) },
|
|
1634
1636
|
sourceType: "apiContainer",
|
|
1635
1637
|
publishes: {
|
|
1636
1638
|
values: "Each field's value, by its name",
|
|
@@ -1726,8 +1728,28 @@ var n$58 = r$54()({
|
|
|
1726
1728
|
}
|
|
1727
1729
|
});
|
|
1728
1730
|
//#endregion
|
|
1731
|
+
//#region ../sdk-elements/dist/elements/form/FormControl/subTypes.mjs
|
|
1732
|
+
var e$56 = [
|
|
1733
|
+
"text",
|
|
1734
|
+
"number",
|
|
1735
|
+
"email",
|
|
1736
|
+
"password",
|
|
1737
|
+
"search",
|
|
1738
|
+
"url",
|
|
1739
|
+
"tel",
|
|
1740
|
+
"date",
|
|
1741
|
+
"time",
|
|
1742
|
+
"checkbox",
|
|
1743
|
+
"switch",
|
|
1744
|
+
"select",
|
|
1745
|
+
"textarea",
|
|
1746
|
+
"hidden",
|
|
1747
|
+
"color",
|
|
1748
|
+
"file"
|
|
1749
|
+
];
|
|
1750
|
+
//#endregion
|
|
1729
1751
|
//#region ../sdk-elements/dist/elements/form/FormControl/declaration.mjs
|
|
1730
|
-
var n$
|
|
1752
|
+
var n$58 = {
|
|
1731
1753
|
width: "100%",
|
|
1732
1754
|
display: "flex",
|
|
1733
1755
|
"align-items": "center",
|
|
@@ -1757,7 +1779,7 @@ var n$57 = {
|
|
|
1757
1779
|
position: "relative"
|
|
1758
1780
|
};
|
|
1759
1781
|
var r$46 = {
|
|
1760
|
-
...n$
|
|
1782
|
+
...n$58,
|
|
1761
1783
|
"line-height": "20px"
|
|
1762
1784
|
};
|
|
1763
1785
|
var i$42 = {
|
|
@@ -1840,7 +1862,7 @@ var d$22 = {
|
|
|
1840
1862
|
cursor: "pointer"
|
|
1841
1863
|
};
|
|
1842
1864
|
var f$18 = {
|
|
1843
|
-
...n$
|
|
1865
|
+
...n$58,
|
|
1844
1866
|
cursor: "pointer"
|
|
1845
1867
|
};
|
|
1846
1868
|
var p$11 = {
|
|
@@ -1902,23 +1924,7 @@ var g$6 = r$54()({
|
|
|
1902
1924
|
"patternMessage",
|
|
1903
1925
|
"matchesMessage"
|
|
1904
1926
|
],
|
|
1905
|
-
attributeValues: { subType: e$
|
|
1906
|
-
"text",
|
|
1907
|
-
"number",
|
|
1908
|
-
"email",
|
|
1909
|
-
"password",
|
|
1910
|
-
"search",
|
|
1911
|
-
"url",
|
|
1912
|
-
"tel",
|
|
1913
|
-
"date",
|
|
1914
|
-
"time",
|
|
1915
|
-
"checkbox",
|
|
1916
|
-
"switch",
|
|
1917
|
-
"select",
|
|
1918
|
-
"textarea",
|
|
1919
|
-
"hidden",
|
|
1920
|
-
"color"
|
|
1921
|
-
]) },
|
|
1927
|
+
attributeValues: { subType: e$56 },
|
|
1922
1928
|
triggers: { onChange: {
|
|
1923
1929
|
action: "onChange",
|
|
1924
1930
|
title: "On Change",
|
|
@@ -1937,6 +1943,7 @@ var g$6 = r$54()({
|
|
|
1937
1943
|
label: "Label",
|
|
1938
1944
|
hideLabel: !1,
|
|
1939
1945
|
placeholder: "",
|
|
1946
|
+
accept: "",
|
|
1940
1947
|
defaultValue: "",
|
|
1941
1948
|
autoComplete: !0,
|
|
1942
1949
|
autoFocus: !1,
|
|
@@ -1962,7 +1969,7 @@ var g$6 = r$54()({
|
|
|
1962
1969
|
},
|
|
1963
1970
|
definition: {
|
|
1964
1971
|
label: "Form Control",
|
|
1965
|
-
description: "A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. Optional unless `required: true`, as an HTML field is: a `requiredMessage` alone requires nothing. A `number` field takes `min` and `max` (each said by its `minMessage`/`maxMessage` when broken) and `step`, written as numbers are — `'2'`; `''` for none. A select offers its `options`: `[{ label, value }, …]` — the text shown, and what the field takes. A `switch` is a checkbox announced and drawn as an on/off switch (`role=\"switch\"`), for a setting that applies at once; both hold `true`/`false`, and a `defaultValue` of `\"true\"` starts them on. Its slots: `label`, `requiredMark` (the `*` that ends the label of a required field), `input` (the box a typed field or a select is drawn in — a textarea, checkbox or switch is its own box), `field` (the `<input>` or `<select>` inside that box), `icon` (the show/hide button of a password) and `error`. The box is ringed (`2px solid currentColor`) while the field inside has keyboard focus: restyle it with a `focus-within` state on the `input` slot — the box never takes `focus` itself. The thumb of a switch is no element a class reaches: the class on its `input` slot sets `--plitzi-switch-thumb` (off), `--plitzi-switch-thumb-checked` (on, white by default) and `--plitzi-switch-thumb-shadow`.",
|
|
1972
|
+
description: "A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. Optional unless `required: true`, as an HTML field is: a `requiredMessage` alone requires nothing. A `number` field takes `min` and `max` (each said by its `minMessage`/`maxMessage` when broken) and `step`, written as numbers are — `'2'`; `''` for none. A `file` field holds the `File` picked; a `webHook` whose body holds it sends it as multipart, under its `name`, and `accept` says what the picker offers — `'image/png,image/jpeg'`. A select offers its `options`: `[{ label, value }, …]` — the text shown, and what the field takes. A `switch` is a checkbox announced and drawn as an on/off switch (`role=\"switch\"`), for a setting that applies at once; both hold `true`/`false`, and a `defaultValue` of `\"true\"` starts them on. Its slots: `label`, `requiredMark` (the `*` that ends the label of a required field), `input` (the box a typed field or a select is drawn in — a textarea, checkbox or switch is its own box), `field` (the `<input>` or `<select>` inside that box), `icon` (the show/hide button of a password) and `error`. The box is ringed (`2px solid currentColor`) while the field inside has keyboard focus: restyle it with a `focus-within` state on the `input` slot — the box never takes `focus` itself. The thumb of a switch is no element a class reaches: the class on its `input` slot sets `--plitzi-switch-thumb` (off), `--plitzi-switch-thumb-checked` (on, white by default) and `--plitzi-switch-thumb-shadow`.",
|
|
1966
1973
|
styleSelectors: {
|
|
1967
1974
|
label: "",
|
|
1968
1975
|
requiredMark: "",
|
|
@@ -1994,6 +2001,7 @@ var g$6 = r$54()({
|
|
|
1994
2001
|
date: m$12("Form Control Date", r$46, h$8),
|
|
1995
2002
|
time: m$12("Form Control Time", r$46, h$8),
|
|
1996
2003
|
color: m$12("Form Control Color", r$46, h$8),
|
|
2004
|
+
file: m$12("Form Control File", r$46, h$8),
|
|
1997
2005
|
textarea: m$12("Form Control Textarea", {
|
|
1998
2006
|
...r$46,
|
|
1999
2007
|
color: "inherit",
|
|
@@ -2037,9 +2045,9 @@ var g$6 = r$54()({
|
|
|
2037
2045
|
});
|
|
2038
2046
|
//#endregion
|
|
2039
2047
|
//#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
|
|
2040
|
-
var n$
|
|
2048
|
+
var n$57 = r$54()({
|
|
2041
2049
|
type: "layoutContainer",
|
|
2042
|
-
attributeValues: { subType: e$
|
|
2050
|
+
attributeValues: { subType: e$61()([
|
|
2043
2051
|
"div",
|
|
2044
2052
|
"header",
|
|
2045
2053
|
"footer",
|
|
@@ -2137,9 +2145,9 @@ var a$30 = (e) => {
|
|
|
2137
2145
|
//#region ../sdk-shared/dist/schema/anchor.mjs
|
|
2138
2146
|
var e$54 = /^[a-z][a-z0-9-]*$/;
|
|
2139
2147
|
var t$67 = (t) => typeof t == "string" && e$54.test(t);
|
|
2140
|
-
var n$
|
|
2148
|
+
var n$56 = (e) => e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section";
|
|
2141
2149
|
var r$44 = (e, t) => {
|
|
2142
|
-
let r = n$
|
|
2150
|
+
let r = n$56(e), i = r;
|
|
2143
2151
|
for (let e = 2; t.has(i); e += 1) i = `${r}-${String(e)}`;
|
|
2144
2152
|
return t.add(i), i;
|
|
2145
2153
|
};
|
|
@@ -2369,7 +2377,7 @@ var t$66 = {
|
|
|
2369
2377
|
STROKE: "stroke",
|
|
2370
2378
|
STROKE_WIDTH: "stroke-width"
|
|
2371
2379
|
};
|
|
2372
|
-
var n$
|
|
2380
|
+
var n$55 = [
|
|
2373
2381
|
t$66.FONT_FAMILY,
|
|
2374
2382
|
t$66.FONT_SIZE,
|
|
2375
2383
|
t$66.FONT_STYLE,
|
|
@@ -2401,7 +2409,7 @@ t$66.DISPLAY, t$66.FLEX_WRAP, t$66.FLEX_DIRECTION, t$66.ALIGN_ITEMS, t$66.JUSTIF
|
|
|
2401
2409
|
//#endregion
|
|
2402
2410
|
//#region ../sdk-shared/dist/schema/schemaConstants.mjs
|
|
2403
2411
|
var t$65 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
|
|
2404
|
-
var n$
|
|
2412
|
+
var n$54 = "props";
|
|
2405
2413
|
var r$42 = {
|
|
2406
2414
|
schema: {
|
|
2407
2415
|
definition: {
|
|
@@ -2436,7 +2444,7 @@ var t$64 = (t, n, r) => {
|
|
|
2436
2444
|
}
|
|
2437
2445
|
return i;
|
|
2438
2446
|
};
|
|
2439
|
-
var n$
|
|
2447
|
+
var n$53 = (t, n) => {
|
|
2440
2448
|
let r = [], i = n;
|
|
2441
2449
|
for (; i && r.length <= 16;) {
|
|
2442
2450
|
if (r.includes(i)) return [...r.slice(r.indexOf(i)), i];
|
|
@@ -2459,7 +2467,7 @@ var t$63 = (e, t) => {
|
|
|
2459
2467
|
}
|
|
2460
2468
|
return r;
|
|
2461
2469
|
};
|
|
2462
|
-
var n$
|
|
2470
|
+
var n$52 = (e) => e == null ? "" : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
2463
2471
|
var r$41 = (e) => {
|
|
2464
2472
|
try {
|
|
2465
2473
|
let t = JSON.parse(e);
|
|
@@ -2479,14 +2487,14 @@ var a$29 = (r, i) => {
|
|
|
2479
2487
|
for (let o of r.tokens) if (o.type === "text") a += o.value;
|
|
2480
2488
|
else if (o.type === "variable") {
|
|
2481
2489
|
let r = o.content.trim(), s = o.content.indexOf(".") === -1 ? e$51(i, r) : t$63(i, r);
|
|
2482
|
-
a += o.raw ? s == null ? "" : String(s) : n$
|
|
2490
|
+
a += o.raw ? s == null ? "" : String(s) : n$52(s);
|
|
2483
2491
|
}
|
|
2484
2492
|
return a;
|
|
2485
2493
|
};
|
|
2486
2494
|
//#endregion
|
|
2487
2495
|
//#region ../sdk-shared/dist/helpers/twigWrapper/Evaluator/helpers.mjs
|
|
2488
2496
|
var t$62 = (e) => !(e == null || e === !1 || e === "" || e === 0 || Array.isArray(e) && e.length === 0);
|
|
2489
|
-
var n$
|
|
2497
|
+
var n$51 = (e, t) => typeof t == "string" ? t.includes(String(e)) : Array.isArray(t) ? t.includes(e) : typeof t == "object" && t ? String(e) in t : !1;
|
|
2490
2498
|
var r$40 = (e) => Array.isArray(e) ? e : typeof e == "object" && e ? Object.values(e) : null;
|
|
2491
2499
|
var i$38 = (e) => typeof e == "object" && e && !Array.isArray(e) ? Object.entries(e) : null;
|
|
2492
2500
|
var a$28 = (e) => typeof e == "number" || typeof e == "string" && e.trim() !== "" && Number.isFinite(Number(e));
|
|
@@ -2494,7 +2502,7 @@ var o$27 = (t, n) => {
|
|
|
2494
2502
|
if (t == null || n == null) return NaN;
|
|
2495
2503
|
if (a$28(t) && a$28(n)) return Number(t) - Number(n);
|
|
2496
2504
|
if (typeof t == "string" || typeof n == "string") {
|
|
2497
|
-
let r = n$
|
|
2505
|
+
let r = n$52(t), i = n$52(n);
|
|
2498
2506
|
return r < i ? -1 : +(r > i);
|
|
2499
2507
|
}
|
|
2500
2508
|
return Number(t) - Number(n);
|
|
@@ -2506,7 +2514,7 @@ var e$50 = Symbol("twigArrowParams");
|
|
|
2506
2514
|
//#region ../sdk-shared/dist/helpers/twigWrapper/filters/raw.mjs
|
|
2507
2515
|
var e$49 = "__PLITZI_RAW__";
|
|
2508
2516
|
var t$61 = (e) => typeof e == "object" && !!e && e.__marker === "__PLITZI_RAW__";
|
|
2509
|
-
var n$
|
|
2517
|
+
var n$50 = (t) => ({
|
|
2510
2518
|
__raw: t,
|
|
2511
2519
|
__marker: e$49
|
|
2512
2520
|
});
|
|
@@ -2515,7 +2523,7 @@ var r$39 = (e) => t$61(e) ? e.__raw : e;
|
|
|
2515
2523
|
//#region ../sdk-shared/dist/helpers/twigWrapper/filters/values.mjs
|
|
2516
2524
|
var e$48 = (e) => e == null || e === "";
|
|
2517
2525
|
var t$60 = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
|
|
2518
|
-
var n$
|
|
2526
|
+
var n$49 = (e) => e === void 0 || typeof e == "function" || typeof e == "symbol" ? "null" : typeof e == "bigint" ? e.toString() : JSON.stringify(e);
|
|
2519
2527
|
var r$38 = (e) => e == null ? "" : String(e);
|
|
2520
2528
|
var i$37 = (e) => {
|
|
2521
2529
|
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
@@ -2607,7 +2615,7 @@ var e$47 = [
|
|
|
2607
2615
|
"Sat"
|
|
2608
2616
|
];
|
|
2609
2617
|
var t$59 = /* @__PURE__ */ new Map();
|
|
2610
|
-
var n$
|
|
2618
|
+
var n$48 = (e) => {
|
|
2611
2619
|
if (!t$59.has(e)) try {
|
|
2612
2620
|
t$59.set(e, new Intl.DateTimeFormat("en-US", {
|
|
2613
2621
|
timeZone: e,
|
|
@@ -2642,7 +2650,7 @@ var a$26 = (t, r) => {
|
|
|
2642
2650
|
seconds: t.getSeconds(),
|
|
2643
2651
|
weekday: t.getDay()
|
|
2644
2652
|
};
|
|
2645
|
-
let i = n$
|
|
2653
|
+
let i = n$48(r);
|
|
2646
2654
|
if (!i) return;
|
|
2647
2655
|
let a = i.formatToParts(t), o = (e) => a.find((t) => t.type === e)?.value ?? "";
|
|
2648
2656
|
return {
|
|
@@ -2761,7 +2769,7 @@ var t$58 = (e) => {
|
|
|
2761
2769
|
for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
|
|
2762
2770
|
return new TextDecoder().decode(n);
|
|
2763
2771
|
};
|
|
2764
|
-
var n$
|
|
2772
|
+
var n$47 = (e) => {
|
|
2765
2773
|
let t = [
|
|
2766
2774
|
7,
|
|
2767
2775
|
12,
|
|
@@ -2901,7 +2909,7 @@ var o$26 = { random: (e) => Array.isArray(e) ? e.length > 0 ? e[Math.floor(Math.
|
|
|
2901
2909
|
var s$26 = {
|
|
2902
2910
|
base64_encode: (e) => typeof e == "string" ? e$46(e) : e,
|
|
2903
2911
|
base64_decode: (e) => typeof e == "string" ? t$58(e) : e,
|
|
2904
|
-
md5: (e) => typeof e == "string" ? n$
|
|
2912
|
+
md5: (e) => typeof e == "string" ? n$47(e) : e
|
|
2905
2913
|
};
|
|
2906
2914
|
//#endregion
|
|
2907
2915
|
//#region ../sdk-shared/dist/helpers/twigWrapper/filters/numbers.mjs
|
|
@@ -2953,7 +2961,7 @@ var t$57 = {
|
|
|
2953
2961
|
return i;
|
|
2954
2962
|
}
|
|
2955
2963
|
};
|
|
2956
|
-
var n$
|
|
2964
|
+
var n$46 = {
|
|
2957
2965
|
find: (t, n) => {
|
|
2958
2966
|
if (!Array.isArray(t) || n.length === 0) return;
|
|
2959
2967
|
let r = n[0];
|
|
@@ -2999,10 +3007,10 @@ var n$45 = {
|
|
|
2999
3007
|
};
|
|
3000
3008
|
//#endregion
|
|
3001
3009
|
//#region ../sdk-shared/dist/helpers/twigWrapper/filters/strings.mjs
|
|
3002
|
-
var i$33 = { raw: (e) => n$
|
|
3010
|
+
var i$33 = { raw: (e) => n$50(e) };
|
|
3003
3011
|
var a$24 = {
|
|
3004
|
-
to_json: (e) => n$
|
|
3005
|
-
json_encode: (e) => n$
|
|
3012
|
+
to_json: (e) => n$49(e),
|
|
3013
|
+
json_encode: (e) => n$49(e),
|
|
3006
3014
|
object_as_json: (e) => typeof e == "object" && e ? JSON.stringify(e) : e
|
|
3007
3015
|
};
|
|
3008
3016
|
var o$25 = { default: (t, n) => e$48(t) ? n[0] : t };
|
|
@@ -3095,7 +3103,7 @@ var b$4 = {
|
|
|
3095
3103
|
...i$35,
|
|
3096
3104
|
...s$26,
|
|
3097
3105
|
...t$57,
|
|
3098
|
-
...n$
|
|
3106
|
+
...n$46
|
|
3099
3107
|
};
|
|
3100
3108
|
//#endregion
|
|
3101
3109
|
//#region ../sdk-shared/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs
|
|
@@ -3349,8 +3357,8 @@ var v$5 = class d {
|
|
|
3349
3357
|
case "/": return d ? c / l : Number(c) / Number(l);
|
|
3350
3358
|
case "//": return Math.floor(Number(c) / Number(l));
|
|
3351
3359
|
case "**": return Number(c) ** Number(l);
|
|
3352
|
-
case "starts with": return typeof c == "string" && c.startsWith(n$
|
|
3353
|
-
case "ends with": return typeof c == "string" && c.endsWith(n$
|
|
3360
|
+
case "starts with": return typeof c == "string" && c.startsWith(n$52(l));
|
|
3361
|
+
case "ends with": return typeof c == "string" && c.endsWith(n$52(l));
|
|
3354
3362
|
case "%": return d ? c % l : Number(c) % Number(l);
|
|
3355
3363
|
case "==": return c === l || String(c) === String(l);
|
|
3356
3364
|
case "!=": return c !== l && String(c) !== String(l);
|
|
@@ -3358,8 +3366,8 @@ var v$5 = class d {
|
|
|
3358
3366
|
case "<": return d ? c < l : o$27(c, l) < 0;
|
|
3359
3367
|
case ">=": return d ? c >= l : o$27(c, l) >= 0;
|
|
3360
3368
|
case "<=": return d ? c <= l : o$27(c, l) <= 0;
|
|
3361
|
-
case "in": return n$
|
|
3362
|
-
case "not in": return !n$
|
|
3369
|
+
case "in": return n$51(c, l);
|
|
3370
|
+
case "not in": return !n$51(c, l);
|
|
3363
3371
|
case "same as": return c === l;
|
|
3364
3372
|
case "divisible by": {
|
|
3365
3373
|
let e = Number(l);
|
|
@@ -3410,14 +3418,14 @@ var e$45 = {
|
|
|
3410
3418
|
LowerT: 116
|
|
3411
3419
|
};
|
|
3412
3420
|
var t$56 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$45.Underscore;
|
|
3413
|
-
var n$
|
|
3414
|
-
var r$34 = (t) => n$
|
|
3421
|
+
var n$45 = (n) => t$56(n) || n >= e$45.Zero && n <= e$45.Nine;
|
|
3422
|
+
var r$34 = (t) => n$45(t) || t === e$45.Minus;
|
|
3415
3423
|
var i$32 = (t) => t >= e$45.Zero && t <= e$45.Nine;
|
|
3416
3424
|
var a$23 = (t) => t === e$45.Space || t === e$45.Tab || t === e$45.Newline || t === e$45.CarriageReturn;
|
|
3417
3425
|
var o$24 = (e) => {
|
|
3418
3426
|
let r = e.length;
|
|
3419
3427
|
if (r === 0 || !t$56(e.charCodeAt(0))) return !1;
|
|
3420
|
-
for (let t = 1; t < r; t++) if (!n$
|
|
3428
|
+
for (let t = 1; t < r; t++) if (!n$45(e.charCodeAt(t))) return !1;
|
|
3421
3429
|
return !0;
|
|
3422
3430
|
};
|
|
3423
3431
|
var s$24 = (r) => {
|
|
@@ -3432,7 +3440,7 @@ var s$24 = (r) => {
|
|
|
3432
3440
|
} else if (o) {
|
|
3433
3441
|
if (s = i$32(a), !s && !t$56(a)) return !1;
|
|
3434
3442
|
o = !1;
|
|
3435
|
-
} else if (s ? !i$32(a) : !n$
|
|
3443
|
+
} else if (s ? !i$32(a) : !n$45(a)) return !1;
|
|
3436
3444
|
}
|
|
3437
3445
|
return !o;
|
|
3438
3446
|
};
|
|
@@ -3551,7 +3559,7 @@ var o$23 = class {
|
|
|
3551
3559
|
let t = this.pos + e.length;
|
|
3552
3560
|
if (t > this.src.length) return !1;
|
|
3553
3561
|
for (let t = 0; t < e.length; t++) if (this.src.charCodeAt(this.pos + t) !== e.charCodeAt(t)) return !1;
|
|
3554
|
-
return t < this.src.length && n$
|
|
3562
|
+
return t < this.src.length && n$45(this.src.charCodeAt(t)) ? !1 : (this.pos = t, this.skipWs(), !0);
|
|
3555
3563
|
}
|
|
3556
3564
|
matchBinaryOp() {
|
|
3557
3565
|
this.skipWs();
|
|
@@ -4011,7 +4019,7 @@ var s$23 = class extends o$23 {
|
|
|
4011
4019
|
};
|
|
4012
4020
|
//#endregion
|
|
4013
4021
|
//#region ../sdk-shared/dist/helpers/twigWrapper/Parser/helpers.mjs
|
|
4014
|
-
var n$
|
|
4022
|
+
var n$44 = (e) => {
|
|
4015
4023
|
let n = 0;
|
|
4016
4024
|
for (; n < e.length && !a$23(e.charCodeAt(n));) n++;
|
|
4017
4025
|
return e.slice(0, n);
|
|
@@ -4033,7 +4041,7 @@ var c$21 = (e, t = !1, n) => {
|
|
|
4033
4041
|
if (!r.error) {
|
|
4034
4042
|
let e = r.peek();
|
|
4035
4043
|
if (e && e.type === "tag") {
|
|
4036
|
-
let t = n$
|
|
4044
|
+
let t = n$44(e.content.trim());
|
|
4037
4045
|
l$18.has(t) && (r.error = `Orphan closing tag: {% ${t} %} without matching opening tag`);
|
|
4038
4046
|
}
|
|
4039
4047
|
}
|
|
@@ -4097,7 +4105,7 @@ var f$16 = class {
|
|
|
4097
4105
|
let e = [];
|
|
4098
4106
|
for (; this.pos < this.tokens.length;) {
|
|
4099
4107
|
let t = this.peek();
|
|
4100
|
-
if (!t || t.type === "tag" && l$18.has(n$
|
|
4108
|
+
if (!t || t.type === "tag" && l$18.has(n$44(t.content.trim()))) break;
|
|
4101
4109
|
let n = this.parseNode();
|
|
4102
4110
|
n && e.push(n);
|
|
4103
4111
|
}
|
|
@@ -4142,7 +4150,7 @@ var f$16 = class {
|
|
|
4142
4150
|
parseTag() {
|
|
4143
4151
|
let e = this.peek();
|
|
4144
4152
|
if (!e || e.type !== "tag") return null;
|
|
4145
|
-
let n = n$
|
|
4153
|
+
let n = n$44(e.content.trim());
|
|
4146
4154
|
switch (n) {
|
|
4147
4155
|
case "if": return this.parseIf();
|
|
4148
4156
|
case "for": return this.parseFor();
|
|
@@ -4163,7 +4171,7 @@ var f$16 = class {
|
|
|
4163
4171
|
for (; this.peek();) {
|
|
4164
4172
|
let e = this.peek();
|
|
4165
4173
|
if (!e || e.type !== "tag") break;
|
|
4166
|
-
let t = n$
|
|
4174
|
+
let t = n$44(e.content.trim());
|
|
4167
4175
|
if (t === "elseif") {
|
|
4168
4176
|
this.advance();
|
|
4169
4177
|
let t = e.content.trim(), r = r$33(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
|
|
@@ -4202,10 +4210,10 @@ var f$16 = class {
|
|
|
4202
4210
|
let _ = this.parseBody(), v = null;
|
|
4203
4211
|
if (this.peek()) {
|
|
4204
4212
|
let e = this.peek();
|
|
4205
|
-
e && e.type === "tag" && n$
|
|
4213
|
+
e && e.type === "tag" && n$44(e.content.trim()) === "else" && (this.advance(), v = this.parseBody());
|
|
4206
4214
|
}
|
|
4207
4215
|
let y = this.peek();
|
|
4208
|
-
y && y.type === "tag" && n$
|
|
4216
|
+
y && y.type === "tag" && n$44(y.content.trim()) === "endfor" ? this.advance() : this.error = "Malformed {% for %} block: missing {% endfor %}";
|
|
4209
4217
|
let b = this.keepEmptyTokens ? this.reconstructRange(e, this.pos) : void 0;
|
|
4210
4218
|
return {
|
|
4211
4219
|
type: "for",
|
|
@@ -4400,7 +4408,7 @@ function t$53(t, n) {
|
|
|
4400
4408
|
}
|
|
4401
4409
|
return r.length ? r : [];
|
|
4402
4410
|
}
|
|
4403
|
-
function n$
|
|
4411
|
+
function n$43(t, n) {
|
|
4404
4412
|
if (!Array.isArray(t)) return [];
|
|
4405
4413
|
let r = [];
|
|
4406
4414
|
for (let i of t) {
|
|
@@ -4411,7 +4419,7 @@ function n$42(t, n) {
|
|
|
4411
4419
|
return r;
|
|
4412
4420
|
}
|
|
4413
4421
|
function r$30(e, r = !0) {
|
|
4414
|
-
return e ? typeof e == "string" ? t$53(e, r) : Array.isArray(e) ? n$
|
|
4422
|
+
return e ? typeof e == "string" ? t$53(e, r) : Array.isArray(e) ? n$43(e, r) : [] : [];
|
|
4415
4423
|
}
|
|
4416
4424
|
//#endregion
|
|
4417
4425
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/get.js
|
|
@@ -4802,7 +4810,7 @@ function validateTimezone(_hours, minutes) {
|
|
|
4802
4810
|
}
|
|
4803
4811
|
//#endregion
|
|
4804
4812
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/formatDate.js
|
|
4805
|
-
var n$
|
|
4813
|
+
var n$42 = (n) => {
|
|
4806
4814
|
let r;
|
|
4807
4815
|
return r = typeof n == "number" ? n < 0xe8d4a51000 ? /* @__PURE__ */ new Date(n * 1e3) : new Date(n) : typeof n == "string" ? parseISO(n) : n, Math.floor(getTime(r) / 1e3).toString();
|
|
4808
4816
|
};
|
|
@@ -4834,9 +4842,9 @@ var o$21 = (e) => {
|
|
|
4834
4842
|
};
|
|
4835
4843
|
var s$21 = (e, t = "json") => o$21(e);
|
|
4836
4844
|
var c$19 = (e, t) => typeof e == "boolean" && typeof t == "string" ? (t = t.toLowerCase(), t = t === "true" || t === "1", e === t) : typeof e == "string" && typeof t == "boolean" ? (e = e.toLowerCase(), e = e === "true" || e === "1", e === t) : (typeof e == "number" && (e = `${e}`), typeof t == "number" && (t = `${t}`), e === t);
|
|
4837
|
-
var l$16 = (e, t) => e == null || t == null ? !1 : r$29(e) && r$29(t) ? (e = n$
|
|
4845
|
+
var l$16 = (e, t) => e == null || t == null ? !1 : r$29(e) && r$29(t) ? (e = n$42(e), t = n$42(t), parseFloat(t) > parseFloat(e)) : e$41(e) ? (e = parseFloat(e), t = parseFloat(t), e$41(t) && t > e) : t > e;
|
|
4838
4846
|
var u$19 = (e, t) => l$16(e, t) || c$19(e, t);
|
|
4839
|
-
var d$17 = (e, t) => e == null || t == null ? !1 : r$29(e) && r$29(t) ? (e = n$
|
|
4847
|
+
var d$17 = (e, t) => e == null || t == null ? !1 : r$29(e) && r$29(t) ? (e = n$42(e), t = n$42(t), parseFloat(t) < parseFloat(e)) : e$41(e) ? (e = parseFloat(e), t = parseFloat(t), e$41(t) && t < e) : t < e;
|
|
4840
4848
|
var f$13 = (e, t) => d$17(e, t) || c$19(e, t);
|
|
4841
4849
|
var p$9 = (e, t) => Array.isArray(t) ? t.some((t) => c$19(e, t)) : typeof e == "string" && typeof t == "string" && t.toLowerCase().includes(e.toLowerCase());
|
|
4842
4850
|
var m$10 = (e, t) => typeof t == "string" && typeof e == "string" && t.toLowerCase().startsWith(e.toLowerCase());
|
|
@@ -4927,7 +4935,7 @@ var e$39 = [
|
|
|
4927
4935
|
"computed"
|
|
4928
4936
|
];
|
|
4929
4937
|
e$39.filter((e) => e !== "state" && e !== "computed");
|
|
4930
|
-
var n$
|
|
4938
|
+
var n$41 = {
|
|
4931
4939
|
navigation: {
|
|
4932
4940
|
routeParams: "open",
|
|
4933
4941
|
queryParams: "open",
|
|
@@ -4977,13 +4985,13 @@ var t$49 = (e, n) => {
|
|
|
4977
4985
|
} else for (let r of Object.values(e)) t$49(r, n);
|
|
4978
4986
|
}
|
|
4979
4987
|
};
|
|
4980
|
-
var n$
|
|
4988
|
+
var n$40 = (n) => {
|
|
4981
4989
|
let r = d$19(n);
|
|
4982
4990
|
if (!r) return [];
|
|
4983
4991
|
let i = /* @__PURE__ */ new Set();
|
|
4984
4992
|
return t$49(r.nodes ?? r.nodesWithSource, i), [...i];
|
|
4985
4993
|
};
|
|
4986
|
-
var r$28 = (e) => [...new Set(n$
|
|
4994
|
+
var r$28 = (e) => [...new Set(n$40(e).map((e) => e.split(".")[0]))];
|
|
4987
4995
|
//#endregion
|
|
4988
4996
|
//#region ../sdk-shared/dist/dataSource/utility/truthiness.mjs
|
|
4989
4997
|
var e$38 = /* @__PURE__ */ new Set([
|
|
@@ -4994,7 +5002,7 @@ var e$38 = /* @__PURE__ */ new Set([
|
|
|
4994
5002
|
var t$48 = (t) => typeof t == "string" ? !e$38.has(t.trim().toLowerCase()) : Array.isArray(t) ? t.length > 0 : !!t;
|
|
4995
5003
|
//#endregion
|
|
4996
5004
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/pick.js
|
|
4997
|
-
function n$
|
|
5005
|
+
function n$39(n, r) {
|
|
4998
5006
|
let i = {}, a = Array.isArray(r) ? r : [r];
|
|
4999
5007
|
for (let r of a) {
|
|
5000
5008
|
let a = t$52(n, r);
|
|
@@ -5016,7 +5024,7 @@ function e$36(e) {
|
|
|
5016
5024
|
}
|
|
5017
5025
|
//#endregion
|
|
5018
5026
|
//#region ../sdk-shared/dist/dataSource/utility/arrayMap.mjs
|
|
5019
|
-
var n$
|
|
5027
|
+
var n$38 = {
|
|
5020
5028
|
action: "arrayMap",
|
|
5021
5029
|
title: "Array Map",
|
|
5022
5030
|
type: "utility",
|
|
@@ -8743,7 +8751,7 @@ var t$45 = {
|
|
|
8743
8751
|
};
|
|
8744
8752
|
//#endregion
|
|
8745
8753
|
//#region ../sdk-shared/dist/dataSource/utility/styleVariant.mjs
|
|
8746
|
-
var n$
|
|
8754
|
+
var n$37 = (n, r, i, a = {}) => {
|
|
8747
8755
|
let { key: o, variant: s, append: c } = r;
|
|
8748
8756
|
if (!o) return a.sourceTo ?? {};
|
|
8749
8757
|
let l = o || "base", u = s || n;
|
|
@@ -8801,7 +8809,7 @@ var u$16 = {
|
|
|
8801
8809
|
dateConverter: i$28,
|
|
8802
8810
|
staticValue: e$35,
|
|
8803
8811
|
capitalize: t$47,
|
|
8804
|
-
arrayMap: n$
|
|
8812
|
+
arrayMap: n$38,
|
|
8805
8813
|
stringToArray: e$34,
|
|
8806
8814
|
not: t$46,
|
|
8807
8815
|
styleSelector: t$45,
|
|
@@ -8864,7 +8872,7 @@ var u$16 = {
|
|
|
8864
8872
|
variant: "",
|
|
8865
8873
|
append: ""
|
|
8866
8874
|
},
|
|
8867
|
-
callback: n$
|
|
8875
|
+
callback: n$37
|
|
8868
8876
|
}
|
|
8869
8877
|
};
|
|
8870
8878
|
Object.values(u$16).map(({ title: e, action: t }) => ({
|
|
@@ -9573,7 +9581,7 @@ var u$15 = (u, d, f = {}) => {
|
|
|
9573
9581
|
};
|
|
9574
9582
|
//#endregion
|
|
9575
9583
|
//#region ../sdk-shared/dist/schema/serverQuery.mjs
|
|
9576
|
-
var n$
|
|
9584
|
+
var n$35 = [
|
|
9577
9585
|
"query",
|
|
9578
9586
|
"headers",
|
|
9579
9587
|
"accessToken",
|
|
@@ -9585,7 +9593,7 @@ var i$26 = (e) => typeof e == "object" && e ? Object.fromEntries(Object.entries(
|
|
|
9585
9593
|
var a$18 = (e, i) => {
|
|
9586
9594
|
let { query: a, method: o, credentials: s } = e.attributes;
|
|
9587
9595
|
if (typeof a != "string" || a === "") return;
|
|
9588
|
-
let c = (e.definition.bindings?.attributes ?? []).filter((e) => e.enabled !== !1 && n$
|
|
9596
|
+
let c = (e.definition.bindings?.attributes ?? []).filter((e) => e.enabled !== !1 && n$35.includes(e.to)).map((e) => e.to);
|
|
9589
9597
|
if (c.length > 0) return `its ${[...new Set(c)].join(", ")} is bound, which the browser alone resolves`;
|
|
9590
9598
|
let l = r$26.flatMap((n) => {
|
|
9591
9599
|
let r = e.attributes[n];
|
|
@@ -9659,7 +9667,7 @@ var t$44 = [
|
|
|
9659
9667
|
"video.tv_show",
|
|
9660
9668
|
"video.other"
|
|
9661
9669
|
];
|
|
9662
|
-
var n$
|
|
9670
|
+
var n$34 = (e) => typeof e == "string" && t$44.includes(e);
|
|
9663
9671
|
var r$25 = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/;
|
|
9664
9672
|
var i$25 = /^\/(?!\/)[^\s"'<>]*$/;
|
|
9665
9673
|
var a$17 = /^https?:\/\/[^\s"'<>]+$/;
|
|
@@ -9686,7 +9694,7 @@ var m$9 = (e) => {
|
|
|
9686
9694
|
};
|
|
9687
9695
|
//#endregion
|
|
9688
9696
|
//#region ../sdk-shared/dist/schema/schemaSettings.mjs
|
|
9689
|
-
var e$32 = /* @__PURE__ */ "keepState.stateStorage.transientState.keptState.paintedState.robotsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split(".");
|
|
9697
|
+
var e$32 = /* @__PURE__ */ "keepState.stateStorage.transientState.keptState.paintedState.browserState.robotsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split(".");
|
|
9690
9698
|
new Set(e$32);
|
|
9691
9699
|
//#endregion
|
|
9692
9700
|
//#region ../sdk-shared/dist/schema/motion.mjs
|
|
@@ -9705,7 +9713,7 @@ var t$42 = [
|
|
|
9705
9713
|
"tilt",
|
|
9706
9714
|
"spin-in"
|
|
9707
9715
|
];
|
|
9708
|
-
var n$
|
|
9716
|
+
var n$33 = [
|
|
9709
9717
|
"load",
|
|
9710
9718
|
"view",
|
|
9711
9719
|
"scroll"
|
|
@@ -9868,7 +9876,7 @@ var S$1 = (i) => {
|
|
|
9868
9876
|
if (!e$55(i)) return ["motion is an object: `{ enter: \"fade-up\", on: \"view\" }`"];
|
|
9869
9877
|
let a = [];
|
|
9870
9878
|
for (let e of Object.keys(i)) x$2.has(e) || a.push(`motion has no "${e}" — it takes enter, on, duration, delay, stagger, loop, easing and distance`);
|
|
9871
|
-
i.enter !== void 0 && !b$2(t$42, i.enter) && a.push(`motion.enter is one of ${t$42.join(", ")}`), i.on !== void 0 && !b$2(n$
|
|
9879
|
+
i.enter !== void 0 && !b$2(t$42, i.enter) && a.push(`motion.enter is one of ${t$42.join(", ")}`), i.on !== void 0 && !b$2(n$33, i.on) && a.push(`motion.on is ${n$33.slice(0, -1).join(", ")} or ${String(n$33.at(-1))}`), i.loop !== void 0 && !b$2(r$24, i.loop) && a.push(`motion.loop is one of ${r$24.join(", ")}`);
|
|
9872
9880
|
for (let e of [
|
|
9873
9881
|
"duration",
|
|
9874
9882
|
"delay",
|
|
@@ -9891,7 +9899,7 @@ var S$1 = (i) => {
|
|
|
9891
9899
|
//#endregion
|
|
9892
9900
|
//#region ../sdk-shared/dist/schema/markdownHeadings.mjs
|
|
9893
9901
|
var t$41 = /^ {0,3}(`{3,}|~{3,})/;
|
|
9894
|
-
var n$
|
|
9902
|
+
var n$32 = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*$/;
|
|
9895
9903
|
var r$23 = (e) => e.replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/<[^>]+>/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`+([^`]*?)`+/g, "$1").replace(/(\*\*|~~)(.+?)\1/g, "$2").replace(/\*(.+?)\*/g, "$1").replace(/\b__(.+?)__\b/g, "$1").replace(/\b_(.+?)_\b/g, "$1").replace(/\\([\\`*_{}[\]()#+\-.!|~>])/g, "$1").trim();
|
|
9896
9904
|
var i$24 = (i) => {
|
|
9897
9905
|
let a = /* @__PURE__ */ new Set(), o = [], s;
|
|
@@ -9901,7 +9909,7 @@ var i$24 = (i) => {
|
|
|
9901
9909
|
s ? i[0] === s[0] && i.length >= s.length && (s = void 0) : s = i;
|
|
9902
9910
|
continue;
|
|
9903
9911
|
}
|
|
9904
|
-
let l = s ? null : n$
|
|
9912
|
+
let l = s ? null : n$32.exec(c);
|
|
9905
9913
|
if (l) {
|
|
9906
9914
|
let t = r$23(l[2]);
|
|
9907
9915
|
o.push({
|
|
@@ -9915,8 +9923,8 @@ var i$24 = (i) => {
|
|
|
9915
9923
|
};
|
|
9916
9924
|
//#endregion
|
|
9917
9925
|
//#region ../sdk-elements/dist/elements/internal/Page/declaration.mjs
|
|
9918
|
-
var n$
|
|
9919
|
-
var r$22 = (e) => n$
|
|
9926
|
+
var n$31 = ["locked", "noBounce"];
|
|
9927
|
+
var r$22 = (e) => n$31.some((t) => t === e);
|
|
9920
9928
|
var i$23 = r$54()({
|
|
9921
9929
|
type: "page",
|
|
9922
9930
|
contentAttributes: ["seoPageTitle", "seoPageDescription"],
|
|
@@ -9928,7 +9936,7 @@ var i$23 = r$54()({
|
|
|
9928
9936
|
"notFound"
|
|
9929
9937
|
],
|
|
9930
9938
|
attributeValues: {
|
|
9931
|
-
documentScroll: n$
|
|
9939
|
+
documentScroll: n$31,
|
|
9932
9940
|
seoType: t$44
|
|
9933
9941
|
},
|
|
9934
9942
|
triggers: { onPageLoad: {
|
|
@@ -9984,7 +9992,7 @@ var i$23 = r$54()({
|
|
|
9984
9992
|
});
|
|
9985
9993
|
//#endregion
|
|
9986
9994
|
//#region ../sdk-elements/dist/elements/media/Chart/declaration.mjs
|
|
9987
|
-
var n$
|
|
9995
|
+
var n$30 = {
|
|
9988
9996
|
fill: "currentColor",
|
|
9989
9997
|
"font-size": "12px",
|
|
9990
9998
|
"font-family": "inherit"
|
|
@@ -9993,13 +10001,13 @@ var r$21 = r$54()({
|
|
|
9993
10001
|
type: "chart",
|
|
9994
10002
|
contentAttributes: ["label", "emptyText"],
|
|
9995
10003
|
attributeValues: {
|
|
9996
|
-
kind: e$
|
|
10004
|
+
kind: e$61()([
|
|
9997
10005
|
"bar",
|
|
9998
10006
|
"line",
|
|
9999
10007
|
"area",
|
|
10000
10008
|
"donut"
|
|
10001
10009
|
]),
|
|
10002
|
-
format: e$
|
|
10010
|
+
format: e$61()([
|
|
10003
10011
|
"number",
|
|
10004
10012
|
"percent",
|
|
10005
10013
|
"compact"
|
|
@@ -10066,10 +10074,10 @@ var r$21 = r$54()({
|
|
|
10066
10074
|
"stroke-width": "1px"
|
|
10067
10075
|
} },
|
|
10068
10076
|
axisLabel: { default: {
|
|
10069
|
-
...n$
|
|
10077
|
+
...n$30,
|
|
10070
10078
|
"fill-opacity": "0.7"
|
|
10071
10079
|
} },
|
|
10072
|
-
valueLabel: { default: n$
|
|
10080
|
+
valueLabel: { default: n$30 },
|
|
10073
10081
|
legend: { default: {
|
|
10074
10082
|
display: "flex",
|
|
10075
10083
|
"flex-wrap": "wrap",
|
|
@@ -10144,16 +10152,16 @@ var t$39 = r$54()({
|
|
|
10144
10152
|
});
|
|
10145
10153
|
//#endregion
|
|
10146
10154
|
//#region ../sdk-elements/dist/elements/media/Image/declaration.mjs
|
|
10147
|
-
var n$
|
|
10155
|
+
var n$29 = r$54()({
|
|
10148
10156
|
type: "image",
|
|
10149
10157
|
contentAttributes: ["src", "alt"],
|
|
10150
10158
|
attributeValues: {
|
|
10151
|
-
fetchPriority: e$
|
|
10159
|
+
fetchPriority: e$61()([
|
|
10152
10160
|
"high",
|
|
10153
10161
|
"low",
|
|
10154
10162
|
"auto"
|
|
10155
10163
|
]),
|
|
10156
|
-
loadMode: e$
|
|
10164
|
+
loadMode: e$61()([
|
|
10157
10165
|
"auto",
|
|
10158
10166
|
"eager",
|
|
10159
10167
|
"lazy"
|
|
@@ -10241,10 +10249,10 @@ var t$37 = r$54()({
|
|
|
10241
10249
|
});
|
|
10242
10250
|
//#endregion
|
|
10243
10251
|
//#region ../sdk-elements/dist/elements/provider/ApiContainer/declaration.mjs
|
|
10244
|
-
var n$
|
|
10252
|
+
var n$28 = r$54()({
|
|
10245
10253
|
type: "apiContainer",
|
|
10246
10254
|
attributeValues: {
|
|
10247
|
-
subType: e$
|
|
10255
|
+
subType: e$61()([
|
|
10248
10256
|
"",
|
|
10249
10257
|
"div",
|
|
10250
10258
|
"header",
|
|
@@ -10257,19 +10265,19 @@ var n$27 = r$54()({
|
|
|
10257
10265
|
"address",
|
|
10258
10266
|
"figure"
|
|
10259
10267
|
]),
|
|
10260
|
-
method: e$
|
|
10268
|
+
method: e$61()([
|
|
10261
10269
|
"get",
|
|
10262
10270
|
"post",
|
|
10263
10271
|
"put",
|
|
10264
10272
|
"delete",
|
|
10265
10273
|
"patch"
|
|
10266
10274
|
]),
|
|
10267
|
-
credentials: e$
|
|
10275
|
+
credentials: e$61()([
|
|
10268
10276
|
"include",
|
|
10269
10277
|
"omit",
|
|
10270
10278
|
"same-origin"
|
|
10271
10279
|
]),
|
|
10272
|
-
pagination: e$
|
|
10280
|
+
pagination: e$61()([
|
|
10273
10281
|
"none",
|
|
10274
10282
|
"url",
|
|
10275
10283
|
"append"
|
|
@@ -10406,9 +10414,9 @@ var n$27 = r$54()({
|
|
|
10406
10414
|
});
|
|
10407
10415
|
//#endregion
|
|
10408
10416
|
//#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
|
|
10409
|
-
var n$
|
|
10417
|
+
var n$27 = r$54()({
|
|
10410
10418
|
type: "channel",
|
|
10411
|
-
attributeValues: { subType: e$
|
|
10419
|
+
attributeValues: { subType: e$61()([
|
|
10412
10420
|
"",
|
|
10413
10421
|
"div",
|
|
10414
10422
|
"section",
|
|
@@ -10558,7 +10566,7 @@ var t$35 = {
|
|
|
10558
10566
|
value: "page"
|
|
10559
10567
|
}]
|
|
10560
10568
|
};
|
|
10561
|
-
var n$
|
|
10569
|
+
var n$26 = r$54()({
|
|
10562
10570
|
type: "carousel",
|
|
10563
10571
|
contentAttributes: ["label"],
|
|
10564
10572
|
sourceType: "carousel",
|
|
@@ -10650,7 +10658,7 @@ var n$25 = r$54()({
|
|
|
10650
10658
|
});
|
|
10651
10659
|
//#endregion
|
|
10652
10660
|
//#region ../sdk-elements/dist/elements/structure/Container/declaration.mjs
|
|
10653
|
-
var n$
|
|
10661
|
+
var n$25 = [
|
|
10654
10662
|
"div",
|
|
10655
10663
|
"header",
|
|
10656
10664
|
"footer",
|
|
@@ -10664,7 +10672,7 @@ var n$24 = [
|
|
|
10664
10672
|
var r$20 = r$54()({
|
|
10665
10673
|
type: "container",
|
|
10666
10674
|
attributeValues: {
|
|
10667
|
-
subType: e$
|
|
10675
|
+
subType: e$61()([
|
|
10668
10676
|
"div",
|
|
10669
10677
|
"header",
|
|
10670
10678
|
"footer",
|
|
@@ -10690,7 +10698,7 @@ var r$20 = r$54()({
|
|
|
10690
10698
|
"details",
|
|
10691
10699
|
"summary"
|
|
10692
10700
|
]),
|
|
10693
|
-
live: e$
|
|
10701
|
+
live: e$61()([
|
|
10694
10702
|
"",
|
|
10695
10703
|
"polite",
|
|
10696
10704
|
"assertive"
|
|
@@ -10739,7 +10747,7 @@ var t$34 = { default: {
|
|
|
10739
10747
|
"font-size": "inherit",
|
|
10740
10748
|
cursor: "pointer"
|
|
10741
10749
|
} };
|
|
10742
|
-
var n$
|
|
10750
|
+
var n$24 = {
|
|
10743
10751
|
"min-height": "30px",
|
|
10744
10752
|
"min-width": "30px",
|
|
10745
10753
|
"padding-top": "6px",
|
|
@@ -10917,9 +10925,9 @@ var r$19 = r$54()({
|
|
|
10917
10925
|
"justify-content": "flex-end",
|
|
10918
10926
|
"margin-top": "8px"
|
|
10919
10927
|
} },
|
|
10920
|
-
acceptButton: { default: n$
|
|
10928
|
+
acceptButton: { default: n$24 },
|
|
10921
10929
|
cancelButton: { default: {
|
|
10922
|
-
...n$
|
|
10930
|
+
...n$24,
|
|
10923
10931
|
"margin-left": "12px"
|
|
10924
10932
|
} }
|
|
10925
10933
|
},
|
|
@@ -10929,12 +10937,38 @@ var r$19 = r$54()({
|
|
|
10929
10937
|
initialItems: ["container"]
|
|
10930
10938
|
});
|
|
10931
10939
|
//#endregion
|
|
10940
|
+
//#region ../sdk-elements/dist/elements/structure/FocusGroup/declaration.mjs
|
|
10941
|
+
var n$23 = r$54()({
|
|
10942
|
+
type: "focusGroup",
|
|
10943
|
+
attributeValues: { subType: e$61()([
|
|
10944
|
+
"div",
|
|
10945
|
+
"nav",
|
|
10946
|
+
"section"
|
|
10947
|
+
]) },
|
|
10948
|
+
content: {
|
|
10949
|
+
attributes: { subType: "div" },
|
|
10950
|
+
definition: {
|
|
10951
|
+
label: "Focus Group",
|
|
10952
|
+
description: "A box whose controls the arrow keys move through: up and down between them, left and right to the first of the next or previous list, down from a text field inside into them. For a search palette, a menu, a set of options — what someone goes through with the keyboard, which Tab alone took a stop at a time.",
|
|
10953
|
+
items: []
|
|
10954
|
+
},
|
|
10955
|
+
market: {
|
|
10956
|
+
category: "structure",
|
|
10957
|
+
icon: "fa-solid fa-arrows-up-down"
|
|
10958
|
+
},
|
|
10959
|
+
defaultStyle: {
|
|
10960
|
+
style: { base: { default: {} } },
|
|
10961
|
+
subTypes: {}
|
|
10962
|
+
}
|
|
10963
|
+
}
|
|
10964
|
+
});
|
|
10965
|
+
//#endregion
|
|
10932
10966
|
//#region ../sdk-elements/dist/elements/structure/List/declaration.mjs
|
|
10933
10967
|
var n$22 = r$54()({
|
|
10934
10968
|
type: "list",
|
|
10935
10969
|
attributeValues: {
|
|
10936
|
-
subType: e$
|
|
10937
|
-
source: e$
|
|
10970
|
+
subType: e$61()(["ul", "ol"]),
|
|
10971
|
+
source: e$61()(["none", "controlled"])
|
|
10938
10972
|
},
|
|
10939
10973
|
sourceType: "list",
|
|
10940
10974
|
publishes: {
|
|
@@ -11182,8 +11216,8 @@ var n$21 = r$54()({
|
|
|
11182
11216
|
"loadMoreLabel"
|
|
11183
11217
|
],
|
|
11184
11218
|
attributeValues: {
|
|
11185
|
-
mode: e$
|
|
11186
|
-
target: e$
|
|
11219
|
+
mode: e$61()(["pages", "loadMore"]),
|
|
11220
|
+
target: e$61()(["url", "interaction"])
|
|
11187
11221
|
},
|
|
11188
11222
|
triggers: { onPageChange: {
|
|
11189
11223
|
action: "onPageChange",
|
|
@@ -11571,27 +11605,28 @@ var r$18 = /^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i;
|
|
|
11571
11605
|
var i$22 = (e) => r$18.test(e);
|
|
11572
11606
|
//#endregion
|
|
11573
11607
|
//#region ../sdk-elements/dist/elements/declarations/index.mjs
|
|
11574
|
-
var
|
|
11575
|
-
ApiContainer: n$
|
|
11608
|
+
var Y = {
|
|
11609
|
+
ApiContainer: n$28,
|
|
11576
11610
|
BlockHtml: t$80,
|
|
11577
11611
|
BlockJsx: t$79,
|
|
11578
11612
|
Button: r$48,
|
|
11579
|
-
Carousel: n$
|
|
11613
|
+
Carousel: n$26,
|
|
11580
11614
|
CarouselTrack: t$36,
|
|
11581
|
-
Channel: n$
|
|
11615
|
+
Channel: n$27,
|
|
11582
11616
|
Container: r$20,
|
|
11583
11617
|
Custom: t$78,
|
|
11584
11618
|
DialogContainer: r$19,
|
|
11585
|
-
|
|
11619
|
+
FocusGroup: n$23,
|
|
11620
|
+
Dropdown: n$64,
|
|
11586
11621
|
DropdownPopup: t$74,
|
|
11587
11622
|
Embed: t$40,
|
|
11588
11623
|
FontAwesome: t$39,
|
|
11589
|
-
Form: n$
|
|
11624
|
+
Form: n$59,
|
|
11590
11625
|
FormControl: g$6,
|
|
11591
|
-
Heading: n$
|
|
11592
|
-
Image: n$
|
|
11593
|
-
LayoutContainer: n$
|
|
11594
|
-
Link: n$
|
|
11626
|
+
Heading: n$63,
|
|
11627
|
+
Image: n$29,
|
|
11628
|
+
LayoutContainer: n$57,
|
|
11629
|
+
Link: n$62,
|
|
11595
11630
|
List: n$22,
|
|
11596
11631
|
ListItem: t$33,
|
|
11597
11632
|
Loading: t$70,
|
|
@@ -11604,7 +11639,7 @@ var J = {
|
|
|
11604
11639
|
Paragraph: t$72,
|
|
11605
11640
|
PlitziSdk: t$76,
|
|
11606
11641
|
Reference: t$75,
|
|
11607
|
-
RichText: n$
|
|
11642
|
+
RichText: n$61,
|
|
11608
11643
|
Chart: r$21,
|
|
11609
11644
|
Svg: t$38,
|
|
11610
11645
|
TabContainer: t$31,
|
|
@@ -11615,12 +11650,12 @@ var J = {
|
|
|
11615
11650
|
ThemeToggle: r$47,
|
|
11616
11651
|
Video: t$37
|
|
11617
11652
|
};
|
|
11618
|
-
var
|
|
11619
|
-
Object.fromEntries(Object.values(
|
|
11653
|
+
var X = Object.fromEntries(Object.values(Y).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : []));
|
|
11654
|
+
Object.fromEntries(Object.values(Y).flatMap((e) => "contentAttributes" in e ? [[e.type, e.contentAttributes]] : []));
|
|
11620
11655
|
//#endregion
|
|
11621
11656
|
//#region src/elements/catalog.ts
|
|
11622
11657
|
/** Every declaration, read through the part of its shape this catalog uses. */
|
|
11623
|
-
var declarations =
|
|
11658
|
+
var declarations = Y;
|
|
11624
11659
|
/** Keyed by the schema `type`, which is what a document and every catalog address a type by. */
|
|
11625
11660
|
var elementCatalog = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, {
|
|
11626
11661
|
label: declaration.content?.definition?.label ?? declaration.type,
|
|
@@ -12846,7 +12881,7 @@ var SPACE_CODES = {
|
|
|
12846
12881
|
},
|
|
12847
12882
|
"state-key-list": {
|
|
12848
12883
|
kind: "refused",
|
|
12849
|
-
means: "`settings.transientState` / `paintedState` that is not a list of top-level state keys",
|
|
12884
|
+
means: "`settings.transientState` / `paintedState` / `browserState` that is not a list of top-level state keys",
|
|
12850
12885
|
fix: "`transientState: ['demoStep']` — a dotted path names its top key"
|
|
12851
12886
|
},
|
|
12852
12887
|
"state-painted-and-transient": {
|
|
@@ -12864,6 +12899,11 @@ var SPACE_CODES = {
|
|
|
12864
12899
|
means: "a `paintedState` key that `keptState` does not keep — the server draws with what is kept",
|
|
12865
12900
|
fix: "add it to `keptState`, or leave it out of `paintedState`"
|
|
12866
12901
|
},
|
|
12902
|
+
"state-browser-not-kept": {
|
|
12903
|
+
kind: "refused",
|
|
12904
|
+
means: "a `browserState` key the space does not keep — transient, or not in `keptState`",
|
|
12905
|
+
fix: "keep it, or leave it out of `browserState`"
|
|
12906
|
+
},
|
|
12867
12907
|
"kept-state-without-keep-state": {
|
|
12868
12908
|
kind: "warned",
|
|
12869
12909
|
means: "`keptState` without `keepState` — nothing is kept in the first place",
|
|
@@ -12879,6 +12919,11 @@ var SPACE_CODES = {
|
|
|
12879
12919
|
means: "`paintedState` without `keepState` — nothing is kept for the server to draw with",
|
|
12880
12920
|
fix: "`settings.keepState: true`, or remove `paintedState`"
|
|
12881
12921
|
},
|
|
12922
|
+
"browser-state-without-keep-state": {
|
|
12923
|
+
kind: "warned",
|
|
12924
|
+
means: "`browserState` without `keepState` — nothing is kept in the first place",
|
|
12925
|
+
fix: "`settings.keepState: true`, or remove `browserState`"
|
|
12926
|
+
},
|
|
12882
12927
|
"visitor-roles": {
|
|
12883
12928
|
kind: "refused",
|
|
12884
12929
|
means: "`settings.visitorRoles` written in a shape the runtime does not read",
|
|
@@ -12911,8 +12956,8 @@ var SUGGESTION_CODES$1 = {
|
|
|
12911
12956
|
},
|
|
12912
12957
|
"repeated-shape": {
|
|
12913
12958
|
kind: "suggested",
|
|
12914
|
-
means: "the same structure written again and again with different words — cards, rows, tiles
|
|
12915
|
-
fix: "a component with props (`components`, `component(id, { props })`), or one `list` when they are rows of data side by side
|
|
12959
|
+
means: "the same structure written again and again with different words — cards, rows, tiles. Copies that read their data in a form of their own (their template) or render on the server are no repeats, and neither are copies side by side wired to different sources or state keys — controls written alike; copies apart that read different sources are one component, each instance handed its own",
|
|
12960
|
+
fix: "a component with props (`components`, `component(id, { props })`) — a source a copy reads handed in as a bound `json` prop (`component(id, { bind: [{ to: 'items', source }] })`, read inside as `props.items`) — or one `list` when they are rows of data side by side; a few cards a person rewords on the canvas can stay cards"
|
|
12916
12961
|
},
|
|
12917
12962
|
"element-color-inherited": {
|
|
12918
12963
|
kind: "suggested",
|
|
@@ -13824,7 +13869,7 @@ var scopedHint = (name, ids) => {
|
|
|
13824
13869
|
/** The sources every element reads without a provider around it: `state`, `navigation`, `auth`, `theme`, `host`… */
|
|
13825
13870
|
var GLOBAL_SOURCES = e$39;
|
|
13826
13871
|
/** What an element inside a component can read besides its own tree: the globals, and what its instance hands in. */
|
|
13827
|
-
var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$
|
|
13872
|
+
var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$54];
|
|
13828
13873
|
/**
|
|
13829
13874
|
* Turns what an author wrote into the name the runtime resolves.
|
|
13830
13875
|
*
|
|
@@ -13843,7 +13888,7 @@ var resolveSource = (source, index, where, globals = GLOBAL_SOURCES) => {
|
|
|
13843
13888
|
if (globals.includes(head)) return source;
|
|
13844
13889
|
const prefix = index.get(head);
|
|
13845
13890
|
if (!prefix) {
|
|
13846
|
-
const inComponent = globals.includes(n$
|
|
13891
|
+
const inComponent = globals.includes(n$54);
|
|
13847
13892
|
throw new AuthoringError("binding-source-unknown", `${where} binds to "${source}", but nothing ${inComponent ? "in this component" : "in this space"} answers to "${head}"${didYouMean(head, [...index.keys(), ...globals]) || "."}${scopedHint(head, index.keys())} A source names an element by its id, or one of the globals: ${globals.join(", ")}.${inComponent ? " A component is closed: what it needs from where it is placed comes in as a prop." : ""}`);
|
|
13848
13893
|
}
|
|
13849
13894
|
return field ? `${prefix}_${head}.${field}` : `${prefix}_${head}`;
|
|
@@ -14342,7 +14387,7 @@ var callFactory = (type, declaration, first, second) => {
|
|
|
14342
14387
|
* the caller says they are, and nothing is claimed that is not known.
|
|
14343
14388
|
*/
|
|
14344
14389
|
var defineElement = (declaration) => (first, second) => callFactory(declaration.type, declaration, first, second);
|
|
14345
|
-
var declarationsByType = new Map(Object.values(
|
|
14390
|
+
var declarationsByType = new Map(Object.values(Y).map((declaration) => [declaration.type, declaration]));
|
|
14346
14391
|
/**
|
|
14347
14392
|
* The attributes an element of this type starts with — what a factory merges under the author's own.
|
|
14348
14393
|
*
|
|
@@ -14413,6 +14458,7 @@ var elements_exports = /* @__PURE__ */ __exportAll({
|
|
|
14413
14458
|
dropdown: () => dropdown,
|
|
14414
14459
|
dropdownPopup: () => dropdownPopup,
|
|
14415
14460
|
embed: () => embed,
|
|
14461
|
+
focusGroup: () => focusGroup,
|
|
14416
14462
|
fontAwesome: () => fontAwesome,
|
|
14417
14463
|
form: () => form,
|
|
14418
14464
|
formControl: () => formControl,
|
|
@@ -14452,31 +14498,32 @@ var elements_exports = /* @__PURE__ */ __exportAll({
|
|
|
14452
14498
|
* appear in real documents, and their components are attached to their parent rather than exported on their own,
|
|
14453
14499
|
* which is why their declarations had to be written before they could be authored at all.
|
|
14454
14500
|
*/
|
|
14455
|
-
var apiContainer = defineElement(
|
|
14456
|
-
var blockHtml = defineElement(
|
|
14457
|
-
var blockJsx = defineElement(
|
|
14458
|
-
var button$1 = defineElement(
|
|
14501
|
+
var apiContainer = defineElement(Y.ApiContainer);
|
|
14502
|
+
var blockHtml = defineElement(Y.BlockHtml);
|
|
14503
|
+
var blockJsx = defineElement(Y.BlockJsx);
|
|
14504
|
+
var button$1 = defineElement(Y.Button);
|
|
14459
14505
|
/**
|
|
14460
14506
|
* A carousel's `items` may name the source its slides come from, as a list's may: `carousel({ id: 'hero', items:
|
|
14461
14507
|
* 'site.data.slides', row: r => … })` writes the slide into a `carouselTrack`, and its `children` are the controls.
|
|
14462
14508
|
*/
|
|
14463
|
-
var carousel = defineElement(
|
|
14464
|
-
var carouselTrack = defineElement(
|
|
14465
|
-
var chart = defineElement(
|
|
14466
|
-
var channel = defineElement(
|
|
14467
|
-
var container = defineElement(
|
|
14468
|
-
var custom$1 = defineElement(
|
|
14469
|
-
var dialogContainer = defineElement(
|
|
14470
|
-
var dropdown = defineElement(
|
|
14471
|
-
var dropdownPopup = defineElement(
|
|
14472
|
-
var
|
|
14473
|
-
var
|
|
14474
|
-
var
|
|
14475
|
-
var
|
|
14476
|
-
var
|
|
14477
|
-
var
|
|
14478
|
-
var
|
|
14479
|
-
var
|
|
14509
|
+
var carousel = defineElement(Y.Carousel);
|
|
14510
|
+
var carouselTrack = defineElement(Y.CarouselTrack);
|
|
14511
|
+
var chart = defineElement(Y.Chart);
|
|
14512
|
+
var channel = defineElement(Y.Channel);
|
|
14513
|
+
var container = defineElement(Y.Container);
|
|
14514
|
+
var custom$1 = defineElement(Y.Custom);
|
|
14515
|
+
var dialogContainer = defineElement(Y.DialogContainer);
|
|
14516
|
+
var dropdown = defineElement(Y.Dropdown);
|
|
14517
|
+
var dropdownPopup = defineElement(Y.DropdownPopup);
|
|
14518
|
+
var focusGroup = defineElement(Y.FocusGroup);
|
|
14519
|
+
var embed = defineElement(Y.Embed);
|
|
14520
|
+
var fontAwesome = defineElement(Y.FontAwesome);
|
|
14521
|
+
var form = defineElement(Y.Form);
|
|
14522
|
+
var formControl = defineElement(Y.FormControl);
|
|
14523
|
+
var heading = defineElement(Y.Heading);
|
|
14524
|
+
var image = defineElement(Y.Image);
|
|
14525
|
+
var link = defineElement(Y.Link);
|
|
14526
|
+
var listFactory = defineElement(Y.List);
|
|
14480
14527
|
var isTypedList = (props) => isSourcePath(props.items);
|
|
14481
14528
|
function list$1(first, second) {
|
|
14482
14529
|
if (Array.isArray(first)) return listFactory(first, second);
|
|
@@ -14487,24 +14534,24 @@ function list$1(first, second) {
|
|
|
14487
14534
|
row: typeof row === "function" ? (named) => row(sourceRow(named.source, items)) : row
|
|
14488
14535
|
});
|
|
14489
14536
|
}
|
|
14490
|
-
var listItem = defineElement(
|
|
14491
|
-
var markdown = defineElement(
|
|
14492
|
-
var modalContainer = defineElement(
|
|
14493
|
-
var nodeHtml = defineElement(
|
|
14494
|
-
var pagination = defineElement(
|
|
14495
|
-
var paragraph = defineElement(
|
|
14537
|
+
var listItem = defineElement(Y.ListItem);
|
|
14538
|
+
var markdown = defineElement(Y.Markdown);
|
|
14539
|
+
var modalContainer = defineElement(Y.ModalContainer);
|
|
14540
|
+
var nodeHtml = defineElement(Y.NodeHtml);
|
|
14541
|
+
var pagination = defineElement(Y.Pagination);
|
|
14542
|
+
var paragraph = defineElement(Y.Paragraph);
|
|
14496
14543
|
/** Another space drawn inside this one, as a widget: `plitziSdk({ id: 'card', bind: { offlineData: 'view.data' } })`. */
|
|
14497
|
-
var plitziSdk = defineElement(
|
|
14498
|
-
var reference = defineElement(
|
|
14499
|
-
var richText = defineElement(
|
|
14500
|
-
var svg = defineElement(
|
|
14501
|
-
var tabContainer = defineElement(
|
|
14502
|
-
var tabContainerBody = defineElement(
|
|
14503
|
-
var tabContainerHeader = defineElement(
|
|
14504
|
-
var tabContainerItem = defineElement(
|
|
14505
|
-
var text$1 = defineElement(
|
|
14506
|
-
var themeToggle = defineElement(
|
|
14507
|
-
var video = defineElement(
|
|
14544
|
+
var plitziSdk = defineElement(Y.PlitziSdk);
|
|
14545
|
+
var reference = defineElement(Y.Reference);
|
|
14546
|
+
var richText = defineElement(Y.RichText);
|
|
14547
|
+
var svg = defineElement(Y.Svg);
|
|
14548
|
+
var tabContainer = defineElement(Y.TabContainer);
|
|
14549
|
+
var tabContainerBody = defineElement(Y.TabContainerBody);
|
|
14550
|
+
var tabContainerHeader = defineElement(Y.TabContainerHeader);
|
|
14551
|
+
var tabContainerItem = defineElement(Y.TabContainerItem);
|
|
14552
|
+
var text$1 = defineElement(Y.Text);
|
|
14553
|
+
var themeToggle = defineElement(Y.ThemeToggle);
|
|
14554
|
+
var video = defineElement(Y.Video);
|
|
14508
14555
|
//#endregion
|
|
14509
14556
|
//#region ../sdk-schema/dist/helpers/elementId.mjs
|
|
14510
14557
|
var e$27 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
|
|
@@ -15651,7 +15698,7 @@ var c$5 = (t, o, c, l, u = {}, d = {}) => {
|
|
|
15651
15698
|
let E = {};
|
|
15652
15699
|
for (let t of C.tree) {
|
|
15653
15700
|
let r = s$6(t, p, S);
|
|
15654
|
-
if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$
|
|
15701
|
+
if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$39(r, n$55)), Object.keys(r).length)) for (let e of Object.keys(r)) E[e] || (E[e] = []), E[e].push({
|
|
15655
15702
|
key: t.name,
|
|
15656
15703
|
value: r[e],
|
|
15657
15704
|
displayMode: t.displayMode
|
|
@@ -16199,7 +16246,7 @@ var r$5 = ({ errors: e, pageFolders: t }) => {
|
|
|
16199
16246
|
var i$8 = ({ errors: t, getElement: n, layoutRootIds: r }) => {
|
|
16200
16247
|
let i = /* @__PURE__ */ new Set();
|
|
16201
16248
|
r().forEach((r) => {
|
|
16202
|
-
let a = n$
|
|
16249
|
+
let a = n$53(n, r);
|
|
16203
16250
|
a.length === 0 || i.has(a[0]) || (a.forEach((e) => i.add(e)), t.push({
|
|
16204
16251
|
code: "LAYOUT_CYCLE",
|
|
16205
16252
|
message: `Layouts sit inside each other in a circle: ${a.join(" → ")}`,
|
|
@@ -19220,8 +19267,8 @@ var warnClickOnStaticElement = (ctx, element, where) => {
|
|
|
19220
19267
|
var warnIgnoredRegionName = (ctx, element, where) => {
|
|
19221
19268
|
if (element.definition.type !== "container" || !says(ctx, element, "label")) return;
|
|
19222
19269
|
const subType = textOf(attributeValue(ctx, element, "subType"), "div");
|
|
19223
|
-
if (n$
|
|
19224
|
-
ctx.warn("label-ignored", `${where} is a "${subType}" with a \`label\`, which nobody reads: it takes its name from what it holds. Put the words inside it — or, if it is a part of the page of its own, make it one of ${n$
|
|
19270
|
+
if (n$25.some((tag) => tag === subType)) return;
|
|
19271
|
+
ctx.warn("label-ignored", `${where} is a "${subType}" with a \`label\`, which nobody reads: it takes its name from what it holds. Put the words inside it — or, if it is a part of the page of its own, make it one of ${n$25.map((tag) => `'${tag}'`).join(", ")}.`, element.id);
|
|
19225
19272
|
};
|
|
19226
19273
|
/**
|
|
19227
19274
|
* Whether `id`'s subtree holds something a keyboard can reach — or markup the linter cannot read, which may — leaving
|
|
@@ -19367,7 +19414,7 @@ var anchorsOfPage = (ctx, pageId, rowAnchors) => {
|
|
|
19367
19414
|
/** One element's own anchor: well formed, on something that renders, and rendered once. */
|
|
19368
19415
|
var lintOwnAnchor = (ctx, element, anchor) => {
|
|
19369
19416
|
const where = ctx.describe(element.id);
|
|
19370
|
-
if (!t$67(anchor)) ctx.error("anchor-invalid", `${where} has the anchor ${JSON.stringify(anchor)}. An anchor is the element's id in the URL (\`/page#anchor\`): ${FORMAT} — "${n$
|
|
19417
|
+
if (!t$67(anchor)) ctx.error("anchor-invalid", `${where} has the anchor ${JSON.stringify(anchor)}. An anchor is the element's id in the URL (\`/page#anchor\`): ${FORMAT} — "${n$56(anchor)}".`, element.id);
|
|
19371
19418
|
if (a$4(element)) ctx.error("anchor-no-tag", `${where} has the anchor "${anchor}" but renders no element of its own (no \`subType\`), so there is nothing to scroll to. Put the anchor on the section it wraps, or give it a tag.`, element.id);
|
|
19372
19419
|
if (ctx.component) {
|
|
19373
19420
|
ctx.error("anchor-repeated", `${where} has the anchor "${anchor}", and a component renders its tree once per instance — two instances would put the same id in the page twice. Put the anchor on the element around the instance, on the page.`, element.id);
|
|
@@ -19414,7 +19461,7 @@ var lintControls = (ctx) => {
|
|
|
19414
19461
|
Object.values(ctx.flat).forEach((element) => {
|
|
19415
19462
|
const controls = attributeText$1(element, "controls");
|
|
19416
19463
|
if (element.definition.type !== "button" || controls === "" || anchors.has(controls)) return;
|
|
19417
|
-
ctx.warn("controls-no-anchor", `${ctx.describe(element.id)} controls "${controls}", and no element carries that anchor, so a screen reader is pointed at nothing. Give the element it shows and hides \`anchor: '${n$
|
|
19464
|
+
ctx.warn("controls-no-anchor", `${ctx.describe(element.id)} controls "${controls}", and no element carries that anchor, so a screen reader is pointed at nothing. Give the element it shows and hides \`anchor: '${n$56(controls)}'\` and name that.`, element.id);
|
|
19418
19465
|
});
|
|
19419
19466
|
};
|
|
19420
19467
|
var lintAnchors = (ctx) => {
|
|
@@ -19741,8 +19788,14 @@ var UNITLESS = /* @__PURE__ */ new Set([
|
|
|
19741
19788
|
]);
|
|
19742
19789
|
/** A number written as a value, as CSS reads it: itself where a bare number is a whole value, pixels otherwise. */
|
|
19743
19790
|
var cssNumberValue = (property, value) => UNITLESS.has(property) || isCustomProperty(property) || value === 0 ? value : `${String(value)}px`;
|
|
19744
|
-
/**
|
|
19745
|
-
var
|
|
19791
|
+
/** The longhands of a mask, which the vocabulary has: an icon of one colour is a mask over `currentColor`. */
|
|
19792
|
+
var MASK_LONGHANDS = "write its longhands: 'mask-image', 'mask-position', 'mask-size', 'mask-repeat' (and 'mask-composite')";
|
|
19793
|
+
/** Properties written another way than the vocabulary has them: what to write instead, as the refusal says it. */
|
|
19794
|
+
var REPLACED = {
|
|
19795
|
+
clip: "deprecated: write 'clip-path': 'inset(50%)', or the `sr-only` utility for a line only screen readers read",
|
|
19796
|
+
mask: `a shorthand not expanded — ${MASK_LONGHANDS}`,
|
|
19797
|
+
"-webkit-mask": `prefixed, and every browser reads the mask unprefixed — ${MASK_LONGHANDS}`
|
|
19798
|
+
};
|
|
19746
19799
|
/** What to write in place of a deprecated property, or nothing when it is not one. */
|
|
19747
19800
|
var replacedCssProperty = (key) => REPLACED[toKebab(key)];
|
|
19748
19801
|
/** If a camelCase key maps to a known kebab-case property, return it — used to name the correct key in an error. */
|
|
@@ -22462,7 +22515,7 @@ var tokens = (variables) => {
|
|
|
22462
22515
|
};
|
|
22463
22516
|
//#endregion
|
|
22464
22517
|
//#region src/schema/lint/globalReads.ts
|
|
22465
|
-
var isShaped = (source) => Object.hasOwn(n$
|
|
22518
|
+
var isShaped = (source) => Object.hasOwn(n$41, source);
|
|
22466
22519
|
/** A global and the field read of it, at the start of a path: `auth.isAuthenticated`, `navigation.queryParams.next`. */
|
|
22467
22520
|
var GLOBAL_FIELD = /^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)/;
|
|
22468
22521
|
/** A flag the space does not declare: the read resolves to nothing, so what it gates is silently off. */
|
|
@@ -22475,7 +22528,7 @@ var reportUnknownComputed = (ctx, name, where, id) => {
|
|
|
22475
22528
|
};
|
|
22476
22529
|
/** A field of `navigation`, `auth` or `theme` that the source never publishes (`GLOBAL_SOURCE_FIELDS`). */
|
|
22477
22530
|
var checkShapedField = (ctx, source, field, where, id) => {
|
|
22478
|
-
const fields = Object.keys(n$
|
|
22531
|
+
const fields = Object.keys(n$41[source]);
|
|
22479
22532
|
if (fields.includes(field)) return;
|
|
22480
22533
|
const paths = fields.map((name) => `${source}.${name}`);
|
|
22481
22534
|
ctx.error("global-field-unknown", `${where} reads "${source}.${field}", which the \`${source}\` source never has — it reads as nothing, always${didYouMean(`${source}.${field}`, paths) || "."} \`${source}\` holds ${paths.join(", ")}.`, id);
|
|
@@ -22495,7 +22548,7 @@ var checkGlobalRead = (ctx, path, where, id) => {
|
|
|
22495
22548
|
* Every `<global>.<field>` a template reads, off the parsed template: a string literal that only looks like one
|
|
22496
22549
|
* (`'https://auth.acme.com'`) is not a read, nor is a field of something else (`post.auth.name`).
|
|
22497
22550
|
*/
|
|
22498
|
-
var globalFieldsRead = (template) => n$
|
|
22551
|
+
var globalFieldsRead = (template) => n$40(template).flatMap((path) => {
|
|
22499
22552
|
const [source = "", field] = path.split(".");
|
|
22500
22553
|
return field ? [[source, field]] : [];
|
|
22501
22554
|
});
|
|
@@ -22717,17 +22770,17 @@ var checkTemplateInValue = (ctx, element, where, name, value) => {
|
|
|
22717
22770
|
*/
|
|
22718
22771
|
var checkAttributeTemplates = (ctx, element, where) => {
|
|
22719
22772
|
if (PROSE_TYPES.has(element.definition.type)) return;
|
|
22720
|
-
const evaluated =
|
|
22773
|
+
const evaluated = X[element.definition.type] ?? [];
|
|
22721
22774
|
const rendered = Object.fromEntries(Object.entries(element.attributes).filter(([name]) => !evaluated.includes(name)));
|
|
22722
22775
|
for (const name of evaluated) {
|
|
22723
22776
|
const value = element.attributes[name];
|
|
22724
22777
|
if (typeof value === "string" && value !== "") checkTemplate(ctx, value, `${where}: its "${name}"`, { kind: "binding" }, ctx.scope(element.id), element.id);
|
|
22725
22778
|
}
|
|
22726
22779
|
for (const [name, value] of Object.entries(rendered)) if (typeof value !== "string") checkTemplateInValue(ctx, element, where, name, value);
|
|
22727
|
-
else if (e$29(value) && !n$
|
|
22780
|
+
else if (e$29(value) && !n$68(value)) ctx.warn("template-never-resolved", `${where} carries "${shorten(value)}", which is never resolved: an attribute only reads a name with filters (\`{{ post.slug|upper }}\`). Move the expression into a binding's \`twigTemplate\`, where it is evaluated in full.`, element.id, { value });
|
|
22728
22781
|
const routeParams = ctx.routeParams(element.id);
|
|
22729
22782
|
const scope = ctx.scope(element.id);
|
|
22730
|
-
for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$
|
|
22783
|
+
for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$68(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
|
|
22731
22784
|
kind: "attribute",
|
|
22732
22785
|
routeParams
|
|
22733
22786
|
}, scope, element.id);
|
|
@@ -22934,7 +22987,7 @@ var lintPages = (ctx) => {
|
|
|
22934
22987
|
const { access } = page.attributes;
|
|
22935
22988
|
const listed = permissionsOf(access);
|
|
22936
22989
|
if (access !== void 0 && (!listed || listed.length === 0 || listed.some((name) => typeof name !== "string" || !name))) ctx.error("page-access", `${where}: \`access\` is ${JSON.stringify(access)}. It is \`{ permissions: ['…'] }\`, every one a permission name and at least one — or left out, for a page anybody may see.`, pageId);
|
|
22937
|
-
if (documentScroll !== void 0 && documentScroll !== "" && !r$22(documentScroll)) ctx.error("attribute-value", `${where}: \`documentScroll\` is ${JSON.stringify(documentScroll)}${typeof documentScroll === "string" && didYouMean(documentScroll, n$
|
|
22990
|
+
if (documentScroll !== void 0 && documentScroll !== "" && !r$22(documentScroll)) ctx.error("attribute-value", `${where}: \`documentScroll\` is ${JSON.stringify(documentScroll)}${typeof documentScroll === "string" && didYouMean(documentScroll, n$31) || "."} It is one of ${n$31.map((value) => `'${value}'`).join(", ")} — or left out, for a page that scrolls as any does.`, pageId);
|
|
22938
22991
|
const path = pagePath(ctx, pageId) ?? "/";
|
|
22939
22992
|
if (a$1(path)) ctx.error("page-route-reserved", `${where} answers at ${path}, under /fn — which is where the space's functions answer, never a page. Give it another slug (or its folder another one).`, pageId);
|
|
22940
22993
|
const key = `${path} ${typeof accessLevel === "string" && accessLevel ? accessLevel : "everyone"}`;
|
|
@@ -23280,7 +23333,7 @@ var checkAttributes = (ctx, element, where) => {
|
|
|
23280
23333
|
ctx.error("unknown-attribute", `${where} sets "${name}", which a "${type}" never reads${didYouMean(name, names) || "."}${hint || ` It reads ${names.join(", ")}.`}`, element.id);
|
|
23281
23334
|
continue;
|
|
23282
23335
|
}
|
|
23283
|
-
if (value === void 0 || value === null || typeof value === "string" && n$
|
|
23336
|
+
if (value === void 0 || value === null || typeof value === "string" && n$68(value)) continue;
|
|
23284
23337
|
if (Object.hasOwn(enums, name) && !(typeof value === "string" && enums[name].includes(value))) {
|
|
23285
23338
|
const tag = name === "subType" && typeof value === "string" ? value : void 0;
|
|
23286
23339
|
const owner = tag === void 0 ? void 0 : Object.entries(ctx.catalogs.attributeValues ?? {}).find(([other, values]) => other !== type && Object.hasOwn(values, "subType") && values.subType.includes(tag))?.[0];
|
|
@@ -24160,6 +24213,23 @@ var pressFailure = (error) => {
|
|
|
24160
24213
|
const why = [...log].reverse().flatMap((line) => PRESS_WAITS.filter((each) => each.said.test(line)).map((each) => each.why(line))).at(0);
|
|
24161
24214
|
return why === void 0 ? /^locator\.(?:click|dblclick|tap|hover)\b.*Timeout/.test(first) ? `${first} — the page did not answer the press, even once still: wait for the element it loads first` : first : `${first} — ${why}`;
|
|
24162
24215
|
};
|
|
24216
|
+
/** Run in the page: whether an animation that never ends moves the element — on it, inside it or around it. */
|
|
24217
|
+
var endlesslyMovedInPage = (node) => document.getAnimations().some((animation) => {
|
|
24218
|
+
const target = animation.effect instanceof KeyframeEffect ? animation.effect.target : null;
|
|
24219
|
+
return animation.playState === "running" && animation.effect?.getComputedTiming().iterations === Infinity && target !== null && (target === node || node.contains(target) || target.contains(node));
|
|
24220
|
+
});
|
|
24221
|
+
/**
|
|
24222
|
+
* The pointer put over an element, as a visitor's is. Playwright first waits for it to hold still, which one an endless
|
|
24223
|
+
* animation moves — a pulse ring on it, a marquee it rides in — never does: a run's hover of a map's region timed out
|
|
24224
|
+
* "still moving" every time. Such an element is pointed at where it is now; whatever else keeps a hover off it is said.
|
|
24225
|
+
*/
|
|
24226
|
+
var hoverElement = async (element, options) => {
|
|
24227
|
+
const moving = await element.evaluate(endlesslyMovedInPage, void 0).catch(() => false);
|
|
24228
|
+
await element.hover(moving ? {
|
|
24229
|
+
...options,
|
|
24230
|
+
force: true
|
|
24231
|
+
} : options);
|
|
24232
|
+
};
|
|
24163
24233
|
/**
|
|
24164
24234
|
* A press made once. Timed out before it went out — something over it, still moving, a page busy on its first load — the
|
|
24165
24235
|
* page is let settle and it is made again; a disabled control waits for nothing; timed out after it went out
|
|
@@ -24215,6 +24285,85 @@ var locateField = (page, target) => {
|
|
|
24215
24285
|
/** The element's id a target names, its copy left out. */
|
|
24216
24286
|
var targetId = (target) => target.replace(/:(?:\d+|last)$/, "");
|
|
24217
24287
|
//#endregion
|
|
24288
|
+
//#region src/testing/e2e/sampleFiles.ts
|
|
24289
|
+
/**
|
|
24290
|
+
* The files a journey picks in a file field, by the name a `type` step gives it: `type photo me.png`. Small and real of
|
|
24291
|
+
* their kind — a picture's first bytes are what a server reads to tell what it is — so an upload is refused or kept
|
|
24292
|
+
* for the reason a visitor's would be. The step names the file; nothing is read from the machine the journey runs on.
|
|
24293
|
+
*/
|
|
24294
|
+
var SAMPLES = {
|
|
24295
|
+
png: {
|
|
24296
|
+
type: "image/png",
|
|
24297
|
+
base64: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="
|
|
24298
|
+
},
|
|
24299
|
+
jpg: {
|
|
24300
|
+
type: "image/jpeg",
|
|
24301
|
+
base64: "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAP//////////////////////////////////////////////////////////////////////////////////////wgALCAABAAEBAREA/8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQABPxA="
|
|
24302
|
+
},
|
|
24303
|
+
gif: {
|
|
24304
|
+
type: "image/gif",
|
|
24305
|
+
base64: "R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
|
|
24306
|
+
},
|
|
24307
|
+
webp: {
|
|
24308
|
+
type: "image/webp",
|
|
24309
|
+
base64: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA=="
|
|
24310
|
+
},
|
|
24311
|
+
pdf: {
|
|
24312
|
+
type: "application/pdf",
|
|
24313
|
+
text: "%PDF-1.4\n1 0 obj << /Type /Catalog >> endobj\ntrailer << /Root 1 0 R >>\n%%EOF\n"
|
|
24314
|
+
},
|
|
24315
|
+
txt: {
|
|
24316
|
+
type: "text/plain",
|
|
24317
|
+
text: "A file a journey picked.\n"
|
|
24318
|
+
},
|
|
24319
|
+
csv: {
|
|
24320
|
+
type: "text/csv",
|
|
24321
|
+
text: "name,value\nsample,1\n"
|
|
24322
|
+
},
|
|
24323
|
+
json: {
|
|
24324
|
+
type: "application/json",
|
|
24325
|
+
text: "{ \"sample\": true }\n"
|
|
24326
|
+
}
|
|
24327
|
+
};
|
|
24328
|
+
var KINDS$1 = {
|
|
24329
|
+
png: "png",
|
|
24330
|
+
jpg: "jpg",
|
|
24331
|
+
jpeg: "jpg",
|
|
24332
|
+
gif: "gif",
|
|
24333
|
+
webp: "webp",
|
|
24334
|
+
pdf: "pdf",
|
|
24335
|
+
txt: "txt",
|
|
24336
|
+
csv: "csv",
|
|
24337
|
+
json: "json"
|
|
24338
|
+
};
|
|
24339
|
+
var base64Of = (text) => btoa(String.fromCharCode(...new TextEncoder().encode(text)));
|
|
24340
|
+
/** The file a step's name stands for, or what to write instead when its extension is none the journeys carry. */
|
|
24341
|
+
var sampleFile = (name) => {
|
|
24342
|
+
const extension = /\.([a-z0-9]+)$/i.exec(name)?.[1]?.toLowerCase();
|
|
24343
|
+
const kind = extension === void 0 ? void 0 : KINDS$1[extension];
|
|
24344
|
+
if (kind === void 0) return { problem: `"${name}" is no file a journey carries — a file field is given one by its name, ending in ${Object.keys(KINDS$1).join(", ")}: type photo me.png` };
|
|
24345
|
+
const sample = SAMPLES[kind];
|
|
24346
|
+
return {
|
|
24347
|
+
name,
|
|
24348
|
+
type: sample.type,
|
|
24349
|
+
base64: sample.base64 ?? base64Of(sample.text ?? "")
|
|
24350
|
+
};
|
|
24351
|
+
};
|
|
24352
|
+
/**
|
|
24353
|
+
* Runs in the page, on the file field: puts the file in it as a visitor's pick does — the field's own list of files —
|
|
24354
|
+
* and says so the way the browser does, `input` then `change`. Serialised: it uses nothing outside it.
|
|
24355
|
+
*/
|
|
24356
|
+
var pickFile = (node, file) => {
|
|
24357
|
+
if (!(node instanceof HTMLInputElement) || node.type !== "file") return false;
|
|
24358
|
+
const bytes = Uint8Array.from(atob(file.base64), (char) => char.charCodeAt(0));
|
|
24359
|
+
const picked = new DataTransfer();
|
|
24360
|
+
picked.items.add(new File([bytes], file.name, { type: file.type }));
|
|
24361
|
+
node.files = picked.files;
|
|
24362
|
+
node.dispatchEvent(new Event("input", { bubbles: true }));
|
|
24363
|
+
node.dispatchEvent(new Event("change", { bubbles: true }));
|
|
24364
|
+
return true;
|
|
24365
|
+
};
|
|
24366
|
+
//#endregion
|
|
24218
24367
|
//#region src/testing/e2e/act.ts
|
|
24219
24368
|
/**
|
|
24220
24369
|
* The copy a step acts on, and how many the page has: the one named — or, named none, the first one shown, as a page
|
|
@@ -24249,7 +24398,8 @@ var shownCopy = async (page, selector, copy = void 0) => {
|
|
|
24249
24398
|
var hiddenAtWidth = (target, kind) => `${target} is on the page but hidden at this width — a breakpoint, or a menu that is closed: ${kind} what a visitor sees here, or play it at the width that shows it`;
|
|
24250
24399
|
/**
|
|
24251
24400
|
* Runs in the page: the field a value is given to rather than typed in — a select, chosen; a date, a time, a colour or a
|
|
24252
|
-
* range, set — the element itself or the one field of that kind inside it (a form control
|
|
24401
|
+
* range, set; a file field, given a file — the element itself or the one field of that kind inside it (a form control
|
|
24402
|
+
* wraps its own). Serialised.
|
|
24253
24403
|
*/
|
|
24254
24404
|
var valueFieldIn = (selector) => {
|
|
24255
24405
|
let node;
|
|
@@ -24259,21 +24409,28 @@ var valueFieldIn = (selector) => {
|
|
|
24259
24409
|
return;
|
|
24260
24410
|
}
|
|
24261
24411
|
if (node === null) return;
|
|
24262
|
-
const kinds = [
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
"
|
|
24269
|
-
"
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
"
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24412
|
+
const kinds = [
|
|
24413
|
+
{
|
|
24414
|
+
how: "select",
|
|
24415
|
+
matches: "select"
|
|
24416
|
+
},
|
|
24417
|
+
{
|
|
24418
|
+
how: "file",
|
|
24419
|
+
matches: "input[type=\"file\"]"
|
|
24420
|
+
},
|
|
24421
|
+
{
|
|
24422
|
+
how: "value",
|
|
24423
|
+
matches: [
|
|
24424
|
+
"date",
|
|
24425
|
+
"time",
|
|
24426
|
+
"datetime-local",
|
|
24427
|
+
"month",
|
|
24428
|
+
"week",
|
|
24429
|
+
"color",
|
|
24430
|
+
"range"
|
|
24431
|
+
].map((type) => `input[type="${type}"]`).join(", ")
|
|
24432
|
+
}
|
|
24433
|
+
];
|
|
24277
24434
|
for (const kind of kinds) {
|
|
24278
24435
|
if (node.matches(kind.matches)) return {
|
|
24279
24436
|
selector,
|
|
@@ -24291,16 +24448,22 @@ var valueFieldIn = (selector) => {
|
|
|
24291
24448
|
}
|
|
24292
24449
|
};
|
|
24293
24450
|
/**
|
|
24294
|
-
* Gives `text` to a field that is not typed into — a select's option chosen, a date or a range set
|
|
24295
|
-
* `
|
|
24451
|
+
* Gives `text` to a field that is not typed into — a select's option chosen, a date or a range set, a file field the
|
|
24452
|
+
* file `text` names (`sampleFile`) — and says it did: `given`, or why it could not; `undefined` for a field a visitor
|
|
24453
|
+
* types in, left to the caller.
|
|
24296
24454
|
*/
|
|
24297
24455
|
var giveValue = async (page, selector, text, copy = void 0) => {
|
|
24298
|
-
const
|
|
24299
|
-
if (
|
|
24300
|
-
const all = page.locator(
|
|
24456
|
+
const found = await page.evaluate(valueFieldIn, selector);
|
|
24457
|
+
if (found === void 0) return;
|
|
24458
|
+
const all = page.locator(found.selector);
|
|
24301
24459
|
const field = copy === void 0 ? all.first() : copy === "last" ? all.last() : all.nth(copy - 1);
|
|
24302
|
-
|
|
24303
|
-
|
|
24460
|
+
if (found.how === "file") {
|
|
24461
|
+
const file = sampleFile(text);
|
|
24462
|
+
if ("problem" in file) return file;
|
|
24463
|
+
return await field.evaluate(pickFile, file) ? { given: true } : { problem: `${selector} holds no file field to pick ${text} in` };
|
|
24464
|
+
}
|
|
24465
|
+
await (found.how === "select" ? field.selectOption(text, { timeout: 3e3 }) : field.fill(text, { timeout: 3e3 }));
|
|
24466
|
+
return { given: true };
|
|
24304
24467
|
};
|
|
24305
24468
|
/** Runs in the page: where along a range its value puts the thumb — its middle for any other element. Serialised. */
|
|
24306
24469
|
var thumbAlong = (selector) => {
|
|
@@ -24520,7 +24683,7 @@ var dataOf = (document, { state = {}, sources = {} }) => {
|
|
|
24520
24683
|
var resolveOne = (element, data) => {
|
|
24521
24684
|
const { attributes, style, definition } = u$15(data, element);
|
|
24522
24685
|
return {
|
|
24523
|
-
attributes: Object.fromEntries(Object.entries(attributes).map(([key, value]) => [key, typeof value === "string" && value === element.attributes[key] && n$
|
|
24686
|
+
attributes: Object.fromEntries(Object.entries(attributes).map(([key, value]) => [key, typeof value === "string" && value === element.attributes[key] && n$68(value) ? s$22(value, data) : value])),
|
|
24524
24687
|
style,
|
|
24525
24688
|
initialState: { ...definition.initialState }
|
|
24526
24689
|
};
|
|
@@ -24763,7 +24926,9 @@ var act = async (page, step, ctx) => {
|
|
|
24763
24926
|
if (late !== void 0) return { problem: `not played: ${late}` };
|
|
24764
24927
|
const where = await located(ctx, step.element);
|
|
24765
24928
|
if ("problem" in where) return where;
|
|
24766
|
-
|
|
24929
|
+
const given = step.kind === "type" ? await giveValue(page, where.selector, step.text, where.copy) : void 0;
|
|
24930
|
+
if (given && "problem" in given) return given;
|
|
24931
|
+
if (given) break;
|
|
24767
24932
|
const found = await shownCopy(page, step.kind === "type" ? fieldsOf(where.selector) : where.selector, where.copy);
|
|
24768
24933
|
if ("absent" in found) return { problem: step.kind === "type" && "element" in await shownCopy(page, where.selector, where.copy) ? `${step.element} is no field and holds none — a type step writes in an input, a text area or a select` : await absent(ctx, step.element) };
|
|
24769
24934
|
if ("hidden" in found) return { problem: hiddenAtWidth(step.element, step.kind) };
|
|
@@ -24797,7 +24962,7 @@ var act = async (page, step, ctx) => {
|
|
|
24797
24962
|
await (step.kind === "click" ? answered(page, () => pressOnce(page, () => element.click({
|
|
24798
24963
|
timeout: 3e3,
|
|
24799
24964
|
...position
|
|
24800
|
-
}))) : pressOnce(page, () => step.kind === "hover" ? element
|
|
24965
|
+
}))) : pressOnce(page, () => step.kind === "hover" ? hoverElement(element, {
|
|
24801
24966
|
timeout: 3e3,
|
|
24802
24967
|
...position
|
|
24803
24968
|
}) : element.fill(step.text, { timeout: 3e3 })));
|
|
@@ -25620,6 +25785,7 @@ var pageFieldHint = (key) => {
|
|
|
25620
25785
|
"transientState",
|
|
25621
25786
|
"keptState",
|
|
25622
25787
|
"paintedState",
|
|
25788
|
+
"browserState",
|
|
25623
25789
|
"stateStorage"
|
|
25624
25790
|
].includes(key) ? " Keeping state across visits is a setting of the whole space: `settings: { keepState: true }`, with `transientState` for the keys to leave out — or `keptState` for the only ones kept." : "";
|
|
25625
25791
|
};
|
|
@@ -26151,6 +26317,8 @@ var TOAST_RULES = [
|
|
|
26151
26317
|
/\.Toastify__close-button\s*\{[^}]*?(?<![\w-])(?:color|opacity)\s*:/,
|
|
26152
26318
|
/\.Toastify__progress-bar(?:--wrp)?\s*\{[^}]*?(?<![\w-])height\s*:/
|
|
26153
26319
|
];
|
|
26320
|
+
/** How many of the rules' targets the suggestion names before saying how many more there are. */
|
|
26321
|
+
var SHOWN_TARGETS = 8;
|
|
26154
26322
|
var suggestCustomCss = (schema, style) => {
|
|
26155
26323
|
const customCss = schema.settings.customCss;
|
|
26156
26324
|
if (!customCss.trim()) return [];
|
|
@@ -26171,7 +26339,7 @@ var suggestCustomCss = (schema, style) => {
|
|
|
26171
26339
|
code: "custom-css-class",
|
|
26172
26340
|
elementIds: [],
|
|
26173
26341
|
saves: 0,
|
|
26174
|
-
message: `${String(folded.length)} rule${folded.length === 1 ? "" : "s"} in \`customCss\` ${folded.length === 1 ? "is" : "are"} a class's own: ${targets.slice(0,
|
|
26342
|
+
message: `${String(folded.length)} rule${folded.length === 1 ? "" : "s"} in \`customCss\` ${folded.length === 1 ? "is" : "are"} a class's own: ${targets.slice(0, SHOWN_TARGETS).join(", ")}${targets.length > SHOWN_TARGETS ? `, and ${String(targets.length - SHOWN_TARGETS)} more` : ""}. Write ${folded.length === 1 ? "it" : "them"} on the class — \`states: { hover: { … } }\`, \`ancestors: { [card.name]: { states: { hover: { … } } } }\`, \`pseudos: { after: { content: '"→"' } }\`, \`conditions: { 'motion-reduce': { … } }\` — where the style editor shows it and a breakpoint can change it. A rule of several selectors is counted once each is a class of the space's, and an \`@media\` once every rule inside it is: moving these may leave more to move.`
|
|
26175
26343
|
});
|
|
26176
26344
|
}
|
|
26177
26345
|
const sdkDefaults = [...MOTION_RESET.test(customCss) ? ["the reset for `prefers-reduced-motion` (every animation and transition is stilled for whoever asks)"] : [], ...THEME_ICONS.test(customCss) ? ["the theme toggle showing one icon (the one of the scheme in use)"] : []];
|
|
@@ -26940,12 +27108,13 @@ var suggestRepeats = (schema, style, families = []) => {
|
|
|
26940
27108
|
const siblings = new Set(fresh.map((id) => flat[id].definition.parentId)).size === 1;
|
|
26941
27109
|
if (siblings && new Set(fresh.map((id) => signatures.get(id)?.wiring)).size > 1) continue;
|
|
26942
27110
|
const type = flat[fresh[0]].definition.type;
|
|
27111
|
+
const ownSources = !siblings && new Set(fresh.map((id) => signatures.get(id)?.wiring)).size > 1 ? " Each copy reads a source of its own: hand it in as a bound `json` prop — `component(id, { bind: [{ to: 'items', source: '<what it reads>' }] })` — read inside as `props.items`." : "";
|
|
26943
27112
|
const counted = ` Counted from ${String(MIN_SHAPE_COPIES)} copies of ${String(MIN_SHAPE)} elements or more (2 of ${String(MIN_PAIR)} or more); a helper called once a copy still writes each into the document. Alike on purpose: \`quiet: ['repeated-shape']\` on them, with a comment saying why.`;
|
|
26944
27113
|
suggestions.push({
|
|
26945
27114
|
code: "repeated-shape",
|
|
26946
27115
|
elementIds: fresh,
|
|
26947
27116
|
saves: siblings ? (fresh.length - 1) * size : (fresh.length - 1) * size - fresh.length,
|
|
26948
|
-
message: siblings ? `${String(fresh.length)} ${type}s of ${String(size)} elements side by side (${named$1(fresh)}) are one item written again for each row of data. One \`list\` over the rows draws them: its item template is written once and reads each row (\`{{ <list>.item.<field> }}\`). Worth it when they are data — an array they were written from, rows that come and go; a few cards a person edits word by word on the canvas can stay as they are.${counted}` : `${String(fresh.length)} ${type}s of ${String(size)} elements share one structure (${named$1(fresh)}) and differ only in what they say. Make it a component — \`components: [{ id, props, root }]\` — and place it with \`component(id, { props })\`: one tree to read and edit, and every copy changes with it. What a copy says or does differently is a prop: an attribute reads \`{{ props.title }}\`, and so does a flow's step; what it reads from the page is a prop the instance binds (\`component(id, { bind: [{ to: prop, source }] })\`).` + counted
|
|
27117
|
+
message: siblings ? `${String(fresh.length)} ${type}s of ${String(size)} elements side by side (${named$1(fresh)}) are one item written again for each row of data. One \`list\` over the rows draws them: its item template is written once and reads each row (\`{{ <list>.item.<field> }}\`). Worth it when they are data — an array they were written from, rows that come and go; a few cards a person edits word by word on the canvas can stay as they are.${counted}` : `${String(fresh.length)} ${type}s of ${String(size)} elements share one structure (${named$1(fresh)}) and ${ownSources ? "differ in what they say and what they read" : "differ only in what they say"}. Make it a component — \`components: [{ id, props, root }]\` — and place it with \`component(id, { props })\`: one tree to read and edit, and every copy changes with it. What a copy says or does differently is a prop: an attribute reads \`{{ props.title }}\`, and so does a flow's step; what it reads from the page is a prop the instance binds (\`component(id, { bind: [{ to: prop, source }] })\`).` + ownSources + counted
|
|
26949
27118
|
});
|
|
26950
27119
|
fresh.forEach(cover);
|
|
26951
27120
|
}
|
|
@@ -27363,7 +27532,7 @@ var assertChannels = (author) => {
|
|
|
27363
27532
|
}
|
|
27364
27533
|
};
|
|
27365
27534
|
/**
|
|
27366
|
-
* A setting that names `runtime.state` keys — `transientState`, `paintedState` — checked the same way: refused when it
|
|
27535
|
+
* A setting that names `runtime.state` keys — `transientState`, `paintedState`, `browserState` — checked the same way: refused when it
|
|
27367
27536
|
* could not work — not a list, an empty name, or a dotted one: the runtime compares top-level keys, so `demo.step`
|
|
27368
27537
|
* would never match anything and the setting would do nothing at all. Answers the keys.
|
|
27369
27538
|
*/
|
|
@@ -27424,6 +27593,28 @@ var assertPaintedState = (author) => {
|
|
|
27424
27593
|
});
|
|
27425
27594
|
};
|
|
27426
27595
|
/**
|
|
27596
|
+
* The kept keys that are the browser's rather than whoever is signed in (see `browserKeys` in sdk-shared): kept in an
|
|
27597
|
+
* entry of their own, which no change of account takes away.
|
|
27598
|
+
*
|
|
27599
|
+
* Refused as a painted key is when it could not be kept — transient, or left out of `keptState` — since the browser's
|
|
27600
|
+
* or not, it would then be nobody's at all. Warned without `keepState`: nothing is kept.
|
|
27601
|
+
*/
|
|
27602
|
+
var assertBrowserState = (author) => {
|
|
27603
|
+
const browser = stateKeyList(author, "browserState", ["consent"], "the browser keeps whoever signs in");
|
|
27604
|
+
const transient = new Set(author.spec.settings?.transientState ?? []);
|
|
27605
|
+
const kept = author.spec.settings?.keptState ?? [];
|
|
27606
|
+
const unkept = browser.filter((key) => transient.has(key) || kept.length > 0 && !kept.includes(key));
|
|
27607
|
+
if (unkept.length > 0) {
|
|
27608
|
+
const them = unkept.length === 1 ? "it" : "them";
|
|
27609
|
+
throw new AuthoringError("state-browser-not-kept", `\`settings.browserState\` names ${unkept.map((key) => `"${key}"`).join(", ")}, which the space does not keep (\`transientState\` leaves ${them} out, or \`keptState\` does not name ${them}) — a key of the browser's is a kept one that no change of account takes away. Keep ${them}, or leave ${them} out of \`browserState\`.`);
|
|
27610
|
+
}
|
|
27611
|
+
if (browser.length > 0 && author.spec.settings?.keepState !== true) author.styleWarnings.push({
|
|
27612
|
+
code: "browser-state-without-keep-state",
|
|
27613
|
+
message: "`settings.browserState` names kept keys the browser keeps whoever signs in, but `settings.keepState` is not on — nothing is kept, so it does nothing. Turn `keepState` on, or remove `browserState`.",
|
|
27614
|
+
details: { keys: browser }
|
|
27615
|
+
});
|
|
27616
|
+
};
|
|
27617
|
+
/**
|
|
27427
27618
|
* The visitors' roles and what each gives (`checkVisitorRoles`). Refused rather than repaired — a role written wrong
|
|
27428
27619
|
* is a person who cannot do what they were given, or one who can do what they were not, and neither says so anywhere.
|
|
27429
27620
|
*/
|
|
@@ -27718,7 +27909,7 @@ var resolveControls = (author) => {
|
|
|
27718
27909
|
throw new AuthoringError("controls-unknown", `Button "${element.id}" controls "${controls}", which is no element of the space${didYouMean(controls, Object.keys(flat)) || "."} Name the element it shows and hides by its id: \`controls: 'faq-answer'\`.`);
|
|
27719
27910
|
}
|
|
27720
27911
|
const target = flat[controls];
|
|
27721
|
-
const anchor = target.definition.anchor ?? n$
|
|
27912
|
+
const anchor = target.definition.anchor ?? n$56(target.id);
|
|
27722
27913
|
target.definition.anchor = anchor;
|
|
27723
27914
|
element.attributes.controls = anchor;
|
|
27724
27915
|
const targetRows = rowsOf(flat, target.id);
|
|
@@ -28160,7 +28351,7 @@ var shareImageOf = (where, image) => {
|
|
|
28160
28351
|
};
|
|
28161
28352
|
/** What the page is, in Open Graph's words. */
|
|
28162
28353
|
var ogTypeOf = (where, type) => {
|
|
28163
|
-
if (!n$
|
|
28354
|
+
if (!n$34(type)) throw new AuthoringError("og-type-unknown", `${where}'s seoType "${type}" is no kind Open Graph names${didYouMean(type, t$44) || "."} The kinds: ${t$44.join(", ")}.`);
|
|
28164
28355
|
return type;
|
|
28165
28356
|
};
|
|
28166
28357
|
/** The page's head attributes, as the document holds them: nothing for a page that says none. */
|
|
@@ -28609,6 +28800,7 @@ var SpaceAuthor = class {
|
|
|
28609
28800
|
assertTransientState(this);
|
|
28610
28801
|
assertKeptState(this);
|
|
28611
28802
|
assertPaintedState(this);
|
|
28803
|
+
assertBrowserState(this);
|
|
28612
28804
|
assertVisitorRoles(this);
|
|
28613
28805
|
const pageFolders = buildPageFolders(this);
|
|
28614
28806
|
const declared = collecting(this, () => components.map((component) => addComponent(this, component)));
|
|
@@ -31171,7 +31363,7 @@ var readPage = (reader, page, index) => {
|
|
|
31171
31363
|
const structuredData = Array.isArray(attributes.seoStructuredData) ? attributes.seoStructuredData.filter((item) => e$55(item)) : [];
|
|
31172
31364
|
const seoImage = typeof attributes.seoImage === "string" ? attributes.seoImage : "";
|
|
31173
31365
|
const seoImageAlt = typeof attributes.seoImageAlt === "string" ? attributes.seoImageAlt : "";
|
|
31174
|
-
const seoType = n$
|
|
31366
|
+
const seoType = n$34(attributes.seoType) ? attributes.seoType : void 0;
|
|
31175
31367
|
const notFound = typeof attributes.notFound === "string" ? attributes.notFound : "";
|
|
31176
31368
|
const documentScroll = r$22(attributes.documentScroll) ? attributes.documentScroll : void 0;
|
|
31177
31369
|
if (!documentScroll && attributes.documentScroll !== void 0 && attributes.documentScroll !== "") correct(reader, "dropped-field", `${where} had \`documentScroll\` ${JSON.stringify(attributes.documentScroll)}, which no page reads; it is authored scrolling as any page does.`, page.id);
|
|
@@ -31899,7 +32091,7 @@ var AUTHORING_HELPERS = {
|
|
|
31899
32091
|
};
|
|
31900
32092
|
/** `motion`, an element's field: what it takes, from the presets the SDK plays. */
|
|
31901
32093
|
var MOTION_ENTRY = {
|
|
31902
|
-
signature: `motion: { enter?: ${t$42.map((name) => `'${name}'`).join(" | ")}; on?: ${n$
|
|
32094
|
+
signature: `motion: { enter?: ${t$42.map((name) => `'${name}'`).join(" | ")}; on?: ${n$33.map((name) => `'${name}'`).join(" | ")}; duration?; delay?; stagger?; easing?; distance?; loop?: ${r$24.map((name) => `'${name}'`).join(" | ")} }`,
|
|
31903
32095
|
summary: "How an element arrives and whether it keeps moving, played by the SDK's stylesheet and stilled for reduced motion. `on: 'view'` plays once as it comes into view; `on: 'scroll'` follows the scroll both ways. `easing` (a CSS curve) and `distance` (px, for one that travels) make it an original's, value for value.",
|
|
31904
32096
|
example: "container({ motion: { enter: 'fade-up', on: 'view', stagger: 60 }, children })"
|
|
31905
32097
|
};
|
|
@@ -31940,7 +32132,7 @@ var SOURCE_DOCS = {
|
|
|
31940
32132
|
}
|
|
31941
32133
|
};
|
|
31942
32134
|
/** The fields the platform decides of a global, when it decides them: what a read of another name finds nothing in. */
|
|
31943
|
-
var sourceFields = (name) => Object.hasOwn(n$
|
|
32135
|
+
var sourceFields = (name) => Object.hasOwn(n$41, name) ? Object.keys(n$41[name]) : [];
|
|
31944
32136
|
//#endregion
|
|
31945
32137
|
//#region src/explain/explain.ts
|
|
31946
32138
|
/** What each kind is called when listed. */
|
|
@@ -35736,7 +35928,8 @@ var loadImages = async (budgetMs) => {
|
|
|
35736
35928
|
* `vh` would mean that height and a `100vh` hero would be thousands of pixels tall. Answers the document's height.
|
|
35737
35929
|
*/
|
|
35738
35930
|
var unrollPage = () => {
|
|
35739
|
-
const
|
|
35931
|
+
const pageShare = .8;
|
|
35932
|
+
const scroller = Array.from(document.querySelectorAll("*")).filter((element) => element.scrollHeight > element.clientHeight + 1 && element.clientHeight > 0 && element.clientHeight >= window.innerHeight * pageShare).sort((a, b) => b.scrollHeight - a.scrollHeight).at(0);
|
|
35740
35933
|
for (let element = scroller ?? null; element; element = element.parentElement) {
|
|
35741
35934
|
element.style.setProperty("overflow", "visible", "important");
|
|
35742
35935
|
element.style.setProperty("height", "auto", "important");
|
|
@@ -37630,4 +37823,4 @@ var validateSnippet = (snippet, options = {}) => validateSnippet$1(snippet, {
|
|
|
37630
37823
|
...options
|
|
37631
37824
|
});
|
|
37632
37825
|
//#endregion
|
|
37633
|
-
export { readDevToolsInPage as $,
|
|
37826
|
+
export { readDevToolsInPage as $, embed as $a, onDialogClose as $i, isRuleSetSpec as $n, AUTHORING_CODES as $o, addNotification as $r, journeyStartWarnings as $t, pressShortcut as A, scrollBy as Aa, whileRunning as Ai, pressFailure as An, element as Ao, p as Ar, t$81 as As, actionToSource as At, alignPictures as B, apiContainer as Ba, carouselPrevious as Bi, row as Bn, hasVisibilityBinding as Bo, locate as Br, t$83 as Bs, suggestClassOverrides as Bt, unquoted as C, onThemeChange as Ca, authorFlow as Ci, HYDRATION_MS as Cn, themeToggle as Co, d as Cr, t$42 as Cs, searchWords as Ct, readSpaceTests as D, publishOn as Da, when as Di, hoverElement as Dn, defaultAttributes as Do, l$1 as Dr, i$43 as Ds, specFromSpace as Dt, e2eStepProblems as E, openModal as Ea, named$3 as Ei, fieldsOf as En, declaresAttribute as Eo, j as Er, e$57 as Es, specToSource as Et, compareTexts as F, updateElement as Fa, cancelApi as Fi, tokens as Fn, activeWhen as Fo, y as Fr, s$28 as Fs, transformerCatalog as Ft, loadImages as G, carouselTrack as Ga, focus as Gi, isClassRef as Gn, variantFrom as Go, authoringCodesTable as Gr, familyOf as Gt, diffPictures as H, blockJsx as Ha, closeModal as Hi, classNames as Hn, resolveSource as Ho, selectorFor as Hr, i$47 as Hs, PAGE_SPEC_FIELDS as Ht, pageTexts as I, elementsFromManifest as Ia, carouselGoTo as Ii, createTw as In, authorBinding as Io, digest as Ir, c$27 as Is, assertSnippetValid as It, inspectPage as J, container as Ja, onApiSuccess as Ji, splitClassList as Jn, actionSource as Jo, s$2 as Jr, withNotificationsCss as Jt, unrollPage as K, channel as Ka, on as Ki, isStyleDeclaration as Kn, visibleWhen as Ko, defineAction as Kr, pageFamily as Kt, PAGE_DECORATION_LIMIT as L, withPluginCatalogs as La, carouselNext as Li, tw as Ln, bindTemplate as Lo, slugify as Lr, n$67 as Ls, assertSpaceValid as Lt, inspectRenders as M, scrollTo as Ma, applyBuiltinCallback as Mi, settle as Mn, COMPONENT_SOURCES as Mo, t$1 as Mr, c$25 as Ms, BUILTIN_TRANSFORMERS as Mt, summariseRenders as N, setFieldValue as Na, getGlobalCallback as Ni, targetId as Nn, GLOBAL_SOURCES as No, u as Nr, i$44 as Ns, getTransformer as Nt, singlePageSpace as O, reloadApi as Oa, whenFailed as Oi, locateField as On, defaultLabel as Oo, m as Or, n$66 as Os, compareSpaces as Ot, PAGE_TEXT_LIMIT as P, toggleElement as Pa, announceOn as Pi, targetOf$1 as Pn, activeOn as Po, v as Pr, o$29 as Ps, suggestTransformer as Pt, readDevTools as Q, dropdownPopup as Qa, onDialogAccept as Qi, css as Qn, scope as Qo, SET_STATE_TYPES as Qr, e2eTestProblems as Qt, compareDecorations as R, d$7 as Ra, carouselPause as Ri, column as Rn, boundAttribute as Ro, buildHandles as Rr, r$51 as Rs, suggestSpace as Rt, stepLines as S, onSubmit as Sa, webHook as Si, FIELD as Sn, text$1 as So, c$1 as Sr, r$24 as Ss, searchScore as St, unit as T, openDialog as Ta, flowStepIds as Ti, endlesslyMovedInPage as Tn, component as To, g as Tr, elementAttributeNames as Ts, SPACE_FIELDS as Tt, pageRegions as U, button$1 as Ua, declaredCallback as Ui, classRefs as Un, scopedHint as Uo, flagGateOf as Ur, o$32 as Us, SpaceRefusedError as Ut, comparePictures as V, blockHtml as Va, closeDialog as Vi, className as Vn, hiddenWhen as Vo, pathForSlug as Vr, a$35 as Vs, unusedDeclarations as Vt, profilePictures as W, carousel as Wa, declaredTrigger as Wi, isClassModifier as Wn, toBindingSpecs as Wo, flagSpecOf as Wr, refusalOf as Wt, onScreenIfChosen as X, dialogContainer as Xa, onChange as Xi, BREAKPOINTS$1 as Xn, twig as Xo, applyUtility as Xr, FIXABLE_CODES as Xt, onScreen as Y, custom$1 as Ya, onBlur as Yi, styles as Yn, source as Yo, BUILTIN_UTILITIES as Yr, navOf as Yt, failedFlowText as Z, dropdown as Za, onClick as Zi, STYLE_STATES as Zn, closest as Zo, getUtility as Zr, unitTestProblems as Zt, e2eStepText as _, onMouseLeave as _a, setState as _i, dragElement as _n, svg as _o, M as _r, typeTriggerDefinitions as _s, explain as _t, locateClasses as a, onFocus as aa, cancelServerAction as ai, playE2eStep as an, image as ao, expandShorthandPatch as ar, elementCallbacks as as, catalogTemplateFiles as at, parseE2eStep as b, onPointerDown as ba, toggleState as bi, shownCopy as bn, tabContainerHeader as bo, _ as br, r$22 as bs, explainSearch as bt, validateSnippet as c, onInvalid as ca, cycleState as ci, unitReportText as cn, listItem as co, ambiguousShorthands as cr, elementLeafTypes as cs, space as ct, e2eResultText as d, onLeave as da, invalidateQueries as di, EDGES as dn, nodeHtml as do, cssProperties as dr, elementPublishes as ds, importSlug as dt, onDialogOpen as ea, appendState as ei, testAccountWarnings as en, focusGroup as eo, sameBlocks as er, AuthoringError as es, dataIssues as et, journeyAccount as f, onLoad as fa, moveState as fi, parseRelation as fn, pagination as fo, cssPropertyName as fr, elementSlots as fs, importedFiles as ft, durationMs as g, onMouseEnter as ga, runServerActionOrNotify as gi, answered as gn, richText as go, suggestCssProperty as gr, typeCallbackDefinitions as gs, GLOBAL_CALLBACK_BUILDERS as gt, MAX_WAIT_FOR_MS as h, onModalOpen as ha, runServerAction as hi, sidePx as hn, reference as ho, replacedCssProperty as hr, elementTypeNames as hs, EXPLAIN_KINDS as ht, lintSpace as i, onFlowProgress as ia, authRefreshDetails as ii, isExpectation as in, heading as io, expandShorthand as ir, elementAttributeValues as is, blankTemplateFiles as it, shortcutKey as j, scrollIntoView as ja, BUILTIN_GLOBAL_CALLBACKS as ji, pressOnce as jn, inferredLinkMode as jo, s$1 as jr, a$32 as js, withNamedIds as jt, withElement as k, resetForm as ka, whenSucceeded as ki, locateTarget as kn, defineElement as ko, o$1 as kr, r$49 as ks, actionSpecFromEntry as kt, validateSpace as l, onJoin as la, delay as li, resolveElement as ln, markdown as lo, fontUnread as lr, elementMarks as ls, space$1 as lt, E2E_STEP_USAGE as m, onModalClose as ma, removeState as mi, relationHolds as mn, plitziSdk as mo, isCustomProperty as mr, elementTriggers as ms, BUILDER_NAMES as mt, authorSpace as n, onFlowEnd as na, authLogout as ni, pageAt as nn, form as no, toResponsive as nr, isSuggestionCode as ns, CATALOG_TEMPLATE_IDENTITY as nt, locateElements as o, onHover as oa, clearState as oi, runUnitTest as on, link as oo, expandShorthandTraced as or, elementCatalog as os, emptyTemplateFiles as ot, runE2eTest as p, onMessage as pa, navigate as pi, relationElements as pn, paragraph as po, isCssProperty as pr, elementSourceTypes as ps, importProbe as pt, inspectDocument as q, chart as qa, onApiError as qi, modifierClassName as qn, withVisibility as qo, taskAction as qr, notificationsCss as qt, fixSpace as r, onFlowError as ra, authLogoutEverywhere as ri, bridge as rn, formControl as ro, cssShorthands as rr, elementAncestorTypes as rs, blankSpace as rt, planFixes as s, onInterval as sa, copyToClipboard as si, runUnitTests as sn, list$1 as so, shorthandLonghands as sr, elementDefaultAttributes as ss, toPortableSource as st, authorSnippet as t, onDialogReject as ta, authLogin as ti, audienceAt as tn, fontAwesome as to, toBlocks as tr, authoringCodeEntry as ts, answerAction as tt, compactSvg as u, onKey as ua, hostAction as ui, openPage as un, modalContainer as uo, cssNumberValue as ur, elementPartTypes as us, darkScheme as ut, isE2eStepWord as v, onPageChange as va, stepState as vi, giveValue as vn, tabContainer as vo, N as vr, Y as vs, explainKindOf as vt, e2e as w, onView as wa, authorFlows as wi, awaitHydration as wn, video as wo, f as wr, e$55 as ws, ELEMENT_FIELDS as wt, parseE2eSteps as x, onScroll as xa, twigTemplate as xi, valueFieldIn as xn, tabContainerItem as xo, b as xr, n$33 as xs, explanationText as xt, leadingTarget as y, onPageLoad as ya, toggleInState as yi, hiddenAtWidth as yn, tabContainerBody as yo, S as yr, n$31 as ys, explainList as yt, pageDecorations as z, i$13 as za, carouselPlay as zi, grid as zn, groupBindings as zo, instanceSelectorFor as zr, s$30 as zs, withoutQuieted as zt };
|