@plitzi/sdk-authoring 0.34.0 → 0.35.0
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 +23 -0
- package/dist/index.d.ts +27 -1
- package/dist/index.js +403 -212
- package/package.json +6 -6
- package/skills/plitzi-authoring/SKILL.md +7 -0
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var e = () => (e) => e;
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region ../sdk-elements/dist/elements/advanced/BlockHtml/declaration.mjs
|
|
5
|
-
var t$
|
|
5
|
+
var t$46 = e()({
|
|
6
6
|
type: "blockHtml",
|
|
7
7
|
content: {
|
|
8
8
|
attributes: { content: "" },
|
|
@@ -42,7 +42,7 @@ var t$45 = e()({
|
|
|
42
42
|
});
|
|
43
43
|
//#endregion
|
|
44
44
|
//#region ../sdk-elements/dist/elements/advanced/BlockJsx/declaration.mjs
|
|
45
|
-
var t$
|
|
45
|
+
var t$45 = e()({
|
|
46
46
|
type: "blockJsx",
|
|
47
47
|
content: {
|
|
48
48
|
attributes: {
|
|
@@ -87,7 +87,7 @@ var t$44 = e()({
|
|
|
87
87
|
});
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region ../sdk-elements/dist/elements/advanced/Custom/declaration.mjs
|
|
90
|
-
var t$
|
|
90
|
+
var t$44 = e()({
|
|
91
91
|
type: "custom",
|
|
92
92
|
content: {
|
|
93
93
|
attributes: {
|
|
@@ -133,7 +133,7 @@ var t$43 = e()({
|
|
|
133
133
|
});
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region ../sdk-elements/dist/elements/advanced/NodeHtml/declaration.mjs
|
|
136
|
-
var t$
|
|
136
|
+
var t$43 = e()({
|
|
137
137
|
type: "nodeHtml",
|
|
138
138
|
content: {
|
|
139
139
|
attributes: { subType: "div" },
|
|
@@ -179,7 +179,7 @@ var t$42 = e()({
|
|
|
179
179
|
});
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region ../sdk-elements/dist/elements/advanced/Reference/declaration.mjs
|
|
182
|
-
var t$
|
|
182
|
+
var t$42 = e()({
|
|
183
183
|
type: "reference",
|
|
184
184
|
content: {
|
|
185
185
|
attributes: {
|
|
@@ -224,7 +224,7 @@ var t$41 = e()({
|
|
|
224
224
|
});
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region ../sdk-elements/dist/elements/basic/Button/declaration.mjs
|
|
227
|
-
var t$
|
|
227
|
+
var t$41 = e()({
|
|
228
228
|
type: "button",
|
|
229
229
|
content: {
|
|
230
230
|
attributes: {
|
|
@@ -323,7 +323,7 @@ var t$40 = e()({
|
|
|
323
323
|
});
|
|
324
324
|
//#endregion
|
|
325
325
|
//#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
|
|
326
|
-
var t$
|
|
326
|
+
var t$40 = e()({
|
|
327
327
|
type: "dropdown",
|
|
328
328
|
content: {
|
|
329
329
|
attributes: {
|
|
@@ -391,7 +391,7 @@ var t$39 = e()({
|
|
|
391
391
|
});
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region ../sdk-elements/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs
|
|
394
|
-
var t$
|
|
394
|
+
var t$39 = e()({
|
|
395
395
|
type: "dropdownPopup",
|
|
396
396
|
content: {
|
|
397
397
|
attributes: {},
|
|
@@ -449,7 +449,7 @@ var t$38 = e()({
|
|
|
449
449
|
});
|
|
450
450
|
//#endregion
|
|
451
451
|
//#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
|
|
452
|
-
var t$
|
|
452
|
+
var t$38 = e()({
|
|
453
453
|
type: "heading",
|
|
454
454
|
content: {
|
|
455
455
|
attributes: {
|
|
@@ -560,7 +560,7 @@ var t$37 = e()({
|
|
|
560
560
|
});
|
|
561
561
|
//#endregion
|
|
562
562
|
//#region ../sdk-elements/dist/elements/basic/Link/declaration.mjs
|
|
563
|
-
var t$
|
|
563
|
+
var t$37 = e()({
|
|
564
564
|
type: "link",
|
|
565
565
|
content: {
|
|
566
566
|
attributes: {
|
|
@@ -610,7 +610,7 @@ var t$36 = e()({
|
|
|
610
610
|
});
|
|
611
611
|
//#endregion
|
|
612
612
|
//#region ../sdk-elements/dist/elements/basic/Markdown/declaration.mjs
|
|
613
|
-
var t$
|
|
613
|
+
var t$36 = e()({
|
|
614
614
|
type: "markdown",
|
|
615
615
|
content: {
|
|
616
616
|
attributes: { content: "Markdown" },
|
|
@@ -653,7 +653,7 @@ var t$35 = e()({
|
|
|
653
653
|
});
|
|
654
654
|
//#endregion
|
|
655
655
|
//#region ../sdk-elements/dist/elements/basic/Paragraph/declaration.mjs
|
|
656
|
-
var t$
|
|
656
|
+
var t$35 = e()({
|
|
657
657
|
type: "paragraph",
|
|
658
658
|
content: {
|
|
659
659
|
attributes: { content: "Paragraph" },
|
|
@@ -696,7 +696,7 @@ var t$34 = e()({
|
|
|
696
696
|
});
|
|
697
697
|
//#endregion
|
|
698
698
|
//#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
|
|
699
|
-
var t$
|
|
699
|
+
var t$34 = e()({
|
|
700
700
|
type: "richText",
|
|
701
701
|
content: {
|
|
702
702
|
attributes: {
|
|
@@ -742,7 +742,7 @@ var t$33 = e()({
|
|
|
742
742
|
});
|
|
743
743
|
//#endregion
|
|
744
744
|
//#region ../sdk-elements/dist/elements/basic/Text/declaration.mjs
|
|
745
|
-
var t$
|
|
745
|
+
var t$33 = e()({
|
|
746
746
|
type: "text",
|
|
747
747
|
content: {
|
|
748
748
|
attributes: { content: "Text" },
|
|
@@ -786,7 +786,7 @@ var t$32 = e()({
|
|
|
786
786
|
});
|
|
787
787
|
//#endregion
|
|
788
788
|
//#region ../sdk-elements/dist/elements/basic/ThemeToggle/declaration.mjs
|
|
789
|
-
var t$
|
|
789
|
+
var t$32 = e()({
|
|
790
790
|
type: "themeToggle",
|
|
791
791
|
content: {
|
|
792
792
|
attributes: {
|
|
@@ -842,7 +842,7 @@ var t$31 = e()({
|
|
|
842
842
|
});
|
|
843
843
|
//#endregion
|
|
844
844
|
//#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
|
|
845
|
-
var t$
|
|
845
|
+
var t$31 = e()({
|
|
846
846
|
type: "form",
|
|
847
847
|
sourceType: "apiContainer",
|
|
848
848
|
content: {
|
|
@@ -889,7 +889,7 @@ var t$30 = e()({
|
|
|
889
889
|
});
|
|
890
890
|
//#endregion
|
|
891
891
|
//#region ../sdk-elements/dist/elements/form/FormControl/declaration.mjs
|
|
892
|
-
var t$
|
|
892
|
+
var t$30 = {
|
|
893
893
|
width: "100%",
|
|
894
894
|
display: "flex",
|
|
895
895
|
"align-items": "center",
|
|
@@ -919,7 +919,7 @@ var t$29 = {
|
|
|
919
919
|
outline: "none",
|
|
920
920
|
position: "relative"
|
|
921
921
|
};
|
|
922
|
-
var n$
|
|
922
|
+
var n$11 = {
|
|
923
923
|
display: "flex",
|
|
924
924
|
cursor: "pointer",
|
|
925
925
|
"font-weight": "600",
|
|
@@ -928,16 +928,16 @@ var n$10 = {
|
|
|
928
928
|
color: "#6b7280",
|
|
929
929
|
"user-select": "none"
|
|
930
930
|
};
|
|
931
|
-
var r$
|
|
932
|
-
...n$
|
|
931
|
+
var r$10 = {
|
|
932
|
+
...n$11,
|
|
933
933
|
"margin-bottom": "4px"
|
|
934
934
|
};
|
|
935
|
-
var i$
|
|
935
|
+
var i$9 = {
|
|
936
936
|
display: "block",
|
|
937
937
|
color: "red",
|
|
938
938
|
"margin-top": "4px"
|
|
939
939
|
};
|
|
940
|
-
var a$
|
|
940
|
+
var a$7 = e()({
|
|
941
941
|
type: "formControl",
|
|
942
942
|
content: {
|
|
943
943
|
attributes: {
|
|
@@ -999,8 +999,8 @@ var a$6 = e()({
|
|
|
999
999
|
style: {
|
|
1000
1000
|
base: {},
|
|
1001
1001
|
input: { default: {} },
|
|
1002
|
-
label: { default: r$
|
|
1003
|
-
error: { default: i$
|
|
1002
|
+
label: { default: r$10 },
|
|
1003
|
+
error: { default: i$9 }
|
|
1004
1004
|
}
|
|
1005
1005
|
},
|
|
1006
1006
|
text: {
|
|
@@ -1008,9 +1008,9 @@ var a$6 = e()({
|
|
|
1008
1008
|
displayMode: "desktop",
|
|
1009
1009
|
style: {
|
|
1010
1010
|
base: { default: {} },
|
|
1011
|
-
input: { default: t$
|
|
1012
|
-
label: { default: r$
|
|
1013
|
-
error: { default: i$
|
|
1011
|
+
input: { default: t$30 },
|
|
1012
|
+
label: { default: r$10 },
|
|
1013
|
+
error: { default: i$9 }
|
|
1014
1014
|
}
|
|
1015
1015
|
},
|
|
1016
1016
|
password: {
|
|
@@ -1018,9 +1018,9 @@ var a$6 = e()({
|
|
|
1018
1018
|
displayMode: "desktop",
|
|
1019
1019
|
style: {
|
|
1020
1020
|
base: { default: {} },
|
|
1021
|
-
input: { default: t$
|
|
1022
|
-
label: { default: r$
|
|
1023
|
-
error: { default: i$
|
|
1021
|
+
input: { default: t$30 },
|
|
1022
|
+
label: { default: r$10 },
|
|
1023
|
+
error: { default: i$9 }
|
|
1024
1024
|
}
|
|
1025
1025
|
},
|
|
1026
1026
|
number: {
|
|
@@ -1028,9 +1028,9 @@ var a$6 = e()({
|
|
|
1028
1028
|
displayMode: "desktop",
|
|
1029
1029
|
style: {
|
|
1030
1030
|
base: { default: {} },
|
|
1031
|
-
input: { default: t$
|
|
1032
|
-
label: { default: r$
|
|
1033
|
-
error: { default: i$
|
|
1031
|
+
input: { default: t$30 },
|
|
1032
|
+
label: { default: r$10 },
|
|
1033
|
+
error: { default: i$9 }
|
|
1034
1034
|
}
|
|
1035
1035
|
},
|
|
1036
1036
|
email: {
|
|
@@ -1038,9 +1038,9 @@ var a$6 = e()({
|
|
|
1038
1038
|
displayMode: "desktop",
|
|
1039
1039
|
style: {
|
|
1040
1040
|
base: { default: {} },
|
|
1041
|
-
input: { default: t$
|
|
1042
|
-
label: { default: r$
|
|
1043
|
-
error: { default: i$
|
|
1041
|
+
input: { default: t$30 },
|
|
1042
|
+
label: { default: r$10 },
|
|
1043
|
+
error: { default: i$9 }
|
|
1044
1044
|
}
|
|
1045
1045
|
},
|
|
1046
1046
|
textarea: {
|
|
@@ -1048,9 +1048,9 @@ var a$6 = e()({
|
|
|
1048
1048
|
displayMode: "desktop",
|
|
1049
1049
|
style: {
|
|
1050
1050
|
base: { default: {} },
|
|
1051
|
-
input: { default: t$
|
|
1052
|
-
label: { default: r$
|
|
1053
|
-
error: { default: i$
|
|
1051
|
+
input: { default: t$30 },
|
|
1052
|
+
label: { default: r$10 },
|
|
1053
|
+
error: { default: i$9 }
|
|
1054
1054
|
}
|
|
1055
1055
|
},
|
|
1056
1056
|
checkbox: {
|
|
@@ -1064,8 +1064,8 @@ var a$6 = e()({
|
|
|
1064
1064
|
"margin-left": "0px",
|
|
1065
1065
|
"margin-right": "4px"
|
|
1066
1066
|
} },
|
|
1067
|
-
label: { default: n$
|
|
1068
|
-
error: { default: i$
|
|
1067
|
+
label: { default: n$11 },
|
|
1068
|
+
error: { default: i$9 }
|
|
1069
1069
|
}
|
|
1070
1070
|
},
|
|
1071
1071
|
select: {
|
|
@@ -1074,11 +1074,11 @@ var a$6 = e()({
|
|
|
1074
1074
|
style: {
|
|
1075
1075
|
base: { default: {} },
|
|
1076
1076
|
input: { default: {
|
|
1077
|
-
...t$
|
|
1077
|
+
...t$30,
|
|
1078
1078
|
cursor: "pointer"
|
|
1079
1079
|
} },
|
|
1080
|
-
label: r$
|
|
1081
|
-
error: { default: i$
|
|
1080
|
+
label: r$10,
|
|
1081
|
+
error: { default: i$9 }
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
@@ -1088,7 +1088,7 @@ var a$6 = e()({
|
|
|
1088
1088
|
});
|
|
1089
1089
|
//#endregion
|
|
1090
1090
|
//#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
|
|
1091
|
-
var t$
|
|
1091
|
+
var t$29 = e()({
|
|
1092
1092
|
type: "layoutContainer",
|
|
1093
1093
|
content: {
|
|
1094
1094
|
attributes: { subType: "div" },
|
|
@@ -1130,7 +1130,7 @@ var t$28 = e()({
|
|
|
1130
1130
|
});
|
|
1131
1131
|
//#endregion
|
|
1132
1132
|
//#region ../sdk-elements/dist/elements/internal/Loading/declaration.mjs
|
|
1133
|
-
var t$
|
|
1133
|
+
var t$28 = e()({
|
|
1134
1134
|
type: "loading",
|
|
1135
1135
|
content: {
|
|
1136
1136
|
attributes: {},
|
|
@@ -1170,7 +1170,7 @@ var t$27 = e()({
|
|
|
1170
1170
|
});
|
|
1171
1171
|
//#endregion
|
|
1172
1172
|
//#region ../sdk-elements/dist/elements/internal/NotFound/declaration.mjs
|
|
1173
|
-
var t$
|
|
1173
|
+
var t$27 = e()({
|
|
1174
1174
|
type: "notFound",
|
|
1175
1175
|
content: {
|
|
1176
1176
|
attributes: {},
|
|
@@ -1210,7 +1210,7 @@ var t$26 = e()({
|
|
|
1210
1210
|
});
|
|
1211
1211
|
//#endregion
|
|
1212
1212
|
//#region ../sdk-elements/dist/elements/internal/Page/declaration.mjs
|
|
1213
|
-
var t$
|
|
1213
|
+
var t$26 = e()({
|
|
1214
1214
|
type: "page",
|
|
1215
1215
|
content: {
|
|
1216
1216
|
attributes: {
|
|
@@ -1273,7 +1273,7 @@ var t$25 = e()({
|
|
|
1273
1273
|
});
|
|
1274
1274
|
//#endregion
|
|
1275
1275
|
//#region ../sdk-elements/dist/elements/media/FontAwesome/declaration.mjs
|
|
1276
|
-
var t$
|
|
1276
|
+
var t$25 = e()({
|
|
1277
1277
|
type: "fontAwesome",
|
|
1278
1278
|
content: {
|
|
1279
1279
|
attributes: {
|
|
@@ -1320,7 +1320,7 @@ var t$24 = e()({
|
|
|
1320
1320
|
});
|
|
1321
1321
|
//#endregion
|
|
1322
1322
|
//#region ../sdk-elements/dist/elements/media/Image/declaration.mjs
|
|
1323
|
-
var t$
|
|
1323
|
+
var t$24 = e()({
|
|
1324
1324
|
type: "image",
|
|
1325
1325
|
content: {
|
|
1326
1326
|
attributes: {
|
|
@@ -1369,7 +1369,7 @@ var t$23 = e()({
|
|
|
1369
1369
|
});
|
|
1370
1370
|
//#endregion
|
|
1371
1371
|
//#region ../sdk-elements/dist/elements/media/Video/declaration.mjs
|
|
1372
|
-
var t$
|
|
1372
|
+
var t$23 = e()({
|
|
1373
1373
|
type: "video",
|
|
1374
1374
|
content: {
|
|
1375
1375
|
attributes: {
|
|
@@ -1476,9 +1476,9 @@ var F = {
|
|
|
1476
1476
|
settings: {}
|
|
1477
1477
|
}
|
|
1478
1478
|
}),
|
|
1479
|
-
BlockHtml: t$
|
|
1480
|
-
BlockJsx: t$
|
|
1481
|
-
Button: t$
|
|
1479
|
+
BlockHtml: t$46,
|
|
1480
|
+
BlockJsx: t$45,
|
|
1481
|
+
Button: t$41,
|
|
1482
1482
|
Container: e()({
|
|
1483
1483
|
type: "container",
|
|
1484
1484
|
content: {
|
|
@@ -1519,7 +1519,7 @@ var F = {
|
|
|
1519
1519
|
settings: {}
|
|
1520
1520
|
}
|
|
1521
1521
|
}),
|
|
1522
|
-
Custom: t$
|
|
1522
|
+
Custom: t$44,
|
|
1523
1523
|
DialogContainer: e()({
|
|
1524
1524
|
type: "dialogContainer",
|
|
1525
1525
|
sourceType: "dialogContainer",
|
|
@@ -1646,15 +1646,15 @@ var F = {
|
|
|
1646
1646
|
},
|
|
1647
1647
|
initialItems: ["container"]
|
|
1648
1648
|
}),
|
|
1649
|
-
Dropdown: t$
|
|
1650
|
-
DropdownPopup: t$
|
|
1651
|
-
FontAwesome: t$
|
|
1652
|
-
Form: t$
|
|
1653
|
-
FormControl: a$
|
|
1654
|
-
Heading: t$
|
|
1655
|
-
Image: t$
|
|
1656
|
-
LayoutContainer: t$
|
|
1657
|
-
Link: t$
|
|
1649
|
+
Dropdown: t$40,
|
|
1650
|
+
DropdownPopup: t$39,
|
|
1651
|
+
FontAwesome: t$25,
|
|
1652
|
+
Form: t$31,
|
|
1653
|
+
FormControl: a$7,
|
|
1654
|
+
Heading: t$38,
|
|
1655
|
+
Image: t$24,
|
|
1656
|
+
LayoutContainer: t$29,
|
|
1657
|
+
Link: t$37,
|
|
1658
1658
|
List: e()({
|
|
1659
1659
|
type: "list",
|
|
1660
1660
|
sourceType: "list",
|
|
@@ -1763,8 +1763,8 @@ var F = {
|
|
|
1763
1763
|
settings: {}
|
|
1764
1764
|
}
|
|
1765
1765
|
}),
|
|
1766
|
-
Loading: t$
|
|
1767
|
-
Markdown: t$
|
|
1766
|
+
Loading: t$28,
|
|
1767
|
+
Markdown: t$36,
|
|
1768
1768
|
ModalContainer: e()({
|
|
1769
1769
|
type: "modalContainer",
|
|
1770
1770
|
sourceType: "modalContainer",
|
|
@@ -1889,9 +1889,9 @@ var F = {
|
|
|
1889
1889
|
},
|
|
1890
1890
|
initialItems: ["container"]
|
|
1891
1891
|
}),
|
|
1892
|
-
NodeHtml: t$
|
|
1893
|
-
NotFound: t$
|
|
1894
|
-
Page: t$
|
|
1892
|
+
NodeHtml: t$43,
|
|
1893
|
+
NotFound: t$27,
|
|
1894
|
+
Page: t$26,
|
|
1895
1895
|
Pagination: e()({
|
|
1896
1896
|
type: "pagination",
|
|
1897
1897
|
content: {
|
|
@@ -1946,9 +1946,9 @@ var F = {
|
|
|
1946
1946
|
settings: {}
|
|
1947
1947
|
}
|
|
1948
1948
|
}),
|
|
1949
|
-
Paragraph: t$
|
|
1950
|
-
Reference: t$
|
|
1951
|
-
RichText: t$
|
|
1949
|
+
Paragraph: t$35,
|
|
1950
|
+
Reference: t$42,
|
|
1951
|
+
RichText: t$34,
|
|
1952
1952
|
TabContainer: e()({
|
|
1953
1953
|
type: "tabContainer",
|
|
1954
1954
|
content: {
|
|
@@ -2124,9 +2124,9 @@ var F = {
|
|
|
2124
2124
|
settings: {}
|
|
2125
2125
|
}
|
|
2126
2126
|
}),
|
|
2127
|
-
Text: t$
|
|
2128
|
-
ThemeToggle: t$
|
|
2129
|
-
Video: t$
|
|
2127
|
+
Text: t$33,
|
|
2128
|
+
ThemeToggle: t$32,
|
|
2129
|
+
Video: t$23
|
|
2130
2130
|
};
|
|
2131
2131
|
//#endregion
|
|
2132
2132
|
//#region src/elements/catalog.ts
|
|
@@ -2819,18 +2819,18 @@ var e$7 = {
|
|
|
2819
2819
|
//#endregion
|
|
2820
2820
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
|
|
2821
2821
|
var e$6 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
|
|
2822
|
-
var t$
|
|
2823
|
-
var n$
|
|
2824
|
-
var r$
|
|
2825
|
-
var i$
|
|
2826
|
-
var a$
|
|
2827
|
-
var o$
|
|
2828
|
-
var s$
|
|
2822
|
+
var t$11 = `(?:${e$6}|\\d+)`;
|
|
2823
|
+
var n$10 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$6}(?:\\.${t$11})*)\\s*\\]`;
|
|
2824
|
+
var r$9 = `${`${e$6}(?:${n$10})*(?:\\??\\.${t$11}(?:${n$10})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
|
|
2825
|
+
var i$8 = `\\{\\{\\s*${r$9}\\s*\\}\\}`;
|
|
2826
|
+
var a$6 = `(?:${`\\{\\{\\{\\s*${r$9}\\s*\\}\\}\\}`}|${i$8})`;
|
|
2827
|
+
var o$5 = new RegExp(a$6, "g");
|
|
2828
|
+
var s$4 = RegExp(`^${a$6}$`);
|
|
2829
2829
|
//#endregion
|
|
2830
2830
|
//#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
|
|
2831
|
-
var n$
|
|
2831
|
+
var n$9 = (n, r = !1) => {
|
|
2832
2832
|
if (typeof n != "string") return !1;
|
|
2833
|
-
let i = r ? s$
|
|
2833
|
+
let i = r ? s$4 : o$5;
|
|
2834
2834
|
return i.lastIndex = 0, i.test(n.trim());
|
|
2835
2835
|
};
|
|
2836
2836
|
//#endregion
|
|
@@ -2845,12 +2845,12 @@ var n$1 = (e, t, n) => {
|
|
|
2845
2845
|
for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
|
|
2846
2846
|
return r;
|
|
2847
2847
|
};
|
|
2848
|
-
var r$
|
|
2849
|
-
var i$
|
|
2850
|
-
var a$
|
|
2848
|
+
var r$8 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
|
|
2849
|
+
var i$7 = (t) => typeof t == "string" && n$9(t);
|
|
2850
|
+
var a$5 = (e, t) => {
|
|
2851
2851
|
switch (t.type) {
|
|
2852
2852
|
case "boolean": return typeof e == "boolean";
|
|
2853
|
-
case "number": return typeof e == "number" || typeof e == "string" && r$
|
|
2853
|
+
case "number": return typeof e == "number" || typeof e == "string" && r$8(e);
|
|
2854
2854
|
case "select": return typeof e == "string" && (!t.options || t.options.includes(e));
|
|
2855
2855
|
case "scalar": return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
2856
2856
|
case "text":
|
|
@@ -2862,7 +2862,7 @@ var o = (e, t, n) => {
|
|
|
2862
2862
|
let r = [];
|
|
2863
2863
|
for (let [o, s] of Object.entries(n)) {
|
|
2864
2864
|
let n = e[o];
|
|
2865
|
-
n === void 0 || i$
|
|
2865
|
+
n === void 0 || i$7(n) || s.when && !s.when(t) || a$5(n, s) || r.push({
|
|
2866
2866
|
key: o,
|
|
2867
2867
|
expected: s.type,
|
|
2868
2868
|
got: n === null ? "null" : typeof n,
|
|
@@ -3190,40 +3190,40 @@ var applyUtility = (action, params) => {
|
|
|
3190
3190
|
//#endregion
|
|
3191
3191
|
//#region ../sdk-schema/dist/helpers/elementId.mjs
|
|
3192
3192
|
var e$5 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
|
|
3193
|
-
var t$
|
|
3194
|
-
var r$
|
|
3195
|
-
var i$
|
|
3196
|
-
var a$
|
|
3193
|
+
var t$10 = (t) => e$5.test(t);
|
|
3194
|
+
var r$7 = (e) => new Set(Object.keys(e));
|
|
3195
|
+
var i$6 = (e, n, r) => t$10(n) ? e[n] && n !== r ? `"${n}" is already used by another element here` : null : `"${n}" is not a valid name: start with a letter, then letters, numbers, hyphens and underscores`;
|
|
3196
|
+
var a$4 = (e, t) => {
|
|
3197
3197
|
let n = /* @__PURE__ */ new Set();
|
|
3198
3198
|
for (let r of t) {
|
|
3199
|
-
if (n.has(r.id) || i$
|
|
3199
|
+
if (n.has(r.id) || i$6(e, r.id)) return !1;
|
|
3200
3200
|
n.add(r.id);
|
|
3201
3201
|
}
|
|
3202
3202
|
return !0;
|
|
3203
3203
|
};
|
|
3204
|
-
var o$
|
|
3205
|
-
var s$
|
|
3206
|
-
var c$
|
|
3207
|
-
let n = o$
|
|
3204
|
+
var o$4 = (e) => e.replace(/[^A-Za-z0-9]/g, "") || "element";
|
|
3205
|
+
var s$3 = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
3206
|
+
var c$2 = (e, t) => {
|
|
3207
|
+
let n = o$4(e);
|
|
3208
3208
|
for (let e = 0; e < 100; e += 1) {
|
|
3209
3209
|
let e = "";
|
|
3210
|
-
for (let t = 0; t < 4; t += 1) e += s$
|
|
3210
|
+
for (let t = 0; t < 4; t += 1) e += s$3[Math.floor(Math.random() * s$3.length)];
|
|
3211
3211
|
if (!t(`${n}-${e}`)) return `${n}-${e}`;
|
|
3212
3212
|
}
|
|
3213
|
-
return l(e, t);
|
|
3213
|
+
return l$1(e, t);
|
|
3214
3214
|
};
|
|
3215
|
-
var l = (e, t) => {
|
|
3216
|
-
let n = o$
|
|
3215
|
+
var l$1 = (e, t) => {
|
|
3216
|
+
let n = o$4(e), r = 1;
|
|
3217
3217
|
for (; t(`${n}-${r}`);) r += 1;
|
|
3218
3218
|
return `${n}-${r}`;
|
|
3219
3219
|
};
|
|
3220
|
-
var u = (e, t) => {
|
|
3220
|
+
var u$1 = (e, t) => {
|
|
3221
3221
|
if (!t(e)) return e;
|
|
3222
3222
|
let n = /^(.*[A-Za-z0-9])-(\d+)$/.exec(e), r = n ? n[1] : e, i = n ? Number(n[2]) + 1 : 2;
|
|
3223
3223
|
for (; t(`${r}-${i}`);) i += 1;
|
|
3224
3224
|
return `${r}-${i}`;
|
|
3225
3225
|
};
|
|
3226
|
-
var d = {
|
|
3226
|
+
var d$1 = {
|
|
3227
3227
|
page: [{ attribute: "layout" }, { attribute: "layoutContainer" }],
|
|
3228
3228
|
reference: [{
|
|
3229
3229
|
attribute: "referenceId",
|
|
@@ -3234,18 +3234,18 @@ var d = {
|
|
|
3234
3234
|
when: (e) => e.mode === "page"
|
|
3235
3235
|
}]
|
|
3236
3236
|
};
|
|
3237
|
-
var f = { navigate: [{
|
|
3237
|
+
var f$1 = { navigate: [{
|
|
3238
3238
|
param: "url",
|
|
3239
3239
|
when: (e) => e.urlType === "page"
|
|
3240
3240
|
}] };
|
|
3241
|
-
var p$
|
|
3241
|
+
var p$2 = (e, t) => {
|
|
3242
3242
|
let n = e.indexOf("."), r = n === -1 ? e : e.slice(0, n), i = r.indexOf("_");
|
|
3243
3243
|
if (i === -1) return e;
|
|
3244
3244
|
let a = t[r.slice(i + 1)];
|
|
3245
3245
|
return a ? `${r.slice(0, i + 1)}${a}${n === -1 ? "" : e.slice(n)}` : e;
|
|
3246
3246
|
};
|
|
3247
|
-
var m = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
|
|
3248
|
-
var h = (e, t) => e.replace(m, (e, n, r) => {
|
|
3247
|
+
var m$1 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
|
|
3248
|
+
var h$1 = (e, t) => e.replace(m$1, (e, n, r) => {
|
|
3249
3249
|
let i = t[r];
|
|
3250
3250
|
return i ? `${n}_${i}` : e;
|
|
3251
3251
|
});
|
|
@@ -3253,7 +3253,7 @@ var g = (e, t) => {
|
|
|
3253
3253
|
let n = !1;
|
|
3254
3254
|
if (Array.isArray(e)) return e.forEach((r, i) => {
|
|
3255
3255
|
if (typeof r == "string") {
|
|
3256
|
-
let a = h(r, t);
|
|
3256
|
+
let a = h$1(r, t);
|
|
3257
3257
|
a !== r && (e[i] = a, n = !0);
|
|
3258
3258
|
return;
|
|
3259
3259
|
}
|
|
@@ -3263,7 +3263,7 @@ var g = (e, t) => {
|
|
|
3263
3263
|
let r = e;
|
|
3264
3264
|
for (let [e, i] of Object.entries(r)) {
|
|
3265
3265
|
if (typeof i == "string") {
|
|
3266
|
-
let a = h(i, t);
|
|
3266
|
+
let a = h$1(i, t);
|
|
3267
3267
|
a !== i && (r[e] = a, n = !0);
|
|
3268
3268
|
continue;
|
|
3269
3269
|
}
|
|
@@ -3280,17 +3280,17 @@ var _ = (e, t, n) => {
|
|
|
3280
3280
|
t[n.id] && (n.id = t[n.id], e = !0);
|
|
3281
3281
|
let { definition: r, attributes: o } = n;
|
|
3282
3282
|
t[r.rootId] && (r.rootId = t[r.rootId], e = !0), r.parentId && t[r.parentId] && (r.parentId = t[r.parentId], e = !0), r.items?.some((e) => t[e]) && (r.items = r.items.map(i), e = !0);
|
|
3283
|
-
for (let { attribute: n, when: i } of d[r.type] ?? []) {
|
|
3283
|
+
for (let { attribute: n, when: i } of d$1[r.type] ?? []) {
|
|
3284
3284
|
let r = o[n];
|
|
3285
3285
|
typeof r == "string" && t[r] && (!i || i(o)) && (o[n] = t[r], e = !0);
|
|
3286
3286
|
}
|
|
3287
3287
|
for (let n of Object.values(r.bindings ?? {})) for (let r of n) {
|
|
3288
|
-
let n = p$
|
|
3288
|
+
let n = p$2(r.source, t);
|
|
3289
3289
|
n !== r.source && (r.source = n, e = !0), r.transformers && g(r.transformers, t) && (e = !0), r.when && g(r.when, t) && (e = !0);
|
|
3290
3290
|
}
|
|
3291
3291
|
for (let n of Object.values(r.interactions ?? {})) {
|
|
3292
3292
|
n.elementId && t[n.elementId] && (n.elementId = t[n.elementId], e = !0);
|
|
3293
|
-
for (let { param: r, when: i } of f[n.action] ?? []) {
|
|
3293
|
+
for (let { param: r, when: i } of f$1[n.action] ?? []) {
|
|
3294
3294
|
let a = n.params[r];
|
|
3295
3295
|
typeof a == "string" && t[a] && (!i || i(n.params)) && (n.params[r] = t[a], e = !0);
|
|
3296
3296
|
}
|
|
@@ -3325,7 +3325,7 @@ var hostFor = (step, host) => step.type === "trigger" || step.type === "callback
|
|
|
3325
3325
|
var assertStepIds = (ids, where) => {
|
|
3326
3326
|
const seen = /* @__PURE__ */ new Set();
|
|
3327
3327
|
for (const id of ids) {
|
|
3328
|
-
if (!t$
|
|
3328
|
+
if (!t$10(id)) throw new Error(`Step "${id}" in ${where} is not a valid name: start with a letter, then letters, numbers, hyphens and underscores. A later step reads this one as {{ ${id}.field }}.`);
|
|
3329
3329
|
if (seen.has(id)) throw new Error(`${where} names the step "${id}" twice. A flow's steps are keyed by id, so the second wins.`);
|
|
3330
3330
|
seen.add(id);
|
|
3331
3331
|
}
|
|
@@ -3757,7 +3757,7 @@ var digest = (value, length) => {
|
|
|
3757
3757
|
var slugify = (value, fallback) => value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || fallback;
|
|
3758
3758
|
//#endregion
|
|
3759
3759
|
//#region ../sdk-schema/dist/helpers/schemaValidator.mjs
|
|
3760
|
-
var t$
|
|
3760
|
+
var t$9 = (t) => {
|
|
3761
3761
|
let n = [], r = [], { flat: i, pages: a, pageFolders: o, variables: s } = t, c = (e) => !!i[e], l = (e) => i[e], u = () => Object.values(i).filter((e) => e?.definition?.type === "layoutContainer" && !e.definition.parentId).map((e) => e.id), d = () => [...a, ...u()], f = () => !i || typeof i != "object" ? (n.push({
|
|
3762
3762
|
code: "INVALID_FLAT",
|
|
3763
3763
|
message: "Schema.flat must be a valid Record<string, Element>"
|
|
@@ -4013,7 +4013,7 @@ var t$8 = (t) => {
|
|
|
4013
4013
|
});
|
|
4014
4014
|
}, x = () => {
|
|
4015
4015
|
Object.values(i).forEach((t) => {
|
|
4016
|
-
t && (t$
|
|
4016
|
+
t && (t$10(t.id) || n.push({
|
|
4017
4017
|
code: "INVALID_ELEMENT_ID",
|
|
4018
4018
|
message: `Element "${t.id}" has a name that must start with a letter, then letters, numbers, hyphens and underscores (no hyphen or underscore at the start, and no hyphen at the end)`,
|
|
4019
4019
|
elementId: t.id
|
|
@@ -4065,7 +4065,7 @@ var t$8 = (t) => {
|
|
|
4065
4065
|
if (!i) return;
|
|
4066
4066
|
let a = Object.keys(i);
|
|
4067
4067
|
Object.entries(i).forEach(([i, o]) => {
|
|
4068
|
-
t$
|
|
4068
|
+
t$10(i) || n.push({
|
|
4069
4069
|
code: "INVALID_INTERACTION_ID",
|
|
4070
4070
|
message: `Interaction "${i}" on element "${r.id}" has a name that must start with a letter, then letters, numbers, hyphens and underscores — a later step reads it as {{ ${i}.field }}`,
|
|
4071
4071
|
elementId: r.id
|
|
@@ -4128,7 +4128,7 @@ var t$8 = (t) => {
|
|
|
4128
4128
|
};
|
|
4129
4129
|
} };
|
|
4130
4130
|
};
|
|
4131
|
-
var n$
|
|
4131
|
+
var n$8 = (e, n) => t$9(e).validate(n);
|
|
4132
4132
|
//#endregion
|
|
4133
4133
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/shared.js
|
|
4134
4134
|
function e$4(e) {
|
|
@@ -4138,7 +4138,7 @@ function e$4(e) {
|
|
|
4138
4138
|
}
|
|
4139
4139
|
return null;
|
|
4140
4140
|
}
|
|
4141
|
-
function t$
|
|
4141
|
+
function t$8(t, n) {
|
|
4142
4142
|
if (!t || t.startsWith(".") || t.endsWith(".") || /[^a-zA-Z0-9_.[\]-]/.test(t) || n && (/\.\.|(\[\])/g.test(t) || (t.match(/\[/g) || []).length !== (t.match(/\]/g) || []).length || /\][^.[]/.test(t))) return [];
|
|
4143
4143
|
let r = [], i = /([^.[\]]+)|\[(\d+)\]/g, a;
|
|
4144
4144
|
for (; a = i.exec(t);) if (a[1]) {
|
|
@@ -4153,7 +4153,7 @@ function t$7(t, n) {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
return r.length ? r : [];
|
|
4155
4155
|
}
|
|
4156
|
-
function n$
|
|
4156
|
+
function n$7(t, n) {
|
|
4157
4157
|
if (!Array.isArray(t)) return [];
|
|
4158
4158
|
let r = [];
|
|
4159
4159
|
for (let i of t) {
|
|
@@ -4163,14 +4163,14 @@ function n$6(t, n) {
|
|
|
4163
4163
|
}
|
|
4164
4164
|
return r;
|
|
4165
4165
|
}
|
|
4166
|
-
function r$
|
|
4167
|
-
return e ? typeof e == "string" ? t$
|
|
4166
|
+
function r$6(e, r = !0) {
|
|
4167
|
+
return e ? typeof e == "string" ? t$8(e, r) : Array.isArray(e) ? n$7(e, r) : [] : [];
|
|
4168
4168
|
}
|
|
4169
4169
|
//#endregion
|
|
4170
4170
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/get.js
|
|
4171
|
-
function t$
|
|
4171
|
+
function t$7(t, n, r) {
|
|
4172
4172
|
if (t == null || !n) return r;
|
|
4173
|
-
let i = r$
|
|
4173
|
+
let i = r$6(n);
|
|
4174
4174
|
if (!i.length) return r;
|
|
4175
4175
|
let a = t;
|
|
4176
4176
|
for (let e of i) {
|
|
@@ -4184,8 +4184,8 @@ function t$6(t, n, r) {
|
|
|
4184
4184
|
}
|
|
4185
4185
|
//#endregion
|
|
4186
4186
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/set.js
|
|
4187
|
-
function t$
|
|
4188
|
-
let i = r$
|
|
4187
|
+
function t$6(t, n, r) {
|
|
4188
|
+
let i = r$6(n);
|
|
4189
4189
|
if (!i.length) return t;
|
|
4190
4190
|
let a = t;
|
|
4191
4191
|
for (let e = 0; e < i.length - 1; e++) {
|
|
@@ -4203,11 +4203,11 @@ function t$5(t, n, r) {
|
|
|
4203
4203
|
}
|
|
4204
4204
|
//#endregion
|
|
4205
4205
|
//#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/pick.js
|
|
4206
|
-
function n$
|
|
4206
|
+
function n$6(n, r) {
|
|
4207
4207
|
let i = {}, a = Array.isArray(r) ? r : [r];
|
|
4208
4208
|
for (let r of a) {
|
|
4209
|
-
let a = t$
|
|
4210
|
-
a !== void 0 && t$
|
|
4209
|
+
let a = t$7(n, r);
|
|
4210
|
+
a !== void 0 && t$6(i, r, a);
|
|
4211
4211
|
}
|
|
4212
4212
|
return i;
|
|
4213
4213
|
}
|
|
@@ -4228,7 +4228,7 @@ var e$3 = {
|
|
|
4228
4228
|
fonts: [],
|
|
4229
4229
|
cache: ""
|
|
4230
4230
|
};
|
|
4231
|
-
var t$
|
|
4231
|
+
var t$5 = {
|
|
4232
4232
|
DISPLAY: "display",
|
|
4233
4233
|
FLEX_WRAP: "flex-wrap",
|
|
4234
4234
|
FLEX_DIRECTION: "flex-direction",
|
|
@@ -4395,37 +4395,37 @@ var t$4 = {
|
|
|
4395
4395
|
STROKE: "stroke",
|
|
4396
4396
|
STROKE_WIDTH: "stroke-width"
|
|
4397
4397
|
};
|
|
4398
|
-
var n$
|
|
4399
|
-
t$
|
|
4400
|
-
t$
|
|
4401
|
-
t$
|
|
4402
|
-
t$
|
|
4403
|
-
t$
|
|
4404
|
-
t$
|
|
4405
|
-
t$
|
|
4406
|
-
t$
|
|
4407
|
-
t$
|
|
4408
|
-
t$
|
|
4409
|
-
t$
|
|
4410
|
-
t$
|
|
4411
|
-
t$
|
|
4412
|
-
t$
|
|
4413
|
-
t$
|
|
4414
|
-
t$
|
|
4415
|
-
t$
|
|
4416
|
-
t$
|
|
4417
|
-
t$
|
|
4418
|
-
t$
|
|
4398
|
+
var n$5 = [
|
|
4399
|
+
t$5.FONT_FAMILY,
|
|
4400
|
+
t$5.FONT_SIZE,
|
|
4401
|
+
t$5.FONT_STYLE,
|
|
4402
|
+
t$5.FONT_VARIANT,
|
|
4403
|
+
t$5.FONT_WEIGHT,
|
|
4404
|
+
t$5.COLOR,
|
|
4405
|
+
t$5.LINE_HEIGHT,
|
|
4406
|
+
t$5.LETTER_SPACING,
|
|
4407
|
+
t$5.TEXT_ALIGN,
|
|
4408
|
+
t$5.TEXT_DECORATION,
|
|
4409
|
+
t$5.TEXT_INDENT,
|
|
4410
|
+
t$5.TEXT_SHADOW,
|
|
4411
|
+
t$5.TEXT_TRANSFORM,
|
|
4412
|
+
t$5.TEXT_WRAP,
|
|
4413
|
+
t$5.TEXT_OVERFLOW,
|
|
4414
|
+
t$5.WHITE_SPACE,
|
|
4415
|
+
t$5.DIRECTION,
|
|
4416
|
+
t$5.CURSOR,
|
|
4417
|
+
t$5.LIST_STYLE,
|
|
4418
|
+
t$5.LIST_STYLE_TYPE
|
|
4419
4419
|
];
|
|
4420
|
-
Object.values(t$
|
|
4420
|
+
Object.values(t$5).map((e) => ({
|
|
4421
4421
|
path: e,
|
|
4422
4422
|
label: e
|
|
4423
4423
|
}));
|
|
4424
|
-
t$
|
|
4424
|
+
t$5.DISPLAY, t$5.FLEX_WRAP, t$5.FLEX_DIRECTION, t$5.ALIGN_ITEMS, t$5.JUSTIFY_ITEMS, t$5.JUSTIFY_CONTENT, t$5.ALIGN_CONTENT, t$5.ROW_GAP, t$5.COLUMN_GAP, t$5.GRID_ROW_GAP, t$5.GRID_COLUMN_GAP, t$5.GRID_TEMPLATE_AREAS, t$5.GRID_TEMPLATE_COLUMNS, t$5.GRID_TEMPLATE_ROWS, t$5.GRID_AUTO_FLOW, t$5.GRID_AUTO_ROWS, t$5.GRID_AUTO_COLUMNS, t$5.GRID_ROW_START, t$5.GRID_COLUMN_START, t$5.GRID_ROW_END, t$5.GRID_COLUMN_END, t$5.ALIGN_SELF, t$5.JUSTIFY_SELF, t$5.ORDER, t$5.FLEX_GROW, t$5.FLEX_SHRINK, t$5.FLEX_BASIS, t$5.LIST_STYLE, t$5.LIST_STYLE_TYPE, t$5.LIST_STYLE_POSITION, t$5.LIST_STYLE_IMAGE, t$5.BACKGROUND_COLOR, t$5.BACKGROUND_IMAGE, t$5.BACKGROUND_POSITION, t$5.BACKGROUND_SIZE, t$5.BACKGROUND_CLIP, t$5.BACKGROUND_ORIGIN, t$5.BACKGROUND_REPEAT, t$5.BACKGROUND_ATTACHMENT, t$5.BACKGROUND_BLEND_MODE, t$5.MASK_IMAGE, t$5.BORDER_TOP_STYLE, t$5.BORDER_TOP_WIDTH, t$5.BORDER_TOP_COLOR, t$5.BORDER_BOTTOM_STYLE, t$5.BORDER_BOTTOM_WIDTH, t$5.BORDER_BOTTOM_COLOR, t$5.BORDER_LEFT_STYLE, t$5.BORDER_LEFT_WIDTH, t$5.BORDER_LEFT_COLOR, t$5.BORDER_RIGHT_STYLE, t$5.BORDER_RIGHT_WIDTH, t$5.BORDER_RIGHT_COLOR, t$5.BORDER_TOP_LEFT_RADIUS, t$5.BORDER_TOP_RIGHT_RADIUS, t$5.BORDER_BOTTOM_LEFT_RADIUS, t$5.BORDER_BOTTOM_RIGHT_RADIUS, t$5.BORDER_COLLAPSE, t$5.BORDER_SPACING, t$5.TABLE_LAYOUT, t$5.OPACITY, t$5.VISIBILITY, t$5.CURSOR, t$5.TRANSITION, t$5.TRANSITION_PROPERTY, t$5.TRANSITION_DURATION, t$5.TRANSITION_TIMING_FUNCTION, t$5.TRANSITION_DELAY, t$5.ANIMATION, t$5.ANIMATION_NAME, t$5.ANIMATION_DURATION, t$5.ANIMATION_TIMING_FUNCTION, t$5.ANIMATION_DELAY, t$5.ANIMATION_ITERATION_COUNT, t$5.ANIMATION_DIRECTION, t$5.ANIMATION_FILL_MODE, t$5.ANIMATION_PLAY_STATE, t$5.BOX_SHADOW, t$5.FILTER, t$5.BACKDROP_FILTER, t$5.MIX_BLEND_MODE, t$5.ISOLATION, t$5.CLIP_PATH, t$5.TRANSFORM, t$5.TRANSFORM_ORIGIN, t$5.PERSPECTIVE, t$5.WILL_CHANGE, t$5.OUTLINE_WIDTH, t$5.OUTLINE_STYLE, t$5.OUTLINE_COLOR, t$5.OUTLINE_OFFSET, t$5.POINTER_EVENTS, t$5.USER_SELECT, t$5.TOUCH_ACTION, t$5.RESIZE, t$5.APPEARANCE, t$5.SCROLL_BEHAVIOR, t$5.OVERSCROLL_BEHAVIOR, t$5.ACCENT_COLOR, t$5.CARET_COLOR, t$5.COLOR_SCHEME, t$5.POSITION, t$5.FLOAT, t$5.CLEAR, t$5.Z_INDEX, t$5.TOP, t$5.BOTTOM, t$5.LEFT, t$5.RIGHT, t$5.BOX_SIZING, t$5.ASPECT_RATIO, t$5.WIDTH, t$5.HEIGHT, t$5.MIN_WIDTH, t$5.MIN_HEIGHT, t$5.MAX_WIDTH, t$5.MAX_HEIGHT, t$5.OVERFLOW, t$5.OVERFLOW_X, t$5.OVERFLOW_Y, t$5.OBJECT_FIT, t$5.OBJECT_POSITION, t$5.COLUMN_WIDTH, t$5.COLUMN_COUNT, t$5.MARGIN_TOP, t$5.MARGIN_BOTTOM, t$5.MARGIN_LEFT, t$5.MARGIN_RIGHT, t$5.PADDING_TOP, t$5.PADDING_BOTTOM, t$5.PADDING_LEFT, t$5.PADDING_RIGHT, t$5.FONT_FAMILY, t$5.FONT_WEIGHT, t$5.FONT_SIZE, t$5.LINE_HEIGHT, t$5.COLOR, t$5.TEXT_ALIGN, t$5.FONT_STYLE, t$5.FONT_VARIANT, t$5.TEXT_DECORATION, t$5.TEXT_DECORATION_LINE, t$5.TEXT_DECORATION_COLOR, t$5.TEXT_DECORATION_STYLE, t$5.TEXT_DECORATION_THICKNESS, t$5.TEXT_UNDERLINE_OFFSET, t$5.LETTER_SPACING, t$5.WORD_SPACING, t$5.TEXT_INDENT, t$5.TEXT_TRANSFORM, t$5.DIRECTION, t$5.WHITE_SPACE, t$5.TEXT_WRAP, t$5.WORD_BREAK, t$5.OVERFLOW_WRAP, t$5.HYPHENS, t$5.VERTICAL_ALIGN, t$5.TEXT_OVERFLOW, t$5.TEXT_SHADOW, t$5.LINE_CLAMP, t$5.WEBKIT_LINE_CLAMP, t$5.WEBKIT_BOX_ORIENT, t$5.FILL, t$5.STROKE, t$5.STROKE_WIDTH;
|
|
4425
4425
|
//#endregion
|
|
4426
4426
|
//#region ../sdk-shared/dist/schema/schemaConstants.mjs
|
|
4427
|
-
var t$
|
|
4428
|
-
var n$
|
|
4427
|
+
var t$4 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
|
|
4428
|
+
var n$4 = {
|
|
4429
4429
|
schema: {
|
|
4430
4430
|
definition: {
|
|
4431
4431
|
name: "",
|
|
@@ -4441,6 +4441,135 @@ var n$3 = {
|
|
|
4441
4441
|
definition: { rootId: "" }
|
|
4442
4442
|
};
|
|
4443
4443
|
//#endregion
|
|
4444
|
+
//#region ../sdk-shared/dist/style/fonts.mjs
|
|
4445
|
+
var i$4 = (e) => {
|
|
4446
|
+
try {
|
|
4447
|
+
let t = new URL(e);
|
|
4448
|
+
return t.protocol === "https:" && !t.username && !t.password;
|
|
4449
|
+
} catch {
|
|
4450
|
+
return !1;
|
|
4451
|
+
}
|
|
4452
|
+
};
|
|
4453
|
+
//#endregion
|
|
4454
|
+
//#region ../sdk-shared/dist/style/fontValidation.mjs
|
|
4455
|
+
var t$3 = /* @__PURE__ */ new Set([
|
|
4456
|
+
"system",
|
|
4457
|
+
"google",
|
|
4458
|
+
"remote",
|
|
4459
|
+
"hosted"
|
|
4460
|
+
]);
|
|
4461
|
+
var n$3 = /* @__PURE__ */ new Set([
|
|
4462
|
+
"auto",
|
|
4463
|
+
"block",
|
|
4464
|
+
"swap",
|
|
4465
|
+
"fallback",
|
|
4466
|
+
"optional"
|
|
4467
|
+
]);
|
|
4468
|
+
var r$4 = /* @__PURE__ */ new Set(["woff2", "woff"]);
|
|
4469
|
+
var i$3 = 100;
|
|
4470
|
+
var a$3 = (e) => {
|
|
4471
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
4472
|
+
let n = e.charCodeAt(t);
|
|
4473
|
+
if (n < 32 || n === 127) return !0;
|
|
4474
|
+
}
|
|
4475
|
+
return !1;
|
|
4476
|
+
};
|
|
4477
|
+
var o$3 = class extends Error {};
|
|
4478
|
+
var s$2 = (e) => {
|
|
4479
|
+
throw new o$3(e);
|
|
4480
|
+
};
|
|
4481
|
+
var c$1 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
4482
|
+
var l = (e) => {
|
|
4483
|
+
if (typeof e != "string") return s$2("font.family must be a string");
|
|
4484
|
+
let t = e.trim();
|
|
4485
|
+
return t ? t.length > i$3 ? s$2(`font.family cannot be longer than ${i$3} characters`) : a$3(t) ? s$2("font.family cannot contain control characters") : t : s$2("font.family cannot be empty");
|
|
4486
|
+
};
|
|
4487
|
+
var u = (e) => {
|
|
4488
|
+
if (e === void 0) return [400];
|
|
4489
|
+
if (!Array.isArray(e) || e.length === 0) return s$2("font.weights must be a non-empty list of numbers");
|
|
4490
|
+
let t = e.map((e) => typeof e != "number" || !Number.isInteger(e) || e < 1 || e > 1e3 ? s$2("font.weights must hold whole numbers between 1 and 1000") : e);
|
|
4491
|
+
return [...new Set(t)].sort((e, t) => e - t);
|
|
4492
|
+
};
|
|
4493
|
+
var d = (e) => {
|
|
4494
|
+
if (e === void 0) return ["normal"];
|
|
4495
|
+
if (!Array.isArray(e) || e.length === 0) return s$2("font.styles must be a non-empty list");
|
|
4496
|
+
let t = e.map((e) => e !== "normal" && e !== "italic" ? s$2("font.styles may only hold \"normal\" or \"italic\"") : e);
|
|
4497
|
+
return [...new Set(t)];
|
|
4498
|
+
};
|
|
4499
|
+
var f = (e, t) => {
|
|
4500
|
+
if (!c$1(e)) return s$2(`font.files[${t}] must be an object`);
|
|
4501
|
+
let { weight: n, style: i, format: a, unicodeRange: o } = e;
|
|
4502
|
+
if (typeof n != "number" || !Number.isInteger(n) || n < 1 || n > 1e3) return s$2(`font.files[${t}].weight must be a whole number between 1 and 1000`);
|
|
4503
|
+
if (i !== "normal" && i !== "italic") return s$2(`font.files[${t}].style must be "normal" or "italic"`);
|
|
4504
|
+
if (typeof a != "string" || !r$4.has(a)) return s$2(`font.files[${t}].format must be "woff2" or "woff"`);
|
|
4505
|
+
let l = {
|
|
4506
|
+
weight: n,
|
|
4507
|
+
style: i,
|
|
4508
|
+
format: a
|
|
4509
|
+
};
|
|
4510
|
+
if (o !== void 0) {
|
|
4511
|
+
if (typeof o != "string") return s$2(`font.files[${t}].unicodeRange must be a string`);
|
|
4512
|
+
l.unicodeRange = o;
|
|
4513
|
+
}
|
|
4514
|
+
return l;
|
|
4515
|
+
};
|
|
4516
|
+
var p$1 = (e, t) => typeof e != "string" || !e ? s$2(`font.files[${t}].path must be a non-empty string`) : e.includes("://") || e.startsWith("/") ? s$2(`font.files[${t}].path must be relative to the font store, not a URL`) : e.split("/").includes("..") ? s$2(`font.files[${t}].path cannot climb out of the font store`) : e;
|
|
4517
|
+
var m = (e) => !Array.isArray(e) || e.length === 0 ? s$2("font.files must be a non-empty list") : e;
|
|
4518
|
+
var h = (r) => {
|
|
4519
|
+
if (!c$1(r)) return s$2("a font must be an object");
|
|
4520
|
+
let { source: i, fallback: a, display: o, preload: h } = r;
|
|
4521
|
+
if (typeof i != "string" || !t$3.has(i)) return s$2("font.source must be one of: system, google, remote, hosted");
|
|
4522
|
+
if (typeof a != "string" || !a.trim()) return s$2("font.fallback is required: it is what renders until the face arrives");
|
|
4523
|
+
if (o !== void 0 && (typeof o != "string" || !n$3.has(o))) return s$2("font.display must be one of: auto, block, swap, fallback, optional");
|
|
4524
|
+
if (h !== void 0 && typeof h != "boolean") return s$2("font.preload must be a boolean");
|
|
4525
|
+
let g = {
|
|
4526
|
+
family: l(r.family),
|
|
4527
|
+
fallback: a.trim(),
|
|
4528
|
+
weights: u(r.weights),
|
|
4529
|
+
styles: d(r.styles),
|
|
4530
|
+
...o === void 0 ? {} : { display: o },
|
|
4531
|
+
...h === void 0 ? {} : { preload: h }
|
|
4532
|
+
};
|
|
4533
|
+
if (i === "system") return {
|
|
4534
|
+
...g,
|
|
4535
|
+
source: "system"
|
|
4536
|
+
};
|
|
4537
|
+
if (i === "google") {
|
|
4538
|
+
let { subsets: e } = r;
|
|
4539
|
+
return e !== void 0 && (!Array.isArray(e) || e.some((e) => typeof e != "string")) ? s$2("font.subsets must be a list of strings") : {
|
|
4540
|
+
...g,
|
|
4541
|
+
source: "google",
|
|
4542
|
+
...e === void 0 ? {} : { subsets: e }
|
|
4543
|
+
};
|
|
4544
|
+
}
|
|
4545
|
+
if (i === "remote") {
|
|
4546
|
+
let { stylesheet: t, files: n } = r;
|
|
4547
|
+
return t === void 0 && n === void 0 ? s$2("a remote font needs either a stylesheet URL or the font files themselves") : t === void 0 ? {
|
|
4548
|
+
...g,
|
|
4549
|
+
source: "remote",
|
|
4550
|
+
files: m(n).map((t, n) => {
|
|
4551
|
+
let r = f(t, n), { url: i } = t;
|
|
4552
|
+
return typeof i != "string" || !i$4(i) ? s$2(`font.files[${n}].url must be an https URL with no credentials in it`) : {
|
|
4553
|
+
...r,
|
|
4554
|
+
url: i
|
|
4555
|
+
};
|
|
4556
|
+
})
|
|
4557
|
+
} : typeof t != "string" || !i$4(t) ? s$2("font.stylesheet must be an https URL with no credentials in it") : {
|
|
4558
|
+
...g,
|
|
4559
|
+
source: "remote",
|
|
4560
|
+
stylesheet: t
|
|
4561
|
+
};
|
|
4562
|
+
}
|
|
4563
|
+
return {
|
|
4564
|
+
...g,
|
|
4565
|
+
source: "hosted",
|
|
4566
|
+
files: m(r.files).map((e, t) => ({
|
|
4567
|
+
...f(e, t),
|
|
4568
|
+
path: p$1(e.path, t)
|
|
4569
|
+
}))
|
|
4570
|
+
};
|
|
4571
|
+
};
|
|
4572
|
+
//#endregion
|
|
4444
4573
|
//#region ../sdk-style/dist/helpers/calculateInheriting.mjs
|
|
4445
4574
|
var r$3 = (e, t) => {
|
|
4446
4575
|
let n = [], r = t;
|
|
@@ -4472,10 +4601,10 @@ var i$2 = (e, t, n, r, i) => {
|
|
|
4472
4601
|
return a;
|
|
4473
4602
|
};
|
|
4474
4603
|
var a$2 = (t, n, r, i) => {
|
|
4475
|
-
let a = t$
|
|
4604
|
+
let a = t$7(i, `${t}.defaultStyle`, void 0);
|
|
4476
4605
|
if (a) return a.subTypes && !n && (n = Object.keys(a.subTypes)[0]), n && a.subTypes?.[n] && (a = a.subTypes[n]), {
|
|
4477
4606
|
name: "defaultStyle",
|
|
4478
|
-
attributes: { [r]: t$
|
|
4607
|
+
attributes: { [r]: t$7(a, `style.${r}`, {}) },
|
|
4479
4608
|
componentType: t,
|
|
4480
4609
|
isParent: !1,
|
|
4481
4610
|
isAncestor: !1,
|
|
@@ -4564,7 +4693,7 @@ var c = (e, o, c, l, u = {}, d = {}) => {
|
|
|
4564
4693
|
let S = {};
|
|
4565
4694
|
for (let e of y.tree) {
|
|
4566
4695
|
let r = s$1(e, p, m, h);
|
|
4567
|
-
if (r && Object.keys(r).length && ((e.isAncestor || e.isDefault && e.componentType !== o) && (r = n$
|
|
4696
|
+
if (r && Object.keys(r).length && ((e.isAncestor || e.isDefault && e.componentType !== o) && (r = n$6(r, n$5)), Object.keys(r).length)) for (let t of Object.keys(r)) S[t] || (S[t] = []), S[t].push({
|
|
4568
4697
|
key: e.name,
|
|
4569
4698
|
value: r[t],
|
|
4570
4699
|
displayMode: e.displayMode
|
|
@@ -4590,7 +4719,7 @@ var p = class {
|
|
|
4590
4719
|
constructor(e = {}) {
|
|
4591
4720
|
let { flat: t, variables: r, pages: i, mintId: a } = e;
|
|
4592
4721
|
if (!t) throw Error("Flat is required");
|
|
4593
|
-
this.flat = t, this.variables = r ?? [], this.pages = i ?? [], this.mintId = a ?? c$
|
|
4722
|
+
this.flat = t, this.variables = r ?? [], this.pages = i ?? [], this.mintId = a ?? c$2;
|
|
4594
4723
|
}
|
|
4595
4724
|
nextId = (e, t = () => !1) => {
|
|
4596
4725
|
let n = this.takenIds();
|
|
@@ -4609,26 +4738,26 @@ var p = class {
|
|
|
4609
4738
|
} else o = this.flat[n];
|
|
4610
4739
|
if (!o) return !1;
|
|
4611
4740
|
}
|
|
4612
|
-
if (r !== "custom" && !Array.isArray(t$
|
|
4613
|
-
switch (t$
|
|
4741
|
+
if (r !== "custom" && !Array.isArray(t$7(o, "definition.items")) || !this.isValidElement(a) || !a$4(this.flat, [a, ...Object.values(i)])) return !1;
|
|
4742
|
+
switch (t$6(this.flat, a.id, a), r) {
|
|
4614
4743
|
case "left":
|
|
4615
4744
|
case "top": {
|
|
4616
|
-
let e = t$
|
|
4745
|
+
let e = t$7(o, "definition.items", []);
|
|
4617
4746
|
if (e.splice(e.findIndex((e) => e === n), 0, a.id), !o) return !1;
|
|
4618
|
-
t$
|
|
4747
|
+
t$6(this.flat, `${o.id}.definition.items`, e), t$6(this.flat, `${a.id}.definition.parentId`, o.id), t$6(this.flat, `${a.id}.definition.rootId`, o.definition.rootId);
|
|
4619
4748
|
break;
|
|
4620
4749
|
}
|
|
4621
4750
|
case "right":
|
|
4622
4751
|
case "bottom": {
|
|
4623
|
-
let e = t$
|
|
4752
|
+
let e = t$7(o, "definition.items", []);
|
|
4624
4753
|
if (e.splice(e.findIndex((e) => e === n) + 1, 0, a.id), !o) return !1;
|
|
4625
|
-
t$
|
|
4754
|
+
t$6(this.flat, `${o.id}.definition.items`, e), t$6(this.flat, `${a.id}.definition.parentId`, o.id), t$6(this.flat, `${a.id}.definition.rootId`, o.definition.rootId);
|
|
4626
4755
|
break;
|
|
4627
4756
|
}
|
|
4628
4757
|
case "inside": {
|
|
4629
|
-
let e = t$
|
|
4758
|
+
let e = t$7(o, "definition.items", []);
|
|
4630
4759
|
if (!o) return !1;
|
|
4631
|
-
t$
|
|
4760
|
+
t$6(this.flat, `${n}.definition.items`, [...e, a.id]), t$6(this.flat, `${a.id}.definition.parentId`, n), t$6(this.flat, `${a.id}.definition.rootId`, o.definition.rootId);
|
|
4632
4761
|
break;
|
|
4633
4762
|
}
|
|
4634
4763
|
case "custom": break;
|
|
@@ -4639,21 +4768,21 @@ var p = class {
|
|
|
4639
4768
|
}), !0;
|
|
4640
4769
|
};
|
|
4641
4770
|
updateElement = (e) => !e || !this.flat[e.id] ? !1 : (this.flat[e.id] = e, !0);
|
|
4642
|
-
renameElement = (t, n) => this.flat[t] ? t === n ? [] : !i$
|
|
4643
|
-
renameConflict = (t, n) => i$
|
|
4771
|
+
renameElement = (t, n) => this.flat[t] ? t === n ? [] : !i$6(this.flat, n) && _(this.flat, { [t]: n }, this.pages) : !1;
|
|
4772
|
+
renameConflict = (t, n) => i$6(this.flat, n, t);
|
|
4644
4773
|
moveElement = (e, t, n, r = "inside") => {
|
|
4645
4774
|
if (n === t || !this.flat[e]) return !1;
|
|
4646
4775
|
let i = this.flat[t];
|
|
4647
4776
|
if (!i) return !1;
|
|
4648
4777
|
let a = this.flat[t];
|
|
4649
4778
|
for (; a;) {
|
|
4650
|
-
let e = t$
|
|
4779
|
+
let e = t$7(a, "definition.parentId");
|
|
4651
4780
|
if (!e) break;
|
|
4652
4781
|
if (a.id === n) return !1;
|
|
4653
4782
|
a = this.flat[e];
|
|
4654
4783
|
}
|
|
4655
4784
|
if (!a) return !1;
|
|
4656
|
-
let o = t$
|
|
4785
|
+
let o = t$7(this.flat, `${e}.definition.items`, []).filter((e) => e !== n);
|
|
4657
4786
|
if ([
|
|
4658
4787
|
"left",
|
|
4659
4788
|
"top",
|
|
@@ -4663,29 +4792,29 @@ var p = class {
|
|
|
4663
4792
|
if (!i.definition.parentId) return !1;
|
|
4664
4793
|
let a = this.flat[i.definition.parentId];
|
|
4665
4794
|
if (!a) return !1;
|
|
4666
|
-
let l = t$
|
|
4795
|
+
let l = t$7(a, "definition.items", []);
|
|
4667
4796
|
a.id === e && (l = o);
|
|
4668
4797
|
let u = l.findIndex((e) => e === t);
|
|
4669
|
-
["right", "bottom"].includes(r) && u++, l.splice(u, 0, n), t$
|
|
4798
|
+
["right", "bottom"].includes(r) && u++, l.splice(u, 0, n), t$6(this.flat, `${e}.definition.items`, o), t$6(this.flat, `${a.id}.definition.items`, l), t$6(this.flat, `${n}.definition.parentId`, a.id);
|
|
4670
4799
|
} else if (r === "inside") {
|
|
4671
4800
|
if (!this.flat[t]) return !1;
|
|
4672
|
-
let r = t$
|
|
4673
|
-
e === t && (r = o), r = [...r, n], t$
|
|
4801
|
+
let r = t$7(this.flat, `${t}.definition.items`, []);
|
|
4802
|
+
e === t && (r = o), r = [...r, n], t$6(this.flat, `${e}.definition.items`, o), t$6(this.flat, `${t}.definition.items`, r), t$6(this.flat, `${n}.definition.parentId`, t);
|
|
4674
4803
|
}
|
|
4675
4804
|
return !0;
|
|
4676
4805
|
};
|
|
4677
|
-
getElement = (e) => t$
|
|
4678
|
-
takenIds = () => r$
|
|
4679
|
-
elementIdConflict = (t, n) => i$
|
|
4806
|
+
getElement = (e) => t$7(this.flat, e);
|
|
4807
|
+
takenIds = () => r$7(this.flat);
|
|
4808
|
+
elementIdConflict = (t, n) => i$6(this.flat, t, n);
|
|
4680
4809
|
cloneElements = (e, t = "", n = "", i = !1) => {
|
|
4681
4810
|
let o = {
|
|
4682
4811
|
acum: {},
|
|
4683
4812
|
item: void 0
|
|
4684
|
-
}, l = {}, u
|
|
4685
|
-
if (!u
|
|
4813
|
+
}, l = {}, u = this.flat[e];
|
|
4814
|
+
if (!u) return o;
|
|
4686
4815
|
let d = [e, ...this.childTree(e)].filter((e) => this.flat[e] !== void 0), f = this.takenIds();
|
|
4687
4816
|
for (let e of d) {
|
|
4688
|
-
let t = u(e, (e) => f.has(e));
|
|
4817
|
+
let t = u$1(e, (e) => f.has(e));
|
|
4689
4818
|
f.add(t), l[e] = t;
|
|
4690
4819
|
}
|
|
4691
4820
|
let p = {};
|
|
@@ -4695,17 +4824,17 @@ var p = class {
|
|
|
4695
4824
|
}
|
|
4696
4825
|
_(p, l), o.acum = p, o.item = p[l[e]], i && delete o.acum[l[e]];
|
|
4697
4826
|
let m = this.flat[t];
|
|
4698
|
-
return (!m || !Array.isArray(t$
|
|
4827
|
+
return (!m || !Array.isArray(t$7(m, "definition.items"))) && (t = t$7(m, "definition.parentId", t$7(u, "definition.parentId"))), t && t$6(o, "item.definition.parentId", t), o;
|
|
4699
4828
|
};
|
|
4700
4829
|
removeElement = (e, t = !1) => {
|
|
4701
4830
|
let n = this.flat[e];
|
|
4702
|
-
if (!n || n.definition.type === "page" && !t || t && t$
|
|
4703
|
-
let r = t$
|
|
4831
|
+
if (!n || n.definition.type === "page" && !t || t && t$7(n, "attributes.default", !1)) return !1;
|
|
4832
|
+
let r = t$7(n, "definition.items");
|
|
4704
4833
|
r && r.length > 0 && r.forEach((e) => this.removeElement(e));
|
|
4705
|
-
let i = t$
|
|
4834
|
+
let i = t$7(n, "definition.parentId"), a = i ? this.flat[i] : void 0;
|
|
4706
4835
|
if (i && a) {
|
|
4707
4836
|
let { definition: { items: t = [] } } = a;
|
|
4708
|
-
t$
|
|
4837
|
+
t$6(a, "definition.items", t.filter((t) => t !== e)), this.flat[i] = a;
|
|
4709
4838
|
}
|
|
4710
4839
|
return delete this.flat[e], !0;
|
|
4711
4840
|
};
|
|
@@ -4732,18 +4861,18 @@ var p = class {
|
|
|
4732
4861
|
let t = this.flat[e], n = [];
|
|
4733
4862
|
if (!t) return n;
|
|
4734
4863
|
do {
|
|
4735
|
-
if (t$
|
|
4736
|
-
let e = t$
|
|
4864
|
+
if (t$7(t, "definition.type") === "page") {
|
|
4865
|
+
let e = t$7(t, "attributes.layout"), r = t$7(t, "attributes.layoutContainer");
|
|
4737
4866
|
e && r && n.push(r, ...this.parentTree(r));
|
|
4738
4867
|
}
|
|
4739
|
-
e !== t.id && n.push(t.id), t = t$
|
|
4868
|
+
e !== t.id && n.push(t.id), t = t$7(this.flat, t$7(t, "definition.parentId"), void 0);
|
|
4740
4869
|
} while (t);
|
|
4741
4870
|
return n;
|
|
4742
4871
|
};
|
|
4743
4872
|
childTree = (e) => {
|
|
4744
4873
|
let t = this.flat[e];
|
|
4745
4874
|
if (!t) return [];
|
|
4746
|
-
let n = [], r = t$
|
|
4875
|
+
let n = [], r = t$7(t, "definition.items");
|
|
4747
4876
|
return r && r.forEach((e) => n.push(e, ...this.childTree(e))), n;
|
|
4748
4877
|
};
|
|
4749
4878
|
isValidElement = (e) => {
|
|
@@ -4770,7 +4899,7 @@ var p = class {
|
|
|
4770
4899
|
elementsStyle: r,
|
|
4771
4900
|
variables: i
|
|
4772
4901
|
};
|
|
4773
|
-
let a = t$
|
|
4902
|
+
let a = t$7(this.flat, t);
|
|
4774
4903
|
if (!a) return {
|
|
4775
4904
|
elements: {
|
|
4776
4905
|
acum: {},
|
|
@@ -4782,14 +4911,14 @@ var p = class {
|
|
|
4782
4911
|
let o = this.cloneElements(t, a.definition.parentId);
|
|
4783
4912
|
return o.item ? (Object.values(o.acum).forEach((t) => {
|
|
4784
4913
|
let { id: n } = t;
|
|
4785
|
-
if (t$
|
|
4914
|
+
if (t$6(o.acum, `${n}.definition.rootId`, o.item?.id), c(t, t.definition.type, this.flat, e.platform, {}, { includeSelf: !0 }).tree.forEach((t) => {
|
|
4786
4915
|
let { displayMode: n, name: i } = t;
|
|
4787
4916
|
!(i in r.platform[n]) && i in e.platform[n] && (r.platform[n][i] = e.platform[n][i]);
|
|
4788
4917
|
}), this.variables.length > 0) {
|
|
4789
4918
|
let t = this.getElementVariables(e, n, o.acum);
|
|
4790
4919
|
i = [...i, ...t];
|
|
4791
4920
|
}
|
|
4792
|
-
}), t$
|
|
4921
|
+
}), t$6(o.acum, `${o.item.id}.definition.parentId`, null), n && delete o.acum[o.item.id], i.length > 1 && (i = [...new Set(i)]), {
|
|
4793
4922
|
elements: o,
|
|
4794
4923
|
elementsStyle: r,
|
|
4795
4924
|
variables: i
|
|
@@ -4802,15 +4931,15 @@ var p = class {
|
|
|
4802
4931
|
variables: i
|
|
4803
4932
|
};
|
|
4804
4933
|
};
|
|
4805
|
-
validate = () => n$
|
|
4806
|
-
...n$
|
|
4934
|
+
validate = () => n$8({
|
|
4935
|
+
...n$4.schema,
|
|
4807
4936
|
flat: this.flat,
|
|
4808
4937
|
variables: this.variables
|
|
4809
4938
|
});
|
|
4810
4939
|
isValid = () => this.validate().valid;
|
|
4811
4940
|
assertValid = (e) => {
|
|
4812
|
-
let t = n$
|
|
4813
|
-
...n$
|
|
4941
|
+
let t = n$8({
|
|
4942
|
+
...n$4.schema,
|
|
4814
4943
|
flat: this.flat,
|
|
4815
4944
|
variables: this.variables
|
|
4816
4945
|
});
|
|
@@ -4820,9 +4949,9 @@ var p = class {
|
|
|
4820
4949
|
}
|
|
4821
4950
|
};
|
|
4822
4951
|
getElementVariables = (e, t, n = this.flat, r = this.variables) => {
|
|
4823
|
-
let i = [], a = t$
|
|
4952
|
+
let i = [], a = t$7(n, `${t}.definition.styleSelectors`);
|
|
4824
4953
|
if (!a) return i;
|
|
4825
|
-
let o = new RegExp(t$
|
|
4954
|
+
let o = new RegExp(t$4, "g");
|
|
4826
4955
|
return Object.values(a).filter(Boolean).forEach((t) => {
|
|
4827
4956
|
Object.values(e.platform).forEach((e) => {
|
|
4828
4957
|
let n = e[t];
|
|
@@ -4868,10 +4997,10 @@ var p = class {
|
|
|
4868
4997
|
variables: i
|
|
4869
4998
|
}).getElementVariables(t, n);
|
|
4870
4999
|
};
|
|
4871
|
-
static validate = (e) => n$
|
|
4872
|
-
static isValid = (e) => n$
|
|
5000
|
+
static validate = (e) => n$8(e);
|
|
5001
|
+
static isValid = (e) => n$8(e).valid;
|
|
4873
5002
|
static assertValid = (e, t) => {
|
|
4874
|
-
let n = n$
|
|
5003
|
+
let n = n$8(e);
|
|
4875
5004
|
if (!n.valid) {
|
|
4876
5005
|
let e = `Invalid schema${t ? ` (${t})` : ""}: ${n.errors.map((e) => e.message).join("; ")}`;
|
|
4877
5006
|
throw Error(e);
|
|
@@ -4924,7 +5053,7 @@ var a$1 = (e) => {
|
|
|
4924
5053
|
//#region src/style/properties.ts
|
|
4925
5054
|
/** Every kebab-case CSS property Plitzi's style engine understands. Values written to a definition must use these
|
|
4926
5055
|
* exact keys — camelCase or unknown keys are rejected. */
|
|
4927
|
-
var cssProperties = Array.from(new Set(Object.values(t$
|
|
5056
|
+
var cssProperties = Array.from(new Set(Object.values(t$5))).sort();
|
|
4928
5057
|
var cssPropertySet = new Set(cssProperties);
|
|
4929
5058
|
var isCssProperty = (key) => cssPropertySet.has(key);
|
|
4930
5059
|
var toKebab = (key) => key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -5669,7 +5798,7 @@ var validateStyle = (style) => {
|
|
|
5669
5798
|
return errors;
|
|
5670
5799
|
};
|
|
5671
5800
|
var validateSpace$1 = ({ schema, style }, options = {}) => {
|
|
5672
|
-
const schemaResult = n$
|
|
5801
|
+
const schemaResult = n$8(schema, options);
|
|
5673
5802
|
const errors = [...schemaResult.errors, ...validateStyle(style)];
|
|
5674
5803
|
return {
|
|
5675
5804
|
valid: errors.length === 0,
|
|
@@ -5737,6 +5866,8 @@ var SpaceAuthor = class {
|
|
|
5737
5866
|
* free to register a module of its own, and refusing what this process cannot see would make the check useless
|
|
5738
5867
|
* for exactly the spaces that need it most. */
|
|
5739
5868
|
stepWarnings = [];
|
|
5869
|
+
/** Rules that render, and render differently from what they plainly mean — see `warnTabletOnly`. */
|
|
5870
|
+
styleWarnings = [];
|
|
5740
5871
|
constructor(spec, options = {}) {
|
|
5741
5872
|
this.spec = spec;
|
|
5742
5873
|
this.options = options;
|
|
@@ -5749,7 +5880,7 @@ var SpaceAuthor = class {
|
|
|
5749
5880
|
if (page.id) this.authorNames.add(page.id);
|
|
5750
5881
|
page.body.forEach((child) => this.collectSources(child));
|
|
5751
5882
|
});
|
|
5752
|
-
for (const [name, responsive] of this.classRules) this.writeSelector(name, responsive);
|
|
5883
|
+
for (const [name, responsive] of this.classRules) this.writeSelector(name, responsive, `Class "${name}"`);
|
|
5753
5884
|
const pageFolders = this.buildPageFolders();
|
|
5754
5885
|
const pages = this.spec.pages.map((page, index) => this.addPage(page, index));
|
|
5755
5886
|
const style = {
|
|
@@ -5758,6 +5889,7 @@ var SpaceAuthor = class {
|
|
|
5758
5889
|
theme: this.spec.theme ?? e$3.theme,
|
|
5759
5890
|
platform: this.platform,
|
|
5760
5891
|
variables: this.spec.variables ?? {},
|
|
5892
|
+
...this.spec.fonts ? { fonts: this.parseFonts(this.spec.fonts) } : {},
|
|
5761
5893
|
cache: ""
|
|
5762
5894
|
};
|
|
5763
5895
|
style.cache = a$1(style);
|
|
@@ -5784,7 +5916,11 @@ var SpaceAuthor = class {
|
|
|
5784
5916
|
schema,
|
|
5785
5917
|
style,
|
|
5786
5918
|
handles: buildHandles(this.handles),
|
|
5787
|
-
warnings: [
|
|
5919
|
+
warnings: [
|
|
5920
|
+
...this.stepWarnings,
|
|
5921
|
+
...this.styleWarnings,
|
|
5922
|
+
...warnings
|
|
5923
|
+
]
|
|
5788
5924
|
};
|
|
5789
5925
|
}
|
|
5790
5926
|
/**
|
|
@@ -5921,7 +6057,44 @@ var SpaceAuthor = class {
|
|
|
5921
6057
|
this.idCounters.set(type, next);
|
|
5922
6058
|
return `${type}-${next}`;
|
|
5923
6059
|
}
|
|
5924
|
-
|
|
6060
|
+
/**
|
|
6061
|
+
* The fonts, through the parser every other way into a manifest uses.
|
|
6062
|
+
*
|
|
6063
|
+
* A face with no fallback, no weights or an unknown source is still a `<link>` the page server writes, and the
|
|
6064
|
+
* page then renders in whatever the browser picks — so it is refused here, by index and family, with the
|
|
6065
|
+
* parser's own reason.
|
|
6066
|
+
*/
|
|
6067
|
+
parseFonts(fonts) {
|
|
6068
|
+
return fonts.map((font, index) => {
|
|
6069
|
+
try {
|
|
6070
|
+
return h(font);
|
|
6071
|
+
} catch (error) {
|
|
6072
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
6073
|
+
throw new Error(`Font ${index} ("${font.family}") in space "${this.spec.permanentUrl}": ${reason}`, { cause: error });
|
|
6074
|
+
}
|
|
6075
|
+
});
|
|
6076
|
+
}
|
|
6077
|
+
/**
|
|
6078
|
+
* A tablet rule a phone never sees.
|
|
6079
|
+
*
|
|
6080
|
+
* The breakpoints are RANGES, not a cascade: `tablet` is 48–64rem, `mobile` is below 48rem, and each inherits
|
|
6081
|
+
* only from `desktop`. So a layout that collapses to a column at tablet and says nothing for mobile comes back as
|
|
6082
|
+
* desktop columns on a phone — the narrowest screen gets the widest layout, and every check passes. A warning and
|
|
6083
|
+
* not a refusal, because a rule meant for tablets alone is legal, just rarely what anybody meant.
|
|
6084
|
+
*/
|
|
6085
|
+
warnTabletOnly(responsive, where) {
|
|
6086
|
+
const tablet = responsive.tablet ?? {};
|
|
6087
|
+
const mobile = responsive.mobile ?? {};
|
|
6088
|
+
const skipped = Object.keys(tablet).filter((property) => !Object.hasOwn(mobile, property));
|
|
6089
|
+
if (skipped.length === 0) return;
|
|
6090
|
+
this.styleWarnings.push({
|
|
6091
|
+
code: "tablet-rule-skips-mobile",
|
|
6092
|
+
message: `${where} sets ${skipped.join(", ")} for tablet but not for mobile. Tablet (48–64rem) and mobile (below 48rem) are separate ranges and mobile inherits desktop, not tablet — so phones get the desktop value back. Repeat the rule under \`mobile\` if phones should keep it.`,
|
|
6093
|
+
details: { properties: skipped }
|
|
6094
|
+
});
|
|
6095
|
+
}
|
|
6096
|
+
writeSelector(name, responsive, where) {
|
|
6097
|
+
this.warnTabletOnly(responsive, where);
|
|
5925
6098
|
for (const breakpoint of BREAKPOINTS) {
|
|
5926
6099
|
const rules = responsive[breakpoint];
|
|
5927
6100
|
if (!rules || Object.keys(rules).length === 0) continue;
|
|
@@ -5949,7 +6122,7 @@ var SpaceAuthor = class {
|
|
|
5949
6122
|
return name;
|
|
5950
6123
|
}
|
|
5951
6124
|
const selector = `${spec.type}-${digest(`plitzi:selector:${this.spec.permanentUrl}:${path}`, 4)}`;
|
|
5952
|
-
this.writeSelector(selector, toResponsive(spec.css));
|
|
6125
|
+
this.writeSelector(selector, toResponsive(spec.css), `Element "${spec.type}" at ${path}`);
|
|
5953
6126
|
return selector;
|
|
5954
6127
|
}
|
|
5955
6128
|
/**
|
|
@@ -6062,6 +6235,8 @@ var SpaceAuthor = class {
|
|
|
6062
6235
|
named: page.id !== void 0,
|
|
6063
6236
|
slug: page.slug,
|
|
6064
6237
|
path: this.routeFor(page),
|
|
6238
|
+
...page.accessLevel ? { accessLevel: page.accessLevel } : {},
|
|
6239
|
+
params: [...page.slug.matchAll(/\{\{\s*([^\s}]+)\s*\}\}/g)].map(([, param]) => param),
|
|
6065
6240
|
elements: {}
|
|
6066
6241
|
};
|
|
6067
6242
|
page.body.forEach((child, childIndex) => this.addElement(child, `${path}/${childIndex}`, id, id));
|
|
@@ -6085,8 +6260,9 @@ var SpaceAuthor = class {
|
|
|
6085
6260
|
recordHandle(handle) {
|
|
6086
6261
|
if (Object.hasOwn(this.handles, handle.pageId)) this.handles[handle.pageId].elements[handle.id] = handle;
|
|
6087
6262
|
}
|
|
6088
|
-
addElement(spec, path, rootId, parentId) {
|
|
6263
|
+
addElement(spec, path, rootId, parentId, insideCondition = false) {
|
|
6089
6264
|
const id = spec.id ?? this.nextId(spec.type);
|
|
6265
|
+
const conditional = insideCondition || spec.visible !== void 0;
|
|
6090
6266
|
const where = `Element "${spec.type}" (${id}) at ${path}`;
|
|
6091
6267
|
this.assertStepsKnown(spec.flows, where);
|
|
6092
6268
|
const bindings = withVisibility(spec);
|
|
@@ -6127,9 +6303,10 @@ var SpaceAuthor = class {
|
|
|
6127
6303
|
type: spec.type,
|
|
6128
6304
|
pageId: rootId,
|
|
6129
6305
|
selector: selectorFor(id),
|
|
6130
|
-
named: spec.id !== void 0
|
|
6306
|
+
named: spec.id !== void 0,
|
|
6307
|
+
...conditional ? { conditional: true } : {}
|
|
6131
6308
|
});
|
|
6132
|
-
spec.children?.forEach((child, index) => this.addElement(child, `${path}/${index}`, rootId, id));
|
|
6309
|
+
spec.children?.forEach((child, index) => this.addElement(child, `${path}/${index}`, rootId, id, conditional));
|
|
6133
6310
|
return id;
|
|
6134
6311
|
}
|
|
6135
6312
|
};
|
|
@@ -6493,6 +6670,10 @@ var space = {
|
|
|
6493
6670
|
tablet: {
|
|
6494
6671
|
"justify-content": "flex-start",
|
|
6495
6672
|
padding: "60px"
|
|
6673
|
+
},
|
|
6674
|
+
mobile: {
|
|
6675
|
+
"justify-content": "flex-start",
|
|
6676
|
+
padding: "40px 24px"
|
|
6496
6677
|
}
|
|
6497
6678
|
},
|
|
6498
6679
|
body: [
|
|
@@ -6546,6 +6727,16 @@ var space = {
|
|
|
6546
6727
|
"flex-shrink": "1",
|
|
6547
6728
|
"flex-basis": "0%",
|
|
6548
6729
|
"align-items": "flex-start"
|
|
6730
|
+
},
|
|
6731
|
+
mobile: {
|
|
6732
|
+
"flex-direction": "column",
|
|
6733
|
+
"min-height": "auto",
|
|
6734
|
+
"min-width": "auto",
|
|
6735
|
+
"flex-grow": "1",
|
|
6736
|
+
"flex-shrink": "1",
|
|
6737
|
+
"flex-basis": "0%",
|
|
6738
|
+
"align-items": "flex-start",
|
|
6739
|
+
gap: "24px"
|
|
6549
6740
|
}
|
|
6550
6741
|
},
|
|
6551
6742
|
children: [
|
|
@@ -6560,7 +6751,7 @@ var space = {
|
|
|
6560
6751
|
};
|
|
6561
6752
|
//#endregion
|
|
6562
6753
|
//#region src/spaces/blank/spec.ts?raw
|
|
6563
|
-
var spec_default = "import { container, fontAwesome, heading, image, link, paragraph } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared.\n *\n * This is the whole site: a tree, some CSS and a palette. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written here, so authoring it twice writes byte-identical\n * documents and there is no generated file to keep in step.\n *\n * It starts as the space Plitzi gives a new account, and it is yours: rename things, change the palette, delete\n * the cards. The four cards are one function called four times, which is not a saving of keystrokes — change\n * `card` and all four follow, and that is the difference between a design and four copies of one.\n *\n * Name anything a test, a binding or an agent should be able to point at (`id: 'hero-title'`). An element with no\n * name gets a positional one, which moves the moment something is inserted above it.\n */\n\n/** The classes the page shares. Declared once, so re-theming a card re-themes every card. */\nconst buttonLink = styles('button-link', {\n color: 'white',\n 'flex-basis': '0px',\n 'flex-grow': '1',\n 'flex-shrink': '1'\n});\n\nconst titleRow = styles('title-container', { display: 'flex', 'align-items': 'center' });\n\nconst titleIcon = styles('title-icon', { 'margin-left': '10px' });\n\n/**\n * The grid behind everything, pinned to the viewport.\n *\n * Four gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the two\n * line colours are variables, so it is faint on light and faint on dark without a second asset.\n */\nconst backdrop = styles('bg-rectangles', {\n top: '0%',\n left: '0%',\n bottom: '0%',\n right: '0%',\n position: 'fixed',\n 'background-image':\n 'linear-gradient(0deg, var(--grid-big) 1px, transparent 1px), ' +\n 'linear-gradient(90deg, var(--grid-big) 1px, transparent 1px), ' +\n 'linear-gradient(0deg, var(--grid-small) 1px, transparent 1px), ' +\n 'linear-gradient(90deg, var(--grid-small) 1px, transparent 1px)',\n 'background-size': '100px 100px, 100px 100px, 10px 10px, 10px 10px',\n 'background-position': '0% 0%, 0% 0%, 0% 0%, 0% 0%',\n 'background-repeat': 'repeat, repeat, repeat, repeat',\n 'background-attachment': 'scroll, scroll, scroll, scroll',\n 'background-clip': 'border-box, border-box, border-box, border-box'\n});\n\n/** One of the four links along the bottom: a title with an arrow, and a line about where it goes. */\nconst card = (id: string, title: string, body: string, href = '#'): ElementSpec =>\n link({\n id,\n href,\n class: buttonLink,\n children: [\n container({\n class: titleRow,\n children: [\n heading({ id: `${id}-title`, content: title, subType: 'h1' }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: titleIcon })\n ]\n }),\n paragraph({ content: body })\n ]\n });\n\nexport const space: SpaceSpec = {\n name: 'New space',\n permanentUrl: 'new-space',\n mode: 'desktop-first',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n /**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. Nothing below names a colour directly — they are all\n * `var(--…)` — so switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\n variables: {\n color: {\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n 'grid-big': { light: '#00000010', dark: '#ffffff10', default: '#00000010' },\n 'grid-small': { light: '#0000000A', dark: '#ffffff0A', default: '#0000000A' },\n 'background-outer': { light: '#dce6ff', dark: '#000000', default: '#dce6ff' },\n 'background-inner': { light: '#ffffff', dark: '#080866', default: '#ffffff' }\n }\n },\n /**\n * What text is, before any class touches it.\n *\n * Per element TYPE, so every heading and paragraph follows the palette without naming a colour — which is what\n * makes the dark scheme work: a hard-coded colour would win against the theme and leave black text on black.\n */\n elements: {\n heading: { base: { color: 'var(--foreground)' } },\n text: { base: { color: 'var(--foreground)' } },\n paragraph: { base: { color: 'var(--foreground)' } },\n fontAwesome: { base: { color: 'var(--foreground)' } }\n },\n /** The arrow slides on hover. A relationship between two elements, which is a stylesheet's job, not an element's. */\n customCss: `.button-link:hover .title-icon {\n transform: translateX(10px);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0.2, 1);\n transition-duration: 150ms;\n}\n`,\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n isDefault: true,\n css: {\n desktop: {\n 'flex-direction': 'column',\n 'align-items': 'center',\n 'justify-content': 'space-between',\n padding: '100px',\n position: 'relative',\n 'min-width': '100vw',\n 'min-height': '100vh',\n 'background-image':\n 'radial-gradient(circle at 50% 50%, var(--background-inner) -30%, var(--background-outer) 100%)',\n 'background-size': 'auto',\n 'background-position': '0% 0%',\n 'background-repeat': 'no-repeat',\n 'background-attachment': 'scroll',\n 'background-clip': 'border-box'\n },\n tablet: { 'justify-content': 'flex-start', padding: '60px' }\n },\n body: [\n container({ id: 'backdrop', class: backdrop }),\n container({\n id: 'logo',\n css: { desktop: { width: '75vw', height: '75vh', position: 'absolute' } },\n children: [\n image({\n src: 'https://cdn.plitzi.com/resources/img/favicon.svg',\n css: { desktop: { width: '100%', height: '100%', opacity: '0.45' } }\n })\n ]\n }),\n container({\n id: 'hero',\n css: { desktop: { 'z-index': '1', color: 'white', 'margin-bottom': '40px' } },\n children: [heading({ id: 'hero-title', content: 'Welcome To Plitzi', subType: 'h1' })]\n }),\n container({\n id: 'cards',\n css: {\n desktop: { display: 'flex', 'align-items': 'center', 'z-index': '1', gap: '40px' },\n tablet: {\n 'flex-direction': 'column',\n 'min-height': 'auto',\n 'min-width': 'auto',\n 'flex-grow': '1',\n 'flex-shrink': '1',\n 'flex-basis': '0%',\n 'align-items': 'flex-start'\n }\n },\n children: [\n card('docs', 'Docs', 'Find in-depth information about Plitzi features and API.'),\n card('learn', 'Learn', 'Learn about Plitzi in an interactive course with quizzes!'),\n card('templates', 'Templates', 'Explore the Plitzi playground'),\n card('deploy', 'Deploy', 'Instantly deploy your Plitzi Space')\n ]\n })\n ]\n }\n ]\n};\n";
|
|
6754
|
+
var spec_default = "import { container, fontAwesome, heading, image, link, paragraph } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared.\n *\n * This is the whole site: a tree, some CSS and a palette. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written here, so authoring it twice writes byte-identical\n * documents and there is no generated file to keep in step.\n *\n * It starts as the space Plitzi gives a new account, and it is yours: rename things, change the palette, delete\n * the cards. The four cards are one function called four times, which is not a saving of keystrokes — change\n * `card` and all four follow, and that is the difference between a design and four copies of one.\n *\n * Name anything a test, a binding or an agent should be able to point at (`id: 'hero-title'`). An element with no\n * name gets a positional one, which moves the moment something is inserted above it.\n */\n\n/** The classes the page shares. Declared once, so re-theming a card re-themes every card. */\nconst buttonLink = styles('button-link', {\n color: 'white',\n 'flex-basis': '0px',\n 'flex-grow': '1',\n 'flex-shrink': '1'\n});\n\nconst titleRow = styles('title-container', { display: 'flex', 'align-items': 'center' });\n\nconst titleIcon = styles('title-icon', { 'margin-left': '10px' });\n\n/**\n * The grid behind everything, pinned to the viewport.\n *\n * Four gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the two\n * line colours are variables, so it is faint on light and faint on dark without a second asset.\n */\nconst backdrop = styles('bg-rectangles', {\n top: '0%',\n left: '0%',\n bottom: '0%',\n right: '0%',\n position: 'fixed',\n 'background-image':\n 'linear-gradient(0deg, var(--grid-big) 1px, transparent 1px), ' +\n 'linear-gradient(90deg, var(--grid-big) 1px, transparent 1px), ' +\n 'linear-gradient(0deg, var(--grid-small) 1px, transparent 1px), ' +\n 'linear-gradient(90deg, var(--grid-small) 1px, transparent 1px)',\n 'background-size': '100px 100px, 100px 100px, 10px 10px, 10px 10px',\n 'background-position': '0% 0%, 0% 0%, 0% 0%, 0% 0%',\n 'background-repeat': 'repeat, repeat, repeat, repeat',\n 'background-attachment': 'scroll, scroll, scroll, scroll',\n 'background-clip': 'border-box, border-box, border-box, border-box'\n});\n\n/** One of the four links along the bottom: a title with an arrow, and a line about where it goes. */\nconst card = (id: string, title: string, body: string, href = '#'): ElementSpec =>\n link({\n id,\n href,\n class: buttonLink,\n children: [\n container({\n class: titleRow,\n children: [\n heading({ id: `${id}-title`, content: title, subType: 'h1' }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: titleIcon })\n ]\n }),\n paragraph({ content: body })\n ]\n });\n\nexport const space: SpaceSpec = {\n name: 'New space',\n permanentUrl: 'new-space',\n mode: 'desktop-first',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n /**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. Nothing below names a colour directly — they are all\n * `var(--…)` — so switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\n variables: {\n color: {\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n 'grid-big': { light: '#00000010', dark: '#ffffff10', default: '#00000010' },\n 'grid-small': { light: '#0000000A', dark: '#ffffff0A', default: '#0000000A' },\n 'background-outer': { light: '#dce6ff', dark: '#000000', default: '#dce6ff' },\n 'background-inner': { light: '#ffffff', dark: '#080866', default: '#ffffff' }\n }\n },\n /**\n * What text is, before any class touches it.\n *\n * Per element TYPE, so every heading and paragraph follows the palette without naming a colour — which is what\n * makes the dark scheme work: a hard-coded colour would win against the theme and leave black text on black.\n */\n elements: {\n heading: { base: { color: 'var(--foreground)' } },\n text: { base: { color: 'var(--foreground)' } },\n paragraph: { base: { color: 'var(--foreground)' } },\n fontAwesome: { base: { color: 'var(--foreground)' } }\n },\n /** The arrow slides on hover. A relationship between two elements, which is a stylesheet's job, not an element's. */\n customCss: `.button-link:hover .title-icon {\n transform: translateX(10px);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0.2, 1);\n transition-duration: 150ms;\n}\n`,\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n isDefault: true,\n css: {\n desktop: {\n 'flex-direction': 'column',\n 'align-items': 'center',\n 'justify-content': 'space-between',\n padding: '100px',\n position: 'relative',\n 'min-width': '100vw',\n 'min-height': '100vh',\n 'background-image':\n 'radial-gradient(circle at 50% 50%, var(--background-inner) -30%, var(--background-outer) 100%)',\n 'background-size': 'auto',\n 'background-position': '0% 0%',\n 'background-repeat': 'no-repeat',\n 'background-attachment': 'scroll',\n 'background-clip': 'border-box'\n },\n tablet: { 'justify-content': 'flex-start', padding: '60px' },\n // Tablet and mobile are separate ranges: without this a phone gets the desktop's 100px back.\n mobile: { 'justify-content': 'flex-start', padding: '40px 24px' }\n },\n body: [\n container({ id: 'backdrop', class: backdrop }),\n container({\n id: 'logo',\n css: { desktop: { width: '75vw', height: '75vh', position: 'absolute' } },\n children: [\n image({\n src: 'https://cdn.plitzi.com/resources/img/favicon.svg',\n css: { desktop: { width: '100%', height: '100%', opacity: '0.45' } }\n })\n ]\n }),\n container({\n id: 'hero',\n css: { desktop: { 'z-index': '1', color: 'white', 'margin-bottom': '40px' } },\n children: [heading({ id: 'hero-title', content: 'Welcome To Plitzi', subType: 'h1' })]\n }),\n container({\n id: 'cards',\n css: {\n desktop: { display: 'flex', 'align-items': 'center', 'z-index': '1', gap: '40px' },\n tablet: {\n 'flex-direction': 'column',\n 'min-height': 'auto',\n 'min-width': 'auto',\n 'flex-grow': '1',\n 'flex-shrink': '1',\n 'flex-basis': '0%',\n 'align-items': 'flex-start'\n },\n mobile: {\n 'flex-direction': 'column',\n 'min-height': 'auto',\n 'min-width': 'auto',\n 'flex-grow': '1',\n 'flex-shrink': '1',\n 'flex-basis': '0%',\n 'align-items': 'flex-start',\n gap: '24px'\n }\n },\n children: [\n card('docs', 'Docs', 'Find in-depth information about Plitzi features and API.'),\n card('learn', 'Learn', 'Learn about Plitzi in an interactive course with quizzes!'),\n card('templates', 'Templates', 'Explore the Plitzi playground'),\n card('deploy', 'Deploy', 'Instantly deploy your Plitzi Space')\n ]\n })\n ]\n }\n ]\n};\n";
|
|
6564
6755
|
//#endregion
|
|
6565
6756
|
//#region src/spaces/index.ts
|
|
6566
6757
|
/**
|