@plitzi/sdk-authoring 0.38.8 → 0.38.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index-src.js CHANGED
@@ -11,19 +11,19 @@ var __exportAll = (all, no_symbols) => {
11
11
  };
12
12
  //#endregion
13
13
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
14
- var e$42 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
15
- var t$63 = `(?:${e$42}|\\d+)`;
16
- var n$47 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$42}(?:\\.${t$63})*)\\s*\\]`;
17
- var r$37 = `${`${e$42}(?:${n$47})*(?:\\??\\.${t$63}(?:${n$47})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
18
- var i$28 = `\\{\\{\\s*${r$37}\\s*\\}\\}`;
19
- var a$24 = `(?:${`\\{\\{\\{\\s*${r$37}\\s*\\}\\}\\}`}|${i$28})`;
14
+ var e$43 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
15
+ var t$63 = `(?:${e$43}|\\d+)`;
16
+ var n$47 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$43}(?:\\.${t$63})*)\\s*\\]`;
17
+ var r$36 = `${`${e$43}(?:${n$47})*(?:\\??\\.${t$63}(?:${n$47})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
18
+ var i$29 = `\\{\\{\\s*${r$36}\\s*\\}\\}`;
19
+ var a$24 = `(?:${`\\{\\{\\{\\s*${r$36}\\s*\\}\\}\\}`}|${i$29})`;
20
20
  var o$26 = new RegExp(a$24, "g");
21
- var s$23 = RegExp(`^${a$24}$`);
21
+ var s$24 = RegExp(`^${a$24}$`);
22
22
  //#endregion
23
23
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
24
24
  var n$46 = (n, r = !1) => {
25
25
  if (typeof n != "string") return !1;
26
- let i = r ? s$23 : o$26;
26
+ let i = r ? s$24 : o$26;
27
27
  return i.lastIndex = 0, i.test(n.trim());
28
28
  };
29
29
  //#endregion
@@ -43,17 +43,17 @@ var n$45 = (e, t, n) => {
43
43
  for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
44
44
  return r;
45
45
  };
46
- var r$36 = (e, t, n) => {
46
+ var r$35 = (e, t, n) => {
47
47
  let r = [];
48
48
  for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
49
49
  return r;
50
50
  };
51
- var i$27 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
51
+ var i$28 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
52
52
  var a$23 = (t) => typeof t == "string" && n$46(t);
53
53
  var o$25 = (e, t) => {
54
54
  switch (t.type) {
55
55
  case "boolean": return typeof e == "boolean";
56
- case "number": return typeof e == "number" || typeof e == "string" && i$27(e);
56
+ case "number": return typeof e == "number" || typeof e == "string" && i$28(e);
57
57
  case "select": return typeof e == "string" && (!t.options || t.options.includes(e));
58
58
  case "scalar": return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
59
59
  case "json": return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "object" && !!e;
@@ -63,7 +63,7 @@ var o$25 = (e, t) => {
63
63
  default: return !0;
64
64
  }
65
65
  };
66
- var s$22 = (e, t, n) => {
66
+ var s$23 = (e, t, n) => {
67
67
  let r = [];
68
68
  for (let [i, s] of Object.entries(n)) {
69
69
  let n = e[i];
@@ -84,23 +84,23 @@ var c$19 = (e, t, n) => {
84
84
  };
85
85
  //#endregion
86
86
  //#region ../sdk-shared/dist/helpers/scroll.mjs
87
- var e$41 = ["smooth", "auto"];
87
+ var e$42 = ["smooth", "auto"];
88
88
  var t$61 = [
89
89
  "start",
90
90
  "center",
91
91
  "end",
92
92
  "nearest"
93
93
  ];
94
- var s$21 = "onScroll";
94
+ var s$22 = "onScroll";
95
95
  //#endregion
96
96
  //#region ../sdk-shared/dist/authoring/elementCallbacks.mjs
97
- var r$35 = {
97
+ var r$34 = {
98
98
  type: "select",
99
99
  description: "How it moves: \"smooth\" glides there, \"auto\" jumps.",
100
100
  default: "smooth",
101
- options: [...e$41]
101
+ options: [...e$42]
102
102
  };
103
- var i$26 = {
103
+ var i$27 = {
104
104
  scrollBy: {
105
105
  title: "Scroll By",
106
106
  type: "callback",
@@ -116,7 +116,7 @@ var i$26 = {
116
116
  description: "How far down, the same way; negative goes up.",
117
117
  default: ""
118
118
  },
119
- behavior: r$35
119
+ behavior: r$34
120
120
  }
121
121
  },
122
122
  scrollTo: {
@@ -134,7 +134,7 @@ var i$26 = {
134
134
  description: "Where down, the same way. Empty stays.",
135
135
  default: ""
136
136
  },
137
- behavior: r$35
137
+ behavior: r$34
138
138
  }
139
139
  },
140
140
  scrollIntoView: {
@@ -154,7 +154,7 @@ var i$26 = {
154
154
  default: "nearest",
155
155
  options: [...t$61]
156
156
  },
157
- behavior: r$35
157
+ behavior: r$34
158
158
  }
159
159
  }
160
160
  };
@@ -215,10 +215,10 @@ var a$22 = {
215
215
  }
216
216
  }
217
217
  },
218
- ...i$26
218
+ ...i$27
219
219
  };
220
220
  var o$24 = (e) => Object.hasOwn(a$22, e) ? a$22[e] : void 0;
221
- var s$20 = (t, n) => {
221
+ var s$21 = (t, n) => {
222
222
  let r = o$24(t);
223
223
  return r ? {
224
224
  known: !0,
@@ -252,6 +252,7 @@ var elementAttributeNames = {
252
252
  "loadingSlot",
253
253
  "method",
254
254
  "mockData",
255
+ "notFound",
255
256
  "pageParam",
256
257
  "pagination",
257
258
  "query",
@@ -407,6 +408,7 @@ var elementAttributeNames = {
407
408
  list: [
408
409
  "itemKey",
409
410
  "items",
411
+ "label",
410
412
  "source",
411
413
  "subType"
412
414
  ],
@@ -696,6 +698,7 @@ var elementAttributeNames = {
696
698
  page: [
697
699
  "layout",
698
700
  "layoutContainer",
701
+ "notFound",
699
702
  "seoEnabled",
700
703
  "seoPageDescription",
701
704
  "seoPageTitle"
@@ -723,7 +726,11 @@ var elementAttributeNames = {
723
726
  tabContainerBody: [],
724
727
  tabContainerHeader: [],
725
728
  tabContainerItem: [],
726
- text: ["content", "title"],
729
+ text: [
730
+ "content",
731
+ "decorative",
732
+ "title"
733
+ ],
727
734
  themeToggle: [
728
735
  "darkLabel",
729
736
  "lightLabel",
@@ -741,7 +748,7 @@ var elementAttributeNames = {
741
748
  };
742
749
  //#endregion
743
750
  //#region ../sdk-elements/dist/Element/helpers/elementConstants.mjs
744
- var e$40 = {
751
+ var e$41 = {
745
752
  onLoad: {
746
753
  action: "onLoad",
747
754
  title: "On Load",
@@ -913,7 +920,7 @@ var e$40 = {
913
920
  };
914
921
  //#endregion
915
922
  //#region ../sdk-shared/dist/authoring/declare.mjs
916
- var e$39 = () => (e) => e;
923
+ var e$40 = () => (e) => e;
917
924
  var t$60 = () => (e) => e;
918
925
  //#endregion
919
926
  //#region ../sdk-elements/dist/elements/advanced/BlockHtml/declaration.mjs
@@ -1155,16 +1162,16 @@ var n$44 = {
1155
1162
  "border-bottom-left-radius": "4px",
1156
1163
  "border-bottom-right-radius": "4px"
1157
1164
  };
1158
- var r$34 = t$60()({
1165
+ var r$33 = t$60()({
1159
1166
  type: "button",
1160
1167
  attributeValues: {
1161
- subType: e$39()([
1168
+ subType: e$40()([
1162
1169
  "button",
1163
1170
  "submit",
1164
1171
  "reset"
1165
1172
  ]),
1166
- contentPlacement: e$39()(["before", "after"]),
1167
- iconPlacement: e$39()(["before", "after"])
1173
+ contentPlacement: e$40()(["before", "after"]),
1174
+ iconPlacement: e$40()(["before", "after"])
1168
1175
  },
1169
1176
  content: {
1170
1177
  attributes: {
@@ -1234,7 +1241,7 @@ var r$34 = t$60()({
1234
1241
  //#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
1235
1242
  var n$43 = t$60()({
1236
1243
  type: "dropdown",
1237
- attributeValues: { popupPlacement: e$39()([
1244
+ attributeValues: { popupPlacement: e$40()([
1238
1245
  "left",
1239
1246
  "right",
1240
1247
  "top",
@@ -1369,7 +1376,7 @@ var t$54 = t$60()({
1369
1376
  //#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
1370
1377
  var n$42 = t$60()({
1371
1378
  type: "heading",
1372
- attributeValues: { subType: e$39()([
1379
+ attributeValues: { subType: e$40()([
1373
1380
  "h1",
1374
1381
  "h2",
1375
1382
  "h3",
@@ -1493,20 +1500,20 @@ var n$42 = t$60()({
1493
1500
  var n$41 = t$60()({
1494
1501
  type: "link",
1495
1502
  attributeValues: {
1496
- mode: e$39()([
1503
+ mode: e$40()([
1497
1504
  "page",
1498
1505
  "internal",
1499
1506
  "external"
1500
1507
  ]),
1501
- target: e$39()([
1508
+ target: e$40()([
1502
1509
  "self",
1503
1510
  "blank",
1504
1511
  "parent",
1505
1512
  "top"
1506
1513
  ]),
1507
- contentPlacement: e$39()(["before", "after"]),
1508
- iconPlacement: e$39()(["before", "after"]),
1509
- current: e$39()(["page", "section"])
1514
+ contentPlacement: e$40()(["before", "after"]),
1515
+ iconPlacement: e$40()(["before", "after"]),
1516
+ current: e$40()(["page", "section"])
1510
1517
  },
1511
1518
  content: {
1512
1519
  attributes: {
@@ -1684,7 +1691,7 @@ var t$52 = t$60()({
1684
1691
  //#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
1685
1692
  var n$40 = t$60()({
1686
1693
  type: "richText",
1687
- attributeValues: { format: e$39()([
1694
+ attributeValues: { format: e$40()([
1688
1695
  "html",
1689
1696
  "markdown",
1690
1697
  "text"
@@ -1823,9 +1830,9 @@ var n$39 = {
1823
1830
  "letter-spacing": "inherit",
1824
1831
  cursor: "pointer"
1825
1832
  };
1826
- var r$33 = t$60()({
1833
+ var r$32 = t$60()({
1827
1834
  type: "themeToggle",
1828
- attributeValues: { subType: e$39()(["switch", "segmented"]) },
1835
+ attributeValues: { subType: e$40()(["switch", "segmented"]) },
1829
1836
  triggers: { onThemeChange: {
1830
1837
  action: "onThemeChange",
1831
1838
  title: "On Theme Change",
@@ -1893,7 +1900,7 @@ var r$33 = t$60()({
1893
1900
  //#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
1894
1901
  var n$38 = t$60()({
1895
1902
  type: "form",
1896
- attributeValues: { method: e$39()(["get", "post"]) },
1903
+ attributeValues: { method: e$40()(["get", "post"]) },
1897
1904
  sourceType: "apiContainer",
1898
1905
  triggers: { onSubmit: {
1899
1906
  action: "onSubmit",
@@ -2025,11 +2032,11 @@ var n$37 = {
2025
2032
  outline: "none",
2026
2033
  position: "relative"
2027
2034
  };
2028
- var r$32 = {
2035
+ var r$31 = {
2029
2036
  ...n$37,
2030
2037
  "line-height": "20px"
2031
2038
  };
2032
- var i$25 = {
2039
+ var i$26 = {
2033
2040
  display: "flex",
2034
2041
  cursor: "pointer",
2035
2042
  "font-weight": "600",
@@ -2039,7 +2046,7 @@ var i$25 = {
2039
2046
  "user-select": "none"
2040
2047
  };
2041
2048
  var a$21 = {
2042
- ...i$25,
2049
+ ...i$26,
2043
2050
  "margin-bottom": "4px"
2044
2051
  };
2045
2052
  var o$23 = {
@@ -2047,7 +2054,7 @@ var o$23 = {
2047
2054
  color: "red",
2048
2055
  "margin-top": "4px"
2049
2056
  };
2050
- var s$19 = {
2057
+ var s$20 = {
2051
2058
  color: "red",
2052
2059
  "margin-left": "4px"
2053
2060
  };
@@ -2066,14 +2073,14 @@ var l$13 = {
2066
2073
  "padding-left": "0px",
2067
2074
  display: "block",
2068
2075
  ...c$18,
2069
- "background-color": "inherit",
2076
+ "background-color": "transparent",
2070
2077
  color: "inherit",
2071
2078
  "line-height": "inherit",
2072
2079
  "font-family": "inherit",
2073
2080
  "font-size": "inherit",
2074
2081
  "box-shadow": "none"
2075
2082
  };
2076
- var u$13 = {
2083
+ var u$14 = {
2077
2084
  height: "100%",
2078
2085
  width: "100%",
2079
2086
  display: "block",
@@ -2087,7 +2094,7 @@ var u$13 = {
2087
2094
  cursor: "inherit",
2088
2095
  "box-shadow": "none"
2089
2096
  };
2090
- var d$13 = {
2097
+ var d$12 = {
2091
2098
  height: "100%",
2092
2099
  "margin-top": "0px",
2093
2100
  "margin-right": "0px",
@@ -2107,11 +2114,11 @@ var d$13 = {
2107
2114
  "font-weight": "inherit",
2108
2115
  cursor: "pointer"
2109
2116
  };
2110
- var f$11 = {
2117
+ var f$10 = {
2111
2118
  ...n$37,
2112
2119
  cursor: "pointer"
2113
2120
  };
2114
- var p$10 = {
2121
+ var p$11 = {
2115
2122
  height: "20px",
2116
2123
  width: "36px",
2117
2124
  "margin-top": "0px",
@@ -2141,7 +2148,7 @@ var p$10 = {
2141
2148
  appearance: "none",
2142
2149
  cursor: "pointer"
2143
2150
  };
2144
- var m$6 = (e, t, { field: n, icon: r } = {}) => ({
2151
+ var m$7 = (e, t, { field: n, icon: r } = {}) => ({
2145
2152
  name: e,
2146
2153
  displayMode: "desktop",
2147
2154
  style: {
@@ -2150,14 +2157,14 @@ var m$6 = (e, t, { field: n, icon: r } = {}) => ({
2150
2157
  ...n ? { field: { default: n } } : {},
2151
2158
  ...r ? { icon: { default: r } } : {},
2152
2159
  label: { default: a$21 },
2153
- requiredMark: { default: s$19 },
2160
+ requiredMark: { default: s$20 },
2154
2161
  error: { default: o$23 }
2155
2162
  }
2156
2163
  });
2157
2164
  var h$4 = { field: l$13 };
2158
2165
  var g$4 = t$60()({
2159
2166
  type: "formControl",
2160
- attributeValues: { subType: e$39()([
2167
+ attributeValues: { subType: e$40()([
2161
2168
  "text",
2162
2169
  "number",
2163
2170
  "email",
@@ -2196,7 +2203,7 @@ var g$4 = t$60()({
2196
2203
  autoFocus: !1,
2197
2204
  disabled: !1,
2198
2205
  options: [],
2199
- required: !0,
2206
+ required: !1,
2200
2207
  requiredMessage: "",
2201
2208
  minLength: 0,
2202
2209
  minLengthMessage: "",
@@ -2212,7 +2219,7 @@ var g$4 = t$60()({
2212
2219
  definition: {
2213
2220
  label: "Form Control",
2214
2221
  type: "formControl",
2215
- description: "A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. A select offers its `options`: `[{ label, value }, …]` — the text shown, and what the field takes. A `switch` is a checkbox announced and drawn as an on/off switch (`role=\"switch\"`), for a setting that applies at once; both hold `true`/`false`, and a `defaultValue` of `\"true\"` starts them on. Its slots: `label`, `requiredMark` (the `*` that ends the label of a required field), `input` (the box a typed field or a select is drawn in — a textarea, checkbox or switch is its own box), `field` (the `<input>` or `<select>` inside that box), `icon` (the show/hide button of a password) and `error`. The thumb of a switch is no element a class reaches: the class on its `input` slot sets `--plitzi-switch-thumb` (off), `--plitzi-switch-thumb-checked` (on, white by default) and `--plitzi-switch-thumb-shadow`.",
2222
+ description: "A single labelled input (text/select/checkbox/… per its subType) inside a form; captures one field of user input. Optional unless `required: true`, as an HTML field is: a `requiredMessage` alone requires nothing. A select offers its `options`: `[{ label, value }, …]` — the text shown, and what the field takes. A `switch` is a checkbox announced and drawn as an on/off switch (`role=\"switch\"`), for a setting that applies at once; both hold `true`/`false`, and a `defaultValue` of `\"true\"` starts them on. Its slots: `label`, `requiredMark` (the `*` that ends the label of a required field), `input` (the box a typed field or a select is drawn in — a textarea, checkbox or switch is its own box), `field` (the `<input>` or `<select>` inside that box), `icon` (the show/hide button of a password) and `error`. The box is ringed (`2px solid currentColor`) while the field inside has keyboard focus: restyle it with a `focus-within` state on the `input` slot — the box never takes `focus` itself. The thumb of a switch is no element a class reaches: the class on its `input` slot sets `--plitzi-switch-thumb` (off), `--plitzi-switch-thumb-checked` (on, white by default) and `--plitzi-switch-thumb-shadow`.",
2216
2223
  bindings: {},
2217
2224
  styleSelectors: {
2218
2225
  base: "",
@@ -2248,26 +2255,26 @@ var g$4 = t$60()({
2248
2255
  displayMode: "desktop",
2249
2256
  style: { base: { default: {} } },
2250
2257
  subTypes: {
2251
- hidden: m$6("Form Control Hidden", {}),
2252
- text: m$6("Form Control Text", r$32, h$4),
2253
- number: m$6("Form Control Number", r$32, h$4),
2254
- email: m$6("Form Control Email", r$32, h$4),
2255
- password: m$6("Form Control Password", r$32, {
2258
+ hidden: m$7("Form Control Hidden", {}),
2259
+ text: m$7("Form Control Text", r$31, h$4),
2260
+ number: m$7("Form Control Number", r$31, h$4),
2261
+ email: m$7("Form Control Email", r$31, h$4),
2262
+ password: m$7("Form Control Password", r$31, {
2256
2263
  ...h$4,
2257
- icon: d$13
2264
+ icon: d$12
2258
2265
  }),
2259
- search: m$6("Form Control Search", r$32, h$4),
2260
- url: m$6("Form Control URL", r$32, h$4),
2261
- tel: m$6("Form Control Phone", r$32, h$4),
2262
- date: m$6("Form Control Date", r$32, h$4),
2263
- time: m$6("Form Control Time", r$32, h$4),
2264
- color: m$6("Form Control Color", r$32, h$4),
2265
- textarea: m$6("Form Control Textarea", {
2266
- ...r$32,
2266
+ search: m$7("Form Control Search", r$31, h$4),
2267
+ url: m$7("Form Control URL", r$31, h$4),
2268
+ tel: m$7("Form Control Phone", r$31, h$4),
2269
+ date: m$7("Form Control Date", r$31, h$4),
2270
+ time: m$7("Form Control Time", r$31, h$4),
2271
+ color: m$7("Form Control Color", r$31, h$4),
2272
+ textarea: m$7("Form Control Textarea", {
2273
+ ...r$31,
2267
2274
  color: "inherit",
2268
2275
  resize: "vertical"
2269
2276
  }),
2270
- select: m$6("Form Control Select", f$11, { field: u$13 }),
2277
+ select: m$7("Form Control Select", f$10, { field: u$14 }),
2271
2278
  checkbox: {
2272
2279
  name: "Form Control Checkbox",
2273
2280
  displayMode: "desktop",
@@ -2279,8 +2286,8 @@ var g$4 = t$60()({
2279
2286
  "margin-left": "0px",
2280
2287
  "margin-right": "4px"
2281
2288
  } },
2282
- label: { default: i$25 },
2283
- requiredMark: { default: s$19 },
2289
+ label: { default: i$26 },
2290
+ requiredMark: { default: s$20 },
2284
2291
  error: { default: o$23 }
2285
2292
  }
2286
2293
  },
@@ -2289,12 +2296,12 @@ var g$4 = t$60()({
2289
2296
  displayMode: "desktop",
2290
2297
  style: {
2291
2298
  base: { default: {} },
2292
- input: { default: p$10 },
2299
+ input: { default: p$11 },
2293
2300
  label: { default: {
2294
- ...i$25,
2301
+ ...i$26,
2295
2302
  "align-items": "center"
2296
2303
  } },
2297
- requiredMark: { default: s$19 },
2304
+ requiredMark: { default: s$20 },
2298
2305
  error: { default: o$23 }
2299
2306
  }
2300
2307
  }
@@ -2307,7 +2314,7 @@ var g$4 = t$60()({
2307
2314
  //#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
2308
2315
  var n$36 = t$60()({
2309
2316
  type: "layoutContainer",
2310
- attributeValues: { subType: e$39()([
2317
+ attributeValues: { subType: e$40()([
2311
2318
  "div",
2312
2319
  "header",
2313
2320
  "footer",
@@ -2445,6 +2452,11 @@ var t$49 = t$60()({
2445
2452
  //#region ../sdk-elements/dist/elements/internal/Page/declaration.mjs
2446
2453
  var t$48 = t$60()({
2447
2454
  type: "page",
2455
+ serverTemplates: [
2456
+ "seoPageTitle",
2457
+ "seoPageDescription",
2458
+ "notFound"
2459
+ ],
2448
2460
  triggers: { onPageLoad: {
2449
2461
  action: "onPageLoad",
2450
2462
  title: "On Page Load",
@@ -2618,12 +2630,12 @@ var t$46 = t$60()({
2618
2630
  var n$35 = t$60()({
2619
2631
  type: "image",
2620
2632
  attributeValues: {
2621
- fetchPriority: e$39()([
2633
+ fetchPriority: e$40()([
2622
2634
  "high",
2623
2635
  "low",
2624
2636
  "auto"
2625
2637
  ]),
2626
- loadMode: e$39()([
2638
+ loadMode: e$40()([
2627
2639
  "auto",
2628
2640
  "eager",
2629
2641
  "lazy"
@@ -2778,7 +2790,7 @@ var t$44 = t$60()({
2778
2790
  var n$34 = t$60()({
2779
2791
  type: "apiContainer",
2780
2792
  attributeValues: {
2781
- subType: e$39()([
2793
+ subType: e$40()([
2782
2794
  "",
2783
2795
  "div",
2784
2796
  "header",
@@ -2791,25 +2803,26 @@ var n$34 = t$60()({
2791
2803
  "address",
2792
2804
  "figure"
2793
2805
  ]),
2794
- method: e$39()([
2806
+ method: e$40()([
2795
2807
  "get",
2796
2808
  "post",
2797
2809
  "put",
2798
2810
  "delete",
2799
2811
  "patch"
2800
2812
  ]),
2801
- credentials: e$39()([
2813
+ credentials: e$40()([
2802
2814
  "include",
2803
2815
  "omit",
2804
2816
  "same-origin"
2805
2817
  ]),
2806
- pagination: e$39()([
2818
+ pagination: e$40()([
2807
2819
  "none",
2808
2820
  "url",
2809
2821
  "append"
2810
2822
  ])
2811
2823
  },
2812
2824
  sourceType: "apiContainer",
2825
+ serverTemplates: ["notFound"],
2813
2826
  triggers: {
2814
2827
  onApiError: {
2815
2828
  action: "onApiError",
@@ -2916,7 +2929,7 @@ var n$34 = t$60()({
2916
2929
  definition: {
2917
2930
  label: "Api Container",
2918
2931
  type: "apiContainer",
2919
- description: "Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: \"div\"`, `section`, …); otherwise style its parent or a child.",
2932
+ description: "Fetches data from a backend HTTP API (its `query`/`method`/`credentials`) and exposes the response as a data source ITS DESCENDANTS bind to (source `apiContainer_<id>.data`; only elements inside it can consume it). This is how you get backend data into the frontend. Its `mockData` prop is builder-only sample data — the published runtime fetches the real `query`, so always set a real query for production. With `cache: true` a browser request is kept for `staleTime` seconds (default 30) and shared with every provider asking the same thing; it is off unless set. A flow refreshes it with `performQuery` or the global `invalidateQueries` step, and `refreshSeconds` makes it ask again on its own every N seconds (either runtime; paused while the tab is hidden) — the way to keep a queue, feed or status board current without a plugin. A server provider (`runtime: \"server\"`) whose answer means the address shows nothing — a record not found — says so in `notFound`, a template against its answer (`{{ source.found == false }}`): the page is sent with status 404, rendered as written. Its `subType` (container tag) is empty by default, and then it renders NO element of its own: its children lay out directly in its parent, and any class, variant or style binding on it applies to nothing. To style the provider itself give it a tag (`subType: \"div\"`, `section`, …); otherwise style its parent or a child.",
2920
2933
  items: [],
2921
2934
  bindings: {},
2922
2935
  styleSelectors: { base: "" },
@@ -2953,7 +2966,7 @@ var n$34 = t$60()({
2953
2966
  //#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
2954
2967
  var n$33 = t$60()({
2955
2968
  type: "channel",
2956
- attributeValues: { subType: e$39()([
2969
+ attributeValues: { subType: e$40()([
2957
2970
  "",
2958
2971
  "div",
2959
2972
  "section",
@@ -3073,8 +3086,53 @@ var n$33 = t$60()({
3073
3086
  }
3074
3087
  });
3075
3088
  //#endregion
3076
- //#region ../sdk-elements/dist/elements/structure/Carousel/declaration.mjs
3089
+ //#region ../sdk-elements/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs
3077
3090
  var t$43 = t$60()({
3091
+ type: "carouselTrack",
3092
+ ancestorType: "carousel",
3093
+ content: {
3094
+ attributes: {},
3095
+ definition: {
3096
+ label: "Carousel Track",
3097
+ type: "carouselTrack",
3098
+ description: "Where a carousel shows its slides: what is inside is one slide, rendered once per item.",
3099
+ items: [],
3100
+ bindings: {},
3101
+ styleSelectors: { base: "" },
3102
+ initialState: { visibility: !0 }
3103
+ },
3104
+ builder: {
3105
+ canDelete: !0,
3106
+ canSelect: !0,
3107
+ canDragDrop: !0,
3108
+ canMove: !0,
3109
+ canSnippet: !1,
3110
+ itemsAllowed: [],
3111
+ itemsNotAllowed: []
3112
+ },
3113
+ market: {
3114
+ category: "structure",
3115
+ owner: "Plitzi",
3116
+ verified: !0,
3117
+ license: "MIT",
3118
+ website: "https://plitzi.com",
3119
+ backgroundColor: "#4422ee",
3120
+ icon: "fa-solid fa-film"
3121
+ },
3122
+ defaultStyle: {
3123
+ name: "Carousel Track",
3124
+ displayMode: "desktop",
3125
+ style: { base: { default: {
3126
+ position: "relative",
3127
+ overflow: "hidden"
3128
+ } } }
3129
+ },
3130
+ settings: {}
3131
+ }
3132
+ });
3133
+ //#endregion
3134
+ //#region ../sdk-elements/dist/elements/structure/Carousel/declaration.mjs
3135
+ var t$42 = t$60()({
3078
3136
  type: "carousel",
3079
3137
  sourceType: "carousel",
3080
3138
  triggers: { onChange: {
@@ -3177,51 +3235,6 @@ var t$43 = t$60()({
3177
3235
  initialItems: ["carouselTrack"]
3178
3236
  });
3179
3237
  //#endregion
3180
- //#region ../sdk-elements/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs
3181
- var t$42 = t$60()({
3182
- type: "carouselTrack",
3183
- ancestorType: "carousel",
3184
- content: {
3185
- attributes: {},
3186
- definition: {
3187
- label: "Carousel Track",
3188
- type: "carouselTrack",
3189
- description: "Where a carousel shows its slides: what is inside is one slide, rendered once per item.",
3190
- items: [],
3191
- bindings: {},
3192
- styleSelectors: { base: "" },
3193
- initialState: { visibility: !0 }
3194
- },
3195
- builder: {
3196
- canDelete: !0,
3197
- canSelect: !0,
3198
- canDragDrop: !0,
3199
- canMove: !0,
3200
- canSnippet: !1,
3201
- itemsAllowed: [],
3202
- itemsNotAllowed: []
3203
- },
3204
- market: {
3205
- category: "structure",
3206
- owner: "Plitzi",
3207
- verified: !0,
3208
- license: "MIT",
3209
- website: "https://plitzi.com",
3210
- backgroundColor: "#4422ee",
3211
- icon: "fa-solid fa-film"
3212
- },
3213
- defaultStyle: {
3214
- name: "Carousel Track",
3215
- displayMode: "desktop",
3216
- style: { base: { default: {
3217
- position: "relative",
3218
- overflow: "hidden"
3219
- } } }
3220
- },
3221
- settings: {}
3222
- }
3223
- });
3224
- //#endregion
3225
3238
  //#region ../sdk-elements/dist/elements/structure/Container/declaration.mjs
3226
3239
  var n$32 = [
3227
3240
  "div",
@@ -3234,10 +3247,10 @@ var n$32 = [
3234
3247
  "aside",
3235
3248
  "figure"
3236
3249
  ];
3237
- var r$31 = t$60()({
3250
+ var r$30 = t$60()({
3238
3251
  type: "container",
3239
3252
  attributeValues: {
3240
- subType: e$39()([
3253
+ subType: e$40()([
3241
3254
  "div",
3242
3255
  "header",
3243
3256
  "footer",
@@ -3261,7 +3274,7 @@ var r$31 = t$60()({
3261
3274
  "p",
3262
3275
  "span"
3263
3276
  ]),
3264
- live: e$39()([
3277
+ live: e$40()([
3265
3278
  "",
3266
3279
  "polite",
3267
3280
  "assertive"
@@ -3355,11 +3368,11 @@ var B = {
3355
3368
  ApiContainer: n$34,
3356
3369
  BlockHtml: t$59,
3357
3370
  BlockJsx: t$58,
3358
- Button: r$34,
3359
- Carousel: t$43,
3360
- CarouselTrack: t$42,
3371
+ Button: r$33,
3372
+ Carousel: t$42,
3373
+ CarouselTrack: t$43,
3361
3374
  Channel: n$33,
3362
- Container: r$31,
3375
+ Container: r$30,
3363
3376
  Custom: t$57,
3364
3377
  DialogContainer: t$60()({
3365
3378
  type: "dialogContainer",
@@ -3490,8 +3503,7 @@ var B = {
3490
3503
  top: "0",
3491
3504
  position: "absolute",
3492
3505
  "z-index": "210",
3493
- "background-color": "black",
3494
- opacity: "0.5"
3506
+ "background-color": "rgb(0 0 0 / 50%)"
3495
3507
  } },
3496
3508
  rootContainer: { default: {
3497
3509
  display: "flex",
@@ -3562,8 +3574,8 @@ var B = {
3562
3574
  List: t$60()({
3563
3575
  type: "list",
3564
3576
  attributeValues: {
3565
- subType: e$39()(["ul", "ol"]),
3566
- source: e$39()(["none", "controlled"])
3577
+ subType: e$40()(["ul", "ol"]),
3578
+ source: e$40()(["none", "controlled"])
3567
3579
  },
3568
3580
  sourceType: "list",
3569
3581
  content: {
@@ -3726,7 +3738,7 @@ var B = {
3726
3738
  definition: {
3727
3739
  label: "Modal Container",
3728
3740
  type: "modalContainer",
3729
- description: "A modal overlay container opened and closed through interactions; use for dialogs over the page.",
3741
+ description: "A modal overlay container opened and closed through interactions; use for dialogs over the page. The element itself is fixed over the whole viewport, and holds two layers side by side — neither inside the other: `backgroundContainer`, the dim layer, `rgb(0 0 0 / 50%)` (its `background-color` is the whole dim), and `rootContainer`, the dialog, centred by `top: 50%`, `left: 50%` and `transform: translate3d(-50%, -50%, 0)` — to sit it near the top, set `top` and `transform: translateX(-50%)`; flex alignment on the dim layer moves nothing. Inside the dialog, top to bottom: `headerContainer` (with `headerTitle` and `headerCloseButton`) and `bodyContainer`.",
3730
3742
  items: [],
3731
3743
  bindings: {},
3732
3744
  loadStrategy: "lazy",
@@ -3778,8 +3790,7 @@ var B = {
3778
3790
  top: "0",
3779
3791
  position: "absolute",
3780
3792
  "z-index": "210",
3781
- "background-color": "black",
3782
- opacity: "0.5"
3793
+ "background-color": "rgb(0 0 0 / 50%)"
3783
3794
  } },
3784
3795
  rootContainer: { default: {
3785
3796
  display: "flex",
@@ -3863,8 +3874,8 @@ var B = {
3863
3874
  Pagination: t$60()({
3864
3875
  type: "pagination",
3865
3876
  attributeValues: {
3866
- mode: e$39()(["pages", "loadMore"]),
3867
- target: e$39()(["url", "interaction"])
3877
+ mode: e$40()(["pages", "loadMore"]),
3878
+ target: e$40()(["url", "interaction"])
3868
3879
  },
3869
3880
  triggers: { onPageChange: {
3870
3881
  action: "onPageChange",
@@ -4113,9 +4124,10 @@ var B = {
4113
4124
  }
4114
4125
  }),
4115
4126
  Text: t$51,
4116
- ThemeToggle: r$33,
4127
+ ThemeToggle: r$32,
4117
4128
  Video: t$44
4118
4129
  };
4130
+ var V = Object.fromEntries(Object.values(B).flatMap((e) => "serverTemplates" in e ? [[e.type, e.serverTemplates]] : []));
4119
4131
  //#endregion
4120
4132
  //#region src/elements/catalog.ts
4121
4133
  /** Every declaration, read through the part of its shape this catalog uses. */
@@ -4147,7 +4159,7 @@ var elementSourceTypes = Object.fromEntries(Object.values(declarations).filter((
4147
4159
  * element that fires it ever starts the flow — an `onSubmit` on a form's submit button is saved, looks right beside
4148
4160
  * the form, and never runs, which is how a working form reads as "forms do not work outside the builder".
4149
4161
  */
4150
- var elementTriggers = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, [...Object.keys(e$40), ...Object.keys(declaration.triggers ?? {})]]));
4162
+ var elementTriggers = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, [...Object.keys(e$41), ...Object.keys(declaration.triggers ?? {})]]));
4151
4163
  /** The triggers only some types fire, by action name — for a step builder that wants the title the builder shows. */
4152
4164
  var typeTriggerDefinitions = Object.fromEntries(Object.values(declarations).flatMap((declaration) => Object.entries(declaration.triggers ?? {})));
4153
4165
  /** The callbacks only some types answer to, by action name — with their params, for whatever explains or checks one. */
@@ -4278,6 +4290,11 @@ var AUTHORING_CODES = {
4278
4290
  means: "a page that sends visitors it is not for to a page the space does not have",
4279
4291
  fix: "a page's id or slug (`''` is the home page), or a full URL"
4280
4292
  },
4293
+ "page-template": {
4294
+ kind: "refused",
4295
+ means: "a template in a page's `seoTitle`, `seoDescription` or `notFound` that reads what is not there when the server answers — anything but the page's `runtime: 'server'` providers and `navigation` — or cannot be read",
4296
+ fix: "read the record from a provider with `runtime: 'server'` on the page or its layout — `'{{ apiContainer_post.title }} — Blog'` — or words of its own"
4297
+ },
4281
4298
  "folder-undeclared": {
4282
4299
  kind: "refused",
4283
4300
  means: "a page, a layout or a folder filed in a folder the space does not declare",
@@ -4453,6 +4470,11 @@ var AUTHORING_CODES = {
4453
4470
  means: "an ancestor condition keyed by something that is neither a class name nor `'>'` (the parent)",
4454
4471
  fix: "`[card.name]` for a `styles()` declaration, or `'>'` for the parent whatever it wears"
4455
4472
  },
4473
+ "focus-on-field-box": {
4474
+ kind: "warned",
4475
+ means: "a `focus` or `focus-visible` state on a text field's or a select's `input` slot — the box the field is drawn in, which never takes focus, so no ring is ever shown",
4476
+ fix: "`'focus-within'` on the same class, or the state on the `field` slot"
4477
+ },
4456
4478
  "heading-level-overridden": {
4457
4479
  kind: "warned",
4458
4480
  means: "a markdown's or richText's `heading` slot and a level's (`heading3`) both setting one property, the general class written later in the stylesheet — the level's value is lost",
@@ -4683,6 +4705,16 @@ var AUTHORING_CODES = {
4683
4705
  means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's",
4684
4706
  fix: "put the provider on the page, around the instance, and hand the component its rows as a prop"
4685
4707
  },
4708
+ "not-found-in-browser": {
4709
+ kind: "refused",
4710
+ means: "`notFound` on a provider asked from the browser — its answer arrives after the page was sent with its status",
4711
+ fix: "`runtime: 'server'` on the provider, or `visible` on the page's \"not found\" part instead"
4712
+ },
4713
+ "not-found-not-a-template": {
4714
+ kind: "refused",
4715
+ means: "`notFound`, a provider's or a page's, that is not one `{{ expression }}` — never `true`, so never a 404",
4716
+ fix: "`notFound: '{{ source.found == false }}'`"
4717
+ },
4686
4718
  "server-data-in-browser": {
4687
4719
  kind: "refused",
4688
4720
  means: "a provider asking for the project's own data (`/data/…`, read by its server from `src/data/` and never served) from the browser",
@@ -4703,6 +4735,11 @@ var AUTHORING_CODES = {
4703
4735
  means: "a control in a form with no `name` — its value never reaches `values`",
4704
4736
  fix: "`formControl({ name: 'email', … })`"
4705
4737
  },
4738
+ "required-message-unused": {
4739
+ kind: "warned",
4740
+ means: "a `requiredMessage` on a field nothing requires — fields are optional unless `required: true`, so it is never shown and an empty answer is sent",
4741
+ fix: "`required: true` on the field, or no message"
4742
+ },
4706
4743
  "form-control-name-taken": {
4707
4744
  kind: "warned",
4708
4745
  means: "two controls in one form with one name — one overwrites the other",
@@ -5168,6 +5205,11 @@ var AUTHORING_CODES = {
5168
5205
  means: "a colour written out in a class where the space has a token of that value — it stays put in the dark scheme",
5169
5206
  fix: "`var(--token)` when it should follow the scheme; a token of one value of its own when it must stay the same in both"
5170
5207
  },
5208
+ "not-found-page": {
5209
+ kind: "suggested",
5210
+ means: "a space with no page of its own for an address no other page answers — a plain one was added, in the home page’s layout, sent with status 404",
5211
+ fix: "a page whose slug is `'*'`: `{ id: 'not-found', name: 'Not found', slug: '*', layout: …, body: [...] }`"
5212
+ },
5171
5213
  "unused-component": {
5172
5214
  kind: "suggested",
5173
5215
  means: "a component no page, layout or other component places",
@@ -5367,7 +5409,7 @@ var twig = (parts, ...values) => parts.reduce((text, part, index) => {
5367
5409
  }, "");
5368
5410
  //#endregion
5369
5411
  //#region ../sdk-shared/dist/dataSource/globalSources.mjs
5370
- var e$38 = [
5412
+ var e$39 = [
5371
5413
  "variables",
5372
5414
  "navigation",
5373
5415
  "auth",
@@ -5377,7 +5419,7 @@ var e$38 = [
5377
5419
  "flags",
5378
5420
  "computed"
5379
5421
  ];
5380
- e$38.filter((e) => e !== "state" && e !== "computed");
5422
+ e$39.filter((e) => e !== "state" && e !== "computed");
5381
5423
  var n$28 = {
5382
5424
  navigation: {
5383
5425
  routeParams: "open",
@@ -5401,7 +5443,7 @@ var n$28 = {
5401
5443
  };
5402
5444
  //#endregion
5403
5445
  //#region ../sdk-shared/dist/helpers/twigWrapper/charClass.mjs
5404
- var e$37 = {
5446
+ var e$38 = {
5405
5447
  Tab: 9,
5406
5448
  Newline: 10,
5407
5449
  CarriageReturn: 13,
@@ -5437,41 +5479,41 @@ var e$37 = {
5437
5479
  LowerR: 114,
5438
5480
  LowerT: 116
5439
5481
  };
5440
- var t$33 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$37.Underscore;
5441
- var n$27 = (n) => t$33(n) || n >= e$37.Zero && n <= e$37.Nine;
5442
- var r$29 = (t) => n$27(t) || t === e$37.Minus;
5443
- var i$24 = (t) => t >= e$37.Zero && t <= e$37.Nine;
5444
- var a$20 = (t) => t === e$37.Space || t === e$37.Tab || t === e$37.Newline || t === e$37.CarriageReturn;
5482
+ var t$33 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$38.Underscore;
5483
+ var n$27 = (n) => t$33(n) || n >= e$38.Zero && n <= e$38.Nine;
5484
+ var r$28 = (t) => n$27(t) || t === e$38.Minus;
5485
+ var i$25 = (t) => t >= e$38.Zero && t <= e$38.Nine;
5486
+ var a$20 = (t) => t === e$38.Space || t === e$38.Tab || t === e$38.Newline || t === e$38.CarriageReturn;
5445
5487
  var o$22 = (e) => {
5446
5488
  let r = e.length;
5447
5489
  if (r === 0 || !t$33(e.charCodeAt(0))) return !1;
5448
5490
  for (let t = 1; t < r; t++) if (!n$27(e.charCodeAt(t))) return !1;
5449
5491
  return !0;
5450
5492
  };
5451
- var s$18 = (r) => {
5493
+ var s$19 = (r) => {
5452
5494
  let a = r.length;
5453
5495
  if (a === 0 || !t$33(r.charCodeAt(0))) return !1;
5454
5496
  let o = !1, s = !1;
5455
5497
  for (let c = 1; c < a; c++) {
5456
5498
  let a = r.charCodeAt(c);
5457
- if (a === e$37.Dot) {
5499
+ if (a === e$38.Dot) {
5458
5500
  if (o) return !1;
5459
5501
  o = !0, s = !1;
5460
5502
  continue;
5461
5503
  }
5462
5504
  if (o) {
5463
- if (s = i$24(a), !s && !t$33(a)) return !1;
5505
+ if (s = i$25(a), !s && !t$33(a)) return !1;
5464
5506
  o = !1;
5465
5507
  continue;
5466
5508
  }
5467
- if (s ? !i$24(a) : !n$27(a)) return !1;
5509
+ if (s ? !i$25(a) : !n$27(a)) return !1;
5468
5510
  }
5469
5511
  return !o;
5470
5512
  };
5471
5513
  var c$17 = (e) => o$22(e);
5472
5514
  //#endregion
5473
5515
  //#region ../sdk-shared/dist/helpers/twigWrapper/Lexer/Lexer.mjs
5474
- var e$36 = (e) => {
5516
+ var e$37 = (e) => {
5475
5517
  let t = [], n = 0;
5476
5518
  for (; n < e.length;) {
5477
5519
  let r = e.indexOf("{{", n), i = e.indexOf("{%", n), a, o;
@@ -5523,11 +5565,11 @@ var e$36 = (e) => {
5523
5565
  };
5524
5566
  //#endregion
5525
5567
  //#region ../sdk-shared/dist/helpers/twigWrapper/Lexer/types.mjs
5526
- var e$35 = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`;
5568
+ var e$36 = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`;
5527
5569
  var t$32 = (t) => {
5528
5570
  switch (t.type) {
5529
5571
  case "text": return t.value;
5530
- case "variable": return e$35(t.content, t.raw);
5572
+ case "variable": return e$36(t.content, t.raw);
5531
5573
  case "tag": return `{%${t.content}%}`;
5532
5574
  }
5533
5575
  };
@@ -5554,29 +5596,29 @@ var o$21 = class {
5554
5596
  }
5555
5597
  scanName() {
5556
5598
  let e = this.pos;
5557
- if (!this.eof() && t$33(this.src.charCodeAt(this.pos))) for (this.pos++; !this.eof() && r$29(this.src.charCodeAt(this.pos));) this.pos++;
5599
+ if (!this.eof() && t$33(this.src.charCodeAt(this.pos))) for (this.pos++; !this.eof() && r$28(this.src.charCodeAt(this.pos));) this.pos++;
5558
5600
  return this.src.slice(e, this.pos);
5559
5601
  }
5560
5602
  scanIndex() {
5561
5603
  let e = this.pos;
5562
- for (; !this.eof() && i$24(this.src.charCodeAt(this.pos));) this.pos++;
5604
+ for (; !this.eof() && i$25(this.src.charCodeAt(this.pos));) this.pos++;
5563
5605
  return this.src.slice(e, this.pos);
5564
5606
  }
5565
5607
  scanStringLiteral() {
5566
5608
  let t = this.src.charCodeAt(this.pos);
5567
5609
  this.pos++;
5568
5610
  let n = "";
5569
- for (; this.pos < this.src.length && this.src.charCodeAt(this.pos) !== t;) if (this.src.charCodeAt(this.pos) === e$37.Backslash && this.pos + 1 < this.src.length) {
5611
+ for (; this.pos < this.src.length && this.src.charCodeAt(this.pos) !== t;) if (this.src.charCodeAt(this.pos) === e$38.Backslash && this.pos + 1 < this.src.length) {
5570
5612
  this.pos++;
5571
5613
  let r = this.src.charCodeAt(this.pos);
5572
- r === e$37.LowerN ? n += "\n" : r === e$37.LowerT ? n += " " : r === e$37.LowerR ? n += "\r" : r === e$37.Backslash ? n += "\\" : n += r === t ? String.fromCharCode(r) : String.fromCharCode(e$37.Backslash) + String.fromCharCode(r), this.pos++;
5614
+ r === e$38.LowerN ? n += "\n" : r === e$38.LowerT ? n += " " : r === e$38.LowerR ? n += "\r" : r === e$38.Backslash ? n += "\\" : n += r === t ? String.fromCharCode(r) : String.fromCharCode(e$38.Backslash) + String.fromCharCode(r), this.pos++;
5573
5615
  } else n += this.src[this.pos], this.pos++;
5574
5616
  return this.pos < this.src.length && this.pos++, n;
5575
5617
  }
5576
5618
  scanNumber() {
5577
5619
  let n = this.pos;
5578
- for (this.src.charCodeAt(this.pos) === e$37.Minus && this.pos++; this.pos < this.src.length && i$24(this.src.charCodeAt(this.pos));) this.pos++;
5579
- if (this.src.charCodeAt(this.pos) === e$37.Dot) for (this.pos++; this.pos < this.src.length && i$24(this.src.charCodeAt(this.pos));) this.pos++;
5620
+ for (this.src.charCodeAt(this.pos) === e$38.Minus && this.pos++; this.pos < this.src.length && i$25(this.src.charCodeAt(this.pos));) this.pos++;
5621
+ if (this.src.charCodeAt(this.pos) === e$38.Dot) for (this.pos++; this.pos < this.src.length && i$25(this.src.charCodeAt(this.pos));) this.pos++;
5580
5622
  return Number(this.src.slice(n, this.pos));
5581
5623
  }
5582
5624
  matchKeyword(e) {
@@ -5588,28 +5630,28 @@ var o$21 = class {
5588
5630
  matchBinaryOp() {
5589
5631
  this.skipWs();
5590
5632
  let t = this.peek();
5591
- if (this.at(1) === e$37.Equals) {
5592
- if (t === e$37.Equals) return this.pos += 2, "==";
5593
- if (t === e$37.Bang) return this.pos += 2, "!=";
5594
- if (t === e$37.Greater) return this.pos += 2, ">=";
5595
- if (t === e$37.Less) return this.pos += 2, "<=";
5633
+ if (this.at(1) === e$38.Equals) {
5634
+ if (t === e$38.Equals) return this.pos += 2, "==";
5635
+ if (t === e$38.Bang) return this.pos += 2, "!=";
5636
+ if (t === e$38.Greater) return this.pos += 2, ">=";
5637
+ if (t === e$38.Less) return this.pos += 2, "<=";
5596
5638
  }
5597
- return t === e$37.Greater ? (this.pos++, ">") : t === e$37.Less ? (this.pos++, "<") : null;
5639
+ return t === e$38.Greater ? (this.pos++, ">") : t === e$38.Less ? (this.pos++, "<") : null;
5598
5640
  }
5599
5641
  };
5600
5642
  //#endregion
5601
5643
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs
5602
- var r$28 = (e, t) => {
5603
- let n = new s$17(e, t), r = n.parseTernary();
5644
+ var r$27 = (e, t) => {
5645
+ let n = new s$18(e, t), r = n.parseTernary();
5604
5646
  return n.expectEnd(), r;
5605
5647
  };
5606
- var i$23 = (e, t) => {
5607
- let n = new s$17(e, t), r = n.parseApplyChain();
5648
+ var i$24 = (e, t) => {
5649
+ let n = new s$18(e, t), r = n.parseApplyChain();
5608
5650
  return n.expectEnd(), r;
5609
5651
  };
5610
5652
  var a$19 = ["same as", "divisible by"];
5611
5653
  var o$20 = "`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`.";
5612
- var s$17 = class extends o$21 {
5654
+ var s$18 = class extends o$21 {
5613
5655
  issues;
5614
5656
  constructor(e, t) {
5615
5657
  super(e), this.issues = t;
@@ -5629,15 +5671,15 @@ var s$17 = class extends o$21 {
5629
5671
  }
5630
5672
  parseTernary() {
5631
5673
  let t = this.parseOr();
5632
- if (this.skipWs(), this.peek() !== e$37.Question) return t;
5633
- if (this.pos++, this.skipWs(), this.peek() === e$37.Colon) return this.pos++, this.skipWs(), {
5674
+ if (this.skipWs(), this.peek() !== e$38.Question) return t;
5675
+ if (this.pos++, this.skipWs(), this.peek() === e$38.Colon) return this.pos++, this.skipWs(), {
5634
5676
  type: "ternary",
5635
5677
  condition: t,
5636
5678
  trueExpr: null,
5637
5679
  falseExpr: this.parseTernary()
5638
5680
  };
5639
5681
  let n = this.parseOr();
5640
- return this.skipWs(), this.peek() === e$37.Colon ? (this.pos++, this.skipWs(), {
5682
+ return this.skipWs(), this.peek() === e$38.Colon ? (this.pos++, this.skipWs(), {
5641
5683
  type: "ternary",
5642
5684
  condition: t,
5643
5685
  trueExpr: n,
@@ -5723,7 +5765,7 @@ var s$17 = class extends o$21 {
5723
5765
  return this.pos = this.src.length, {
5724
5766
  type: "unary",
5725
5767
  operator: "not",
5726
- operand: r$28(t, this.issues)
5768
+ operand: r$27(t, this.issues)
5727
5769
  };
5728
5770
  }
5729
5771
  if (this.matchKeyword("in")) {
@@ -5789,7 +5831,7 @@ var s$17 = class extends o$21 {
5789
5831
  }
5790
5832
  parseConcat() {
5791
5833
  let t = this.parseAdditive();
5792
- for (this.skipWs(); this.peek() === e$37.Tilde;) {
5834
+ for (this.skipWs(); this.peek() === e$38.Tilde;) {
5793
5835
  this.pos++;
5794
5836
  let e = this.parseAdditive();
5795
5837
  t = t.type === "concat" ? {
@@ -5805,9 +5847,9 @@ var s$17 = class extends o$21 {
5805
5847
  parseAdditive() {
5806
5848
  let t = this.parseMultiplicative();
5807
5849
  this.skipWs();
5808
- for (let n = this.peek(); n === e$37.Plus || n === e$37.Minus; n = this.peek()) this.pos++, t = {
5850
+ for (let n = this.peek(); n === e$38.Plus || n === e$38.Minus; n = this.peek()) this.pos++, t = {
5809
5851
  type: "binary",
5810
- operator: n === e$37.Plus ? "+" : "-",
5852
+ operator: n === e$38.Plus ? "+" : "-",
5811
5853
  left: t,
5812
5854
  right: this.parseMultiplicative()
5813
5855
  }, this.skipWs();
@@ -5816,11 +5858,11 @@ var s$17 = class extends o$21 {
5816
5858
  parseMultiplicative() {
5817
5859
  let t = this.parsePower();
5818
5860
  this.skipWs();
5819
- for (let n = this.peek(); (n === e$37.Star || n === e$37.Slash || n === e$37.Percent) && (n !== e$37.Star || this.at(1) !== e$37.Star); n = this.peek()) {
5820
- let r = n === e$37.Slash && this.at(1) === e$37.Slash;
5861
+ for (let n = this.peek(); (n === e$38.Star || n === e$38.Slash || n === e$38.Percent) && (n !== e$38.Star || this.at(1) !== e$38.Star); n = this.peek()) {
5862
+ let r = n === e$38.Slash && this.at(1) === e$38.Slash;
5821
5863
  this.pos += r ? 2 : 1, t = {
5822
5864
  type: "binary",
5823
- operator: r ? "//" : n === e$37.Star ? "*" : n === e$37.Slash ? "/" : "%",
5865
+ operator: r ? "//" : n === e$38.Star ? "*" : n === e$38.Slash ? "/" : "%",
5824
5866
  left: t,
5825
5867
  right: this.parsePower()
5826
5868
  }, this.skipWs();
@@ -5829,7 +5871,7 @@ var s$17 = class extends o$21 {
5829
5871
  }
5830
5872
  parsePower() {
5831
5873
  let t = this.parseDefault();
5832
- return this.skipWs(), this.peek() !== e$37.Star || this.at(1) !== e$37.Star ? t : (this.pos += 2, {
5874
+ return this.skipWs(), this.peek() !== e$38.Star || this.at(1) !== e$38.Star ? t : (this.pos += 2, {
5833
5875
  type: "binary",
5834
5876
  operator: "**",
5835
5877
  left: t,
@@ -5837,27 +5879,27 @@ var s$17 = class extends o$21 {
5837
5879
  });
5838
5880
  }
5839
5881
  parseSignedAtom() {
5840
- return this.peek() === e$37.Minus && i$24(this.at(1)) ? this.maybeTrailingFilters({
5882
+ return this.peek() === e$38.Minus && i$25(this.at(1)) ? this.maybeTrailingFilters({
5841
5883
  type: "literal",
5842
5884
  value: this.scanNumber()
5843
- }) : this.peek() === e$37.Minus ? (this.pos++, this.skipWs(), {
5885
+ }) : this.peek() === e$38.Minus ? (this.pos++, this.skipWs(), {
5844
5886
  type: "unary",
5845
5887
  operator: "-",
5846
5888
  operand: this.parseSignedAtom()
5847
5889
  }) : this.parseAtom();
5848
5890
  }
5849
5891
  parseDefault() {
5850
- if (this.skipWs(), this.peek() === e$37.Minus && i$24(this.at(1))) return this.maybeTrailingFilters({
5892
+ if (this.skipWs(), this.peek() === e$38.Minus && i$25(this.at(1))) return this.maybeTrailingFilters({
5851
5893
  type: "literal",
5852
5894
  value: this.scanNumber()
5853
5895
  });
5854
- if (this.peek() === e$37.Minus) return this.pos++, {
5896
+ if (this.peek() === e$38.Minus) return this.pos++, {
5855
5897
  type: "unary",
5856
5898
  operator: "-",
5857
5899
  operand: this.parseDefault()
5858
5900
  };
5859
5901
  let n = this.parseAtom();
5860
- for (this.skipWs(); this.peek() === e$37.Question && this.at(1) === e$37.Question;) this.pos += 2, this.skipWs(), n = {
5902
+ for (this.skipWs(); this.peek() === e$38.Question && this.at(1) === e$38.Question;) this.pos += 2, this.skipWs(), n = {
5861
5903
  type: "default",
5862
5904
  value: n,
5863
5905
  defaultExpr: this.parseSignedAtom()
@@ -5867,7 +5909,7 @@ var s$17 = class extends o$21 {
5867
5909
  parseAtom() {
5868
5910
  this.skipWs();
5869
5911
  let n = this.peek();
5870
- if (n === e$37.LParen) {
5912
+ if (n === e$38.LParen) {
5871
5913
  this.pos++, this.skipWs();
5872
5914
  let t = this.pos, n = this.tryParseArrowParams();
5873
5915
  if (n !== null) return this.maybeTrailingFilters({
@@ -5877,38 +5919,38 @@ var s$17 = class extends o$21 {
5877
5919
  });
5878
5920
  this.pos = t;
5879
5921
  let r = this.parseTernary();
5880
- return this.expectChar(e$37.RParen, "a closing \")\""), this.maybeTrailingFilters(this.parseAccessChain(r, null));
5922
+ return this.expectChar(e$38.RParen, "a closing \")\""), this.maybeTrailingFilters(this.parseAccessChain(r, null));
5881
5923
  }
5882
- if (n === e$37.SingleQuote || n === e$37.DoubleQuote) return this.maybeTrailingFilters({
5924
+ if (n === e$38.SingleQuote || n === e$38.DoubleQuote) return this.maybeTrailingFilters({
5883
5925
  type: "literal",
5884
5926
  value: this.scanStringLiteral()
5885
5927
  });
5886
- if (i$24(n)) return this.maybeTrailingFilters({
5928
+ if (i$25(n)) return this.maybeTrailingFilters({
5887
5929
  type: "literal",
5888
5930
  value: this.scanNumber()
5889
5931
  });
5890
- if (n === e$37.LBracket) {
5932
+ if (n === e$38.LBracket) {
5891
5933
  this.pos++;
5892
5934
  let t = {
5893
5935
  type: "array",
5894
- elements: this.parseArgList(e$37.RBracket)
5936
+ elements: this.parseArgList(e$38.RBracket)
5895
5937
  };
5896
5938
  return this.maybeTrailingFilters(this.parseAccessChain(t, null));
5897
5939
  }
5898
- return n === e$37.LBrace ? (this.pos++, this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(), null))) : this.parsePathOrFunctionOrArrow();
5940
+ return n === e$38.LBrace ? (this.pos++, this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(), null))) : this.parsePathOrFunctionOrArrow();
5899
5941
  }
5900
5942
  tryParseArrowParams() {
5901
5943
  let t = this.pos, n = [];
5902
- for (this.skipWs(); this.peek() !== e$37.RParen;) {
5944
+ for (this.skipWs(); this.peek() !== e$38.RParen;) {
5903
5945
  let r = this.scanName();
5904
5946
  if (!r) return this.pos = t, null;
5905
- if (n.push(r), this.skipWs(), this.peek() === e$37.Comma) {
5947
+ if (n.push(r), this.skipWs(), this.peek() === e$38.Comma) {
5906
5948
  this.pos++, this.skipWs();
5907
5949
  continue;
5908
5950
  }
5909
5951
  break;
5910
5952
  }
5911
- return this.skipWs(), this.peek() === e$37.RParen && (this.pos++, this.skipWs(), this.peek() === e$37.Equals && this.at(1) === e$37.Greater) ? (this.pos += 2, n) : (this.pos = t, null);
5953
+ return this.skipWs(), this.peek() === e$38.RParen && (this.pos++, this.skipWs(), this.peek() === e$38.Equals && this.at(1) === e$38.Greater) ? (this.pos += 2, n) : (this.pos = t, null);
5912
5954
  }
5913
5955
  parsePathOrFunctionOrArrow() {
5914
5956
  let t = this.scanName();
@@ -5924,14 +5966,14 @@ var s$17 = class extends o$21 {
5924
5966
  type: "literal",
5925
5967
  value: null
5926
5968
  });
5927
- if (this.skipWs(), this.peek() === e$37.Equals && this.at(1) === e$37.Greater) return this.pos += 2, this.maybeTrailingFilters({
5969
+ if (this.skipWs(), this.peek() === e$38.Equals && this.at(1) === e$38.Greater) return this.pos += 2, this.maybeTrailingFilters({
5928
5970
  type: "arrow",
5929
5971
  params: [t],
5930
5972
  body: this.parseTernary()
5931
5973
  });
5932
- if (this.peek() === e$37.LParen) {
5974
+ if (this.peek() === e$38.LParen) {
5933
5975
  this.pos++;
5934
- let n = this.parseArgList(e$37.RParen);
5976
+ let n = this.parseArgList(e$38.RParen);
5935
5977
  return this.maybeTrailingFilters(this.parseAccessChain({
5936
5978
  type: "function",
5937
5979
  name: t,
@@ -5948,7 +5990,7 @@ var s$17 = class extends o$21 {
5948
5990
  let r = t, i = n;
5949
5991
  for (;;) {
5950
5992
  let t = this.peek();
5951
- if (t === e$37.Dot) {
5993
+ if (t === e$38.Dot) {
5952
5994
  let e = this.pos;
5953
5995
  this.pos++;
5954
5996
  let t = this.scanName() || this.scanIndex();
@@ -5966,10 +6008,10 @@ var s$17 = class extends o$21 {
5966
6008
  };
5967
6009
  continue;
5968
6010
  }
5969
- if (t !== e$37.LBracket) break;
6011
+ if (t !== e$38.LBracket) break;
5970
6012
  this.pos++;
5971
6013
  let n = this.parseTernary();
5972
- if (this.expectChar(e$37.RBracket, "a closing \"]\""), i && n.type === "literal" && (typeof n.value == "string" || typeof n.value == "number")) {
6014
+ if (this.expectChar(e$38.RBracket, "a closing \"]\""), i && n.type === "literal" && (typeof n.value == "string" || typeof n.value == "number")) {
5973
6015
  i.push(String(n.value));
5974
6016
  continue;
5975
6017
  }
@@ -5988,7 +6030,7 @@ var s$17 = class extends o$21 {
5988
6030
  } : r;
5989
6031
  }
5990
6032
  maybeTrailingFilters(t) {
5991
- return this.skipWs(), this.peek() === e$37.Pipe ? {
6033
+ return this.skipWs(), this.peek() === e$38.Pipe ? {
5992
6034
  type: "filter",
5993
6035
  subject: t,
5994
6036
  filters: this.parseTrailingFilters()
@@ -5996,32 +6038,32 @@ var s$17 = class extends o$21 {
5996
6038
  }
5997
6039
  parseObjectLiteral() {
5998
6040
  let t = [];
5999
- for (this.skipWs(); !this.eof() && this.peek() !== e$37.RBrace;) {
6041
+ for (this.skipWs(); !this.eof() && this.peek() !== e$38.RBrace;) {
6000
6042
  let n = this.parseObjectKey();
6001
- this.skipWs(), this.peek() === e$37.Colon && this.pos++, this.skipWs(), t.push({
6043
+ this.skipWs(), this.peek() === e$38.Colon && this.pos++, this.skipWs(), t.push({
6002
6044
  key: n,
6003
6045
  value: this.parseTernary()
6004
- }), this.skipWs(), this.peek() === e$37.Comma && (this.pos++, this.skipWs());
6046
+ }), this.skipWs(), this.peek() === e$38.Comma && (this.pos++, this.skipWs());
6005
6047
  }
6006
- return this.expectChar(e$37.RBrace, "a closing \"}\""), {
6048
+ return this.expectChar(e$38.RBrace, "a closing \"}\""), {
6007
6049
  type: "object",
6008
6050
  entries: t
6009
6051
  };
6010
6052
  }
6011
6053
  parseObjectKey() {
6012
6054
  let n = this.peek();
6013
- if (n === e$37.SingleQuote || n === e$37.DoubleQuote) return {
6055
+ if (n === e$38.SingleQuote || n === e$38.DoubleQuote) return {
6014
6056
  type: "literal",
6015
6057
  value: this.scanStringLiteral()
6016
6058
  };
6017
- if (i$24(n)) return {
6059
+ if (i$25(n)) return {
6018
6060
  type: "literal",
6019
6061
  value: this.scanNumber()
6020
6062
  };
6021
- if (n === e$37.LParen) {
6063
+ if (n === e$38.LParen) {
6022
6064
  this.pos++, this.skipWs();
6023
6065
  let t = this.parseTernary();
6024
- return this.skipWs(), this.peek() === e$37.RParen && this.pos++, t;
6066
+ return this.skipWs(), this.peek() === e$38.RParen && this.pos++, t;
6025
6067
  }
6026
6068
  return {
6027
6069
  type: "literal",
@@ -6030,25 +6072,25 @@ var s$17 = class extends o$21 {
6030
6072
  }
6031
6073
  parseArgList(t) {
6032
6074
  let n = [];
6033
- for (this.skipWs(); !this.eof() && this.peek() !== t;) n.push(this.parseTernary()), this.skipWs(), this.peek() === e$37.Comma && (this.pos++, this.skipWs());
6034
- return this.expectChar(t, t === e$37.RParen ? "a closing \")\"" : "a closing \"]\""), n;
6075
+ for (this.skipWs(); !this.eof() && this.peek() !== t;) n.push(this.parseTernary()), this.skipWs(), this.peek() === e$38.Comma && (this.pos++, this.skipWs());
6076
+ return this.expectChar(t, t === e$38.RParen ? "a closing \")\"" : "a closing \"]\""), n;
6035
6077
  }
6036
6078
  parseTrailingFilters() {
6037
6079
  let t = [];
6038
- for (; this.peek() === e$37.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6080
+ for (; this.peek() === e$38.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6039
6081
  return t;
6040
6082
  }
6041
6083
  parseApplyChain() {
6042
6084
  this.skipWs();
6043
6085
  let t = [this.readFilter()];
6044
- for (this.skipWs(); this.peek() === e$37.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6086
+ for (this.skipWs(); this.peek() === e$38.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6045
6087
  return t;
6046
6088
  }
6047
6089
  readFilter() {
6048
6090
  let t = this.scanName();
6049
- return t || this.report(`A "|" with no filter name after it in "${this.src.trim()}"`), this.skipWs(), this.peek() === e$37.LParen ? (this.pos++, {
6091
+ return t || this.report(`A "|" with no filter name after it in "${this.src.trim()}"`), this.skipWs(), this.peek() === e$38.LParen ? (this.pos++, {
6050
6092
  name: t,
6051
- args: this.parseArgList(e$37.RParen)
6093
+ args: this.parseArgList(e$38.RParen)
6052
6094
  }) : {
6053
6095
  name: t,
6054
6096
  args: []
@@ -6062,20 +6104,20 @@ var n$26 = (e) => {
6062
6104
  for (; n < e.length && !a$20(e.charCodeAt(n));) n++;
6063
6105
  return e.slice(0, n);
6064
6106
  };
6065
- var r$27 = (t) => {
6107
+ var r$26 = (t) => {
6066
6108
  let n = 0;
6067
6109
  for (let r = 0; r + 1 < t.length; r++) {
6068
6110
  let i = t.charCodeAt(r);
6069
6111
  if (n !== 0) i === n && (n = 0);
6070
- else if (i === e$37.SingleQuote || i === e$37.DoubleQuote) n = i;
6071
- else if (i === e$37.Dot && t.charCodeAt(r + 1) === e$37.Dot) return [t.slice(0, r).trim(), t.slice(r + 2).trim()];
6112
+ else if (i === e$38.SingleQuote || i === e$38.DoubleQuote) n = i;
6113
+ else if (i === e$38.Dot && t.charCodeAt(r + 1) === e$38.Dot) return [t.slice(0, r).trim(), t.slice(r + 2).trim()];
6072
6114
  }
6073
6115
  return null;
6074
6116
  };
6075
6117
  //#endregion
6076
6118
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/Parser.mjs
6077
6119
  var c$16 = (e, t = !1, n) => {
6078
- let r = new f$10(e, t, n), i = r.parseBody();
6120
+ let r = new f$9(e, t, n), i = r.parseBody();
6079
6121
  if (!r.error) {
6080
6122
  let e = r.peek();
6081
6123
  if (e && e.type === "tag") {
@@ -6096,7 +6138,7 @@ var l$12 = /* @__PURE__ */ new Set([
6096
6138
  "else",
6097
6139
  "elseif"
6098
6140
  ]);
6099
- var u$12 = () => ({
6141
+ var u$13 = () => ({
6100
6142
  type: "if",
6101
6143
  condition: {
6102
6144
  type: "literal",
@@ -6106,7 +6148,7 @@ var u$12 = () => ({
6106
6148
  elseifClauses: [],
6107
6149
  elseBody: null
6108
6150
  });
6109
- var d$12 = () => ({
6151
+ var d$11 = () => ({
6110
6152
  type: "for",
6111
6153
  valueVar: "_item",
6112
6154
  keyVar: null,
@@ -6117,7 +6159,7 @@ var d$12 = () => ({
6117
6159
  body: [],
6118
6160
  elseBody: null
6119
6161
  });
6120
- var f$10 = class {
6162
+ var f$9 = class {
6121
6163
  tokens;
6122
6164
  keepEmptyTokens;
6123
6165
  issues;
@@ -6167,7 +6209,7 @@ var f$10 = class {
6167
6209
  },
6168
6210
  source: ""
6169
6211
  };
6170
- let r = t.content.trim(), i = this.keepEmptyTokens ? e$35(t.content, t.raw) : "";
6212
+ let r = t.content.trim(), i = this.keepEmptyTokens ? e$36(t.content, t.raw) : "";
6171
6213
  if (o$22(r)) return {
6172
6214
  type: "variable",
6173
6215
  raw: t.raw,
@@ -6177,7 +6219,7 @@ var f$10 = class {
6177
6219
  },
6178
6220
  source: i
6179
6221
  };
6180
- let o = r$28(r, this.issues);
6222
+ let o = r$27(r, this.issues);
6181
6223
  return {
6182
6224
  type: "variable",
6183
6225
  raw: t.raw,
@@ -6202,17 +6244,17 @@ var f$10 = class {
6202
6244
  parseIf() {
6203
6245
  this.advance();
6204
6246
  let e = this.tokens[this.pos - 1];
6205
- if (e.type !== "tag") return this.error = "Malformed {% if %} tag", u$12();
6247
+ if (e.type !== "tag") return this.error = "Malformed {% if %} tag", u$13();
6206
6248
  let t = e.content.trim(), n = t.indexOf(" ") === -1 ? "" : t.slice(t.indexOf(" ") + 1).trim();
6207
- if (!n) return this.error = "Malformed {% if %} tag: missing condition", u$12();
6208
- let r = r$28(n, this.issues), i = this.parseBody(), s = [], c = null, l = !1;
6249
+ if (!n) return this.error = "Malformed {% if %} tag: missing condition", u$13();
6250
+ let r = r$27(n, this.issues), i = this.parseBody(), s = [], c = null, l = !1;
6209
6251
  for (; this.peek();) {
6210
6252
  let e = this.peek();
6211
6253
  if (!e || e.type !== "tag") break;
6212
6254
  let t = n$26(e.content.trim());
6213
6255
  if (t === "elseif") {
6214
6256
  this.advance();
6215
- let t = e.content.trim(), r = r$28(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
6257
+ let t = e.content.trim(), r = r$27(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
6216
6258
  s.push({
6217
6259
  condition: r,
6218
6260
  body: i
@@ -6235,16 +6277,16 @@ var f$10 = class {
6235
6277
  let e = this.pos;
6236
6278
  this.advance();
6237
6279
  let n = this.tokens[this.pos - 1];
6238
- if (n.type !== "tag") return d$12();
6280
+ if (n.type !== "tag") return d$11();
6239
6281
  let r = n.content.trim(), i = r.slice(r.indexOf(" ") + 1).trim(), c = /\sin\s/.exec(i);
6240
- if (!c) return this.error = "Invalid {% for %} syntax: missing the `in` keyword", d$12();
6241
- let l = i.slice(0, c.index).trim(), u = i.slice(c.index + c[0].length).trim(), f = r$27(u), p = f ? {
6282
+ if (!c) return this.error = "Invalid {% for %} syntax: missing the `in` keyword", d$11();
6283
+ let l = i.slice(0, c.index).trim(), u = i.slice(c.index + c[0].length).trim(), f = r$26(u), p = f ? {
6242
6284
  type: "range",
6243
- start: r$28(f[0], this.issues),
6244
- end: r$28(f[1], this.issues)
6245
- } : r$28(u, this.issues), m = l.indexOf(","), h = m === -1 ? null : l.slice(0, m).trim(), g = m === -1 ? l : l.slice(m + 1).trim();
6246
- if (!c$17(g)) return this.error = `Invalid {% for %} variable name: "${g}"`, d$12();
6247
- if (h !== null && !c$17(h)) return this.error = `Invalid {% for %} key variable name: "${h}"`, d$12();
6285
+ start: r$27(f[0], this.issues),
6286
+ end: r$27(f[1], this.issues)
6287
+ } : r$27(u, this.issues), m = l.indexOf(","), h = m === -1 ? null : l.slice(0, m).trim(), g = m === -1 ? l : l.slice(m + 1).trim();
6288
+ if (!c$17(g)) return this.error = `Invalid {% for %} variable name: "${g}"`, d$11();
6289
+ if (h !== null && !c$17(h)) return this.error = `Invalid {% for %} key variable name: "${h}"`, d$11();
6248
6290
  let _ = this.parseBody(), v = null;
6249
6291
  if (this.peek()) {
6250
6292
  let e = this.peek();
@@ -6291,7 +6333,7 @@ var f$10 = class {
6291
6333
  return {
6292
6334
  type: "set",
6293
6335
  name: n.slice(0, r).trim(),
6294
- value: r$28(n.slice(r + 1).trim(), this.issues)
6336
+ value: r$27(n.slice(r + 1).trim(), this.issues)
6295
6337
  };
6296
6338
  }
6297
6339
  parseApply() {
@@ -6302,7 +6344,7 @@ var f$10 = class {
6302
6344
  filters: [],
6303
6345
  body: []
6304
6346
  };
6305
- let t = e.content.trim(), r = i$23(t.slice(t.indexOf(" ") + 1).trim(), this.issues), a = this.parseBody(), o = this.peek();
6347
+ let t = e.content.trim(), r = i$24(t.slice(t.indexOf(" ") + 1).trim(), this.issues), a = this.parseBody(), o = this.peek();
6306
6348
  return o && o.type === "tag" && this.advance(), {
6307
6349
  type: "apply",
6308
6350
  filters: r,
@@ -6312,8 +6354,8 @@ var f$10 = class {
6312
6354
  };
6313
6355
  //#endregion
6314
6356
  //#region ../sdk-shared/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs
6315
- var r$26 = /* @__PURE__ */ new Map();
6316
- var i$22 = 1024;
6357
+ var r$25 = /* @__PURE__ */ new Map();
6358
+ var i$23 = 1024;
6317
6359
  var a$18 = {
6318
6360
  hits: 0,
6319
6361
  misses: 0
@@ -6326,7 +6368,7 @@ var c$15 = (t) => {
6326
6368
  n = !0;
6327
6369
  break;
6328
6370
  }
6329
- if (a.type === "variable" && !s$18(a.content.trim())) {
6371
+ if (a.type === "variable" && !s$19(a.content.trim())) {
6330
6372
  r = !1;
6331
6373
  break;
6332
6374
  }
@@ -6337,13 +6379,13 @@ var c$15 = (t) => {
6337
6379
  };
6338
6380
  };
6339
6381
  var l$11 = () => {
6340
- if (r$26.size >= i$22) {
6341
- let e = r$26.keys().next().value;
6342
- e !== void 0 && r$26.delete(e);
6382
+ if (r$25.size >= i$23) {
6383
+ let e = r$25.keys().next().value;
6384
+ e !== void 0 && r$25.delete(e);
6343
6385
  }
6344
6386
  };
6345
- var u$11 = (e) => {
6346
- let r = e$36(e);
6387
+ var u$12 = (e) => {
6388
+ let r = e$37(e);
6347
6389
  if (r.error) return null;
6348
6390
  let i = r.tokens, { hasTags: a, allSimpleOrDotted: o } = c$15(i), s = a || !o, l = null, u = null;
6349
6391
  if (s) {
@@ -6364,12 +6406,12 @@ var u$11 = (e) => {
6364
6406
  nodesWithSource: u
6365
6407
  };
6366
6408
  };
6367
- var d$11 = (e) => {
6368
- let t = r$26.get(e);
6409
+ var d$10 = (e) => {
6410
+ let t = r$25.get(e);
6369
6411
  if (t) return a$18.hits++, t;
6370
6412
  a$18.misses++;
6371
- let n = u$11(e);
6372
- return n ? (l$11(), r$26.set(e, n), n) : null;
6413
+ let n = u$12(e);
6414
+ return n ? (l$11(), r$25.set(e, n), n) : null;
6373
6415
  };
6374
6416
  //#endregion
6375
6417
  //#region ../sdk-shared/dist/helpers/twigWrapper/templateRoots.mjs
@@ -6388,15 +6430,15 @@ var t$31 = (e, n) => {
6388
6430
  }
6389
6431
  };
6390
6432
  var n$25 = (n) => {
6391
- let r = d$11(n);
6433
+ let r = d$10(n);
6392
6434
  if (!r) return [];
6393
6435
  let i = /* @__PURE__ */ new Set();
6394
6436
  return t$31(r.nodes ?? r.nodesWithSource, i), [...i];
6395
6437
  };
6396
- var r$25 = (e) => [...new Set(n$25(e).map((e) => e.split(".")[0]))];
6438
+ var r$24 = (e) => [...new Set(n$25(e).map((e) => e.split(".")[0]))];
6397
6439
  //#endregion
6398
6440
  //#region ../sdk-shared/dist/style/styleConstants.mjs
6399
- var e$34 = {
6441
+ var e$35 = {
6400
6442
  platform: {
6401
6443
  desktop: {},
6402
6444
  tablet: {},
@@ -6589,6 +6631,8 @@ var t$30 = {
6589
6631
  TEXT_INDENT: "text-indent",
6590
6632
  TEXT_TRANSFORM: "text-transform",
6591
6633
  DIRECTION: "direction",
6634
+ WRITING_MODE: "writing-mode",
6635
+ TEXT_ORIENTATION: "text-orientation",
6592
6636
  WHITE_SPACE: "white-space",
6593
6637
  TEXT_WRAP: "text-wrap",
6594
6638
  WORD_BREAK: "word-break",
@@ -6636,12 +6680,12 @@ Object.values(t$30).map((e) => ({
6636
6680
  path: e,
6637
6681
  label: e
6638
6682
  }));
6639
- t$30.DISPLAY, t$30.FLEX_WRAP, t$30.FLEX_DIRECTION, t$30.ALIGN_ITEMS, t$30.JUSTIFY_ITEMS, t$30.JUSTIFY_CONTENT, t$30.ALIGN_CONTENT, t$30.ROW_GAP, t$30.COLUMN_GAP, t$30.GRID_ROW_GAP, t$30.GRID_COLUMN_GAP, t$30.GRID_TEMPLATE_AREAS, t$30.GRID_TEMPLATE_COLUMNS, t$30.GRID_TEMPLATE_ROWS, t$30.GRID_AUTO_FLOW, t$30.GRID_AUTO_ROWS, t$30.GRID_AUTO_COLUMNS, t$30.GRID_ROW_START, t$30.GRID_COLUMN_START, t$30.GRID_ROW_END, t$30.GRID_COLUMN_END, t$30.ALIGN_SELF, t$30.JUSTIFY_SELF, t$30.ORDER, t$30.FLEX_GROW, t$30.FLEX_SHRINK, t$30.FLEX_BASIS, t$30.LIST_STYLE, t$30.LIST_STYLE_TYPE, t$30.LIST_STYLE_POSITION, t$30.LIST_STYLE_IMAGE, t$30.BACKGROUND_COLOR, t$30.BACKGROUND_IMAGE, t$30.BACKGROUND_POSITION, t$30.BACKGROUND_SIZE, t$30.BACKGROUND_CLIP, t$30.BACKGROUND_ORIGIN, t$30.BACKGROUND_REPEAT, t$30.BACKGROUND_ATTACHMENT, t$30.BACKGROUND_BLEND_MODE, t$30.MASK_IMAGE, t$30.MASK_SIZE, t$30.MASK_POSITION, t$30.MASK_REPEAT, t$30.MASK_COMPOSITE, t$30.WEBKIT_MASK_IMAGE, t$30.BORDER_TOP_STYLE, t$30.BORDER_TOP_WIDTH, t$30.BORDER_TOP_COLOR, t$30.BORDER_BOTTOM_STYLE, t$30.BORDER_BOTTOM_WIDTH, t$30.BORDER_BOTTOM_COLOR, t$30.BORDER_LEFT_STYLE, t$30.BORDER_LEFT_WIDTH, t$30.BORDER_LEFT_COLOR, t$30.BORDER_RIGHT_STYLE, t$30.BORDER_RIGHT_WIDTH, t$30.BORDER_RIGHT_COLOR, t$30.BORDER_TOP_LEFT_RADIUS, t$30.BORDER_TOP_RIGHT_RADIUS, t$30.BORDER_BOTTOM_LEFT_RADIUS, t$30.BORDER_BOTTOM_RIGHT_RADIUS, t$30.BORDER_COLLAPSE, t$30.BORDER_SPACING, t$30.TABLE_LAYOUT, t$30.OPACITY, t$30.VISIBILITY, t$30.CURSOR, t$30.TRANSITION, t$30.TRANSITION_PROPERTY, t$30.TRANSITION_DURATION, t$30.TRANSITION_TIMING_FUNCTION, t$30.TRANSITION_DELAY, t$30.TRANSITION_BEHAVIOR, t$30.ANIMATION, t$30.ANIMATION_NAME, t$30.ANIMATION_DURATION, t$30.ANIMATION_TIMING_FUNCTION, t$30.ANIMATION_DELAY, t$30.ANIMATION_ITERATION_COUNT, t$30.ANIMATION_DIRECTION, t$30.ANIMATION_FILL_MODE, t$30.ANIMATION_PLAY_STATE, t$30.ANIMATION_TIMELINE, t$30.ANIMATION_RANGE, t$30.BOX_SHADOW, t$30.FILTER, t$30.BACKDROP_FILTER, t$30.MIX_BLEND_MODE, t$30.ISOLATION, t$30.CLIP_PATH, t$30.TRANSFORM, t$30.TRANSFORM_ORIGIN, t$30.TRANSLATE, t$30.ROTATE, t$30.SCALE, t$30.TRANSFORM_STYLE, t$30.PERSPECTIVE, t$30.PERSPECTIVE_ORIGIN, t$30.BACKFACE_VISIBILITY, t$30.WILL_CHANGE, t$30.OUTLINE_WIDTH, t$30.OUTLINE_STYLE, t$30.OUTLINE_COLOR, t$30.OUTLINE_OFFSET, t$30.POINTER_EVENTS, t$30.USER_SELECT, t$30.TOUCH_ACTION, t$30.RESIZE, t$30.APPEARANCE, t$30.SCROLL_BEHAVIOR, t$30.OVERSCROLL_BEHAVIOR, t$30.SCROLL_SNAP_TYPE, t$30.SCROLL_SNAP_ALIGN, t$30.SCROLL_SNAP_STOP, t$30.SCROLL_PADDING_TOP, t$30.SCROLL_MARGIN_TOP, t$30.ACCENT_COLOR, t$30.CARET_COLOR, t$30.COLOR_SCHEME, t$30.POSITION, t$30.FLOAT, t$30.CLEAR, t$30.Z_INDEX, t$30.TOP, t$30.BOTTOM, t$30.LEFT, t$30.RIGHT, t$30.BOX_SIZING, t$30.ASPECT_RATIO, t$30.WIDTH, t$30.HEIGHT, t$30.MIN_WIDTH, t$30.MIN_HEIGHT, t$30.MAX_WIDTH, t$30.MAX_HEIGHT, t$30.OVERFLOW, t$30.OVERFLOW_X, t$30.OVERFLOW_Y, t$30.SCROLLBAR_WIDTH, t$30.SCROLLBAR_COLOR, t$30.CONTAINER_TYPE, t$30.CONTENT, t$30.CONTAINER_NAME, t$30.OBJECT_FIT, t$30.OBJECT_POSITION, t$30.COLUMN_WIDTH, t$30.COLUMN_COUNT, t$30.MARGIN_TOP, t$30.MARGIN_BOTTOM, t$30.MARGIN_LEFT, t$30.MARGIN_RIGHT, t$30.PADDING_TOP, t$30.PADDING_BOTTOM, t$30.PADDING_LEFT, t$30.PADDING_RIGHT, t$30.FONT_FAMILY, t$30.FONT_WEIGHT, t$30.FONT_SIZE, t$30.LINE_HEIGHT, t$30.COLOR, t$30.TEXT_ALIGN, t$30.FONT_STYLE, t$30.FONT_VARIANT, t$30.FONT_VARIANT_NUMERIC, t$30.FONT_FEATURE_SETTINGS, t$30.TEXT_DECORATION, t$30.TEXT_DECORATION_LINE, t$30.TEXT_DECORATION_COLOR, t$30.TEXT_DECORATION_STYLE, t$30.TEXT_DECORATION_THICKNESS, t$30.TEXT_UNDERLINE_OFFSET, t$30.LETTER_SPACING, t$30.WORD_SPACING, t$30.TEXT_INDENT, t$30.TEXT_TRANSFORM, t$30.DIRECTION, t$30.WHITE_SPACE, t$30.TEXT_WRAP, t$30.WORD_BREAK, t$30.OVERFLOW_WRAP, t$30.HYPHENS, t$30.VERTICAL_ALIGN, t$30.TEXT_OVERFLOW, t$30.TEXT_SHADOW, t$30.LINE_CLAMP, t$30.WEBKIT_LINE_CLAMP, t$30.WEBKIT_BOX_ORIENT, t$30.WEBKIT_TEXT_FILL_COLOR, t$30.WEBKIT_BACKGROUND_CLIP, t$30.BOX_DECORATION_BREAK, t$30.WEBKIT_BOX_DECORATION_BREAK, t$30.FILL, t$30.STROKE, t$30.STROKE_WIDTH;
6683
+ t$30.DISPLAY, t$30.FLEX_WRAP, t$30.FLEX_DIRECTION, t$30.ALIGN_ITEMS, t$30.JUSTIFY_ITEMS, t$30.JUSTIFY_CONTENT, t$30.ALIGN_CONTENT, t$30.ROW_GAP, t$30.COLUMN_GAP, t$30.GRID_ROW_GAP, t$30.GRID_COLUMN_GAP, t$30.GRID_TEMPLATE_AREAS, t$30.GRID_TEMPLATE_COLUMNS, t$30.GRID_TEMPLATE_ROWS, t$30.GRID_AUTO_FLOW, t$30.GRID_AUTO_ROWS, t$30.GRID_AUTO_COLUMNS, t$30.GRID_ROW_START, t$30.GRID_COLUMN_START, t$30.GRID_ROW_END, t$30.GRID_COLUMN_END, t$30.ALIGN_SELF, t$30.JUSTIFY_SELF, t$30.ORDER, t$30.FLEX_GROW, t$30.FLEX_SHRINK, t$30.FLEX_BASIS, t$30.LIST_STYLE, t$30.LIST_STYLE_TYPE, t$30.LIST_STYLE_POSITION, t$30.LIST_STYLE_IMAGE, t$30.BACKGROUND_COLOR, t$30.BACKGROUND_IMAGE, t$30.BACKGROUND_POSITION, t$30.BACKGROUND_SIZE, t$30.BACKGROUND_CLIP, t$30.BACKGROUND_ORIGIN, t$30.BACKGROUND_REPEAT, t$30.BACKGROUND_ATTACHMENT, t$30.BACKGROUND_BLEND_MODE, t$30.MASK_IMAGE, t$30.MASK_SIZE, t$30.MASK_POSITION, t$30.MASK_REPEAT, t$30.MASK_COMPOSITE, t$30.WEBKIT_MASK_IMAGE, t$30.BORDER_TOP_STYLE, t$30.BORDER_TOP_WIDTH, t$30.BORDER_TOP_COLOR, t$30.BORDER_BOTTOM_STYLE, t$30.BORDER_BOTTOM_WIDTH, t$30.BORDER_BOTTOM_COLOR, t$30.BORDER_LEFT_STYLE, t$30.BORDER_LEFT_WIDTH, t$30.BORDER_LEFT_COLOR, t$30.BORDER_RIGHT_STYLE, t$30.BORDER_RIGHT_WIDTH, t$30.BORDER_RIGHT_COLOR, t$30.BORDER_TOP_LEFT_RADIUS, t$30.BORDER_TOP_RIGHT_RADIUS, t$30.BORDER_BOTTOM_LEFT_RADIUS, t$30.BORDER_BOTTOM_RIGHT_RADIUS, t$30.BORDER_COLLAPSE, t$30.BORDER_SPACING, t$30.TABLE_LAYOUT, t$30.OPACITY, t$30.VISIBILITY, t$30.CURSOR, t$30.TRANSITION, t$30.TRANSITION_PROPERTY, t$30.TRANSITION_DURATION, t$30.TRANSITION_TIMING_FUNCTION, t$30.TRANSITION_DELAY, t$30.TRANSITION_BEHAVIOR, t$30.ANIMATION, t$30.ANIMATION_NAME, t$30.ANIMATION_DURATION, t$30.ANIMATION_TIMING_FUNCTION, t$30.ANIMATION_DELAY, t$30.ANIMATION_ITERATION_COUNT, t$30.ANIMATION_DIRECTION, t$30.ANIMATION_FILL_MODE, t$30.ANIMATION_PLAY_STATE, t$30.ANIMATION_TIMELINE, t$30.ANIMATION_RANGE, t$30.BOX_SHADOW, t$30.FILTER, t$30.BACKDROP_FILTER, t$30.MIX_BLEND_MODE, t$30.ISOLATION, t$30.CLIP_PATH, t$30.TRANSFORM, t$30.TRANSFORM_ORIGIN, t$30.TRANSLATE, t$30.ROTATE, t$30.SCALE, t$30.TRANSFORM_STYLE, t$30.PERSPECTIVE, t$30.PERSPECTIVE_ORIGIN, t$30.BACKFACE_VISIBILITY, t$30.WILL_CHANGE, t$30.OUTLINE_WIDTH, t$30.OUTLINE_STYLE, t$30.OUTLINE_COLOR, t$30.OUTLINE_OFFSET, t$30.POINTER_EVENTS, t$30.USER_SELECT, t$30.TOUCH_ACTION, t$30.RESIZE, t$30.APPEARANCE, t$30.SCROLL_BEHAVIOR, t$30.OVERSCROLL_BEHAVIOR, t$30.SCROLL_SNAP_TYPE, t$30.SCROLL_SNAP_ALIGN, t$30.SCROLL_SNAP_STOP, t$30.SCROLL_PADDING_TOP, t$30.SCROLL_MARGIN_TOP, t$30.ACCENT_COLOR, t$30.CARET_COLOR, t$30.COLOR_SCHEME, t$30.POSITION, t$30.FLOAT, t$30.CLEAR, t$30.Z_INDEX, t$30.TOP, t$30.BOTTOM, t$30.LEFT, t$30.RIGHT, t$30.BOX_SIZING, t$30.ASPECT_RATIO, t$30.WIDTH, t$30.HEIGHT, t$30.MIN_WIDTH, t$30.MIN_HEIGHT, t$30.MAX_WIDTH, t$30.MAX_HEIGHT, t$30.OVERFLOW, t$30.OVERFLOW_X, t$30.OVERFLOW_Y, t$30.SCROLLBAR_WIDTH, t$30.SCROLLBAR_COLOR, t$30.CONTAINER_TYPE, t$30.CONTENT, t$30.CONTAINER_NAME, t$30.OBJECT_FIT, t$30.OBJECT_POSITION, t$30.COLUMN_WIDTH, t$30.COLUMN_COUNT, t$30.MARGIN_TOP, t$30.MARGIN_BOTTOM, t$30.MARGIN_LEFT, t$30.MARGIN_RIGHT, t$30.PADDING_TOP, t$30.PADDING_BOTTOM, t$30.PADDING_LEFT, t$30.PADDING_RIGHT, t$30.FONT_FAMILY, t$30.FONT_WEIGHT, t$30.FONT_SIZE, t$30.LINE_HEIGHT, t$30.COLOR, t$30.TEXT_ALIGN, t$30.FONT_STYLE, t$30.FONT_VARIANT, t$30.FONT_VARIANT_NUMERIC, t$30.FONT_FEATURE_SETTINGS, t$30.TEXT_DECORATION, t$30.TEXT_DECORATION_LINE, t$30.TEXT_DECORATION_COLOR, t$30.TEXT_DECORATION_STYLE, t$30.TEXT_DECORATION_THICKNESS, t$30.TEXT_UNDERLINE_OFFSET, t$30.LETTER_SPACING, t$30.WORD_SPACING, t$30.TEXT_INDENT, t$30.TEXT_TRANSFORM, t$30.DIRECTION, t$30.WRITING_MODE, t$30.TEXT_ORIENTATION, t$30.WHITE_SPACE, t$30.TEXT_WRAP, t$30.WORD_BREAK, t$30.OVERFLOW_WRAP, t$30.HYPHENS, t$30.VERTICAL_ALIGN, t$30.TEXT_OVERFLOW, t$30.TEXT_SHADOW, t$30.LINE_CLAMP, t$30.WEBKIT_LINE_CLAMP, t$30.WEBKIT_BOX_ORIENT, t$30.WEBKIT_TEXT_FILL_COLOR, t$30.WEBKIT_BACKGROUND_CLIP, t$30.BOX_DECORATION_BREAK, t$30.WEBKIT_BOX_DECORATION_BREAK, t$30.FILL, t$30.STROKE, t$30.STROKE_WIDTH;
6640
6684
  //#endregion
6641
6685
  //#region ../sdk-shared/dist/schema/schemaConstants.mjs
6642
6686
  var t$29 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
6643
6687
  var n$23 = "props";
6644
- var r$23 = {
6688
+ var r$22 = {
6645
6689
  schema: {
6646
6690
  definition: {
6647
6691
  name: "",
@@ -6654,7 +6698,7 @@ var r$23 = {
6654
6698
  pageFolders: [],
6655
6699
  components: {}
6656
6700
  },
6657
- style: e$34,
6701
+ style: e$35,
6658
6702
  definition: { rootId: "" }
6659
6703
  };
6660
6704
  //#endregion
@@ -6675,7 +6719,7 @@ var r$23 = {
6675
6719
  *
6676
6720
  * `computed` holds the space's own computed values (`SpaceSpec.computed`), by name.
6677
6721
  */
6678
- var GLOBAL_SOURCES = e$38;
6722
+ var GLOBAL_SOURCES = e$39;
6679
6723
  /** What an element inside a component can read besides its own tree: the globals, and what its instance hands in. */
6680
6724
  var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$23];
6681
6725
  /**
@@ -6862,7 +6906,7 @@ var activeOn = (cls, pages, options = {}) => {
6862
6906
  * one only has to be one of them.
6863
6907
  */
6864
6908
  var conditionSource = (template) => {
6865
- const roots = r$25(template);
6909
+ const roots = r$24(template);
6866
6910
  const global = roots.find((root) => GLOBAL_SOURCES.includes(root));
6867
6911
  if (global) return global;
6868
6912
  const element = roots.find((root) => root.includes("_"));
@@ -7304,25 +7348,25 @@ var themeToggle = defineElement(B.ThemeToggle);
7304
7348
  var video = defineElement(B.Video);
7305
7349
  //#endregion
7306
7350
  //#region ../sdk-schema/dist/helpers/elementId.mjs
7307
- var e$33 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
7308
- var t$28 = (t) => e$33.test(t);
7309
- var r$22 = (e) => new Set(Object.keys(e));
7310
- var i$20 = (e, n, r) => t$28(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`;
7351
+ var e$34 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
7352
+ var t$28 = (t) => e$34.test(t);
7353
+ var r$21 = (e) => new Set(Object.keys(e));
7354
+ var i$21 = (e, n, r) => t$28(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`;
7311
7355
  var a$17 = (e, t) => {
7312
7356
  let n = /* @__PURE__ */ new Set();
7313
7357
  for (let r of t) {
7314
- if (n.has(r.id) || i$20(e, r.id)) return !1;
7358
+ if (n.has(r.id) || i$21(e, r.id)) return !1;
7315
7359
  n.add(r.id);
7316
7360
  }
7317
7361
  return !0;
7318
7362
  };
7319
7363
  var o$19 = (e) => e.replace(/[^A-Za-z0-9]/g, "") || "element";
7320
- var s$16 = "abcdefghijklmnopqrstuvwxyz0123456789";
7364
+ var s$17 = "abcdefghijklmnopqrstuvwxyz0123456789";
7321
7365
  var c$14 = (e, t) => {
7322
7366
  let n = o$19(e);
7323
7367
  for (let e = 0; e < 100; e += 1) {
7324
7368
  let e = "";
7325
- for (let t = 0; t < 4; t += 1) e += s$16[Math.floor(Math.random() * s$16.length)];
7369
+ for (let t = 0; t < 4; t += 1) e += s$17[Math.floor(Math.random() * s$17.length)];
7326
7370
  if (!t(`${n}-${e}`)) return `${n}-${e}`;
7327
7371
  }
7328
7372
  return l$10(e, t);
@@ -7332,13 +7376,13 @@ var l$10 = (e, t) => {
7332
7376
  for (; t(`${n}-${r}`);) r += 1;
7333
7377
  return `${n}-${r}`;
7334
7378
  };
7335
- var u$10 = (e, t) => {
7379
+ var u$11 = (e, t) => {
7336
7380
  if (!t(e)) return e;
7337
7381
  let n = /^(.*[A-Za-z0-9])-(\d+)$/.exec(e), r = n ? n[1] : e, i = n ? Number(n[2]) + 1 : 2;
7338
7382
  for (; t(`${r}-${i}`);) i += 1;
7339
7383
  return `${r}-${i}`;
7340
7384
  };
7341
- var d$10 = {
7385
+ var d$9 = {
7342
7386
  page: [{ attribute: "layout" }, { attribute: "layoutContainer" }],
7343
7387
  reference: [{
7344
7388
  attribute: "referenceId",
@@ -7349,18 +7393,18 @@ var d$10 = {
7349
7393
  when: (e) => e.mode === "page"
7350
7394
  }]
7351
7395
  };
7352
- var f$9 = { navigate: [{
7396
+ var f$8 = { navigate: [{
7353
7397
  param: "url",
7354
7398
  when: (e) => e.urlType === "page"
7355
7399
  }] };
7356
- var p$9 = (e, t) => {
7400
+ var p$10 = (e, t) => {
7357
7401
  let n = e.indexOf("."), r = n === -1 ? e : e.slice(0, n), i = r.indexOf("_");
7358
7402
  if (i === -1) return e;
7359
7403
  let a = t[r.slice(i + 1)];
7360
7404
  return a ? `${r.slice(0, i + 1)}${a}${n === -1 ? "" : e.slice(n)}` : e;
7361
7405
  };
7362
- var m$5 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
7363
- var h$3 = (e, t) => e.replace(m$5, (e, n, r) => {
7406
+ var m$6 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
7407
+ var h$3 = (e, t) => e.replace(m$6, (e, n, r) => {
7364
7408
  let i = t[r];
7365
7409
  return i ? `${n}_${i}` : e;
7366
7410
  });
@@ -7395,19 +7439,19 @@ var _$3 = (e, t, n) => {
7395
7439
  t[n.id] && (n.id = t[n.id], e = !0);
7396
7440
  let { definition: r, attributes: o } = n;
7397
7441
  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);
7398
- for (let { attribute: n, when: i } of d$10[r.type] ?? []) {
7442
+ for (let { attribute: n, when: i } of d$9[r.type] ?? []) {
7399
7443
  let r = o[n];
7400
7444
  typeof r == "string" && t[r] && (!i || i(o)) && (o[n] = t[r], e = !0);
7401
7445
  }
7402
7446
  let { slot: s } = o;
7403
7447
  typeof s == "string" && t[s] && (o.slot = t[s], e = !0);
7404
7448
  for (let n of Object.values(r.bindings ?? {})) for (let r of n) {
7405
- let n = p$9(r.source, t);
7449
+ let n = p$10(r.source, t);
7406
7450
  n !== r.source && (r.source = n, e = !0), r.transformers && g$3(r.transformers, t) && (e = !0), r.when && g$3(r.when, t) && (e = !0);
7407
7451
  }
7408
7452
  for (let n of Object.values(r.interactions ?? {})) {
7409
7453
  n.elementId && t[n.elementId] && (n.elementId = t[n.elementId], e = !0);
7410
- for (let { param: r, when: i } of f$9[n.action] ?? []) {
7454
+ for (let { param: r, when: i } of f$8[n.action] ?? []) {
7411
7455
  let a = n.params[r];
7412
7456
  typeof a == "string" && t[a] && (!i || i(n.params)) && (n.params[r] = t[a], e = !0);
7413
7457
  }
@@ -7424,7 +7468,7 @@ var _$3 = (e, t, n) => {
7424
7468
  };
7425
7469
  //#endregion
7426
7470
  //#region ../sdk-shared/dist/helpers/isRecord.mjs
7427
- var e$32 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
7471
+ var e$33 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
7428
7472
  //#endregion
7429
7473
  //#region src/schema/guard.ts
7430
7474
  /**
@@ -7475,6 +7519,7 @@ var PAGE_SPEC_KEYS = [
7475
7519
  "isDefault",
7476
7520
  "seoTitle",
7477
7521
  "seoDescription",
7522
+ "notFound",
7478
7523
  "accessLevel",
7479
7524
  "unauthorizedRedirect",
7480
7525
  "folder",
@@ -7587,7 +7632,7 @@ var STEP_TYPES = [
7587
7632
  * written, when it depends on which one: a hint about one field is noise about every other.
7588
7633
  */
7589
7634
  function assertKnownKeys(value, keys, where, hint = "") {
7590
- if (!e$32(value)) throw new AuthoringError("element-shape", `${where} is ${value === null ? "null" : typeof value}, not an object.`);
7635
+ if (!e$33(value)) throw new AuthoringError("element-shape", `${where} is ${value === null ? "null" : typeof value}, not an object.`);
7591
7636
  for (const key of Object.keys(value)) if (!keys.includes(key)) throw new AuthoringError("unknown-field", `${where} has "${key}", which it does not take${didYouMean(key, keys) || "."} It takes ${keys.join(", ")}.${typeof hint === "string" ? hint : hint(key)}`);
7592
7637
  }
7593
7638
  /** Refuses an id nothing can name: empty, or with characters a template or a selector cannot carry. */
@@ -7618,27 +7663,27 @@ var paramIssue = (params, spec, where) => {
7618
7663
  if (unknown !== void 0) return `${where} has the param "${unknown}", which it does not take${didYouMean(unknown, names) || "."} It takes ${names.length > 0 ? names.join(", ") : "none"}.`;
7619
7664
  }
7620
7665
  const effective = c$19(provided, declared, false);
7621
- const invalid = s$22(provided, effective, declared).at(0);
7666
+ const invalid = s$23(provided, effective, declared).at(0);
7622
7667
  if (invalid) {
7623
7668
  const value = provided[invalid.key];
7624
7669
  const suggestion = typeof value === "string" && invalid.options ? didYouMean(value, invalid.options) : "";
7625
7670
  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}.`;
7626
7671
  }
7627
- const missing = r$36(provided, effective, declared).at(0);
7672
+ const missing = r$35(provided, effective, declared).at(0);
7628
7673
  return missing === void 0 ? void 0 : `${where} needs "${missing}": ${declared[missing].description}`;
7629
7674
  };
7630
7675
  //#endregion
7631
7676
  //#region ../sdk-schema/dist/helpers/elementTree.mjs
7632
- var e$31 = (e, t) => t && Object.hasOwn(e, t) ? e[t] : void 0;
7677
+ var e$32 = (e, t) => t && Object.hasOwn(e, t) ? e[t] : void 0;
7633
7678
  var t$27 = (t, n) => {
7634
7679
  let r = [], i = /* @__PURE__ */ new Set([n]);
7635
- for (let a = e$31(t, e$31(t, n)?.definition.parentId); a && !i.has(a.id);) i.add(a.id), r.push(a.id), a = e$31(t, a.definition.parentId);
7680
+ for (let a = e$32(t, e$32(t, n)?.definition.parentId); a && !i.has(a.id);) i.add(a.id), r.push(a.id), a = e$32(t, a.definition.parentId);
7636
7681
  return r;
7637
7682
  };
7638
7683
  var n$22 = (n, r) => {
7639
7684
  let i = [], a = /* @__PURE__ */ new Set([r]), o = (s) => {
7640
7685
  for (let c of [s, ...t$27(n, s)]) {
7641
- let t = e$31(n, c);
7686
+ let t = e$32(n, c);
7642
7687
  if (c !== s || s !== r) {
7643
7688
  if (a.has(c)) continue;
7644
7689
  a.add(c), i.push(c);
@@ -7649,31 +7694,31 @@ var n$22 = (n, r) => {
7649
7694
  };
7650
7695
  return o(r), i;
7651
7696
  };
7652
- var r$21 = (t, n) => {
7697
+ var r$20 = (t, n) => {
7653
7698
  let r = [], i = /* @__PURE__ */ new Set([n]), a = (n) => {
7654
- for (let o of e$31(t, n)?.definition.items ?? []) !i.has(o) && e$31(t, o) && (i.add(o), r.push(o), a(o));
7699
+ for (let o of e$32(t, n)?.definition.items ?? []) !i.has(o) && e$32(t, o) && (i.add(o), r.push(o), a(o));
7655
7700
  };
7656
7701
  return a(n), r;
7657
7702
  };
7658
7703
  //#endregion
7659
7704
  //#region ../sdk-shared/dist/style/breakpoints.mjs
7660
- var e$30 = {
7705
+ var e$31 = {
7661
7706
  desktop: 1024,
7662
7707
  tablet: 768,
7663
7708
  mobile: 0
7664
7709
  };
7665
- var t$26 = (t) => e$30[t] === 0 ? "0" : `${String(e$30[t] / 16)}rem`;
7710
+ var t$26 = (t) => e$31[t] === 0 ? "0" : `${String(e$31[t] / 16)}rem`;
7666
7711
  //#endregion
7667
7712
  //#region ../sdk-shared/dist/style/displayModes.mjs
7668
- var e$29 = [
7713
+ var e$30 = [
7669
7714
  "desktop",
7670
7715
  "tablet",
7671
7716
  "mobile"
7672
7717
  ];
7673
- var t$25 = (t) => e$29.some((e) => e === t);
7718
+ var t$25 = (t) => e$30.some((e) => e === t);
7674
7719
  //#endregion
7675
7720
  //#region ../sdk-shared/dist/style/fonts.mjs
7676
- var i$19 = (e) => {
7721
+ var i$20 = (e) => {
7677
7722
  try {
7678
7723
  let t = new URL(e);
7679
7724
  return t.protocol === "https:" && !t.username && !t.password;
@@ -7689,14 +7734,14 @@ var n$21 = /* @__PURE__ */ new Set([
7689
7734
  "remote",
7690
7735
  "hosted"
7691
7736
  ]);
7692
- var r$20 = /* @__PURE__ */ new Set([
7737
+ var r$19 = /* @__PURE__ */ new Set([
7693
7738
  "auto",
7694
7739
  "block",
7695
7740
  "swap",
7696
7741
  "fallback",
7697
7742
  "optional"
7698
7743
  ]);
7699
- var i$18 = /* @__PURE__ */ new Set(["woff2", "woff"]);
7744
+ var i$19 = /* @__PURE__ */ new Set(["woff2", "woff"]);
7700
7745
  var a$16 = 100;
7701
7746
  var o$18 = (e) => {
7702
7747
  for (let t = 0; t < e.length; t += 1) {
@@ -7705,33 +7750,33 @@ var o$18 = (e) => {
7705
7750
  }
7706
7751
  return !1;
7707
7752
  };
7708
- var s$15 = class extends Error {};
7753
+ var s$16 = class extends Error {};
7709
7754
  var c$13 = (e) => {
7710
- throw new s$15(e);
7755
+ throw new s$16(e);
7711
7756
  };
7712
7757
  var l$9 = (e) => {
7713
7758
  if (typeof e != "string") return c$13("font.family must be a string");
7714
7759
  let t = e.trim();
7715
7760
  return t ? t.length > a$16 ? c$13(`font.family cannot be longer than ${a$16} characters`) : o$18(t) ? c$13("font.family cannot contain control characters") : t : c$13("font.family cannot be empty");
7716
7761
  };
7717
- var u$9 = (e) => {
7762
+ var u$10 = (e) => {
7718
7763
  if (e === void 0) return [400];
7719
7764
  if (!Array.isArray(e) || e.length === 0) return c$13("font.weights must be a non-empty list of numbers");
7720
7765
  let t = e.map((e) => typeof e != "number" || !Number.isInteger(e) || e < 1 || e > 1e3 ? c$13("font.weights must hold whole numbers between 1 and 1000") : e);
7721
7766
  return [...new Set(t)].sort((e, t) => e - t);
7722
7767
  };
7723
- var d$9 = (e) => {
7768
+ var d$8 = (e) => {
7724
7769
  if (e === void 0) return ["normal"];
7725
7770
  if (!Array.isArray(e) || e.length === 0) return c$13("font.styles must be a non-empty list");
7726
7771
  let t = e.map((e) => e !== "normal" && e !== "italic" ? c$13("font.styles may only hold \"normal\" or \"italic\"") : e);
7727
7772
  return [...new Set(t)];
7728
7773
  };
7729
- var f$8 = (t, n) => {
7730
- if (!e$32(t)) return c$13(`font.files[${n}] must be an object`);
7774
+ var f$7 = (t, n) => {
7775
+ if (!e$33(t)) return c$13(`font.files[${n}] must be an object`);
7731
7776
  let { weight: r, style: a, format: o, unicodeRange: s } = t;
7732
7777
  if (typeof r != "number" || !Number.isInteger(r) || r < 1 || r > 1e3) return c$13(`font.files[${n}].weight must be a whole number between 1 and 1000`);
7733
7778
  if (a !== "normal" && a !== "italic") return c$13(`font.files[${n}].style must be "normal" or "italic"`);
7734
- if (typeof o != "string" || !i$18.has(o)) return c$13(`font.files[${n}].format must be "woff2" or "woff"`);
7779
+ if (typeof o != "string" || !i$19.has(o)) return c$13(`font.files[${n}].format must be "woff2" or "woff"`);
7735
7780
  let l = {
7736
7781
  weight: r,
7737
7782
  style: a,
@@ -7743,20 +7788,20 @@ var f$8 = (t, n) => {
7743
7788
  }
7744
7789
  return l;
7745
7790
  };
7746
- var p$8 = (e, t) => typeof e != "string" || !e ? c$13(`font.files[${t}].path must be a non-empty string`) : e.includes("://") || e.startsWith("/") ? c$13(`font.files[${t}].path must be relative to the font store, not a URL`) : e.split("/").includes("..") ? c$13(`font.files[${t}].path cannot climb out of the font store`) : e;
7747
- var m$4 = (e) => !Array.isArray(e) || e.length === 0 ? c$13("font.files must be a non-empty list") : e;
7791
+ var p$9 = (e, t) => typeof e != "string" || !e ? c$13(`font.files[${t}].path must be a non-empty string`) : e.includes("://") || e.startsWith("/") ? c$13(`font.files[${t}].path must be relative to the font store, not a URL`) : e.split("/").includes("..") ? c$13(`font.files[${t}].path cannot climb out of the font store`) : e;
7792
+ var m$5 = (e) => !Array.isArray(e) || e.length === 0 ? c$13("font.files must be a non-empty list") : e;
7748
7793
  var h$2 = (i) => {
7749
- if (!e$32(i)) return c$13("a font must be an object");
7794
+ if (!e$33(i)) return c$13("a font must be an object");
7750
7795
  let { source: a, fallback: o, display: s, preload: h } = i;
7751
7796
  if (typeof a != "string" || !n$21.has(a)) return c$13("font.source must be one of: system, google, remote, hosted");
7752
7797
  if (typeof o != "string" || !o.trim()) return c$13("font.fallback is required: it is what renders until the face arrives");
7753
- if (s !== void 0 && (typeof s != "string" || !r$20.has(s))) return c$13("font.display must be one of: auto, block, swap, fallback, optional");
7798
+ if (s !== void 0 && (typeof s != "string" || !r$19.has(s))) return c$13("font.display must be one of: auto, block, swap, fallback, optional");
7754
7799
  if (h !== void 0 && typeof h != "boolean") return c$13("font.preload must be a boolean");
7755
7800
  let g = {
7756
7801
  family: l$9(i.family),
7757
7802
  fallback: o.trim(),
7758
- weights: u$9(i.weights),
7759
- styles: d$9(i.styles),
7803
+ weights: u$10(i.weights),
7804
+ styles: d$8(i.styles),
7760
7805
  ...s === void 0 ? {} : { display: s },
7761
7806
  ...h === void 0 ? {} : { preload: h }
7762
7807
  };
@@ -7777,14 +7822,14 @@ var h$2 = (i) => {
7777
7822
  return e === void 0 && n === void 0 ? c$13("a remote font needs either a stylesheet URL or the font files themselves") : e === void 0 ? {
7778
7823
  ...g,
7779
7824
  source: "remote",
7780
- files: m$4(n).map((e, n) => {
7781
- let r = f$8(e, n), { url: i } = e;
7782
- return typeof i != "string" || !i$19(i) ? c$13(`font.files[${n}].url must be an https URL with no credentials in it`) : {
7825
+ files: m$5(n).map((e, n) => {
7826
+ let r = f$7(e, n), { url: i } = e;
7827
+ return typeof i != "string" || !i$20(i) ? c$13(`font.files[${n}].url must be an https URL with no credentials in it`) : {
7783
7828
  ...r,
7784
7829
  url: i
7785
7830
  };
7786
7831
  })
7787
- } : typeof e != "string" || !i$19(e) ? c$13("font.stylesheet must be an https URL with no credentials in it") : {
7832
+ } : typeof e != "string" || !i$20(e) ? c$13("font.stylesheet must be an https URL with no credentials in it") : {
7788
7833
  ...g,
7789
7834
  source: "remote",
7790
7835
  stylesheet: e
@@ -7793,31 +7838,31 @@ var h$2 = (i) => {
7793
7838
  return {
7794
7839
  ...g,
7795
7840
  source: "hosted",
7796
- files: m$4(i.files).map((e, t) => ({
7797
- ...f$8(e, t),
7798
- path: p$8(e.path, t)
7841
+ files: m$5(i.files).map((e, t) => ({
7842
+ ...f$7(e, t),
7843
+ path: p$9(e.path, t)
7799
7844
  }))
7800
7845
  };
7801
7846
  };
7802
7847
  //#endregion
7803
7848
  //#region ../sdk-shared/dist/types/StyleTypes.mjs
7804
- var e$28 = /* @__PURE__ */ function(e) {
7849
+ var e$29 = /* @__PURE__ */ function(e) {
7805
7850
  return e.COLOR = "color", e.SPACING = "spacing", e.SHADOW = "shadow", e.CUSTOM = "custom", e;
7806
7851
  }({});
7807
- var t$24 = Object.values(e$28);
7852
+ var t$24 = Object.values(e$29);
7808
7853
  var n$20 = (e) => typeof e == "string" && t$24.includes(e);
7809
7854
  //#endregion
7810
7855
  //#region ../sdk-shared/dist/style/styleConditions.mjs
7811
- var e$27 = {
7856
+ var e$28 = {
7812
7857
  "motion-reduce": "@media (prefers-reduced-motion: reduce)",
7813
7858
  "motion-safe": "@media (prefers-reduced-motion: no-preference)"
7814
7859
  };
7815
- var t$23 = Object.keys(e$27);
7816
- var r$19 = (t) => Object.hasOwn(e$27, t);
7817
- var i$17 = String.raw`\d+(?:\.\d+)?(?:px|rem|em|ch)`;
7818
- var a$15 = String.raw`\((?:min|max)-width:\s*${i$17}\)`;
7860
+ var t$23 = Object.keys(e$28);
7861
+ var r$18 = (t) => Object.hasOwn(e$28, t);
7862
+ var i$18 = String.raw`\d+(?:\.\d+)?(?:px|rem|em|ch)`;
7863
+ var a$15 = String.raw`\((?:min|max)-width:\s*${i$18}\)`;
7819
7864
  var o$17 = new RegExp(String.raw`^container(?:\s+(?<name>-?[_a-zA-Z][\w-]*))?\s+(?<query>${a$15}(?:\s+and\s+${a$15})?)$`);
7820
- var s$14 = (e) => {
7865
+ var s$15 = (e) => {
7821
7866
  let t = o$17.exec(e.trim());
7822
7867
  if (t?.groups) return {
7823
7868
  name: t.groups.name,
@@ -7825,24 +7870,24 @@ var s$14 = (e) => {
7825
7870
  };
7826
7871
  };
7827
7872
  var c$12 = (e) => {
7828
- if (r$19(e)) return e;
7829
- let t = s$14(e);
7873
+ if (r$18(e)) return e;
7874
+ let t = s$15(e);
7830
7875
  if (t) return t.name ? `container ${t.name} ${t.query}` : `container ${t.query}`;
7831
7876
  };
7832
- var u$8 = (t) => {
7833
- if (r$19(t)) return e$27[t];
7834
- let n = s$14(t);
7877
+ var u$9 = (t) => {
7878
+ if (r$18(t)) return e$28[t];
7879
+ let n = s$15(t);
7835
7880
  if (n) return n.name ? `@container ${n.name} ${n.query}` : `@container ${n.query}`;
7836
7881
  };
7837
- var f$7 = (t) => {
7882
+ var f$6 = (t) => {
7838
7883
  let n = t.trim().replace(/\s+/g, " ").replace(/\(\s*/g, "(").replace(/\s*\)/g, ")").replace(/:\s*/g, ": ");
7839
- for (let [t, r] of Object.entries(e$27)) if (n === r) return t;
7884
+ for (let [t, r] of Object.entries(e$28)) if (n === r) return t;
7840
7885
  let r = /^@container\s+(.*)$/.exec(n);
7841
7886
  if (r) return c$12(`container ${r[1]}`);
7842
7887
  };
7843
7888
  //#endregion
7844
7889
  //#region ../sdk-shared/dist/style/stylePseudos.mjs
7845
- var e$26 = [
7890
+ var e$27 = [
7846
7891
  "before",
7847
7892
  "after",
7848
7893
  "marker",
@@ -7861,8 +7906,8 @@ var t$22 = {
7861
7906
  selection: "::selection"
7862
7907
  };
7863
7908
  var n$19 = (e) => Object.hasOwn(t$22, e);
7864
- var r$18 = (e) => `::${e}`;
7865
- var i$16 = [
7909
+ var r$17 = (e) => `::${e}`;
7910
+ var i$17 = [
7866
7911
  "before",
7867
7912
  "after",
7868
7913
  "marker"
@@ -7883,7 +7928,7 @@ var o$16 = [
7883
7928
  "line-height",
7884
7929
  "vertical-align"
7885
7930
  ];
7886
- var s$13 = [
7931
+ var s$14 = [
7887
7932
  "font-family",
7888
7933
  "font-size",
7889
7934
  "font-style",
@@ -7910,24 +7955,24 @@ var l$8 = {
7910
7955
  "color",
7911
7956
  "content",
7912
7957
  "direction",
7913
- ...s$13
7958
+ ...s$14
7914
7959
  ],
7915
7960
  placeholder: [
7916
7961
  ...o$16,
7917
- ...s$13,
7962
+ ...s$14,
7918
7963
  ...c$11
7919
7964
  ],
7920
7965
  "first-line": [
7921
7966
  ...o$16,
7922
- ...s$13,
7967
+ ...s$14,
7923
7968
  ...c$11
7924
7969
  ]
7925
7970
  };
7926
- var u$7 = (e, t) => {
7971
+ var u$8 = (e, t) => {
7927
7972
  let n = l$8[e];
7928
7973
  return !n || t.startsWith("--") || n.includes(t);
7929
7974
  };
7930
- var d$8 = /* @__PURE__ */ new Set([
7975
+ var d$7 = /* @__PURE__ */ new Set([
7931
7976
  "none",
7932
7977
  "normal",
7933
7978
  "open-quote",
@@ -7939,8 +7984,8 @@ var d$8 = /* @__PURE__ */ new Set([
7939
7984
  "unset",
7940
7985
  "revert"
7941
7986
  ]);
7942
- var f$6 = /^(?:counter|counters|attr|url|var|image-set|linear-gradient|radial-gradient|conic-gradient)\(/i;
7943
- var p$7 = (e) => {
7987
+ var f$5 = /^(?:counter|counters|attr|url|var|image-set|linear-gradient|radial-gradient|conic-gradient)\(/i;
7988
+ var p$8 = (e) => {
7944
7989
  let t = [], n = "", r = "", i = 0;
7945
7990
  for (let a of e) {
7946
7991
  if (r) {
@@ -7958,13 +8003,13 @@ var p$7 = (e) => {
7958
8003
  }
7959
8004
  return n && t.push(n), r || i !== 0 ? void 0 : t;
7960
8005
  };
7961
- var m$3 = (e) => {
7962
- let t = p$7(e.trim());
7963
- return t?.length ? t.every((e) => /^(["']).*\1$/s.test(e) || d$8.has(e.toLowerCase()) || f$6.test(e) && e.endsWith(")")) : !1;
8006
+ var m$4 = (e) => {
8007
+ let t = p$8(e.trim());
8008
+ return t?.length ? t.every((e) => /^(["']).*\1$/s.test(e) || d$7.has(e.toLowerCase()) || f$5.test(e) && e.endsWith(")")) : !1;
7964
8009
  };
7965
8010
  //#endregion
7966
8011
  //#region ../sdk-shared/dist/style/styleStates.mjs
7967
- var e$25 = [
8012
+ var e$26 = [
7968
8013
  "hover",
7969
8014
  "focus",
7970
8015
  "focus-visible",
@@ -7982,7 +8027,7 @@ var e$25 = [
7982
8027
  "even"
7983
8028
  ];
7984
8029
  var t$21 = "plitzi-component--hidden";
7985
- var r$17 = {
8030
+ var r$16 = {
7986
8031
  odd: 0,
7987
8032
  even: 1,
7988
8033
  first: 2,
@@ -7999,8 +8044,8 @@ var r$17 = {
7999
8044
  disabled: 13,
8000
8045
  hidden: 14
8001
8046
  };
8002
- var i$15 = (e) => Object.hasOwn(r$17, e);
8003
- var a$13 = (t) => i$15(t) ? r$17[t] : e$25.length;
8047
+ var i$16 = (e) => Object.hasOwn(r$16, e);
8048
+ var a$13 = (t) => i$16(t) ? r$16[t] : e$26.length;
8004
8049
  var o$15 = (e) => Object.entries(e).sort(([e], [t]) => a$13(e) - a$13(t));
8005
8050
  var l$7 = {
8006
8051
  current: ":is([aria-current]:not([aria-current=\"false\"]),[aria-pressed=\"true\"],[aria-selected=\"true\"],[role=\"tabpanel\"]:not([hidden]))",
@@ -8011,12 +8056,12 @@ var l$7 = {
8011
8056
  odd: ":nth-child(odd)",
8012
8057
  even: ":nth-child(even)"
8013
8058
  };
8014
- var u$6 = (e) => (i$15(e) ? l$7[e] : void 0) ?? `:${e}`;
8015
- var d$7 = (e) => e === "hidden";
8016
- var p$6 = (e) => e === ">";
8059
+ var u$7 = (e) => (i$16(e) ? l$7[e] : void 0) ?? `:${e}`;
8060
+ var d$6 = (e) => e === "hidden";
8061
+ var p$7 = (e) => e === ">";
8017
8062
  //#endregion
8018
8063
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/shared.js
8019
- function e$24(e) {
8064
+ function e$25(e) {
8020
8065
  if (typeof e == "string" || typeof e == "number") {
8021
8066
  let t = String(e);
8022
8067
  return t === "" ? null : /^[a-zA-Z0-9_-]+$/.test(t) || /^\d+$/.test(t) ? t : null;
@@ -8028,11 +8073,11 @@ function t$20(t, n) {
8028
8073
  let r = [], i = /([^.[\]]+)|\[(\d+)\]/g, a;
8029
8074
  for (; a = i.exec(t);) if (a[1]) {
8030
8075
  if (!n && a[1] === "") continue;
8031
- let t = e$24(a[1]);
8076
+ let t = e$25(a[1]);
8032
8077
  if (t !== null) r.push(t);
8033
8078
  else if (n) return [];
8034
8079
  } else if (a[2]) {
8035
- let t = e$24(a[2]);
8080
+ let t = e$25(a[2]);
8036
8081
  if (t !== null) r.push(t);
8037
8082
  else if (n) return [];
8038
8083
  }
@@ -8042,20 +8087,20 @@ function n$18(t, n) {
8042
8087
  if (!Array.isArray(t)) return [];
8043
8088
  let r = [];
8044
8089
  for (let i of t) {
8045
- let t = e$24(i);
8090
+ let t = e$25(i);
8046
8091
  if (t !== null) r.push(t);
8047
8092
  else if (n) return [];
8048
8093
  }
8049
8094
  return r;
8050
8095
  }
8051
- function r$16(e, r = !0) {
8096
+ function r$15(e, r = !0) {
8052
8097
  return e ? typeof e == "string" ? t$20(e, r) : Array.isArray(e) ? n$18(e, r) : [] : [];
8053
8098
  }
8054
8099
  //#endregion
8055
8100
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/get.js
8056
8101
  function t$19(t, n, r) {
8057
8102
  if (t == null || !n) return r;
8058
- let i = r$16(n);
8103
+ let i = r$15(n);
8059
8104
  if (!i.length) return r;
8060
8105
  let a = t;
8061
8106
  for (let e of i) {
@@ -8070,7 +8115,7 @@ function t$19(t, n, r) {
8070
8115
  //#endregion
8071
8116
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/set.js
8072
8117
  function t$18(t, n, r) {
8073
- let i = r$16(n);
8118
+ let i = r$15(n);
8074
8119
  if (!i.length) return t;
8075
8120
  let a = t;
8076
8121
  for (let e = 0; e < i.length - 1; e++) {
@@ -8098,7 +8143,7 @@ function n$17(n, r) {
8098
8143
  }
8099
8144
  //#endregion
8100
8145
  //#region ../sdk-style/dist/helpers/calculateInheriting.mjs
8101
- var r$15 = (e, t) => {
8146
+ var r$14 = (e, t) => {
8102
8147
  let n = [], r = t;
8103
8148
  for (; r;) {
8104
8149
  n.push(r);
@@ -8107,7 +8152,7 @@ var r$15 = (e, t) => {
8107
8152
  }
8108
8153
  return n;
8109
8154
  };
8110
- var i$14 = (e, t, n, r, i) => {
8155
+ var i$15 = (e, t, n, r, i) => {
8111
8156
  let a = [], o = /* @__PURE__ */ new Set(), { definition: { styleSelectors: s, type: c }, attributes: { subType: l } } = e, u = (s[r] || "").split(" ").filter(Boolean);
8112
8157
  for (let e of [...u, ...i]) {
8113
8158
  if (o.has(e)) continue;
@@ -8178,7 +8223,7 @@ var o$14 = (e, t, n) => {
8178
8223
  ...f
8179
8224
  };
8180
8225
  };
8181
- var s$11 = (e, t, n) => o$14(e.attributes, t, n);
8226
+ var s$12 = (e, t, n) => o$14(e.attributes, t, n);
8182
8227
  var c$9 = (t, o, c, l, u = {}, d = {}) => {
8183
8228
  let { componentSubType: f, styleSelector: p = "base", styleState: m, styleVariant: h, styleAncestor: g, stylePseudo: _, styleCondition: v, includeSelf: y = !1, skipSelectors: b = [], addSelectors: x = [] } = d, S = {
8184
8229
  styleState: m,
@@ -8190,7 +8235,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8190
8235
  tree: [],
8191
8236
  style: {},
8192
8237
  parentStyle: {}
8193
- }, w = t ? r$15(c, t) : [], T = /* @__PURE__ */ new Set();
8238
+ }, w = t ? r$14(c, t) : [], T = /* @__PURE__ */ new Set();
8194
8239
  for (let e of Object.keys(l)) {
8195
8240
  let n = l[e];
8196
8241
  if (n) {
@@ -8208,7 +8253,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8208
8253
  continue;
8209
8254
  }
8210
8255
  if (!t && o) {
8211
- let t = i$14({
8256
+ let t = i$15({
8212
8257
  definition: {
8213
8258
  type: o,
8214
8259
  styleSelectors: {},
@@ -8231,7 +8276,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8231
8276
  continue;
8232
8277
  }
8233
8278
  for (let r of w) {
8234
- let s = t?.definition.parentId === r.id, c = r.id !== t?.id, l = i$14(r, r.definition.type === o ? o : void 0, n, p, x);
8279
+ let s = t?.definition.parentId === r.id, c = r.id !== t?.id, l = i$15(r, r.definition.type === o ? o : void 0, n, p, x);
8235
8280
  !y && !c && !m && !h && Object.keys(l).length && (l = l.filter((e) => e.type === "element"));
8236
8281
  for (let t of l) (!b.includes(t.name) || c) && C.tree.push({
8237
8282
  name: t.name,
@@ -8254,7 +8299,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8254
8299
  }
8255
8300
  let E = {};
8256
8301
  for (let t of C.tree) {
8257
- let r = s$11(t, p, S);
8302
+ let r = s$12(t, p, S);
8258
8303
  if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$17(r, n$24)), Object.keys(r).length)) for (let e of Object.keys(r)) E[e] || (E[e] = []), E[e].push({
8259
8304
  key: t.name,
8260
8305
  value: r[e],
@@ -8263,7 +8308,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8263
8308
  }
8264
8309
  let D = C.tree.filter((e) => e.isParent).reduce((e, t) => ({
8265
8310
  ...e,
8266
- ...s$11(t, p, S)
8311
+ ...s$12(t, p, S)
8267
8312
  }), {});
8268
8313
  return {
8269
8314
  ...C,
@@ -8273,7 +8318,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8273
8318
  };
8274
8319
  //#endregion
8275
8320
  //#region ../sdk-schema/dist/helpers/FlatMap.mjs
8276
- var d$6 = class {
8321
+ var d$5 = class {
8277
8322
  flat;
8278
8323
  variables;
8279
8324
  pages;
@@ -8285,7 +8330,7 @@ var d$6 = class {
8285
8330
  this.flat = t, this.variables = r ?? [], this.pages = i ?? [], this.mintId = a ?? c$14, this.takenElsewhere = o ?? (() => !1);
8286
8331
  }
8287
8332
  nextId = (e, t = () => !1) => {
8288
- let n = r$22(this.flat);
8333
+ let n = r$21(this.flat);
8289
8334
  return this.mintId(e, (e) => n.has(e) || this.takenElsewhere(e) || t(e));
8290
8335
  };
8291
8336
  addElement = (e, n, r = "inside", i = {}) => {
@@ -8317,7 +8362,7 @@ var d$6 = class {
8317
8362
  });
8318
8363
  };
8319
8364
  updateElement = (e) => !e || !this.flat[e.id] ? !1 : (this.flat[e.id] = e, !0);
8320
- renameElement = (t, n) => this.flat[t] ? t === n ? [] : i$20(this.flat, n) || this.takenElsewhere(n) ? !1 : _$3(this.flat, { [t]: n }, this.pages) : !1;
8365
+ renameElement = (t, n) => this.flat[t] ? t === n ? [] : i$21(this.flat, n) || this.takenElsewhere(n) ? !1 : _$3(this.flat, { [t]: n }, this.pages) : !1;
8321
8366
  moveElement = (e, t, n, r = "inside") => {
8322
8367
  let i = this.flat[e], a = this.flat[n];
8323
8368
  if (!i || !a || n === t || t$27(this.flat, t).includes(n)) return !1;
@@ -8325,7 +8370,7 @@ var d$6 = class {
8325
8370
  return o ? (i.definition.items = (i.definition.items ?? []).filter((e) => e !== n), o.parent.definition.items = o.items, a.definition.parentId = o.parent.id, this.carryRoot(n, o.parent.definition.rootId), !0) : !1;
8326
8371
  };
8327
8372
  carryRoot = (e, t) => {
8328
- if (this.flat[e].definition.rootId !== t) for (let n of [e, ...r$21(this.flat, e)]) this.flat[n].definition.rootId = t;
8373
+ if (this.flat[e].definition.rootId !== t) for (let n of [e, ...r$20(this.flat, e)]) this.flat[n].definition.rootId = t;
8329
8374
  };
8330
8375
  cloneElements = (e, t = "", n = "", s = !1) => {
8331
8376
  let c = {
@@ -8333,9 +8378,9 @@ var d$6 = class {
8333
8378
  item: void 0
8334
8379
  }, l = {}, u = this.flat[e];
8335
8380
  if (!u) return c;
8336
- let d = [e, ...r$21(this.flat, e)], f = r$22(this.flat);
8381
+ let d = [e, ...r$20(this.flat, e)], f = r$21(this.flat);
8337
8382
  for (let e of d) {
8338
- let t = u$10(e, (e) => f.has(e) || this.takenElsewhere(e));
8383
+ let t = u$11(e, (e) => f.has(e) || this.takenElsewhere(e));
8339
8384
  f.add(t), l[e] = t;
8340
8385
  }
8341
8386
  let p = {};
@@ -8350,7 +8395,7 @@ var d$6 = class {
8350
8395
  removeElement = (e, t = !1) => {
8351
8396
  let n = this.flat[e];
8352
8397
  if (!n || n.definition.type === "page" && !t || t && n.attributes.default) return !1;
8353
- for (let t of r$21(this.flat, e)) delete this.flat[t];
8398
+ for (let t of r$20(this.flat, e)) delete this.flat[t];
8354
8399
  let r = n.definition.parentId ? this.flat[n.definition.parentId] : void 0;
8355
8400
  return r?.definition.items && (r.definition.items = r.definition.items.filter((t) => t !== e)), delete this.flat[e], !0;
8356
8401
  };
@@ -8382,7 +8427,7 @@ var d$6 = class {
8382
8427
  };
8383
8428
  flatAsSnippet = (e, t, n = !1) => {
8384
8429
  let r = {
8385
- ...e$34,
8430
+ ...e$35,
8386
8431
  platform: {
8387
8432
  desktop: {},
8388
8433
  tablet: {},
@@ -8477,50 +8522,50 @@ var o$13 = /* @__PURE__ */ new Set([
8477
8522
  "ref",
8478
8523
  "id"
8479
8524
  ]);
8480
- var s$10 = /^[A-Za-z][A-Za-z0-9_]*$/;
8481
- var c$8 = (e) => s$10.test(e) ? o$13.has(e) ? `"${e}" is an attribute every instance already has` : null : `"${e}" is not a valid prop name: start with a letter, then letters, numbers and underscores — it is read as {{ props.${e} }}`;
8482
- var p$5 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
8483
- var m$2 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
8525
+ var s$11 = /^[A-Za-z][A-Za-z0-9_]*$/;
8526
+ var c$8 = (e) => s$11.test(e) ? o$13.has(e) ? `"${e}" is an attribute every instance already has` : null : `"${e}" is not a valid prop name: start with a letter, then letters, numbers and underscores — it is read as {{ props.${e} }}`;
8527
+ var p$6 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
8528
+ var m$3 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
8484
8529
  //#endregion
8485
8530
  //#region ../sdk-shared/dist/navigation/routes.mjs
8486
- var r$14 = (e) => e.replaceAll(/\/+/g, "/");
8487
- var i$13 = (e) => r$14(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi, ":$1"));
8488
- var a$11 = (e, t) => {
8531
+ var i$14 = (e) => e.replaceAll(/\/+/g, "/");
8532
+ var a$11 = (e) => i$14(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi, ":$1"));
8533
+ var o$12 = (e, t) => {
8489
8534
  if (!t || !e[t]) return "";
8490
8535
  let { slug: n, parentId: r } = e[t];
8491
- return r ? `${a$11(e, r)}/${n}` : n;
8536
+ return r ? `${o$12(e, r)}/${n}` : n;
8492
8537
  };
8493
- function o$12(e, t, n, o = !1) {
8538
+ function s$10(e, t, n, r = !1) {
8494
8539
  let s = n.replace(/^\/+/, ""), { slug: c = "", folder: l, default: u } = e[s]?.attributes ?? {
8495
8540
  slug: s,
8496
8541
  folder: "",
8497
8542
  default: !1
8498
8543
  };
8499
- if (u && !o) return {
8544
+ if (u && !r) return {
8500
8545
  "/": n,
8501
8546
  [`/${n}`]: n
8502
8547
  };
8503
- if (u && o) return "/";
8504
- if (!l && !o) return {
8505
- [i$13(`/${c}`)]: n,
8506
- [i$13(`/${n}`)]: n
8548
+ if (u && r) return "/";
8549
+ if (!l && !r) return {
8550
+ [a$11(`/${c}`)]: n,
8551
+ [a$11(`/${n}`)]: n
8507
8552
  };
8508
- if (!l && o) return r$14(`/${c}`);
8509
- if (!t.find((e) => e.id === l)) return o ? r$14(`/${c}`) : {
8510
- [i$13(`/${c}`)]: n,
8511
- [i$13(`/${n}`)]: n
8553
+ if (!l && r) return i$14(`/${c}`);
8554
+ if (!t.find((e) => e.id === l)) return r ? i$14(`/${c}`) : {
8555
+ [a$11(`/${c}`)]: n,
8556
+ [a$11(`/${n}`)]: n
8512
8557
  };
8513
- let d = [a$11(t.reduce((e, t) => ({
8558
+ let d = [o$12(t.reduce((e, t) => ({
8514
8559
  ...e,
8515
8560
  [t.id]: t
8516
8561
  }), {}), l), c].filter(Boolean).join("/");
8517
- return o ? r$14(`/${d}`) : {
8518
- [i$13(`/${d}`)]: n,
8519
- [i$13(`/${n}`)]: n
8562
+ return r ? i$14(`/${d}`) : {
8563
+ [a$11(`/${d}`)]: n,
8564
+ [a$11(`/${n}`)]: n
8520
8565
  };
8521
8566
  }
8522
- var d$5 = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
8523
- var f$5 = (e) => d$5(i$13(e));
8567
+ var p$5 = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
8568
+ var m$2 = (e) => p$5(a$11(e));
8524
8569
  //#endregion
8525
8570
  //#region src/schema/lint/context.ts
8526
8571
  /**
@@ -8595,7 +8640,7 @@ var LintContext = class {
8595
8640
  /** The component an instance places, when the space declares it. */
8596
8641
  instanceOf(element) {
8597
8642
  const { referenceId } = element.attributes;
8598
- return m$2(element) && typeof referenceId === "string" ? p$5(this.schema, referenceId) : void 0;
8643
+ return m$3(element) && typeof referenceId === "string" ? p$6(this.schema, referenceId) : void 0;
8599
8644
  }
8600
8645
  element(id) {
8601
8646
  return Object.hasOwn(this.flat, id) ? this.flat[id] : void 0;
@@ -8632,7 +8677,7 @@ var LintContext = class {
8632
8677
  const names = this.attributeNames(this.catalogType(element) ?? element.definition.type);
8633
8678
  const parentId = element.definition.parentId;
8634
8679
  const parent = parentId ? this.element(parentId) : void 0;
8635
- const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$2(parent) ? ["slot"] : []];
8680
+ const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
8636
8681
  return names && extra.length > 0 ? [...names, ...extra] : names;
8637
8682
  }
8638
8683
  /** How a message names an element: its type and id, and the page or layout it is on. */
@@ -8661,8 +8706,8 @@ var LintContext = class {
8661
8706
  routeParams(id) {
8662
8707
  const rootId = this.element(id)?.definition.rootId ?? id;
8663
8708
  const slugOf = (pageId) => textOf(this.element(pageId)?.attributes.slug);
8664
- if (this.pageIds.has(rootId)) return f$5(slugOf(rootId));
8665
- return [...new Set([...this.pageIds].flatMap((pageId) => f$5(slugOf(pageId))))];
8709
+ if (this.pageIds.has(rootId)) return m$2(slugOf(rootId));
8710
+ return [...new Set([...this.pageIds].flatMap((pageId) => m$2(slugOf(pageId))))];
8666
8711
  }
8667
8712
  };
8668
8713
  //#endregion
@@ -8715,14 +8760,14 @@ var withPluginCatalogs = (options) => {
8715
8760
  const byType = (own, hosted = own) => Object.fromEntries(plugins.flatMap((declaration) => {
8716
8761
  return [[declaration.type, own(declaration)], [hostedKey(declaration), hosted(declaration)]].filter((entry) => entry[1] !== void 0);
8717
8762
  }));
8718
- const customTriggers = rest.vocabulary?.triggers?.["custom"] ?? Object.keys(e$40);
8763
+ const customTriggers = rest.vocabulary?.triggers?.["custom"] ?? Object.keys(e$41);
8719
8764
  const customCallbacks = rest.vocabulary?.callbacks?.["custom"] ?? Object.keys(a$22);
8720
8765
  const customAttributes = Object.keys(rest.defaultAttributes?.["custom"] ?? {});
8721
8766
  const vocabulary = rest.vocabulary && {
8722
8767
  ...rest.vocabulary,
8723
8768
  triggers: {
8724
8769
  ...rest.vocabulary.triggers,
8725
- ...byType((declaration) => [...Object.keys(e$40), ...actionsOf(declaration.triggers)], (declaration) => [...customTriggers, ...actionsOf(declaration.triggers)])
8770
+ ...byType((declaration) => [...Object.keys(e$41), ...actionsOf(declaration.triggers)], (declaration) => [...customTriggers, ...actionsOf(declaration.triggers)])
8726
8771
  },
8727
8772
  callbacks: {
8728
8773
  ...rest.vocabulary.callbacks,
@@ -8797,7 +8842,7 @@ var r$13 = {
8797
8842
  del: "delete",
8798
8843
  return: "enter"
8799
8844
  };
8800
- var i$12 = /* @__PURE__ */ new Set([
8845
+ var i$13 = /* @__PURE__ */ new Set([
8801
8846
  "escape",
8802
8847
  "enter",
8803
8848
  "tab",
@@ -8830,7 +8875,7 @@ var o$11 = (e, t) => {
8830
8875
  }
8831
8876
  if (u.length !== 1) return { problem: `"${e.trim()}" names ${u.length ? `${u.length} keys (${u.join(", ")})` : "no key, only modifiers"}: a shortcut is modifiers and ONE key, like "shift+f"` };
8832
8877
  let [d] = u;
8833
- return d.length !== 1 && !i$12.has(d) ? { problem: `"${d}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...i$12].slice(0, 15).join(", ")}, f1…f12)` } : { combo: a$10(l, d) };
8878
+ return d.length !== 1 && !i$13.has(d) ? { problem: `"${d}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...i$13].slice(0, 15).join(", ")}, f1…f12)` } : { combo: a$10(l, d) };
8834
8879
  };
8835
8880
  var s$9 = (e, t = !1) => {
8836
8881
  let n = e.split(",").map((e) => o$11(e, t));
@@ -8885,7 +8930,7 @@ var steps_exports$1 = /* @__PURE__ */ __exportAll({
8885
8930
  * the builders useless for exactly the flows that matter most.
8886
8931
  */
8887
8932
  var builtinTrigger = (trigger) => {
8888
- if (Object.hasOwn(e$40, trigger)) return e$40[trigger];
8933
+ if (Object.hasOwn(e$41, trigger)) return e$41[trigger];
8889
8934
  return Object.hasOwn(typeTriggerDefinitions, trigger) ? typeTriggerDefinitions[trigger] : void 0;
8890
8935
  };
8891
8936
  var on = (trigger, params = {}) => {
@@ -8946,7 +8991,7 @@ var onInterval = (ms) => {
8946
8991
  * and hide the arrow at the end already reached: `[named('row', onScroll()), setState({ key: 'atEnd', type:
8947
8992
  * 'boolean', value: '{{ row.atEnd }}' })]`.
8948
8993
  */
8949
- var onScroll = () => on(s$21);
8994
+ var onScroll = () => on(s$22);
8950
8995
  var onPageLoad = () => on("onPageLoad");
8951
8996
  /**
8952
8997
  * The end of a server action this element started — the trigger a `detached` run needs, because that step returns
@@ -9198,7 +9243,7 @@ var carouselPlay = (target) => carouselStep(target, "play", "Play");
9198
9243
  var carouselPause = (target) => carouselStep(target, "pause", "Pause");
9199
9244
  //#endregion
9200
9245
  //#region ../sdk-interactions/dist/sources/QueriesSource/writeParams.mjs
9201
- var e$21 = {
9246
+ var e$22 = {
9202
9247
  origin: "Requests to the same site",
9203
9248
  all: "All cached requests",
9204
9249
  elements: "Only these containers",
@@ -9210,7 +9255,7 @@ var t$16 = (t, n = () => !0) => ({
9210
9255
  description: "What to refresh once the write succeeded, so the page shows the new data: the requests to the same site, every provider on the page, only the api containers named in `invalidateElements`, or none for a step that only reads. Server-driven containers are refreshed too, asking the server past its cache. Containers on screen ask again at once; the rest when they are shown.",
9211
9256
  default: t[0],
9212
9257
  options: [...t],
9213
- optionLabels: Object.fromEntries(t.map((t) => [t, e$21[t]])),
9258
+ optionLabels: Object.fromEntries(t.map((t) => [t, e$22[t]])),
9214
9259
  label: "Refresh cached requests",
9215
9260
  canBind: !1,
9216
9261
  when: n
@@ -9294,7 +9339,7 @@ var t$15 = {
9294
9339
  };
9295
9340
  //#endregion
9296
9341
  //#region ../sdk-interactions/dist/sources/AuthSource/callbacks.mjs
9297
- var e$20 = {
9342
+ var e$21 = {
9298
9343
  login: {
9299
9344
  source: "auth",
9300
9345
  title: "Auth Login",
@@ -9382,7 +9427,7 @@ var e$20 = {
9382
9427
  };
9383
9428
  //#endregion
9384
9429
  //#region ../sdk-interactions/dist/sources/HostSource/callbacks.mjs
9385
- var e$19 = { hostAction: {
9430
+ var e$20 = { hostAction: {
9386
9431
  source: "host",
9387
9432
  title: "Host Action",
9388
9433
  strictParams: !0,
@@ -9401,7 +9446,7 @@ var e$19 = { hostAction: {
9401
9446
  } };
9402
9447
  //#endregion
9403
9448
  //#region ../sdk-interactions/dist/sources/NavigationSource/callbacks.mjs
9404
- var e$18 = { navigate: {
9449
+ var e$19 = { navigate: {
9405
9450
  source: "navigation",
9406
9451
  title: "Navigate",
9407
9452
  strictParams: !0,
@@ -9430,7 +9475,7 @@ var e$18 = { navigate: {
9430
9475
  } };
9431
9476
  //#endregion
9432
9477
  //#region ../sdk-interactions/dist/sources/QueriesSource/callbacks.mjs
9433
- var e$17 = { invalidateQueries: {
9478
+ var e$18 = { invalidateQueries: {
9434
9479
  source: "queries",
9435
9480
  title: "Invalidate Queries",
9436
9481
  strictParams: !0,
@@ -9453,7 +9498,7 @@ var e$17 = { invalidateQueries: {
9453
9498
  } };
9454
9499
  //#endregion
9455
9500
  //#region ../sdk-interactions/dist/sources/StateSource/callbacks.mjs
9456
- var e$16 = {
9501
+ var e$17 = {
9457
9502
  setState: {
9458
9503
  source: "state",
9459
9504
  title: "Set State",
@@ -9605,7 +9650,7 @@ var e$16 = {
9605
9650
  };
9606
9651
  //#endregion
9607
9652
  //#region ../sdk-shared/dist/authoring/spaceCallbacks.mjs
9608
- var e$15 = { addNotification: {
9653
+ var e$16 = { addNotification: {
9609
9654
  source: "space",
9610
9655
  title: "Add Notification",
9611
9656
  strictParams: !0,
@@ -9671,13 +9716,13 @@ var e$15 = { addNotification: {
9671
9716
  * of them is an authoring question nobody at runtime asks.
9672
9717
  */
9673
9718
  var BUILTIN_GLOBAL_CALLBACKS = {
9674
- ...e$15,
9675
9719
  ...e$16,
9676
- ...e$19,
9677
- ...e$18,
9720
+ ...e$17,
9678
9721
  ...e$20,
9722
+ ...e$19,
9723
+ ...e$21,
9679
9724
  ...t$15,
9680
- ...e$17
9725
+ ...e$18
9681
9726
  };
9682
9727
  /** The built-in globalCallback for an action, or undefined when the action is not a known built-in (a plugin
9683
9728
  * callback whose source/schema is not knowable here). */
@@ -9922,7 +9967,7 @@ var webHook = (params) => utilityStep("webHook", params);
9922
9967
  var twigTemplate = (params) => utilityStep("twigTemplate", params);
9923
9968
  //#endregion
9924
9969
  //#region ../sdk-interactions/dist/utility/copyToClipboardSpec.mjs
9925
- var e$14 = {
9970
+ var e$15 = {
9926
9971
  title: "Copy To Clipboard",
9927
9972
  type: "utility",
9928
9973
  strictParams: !0,
@@ -10052,7 +10097,7 @@ var BUILTIN_UTILITIES = {
10052
10097
  data: ""
10053
10098
  } }
10054
10099
  },
10055
- copyToClipboard: e$14
10100
+ copyToClipboard: e$15
10056
10101
  };
10057
10102
  /** The built-in utility for an action, or undefined when the action is not a known built-in utility. */
10058
10103
  var getUtility = (action) => Object.hasOwn(BUILTIN_UTILITIES, action) ? BUILTIN_UTILITIES[action] : void 0;
@@ -10069,15 +10114,76 @@ var applyUtility = (action, params) => {
10069
10114
  params: c$19(params, utility.params, utility.strictParams)
10070
10115
  };
10071
10116
  };
10117
+ var NOT_FOUND_ID = "plitzi-not-found";
10118
+ /**
10119
+ * The page a space that declares none of its own answers an unknown address with — inside the home page's layout, so
10120
+ * a visitor who mistyped a link is still on the site: what was asked for is not here, and the way home.
10121
+ */
10122
+ var defaultNotFoundPage = (home) => ({
10123
+ id: NOT_FOUND_ID,
10124
+ name: "Not found",
10125
+ slug: "*",
10126
+ seoTitle: "Page not found",
10127
+ ...home?.layout ? { layout: home.layout } : {},
10128
+ body: [container({
10129
+ id: `${NOT_FOUND_ID}-body`,
10130
+ css: {
10131
+ display: "flex",
10132
+ "flex-direction": "column",
10133
+ "align-items": "center",
10134
+ "row-gap": "16px",
10135
+ padding: "96px 24px",
10136
+ "text-align": "center"
10137
+ },
10138
+ children: [
10139
+ heading("Page not found", {
10140
+ id: `${NOT_FOUND_ID}-title`,
10141
+ subType: "h1"
10142
+ }),
10143
+ paragraph({
10144
+ id: `${NOT_FOUND_ID}-text`,
10145
+ content: "There is nothing at this address."
10146
+ }),
10147
+ link({
10148
+ id: `${NOT_FOUND_ID}-home`,
10149
+ href: "/",
10150
+ content: "Back to the home page"
10151
+ })
10152
+ ]
10153
+ })]
10154
+ });
10155
+ var isTopLevelNotFound = (page) => page.slug === "*" && !page.folder;
10156
+ /**
10157
+ * The space with a page for the addresses no page answers: its own, or — when it declares none — a plain one, said as a
10158
+ * suggestion so the author knows it is there and how to write theirs. A space that is not a list of pages yet is left
10159
+ * as it is, for authoring to refuse.
10160
+ */
10161
+ var withNotFoundPage = (spec) => {
10162
+ if (!Array.isArray(spec.pages) || spec.pages.length === 0 || spec.pages.some(isTopLevelNotFound)) return { spec };
10163
+ const home = spec.pages.find((page) => page.slug === "" && !page.folder);
10164
+ const page = defaultNotFoundPage(home);
10165
+ return {
10166
+ spec: {
10167
+ ...spec,
10168
+ pages: [...spec.pages, page]
10169
+ },
10170
+ added: {
10171
+ code: "not-found-page",
10172
+ message: `No page answers an address nothing else does, so a plain one was added${home?.layout ? ` in the layout "${home.layout.id}"` : ""}, sent with status 404: write your own — a page whose slug is '*' — to say it in the space's words.`,
10173
+ elementIds: [NOT_FOUND_ID],
10174
+ saves: 0
10175
+ }
10176
+ };
10177
+ };
10072
10178
  //#endregion
10073
10179
  //#region ../sdk-shared/dist/actions/failureHandler.mjs
10074
- var e$13 = "flow.onFailure";
10180
+ var e$14 = "flow.onFailure";
10075
10181
  //#endregion
10076
10182
  //#region ../sdk-shared/dist/actions/functions.mjs
10077
10183
  var a$9 = (e) => e === "/fn" || e.startsWith("/fn/");
10078
10184
  //#endregion
10079
10185
  //#region ../sdk-shared/dist/types/SchemaTypes.mjs
10080
- var e$12 = [
10186
+ var e$13 = [
10081
10187
  "skip",
10082
10188
  "parallel",
10083
10189
  "queue",
@@ -10218,7 +10324,7 @@ var both = (inner, outer) => inner.combinator === "and" && outer.combinator ===
10218
10324
  */
10219
10325
  var whileRunning = (mode, trigger) => {
10220
10326
  if (trigger.type !== "trigger") throw new AuthoringError("while-running", `whileRunning('${mode}', …) wraps a flow's TRIGGER — it decides what firing the trigger again does — and was given a "${trigger.type}" step (${trigger.action}). Put it around the first step: \`[whileRunning('${mode}', onClick()), …]\`.`);
10221
- if (!e$12.includes(mode)) throw new AuthoringError("while-running", `whileRunning takes ${e$12.map((item) => `'${item}'`).join(", ")}, not '${mode}'.`);
10327
+ if (!e$13.includes(mode)) throw new AuthoringError("while-running", `whileRunning takes ${e$13.map((item) => `'${item}'`).join(", ")}, not '${mode}'.`);
10222
10328
  return {
10223
10329
  ...trigger,
10224
10330
  whileRunning: mode
@@ -10389,7 +10495,7 @@ var defineAction = (spec) => {
10389
10495
  ...undo.length > 0 ? [{
10390
10496
  id: "onFailure",
10391
10497
  type: "task",
10392
- action: e$13,
10498
+ action: e$14,
10393
10499
  params: {}
10394
10500
  }, ...undo.map(taskStep)] : []
10395
10501
  ];
@@ -10423,15 +10529,16 @@ var authoringCodesTable = (kind) => {
10423
10529
  var t$13 = "[A-Za-z_][A-Za-z0-9_]*";
10424
10530
  var n$13 = RegExp(`^${t$13}$`);
10425
10531
  RegExp(`^!?${t$13}$`);
10426
- var i$11 = /* @__PURE__ */ new Set([
10532
+ var i$12 = /* @__PURE__ */ new Set([
10427
10533
  "__proto__",
10428
10534
  "constructor",
10429
10535
  "prototype"
10430
10536
  ]);
10431
- var a$8 = (e) => n$13.test(e) && !i$11.has(e);
10537
+ var a$8 = (e) => n$13.test(e) && !i$12.has(e);
10432
10538
  //#endregion
10433
10539
  //#region ../sdk-shared/dist/flags/resolveFlags.mjs
10434
- var i$10 = (e) => typeof e == "object" && !!e && "rules" in e && Array.isArray(e.rules) && e.rules.some((e) => typeof e == "object" && !!e && !("enabled" in e && e.enabled === !1));
10540
+ var i$11 = (e) => typeof e == "object" && !!e && "rules" in e && Array.isArray(e.rules) && e.rules.some((e) => typeof e == "object" && !!e && !("enabled" in e && e.enabled === !1));
10541
+ var u$6 = (e, t) => !e || (t[e.name] ?? !1) === e.is;
10435
10542
  //#endregion
10436
10543
  //#region src/schema/flags.ts
10437
10544
  /**
@@ -10825,14 +10932,14 @@ var lintActionOutputBindings = (ctx) => {
10825
10932
  };
10826
10933
  //#endregion
10827
10934
  //#region ../sdk-schema/dist/helpers/styleWithoutTag.mjs
10828
- var e$11 = (e) => Object.keys(e ?? {}).length > 0;
10829
- var t$12 = (t) => Object.values(t ?? {}).some(e$11);
10830
- var n$12 = (n) => e$11(n.default) || t$12(n.states) || Object.values(n.variants ?? {}).some((n) => e$11(n.default) || t$12(n.states));
10935
+ var e$12 = (e) => Object.keys(e ?? {}).length > 0;
10936
+ var t$12 = (t) => Object.values(t ?? {}).some(e$12);
10937
+ var n$12 = (n) => e$12(n.default) || t$12(n.states) || Object.values(n.variants ?? {}).some((n) => e$12(n.default) || t$12(n.states));
10831
10938
  var r$11 = (e, t) => Object.values(e.platform).some((e) => Object.hasOwn(e, t) && Object.values(e[t].attributes).some(n$12));
10832
- var i$9 = /* @__PURE__ */ new Set(["apiContainer", "channel"]);
10939
+ var i$10 = /* @__PURE__ */ new Set(["apiContainer", "channel"]);
10833
10940
  var a$7 = (e) => {
10834
10941
  let t = e.attributes.subType;
10835
- return i$9.has(e.definition.type) && (typeof t != "string" || t === "");
10942
+ return i$10.has(e.definition.type) && (typeof t != "string" || t === "");
10836
10943
  };
10837
10944
  var o$10 = (e, t) => {
10838
10945
  if (!a$7(e)) return;
@@ -10841,8 +10948,8 @@ var o$10 = (e, t) => {
10841
10948
  };
10842
10949
  //#endregion
10843
10950
  //#region ../sdk-shared/dist/schema/anchor.mjs
10844
- var e$10 = /^[a-z][a-z0-9-]*$/;
10845
- var t$11 = (t) => typeof t == "string" && e$10.test(t);
10951
+ var e$11 = /^[a-z][a-z0-9-]*$/;
10952
+ var t$11 = (t) => typeof t == "string" && e$11.test(t);
10846
10953
  var n$11 = (e) => e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section";
10847
10954
  var r$10 = (e, t) => {
10848
10955
  let r = n$11(e), i = r;
@@ -10851,7 +10958,7 @@ var r$10 = (e, t) => {
10851
10958
  };
10852
10959
  //#endregion
10853
10960
  //#region ../sdk-shared/dist/schema/layoutChain.mjs
10854
- var e$9 = (e, t) => {
10961
+ var e$10 = (e, t) => {
10855
10962
  let n = e?.attributes[t];
10856
10963
  return typeof n == "string" ? n : "";
10857
10964
  };
@@ -10863,7 +10970,7 @@ var t$10 = (t, n, r) => {
10863
10970
  a.add(o), i.push({
10864
10971
  layout: o,
10865
10972
  slot: s || o
10866
- }), o = e$9(n, "layout"), s = e$9(n, "layoutContainer");
10973
+ }), o = e$10(n, "layout"), s = e$10(n, "layoutContainer");
10867
10974
  }
10868
10975
  return i;
10869
10976
  };
@@ -10871,7 +10978,7 @@ var n$10 = (t, n) => {
10871
10978
  let r = [], i = n;
10872
10979
  for (; i && r.length <= 16;) {
10873
10980
  if (r.includes(i)) return [...r.slice(r.indexOf(i)), i];
10874
- r.push(i), i = e$9(t(i), "layout");
10981
+ r.push(i), i = e$10(t(i), "layout");
10875
10982
  }
10876
10983
  return [];
10877
10984
  };
@@ -10880,7 +10987,7 @@ var n$10 = (t, n) => {
10880
10987
  var t$9 = /^ {0,3}(`{3,}|~{3,})/;
10881
10988
  var n$9 = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*$/;
10882
10989
  var r$9 = (e) => e.replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/<[^>]+>/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`+([^`]*?)`+/g, "$1").replace(/(\*\*|~~)(.+?)\1/g, "$2").replace(/\*(.+?)\*/g, "$1").replace(/\b__(.+?)__\b/g, "$1").replace(/\b_(.+?)_\b/g, "$1").replace(/\\([\\`*_{}[\]()#+\-.!|~>])/g, "$1").trim();
10883
- var i$8 = (i) => {
10990
+ var i$9 = (i) => {
10884
10991
  let a = /* @__PURE__ */ new Set(), o = [], s;
10885
10992
  for (let c of i.split("\n")) {
10886
10993
  let i = t$9.exec(c)?.[1];
@@ -10921,7 +11028,7 @@ var anchorsOfPage = (ctx, pageId) => {
10921
11028
  Object.values(ctx.flat).forEach((element) => {
10922
11029
  if (!roots.has(element.definition.rootId)) return;
10923
11030
  const own = element.definition.anchor ? [element.definition.anchor] : [];
10924
- const headings = element.definition.type === "markdown" ? i$8(attributeText$1(element, "content")).map((heading) => heading.anchor) : [];
11031
+ const headings = element.definition.type === "markdown" ? i$9(attributeText$1(element, "content")).map((heading) => heading.anchor) : [];
10925
11032
  [...own, ...headings].forEach((anchor) => anchors.set(anchor, [...anchors.get(anchor) ?? [], element.id]));
10926
11033
  });
10927
11034
  return anchors;
@@ -10949,8 +11056,8 @@ var lintLinkHash = (ctx, link, anchorsByPage) => {
10949
11056
  }
10950
11057
  if ((attributeText$1(link, "mode") || "page") !== "page") return;
10951
11058
  const { flat, schema } = ctx;
10952
- const path = o$12(flat, schema.pageFolders, attributeText$1(link, "href"), true);
10953
- const pageId = [...ctx.pageIds].find((id) => o$12(flat, schema.pageFolders, id, true) === path);
11059
+ const path = s$10(flat, schema.pageFolders, attributeText$1(link, "href"), true);
11060
+ const pageId = [...ctx.pageIds].find((id) => s$10(flat, schema.pageFolders, id, true) === path);
10954
11061
  if (!pageId) return;
10955
11062
  const anchors = anchorsByPage(pageId);
10956
11063
  if (!anchors.has(hash)) {
@@ -11007,10 +11114,10 @@ var lintAnchors = (ctx) => {
11007
11114
  var t$8 = /^[A-Za-z0-9:_.-]{1,128}$/;
11008
11115
  var n$8 = "[A-Za-z0-9_.-]{1,64}";
11009
11116
  var r$8 = (e) => t$8.test(e);
11010
- var i$7 = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n$8 : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`);
11117
+ var i$8 = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n$8 : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`);
11011
11118
  var a$6 = (e, t) => {
11012
11119
  if (!t || !r$8(e)) return;
11013
- let n = Object.keys(t).find((t) => i$7(t).test(e));
11120
+ let n = Object.keys(t).find((t) => i$8(t).test(e));
11014
11121
  return n === void 0 ? void 0 : {
11015
11122
  pattern: n,
11016
11123
  declaration: t[n]
@@ -11024,9 +11131,9 @@ var s$8 = /* @__PURE__ */ new Set([
11024
11131
  ]);
11025
11132
  var c$7 = (t, n) => {
11026
11133
  let r = [];
11027
- if (o$9.test(t) || r.push("a pattern is letters, digits and `:_.-`, with `{name}` for the part a page fills in — `board:{id}`"), !e$32(n)) return [...r, "a channel is an object: `{ access: { mode: \"public\" } }`"];
11028
- let { access: i, publish: a, presence: c, grant: l, maxMessageBytes: u, messagesPerSecond: d } = n, f = e$32(i) ? i.mode : void 0;
11029
- typeof f != "string" || !s$8.has(f) ? r.push("`access` is { mode: \"public\" }, { mode: \"session\" } or { mode: \"role\", permissions: […] }") : f === "role" && !(e$32(i) && Array.isArray(i.permissions) && i.permissions.every((e) => typeof e == "string")) && r.push("`access: { mode: \"role\" }` names the permissions it needs: `permissions: [\"boardEdit\"]`"), a !== void 0 && a !== "clients" && a !== "server" && r.push("`publish` is \"clients\" (pages send) or \"server\" (only a flow's realtime.publish)"), c !== void 0 && typeof c != "boolean" && r.push("`presence` is true or false"), l !== void 0 && typeof l != "boolean" && r.push("`grant` is true (a page needs a grant from `realtime.grant` to open a topic) or false");
11134
+ if (o$9.test(t) || r.push("a pattern is letters, digits and `:_.-`, with `{name}` for the part a page fills in — `board:{id}`"), !e$33(n)) return [...r, "a channel is an object: `{ access: { mode: \"public\" } }`"];
11135
+ let { access: i, publish: a, presence: c, grant: l, maxMessageBytes: u, messagesPerSecond: d } = n, f = e$33(i) ? i.mode : void 0;
11136
+ typeof f != "string" || !s$8.has(f) ? r.push("`access` is { mode: \"public\" }, { mode: \"session\" } or { mode: \"role\", permissions: […] }") : f === "role" && !(e$33(i) && Array.isArray(i.permissions) && i.permissions.every((e) => typeof e == "string")) && r.push("`access: { mode: \"role\" }` names the permissions it needs: `permissions: [\"boardEdit\"]`"), a !== void 0 && a !== "clients" && a !== "server" && r.push("`publish` is \"clients\" (pages send) or \"server\" (only a flow's realtime.publish)"), c !== void 0 && typeof c != "boolean" && r.push("`presence` is true or false"), l !== void 0 && typeof l != "boolean" && r.push("`grant` is true (a page needs a grant from `realtime.grant` to open a topic) or false");
11030
11137
  for (let [e, t] of [["maxMessageBytes", u], ["messagesPerSecond", d]]) t !== void 0 && (typeof t != "number" || !Number.isInteger(t) || t <= 0) && r.push(`\`${e}\` is a whole number above zero`);
11031
11138
  return r;
11032
11139
  };
@@ -11077,7 +11184,7 @@ var lintInstances = (ctx) => {
11077
11184
  const bound = boundProps(element);
11078
11185
  for (const [name, prop] of Object.entries(declared)) if (prop.required && element.attributes[name] === void 0 && !bound.has(name)) ctx.error("prop-missing", `${where} places component "${component.id}" without "${name}", which it requires${prop.description ? ` — ${prop.description}` : ""}. Hand it in: \`component('${component.id}', { props: { ${name}: … } })\`.`, element.id);
11079
11186
  const written = Object.fromEntries(Object.keys(declared).map((name) => [name, element.attributes[name]]));
11080
- for (const { key, expected, got, options } of s$22(written, written, declared)) {
11187
+ for (const { key, expected, got, options } of s$23(written, written, declared)) {
11081
11188
  const value = written[key];
11082
11189
  const suggestion = options && typeof value === "string" ? didYouMean(value, options) : "";
11083
11190
  ctx.error("prop-value", `${where} hands component "${component.id}" "${key}" as ${got}, and it is declared ${expected}${options ? ` (one of ${options.map((option) => `'${option}'`).join(", ")})` : ""}${suggestion || "."}`, element.id);
@@ -11086,7 +11193,7 @@ var lintInstances = (ctx) => {
11086
11193
  };
11087
11194
  //#endregion
11088
11195
  //#region ../sdk-shared/dist/server/rsc/projectData.mjs
11089
- var e$8 = "/data/";
11196
+ var e$9 = "/data/";
11090
11197
  //#endregion
11091
11198
  //#region src/schema/dataPath.ts
11092
11199
  /**
@@ -11192,14 +11299,14 @@ var lintDataPaths = (ctx) => {
11192
11299
  //#endregion
11193
11300
  //#region ../sdk-elements/dist/elements/media/Svg/sanitizeSvg.mjs
11194
11301
  var r$7 = /^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i;
11195
- var i$6 = (e) => r$7.test(e);
11302
+ var i$7 = (e) => r$7.test(e);
11196
11303
  //#endregion
11197
11304
  //#region ../sdk-shared/dist/helpers/twigWrapper/filters/filters.mjs
11198
- var e$7 = Symbol("twigArrowParams");
11305
+ var e$8 = Symbol("twigArrowParams");
11199
11306
  var t$7 = (e) => e == null || e === "";
11200
11307
  var n$7 = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
11201
11308
  var r$6 = (e) => e === void 0 || typeof e == "function" || typeof e == "symbol" ? "null" : typeof e == "bigint" ? e.toString() : JSON.stringify(e);
11202
- var i$5 = (e) => e == null ? "" : String(e);
11309
+ var i$6 = (e) => e == null ? "" : String(e);
11203
11310
  var a$5 = (e) => {
11204
11311
  let t = new TextEncoder().encode(e), n = "";
11205
11312
  for (let e = 0; e < t.length; e++) n += String.fromCharCode(t[e]);
@@ -11370,7 +11477,7 @@ var _$2 = (e) => {
11370
11477
  }
11371
11478
  };
11372
11479
  var v$1 = (e, t, n) => {
11373
- for (let r of [t == null ? "en" : i$5(t), "en"]) try {
11480
+ for (let r of [t == null ? "en" : i$6(t), "en"]) try {
11374
11481
  return new Intl.NumberFormat(r, n).format(e);
11375
11482
  } catch {
11376
11483
  continue;
@@ -11395,7 +11502,7 @@ var y$1 = {
11395
11502
  rtrim: (e) => typeof e == "string" ? e.trimEnd() : e,
11396
11503
  pad: (e, t) => {
11397
11504
  if (typeof e != "string") return e;
11398
- let n = Number(t[0]) || 0, r = t.length > 1 ? i$5(t[1]) : " ";
11505
+ let n = Number(t[0]) || 0, r = t.length > 1 ? i$6(t[1]) : " ";
11399
11506
  if (r === "") return e;
11400
11507
  let a = n - e.length;
11401
11508
  if (a <= 0) return e;
@@ -11404,7 +11511,7 @@ var y$1 = {
11404
11511
  },
11405
11512
  padRight: (e, t) => {
11406
11513
  if (typeof e != "string") return e;
11407
- let n = Number(t[0]) || 0, r = t.length > 1 ? i$5(t[1]) : " ";
11514
+ let n = Number(t[0]) || 0, r = t.length > 1 ? i$6(t[1]) : " ";
11408
11515
  if (r === "") return e;
11409
11516
  let a = n - e.length;
11410
11517
  if (a <= 0) return e;
@@ -11420,28 +11527,28 @@ var y$1 = {
11420
11527
  let n = e.match(/-?\d+(?:\.\d+)?/);
11421
11528
  return n ? Number(n[0]) : 0;
11422
11529
  },
11423
- replace: (e, t) => typeof e != "string" || t.length === 0 ? e : e.split(i$5(t[0])).join(i$5(t[1])),
11530
+ replace: (e, t) => typeof e != "string" || t.length === 0 ? e : e.split(i$6(t[0])).join(i$6(t[1])),
11424
11531
  slice: (e, t) => {
11425
11532
  if (t.length === 0) return e;
11426
11533
  let n = Number(t[0]) || 0, r = t.length > 1 && Number.isFinite(Number(t[1])) ? n + Number(t[1]) : void 0;
11427
11534
  return typeof e == "string" || Array.isArray(e) ? e.slice(n, r) : e;
11428
11535
  },
11429
- split: (e, t) => typeof e == "string" && t.length > 0 ? e.split(i$5(t[0])) : e,
11430
- join: (e, t) => Array.isArray(e) ? e.join(t.length === 0 ? "" : i$5(t[0])) : e,
11536
+ split: (e, t) => typeof e == "string" && t.length > 0 ? e.split(i$6(t[0])) : e,
11537
+ join: (e, t) => Array.isArray(e) ? e.join(t.length === 0 ? "" : i$6(t[0])) : e,
11431
11538
  reverse: (e) => typeof e == "string" ? e.split("").reverse().join("") : Array.isArray(e) ? [...e].reverse() : e,
11432
- length: (e) => typeof e == "string" || Array.isArray(e) ? e.length : typeof e == "number" ? i$5(e).length : typeof e == "object" && e ? Object.keys(e).length : 0,
11539
+ length: (e) => typeof e == "string" || Array.isArray(e) ? e.length : typeof e == "number" ? i$6(e).length : typeof e == "object" && e ? Object.keys(e).length : 0,
11433
11540
  first: (e) => typeof e == "string" ? e.length > 0 ? e[0] : "" : Array.isArray(e) ? e.length > 0 ? e[0] : void 0 : e,
11434
11541
  last: (e) => typeof e == "string" ? e.length > 0 ? e[e.length - 1] : "" : Array.isArray(e) ? e.length > 0 ? e[e.length - 1] : void 0 : e,
11435
11542
  contains: (e, t) => {
11436
11543
  if (t.length === 0) return !1;
11437
11544
  let n = t[0];
11438
- return typeof e == "string" ? e.includes(i$5(n)) : Array.isArray(e) ? e.includes(n) : !1;
11545
+ return typeof e == "string" ? e.includes(i$6(n)) : Array.isArray(e) ? e.includes(n) : !1;
11439
11546
  },
11440
- startswith: (e, t) => typeof e == "string" && t.length > 0 && e.startsWith(i$5(t[0])),
11441
- endswith: (e, t) => typeof e == "string" && t.length > 0 && e.endsWith(i$5(t[0])),
11547
+ startswith: (e, t) => typeof e == "string" && t.length > 0 && e.startsWith(i$6(t[0])),
11548
+ endswith: (e, t) => typeof e == "string" && t.length > 0 && e.endsWith(i$6(t[0])),
11442
11549
  number_format: (e, t) => {
11443
11550
  if (typeof e != "number") return e;
11444
- let n = Number(t[0]) || 0, r = t[1] == null ? "." : i$5(t[1]), a = t[2] == null ? "" : i$5(t[2]), o = e.toFixed(n);
11551
+ let n = Number(t[0]) || 0, r = t[1] == null ? "." : i$6(t[1]), a = t[2] == null ? "" : i$6(t[2]), o = e.toFixed(n);
11445
11552
  if (a === "") return o.replace(".", r);
11446
11553
  let s = o.split(".");
11447
11554
  return s[0] = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, a), s.join(r);
@@ -11452,7 +11559,7 @@ var y$1 = {
11452
11559
  let r = t[2], a = typeof r == "object" && !!r && "trimZeros" in r && r.trimZeros === !0 && Number.isInteger(n);
11453
11560
  return v$1(n, t[1], {
11454
11561
  style: "currency",
11455
- currency: i$5(t[0]),
11562
+ currency: i$6(t[0]),
11456
11563
  ...a ? {
11457
11564
  minimumFractionDigits: 0,
11458
11565
  maximumFractionDigits: 0
@@ -11474,7 +11581,7 @@ var y$1 = {
11474
11581
  let i = [...t], a = r[0];
11475
11582
  if (typeof a == "function") {
11476
11583
  let t = a;
11477
- return (t[e$7] ?? 1) >= 2 ? i.sort((e, n) => Number(t(e, n))) : i.sort((e, r) => n$7(t(e), t(r)));
11584
+ return (t[e$8] ?? 1) >= 2 ? i.sort((e, n) => Number(t(e, n))) : i.sort((e, r) => n$7(t(e), t(r)));
11478
11585
  }
11479
11586
  return i.sort(n$7);
11480
11587
  },
@@ -11514,7 +11621,7 @@ var y$1 = {
11514
11621
  if (t.length === 0) return e.filter(Boolean);
11515
11622
  let n = t[0];
11516
11623
  if (typeof n == "function") return e.filter((e, t) => n(e, t));
11517
- let r = i$5(n);
11624
+ let r = i$6(n);
11518
11625
  return e.filter((e) => {
11519
11626
  if (typeof e == "object" && e) {
11520
11627
  let t = e[r];
@@ -11525,14 +11632,14 @@ var y$1 = {
11525
11632
  },
11526
11633
  column: (e, t) => {
11527
11634
  if (!Array.isArray(e) || t.length === 0) return e;
11528
- let n = i$5(t[0]);
11635
+ let n = i$6(t[0]);
11529
11636
  return e.map((e) => typeof e == "object" && e ? e[n] : void 0);
11530
11637
  },
11531
- url_encode: (e) => typeof e == "string" ? encodeURIComponent(e) : typeof e == "object" && e && !Array.isArray(e) ? new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e, t]) => [e, i$5(t)]))).toString() : e,
11638
+ url_encode: (e) => typeof e == "string" ? encodeURIComponent(e) : typeof e == "object" && e && !Array.isArray(e) ? new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e, t]) => [e, i$6(t)]))).toString() : e,
11532
11639
  nl2br: (e) => typeof e == "string" ? e.replace(/\n/g, "<br>") : e,
11533
11640
  striptags: (e, t) => {
11534
11641
  if (typeof e != "string") return e;
11535
- let n = t.length > 0 ? i$5(t[0]).trim() : "";
11642
+ let n = t.length > 0 ? i$6(t[0]).trim() : "";
11536
11643
  if (n) {
11537
11644
  let t = n.split(/(?:\s*>\s*<\s*|<\s*|>\s*)/).filter(Boolean).map((e) => e.replace(/[/>]/g, "").trim());
11538
11645
  if (t.length > 0) {
@@ -11545,7 +11652,7 @@ var y$1 = {
11545
11652
  abs: (e) => typeof e == "number" ? Math.abs(e) : e,
11546
11653
  round: (e, t) => {
11547
11654
  if (typeof e != "number") return e;
11548
- let n = Number(t[0]) || 0, r = t[1] == null ? "common" : i$5(t[1]), a = 10 ** n;
11655
+ let n = Number(t[0]) || 0, r = t[1] == null ? "common" : i$6(t[1]), a = 10 ** n;
11549
11656
  return r === "ceil" ? Math.ceil(e * a) / a : r === "floor" ? Math.floor(e * a) / a : Math.round(e * a) / a;
11550
11657
  },
11551
11658
  format: (e, t) => {
@@ -11562,7 +11669,7 @@ var y$1 = {
11562
11669
  } else if (s === "f") {
11563
11670
  let e = Number(c);
11564
11671
  u = `${l && e >= 0 ? "+" : ""}${o === void 0 ? String(e) : e.toFixed(Number(o))}`;
11565
- } else u = i$5(c), u = o === void 0 ? u : u.slice(0, Number(o));
11672
+ } else u = i$6(c), u = o === void 0 ? u : u.slice(0, Number(o));
11566
11673
  let d = Number(a || 0);
11567
11674
  if (u.length >= d) return u;
11568
11675
  let f = /'(.)/.exec(r), p = f ? f[1] : r.includes("0") ? "0" : " ";
@@ -11573,9 +11680,9 @@ var y$1 = {
11573
11680
  random: (e) => Array.isArray(e) ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : void 0 : typeof e == "string" ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : "" : typeof e == "number" ? Math.floor(Math.random() * e) : e,
11574
11681
  date: (e, t) => {
11575
11682
  if (t.length === 0) return e;
11576
- let n = i$5(t[0]), r = h$1(e);
11683
+ let n = i$6(t[0]), r = h$1(e);
11577
11684
  if (Number.isNaN(r.getTime())) return "";
11578
- let a = g$2(r, t.length > 1 ? i$5(t[1]) : "");
11685
+ let a = g$2(r, t.length > 1 ? i$6(t[1]) : "");
11579
11686
  if (!a) return "";
11580
11687
  let o = (e) => String(e).padStart(2, "0"), s = [
11581
11688
  "January",
@@ -11642,13 +11749,13 @@ var y$1 = {
11642
11749
  md5: (e) => typeof e == "string" ? s$7(e) : e,
11643
11750
  without: (e, t) => {
11644
11751
  if (typeof e != "object" || !e || Array.isArray(e)) return e;
11645
- let n = t.map(i$5), r = {};
11752
+ let n = t.map(i$6), r = {};
11646
11753
  for (let [t, i] of Object.entries(e)) n.includes(t) || (r[t] = i);
11647
11754
  return r;
11648
11755
  },
11649
11756
  only: (e, t) => {
11650
11757
  if (typeof e != "object" || !e || Array.isArray(e)) return e;
11651
- let n = t.map(i$5), r = {};
11758
+ let n = t.map(i$6), r = {};
11652
11759
  for (let [t, i] of Object.entries(e)) n.includes(t) && (r[t] = i);
11653
11760
  return r;
11654
11761
  },
@@ -11657,12 +11764,12 @@ var y$1 = {
11657
11764
  let n = t[0];
11658
11765
  if (typeof n == "function") return e.find((e, t) => n(e, t));
11659
11766
  if (t.length < 2) return;
11660
- let r = i$5(n), a = t[1];
11767
+ let r = i$6(n), a = t[1];
11661
11768
  return e.find((e) => typeof e == "object" && e ? e[r] === a : e === a);
11662
11769
  },
11663
11770
  pluck: (e, t) => {
11664
11771
  if (!Array.isArray(e) || t.length === 0) return e;
11665
- let n = i$5(t[0]);
11772
+ let n = i$6(t[0]);
11666
11773
  return e.map((e) => typeof e == "object" && e ? e[n] : void 0);
11667
11774
  },
11668
11775
  unique: (e) => Array.isArray(e) ? [...new Set(e)] : e,
@@ -11678,7 +11785,7 @@ var y$1 = {
11678
11785
  },
11679
11786
  index_by: (e, t) => {
11680
11787
  if (!Array.isArray(e) || t.length === 0) return e;
11681
- let n = i$5(t[0]), r = {};
11788
+ let n = i$6(t[0]), r = {};
11682
11789
  for (let t of e) if (typeof t == "object" && t) {
11683
11790
  let e = String(t[n] ?? "");
11684
11791
  r[e] = t;
@@ -11687,7 +11794,7 @@ var y$1 = {
11687
11794
  },
11688
11795
  group_by: (e, t) => {
11689
11796
  if (!Array.isArray(e) || t.length === 0) return e;
11690
- let n = i$5(t[0]), r = {};
11797
+ let n = i$6(t[0]), r = {};
11691
11798
  for (let t of e) if (typeof t == "object" && t) {
11692
11799
  let e = String(t[n] ?? "");
11693
11800
  r[e] = r[e] ?? [], r[e].push(t);
@@ -11697,7 +11804,7 @@ var y$1 = {
11697
11804
  };
11698
11805
  //#endregion
11699
11806
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs
11700
- var e$6 = (e) => typeof e == "string" && /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e);
11807
+ var e$7 = (e) => typeof e == "string" && /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/.test(e);
11701
11808
  //#endregion
11702
11809
  //#region ../sdk-shared/dist/helpers/twigWrapper/inspectTemplate.mjs
11703
11810
  var r$5 = /* @__PURE__ */ new Set([
@@ -11706,10 +11813,10 @@ var r$5 = /* @__PURE__ */ new Set([
11706
11813
  "min",
11707
11814
  "range"
11708
11815
  ]);
11709
- var i$4 = (e) => `value|round(0, '${e}')`;
11816
+ var i$5 = (e) => `value|round(0, '${e}')`;
11710
11817
  var a$4 = {
11711
- floor: i$4("floor"),
11712
- ceil: i$4("ceil"),
11818
+ floor: i$5("floor"),
11819
+ ceil: i$5("ceil"),
11713
11820
  clamp: "min(max(value, low), high)"
11714
11821
  };
11715
11822
  var o$7 = (t) => {
@@ -11806,7 +11913,7 @@ var c$5 = class {
11806
11913
  }
11807
11914
  };
11808
11915
  var l$6 = (e) => {
11809
- let r = e$36(e);
11916
+ let r = e$37(e);
11810
11917
  if (r.error) return {
11811
11918
  issues: [r.error],
11812
11919
  freeNames: []
@@ -11861,6 +11968,26 @@ var checkShapedReads = (ctx, reads, where, id) => {
11861
11968
  for (const [source, field] of reads) if (isShaped(source)) checkShapedField(ctx, source, field, where, id);
11862
11969
  };
11863
11970
  //#endregion
11971
+ //#region ../sdk-shared/dist/dataSource/helpers/getSourceName.mjs
11972
+ var e$6 = (e, t) => `${e}_${t}`;
11973
+ //#endregion
11974
+ //#region ../sdk-shared/dist/schema/serverElements.mjs
11975
+ var i$4 = (e, t, i, a) => {
11976
+ if (t === void 0) return [];
11977
+ let o = i ? new Set(i) : void 0, s = [], c = /* @__PURE__ */ new Set(), l = e.flat[t], u = (e) => typeof e == "string" ? e : "", d = [t, ...l ? t$10((t) => e.flat[t], u(l.attributes.layout), u(l.attributes.layoutContainer)).map((e) => e.layout) : []];
11978
+ for (; d.length > 0;) {
11979
+ let t = d.pop();
11980
+ if (t === void 0 || c.has(t)) continue;
11981
+ c.add(t);
11982
+ let r = e.flat[t];
11983
+ if (!r || a && !u$6(r.definition.flag, a)) continue;
11984
+ r.definition.runtime === "server" && (!o || o.has(r.id)) && s.push(r);
11985
+ let { items: i } = r.definition;
11986
+ i && d.push(...i);
11987
+ }
11988
+ return s;
11989
+ };
11990
+ //#endregion
11864
11991
  //#region src/schema/lint/pages.ts
11865
11992
  /**
11866
11993
  * Where a link in `page` mode, or a `navigate` to a page, goes: a page named by its id, or a path read as the path it
@@ -11868,7 +11995,7 @@ var checkShapedReads = (ctx, reads, where, id) => {
11868
11995
  * in-app, so it is refused; a bare name that is no page's id is a typo.
11869
11996
  */
11870
11997
  var checkPageTarget = (ctx, target, where, field, id) => {
11871
- if (target === "" || target.startsWith("#") || target.startsWith("/") || e$6(target)) return;
11998
+ if (target === "" || target.startsWith("#") || target.startsWith("/") || e$7(target)) return;
11872
11999
  if (/^[a-z][a-z0-9+.-]*:/i.test(target)) {
11873
12000
  ctx.error("page-target-url", `${where} is "${target}", a full URL, in page mode — it would render as a path inside the space. Write \`${field}: 'external'\` for it.`, id);
11874
12001
  return;
@@ -11886,6 +12013,39 @@ var folderPath = (ctx, folderId) => {
11886
12013
  }
11887
12014
  return parts.join("/");
11888
12015
  };
12016
+ /** A page's own templates, by the attribute the document holds and the field of the page that writes it. */
12017
+ var PAGE_TEMPLATES = [
12018
+ ["seoPageTitle", "seoTitle"],
12019
+ ["seoPageDescription", "seoDescription"],
12020
+ ["notFound", "notFound"]
12021
+ ];
12022
+ /** One expression, whole: what a `notFound` is, and anything else is never `true`. */
12023
+ var ONE_EXPRESSION = /^\s*\{\{[\s\S]*\}\}\s*$/;
12024
+ /**
12025
+ * A page's title, description and `notFound` written as templates are evaluated by the server as it answers — the head,
12026
+ * the status — and the title again in the browser over the same answers: they read only what is there by then, the
12027
+ * server providers of the page and of its layouts by their source names (`apiContainer_capsule`), and `navigation`.
12028
+ * Anything else is not there yet: the head would carry the deployment's own title, and the address would answer 200.
12029
+ */
12030
+ var checkPageTemplates = (ctx, pageId, where) => {
12031
+ const page = ctx.element(pageId);
12032
+ const providers = i$4({ flat: ctx.flat }, pageId).map((element) => e$6(element.definition.type, element.id));
12033
+ const readable = /* @__PURE__ */ new Set(["navigation", ...providers]);
12034
+ for (const [attribute, field] of PAGE_TEMPLATES) {
12035
+ const template = page?.attributes[attribute];
12036
+ if (attribute === "notFound" && typeof template === "string" && template !== "" && !ONE_EXPRESSION.test(template)) {
12037
+ ctx.error("not-found-not-a-template", `${where} has \`notFound: ${JSON.stringify(template)}\`, which is never \`true\`: it is one expression over the page's server providers, \`'{{ not apiContainer_post.found }}'\`.`, pageId);
12038
+ continue;
12039
+ }
12040
+ if (typeof template !== "string" || !e$7(template)) continue;
12041
+ const { issues, freeNames } = l$6(template);
12042
+ const unreadable = freeNames.filter((name) => !readable.has(name));
12043
+ if (issues.length === 0 && unreadable.length === 0) continue;
12044
+ const why = issues.length > 0 ? `cannot be read as written — ${issues.join("; ")}` : `reads ${unreadable.map((name) => `\`${name}\``).join(", ")}, which is not there when the server answers`;
12045
+ const can = providers.length > 0 ? providers.map((name) => `\`${name}\``).join(", ") : "none: no provider on it runs on the server";
12046
+ ctx.error("page-template", `${where}: \`${field}\` ${why}. A page's own templates are evaluated by the server before the page reaches the browser, from its server providers — ${can} — and \`navigation\`. Read the record from a provider with \`runtime: 'server'\` on the page (or its layout), or write words of its own.`, pageId);
12047
+ }
12048
+ };
11889
12049
  /**
11890
12050
  * Pages: who each is for, and that no two answer the same visitors at one address — the router takes one and the
11891
12051
  * other can never be reached. Two pages on one path is a supported shape only when they differ by `accessLevel`: a
@@ -11897,6 +12057,7 @@ var lintPages = (ctx) => {
11897
12057
  const page = ctx.element(pageId);
11898
12058
  if (!page) continue;
11899
12059
  const where = ctx.describe(pageId);
12060
+ checkPageTemplates(ctx, pageId, where);
11900
12061
  const { accessLevel, slug, folder } = page.attributes;
11901
12062
  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);
11902
12063
  const path = `/${[typeof folder === "string" && folder ? folderPath(ctx, folder) : "", textOf(slug)].filter(Boolean).join("/")}`;
@@ -11943,6 +12104,27 @@ var lintTypeSlots = (ctx) => {
11943
12104
  };
11944
12105
  var LEVEL_SLOT = /^heading([1-6])$/;
11945
12106
  var classesOf$2 = (selector) => (selector ?? "").split(/\s+/).filter(Boolean);
12107
+ /** The fields drawn as a box — the `input` slot — with the `<input>` or `<select>` inside it, the `field` slot. */
12108
+ var BOXED_FIELDS = new Set(Object.entries(g$4.content.defaultStyle.subTypes).filter(([, variant]) => "field" in variant.style).map(([subType]) => subType));
12109
+ var FOCUS_STATES = ["focus", "focus-visible"];
12110
+ /**
12111
+ * A text field's or a select's `input` slot is the box the field is drawn in, a `<div>` that never takes focus: a
12112
+ * `focus` state on its class is never seen, and a keyboard user tabbing to the field finds no ring at all.
12113
+ * `focus-within` is the box's own, lit while the field inside has focus.
12114
+ */
12115
+ var checkFocusOnFieldBox = (ctx, element, where) => {
12116
+ if (element.definition.type !== "formControl") return;
12117
+ const subType = textOf(element.attributes.subType, textOf(ctx.defaultsFor(element).subType, "text"));
12118
+ if (!BOXED_FIELDS.has(subType)) return;
12119
+ for (const className of classesOf$2(element.definition.styleSelectors.input)) for (const items of Object.values(ctx.style.platform)) {
12120
+ const item = Object.hasOwn(items, className) ? items[className] : void 0;
12121
+ const states = item?.type === "class" ? item.attributes.base.states : void 0;
12122
+ const state = FOCUS_STATES.find((name) => states && Object.hasOwn(states, name));
12123
+ if (!state) continue;
12124
+ ctx.warn("focus-on-field-box", `${where} is a "${subType}" field whose \`input\` slot ("${className}") sets \`${state}\` — but \`input\` is the box the field is drawn in, which never takes focus, so the rule is never seen and a keyboard user finds no ring. Write it as \`'focus-within'\` on the same class (the box lights up while the field inside has focus), or put the state on the \`field\` slot.`, element.id);
12125
+ return;
12126
+ }
12127
+ };
11946
12128
  /** A class's own rules at one breakpoint — its base, and each of its states — by where they apply, property by property. */
11947
12129
  var classRules$1 = (items, name) => {
11948
12130
  const item = Object.hasOwn(items, name) ? items[name] : void 0;
@@ -12056,7 +12238,7 @@ var checkName = (ctx, name, template, where, site, scope, id) => {
12056
12238
  * typo, and the composed surface always supplies it.
12057
12239
  */
12058
12240
  var checkTemplate = (ctx, template, where, site, scope = /* @__PURE__ */ new Set(), id) => {
12059
- if (!e$6(template)) return;
12241
+ if (!e$7(template)) return;
12060
12242
  const { issues, freeNames } = l$6(template);
12061
12243
  const reads = globalFieldsRead(template);
12062
12244
  checkComputedReads(ctx, reads, where, site, id);
@@ -12261,16 +12443,22 @@ var checkBindings = (ctx, element, where) => {
12261
12443
  */
12262
12444
  var checkAttributeTemplates = (ctx, element, where) => {
12263
12445
  if (PROSE_TYPES.has(element.definition.type)) return;
12264
- for (const value of stringsIn$1(element.attributes)) if (e$6(value) && !n$46(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 });
12446
+ const evaluated = V[element.definition.type] ?? [];
12447
+ const rendered = Object.fromEntries(Object.entries(element.attributes).filter(([name]) => !evaluated.includes(name)));
12448
+ for (const name of evaluated) {
12449
+ const value = element.attributes[name];
12450
+ if (typeof value === "string" && value !== "") checkTemplate(ctx, value, `${where}: its "${name}"`, { kind: "binding" }, ctx.scope(element.id), element.id);
12451
+ }
12452
+ for (const value of stringsIn$1(rendered)) if (e$7(value) && !n$46(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 });
12265
12453
  const routeParams = ctx.routeParams(element.id);
12266
12454
  const scope = ctx.scope(element.id);
12267
- for (const [name, value] of Object.entries(element.attributes)) if (typeof value === "string" && n$46(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
12455
+ for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$46(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
12268
12456
  kind: "attribute",
12269
12457
  routeParams
12270
12458
  }, scope, element.id);
12271
12459
  };
12272
12460
  /** A value at a dotted path of a record, as the list reads its `itemKey`. */
12273
- var fieldOf = (item, path) => path.split(".").reduce((value, key) => e$32(value) ? value[key] : void 0, item);
12461
+ var fieldOf = (item, path) => path.split(".").reduce((value, key) => e$33(value) ? value[key] : void 0, item);
12274
12462
  /**
12275
12463
  * A list's `itemKey` that does not name each of its fixed items once. The list falls back to the items' `id`, then to
12276
12464
  * their position, so the rows do not stay with their items as the author meant. Bound items arrive at run time and
@@ -12350,6 +12538,11 @@ var checkIntent = (ctx, element, where) => {
12350
12538
  "query"
12351
12539
  ].find((key) => typeof attributes[key] === "string" && attributes[key] !== "");
12352
12540
  if (element.definition.runtime === "server" && ctx.component) ctx.error("server-provider-in-component", `${where} is resolved on the server (\`runtime: 'server'\`) inside component "${ctx.component.id}", and the page server only resolves what a page and its layouts hold — it would stay loading wherever the component is placed. Put the provider on the page, around the instance, and hand the component what it reads as a prop: \`component('${ctx.component.id}', { props: { rows: … } })\`, its list reading \`props.rows\`.`, element.id);
12541
+ const notFound = attributes.notFound;
12542
+ if (typeof notFound === "string" && notFound !== "") {
12543
+ if (element.definition.runtime !== "server") ctx.error("not-found-in-browser", `${where} says when its answer means the address shows nothing (\`notFound\`), but it is asked from the browser, after the page was sent with its status. Give it \`runtime: 'server'\` — or remove \`notFound\` and show the page's "not found" part with \`visible\`.`, element.id);
12544
+ else if (!/^\s*\{\{[\s\S]*\}\}\s*$/.test(notFound)) ctx.error("not-found-not-a-template", `${where} has \`notFound: ${JSON.stringify(notFound)}\`, which is never \`true\`: it is one expression against the answer, \`'{{ source.found == false }}'\`.`, element.id);
12545
+ }
12353
12546
  if (element.definition.runtime === "server" && serverSource && ctx.schema.rsc?.enabled === false) ctx.warn("server-data-without-rsc", `${where} is resolved on the server (\`runtime: 'server'\`) through its \`${serverSource}\`, but the space turns server data off (\`rsc: { enabled: false }\`), so it renders its mock data and never asks. Remove that: server data is on unless a space turns it off.`, element.id, { source: serverSource });
12354
12547
  const fallback = ctx.catalogs.defaultAttributes?.[type]?.content;
12355
12548
  if ((element.definition.items?.length ?? 0) > 0 && typeof fallback === "string" && fallback !== "" && attributes.content === fallback && !bound("content")) ctx.warn("default-content-beside-children", `${where} has children and still its default content "${fallback}", which renders beside them. Set \`content: ''\` to show only the children, or put the words in \`content\`.`, element.id, {
@@ -12412,10 +12605,23 @@ var warnFormControls = (ctx) => {
12412
12605
  }
12413
12606
  }
12414
12607
  };
12608
+ /**
12609
+ * A field is optional unless `required: true`, as an HTML field is. One with a `requiredMessage` and nothing requiring
12610
+ * it was written for a field that must be answered: the message is never shown, and an empty answer is sent — what a
12611
+ * space written while fields were required by default does after an upgrade, without a word.
12612
+ */
12613
+ var checkRequiredMessage = (ctx, element, where) => {
12614
+ const { required, requiredMessage } = element.attributes;
12615
+ const message = textOf(requiredMessage).trim();
12616
+ const requires = required === true || required === "true" || typeof required === "string" && required.includes("{{");
12617
+ const bound = bindingsOf$2(element).some(({ binding }) => binding.to === "required");
12618
+ if (element.definition.type !== "formControl" || message === "" || requires || bound) return;
12619
+ ctx.warn("required-message-unused", `${where} has a \`requiredMessage\` ("${shorten(message)}") but nothing requires it — a field is optional unless \`required: true\` — so the message is never shown and an empty answer is sent. Add \`required: true\`, or drop the message.`, element.id);
12620
+ };
12415
12621
  /** An `svg` draws one `<svg>…</svg>`; anything else renders nothing at all. */
12416
12622
  var checkSvgMarkup = (ctx, element, where) => {
12417
12623
  const { content } = element.attributes;
12418
- if (element.definition.type !== "svg" || typeof content !== "string" || content === "" || i$6(content)) return;
12624
+ if (element.definition.type !== "svg" || typeof content !== "string" || content === "" || i$7(content)) return;
12419
12625
  ctx.error("svg-not-svg", `${where} is an \`svg\` whose \`content\` is not one \`<svg>…</svg>\` (${JSON.stringify(shorten(content))}), so it draws nothing. Give it the SVG markup alone; HTML around it belongs in a \`blockHtml\`.`, element.id);
12420
12626
  };
12421
12627
  var lintElements = (ctx) => {
@@ -12438,8 +12644,10 @@ var lintElements = (ctx) => {
12438
12644
  checkAttributeTemplates(ctx, element, where);
12439
12645
  checkIntent(ctx, element, where);
12440
12646
  checkSvgMarkup(ctx, element, where);
12647
+ checkRequiredMessage(ctx, element, where);
12441
12648
  checkSlots(ctx, element, where);
12442
12649
  checkHeadingLevels(ctx, element, where);
12650
+ checkFocusOnFieldBox(ctx, element, where);
12443
12651
  warnRouteParams(ctx, element, where);
12444
12652
  }
12445
12653
  warnFormControls(ctx);
@@ -12458,17 +12666,17 @@ var isRead = (name, schema, elements) => {
12458
12666
  var lintDeclaration = (ctx, name, flag) => {
12459
12667
  const where = `Feature flag "${name}"`;
12460
12668
  if (!a$8(name)) ctx.error("flag-name", `${where} is not a name a template can read as \`flags.${name}\`. Use letters, digits and "_", starting with a letter or "_": "${name.replace(/[^A-Za-z0-9_]/g, "_")}".`);
12461
- if (!e$32(flag) || typeof flag.value !== "boolean" || !Array.isArray(flag.rules)) {
12669
+ if (!e$33(flag) || typeof flag.value !== "boolean" || !Array.isArray(flag.rules)) {
12462
12670
  ctx.error("flag-shape", `${where} is ${JSON.stringify(flag)}. A flag is { value: true | false, rules: [{ when: { combinator: 'and', rules: [...] }, value: true | false }] } — \`value\` is its answer when no rule matches.`);
12463
12671
  return;
12464
12672
  }
12465
12673
  flag.rules.forEach((rule, index) => {
12466
12674
  const at = `${where}, rule ${index + 1}`;
12467
- if (!e$32(rule) || typeof rule.value !== "boolean" || !e$32(rule.when)) {
12675
+ if (!e$33(rule) || typeof rule.value !== "boolean" || !e$33(rule.when)) {
12468
12676
  ctx.error("flag-rule-shape", `${at} is ${JSON.stringify(rule)}. A rule is { when: { … }, value: true | false }.`);
12469
12677
  return;
12470
12678
  }
12471
- if (!i$10(rule.when)) ctx.warn("flag-rule-empty", `${at} has no conditions, so it never decides anything — an unfinished rule is skipped, not read as "always". Give it a condition (\`{ field: 'environment', operator: '=', value: 'staging' }\`), or set the flag's \`value\` instead.`);
12679
+ if (!i$11(rule.when)) ctx.warn("flag-rule-empty", `${at} has no conditions, so it never decides anything — an unfinished rule is skipped, not read as "always". Give it a condition (\`{ field: 'environment', operator: '=', value: 'staging' }\`), or set the flag's \`value\` instead.`);
12472
12680
  });
12473
12681
  };
12474
12682
  /**
@@ -12548,7 +12756,7 @@ var checkElementIds = (ctx, params, spec, at, hostId) => {
12548
12756
  const kind = elementType ? `an ${elementType}` : "an element";
12549
12757
  const listed = candidates.length > 0 ? `: ${candidates.slice(0, 8).join(", ")}${candidates.length > 8 ? ", …" : ""}` : ", and the space has none";
12550
12758
  for (const id of ids) {
12551
- if (typeof id !== "string" || e$6(id)) continue;
12759
+ if (typeof id !== "string" || e$7(id)) continue;
12552
12760
  const element = ctx.element(id) ?? (Object.hasOwn(ctx.schema.flat, id) ? ctx.schema.flat[id] : void 0);
12553
12761
  const type = element?.definition.type;
12554
12762
  if (element && (!elementType || type === elementType)) continue;
@@ -12619,7 +12827,7 @@ var checkWhileRunning = (ctx, node, where, hostId) => {
12619
12827
  ctx.error("while-running", `${where}: step "${node.id}" (${node.action}) sets whileRunning, which only a flow's trigger reads. Put it on the first step: \`[whileRunning('${whileRunning}', onClick()), …]\`.`, hostId);
12620
12828
  return;
12621
12829
  }
12622
- if (!e$12.includes(whileRunning)) ctx.error("while-running", `${where}: the trigger "${node.action}" sets whileRunning "${whileRunning}". It is one of ${e$12.map((mode) => `'${mode}'`).join(", ")}.`, hostId);
12830
+ if (!e$13.includes(whileRunning)) ctx.error("while-running", `${where}: the trigger "${node.action}" sets whileRunning "${whileRunning}". It is one of ${e$13.map((mode) => `'${mode}'`).join(", ")}.`, hostId);
12623
12831
  };
12624
12832
  var checkTrigger = (ctx, node, where, host) => {
12625
12833
  checkTriggerKeys(ctx, node, where, host.id);
@@ -12661,7 +12869,7 @@ var checkCallbackKey = (ctx, node, where, hostId) => {
12661
12869
  const targetElement = ctx.element(target);
12662
12870
  const type = targetElement && ctx.catalogType(targetElement);
12663
12871
  const names = type === void 0 || !targetElement ? null : ctx.attributeNamesFor(targetElement);
12664
- if (typeof key !== "string" || key === "" || e$6(key) || type === void 0 || !names) return;
12872
+ if (typeof key !== "string" || key === "" || e$7(key) || type === void 0 || !names) return;
12665
12873
  const at = `${where}: step "${node.action}" sets`;
12666
12874
  if (category === "state") {
12667
12875
  const keys = ["visibility", ...["base", ...ctx.catalogs.slotNames?.[type] ?? []].map((selector) => `styleSelectors.${selector}`)];
@@ -12878,7 +13086,7 @@ var attributeText = (element, key) => {
12878
13086
  /** The path a link inside the space leads to, as the link resolves it: a page id (or its path), or a path of its own. */
12879
13087
  var pathOf = (ctx, link, mode) => {
12880
13088
  const href = attributeText(link, "href");
12881
- if (mode === "page") return o$12(ctx.flat, ctx.schema.pageFolders, href, true);
13089
+ if (mode === "page") return s$10(ctx.flat, ctx.schema.pageFolders, href, true);
12882
13090
  return `/${href}`.replaceAll(/\/+/g, "/").split(/[?#]/)[0];
12883
13091
  };
12884
13092
  /**
@@ -13046,7 +13254,7 @@ var f$3 = /* @__PURE__ */ new Set([
13046
13254
  "loop"
13047
13255
  ]);
13048
13256
  var p$3 = (i) => {
13049
- if (!e$32(i)) return ["motion is an object: `{ enter: \"fade-up\", on: \"view\" }`"];
13257
+ if (!e$33(i)) return ["motion is an object: `{ enter: \"fade-up\", on: \"view\" }`"];
13050
13258
  let a = [];
13051
13259
  for (let e of Object.keys(i)) f$3.has(e) || a.push(`motion has no "${e}" — it takes enter, on, duration, delay, stagger and loop`);
13052
13260
  i.enter !== void 0 && !d$4(t$6, i.enter) && a.push(`motion.enter is one of ${t$6.join(", ")}`), i.on !== void 0 && !d$4(n$6, i.on) && a.push(`motion.on is ${n$6.slice(0, -1).join(", ")} or ${String(n$6.at(-1))}`), i.loop !== void 0 && !d$4(r$4, i.loop) && a.push(`motion.loop is one of ${r$4.join(", ")}`);
@@ -13231,7 +13439,7 @@ var lintStyle = (ctx) => {
13231
13439
  //#region src/schema/lint/fixes.ts
13232
13440
  var URL_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
13233
13441
  /** A page target that is really a URL: the one reading of `mailto:`/`https:` a page-mode link can never mean. */
13234
- var isUrlTarget = (target) => typeof target === "string" && !e$6(target) && URL_SCHEME.test(target);
13442
+ var isUrlTarget = (target) => typeof target === "string" && !e$7(target) && URL_SCHEME.test(target);
13235
13443
  var isRoot = (element) => !element.definition.parentId;
13236
13444
  var stepsOf = (element) => Object.values(element.definition.interactions ?? {});
13237
13445
  /**
@@ -13242,7 +13450,7 @@ var settleUnknownKeys = (record, known, what, on, report, defaults = {}) => {
13242
13450
  for (const key of Object.keys(record)) {
13243
13451
  if (known.includes(key)) continue;
13244
13452
  const wrapped = record[key];
13245
- if (e$32(wrapped) && Object.keys(wrapped).length > 0 && Object.keys(wrapped).every((inner) => known.includes(inner))) {
13453
+ if (e$33(wrapped) && Object.keys(wrapped).length > 0 && Object.keys(wrapped).every((inner) => known.includes(inner))) {
13246
13454
  const inners = Object.keys(wrapped);
13247
13455
  if (inners.every((inner) => record[inner] === void 0 || record[inner] === defaults[inner])) {
13248
13456
  Object.assign(record, wrapped);
@@ -13964,16 +14172,16 @@ var n$1 = (n) => {
13964
14172
  dark: []
13965
14173
  };
13966
14174
  return Object.entries(r).forEach(([n, r]) => {
13967
- switch (n$20(n) ? n : e$28.CUSTOM) {
13968
- case e$28.COLOR:
14175
+ switch (n$20(n) ? n : e$29.CUSTOM) {
14176
+ case e$29.COLOR:
13969
14177
  Object.keys(r).forEach((e) => {
13970
14178
  let t = r[e];
13971
14179
  i.default.push(`--${e}:${t.default};`), t.light && i.light.push(`--${e}:${t.light};`), t.dark && i.dark.push(`--${e}:${t.dark};`);
13972
14180
  });
13973
14181
  break;
13974
- case e$28.SPACING:
13975
- case e$28.SHADOW:
13976
- case e$28.CUSTOM:
14182
+ case e$29.SPACING:
14183
+ case e$29.SHADOW:
14184
+ case e$29.CUSTOM:
13977
14185
  default: Object.keys(r).forEach((e) => {
13978
14186
  i.default.push(`--${e}:${r[e]};`);
13979
14187
  });
@@ -14000,9 +14208,9 @@ var p = (e, t, n = "") => [`${e}[data-variant="${t}"]${n}`, `${e}--${t}${n}`];
14000
14208
  var m = (e, t, n) => {
14001
14209
  let r = t ? "," : ", ", i = [];
14002
14210
  for (let [l, { default: u, states: d, variants: f }] of Object.entries(e)) {
14003
- let e = p$6(l), m = e ? "" : `.${l}`, h = e ? " > &" : " &", g = e ? "*" : m;
14211
+ let e = p$7(l), m = e ? "" : `.${l}`, h = e ? " > &" : " &", g = e ? "*" : m;
14004
14212
  u?.length && i.push(y(`:where(${g})${h}`, u, {}, t, n));
14005
- for (let [e, r] of o$15(d ?? {})) i.push(y(`:where(${m}${u$6(e)})${h}`, r, {}, t, n)), d$7(e) && i.push(v(`:where(${g})${h}`, r, t, n));
14213
+ for (let [e, r] of o$15(d ?? {})) i.push(y(`:where(${m}${u$7(e)})${h}`, r, {}, t, n)), d$6(e) && i.push(v(`:where(${g})${h}`, r, t, n));
14006
14214
  let _ = (t, n = "") => e ? [`[data-variant="${t}"]${n}`] : p(m, t, n);
14007
14215
  for (let [e, o] of Object.entries(f ?? {})) {
14008
14216
  if (o.default.length) {
@@ -14010,20 +14218,20 @@ var m = (e, t, n) => {
14010
14218
  i.push(y(`:where(${a})${h}`, o.default, {}, t, n));
14011
14219
  }
14012
14220
  for (let [l, u] of o$15(o.states ?? {})) {
14013
- let a = _(e, u$6(l)).join(r);
14014
- i.push(y(`:where(${a})${h}`, u, {}, t, n)), d$7(l) && i.push(v(`:where(${_(e).join(r)})${h}`, u, t, n));
14221
+ let a = _(e, u$7(l)).join(r);
14222
+ i.push(y(`:where(${a})${h}`, u, {}, t, n)), d$6(l) && i.push(v(`:where(${_(e).join(r)})${h}`, u, t, n));
14015
14223
  }
14016
14224
  }
14017
14225
  }
14018
14226
  return i;
14019
14227
  };
14020
14228
  var h = (e, t, n) => Object.entries(e).flatMap(([e, { default: r, states: o }]) => {
14021
- let l = r$18(e), u = r.length ? [y(`&${l}`, r, {}, t, n)] : [];
14022
- for (let [e, r] of o$15(o ?? {})) u.push(y(`&${u$6(e)}${l}`, r, {}, t, n)), d$7(e) && u.push(v(`&${l}`, r, t, n));
14229
+ let l = r$17(e), u = r.length ? [y(`&${l}`, r, {}, t, n)] : [];
14230
+ for (let [e, r] of o$15(o ?? {})) u.push(y(`&${u$7(e)}${l}`, r, {}, t, n)), d$6(e) && u.push(v(`&${l}`, r, t, n));
14023
14231
  return u;
14024
14232
  });
14025
14233
  var g = (e, t, n, i) => Object.entries(t).flatMap(([t, { default: a, states: o, pseudos: s }]) => {
14026
- let c = u$8(t);
14234
+ let c = u$9(t);
14027
14235
  if (!c) return [];
14028
14236
  let l = _(e, a, {
14029
14237
  states: o,
@@ -14033,8 +14241,8 @@ var g = (e, t, n, i) => Object.entries(t).flatMap(([t, { default: a, states: o,
14033
14241
  });
14034
14242
  var _ = (e, t, n, r = !0, i = l$1) => {
14035
14243
  let { states: o, variants: d, ancestors: f, pseudos: p, conditions: _ } = n, b = r ? t.join("") : t.map((e) => `${u(i + l$1)}${e}`).join("\n").replaceAll(":", ": "), x = o ? o$15(o).flatMap(([e, t]) => {
14036
- let n = y(`&${u$6(e)}`, t, {}, r, i + l$1);
14037
- return d$7(e) ? [n, v("&", t, r, i + l$1)] : [n];
14244
+ let n = y(`&${u$7(e)}`, t, {}, r, i + l$1);
14245
+ return d$6(e) ? [n, v("&", t, r, i + l$1)] : [n];
14038
14246
  }) : [], S = e.replace("plitzi__", ""), C = d ? Object.entries(d).map(([e, t]) => y(`&[data-variant="${e}"]${r ? "," : ", "}&${S}--${e}`, t.default, {
14039
14247
  states: t.states,
14040
14248
  pseudos: t.pseudos
@@ -14088,9 +14296,9 @@ var o$2 = (e, t = ":root", n = 2, r = !0) => {
14088
14296
  };
14089
14297
  //#endregion
14090
14298
  //#region ../sdk-style/dist/StyleHelper.mjs
14091
- var s$1 = Object.fromEntries(e$29.map((e) => [e, t$26(e)]));
14299
+ var s$1 = Object.fromEntries(e$30.map((e) => [e, t$26(e)]));
14092
14300
  var c = (e) => {
14093
- if (t$25(e)) return e$30[e];
14301
+ if (t$25(e)) return e$31[e];
14094
14302
  let t = e.match(/(\d*\.?\d+)(px|rem)/);
14095
14303
  if (!t) return 0;
14096
14304
  let r = parseFloat(t[1]);
@@ -14943,7 +15151,7 @@ var byProperty = (rules) => {
14943
15151
  return responsive;
14944
15152
  };
14945
15153
  /** The states a selector can react to — the closed list the style editor offers, read from where it is declared. */
14946
- var STYLE_STATES = e$25;
15154
+ var STYLE_STATES = e$26;
14947
15155
  var STYLE_STATE_SET = new Set(STYLE_STATES);
14948
15156
  var RULE_SET_KEYS = /* @__PURE__ */ new Set([
14949
15157
  "css",
@@ -14970,7 +15178,7 @@ var toStates = (states) => {
14970
15178
  };
14971
15179
  var CLASS_NAME = /^-?[_a-zA-Z][\w-]*$/;
14972
15180
  var toAncestors = (ancestors) => Object.entries(ancestors ?? {}).map(([name, ancestor]) => {
14973
- if (!p$6(name) && !CLASS_NAME.test(name)) throw new AuthoringError("ancestor-not-class", `The ancestor "${name}" is not a class name. An ancestor condition is keyed by a class that ancestor wears — \`[card.name]\` for a \`styles()\` declaration — or by \`'>'\` for the parent, whatever it wears.`);
15181
+ if (!p$7(name) && !CLASS_NAME.test(name)) throw new AuthoringError("ancestor-not-class", `The ancestor "${name}" is not a class name. An ancestor condition is keyed by a class that ancestor wears — \`[card.name]\` for a \`styles()\` declaration — or by \`'>'\` for the parent, whatever it wears.`);
14974
15182
  return [name, toBlocks({
14975
15183
  css: ancestor.css,
14976
15184
  states: ancestor.states,
@@ -15007,11 +15215,11 @@ var assertPseudo = (pseudo, part) => {
15007
15215
  const ruleSets = partRuleSets(part);
15008
15216
  for (const rules of ruleSets) for (const [property, value] of Object.entries(rules)) {
15009
15217
  if (property === "content") {
15010
- if (!i$16.includes(pseudo)) throw new AuthoringError("style-pseudo-content", `\`content\` on \`::${pseudo}\` draws nothing: only ${i$16.map((name) => `\`::${name}\``).join(", ")} take one.`);
15011
- if (!m$3(String(value))) throw new AuthoringError("style-pseudo-content", `\`content: ${String(value)}\` on \`::${pseudo}\` is not text CSS can read, so nothing is drawn. Text goes in quotes inside the string — \`content: '"${String(value).replace(/"/g, "\\\"")}"'\` — and an empty box is \`'""'\`; \`counter()\`, \`attr()\` and \`url()\` are written as they are.`);
15218
+ if (!i$17.includes(pseudo)) throw new AuthoringError("style-pseudo-content", `\`content\` on \`::${pseudo}\` draws nothing: only ${i$17.map((name) => `\`::${name}\``).join(", ")} take one.`);
15219
+ if (!m$4(String(value))) throw new AuthoringError("style-pseudo-content", `\`content: ${String(value)}\` on \`::${pseudo}\` is not text CSS can read, so nothing is drawn. Text goes in quotes inside the string — \`content: '"${String(value).replace(/"/g, "\\\"")}"'\` — and an empty box is \`'""'\`; \`counter()\`, \`attr()\` and \`url()\` are written as they are.`);
15012
15220
  continue;
15013
15221
  }
15014
- if (!u$7(pseudo, property)) throw new AuthoringError("style-pseudo-property", `\`${property}\` on \`::${pseudo}\` is dropped by every browser — \`::${pseudo}\` honours ${(l$8[pseudo] ?? []).map((name) => `\`${name}\``).join(", ")}. Style the element itself for the rest.`);
15222
+ if (!u$8(pseudo, property)) throw new AuthoringError("style-pseudo-property", `\`${property}\` on \`::${pseudo}\` is dropped by every browser — \`::${pseudo}\` honours ${(l$8[pseudo] ?? []).map((name) => `\`${name}\``).join(", ")}. Style the element itself for the rest.`);
15015
15223
  }
15016
15224
  if (a$14.includes(pseudo) && !ruleSets.some((rules) => Object.hasOwn(rules, "content"))) throw new AuthoringError("style-pseudo-content", `\`::${pseudo}\` has no \`content\`, so the browser draws nothing for it. Give it one — \`content: '""'\` for an empty box — in its rules or in a state's.`);
15017
15225
  };
@@ -15019,7 +15227,7 @@ var toPseudos = (pseudos) => {
15019
15227
  const parts = /* @__PURE__ */ new Map();
15020
15228
  for (const [name, spec] of Object.entries(pseudos ?? {})) {
15021
15229
  const bare = name.replace(/^:+/, "");
15022
- if (!n$19(name)) throw new AuthoringError("style-pseudo-unknown", `Unknown pseudo-element "${name}"${n$19(bare) ? ` — write it without the colons, "${bare}"` : didYouMean(bare, e$26)}. A class dresses ${e$26.join(", ")}.`);
15230
+ if (!n$19(name)) throw new AuthoringError("style-pseudo-unknown", `Unknown pseudo-element "${name}"${n$19(bare) ? ` — write it without the colons, "${bare}"` : didYouMean(bare, e$27)}. A class dresses ${e$27.join(", ")}.`);
15023
15231
  const part = partOf(spec);
15024
15232
  const rules = {
15025
15233
  base: toResponsive(part.css),
@@ -16926,7 +17134,7 @@ var declarationsIn = (body) => splitTopLevel(body, ";").flatMap((declaration) =>
16926
17134
  //#region src/decompile/customCss.ts
16927
17135
  var STATE_SET$1 = new Set(STYLE_STATES.filter((state) => state !== "hidden"));
16928
17136
  /** The states a selector writes as something other than their name — `:first-child`, `:nth-child(odd)`, `current`. */
16929
- var WRITTEN_STATES = [...STATE_SET$1].filter((state) => u$6(state) !== `:${state}`);
17137
+ var WRITTEN_STATES = [...STATE_SET$1].filter((state) => u$7(state) !== `:${state}`);
16930
17138
  /**
16931
17139
  * The `current` state as a selector writes it: the whole of it, as the style compiler does, or one of the attributes it
16932
17140
  * stands for — `[aria-current='page']` on a nav link, `[aria-pressed='true']` on a toggle, `[aria-selected='true']` on a
@@ -16937,7 +17145,7 @@ var CURRENT_ATTRIBUTES = /\[aria-current=(["'])page\1\]|\[aria-(?:pressed|select
16937
17145
  /** The `expanded` state in either quotes: `[aria-expanded='true']`. */
16938
17146
  var EXPANDED_ATTRIBUTE = /\[aria-expanded=(["'])true\1\]/g;
16939
17147
  /** Every way of writing a state, written as the state it is (`:first`, `:current`), so one pattern reads every state. */
16940
- var asStateNames = (selector) => WRITTEN_STATES.reduce((written, state) => written.replaceAll(u$6(state), `:${state}`), selector).replaceAll(CURRENT_ATTRIBUTES, ":current").replaceAll(EXPANDED_ATTRIBUTE, ":expanded");
17148
+ var asStateNames = (selector) => WRITTEN_STATES.reduce((written, state) => written.replaceAll(u$7(state), `:${state}`), selector).replaceAll(CURRENT_ATTRIBUTES, ":current").replaceAll(EXPANDED_ATTRIBUTE, ":expanded");
16941
17149
  var isStyleState$1 = (state) => STATE_SET$1.has(state);
16942
17150
  var STATE_THEN_PSEUDO = /^(?::([a-z-]+))?(?:::([a-z-]+))?$/;
16943
17151
  /**
@@ -17017,7 +17225,7 @@ var declarationsOf = (body) => {
17017
17225
  * there, and a `content` CSS can read. A rule that does not is left in `customCss`, where it was written and does exactly
17018
17226
  * what it did.
17019
17227
  */
17020
- var pseudoHolds = (pseudo, rules) => Object.entries(rules).every(([property, value]) => property === "content" ? i$16.includes(pseudo) && m$3(String(value)) : u$7(pseudo, property));
17228
+ var pseudoHolds = (pseudo, rules) => Object.entries(rules).every(([property, value]) => property === "content" ? i$17.includes(pseudo) && m$4(String(value)) : u$8(pseudo, property));
17021
17229
  /** Where a pseudo-element's rules land, its state aside: the class, the pseudo-element and the condition. */
17022
17230
  var pseudoKey = ({ className, pseudo, condition }) => `${className}::${pseudo ?? ""}@${condition ?? ""}`;
17023
17231
  /**
@@ -17063,7 +17271,7 @@ var foldCustomCss = (stylesheet, isClass, accepts = () => true) => {
17063
17271
  const segments = stylesheetSegments(stylesheet);
17064
17272
  const candidates = segments.map((segment) => {
17065
17273
  if (segment.kind === "other") return;
17066
- const condition = segment.kind === "atRule" ? f$7(segment.prelude) : void 0;
17274
+ const condition = segment.kind === "atRule" ? f$6(segment.prelude) : void 0;
17067
17275
  if (segment.kind === "atRule" && !condition) return;
17068
17276
  const rules = segment.kind === "rule" ? [ruleFold(segment.selector, segment.body, isClass, accepts)] : stylesheetSegments(segment.body).filter((part) => part.kind !== "other" || part.text.trim()).map((part) => part.kind === "rule" ? ruleFold(part.selector, part.body, isClass, accepts, condition) : void 0);
17069
17277
  return rules.length > 0 && rules.every((rule) => rule !== void 0) ? rules : void 0;
@@ -17360,11 +17568,11 @@ var tokensOf$1 = (style) => Object.values(style.variables).flatMap((group) => Ob
17360
17568
  name,
17361
17569
  value
17362
17570
  })));
17363
- var unusedTokenNames = (schema, style) => {
17571
+ var unusedTokenNames = (schema, style, stylesheets = []) => {
17364
17572
  const tokens = tokensOf$1(style);
17365
17573
  if (tokens.length === 0) return [];
17366
17574
  const items = Object.values(style.platform).flatMap((byName) => Object.values(byName));
17367
- const read = tokensRead(JSON.stringify(schema), ...items.map((item) => JSON.stringify(item.attributes)), ...items.map((item) => JSON.stringify(item.variables ?? {})), JSON.stringify(style.variables), JSON.stringify(style.fonts ?? []));
17575
+ const read = tokensRead(JSON.stringify(schema), ...items.map((item) => JSON.stringify(item.attributes)), ...items.map((item) => JSON.stringify(item.variables ?? {})), JSON.stringify(style.variables), JSON.stringify(style.fonts ?? []), ...stylesheets);
17368
17576
  return tokens.map((token) => token.name).filter((name) => !read.has(name)).sort();
17369
17577
  };
17370
17578
  var unusedTokens = (unused) => {
@@ -17374,7 +17582,7 @@ var unusedTokens = (unused) => {
17374
17582
  elementIds: [],
17375
17583
  subjects: unused,
17376
17584
  saves: 0,
17377
- message: `${String(unused.length)} ${plural(unused.length, "token is", "tokens are")} declared and read nowhere — no \`var(--…)\` in a class, an element, \`customCss\` or another token: ${list(unused)}. Remove ${plural(unused.length, "it", "them")} from \`variables\`, or use ${plural(unused.length, "it", "them")} where a colour is written out instead.`
17585
+ message: `${String(unused.length)} ${plural(unused.length, "token is", "tokens are")} declared and read nowhere — no \`var(--…)\` in a class, an element, \`customCss\`, another token or a plugin's stylesheet: ${list(unused)}. Remove ${plural(unused.length, "it", "them")} from \`variables\`, or use ${plural(unused.length, "it", "them")} where a colour is written out instead.`
17378
17586
  }];
17379
17587
  };
17380
17588
  var ABSOLUTE = /* @__PURE__ */ new Set([
@@ -17440,13 +17648,13 @@ var unusedComponents = (schema, unused) => {
17440
17648
  * What a space declares and nothing uses — its classes, tokens and components — by the one rule the suggestions, the
17441
17649
  * builder's Usages panel and anything else that says "unused" read, so they never disagree.
17442
17650
  */
17443
- var unusedDeclarations = (schema, style) => ({
17651
+ var unusedDeclarations = (schema, style, stylesheets = []) => ({
17444
17652
  classes: unusedClassNames(schema, style),
17445
- tokens: unusedTokenNames(schema, style),
17653
+ tokens: unusedTokenNames(schema, style, stylesheets),
17446
17654
  components: unusedComponentIds(schema)
17447
17655
  });
17448
- var suggestDeclarations = (schema, style) => {
17449
- const unused = unusedDeclarations(schema, style);
17656
+ var suggestDeclarations = (schema, style, stylesheets = []) => {
17657
+ const unused = unusedDeclarations(schema, style, stylesheets);
17450
17658
  return [
17451
17659
  ...unusedComponents(schema, unused.components),
17452
17660
  ...unusedClasses(unused.classes),
@@ -17518,14 +17726,15 @@ var keyframesIn = (segments, found) => {
17518
17726
  }
17519
17727
  return found;
17520
17728
  };
17521
- var animationUseOf = (declarations, keyframes) => {
17729
+ var animationUseOf = (declarations, keyframes, at) => {
17522
17730
  const names = declarations.filter(([property]) => ANIMATION_NAMES.has(property)).flatMap(([, value]) => value.split(/[\s,]+/).filter((word) => keyframes.has(word)));
17523
17731
  if (names.length === 0) return;
17524
17732
  const says = (longhand, word) => declarations.some(([property, value]) => (property === longhand || property === "animation") && word.test(value));
17525
17733
  return {
17526
17734
  names,
17527
17735
  infinite: says("animation-iteration-count", INFINITE),
17528
- paused: says("animation-play-state", PAUSED)
17736
+ paused: says("animation-play-state", PAUSED),
17737
+ ...at
17529
17738
  };
17530
17739
  };
17531
17740
  /** The animations `customCss` starts, and whether it lets paused ones run once the page is hydrated. */
@@ -17543,7 +17752,10 @@ var cssUsesIn = (segments, keyframes) => {
17543
17752
  }
17544
17753
  if (segment.kind !== "rule") continue;
17545
17754
  const declarations = declarationsIn(segment.body);
17546
- const use = animationUseOf(declarations, keyframes);
17755
+ const use = animationUseOf(declarations, keyframes, {
17756
+ where: `the \`customCss\` rule \`${segment.selector}\``,
17757
+ selector: segment.selector
17758
+ });
17547
17759
  if (use) uses.push(use);
17548
17760
  if (segment.selector.includes("[data-hydrated]") && declarations.some(([property, value]) => property === "animation-play-state" && RUNNING.test(value))) hydratedGate = true;
17549
17761
  }
@@ -17552,16 +17764,26 @@ var cssUsesIn = (segments, keyframes) => {
17552
17764
  hydratedGate
17553
17765
  };
17554
17766
  };
17555
- /** Every rule set of a selector: its own, its states', its variants' and its ancestors'. */
17556
- var ruleSetsOf = (layer) => [
17557
- ...layer.default ? [layer.default] : [],
17558
- ...Object.values(layer.states ?? {}),
17559
- ...Object.values(layer.variants ?? {}).flatMap(ruleSetsOf),
17560
- ...Object.values(layer.ancestors ?? {}).flatMap(ruleSetsOf)
17767
+ /** Every rule set of a selector — its own, its states', its variants' and its ancestors' — with what it is. */
17768
+ var ruleSetsOf = (layer, within = "") => [
17769
+ ...layer.default ? [[within, layer.default]] : [],
17770
+ ...Object.entries(layer.states ?? {}).map(([state, rules]) => [`${within}, state \`${state}\``, rules]),
17771
+ ...Object.entries(layer.variants ?? {}).flatMap(([variant, rules]) => ruleSetsOf(rules, `${within}, variant \`${variant}\``)),
17772
+ ...Object.entries(layer.ancestors ?? {}).flatMap(([ancestor, rules]) => ruleSetsOf(rules, `${within}, inside \`${ancestor}\``))
17561
17773
  ];
17562
17774
  /** The animations the style schema starts — its classes, ids and element styles, at every breakpoint. */
17563
- var styleUsesIn = (style, keyframes) => Object.values(style.platform).flatMap((items) => Object.values(items)).flatMap((item) => Object.values(item.attributes)).flatMap(ruleSetsOf).flatMap((rules) => {
17564
- const use = animationUseOf(Object.entries(rules).map(([property, value]) => [property, String(value)]), keyframes);
17775
+ var styleUsesIn = (style, keyframes) => Object.values(style.platform).flatMap((items) => Object.values(items)).flatMap((item) => Object.entries(item.attributes).flatMap(([slot, layer]) => ruleSetsOf(layer).map(([within, rules]) => ({
17776
+ item,
17777
+ slot,
17778
+ within,
17779
+ rules
17780
+ })))).flatMap(({ item, slot, within, rules }) => {
17781
+ const isClass = item.type === "class";
17782
+ const owner = isClass ? `the class \`${item.name}\`` : `the ${item.type} \`${item.name}\``;
17783
+ const use = animationUseOf(Object.entries(rules).map(([property, value]) => [property, String(value)]), keyframes, {
17784
+ where: `${owner}${slot === "base" ? "" : `, slot \`${slot}\``}${within}`,
17785
+ ...isClass && slot === "base" ? { selector: `.${item.name}` } : {}
17786
+ });
17565
17787
  return use ? [use] : [];
17566
17788
  });
17567
17789
  var COST_ORDER = [
@@ -17571,9 +17793,9 @@ var COST_ORDER = [
17571
17793
  ];
17572
17794
  /** The way out of each cost, given in `COST_ORDER`. */
17573
17795
  var CLAUSES = {
17574
- layout: "a size or a position is a `transform` (`translate`, `scale`) of an element already at its full size",
17575
- blur: "a blur or a shadow is drawn once, on a layer whose `opacity` changes",
17576
- paint: "a loop that has to animate anything else is decoration — start it `paused` and run it once the page is hydrated: `[data-hydrated] .glow { animation-play-state: running; }` in `customCss`"
17796
+ layout: () => "a size or a position is a `transform` (`translate`, `scale`) of an element already at its full size",
17797
+ blur: () => "a blur or a shadow is drawn once, on a layer whose `opacity` changes",
17798
+ paint: (selector) => `a loop that has to animate anything else is decoration — start it \`paused\` where it is declared (\`animation-play-state: paused\`) and run it once the page is hydrated: \`[data-hydrated] ${selector} { animation-play-state: running; }\` in \`customCss\``
17577
17799
  };
17578
17800
  var suggestMotion = (schema, style) => {
17579
17801
  const customCss = schema.settings.customCss;
@@ -17590,18 +17812,20 @@ var suggestMotion = (schema, style) => {
17590
17812
  const properties = [...costs].filter(([, cost]) => cost !== "paint" || looping);
17591
17813
  return properties.length > 0 ? [{
17592
17814
  name,
17593
- properties
17815
+ properties,
17816
+ named
17594
17817
  }] : [];
17595
17818
  });
17596
17819
  if (heavy.length === 0) return [];
17597
17820
  const costs = new Set(heavy.flatMap(({ properties }) => properties.map(([, cost]) => cost)));
17598
- const listed = heavy.map(({ name, properties }) => `\`${name}\` (${properties.map(([property]) => `\`${property}\``).join(", ")})`);
17821
+ const listed = heavy.map(({ name, properties, named }) => `\`${name}\` (${properties.map(([property]) => `\`${property}\``).join(", ")}) in ${named.map((use) => use.where).join(" and ")}`);
17822
+ const selector = heavy.flatMap(({ named }) => named).find((use) => use.selector !== void 0)?.selector ?? ".your-class";
17599
17823
  const one = heavy.length === 1;
17600
17824
  return [{
17601
17825
  code: "heavy-animation",
17602
17826
  elementIds: [],
17603
17827
  saves: 0,
17604
- message: `${String(heavy.length)} animation${one ? "" : "s"} in \`customCss\` ${one ? "animates" : "animate"} what the browser repaints or lays out again on every frame — ${listed.slice(0, 4).join(", ")}${listed.length > 4 ? ", …" : ""} — on the main thread, so ${one ? "it stutters" : "they stutter"} whenever the page's scripts are busy, most of all while it loads. Animate \`opacity\` and \`transform\`: ` + COST_ORDER.filter((cost) => costs.has(cost)).map((cost) => CLAUSES[cost]).join("; ") + "."
17828
+ message: `${String(heavy.length)} animation${one ? "" : "s"} ${one ? "animates" : "animate"} what the browser repaints or lays out again on every frame — ${listed.slice(0, 4).join(", ")}${listed.length > 4 ? ", …" : ""} — on the main thread, so ${one ? "it stutters" : "they stutter"} whenever the page's scripts are busy, most of all while it loads. Animate \`opacity\` and \`transform\`: ` + COST_ORDER.filter((cost) => costs.has(cost)).map((cost) => CLAUSES[cost](selector)).join("; ") + "."
17605
17829
  }];
17606
17830
  };
17607
17831
  //#endregion
@@ -17692,7 +17916,7 @@ var signaturesOf = (flat, declared) => {
17692
17916
  const wired = /* @__PURE__ */ new Set([
17693
17917
  ...Object.values(bindings ?? {}).flat().flatMap(({ source }) => own.some((read) => read.source === source) ? [] : [`read:${source}`]),
17694
17918
  ...Object.values(interactions ?? {}).flatMap((node) => {
17695
- const key = e$32(node.params) ? node.params.key : void 0;
17919
+ const key = e$33(node.params) ? node.params.key : void 0;
17696
17920
  return typeof key === "string" ? [`write:${key}`] : [];
17697
17921
  }),
17698
17922
  ...children.flatMap((child) => child.wiring.split("\n").filter(Boolean))
@@ -17869,7 +18093,7 @@ var erasedOn = (classes, mode) => {
17869
18093
  const found = /* @__PURE__ */ new Map();
17870
18094
  for (const width of WIDTHS) {
17871
18095
  const layers = CASCADE[mode][width];
17872
- for (const state of [void 0, ...e$25]) for (const [longhand, candidates] of candidatesAt(classes, layers, state)) {
18096
+ for (const state of [void 0, ...e$26]) for (const [longhand, candidates] of candidatesAt(classes, layers, state)) {
17873
18097
  const winner = candidates[candidates.length - 1];
17874
18098
  if (winner.shorthand === void 0) continue;
17875
18099
  for (const lost of candidates) {
@@ -17966,13 +18190,13 @@ var quietCodes = (schema) => new Map([schema.flat, ...Object.values(schema.compo
17966
18190
  * Each names what to write instead, and the ones about elements say how many it saves, which is what they are ranked
17967
18191
  * by.
17968
18192
  */
17969
- var suggestSpace = ({ schema, style }) => withoutQuieted(schema, [
18193
+ var suggestSpace = ({ schema, style }, { stylesheets = [] } = {}) => withoutQuieted(schema, [
17970
18194
  ...suggestRepeats(schema, style),
17971
18195
  ...suggestContent(schema, style),
17972
18196
  ...suggestCustomCss(schema, style),
17973
18197
  ...suggestCustomCssSlots(schema),
17974
18198
  ...suggestMotion(schema, style),
17975
- ...suggestDeclarations(schema, style)
18199
+ ...suggestDeclarations(schema, style, stylesheets)
17976
18200
  ]).sort((a, b) => b.saves - a.saves);
17977
18201
  /** The suggestions no element they are about quiets — for those read beside the documents, too (authoring's own). */
17978
18202
  var withoutQuieted = (schema, suggestions) => {
@@ -18455,7 +18679,7 @@ var o$1 = (i, a) => {
18455
18679
  }));
18456
18680
  }), [["", l], ...Object.entries(p).map(([e, t]) => [e, t.flat])].forEach(([e, n]) => {
18457
18681
  Object.values(n).forEach((r) => {
18458
- if (!r || !m$2(r)) return;
18682
+ if (!r || !m$3(r)) return;
18459
18683
  let i = r.attributes.referenceId, a = typeof i == "string" ? p[i] : void 0;
18460
18684
  if (!a || typeof i != "string") {
18461
18685
  s.push({
@@ -18626,7 +18850,7 @@ var REPEATING_TYPES = /* @__PURE__ */ new Set(["list", "carouselTrack"]);
18626
18850
  * one that does — `"store-footer" › container[1] › text[0]` rather than a path of indices from the page down.
18627
18851
  */
18628
18852
  var placeOf = (spec, parent, index) => {
18629
- const record = e$32(spec) ? spec : {};
18853
+ const record = e$33(spec) ? spec : {};
18630
18854
  if (typeof record.id === "string") return `"${record.id}"`;
18631
18855
  return index === void 0 ? parent : `${parent} › ${typeof record.type === "string" ? record.type : "element"}[${index}]`;
18632
18856
  };
@@ -18666,7 +18890,8 @@ var PAGE_SPEC_FIELDS = {
18666
18890
  folder: "folder",
18667
18891
  accessLevel: "accessLevel",
18668
18892
  seoPageTitle: "seoTitle",
18669
- seoPageDescription: "seoDescription"
18893
+ seoPageDescription: "seoDescription",
18894
+ notFound: "notFound"
18670
18895
  };
18671
18896
  var layoutAttributes = (layout) => layout ? {
18672
18897
  layout: layout.id,
@@ -18675,7 +18900,7 @@ var layoutAttributes = (layout) => layout ? {
18675
18900
  var SpaceAuthor = class {
18676
18901
  spec;
18677
18902
  options;
18678
- flatMap = new d$6({
18903
+ flatMap = new d$5({
18679
18904
  flat: {},
18680
18905
  variables: []
18681
18906
  });
@@ -18766,7 +18991,7 @@ var SpaceAuthor = class {
18766
18991
  const suggestions = [...suggestSpace({
18767
18992
  schema,
18768
18993
  style
18769
- }), ...withoutQuieted(schema, this.classOverrides(schema, style.mode ?? "desktop-first"))].map((suggestion) => {
18994
+ }, { stylesheets: this.options.stylesheets ?? [] }), ...withoutQuieted(schema, this.classOverrides(schema, style.mode ?? "desktop-first"))].map((suggestion) => {
18770
18995
  const first = suggestion.elementIds.at(0);
18771
18996
  const at = first === void 0 ? void 0 : writtenAt(this.specOf(first));
18772
18997
  return at === void 0 ? suggestion : {
@@ -18856,7 +19081,7 @@ var SpaceAuthor = class {
18856
19081
  const sources = /* @__PURE__ */ new Map();
18857
19082
  this.collectSources(component.root, sources);
18858
19083
  this.componentTrees.set(component.id, {
18859
- map: new d$6({
19084
+ map: new d$5({
18860
19085
  flat: {},
18861
19086
  variables: []
18862
19087
  }),
@@ -18893,9 +19118,9 @@ var SpaceAuthor = class {
18893
19118
  this.resolveControls();
18894
19119
  if (pages.length === 0) throw new AuthoringError("no-pages", "The space has no pages. Write at least one: `pages: [{ id: \"home\", name: \"Home\", slug: \"\", body: [] }]`.");
18895
19120
  const style = {
18896
- ...e$34,
18897
- mode: this.spec.mode ?? e$34.mode,
18898
- theme: this.spec.theme ?? e$34.theme,
19121
+ ...e$35,
19122
+ mode: this.spec.mode ?? e$35.mode,
19123
+ theme: this.spec.theme ?? e$35.theme,
18899
19124
  platform: this.platform,
18900
19125
  variables: this.spec.variables ?? {},
18901
19126
  ...this.spec.fonts ? { fonts: this.parseFonts(this.spec.fonts) } : {},
@@ -19063,7 +19288,7 @@ var SpaceAuthor = class {
19063
19288
  }
19064
19289
  /** An ancestor condition names a class some ancestor wears; one this space does not declare can never match. */
19065
19290
  assertAncestorClasses() {
19066
- for (const breakpoint of BREAKPOINTS$1) for (const item of Object.values(this.platform[breakpoint])) for (const [slot, block] of Object.entries(item.attributes)) for (const ancestor of Object.keys(block.ancestors ?? {}).filter((name) => !p$6(name))) this.assertClass(ancestor, `The ${item.type} "${item.name}" (${slot}, ${breakpoint}), in its \`ancestors\`,`);
19291
+ for (const breakpoint of BREAKPOINTS$1) for (const item of Object.values(this.platform[breakpoint])) for (const [slot, block] of Object.entries(item.attributes)) for (const ancestor of Object.keys(block.ancestors ?? {}).filter((name) => !p$7(name))) this.assertClass(ancestor, `The ${item.type} "${item.name}" (${slot}, ${breakpoint}), in its \`ancestors\`,`);
19067
19292
  }
19068
19293
  /** `<type>-<n>` for an element nobody named. Positional and deterministic, so a re-run writes the same document;
19069
19294
  * it steps over anything the author named so a derived name can never take one. */
@@ -19243,7 +19468,8 @@ var SpaceAuthor = class {
19243
19468
  if (earlier !== void 0) {
19244
19469
  const holder = tree.map.flat[element.id]?.definition.type;
19245
19470
  const root = holder === "page" ? "page" : holder === "layoutContainer" ? "layout" : void 0;
19246
- throw new AuthoringError("id-taken", root ? `Element "${element.id}" (${element.definition.type}) at ${path} uses the name of the ${root} at ${earlier} — ids are one namespace for the whole space, pages and layouts included. Give the element a name of its own: \`id: '${element.id}-${element.definition.type.toLowerCase()}'\`.` : `Element "${element.id}" (${element.definition.type}) at ${path} uses a name already taken at ${earlier}. Ids are one namespace for the whole space — layouts and every page share it — so wrap the function called more than once in \`scope('<what it is for>', ref => …)\`, which prefixes every id inside it.`);
19471
+ const provider = holder === "apiContainer" && element.definition.type === "apiContainer";
19472
+ throw new AuthoringError("id-taken", root ? `Element "${element.id}" (${element.definition.type}) at ${path} uses the name of the ${root} at ${earlier} — ids are one namespace for the whole space, pages and layouts included. Give the element a name of its own: \`id: '${element.id}-${element.definition.type.toLowerCase()}'\`.` : provider ? `Provider "${element.id}" at ${path} is declared again — it is at ${earlier} too. Ids are one namespace for the whole space, and a provider's id is the name its source is read by: put it once in the layout those pages share (\`layouts\`, and \`layout: { id, slot }\` on each page), where every page reads it as it does now — a provider in a layout serves every page.` : `Element "${element.id}" (${element.definition.type}) at ${path} uses a name already taken at ${earlier}. Ids are one namespace for the whole space — layouts and every page share it — so wrap the function called more than once in \`scope('<what it is for>', ref => …)\`, which prefixes every id inside it.`);
19247
19473
  }
19248
19474
  if (!tree.map.addElement(element, to, position)) throw new AuthoringError("element-rejected", `Could not author element "${element.id}" (${element.definition.type}) at ${path}: the schema refused it`);
19249
19475
  this.authoredAt.set(element.id, path);
@@ -19472,7 +19698,8 @@ var SpaceAuthor = class {
19472
19698
  ...page.accessLevel ? { accessLevel: page.accessLevel } : {},
19473
19699
  seoEnabled: Boolean(page.seoTitle ?? page.seoDescription),
19474
19700
  ...page.seoTitle ? { seoPageTitle: page.seoTitle } : {},
19475
- ...page.seoDescription ? { seoPageDescription: page.seoDescription } : {}
19701
+ ...page.seoDescription ? { seoPageDescription: page.seoDescription } : {},
19702
+ ...page.notFound ? { notFound: page.notFound } : {}
19476
19703
  },
19477
19704
  definition: {
19478
19705
  label: "Page",
@@ -19499,7 +19726,7 @@ var SpaceAuthor = class {
19499
19726
  slug: page.slug,
19500
19727
  path: this.routeFor(page),
19501
19728
  ...page.accessLevel ? { accessLevel: page.accessLevel } : {},
19502
- params: f$5(page.slug),
19729
+ params: m$2(page.slug),
19503
19730
  ...page.layout ? { layout: page.layout.id } : {},
19504
19731
  elements: {}
19505
19732
  };
@@ -19542,7 +19769,7 @@ var SpaceAuthor = class {
19542
19769
  for (const name of Object.keys(given)) if (!names.includes(name)) throw new AuthoringError("prop-unknown", `${where} hands component "${target.id}" "${name}", which it does not declare${didYouMean(name, names) || "."} It declares ${names.length > 0 ? names.join(", ") : "no props"}.`);
19543
19770
  const bound = new Set(spec.bind === void 0 ? [] : toBindingSpecs(spec.bind).map((binding) => binding.to));
19544
19771
  for (const [name, prop] of Object.entries(props)) if (prop.required && given[name] === void 0 && !bound.has(name)) throw new AuthoringError("prop-missing", `${where} places component "${target.id}" without "${name}", which it requires${prop.description ? ` — ${prop.description}` : ""}. Hand it in: \`component('${target.id}', { props: { ${name}: … } })\`, or bind it.`);
19545
- const invalid = s$22(given, given, props).at(0);
19772
+ const invalid = s$23(given, given, props).at(0);
19546
19773
  if (invalid) throw new AuthoringError("prop-value", `${where} hands component "${target.id}" "${invalid.key}" as ${invalid.got}, and it is declared ${invalid.expected}${invalid.options ? ` — one of ${invalid.options.map((option) => `'${option}'`).join(", ")}` : ""}.`);
19547
19774
  const slots = target.slots ?? [];
19548
19775
  for (const child of spec.children ?? []) {
@@ -19744,7 +19971,7 @@ var SpaceAuthor = class {
19744
19971
  }
19745
19972
  /** A format by its name in the space's `formats`, or the template written in its place. */
19746
19973
  templateFor(as, where) {
19747
- if (e$6(as)) return as;
19974
+ if (e$7(as)) return as;
19748
19975
  const formats = this.spec.formats ?? {};
19749
19976
  if (!Object.hasOwn(formats, as) || typeof formats[as] !== "string") throw new AuthoringError("format-unknown", `${where} shows its data \`as: '${as}'\`, which the space's \`formats\` do not name${didYouMean(as, Object.keys(formats)) || "."} Declare it once — \`formats: { ${as}: "{{ source|currency('USD') }}" }\` — or write the template in its place.`);
19750
19977
  return formats[as];
@@ -19942,7 +20169,7 @@ var dataWords = (value, depth = 0) => {
19942
20169
  if (depth > 4) return [];
19943
20170
  if (typeof value === "string") return value === "" ? [] : [value];
19944
20171
  if (Array.isArray(value)) return value.flatMap((item) => dataWords(item, depth + 1));
19945
- return e$32(value) ? Object.values(value).flatMap((item) => dataWords(item, depth + 1)) : [];
20172
+ return e$33(value) ? Object.values(value).flatMap((item) => dataWords(item, depth + 1)) : [];
19946
20173
  };
19947
20174
  var wordsOf = (element, templates) => {
19948
20175
  const instance = element.definition.type === "reference" && element.attributes.referenceType === "component";
@@ -20181,7 +20408,7 @@ var validateSnippet$1 = (snippet, options = {}) => {
20181
20408
  }));
20182
20409
  const { errors: spaceErrors, warnings } = validateSpace$1({
20183
20410
  schema: {
20184
- ...r$23.schema,
20411
+ ...r$22.schema,
20185
20412
  ...schema
20186
20413
  },
20187
20414
  style
@@ -20422,7 +20649,7 @@ var transformerCatalog = () => Object.entries(BUILTIN_TRANSFORMERS).map(([action
20422
20649
  /** The space's name and URL, where the document carries them. An older export carries no definition at all. */
20423
20650
  var definitionOf = (schema) => {
20424
20651
  const definition = schema.definition;
20425
- if (!e$32(definition)) return {};
20652
+ if (!e$33(definition)) return {};
20426
20653
  return {
20427
20654
  ...typeof definition.name === "string" ? { name: definition.name } : {},
20428
20655
  ...typeof definition.permanentUrl === "string" ? { permanentUrl: definition.permanentUrl } : {}
@@ -20436,7 +20663,7 @@ var categoryOf = (variable) => {
20436
20663
  /** The name an element carried beside its id before the id became the name, where it carries a usable one. */
20437
20664
  var idRefOf = (element) => {
20438
20665
  const stored = element;
20439
- if (!e$32(stored) || typeof stored.idRef !== "string" || !t$28(stored.idRef)) return;
20666
+ if (!e$33(stored) || typeof stored.idRef !== "string" || !t$28(stored.idRef)) return;
20440
20667
  return stored.idRef;
20441
20668
  };
20442
20669
  /**
@@ -20463,7 +20690,7 @@ var withNamedIds = (schema) => {
20463
20690
  const isTaken = (candidate) => taken.has(candidate);
20464
20691
  const renames = stale.map((element) => {
20465
20692
  const idRef = idRefOf(element);
20466
- const to = idRef ? u$10(idRef, isTaken) : l$10(element.definition.type, isTaken);
20693
+ const to = idRef ? u$11(idRef, isTaken) : l$10(element.definition.type, isTaken);
20467
20694
  taken.add(to);
20468
20695
  return {
20469
20696
  from: element.id,
@@ -20537,7 +20764,7 @@ var refuse = (reason) => {
20537
20764
  throw new Unreadable(reason);
20538
20765
  };
20539
20766
  var isTriggerType = (value) => TRIGGER_TYPES.some((type) => type === value);
20540
- var isNode = (value) => e$32(value) && [
20767
+ var isNode = (value) => e$33(value) && [
20541
20768
  "id",
20542
20769
  "title",
20543
20770
  "type",
@@ -20545,10 +20772,10 @@ var isNode = (value) => e$32(value) && [
20545
20772
  "beforeNode",
20546
20773
  "afterNode",
20547
20774
  "flowId"
20548
- ].every((key) => typeof value[key] === "string") && typeof value.enabled === "boolean" && e$32(value.params) && e$32(value.preview);
20775
+ ].every((key) => typeof value[key] === "string") && typeof value.enabled === "boolean" && e$33(value.params) && e$33(value.preview);
20549
20776
  /** A document with the shape an action has: whether it is the action code writes is what the round trip answers. */
20550
- var isDocument = (value) => e$32(value) && typeof value.name === "string" && e$32(value.nodes) && Object.values(value.nodes).every(isNode);
20551
- var isField = (value) => e$32(value) && FIELD_TYPES.some((type) => type === value.type);
20777
+ var isDocument = (value) => e$33(value) && typeof value.name === "string" && e$33(value.nodes) && Object.values(value.nodes).every(isNode);
20778
+ var isField = (value) => e$33(value) && FIELD_TYPES.some((type) => type === value.type);
20552
20779
  var text = (params, key) => {
20553
20780
  const value = params[key];
20554
20781
  return typeof value === "string" ? value : void 0;
@@ -20565,7 +20792,7 @@ var inputOf = (node) => {
20565
20792
  const raw = text(node.params, "input");
20566
20793
  if (raw === void 0) return;
20567
20794
  const value = parsed(raw);
20568
- if (!e$32(value) || !Object.values(value).every(isField)) return refuse(`the trigger "${node.id}" declares an input that is not a map of fields`);
20795
+ if (!e$33(value) || !Object.values(value).every(isField)) return refuse(`the trigger "${node.id}" declares an input that is not a map of fields`);
20569
20796
  return Object.fromEntries(Object.entries(value).filter((entry) => isField(entry[1])));
20570
20797
  };
20571
20798
  var accessOf = (node) => {
@@ -20678,7 +20905,7 @@ var chainFrom = (nodes, first) => {
20678
20905
  /** A value with its keys in one order and its JSON params read, so two documents compare by what they hold. */
20679
20906
  var comparable = (value) => {
20680
20907
  if (Array.isArray(value)) return value.map(comparable);
20681
- if (!e$32(value)) return value;
20908
+ if (!e$33(value)) return value;
20682
20909
  return Object.fromEntries(Object.keys(value).filter((key) => value[key] !== void 0).sort().map((key) => {
20683
20910
  const inner = value[key];
20684
20911
  return [key, key === "input" && typeof inner === "string" ? parsed(inner) ?? inner : comparable(inner)];
@@ -20707,7 +20934,7 @@ var read = (entry) => {
20707
20934
  const passthrough = passthroughOf(ways);
20708
20935
  const steps = chain.slice(1, answerAt).map((node) => stepOf(node, passthrough));
20709
20936
  const handler = chain.at(answerAt + 1);
20710
- if (handler && handler.action !== "flow.onFailure") return refuse(`"${handler.id}" runs after the answer, where only ${e$13} may`);
20937
+ if (handler && handler.action !== "flow.onFailure") return refuse(`"${handler.id}" runs after the answer, where only ${e$14} may`);
20711
20938
  const undo = chain.slice(answerAt + 2);
20712
20939
  const last = steps.at(-1);
20713
20940
  const values = text(answer.params, "values");
@@ -20778,8 +21005,8 @@ var actionToSource = (spec, { packageName = "@plitzi/sdk-authoring" } = {}) => {
20778
21005
  var canonical = (value) => {
20779
21006
  if (value === void 0 || value === null) return null;
20780
21007
  if (Array.isArray(value)) return value.map(canonical);
20781
- if (e$32(value)) {
20782
- const entries = Object.entries(value).map(([key, inner]) => [key, canonical(inner)]).filter(([, inner]) => inner !== null && !(e$32(inner) && Object.keys(inner).length === 0)).sort(([a], [b]) => a.localeCompare(b));
21008
+ if (e$33(value)) {
21009
+ const entries = Object.entries(value).map(([key, inner]) => [key, canonical(inner)]).filter(([, inner]) => inner !== null && !(e$33(inner) && Object.keys(inner).length === 0)).sort(([a], [b]) => a.localeCompare(b));
20783
21010
  return Object.fromEntries(entries);
20784
21011
  }
20785
21012
  if (typeof value === "boolean" || typeof value === "number" || typeof value === "string") return value;
@@ -20868,12 +21095,12 @@ var classRules = (style, name) => {
20868
21095
  };
20869
21096
  var bindingsOf$1 = (element) => {
20870
21097
  const stored = element.definition.bindings;
20871
- if (!e$32(stored)) return {};
20872
- return Object.fromEntries(Object.entries(stored).map(([category, list]) => [category, (Array.isArray(list) ? list : []).filter(e$32).map((binding) => ({
21098
+ if (!e$33(stored)) return {};
21099
+ return Object.fromEntries(Object.entries(stored).map(([category, list]) => [category, (Array.isArray(list) ? list : []).filter(e$33).map((binding) => ({
20873
21100
  source: binding.source,
20874
21101
  to: binding.to,
20875
21102
  transformers: Array.isArray(binding.transformers) ? binding.transformers : [],
20876
- when: e$32(binding.when) && Array.isArray(binding.when.rules) && binding.when.rules.length > 0 ? binding.when : null,
21103
+ when: e$33(binding.when) && Array.isArray(binding.when.rules) && binding.when.rules.length > 0 ? binding.when : null,
20877
21104
  enabled: binding.enabled !== false
20878
21105
  })).map((binding) => JSON.stringify(canonical(binding))).sort()]));
20879
21106
  };
@@ -20892,7 +21119,7 @@ var flowsOf = (element) => {
20892
21119
  params: current.params,
20893
21120
  preview: current.preview,
20894
21121
  elementId: current.elementId === element.id ? "self" : current.elementId || null,
20895
- when: e$32(current.when) && Array.isArray(current.when.rules) && current.when.rules.length > 0 ? current.when : null,
21122
+ when: e$33(current.when) && Array.isArray(current.when.rules) && current.when.rules.length > 0 ? current.when : null,
20896
21123
  enabled: current.enabled,
20897
21124
  whileRunning: current.whileRunning ?? "skip"
20898
21125
  });
@@ -20916,7 +21143,7 @@ var PAGE_UNSET = {
20916
21143
  var attributesOf = (element) => {
20917
21144
  const isPage = element.definition.type === "page";
20918
21145
  const defaults = isPage ? {} : defaultAttributes(element.definition.type);
20919
- const stored = Object.entries(e$32(element.attributes) ? element.attributes : {}).filter(([key, value]) => value !== null && !(Array.isArray(value) && value.length === 0 && e$32(defaults[key])));
21146
+ const stored = Object.entries(e$33(element.attributes) ? element.attributes : {}).filter(([key, value]) => value !== null && !(Array.isArray(value) && value.length === 0 && e$33(defaults[key])));
20920
21147
  return Object.fromEntries(Object.entries({
20921
21148
  ...defaults,
20922
21149
  ...Object.fromEntries(stored)
@@ -21367,7 +21594,7 @@ var unwritableCss = (selector, unwritable, mode) => {
21367
21594
  platform[breakpoint][selector.name] = item;
21368
21595
  }
21369
21596
  return l({
21370
- ...e$34,
21597
+ ...e$35,
21371
21598
  mode,
21372
21599
  platform,
21373
21600
  variables: {}
@@ -21430,6 +21657,7 @@ var PAGE_ATTRIBUTES = /* @__PURE__ */ new Set([
21430
21657
  "seoEnabled",
21431
21658
  "seoPageTitle",
21432
21659
  "seoPageDescription",
21660
+ "notFound",
21433
21661
  "enabled"
21434
21662
  ]);
21435
21663
  var LAYOUT_ATTRIBUTES = /* @__PURE__ */ new Set([
@@ -21490,9 +21718,9 @@ var BINDING_CATEGORIES = [
21490
21718
  "style"
21491
21719
  ];
21492
21720
  var isEmpty = (value) => !value || Object.keys(value).length === 0;
21493
- var isBinding = (value) => e$32(value) && typeof value.source === "string" && typeof value.to === "string";
21721
+ var isBinding = (value) => e$33(value) && typeof value.source === "string" && typeof value.to === "string";
21494
21722
  /** A condition worth keeping: the builder stores "no condition" as an empty group, or as an empty array. */
21495
- var conditionOf = (when) => e$32(when) && Array.isArray(when.rules) && when.rules.length > 0 ? when : void 0;
21723
+ var conditionOf = (when) => e$33(when) && Array.isArray(when.rules) && when.rules.length > 0 ? when : void 0;
21496
21724
  /**
21497
21725
  * Every name a document mentions outside its own structure — in attributes, bindings, steps and settings.
21498
21726
  *
@@ -21515,7 +21743,7 @@ var stepCorpus = (host, interactions) => Object.values(interactions).map((node)
21515
21743
  ...node.elementId && node.elementId !== host ? { elementId: node.elementId } : {}
21516
21744
  }));
21517
21745
  var bindingsOf = (bindings, category) => {
21518
- const list = e$32(bindings) ? bindings[category] : void 0;
21746
+ const list = e$33(bindings) ? bindings[category] : void 0;
21519
21747
  return Array.isArray(list) ? list.filter(isBinding) : [];
21520
21748
  };
21521
21749
  var bindingCorpus = (bindings) => BINDING_CATEGORIES.flatMap((category) => bindingsOf(bindings, category).map(({ source, to, transformers, when }) => ({
@@ -22114,7 +22342,7 @@ var SpecReader = class {
22114
22342
  }
22115
22343
  readPage(page, index) {
22116
22344
  this.reachable.add(page.id);
22117
- const attributes = e$32(page.attributes) ? page.attributes : {};
22345
+ const attributes = e$33(page.attributes) ? page.attributes : {};
22118
22346
  const where = `Page "${page.id}"`;
22119
22347
  for (const key of Object.keys(attributes)) if (!PAGE_ATTRIBUTES.has(key)) this.dropField(`page attribute "${key}"`);
22120
22348
  if (attributes.enabled === false) this.correct("dropped-field", `${where} was disabled, which an authored page cannot say; it is authored enabled.`, page.id);
@@ -22125,6 +22353,7 @@ var SpecReader = class {
22125
22353
  const redirect = attributes.unauthorizedBehaviour === "redirect" && typeof attributes.unauthorizedPageRedirect === "string" ? attributes.unauthorizedPageRedirect : void 0;
22126
22354
  const seoTitle = typeof attributes.seoPageTitle === "string" ? attributes.seoPageTitle : "";
22127
22355
  const seoDescription = typeof attributes.seoPageDescription === "string" ? attributes.seoPageDescription : "";
22356
+ const notFound = typeof attributes.notFound === "string" ? attributes.notFound : "";
22128
22357
  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);
22129
22358
  return {
22130
22359
  id: page.id,
@@ -22133,6 +22362,7 @@ var SpecReader = class {
22133
22362
  ...isDefault ? { isDefault: true } : index === 0 ? { isDefault: false } : {},
22134
22363
  ...seoTitle ? { seoTitle } : {},
22135
22364
  ...seoDescription ? { seoDescription } : {},
22365
+ ...notFound ? { notFound } : {},
22136
22366
  ...folder ? { folder } : {},
22137
22367
  ...layout ? { layout } : {},
22138
22368
  ...accessLevel ? { accessLevel } : {},
@@ -22180,7 +22410,7 @@ var SpecReader = class {
22180
22410
  const definition = element.definition;
22181
22411
  for (const key of Object.keys(definition)) if (!DEFINITION_FIELDS.has(key)) this.dropField(`"${key}"`);
22182
22412
  const { type, legacy } = this.typeOf(element);
22183
- const stored = e$32(element.attributes) ? element.attributes : {};
22413
+ const stored = e$33(element.attributes) ? element.attributes : {};
22184
22414
  const attributes = this.readAttributes(type, legacy ? legacy.attributes(stored) : stored, this.placedNames(element));
22185
22415
  const keepId = this.options.keepIds === true || !this.derived.has(element.id);
22186
22416
  const { base: baseSelector, ...slotSelectors } = definition.styleSelectors;
@@ -22234,10 +22464,10 @@ var SpecReader = class {
22234
22464
  */
22235
22465
  placedNames(element) {
22236
22466
  const { referenceId } = element.attributes;
22237
- const component = m$2(element) && typeof referenceId === "string" ? p$5(this.documents.schema, referenceId) : void 0;
22467
+ const component = m$3(element) && typeof referenceId === "string" ? p$6(this.documents.schema, referenceId) : void 0;
22238
22468
  const parentId = element.definition.parentId;
22239
22469
  const parent = parentId && Object.hasOwn(this.flat, parentId) ? this.flat[parentId] : void 0;
22240
- return [...Object.keys(component?.props ?? {}), ...parent && m$2(parent) ? ["slot"] : []];
22470
+ return [...Object.keys(component?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
22241
22471
  }
22242
22472
  readAttributes(type, attributes, placed = []) {
22243
22473
  const declared = Object.hasOwn(ATTRIBUTE_NAMES, type) ? ATTRIBUTE_NAMES[type] : void 0;
@@ -22252,7 +22482,7 @@ var SpecReader = class {
22252
22482
  this.droppedAttributes.set(key, (this.droppedAttributes.get(key) ?? 0) + 1);
22253
22483
  continue;
22254
22484
  }
22255
- const emptyList = Array.isArray(value) && value.length === 0 && e$32(defaults[name]);
22485
+ const emptyList = Array.isArray(value) && value.length === 0 && e$33(defaults[name]);
22256
22486
  if (value === null || emptyList) continue;
22257
22487
  if (typeof value === "string" && fixes && Object.hasOwn(fixes, name) && Object.hasOwn(fixes[name], value)) {
22258
22488
  const fixed = fixes[name][value];
@@ -22414,11 +22644,13 @@ var SpecReader = class {
22414
22644
  *
22415
22645
  * Both are what an older builder leaves behind — an animation step from before animations were removed, a submit
22416
22646
  * flow on a button — and authoring refuses both, so they are dropped here and reported rather than written into a
22417
- * spec that could not be authored again. Only built-in types are judged: a plugin's registers what nobody here sees.
22647
+ * spec that could not be authored again. Only built-in types are judged: a plugin's registers what nobody here sees —
22648
+ * and so does a `custom` host, whose triggers and callbacks are the component it renders, never `custom`'s own.
22418
22649
  */
22419
22650
  liveSteps(chain, element) {
22420
22651
  const typeOf = (id) => {
22421
22652
  const type = this.flat[id]?.definition.type;
22653
+ if (type === "custom") return;
22422
22654
  return type && Object.hasOwn(LEGACY_ELEMENT_TYPES, type) ? LEGACY_ELEMENT_TYPES[type].type : type;
22423
22655
  };
22424
22656
  const offers = (catalog, id, action) => {
@@ -23053,7 +23285,7 @@ var builderOf = (action, type) => {
23053
23285
  return builders.has(named) ? named : void 0;
23054
23286
  };
23055
23287
  var definitionIn = (catalog, name) => Object.hasOwn(catalog, name) ? catalog[name] : void 0;
23056
- var triggerDefinition = (name) => definitionIn(e$40, name) ?? definitionIn(typeTriggerDefinitions, name);
23288
+ var triggerDefinition = (name) => definitionIn(e$41, name) ?? definitionIn(typeTriggerDefinitions, name);
23057
23289
  /** The attributes each type is authored with; `null` for one that takes any, which is said by its defaults. */
23058
23290
  var attributeNames = elementAttributeNames;
23059
23291
  var explainElement = (type) => {
@@ -23083,7 +23315,7 @@ var explainElement = (type) => {
23083
23315
  var explainTrigger = (name) => {
23084
23316
  const definition = triggerDefinition(name);
23085
23317
  if (!definition) return;
23086
- const basic = Object.hasOwn(e$40, name);
23318
+ const basic = Object.hasOwn(e$41, name);
23087
23319
  return {
23088
23320
  kind: "trigger",
23089
23321
  name,
@@ -23187,7 +23419,7 @@ var explainList = (kind) => {
23187
23419
  name,
23188
23420
  summary: element.label
23189
23421
  })));
23190
- case "trigger": return sorted([.../* @__PURE__ */ new Set([...Object.keys(e$40), ...Object.keys(typeTriggerDefinitions)])].map((name) => ({
23422
+ case "trigger": return sorted([.../* @__PURE__ */ new Set([...Object.keys(e$41), ...Object.keys(typeTriggerDefinitions)])].map((name) => ({
23191
23423
  name,
23192
23424
  summary: triggerDefinition(name)?.title ?? name
23193
23425
  })));
@@ -23932,6 +24164,9 @@ var importedFiles = ({ probes, dark }) => {
23932
24164
  //#region src/spaces/blank/content.ts?raw
23933
24165
  var content_default = "import type { Tone } from './theme.ts';\n\n/**\n * What the page says, as data: the docs it points to, the three ways to change it and the guides to read on. Each band\n * is one of these lists mapped through one function of `index.ts` — add an entry and a card appears, styled like the\n * rest.\n */\n\n/** Where the documentation lives. Every link on the page starts here, so moving the docs is one line. */\nexport const DOCS = 'https://plitzi.com/docs';\n\nexport type Path = { id: string; title: string; body: string; path: string; icon: string; tone: Tone };\n\n/**\n * The three ways to change this page — the builder, code, an agent — as data: the band is this list, mapped. They\n * are the same space either way, so any one of them can be put down and another picked up.\n */\nexport const PATHS: (Path & { command?: string })[] = [\n {\n id: 'path-builder',\n title: 'In the builder',\n body: 'Select anything on this page and change it: drag elements in, style them, wire them to data, and publish.',\n path: 'elements',\n icon: 'fas fa-pen-ruler',\n tone: 'violet'\n },\n {\n id: 'path-code',\n title: 'In code',\n body: 'The same space as TypeScript, in a project of your own — served by your server, or pushed back here.',\n path: 'cli',\n icon: 'fas fa-code',\n tone: 'cyan',\n command: 'npx @plitzi/cli create my-site'\n },\n {\n id: 'path-agent',\n title: 'With an agent',\n body: 'Connect Claude or any MCP client. It reads and edits this space under the same rules as you do.',\n path: 'agents',\n icon: 'fas fa-robot',\n tone: 'blue'\n }\n];\n\n/** Where to read on, as data: the grid below is this list, mapped. Each one is a page of the docs. */\nexport const GUIDES: Path[] = [\n {\n id: 'concepts',\n title: 'Core concepts',\n body: 'Spaces, pages, elements, and who owns what.',\n path: 'concepts',\n icon: 'fas fa-shapes',\n tone: 'violet'\n },\n {\n id: 'authoring',\n title: 'A space in code',\n body: 'One declaration in, two documents out.',\n path: 'authoring',\n icon: 'fas fa-code',\n tone: 'cyan'\n },\n {\n id: 'styling',\n title: 'Styling and themes',\n body: 'Classes, states, breakpoints, light and dark.',\n path: 'styling',\n icon: 'fas fa-palette',\n tone: 'rose'\n },\n {\n id: 'data',\n title: 'Data and bindings',\n body: 'Fetch from an API, show it anywhere.',\n path: 'data',\n icon: 'fas fa-database',\n tone: 'emerald'\n },\n {\n id: 'interactions',\n title: 'Interactions and flows',\n body: 'Clicks and forms wired to steps, no code.',\n path: 'interactions',\n icon: 'fas fa-bolt',\n tone: 'amber'\n },\n {\n id: 'quickstart',\n title: 'Quickstart',\n body: 'From a new space to a published site.',\n path: 'quickstart',\n icon: 'fas fa-flag-checkered',\n tone: 'blue'\n }\n];\n";
23934
24166
  //#endregion
24167
+ //#region src/spaces/blank/notFound.ts?raw
24168
+ var notFound_default$2 = "import { bodyText, button, heroBand, kicker, sectionTitle, shell } from './theme.ts';\nimport { container, heading, link, paragraph, text } from '../../elements';\n\nimport type { PageSpec } from '../../schema';\n\n/** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */\nexport const notFound: PageSpec = {\n id: 'not-found',\n name: 'Not found',\n slug: '*',\n body: [\n container({\n id: 'not-found-main',\n subType: 'main',\n class: [shell, heroBand],\n children: [\n text('404', { id: 'not-found-kicker', class: kicker }),\n heading('Page not found', { id: 'not-found-title', subType: 'h1', class: sectionTitle }),\n paragraph({\n id: 'not-found-lede',\n class: bodyText,\n content: 'There is nothing at this address — it may have moved, or the link has a typo.'\n }),\n link({ id: 'not-found-home', href: '/', class: button, content: 'Back to the home page' })\n ]\n })\n ]\n};\n";
24169
+ //#endregion
23935
24170
  //#region src/spaces/blank/content.ts
23936
24171
  /**
23937
24172
  * What the page says, as data: the docs it points to, the three ways to change it and the guides to read on. Each band
@@ -24380,6 +24615,41 @@ var footerRow = styles("footer-row", { css: {
24380
24615
  }
24381
24616
  } });
24382
24617
  //#endregion
24618
+ //#region src/spaces/blank/notFound.ts
24619
+ /** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */
24620
+ var notFound$1 = {
24621
+ id: "not-found",
24622
+ name: "Not found",
24623
+ slug: "*",
24624
+ body: [container({
24625
+ id: "not-found-main",
24626
+ subType: "main",
24627
+ class: [shell$1, heroBand],
24628
+ children: [
24629
+ text$1("404", {
24630
+ id: "not-found-kicker",
24631
+ class: kicker
24632
+ }),
24633
+ heading("Page not found", {
24634
+ id: "not-found-title",
24635
+ subType: "h1",
24636
+ class: sectionTitle
24637
+ }),
24638
+ paragraph({
24639
+ id: "not-found-lede",
24640
+ class: bodyText,
24641
+ content: "There is nothing at this address — it may have moved, or the link has a typo."
24642
+ }),
24643
+ link({
24644
+ id: "not-found-home",
24645
+ href: "/",
24646
+ class: button,
24647
+ content: "Back to the home page"
24648
+ })
24649
+ ]
24650
+ })]
24651
+ };
24652
+ //#endregion
24383
24653
  //#region src/spaces/blank/tokens.ts
24384
24654
  /**
24385
24655
  * Every colour the page uses, per scheme.
@@ -24810,7 +25080,15 @@ var space$1 = {
24810
25080
  * makes the dark scheme work: a hard-coded colour would win against the theme and leave black text on black.
24811
25081
  */
24812
25082
  elements: {
24813
- page: { base: { "font-family": "var(--font-sans)" } },
25083
+ page: { base: {
25084
+ "font-family": "var(--font-sans)",
25085
+ "flex-direction": "column",
25086
+ position: "relative",
25087
+ "min-width": "100%",
25088
+ "min-height": "100dvh",
25089
+ color: "var(--foreground)",
25090
+ "background-color": "var(--background)"
25091
+ } },
24814
25092
  heading: { base: { color: "var(--foreground)" } },
24815
25093
  text: { base: { color: "inherit" } },
24816
25094
  paragraph: { base: { color: "var(--foreground)" } },
@@ -24822,12 +25100,6 @@ var space$1 = {
24822
25100
  slug: "",
24823
25101
  isDefault: true,
24824
25102
  css: {
24825
- "flex-direction": "column",
24826
- position: "relative",
24827
- "min-width": "100%",
24828
- "min-height": "100dvh",
24829
- color: "var(--foreground)",
24830
- "background-color": "var(--background)",
24831
25103
  "background-image": "radial-gradient(60rem 32rem at 50% -8rem, var(--glow), transparent 70%)",
24832
25104
  "background-repeat": "no-repeat"
24833
25105
  },
@@ -24903,17 +25175,47 @@ var space$1 = {
24903
25175
  })]
24904
25176
  })
24905
25177
  ]
24906
- }]
25178
+ }, notFound$1]
24907
25179
  };
24908
25180
  //#endregion
24909
25181
  //#region src/spaces/blank/spec.ts?raw
24910
- var spec_default$1 = "import { DOCS, GUIDES, PATHS } from './content.ts';\nimport {\n backdrop,\n bodyText,\n brandMark,\n button,\n card,\n cardArrow,\n cardGrid,\n cardHead,\n cardsBand,\n cardTitle,\n command,\n footerBand,\n footerRow,\n guide,\n guideCopy,\n heroBand,\n iconButton,\n kicker,\n navLink,\n sectionHead,\n sectionTitle,\n shell,\n step,\n tile,\n tones,\n topBarBand\n} from './theme.ts';\nimport { fonts, variables } from './tokens.ts';\nimport { container, fontAwesome, heading, image, link, paragraph, text, themeToggle } from '../../elements';\n\nimport type { Path } from './content.ts';\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared: this file is the page, and it assembles the rest — the palette in `tokens.ts`, the classes in\n * `theme.ts`, what the page says in `content.ts`. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written in them, 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 the\n * guides. The paths and the guides are each one function mapped over one list, which is not a saving of keystrokes —\n * change `guideCard` and all six follow, add an entry to `GUIDES` and a seventh appears, styled like the rest.\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 cards ──────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst pathCard = (entry: (typeof PATHS)[number], index: number): ElementSpec =>\n link({\n id: entry.id,\n href: `${DOCS}/${entry.path}`,\n mode: 'external',\n target: 'blank',\n class: card,\n children: [\n container({\n class: cardHead,\n children: [\n container({ class: [tile, tones[entry.tone]], children: [fontAwesome({ icon: entry.icon })] }),\n // The number is for the eye: read out, \"1\" before \"In the builder\" says nothing the order does not.\n container({ class: step, decorative: true, children: [text({ content: String(index + 1) })] }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: cardArrow })\n ]\n }),\n heading({ id: `${entry.id}-title`, content: entry.title, subType: 'h3', class: cardTitle }),\n paragraph({ content: entry.body, class: bodyText }),\n ...(entry.command\n ? [\n container({\n class: command,\n children: [\n container({ decorative: true, css: { color: 'var(--muted)' }, children: [text({ content: '$' })] }),\n text({ content: entry.command })\n ]\n })\n ]\n : [])\n ]\n });\n\nconst guideCard = (entry: Path): ElementSpec =>\n link({\n id: entry.id,\n href: `${DOCS}/${entry.path}`,\n mode: 'external',\n target: 'blank',\n class: [card, guide],\n children: [\n container({ class: [tile, tones[entry.tone]], children: [fontAwesome({ icon: entry.icon })] }),\n container({\n class: guideCopy,\n children: [\n heading({ id: `${entry.id}-title`, content: entry.title, subType: 'h3', class: cardTitle }),\n paragraph({ content: entry.body, class: bodyText })\n ]\n }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: cardArrow })\n ]\n });\n\n/** A band's head: its kicker, its title, and a line saying what is in it. */\nconst sectionHeader = (id: string, kickerText: string, title: string, lede: string): ElementSpec =>\n container({\n class: sectionHead,\n children: [\n text({ content: kickerText, class: kicker }),\n heading({ id: `${id}-title`, content: title, subType: 'h2', class: sectionTitle }),\n paragraph({ content: lede, class: bodyText })\n ]\n });\n\n// ── The page ───────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst topBar = container({\n id: 'top-bar',\n subType: 'header',\n class: [shell, topBarBand],\n children: [\n link({\n id: 'brand',\n href: 'https://plitzi.com',\n mode: 'external',\n target: 'blank',\n class: navLink,\n children: [\n // The name beside it already says what the mark is: read out, it would say \"Plitzi\" twice.\n image({ src: 'https://cdn.plitzi.com/resources/img/favicon.svg', decorative: true, class: brandMark }),\n text({ content: 'Plitzi', css: { color: 'var(--foreground)', 'font-size': '16px', 'font-weight': '700' } })\n ]\n }),\n container({\n id: 'top-actions',\n subType: 'nav',\n label: 'Plitzi',\n css: { display: 'flex', 'align-items': 'center', gap: '8px' },\n children: [\n link({ id: 'top-docs', href: DOCS, mode: 'external', target: 'blank', class: navLink, content: 'Docs' }),\n themeToggle({ id: 'theme', class: iconButton })\n ]\n })\n ]\n});\n\nconst heroEyebrow = container({\n id: 'hero-eyebrow',\n css: {\n display: 'flex',\n 'align-items': 'center',\n gap: '8px',\n padding: '6px 12px',\n 'border-radius': '999px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--card)',\n 'font-size': '13px',\n 'font-weight': '500'\n },\n children: [\n container({\n css: { width: '8px', height: '8px', 'border-radius': '999px', 'background-color': 'var(--tint-emerald)' }\n }),\n text({ content: 'Your new space', css: { color: 'var(--muted)' } })\n ]\n});\n\nconst heroTitle = heading({\n id: 'hero-title',\n content: 'Welcome to Plitzi',\n subType: 'h1',\n css: {\n desktop: {\n 'font-size': '64px',\n 'font-weight': '700',\n 'letter-spacing': '-0.03em',\n 'line-height': '1.05',\n 'text-align': 'center',\n margin: '0px'\n },\n tablet: { 'font-size': '48px' },\n mobile: { 'font-size': '38px' }\n }\n});\n\nconst heroLede = paragraph({\n id: 'hero-lede',\n content:\n 'This page is where your space starts, and it is already yours. Change any of it in the builder, in code, ' +\n 'or by asking an agent — below is how, and where to read more.',\n css: {\n desktop: {\n color: 'var(--muted)',\n 'font-size': '18px',\n 'line-height': '1.6',\n 'text-align': 'center',\n 'max-width': '600px',\n margin: '0px'\n },\n mobile: { 'font-size': '16px' }\n }\n});\n\nconst heroActions = container({\n id: 'hero-actions',\n css: {\n desktop: {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n gap: '12px',\n 'margin-top': '8px'\n },\n mobile: { 'flex-direction': 'column', 'align-items': 'stretch', width: '100%' }\n },\n children: [\n link({\n id: 'cta-quickstart',\n href: `${DOCS}/quickstart`,\n mode: 'external',\n target: 'blank',\n class: button,\n variant: 'primary',\n content: 'Start the quickstart',\n icon: 'fas fa-arrow-right',\n iconPlacement: 'after'\n }),\n link({\n id: 'cta-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: button,\n content: 'Read the docs',\n icon: 'fas fa-book-open'\n })\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 variables,\n fonts,\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 page: { base: { 'font-family': 'var(--font-sans)' } },\n heading: { base: { color: 'var(--foreground)' } },\n text: { base: { color: 'inherit' } },\n paragraph: { base: { color: 'var(--foreground)' } },\n fontAwesome: { base: { color: 'inherit' } }\n },\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n isDefault: true,\n css: {\n 'flex-direction': 'column',\n position: 'relative',\n 'min-width': '100%',\n 'min-height': '100dvh',\n color: 'var(--foreground)',\n 'background-color': 'var(--background)',\n // A glow over the top of the page, in the palette's primary, so it follows the scheme like everything else.\n 'background-image': 'radial-gradient(60rem 32rem at 50% -8rem, var(--glow), transparent 70%)',\n 'background-repeat': 'no-repeat'\n },\n body: [\n container({ id: 'backdrop', class: backdrop, decorative: true }),\n topBar,\n container({\n id: 'main',\n subType: 'main',\n css: { display: 'flex', 'flex-direction': 'column' },\n children: [\n container({\n id: 'hero',\n class: [shell, heroBand],\n children: [heroEyebrow, heroTitle, heroLede, heroActions]\n }),\n container({\n id: 'paths',\n subType: 'section',\n label: 'Make it yours',\n class: [shell, cardsBand],\n children: [\n sectionHeader(\n 'paths',\n 'Make it yours',\n 'Three ways in, one space',\n 'Start with whichever suits you — the others see every change it makes.'\n ),\n container({ id: 'path-cards', class: cardGrid, children: PATHS.map(pathCard) })\n ]\n }),\n container({\n id: 'guides',\n subType: 'section',\n label: 'Guides',\n class: [shell, cardsBand],\n children: [\n sectionHeader(\n 'guides',\n 'Guides',\n 'Learn the building blocks',\n 'Each one is a page of the docs, short enough to read before you change the page it explains.'\n ),\n container({ id: 'cards', class: cardGrid, children: GUIDES.map(guideCard) })\n ]\n })\n ]\n }),\n container({\n id: 'footer',\n subType: 'footer',\n class: [shell, footerBand],\n children: [\n container({\n class: footerRow,\n children: [\n text({ content: 'Made with Plitzi', css: { color: 'var(--muted)', 'font-size': '13px' } }),\n link({\n id: 'footer-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: navLink,\n content: 'plitzi.com/docs'\n })\n ]\n })\n ]\n })\n ]\n }\n ]\n};\n";
25182
+ var spec_default$1 = "import { DOCS, GUIDES, PATHS } from './content.ts';\nimport { notFound } from './notFound.ts';\nimport {\n backdrop,\n bodyText,\n brandMark,\n button,\n card,\n cardArrow,\n cardGrid,\n cardHead,\n cardsBand,\n cardTitle,\n command,\n footerBand,\n footerRow,\n guide,\n guideCopy,\n heroBand,\n iconButton,\n kicker,\n navLink,\n sectionHead,\n sectionTitle,\n shell,\n step,\n tile,\n tones,\n topBarBand\n} from './theme.ts';\nimport { fonts, variables } from './tokens.ts';\nimport { container, fontAwesome, heading, image, link, paragraph, text, themeToggle } from '../../elements';\n\nimport type { Path } from './content.ts';\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared: this file is the page, and it assembles the rest — the palette in `tokens.ts`, the classes in\n * `theme.ts`, what the page says in `content.ts`. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written in them, 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 the\n * guides. The paths and the guides are each one function mapped over one list, which is not a saving of keystrokes —\n * change `guideCard` and all six follow, add an entry to `GUIDES` and a seventh appears, styled like the rest.\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 cards ──────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst pathCard = (entry: (typeof PATHS)[number], index: number): ElementSpec =>\n link({\n id: entry.id,\n href: `${DOCS}/${entry.path}`,\n mode: 'external',\n target: 'blank',\n class: card,\n children: [\n container({\n class: cardHead,\n children: [\n container({ class: [tile, tones[entry.tone]], children: [fontAwesome({ icon: entry.icon })] }),\n // The number is for the eye: read out, \"1\" before \"In the builder\" says nothing the order does not.\n container({ class: step, decorative: true, children: [text({ content: String(index + 1) })] }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: cardArrow })\n ]\n }),\n heading({ id: `${entry.id}-title`, content: entry.title, subType: 'h3', class: cardTitle }),\n paragraph({ content: entry.body, class: bodyText }),\n ...(entry.command\n ? [\n container({\n class: command,\n children: [\n container({ decorative: true, css: { color: 'var(--muted)' }, children: [text({ content: '$' })] }),\n text({ content: entry.command })\n ]\n })\n ]\n : [])\n ]\n });\n\nconst guideCard = (entry: Path): ElementSpec =>\n link({\n id: entry.id,\n href: `${DOCS}/${entry.path}`,\n mode: 'external',\n target: 'blank',\n class: [card, guide],\n children: [\n container({ class: [tile, tones[entry.tone]], children: [fontAwesome({ icon: entry.icon })] }),\n container({\n class: guideCopy,\n children: [\n heading({ id: `${entry.id}-title`, content: entry.title, subType: 'h3', class: cardTitle }),\n paragraph({ content: entry.body, class: bodyText })\n ]\n }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: cardArrow })\n ]\n });\n\n/** A band's head: its kicker, its title, and a line saying what is in it. */\nconst sectionHeader = (id: string, kickerText: string, title: string, lede: string): ElementSpec =>\n container({\n class: sectionHead,\n children: [\n text({ content: kickerText, class: kicker }),\n heading({ id: `${id}-title`, content: title, subType: 'h2', class: sectionTitle }),\n paragraph({ content: lede, class: bodyText })\n ]\n });\n\n// ── The page ───────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst topBar = container({\n id: 'top-bar',\n subType: 'header',\n class: [shell, topBarBand],\n children: [\n link({\n id: 'brand',\n href: 'https://plitzi.com',\n mode: 'external',\n target: 'blank',\n class: navLink,\n children: [\n // The name beside it already says what the mark is: read out, it would say \"Plitzi\" twice.\n image({ src: 'https://cdn.plitzi.com/resources/img/favicon.svg', decorative: true, class: brandMark }),\n text({ content: 'Plitzi', css: { color: 'var(--foreground)', 'font-size': '16px', 'font-weight': '700' } })\n ]\n }),\n container({\n id: 'top-actions',\n subType: 'nav',\n label: 'Plitzi',\n css: { display: 'flex', 'align-items': 'center', gap: '8px' },\n children: [\n link({ id: 'top-docs', href: DOCS, mode: 'external', target: 'blank', class: navLink, content: 'Docs' }),\n themeToggle({ id: 'theme', class: iconButton })\n ]\n })\n ]\n});\n\nconst heroEyebrow = container({\n id: 'hero-eyebrow',\n css: {\n display: 'flex',\n 'align-items': 'center',\n gap: '8px',\n padding: '6px 12px',\n 'border-radius': '999px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--card)',\n 'font-size': '13px',\n 'font-weight': '500'\n },\n children: [\n container({\n css: { width: '8px', height: '8px', 'border-radius': '999px', 'background-color': 'var(--tint-emerald)' }\n }),\n text({ content: 'Your new space', css: { color: 'var(--muted)' } })\n ]\n});\n\nconst heroTitle = heading({\n id: 'hero-title',\n content: 'Welcome to Plitzi',\n subType: 'h1',\n css: {\n desktop: {\n 'font-size': '64px',\n 'font-weight': '700',\n 'letter-spacing': '-0.03em',\n 'line-height': '1.05',\n 'text-align': 'center',\n margin: '0px'\n },\n tablet: { 'font-size': '48px' },\n mobile: { 'font-size': '38px' }\n }\n});\n\nconst heroLede = paragraph({\n id: 'hero-lede',\n content:\n 'This page is where your space starts, and it is already yours. Change any of it in the builder, in code, ' +\n 'or by asking an agent — below is how, and where to read more.',\n css: {\n desktop: {\n color: 'var(--muted)',\n 'font-size': '18px',\n 'line-height': '1.6',\n 'text-align': 'center',\n 'max-width': '600px',\n margin: '0px'\n },\n mobile: { 'font-size': '16px' }\n }\n});\n\nconst heroActions = container({\n id: 'hero-actions',\n css: {\n desktop: {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n gap: '12px',\n 'margin-top': '8px'\n },\n mobile: { 'flex-direction': 'column', 'align-items': 'stretch', width: '100%' }\n },\n children: [\n link({\n id: 'cta-quickstart',\n href: `${DOCS}/quickstart`,\n mode: 'external',\n target: 'blank',\n class: button,\n variant: 'primary',\n content: 'Start the quickstart',\n icon: 'fas fa-arrow-right',\n iconPlacement: 'after'\n }),\n link({\n id: 'cta-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: button,\n content: 'Read the docs',\n icon: 'fas fa-book-open'\n })\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 variables,\n fonts,\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 // What every page is: the type, the scheme's colours, a whole screen tall.\n page: {\n base: {\n 'font-family': 'var(--font-sans)',\n 'flex-direction': 'column',\n position: 'relative',\n 'min-width': '100%',\n 'min-height': '100dvh',\n color: 'var(--foreground)',\n 'background-color': 'var(--background)'\n }\n },\n heading: { base: { color: 'var(--foreground)' } },\n text: { base: { color: 'inherit' } },\n paragraph: { base: { color: 'var(--foreground)' } },\n fontAwesome: { base: { color: 'inherit' } }\n },\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n isDefault: true,\n css: {\n // A glow over the top of the page, in the palette's primary, so it follows the scheme like everything else.\n 'background-image': 'radial-gradient(60rem 32rem at 50% -8rem, var(--glow), transparent 70%)',\n 'background-repeat': 'no-repeat'\n },\n body: [\n container({ id: 'backdrop', class: backdrop, decorative: true }),\n topBar,\n container({\n id: 'main',\n subType: 'main',\n css: { display: 'flex', 'flex-direction': 'column' },\n children: [\n container({\n id: 'hero',\n class: [shell, heroBand],\n children: [heroEyebrow, heroTitle, heroLede, heroActions]\n }),\n container({\n id: 'paths',\n subType: 'section',\n label: 'Make it yours',\n class: [shell, cardsBand],\n children: [\n sectionHeader(\n 'paths',\n 'Make it yours',\n 'Three ways in, one space',\n 'Start with whichever suits you — the others see every change it makes.'\n ),\n container({ id: 'path-cards', class: cardGrid, children: PATHS.map(pathCard) })\n ]\n }),\n container({\n id: 'guides',\n subType: 'section',\n label: 'Guides',\n class: [shell, cardsBand],\n children: [\n sectionHeader(\n 'guides',\n 'Guides',\n 'Learn the building blocks',\n 'Each one is a page of the docs, short enough to read before you change the page it explains.'\n ),\n container({ id: 'cards', class: cardGrid, children: GUIDES.map(guideCard) })\n ]\n })\n ]\n }),\n container({\n id: 'footer',\n subType: 'footer',\n class: [shell, footerBand],\n children: [\n container({\n class: footerRow,\n children: [\n text({ content: 'Made with Plitzi', css: { color: 'var(--muted)', 'font-size': '13px' } }),\n link({\n id: 'footer-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: navLink,\n content: 'plitzi.com/docs'\n })\n ]\n })\n ]\n })\n ]\n },\n notFound\n ]\n};\n";
24911
25183
  //#endregion
24912
25184
  //#region src/spaces/blank/theme.ts?raw
24913
25185
  var theme_default = "import { styles } from '../../style';\n\n/**\n * The classes the page wears, declared once and named by the elements that wear them — so re-theming a card re-themes\n * every card. Every colour in them is a `var(--…)` of the palette in `tokens.ts`.\n */\n\n/** The same outline on everything that can be focused from the keyboard. */\nconst focusRing = { outline: '2px solid var(--primary)', 'outline-offset': '3px' };\n\n// A band wears `shell` for its sides and a class of its own for its top and bottom, so both write their sides apart: a\n// `padding` shorthand in either would reset the other's. A class that owns its whole box writes the shorthand.\nexport const shell = styles('shell', {\n css: {\n desktop: {\n display: 'flex',\n 'flex-direction': 'column',\n width: '100%',\n 'max-width': '1120px',\n 'margin-left': 'auto',\n 'margin-right': 'auto',\n 'padding-left': '32px',\n 'padding-right': '32px',\n position: 'relative',\n 'z-index': '1'\n },\n tablet: { 'padding-left': '24px', 'padding-right': '24px' },\n mobile: { 'padding-left': '20px', 'padding-right': '20px' }\n }\n});\n\n/**\n * The grid behind the top of the page, fading into the background as it goes down.\n *\n * Gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the line colour\n * and the fade are variables, so it is faint on light and faint on dark without a second asset. The fade is the first\n * layer, drawn over the lines, so the grid ends softly instead of at an edge.\n */\nexport const backdrop = styles('backdrop', {\n css: {\n desktop: {\n position: 'absolute',\n top: '0px',\n left: '0px',\n right: '0px',\n height: '760px',\n 'pointer-events': 'none',\n 'background-image':\n 'linear-gradient(180deg, transparent 0%, var(--background) 100%), linear-gradient(0deg, var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px)',\n 'background-size': '100% 100%, 48px 48px, 48px 48px',\n 'background-position': '0% 0%, 50% 0%, 50% 0%',\n 'background-repeat': 'no-repeat, repeat, repeat'\n },\n mobile: { height: '560px' }\n }\n});\n\nexport const navLink = styles('nav-link', {\n css: {\n display: 'flex',\n 'align-items': 'center',\n gap: '8px',\n color: 'var(--muted)',\n 'font-size': '14px',\n 'font-weight': '500',\n 'text-decoration': 'none',\n 'border-radius': '8px',\n padding: '6px 10px'\n },\n states: { hover: { color: 'var(--foreground)' }, 'focus-visible': focusRing }\n});\n\n/** The mark beside the name, at the size the bar wants. */\nexport const brandMark = styles('brand-mark', { width: '24px', height: '24px' });\n\n/** The theme switch, dressed like the rest of the bar. It starts as a bare control, centred and in the bar's type. */\nexport const iconButton = styles('icon-button', {\n css: {\n display: 'flex',\n 'justify-content': 'center',\n width: '36px',\n height: '36px',\n 'border-radius': '8px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--card)',\n color: 'var(--muted)',\n 'font-size': '16px'\n },\n states: { hover: { color: 'var(--foreground)' }, 'focus-visible': focusRing }\n});\n\n/** A call to action. The base is the quiet one; `primary` is the one the eye should land on. */\nexport const button = styles('button', {\n css: {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n gap: '8px',\n height: '44px',\n padding: '0px 20px',\n 'border-radius': '10px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--card)',\n color: 'var(--foreground)',\n 'font-size': '15px',\n 'font-weight': '600',\n 'text-decoration': 'none',\n 'transition-property': 'background-color, border-color, transform',\n 'transition-duration': '150ms',\n 'transition-timing-function': 'ease-out'\n },\n states: {\n hover: { 'border-color': 'var(--muted)' },\n 'focus-visible': focusRing\n },\n variants: {\n primary: {\n css: {\n 'background-color': 'var(--primary)',\n 'border-color': 'var(--primary)',\n color: 'var(--primary-foreground)',\n 'box-shadow': 'var(--shadow-md)'\n },\n states: { hover: { 'background-color': 'var(--primary-hover)', 'border-color': 'var(--primary-hover)' } }\n }\n }\n});\n\n/** A section's small label over its title: what the band is about, in the palette's primary. */\nexport const kicker = styles('kicker', {\n color: 'var(--primary)',\n 'font-size': '13px',\n 'font-weight': '600',\n 'letter-spacing': '0.04em',\n 'text-transform': 'uppercase',\n margin: '0px'\n});\n\nexport const sectionTitle = styles('section-title', {\n css: {\n desktop: {\n 'font-size': '32px',\n 'font-weight': '700',\n 'letter-spacing': '-0.02em',\n 'line-height': '1.15',\n margin: '0px'\n },\n mobile: { 'font-size': '26px' }\n }\n});\n\nexport const sectionHead = styles('section-head', {\n display: 'flex',\n 'flex-direction': 'column',\n gap: '8px',\n 'margin-bottom': '8px'\n});\n\n/** Copy under a title or in a card: the palette's quiet colour, at a size made for reading. */\nexport const bodyText = styles('body-text', {\n color: 'var(--muted)',\n 'font-size': '15px',\n 'line-height': '1.6',\n margin: '0px'\n});\n\n/** A card of either band: the whole card is the link, so the target is as large as what it describes. */\nexport const card = styles('card', {\n css: {\n display: 'flex',\n 'flex-direction': 'column',\n gap: '12px',\n padding: '24px',\n 'border-radius': '16px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--card)',\n 'box-shadow': 'var(--shadow-sm)',\n 'text-decoration': 'none',\n 'transition-property': 'transform, border-color, box-shadow',\n 'transition-duration': '200ms',\n 'transition-timing-function': 'ease-out'\n },\n states: {\n hover: { transform: 'translateY(-3px)', 'border-color': 'var(--primary)', 'box-shadow': 'var(--shadow-lg)' },\n 'focus-visible': focusRing\n }\n});\n\nexport const cardHead = styles('card-head', { display: 'flex', 'align-items': 'center', gap: '10px' });\n\nexport const cardTitle = styles('card-title', {\n color: 'var(--foreground)',\n 'font-size': '17px',\n 'font-weight': '600',\n margin: '0px'\n});\n\n/** The arrow slides while the card around it is hovered. */\nexport const cardArrow = styles('card-arrow', {\n css: {\n color: 'var(--muted)',\n 'font-size': '13px',\n 'margin-left': 'auto',\n 'transition-property': 'transform, color',\n 'transition-duration': '200ms',\n 'transition-timing-function': 'ease-out'\n },\n ancestors: {\n [card.name]: { states: { hover: { transform: 'translateX(4px)', color: 'var(--primary)' } } }\n }\n});\n\n/** The square an icon sits in. Its colour is a tone, worn beside it: `class: [tile, tones.violet]`. */\nexport const tile = styles('tile', {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n width: '40px',\n height: '40px',\n 'flex-shrink': '0',\n 'border-radius': '10px',\n 'font-size': '16px'\n});\n\n/** One class per tone, each a pair of palette variables — so a tone is dark-ready the moment it is declared. */\nexport const tones = {\n violet: styles('tone-violet', { color: 'var(--tint-violet)', 'background-color': 'var(--tint-violet-bg)' }),\n cyan: styles('tone-cyan', { color: 'var(--tint-cyan)', 'background-color': 'var(--tint-cyan-bg)' }),\n amber: styles('tone-amber', { color: 'var(--tint-amber)', 'background-color': 'var(--tint-amber-bg)' }),\n emerald: styles('tone-emerald', { color: 'var(--tint-emerald)', 'background-color': 'var(--tint-emerald-bg)' }),\n rose: styles('tone-rose', { color: 'var(--tint-rose)', 'background-color': 'var(--tint-rose-bg)' }),\n blue: styles('tone-blue', { color: 'var(--tint-blue)', 'background-color': 'var(--tint-blue-bg)' })\n};\n\n/** A path's number, in a circle: the order the three are worth reading in, not an order they must be taken in. */\nexport const step = styles('step', {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n width: '28px',\n height: '28px',\n 'flex-shrink': '0',\n 'border-radius': '999px',\n border: '1px solid var(--border)',\n color: 'var(--muted)',\n 'font-size': '13px',\n 'font-weight': '600'\n});\n\n/** What a path does, as it would be typed — the one place the page shows code. */\nexport const command = styles('command', {\n display: 'flex',\n 'align-items': 'center',\n gap: '8px',\n 'margin-top': 'auto',\n padding: '10px 12px',\n 'border-radius': '10px',\n border: '1px solid var(--border)',\n 'background-color': 'var(--code-bg)',\n color: 'var(--foreground)',\n 'font-family': 'var(--font-mono)',\n 'font-size': '13px',\n 'white-space': 'nowrap',\n overflow: 'hidden'\n});\n\n/** A guide is smaller than a path: one line under its title, its icon beside it rather than above. */\nexport const guide = styles('guide', {\n 'flex-direction': 'row',\n 'align-items': 'flex-start',\n gap: '16px',\n padding: '20px'\n});\n\nexport const guideCopy = styles('guide-copy', {\n display: 'flex',\n 'flex-direction': 'column',\n gap: '4px',\n 'min-width': '0px'\n});\n\n/** Each band of the page wears `shell` for its width, and one of these for what is its own. */\nexport const topBarBand = styles('top-bar', {\n 'flex-direction': 'row',\n 'align-items': 'center',\n 'justify-content': 'space-between',\n 'padding-top': '20px',\n 'padding-bottom': '20px'\n});\n\nexport const heroBand = styles('hero', {\n css: {\n desktop: { 'align-items': 'center', gap: '24px', 'padding-top': '88px', 'padding-bottom': '88px' },\n tablet: { 'padding-top': '64px', 'padding-bottom': '64px' },\n mobile: { 'padding-top': '40px', 'padding-bottom': '48px' }\n }\n});\n\n/** The two bands of cards: the paths first, the guides after, each under its own head. */\nexport const cardsBand = styles('cards-band', { gap: '20px', 'padding-bottom': '80px' });\n\n/** Three columns that become two and then one, so a card is never narrower than its words. */\nexport const cardGrid = styles('card-grid', {\n css: {\n desktop: { display: 'grid', 'grid-template-columns': 'repeat(3, minmax(0, 1fr))', gap: '16px' },\n tablet: { 'grid-template-columns': 'repeat(2, minmax(0, 1fr))' },\n mobile: { 'grid-template-columns': 'minmax(0, 1fr)' }\n }\n});\n\n/** The footer's line spans the content, not the band's padding: it belongs to what it closes. */\nexport const footerBand = styles('footer', {\n css: {\n desktop: { 'margin-top': 'auto', 'padding-bottom': '32px' },\n mobile: { 'padding-bottom': '24px' }\n }\n});\n\nexport const footerRow = styles('footer-row', {\n css: {\n desktop: {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'space-between',\n gap: '16px',\n 'padding-top': '24px',\n 'border-top': '1px solid var(--border)'\n },\n mobile: { 'flex-direction': 'column', gap: '8px' }\n }\n});\n\n/** A tone by its name: what a card of `content.ts` says it is painted in. */\nexport type Tone = keyof typeof tones;\n";
24914
25186
  //#endregion
24915
25187
  //#region src/spaces/blank/tokens.ts?raw
24916
- var tokens_default$1 = "import type { SpaceSpec } from '../../schema';\n\n/**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. No class names a colour directly — they are all `var(--…)` — so\n * switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\nexport const variables: SpaceSpec['variables'] = {\n color: {\n background: { light: '#fbfbfd', dark: '#09090b', default: '#fbfbfd' },\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n muted: { light: '#5f5f6e', dark: '#a1a1aa', default: '#5f5f6e' },\n card: { light: '#ffffff', dark: '#111115', default: '#ffffff' },\n 'code-bg': { light: '#f4f4f8', dark: '#18181d', default: '#f4f4f8' },\n border: { light: '#e6e6ee', dark: '#27272d', default: '#e6e6ee' },\n primary: { light: '#5b3df5', dark: '#7c66ff', default: '#5b3df5' },\n 'primary-hover': { light: '#4a2de0', dark: '#9180ff', default: '#4a2de0' },\n 'primary-foreground': { light: '#ffffff', dark: '#ffffff', default: '#ffffff' },\n glow: { light: 'rgba(91, 61, 245, 0.16)', dark: 'rgba(124, 102, 255, 0.24)', default: 'rgba(91, 61, 245, 0.16)' },\n grid: { light: '#0000000d', dark: '#ffffff0d', default: '#0000000d' },\n 'tint-violet': { light: '#5b3df5', dark: '#b7a6ff', default: '#5b3df5' },\n 'tint-violet-bg': { light: '#efecfe', dark: '#1c1836', default: '#efecfe' },\n 'tint-cyan': { light: '#0e7490', dark: '#67d8ef', default: '#0e7490' },\n 'tint-cyan-bg': { light: '#e0f5fa', dark: '#0c2a33', default: '#e0f5fa' },\n 'tint-amber': { light: '#a45b00', dark: '#f5c169', default: '#a45b00' },\n 'tint-amber-bg': { light: '#fcf0dc', dark: '#2e2314', default: '#fcf0dc' },\n 'tint-rose': { light: '#c2255c', dark: '#f994bc', default: '#c2255c' },\n 'tint-rose-bg': { light: '#fce8f0', dark: '#331623', default: '#fce8f0' },\n 'tint-emerald': { light: '#0f7b55', dark: '#64d6a6', default: '#0f7b55' },\n 'tint-emerald-bg': { light: '#e0f6ee', dark: '#0e2a21', default: '#e0f6ee' },\n 'tint-blue': { light: '#2159c4', dark: '#8ab0f7', default: '#2159c4' },\n 'tint-blue-bg': { light: '#e6edfc', dark: '#13203c', default: '#e6edfc' }\n },\n shadow: {\n 'shadow-sm': {\n light: '0 1px 2px rgba(12, 12, 20, 0.05)',\n dark: '0 1px 2px rgba(0, 0, 0, 0.5)',\n default: '0 1px 2px rgba(12, 12, 20, 0.05)'\n },\n 'shadow-md': {\n light: '0 1px 2px rgba(12, 12, 20, 0.06), 0 8px 20px -8px rgba(91, 61, 245, 0.45)',\n dark: '0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 24px -8px rgba(124, 102, 255, 0.55)',\n default: '0 1px 2px rgba(12, 12, 20, 0.06), 0 8px 20px -8px rgba(91, 61, 245, 0.45)'\n },\n 'shadow-lg': {\n light: '0 2px 4px rgba(12, 12, 20, 0.05), 0 24px 48px -20px rgba(12, 12, 20, 0.25)',\n dark: '0 2px 4px rgba(0, 0, 0, 0.6), 0 28px 56px -22px rgba(0, 0, 0, 0.85)',\n default: '0 2px 4px rgba(12, 12, 20, 0.05), 0 24px 48px -20px rgba(12, 12, 20, 0.25)'\n }\n },\n custom: {\n 'font-sans':\n 'Geist, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n 'font-mono': '\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'\n }\n};\n\n/** Loaded by the page itself: a face the space names here is the only one it ever fetches. */\nexport const fonts: SpaceSpec['fonts'] = [\n {\n family: 'Geist',\n fallback: 'ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n weights: [400, 500, 600, 700],\n styles: ['normal'],\n display: 'swap',\n preload: true,\n source: 'google'\n },\n {\n family: 'Geist Mono',\n fallback: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace',\n weights: [400],\n styles: ['normal'],\n display: 'swap',\n source: 'google'\n }\n];\n";
25188
+ var tokens_default$1 = "import type { SpaceSpec } from '../../schema';\n\n/**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. No class names a colour directly — they are all `var(--…)` — so\n * switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\nexport const variables = {\n color: {\n background: { light: '#fbfbfd', dark: '#09090b', default: '#fbfbfd' },\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n muted: { light: '#5f5f6e', dark: '#a1a1aa', default: '#5f5f6e' },\n card: { light: '#ffffff', dark: '#111115', default: '#ffffff' },\n 'code-bg': { light: '#f4f4f8', dark: '#18181d', default: '#f4f4f8' },\n border: { light: '#e6e6ee', dark: '#27272d', default: '#e6e6ee' },\n primary: { light: '#5b3df5', dark: '#7c66ff', default: '#5b3df5' },\n 'primary-hover': { light: '#4a2de0', dark: '#9180ff', default: '#4a2de0' },\n 'primary-foreground': { light: '#ffffff', dark: '#ffffff', default: '#ffffff' },\n glow: { light: 'rgba(91, 61, 245, 0.16)', dark: 'rgba(124, 102, 255, 0.24)', default: 'rgba(91, 61, 245, 0.16)' },\n grid: { light: '#0000000d', dark: '#ffffff0d', default: '#0000000d' },\n 'tint-violet': { light: '#5b3df5', dark: '#b7a6ff', default: '#5b3df5' },\n 'tint-violet-bg': { light: '#efecfe', dark: '#1c1836', default: '#efecfe' },\n 'tint-cyan': { light: '#0e7490', dark: '#67d8ef', default: '#0e7490' },\n 'tint-cyan-bg': { light: '#e0f5fa', dark: '#0c2a33', default: '#e0f5fa' },\n 'tint-amber': { light: '#a45b00', dark: '#f5c169', default: '#a45b00' },\n 'tint-amber-bg': { light: '#fcf0dc', dark: '#2e2314', default: '#fcf0dc' },\n 'tint-rose': { light: '#c2255c', dark: '#f994bc', default: '#c2255c' },\n 'tint-rose-bg': { light: '#fce8f0', dark: '#331623', default: '#fce8f0' },\n 'tint-emerald': { light: '#0f7b55', dark: '#64d6a6', default: '#0f7b55' },\n 'tint-emerald-bg': { light: '#e0f6ee', dark: '#0e2a21', default: '#e0f6ee' },\n 'tint-blue': { light: '#2159c4', dark: '#8ab0f7', default: '#2159c4' },\n 'tint-blue-bg': { light: '#e6edfc', dark: '#13203c', default: '#e6edfc' }\n },\n shadow: {\n 'shadow-sm': {\n light: '0 1px 2px rgba(12, 12, 20, 0.05)',\n dark: '0 1px 2px rgba(0, 0, 0, 0.5)',\n default: '0 1px 2px rgba(12, 12, 20, 0.05)'\n },\n 'shadow-md': {\n light: '0 1px 2px rgba(12, 12, 20, 0.06), 0 8px 20px -8px rgba(91, 61, 245, 0.45)',\n dark: '0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 24px -8px rgba(124, 102, 255, 0.55)',\n default: '0 1px 2px rgba(12, 12, 20, 0.06), 0 8px 20px -8px rgba(91, 61, 245, 0.45)'\n },\n 'shadow-lg': {\n light: '0 2px 4px rgba(12, 12, 20, 0.05), 0 24px 48px -20px rgba(12, 12, 20, 0.25)',\n dark: '0 2px 4px rgba(0, 0, 0, 0.6), 0 28px 56px -22px rgba(0, 0, 0, 0.85)',\n default: '0 2px 4px rgba(12, 12, 20, 0.05), 0 24px 48px -20px rgba(12, 12, 20, 0.25)'\n }\n },\n custom: {\n 'font-sans':\n 'Geist, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n 'font-mono': '\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'\n }\n} satisfies SpaceSpec['variables'];\n\n/** Loaded by the page itself: a face the space names here is the only one it ever fetches. */\nexport const fonts: SpaceSpec['fonts'] = [\n {\n family: 'Geist',\n fallback: 'ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n weights: [400, 500, 600, 700],\n styles: ['normal'],\n display: 'swap',\n preload: true,\n source: 'google'\n },\n {\n family: 'Geist Mono',\n fallback: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace',\n weights: [400],\n styles: ['normal'],\n display: 'swap',\n source: 'google'\n }\n];\n";
25189
+ //#endregion
25190
+ //#region src/spaces/empty/notFound.ts?raw
25191
+ var notFound_default$1 = "import { heading, link, paragraph } from '../../elements';\n\nimport type { PageSpec } from '../../schema';\n\n/** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */\nexport const notFound: PageSpec = {\n id: 'not-found',\n name: 'Not found',\n slug: '*',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n heading('Page not found', { id: 'not-found-title', subType: 'h1' }),\n paragraph({ id: 'not-found-lede', content: 'There is nothing at this address.' }),\n link({ id: 'not-found-home', href: '/', content: 'Back to the home page' })\n ]\n};\n";
25192
+ //#endregion
25193
+ //#region src/spaces/empty/notFound.ts
25194
+ /** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */
25195
+ var notFound = {
25196
+ id: "not-found",
25197
+ name: "Not found",
25198
+ slug: "*",
25199
+ layout: {
25200
+ id: "site",
25201
+ slot: "site-main"
25202
+ },
25203
+ body: [
25204
+ heading("Page not found", {
25205
+ id: "not-found-title",
25206
+ subType: "h1"
25207
+ }),
25208
+ paragraph({
25209
+ id: "not-found-lede",
25210
+ content: "There is nothing at this address."
25211
+ }),
25212
+ link({
25213
+ id: "not-found-home",
25214
+ href: "/",
25215
+ content: "Back to the home page"
25216
+ })
25217
+ ]
25218
+ };
24917
25219
  //#endregion
24918
25220
  //#region src/spaces/empty/spec.ts
24919
25221
  /**
@@ -24995,11 +25297,11 @@ var space = {
24995
25297
  content: "What this site is about, in a line.",
24996
25298
  class: lede
24997
25299
  })]
24998
- }]
25300
+ }, notFound]
24999
25301
  };
25000
25302
  //#endregion
25001
25303
  //#region src/spaces/empty/spec.ts?raw
25002
- var spec_default = "import { container, heading, paragraph } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { SpaceSpec } from '../../schema';\n\n/**\n * The space, declared — and nothing in it yet but what every space starts from: tokens for both themes, a layout the\n * pages render in, and one page.\n *\n * Add a page to `pages`, chrome every page shares (a header, a footer) to the layout around `site-main`, and a look\n * used twice as a class beside the ones below. Name anything a test, a binding or an agent should point at.\n */\n\n/** The page around every page: the background, the type, and the column the pages render in. */\nconst shell = styles('shell', {\n display: 'flex',\n 'flex-direction': 'column',\n 'min-height': '100vh',\n 'background-color': 'var(--background)',\n color: 'var(--foreground)',\n 'font-family': 'system-ui, sans-serif'\n});\n\nconst main = styles('main', { width: '100%', 'max-width': '1120px', margin: '0px auto', padding: '48px 24px' });\n\n/** The line under a page's title: the palette's quiet colour. */\nconst lede = styles('lede', { color: 'var(--muted)', margin: '8px 0px 0px' });\n\nexport const space: SpaceSpec = {\n name: 'Empty space',\n permanentUrl: 'empty-space',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n // Every colour, per scheme: elements say `var(--name)`, so the palette changes here and nowhere else. Add one when a\n // look needs it — a colour declared and read by nothing is one authoring points out (`unused-token`).\n variables: {\n color: {\n background: { light: '#fbfbfd', dark: '#09090b', default: '#fbfbfd' },\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n muted: { light: '#5f5f6e', dark: '#a1a1aa', default: '#5f5f6e' }\n }\n },\n layouts: [\n {\n id: 'site',\n body: [\n container({\n id: 'site-shell',\n class: shell,\n children: [container({ id: 'site-main', subType: 'main', class: main })]\n })\n ]\n }\n ],\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n heading('Home', { id: 'home-title', subType: 'h1' }),\n paragraph({ id: 'home-lede', content: 'What this site is about, in a line.', class: lede })\n ]\n }\n ]\n};\n";
25304
+ var spec_default = "import { notFound } from './notFound.ts';\nimport { container, heading, paragraph } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { SpaceSpec } from '../../schema';\n\n/**\n * The space, declared — and nothing in it yet but what every space starts from: tokens for both themes, a layout the\n * pages render in, and one page.\n *\n * Add a page to `pages`, chrome every page shares (a header, a footer) to the layout around `site-main`, and a look\n * used twice as a class beside the ones below. Name anything a test, a binding or an agent should point at.\n */\n\n/** The page around every page: the background, the type, and the column the pages render in. */\nconst shell = styles('shell', {\n display: 'flex',\n 'flex-direction': 'column',\n 'min-height': '100vh',\n 'background-color': 'var(--background)',\n color: 'var(--foreground)',\n 'font-family': 'system-ui, sans-serif'\n});\n\nconst main = styles('main', { width: '100%', 'max-width': '1120px', margin: '0px auto', padding: '48px 24px' });\n\n/** The line under a page's title: the palette's quiet colour. */\nconst lede = styles('lede', { color: 'var(--muted)', margin: '8px 0px 0px' });\n\nexport const space: SpaceSpec = {\n name: 'Empty space',\n permanentUrl: 'empty-space',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n // Every colour, per scheme: elements say `var(--name)`, so the palette changes here and nowhere else. Add one when a\n // look needs it — a colour declared and read by nothing is one authoring points out (`unused-token`).\n variables: {\n color: {\n background: { light: '#fbfbfd', dark: '#09090b', default: '#fbfbfd' },\n foreground: { light: '#17171c', dark: '#fafafa', default: '#17171c' },\n muted: { light: '#5f5f6e', dark: '#a1a1aa', default: '#5f5f6e' }\n }\n },\n layouts: [\n {\n id: 'site',\n body: [\n container({\n id: 'site-shell',\n class: shell,\n children: [container({ id: 'site-main', subType: 'main', class: main })]\n })\n ]\n }\n ],\n pages: [\n {\n id: 'home',\n name: 'Home',\n slug: '',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n heading('Home', { id: 'home-title', subType: 'h1' }),\n paragraph({ id: 'home-lede', content: 'What this site is about, in a line.', class: lede })\n ]\n },\n notFound\n ]\n};\n";
25003
25305
  //#endregion
25004
25306
  //#region templates/catalog/src/data/products.json?raw
25005
25307
  var products_default = "{\n \"products\": [\n {\n \"slug\": \"desk-lamp\",\n \"title\": \"Desk lamp\",\n \"category\": \"lighting\",\n \"price\": 49,\n \"summary\": \"A warm, dimmable light for long evenings at the desk.\"\n },\n {\n \"slug\": \"floor-lamp\",\n \"title\": \"Floor lamp\",\n \"category\": \"lighting\",\n \"price\": 129,\n \"summary\": \"Tall, slim and bright enough for a whole corner.\"\n },\n {\n \"slug\": \"notebook\",\n \"title\": \"Dotted notebook\",\n \"category\": \"paper\",\n \"price\": 12,\n \"summary\": \"A5, 160 pages, lies flat when open.\",\n \"badge\": \"New\"\n },\n {\n \"slug\": \"planner\",\n \"title\": \"Weekly planner\",\n \"category\": \"paper\",\n \"price\": 18,\n \"summary\": \"A week on two pages, undated so it starts when you do.\"\n },\n {\n \"slug\": \"pen-set\",\n \"title\": \"Fineliner set\",\n \"category\": \"writing\",\n \"price\": 15,\n \"summary\": \"Six colours, 0.4 mm, quick to dry.\"\n },\n {\n \"slug\": \"fountain-pen\",\n \"title\": \"Fountain pen\",\n \"category\": \"writing\",\n \"price\": 64,\n \"summary\": \"A steel nib and a converter for any ink.\",\n \"badge\": \"Popular\"\n },\n {\n \"slug\": \"desk-mat\",\n \"title\": \"Felt desk mat\",\n \"category\": \"desk\",\n \"price\": 39,\n \"summary\": \"Wool felt, 90 × 40 cm, quiet under a keyboard.\"\n },\n {\n \"slug\": \"monitor-stand\",\n \"title\": \"Monitor stand\",\n \"category\": \"desk\",\n \"price\": 79,\n \"summary\": \"Oak, with room underneath for a keyboard.\"\n }\n ]\n}\n";
@@ -25011,7 +25313,7 @@ var productCard_default = "/**\n * A product as a card, placed once per product:
25011
25313
  var data_default = "/**\n * The data the pages read: one JSON file of the project's own (`src/data/products.json`). Its contents type every\n * path a page writes — `products.data.products` — so a misspelt field is a type error, not an empty card. Swapping the\n * file for a real endpoint later changes `PRODUCTS`, and nothing else.\n */\nimport { source } from '@plitzi/sdk-authoring';\n\nimport sample from '../data/products.json' with { type: 'json' };\n\n/**\n * How a page asks for the products: on the server, which reads `src/data/` and never serves it — the page arrives\n * with them in it.\n */\nexport const PRODUCTS = { query: '/data/products.json', runtime: 'server' } as const;\n\n/** The categories the catalog filters by, in the order its select offers them. */\nexport const CATEGORIES = [\n { value: 'lighting', label: 'Lighting' },\n { value: 'paper', label: 'Paper' },\n { value: 'writing', label: 'Writing' },\n { value: 'desk', label: 'Desk' }\n] as const;\n\n/** The products file as the source of the provider named `id` — one per page, as ids are one namespace. */\nexport const productsSource = (id: string) => source(id, sample);\n";
25012
25314
  //#endregion
25013
25315
  //#region templates/catalog/src/space/index.ts?raw
25014
- var space_default = "/* eslint-disable quotes -- templates quote their own strings, and read best in the other quotes */\n/**\n * The space, assembled: a file per part, so each stays short enough to read whole — the tokens, the layout every page\n * shares, the product card, and one file per page. Add a page under `pages/` and list it here.\n *\n * The products are `src/data/products.json`, the project's own: a provider on each page reads it on the server.\n */\nimport { productCard } from './components/productCard.ts';\nimport { layout } from './layout.ts';\nimport { catalog } from './pages/catalog.ts';\nimport { home } from './pages/home.ts';\nimport { product } from './pages/product.ts';\nimport { variables } from './tokens.ts';\n\nimport type { SpaceSpec } from '@plitzi/sdk-authoring';\n\nexport const space: SpaceSpec = {\n name: 'Catalog',\n permanentUrl: 'catalog',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n variables,\n // How a price is shown, said once: `text({ from: …, as: 'price' })` anywhere.\n formats: { price: \"{{ source|currency('USD', 'en', { trimZeros: true }) }}\" },\n layouts: [layout],\n components: [productCard],\n pages: [home, catalog, product]\n};\n";
25316
+ var space_default = "/* eslint-disable quotes -- templates quote their own strings, and read best in the other quotes */\n/**\n * The space, assembled: a file per part, so each stays short enough to read whole — the tokens, the layout every page\n * shares, the product card, and one file per page. Add a page under `pages/` and list it here.\n *\n * The products are `src/data/products.json`, the project's own: a provider on each page reads it on the server.\n */\nimport { productCard } from './components/productCard.ts';\nimport { layout } from './layout.ts';\nimport { catalog } from './pages/catalog.ts';\nimport { home } from './pages/home.ts';\nimport { notFound } from './pages/notFound.ts';\nimport { product } from './pages/product.ts';\nimport { variables } from './tokens.ts';\n\nimport type { SpaceSpec } from '@plitzi/sdk-authoring';\n\nexport const space: SpaceSpec = {\n name: 'Catalog',\n permanentUrl: 'catalog',\n theme: { default: 'system', schemes: ['light', 'dark'] },\n variables,\n // How a price is shown, said once: `text({ from: …, as: 'price' })` anywhere.\n formats: { price: \"{{ source|currency('USD', 'en', { trimZeros: true }) }}\" },\n layouts: [layout],\n components: [productCard],\n pages: [home, catalog, product, notFound]\n};\n";
25015
25317
  //#endregion
25016
25318
  //#region templates/catalog/src/space/layout.ts?raw
25017
25319
  var layout_default = "/**\n * The chrome every page shares — a header with the menu, and a footer — written once. Pages name the layout and the\n * slot their body goes in (`site-main`); the current menu entry marks itself, not each page.\n */\nimport { container, link, styles, text } from '@plitzi/sdk-authoring';\n\nimport { t } from './tokens.ts';\n\nimport type { LayoutSpec } from '@plitzi/sdk-authoring';\n\nconst shell = styles('shell', {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n backgroundColor: t.background,\n color: t.foreground,\n fontFamily: 'system-ui, sans-serif'\n});\n\nconst header = styles('site-header', {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: '16px 24px',\n borderBottom: `1px solid ${t.border}`\n});\n\nconst brand = styles('brand', { fontWeight: 700, color: t.foreground, textDecoration: 'none' });\n\nconst nav = styles('nav', { display: 'flex', gap: 20 });\n\nconst navLink = styles('nav-link', {\n css: { color: t.muted, textDecoration: 'none' },\n states: { current: { color: t.foreground, fontWeight: 600 } }\n});\n\nconst main = styles('main', {\n flexGrow: 1,\n width: '100%',\n maxWidth: '1120px',\n margin: '0px auto',\n padding: '40px 24px'\n});\n\nconst footer = styles('site-footer', { padding: '24px', color: t.muted, fontSize: '14px', textAlign: 'center' });\n\n/** The menu: one entry per section — Products stays current on every product, which is under its path. */\nconst MENU = [\n { href: '/', label: 'Home', current: 'page' },\n { href: '/products', label: 'Products', current: 'section' }\n] as const;\n\nexport const layout: LayoutSpec = {\n id: 'site',\n body: [\n container({\n id: 'site-shell',\n class: shell,\n children: [\n container({\n id: 'site-header',\n subType: 'header',\n class: header,\n children: [\n link({ id: 'site-brand', href: '/', class: brand, content: 'Desk & Co.' }),\n container({\n id: 'site-nav',\n subType: 'nav',\n class: nav,\n children: MENU.map(entry =>\n link({\n href: entry.href,\n class: navLink,\n current: entry.current,\n content: entry.label\n })\n )\n })\n ]\n }),\n container({ id: 'site-main', subType: 'main', class: main }),\n container({\n id: 'site-footer',\n subType: 'footer',\n class: footer,\n children: [text('Demo content: the products and their prices are made up.')]\n })\n ]\n })\n ]\n};\n";
@@ -25020,7 +25322,10 @@ var layout_default = "/**\n * The chrome every page shares — a header with the
25020
25322
  var catalog_default = "/* eslint-disable quotes -- templates quote their own strings, and read best in the other quotes */\n/**\n * Every product, filtered by category: the select writes the choice to `state`, and the list shows only the rows\n * that match — with a count and an empty state read off the same predicate.\n */\nimport {\n apiContainer,\n container,\n formControl,\n heading,\n list,\n named,\n on,\n setState,\n styles,\n text\n} from '@plitzi/sdk-authoring';\n\nimport { CATEGORIES, PRODUCTS, productsSource } from '../data.ts';\nimport { t } from '../tokens.ts';\n\nimport type { PageSpec } from '@plitzi/sdk-authoring';\n\n/** The product grid, shared with the home page: a list is a `<ul>`, so the bullets and the indent go. */\nexport const grid = styles('product-grid', {\n desktop: {\n display: 'grid',\n gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',\n gap: 20,\n margin: '0px',\n padding: '0px',\n listStyleType: 'none'\n },\n tablet: { gridTemplateColumns: 'repeat(2, minmax(0, 1fr))' },\n mobile: { gridTemplateColumns: 'minmax(0, 1fr)' }\n});\n\nconst toolbar = styles('catalog-toolbar', {\n display: 'flex',\n alignItems: 'end',\n justifyContent: 'space-between',\n gap: 16,\n marginBottom: '24px'\n});\n\nconst muted = styles('muted', { color: t.muted });\n\n// One predicate, read three times: the rows, their count, and whether there are none.\nconst shown = \"source|filter(p => (state.category ?? 'all') == 'all' or p.category == state.category)\";\n\nconst products = productsSource('catalog-products');\n\nexport const catalog: PageSpec = {\n id: 'catalog',\n name: 'Products',\n slug: 'products',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n heading('Products', { id: 'catalog-title', subType: 'h1' }),\n apiContainer({\n id: products.id,\n ...PRODUCTS,\n cache: true,\n children: [\n container({\n id: 'catalog-toolbar',\n class: toolbar,\n children: [\n // A control outside a form keeps its own value and fires `onChange` with `{ value, name }`.\n formControl({\n id: 'catalog-category',\n name: 'category',\n label: 'Category',\n subType: 'select',\n options: [\n { label: 'Everything', value: 'all' },\n ...CATEGORIES.map(({ value, label }) => ({ value, label }))\n ],\n defaultValue: 'all',\n // A filter always has an answer: the select is not a question that must be filled in.\n required: false,\n flows: [\n [\n named('picked', on('onChange')),\n setState({ key: 'category', type: 'text', value: '{{ picked.value }}' })\n ]\n ]\n }),\n text({ id: 'catalog-count', class: muted, from: products.data.products, as: `{{ ${shown}|length }} shown` })\n ]\n }),\n list({\n id: 'catalog-list',\n class: grid,\n from: products.data.products,\n as: `{{ ${shown} }}`,\n row: 'product-card'\n }),\n text('Nothing in that category yet.', {\n id: 'catalog-empty',\n class: muted,\n visible: { source: products.data.products, template: `{{ source is defined and ${shown}|length == 0 }}` }\n })\n ]\n })\n ]\n};\n";
25021
25323
  //#endregion
25022
25324
  //#region templates/catalog/src/space/pages/home.ts?raw
25023
- var home_default = "/** The home page: what the shop is, and the first products of the file as a way in. */\nimport { apiContainer, container, heading, link, list, styles, text } from '@plitzi/sdk-authoring';\n\nimport { grid } from './catalog.ts';\nimport { PRODUCTS, productsSource } from '../data.ts';\nimport { t } from '../tokens.ts';\n\nimport type { PageSpec } from '@plitzi/sdk-authoring';\n\nconst hero = styles('hero', { display: 'flex', flexDirection: 'column', gap: 16, padding: '48px 0px' });\n\nconst lede = styles('lede', { margin: '0px', maxWidth: '560px', color: t.muted, fontSize: '18px' });\n\nconst cta = styles('cta', {\n css: {\n alignSelf: 'flex-start',\n padding: '10px 18px',\n borderRadius: '10px',\n backgroundColor: t.primary,\n color: t['on-primary'],\n fontWeight: 600,\n textDecoration: 'none'\n },\n states: { hover: { opacity: 0.9 } }\n});\n\nconst featured = productsSource('home-products');\n\nexport const home: PageSpec = {\n id: 'home',\n name: 'Home',\n slug: '',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n container({\n id: 'home-hero',\n subType: 'section',\n class: hero,\n children: [\n heading('Good things for a good desk', { id: 'home-title', subType: 'h1', css: { margin: '0px' } }),\n text('Lamps, paper and pens we would use ourselves.', { id: 'home-lede', class: lede }),\n link({ id: 'home-cta', href: '/products', class: cta, content: 'See every product' })\n ]\n }),\n apiContainer({\n id: featured.id,\n ...PRODUCTS,\n cache: true,\n children: [\n heading('Featured', { id: 'home-featured-title', subType: 'h2' }),\n list({\n id: 'home-featured',\n class: grid,\n from: featured.data.products,\n as: '{{ source|slice(0, 3) }}',\n row: 'product-card'\n })\n ]\n })\n ]\n};\n";
25325
+ var home_default = "/** The home page: what the shop is, and the first products of the file as a way in. */\nimport { apiContainer, container, heading, link, list, styles, text } from '@plitzi/sdk-authoring';\n\nimport { grid } from './catalog.ts';\nimport { PRODUCTS, productsSource } from '../data.ts';\nimport { t } from '../tokens.ts';\n\nimport type { PageSpec } from '@plitzi/sdk-authoring';\n\nexport const hero = styles('hero', { display: 'flex', flexDirection: 'column', gap: 16, padding: '48px 0px' });\n\nexport const lede = styles('lede', { margin: '0px', maxWidth: '560px', color: t.muted, fontSize: '18px' });\n\nexport const cta = styles('cta', {\n css: {\n alignSelf: 'flex-start',\n padding: '10px 18px',\n borderRadius: '10px',\n backgroundColor: t.primary,\n color: t['on-primary'],\n fontWeight: 600,\n textDecoration: 'none'\n },\n states: { hover: { opacity: 0.9 } }\n});\n\nconst featured = productsSource('home-products');\n\nexport const home: PageSpec = {\n id: 'home',\n name: 'Home',\n slug: '',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n container({\n id: 'home-hero',\n subType: 'section',\n class: hero,\n children: [\n heading('Good things for a good desk', { id: 'home-title', subType: 'h1', css: { margin: '0px' } }),\n text('Lamps, paper and pens we would use ourselves.', { id: 'home-lede', class: lede }),\n link({ id: 'home-cta', href: '/products', class: cta, content: 'See every product' })\n ]\n }),\n apiContainer({\n id: featured.id,\n ...PRODUCTS,\n cache: true,\n children: [\n heading('Featured', { id: 'home-featured-title', subType: 'h2' }),\n list({\n id: 'home-featured',\n class: grid,\n from: featured.data.products,\n as: '{{ source|slice(0, 3) }}',\n row: 'product-card'\n })\n ]\n })\n ]\n};\n";
25326
+ //#endregion
25327
+ //#region templates/catalog/src/space/pages/notFound.ts?raw
25328
+ var notFound_default = "/** The page of every address no other page answers — a mistyped link, a product taken down — sent with status 404. */\nimport { container, heading, link, text } from '@plitzi/sdk-authoring';\n\nimport { cta, hero, lede } from './home.ts';\n\nimport type { PageSpec } from '@plitzi/sdk-authoring';\n\nexport const notFound: PageSpec = {\n id: 'not-found',\n name: 'Not found',\n slug: '*',\n seoTitle: 'Page not found',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n container({\n id: 'not-found-hero',\n subType: 'section',\n class: hero,\n children: [\n heading('Nothing on this shelf', { id: 'not-found-title', subType: 'h1', css: { margin: '0px' } }),\n text('The page you asked for is not here — it may have moved, or the link has a typo.', {\n id: 'not-found-lede',\n class: lede\n }),\n link({ id: 'not-found-cta', href: '/products', class: cta, content: 'See every product' })\n ]\n })\n ]\n};\n";
25024
25329
  //#endregion
25025
25330
  //#region templates/catalog/src/space/pages/product.ts?raw
25026
25331
  var product_default = "/* eslint-disable quotes -- templates quote their own strings, and read best in the other quotes */\n/**\n * A page per product, at `/products/<slug>`: the same file, narrowed to the product the address names — and a message,\n * not an empty page, when no product has that name.\n */\nimport { apiContainer, container, heading, link, list, listItem, styles, text } from '@plitzi/sdk-authoring';\n\nimport { PRODUCTS, productsSource } from '../data.ts';\nimport { t } from '../tokens.ts';\n\nimport type { PageSpec } from '@plitzi/sdk-authoring';\n\nconst detail = styles('product-detail', { display: 'flex', flexDirection: 'column', gap: 12, maxWidth: '640px' });\n\nconst back = styles('back-link', { color: t.muted, textDecoration: 'none' });\n\nconst products = productsSource('product-data');\n\nexport const product: PageSpec = {\n id: 'product',\n name: 'Product',\n slug: 'products/:slug',\n layout: { id: 'site', slot: 'site-main' },\n body: [\n link({ id: 'product-back', href: '/products', class: back, content: '← All products' }),\n apiContainer({\n id: products.id,\n ...PRODUCTS,\n cache: true,\n children: [\n list({\n id: 'product-one',\n // A list is a `<ul>`: one product reads as a page, not as an indented item.\n css: { margin: '0px', padding: '0px', listStyleType: 'none' },\n from: products.data.products,\n as: '{{ source|filter(p => p.slug == navigation.routeParams.slug) }}',\n // Shown once the file answers with the product; the message below is the other side of the question.\n visible: {\n source: products.data.products,\n template: \"{{ source|find('slug', navigation.routeParams.slug) }}\"\n },\n row: r =>\n listItem({\n id: 'product-item',\n children: [\n container({\n id: 'product-detail',\n subType: 'article',\n class: detail,\n children: [\n heading({ id: 'product-title', subType: 'h1', from: `${r.item}.title` }),\n text({ id: 'product-summary', from: `${r.item}.summary` }),\n text({\n id: 'product-price',\n from: `${r.item}.price`,\n as: 'price',\n css: { fontSize: '24px', fontWeight: 700 }\n })\n ]\n })\n ]\n })\n }),\n text('No product by that name.', {\n id: 'product-missing',\n visible: {\n source: products.data.products,\n template: \"{{ source is defined and not (source|find('slug', navigation.routeParams.slug)) }}\"\n }\n })\n ]\n })\n ]\n};\n";
@@ -25070,16 +25375,21 @@ var blankTemplateFiles = ({ name, dir = "src/space", plugin } = {}) => {
25070
25375
  [`${dir}/index.ts`]: name === void 0 ? entry : renameSpace(entry, name),
25071
25376
  [`${dir}/tokens.ts`]: toPortableSource(tokens_default$1),
25072
25377
  [`${dir}/theme.ts`]: toPortableSource(theme_default),
25073
- [`${dir}/content.ts`]: toPortableSource(content_default)
25378
+ [`${dir}/content.ts`]: toPortableSource(content_default),
25379
+ [`${dir}/notFound.ts`]: toPortableSource(notFound_default$2)
25074
25380
  };
25075
25381
  };
25076
25382
  /**
25077
- * The space `plitzi create --template blank` starts from, as a file: tokens, a layout and one empty page — for a
25078
- * project about to be something specific, where the welcome tour is the first thing that would be deleted.
25383
+ * The space `plitzi create --template blank` starts from, as its files by path: tokens, a layout and one empty page —
25384
+ * for a project about to be something specific, where the welcome tour is the first thing that would be deleted —
25385
+ * and the page for an address nothing answers, beside it.
25079
25386
  */
25080
- var emptySpaceSource = ({ name } = {}) => {
25387
+ var emptyTemplateFiles = ({ name, dir = "src/space" } = {}) => {
25081
25388
  const portable = toPortableSource(spec_default);
25082
- return name === void 0 ? portable : renameSpace(portable, name, space);
25389
+ return {
25390
+ [`${dir}/index.ts`]: name === void 0 ? portable : renameSpace(portable, name, space),
25391
+ [`${dir}/notFound.ts`]: toPortableSource(notFound_default$1)
25392
+ };
25083
25393
  };
25084
25394
  /** The one line in the declaration a `custom` element is hung off — the hero, so it lands under its buttons. */
25085
25395
  var PLUGIN_ANCHOR = "children: [heroEyebrow, heroTitle, heroLede, heroActions]";
@@ -25292,6 +25602,7 @@ var catalogTemplateFiles = ({ name, mode = "server" } = {}) => {
25292
25602
  "src/space/pages/home.ts": home_default,
25293
25603
  "src/space/pages/catalog.ts": catalog_default,
25294
25604
  "src/space/pages/product.ts": product_default,
25605
+ "src/space/pages/notFound.ts": notFound_default,
25295
25606
  [client ? "public/data/products.json" : "src/data/products.json"]: products_default
25296
25607
  };
25297
25608
  return Object.fromEntries(Object.entries(files).map(([path, source]) => [path, source.replace(/^\/\* eslint-disable quotes[^\n]*\*\/\n/, "")]));
@@ -25626,6 +25937,7 @@ function probePage(input) {
25626
25937
  * scroll an inner pane and the document would then report no overflow whatever the page contained.
25627
25938
  */
25628
25939
  let overflow = null;
25940
+ const cutOff = [];
25629
25941
  if (input.overflow) {
25630
25942
  const viewport = document.documentElement.clientWidth;
25631
25943
  /**
@@ -25645,6 +25957,48 @@ function probePage(input) {
25645
25957
  for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) if (keepsOverflow(ancestor)) right = Math.min(right, ancestor.getBoundingClientRect().right);
25646
25958
  return right;
25647
25959
  };
25960
+ const visibleLeft = (node) => {
25961
+ let left = node.getBoundingClientRect().left;
25962
+ for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) if (keepsOverflow(ancestor)) left = Math.max(left, ancestor.getBoundingClientRect().left);
25963
+ return left;
25964
+ };
25965
+ /**
25966
+ * What is CUT at the screen's edge rather than scrolled to: a link, a control or words of the space's whose box runs
25967
+ * past the viewport while an ancestor hides the part that spills — a header whose last links fell off a phone, with
25968
+ * no sideways scroll to show for it, which read as a page with nothing wrong. Not inside a row a person scrolls on
25969
+ * purpose, nor anything a transform moves (a marquee, a carousel's track), nor what is not drawn.
25970
+ */
25971
+ const scrolledOnPurpose = (node) => {
25972
+ for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) {
25973
+ const { overflowX } = getComputedStyle(ancestor);
25974
+ const pageScroller = ancestor === document.documentElement || ancestor === document.body || ancestor.matches(".plitzi-sdk");
25975
+ if ((overflowX === "auto" || overflowX === "scroll") && !pageScroller) return true;
25976
+ }
25977
+ return false;
25978
+ };
25979
+ const moved = (node) => {
25980
+ for (let at = node; at; at = at.parentElement) {
25981
+ const { transform } = getComputedStyle(at);
25982
+ if (transform !== "none" && transform !== "") return true;
25983
+ }
25984
+ return false;
25985
+ };
25986
+ const saysSomething = (node) => node.matches("a, button, input, select, textarea, label") || [...node.childNodes].some((child) => child.nodeType === Node.TEXT_NODE && (child.textContent ?? "").trim() !== "");
25987
+ for (const node of document.querySelectorAll("[data-plitzi-el]")) {
25988
+ const box = node.getBoundingClientRect();
25989
+ if (box.width === 0 || box.height === 0 || !saysSomething(node)) continue;
25990
+ const outside = Math.max(box.right - viewport, -box.left);
25991
+ const hiddenPart = Math.max(box.right - visibleRight(node), visibleLeft(node) - box.left);
25992
+ if (outside <= 1 || hiddenPart <= 1 || !node.checkVisibility({
25993
+ opacityProperty: true,
25994
+ visibilityProperty: true
25995
+ }) || scrolledOnPurpose(node) || moved(node)) continue;
25996
+ const id = node.getAttribute("data-plitzi-el");
25997
+ if (id) cutOff.push({
25998
+ id,
25999
+ pixels: Math.round(Math.min(outside, hiddenPart))
26000
+ });
26001
+ }
25648
26002
  const wide = [...document.querySelectorAll("body *")].map((node) => ({
25649
26003
  node,
25650
26004
  right: visibleRight(node)
@@ -25657,9 +26011,48 @@ function probePage(input) {
25657
26011
  }
25658
26012
  const illegible = [];
25659
26013
  if (input.legibility) {
26014
+ /**
26015
+ * A computed colour as `[r, g, b, alpha]`, 0–255 and 0–1 — or `null` for one this cannot read, which is then not
26016
+ * judged rather than judged wrong. The browser answers in the space the colour was written in: `rgb()` for a hex or
26017
+ * a name, `color(srgb …)` for a `color-mix()`, `oklch()`/`oklab()` as written. Read as `rgb()`, the last two came out
26018
+ * near black, and a page every visitor could read was said to be unreadable.
26019
+ */
25660
26020
  const parse = (value) => {
25661
- const parts = value.match(/[\d.]+/g);
25662
- return parts && parts.length >= 3 ? [...parts.slice(0, 3).map(Number), parts.length > 3 ? Number(parts[3]) : 1] : null;
26021
+ const numbers = (value.match(/-?[\d.]+(?:e-?\d+)?%?/g) ?? []).map((part) => part.endsWith("%") ? Number(part.slice(0, -1)) / 100 : Number(part));
26022
+ const alpha = (at) => numbers.length > at ? numbers[at] : 1;
26023
+ const gamma = (linear) => 255 * Math.min(1, Math.max(0, linear <= .0031308 ? 12.92 * linear : 1.055 * linear ** (1 / 2.4) - .055));
26024
+ const fromOklab = (l, a, b, opacity) => {
26025
+ const [lc, mc, sc] = [
26026
+ (l + .3963377774 * a + .2158037573 * b) ** 3,
26027
+ (l - .1055613458 * a - .0638541728 * b) ** 3,
26028
+ (l - .0894841775 * a - 1.291485548 * b) ** 3
26029
+ ];
26030
+ return [
26031
+ gamma(4.0767416621 * lc - 3.3077115913 * mc + .2309699292 * sc),
26032
+ gamma(-1.2684380046 * lc + 2.6097574011 * mc - .3413193965 * sc),
26033
+ gamma(-.0041960863 * lc - .7034186147 * mc + 1.707614701 * sc),
26034
+ opacity
26035
+ ];
26036
+ };
26037
+ if (numbers.length < 3) return null;
26038
+ if (value.startsWith("rgb")) return [
26039
+ numbers[0],
26040
+ numbers[1],
26041
+ numbers[2],
26042
+ alpha(3)
26043
+ ];
26044
+ if (value.startsWith("color(srgb ")) return [
26045
+ numbers[0] * 255,
26046
+ numbers[1] * 255,
26047
+ numbers[2] * 255,
26048
+ alpha(3)
26049
+ ];
26050
+ if (value.startsWith("oklab(")) return fromOklab(numbers[0], numbers[1], numbers[2], alpha(3));
26051
+ if (value.startsWith("oklch(")) {
26052
+ const hue = numbers[2] * Math.PI / 180;
26053
+ return fromOklab(numbers[0], numbers[1] * Math.cos(hue), numbers[1] * Math.sin(hue), alpha(3));
26054
+ }
26055
+ return null;
25663
26056
  };
25664
26057
  /**
25665
26058
  * What is PAINTED under a point of the text, composited — or `null` when that cannot be known.
@@ -25709,17 +26102,52 @@ function probePage(input) {
25709
26102
  255
25710
26103
  ]);
25711
26104
  };
25712
- for (const node of document.querySelectorAll("[data-plitzi-el]")) {
25713
- const text = node.textContent.trim();
25714
- if (!text || node.children.length > 0 || !isVisible(node)) continue;
26105
+ /** WCAG's relative luminance of a colour, and the contrast between two: 1 is the same colour, 21 black on white. */
26106
+ const luminance = (colour) => {
26107
+ const [r, g, b] = colour.slice(0, 3).map((value) => {
26108
+ const channel = value / 255;
26109
+ return channel <= .03928 ? channel / 12.92 : ((channel + .055) / 1.055) ** 2.4;
26110
+ });
26111
+ return .2126 * r + .7152 * g + .0722 * b;
26112
+ };
26113
+ const contrastOf = (one, other) => {
26114
+ const [light, dark] = [luminance(one), luminance(other)].sort((a, b) => b - a);
26115
+ return (light + .05) / (dark + .05);
26116
+ };
26117
+ /**
26118
+ * Below this nobody reads it — far under what WCAG asks of body text (4.5:1), so a muted caption is not a finding;
26119
+ * text this close to what is behind it is a colour that was meant for the other theme.
26120
+ */
26121
+ const MIN_CONTRAST = 2;
26122
+ /**
26123
+ * Every element that draws words of its own on the space's page: the space's elements, and whatever a plugin draws
26124
+ * inside one of them — the part of a page that is often the most read, with colours of its own. Words hidden from a
26125
+ * screen reader (`aria-hidden`) are a decoration, and an SVG's are painted with `fill`, not `color`.
26126
+ */
26127
+ const writers = /* @__PURE__ */ new Set();
26128
+ const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
26129
+ for (let text = walker.nextNode(); text; text = walker.nextNode()) {
26130
+ const parent = text.parentElement;
26131
+ if (parent && text.textContent?.trim() && parent.closest("[data-plitzi-el]") && !parent.closest("svg, script, style, noscript, [aria-hidden=\"true\"]")) writers.add(parent);
26132
+ }
26133
+ for (const node of writers) {
26134
+ if (!isVisible(node)) continue;
26135
+ const words = [...node.childNodes].filter((child) => child.nodeType === Node.TEXT_NODE).map((child) => child.textContent ?? "").join(" ").trim();
25715
26136
  const ink = parse(getComputedStyle(node).color);
25716
26137
  const paper = ink ? behind(node) : null;
25717
26138
  if (!ink || !paper) continue;
25718
- const distance = Math.abs(ink[0] - paper[0]) + Math.abs(ink[1] - paper[1]) + Math.abs(ink[2] - paper[2]);
25719
- if (ink[3] === 0 || distance < 24) {
26139
+ const contrast = contrastOf([
26140
+ 0,
26141
+ 1,
26142
+ 2
26143
+ ].map((channel) => ink[channel] * ink[3] + paper[channel] * (1 - ink[3])), paper);
26144
+ if (contrast < MIN_CONTRAST) {
25720
26145
  const elementId = elementIdOf(node);
26146
+ const host = node.closest("[data-plitzi-el]");
26147
+ const name = node.hasAttribute("data-plitzi-el") || !host ? nameOf(node) : `${nameOf(host)} › ${nameOf(node)}`;
25721
26148
  illegible.push({
25722
- text: `${nameOf(node)}: "${text.slice(0, 40)}"`,
26149
+ text: `${name}: "${words.slice(0, 40)}"`,
26150
+ contrast: Math.round(contrast * 100) / 100,
25723
26151
  ...elementId === void 0 ? {} : { elementId }
25724
26152
  });
25725
26153
  }
@@ -25732,6 +26160,7 @@ function probePage(input) {
25732
26160
  byWidth,
25733
26161
  brokenImages,
25734
26162
  overflow,
26163
+ cutOff,
25735
26164
  illegible
25736
26165
  };
25737
26166
  }
@@ -25772,9 +26201,14 @@ var issuesOf = (expected, findings) => {
25772
26201
  ...about(elementId)
25773
26202
  })),
25774
26203
  ...sidewaysOf(findings.overflow),
25775
- ...findings.illegible.map(({ text, elementId }) => ({
26204
+ ...findings.cutOff.map(({ id, pixels }) => ({
26205
+ code: "cut-off",
26206
+ message: `${named(id)} is cut off at the edge of the screen by ${String(pixels)}px — an ancestor hides what spills past it, so nothing scrolls to it: let the row wrap, or give it room`,
26207
+ elementId: id
26208
+ })),
26209
+ ...findings.illegible.map(({ text, contrast, elementId }) => ({
25776
26210
  code: "illegible-text",
25777
- message: `text drawn in the colour behind it: ${text}`,
26211
+ message: `text that cannot be told from what is behind it — contrast ${String(contrast)}:1, where body text asks 4.5:1: ${text}. A colour meant for one theme, painted in the other, is the usual cause: read the space's tokens (\`var(--…)\`), never a fixed colour`,
25778
26212
  ...about(elementId)
25779
26213
  }))
25780
26214
  ];
@@ -26617,10 +27051,17 @@ var ELEMENT_CATALOGS = {
26617
27051
  * **Bindings.** A source may name the element alone and the prefix it publishes under is filled in — which
26618
27052
  * is the half an author cannot see, and is not always the element's own type.
26619
27053
  */
26620
- var authorSpace = (spec, options = {}) => authorSpace$1(spec, withPluginCatalogs({
26621
- ...ELEMENT_CATALOGS,
26622
- ...options
26623
- }));
27054
+ var authorSpace = (spec, options = {}) => {
27055
+ const notFound = withNotFoundPage(spec);
27056
+ const authored = authorSpace$1(notFound.spec, withPluginCatalogs({
27057
+ ...ELEMENT_CATALOGS,
27058
+ ...options
27059
+ }));
27060
+ return notFound.added ? {
27061
+ ...authored,
27062
+ suggestions: [...authored.suggestions, notFound.added]
27063
+ } : authored;
27064
+ };
26624
27065
  /**
26625
27066
  * `validateSpace`, holding this SDK's own catalogs — the same gate `authorSpace` puts its output through, for documents
26626
27067
  * written anywhere else: the builder saving through the API, an import, an agent's edit, a JSON edited by hand.
@@ -26684,4 +27125,4 @@ var validateSnippet = (snippet, options = {}) => validateSnippet$1(snippet, {
26684
27125
  ...options
26685
27126
  });
26686
27127
  //#endregion
26687
- export { GLOBAL_CALLBACK_BUILDERS as $, AUTHORING_CODES as $i, setState as $n, container as $r, isCssProperty as $t, unrollPage as A, defaultLabel as Ai, whenFailed as An, onScroll as Ar, className as At, blankSpace as B, groupBindings as Bi, authLogout as Bn, setFieldValue as Br, css as Bt, pageTexts as C, c$19 as Ca, tabContainerHeader as Ci, authoringCodesTable as Cn, onFlowError as Cr, unusedDeclarations as Ct, pageRegions as D, t$62 as Da, video as Di, flowStepIds as Dn, onLoad as Dr, column as Dt, diffPictures as E, s$22 as Ea, themeToggle as Ei, authorFlows as En, onKey as Er, tw as Et, readDevTools as F, GLOBAL_SOURCES as Fi, getUtility as Fn, reloadApi as Fr, modifierClassName as Ft, space as G, variantFrom as Gi, cycleState as Gn, e$32 as Gr, cssShorthands as Gt, catalogTemplateFiles as H, hiddenWhen as Hi, cancelServerAction as Hn, updateElement as Hr, sameBlocks as Ht, readDevToolsInPage as I, activeOn as Ii, SET_STATE_TYPES as In, resetForm as Ir, splitClassList as It, importSlug as J, actionSource as Ji, invalidateQueries as Jn, blockJsx as Jr, expandShorthandTraced as Jt, space$1 as K, visibleWhen as Ki, delay as Kn, apiContainer as Kr, expandShorthand as Kt, dataIssues as L, activeWhen as Li, addNotification as Ln, scrollBy as Lr, styles as Lt, inspectPage as M, element as Mi, whileRunning as Mn, openDialog as Mr, classRefs as Mt, onScreen as N, inferredLinkMode as Ni, BUILTIN_UTILITIES as Nn, openModal as Nr, isClassModifier as Nt, profilePictures as O, component as Oi, named$2 as On, onPageLoad as Or, grid as Ot, failedFlowText as P, COMPONENT_SOURCES as Pi, applyUtility as Pn, publishOn as Pr, isStyleDeclaration as Pt, EXPLAIN_KINDS as Q, scope as Qi, runServerAction as Qn, channel as Qr, cssPropertyName as Qt, answerAction as R, authorBinding as Ri, appendState as Rn, scrollIntoView as Rr, BREAKPOINTS$1 as Rt, compareTexts as S, s$20 as Sa, tabContainerBody as Si, flagSpecOf as Sn, onFlowEnd as Sr, suggestClassOverrides as St, comparePictures as T, r$36 as Ta, text$1 as Ti, authorFlow as Tn, onInterval as Tr, createTw as Tt, emptySpaceSource as U, resolveSource as Ui, clearState as Un, elementsFromManifest as Ur, toBlocks as Ut, blankTemplateFiles as V, hasVisibilityBinding as Vi, authRefreshDetails as Vn, toggleElement as Vr, isRuleSetSpec as Vt, toPortableSource as W, toBindingSpecs as Wi, copyToClipboard as Wn, withPluginCatalogs as Wr, toResponsive as Wt, importProbe as X, twig as Xi, navigate as Xn, carousel as Xr, cssNumberValue as Xt, importedFiles as Y, source as Yi, moveState as Yn, button$1 as Yr, shorthandLonghands as Yt, BUILDER_NAMES as Z, closest as Zi, removeState as Zn, carouselTrack as Zr, cssProperties as Zt, shortcutKey as _, t$60 as _a, paragraph as _i, instanceSelectorFor as _n, closeModal as _r, assertSnippetValid as _t, locateClasses as a, elementCallbacks as aa, fontAwesome as ai, notificationsCss as an, BUILTIN_GLOBAL_CALLBACKS as ar, SPACE_FIELDS as at, summariseRenders as b, i$26 as ba, svg as bi, selectorFor as bn, on as br, suggestSpace as bt, validateSnippet as c, elementLeafTypes as ca, heading as ci, i$2 as cn, e$15 as cr, specFromSpace as ct, i as d, elementSourceTypes as da, list$1 as di, r$4 as dn, carouselGoTo as dr, actionToSource as dt, AuthoringError as ea, custom$1 as ei, isCustomProperty as en, stepState as er, explain as et, o as f, elementTriggers as fa, listItem as fi, t$6 as fn, carouselNext as fr, withNamedIds as ft, pressShortcut as g, e$39 as ga, pagination as gi, buildHandles as gn, closeDialog as gr, transformerCatalog as gt, withElement as h, typeTriggerDefinitions as ha, nodeHtml as hi, slugify as hn, carouselPrevious as hr, suggestTransformer as ht, lintSpace as i, elementAttributeValues as ia, embed as ii, pageFamily as in, webHook as ir, ELEMENT_FIELDS as it, inspectDocument as j, defineElement as ji, whenSucceeded as jn, onSubmit as jr, classNames as jt, loadImages as k, defaultAttributes as ki, when as kn, onPointerDown as kr, row as kt, validateSpace as l, elementPartTypes as la, image as li, FIXABLE_CODES as ln, announceOn as lr, compareSpaces as lt, singlePageSpace as m, typeCallbackDefinitions as ma, modalContainer as mi, digest as mn, carouselPlay as mr, getTransformer as mt, authorSpace as n, isSuggestionCode as na, dropdown as ni, SpaceRefusedError as nn, toggleState as nr, explainList as nt, locateElements as o, elementCatalog as oa, form as oi, withNotificationsCss as on, applyBuiltinCallback as or, specToSource as ot, compactSvg as p, elementTypeNames as pa, markdown as pi, e$8 as pn, carouselPause as pr, BUILTIN_TRANSFORMERS as pt, darkScheme as q, withVisibility as qi, hostAction as qn, blockHtml as qr, expandShorthandPatch as qt, fixSpace as r, elementAncestorTypes as ra, dropdownPopup as ri, refusalOf as rn, twigTemplate as rr, explanationText as rt, planFixes as s, elementDefaultAttributes as sa, formControl as si, d$2 as sn, getGlobalCallback as sr, SCHEMA_SETTINGS as st, authorSnippet as t, authoringCodeEntry as ta, dialogContainer as ti, suggestCssProperty as tn, toggleInState as tr, explainKindOf as tt, a as u, elementSlots as ua, link as ui, n$6 as un, cancelApi as ur, actionSpecFromEntry as ut, openPage as v, elementAttributeNames as va, reference as vi, locate as vn, declaredCallback as vr, PAGE_SPEC_FIELDS as vt, alignPictures as w, n$45 as wa, tabContainerItem as wi, defineAction as wn, onFlowProgress as wr, tokens as wt, PAGE_TEXT_LIMIT as x, o$24 as xa, tabContainer as xi, flagGateOf as xn, onClick as xr, withoutQuieted as xt, inspectRenders as y, a$22 as ya, richText as yi, pathForSlug as yn, declaredTrigger as yr, assertSpaceValid as yt, CATALOG_TEMPLATE_IDENTITY as z, bindTemplate as zi, authLogin as zn, scrollTo as zr, STYLE_STATES as zt };
27128
+ export { GLOBAL_CALLBACK_BUILDERS as $, AUTHORING_CODES as $i, setState as $n, container as $r, isCssProperty as $t, unrollPage as A, defaultLabel as Ai, whenFailed as An, onScroll as Ar, className as At, blankSpace as B, groupBindings as Bi, authLogout as Bn, setFieldValue as Br, css as Bt, pageTexts as C, c$19 as Ca, tabContainerHeader as Ci, authoringCodesTable as Cn, onFlowError as Cr, unusedDeclarations as Ct, pageRegions as D, t$62 as Da, video as Di, flowStepIds as Dn, onLoad as Dr, column as Dt, diffPictures as E, s$23 as Ea, themeToggle as Ei, authorFlows as En, onKey as Er, tw as Et, readDevTools as F, GLOBAL_SOURCES as Fi, getUtility as Fn, reloadApi as Fr, modifierClassName as Ft, space as G, variantFrom as Gi, cycleState as Gn, e$33 as Gr, cssShorthands as Gt, catalogTemplateFiles as H, hiddenWhen as Hi, cancelServerAction as Hn, updateElement as Hr, sameBlocks as Ht, readDevToolsInPage as I, activeOn as Ii, SET_STATE_TYPES as In, resetForm as Ir, splitClassList as It, importSlug as J, actionSource as Ji, invalidateQueries as Jn, blockJsx as Jr, expandShorthandTraced as Jt, space$1 as K, visibleWhen as Ki, delay as Kn, apiContainer as Kr, expandShorthand as Kt, dataIssues as L, activeWhen as Li, addNotification as Ln, scrollBy as Lr, styles as Lt, inspectPage as M, element as Mi, whileRunning as Mn, openDialog as Mr, classRefs as Mt, onScreen as N, inferredLinkMode as Ni, BUILTIN_UTILITIES as Nn, openModal as Nr, isClassModifier as Nt, profilePictures as O, component as Oi, named$2 as On, onPageLoad as Or, grid as Ot, failedFlowText as P, COMPONENT_SOURCES as Pi, applyUtility as Pn, publishOn as Pr, isStyleDeclaration as Pt, EXPLAIN_KINDS as Q, scope as Qi, runServerAction as Qn, channel as Qr, cssPropertyName as Qt, answerAction as R, authorBinding as Ri, appendState as Rn, scrollIntoView as Rr, BREAKPOINTS$1 as Rt, compareTexts as S, s$21 as Sa, tabContainerBody as Si, flagSpecOf as Sn, onFlowEnd as Sr, suggestClassOverrides as St, comparePictures as T, r$35 as Ta, text$1 as Ti, authorFlow as Tn, onInterval as Tr, createTw as Tt, emptyTemplateFiles as U, resolveSource as Ui, clearState as Un, elementsFromManifest as Ur, toBlocks as Ut, blankTemplateFiles as V, hasVisibilityBinding as Vi, authRefreshDetails as Vn, toggleElement as Vr, isRuleSetSpec as Vt, toPortableSource as W, toBindingSpecs as Wi, copyToClipboard as Wn, withPluginCatalogs as Wr, toResponsive as Wt, importProbe as X, twig as Xi, navigate as Xn, carousel as Xr, cssNumberValue as Xt, importedFiles as Y, source as Yi, moveState as Yn, button$1 as Yr, shorthandLonghands as Yt, BUILDER_NAMES as Z, closest as Zi, removeState as Zn, carouselTrack as Zr, cssProperties as Zt, shortcutKey as _, t$60 as _a, paragraph as _i, instanceSelectorFor as _n, closeModal as _r, assertSnippetValid as _t, locateClasses as a, elementCallbacks as aa, fontAwesome as ai, notificationsCss as an, BUILTIN_GLOBAL_CALLBACKS as ar, SPACE_FIELDS as at, summariseRenders as b, i$27 as ba, svg as bi, selectorFor as bn, on as br, suggestSpace as bt, validateSnippet as c, elementLeafTypes as ca, heading as ci, i$2 as cn, e$16 as cr, specFromSpace as ct, i as d, elementSourceTypes as da, list$1 as di, r$4 as dn, carouselGoTo as dr, actionToSource as dt, AuthoringError as ea, custom$1 as ei, isCustomProperty as en, stepState as er, explain as et, o as f, elementTriggers as fa, listItem as fi, t$6 as fn, carouselNext as fr, withNamedIds as ft, pressShortcut as g, e$40 as ga, pagination as gi, buildHandles as gn, closeDialog as gr, transformerCatalog as gt, withElement as h, typeTriggerDefinitions as ha, nodeHtml as hi, slugify as hn, carouselPrevious as hr, suggestTransformer as ht, lintSpace as i, elementAttributeValues as ia, embed as ii, pageFamily as in, webHook as ir, ELEMENT_FIELDS as it, inspectDocument as j, defineElement as ji, whenSucceeded as jn, onSubmit as jr, classNames as jt, loadImages as k, defaultAttributes as ki, when as kn, onPointerDown as kr, row as kt, validateSpace as l, elementPartTypes as la, image as li, FIXABLE_CODES as ln, announceOn as lr, compareSpaces as lt, singlePageSpace as m, typeCallbackDefinitions as ma, modalContainer as mi, digest as mn, carouselPlay as mr, getTransformer as mt, authorSpace as n, isSuggestionCode as na, dropdown as ni, SpaceRefusedError as nn, toggleState as nr, explainList as nt, locateElements as o, elementCatalog as oa, form as oi, withNotificationsCss as on, applyBuiltinCallback as or, specToSource as ot, compactSvg as p, elementTypeNames as pa, markdown as pi, e$9 as pn, carouselPause as pr, BUILTIN_TRANSFORMERS as pt, darkScheme as q, withVisibility as qi, hostAction as qn, blockHtml as qr, expandShorthandPatch as qt, fixSpace as r, elementAncestorTypes as ra, dropdownPopup as ri, refusalOf as rn, twigTemplate as rr, explanationText as rt, planFixes as s, elementDefaultAttributes as sa, formControl as si, d$2 as sn, getGlobalCallback as sr, SCHEMA_SETTINGS as st, authorSnippet as t, authoringCodeEntry as ta, dialogContainer as ti, suggestCssProperty as tn, toggleInState as tr, explainKindOf as tt, a as u, elementSlots as ua, link as ui, n$6 as un, cancelApi as ur, actionSpecFromEntry as ut, openPage as v, elementAttributeNames as va, reference as vi, locate as vn, declaredCallback as vr, PAGE_SPEC_FIELDS as vt, alignPictures as w, n$45 as wa, tabContainerItem as wi, defineAction as wn, onFlowProgress as wr, tokens as wt, PAGE_TEXT_LIMIT as x, o$24 as xa, tabContainer as xi, flagGateOf as xn, onClick as xr, withoutQuieted as xt, inspectRenders as y, a$22 as ya, richText as yi, pathForSlug as yn, declaredTrigger as yr, assertSpaceValid as yt, CATALOG_TEMPLATE_IDENTITY as z, bindTemplate as zi, authLogin as zn, scrollTo as zr, STYLE_STATES as zt };