@plitzi/sdk-authoring 0.38.13 → 0.38.14
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 +145 -0
- package/dist/index-src.js +205 -148
- package/dist/index.d.ts +151 -1
- package/dist/index.js +2 -2
- package/dist/node.d.ts +18 -0
- package/dist/plugin.d.ts +6 -0
- package/package.json +6 -6
- package/skills/plitzi-authoring/reference/layouts.md +10 -0
- package/skills/plitzi-authoring/reference/plugins.md +4 -4
package/dist/index-src.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e$43, r as r$
|
|
1
|
+
import { n as e$43, r as r$38 } from "./index-declare.js";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -13,23 +13,23 @@ var __exportAll = (all, no_symbols) => {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
|
|
15
15
|
var e$42 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
|
|
16
|
-
var t$
|
|
17
|
-
var n$
|
|
18
|
-
var r$
|
|
19
|
-
var i$29 = `\\{\\{\\s*${r$
|
|
20
|
-
var a$24 = `(?:${`\\{\\{\\{\\s*${r$
|
|
16
|
+
var t$63 = `(?:${e$42}|\\d+)`;
|
|
17
|
+
var n$48 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$42}(?:\\.${t$63})*)\\s*\\]`;
|
|
18
|
+
var r$37 = `${`${e$42}(?:${n$48})*(?:\\??\\.${t$63}(?:${n$48})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
|
|
19
|
+
var i$29 = `\\{\\{\\s*${r$37}\\s*\\}\\}`;
|
|
20
|
+
var a$24 = `(?:${`\\{\\{\\{\\s*${r$37}\\s*\\}\\}\\}`}|${i$29})`;
|
|
21
21
|
var o$26 = new RegExp(a$24, "g");
|
|
22
22
|
var s$24 = RegExp(`^${a$24}$`);
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
|
|
25
|
-
var n$
|
|
25
|
+
var n$47 = (n, r = !1) => {
|
|
26
26
|
if (typeof n != "string") return !1;
|
|
27
27
|
let i = r ? s$24 : o$26;
|
|
28
28
|
return i.lastIndex = 0, i.test(n.trim());
|
|
29
29
|
};
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region ../sdk-shared/dist/authoring/paramSpec.mjs
|
|
32
|
-
var t$
|
|
32
|
+
var t$62 = [
|
|
33
33
|
"text",
|
|
34
34
|
"textarea",
|
|
35
35
|
"select",
|
|
@@ -39,18 +39,18 @@ var t$61 = [
|
|
|
39
39
|
"json",
|
|
40
40
|
"elementIds"
|
|
41
41
|
];
|
|
42
|
-
var n$
|
|
42
|
+
var n$46 = (e, t, n) => {
|
|
43
43
|
let r = [];
|
|
44
44
|
for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
|
|
45
45
|
return r;
|
|
46
46
|
};
|
|
47
|
-
var r$
|
|
47
|
+
var r$36 = (e, t, n) => {
|
|
48
48
|
let r = [];
|
|
49
49
|
for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
|
|
50
50
|
return r;
|
|
51
51
|
};
|
|
52
52
|
var i$28 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
|
|
53
|
-
var a$23 = (t) => typeof t == "string" && n$
|
|
53
|
+
var a$23 = (t) => typeof t == "string" && n$47(t);
|
|
54
54
|
var o$25 = (e, t) => {
|
|
55
55
|
switch (t.type) {
|
|
56
56
|
case "boolean": return typeof e == "boolean";
|
|
@@ -86,7 +86,7 @@ var c$19 = (e, t, n) => {
|
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region ../sdk-shared/dist/helpers/scroll.mjs
|
|
88
88
|
var e$41 = ["smooth", "auto"];
|
|
89
|
-
var t$
|
|
89
|
+
var t$61 = [
|
|
90
90
|
"start",
|
|
91
91
|
"center",
|
|
92
92
|
"end",
|
|
@@ -95,7 +95,7 @@ var t$60 = [
|
|
|
95
95
|
var s$22 = "onScroll";
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region ../sdk-shared/dist/authoring/elementCallbacks.mjs
|
|
98
|
-
var r$
|
|
98
|
+
var r$35 = {
|
|
99
99
|
type: "select",
|
|
100
100
|
description: "How it moves: \"smooth\" glides there, \"auto\" jumps.",
|
|
101
101
|
default: "smooth",
|
|
@@ -117,7 +117,7 @@ var i$27 = {
|
|
|
117
117
|
description: "How far down, the same way; negative goes up.",
|
|
118
118
|
default: ""
|
|
119
119
|
},
|
|
120
|
-
behavior: r$
|
|
120
|
+
behavior: r$35
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
scrollTo: {
|
|
@@ -135,7 +135,7 @@ var i$27 = {
|
|
|
135
135
|
description: "Where down, the same way. Empty stays.",
|
|
136
136
|
default: ""
|
|
137
137
|
},
|
|
138
|
-
behavior: r$
|
|
138
|
+
behavior: r$35
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
141
|
scrollIntoView: {
|
|
@@ -147,15 +147,15 @@ var i$27 = {
|
|
|
147
147
|
type: "select",
|
|
148
148
|
description: "Where the element lands, top to bottom.",
|
|
149
149
|
default: "start",
|
|
150
|
-
options: [...t$
|
|
150
|
+
options: [...t$61]
|
|
151
151
|
},
|
|
152
152
|
inline: {
|
|
153
153
|
type: "select",
|
|
154
154
|
description: "Where it lands, side to side.",
|
|
155
155
|
default: "nearest",
|
|
156
|
-
options: [...t$
|
|
156
|
+
options: [...t$61]
|
|
157
157
|
},
|
|
158
|
-
behavior: r$
|
|
158
|
+
behavior: r$35
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
};
|
|
@@ -697,6 +697,7 @@ var elementAttributeNames = {
|
|
|
697
697
|
],
|
|
698
698
|
notFound: [],
|
|
699
699
|
page: [
|
|
700
|
+
"documentScroll",
|
|
700
701
|
"layout",
|
|
701
702
|
"layoutContainer",
|
|
702
703
|
"notFound",
|
|
@@ -716,6 +717,11 @@ var elementAttributeNames = {
|
|
|
716
717
|
"windowSize"
|
|
717
718
|
],
|
|
718
719
|
paragraph: ["content"],
|
|
720
|
+
plitziSdk: [
|
|
721
|
+
"environment",
|
|
722
|
+
"offlineData",
|
|
723
|
+
"spaceKey"
|
|
724
|
+
],
|
|
719
725
|
reference: ["referenceId", "referenceType"],
|
|
720
726
|
richText: [
|
|
721
727
|
"content",
|
|
@@ -921,7 +927,7 @@ var e$40 = {
|
|
|
921
927
|
};
|
|
922
928
|
//#endregion
|
|
923
929
|
//#region ../sdk-elements/dist/elements/advanced/BlockHtml/declaration.mjs
|
|
924
|
-
var t$
|
|
930
|
+
var t$60 = r$38()({
|
|
925
931
|
type: "blockHtml",
|
|
926
932
|
content: {
|
|
927
933
|
attributes: { content: "" },
|
|
@@ -938,7 +944,7 @@ var t$59 = r$37()({
|
|
|
938
944
|
});
|
|
939
945
|
//#endregion
|
|
940
946
|
//#region ../sdk-elements/dist/elements/advanced/BlockJsx/declaration.mjs
|
|
941
|
-
var t$
|
|
947
|
+
var t$59 = r$38()({
|
|
942
948
|
type: "blockJsx",
|
|
943
949
|
content: {
|
|
944
950
|
attributes: {
|
|
@@ -960,7 +966,7 @@ var t$58 = r$37()({
|
|
|
960
966
|
});
|
|
961
967
|
//#endregion
|
|
962
968
|
//#region ../sdk-elements/dist/elements/advanced/Custom/declaration.mjs
|
|
963
|
-
var t$
|
|
969
|
+
var t$58 = r$38()({
|
|
964
970
|
type: "custom",
|
|
965
971
|
content: {
|
|
966
972
|
attributes: {
|
|
@@ -990,7 +996,7 @@ var t$57 = r$37()({
|
|
|
990
996
|
});
|
|
991
997
|
//#endregion
|
|
992
998
|
//#region ../sdk-elements/dist/elements/advanced/NodeHtml/declaration.mjs
|
|
993
|
-
var t$
|
|
999
|
+
var t$57 = r$38()({
|
|
994
1000
|
type: "nodeHtml",
|
|
995
1001
|
content: {
|
|
996
1002
|
attributes: { subType: "div" },
|
|
@@ -1014,8 +1020,28 @@ var t$56 = r$37()({
|
|
|
1014
1020
|
}
|
|
1015
1021
|
});
|
|
1016
1022
|
//#endregion
|
|
1023
|
+
//#region ../sdk-elements/dist/elements/advanced/PlitziSdk/declaration.mjs
|
|
1024
|
+
var t$56 = r$38()({
|
|
1025
|
+
type: "plitziSdk",
|
|
1026
|
+
content: {
|
|
1027
|
+
attributes: {
|
|
1028
|
+
spaceKey: "",
|
|
1029
|
+
environment: "main"
|
|
1030
|
+
},
|
|
1031
|
+
definition: {
|
|
1032
|
+
label: "Plitzi Sdk",
|
|
1033
|
+
description: "Another space drawn inside this one, as a widget — its home page, no router of its own: by its key, or from its documents (`offlineData`), bound to UI generated on the fly."
|
|
1034
|
+
},
|
|
1035
|
+
market: {
|
|
1036
|
+
category: "advanced",
|
|
1037
|
+
icon: "https://cdn.plitzi.com/resources/img/favicon.svg"
|
|
1038
|
+
},
|
|
1039
|
+
defaultStyle: { style: { base: { default: {} } } }
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
//#endregion
|
|
1017
1043
|
//#region ../sdk-elements/dist/elements/advanced/Reference/declaration.mjs
|
|
1018
|
-
var t$55 = r$
|
|
1044
|
+
var t$55 = r$38()({
|
|
1019
1045
|
type: "reference",
|
|
1020
1046
|
content: {
|
|
1021
1047
|
attributes: {
|
|
@@ -1039,7 +1065,7 @@ var t$55 = r$37()({
|
|
|
1039
1065
|
});
|
|
1040
1066
|
//#endregion
|
|
1041
1067
|
//#region ../sdk-elements/dist/elements/basic/Button/declaration.mjs
|
|
1042
|
-
var n$
|
|
1068
|
+
var n$45 = {
|
|
1043
1069
|
"padding-top": "6px",
|
|
1044
1070
|
"padding-left": "12px",
|
|
1045
1071
|
"padding-right": "12px",
|
|
@@ -1052,7 +1078,7 @@ var n$44 = {
|
|
|
1052
1078
|
"border-bottom-left-radius": "4px",
|
|
1053
1079
|
"border-bottom-right-radius": "4px"
|
|
1054
1080
|
};
|
|
1055
|
-
var r$
|
|
1081
|
+
var r$34 = r$38()({
|
|
1056
1082
|
type: "button",
|
|
1057
1083
|
attributeValues: {
|
|
1058
1084
|
subType: e$43()([
|
|
@@ -1083,22 +1109,22 @@ var r$33 = r$37()({
|
|
|
1083
1109
|
icon: "fa-solid fa-hand-pointer"
|
|
1084
1110
|
},
|
|
1085
1111
|
defaultStyle: {
|
|
1086
|
-
style: { base: { default: n$
|
|
1112
|
+
style: { base: { default: n$45 } },
|
|
1087
1113
|
subTypes: {
|
|
1088
1114
|
button: {
|
|
1089
1115
|
name: "Default Button",
|
|
1090
1116
|
displayMode: "desktop",
|
|
1091
|
-
style: { base: { default: n$
|
|
1117
|
+
style: { base: { default: n$45 } }
|
|
1092
1118
|
},
|
|
1093
1119
|
reset: {
|
|
1094
1120
|
name: "Reset Button",
|
|
1095
1121
|
displayMode: "desktop",
|
|
1096
|
-
style: { base: { default: n$
|
|
1122
|
+
style: { base: { default: n$45 } }
|
|
1097
1123
|
},
|
|
1098
1124
|
submit: {
|
|
1099
1125
|
name: "Submit Button",
|
|
1100
1126
|
displayMode: "desktop",
|
|
1101
|
-
style: { base: { default: n$
|
|
1127
|
+
style: { base: { default: n$45 } }
|
|
1102
1128
|
}
|
|
1103
1129
|
}
|
|
1104
1130
|
}
|
|
@@ -1106,7 +1132,7 @@ var r$33 = r$37()({
|
|
|
1106
1132
|
});
|
|
1107
1133
|
//#endregion
|
|
1108
1134
|
//#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
|
|
1109
|
-
var n$
|
|
1135
|
+
var n$44 = r$38()({
|
|
1110
1136
|
type: "dropdown",
|
|
1111
1137
|
attributeValues: { popupPlacement: e$43()([
|
|
1112
1138
|
"left",
|
|
@@ -1155,7 +1181,7 @@ var n$43 = r$37()({
|
|
|
1155
1181
|
});
|
|
1156
1182
|
//#endregion
|
|
1157
1183
|
//#region ../sdk-elements/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs
|
|
1158
|
-
var t$54 = r$
|
|
1184
|
+
var t$54 = r$38()({
|
|
1159
1185
|
type: "dropdownPopup",
|
|
1160
1186
|
ancestorType: "dropdown",
|
|
1161
1187
|
content: {
|
|
@@ -1202,7 +1228,7 @@ var t$54 = r$37()({
|
|
|
1202
1228
|
});
|
|
1203
1229
|
//#endregion
|
|
1204
1230
|
//#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
|
|
1205
|
-
var n$
|
|
1231
|
+
var n$43 = r$38()({
|
|
1206
1232
|
type: "heading",
|
|
1207
1233
|
attributeValues: { subType: e$43()([
|
|
1208
1234
|
"h1",
|
|
@@ -1304,7 +1330,7 @@ var n$42 = r$37()({
|
|
|
1304
1330
|
});
|
|
1305
1331
|
//#endregion
|
|
1306
1332
|
//#region ../sdk-elements/dist/elements/basic/Link/declaration.mjs
|
|
1307
|
-
var n$
|
|
1333
|
+
var n$42 = r$38()({
|
|
1308
1334
|
type: "link",
|
|
1309
1335
|
attributeValues: {
|
|
1310
1336
|
mode: e$43()([
|
|
@@ -1356,7 +1382,7 @@ var n$41 = r$37()({
|
|
|
1356
1382
|
});
|
|
1357
1383
|
//#endregion
|
|
1358
1384
|
//#region ../sdk-elements/dist/elements/basic/Markdown/declaration.mjs
|
|
1359
|
-
var t$53 = r$
|
|
1385
|
+
var t$53 = r$38()({
|
|
1360
1386
|
type: "markdown",
|
|
1361
1387
|
content: {
|
|
1362
1388
|
attributes: {
|
|
@@ -1406,7 +1432,7 @@ var t$53 = r$37()({
|
|
|
1406
1432
|
});
|
|
1407
1433
|
//#endregion
|
|
1408
1434
|
//#region ../sdk-elements/dist/elements/basic/Paragraph/declaration.mjs
|
|
1409
|
-
var t$52 = r$
|
|
1435
|
+
var t$52 = r$38()({
|
|
1410
1436
|
type: "paragraph",
|
|
1411
1437
|
content: {
|
|
1412
1438
|
attributes: { content: "Paragraph" },
|
|
@@ -1426,7 +1452,7 @@ var t$52 = r$37()({
|
|
|
1426
1452
|
});
|
|
1427
1453
|
//#endregion
|
|
1428
1454
|
//#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
|
|
1429
|
-
var n$
|
|
1455
|
+
var n$41 = r$38()({
|
|
1430
1456
|
type: "richText",
|
|
1431
1457
|
attributeValues: { format: e$43()([
|
|
1432
1458
|
"html",
|
|
@@ -1485,7 +1511,7 @@ var n$40 = r$37()({
|
|
|
1485
1511
|
});
|
|
1486
1512
|
//#endregion
|
|
1487
1513
|
//#region ../sdk-elements/dist/elements/basic/Text/declaration.mjs
|
|
1488
|
-
var t$51 = r$
|
|
1514
|
+
var t$51 = r$38()({
|
|
1489
1515
|
type: "text",
|
|
1490
1516
|
content: {
|
|
1491
1517
|
attributes: { content: "Text" },
|
|
@@ -1502,7 +1528,7 @@ var t$51 = r$37()({
|
|
|
1502
1528
|
});
|
|
1503
1529
|
//#endregion
|
|
1504
1530
|
//#region ../sdk-elements/dist/elements/basic/ThemeToggle/declaration.mjs
|
|
1505
|
-
var n$
|
|
1531
|
+
var n$40 = {
|
|
1506
1532
|
"margin-top": "0px",
|
|
1507
1533
|
"margin-right": "0px",
|
|
1508
1534
|
"margin-bottom": "0px",
|
|
@@ -1523,7 +1549,7 @@ var n$39 = {
|
|
|
1523
1549
|
"letter-spacing": "inherit",
|
|
1524
1550
|
cursor: "pointer"
|
|
1525
1551
|
};
|
|
1526
|
-
var r$
|
|
1552
|
+
var r$33 = r$38()({
|
|
1527
1553
|
type: "themeToggle",
|
|
1528
1554
|
attributeValues: { subType: e$43()(["switch", "segmented"]) },
|
|
1529
1555
|
triggers: { onThemeChange: {
|
|
@@ -1556,10 +1582,10 @@ var r$32 = r$37()({
|
|
|
1556
1582
|
},
|
|
1557
1583
|
defaultStyle: {
|
|
1558
1584
|
style: {
|
|
1559
|
-
base: { default: n$
|
|
1585
|
+
base: { default: n$40 },
|
|
1560
1586
|
icon: { default: {} },
|
|
1561
1587
|
option: { default: {
|
|
1562
|
-
...n$
|
|
1588
|
+
...n$40,
|
|
1563
1589
|
"row-gap": "4px",
|
|
1564
1590
|
"column-gap": "4px"
|
|
1565
1591
|
} }
|
|
@@ -1570,7 +1596,7 @@ var r$32 = r$37()({
|
|
|
1570
1596
|
});
|
|
1571
1597
|
//#endregion
|
|
1572
1598
|
//#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
|
|
1573
|
-
var n$
|
|
1599
|
+
var n$39 = r$38()({
|
|
1574
1600
|
type: "form",
|
|
1575
1601
|
attributeValues: { method: e$43()(["get", "post"]) },
|
|
1576
1602
|
sourceType: "apiContainer",
|
|
@@ -1652,7 +1678,7 @@ var n$38 = r$37()({
|
|
|
1652
1678
|
});
|
|
1653
1679
|
//#endregion
|
|
1654
1680
|
//#region ../sdk-elements/dist/elements/form/FormControl/declaration.mjs
|
|
1655
|
-
var n$
|
|
1681
|
+
var n$38 = {
|
|
1656
1682
|
width: "100%",
|
|
1657
1683
|
display: "flex",
|
|
1658
1684
|
"align-items": "center",
|
|
@@ -1681,8 +1707,8 @@ var n$37 = {
|
|
|
1681
1707
|
outline: "none",
|
|
1682
1708
|
position: "relative"
|
|
1683
1709
|
};
|
|
1684
|
-
var r$
|
|
1685
|
-
...n$
|
|
1710
|
+
var r$32 = {
|
|
1711
|
+
...n$38,
|
|
1686
1712
|
"line-height": "20px"
|
|
1687
1713
|
};
|
|
1688
1714
|
var i$26 = {
|
|
@@ -1765,7 +1791,7 @@ var d$12 = {
|
|
|
1765
1791
|
cursor: "pointer"
|
|
1766
1792
|
};
|
|
1767
1793
|
var f$10 = {
|
|
1768
|
-
...n$
|
|
1794
|
+
...n$38,
|
|
1769
1795
|
cursor: "pointer"
|
|
1770
1796
|
};
|
|
1771
1797
|
var p$11 = {
|
|
@@ -1812,7 +1838,7 @@ var m$7 = (e, t, { field: n, icon: r } = {}) => ({
|
|
|
1812
1838
|
}
|
|
1813
1839
|
});
|
|
1814
1840
|
var h$4 = { field: l$13 };
|
|
1815
|
-
var g$4 = r$
|
|
1841
|
+
var g$4 = r$38()({
|
|
1816
1842
|
type: "formControl",
|
|
1817
1843
|
attributeValues: { subType: e$43()([
|
|
1818
1844
|
"text",
|
|
@@ -1887,21 +1913,21 @@ var g$4 = r$37()({
|
|
|
1887
1913
|
style: { base: { default: {} } },
|
|
1888
1914
|
subTypes: {
|
|
1889
1915
|
hidden: m$7("Form Control Hidden", {}),
|
|
1890
|
-
text: m$7("Form Control Text", r$
|
|
1891
|
-
number: m$7("Form Control Number", r$
|
|
1892
|
-
email: m$7("Form Control Email", r$
|
|
1893
|
-
password: m$7("Form Control Password", r$
|
|
1916
|
+
text: m$7("Form Control Text", r$32, h$4),
|
|
1917
|
+
number: m$7("Form Control Number", r$32, h$4),
|
|
1918
|
+
email: m$7("Form Control Email", r$32, h$4),
|
|
1919
|
+
password: m$7("Form Control Password", r$32, {
|
|
1894
1920
|
...h$4,
|
|
1895
1921
|
icon: d$12
|
|
1896
1922
|
}),
|
|
1897
|
-
search: m$7("Form Control Search", r$
|
|
1898
|
-
url: m$7("Form Control URL", r$
|
|
1899
|
-
tel: m$7("Form Control Phone", r$
|
|
1900
|
-
date: m$7("Form Control Date", r$
|
|
1901
|
-
time: m$7("Form Control Time", r$
|
|
1902
|
-
color: m$7("Form Control Color", r$
|
|
1923
|
+
search: m$7("Form Control Search", r$32, h$4),
|
|
1924
|
+
url: m$7("Form Control URL", r$32, h$4),
|
|
1925
|
+
tel: m$7("Form Control Phone", r$32, h$4),
|
|
1926
|
+
date: m$7("Form Control Date", r$32, h$4),
|
|
1927
|
+
time: m$7("Form Control Time", r$32, h$4),
|
|
1928
|
+
color: m$7("Form Control Color", r$32, h$4),
|
|
1903
1929
|
textarea: m$7("Form Control Textarea", {
|
|
1904
|
-
...r$
|
|
1930
|
+
...r$32,
|
|
1905
1931
|
color: "inherit",
|
|
1906
1932
|
resize: "vertical"
|
|
1907
1933
|
}),
|
|
@@ -1942,7 +1968,7 @@ var g$4 = r$37()({
|
|
|
1942
1968
|
});
|
|
1943
1969
|
//#endregion
|
|
1944
1970
|
//#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
|
|
1945
|
-
var n$
|
|
1971
|
+
var n$37 = r$38()({
|
|
1946
1972
|
type: "layoutContainer",
|
|
1947
1973
|
attributeValues: { subType: e$43()([
|
|
1948
1974
|
"div",
|
|
@@ -1976,7 +2002,7 @@ var n$36 = r$37()({
|
|
|
1976
2002
|
});
|
|
1977
2003
|
//#endregion
|
|
1978
2004
|
//#region ../sdk-elements/dist/elements/internal/Loading/declaration.mjs
|
|
1979
|
-
var t$50 = r$
|
|
2005
|
+
var t$50 = r$38()({
|
|
1980
2006
|
type: "loading",
|
|
1981
2007
|
content: {
|
|
1982
2008
|
attributes: {},
|
|
@@ -1994,7 +2020,7 @@ var t$50 = r$37()({
|
|
|
1994
2020
|
});
|
|
1995
2021
|
//#endregion
|
|
1996
2022
|
//#region ../sdk-elements/dist/elements/internal/NotFound/declaration.mjs
|
|
1997
|
-
var t$49 = r$
|
|
2023
|
+
var t$49 = r$38()({
|
|
1998
2024
|
type: "notFound",
|
|
1999
2025
|
content: {
|
|
2000
2026
|
attributes: {},
|
|
@@ -2016,13 +2042,16 @@ var t$49 = r$37()({
|
|
|
2016
2042
|
});
|
|
2017
2043
|
//#endregion
|
|
2018
2044
|
//#region ../sdk-elements/dist/elements/internal/Page/declaration.mjs
|
|
2019
|
-
var t$48 =
|
|
2045
|
+
var t$48 = ["locked", "noBounce"];
|
|
2046
|
+
var n$36 = (e) => t$48.some((t) => t === e);
|
|
2047
|
+
var r$31 = r$38()({
|
|
2020
2048
|
type: "page",
|
|
2021
2049
|
serverTemplates: [
|
|
2022
2050
|
"seoPageTitle",
|
|
2023
2051
|
"seoPageDescription",
|
|
2024
2052
|
"notFound"
|
|
2025
2053
|
],
|
|
2054
|
+
attributeValues: { documentScroll: t$48 },
|
|
2026
2055
|
triggers: { onPageLoad: {
|
|
2027
2056
|
action: "onPageLoad",
|
|
2028
2057
|
title: "On Page Load",
|
|
@@ -2076,7 +2105,7 @@ var t$48 = r$37()({
|
|
|
2076
2105
|
});
|
|
2077
2106
|
//#endregion
|
|
2078
2107
|
//#region ../sdk-elements/dist/elements/media/Embed/declaration.mjs
|
|
2079
|
-
var t$47 = r$
|
|
2108
|
+
var t$47 = r$38()({
|
|
2080
2109
|
type: "embed",
|
|
2081
2110
|
content: {
|
|
2082
2111
|
attributes: {
|
|
@@ -2105,7 +2134,7 @@ var t$47 = r$37()({
|
|
|
2105
2134
|
});
|
|
2106
2135
|
//#endregion
|
|
2107
2136
|
//#region ../sdk-elements/dist/elements/media/FontAwesome/declaration.mjs
|
|
2108
|
-
var t$46 = r$
|
|
2137
|
+
var t$46 = r$38()({
|
|
2109
2138
|
type: "fontAwesome",
|
|
2110
2139
|
content: {
|
|
2111
2140
|
attributes: {
|
|
@@ -2129,7 +2158,7 @@ var t$46 = r$37()({
|
|
|
2129
2158
|
});
|
|
2130
2159
|
//#endregion
|
|
2131
2160
|
//#region ../sdk-elements/dist/elements/media/Image/declaration.mjs
|
|
2132
|
-
var n$35 = r$
|
|
2161
|
+
var n$35 = r$38()({
|
|
2133
2162
|
type: "image",
|
|
2134
2163
|
attributeValues: {
|
|
2135
2164
|
fetchPriority: e$43()([
|
|
@@ -2169,7 +2198,7 @@ var n$35 = r$37()({
|
|
|
2169
2198
|
});
|
|
2170
2199
|
//#endregion
|
|
2171
2200
|
//#region ../sdk-elements/dist/elements/media/Svg/declaration.mjs
|
|
2172
|
-
var t$45 = r$
|
|
2201
|
+
var t$45 = r$38()({
|
|
2173
2202
|
type: "svg",
|
|
2174
2203
|
content: {
|
|
2175
2204
|
attributes: {
|
|
@@ -2196,7 +2225,7 @@ var t$45 = r$37()({
|
|
|
2196
2225
|
});
|
|
2197
2226
|
//#endregion
|
|
2198
2227
|
//#region ../sdk-elements/dist/elements/media/Video/declaration.mjs
|
|
2199
|
-
var t$44 = r$
|
|
2228
|
+
var t$44 = r$38()({
|
|
2200
2229
|
type: "video",
|
|
2201
2230
|
content: {
|
|
2202
2231
|
attributes: {
|
|
@@ -2223,7 +2252,7 @@ var t$44 = r$37()({
|
|
|
2223
2252
|
});
|
|
2224
2253
|
//#endregion
|
|
2225
2254
|
//#region ../sdk-elements/dist/elements/provider/ApiContainer/declaration.mjs
|
|
2226
|
-
var n$34 = r$
|
|
2255
|
+
var n$34 = r$38()({
|
|
2227
2256
|
type: "apiContainer",
|
|
2228
2257
|
attributeValues: {
|
|
2229
2258
|
subType: e$43()([
|
|
@@ -2379,7 +2408,7 @@ var n$34 = r$37()({
|
|
|
2379
2408
|
});
|
|
2380
2409
|
//#endregion
|
|
2381
2410
|
//#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
|
|
2382
|
-
var n$33 = r$
|
|
2411
|
+
var n$33 = r$38()({
|
|
2383
2412
|
type: "channel",
|
|
2384
2413
|
attributeValues: { subType: e$43()([
|
|
2385
2414
|
"",
|
|
@@ -2487,7 +2516,7 @@ var n$33 = r$37()({
|
|
|
2487
2516
|
});
|
|
2488
2517
|
//#endregion
|
|
2489
2518
|
//#region ../sdk-elements/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs
|
|
2490
|
-
var t$43 = r$
|
|
2519
|
+
var t$43 = r$38()({
|
|
2491
2520
|
type: "carouselTrack",
|
|
2492
2521
|
ancestorType: "carousel",
|
|
2493
2522
|
content: {
|
|
@@ -2510,7 +2539,7 @@ var t$43 = r$37()({
|
|
|
2510
2539
|
});
|
|
2511
2540
|
//#endregion
|
|
2512
2541
|
//#region ../sdk-elements/dist/elements/structure/Carousel/declaration.mjs
|
|
2513
|
-
var t$42 = r$
|
|
2542
|
+
var t$42 = r$38()({
|
|
2514
2543
|
type: "carousel",
|
|
2515
2544
|
sourceType: "carousel",
|
|
2516
2545
|
triggers: { onChange: {
|
|
@@ -2602,7 +2631,7 @@ var n$32 = [
|
|
|
2602
2631
|
"aside",
|
|
2603
2632
|
"figure"
|
|
2604
2633
|
];
|
|
2605
|
-
var r$30 = r$
|
|
2634
|
+
var r$30 = r$38()({
|
|
2606
2635
|
type: "container",
|
|
2607
2636
|
attributeValues: {
|
|
2608
2637
|
subType: e$43()([
|
|
@@ -2698,17 +2727,17 @@ var n$31 = {
|
|
|
2698
2727
|
};
|
|
2699
2728
|
//#endregion
|
|
2700
2729
|
//#region ../sdk-elements/dist/elements/declarations/index.mjs
|
|
2701
|
-
var
|
|
2730
|
+
var V = {
|
|
2702
2731
|
ApiContainer: n$34,
|
|
2703
|
-
BlockHtml: t$
|
|
2704
|
-
BlockJsx: t$
|
|
2705
|
-
Button: r$
|
|
2732
|
+
BlockHtml: t$60,
|
|
2733
|
+
BlockJsx: t$59,
|
|
2734
|
+
Button: r$34,
|
|
2706
2735
|
Carousel: t$42,
|
|
2707
2736
|
CarouselTrack: t$43,
|
|
2708
2737
|
Channel: n$33,
|
|
2709
2738
|
Container: r$30,
|
|
2710
|
-
Custom: t$
|
|
2711
|
-
DialogContainer: r$
|
|
2739
|
+
Custom: t$58,
|
|
2740
|
+
DialogContainer: r$38()({
|
|
2712
2741
|
type: "dialogContainer",
|
|
2713
2742
|
sourceType: "dialogContainer",
|
|
2714
2743
|
triggers: {
|
|
@@ -2874,17 +2903,17 @@ var B = {
|
|
|
2874
2903
|
},
|
|
2875
2904
|
initialItems: ["container"]
|
|
2876
2905
|
}),
|
|
2877
|
-
Dropdown: n$
|
|
2906
|
+
Dropdown: n$44,
|
|
2878
2907
|
DropdownPopup: t$54,
|
|
2879
2908
|
Embed: t$47,
|
|
2880
2909
|
FontAwesome: t$46,
|
|
2881
|
-
Form: n$
|
|
2910
|
+
Form: n$39,
|
|
2882
2911
|
FormControl: g$4,
|
|
2883
|
-
Heading: n$
|
|
2912
|
+
Heading: n$43,
|
|
2884
2913
|
Image: n$35,
|
|
2885
|
-
LayoutContainer: n$
|
|
2886
|
-
Link: n$
|
|
2887
|
-
List: r$
|
|
2914
|
+
LayoutContainer: n$37,
|
|
2915
|
+
Link: n$42,
|
|
2916
|
+
List: r$38()({
|
|
2888
2917
|
type: "list",
|
|
2889
2918
|
attributeValues: {
|
|
2890
2919
|
subType: e$43()(["ul", "ol"]),
|
|
@@ -2940,7 +2969,7 @@ var B = {
|
|
|
2940
2969
|
"listItem"
|
|
2941
2970
|
]
|
|
2942
2971
|
}),
|
|
2943
|
-
ListItem: r$
|
|
2972
|
+
ListItem: r$38()({
|
|
2944
2973
|
type: "listItem",
|
|
2945
2974
|
content: {
|
|
2946
2975
|
attributes: {},
|
|
@@ -2959,7 +2988,7 @@ var B = {
|
|
|
2959
2988
|
}),
|
|
2960
2989
|
Loading: t$50,
|
|
2961
2990
|
Markdown: t$53,
|
|
2962
|
-
ModalContainer: r$
|
|
2991
|
+
ModalContainer: r$38()({
|
|
2963
2992
|
type: "modalContainer",
|
|
2964
2993
|
sourceType: "modalContainer",
|
|
2965
2994
|
triggers: {
|
|
@@ -3117,10 +3146,10 @@ var B = {
|
|
|
3117
3146
|
},
|
|
3118
3147
|
initialItems: ["container"]
|
|
3119
3148
|
}),
|
|
3120
|
-
NodeHtml: t$
|
|
3149
|
+
NodeHtml: t$57,
|
|
3121
3150
|
NotFound: t$49,
|
|
3122
|
-
Page:
|
|
3123
|
-
Pagination: r$
|
|
3151
|
+
Page: r$31,
|
|
3152
|
+
Pagination: r$38()({
|
|
3124
3153
|
type: "pagination",
|
|
3125
3154
|
attributeValues: {
|
|
3126
3155
|
mode: e$43()(["pages", "loadMore"]),
|
|
@@ -3171,10 +3200,11 @@ var B = {
|
|
|
3171
3200
|
}
|
|
3172
3201
|
}),
|
|
3173
3202
|
Paragraph: t$52,
|
|
3203
|
+
PlitziSdk: t$56,
|
|
3174
3204
|
Reference: t$55,
|
|
3175
|
-
RichText: n$
|
|
3205
|
+
RichText: n$41,
|
|
3176
3206
|
Svg: t$45,
|
|
3177
|
-
TabContainer: r$
|
|
3207
|
+
TabContainer: r$38()({
|
|
3178
3208
|
type: "tabContainer",
|
|
3179
3209
|
content: {
|
|
3180
3210
|
attributes: {},
|
|
@@ -3195,7 +3225,7 @@ var B = {
|
|
|
3195
3225
|
},
|
|
3196
3226
|
initialItems: ["tabContainerHeader", "tabContainerBody"]
|
|
3197
3227
|
}),
|
|
3198
|
-
TabContainerBody: r$
|
|
3228
|
+
TabContainerBody: r$38()({
|
|
3199
3229
|
type: "tabContainerBody",
|
|
3200
3230
|
ancestorType: "tabContainer",
|
|
3201
3231
|
content: {
|
|
@@ -3227,7 +3257,7 @@ var B = {
|
|
|
3227
3257
|
"tabContainerItem"
|
|
3228
3258
|
]
|
|
3229
3259
|
}),
|
|
3230
|
-
TabContainerHeader: r$
|
|
3260
|
+
TabContainerHeader: r$38()({
|
|
3231
3261
|
type: "tabContainerHeader",
|
|
3232
3262
|
ancestorType: "tabContainer",
|
|
3233
3263
|
content: {
|
|
@@ -3259,7 +3289,7 @@ var B = {
|
|
|
3259
3289
|
"tabContainerItem"
|
|
3260
3290
|
]
|
|
3261
3291
|
}),
|
|
3262
|
-
TabContainerItem: r$
|
|
3292
|
+
TabContainerItem: r$38()({
|
|
3263
3293
|
type: "tabContainerItem",
|
|
3264
3294
|
content: {
|
|
3265
3295
|
attributes: {},
|
|
@@ -3284,14 +3314,14 @@ var B = {
|
|
|
3284
3314
|
}
|
|
3285
3315
|
}),
|
|
3286
3316
|
Text: t$51,
|
|
3287
|
-
ThemeToggle: r$
|
|
3317
|
+
ThemeToggle: r$33,
|
|
3288
3318
|
Video: t$44
|
|
3289
3319
|
};
|
|
3290
|
-
var
|
|
3320
|
+
var H = Object.fromEntries(Object.values(V).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : []));
|
|
3291
3321
|
//#endregion
|
|
3292
3322
|
//#region src/elements/catalog.ts
|
|
3293
3323
|
/** Every declaration, read through the part of its shape this catalog uses. */
|
|
3294
|
-
var declarations =
|
|
3324
|
+
var declarations = V;
|
|
3295
3325
|
/** Keyed by the schema `type`, which is what a document and every catalog address a type by. */
|
|
3296
3326
|
var elementCatalog = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, {
|
|
3297
3327
|
label: declaration.content?.definition?.label ?? declaration.type,
|
|
@@ -5935,6 +5965,11 @@ var resolveSource = (source, index, where, globals = GLOBAL_SOURCES) => {
|
|
|
5935
5965
|
if (head.slice(0, separator) !== expected) throw new AuthoringError("binding-source-unknown", `${where} binds to "${source}", but "${ref}" publishes its source as "${expected}_${ref}". Name the element alone and the prefix is filled in.`);
|
|
5936
5966
|
return source;
|
|
5937
5967
|
};
|
|
5968
|
+
/**
|
|
5969
|
+
* The attribute a binding writes, from where it lands: `offlineData.schema` writes part of `offlineData` — the runtime
|
|
5970
|
+
* sets the path — so it is `offlineData` an element has to read.
|
|
5971
|
+
*/
|
|
5972
|
+
var boundAttribute = (to) => to.split(".", 1)[0];
|
|
5938
5973
|
/** Both binding forms as one list. The map form targets attributes, which is what nearly every binding does. */
|
|
5939
5974
|
var toBindingSpecs = (bind) => Array.isArray(bind) ? bind : Object.entries(bind).map(([to, source]) => ({
|
|
5940
5975
|
to,
|
|
@@ -6374,7 +6409,7 @@ var callFactory = (type, declaration, first, second) => {
|
|
|
6374
6409
|
* the caller says they are, and nothing is claimed that is not known.
|
|
6375
6410
|
*/
|
|
6376
6411
|
var defineElement = (declaration) => (first, second) => callFactory(declaration.type, declaration, first, second);
|
|
6377
|
-
var declarationsByType = new Map(Object.values(
|
|
6412
|
+
var declarationsByType = new Map(Object.values(V).map((declaration) => [declaration.type, declaration]));
|
|
6378
6413
|
/**
|
|
6379
6414
|
* The attributes an element of this type starts with — what a factory merges under the author's own.
|
|
6380
6415
|
*
|
|
@@ -6455,6 +6490,7 @@ var elements_exports = /* @__PURE__ */ __exportAll({
|
|
|
6455
6490
|
nodeHtml: () => nodeHtml,
|
|
6456
6491
|
pagination: () => pagination,
|
|
6457
6492
|
paragraph: () => paragraph,
|
|
6493
|
+
plitziSdk: () => plitziSdk,
|
|
6458
6494
|
reference: () => reference,
|
|
6459
6495
|
richText: () => richText,
|
|
6460
6496
|
svg: () => svg,
|
|
@@ -6480,30 +6516,30 @@ var elements_exports = /* @__PURE__ */ __exportAll({
|
|
|
6480
6516
|
* appear in real documents, and their components are attached to their parent rather than exported on their own,
|
|
6481
6517
|
* which is why their declarations had to be written before they could be authored at all.
|
|
6482
6518
|
*/
|
|
6483
|
-
var apiContainer = defineElement(
|
|
6484
|
-
var blockHtml = defineElement(
|
|
6485
|
-
var blockJsx = defineElement(
|
|
6486
|
-
var button$1 = defineElement(
|
|
6519
|
+
var apiContainer = defineElement(V.ApiContainer);
|
|
6520
|
+
var blockHtml = defineElement(V.BlockHtml);
|
|
6521
|
+
var blockJsx = defineElement(V.BlockJsx);
|
|
6522
|
+
var button$1 = defineElement(V.Button);
|
|
6487
6523
|
/**
|
|
6488
6524
|
* A carousel's `items` may name the source its slides come from, as a list's may: `carousel({ id: 'hero', items:
|
|
6489
6525
|
* 'site.data.slides', row: r => … })` writes the slide into a `carouselTrack`, and its `children` are the controls.
|
|
6490
6526
|
*/
|
|
6491
|
-
var carousel = defineElement(
|
|
6492
|
-
var carouselTrack = defineElement(
|
|
6493
|
-
var channel = defineElement(
|
|
6494
|
-
var container = defineElement(
|
|
6495
|
-
var custom$1 = defineElement(
|
|
6496
|
-
var dialogContainer = defineElement(
|
|
6497
|
-
var dropdown = defineElement(
|
|
6498
|
-
var dropdownPopup = defineElement(
|
|
6499
|
-
var embed = defineElement(
|
|
6500
|
-
var fontAwesome = defineElement(
|
|
6501
|
-
var form = defineElement(
|
|
6502
|
-
var formControl = defineElement(
|
|
6503
|
-
var heading = defineElement(
|
|
6504
|
-
var image = defineElement(
|
|
6505
|
-
var link = defineElement(
|
|
6506
|
-
var listFactory = defineElement(
|
|
6527
|
+
var carousel = defineElement(V.Carousel);
|
|
6528
|
+
var carouselTrack = defineElement(V.CarouselTrack);
|
|
6529
|
+
var channel = defineElement(V.Channel);
|
|
6530
|
+
var container = defineElement(V.Container);
|
|
6531
|
+
var custom$1 = defineElement(V.Custom);
|
|
6532
|
+
var dialogContainer = defineElement(V.DialogContainer);
|
|
6533
|
+
var dropdown = defineElement(V.Dropdown);
|
|
6534
|
+
var dropdownPopup = defineElement(V.DropdownPopup);
|
|
6535
|
+
var embed = defineElement(V.Embed);
|
|
6536
|
+
var fontAwesome = defineElement(V.FontAwesome);
|
|
6537
|
+
var form = defineElement(V.Form);
|
|
6538
|
+
var formControl = defineElement(V.FormControl);
|
|
6539
|
+
var heading = defineElement(V.Heading);
|
|
6540
|
+
var image = defineElement(V.Image);
|
|
6541
|
+
var link = defineElement(V.Link);
|
|
6542
|
+
var listFactory = defineElement(V.List);
|
|
6507
6543
|
var isTypedList = (props) => isSourcePath(props.items);
|
|
6508
6544
|
function list$1(first, second) {
|
|
6509
6545
|
if (Array.isArray(first)) return listFactory(first, second);
|
|
@@ -6514,22 +6550,24 @@ function list$1(first, second) {
|
|
|
6514
6550
|
row: typeof row === "function" ? (named) => row(sourceRow(named.source, items)) : row
|
|
6515
6551
|
});
|
|
6516
6552
|
}
|
|
6517
|
-
var listItem = defineElement(
|
|
6518
|
-
var markdown = defineElement(
|
|
6519
|
-
var modalContainer = defineElement(
|
|
6520
|
-
var nodeHtml = defineElement(
|
|
6521
|
-
var pagination = defineElement(
|
|
6522
|
-
var paragraph = defineElement(
|
|
6523
|
-
|
|
6524
|
-
var
|
|
6525
|
-
var
|
|
6526
|
-
var
|
|
6527
|
-
var
|
|
6528
|
-
var
|
|
6529
|
-
var
|
|
6530
|
-
var
|
|
6531
|
-
var
|
|
6532
|
-
var
|
|
6553
|
+
var listItem = defineElement(V.ListItem);
|
|
6554
|
+
var markdown = defineElement(V.Markdown);
|
|
6555
|
+
var modalContainer = defineElement(V.ModalContainer);
|
|
6556
|
+
var nodeHtml = defineElement(V.NodeHtml);
|
|
6557
|
+
var pagination = defineElement(V.Pagination);
|
|
6558
|
+
var paragraph = defineElement(V.Paragraph);
|
|
6559
|
+
/** Another space drawn inside this one, as a widget: `plitziSdk({ id: 'card', bind: { offlineData: 'view.data' } })`. */
|
|
6560
|
+
var plitziSdk = defineElement(V.PlitziSdk);
|
|
6561
|
+
var reference = defineElement(V.Reference);
|
|
6562
|
+
var richText = defineElement(V.RichText);
|
|
6563
|
+
var svg = defineElement(V.Svg);
|
|
6564
|
+
var tabContainer = defineElement(V.TabContainer);
|
|
6565
|
+
var tabContainerBody = defineElement(V.TabContainerBody);
|
|
6566
|
+
var tabContainerHeader = defineElement(V.TabContainerHeader);
|
|
6567
|
+
var tabContainerItem = defineElement(V.TabContainerItem);
|
|
6568
|
+
var text$1 = defineElement(V.Text);
|
|
6569
|
+
var themeToggle = defineElement(V.ThemeToggle);
|
|
6570
|
+
var video = defineElement(V.Video);
|
|
6533
6571
|
//#endregion
|
|
6534
6572
|
//#region ../sdk-schema/dist/helpers/elementId.mjs
|
|
6535
6573
|
var e$34 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
|
|
@@ -6704,6 +6742,7 @@ var PAGE_SPEC_KEYS = [
|
|
|
6704
6742
|
"seoTitle",
|
|
6705
6743
|
"seoDescription",
|
|
6706
6744
|
"notFound",
|
|
6745
|
+
"documentScroll",
|
|
6707
6746
|
"accessLevel",
|
|
6708
6747
|
"unauthorizedRedirect",
|
|
6709
6748
|
"folder",
|
|
@@ -6853,7 +6892,7 @@ var paramIssue = (params, spec, where) => {
|
|
|
6853
6892
|
const suggestion = typeof value === "string" && invalid.options ? didYouMean(value, invalid.options) : "";
|
|
6854
6893
|
return invalid.options ? `${where}: "${invalid.key}" is ${JSON.stringify(value)}${suggestion || "."} It is one of ${invalid.options.map((option) => `'${option}'`).join(", ")}.` : `${where}: "${invalid.key}" is ${JSON.stringify(value)} (${invalid.got}), and it takes a ${invalid.expected}.`;
|
|
6855
6894
|
}
|
|
6856
|
-
const missing = r$
|
|
6895
|
+
const missing = r$36(provided, effective, declared).at(0);
|
|
6857
6896
|
return missing === void 0 ? void 0 : `${where} needs "${missing}": ${declared[missing].description}`;
|
|
6858
6897
|
};
|
|
6859
6898
|
//#endregion
|
|
@@ -7995,6 +8034,7 @@ var withPluginCatalogs = (options) => {
|
|
|
7995
8034
|
})
|
|
7996
8035
|
},
|
|
7997
8036
|
drawsNothingTypes: [...rest.drawsNothingTypes ?? [], ...plugins.filter((declaration) => declaration.drawsNothing === true).flatMap((declaration) => [declaration.type, hostedKey(declaration)])],
|
|
8037
|
+
choosesChildrenTypes: [...rest.choosesChildrenTypes ?? [], ...plugins.filter((declaration) => declaration.choosesChildren === true).flatMap((declaration) => [declaration.type, hostedKey(declaration)])],
|
|
7998
8038
|
leafTypes: [...rest.leafTypes ?? [], ...plugins.filter((declaration) => declaration.content?.definition && !Array.isArray(declaration.content.definition.items)).map((declaration) => declaration.type)]
|
|
7999
8039
|
};
|
|
8000
8040
|
};
|
|
@@ -13955,8 +13995,9 @@ var lintPages = (ctx) => {
|
|
|
13955
13995
|
if (!page) continue;
|
|
13956
13996
|
const where = ctx.describe(pageId);
|
|
13957
13997
|
checkPageTemplates(ctx, pageId, where);
|
|
13958
|
-
const { accessLevel, slug, folder } = page.attributes;
|
|
13998
|
+
const { accessLevel, documentScroll, slug, folder } = page.attributes;
|
|
13959
13999
|
if (accessLevel !== void 0 && accessLevel !== "" && !ACCESS_LEVELS.includes(accessLevel)) ctx.error("page-access-level", `${where}: \`accessLevel\` is ${JSON.stringify(accessLevel)}. It is one of ${ACCESS_LEVELS.map((level) => `'${level}'`).join(", ")}.`, pageId);
|
|
14000
|
+
if (documentScroll !== void 0 && documentScroll !== "" && !n$36(documentScroll)) ctx.error("attribute-value", `${where}: \`documentScroll\` is ${JSON.stringify(documentScroll)}${typeof documentScroll === "string" && didYouMean(documentScroll, t$48) || "."} It is one of ${t$48.map((value) => `'${value}'`).join(", ")} — or left out, for a page that scrolls as any does.`, pageId);
|
|
13960
14001
|
const path = `/${[typeof folder === "string" && folder ? folderPath(ctx, folder) : "", textOf(slug)].filter(Boolean).join("/")}`;
|
|
13961
14002
|
if (a$9(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);
|
|
13962
14003
|
const key = `${path} ${typeof accessLevel === "string" && accessLevel ? accessLevel : "everyone"}`;
|
|
@@ -14234,7 +14275,7 @@ var checkAttributes = (ctx, element, where) => {
|
|
|
14234
14275
|
ctx.error("unknown-attribute", `${where} sets "${name}", which a "${type}" never reads${didYouMean(name, names) || "."}${hint || ` It reads ${names.join(", ")}.`}`, element.id);
|
|
14235
14276
|
continue;
|
|
14236
14277
|
}
|
|
14237
|
-
if (value === void 0 || value === null || typeof value === "string" && n$
|
|
14278
|
+
if (value === void 0 || value === null || typeof value === "string" && n$47(value)) continue;
|
|
14238
14279
|
if (Object.hasOwn(enums, name) && !(typeof value === "string" && enums[name].includes(value))) {
|
|
14239
14280
|
const tag = name === "subType" && typeof value === "string" ? value : void 0;
|
|
14240
14281
|
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];
|
|
@@ -14312,7 +14353,7 @@ var checkBindings = (ctx, element, where) => {
|
|
|
14312
14353
|
const prefix = ctx.sources.get(providerId);
|
|
14313
14354
|
if (prefix && head === `${prefix}_${providerId}` && !scope.has(providerId)) ctx.error("binding-source-out-of-scope", `${at} reads "${binding.source}", but "${providerId}" is not around it. An element's source reaches only the elements inside it — move this one into "${providerId}", or read the value through something both can see, like \`state\`.`, element.id);
|
|
14314
14355
|
if (binding.to === "visibility" && category === "attributes") ctx.error("visibility-as-attribute", `${where} binds "visibility" as an attribute, which no element reads — it would stay on screen. Write \`visible: '${binding.source}'\` on the element (or \`visible: { source: '${binding.source}', template }\`).`, element.id);
|
|
14315
|
-
const unread = binding.to !== "visibility" && binding.to !== "className" && !names?.includes(binding.to);
|
|
14356
|
+
const unread = binding.to !== "visibility" && binding.to !== "className" && !names?.includes(boundAttribute(binding.to));
|
|
14316
14357
|
if (category === "attributes" && names && unread) {
|
|
14317
14358
|
const styled = binding.to === "style" || isCssProperty(binding.to) || isCustomProperty(binding.to);
|
|
14318
14359
|
const how = styled ? ` A style is bound in the \`style\` category, one property at a time — \`bindTemplate('${binding.to === "style" ? "background-color" : binding.to}', '${binding.source}', '{{ source }}', { category: 'style' })\` — or a custom property its class reads: \`'--who'\` beside \`background-color: var(--who)\`.` : ` It reads ${names.join(", ")}.`;
|
|
@@ -14356,17 +14397,17 @@ var checkTemplateInValue = (ctx, element, where, name, value) => {
|
|
|
14356
14397
|
*/
|
|
14357
14398
|
var checkAttributeTemplates = (ctx, element, where) => {
|
|
14358
14399
|
if (PROSE_TYPES.has(element.definition.type)) return;
|
|
14359
|
-
const evaluated =
|
|
14400
|
+
const evaluated = H[element.definition.type] ?? [];
|
|
14360
14401
|
const rendered = Object.fromEntries(Object.entries(element.attributes).filter(([name]) => !evaluated.includes(name)));
|
|
14361
14402
|
for (const name of evaluated) {
|
|
14362
14403
|
const value = element.attributes[name];
|
|
14363
14404
|
if (typeof value === "string" && value !== "") checkTemplate(ctx, value, `${where}: its "${name}"`, { kind: "binding" }, ctx.scope(element.id), element.id);
|
|
14364
14405
|
}
|
|
14365
14406
|
for (const [name, value] of Object.entries(rendered)) if (typeof value !== "string") checkTemplateInValue(ctx, element, where, name, value);
|
|
14366
|
-
else if (e$7(value) && !n$
|
|
14407
|
+
else if (e$7(value) && !n$47(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 });
|
|
14367
14408
|
const routeParams = ctx.routeParams(element.id);
|
|
14368
14409
|
const scope = ctx.scope(element.id);
|
|
14369
|
-
for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$
|
|
14410
|
+
for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$47(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
|
|
14370
14411
|
kind: "attribute",
|
|
14371
14412
|
routeParams
|
|
14372
14413
|
}, scope, element.id);
|
|
@@ -15525,7 +15566,7 @@ var FIXERS = {
|
|
|
15525
15566
|
const names = ctx.attributeNamesFor(element);
|
|
15526
15567
|
const bindings = element.definition.bindings;
|
|
15527
15568
|
if (!names || !bindings?.attributes) return;
|
|
15528
|
-
const reads = (binding) => binding.to === "visibility" || binding.to === "className" || names.includes(binding.to);
|
|
15569
|
+
const reads = (binding) => binding.to === "visibility" || binding.to === "className" || names.includes(boundAttribute(binding.to));
|
|
15529
15570
|
for (const binding of bindings.attributes.filter((candidate) => !reads(candidate))) report(`Removed the binding onto "${binding.to}", which a "${element.definition.type}" never reads.`, {
|
|
15530
15571
|
on: "binding",
|
|
15531
15572
|
op: "remove",
|
|
@@ -18312,7 +18353,8 @@ var PAGE_SPEC_FIELDS = {
|
|
|
18312
18353
|
accessLevel: "accessLevel",
|
|
18313
18354
|
seoPageTitle: "seoTitle",
|
|
18314
18355
|
seoPageDescription: "seoDescription",
|
|
18315
|
-
notFound: "notFound"
|
|
18356
|
+
notFound: "notFound",
|
|
18357
|
+
documentScroll: "documentScroll"
|
|
18316
18358
|
};
|
|
18317
18359
|
var layoutAttributes = (layout) => layout ? {
|
|
18318
18360
|
layout: layout.id,
|
|
@@ -18925,7 +18967,7 @@ var SpaceAuthor = class {
|
|
|
18925
18967
|
for (const [name, prop] of Object.entries(component.props ?? {})) {
|
|
18926
18968
|
const problem = c$8(name);
|
|
18927
18969
|
if (problem) throw new AuthoringError("prop-name", `${where}: ${problem}.`);
|
|
18928
|
-
const types = t$
|
|
18970
|
+
const types = t$62;
|
|
18929
18971
|
const type = prop.type;
|
|
18930
18972
|
if (!types.includes(type)) throw new AuthoringError("prop-type-unknown", `${where} declares the prop "${name}" as \`${type}\`, which is no type${didYouMean(type, [...types]) || "."} A prop is one of ${types.join(", ")}: words are \`text\`.`);
|
|
18931
18973
|
}
|
|
@@ -19126,7 +19168,8 @@ var SpaceAuthor = class {
|
|
|
19126
19168
|
seoEnabled: Boolean(page.seoTitle ?? page.seoDescription),
|
|
19127
19169
|
...page.seoTitle ? { seoPageTitle: page.seoTitle } : {},
|
|
19128
19170
|
...page.seoDescription ? { seoPageDescription: page.seoDescription } : {},
|
|
19129
|
-
...page.notFound ? { notFound: page.notFound } : {}
|
|
19171
|
+
...page.notFound ? { notFound: page.notFound } : {},
|
|
19172
|
+
...page.documentScroll ? { documentScroll: page.documentScroll } : {}
|
|
19130
19173
|
},
|
|
19131
19174
|
definition: {
|
|
19132
19175
|
label: "Page",
|
|
@@ -19297,6 +19340,9 @@ var SpaceAuthor = class {
|
|
|
19297
19340
|
* state that names it — shows nothing on a bare visit either, and that is it working: it is conditional the way its
|
|
19298
19341
|
* children are. Bottom up, so a wrapper of such an element is too. Without it a suite asserting "everything named
|
|
19299
19342
|
* is visible" failed on the menu at rest, and the only way past was a condition on the parent that said nothing new.
|
|
19343
|
+
*
|
|
19344
|
+
* Not an element that chooses its children: its children are conditional because it decides which to show, and it is
|
|
19345
|
+
* on screen to decide — a dashboard is there whichever panels it draws.
|
|
19300
19346
|
*/
|
|
19301
19347
|
markConditionalByChildren(schema) {
|
|
19302
19348
|
const handles = [...Object.values(this.handles), ...Object.values(this.layoutHandles)].flatMap((root) => Object.values(root.elements));
|
|
@@ -19304,7 +19350,8 @@ var SpaceAuthor = class {
|
|
|
19304
19350
|
for (let changed = true; changed;) {
|
|
19305
19351
|
changed = false;
|
|
19306
19352
|
for (const handle of handles) {
|
|
19307
|
-
const
|
|
19353
|
+
const element = schema.flat[handle.id];
|
|
19354
|
+
const items = handle.conditional || this.choosesChildren(element) ? [] : element.definition.items ?? [];
|
|
19308
19355
|
if (items.length > 0 && items.every((child) => byId.get(child)?.conditional === true)) {
|
|
19309
19356
|
handle.conditional = true;
|
|
19310
19357
|
changed = true;
|
|
@@ -19322,6 +19369,10 @@ var SpaceAuthor = class {
|
|
|
19322
19369
|
drawsNothing(element) {
|
|
19323
19370
|
return this.options.drawsNothingTypes?.includes(this.pluginKeyOf(element)) ?? false;
|
|
19324
19371
|
}
|
|
19372
|
+
/** Whether the element's plugin declares it shows only some of its children, chosen as it runs. */
|
|
19373
|
+
choosesChildren(element) {
|
|
19374
|
+
return this.options.choosesChildrenTypes?.includes(this.pluginKeyOf(element)) ?? false;
|
|
19375
|
+
}
|
|
19325
19376
|
/** Plugin types already warned about a reserved attribute: said once, at the first element of the type. */
|
|
19326
19377
|
reservedWarned = /* @__PURE__ */ new Set();
|
|
19327
19378
|
/**
|
|
@@ -19480,7 +19531,9 @@ var SpaceAuthor = class {
|
|
|
19480
19531
|
...[...ancestors].some((ancestor) => REPEATING_TYPES.has(tree.map.flat[ancestor].definition.type)) ? { repeated: true } : {},
|
|
19481
19532
|
...a$7(element) || this.drawsNothing(element) ? { boxless: true } : {}
|
|
19482
19533
|
});
|
|
19483
|
-
|
|
19534
|
+
const children = spec.row === void 0 ? spec.children : this.rowChildren(spec, spec.row, id, where);
|
|
19535
|
+
const childrenConditional = conditional || this.choosesChildren(element);
|
|
19536
|
+
children?.forEach((child, index) => this.addElement(child, `${identity}/${index}`, placeOf(child, place, index), ownRootId, id, childrenConditional, tree));
|
|
19484
19537
|
return id;
|
|
19485
19538
|
}
|
|
19486
19539
|
/** A `row` placed: a list's IS its children; a carousel's goes in a track, beside the controls it was given. */
|
|
@@ -21090,6 +21143,7 @@ var PAGE_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
21090
21143
|
"seoPageTitle",
|
|
21091
21144
|
"seoPageDescription",
|
|
21092
21145
|
"notFound",
|
|
21146
|
+
"documentScroll",
|
|
21093
21147
|
"enabled"
|
|
21094
21148
|
]);
|
|
21095
21149
|
var LAYOUT_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
@@ -21786,6 +21840,8 @@ var SpecReader = class {
|
|
|
21786
21840
|
const seoTitle = typeof attributes.seoPageTitle === "string" ? attributes.seoPageTitle : "";
|
|
21787
21841
|
const seoDescription = typeof attributes.seoPageDescription === "string" ? attributes.seoPageDescription : "";
|
|
21788
21842
|
const notFound = typeof attributes.notFound === "string" ? attributes.notFound : "";
|
|
21843
|
+
const documentScroll = n$36(attributes.documentScroll) ? attributes.documentScroll : void 0;
|
|
21844
|
+
if (!documentScroll && attributes.documentScroll !== void 0 && attributes.documentScroll !== "") this.correct("dropped-field", `${where} had \`documentScroll\` ${JSON.stringify(attributes.documentScroll)}, which no page reads; it is authored scrolling as any page does.`, page.id);
|
|
21789
21845
|
if (BINDING_CATEGORIES.some((category) => bindingsOf(page.definition.bindings, category).length > 0)) this.correct("dropped-field", `${where} had bindings of its own, which a page cannot declare.`, page.id);
|
|
21790
21846
|
return {
|
|
21791
21847
|
id: page.id,
|
|
@@ -21795,6 +21851,7 @@ var SpecReader = class {
|
|
|
21795
21851
|
...seoTitle ? { seoTitle } : {},
|
|
21796
21852
|
...seoDescription ? { seoDescription } : {},
|
|
21797
21853
|
...notFound ? { notFound } : {},
|
|
21854
|
+
...documentScroll ? { documentScroll } : {},
|
|
21798
21855
|
...folder ? { folder } : {},
|
|
21799
21856
|
...layout ? { layout } : {},
|
|
21800
21857
|
...accessLevel ? { accessLevel } : {},
|
|
@@ -26578,4 +26635,4 @@ var validateSnippet = (snippet, options = {}) => validateSnippet$1(snippet, {
|
|
|
26578
26635
|
...options
|
|
26579
26636
|
});
|
|
26580
26637
|
//#endregion
|
|
26581
|
-
export { GLOBAL_CALLBACK_BUILDERS as $,
|
|
26638
|
+
export { GLOBAL_CALLBACK_BUILDERS as $, withVisibility as $i, twigTemplate as $n, button$1 as $r, css as $t, unrollPage as A, n$46 as Aa, text$1 as Ai, getUtility as An, onKey as Ar, d$2 as At, blankSpace as B, GLOBAL_SOURCES as Bi, cycleState as Bn, resetForm as Br, grid as Bt, pageTexts as C, t$48 as Ca, reference as Ci, flagGateOf as Cn, declaredTrigger as Cr, unusedDeclarations as Ct, pageRegions as D, o$24 as Da, tabContainerBody as Di, taskAction as Dn, onFlowError as Dr, pageFamily as Dt, diffPictures as E, i$27 as Ea, tabContainer as Ei, defineAction as En, onFlowEnd as Er, familyOf as Et, readDevTools as F, defaultLabel as Fi, authLogout as Fn, onSubmit as Fr, t$6 as Ft, space as G, boundAttribute as Gi, navigate as Gn, toggleElement as Gr, isClassModifier as Gt, catalogTemplateFiles as H, activeWhen as Hi, hostAction as Hn, scrollIntoView as Hr, className as Ht, readDevToolsInPage as I, defineElement as Ii, authRefreshDetails as In, openDialog as Ir, tokens as It, importSlug as J, hiddenWhen as Ji, runServerActionOrNotify as Jn, withPluginCatalogs as Jr, modifierClassName as Jt, space$1 as K, groupBindings as Ki, removeState as Kn, updateElement as Kr, isClassRef as Kt, dataIssues as L, element as Li, cancelServerAction as Ln, openModal as Lr, createTw as Lt, inspectPage as M, s$23 as Ma, video as Mi, addNotification as Mn, onPageLoad as Mr, FIXABLE_CODES as Mt, onScreen as N, t$62 as Na, component as Ni, appendState as Nn, onPointerDown as Nr, n$6 as Nt, profilePictures as O, s$21 as Oa, tabContainerHeader as Oi, BUILTIN_UTILITIES as On, onFlowProgress as Or, notificationsCss as Ot, failedFlowText as P, defaultAttributes as Pi, authLogin as Pn, onScroll as Pr, r$4 as Pt, EXPLAIN_KINDS as Q, visibleWhen as Qi, toggleState as Qn, blockJsx as Qr, STYLE_STATES as Qt, answerAction as R, inferredLinkMode as Ri, clearState as Rn, publishOn as Rr, tw as Rt, compareTexts as S, n$36 as Sa, plitziSdk as Si, selectorFor as Sn, declaredCallback as Sr, suggestClassOverrides as St, comparePictures as T, a$22 as Ta, svg as Ti, authoringCodesTable as Tn, onClick as Tr, refusalOf as Tt, emptyTemplateFiles as U, authorBinding as Ui, invalidateQueries as Un, scrollTo as Ur, classNames as Ut, blankTemplateFiles as V, activeOn as Vi, delay as Vn, scrollBy as Vr, row as Vt, toPortableSource as W, bindTemplate as Wi, moveState as Wn, setFieldValue as Wr, classRefs as Wt, importProbe as X, toBindingSpecs as Xi, stepState as Xn, apiContainer as Xr, styles as Xt, importedFiles as Y, resolveSource as Yi, setState as Yn, e$33 as Yr, splitClassList as Yt, BUILDER_NAMES as Z, variantFrom as Zi, toggleInState as Zn, blockHtml as Zr, BREAKPOINTS$1 as Zt, shortcutKey as _, elementSourceTypes as _a, markdown as _i, slugify as _n, carouselPause as _r, assertSnippetValid as _t, locateClasses as a, AUTHORING_CODES as aa, dialogContainer as ai, expandShorthand as an, when as ar, SPACE_FIELDS as at, summariseRenders as b, typeCallbackDefinitions as ba, pagination as bi, locate as bn, closeDialog as br, suggestSpace as bt, validateSnippet as c, isSuggestionCode as ca, embed as ci, shorthandLonghands as cn, whileRunning as cr, specFromSpace as ct, i as d, elementCallbacks as da, formControl as di, cssPropertyName as dn, getGlobalCallback as dr, actionToSource as dt, actionSource as ea, carousel as ei, isRuleSetSpec as en, webHook as er, explain as et, o as f, elementCatalog as fa, heading as fi, isCssProperty as fn, e$16 as fr, withNamedIds as ft, pressShortcut as g, elementSlots as ga, listItem as gi, digest as gn, carouselNext as gr, transformerCatalog as gt, withElement as h, elementPartTypes as ha, list$1 as hi, e$9 as hn, carouselGoTo as hr, suggestTransformer as ht, lintSpace as i, scope as ia, custom$1 as ii, cssShorthands as in, named$2 as ir, ELEMENT_FIELDS as it, inspectDocument as j, r$36 as ja, themeToggle as ji, SET_STATE_TYPES as jn, onLoad as jr, i$2 as jt, loadImages as k, c$19 as ka, tabContainerItem as ki, applyUtility as kn, onInterval as kr, withNotificationsCss as kt, validateSpace as l, elementAncestorTypes as la, fontAwesome as li, cssNumberValue as ln, BUILTIN_GLOBAL_CALLBACKS as lr, compareSpaces as lt, singlePageSpace as m, elementLeafTypes as ma, link as mi, suggestCssProperty as mn, cancelApi as mr, getTransformer as mt, authorSpace as n, twig as na, channel as ni, toBlocks as nn, authorFlows as nr, explainList as nt, locateElements as o, AuthoringError as oa, dropdown as oi, expandShorthandPatch as on, whenFailed as or, specToSource as ot, compactSvg as p, elementDefaultAttributes as pa, image as pi, isCustomProperty as pn, announceOn as pr, BUILTIN_TRANSFORMERS as pt, darkScheme as q, hasVisibilityBinding as qi, runServerAction as qn, elementsFromManifest as qr, isStyleDeclaration as qt, fixSpace as r, closest as ra, container as ri, toResponsive as rn, flowStepIds as rr, explanationText as rt, planFixes as s, authoringCodeEntry as sa, dropdownPopup as si, expandShorthandTraced as sn, whenSucceeded as sr, SCHEMA_SETTINGS as st, authorSnippet as t, source as ta, carouselTrack as ti, sameBlocks as tn, authorFlow as tr, explainKindOf as tt, a as u, elementAttributeValues as ua, form as ui, cssProperties as un, applyBuiltinCallback as ur, actionSpecFromEntry as ut, openPage as v, elementTriggers as va, modalContainer as vi, buildHandles as vn, carouselPlay as vr, PAGE_SPEC_FIELDS as vt, alignPictures as w, elementAttributeNames as wa, richText as wi, flagSpecOf as wn, on as wr, SpaceRefusedError as wt, PAGE_TEXT_LIMIT as x, typeTriggerDefinitions as xa, paragraph as xi, pathForSlug as xn, closeModal as xr, withoutQuieted as xt, inspectRenders as y, elementTypeNames as ya, nodeHtml as yi, instanceSelectorFor as yn, carouselPrevious as yr, assertSpaceValid as yt, CATALOG_TEMPLATE_IDENTITY as z, COMPONENT_SOURCES as zi, copyToClipboard as zn, reloadApi as zr, column as zt };
|