@plitzi/sdk-authoring 0.38.7 → 0.38.9

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,39 +11,49 @@ var __exportAll = (all, no_symbols) => {
11
11
  };
12
12
  //#endregion
13
13
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
14
- var e$41 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
15
- var t$63 = `(?:${e$41}|\\d+)`;
16
- var n$47 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$41}(?:\\.${t$63})*)\\s*\\]`;
17
- var r$37 = `${`${e$41}(?:${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$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$36 = `${`${e$42}(?:${n$47})*(?:\\??\\.${t$63}(?:${n$47})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
18
+ var i$28 = `\\{\\{\\s*${r$36}\\s*\\}\\}`;
19
+ var a$24 = `(?:${`\\{\\{\\{\\s*${r$36}\\s*\\}\\}\\}`}|${i$28})`;
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
30
30
  //#region ../sdk-shared/dist/authoring/paramSpec.mjs
31
- var t$62 = (e, t, n) => {
31
+ var t$62 = [
32
+ "text",
33
+ "textarea",
34
+ "select",
35
+ "boolean",
36
+ "number",
37
+ "scalar",
38
+ "json",
39
+ "elementIds"
40
+ ];
41
+ var n$45 = (e, t, n) => {
32
42
  let r = [];
33
43
  for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
34
44
  return r;
35
45
  };
36
- var n$45 = (e, t, n) => {
46
+ var r$35 = (e, t, n) => {
37
47
  let r = [];
38
48
  for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
39
49
  return r;
40
50
  };
41
- var r$36 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
42
- var i$27 = (t) => typeof t == "string" && n$46(t);
43
- var a$23 = (e, t) => {
51
+ var i$27 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
52
+ var a$23 = (t) => typeof t == "string" && n$46(t);
53
+ var o$25 = (e, t) => {
44
54
  switch (t.type) {
45
55
  case "boolean": return typeof e == "boolean";
46
- case "number": return typeof e == "number" || typeof e == "string" && r$36(e);
56
+ case "number": return typeof e == "number" || typeof e == "string" && i$27(e);
47
57
  case "select": return typeof e == "string" && (!t.options || t.options.includes(e));
48
58
  case "scalar": return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
49
59
  case "json": return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "object" && !!e;
@@ -53,12 +63,12 @@ var a$23 = (e, t) => {
53
63
  default: return !0;
54
64
  }
55
65
  };
56
- var o$25 = (e, t, n) => {
66
+ var s$23 = (e, t, n) => {
57
67
  let r = [];
58
- for (let [o, s] of Object.entries(n)) {
59
- let n = e[o];
60
- n === void 0 || i$27(n) || s.when && !s.when(t) || a$23(n, s) || r.push({
61
- key: o,
68
+ for (let [i, s] of Object.entries(n)) {
69
+ let n = e[i];
70
+ n === void 0 || a$23(n) || s.when && !s.when(t) || o$25(n, s) || r.push({
71
+ key: i,
62
72
  expected: s.type,
63
73
  got: n === null ? "null" : typeof n,
64
74
  ...s.options ? { options: s.options } : {}
@@ -66,7 +76,7 @@ var o$25 = (e, t, n) => {
66
76
  }
67
77
  return r;
68
78
  };
69
- var s$22 = (e, t, n) => {
79
+ var c$19 = (e, t, n) => {
70
80
  let r = {};
71
81
  for (let [i, a] of Object.entries(e)) (!n || i in t) && (r[i] = a);
72
82
  for (let [e, n] of Object.entries(t)) n.default === void 0 || r[e] !== void 0 || n.when && !n.when(r) || (r[e] = n.default);
@@ -74,21 +84,21 @@ var s$22 = (e, t, n) => {
74
84
  };
75
85
  //#endregion
76
86
  //#region ../sdk-shared/dist/helpers/scroll.mjs
77
- var e$40 = ["smooth", "auto"];
87
+ var e$41 = ["smooth", "auto"];
78
88
  var t$61 = [
79
89
  "start",
80
90
  "center",
81
91
  "end",
82
92
  "nearest"
83
93
  ];
84
- var s$21 = "onScroll";
94
+ var s$22 = "onScroll";
85
95
  //#endregion
86
96
  //#region ../sdk-shared/dist/authoring/elementCallbacks.mjs
87
- var r$35 = {
97
+ var r$34 = {
88
98
  type: "select",
89
99
  description: "How it moves: \"smooth\" glides there, \"auto\" jumps.",
90
100
  default: "smooth",
91
- options: [...e$40]
101
+ options: [...e$41]
92
102
  };
93
103
  var i$26 = {
94
104
  scrollBy: {
@@ -106,7 +116,7 @@ var i$26 = {
106
116
  description: "How far down, the same way; negative goes up.",
107
117
  default: ""
108
118
  },
109
- behavior: r$35
119
+ behavior: r$34
110
120
  }
111
121
  },
112
122
  scrollTo: {
@@ -124,7 +134,7 @@ var i$26 = {
124
134
  description: "Where down, the same way. Empty stays.",
125
135
  default: ""
126
136
  },
127
- behavior: r$35
137
+ behavior: r$34
128
138
  }
129
139
  },
130
140
  scrollIntoView: {
@@ -144,7 +154,7 @@ var i$26 = {
144
154
  default: "nearest",
145
155
  options: [...t$61]
146
156
  },
147
- behavior: r$35
157
+ behavior: r$34
148
158
  }
149
159
  }
150
160
  };
@@ -208,11 +218,11 @@ var a$22 = {
208
218
  ...i$26
209
219
  };
210
220
  var o$24 = (e) => Object.hasOwn(a$22, e) ? a$22[e] : void 0;
211
- var s$20 = (t, n) => {
221
+ var s$21 = (t, n) => {
212
222
  let r = o$24(t);
213
223
  return r ? {
214
224
  known: !0,
215
- params: s$22(n, r.params, r.strictParams)
225
+ params: c$19(n, r.params, r.strictParams)
216
226
  } : {
217
227
  known: !1,
218
228
  params: n
@@ -242,6 +252,7 @@ var elementAttributeNames = {
242
252
  "loadingSlot",
243
253
  "method",
244
254
  "mockData",
255
+ "notFound",
245
256
  "pageParam",
246
257
  "pagination",
247
258
  "query",
@@ -397,6 +408,7 @@ var elementAttributeNames = {
397
408
  list: [
398
409
  "itemKey",
399
410
  "items",
411
+ "label",
400
412
  "source",
401
413
  "subType"
402
414
  ],
@@ -713,7 +725,11 @@ var elementAttributeNames = {
713
725
  tabContainerBody: [],
714
726
  tabContainerHeader: [],
715
727
  tabContainerItem: [],
716
- text: ["content", "title"],
728
+ text: [
729
+ "content",
730
+ "decorative",
731
+ "title"
732
+ ],
717
733
  themeToggle: [
718
734
  "darkLabel",
719
735
  "lightLabel",
@@ -731,7 +747,7 @@ var elementAttributeNames = {
731
747
  };
732
748
  //#endregion
733
749
  //#region ../sdk-elements/dist/Element/helpers/elementConstants.mjs
734
- var e$39 = {
750
+ var e$40 = {
735
751
  onLoad: {
736
752
  action: "onLoad",
737
753
  title: "On Load",
@@ -903,7 +919,7 @@ var e$39 = {
903
919
  };
904
920
  //#endregion
905
921
  //#region ../sdk-shared/dist/authoring/declare.mjs
906
- var e$38 = () => (e) => e;
922
+ var e$39 = () => (e) => e;
907
923
  var t$60 = () => (e) => e;
908
924
  //#endregion
909
925
  //#region ../sdk-elements/dist/elements/advanced/BlockHtml/declaration.mjs
@@ -1145,16 +1161,16 @@ var n$44 = {
1145
1161
  "border-bottom-left-radius": "4px",
1146
1162
  "border-bottom-right-radius": "4px"
1147
1163
  };
1148
- var r$34 = t$60()({
1164
+ var r$33 = t$60()({
1149
1165
  type: "button",
1150
1166
  attributeValues: {
1151
- subType: e$38()([
1167
+ subType: e$39()([
1152
1168
  "button",
1153
1169
  "submit",
1154
1170
  "reset"
1155
1171
  ]),
1156
- contentPlacement: e$38()(["before", "after"]),
1157
- iconPlacement: e$38()(["before", "after"])
1172
+ contentPlacement: e$39()(["before", "after"]),
1173
+ iconPlacement: e$39()(["before", "after"])
1158
1174
  },
1159
1175
  content: {
1160
1176
  attributes: {
@@ -1224,7 +1240,7 @@ var r$34 = t$60()({
1224
1240
  //#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
1225
1241
  var n$43 = t$60()({
1226
1242
  type: "dropdown",
1227
- attributeValues: { popupPlacement: e$38()([
1243
+ attributeValues: { popupPlacement: e$39()([
1228
1244
  "left",
1229
1245
  "right",
1230
1246
  "top",
@@ -1359,7 +1375,7 @@ var t$54 = t$60()({
1359
1375
  //#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
1360
1376
  var n$42 = t$60()({
1361
1377
  type: "heading",
1362
- attributeValues: { subType: e$38()([
1378
+ attributeValues: { subType: e$39()([
1363
1379
  "h1",
1364
1380
  "h2",
1365
1381
  "h3",
@@ -1483,20 +1499,20 @@ var n$42 = t$60()({
1483
1499
  var n$41 = t$60()({
1484
1500
  type: "link",
1485
1501
  attributeValues: {
1486
- mode: e$38()([
1502
+ mode: e$39()([
1487
1503
  "page",
1488
1504
  "internal",
1489
1505
  "external"
1490
1506
  ]),
1491
- target: e$38()([
1507
+ target: e$39()([
1492
1508
  "self",
1493
1509
  "blank",
1494
1510
  "parent",
1495
1511
  "top"
1496
1512
  ]),
1497
- contentPlacement: e$38()(["before", "after"]),
1498
- iconPlacement: e$38()(["before", "after"]),
1499
- current: e$38()(["page", "section"])
1513
+ contentPlacement: e$39()(["before", "after"]),
1514
+ iconPlacement: e$39()(["before", "after"]),
1515
+ current: e$39()(["page", "section"])
1500
1516
  },
1501
1517
  content: {
1502
1518
  attributes: {
@@ -1674,7 +1690,7 @@ var t$52 = t$60()({
1674
1690
  //#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
1675
1691
  var n$40 = t$60()({
1676
1692
  type: "richText",
1677
- attributeValues: { format: e$38()([
1693
+ attributeValues: { format: e$39()([
1678
1694
  "html",
1679
1695
  "markdown",
1680
1696
  "text"
@@ -1813,9 +1829,9 @@ var n$39 = {
1813
1829
  "letter-spacing": "inherit",
1814
1830
  cursor: "pointer"
1815
1831
  };
1816
- var r$33 = t$60()({
1832
+ var r$32 = t$60()({
1817
1833
  type: "themeToggle",
1818
- attributeValues: { subType: e$38()(["switch", "segmented"]) },
1834
+ attributeValues: { subType: e$39()(["switch", "segmented"]) },
1819
1835
  triggers: { onThemeChange: {
1820
1836
  action: "onThemeChange",
1821
1837
  title: "On Theme Change",
@@ -1883,7 +1899,7 @@ var r$33 = t$60()({
1883
1899
  //#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
1884
1900
  var n$38 = t$60()({
1885
1901
  type: "form",
1886
- attributeValues: { method: e$38()(["get", "post"]) },
1902
+ attributeValues: { method: e$39()(["get", "post"]) },
1887
1903
  sourceType: "apiContainer",
1888
1904
  triggers: { onSubmit: {
1889
1905
  action: "onSubmit",
@@ -2015,7 +2031,7 @@ var n$37 = {
2015
2031
  outline: "none",
2016
2032
  position: "relative"
2017
2033
  };
2018
- var r$32 = {
2034
+ var r$31 = {
2019
2035
  ...n$37,
2020
2036
  "line-height": "20px"
2021
2037
  };
@@ -2037,7 +2053,7 @@ var o$23 = {
2037
2053
  color: "red",
2038
2054
  "margin-top": "4px"
2039
2055
  };
2040
- var s$19 = {
2056
+ var s$20 = {
2041
2057
  color: "red",
2042
2058
  "margin-left": "4px"
2043
2059
  };
@@ -2056,7 +2072,7 @@ var l$13 = {
2056
2072
  "padding-left": "0px",
2057
2073
  display: "block",
2058
2074
  ...c$18,
2059
- "background-color": "inherit",
2075
+ "background-color": "transparent",
2060
2076
  color: "inherit",
2061
2077
  "line-height": "inherit",
2062
2078
  "font-family": "inherit",
@@ -2077,7 +2093,7 @@ var u$13 = {
2077
2093
  cursor: "inherit",
2078
2094
  "box-shadow": "none"
2079
2095
  };
2080
- var d$13 = {
2096
+ var d$12 = {
2081
2097
  height: "100%",
2082
2098
  "margin-top": "0px",
2083
2099
  "margin-right": "0px",
@@ -2097,11 +2113,11 @@ var d$13 = {
2097
2113
  "font-weight": "inherit",
2098
2114
  cursor: "pointer"
2099
2115
  };
2100
- var f$11 = {
2116
+ var f$10 = {
2101
2117
  ...n$37,
2102
2118
  cursor: "pointer"
2103
2119
  };
2104
- var p$10 = {
2120
+ var p$11 = {
2105
2121
  height: "20px",
2106
2122
  width: "36px",
2107
2123
  "margin-top": "0px",
@@ -2131,7 +2147,7 @@ var p$10 = {
2131
2147
  appearance: "none",
2132
2148
  cursor: "pointer"
2133
2149
  };
2134
- var m$6 = (e, t, { field: n, icon: r } = {}) => ({
2150
+ var m$7 = (e, t, { field: n, icon: r } = {}) => ({
2135
2151
  name: e,
2136
2152
  displayMode: "desktop",
2137
2153
  style: {
@@ -2140,14 +2156,14 @@ var m$6 = (e, t, { field: n, icon: r } = {}) => ({
2140
2156
  ...n ? { field: { default: n } } : {},
2141
2157
  ...r ? { icon: { default: r } } : {},
2142
2158
  label: { default: a$21 },
2143
- requiredMark: { default: s$19 },
2159
+ requiredMark: { default: s$20 },
2144
2160
  error: { default: o$23 }
2145
2161
  }
2146
2162
  });
2147
2163
  var h$4 = { field: l$13 };
2148
2164
  var g$4 = t$60()({
2149
2165
  type: "formControl",
2150
- attributeValues: { subType: e$38()([
2166
+ attributeValues: { subType: e$39()([
2151
2167
  "text",
2152
2168
  "number",
2153
2169
  "email",
@@ -2186,7 +2202,7 @@ var g$4 = t$60()({
2186
2202
  autoFocus: !1,
2187
2203
  disabled: !1,
2188
2204
  options: [],
2189
- required: !0,
2205
+ required: !1,
2190
2206
  requiredMessage: "",
2191
2207
  minLength: 0,
2192
2208
  minLengthMessage: "",
@@ -2238,26 +2254,26 @@ var g$4 = t$60()({
2238
2254
  displayMode: "desktop",
2239
2255
  style: { base: { default: {} } },
2240
2256
  subTypes: {
2241
- hidden: m$6("Form Control Hidden", {}),
2242
- text: m$6("Form Control Text", r$32, h$4),
2243
- number: m$6("Form Control Number", r$32, h$4),
2244
- email: m$6("Form Control Email", r$32, h$4),
2245
- password: m$6("Form Control Password", r$32, {
2257
+ hidden: m$7("Form Control Hidden", {}),
2258
+ text: m$7("Form Control Text", r$31, h$4),
2259
+ number: m$7("Form Control Number", r$31, h$4),
2260
+ email: m$7("Form Control Email", r$31, h$4),
2261
+ password: m$7("Form Control Password", r$31, {
2246
2262
  ...h$4,
2247
- icon: d$13
2263
+ icon: d$12
2248
2264
  }),
2249
- search: m$6("Form Control Search", r$32, h$4),
2250
- url: m$6("Form Control URL", r$32, h$4),
2251
- tel: m$6("Form Control Phone", r$32, h$4),
2252
- date: m$6("Form Control Date", r$32, h$4),
2253
- time: m$6("Form Control Time", r$32, h$4),
2254
- color: m$6("Form Control Color", r$32, h$4),
2255
- textarea: m$6("Form Control Textarea", {
2256
- ...r$32,
2265
+ search: m$7("Form Control Search", r$31, h$4),
2266
+ url: m$7("Form Control URL", r$31, h$4),
2267
+ tel: m$7("Form Control Phone", r$31, h$4),
2268
+ date: m$7("Form Control Date", r$31, h$4),
2269
+ time: m$7("Form Control Time", r$31, h$4),
2270
+ color: m$7("Form Control Color", r$31, h$4),
2271
+ textarea: m$7("Form Control Textarea", {
2272
+ ...r$31,
2257
2273
  color: "inherit",
2258
2274
  resize: "vertical"
2259
2275
  }),
2260
- select: m$6("Form Control Select", f$11, { field: u$13 }),
2276
+ select: m$7("Form Control Select", f$10, { field: u$13 }),
2261
2277
  checkbox: {
2262
2278
  name: "Form Control Checkbox",
2263
2279
  displayMode: "desktop",
@@ -2270,7 +2286,7 @@ var g$4 = t$60()({
2270
2286
  "margin-right": "4px"
2271
2287
  } },
2272
2288
  label: { default: i$25 },
2273
- requiredMark: { default: s$19 },
2289
+ requiredMark: { default: s$20 },
2274
2290
  error: { default: o$23 }
2275
2291
  }
2276
2292
  },
@@ -2279,12 +2295,12 @@ var g$4 = t$60()({
2279
2295
  displayMode: "desktop",
2280
2296
  style: {
2281
2297
  base: { default: {} },
2282
- input: { default: p$10 },
2298
+ input: { default: p$11 },
2283
2299
  label: { default: {
2284
2300
  ...i$25,
2285
2301
  "align-items": "center"
2286
2302
  } },
2287
- requiredMark: { default: s$19 },
2303
+ requiredMark: { default: s$20 },
2288
2304
  error: { default: o$23 }
2289
2305
  }
2290
2306
  }
@@ -2297,7 +2313,7 @@ var g$4 = t$60()({
2297
2313
  //#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
2298
2314
  var n$36 = t$60()({
2299
2315
  type: "layoutContainer",
2300
- attributeValues: { subType: e$38()([
2316
+ attributeValues: { subType: e$39()([
2301
2317
  "div",
2302
2318
  "header",
2303
2319
  "footer",
@@ -2608,12 +2624,12 @@ var t$46 = t$60()({
2608
2624
  var n$35 = t$60()({
2609
2625
  type: "image",
2610
2626
  attributeValues: {
2611
- fetchPriority: e$38()([
2627
+ fetchPriority: e$39()([
2612
2628
  "high",
2613
2629
  "low",
2614
2630
  "auto"
2615
2631
  ]),
2616
- loadMode: e$38()([
2632
+ loadMode: e$39()([
2617
2633
  "auto",
2618
2634
  "eager",
2619
2635
  "lazy"
@@ -2768,7 +2784,7 @@ var t$44 = t$60()({
2768
2784
  var n$34 = t$60()({
2769
2785
  type: "apiContainer",
2770
2786
  attributeValues: {
2771
- subType: e$38()([
2787
+ subType: e$39()([
2772
2788
  "",
2773
2789
  "div",
2774
2790
  "header",
@@ -2781,19 +2797,19 @@ var n$34 = t$60()({
2781
2797
  "address",
2782
2798
  "figure"
2783
2799
  ]),
2784
- method: e$38()([
2800
+ method: e$39()([
2785
2801
  "get",
2786
2802
  "post",
2787
2803
  "put",
2788
2804
  "delete",
2789
2805
  "patch"
2790
2806
  ]),
2791
- credentials: e$38()([
2807
+ credentials: e$39()([
2792
2808
  "include",
2793
2809
  "omit",
2794
2810
  "same-origin"
2795
2811
  ]),
2796
- pagination: e$38()([
2812
+ pagination: e$39()([
2797
2813
  "none",
2798
2814
  "url",
2799
2815
  "append"
@@ -2906,7 +2922,7 @@ var n$34 = t$60()({
2906
2922
  definition: {
2907
2923
  label: "Api Container",
2908
2924
  type: "apiContainer",
2909
- 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.",
2925
+ 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.",
2910
2926
  items: [],
2911
2927
  bindings: {},
2912
2928
  styleSelectors: { base: "" },
@@ -2943,7 +2959,7 @@ var n$34 = t$60()({
2943
2959
  //#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
2944
2960
  var n$33 = t$60()({
2945
2961
  type: "channel",
2946
- attributeValues: { subType: e$38()([
2962
+ attributeValues: { subType: e$39()([
2947
2963
  "",
2948
2964
  "div",
2949
2965
  "section",
@@ -3224,10 +3240,10 @@ var n$32 = [
3224
3240
  "aside",
3225
3241
  "figure"
3226
3242
  ];
3227
- var r$31 = t$60()({
3243
+ var r$30 = t$60()({
3228
3244
  type: "container",
3229
3245
  attributeValues: {
3230
- subType: e$38()([
3246
+ subType: e$39()([
3231
3247
  "div",
3232
3248
  "header",
3233
3249
  "footer",
@@ -3251,7 +3267,7 @@ var r$31 = t$60()({
3251
3267
  "p",
3252
3268
  "span"
3253
3269
  ]),
3254
- live: e$38()([
3270
+ live: e$39()([
3255
3271
  "",
3256
3272
  "polite",
3257
3273
  "assertive"
@@ -3345,11 +3361,11 @@ var B = {
3345
3361
  ApiContainer: n$34,
3346
3362
  BlockHtml: t$59,
3347
3363
  BlockJsx: t$58,
3348
- Button: r$34,
3364
+ Button: r$33,
3349
3365
  Carousel: t$43,
3350
3366
  CarouselTrack: t$42,
3351
3367
  Channel: n$33,
3352
- Container: r$31,
3368
+ Container: r$30,
3353
3369
  Custom: t$57,
3354
3370
  DialogContainer: t$60()({
3355
3371
  type: "dialogContainer",
@@ -3552,8 +3568,8 @@ var B = {
3552
3568
  List: t$60()({
3553
3569
  type: "list",
3554
3570
  attributeValues: {
3555
- subType: e$38()(["ul", "ol"]),
3556
- source: e$38()(["none", "controlled"])
3571
+ subType: e$39()(["ul", "ol"]),
3572
+ source: e$39()(["none", "controlled"])
3557
3573
  },
3558
3574
  sourceType: "list",
3559
3575
  content: {
@@ -3853,8 +3869,8 @@ var B = {
3853
3869
  Pagination: t$60()({
3854
3870
  type: "pagination",
3855
3871
  attributeValues: {
3856
- mode: e$38()(["pages", "loadMore"]),
3857
- target: e$38()(["url", "interaction"])
3872
+ mode: e$39()(["pages", "loadMore"]),
3873
+ target: e$39()(["url", "interaction"])
3858
3874
  },
3859
3875
  triggers: { onPageChange: {
3860
3876
  action: "onPageChange",
@@ -4103,7 +4119,7 @@ var B = {
4103
4119
  }
4104
4120
  }),
4105
4121
  Text: t$51,
4106
- ThemeToggle: r$33,
4122
+ ThemeToggle: r$32,
4107
4123
  Video: t$44
4108
4124
  };
4109
4125
  //#endregion
@@ -4137,7 +4153,7 @@ var elementSourceTypes = Object.fromEntries(Object.values(declarations).filter((
4137
4153
  * element that fires it ever starts the flow — an `onSubmit` on a form's submit button is saved, looks right beside
4138
4154
  * the form, and never runs, which is how a working form reads as "forms do not work outside the builder".
4139
4155
  */
4140
- var elementTriggers = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, [...Object.keys(e$39), ...Object.keys(declaration.triggers ?? {})]]));
4156
+ var elementTriggers = Object.fromEntries(Object.values(declarations).map((declaration) => [declaration.type, [...Object.keys(e$40), ...Object.keys(declaration.triggers ?? {})]]));
4141
4157
  /** The triggers only some types fire, by action name — for a step builder that wants the title the builder shows. */
4142
4158
  var typeTriggerDefinitions = Object.fromEntries(Object.values(declarations).flatMap((declaration) => Object.entries(declaration.triggers ?? {})));
4143
4159
  /** The callbacks only some types answer to, by action name — with their params, for whatever explains or checks one. */
@@ -4673,6 +4689,16 @@ var AUTHORING_CODES = {
4673
4689
  means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's",
4674
4690
  fix: "put the provider on the page, around the instance, and hand the component its rows as a prop"
4675
4691
  },
4692
+ "not-found-in-browser": {
4693
+ kind: "refused",
4694
+ means: "`notFound` on a provider asked from the browser — its answer arrives after the page was sent with its status",
4695
+ fix: "`runtime: 'server'` on the provider, or `visible` on the page's \"not found\" part instead"
4696
+ },
4697
+ "not-found-not-a-template": {
4698
+ kind: "refused",
4699
+ means: "`notFound` that is not one `{{ expression }}` against the answer — never `true`, so never a 404",
4700
+ fix: "`notFound: '{{ source.found == false }}'`"
4701
+ },
4676
4702
  "server-data-in-browser": {
4677
4703
  kind: "refused",
4678
4704
  means: "a provider asking for the project's own data (`/data/…`, read by its server from `src/data/` and never served) from the browser",
@@ -4848,6 +4874,11 @@ var AUTHORING_CODES = {
4848
4874
  means: "a prop whose name a template cannot read as `props.x`",
4849
4875
  fix: "letters, digits and `_`"
4850
4876
  },
4877
+ "prop-type-unknown": {
4878
+ kind: "refused",
4879
+ means: "a prop declared with a type no editor offers and nothing checks a value against",
4880
+ fix: "one of text, textarea, select, boolean, number, scalar, json, elementIds — words are `text`"
4881
+ },
4851
4882
  "prop-unknown": {
4852
4883
  kind: "refused",
4853
4884
  means: "a prop the component does not declare, handed in or read",
@@ -5153,6 +5184,11 @@ var AUTHORING_CODES = {
5153
5184
  means: "a colour written out in a class where the space has a token of that value — it stays put in the dark scheme",
5154
5185
  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"
5155
5186
  },
5187
+ "not-found-page": {
5188
+ kind: "suggested",
5189
+ 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",
5190
+ fix: "a page whose slug is `'*'`: `{ id: 'not-found', name: 'Not found', slug: '*', layout: …, body: [...] }`"
5191
+ },
5156
5192
  "unused-component": {
5157
5193
  kind: "suggested",
5158
5194
  means: "a component no page, layout or other component places",
@@ -5352,7 +5388,7 @@ var twig = (parts, ...values) => parts.reduce((text, part, index) => {
5352
5388
  }, "");
5353
5389
  //#endregion
5354
5390
  //#region ../sdk-shared/dist/dataSource/globalSources.mjs
5355
- var e$37 = [
5391
+ var e$38 = [
5356
5392
  "variables",
5357
5393
  "navigation",
5358
5394
  "auth",
@@ -5362,7 +5398,7 @@ var e$37 = [
5362
5398
  "flags",
5363
5399
  "computed"
5364
5400
  ];
5365
- e$37.filter((e) => e !== "state" && e !== "computed");
5401
+ e$38.filter((e) => e !== "state" && e !== "computed");
5366
5402
  var n$28 = {
5367
5403
  navigation: {
5368
5404
  routeParams: "open",
@@ -5386,7 +5422,7 @@ var n$28 = {
5386
5422
  };
5387
5423
  //#endregion
5388
5424
  //#region ../sdk-shared/dist/helpers/twigWrapper/charClass.mjs
5389
- var e$36 = {
5425
+ var e$37 = {
5390
5426
  Tab: 9,
5391
5427
  Newline: 10,
5392
5428
  CarriageReturn: 13,
@@ -5422,24 +5458,24 @@ var e$36 = {
5422
5458
  LowerR: 114,
5423
5459
  LowerT: 116
5424
5460
  };
5425
- var t$33 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$36.Underscore;
5426
- var n$27 = (n) => t$33(n) || n >= e$36.Zero && n <= e$36.Nine;
5427
- var r$29 = (t) => n$27(t) || t === e$36.Minus;
5428
- var i$24 = (t) => t >= e$36.Zero && t <= e$36.Nine;
5429
- var a$20 = (t) => t === e$36.Space || t === e$36.Tab || t === e$36.Newline || t === e$36.CarriageReturn;
5461
+ var t$33 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$37.Underscore;
5462
+ var n$27 = (n) => t$33(n) || n >= e$37.Zero && n <= e$37.Nine;
5463
+ var r$28 = (t) => n$27(t) || t === e$37.Minus;
5464
+ var i$24 = (t) => t >= e$37.Zero && t <= e$37.Nine;
5465
+ var a$20 = (t) => t === e$37.Space || t === e$37.Tab || t === e$37.Newline || t === e$37.CarriageReturn;
5430
5466
  var o$22 = (e) => {
5431
5467
  let r = e.length;
5432
5468
  if (r === 0 || !t$33(e.charCodeAt(0))) return !1;
5433
5469
  for (let t = 1; t < r; t++) if (!n$27(e.charCodeAt(t))) return !1;
5434
5470
  return !0;
5435
5471
  };
5436
- var s$18 = (r) => {
5472
+ var s$19 = (r) => {
5437
5473
  let a = r.length;
5438
5474
  if (a === 0 || !t$33(r.charCodeAt(0))) return !1;
5439
5475
  let o = !1, s = !1;
5440
5476
  for (let c = 1; c < a; c++) {
5441
5477
  let a = r.charCodeAt(c);
5442
- if (a === e$36.Dot) {
5478
+ if (a === e$37.Dot) {
5443
5479
  if (o) return !1;
5444
5480
  o = !0, s = !1;
5445
5481
  continue;
@@ -5456,7 +5492,7 @@ var s$18 = (r) => {
5456
5492
  var c$17 = (e) => o$22(e);
5457
5493
  //#endregion
5458
5494
  //#region ../sdk-shared/dist/helpers/twigWrapper/Lexer/Lexer.mjs
5459
- var e$35 = (e) => {
5495
+ var e$36 = (e) => {
5460
5496
  let t = [], n = 0;
5461
5497
  for (; n < e.length;) {
5462
5498
  let r = e.indexOf("{{", n), i = e.indexOf("{%", n), a, o;
@@ -5508,11 +5544,11 @@ var e$35 = (e) => {
5508
5544
  };
5509
5545
  //#endregion
5510
5546
  //#region ../sdk-shared/dist/helpers/twigWrapper/Lexer/types.mjs
5511
- var e$34 = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`;
5547
+ var e$35 = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`;
5512
5548
  var t$32 = (t) => {
5513
5549
  switch (t.type) {
5514
5550
  case "text": return t.value;
5515
- case "variable": return e$34(t.content, t.raw);
5551
+ case "variable": return e$35(t.content, t.raw);
5516
5552
  case "tag": return `{%${t.content}%}`;
5517
5553
  }
5518
5554
  };
@@ -5539,7 +5575,7 @@ var o$21 = class {
5539
5575
  }
5540
5576
  scanName() {
5541
5577
  let e = this.pos;
5542
- if (!this.eof() && t$33(this.src.charCodeAt(this.pos))) for (this.pos++; !this.eof() && r$29(this.src.charCodeAt(this.pos));) this.pos++;
5578
+ if (!this.eof() && t$33(this.src.charCodeAt(this.pos))) for (this.pos++; !this.eof() && r$28(this.src.charCodeAt(this.pos));) this.pos++;
5543
5579
  return this.src.slice(e, this.pos);
5544
5580
  }
5545
5581
  scanIndex() {
@@ -5551,17 +5587,17 @@ var o$21 = class {
5551
5587
  let t = this.src.charCodeAt(this.pos);
5552
5588
  this.pos++;
5553
5589
  let n = "";
5554
- for (; this.pos < this.src.length && this.src.charCodeAt(this.pos) !== t;) if (this.src.charCodeAt(this.pos) === e$36.Backslash && this.pos + 1 < this.src.length) {
5590
+ 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) {
5555
5591
  this.pos++;
5556
5592
  let r = this.src.charCodeAt(this.pos);
5557
- r === e$36.LowerN ? n += "\n" : r === e$36.LowerT ? n += " " : r === e$36.LowerR ? n += "\r" : r === e$36.Backslash ? n += "\\" : n += r === t ? String.fromCharCode(r) : String.fromCharCode(e$36.Backslash) + String.fromCharCode(r), this.pos++;
5593
+ 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++;
5558
5594
  } else n += this.src[this.pos], this.pos++;
5559
5595
  return this.pos < this.src.length && this.pos++, n;
5560
5596
  }
5561
5597
  scanNumber() {
5562
5598
  let n = this.pos;
5563
- for (this.src.charCodeAt(this.pos) === e$36.Minus && this.pos++; this.pos < this.src.length && i$24(this.src.charCodeAt(this.pos));) this.pos++;
5564
- if (this.src.charCodeAt(this.pos) === e$36.Dot) for (this.pos++; this.pos < this.src.length && i$24(this.src.charCodeAt(this.pos));) this.pos++;
5599
+ 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++;
5600
+ 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++;
5565
5601
  return Number(this.src.slice(n, this.pos));
5566
5602
  }
5567
5603
  matchKeyword(e) {
@@ -5573,28 +5609,28 @@ var o$21 = class {
5573
5609
  matchBinaryOp() {
5574
5610
  this.skipWs();
5575
5611
  let t = this.peek();
5576
- if (this.at(1) === e$36.Equals) {
5577
- if (t === e$36.Equals) return this.pos += 2, "==";
5578
- if (t === e$36.Bang) return this.pos += 2, "!=";
5579
- if (t === e$36.Greater) return this.pos += 2, ">=";
5580
- if (t === e$36.Less) return this.pos += 2, "<=";
5612
+ if (this.at(1) === e$37.Equals) {
5613
+ if (t === e$37.Equals) return this.pos += 2, "==";
5614
+ if (t === e$37.Bang) return this.pos += 2, "!=";
5615
+ if (t === e$37.Greater) return this.pos += 2, ">=";
5616
+ if (t === e$37.Less) return this.pos += 2, "<=";
5581
5617
  }
5582
- return t === e$36.Greater ? (this.pos++, ">") : t === e$36.Less ? (this.pos++, "<") : null;
5618
+ return t === e$37.Greater ? (this.pos++, ">") : t === e$37.Less ? (this.pos++, "<") : null;
5583
5619
  }
5584
5620
  };
5585
5621
  //#endregion
5586
5622
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs
5587
- var r$28 = (e, t) => {
5588
- let n = new s$17(e, t), r = n.parseTernary();
5623
+ var r$27 = (e, t) => {
5624
+ let n = new s$18(e, t), r = n.parseTernary();
5589
5625
  return n.expectEnd(), r;
5590
5626
  };
5591
5627
  var i$23 = (e, t) => {
5592
- let n = new s$17(e, t), r = n.parseApplyChain();
5628
+ let n = new s$18(e, t), r = n.parseApplyChain();
5593
5629
  return n.expectEnd(), r;
5594
5630
  };
5595
5631
  var a$19 = ["same as", "divisible by"];
5596
5632
  var o$20 = "`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`.";
5597
- var s$17 = class extends o$21 {
5633
+ var s$18 = class extends o$21 {
5598
5634
  issues;
5599
5635
  constructor(e, t) {
5600
5636
  super(e), this.issues = t;
@@ -5614,15 +5650,15 @@ var s$17 = class extends o$21 {
5614
5650
  }
5615
5651
  parseTernary() {
5616
5652
  let t = this.parseOr();
5617
- if (this.skipWs(), this.peek() !== e$36.Question) return t;
5618
- if (this.pos++, this.skipWs(), this.peek() === e$36.Colon) return this.pos++, this.skipWs(), {
5653
+ if (this.skipWs(), this.peek() !== e$37.Question) return t;
5654
+ if (this.pos++, this.skipWs(), this.peek() === e$37.Colon) return this.pos++, this.skipWs(), {
5619
5655
  type: "ternary",
5620
5656
  condition: t,
5621
5657
  trueExpr: null,
5622
5658
  falseExpr: this.parseTernary()
5623
5659
  };
5624
5660
  let n = this.parseOr();
5625
- return this.skipWs(), this.peek() === e$36.Colon ? (this.pos++, this.skipWs(), {
5661
+ return this.skipWs(), this.peek() === e$37.Colon ? (this.pos++, this.skipWs(), {
5626
5662
  type: "ternary",
5627
5663
  condition: t,
5628
5664
  trueExpr: n,
@@ -5708,7 +5744,7 @@ var s$17 = class extends o$21 {
5708
5744
  return this.pos = this.src.length, {
5709
5745
  type: "unary",
5710
5746
  operator: "not",
5711
- operand: r$28(t, this.issues)
5747
+ operand: r$27(t, this.issues)
5712
5748
  };
5713
5749
  }
5714
5750
  if (this.matchKeyword("in")) {
@@ -5774,7 +5810,7 @@ var s$17 = class extends o$21 {
5774
5810
  }
5775
5811
  parseConcat() {
5776
5812
  let t = this.parseAdditive();
5777
- for (this.skipWs(); this.peek() === e$36.Tilde;) {
5813
+ for (this.skipWs(); this.peek() === e$37.Tilde;) {
5778
5814
  this.pos++;
5779
5815
  let e = this.parseAdditive();
5780
5816
  t = t.type === "concat" ? {
@@ -5790,9 +5826,9 @@ var s$17 = class extends o$21 {
5790
5826
  parseAdditive() {
5791
5827
  let t = this.parseMultiplicative();
5792
5828
  this.skipWs();
5793
- for (let n = this.peek(); n === e$36.Plus || n === e$36.Minus; n = this.peek()) this.pos++, t = {
5829
+ for (let n = this.peek(); n === e$37.Plus || n === e$37.Minus; n = this.peek()) this.pos++, t = {
5794
5830
  type: "binary",
5795
- operator: n === e$36.Plus ? "+" : "-",
5831
+ operator: n === e$37.Plus ? "+" : "-",
5796
5832
  left: t,
5797
5833
  right: this.parseMultiplicative()
5798
5834
  }, this.skipWs();
@@ -5801,11 +5837,11 @@ var s$17 = class extends o$21 {
5801
5837
  parseMultiplicative() {
5802
5838
  let t = this.parsePower();
5803
5839
  this.skipWs();
5804
- for (let n = this.peek(); (n === e$36.Star || n === e$36.Slash || n === e$36.Percent) && (n !== e$36.Star || this.at(1) !== e$36.Star); n = this.peek()) {
5805
- let r = n === e$36.Slash && this.at(1) === e$36.Slash;
5840
+ 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()) {
5841
+ let r = n === e$37.Slash && this.at(1) === e$37.Slash;
5806
5842
  this.pos += r ? 2 : 1, t = {
5807
5843
  type: "binary",
5808
- operator: r ? "//" : n === e$36.Star ? "*" : n === e$36.Slash ? "/" : "%",
5844
+ operator: r ? "//" : n === e$37.Star ? "*" : n === e$37.Slash ? "/" : "%",
5809
5845
  left: t,
5810
5846
  right: this.parsePower()
5811
5847
  }, this.skipWs();
@@ -5814,7 +5850,7 @@ var s$17 = class extends o$21 {
5814
5850
  }
5815
5851
  parsePower() {
5816
5852
  let t = this.parseDefault();
5817
- return this.skipWs(), this.peek() !== e$36.Star || this.at(1) !== e$36.Star ? t : (this.pos += 2, {
5853
+ return this.skipWs(), this.peek() !== e$37.Star || this.at(1) !== e$37.Star ? t : (this.pos += 2, {
5818
5854
  type: "binary",
5819
5855
  operator: "**",
5820
5856
  left: t,
@@ -5822,27 +5858,27 @@ var s$17 = class extends o$21 {
5822
5858
  });
5823
5859
  }
5824
5860
  parseSignedAtom() {
5825
- return this.peek() === e$36.Minus && i$24(this.at(1)) ? this.maybeTrailingFilters({
5861
+ return this.peek() === e$37.Minus && i$24(this.at(1)) ? this.maybeTrailingFilters({
5826
5862
  type: "literal",
5827
5863
  value: this.scanNumber()
5828
- }) : this.peek() === e$36.Minus ? (this.pos++, this.skipWs(), {
5864
+ }) : this.peek() === e$37.Minus ? (this.pos++, this.skipWs(), {
5829
5865
  type: "unary",
5830
5866
  operator: "-",
5831
5867
  operand: this.parseSignedAtom()
5832
5868
  }) : this.parseAtom();
5833
5869
  }
5834
5870
  parseDefault() {
5835
- if (this.skipWs(), this.peek() === e$36.Minus && i$24(this.at(1))) return this.maybeTrailingFilters({
5871
+ if (this.skipWs(), this.peek() === e$37.Minus && i$24(this.at(1))) return this.maybeTrailingFilters({
5836
5872
  type: "literal",
5837
5873
  value: this.scanNumber()
5838
5874
  });
5839
- if (this.peek() === e$36.Minus) return this.pos++, {
5875
+ if (this.peek() === e$37.Minus) return this.pos++, {
5840
5876
  type: "unary",
5841
5877
  operator: "-",
5842
5878
  operand: this.parseDefault()
5843
5879
  };
5844
5880
  let n = this.parseAtom();
5845
- for (this.skipWs(); this.peek() === e$36.Question && this.at(1) === e$36.Question;) this.pos += 2, this.skipWs(), n = {
5881
+ for (this.skipWs(); this.peek() === e$37.Question && this.at(1) === e$37.Question;) this.pos += 2, this.skipWs(), n = {
5846
5882
  type: "default",
5847
5883
  value: n,
5848
5884
  defaultExpr: this.parseSignedAtom()
@@ -5852,7 +5888,7 @@ var s$17 = class extends o$21 {
5852
5888
  parseAtom() {
5853
5889
  this.skipWs();
5854
5890
  let n = this.peek();
5855
- if (n === e$36.LParen) {
5891
+ if (n === e$37.LParen) {
5856
5892
  this.pos++, this.skipWs();
5857
5893
  let t = this.pos, n = this.tryParseArrowParams();
5858
5894
  if (n !== null) return this.maybeTrailingFilters({
@@ -5862,9 +5898,9 @@ var s$17 = class extends o$21 {
5862
5898
  });
5863
5899
  this.pos = t;
5864
5900
  let r = this.parseTernary();
5865
- return this.expectChar(e$36.RParen, "a closing \")\""), this.maybeTrailingFilters(this.parseAccessChain(r, null));
5901
+ return this.expectChar(e$37.RParen, "a closing \")\""), this.maybeTrailingFilters(this.parseAccessChain(r, null));
5866
5902
  }
5867
- if (n === e$36.SingleQuote || n === e$36.DoubleQuote) return this.maybeTrailingFilters({
5903
+ if (n === e$37.SingleQuote || n === e$37.DoubleQuote) return this.maybeTrailingFilters({
5868
5904
  type: "literal",
5869
5905
  value: this.scanStringLiteral()
5870
5906
  });
@@ -5872,28 +5908,28 @@ var s$17 = class extends o$21 {
5872
5908
  type: "literal",
5873
5909
  value: this.scanNumber()
5874
5910
  });
5875
- if (n === e$36.LBracket) {
5911
+ if (n === e$37.LBracket) {
5876
5912
  this.pos++;
5877
5913
  let t = {
5878
5914
  type: "array",
5879
- elements: this.parseArgList(e$36.RBracket)
5915
+ elements: this.parseArgList(e$37.RBracket)
5880
5916
  };
5881
5917
  return this.maybeTrailingFilters(this.parseAccessChain(t, null));
5882
5918
  }
5883
- return n === e$36.LBrace ? (this.pos++, this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(), null))) : this.parsePathOrFunctionOrArrow();
5919
+ return n === e$37.LBrace ? (this.pos++, this.maybeTrailingFilters(this.parseAccessChain(this.parseObjectLiteral(), null))) : this.parsePathOrFunctionOrArrow();
5884
5920
  }
5885
5921
  tryParseArrowParams() {
5886
5922
  let t = this.pos, n = [];
5887
- for (this.skipWs(); this.peek() !== e$36.RParen;) {
5923
+ for (this.skipWs(); this.peek() !== e$37.RParen;) {
5888
5924
  let r = this.scanName();
5889
5925
  if (!r) return this.pos = t, null;
5890
- if (n.push(r), this.skipWs(), this.peek() === e$36.Comma) {
5926
+ if (n.push(r), this.skipWs(), this.peek() === e$37.Comma) {
5891
5927
  this.pos++, this.skipWs();
5892
5928
  continue;
5893
5929
  }
5894
5930
  break;
5895
5931
  }
5896
- return this.skipWs(), this.peek() === e$36.RParen && (this.pos++, this.skipWs(), this.peek() === e$36.Equals && this.at(1) === e$36.Greater) ? (this.pos += 2, n) : (this.pos = t, null);
5932
+ 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);
5897
5933
  }
5898
5934
  parsePathOrFunctionOrArrow() {
5899
5935
  let t = this.scanName();
@@ -5909,14 +5945,14 @@ var s$17 = class extends o$21 {
5909
5945
  type: "literal",
5910
5946
  value: null
5911
5947
  });
5912
- if (this.skipWs(), this.peek() === e$36.Equals && this.at(1) === e$36.Greater) return this.pos += 2, this.maybeTrailingFilters({
5948
+ if (this.skipWs(), this.peek() === e$37.Equals && this.at(1) === e$37.Greater) return this.pos += 2, this.maybeTrailingFilters({
5913
5949
  type: "arrow",
5914
5950
  params: [t],
5915
5951
  body: this.parseTernary()
5916
5952
  });
5917
- if (this.peek() === e$36.LParen) {
5953
+ if (this.peek() === e$37.LParen) {
5918
5954
  this.pos++;
5919
- let n = this.parseArgList(e$36.RParen);
5955
+ let n = this.parseArgList(e$37.RParen);
5920
5956
  return this.maybeTrailingFilters(this.parseAccessChain({
5921
5957
  type: "function",
5922
5958
  name: t,
@@ -5933,7 +5969,7 @@ var s$17 = class extends o$21 {
5933
5969
  let r = t, i = n;
5934
5970
  for (;;) {
5935
5971
  let t = this.peek();
5936
- if (t === e$36.Dot) {
5972
+ if (t === e$37.Dot) {
5937
5973
  let e = this.pos;
5938
5974
  this.pos++;
5939
5975
  let t = this.scanName() || this.scanIndex();
@@ -5951,10 +5987,10 @@ var s$17 = class extends o$21 {
5951
5987
  };
5952
5988
  continue;
5953
5989
  }
5954
- if (t !== e$36.LBracket) break;
5990
+ if (t !== e$37.LBracket) break;
5955
5991
  this.pos++;
5956
5992
  let n = this.parseTernary();
5957
- if (this.expectChar(e$36.RBracket, "a closing \"]\""), i && n.type === "literal" && (typeof n.value == "string" || typeof n.value == "number")) {
5993
+ if (this.expectChar(e$37.RBracket, "a closing \"]\""), i && n.type === "literal" && (typeof n.value == "string" || typeof n.value == "number")) {
5958
5994
  i.push(String(n.value));
5959
5995
  continue;
5960
5996
  }
@@ -5973,7 +6009,7 @@ var s$17 = class extends o$21 {
5973
6009
  } : r;
5974
6010
  }
5975
6011
  maybeTrailingFilters(t) {
5976
- return this.skipWs(), this.peek() === e$36.Pipe ? {
6012
+ return this.skipWs(), this.peek() === e$37.Pipe ? {
5977
6013
  type: "filter",
5978
6014
  subject: t,
5979
6015
  filters: this.parseTrailingFilters()
@@ -5981,21 +6017,21 @@ var s$17 = class extends o$21 {
5981
6017
  }
5982
6018
  parseObjectLiteral() {
5983
6019
  let t = [];
5984
- for (this.skipWs(); !this.eof() && this.peek() !== e$36.RBrace;) {
6020
+ for (this.skipWs(); !this.eof() && this.peek() !== e$37.RBrace;) {
5985
6021
  let n = this.parseObjectKey();
5986
- this.skipWs(), this.peek() === e$36.Colon && this.pos++, this.skipWs(), t.push({
6022
+ this.skipWs(), this.peek() === e$37.Colon && this.pos++, this.skipWs(), t.push({
5987
6023
  key: n,
5988
6024
  value: this.parseTernary()
5989
- }), this.skipWs(), this.peek() === e$36.Comma && (this.pos++, this.skipWs());
6025
+ }), this.skipWs(), this.peek() === e$37.Comma && (this.pos++, this.skipWs());
5990
6026
  }
5991
- return this.expectChar(e$36.RBrace, "a closing \"}\""), {
6027
+ return this.expectChar(e$37.RBrace, "a closing \"}\""), {
5992
6028
  type: "object",
5993
6029
  entries: t
5994
6030
  };
5995
6031
  }
5996
6032
  parseObjectKey() {
5997
6033
  let n = this.peek();
5998
- if (n === e$36.SingleQuote || n === e$36.DoubleQuote) return {
6034
+ if (n === e$37.SingleQuote || n === e$37.DoubleQuote) return {
5999
6035
  type: "literal",
6000
6036
  value: this.scanStringLiteral()
6001
6037
  };
@@ -6003,10 +6039,10 @@ var s$17 = class extends o$21 {
6003
6039
  type: "literal",
6004
6040
  value: this.scanNumber()
6005
6041
  };
6006
- if (n === e$36.LParen) {
6042
+ if (n === e$37.LParen) {
6007
6043
  this.pos++, this.skipWs();
6008
6044
  let t = this.parseTernary();
6009
- return this.skipWs(), this.peek() === e$36.RParen && this.pos++, t;
6045
+ return this.skipWs(), this.peek() === e$37.RParen && this.pos++, t;
6010
6046
  }
6011
6047
  return {
6012
6048
  type: "literal",
@@ -6015,25 +6051,25 @@ var s$17 = class extends o$21 {
6015
6051
  }
6016
6052
  parseArgList(t) {
6017
6053
  let n = [];
6018
- for (this.skipWs(); !this.eof() && this.peek() !== t;) n.push(this.parseTernary()), this.skipWs(), this.peek() === e$36.Comma && (this.pos++, this.skipWs());
6019
- return this.expectChar(t, t === e$36.RParen ? "a closing \")\"" : "a closing \"]\""), n;
6054
+ for (this.skipWs(); !this.eof() && this.peek() !== t;) n.push(this.parseTernary()), this.skipWs(), this.peek() === e$37.Comma && (this.pos++, this.skipWs());
6055
+ return this.expectChar(t, t === e$37.RParen ? "a closing \")\"" : "a closing \"]\""), n;
6020
6056
  }
6021
6057
  parseTrailingFilters() {
6022
6058
  let t = [];
6023
- for (; this.peek() === e$36.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6059
+ for (; this.peek() === e$37.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6024
6060
  return t;
6025
6061
  }
6026
6062
  parseApplyChain() {
6027
6063
  this.skipWs();
6028
6064
  let t = [this.readFilter()];
6029
- for (this.skipWs(); this.peek() === e$36.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6065
+ for (this.skipWs(); this.peek() === e$37.Pipe;) this.pos++, this.skipWs(), t.push(this.readFilter()), this.skipWs();
6030
6066
  return t;
6031
6067
  }
6032
6068
  readFilter() {
6033
6069
  let t = this.scanName();
6034
- return t || this.report(`A "|" with no filter name after it in "${this.src.trim()}"`), this.skipWs(), this.peek() === e$36.LParen ? (this.pos++, {
6070
+ return t || this.report(`A "|" with no filter name after it in "${this.src.trim()}"`), this.skipWs(), this.peek() === e$37.LParen ? (this.pos++, {
6035
6071
  name: t,
6036
- args: this.parseArgList(e$36.RParen)
6072
+ args: this.parseArgList(e$37.RParen)
6037
6073
  }) : {
6038
6074
  name: t,
6039
6075
  args: []
@@ -6047,20 +6083,20 @@ var n$26 = (e) => {
6047
6083
  for (; n < e.length && !a$20(e.charCodeAt(n));) n++;
6048
6084
  return e.slice(0, n);
6049
6085
  };
6050
- var r$27 = (t) => {
6086
+ var r$26 = (t) => {
6051
6087
  let n = 0;
6052
6088
  for (let r = 0; r + 1 < t.length; r++) {
6053
6089
  let i = t.charCodeAt(r);
6054
6090
  if (n !== 0) i === n && (n = 0);
6055
- else if (i === e$36.SingleQuote || i === e$36.DoubleQuote) n = i;
6056
- else if (i === e$36.Dot && t.charCodeAt(r + 1) === e$36.Dot) return [t.slice(0, r).trim(), t.slice(r + 2).trim()];
6091
+ else if (i === e$37.SingleQuote || i === e$37.DoubleQuote) n = i;
6092
+ else if (i === e$37.Dot && t.charCodeAt(r + 1) === e$37.Dot) return [t.slice(0, r).trim(), t.slice(r + 2).trim()];
6057
6093
  }
6058
6094
  return null;
6059
6095
  };
6060
6096
  //#endregion
6061
6097
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/Parser.mjs
6062
6098
  var c$16 = (e, t = !1, n) => {
6063
- let r = new f$10(e, t, n), i = r.parseBody();
6099
+ let r = new f$9(e, t, n), i = r.parseBody();
6064
6100
  if (!r.error) {
6065
6101
  let e = r.peek();
6066
6102
  if (e && e.type === "tag") {
@@ -6091,7 +6127,7 @@ var u$12 = () => ({
6091
6127
  elseifClauses: [],
6092
6128
  elseBody: null
6093
6129
  });
6094
- var d$12 = () => ({
6130
+ var d$11 = () => ({
6095
6131
  type: "for",
6096
6132
  valueVar: "_item",
6097
6133
  keyVar: null,
@@ -6102,7 +6138,7 @@ var d$12 = () => ({
6102
6138
  body: [],
6103
6139
  elseBody: null
6104
6140
  });
6105
- var f$10 = class {
6141
+ var f$9 = class {
6106
6142
  tokens;
6107
6143
  keepEmptyTokens;
6108
6144
  issues;
@@ -6152,7 +6188,7 @@ var f$10 = class {
6152
6188
  },
6153
6189
  source: ""
6154
6190
  };
6155
- let r = t.content.trim(), i = this.keepEmptyTokens ? e$34(t.content, t.raw) : "";
6191
+ let r = t.content.trim(), i = this.keepEmptyTokens ? e$35(t.content, t.raw) : "";
6156
6192
  if (o$22(r)) return {
6157
6193
  type: "variable",
6158
6194
  raw: t.raw,
@@ -6162,7 +6198,7 @@ var f$10 = class {
6162
6198
  },
6163
6199
  source: i
6164
6200
  };
6165
- let o = r$28(r, this.issues);
6201
+ let o = r$27(r, this.issues);
6166
6202
  return {
6167
6203
  type: "variable",
6168
6204
  raw: t.raw,
@@ -6190,14 +6226,14 @@ var f$10 = class {
6190
6226
  if (e.type !== "tag") return this.error = "Malformed {% if %} tag", u$12();
6191
6227
  let t = e.content.trim(), n = t.indexOf(" ") === -1 ? "" : t.slice(t.indexOf(" ") + 1).trim();
6192
6228
  if (!n) return this.error = "Malformed {% if %} tag: missing condition", u$12();
6193
- let r = r$28(n, this.issues), i = this.parseBody(), s = [], c = null, l = !1;
6229
+ let r = r$27(n, this.issues), i = this.parseBody(), s = [], c = null, l = !1;
6194
6230
  for (; this.peek();) {
6195
6231
  let e = this.peek();
6196
6232
  if (!e || e.type !== "tag") break;
6197
6233
  let t = n$26(e.content.trim());
6198
6234
  if (t === "elseif") {
6199
6235
  this.advance();
6200
- let t = e.content.trim(), r = r$28(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
6236
+ let t = e.content.trim(), r = r$27(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
6201
6237
  s.push({
6202
6238
  condition: r,
6203
6239
  body: i
@@ -6220,16 +6256,16 @@ var f$10 = class {
6220
6256
  let e = this.pos;
6221
6257
  this.advance();
6222
6258
  let n = this.tokens[this.pos - 1];
6223
- if (n.type !== "tag") return d$12();
6259
+ if (n.type !== "tag") return d$11();
6224
6260
  let r = n.content.trim(), i = r.slice(r.indexOf(" ") + 1).trim(), c = /\sin\s/.exec(i);
6225
- if (!c) return this.error = "Invalid {% for %} syntax: missing the `in` keyword", d$12();
6226
- let l = i.slice(0, c.index).trim(), u = i.slice(c.index + c[0].length).trim(), f = r$27(u), p = f ? {
6261
+ if (!c) return this.error = "Invalid {% for %} syntax: missing the `in` keyword", d$11();
6262
+ let l = i.slice(0, c.index).trim(), u = i.slice(c.index + c[0].length).trim(), f = r$26(u), p = f ? {
6227
6263
  type: "range",
6228
- start: r$28(f[0], this.issues),
6229
- end: r$28(f[1], this.issues)
6230
- } : 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();
6231
- if (!c$17(g)) return this.error = `Invalid {% for %} variable name: "${g}"`, d$12();
6232
- if (h !== null && !c$17(h)) return this.error = `Invalid {% for %} key variable name: "${h}"`, d$12();
6264
+ start: r$27(f[0], this.issues),
6265
+ end: r$27(f[1], this.issues)
6266
+ } : 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();
6267
+ if (!c$17(g)) return this.error = `Invalid {% for %} variable name: "${g}"`, d$11();
6268
+ if (h !== null && !c$17(h)) return this.error = `Invalid {% for %} key variable name: "${h}"`, d$11();
6233
6269
  let _ = this.parseBody(), v = null;
6234
6270
  if (this.peek()) {
6235
6271
  let e = this.peek();
@@ -6276,7 +6312,7 @@ var f$10 = class {
6276
6312
  return {
6277
6313
  type: "set",
6278
6314
  name: n.slice(0, r).trim(),
6279
- value: r$28(n.slice(r + 1).trim(), this.issues)
6315
+ value: r$27(n.slice(r + 1).trim(), this.issues)
6280
6316
  };
6281
6317
  }
6282
6318
  parseApply() {
@@ -6297,7 +6333,7 @@ var f$10 = class {
6297
6333
  };
6298
6334
  //#endregion
6299
6335
  //#region ../sdk-shared/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs
6300
- var r$26 = /* @__PURE__ */ new Map();
6336
+ var r$25 = /* @__PURE__ */ new Map();
6301
6337
  var i$22 = 1024;
6302
6338
  var a$18 = {
6303
6339
  hits: 0,
@@ -6311,7 +6347,7 @@ var c$15 = (t) => {
6311
6347
  n = !0;
6312
6348
  break;
6313
6349
  }
6314
- if (a.type === "variable" && !s$18(a.content.trim())) {
6350
+ if (a.type === "variable" && !s$19(a.content.trim())) {
6315
6351
  r = !1;
6316
6352
  break;
6317
6353
  }
@@ -6322,13 +6358,13 @@ var c$15 = (t) => {
6322
6358
  };
6323
6359
  };
6324
6360
  var l$11 = () => {
6325
- if (r$26.size >= i$22) {
6326
- let e = r$26.keys().next().value;
6327
- e !== void 0 && r$26.delete(e);
6361
+ if (r$25.size >= i$22) {
6362
+ let e = r$25.keys().next().value;
6363
+ e !== void 0 && r$25.delete(e);
6328
6364
  }
6329
6365
  };
6330
6366
  var u$11 = (e) => {
6331
- let r = e$35(e);
6367
+ let r = e$36(e);
6332
6368
  if (r.error) return null;
6333
6369
  let i = r.tokens, { hasTags: a, allSimpleOrDotted: o } = c$15(i), s = a || !o, l = null, u = null;
6334
6370
  if (s) {
@@ -6349,12 +6385,12 @@ var u$11 = (e) => {
6349
6385
  nodesWithSource: u
6350
6386
  };
6351
6387
  };
6352
- var d$11 = (e) => {
6353
- let t = r$26.get(e);
6388
+ var d$10 = (e) => {
6389
+ let t = r$25.get(e);
6354
6390
  if (t) return a$18.hits++, t;
6355
6391
  a$18.misses++;
6356
6392
  let n = u$11(e);
6357
- return n ? (l$11(), r$26.set(e, n), n) : null;
6393
+ return n ? (l$11(), r$25.set(e, n), n) : null;
6358
6394
  };
6359
6395
  //#endregion
6360
6396
  //#region ../sdk-shared/dist/helpers/twigWrapper/templateRoots.mjs
@@ -6373,15 +6409,15 @@ var t$31 = (e, n) => {
6373
6409
  }
6374
6410
  };
6375
6411
  var n$25 = (n) => {
6376
- let r = d$11(n);
6412
+ let r = d$10(n);
6377
6413
  if (!r) return [];
6378
6414
  let i = /* @__PURE__ */ new Set();
6379
6415
  return t$31(r.nodes ?? r.nodesWithSource, i), [...i];
6380
6416
  };
6381
- var r$25 = (e) => [...new Set(n$25(e).map((e) => e.split(".")[0]))];
6417
+ var r$24 = (e) => [...new Set(n$25(e).map((e) => e.split(".")[0]))];
6382
6418
  //#endregion
6383
6419
  //#region ../sdk-shared/dist/style/styleConstants.mjs
6384
- var e$33 = {
6420
+ var e$34 = {
6385
6421
  platform: {
6386
6422
  desktop: {},
6387
6423
  tablet: {},
@@ -6574,6 +6610,8 @@ var t$30 = {
6574
6610
  TEXT_INDENT: "text-indent",
6575
6611
  TEXT_TRANSFORM: "text-transform",
6576
6612
  DIRECTION: "direction",
6613
+ WRITING_MODE: "writing-mode",
6614
+ TEXT_ORIENTATION: "text-orientation",
6577
6615
  WHITE_SPACE: "white-space",
6578
6616
  TEXT_WRAP: "text-wrap",
6579
6617
  WORD_BREAK: "word-break",
@@ -6621,12 +6659,12 @@ Object.values(t$30).map((e) => ({
6621
6659
  path: e,
6622
6660
  label: e
6623
6661
  }));
6624
- 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;
6662
+ 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;
6625
6663
  //#endregion
6626
6664
  //#region ../sdk-shared/dist/schema/schemaConstants.mjs
6627
6665
  var t$29 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
6628
6666
  var n$23 = "props";
6629
- var r$23 = {
6667
+ var r$22 = {
6630
6668
  schema: {
6631
6669
  definition: {
6632
6670
  name: "",
@@ -6639,7 +6677,7 @@ var r$23 = {
6639
6677
  pageFolders: [],
6640
6678
  components: {}
6641
6679
  },
6642
- style: e$33,
6680
+ style: e$34,
6643
6681
  definition: { rootId: "" }
6644
6682
  };
6645
6683
  //#endregion
@@ -6660,7 +6698,7 @@ var r$23 = {
6660
6698
  *
6661
6699
  * `computed` holds the space's own computed values (`SpaceSpec.computed`), by name.
6662
6700
  */
6663
- var GLOBAL_SOURCES = e$37;
6701
+ var GLOBAL_SOURCES = e$38;
6664
6702
  /** What an element inside a component can read besides its own tree: the globals, and what its instance hands in. */
6665
6703
  var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$23];
6666
6704
  /**
@@ -6847,7 +6885,7 @@ var activeOn = (cls, pages, options = {}) => {
6847
6885
  * one only has to be one of them.
6848
6886
  */
6849
6887
  var conditionSource = (template) => {
6850
- const roots = r$25(template);
6888
+ const roots = r$24(template);
6851
6889
  const global = roots.find((root) => GLOBAL_SOURCES.includes(root));
6852
6890
  if (global) return global;
6853
6891
  const element = roots.find((root) => root.includes("_"));
@@ -6923,32 +6961,59 @@ var workingDirectory = () => {
6923
6961
  return typeof cwd === "function" ? `${String(Reflect.apply(cwd, process, []))}/` : "";
6924
6962
  };
6925
6963
  var FRAME = /\(?((?:file:\/\/)?[^\s()]+?):(\d+):(\d+)\)?$/;
6964
+ var FRAMES = 64;
6965
+ var deepError = () => {
6966
+ const limit = Reflect.get(Error, "stackTraceLimit");
6967
+ if (typeof limit !== "number" || limit >= FRAMES) return /* @__PURE__ */ new Error();
6968
+ Reflect.set(Error, "stackTraceLimit", FRAMES);
6969
+ try {
6970
+ return /* @__PURE__ */ new Error();
6971
+ } finally {
6972
+ Reflect.set(Error, "stackTraceLimit", limit);
6973
+ }
6974
+ };
6926
6975
  var markWrittenAt = (spec) => {
6927
6976
  if (!isProduction()) Object.defineProperty(spec, WRITTEN_AT, {
6928
- value: /* @__PURE__ */ new Error(),
6977
+ value: deepError(),
6929
6978
  enumerable: false
6930
6979
  });
6931
6980
  return spec;
6932
6981
  };
6933
6982
  /**
6934
- * The call in the author's own code that wrote `spec` — the factory's name at that line and column, which tells it
6935
- * apart from another call on the same line. What a fix edits the source at.
6983
+ * `copy`, carrying where `spec` was written. A spread copies only what is enumerable, so a factory that rebuilds a spec
6984
+ * (`{ ...spec, attributes }`) would hand back one written nowhere: `plitzi element where` could not place it and `plitzi element edit`
6985
+ * would refuse it. The marker is the original's — the call the author wrote — never one taken where the copy is made.
6986
+ */
6987
+ var carryWrittenAt = (spec, copy) => {
6988
+ const marker = Reflect.get(spec, WRITTEN_AT);
6989
+ if (marker instanceof Error) Object.defineProperty(copy, WRITTEN_AT, {
6990
+ value: marker,
6991
+ enumerable: false
6992
+ });
6993
+ return copy;
6994
+ };
6995
+ /**
6996
+ * Every call of the author's own code on the way to `spec`, the one that wrote it first and then each that called it —
6997
+ * a helper (`pageHead(…)`) and where it was called. Each is the function's name at its line and column, which tells
6998
+ * it apart from another call on the same line.
6936
6999
  */
6937
- var writtenAtPosition = (spec) => {
7000
+ var writtenCalls = (spec) => {
6938
7001
  const marker = typeof spec === "object" && spec !== null ? Reflect.get(spec, WRITTEN_AT) : void 0;
6939
- if (!(marker instanceof Error) || !marker.stack) return;
7002
+ if (!(marker instanceof Error) || !marker.stack) return [];
6940
7003
  const cwd = workingDirectory();
6941
- for (const line of marker.stack.split("\n").slice(1)) {
7004
+ return marker.stack.split("\n").slice(1).flatMap((line) => {
6942
7005
  const match = FRAME.exec(line.trim());
6943
- if (!match) continue;
6944
- const file = match[1].replace(/^file:\/\//, "");
6945
- if (!isOwnFrame(file)) return {
7006
+ const file = match?.[1].replace(/^file:\/\//, "");
7007
+ if (!match || !file || isOwnFrame(file)) return [];
7008
+ return [{
6946
7009
  file: cwd && file.startsWith(cwd) ? file.slice(cwd.length) : file,
6947
7010
  line: Number(match[2]),
6948
7011
  column: Number(match[3])
6949
- };
6950
- }
7012
+ }];
7013
+ });
6951
7014
  };
7015
+ /** The call in the author's own code that wrote `spec`: what a fix edits the source at. */
7016
+ var writtenAtPosition = (spec) => writtenCalls(spec).at(0);
6952
7017
  /** The first frame of the author's own code that wrote `spec`, relative to the working directory; or nothing. */
6953
7018
  var writtenAt = (spec) => {
6954
7019
  const position = writtenAtPosition(spec);
@@ -7135,7 +7200,7 @@ var element = (type, props) => buildSpec(type, declarationsByType.get(type), pro
7135
7200
  */
7136
7201
  var component = (componentId, instance = {}) => {
7137
7202
  const { props, children, ...authoring } = instance;
7138
- const filled = Array.isArray(children) ? children : Object.entries(children ?? {}).flatMap(([slot, specs]) => specs.map((spec) => ({
7203
+ const filled = Array.isArray(children) ? children : Object.entries(children ?? {}).flatMap(([slot, specs]) => specs.map((spec) => carryWrittenAt(spec, {
7139
7204
  ...spec,
7140
7205
  attributes: {
7141
7206
  ...spec.attributes,
@@ -7146,7 +7211,7 @@ var component = (componentId, instance = {}) => {
7146
7211
  ...authoring,
7147
7212
  ...filled.length > 0 ? { children: filled } : {}
7148
7213
  });
7149
- return {
7214
+ return carryWrittenAt(spec, {
7150
7215
  ...spec,
7151
7216
  attributes: {
7152
7217
  ...spec.attributes,
@@ -7154,7 +7219,7 @@ var component = (componentId, instance = {}) => {
7154
7219
  referenceId: componentId,
7155
7220
  ...props
7156
7221
  }
7157
- };
7222
+ });
7158
7223
  };
7159
7224
  //#endregion
7160
7225
  //#region src/elements/elements.ts
@@ -7262,9 +7327,9 @@ var themeToggle = defineElement(B.ThemeToggle);
7262
7327
  var video = defineElement(B.Video);
7263
7328
  //#endregion
7264
7329
  //#region ../sdk-schema/dist/helpers/elementId.mjs
7265
- var e$32 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
7266
- var t$28 = (t) => e$32.test(t);
7267
- var r$22 = (e) => new Set(Object.keys(e));
7330
+ var e$33 = /^[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?$/;
7331
+ var t$28 = (t) => e$33.test(t);
7332
+ var r$21 = (e) => new Set(Object.keys(e));
7268
7333
  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`;
7269
7334
  var a$17 = (e, t) => {
7270
7335
  let n = /* @__PURE__ */ new Set();
@@ -7275,12 +7340,12 @@ var a$17 = (e, t) => {
7275
7340
  return !0;
7276
7341
  };
7277
7342
  var o$19 = (e) => e.replace(/[^A-Za-z0-9]/g, "") || "element";
7278
- var s$16 = "abcdefghijklmnopqrstuvwxyz0123456789";
7343
+ var s$17 = "abcdefghijklmnopqrstuvwxyz0123456789";
7279
7344
  var c$14 = (e, t) => {
7280
7345
  let n = o$19(e);
7281
7346
  for (let e = 0; e < 100; e += 1) {
7282
7347
  let e = "";
7283
- for (let t = 0; t < 4; t += 1) e += s$16[Math.floor(Math.random() * s$16.length)];
7348
+ for (let t = 0; t < 4; t += 1) e += s$17[Math.floor(Math.random() * s$17.length)];
7284
7349
  if (!t(`${n}-${e}`)) return `${n}-${e}`;
7285
7350
  }
7286
7351
  return l$10(e, t);
@@ -7296,7 +7361,7 @@ var u$10 = (e, t) => {
7296
7361
  for (; t(`${r}-${i}`);) i += 1;
7297
7362
  return `${r}-${i}`;
7298
7363
  };
7299
- var d$10 = {
7364
+ var d$9 = {
7300
7365
  page: [{ attribute: "layout" }, { attribute: "layoutContainer" }],
7301
7366
  reference: [{
7302
7367
  attribute: "referenceId",
@@ -7307,18 +7372,18 @@ var d$10 = {
7307
7372
  when: (e) => e.mode === "page"
7308
7373
  }]
7309
7374
  };
7310
- var f$9 = { navigate: [{
7375
+ var f$8 = { navigate: [{
7311
7376
  param: "url",
7312
7377
  when: (e) => e.urlType === "page"
7313
7378
  }] };
7314
- var p$9 = (e, t) => {
7379
+ var p$10 = (e, t) => {
7315
7380
  let n = e.indexOf("."), r = n === -1 ? e : e.slice(0, n), i = r.indexOf("_");
7316
7381
  if (i === -1) return e;
7317
7382
  let a = t[r.slice(i + 1)];
7318
7383
  return a ? `${r.slice(0, i + 1)}${a}${n === -1 ? "" : e.slice(n)}` : e;
7319
7384
  };
7320
- var m$5 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
7321
- var h$3 = (e, t) => e.replace(m$5, (e, n, r) => {
7385
+ var m$6 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
7386
+ var h$3 = (e, t) => e.replace(m$6, (e, n, r) => {
7322
7387
  let i = t[r];
7323
7388
  return i ? `${n}_${i}` : e;
7324
7389
  });
@@ -7353,19 +7418,19 @@ var _$3 = (e, t, n) => {
7353
7418
  t[n.id] && (n.id = t[n.id], e = !0);
7354
7419
  let { definition: r, attributes: o } = n;
7355
7420
  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);
7356
- for (let { attribute: n, when: i } of d$10[r.type] ?? []) {
7421
+ for (let { attribute: n, when: i } of d$9[r.type] ?? []) {
7357
7422
  let r = o[n];
7358
7423
  typeof r == "string" && t[r] && (!i || i(o)) && (o[n] = t[r], e = !0);
7359
7424
  }
7360
7425
  let { slot: s } = o;
7361
7426
  typeof s == "string" && t[s] && (o.slot = t[s], e = !0);
7362
7427
  for (let n of Object.values(r.bindings ?? {})) for (let r of n) {
7363
- let n = p$9(r.source, t);
7428
+ let n = p$10(r.source, t);
7364
7429
  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);
7365
7430
  }
7366
7431
  for (let n of Object.values(r.interactions ?? {})) {
7367
7432
  n.elementId && t[n.elementId] && (n.elementId = t[n.elementId], e = !0);
7368
- for (let { param: r, when: i } of f$9[n.action] ?? []) {
7433
+ for (let { param: r, when: i } of f$8[n.action] ?? []) {
7369
7434
  let a = n.params[r];
7370
7435
  typeof a == "string" && t[a] && (!i || i(n.params)) && (n.params[r] = t[a], e = !0);
7371
7436
  }
@@ -7382,7 +7447,7 @@ var _$3 = (e, t, n) => {
7382
7447
  };
7383
7448
  //#endregion
7384
7449
  //#region ../sdk-shared/dist/helpers/isRecord.mjs
7385
- var e$31 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
7450
+ var e$32 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
7386
7451
  //#endregion
7387
7452
  //#region src/schema/guard.ts
7388
7453
  /**
@@ -7545,7 +7610,7 @@ var STEP_TYPES = [
7545
7610
  * written, when it depends on which one: a hint about one field is noise about every other.
7546
7611
  */
7547
7612
  function assertKnownKeys(value, keys, where, hint = "") {
7548
- if (!e$31(value)) throw new AuthoringError("element-shape", `${where} is ${value === null ? "null" : typeof value}, not an object.`);
7613
+ if (!e$32(value)) throw new AuthoringError("element-shape", `${where} is ${value === null ? "null" : typeof value}, not an object.`);
7549
7614
  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)}`);
7550
7615
  }
7551
7616
  /** Refuses an id nothing can name: empty, or with characters a template or a selector cannot carry. */
@@ -7575,28 +7640,28 @@ var paramIssue = (params, spec, where) => {
7575
7640
  const unknown = Object.keys(provided).find((key) => !names.includes(key));
7576
7641
  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"}.`;
7577
7642
  }
7578
- const effective = s$22(provided, declared, false);
7579
- const invalid = o$25(provided, effective, declared).at(0);
7643
+ const effective = c$19(provided, declared, false);
7644
+ const invalid = s$23(provided, effective, declared).at(0);
7580
7645
  if (invalid) {
7581
7646
  const value = provided[invalid.key];
7582
7647
  const suggestion = typeof value === "string" && invalid.options ? didYouMean(value, invalid.options) : "";
7583
7648
  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}.`;
7584
7649
  }
7585
- const missing = n$45(provided, effective, declared).at(0);
7650
+ const missing = r$35(provided, effective, declared).at(0);
7586
7651
  return missing === void 0 ? void 0 : `${where} needs "${missing}": ${declared[missing].description}`;
7587
7652
  };
7588
7653
  //#endregion
7589
7654
  //#region ../sdk-schema/dist/helpers/elementTree.mjs
7590
- var e$30 = (e, t) => t && Object.hasOwn(e, t) ? e[t] : void 0;
7655
+ var e$31 = (e, t) => t && Object.hasOwn(e, t) ? e[t] : void 0;
7591
7656
  var t$27 = (t, n) => {
7592
7657
  let r = [], i = /* @__PURE__ */ new Set([n]);
7593
- for (let a = e$30(t, e$30(t, n)?.definition.parentId); a && !i.has(a.id);) i.add(a.id), r.push(a.id), a = e$30(t, a.definition.parentId);
7658
+ 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);
7594
7659
  return r;
7595
7660
  };
7596
7661
  var n$22 = (n, r) => {
7597
7662
  let i = [], a = /* @__PURE__ */ new Set([r]), o = (s) => {
7598
7663
  for (let c of [s, ...t$27(n, s)]) {
7599
- let t = e$30(n, c);
7664
+ let t = e$31(n, c);
7600
7665
  if (c !== s || s !== r) {
7601
7666
  if (a.has(c)) continue;
7602
7667
  a.add(c), i.push(c);
@@ -7607,28 +7672,28 @@ var n$22 = (n, r) => {
7607
7672
  };
7608
7673
  return o(r), i;
7609
7674
  };
7610
- var r$21 = (t, n) => {
7675
+ var r$20 = (t, n) => {
7611
7676
  let r = [], i = /* @__PURE__ */ new Set([n]), a = (n) => {
7612
- for (let o of e$30(t, n)?.definition.items ?? []) !i.has(o) && e$30(t, o) && (i.add(o), r.push(o), a(o));
7677
+ 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));
7613
7678
  };
7614
7679
  return a(n), r;
7615
7680
  };
7616
7681
  //#endregion
7617
7682
  //#region ../sdk-shared/dist/style/breakpoints.mjs
7618
- var e$29 = {
7683
+ var e$30 = {
7619
7684
  desktop: 1024,
7620
7685
  tablet: 768,
7621
7686
  mobile: 0
7622
7687
  };
7623
- var t$26 = (t) => e$29[t] === 0 ? "0" : `${String(e$29[t] / 16)}rem`;
7688
+ var t$26 = (t) => e$30[t] === 0 ? "0" : `${String(e$30[t] / 16)}rem`;
7624
7689
  //#endregion
7625
7690
  //#region ../sdk-shared/dist/style/displayModes.mjs
7626
- var e$28 = [
7691
+ var e$29 = [
7627
7692
  "desktop",
7628
7693
  "tablet",
7629
7694
  "mobile"
7630
7695
  ];
7631
- var t$25 = (t) => e$28.some((e) => e === t);
7696
+ var t$25 = (t) => e$29.some((e) => e === t);
7632
7697
  //#endregion
7633
7698
  //#region ../sdk-shared/dist/style/fonts.mjs
7634
7699
  var i$19 = (e) => {
@@ -7647,7 +7712,7 @@ var n$21 = /* @__PURE__ */ new Set([
7647
7712
  "remote",
7648
7713
  "hosted"
7649
7714
  ]);
7650
- var r$20 = /* @__PURE__ */ new Set([
7715
+ var r$19 = /* @__PURE__ */ new Set([
7651
7716
  "auto",
7652
7717
  "block",
7653
7718
  "swap",
@@ -7663,9 +7728,9 @@ var o$18 = (e) => {
7663
7728
  }
7664
7729
  return !1;
7665
7730
  };
7666
- var s$15 = class extends Error {};
7731
+ var s$16 = class extends Error {};
7667
7732
  var c$13 = (e) => {
7668
- throw new s$15(e);
7733
+ throw new s$16(e);
7669
7734
  };
7670
7735
  var l$9 = (e) => {
7671
7736
  if (typeof e != "string") return c$13("font.family must be a string");
@@ -7678,14 +7743,14 @@ var u$9 = (e) => {
7678
7743
  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);
7679
7744
  return [...new Set(t)].sort((e, t) => e - t);
7680
7745
  };
7681
- var d$9 = (e) => {
7746
+ var d$8 = (e) => {
7682
7747
  if (e === void 0) return ["normal"];
7683
7748
  if (!Array.isArray(e) || e.length === 0) return c$13("font.styles must be a non-empty list");
7684
7749
  let t = e.map((e) => e !== "normal" && e !== "italic" ? c$13("font.styles may only hold \"normal\" or \"italic\"") : e);
7685
7750
  return [...new Set(t)];
7686
7751
  };
7687
- var f$8 = (t, n) => {
7688
- if (!e$31(t)) return c$13(`font.files[${n}] must be an object`);
7752
+ var f$7 = (t, n) => {
7753
+ if (!e$32(t)) return c$13(`font.files[${n}] must be an object`);
7689
7754
  let { weight: r, style: a, format: o, unicodeRange: s } = t;
7690
7755
  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`);
7691
7756
  if (a !== "normal" && a !== "italic") return c$13(`font.files[${n}].style must be "normal" or "italic"`);
@@ -7701,20 +7766,20 @@ var f$8 = (t, n) => {
7701
7766
  }
7702
7767
  return l;
7703
7768
  };
7704
- 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;
7705
- var m$4 = (e) => !Array.isArray(e) || e.length === 0 ? c$13("font.files must be a non-empty list") : e;
7769
+ 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;
7770
+ var m$5 = (e) => !Array.isArray(e) || e.length === 0 ? c$13("font.files must be a non-empty list") : e;
7706
7771
  var h$2 = (i) => {
7707
- if (!e$31(i)) return c$13("a font must be an object");
7772
+ if (!e$32(i)) return c$13("a font must be an object");
7708
7773
  let { source: a, fallback: o, display: s, preload: h } = i;
7709
7774
  if (typeof a != "string" || !n$21.has(a)) return c$13("font.source must be one of: system, google, remote, hosted");
7710
7775
  if (typeof o != "string" || !o.trim()) return c$13("font.fallback is required: it is what renders until the face arrives");
7711
- 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");
7776
+ 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");
7712
7777
  if (h !== void 0 && typeof h != "boolean") return c$13("font.preload must be a boolean");
7713
7778
  let g = {
7714
7779
  family: l$9(i.family),
7715
7780
  fallback: o.trim(),
7716
7781
  weights: u$9(i.weights),
7717
- styles: d$9(i.styles),
7782
+ styles: d$8(i.styles),
7718
7783
  ...s === void 0 ? {} : { display: s },
7719
7784
  ...h === void 0 ? {} : { preload: h }
7720
7785
  };
@@ -7735,8 +7800,8 @@ var h$2 = (i) => {
7735
7800
  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 ? {
7736
7801
  ...g,
7737
7802
  source: "remote",
7738
- files: m$4(n).map((e, n) => {
7739
- let r = f$8(e, n), { url: i } = e;
7803
+ files: m$5(n).map((e, n) => {
7804
+ let r = f$7(e, n), { url: i } = e;
7740
7805
  return typeof i != "string" || !i$19(i) ? c$13(`font.files[${n}].url must be an https URL with no credentials in it`) : {
7741
7806
  ...r,
7742
7807
  url: i
@@ -7751,31 +7816,31 @@ var h$2 = (i) => {
7751
7816
  return {
7752
7817
  ...g,
7753
7818
  source: "hosted",
7754
- files: m$4(i.files).map((e, t) => ({
7755
- ...f$8(e, t),
7756
- path: p$8(e.path, t)
7819
+ files: m$5(i.files).map((e, t) => ({
7820
+ ...f$7(e, t),
7821
+ path: p$9(e.path, t)
7757
7822
  }))
7758
7823
  };
7759
7824
  };
7760
7825
  //#endregion
7761
7826
  //#region ../sdk-shared/dist/types/StyleTypes.mjs
7762
- var e$27 = /* @__PURE__ */ function(e) {
7827
+ var e$28 = /* @__PURE__ */ function(e) {
7763
7828
  return e.COLOR = "color", e.SPACING = "spacing", e.SHADOW = "shadow", e.CUSTOM = "custom", e;
7764
7829
  }({});
7765
- var t$24 = Object.values(e$27);
7830
+ var t$24 = Object.values(e$28);
7766
7831
  var n$20 = (e) => typeof e == "string" && t$24.includes(e);
7767
7832
  //#endregion
7768
7833
  //#region ../sdk-shared/dist/style/styleConditions.mjs
7769
- var e$26 = {
7834
+ var e$27 = {
7770
7835
  "motion-reduce": "@media (prefers-reduced-motion: reduce)",
7771
7836
  "motion-safe": "@media (prefers-reduced-motion: no-preference)"
7772
7837
  };
7773
- var t$23 = Object.keys(e$26);
7774
- var r$19 = (t) => Object.hasOwn(e$26, t);
7838
+ var t$23 = Object.keys(e$27);
7839
+ var r$18 = (t) => Object.hasOwn(e$27, t);
7775
7840
  var i$17 = String.raw`\d+(?:\.\d+)?(?:px|rem|em|ch)`;
7776
7841
  var a$15 = String.raw`\((?:min|max)-width:\s*${i$17}\)`;
7777
7842
  var o$17 = new RegExp(String.raw`^container(?:\s+(?<name>-?[_a-zA-Z][\w-]*))?\s+(?<query>${a$15}(?:\s+and\s+${a$15})?)$`);
7778
- var s$14 = (e) => {
7843
+ var s$15 = (e) => {
7779
7844
  let t = o$17.exec(e.trim());
7780
7845
  if (t?.groups) return {
7781
7846
  name: t.groups.name,
@@ -7783,24 +7848,24 @@ var s$14 = (e) => {
7783
7848
  };
7784
7849
  };
7785
7850
  var c$12 = (e) => {
7786
- if (r$19(e)) return e;
7787
- let t = s$14(e);
7851
+ if (r$18(e)) return e;
7852
+ let t = s$15(e);
7788
7853
  if (t) return t.name ? `container ${t.name} ${t.query}` : `container ${t.query}`;
7789
7854
  };
7790
7855
  var u$8 = (t) => {
7791
- if (r$19(t)) return e$26[t];
7792
- let n = s$14(t);
7856
+ if (r$18(t)) return e$27[t];
7857
+ let n = s$15(t);
7793
7858
  if (n) return n.name ? `@container ${n.name} ${n.query}` : `@container ${n.query}`;
7794
7859
  };
7795
- var f$7 = (t) => {
7860
+ var f$6 = (t) => {
7796
7861
  let n = t.trim().replace(/\s+/g, " ").replace(/\(\s*/g, "(").replace(/\s*\)/g, ")").replace(/:\s*/g, ": ");
7797
- for (let [t, r] of Object.entries(e$26)) if (n === r) return t;
7862
+ for (let [t, r] of Object.entries(e$27)) if (n === r) return t;
7798
7863
  let r = /^@container\s+(.*)$/.exec(n);
7799
7864
  if (r) return c$12(`container ${r[1]}`);
7800
7865
  };
7801
7866
  //#endregion
7802
7867
  //#region ../sdk-shared/dist/style/stylePseudos.mjs
7803
- var e$25 = [
7868
+ var e$26 = [
7804
7869
  "before",
7805
7870
  "after",
7806
7871
  "marker",
@@ -7819,7 +7884,7 @@ var t$22 = {
7819
7884
  selection: "::selection"
7820
7885
  };
7821
7886
  var n$19 = (e) => Object.hasOwn(t$22, e);
7822
- var r$18 = (e) => `::${e}`;
7887
+ var r$17 = (e) => `::${e}`;
7823
7888
  var i$16 = [
7824
7889
  "before",
7825
7890
  "after",
@@ -7841,7 +7906,7 @@ var o$16 = [
7841
7906
  "line-height",
7842
7907
  "vertical-align"
7843
7908
  ];
7844
- var s$13 = [
7909
+ var s$14 = [
7845
7910
  "font-family",
7846
7911
  "font-size",
7847
7912
  "font-style",
@@ -7868,16 +7933,16 @@ var l$8 = {
7868
7933
  "color",
7869
7934
  "content",
7870
7935
  "direction",
7871
- ...s$13
7936
+ ...s$14
7872
7937
  ],
7873
7938
  placeholder: [
7874
7939
  ...o$16,
7875
- ...s$13,
7940
+ ...s$14,
7876
7941
  ...c$11
7877
7942
  ],
7878
7943
  "first-line": [
7879
7944
  ...o$16,
7880
- ...s$13,
7945
+ ...s$14,
7881
7946
  ...c$11
7882
7947
  ]
7883
7948
  };
@@ -7885,7 +7950,7 @@ var u$7 = (e, t) => {
7885
7950
  let n = l$8[e];
7886
7951
  return !n || t.startsWith("--") || n.includes(t);
7887
7952
  };
7888
- var d$8 = /* @__PURE__ */ new Set([
7953
+ var d$7 = /* @__PURE__ */ new Set([
7889
7954
  "none",
7890
7955
  "normal",
7891
7956
  "open-quote",
@@ -7897,8 +7962,8 @@ var d$8 = /* @__PURE__ */ new Set([
7897
7962
  "unset",
7898
7963
  "revert"
7899
7964
  ]);
7900
- var f$6 = /^(?:counter|counters|attr|url|var|image-set|linear-gradient|radial-gradient|conic-gradient)\(/i;
7901
- var p$7 = (e) => {
7965
+ var f$5 = /^(?:counter|counters|attr|url|var|image-set|linear-gradient|radial-gradient|conic-gradient)\(/i;
7966
+ var p$8 = (e) => {
7902
7967
  let t = [], n = "", r = "", i = 0;
7903
7968
  for (let a of e) {
7904
7969
  if (r) {
@@ -7916,13 +7981,13 @@ var p$7 = (e) => {
7916
7981
  }
7917
7982
  return n && t.push(n), r || i !== 0 ? void 0 : t;
7918
7983
  };
7919
- var m$3 = (e) => {
7920
- let t = p$7(e.trim());
7921
- return t?.length ? t.every((e) => /^(["']).*\1$/s.test(e) || d$8.has(e.toLowerCase()) || f$6.test(e) && e.endsWith(")")) : !1;
7984
+ var m$4 = (e) => {
7985
+ let t = p$8(e.trim());
7986
+ return t?.length ? t.every((e) => /^(["']).*\1$/s.test(e) || d$7.has(e.toLowerCase()) || f$5.test(e) && e.endsWith(")")) : !1;
7922
7987
  };
7923
7988
  //#endregion
7924
7989
  //#region ../sdk-shared/dist/style/styleStates.mjs
7925
- var e$24 = [
7990
+ var e$25 = [
7926
7991
  "hover",
7927
7992
  "focus",
7928
7993
  "focus-visible",
@@ -7940,7 +8005,7 @@ var e$24 = [
7940
8005
  "even"
7941
8006
  ];
7942
8007
  var t$21 = "plitzi-component--hidden";
7943
- var r$17 = {
8008
+ var r$16 = {
7944
8009
  odd: 0,
7945
8010
  even: 1,
7946
8011
  first: 2,
@@ -7957,8 +8022,8 @@ var r$17 = {
7957
8022
  disabled: 13,
7958
8023
  hidden: 14
7959
8024
  };
7960
- var i$15 = (e) => Object.hasOwn(r$17, e);
7961
- var a$13 = (t) => i$15(t) ? r$17[t] : e$24.length;
8025
+ var i$15 = (e) => Object.hasOwn(r$16, e);
8026
+ var a$13 = (t) => i$15(t) ? r$16[t] : e$25.length;
7962
8027
  var o$15 = (e) => Object.entries(e).sort(([e], [t]) => a$13(e) - a$13(t));
7963
8028
  var l$7 = {
7964
8029
  current: ":is([aria-current]:not([aria-current=\"false\"]),[aria-pressed=\"true\"],[aria-selected=\"true\"],[role=\"tabpanel\"]:not([hidden]))",
@@ -7970,11 +8035,11 @@ var l$7 = {
7970
8035
  even: ":nth-child(even)"
7971
8036
  };
7972
8037
  var u$6 = (e) => (i$15(e) ? l$7[e] : void 0) ?? `:${e}`;
7973
- var d$7 = (e) => e === "hidden";
7974
- var p$6 = (e) => e === ">";
8038
+ var d$6 = (e) => e === "hidden";
8039
+ var p$7 = (e) => e === ">";
7975
8040
  //#endregion
7976
8041
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/shared.js
7977
- function e$23(e) {
8042
+ function e$24(e) {
7978
8043
  if (typeof e == "string" || typeof e == "number") {
7979
8044
  let t = String(e);
7980
8045
  return t === "" ? null : /^[a-zA-Z0-9_-]+$/.test(t) || /^\d+$/.test(t) ? t : null;
@@ -7986,11 +8051,11 @@ function t$20(t, n) {
7986
8051
  let r = [], i = /([^.[\]]+)|\[(\d+)\]/g, a;
7987
8052
  for (; a = i.exec(t);) if (a[1]) {
7988
8053
  if (!n && a[1] === "") continue;
7989
- let t = e$23(a[1]);
8054
+ let t = e$24(a[1]);
7990
8055
  if (t !== null) r.push(t);
7991
8056
  else if (n) return [];
7992
8057
  } else if (a[2]) {
7993
- let t = e$23(a[2]);
8058
+ let t = e$24(a[2]);
7994
8059
  if (t !== null) r.push(t);
7995
8060
  else if (n) return [];
7996
8061
  }
@@ -8000,20 +8065,20 @@ function n$18(t, n) {
8000
8065
  if (!Array.isArray(t)) return [];
8001
8066
  let r = [];
8002
8067
  for (let i of t) {
8003
- let t = e$23(i);
8068
+ let t = e$24(i);
8004
8069
  if (t !== null) r.push(t);
8005
8070
  else if (n) return [];
8006
8071
  }
8007
8072
  return r;
8008
8073
  }
8009
- function r$16(e, r = !0) {
8074
+ function r$15(e, r = !0) {
8010
8075
  return e ? typeof e == "string" ? t$20(e, r) : Array.isArray(e) ? n$18(e, r) : [] : [];
8011
8076
  }
8012
8077
  //#endregion
8013
8078
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/get.js
8014
8079
  function t$19(t, n, r) {
8015
8080
  if (t == null || !n) return r;
8016
- let i = r$16(n);
8081
+ let i = r$15(n);
8017
8082
  if (!i.length) return r;
8018
8083
  let a = t;
8019
8084
  for (let e of i) {
@@ -8028,7 +8093,7 @@ function t$19(t, n, r) {
8028
8093
  //#endregion
8029
8094
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/set.js
8030
8095
  function t$18(t, n, r) {
8031
- let i = r$16(n);
8096
+ let i = r$15(n);
8032
8097
  if (!i.length) return t;
8033
8098
  let a = t;
8034
8099
  for (let e = 0; e < i.length - 1; e++) {
@@ -8056,7 +8121,7 @@ function n$17(n, r) {
8056
8121
  }
8057
8122
  //#endregion
8058
8123
  //#region ../sdk-style/dist/helpers/calculateInheriting.mjs
8059
- var r$15 = (e, t) => {
8124
+ var r$14 = (e, t) => {
8060
8125
  let n = [], r = t;
8061
8126
  for (; r;) {
8062
8127
  n.push(r);
@@ -8136,7 +8201,7 @@ var o$14 = (e, t, n) => {
8136
8201
  ...f
8137
8202
  };
8138
8203
  };
8139
- var s$11 = (e, t, n) => o$14(e.attributes, t, n);
8204
+ var s$12 = (e, t, n) => o$14(e.attributes, t, n);
8140
8205
  var c$9 = (t, o, c, l, u = {}, d = {}) => {
8141
8206
  let { componentSubType: f, styleSelector: p = "base", styleState: m, styleVariant: h, styleAncestor: g, stylePseudo: _, styleCondition: v, includeSelf: y = !1, skipSelectors: b = [], addSelectors: x = [] } = d, S = {
8142
8207
  styleState: m,
@@ -8148,7 +8213,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8148
8213
  tree: [],
8149
8214
  style: {},
8150
8215
  parentStyle: {}
8151
- }, w = t ? r$15(c, t) : [], T = /* @__PURE__ */ new Set();
8216
+ }, w = t ? r$14(c, t) : [], T = /* @__PURE__ */ new Set();
8152
8217
  for (let e of Object.keys(l)) {
8153
8218
  let n = l[e];
8154
8219
  if (n) {
@@ -8212,7 +8277,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8212
8277
  }
8213
8278
  let E = {};
8214
8279
  for (let t of C.tree) {
8215
- let r = s$11(t, p, S);
8280
+ let r = s$12(t, p, S);
8216
8281
  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({
8217
8282
  key: t.name,
8218
8283
  value: r[e],
@@ -8221,7 +8286,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8221
8286
  }
8222
8287
  let D = C.tree.filter((e) => e.isParent).reduce((e, t) => ({
8223
8288
  ...e,
8224
- ...s$11(t, p, S)
8289
+ ...s$12(t, p, S)
8225
8290
  }), {});
8226
8291
  return {
8227
8292
  ...C,
@@ -8231,7 +8296,7 @@ var c$9 = (t, o, c, l, u = {}, d = {}) => {
8231
8296
  };
8232
8297
  //#endregion
8233
8298
  //#region ../sdk-schema/dist/helpers/FlatMap.mjs
8234
- var d$6 = class {
8299
+ var d$5 = class {
8235
8300
  flat;
8236
8301
  variables;
8237
8302
  pages;
@@ -8243,7 +8308,7 @@ var d$6 = class {
8243
8308
  this.flat = t, this.variables = r ?? [], this.pages = i ?? [], this.mintId = a ?? c$14, this.takenElsewhere = o ?? (() => !1);
8244
8309
  }
8245
8310
  nextId = (e, t = () => !1) => {
8246
- let n = r$22(this.flat);
8311
+ let n = r$21(this.flat);
8247
8312
  return this.mintId(e, (e) => n.has(e) || this.takenElsewhere(e) || t(e));
8248
8313
  };
8249
8314
  addElement = (e, n, r = "inside", i = {}) => {
@@ -8283,7 +8348,7 @@ var d$6 = class {
8283
8348
  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;
8284
8349
  };
8285
8350
  carryRoot = (e, t) => {
8286
- if (this.flat[e].definition.rootId !== t) for (let n of [e, ...r$21(this.flat, e)]) this.flat[n].definition.rootId = t;
8351
+ if (this.flat[e].definition.rootId !== t) for (let n of [e, ...r$20(this.flat, e)]) this.flat[n].definition.rootId = t;
8287
8352
  };
8288
8353
  cloneElements = (e, t = "", n = "", s = !1) => {
8289
8354
  let c = {
@@ -8291,7 +8356,7 @@ var d$6 = class {
8291
8356
  item: void 0
8292
8357
  }, l = {}, u = this.flat[e];
8293
8358
  if (!u) return c;
8294
- let d = [e, ...r$21(this.flat, e)], f = r$22(this.flat);
8359
+ let d = [e, ...r$20(this.flat, e)], f = r$21(this.flat);
8295
8360
  for (let e of d) {
8296
8361
  let t = u$10(e, (e) => f.has(e) || this.takenElsewhere(e));
8297
8362
  f.add(t), l[e] = t;
@@ -8308,7 +8373,7 @@ var d$6 = class {
8308
8373
  removeElement = (e, t = !1) => {
8309
8374
  let n = this.flat[e];
8310
8375
  if (!n || n.definition.type === "page" && !t || t && n.attributes.default) return !1;
8311
- for (let t of r$21(this.flat, e)) delete this.flat[t];
8376
+ for (let t of r$20(this.flat, e)) delete this.flat[t];
8312
8377
  let r = n.definition.parentId ? this.flat[n.definition.parentId] : void 0;
8313
8378
  return r?.definition.items && (r.definition.items = r.definition.items.filter((t) => t !== e)), delete this.flat[e], !0;
8314
8379
  };
@@ -8340,7 +8405,7 @@ var d$6 = class {
8340
8405
  };
8341
8406
  flatAsSnippet = (e, t, n = !1) => {
8342
8407
  let r = {
8343
- ...e$33,
8408
+ ...e$34,
8344
8409
  platform: {
8345
8410
  desktop: {},
8346
8411
  tablet: {},
@@ -8435,50 +8500,50 @@ var o$13 = /* @__PURE__ */ new Set([
8435
8500
  "ref",
8436
8501
  "id"
8437
8502
  ]);
8438
- var s$10 = /^[A-Za-z][A-Za-z0-9_]*$/;
8439
- 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} }}`;
8440
- var p$5 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
8441
- var m$2 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
8503
+ var s$11 = /^[A-Za-z][A-Za-z0-9_]*$/;
8504
+ 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} }}`;
8505
+ var p$6 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
8506
+ var m$3 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
8442
8507
  //#endregion
8443
8508
  //#region ../sdk-shared/dist/navigation/routes.mjs
8444
- var r$14 = (e) => e.replaceAll(/\/+/g, "/");
8445
- var i$13 = (e) => r$14(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi, ":$1"));
8446
- var a$11 = (e, t) => {
8509
+ var i$13 = (e) => e.replaceAll(/\/+/g, "/");
8510
+ var a$11 = (e) => i$13(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi, ":$1"));
8511
+ var o$12 = (e, t) => {
8447
8512
  if (!t || !e[t]) return "";
8448
8513
  let { slug: n, parentId: r } = e[t];
8449
- return r ? `${a$11(e, r)}/${n}` : n;
8514
+ return r ? `${o$12(e, r)}/${n}` : n;
8450
8515
  };
8451
- function o$12(e, t, n, o = !1) {
8516
+ function s$10(e, t, n, r = !1) {
8452
8517
  let s = n.replace(/^\/+/, ""), { slug: c = "", folder: l, default: u } = e[s]?.attributes ?? {
8453
8518
  slug: s,
8454
8519
  folder: "",
8455
8520
  default: !1
8456
8521
  };
8457
- if (u && !o) return {
8522
+ if (u && !r) return {
8458
8523
  "/": n,
8459
8524
  [`/${n}`]: n
8460
8525
  };
8461
- if (u && o) return "/";
8462
- if (!l && !o) return {
8463
- [i$13(`/${c}`)]: n,
8464
- [i$13(`/${n}`)]: n
8526
+ if (u && r) return "/";
8527
+ if (!l && !r) return {
8528
+ [a$11(`/${c}`)]: n,
8529
+ [a$11(`/${n}`)]: n
8465
8530
  };
8466
- if (!l && o) return r$14(`/${c}`);
8467
- if (!t.find((e) => e.id === l)) return o ? r$14(`/${c}`) : {
8468
- [i$13(`/${c}`)]: n,
8469
- [i$13(`/${n}`)]: n
8531
+ if (!l && r) return i$13(`/${c}`);
8532
+ if (!t.find((e) => e.id === l)) return r ? i$13(`/${c}`) : {
8533
+ [a$11(`/${c}`)]: n,
8534
+ [a$11(`/${n}`)]: n
8470
8535
  };
8471
- let d = [a$11(t.reduce((e, t) => ({
8536
+ let d = [o$12(t.reduce((e, t) => ({
8472
8537
  ...e,
8473
8538
  [t.id]: t
8474
8539
  }), {}), l), c].filter(Boolean).join("/");
8475
- return o ? r$14(`/${d}`) : {
8476
- [i$13(`/${d}`)]: n,
8477
- [i$13(`/${n}`)]: n
8540
+ return r ? i$13(`/${d}`) : {
8541
+ [a$11(`/${d}`)]: n,
8542
+ [a$11(`/${n}`)]: n
8478
8543
  };
8479
8544
  }
8480
- var d$5 = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
8481
- var f$5 = (e) => d$5(i$13(e));
8545
+ var p$5 = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
8546
+ var m$2 = (e) => p$5(a$11(e));
8482
8547
  //#endregion
8483
8548
  //#region src/schema/lint/context.ts
8484
8549
  /**
@@ -8553,7 +8618,7 @@ var LintContext = class {
8553
8618
  /** The component an instance places, when the space declares it. */
8554
8619
  instanceOf(element) {
8555
8620
  const { referenceId } = element.attributes;
8556
- return m$2(element) && typeof referenceId === "string" ? p$5(this.schema, referenceId) : void 0;
8621
+ return m$3(element) && typeof referenceId === "string" ? p$6(this.schema, referenceId) : void 0;
8557
8622
  }
8558
8623
  element(id) {
8559
8624
  return Object.hasOwn(this.flat, id) ? this.flat[id] : void 0;
@@ -8582,11 +8647,15 @@ var LintContext = class {
8582
8647
  * The attributes this element reads: its type's, and what being where it is adds — an instance reads the props its
8583
8648
  * component declares, each an attribute of its own, and a child of an instance names the slot it fills.
8584
8649
  */
8650
+ /** What the element's type — its component's, for a `custom` one — writes when an attribute is left out. */
8651
+ defaultsFor(element) {
8652
+ return this.catalogs.defaultAttributes?.[this.catalogType(element) ?? element.definition.type] ?? {};
8653
+ }
8585
8654
  attributeNamesFor(element) {
8586
8655
  const names = this.attributeNames(this.catalogType(element) ?? element.definition.type);
8587
8656
  const parentId = element.definition.parentId;
8588
8657
  const parent = parentId ? this.element(parentId) : void 0;
8589
- const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$2(parent) ? ["slot"] : []];
8658
+ const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
8590
8659
  return names && extra.length > 0 ? [...names, ...extra] : names;
8591
8660
  }
8592
8661
  /** How a message names an element: its type and id, and the page or layout it is on. */
@@ -8615,8 +8684,8 @@ var LintContext = class {
8615
8684
  routeParams(id) {
8616
8685
  const rootId = this.element(id)?.definition.rootId ?? id;
8617
8686
  const slugOf = (pageId) => textOf(this.element(pageId)?.attributes.slug);
8618
- if (this.pageIds.has(rootId)) return f$5(slugOf(rootId));
8619
- return [...new Set([...this.pageIds].flatMap((pageId) => f$5(slugOf(pageId))))];
8687
+ if (this.pageIds.has(rootId)) return m$2(slugOf(rootId));
8688
+ return [...new Set([...this.pageIds].flatMap((pageId) => m$2(slugOf(pageId))))];
8620
8689
  }
8621
8690
  };
8622
8691
  //#endregion
@@ -8669,14 +8738,14 @@ var withPluginCatalogs = (options) => {
8669
8738
  const byType = (own, hosted = own) => Object.fromEntries(plugins.flatMap((declaration) => {
8670
8739
  return [[declaration.type, own(declaration)], [hostedKey(declaration), hosted(declaration)]].filter((entry) => entry[1] !== void 0);
8671
8740
  }));
8672
- const customTriggers = rest.vocabulary?.triggers?.["custom"] ?? Object.keys(e$39);
8741
+ const customTriggers = rest.vocabulary?.triggers?.["custom"] ?? Object.keys(e$40);
8673
8742
  const customCallbacks = rest.vocabulary?.callbacks?.["custom"] ?? Object.keys(a$22);
8674
8743
  const customAttributes = Object.keys(rest.defaultAttributes?.["custom"] ?? {});
8675
8744
  const vocabulary = rest.vocabulary && {
8676
8745
  ...rest.vocabulary,
8677
8746
  triggers: {
8678
8747
  ...rest.vocabulary.triggers,
8679
- ...byType((declaration) => [...Object.keys(e$39), ...actionsOf(declaration.triggers)], (declaration) => [...customTriggers, ...actionsOf(declaration.triggers)])
8748
+ ...byType((declaration) => [...Object.keys(e$40), ...actionsOf(declaration.triggers)], (declaration) => [...customTriggers, ...actionsOf(declaration.triggers)])
8680
8749
  },
8681
8750
  callbacks: {
8682
8751
  ...rest.vocabulary.callbacks,
@@ -8839,7 +8908,7 @@ var steps_exports$1 = /* @__PURE__ */ __exportAll({
8839
8908
  * the builders useless for exactly the flows that matter most.
8840
8909
  */
8841
8910
  var builtinTrigger = (trigger) => {
8842
- if (Object.hasOwn(e$39, trigger)) return e$39[trigger];
8911
+ if (Object.hasOwn(e$40, trigger)) return e$40[trigger];
8843
8912
  return Object.hasOwn(typeTriggerDefinitions, trigger) ? typeTriggerDefinitions[trigger] : void 0;
8844
8913
  };
8845
8914
  var on = (trigger, params = {}) => {
@@ -8900,7 +8969,7 @@ var onInterval = (ms) => {
8900
8969
  * and hide the arrow at the end already reached: `[named('row', onScroll()), setState({ key: 'atEnd', type:
8901
8970
  * 'boolean', value: '{{ row.atEnd }}' })]`.
8902
8971
  */
8903
- var onScroll = () => on(s$21);
8972
+ var onScroll = () => on(s$22);
8904
8973
  var onPageLoad = () => on("onPageLoad");
8905
8974
  /**
8906
8975
  * The end of a server action this element started — the trigger a `detached` run needs, because that step returns
@@ -9152,7 +9221,7 @@ var carouselPlay = (target) => carouselStep(target, "play", "Play");
9152
9221
  var carouselPause = (target) => carouselStep(target, "pause", "Pause");
9153
9222
  //#endregion
9154
9223
  //#region ../sdk-interactions/dist/sources/QueriesSource/writeParams.mjs
9155
- var e$20 = {
9224
+ var e$21 = {
9156
9225
  origin: "Requests to the same site",
9157
9226
  all: "All cached requests",
9158
9227
  elements: "Only these containers",
@@ -9164,7 +9233,7 @@ var t$16 = (t, n = () => !0) => ({
9164
9233
  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.",
9165
9234
  default: t[0],
9166
9235
  options: [...t],
9167
- optionLabels: Object.fromEntries(t.map((t) => [t, e$20[t]])),
9236
+ optionLabels: Object.fromEntries(t.map((t) => [t, e$21[t]])),
9168
9237
  label: "Refresh cached requests",
9169
9238
  canBind: !1,
9170
9239
  when: n
@@ -9248,7 +9317,7 @@ var t$15 = {
9248
9317
  };
9249
9318
  //#endregion
9250
9319
  //#region ../sdk-interactions/dist/sources/AuthSource/callbacks.mjs
9251
- var e$19 = {
9320
+ var e$20 = {
9252
9321
  login: {
9253
9322
  source: "auth",
9254
9323
  title: "Auth Login",
@@ -9336,7 +9405,7 @@ var e$19 = {
9336
9405
  };
9337
9406
  //#endregion
9338
9407
  //#region ../sdk-interactions/dist/sources/HostSource/callbacks.mjs
9339
- var e$18 = { hostAction: {
9408
+ var e$19 = { hostAction: {
9340
9409
  source: "host",
9341
9410
  title: "Host Action",
9342
9411
  strictParams: !0,
@@ -9355,7 +9424,7 @@ var e$18 = { hostAction: {
9355
9424
  } };
9356
9425
  //#endregion
9357
9426
  //#region ../sdk-interactions/dist/sources/NavigationSource/callbacks.mjs
9358
- var e$17 = { navigate: {
9427
+ var e$18 = { navigate: {
9359
9428
  source: "navigation",
9360
9429
  title: "Navigate",
9361
9430
  strictParams: !0,
@@ -9384,7 +9453,7 @@ var e$17 = { navigate: {
9384
9453
  } };
9385
9454
  //#endregion
9386
9455
  //#region ../sdk-interactions/dist/sources/QueriesSource/callbacks.mjs
9387
- var e$16 = { invalidateQueries: {
9456
+ var e$17 = { invalidateQueries: {
9388
9457
  source: "queries",
9389
9458
  title: "Invalidate Queries",
9390
9459
  strictParams: !0,
@@ -9407,7 +9476,7 @@ var e$16 = { invalidateQueries: {
9407
9476
  } };
9408
9477
  //#endregion
9409
9478
  //#region ../sdk-interactions/dist/sources/StateSource/callbacks.mjs
9410
- var e$15 = {
9479
+ var e$16 = {
9411
9480
  setState: {
9412
9481
  source: "state",
9413
9482
  title: "Set State",
@@ -9559,7 +9628,7 @@ var e$15 = {
9559
9628
  };
9560
9629
  //#endregion
9561
9630
  //#region ../sdk-shared/dist/authoring/spaceCallbacks.mjs
9562
- var e$14 = { addNotification: {
9631
+ var e$15 = { addNotification: {
9563
9632
  source: "space",
9564
9633
  title: "Add Notification",
9565
9634
  strictParams: !0,
@@ -9625,13 +9694,13 @@ var e$14 = { addNotification: {
9625
9694
  * of them is an authoring question nobody at runtime asks.
9626
9695
  */
9627
9696
  var BUILTIN_GLOBAL_CALLBACKS = {
9628
- ...e$14,
9629
9697
  ...e$15,
9630
- ...e$18,
9631
- ...e$17,
9698
+ ...e$16,
9632
9699
  ...e$19,
9700
+ ...e$18,
9701
+ ...e$20,
9633
9702
  ...t$15,
9634
- ...e$16
9703
+ ...e$17
9635
9704
  };
9636
9705
  /** The built-in globalCallback for an action, or undefined when the action is not a known built-in (a plugin
9637
9706
  * callback whose source/schema is not knowable here). */
@@ -9645,7 +9714,7 @@ var applyBuiltinCallback = (action, params) => {
9645
9714
  const builtin = BUILTIN_GLOBAL_CALLBACKS[action];
9646
9715
  return {
9647
9716
  source: builtin.source,
9648
- params: s$22(params, builtin.params, builtin.strictParams)
9717
+ params: c$19(params, builtin.params, builtin.strictParams)
9649
9718
  };
9650
9719
  };
9651
9720
  //#endregion
@@ -9659,6 +9728,7 @@ var steps_exports = /* @__PURE__ */ __exportAll({
9659
9728
  authRefreshDetails: () => authRefreshDetails,
9660
9729
  cancelServerAction: () => cancelServerAction,
9661
9730
  clearState: () => clearState,
9731
+ copyToClipboard: () => copyToClipboard,
9662
9732
  cycleState: () => cycleState,
9663
9733
  delay: () => delay,
9664
9734
  hostAction: () => hostAction,
@@ -9855,6 +9925,12 @@ var utilityStep = (action, params = {}) => ({
9855
9925
  /** Milliseconds. The param is `time` — not `delay`, `duration` or `ms`, any of which waits zero. */
9856
9926
  var delay = (time) => utilityStep("delayTime", { time });
9857
9927
  /**
9928
+ * Copies `text` to the visitor's clipboard — a template like any param: `copyToClipboard('{{ navigation.href }}')` copies
9929
+ * the page's address. Where the browser offers no clipboard the step fails, so a flow's `onFailure` says so and its
9930
+ * "Copied" never shows for nothing.
9931
+ */
9932
+ var copyToClipboard = (text) => utilityStep("copyToClipboard", { text });
9933
+ /**
9858
9934
  * Calls a URL and puts the answer in the flow scope as `{{ <id>.response.status }}` and `{{ <id>.response.data }}`.
9859
9935
  *
9860
9936
  * `body` takes an object for the reason {@link runServerAction}'s `input` does, and this is the surface where it
@@ -9868,6 +9944,20 @@ var delay = (time) => utilityStep("delayTime", { time });
9868
9944
  var webHook = (params) => utilityStep("webHook", params);
9869
9945
  var twigTemplate = (params) => utilityStep("twigTemplate", params);
9870
9946
  //#endregion
9947
+ //#region ../sdk-interactions/dist/utility/copyToClipboardSpec.mjs
9948
+ var e$14 = {
9949
+ title: "Copy To Clipboard",
9950
+ type: "utility",
9951
+ strictParams: !0,
9952
+ params: { text: {
9953
+ type: "text",
9954
+ description: "The words to copy — a template reads the page: {{ navigation.href }} is its address.",
9955
+ default: "",
9956
+ label: "Text",
9957
+ required: !0
9958
+ } }
9959
+ };
9960
+ //#endregion
9871
9961
  //#region ../sdk-interactions/dist/utility/webHookSpec.mjs
9872
9962
  var t$14 = (e) => {
9873
9963
  let t = typeof e.method == "string" ? e.method.toLowerCase() : "get";
@@ -9984,7 +10074,8 @@ var BUILTIN_UTILITIES = {
9984
10074
  status: "",
9985
10075
  data: ""
9986
10076
  } }
9987
- }
10077
+ },
10078
+ copyToClipboard: e$14
9988
10079
  };
9989
10080
  /** The built-in utility for an action, or undefined when the action is not a known built-in utility. */
9990
10081
  var getUtility = (action) => Object.hasOwn(BUILTIN_UTILITIES, action) ? BUILTIN_UTILITIES[action] : void 0;
@@ -9998,7 +10089,68 @@ var applyUtility = (action, params) => {
9998
10089
  };
9999
10090
  return {
10000
10091
  known: true,
10001
- params: s$22(params, utility.params, utility.strictParams)
10092
+ params: c$19(params, utility.params, utility.strictParams)
10093
+ };
10094
+ };
10095
+ var NOT_FOUND_ID = "plitzi-not-found";
10096
+ /**
10097
+ * The page a space that declares none of its own answers an unknown address with — inside the home page's layout, so
10098
+ * a visitor who mistyped a link is still on the site: what was asked for is not here, and the way home.
10099
+ */
10100
+ var defaultNotFoundPage = (home) => ({
10101
+ id: NOT_FOUND_ID,
10102
+ name: "Not found",
10103
+ slug: "*",
10104
+ seoTitle: "Page not found",
10105
+ ...home?.layout ? { layout: home.layout } : {},
10106
+ body: [container({
10107
+ id: `${NOT_FOUND_ID}-body`,
10108
+ css: {
10109
+ display: "flex",
10110
+ "flex-direction": "column",
10111
+ "align-items": "center",
10112
+ "row-gap": "16px",
10113
+ padding: "96px 24px",
10114
+ "text-align": "center"
10115
+ },
10116
+ children: [
10117
+ heading("Page not found", {
10118
+ id: `${NOT_FOUND_ID}-title`,
10119
+ subType: "h1"
10120
+ }),
10121
+ paragraph({
10122
+ id: `${NOT_FOUND_ID}-text`,
10123
+ content: "There is nothing at this address."
10124
+ }),
10125
+ link({
10126
+ id: `${NOT_FOUND_ID}-home`,
10127
+ href: "/",
10128
+ content: "Back to the home page"
10129
+ })
10130
+ ]
10131
+ })]
10132
+ });
10133
+ var isTopLevelNotFound = (page) => page.slug === "*" && !page.folder;
10134
+ /**
10135
+ * The space with a page for the addresses no page answers: its own, or — when it declares none — a plain one, said as a
10136
+ * 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
10137
+ * as it is, for authoring to refuse.
10138
+ */
10139
+ var withNotFoundPage = (spec) => {
10140
+ if (!Array.isArray(spec.pages) || spec.pages.length === 0 || spec.pages.some(isTopLevelNotFound)) return { spec };
10141
+ const home = spec.pages.find((page) => page.slug === "" && !page.folder);
10142
+ const page = defaultNotFoundPage(home);
10143
+ return {
10144
+ spec: {
10145
+ ...spec,
10146
+ pages: [...spec.pages, page]
10147
+ },
10148
+ added: {
10149
+ code: "not-found-page",
10150
+ 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.`,
10151
+ elementIds: [NOT_FOUND_ID],
10152
+ saves: 0
10153
+ }
10002
10154
  };
10003
10155
  };
10004
10156
  //#endregion
@@ -10881,8 +11033,8 @@ var lintLinkHash = (ctx, link, anchorsByPage) => {
10881
11033
  }
10882
11034
  if ((attributeText$1(link, "mode") || "page") !== "page") return;
10883
11035
  const { flat, schema } = ctx;
10884
- const path = o$12(flat, schema.pageFolders, attributeText$1(link, "href"), true);
10885
- const pageId = [...ctx.pageIds].find((id) => o$12(flat, schema.pageFolders, id, true) === path);
11036
+ const path = s$10(flat, schema.pageFolders, attributeText$1(link, "href"), true);
11037
+ const pageId = [...ctx.pageIds].find((id) => s$10(flat, schema.pageFolders, id, true) === path);
10886
11038
  if (!pageId) return;
10887
11039
  const anchors = anchorsByPage(pageId);
10888
11040
  if (!anchors.has(hash)) {
@@ -10956,9 +11108,9 @@ var s$8 = /* @__PURE__ */ new Set([
10956
11108
  ]);
10957
11109
  var c$7 = (t, n) => {
10958
11110
  let r = [];
10959
- 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$31(n)) return [...r, "a channel is an object: `{ access: { mode: \"public\" } }`"];
10960
- let { access: i, publish: a, presence: c, grant: l, maxMessageBytes: u, messagesPerSecond: d } = n, f = e$31(i) ? i.mode : void 0;
10961
- typeof f != "string" || !s$8.has(f) ? r.push("`access` is { mode: \"public\" }, { mode: \"session\" } or { mode: \"role\", permissions: […] }") : f === "role" && !(e$31(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");
11111
+ 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\" } }`"];
11112
+ let { access: i, publish: a, presence: c, grant: l, maxMessageBytes: u, messagesPerSecond: d } = n, f = e$32(i) ? i.mode : void 0;
11113
+ 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");
10962
11114
  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`);
10963
11115
  return r;
10964
11116
  };
@@ -11009,7 +11161,7 @@ var lintInstances = (ctx) => {
11009
11161
  const bound = boundProps(element);
11010
11162
  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);
11011
11163
  const written = Object.fromEntries(Object.keys(declared).map((name) => [name, element.attributes[name]]));
11012
- for (const { key, expected, got, options } of o$25(written, written, declared)) {
11164
+ for (const { key, expected, got, options } of s$23(written, written, declared)) {
11013
11165
  const value = written[key];
11014
11166
  const suggestion = options && typeof value === "string" ? didYouMean(value, options) : "";
11015
11167
  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);
@@ -11738,7 +11890,7 @@ var c$5 = class {
11738
11890
  }
11739
11891
  };
11740
11892
  var l$6 = (e) => {
11741
- let r = e$35(e);
11893
+ let r = e$36(e);
11742
11894
  if (r.error) return {
11743
11895
  issues: [r.error],
11744
11896
  freeNames: []
@@ -12188,21 +12340,32 @@ var checkBindings = (ctx, element, where) => {
12188
12340
  }
12189
12341
  };
12190
12342
  /**
12343
+ * The attributes the page server evaluates in full, by element type — never rendered, so never held to what an
12344
+ * attribute resolves: a provider's `notFound`, read against its answer (`source`) once it is in.
12345
+ */
12346
+ var SERVER_EXPRESSIONS = { apiContainer: ["notFound"] };
12347
+ /**
12191
12348
  * An attribute's `{{ token }}` against what the attribute will see when it renders — and a condition in an attribute,
12192
12349
  * which is used as written: an attribute only resolves a name with filters.
12193
12350
  */
12194
12351
  var checkAttributeTemplates = (ctx, element, where) => {
12195
12352
  if (PROSE_TYPES.has(element.definition.type)) return;
12196
- 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 });
12353
+ const evaluated = SERVER_EXPRESSIONS[element.definition.type] ?? [];
12354
+ const rendered = Object.fromEntries(Object.entries(element.attributes).filter(([name]) => !evaluated.includes(name)));
12355
+ for (const name of evaluated) {
12356
+ const value = element.attributes[name];
12357
+ if (typeof value === "string" && value !== "") checkTemplate(ctx, value, `${where}: its "${name}"`, { kind: "binding" }, ctx.scope(element.id), element.id);
12358
+ }
12359
+ for (const value of stringsIn$1(rendered)) 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 });
12197
12360
  const routeParams = ctx.routeParams(element.id);
12198
12361
  const scope = ctx.scope(element.id);
12199
- for (const [name, value] of Object.entries(element.attributes)) if (typeof value === "string" && n$46(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
12362
+ for (const [name, value] of Object.entries(rendered)) if (typeof value === "string" && n$46(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
12200
12363
  kind: "attribute",
12201
12364
  routeParams
12202
12365
  }, scope, element.id);
12203
12366
  };
12204
12367
  /** A value at a dotted path of a record, as the list reads its `itemKey`. */
12205
- var fieldOf = (item, path) => path.split(".").reduce((value, key) => e$31(value) ? value[key] : void 0, item);
12368
+ var fieldOf = (item, path) => path.split(".").reduce((value, key) => e$32(value) ? value[key] : void 0, item);
12206
12369
  /**
12207
12370
  * A list's `itemKey` that does not name each of its fixed items once. The list falls back to the items' `id`, then to
12208
12371
  * their position, so the rows do not stay with their items as the author meant. Bound items arrive at run time and
@@ -12282,6 +12445,11 @@ var checkIntent = (ctx, element, where) => {
12282
12445
  "query"
12283
12446
  ].find((key) => typeof attributes[key] === "string" && attributes[key] !== "");
12284
12447
  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);
12448
+ const notFound = attributes.notFound;
12449
+ if (typeof notFound === "string" && notFound !== "") {
12450
+ 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);
12451
+ 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);
12452
+ }
12285
12453
  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 });
12286
12454
  const fallback = ctx.catalogs.defaultAttributes?.[type]?.content;
12287
12455
  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, {
@@ -12390,13 +12558,13 @@ var isRead = (name, schema, elements) => {
12390
12558
  var lintDeclaration = (ctx, name, flag) => {
12391
12559
  const where = `Feature flag "${name}"`;
12392
12560
  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, "_")}".`);
12393
- if (!e$31(flag) || typeof flag.value !== "boolean" || !Array.isArray(flag.rules)) {
12561
+ if (!e$32(flag) || typeof flag.value !== "boolean" || !Array.isArray(flag.rules)) {
12394
12562
  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.`);
12395
12563
  return;
12396
12564
  }
12397
12565
  flag.rules.forEach((rule, index) => {
12398
12566
  const at = `${where}, rule ${index + 1}`;
12399
- if (!e$31(rule) || typeof rule.value !== "boolean" || !e$31(rule.when)) {
12567
+ if (!e$32(rule) || typeof rule.value !== "boolean" || !e$32(rule.when)) {
12400
12568
  ctx.error("flag-rule-shape", `${at} is ${JSON.stringify(rule)}. A rule is { when: { … }, value: true | false }.`);
12401
12569
  return;
12402
12570
  }
@@ -12468,7 +12636,7 @@ var flowsOf$1 = (element) => {
12468
12636
  */
12469
12637
  var checkElementIds = (ctx, params, spec, at, hostId) => {
12470
12638
  const declared = spec ?? {};
12471
- const effective = s$22(params, declared, false);
12639
+ const effective = c$19(params, declared, false);
12472
12640
  for (const [key, param] of Object.entries(declared)) {
12473
12641
  const ids = params[key];
12474
12642
  if (param.type !== "elementIds" || !Array.isArray(ids) || param.when && !param.when(effective)) continue;
@@ -12810,7 +12978,7 @@ var attributeText = (element, key) => {
12810
12978
  /** 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. */
12811
12979
  var pathOf = (ctx, link, mode) => {
12812
12980
  const href = attributeText(link, "href");
12813
- if (mode === "page") return o$12(ctx.flat, ctx.schema.pageFolders, href, true);
12981
+ if (mode === "page") return s$10(ctx.flat, ctx.schema.pageFolders, href, true);
12814
12982
  return `/${href}`.replaceAll(/\/+/g, "/").split(/[?#]/)[0];
12815
12983
  };
12816
12984
  /**
@@ -12978,7 +13146,7 @@ var f$3 = /* @__PURE__ */ new Set([
12978
13146
  "loop"
12979
13147
  ]);
12980
13148
  var p$3 = (i) => {
12981
- if (!e$31(i)) return ["motion is an object: `{ enter: \"fade-up\", on: \"view\" }`"];
13149
+ if (!e$32(i)) return ["motion is an object: `{ enter: \"fade-up\", on: \"view\" }`"];
12982
13150
  let a = [];
12983
13151
  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`);
12984
13152
  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(", ")}`);
@@ -13170,9 +13338,23 @@ var stepsOf = (element) => Object.values(element.definition.interactions ?? {});
13170
13338
  * A key the element or step does not take, renamed to the one it was a typo of — when that one is free — or dropped:
13171
13339
  * it was never read, so dropping it changes nothing on screen.
13172
13340
  */
13173
- var settleUnknownKeys = (record, known, what, on, report) => {
13341
+ var settleUnknownKeys = (record, known, what, on, report, defaults = {}) => {
13174
13342
  for (const key of Object.keys(record)) {
13175
13343
  if (known.includes(key)) continue;
13344
+ const wrapped = record[key];
13345
+ if (e$32(wrapped) && Object.keys(wrapped).length > 0 && Object.keys(wrapped).every((inner) => known.includes(inner))) {
13346
+ const inners = Object.keys(wrapped);
13347
+ if (inners.every((inner) => record[inner] === void 0 || record[inner] === defaults[inner])) {
13348
+ Object.assign(record, wrapped);
13349
+ Reflect.deleteProperty(record, key);
13350
+ report(`Moved ${inners.join(", ")} out of the ${what} "${key}", up to where ${inners.length === 1 ? "it is" : "they are"} read.`, {
13351
+ on,
13352
+ op: "unwrap",
13353
+ key
13354
+ });
13355
+ }
13356
+ continue;
13357
+ }
13176
13358
  const meant = closest(key, known);
13177
13359
  if (meant !== void 0 && record[meant] === void 0) {
13178
13360
  record[meant] = record[key];
@@ -13227,7 +13409,7 @@ var FIXERS = {
13227
13409
  },
13228
13410
  "unknown-attribute": (element, ctx, report) => {
13229
13411
  const names = ctx.attributeNamesFor(element);
13230
- if (!isRoot(element) && names) settleUnknownKeys(element.attributes, names, "attribute", "attribute", report);
13412
+ if (!isRoot(element) && names) settleUnknownKeys(element.attributes, names, "attribute", "attribute", report, ctx.defaultsFor(element));
13231
13413
  },
13232
13414
  "attribute-kind": (element, ctx, report) => {
13233
13415
  const defaults = ctx.catalogs.defaultAttributes?.[element.definition.type] ?? {};
@@ -13882,16 +14064,16 @@ var n$1 = (n) => {
13882
14064
  dark: []
13883
14065
  };
13884
14066
  return Object.entries(r).forEach(([n, r]) => {
13885
- switch (n$20(n) ? n : e$27.CUSTOM) {
13886
- case e$27.COLOR:
14067
+ switch (n$20(n) ? n : e$28.CUSTOM) {
14068
+ case e$28.COLOR:
13887
14069
  Object.keys(r).forEach((e) => {
13888
14070
  let t = r[e];
13889
14071
  i.default.push(`--${e}:${t.default};`), t.light && i.light.push(`--${e}:${t.light};`), t.dark && i.dark.push(`--${e}:${t.dark};`);
13890
14072
  });
13891
14073
  break;
13892
- case e$27.SPACING:
13893
- case e$27.SHADOW:
13894
- case e$27.CUSTOM:
14074
+ case e$28.SPACING:
14075
+ case e$28.SHADOW:
14076
+ case e$28.CUSTOM:
13895
14077
  default: Object.keys(r).forEach((e) => {
13896
14078
  i.default.push(`--${e}:${r[e]};`);
13897
14079
  });
@@ -13918,9 +14100,9 @@ var p = (e, t, n = "") => [`${e}[data-variant="${t}"]${n}`, `${e}--${t}${n}`];
13918
14100
  var m = (e, t, n) => {
13919
14101
  let r = t ? "," : ", ", i = [];
13920
14102
  for (let [l, { default: u, states: d, variants: f }] of Object.entries(e)) {
13921
- let e = p$6(l), m = e ? "" : `.${l}`, h = e ? " > &" : " &", g = e ? "*" : m;
14103
+ let e = p$7(l), m = e ? "" : `.${l}`, h = e ? " > &" : " &", g = e ? "*" : m;
13922
14104
  u?.length && i.push(y(`:where(${g})${h}`, u, {}, t, n));
13923
- 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));
14105
+ for (let [e, r] of o$15(d ?? {})) i.push(y(`:where(${m}${u$6(e)})${h}`, r, {}, t, n)), d$6(e) && i.push(v(`:where(${g})${h}`, r, t, n));
13924
14106
  let _ = (t, n = "") => e ? [`[data-variant="${t}"]${n}`] : p(m, t, n);
13925
14107
  for (let [e, o] of Object.entries(f ?? {})) {
13926
14108
  if (o.default.length) {
@@ -13929,15 +14111,15 @@ var m = (e, t, n) => {
13929
14111
  }
13930
14112
  for (let [l, u] of o$15(o.states ?? {})) {
13931
14113
  let a = _(e, u$6(l)).join(r);
13932
- i.push(y(`:where(${a})${h}`, u, {}, t, n)), d$7(l) && i.push(v(`:where(${_(e).join(r)})${h}`, u, t, n));
14114
+ i.push(y(`:where(${a})${h}`, u, {}, t, n)), d$6(l) && i.push(v(`:where(${_(e).join(r)})${h}`, u, t, n));
13933
14115
  }
13934
14116
  }
13935
14117
  }
13936
14118
  return i;
13937
14119
  };
13938
14120
  var h = (e, t, n) => Object.entries(e).flatMap(([e, { default: r, states: o }]) => {
13939
- let l = r$18(e), u = r.length ? [y(`&${l}`, r, {}, t, n)] : [];
13940
- 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));
14121
+ let l = r$17(e), u = r.length ? [y(`&${l}`, r, {}, t, n)] : [];
14122
+ for (let [e, r] of o$15(o ?? {})) u.push(y(`&${u$6(e)}${l}`, r, {}, t, n)), d$6(e) && u.push(v(`&${l}`, r, t, n));
13941
14123
  return u;
13942
14124
  });
13943
14125
  var g = (e, t, n, i) => Object.entries(t).flatMap(([t, { default: a, states: o, pseudos: s }]) => {
@@ -13952,7 +14134,7 @@ var g = (e, t, n, i) => Object.entries(t).flatMap(([t, { default: a, states: o,
13952
14134
  var _ = (e, t, n, r = !0, i = l$1) => {
13953
14135
  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]) => {
13954
14136
  let n = y(`&${u$6(e)}`, t, {}, r, i + l$1);
13955
- return d$7(e) ? [n, v("&", t, r, i + l$1)] : [n];
14137
+ return d$6(e) ? [n, v("&", t, r, i + l$1)] : [n];
13956
14138
  }) : [], S = e.replace("plitzi__", ""), C = d ? Object.entries(d).map(([e, t]) => y(`&[data-variant="${e}"]${r ? "," : ", "}&${S}--${e}`, t.default, {
13957
14139
  states: t.states,
13958
14140
  pseudos: t.pseudos
@@ -14006,9 +14188,9 @@ var o$2 = (e, t = ":root", n = 2, r = !0) => {
14006
14188
  };
14007
14189
  //#endregion
14008
14190
  //#region ../sdk-style/dist/StyleHelper.mjs
14009
- var s$1 = Object.fromEntries(e$28.map((e) => [e, t$26(e)]));
14191
+ var s$1 = Object.fromEntries(e$29.map((e) => [e, t$26(e)]));
14010
14192
  var c = (e) => {
14011
- if (t$25(e)) return e$29[e];
14193
+ if (t$25(e)) return e$30[e];
14012
14194
  let t = e.match(/(\d*\.?\d+)(px|rem)/);
14013
14195
  if (!t) return 0;
14014
14196
  let r = parseFloat(t[1]);
@@ -14861,7 +15043,7 @@ var byProperty = (rules) => {
14861
15043
  return responsive;
14862
15044
  };
14863
15045
  /** The states a selector can react to — the closed list the style editor offers, read from where it is declared. */
14864
- var STYLE_STATES = e$24;
15046
+ var STYLE_STATES = e$25;
14865
15047
  var STYLE_STATE_SET = new Set(STYLE_STATES);
14866
15048
  var RULE_SET_KEYS = /* @__PURE__ */ new Set([
14867
15049
  "css",
@@ -14888,7 +15070,7 @@ var toStates = (states) => {
14888
15070
  };
14889
15071
  var CLASS_NAME = /^-?[_a-zA-Z][\w-]*$/;
14890
15072
  var toAncestors = (ancestors) => Object.entries(ancestors ?? {}).map(([name, ancestor]) => {
14891
- 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.`);
15073
+ 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.`);
14892
15074
  return [name, toBlocks({
14893
15075
  css: ancestor.css,
14894
15076
  states: ancestor.states,
@@ -14926,7 +15108,7 @@ var assertPseudo = (pseudo, part) => {
14926
15108
  for (const rules of ruleSets) for (const [property, value] of Object.entries(rules)) {
14927
15109
  if (property === "content") {
14928
15110
  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.`);
14929
- 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.`);
15111
+ 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.`);
14930
15112
  continue;
14931
15113
  }
14932
15114
  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.`);
@@ -14937,7 +15119,7 @@ var toPseudos = (pseudos) => {
14937
15119
  const parts = /* @__PURE__ */ new Map();
14938
15120
  for (const [name, spec] of Object.entries(pseudos ?? {})) {
14939
15121
  const bare = name.replace(/^:+/, "");
14940
- 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$25)}. A class dresses ${e$25.join(", ")}.`);
15122
+ 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(", ")}.`);
14941
15123
  const part = partOf(spec);
14942
15124
  const rules = {
14943
15125
  base: toResponsive(part.css),
@@ -16687,7 +16869,7 @@ var isPlainIcon = ({ attributes }) => !attributes.label && (attributes.size ?? "
16687
16869
  * its own (a binding, a flow, a condition), an icon that means something (`label`) or is sized or animated, and a
16688
16870
  * text that is a drawn shape are left alone, since none of that would move with them.
16689
16871
  *
16690
- * What the `content-attribute` suggestion says, and what `plitzi fix` writes for the moves with no class to carry.
16872
+ * What the `content-attribute` suggestion says, and what `plitzi space fix` writes for the moves with no class to carry.
16691
16873
  */
16692
16874
  var contentMoves = (schema, style) => {
16693
16875
  const { flat } = schema;
@@ -16935,7 +17117,7 @@ var declarationsOf = (body) => {
16935
17117
  * there, and a `content` CSS can read. A rule that does not is left in `customCss`, where it was written and does exactly
16936
17118
  * what it did.
16937
17119
  */
16938
- var pseudoHolds = (pseudo, rules) => Object.entries(rules).every(([property, value]) => property === "content" ? i$16.includes(pseudo) && m$3(String(value)) : u$7(pseudo, property));
17120
+ var pseudoHolds = (pseudo, rules) => Object.entries(rules).every(([property, value]) => property === "content" ? i$16.includes(pseudo) && m$4(String(value)) : u$7(pseudo, property));
16939
17121
  /** Where a pseudo-element's rules land, its state aside: the class, the pseudo-element and the condition. */
16940
17122
  var pseudoKey = ({ className, pseudo, condition }) => `${className}::${pseudo ?? ""}@${condition ?? ""}`;
16941
17123
  /**
@@ -16981,7 +17163,7 @@ var foldCustomCss = (stylesheet, isClass, accepts = () => true) => {
16981
17163
  const segments = stylesheetSegments(stylesheet);
16982
17164
  const candidates = segments.map((segment) => {
16983
17165
  if (segment.kind === "other") return;
16984
- const condition = segment.kind === "atRule" ? f$7(segment.prelude) : void 0;
17166
+ const condition = segment.kind === "atRule" ? f$6(segment.prelude) : void 0;
16985
17167
  if (segment.kind === "atRule" && !condition) return;
16986
17168
  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);
16987
17169
  return rules.length > 0 && rules.every((rule) => rule !== void 0) ? rules : void 0;
@@ -17232,7 +17414,7 @@ var suggestCustomCssSlots = (schema) => {
17232
17414
  */
17233
17415
  var NAME = /[\w-]+/g;
17234
17416
  /** Every word the space's documents say outside the declaration being asked about. */
17235
- var wordsOf = (...texts) => new Set(texts.flatMap((text) => text.match(NAME) ?? []));
17417
+ var wordsOf$1 = (...texts) => new Set(texts.flatMap((text) => text.match(NAME) ?? []));
17236
17418
  var TOKEN_USE = /var\(\s*--([\w-]+)/g;
17237
17419
  var tokensRead = (...texts) => new Set(texts.flatMap((text) => Array.from(text.matchAll(TOKEN_USE), (match) => match[1])));
17238
17420
  var list = (names, limit = 6) => `${names.slice(0, limit).map((name) => `\`${name}\``).join(", ")}${names.length > limit ? `, and ${String(names.length - limit)} more` : ""}`;
@@ -17244,7 +17426,7 @@ var plural = (count, one, many) => count === 1 ? one : many;
17244
17426
  var classesOf$1 = (style) => {
17245
17427
  const items = Object.values(style.platform).flatMap((byName) => Object.values(byName));
17246
17428
  const namedBy = /* @__PURE__ */ new Map();
17247
- for (const item of items) for (const word of wordsOf(JSON.stringify(item.attributes))) namedBy.set(word, /* @__PURE__ */ new Set([...namedBy.get(word) ?? [], item.name]));
17429
+ for (const item of items) for (const word of wordsOf$1(JSON.stringify(item.attributes))) namedBy.set(word, /* @__PURE__ */ new Set([...namedBy.get(word) ?? [], item.name]));
17248
17430
  return {
17249
17431
  names: new Set(items.filter((item) => item.type === "class").map((item) => item.name)),
17250
17432
  namedBy
@@ -17253,7 +17435,7 @@ var classesOf$1 = (style) => {
17253
17435
  var unusedClassNames = (schema, style) => {
17254
17436
  const { names, namedBy } = classesOf$1(style);
17255
17437
  if (names.size === 0) return [];
17256
- const schemaWords = wordsOf(JSON.stringify(schema));
17438
+ const schemaWords = wordsOf$1(JSON.stringify(schema));
17257
17439
  return [...names].filter((name) => !schemaWords.has(name) && ![...namedBy.get(name) ?? []].some((item) => item !== name)).sort();
17258
17440
  };
17259
17441
  var unusedClasses = (unused) => {
@@ -17278,11 +17460,11 @@ var tokensOf$1 = (style) => Object.values(style.variables).flatMap((group) => Ob
17278
17460
  name,
17279
17461
  value
17280
17462
  })));
17281
- var unusedTokenNames = (schema, style) => {
17463
+ var unusedTokenNames = (schema, style, stylesheets = []) => {
17282
17464
  const tokens = tokensOf$1(style);
17283
17465
  if (tokens.length === 0) return [];
17284
17466
  const items = Object.values(style.platform).flatMap((byName) => Object.values(byName));
17285
- 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 ?? []));
17467
+ 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);
17286
17468
  return tokens.map((token) => token.name).filter((name) => !read.has(name)).sort();
17287
17469
  };
17288
17470
  var unusedTokens = (unused) => {
@@ -17292,7 +17474,7 @@ var unusedTokens = (unused) => {
17292
17474
  elementIds: [],
17293
17475
  subjects: unused,
17294
17476
  saves: 0,
17295
- 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.`
17477
+ 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.`
17296
17478
  }];
17297
17479
  };
17298
17480
  var ABSOLUTE = /* @__PURE__ */ new Set([
@@ -17358,13 +17540,13 @@ var unusedComponents = (schema, unused) => {
17358
17540
  * What a space declares and nothing uses — its classes, tokens and components — by the one rule the suggestions, the
17359
17541
  * builder's Usages panel and anything else that says "unused" read, so they never disagree.
17360
17542
  */
17361
- var unusedDeclarations = (schema, style) => ({
17543
+ var unusedDeclarations = (schema, style, stylesheets = []) => ({
17362
17544
  classes: unusedClassNames(schema, style),
17363
- tokens: unusedTokenNames(schema, style),
17545
+ tokens: unusedTokenNames(schema, style, stylesheets),
17364
17546
  components: unusedComponentIds(schema)
17365
17547
  });
17366
- var suggestDeclarations = (schema, style) => {
17367
- const unused = unusedDeclarations(schema, style);
17548
+ var suggestDeclarations = (schema, style, stylesheets = []) => {
17549
+ const unused = unusedDeclarations(schema, style, stylesheets);
17368
17550
  return [
17369
17551
  ...unusedComponents(schema, unused.components),
17370
17552
  ...unusedClasses(unused.classes),
@@ -17610,7 +17792,7 @@ var signaturesOf = (flat, declared) => {
17610
17792
  const wired = /* @__PURE__ */ new Set([
17611
17793
  ...Object.values(bindings ?? {}).flat().flatMap(({ source }) => own.some((read) => read.source === source) ? [] : [`read:${source}`]),
17612
17794
  ...Object.values(interactions ?? {}).flatMap((node) => {
17613
- const key = e$31(node.params) ? node.params.key : void 0;
17795
+ const key = e$32(node.params) ? node.params.key : void 0;
17614
17796
  return typeof key === "string" ? [`write:${key}`] : [];
17615
17797
  }),
17616
17798
  ...children.flatMap((child) => child.wiring.split("\n").filter(Boolean))
@@ -17787,7 +17969,7 @@ var erasedOn = (classes, mode) => {
17787
17969
  const found = /* @__PURE__ */ new Map();
17788
17970
  for (const width of WIDTHS) {
17789
17971
  const layers = CASCADE[mode][width];
17790
- for (const state of [void 0, ...e$24]) for (const [longhand, candidates] of candidatesAt(classes, layers, state)) {
17972
+ for (const state of [void 0, ...e$25]) for (const [longhand, candidates] of candidatesAt(classes, layers, state)) {
17791
17973
  const winner = candidates[candidates.length - 1];
17792
17974
  if (winner.shorthand === void 0) continue;
17793
17975
  for (const lost of candidates) {
@@ -17884,13 +18066,13 @@ var quietCodes = (schema) => new Map([schema.flat, ...Object.values(schema.compo
17884
18066
  * Each names what to write instead, and the ones about elements say how many it saves, which is what they are ranked
17885
18067
  * by.
17886
18068
  */
17887
- var suggestSpace = ({ schema, style }) => withoutQuieted(schema, [
18069
+ var suggestSpace = ({ schema, style }, { stylesheets = [] } = {}) => withoutQuieted(schema, [
17888
18070
  ...suggestRepeats(schema, style),
17889
18071
  ...suggestContent(schema, style),
17890
18072
  ...suggestCustomCss(schema, style),
17891
18073
  ...suggestCustomCssSlots(schema),
17892
18074
  ...suggestMotion(schema, style),
17893
- ...suggestDeclarations(schema, style)
18075
+ ...suggestDeclarations(schema, style, stylesheets)
17894
18076
  ]).sort((a, b) => b.saves - a.saves);
17895
18077
  /** The suggestions no element they are about quiets — for those read beside the documents, too (authoring's own). */
17896
18078
  var withoutQuieted = (schema, suggestions) => {
@@ -18217,6 +18399,7 @@ var o$1 = (i, a) => {
18217
18399
  code: "UNRESOLVED_BINDING_SOURCE",
18218
18400
  message: `${f}, but no element answers to the name "${d}"`,
18219
18401
  elementId: i.id,
18402
+ missing: d,
18220
18403
  details: {
18221
18404
  source: o.source,
18222
18405
  elementId: d
@@ -18267,7 +18450,9 @@ var o$1 = (i, a) => {
18267
18450
  }), a.type === "callback" && a.elementId && !t.has(a.elementId) && s.push({
18268
18451
  code: "UNRESOLVED_INTERACTION_TARGET",
18269
18452
  message: `Interaction "${a.id}" on element "${n.id}" runs against "${a.elementId}", but no element answers to that name`,
18270
- elementId: n.id
18453
+ elementId: n.id,
18454
+ missing: a.elementId,
18455
+ wantedBy: a.action
18271
18456
  });
18272
18457
  let o = a.type === "trigger" && a.action === "onSubmit" && a.enabled ? g(a.elementId ?? n.id) : void 0;
18273
18458
  o?.definition.type === "form" && o.attributes.managedByInteractions !== !0 && c.push({
@@ -18370,7 +18555,7 @@ var o$1 = (i, a) => {
18370
18555
  }));
18371
18556
  }), [["", l], ...Object.entries(p).map(([e, t]) => [e, t.flat])].forEach(([e, n]) => {
18372
18557
  Object.values(n).forEach((r) => {
18373
- if (!r || !m$2(r)) return;
18558
+ if (!r || !m$3(r)) return;
18374
18559
  let i = r.attributes.referenceId, a = typeof i == "string" ? p[i] : void 0;
18375
18560
  if (!a || typeof i != "string") {
18376
18561
  s.push({
@@ -18523,6 +18708,17 @@ var declaredAt = (declaration) => {
18523
18708
  const at = writtenAt(declaration);
18524
18709
  return `styles('${declaration.name}')${at === void 0 ? "" : ` at ${at}`}`;
18525
18710
  };
18711
+ /**
18712
+ * A component in words, with where it is written: its declaration is an object no factory marks, so it is placed by
18713
+ * its root — the call next to everything else it declares. Read defensively: this names it in the very refusals that
18714
+ * say its shape is wrong.
18715
+ */
18716
+ var componentWhere = (component) => {
18717
+ const root = component.root;
18718
+ const at = typeof root === "object" && root !== null ? writtenAt(root) : void 0;
18719
+ const id = component.id;
18720
+ return `Component "${String(id)}"${at === void 0 ? "" : ` (declared at ${at}, by its root)`}`;
18721
+ };
18526
18722
  /** The types that render their children once per item: everything inside one is repeated, one copy per row. */
18527
18723
  var REPEATING_TYPES = /* @__PURE__ */ new Set(["list", "carouselTrack"]);
18528
18724
  /**
@@ -18530,7 +18726,7 @@ var REPEATING_TYPES = /* @__PURE__ */ new Set(["list", "carouselTrack"]);
18530
18726
  * one that does — `"store-footer" › container[1] › text[0]` rather than a path of indices from the page down.
18531
18727
  */
18532
18728
  var placeOf = (spec, parent, index) => {
18533
- const record = e$31(spec) ? spec : {};
18729
+ const record = e$32(spec) ? spec : {};
18534
18730
  if (typeof record.id === "string") return `"${record.id}"`;
18535
18731
  return index === void 0 ? parent : `${parent} › ${typeof record.type === "string" ? record.type : "element"}[${index}]`;
18536
18732
  };
@@ -18558,6 +18754,20 @@ var withCache = (item) => {
18558
18754
  return complete;
18559
18755
  };
18560
18756
  /** The two attributes a page or a layout names its shell with. */
18757
+ /**
18758
+ * A page's attributes that are one field of its `PageSpec` each, by attribute name: the page writes `seoTitle` and the
18759
+ * document reads `seoPageTitle`. What an edit of a page's attribute writes in the code. Its layout is not here — two
18760
+ * attributes from one field (`layout: { id, slot }`) — nor `seoEnabled`, which follows from the other two.
18761
+ */
18762
+ var PAGE_SPEC_FIELDS = {
18763
+ slug: "slug",
18764
+ name: "name",
18765
+ default: "isDefault",
18766
+ folder: "folder",
18767
+ accessLevel: "accessLevel",
18768
+ seoPageTitle: "seoTitle",
18769
+ seoPageDescription: "seoDescription"
18770
+ };
18561
18771
  var layoutAttributes = (layout) => layout ? {
18562
18772
  layout: layout.id,
18563
18773
  layoutContainer: layout.slot
@@ -18565,7 +18775,7 @@ var layoutAttributes = (layout) => layout ? {
18565
18775
  var SpaceAuthor = class {
18566
18776
  spec;
18567
18777
  options;
18568
- flatMap = new d$6({
18778
+ flatMap = new d$5({
18569
18779
  flat: {},
18570
18780
  variables: []
18571
18781
  });
@@ -18598,6 +18808,8 @@ var SpaceAuthor = class {
18598
18808
  classOrigins = /* @__PURE__ */ new Map();
18599
18809
  /** Where each class's rules were written, in words — what `class-overrides-class` names it by. */
18600
18810
  classWritten = /* @__PURE__ */ new Map();
18811
+ /** Each class written with `styles()`, by name: the declaration, which knows the line of the author's that wrote it. */
18812
+ classDeclarations = /* @__PURE__ */ new Map();
18601
18813
  /** Each element's own rules on top of its classes (`<id>--own`), and where they were written. */
18602
18814
  ownRules = /* @__PURE__ */ new Map();
18603
18815
  /** Every element's own selector, named or derived — each one is that element's alone. */
@@ -18624,18 +18836,29 @@ var SpaceAuthor = class {
18624
18836
  }
18625
18837
  author() {
18626
18838
  const { schema, style } = this.write();
18627
- if (this.refusals.length > 0) {
18628
- const allow = this.options.allow ?? [];
18629
- const { errors } = validateSpace$1({
18630
- schema,
18631
- style
18632
- }, this.options);
18633
- throw new SpaceRefusedError(this.spec.permanentUrl, [...this.refusals, ...errors.filter((error) => !allow.some((entry) => entry.code === error.code && entry.element === error.elementId)).map((error) => ({
18839
+ const allow = this.options.allow ?? [];
18840
+ const answering = this.options.vocabulary?.callbacks;
18841
+ const meant = (missing, step) => {
18842
+ const elements = Object.values(schema.flat);
18843
+ const fit = step && answering ? elements.filter((element) => Object.hasOwn(answering, element.definition.type) && answering[element.definition.type].includes(step)).map((element) => element.id) : elements.map((element) => element.id);
18844
+ const nearest = didYouMean(missing, fit);
18845
+ if (nearest || !step || !answering) return nearest;
18846
+ return fit.length === 0 ? ` — no element of the space answers \`${step}\`` : fit.length <= 5 ? ` — the elements that answer \`${step}\`: ${fit.join(", ")}` : "";
18847
+ };
18848
+ const gate = validateSpace$1({
18849
+ schema,
18850
+ style
18851
+ }, this.options).errors.filter((error) => !allow.some((entry) => entry.code === error.code && entry.element === error.elementId)).map((error) => {
18852
+ const written = error.elementId ? this.specOf(error.elementId) : void 0;
18853
+ const at = written ? writtenAt(written) : void 0;
18854
+ return {
18634
18855
  place: error.elementId ? `"${error.elementId}"` : "",
18635
18856
  code: error.code,
18636
- message: error.message
18637
- }))]);
18638
- }
18857
+ message: `${error.message}${error.missing ? meant(error.missing, error.wantedBy) : ""}`,
18858
+ ...at === void 0 ? {} : { at }
18859
+ };
18860
+ });
18861
+ if (this.refusals.length > 0 || gate.length > 0) throw new SpaceRefusedError(this.spec.permanentUrl, [...this.refusals, ...gate]);
18639
18862
  const warnings = assertSpaceValid({
18640
18863
  schema,
18641
18864
  style
@@ -18643,7 +18866,7 @@ var SpaceAuthor = class {
18643
18866
  const suggestions = [...suggestSpace({
18644
18867
  schema,
18645
18868
  style
18646
- }), ...withoutQuieted(schema, this.classOverrides(schema, style.mode ?? "desktop-first"))].map((suggestion) => {
18869
+ }, { stylesheets: this.options.stylesheets ?? [] }), ...withoutQuieted(schema, this.classOverrides(schema, style.mode ?? "desktop-first"))].map((suggestion) => {
18647
18870
  const first = suggestion.elementIds.at(0);
18648
18871
  const at = first === void 0 ? void 0 : writtenAt(this.specOf(first));
18649
18872
  return at === void 0 ? suggestion : {
@@ -18701,6 +18924,10 @@ var SpaceAuthor = class {
18701
18924
  })), mode);
18702
18925
  }
18703
18926
  /** The spec an element was written from, by its id in the documents. */
18927
+ /** Every class the space declares, by name, with the `styles()` declaration that wrote it when one did. */
18928
+ declaredClasses() {
18929
+ return [...this.classRules.keys()].map((name) => [name, this.classDeclarations.get(name)]);
18930
+ }
18704
18931
  specOf(id) {
18705
18932
  return this.specs.get(id);
18706
18933
  }
@@ -18718,7 +18945,7 @@ var SpaceAuthor = class {
18718
18945
  continue;
18719
18946
  }
18720
18947
  if (value.name !== name) throw new AuthoringError("class-listed-under-other-name", `The space-wide \`classes\` lists the declaration "${value.name}" under the name "${name}". A declaration is listed under its own name.`);
18721
- this.declareClass(name, value.rules, () => `${declaredAt(value)}, listed in the space-wide \`classes\``, () => declaredAt(value));
18948
+ this.declareClass(name, value.rules, () => `${declaredAt(value)}, listed in the space-wide \`classes\``, () => declaredAt(value), value);
18722
18949
  }
18723
18950
  const layouts = this.spec.layouts ?? [];
18724
18951
  const components = this.spec.components ?? [];
@@ -18729,7 +18956,7 @@ var SpaceAuthor = class {
18729
18956
  const sources = /* @__PURE__ */ new Map();
18730
18957
  this.collectSources(component.root, sources);
18731
18958
  this.componentTrees.set(component.id, {
18732
- map: new d$6({
18959
+ map: new d$5({
18733
18960
  flat: {},
18734
18961
  variables: []
18735
18962
  }),
@@ -18766,9 +18993,9 @@ var SpaceAuthor = class {
18766
18993
  this.resolveControls();
18767
18994
  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: [] }]`.");
18768
18995
  const style = {
18769
- ...e$33,
18770
- mode: this.spec.mode ?? e$33.mode,
18771
- theme: this.spec.theme ?? e$33.theme,
18996
+ ...e$34,
18997
+ mode: this.spec.mode ?? e$34.mode,
18998
+ theme: this.spec.theme ?? e$34.theme,
18772
18999
  platform: this.platform,
18773
19000
  variables: this.spec.variables ?? {},
18774
19001
  ...this.spec.fonts ? { fonts: this.parseFonts(this.spec.fonts) } : {},
@@ -18874,12 +19101,13 @@ var SpaceAuthor = class {
18874
19101
  * `origin` says where, and is only asked for when there is a conflict to report: reading where an element was written
18875
19102
  * means formatting a stack, which every element of every space would otherwise pay for on every write.
18876
19103
  */
18877
- declareClass(name, blocks, origin, written) {
19104
+ declareClass(name, blocks, origin, written, declaration) {
18878
19105
  const existing = this.classRules.get(name);
18879
19106
  if (!existing) {
18880
19107
  this.classRules.set(name, blocks);
18881
19108
  this.classOrigins.set(name, origin);
18882
19109
  this.classWritten.set(name, written);
19110
+ if (declaration) this.classDeclarations.set(name, declaration);
18883
19111
  return;
18884
19112
  }
18885
19113
  if (!sameBlocks(existing, blocks)) throw new AuthoringError("class-conflict", `The class "${name}" is declared twice with different rules: ${this.classOrigins.get(name)?.() ?? "once before"}, and ${origin()}. A class is one rule set per space: rename one of them, or make them agree.`);
@@ -18892,7 +19120,7 @@ var SpaceAuthor = class {
18892
19120
  */
18893
19121
  collectDeclarations(rootClass, body, rootWhere) {
18894
19122
  const collect = (value, usedBy) => {
18895
- for (const ref of value ? classRefs(value) : []) if (typeof ref !== "string") this.declareClass(ref.name, ref.rules, () => `${declaredAt(ref)}, used by ${usedBy()}`, () => declaredAt(ref));
19123
+ for (const ref of value ? classRefs(value) : []) if (typeof ref !== "string") this.declareClass(ref.name, ref.rules, () => `${declaredAt(ref)}, used by ${usedBy()}`, () => declaredAt(ref), ref);
18896
19124
  };
18897
19125
  const walk = (spec) => {
18898
19126
  const element = () => {
@@ -18935,7 +19163,7 @@ var SpaceAuthor = class {
18935
19163
  }
18936
19164
  /** An ancestor condition names a class some ancestor wears; one this space does not declare can never match. */
18937
19165
  assertAncestorClasses() {
18938
- 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\`,`);
19166
+ 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\`,`);
18939
19167
  }
18940
19168
  /** `<type>-<n>` for an element nobody named. Positional and deterministic, so a re-run writes the same document;
18941
19169
  * it steps over anything the author named so a derived name can never take one. */
@@ -19115,7 +19343,8 @@ var SpaceAuthor = class {
19115
19343
  if (earlier !== void 0) {
19116
19344
  const holder = tree.map.flat[element.id]?.definition.type;
19117
19345
  const root = holder === "page" ? "page" : holder === "layoutContainer" ? "layout" : void 0;
19118
- 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.`);
19346
+ const provider = holder === "apiContainer" && element.definition.type === "apiContainer";
19347
+ 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.`);
19119
19348
  }
19120
19349
  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`);
19121
19350
  this.authoredAt.set(element.id, path);
@@ -19135,15 +19364,18 @@ var SpaceAuthor = class {
19135
19364
  }
19136
19365
  const componentIds = /* @__PURE__ */ new Set();
19137
19366
  for (const component of this.spec.components ?? []) {
19138
- const where = `Component "${component.id}"`;
19367
+ const where = componentWhere(component);
19139
19368
  assertKnownKeys(component, COMPONENT_SPEC_KEYS, where);
19140
19369
  const id = component.id;
19141
19370
  if (typeof id !== "string" || !t$28(id)) throw new AuthoringError("component-id", `${where} needs an \`id\` that starts with a letter, then letters, numbers, hyphens and underscores — it is the name an instance places it by: \`component('${String(id)}')\`.`);
19142
19371
  if (componentIds.has(component.id)) throw new AuthoringError("component-duplicate", `Two components are called "${component.id}". A component's id is the one name it is placed by.`);
19143
19372
  componentIds.add(component.id);
19144
- for (const name of Object.keys(component.props ?? {})) {
19373
+ for (const [name, prop] of Object.entries(component.props ?? {})) {
19145
19374
  const problem = c$8(name);
19146
19375
  if (problem) throw new AuthoringError("prop-name", `${where}: ${problem}.`);
19376
+ const types = t$62;
19377
+ const type = prop.type;
19378
+ if (!types.includes(type)) throw new AuthoringError("prop-type-unknown", `${where} declares the prop "${name}" as \`${type}\`, which is no type${didYouMean(type, [...types]) || "."} A prop is one of ${types.join(", ")}: words are \`text\`.`);
19147
19379
  }
19148
19380
  }
19149
19381
  for (const page of this.spec.pages) {
@@ -19368,7 +19600,7 @@ var SpaceAuthor = class {
19368
19600
  slug: page.slug,
19369
19601
  path: this.routeFor(page),
19370
19602
  ...page.accessLevel ? { accessLevel: page.accessLevel } : {},
19371
- params: f$5(page.slug),
19603
+ params: m$2(page.slug),
19372
19604
  ...page.layout ? { layout: page.layout.id } : {},
19373
19605
  elements: {}
19374
19606
  };
@@ -19380,7 +19612,7 @@ var SpaceAuthor = class {
19380
19612
  * that tree — every slot one of its elements.
19381
19613
  */
19382
19614
  addComponent(component) {
19383
- const where = `Component "${component.id}"`;
19615
+ const where = componentWhere(component);
19384
19616
  const tree = this.componentTrees.get(component.id);
19385
19617
  if (!tree) throw new Error(`${where} was not collected before it was written`);
19386
19618
  const rootId = this.addElement(component.root, `${this.spec.permanentUrl}/component:${component.id}`, placeOf(component.root, `Component "${component.id}"`), "", "", false, tree);
@@ -19411,7 +19643,7 @@ var SpaceAuthor = class {
19411
19643
  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"}.`);
19412
19644
  const bound = new Set(spec.bind === void 0 ? [] : toBindingSpecs(spec.bind).map((binding) => binding.to));
19413
19645
  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.`);
19414
- const invalid = o$25(given, given, props).at(0);
19646
+ const invalid = s$23(given, given, props).at(0);
19415
19647
  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(", ")}` : ""}.`);
19416
19648
  const slots = target.slots ?? [];
19417
19649
  for (const child of spec.children ?? []) {
@@ -19619,12 +19851,14 @@ var SpaceAuthor = class {
19619
19851
  return formats[as];
19620
19852
  }
19621
19853
  /**
19622
- * `path` is the element's identity — what a selector of its own is named after, so it never changes; `place` is
19623
- * how a person finds it: the nearest named element, and the steps from there.
19854
+ * `path` is where its parent placed it; its identity — what a selector of its own and its bindings are named after —
19855
+ * is that place with its id in its position, so it never changes when its siblings move. `place` is how a person
19856
+ * finds it: the nearest named element, and the steps from there.
19624
19857
  */
19625
19858
  writeElement(spec, path, place, rootId, parentId, insideCondition, tree) {
19626
19859
  this.assertElementShape(spec, place);
19627
19860
  const id = spec.id ?? this.nextId(spec.type);
19861
+ const identity = `${path.slice(0, path.lastIndexOf("/"))}/#${id}`;
19628
19862
  this.specs.set(id, spec);
19629
19863
  const where = `Element "${spec.type}" (${id}) at ${place}`;
19630
19864
  this.assertFlowShapes(spec.flows, where);
@@ -19650,7 +19884,7 @@ var SpaceAuthor = class {
19650
19884
  ...isRoot ? {} : { parentId },
19651
19885
  items: [],
19652
19886
  styleSelectors: {
19653
- base: this.selectorFor(path, spec, place),
19887
+ base: this.selectorFor(identity, spec, place),
19654
19888
  ...this.declaredSlots(spec.type),
19655
19889
  ...this.slotSelectors(spec, place)
19656
19890
  },
@@ -19677,7 +19911,7 @@ var SpaceAuthor = class {
19677
19911
  ...spec.motion === void 0 ? {} : { motion: spec.motion },
19678
19912
  ...spec.quiet === void 0 ? {} : { quiet: [...spec.quiet] },
19679
19913
  ...spec.flag === void 0 ? {} : { flag: flagGateOf(spec.flag, where) },
19680
- ...bindings?.length ? { bindings: groupBindings(path, bindings, sourceIndex, where, tree.globals) } : {},
19914
+ ...bindings?.length ? { bindings: groupBindings(identity, bindings, sourceIndex, where, tree.globals) } : {},
19681
19915
  ...spec.flows ? { interactions: authorFlows(spec.flows, id) } : {}
19682
19916
  }
19683
19917
  };
@@ -19693,7 +19927,7 @@ var SpaceAuthor = class {
19693
19927
  ...[...ancestors].some((ancestor) => REPEATING_TYPES.has(tree.map.flat[ancestor].definition.type)) ? { repeated: true } : {},
19694
19928
  ...a$7(element) || this.drawsNothing(element) ? { boxless: true } : {}
19695
19929
  });
19696
- (spec.row === void 0 ? spec.children : this.rowChildren(spec, spec.row, id, where))?.forEach((child, index) => this.addElement(child, `${path}/${index}`, placeOf(child, place, index), ownRootId, id, conditional, tree));
19930
+ (spec.row === void 0 ? spec.children : this.rowChildren(spec, spec.row, id, where))?.forEach((child, index) => this.addElement(child, `${identity}/${index}`, placeOf(child, place, index), ownRootId, id, conditional, tree));
19697
19931
  return id;
19698
19932
  }
19699
19933
  /** A `row` placed: a list's IS its children; a carousel's goes in a track, beside the controls it was given. */
@@ -19760,7 +19994,7 @@ var specEditOf = (change, spec) => {
19760
19994
  };
19761
19995
  /**
19762
19996
  * What `fixSpace` would settle in this declaration, each with the place in the author's own code that wrote it and
19763
- * the edit that makes the same fix there — what `plitzi fix` shows, and writes when asked — beside every problem the
19997
+ * the edit that makes the same fix there — what `plitzi space fix` shows, and writes when asked — beside every problem the
19764
19998
  * linter reports, which a written fix must not add to. The documents are written as `authorSpace` writes them,
19765
19999
  * without its gate: the problems a fix settles are the ones the gate stops on.
19766
20000
  */
@@ -19790,6 +20024,95 @@ var planFixes$1 = (spec, options = {}) => {
19790
20024
  }), ...contentFixes(author, documents)]
19791
20025
  };
19792
20026
  };
20027
+ /** The attributes that are words a person reads or hears, whatever the element. */
20028
+ var SAID_ATTRIBUTES = /* @__PURE__ */ new Set([
20029
+ "content",
20030
+ "label",
20031
+ "title",
20032
+ "alt",
20033
+ "placeholder"
20034
+ ]);
20035
+ /** What places a component, never what it hands it: the rest of an instance's attributes are the component's props. */
20036
+ var PLACING_ATTRIBUTES = /* @__PURE__ */ new Set([
20037
+ "referenceType",
20038
+ "referenceId",
20039
+ "slot"
20040
+ ]);
20041
+ /** Every string a list's data holds, a few levels deep: the words its rows show come from there. */
20042
+ var dataWords = (value, depth = 0) => {
20043
+ if (depth > 4) return [];
20044
+ if (typeof value === "string") return value === "" ? [] : [value];
20045
+ if (Array.isArray(value)) return value.flatMap((item) => dataWords(item, depth + 1));
20046
+ return e$32(value) ? Object.values(value).flatMap((item) => dataWords(item, depth + 1)) : [];
20047
+ };
20048
+ var wordsOf = (element, templates) => {
20049
+ const instance = element.definition.type === "reference" && element.attributes.referenceType === "component";
20050
+ return [
20051
+ ...Object.entries(element.attributes).flatMap(([key, value]) => typeof value === "string" && value !== "" && (SAID_ATTRIBUTES.has(key) || instance && !PLACING_ATTRIBUTES.has(key)) ? [value] : []),
20052
+ ...templates,
20053
+ ...dataWords(element.attributes.items)
20054
+ ];
20055
+ };
20056
+ /**
20057
+ * Every element the space authors to, with where it was written — read from the code as it is NOW, so it follows an
20058
+ * element wherever a person moved it, with nothing kept that could fall out of step. What `plitzi element where` answers.
20059
+ */
20060
+ var locateElements$1 = (spec, options = {}) => {
20061
+ const author = new SpaceAuthor(spec, options);
20062
+ const { schema } = author.write();
20063
+ return [...Object.values(schema.flat).map((element) => ({
20064
+ element,
20065
+ rootId: element.definition.rootId
20066
+ })), ...Object.entries(schema.components).flatMap(([componentId, component]) => Object.values(component.flat).map((element) => ({
20067
+ element,
20068
+ rootId: componentId
20069
+ })))].map(({ element, rootId }) => {
20070
+ const written = author.specOf(element.id);
20071
+ const calls = written ? writtenCalls(written) : [];
20072
+ const position = calls.at(0);
20073
+ const content = element.attributes.content;
20074
+ const templates = Object.values(element.definition.bindings ?? {}).flatMap((bindings) => bindings.flatMap((binding) => (binding.transformers ?? []).flatMap((transformer) => Object.values(transformer.params).filter((param) => typeof param === "string"))));
20075
+ return {
20076
+ elementId: element.id,
20077
+ type: element.definition.type,
20078
+ rootId,
20079
+ classes: element.definition.styleSelectors.base.split(/\s+/).filter(Boolean),
20080
+ ...typeof content === "string" && content !== "" ? { content } : {},
20081
+ templates,
20082
+ words: wordsOf(element, templates),
20083
+ attributes: element.attributes,
20084
+ children: element.definition.items ?? [],
20085
+ targets: Object.values(element.definition.interactions ?? {}).flatMap((node) => node.type === "callback" && node.elementId !== null && node.elementId !== element.id ? [{
20086
+ elementId: node.elementId,
20087
+ step: node.action
20088
+ }] : []),
20089
+ bound: (element.definition.bindings?.attributes ?? []).map((binding) => binding.to),
20090
+ through: calls.slice(1),
20091
+ ...position ? {
20092
+ at: `${position.file}:${String(position.line)}`,
20093
+ position
20094
+ } : {}
20095
+ };
20096
+ });
20097
+ };
20098
+ /**
20099
+ * Every class the space declares, with the `styles()` call that wrote it — read from the code as it is now, as
20100
+ * `locateElements` reads the elements. What `plitzi element where` answers of a class: who wears it, and where it is written.
20101
+ */
20102
+ var locateClasses$1 = (spec, options = {}) => {
20103
+ const author = new SpaceAuthor(spec, options);
20104
+ author.write();
20105
+ return author.declaredClasses().map(([name, declaration]) => {
20106
+ const position = declaration ? writtenAtPosition(declaration) : void 0;
20107
+ return {
20108
+ name,
20109
+ ...position ? {
20110
+ at: `${position.file}:${String(position.line)}`,
20111
+ position
20112
+ } : {}
20113
+ };
20114
+ });
20115
+ };
19793
20116
  /**
19794
20117
  * The `content-attribute` suggestions that have one way to be written: the children only words and an icon, none of
19795
20118
  * them named — a child with an id of its own is something a test or a flow may point at — and the words wearing no
@@ -19959,7 +20282,7 @@ var validateSnippet$1 = (snippet, options = {}) => {
19959
20282
  }));
19960
20283
  const { errors: spaceErrors, warnings } = validateSpace$1({
19961
20284
  schema: {
19962
- ...r$23.schema,
20285
+ ...r$22.schema,
19963
20286
  ...schema
19964
20287
  },
19965
20288
  style
@@ -20200,7 +20523,7 @@ var transformerCatalog = () => Object.entries(BUILTIN_TRANSFORMERS).map(([action
20200
20523
  /** The space's name and URL, where the document carries them. An older export carries no definition at all. */
20201
20524
  var definitionOf = (schema) => {
20202
20525
  const definition = schema.definition;
20203
- if (!e$31(definition)) return {};
20526
+ if (!e$32(definition)) return {};
20204
20527
  return {
20205
20528
  ...typeof definition.name === "string" ? { name: definition.name } : {},
20206
20529
  ...typeof definition.permanentUrl === "string" ? { permanentUrl: definition.permanentUrl } : {}
@@ -20214,7 +20537,7 @@ var categoryOf = (variable) => {
20214
20537
  /** The name an element carried beside its id before the id became the name, where it carries a usable one. */
20215
20538
  var idRefOf = (element) => {
20216
20539
  const stored = element;
20217
- if (!e$31(stored) || typeof stored.idRef !== "string" || !t$28(stored.idRef)) return;
20540
+ if (!e$32(stored) || typeof stored.idRef !== "string" || !t$28(stored.idRef)) return;
20218
20541
  return stored.idRef;
20219
20542
  };
20220
20543
  /**
@@ -20315,7 +20638,7 @@ var refuse = (reason) => {
20315
20638
  throw new Unreadable(reason);
20316
20639
  };
20317
20640
  var isTriggerType = (value) => TRIGGER_TYPES.some((type) => type === value);
20318
- var isNode = (value) => e$31(value) && [
20641
+ var isNode = (value) => e$32(value) && [
20319
20642
  "id",
20320
20643
  "title",
20321
20644
  "type",
@@ -20323,10 +20646,10 @@ var isNode = (value) => e$31(value) && [
20323
20646
  "beforeNode",
20324
20647
  "afterNode",
20325
20648
  "flowId"
20326
- ].every((key) => typeof value[key] === "string") && typeof value.enabled === "boolean" && e$31(value.params) && e$31(value.preview);
20649
+ ].every((key) => typeof value[key] === "string") && typeof value.enabled === "boolean" && e$32(value.params) && e$32(value.preview);
20327
20650
  /** A document with the shape an action has: whether it is the action code writes is what the round trip answers. */
20328
- var isDocument = (value) => e$31(value) && typeof value.name === "string" && e$31(value.nodes) && Object.values(value.nodes).every(isNode);
20329
- var isField = (value) => e$31(value) && FIELD_TYPES.some((type) => type === value.type);
20651
+ var isDocument = (value) => e$32(value) && typeof value.name === "string" && e$32(value.nodes) && Object.values(value.nodes).every(isNode);
20652
+ var isField = (value) => e$32(value) && FIELD_TYPES.some((type) => type === value.type);
20330
20653
  var text = (params, key) => {
20331
20654
  const value = params[key];
20332
20655
  return typeof value === "string" ? value : void 0;
@@ -20343,7 +20666,7 @@ var inputOf = (node) => {
20343
20666
  const raw = text(node.params, "input");
20344
20667
  if (raw === void 0) return;
20345
20668
  const value = parsed(raw);
20346
- if (!e$31(value) || !Object.values(value).every(isField)) return refuse(`the trigger "${node.id}" declares an input that is not a map of fields`);
20669
+ 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`);
20347
20670
  return Object.fromEntries(Object.entries(value).filter((entry) => isField(entry[1])));
20348
20671
  };
20349
20672
  var accessOf = (node) => {
@@ -20456,7 +20779,7 @@ var chainFrom = (nodes, first) => {
20456
20779
  /** A value with its keys in one order and its JSON params read, so two documents compare by what they hold. */
20457
20780
  var comparable = (value) => {
20458
20781
  if (Array.isArray(value)) return value.map(comparable);
20459
- if (!e$31(value)) return value;
20782
+ if (!e$32(value)) return value;
20460
20783
  return Object.fromEntries(Object.keys(value).filter((key) => value[key] !== void 0).sort().map((key) => {
20461
20784
  const inner = value[key];
20462
20785
  return [key, key === "input" && typeof inner === "string" ? parsed(inner) ?? inner : comparable(inner)];
@@ -20556,8 +20879,8 @@ var actionToSource = (spec, { packageName = "@plitzi/sdk-authoring" } = {}) => {
20556
20879
  var canonical = (value) => {
20557
20880
  if (value === void 0 || value === null) return null;
20558
20881
  if (Array.isArray(value)) return value.map(canonical);
20559
- if (e$31(value)) {
20560
- const entries = Object.entries(value).map(([key, inner]) => [key, canonical(inner)]).filter(([, inner]) => inner !== null && !(e$31(inner) && Object.keys(inner).length === 0)).sort(([a], [b]) => a.localeCompare(b));
20882
+ if (e$32(value)) {
20883
+ 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));
20561
20884
  return Object.fromEntries(entries);
20562
20885
  }
20563
20886
  if (typeof value === "boolean" || typeof value === "number" || typeof value === "string") return value;
@@ -20646,12 +20969,12 @@ var classRules = (style, name) => {
20646
20969
  };
20647
20970
  var bindingsOf$1 = (element) => {
20648
20971
  const stored = element.definition.bindings;
20649
- if (!e$31(stored)) return {};
20650
- return Object.fromEntries(Object.entries(stored).map(([category, list]) => [category, (Array.isArray(list) ? list : []).filter(e$31).map((binding) => ({
20972
+ if (!e$32(stored)) return {};
20973
+ return Object.fromEntries(Object.entries(stored).map(([category, list]) => [category, (Array.isArray(list) ? list : []).filter(e$32).map((binding) => ({
20651
20974
  source: binding.source,
20652
20975
  to: binding.to,
20653
20976
  transformers: Array.isArray(binding.transformers) ? binding.transformers : [],
20654
- when: e$31(binding.when) && Array.isArray(binding.when.rules) && binding.when.rules.length > 0 ? binding.when : null,
20977
+ when: e$32(binding.when) && Array.isArray(binding.when.rules) && binding.when.rules.length > 0 ? binding.when : null,
20655
20978
  enabled: binding.enabled !== false
20656
20979
  })).map((binding) => JSON.stringify(canonical(binding))).sort()]));
20657
20980
  };
@@ -20670,7 +20993,7 @@ var flowsOf = (element) => {
20670
20993
  params: current.params,
20671
20994
  preview: current.preview,
20672
20995
  elementId: current.elementId === element.id ? "self" : current.elementId || null,
20673
- when: e$31(current.when) && Array.isArray(current.when.rules) && current.when.rules.length > 0 ? current.when : null,
20996
+ when: e$32(current.when) && Array.isArray(current.when.rules) && current.when.rules.length > 0 ? current.when : null,
20674
20997
  enabled: current.enabled,
20675
20998
  whileRunning: current.whileRunning ?? "skip"
20676
20999
  });
@@ -20694,7 +21017,7 @@ var PAGE_UNSET = {
20694
21017
  var attributesOf = (element) => {
20695
21018
  const isPage = element.definition.type === "page";
20696
21019
  const defaults = isPage ? {} : defaultAttributes(element.definition.type);
20697
- const stored = Object.entries(e$31(element.attributes) ? element.attributes : {}).filter(([key, value]) => value !== null && !(Array.isArray(value) && value.length === 0 && e$31(defaults[key])));
21020
+ 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])));
20698
21021
  return Object.fromEntries(Object.entries({
20699
21022
  ...defaults,
20700
21023
  ...Object.fromEntries(stored)
@@ -21145,7 +21468,7 @@ var unwritableCss = (selector, unwritable, mode) => {
21145
21468
  platform[breakpoint][selector.name] = item;
21146
21469
  }
21147
21470
  return l({
21148
- ...e$33,
21471
+ ...e$34,
21149
21472
  mode,
21150
21473
  platform,
21151
21474
  variables: {}
@@ -21268,9 +21591,9 @@ var BINDING_CATEGORIES = [
21268
21591
  "style"
21269
21592
  ];
21270
21593
  var isEmpty = (value) => !value || Object.keys(value).length === 0;
21271
- var isBinding = (value) => e$31(value) && typeof value.source === "string" && typeof value.to === "string";
21594
+ var isBinding = (value) => e$32(value) && typeof value.source === "string" && typeof value.to === "string";
21272
21595
  /** A condition worth keeping: the builder stores "no condition" as an empty group, or as an empty array. */
21273
- var conditionOf = (when) => e$31(when) && Array.isArray(when.rules) && when.rules.length > 0 ? when : void 0;
21596
+ var conditionOf = (when) => e$32(when) && Array.isArray(when.rules) && when.rules.length > 0 ? when : void 0;
21274
21597
  /**
21275
21598
  * Every name a document mentions outside its own structure — in attributes, bindings, steps and settings.
21276
21599
  *
@@ -21293,7 +21616,7 @@ var stepCorpus = (host, interactions) => Object.values(interactions).map((node)
21293
21616
  ...node.elementId && node.elementId !== host ? { elementId: node.elementId } : {}
21294
21617
  }));
21295
21618
  var bindingsOf = (bindings, category) => {
21296
- const list = e$31(bindings) ? bindings[category] : void 0;
21619
+ const list = e$32(bindings) ? bindings[category] : void 0;
21297
21620
  return Array.isArray(list) ? list.filter(isBinding) : [];
21298
21621
  };
21299
21622
  var bindingCorpus = (bindings) => BINDING_CATEGORIES.flatMap((category) => bindingsOf(bindings, category).map(({ source, to, transformers, when }) => ({
@@ -21892,7 +22215,7 @@ var SpecReader = class {
21892
22215
  }
21893
22216
  readPage(page, index) {
21894
22217
  this.reachable.add(page.id);
21895
- const attributes = e$31(page.attributes) ? page.attributes : {};
22218
+ const attributes = e$32(page.attributes) ? page.attributes : {};
21896
22219
  const where = `Page "${page.id}"`;
21897
22220
  for (const key of Object.keys(attributes)) if (!PAGE_ATTRIBUTES.has(key)) this.dropField(`page attribute "${key}"`);
21898
22221
  if (attributes.enabled === false) this.correct("dropped-field", `${where} was disabled, which an authored page cannot say; it is authored enabled.`, page.id);
@@ -21958,7 +22281,7 @@ var SpecReader = class {
21958
22281
  const definition = element.definition;
21959
22282
  for (const key of Object.keys(definition)) if (!DEFINITION_FIELDS.has(key)) this.dropField(`"${key}"`);
21960
22283
  const { type, legacy } = this.typeOf(element);
21961
- const stored = e$31(element.attributes) ? element.attributes : {};
22284
+ const stored = e$32(element.attributes) ? element.attributes : {};
21962
22285
  const attributes = this.readAttributes(type, legacy ? legacy.attributes(stored) : stored, this.placedNames(element));
21963
22286
  const keepId = this.options.keepIds === true || !this.derived.has(element.id);
21964
22287
  const { base: baseSelector, ...slotSelectors } = definition.styleSelectors;
@@ -22012,10 +22335,10 @@ var SpecReader = class {
22012
22335
  */
22013
22336
  placedNames(element) {
22014
22337
  const { referenceId } = element.attributes;
22015
- const component = m$2(element) && typeof referenceId === "string" ? p$5(this.documents.schema, referenceId) : void 0;
22338
+ const component = m$3(element) && typeof referenceId === "string" ? p$6(this.documents.schema, referenceId) : void 0;
22016
22339
  const parentId = element.definition.parentId;
22017
22340
  const parent = parentId && Object.hasOwn(this.flat, parentId) ? this.flat[parentId] : void 0;
22018
- return [...Object.keys(component?.props ?? {}), ...parent && m$2(parent) ? ["slot"] : []];
22341
+ return [...Object.keys(component?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
22019
22342
  }
22020
22343
  readAttributes(type, attributes, placed = []) {
22021
22344
  const declared = Object.hasOwn(ATTRIBUTE_NAMES, type) ? ATTRIBUTE_NAMES[type] : void 0;
@@ -22030,7 +22353,7 @@ var SpecReader = class {
22030
22353
  this.droppedAttributes.set(key, (this.droppedAttributes.get(key) ?? 0) + 1);
22031
22354
  continue;
22032
22355
  }
22033
- const emptyList = Array.isArray(value) && value.length === 0 && e$31(defaults[name]);
22356
+ const emptyList = Array.isArray(value) && value.length === 0 && e$32(defaults[name]);
22034
22357
  if (value === null || emptyList) continue;
22035
22358
  if (typeof value === "string" && fixes && Object.hasOwn(fixes, name) && Object.hasOwn(fixes[name], value)) {
22036
22359
  const fixed = fixes[name][value];
@@ -22662,6 +22985,7 @@ var specToSource = (spec, options) => new SourceWriter(spec, options).write();
22662
22985
  */
22663
22986
  var BUILDER_SIGNATURES = {
22664
22987
  delay: "delay(ms)",
22988
+ copyToClipboard: "copyToClipboard('{{ navigation.href }}')",
22665
22989
  authLogout: "authLogout()",
22666
22990
  authRefreshDetails: "authRefreshDetails()",
22667
22991
  on: "on('onArrival', params?)",
@@ -22774,7 +23098,7 @@ var fromSpec = (spec) => Object.entries(spec).map(([name, param]) => ({
22774
23098
  type: param.type,
22775
23099
  description: param.description,
22776
23100
  ...param.default === void 0 ? {} : { default: param.default },
22777
- ...param.options ? { options: param.options } : {},
23101
+ ...param.options && param.type === "select" ? { options: param.options } : {},
22778
23102
  ...param.required ? { required: true } : {}
22779
23103
  }));
22780
23104
  var optionsOf = (param) => {
@@ -22830,7 +23154,7 @@ var builderOf = (action, type) => {
22830
23154
  return builders.has(named) ? named : void 0;
22831
23155
  };
22832
23156
  var definitionIn = (catalog, name) => Object.hasOwn(catalog, name) ? catalog[name] : void 0;
22833
- var triggerDefinition = (name) => definitionIn(e$39, name) ?? definitionIn(typeTriggerDefinitions, name);
23157
+ var triggerDefinition = (name) => definitionIn(e$40, name) ?? definitionIn(typeTriggerDefinitions, name);
22834
23158
  /** The attributes each type is authored with; `null` for one that takes any, which is said by its defaults. */
22835
23159
  var attributeNames = elementAttributeNames;
22836
23160
  var explainElement = (type) => {
@@ -22860,7 +23184,7 @@ var explainElement = (type) => {
22860
23184
  var explainTrigger = (name) => {
22861
23185
  const definition = triggerDefinition(name);
22862
23186
  if (!definition) return;
22863
- const basic = Object.hasOwn(e$39, name);
23187
+ const basic = Object.hasOwn(e$40, name);
22864
23188
  return {
22865
23189
  kind: "trigger",
22866
23190
  name,
@@ -22964,7 +23288,7 @@ var explainList = (kind) => {
22964
23288
  name,
22965
23289
  summary: element.label
22966
23290
  })));
22967
- case "trigger": return sorted([.../* @__PURE__ */ new Set([...Object.keys(e$39), ...Object.keys(typeTriggerDefinitions)])].map((name) => ({
23291
+ case "trigger": return sorted([.../* @__PURE__ */ new Set([...Object.keys(e$40), ...Object.keys(typeTriggerDefinitions)])].map((name) => ({
22968
23292
  name,
22969
23293
  summary: triggerDefinition(name)?.title ?? name
22970
23294
  })));
@@ -23664,7 +23988,7 @@ var importedFiles = ({ probes, dark }) => {
23664
23988
  "",
23665
23989
  "1. Split `outline.ts` into one file per part of the page, each under `scope()`, and write its content.",
23666
23990
  "2. Turn each repeated block into a `list` over its `data/` file (see the `lists` reference).",
23667
- "3. `npx plitzi check` at every width, and compare with `screens/`.",
23991
+ "3. `npx plitzi page check` at every width, and compare with `screens/`.",
23668
23992
  ""
23669
23993
  ].join("\n");
23670
23994
  const countBlocks = (nodes) => nodes.reduce((count, child) => count + 1 + countBlocks(child.children), 0);
@@ -23709,6 +24033,9 @@ var importedFiles = ({ probes, dark }) => {
23709
24033
  //#region src/spaces/blank/content.ts?raw
23710
24034
  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";
23711
24035
  //#endregion
24036
+ //#region src/spaces/blank/notFound.ts?raw
24037
+ 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";
24038
+ //#endregion
23712
24039
  //#region src/spaces/blank/content.ts
23713
24040
  /**
23714
24041
  * 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
@@ -24157,6 +24484,41 @@ var footerRow = styles("footer-row", { css: {
24157
24484
  }
24158
24485
  } });
24159
24486
  //#endregion
24487
+ //#region src/spaces/blank/notFound.ts
24488
+ /** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */
24489
+ var notFound$1 = {
24490
+ id: "not-found",
24491
+ name: "Not found",
24492
+ slug: "*",
24493
+ body: [container({
24494
+ id: "not-found-main",
24495
+ subType: "main",
24496
+ class: [shell$1, heroBand],
24497
+ children: [
24498
+ text$1("404", {
24499
+ id: "not-found-kicker",
24500
+ class: kicker
24501
+ }),
24502
+ heading("Page not found", {
24503
+ id: "not-found-title",
24504
+ subType: "h1",
24505
+ class: sectionTitle
24506
+ }),
24507
+ paragraph({
24508
+ id: "not-found-lede",
24509
+ class: bodyText,
24510
+ content: "There is nothing at this address — it may have moved, or the link has a typo."
24511
+ }),
24512
+ link({
24513
+ id: "not-found-home",
24514
+ href: "/",
24515
+ class: button,
24516
+ content: "Back to the home page"
24517
+ })
24518
+ ]
24519
+ })]
24520
+ };
24521
+ //#endregion
24160
24522
  //#region src/spaces/blank/tokens.ts
24161
24523
  /**
24162
24524
  * Every colour the page uses, per scheme.
@@ -24587,7 +24949,15 @@ var space$1 = {
24587
24949
  * makes the dark scheme work: a hard-coded colour would win against the theme and leave black text on black.
24588
24950
  */
24589
24951
  elements: {
24590
- page: { base: { "font-family": "var(--font-sans)" } },
24952
+ page: { base: {
24953
+ "font-family": "var(--font-sans)",
24954
+ "flex-direction": "column",
24955
+ position: "relative",
24956
+ "min-width": "100%",
24957
+ "min-height": "100dvh",
24958
+ color: "var(--foreground)",
24959
+ "background-color": "var(--background)"
24960
+ } },
24591
24961
  heading: { base: { color: "var(--foreground)" } },
24592
24962
  text: { base: { color: "inherit" } },
24593
24963
  paragraph: { base: { color: "var(--foreground)" } },
@@ -24599,12 +24969,6 @@ var space$1 = {
24599
24969
  slug: "",
24600
24970
  isDefault: true,
24601
24971
  css: {
24602
- "flex-direction": "column",
24603
- position: "relative",
24604
- "min-width": "100%",
24605
- "min-height": "100dvh",
24606
- color: "var(--foreground)",
24607
- "background-color": "var(--background)",
24608
24972
  "background-image": "radial-gradient(60rem 32rem at 50% -8rem, var(--glow), transparent 70%)",
24609
24973
  "background-repeat": "no-repeat"
24610
24974
  },
@@ -24680,17 +25044,47 @@ var space$1 = {
24680
25044
  })]
24681
25045
  })
24682
25046
  ]
24683
- }]
25047
+ }, notFound$1]
24684
25048
  };
24685
25049
  //#endregion
24686
25050
  //#region src/spaces/blank/spec.ts?raw
24687
- 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";
25051
+ 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";
24688
25052
  //#endregion
24689
25053
  //#region src/spaces/blank/theme.ts?raw
24690
25054
  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";
24691
25055
  //#endregion
24692
25056
  //#region src/spaces/blank/tokens.ts?raw
24693
- 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";
25057
+ 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";
25058
+ //#endregion
25059
+ //#region src/spaces/empty/notFound.ts?raw
25060
+ 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";
25061
+ //#endregion
25062
+ //#region src/spaces/empty/notFound.ts
25063
+ /** The page of every address no other page answers, sent with status 404: what was asked for is not here, and the way back. */
25064
+ var notFound = {
25065
+ id: "not-found",
25066
+ name: "Not found",
25067
+ slug: "*",
25068
+ layout: {
25069
+ id: "site",
25070
+ slot: "site-main"
25071
+ },
25072
+ body: [
25073
+ heading("Page not found", {
25074
+ id: "not-found-title",
25075
+ subType: "h1"
25076
+ }),
25077
+ paragraph({
25078
+ id: "not-found-lede",
25079
+ content: "There is nothing at this address."
25080
+ }),
25081
+ link({
25082
+ id: "not-found-home",
25083
+ href: "/",
25084
+ content: "Back to the home page"
25085
+ })
25086
+ ]
25087
+ };
24694
25088
  //#endregion
24695
25089
  //#region src/spaces/empty/spec.ts
24696
25090
  /**
@@ -24772,11 +25166,11 @@ var space = {
24772
25166
  content: "What this site is about, in a line.",
24773
25167
  class: lede
24774
25168
  })]
24775
- }]
25169
+ }, notFound]
24776
25170
  };
24777
25171
  //#endregion
24778
25172
  //#region src/spaces/empty/spec.ts?raw
24779
- 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";
25173
+ 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";
24780
25174
  //#endregion
24781
25175
  //#region templates/catalog/src/data/products.json?raw
24782
25176
  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";
@@ -24788,7 +25182,7 @@ var productCard_default = "/**\n * A product as a card, placed once per product:
24788
25182
  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";
24789
25183
  //#endregion
24790
25184
  //#region templates/catalog/src/space/index.ts?raw
24791
- 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";
25185
+ 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";
24792
25186
  //#endregion
24793
25187
  //#region templates/catalog/src/space/layout.ts?raw
24794
25188
  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";
@@ -24797,7 +25191,10 @@ var layout_default = "/**\n * The chrome every page shares — a header with the
24797
25191
  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";
24798
25192
  //#endregion
24799
25193
  //#region templates/catalog/src/space/pages/home.ts?raw
24800
- 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";
25194
+ 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";
25195
+ //#endregion
25196
+ //#region templates/catalog/src/space/pages/notFound.ts?raw
25197
+ 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";
24801
25198
  //#endregion
24802
25199
  //#region templates/catalog/src/space/pages/product.ts?raw
24803
25200
  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";
@@ -24847,16 +25244,21 @@ var blankTemplateFiles = ({ name, dir = "src/space", plugin } = {}) => {
24847
25244
  [`${dir}/index.ts`]: name === void 0 ? entry : renameSpace(entry, name),
24848
25245
  [`${dir}/tokens.ts`]: toPortableSource(tokens_default$1),
24849
25246
  [`${dir}/theme.ts`]: toPortableSource(theme_default),
24850
- [`${dir}/content.ts`]: toPortableSource(content_default)
25247
+ [`${dir}/content.ts`]: toPortableSource(content_default),
25248
+ [`${dir}/notFound.ts`]: toPortableSource(notFound_default$2)
24851
25249
  };
24852
25250
  };
24853
25251
  /**
24854
- * The space `plitzi create --template blank` starts from, as a file: tokens, a layout and one empty page — for a
24855
- * project about to be something specific, where the welcome tour is the first thing that would be deleted.
25252
+ * The space `plitzi create --template blank` starts from, as its files by path: tokens, a layout and one empty page —
25253
+ * for a project about to be something specific, where the welcome tour is the first thing that would be deleted —
25254
+ * and the page for an address nothing answers, beside it.
24856
25255
  */
24857
- var emptySpaceSource = ({ name } = {}) => {
25256
+ var emptyTemplateFiles = ({ name, dir = "src/space" } = {}) => {
24858
25257
  const portable = toPortableSource(spec_default);
24859
- return name === void 0 ? portable : renameSpace(portable, name, space);
25258
+ return {
25259
+ [`${dir}/index.ts`]: name === void 0 ? portable : renameSpace(portable, name, space),
25260
+ [`${dir}/notFound.ts`]: toPortableSource(notFound_default$1)
25261
+ };
24860
25262
  };
24861
25263
  /** The one line in the declaration a `custom` element is hung off — the hero, so it lands under its buttons. */
24862
25264
  var PLUGIN_ANCHOR = "children: [heroEyebrow, heroTitle, heroLede, heroActions]";
@@ -25069,6 +25471,7 @@ var catalogTemplateFiles = ({ name, mode = "server" } = {}) => {
25069
25471
  "src/space/pages/home.ts": home_default,
25070
25472
  "src/space/pages/catalog.ts": catalog_default,
25071
25473
  "src/space/pages/product.ts": product_default,
25474
+ "src/space/pages/notFound.ts": notFound_default,
25072
25475
  [client ? "public/data/products.json" : "src/data/products.json"]: products_default
25073
25476
  };
25074
25477
  return Object.fromEntries(Object.entries(files).map(([path, source]) => [path, source.replace(/^\/\* eslint-disable quotes[^\n]*\*\/\n/, "")]));
@@ -25403,6 +25806,7 @@ function probePage(input) {
25403
25806
  * scroll an inner pane and the document would then report no overflow whatever the page contained.
25404
25807
  */
25405
25808
  let overflow = null;
25809
+ const cutOff = [];
25406
25810
  if (input.overflow) {
25407
25811
  const viewport = document.documentElement.clientWidth;
25408
25812
  /**
@@ -25422,6 +25826,48 @@ function probePage(input) {
25422
25826
  for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) if (keepsOverflow(ancestor)) right = Math.min(right, ancestor.getBoundingClientRect().right);
25423
25827
  return right;
25424
25828
  };
25829
+ const visibleLeft = (node) => {
25830
+ let left = node.getBoundingClientRect().left;
25831
+ for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) if (keepsOverflow(ancestor)) left = Math.max(left, ancestor.getBoundingClientRect().left);
25832
+ return left;
25833
+ };
25834
+ /**
25835
+ * 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
25836
+ * past the viewport while an ancestor hides the part that spills — a header whose last links fell off a phone, with
25837
+ * no sideways scroll to show for it, which read as a page with nothing wrong. Not inside a row a person scrolls on
25838
+ * purpose, nor anything a transform moves (a marquee, a carousel's track), nor what is not drawn.
25839
+ */
25840
+ const scrolledOnPurpose = (node) => {
25841
+ for (let ancestor = node.parentElement; ancestor; ancestor = ancestor.parentElement) {
25842
+ const { overflowX } = getComputedStyle(ancestor);
25843
+ const pageScroller = ancestor === document.documentElement || ancestor === document.body || ancestor.matches(".plitzi-sdk");
25844
+ if ((overflowX === "auto" || overflowX === "scroll") && !pageScroller) return true;
25845
+ }
25846
+ return false;
25847
+ };
25848
+ const moved = (node) => {
25849
+ for (let at = node; at; at = at.parentElement) {
25850
+ const { transform } = getComputedStyle(at);
25851
+ if (transform !== "none" && transform !== "") return true;
25852
+ }
25853
+ return false;
25854
+ };
25855
+ const saysSomething = (node) => node.matches("a, button, input, select, textarea, label") || [...node.childNodes].some((child) => child.nodeType === Node.TEXT_NODE && (child.textContent ?? "").trim() !== "");
25856
+ for (const node of document.querySelectorAll("[data-plitzi-el]")) {
25857
+ const box = node.getBoundingClientRect();
25858
+ if (box.width === 0 || box.height === 0 || !saysSomething(node)) continue;
25859
+ const outside = Math.max(box.right - viewport, -box.left);
25860
+ const hiddenPart = Math.max(box.right - visibleRight(node), visibleLeft(node) - box.left);
25861
+ if (outside <= 1 || hiddenPart <= 1 || !node.checkVisibility({
25862
+ opacityProperty: true,
25863
+ visibilityProperty: true
25864
+ }) || scrolledOnPurpose(node) || moved(node)) continue;
25865
+ const id = node.getAttribute("data-plitzi-el");
25866
+ if (id) cutOff.push({
25867
+ id,
25868
+ pixels: Math.round(Math.min(outside, hiddenPart))
25869
+ });
25870
+ }
25425
25871
  const wide = [...document.querySelectorAll("body *")].map((node) => ({
25426
25872
  node,
25427
25873
  right: visibleRight(node)
@@ -25509,6 +25955,7 @@ function probePage(input) {
25509
25955
  byWidth,
25510
25956
  brokenImages,
25511
25957
  overflow,
25958
+ cutOff,
25512
25959
  illegible
25513
25960
  };
25514
25961
  }
@@ -25549,6 +25996,11 @@ var issuesOf = (expected, findings) => {
25549
25996
  ...about(elementId)
25550
25997
  })),
25551
25998
  ...sidewaysOf(findings.overflow),
25999
+ ...findings.cutOff.map(({ id, pixels }) => ({
26000
+ code: "cut-off",
26001
+ 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`,
26002
+ elementId: id
26003
+ })),
25552
26004
  ...findings.illegible.map(({ text, elementId }) => ({
25553
26005
  code: "illegible-text",
25554
26006
  message: `text drawn in the colour behind it: ${text}`,
@@ -26394,10 +26846,17 @@ var ELEMENT_CATALOGS = {
26394
26846
  * **Bindings.** A source may name the element alone and the prefix it publishes under is filled in — which
26395
26847
  * is the half an author cannot see, and is not always the element's own type.
26396
26848
  */
26397
- var authorSpace = (spec, options = {}) => authorSpace$1(spec, withPluginCatalogs({
26398
- ...ELEMENT_CATALOGS,
26399
- ...options
26400
- }));
26849
+ var authorSpace = (spec, options = {}) => {
26850
+ const notFound = withNotFoundPage(spec);
26851
+ const authored = authorSpace$1(notFound.spec, withPluginCatalogs({
26852
+ ...ELEMENT_CATALOGS,
26853
+ ...options
26854
+ }));
26855
+ return notFound.added ? {
26856
+ ...authored,
26857
+ suggestions: [...authored.suggestions, notFound.added]
26858
+ } : authored;
26859
+ };
26401
26860
  /**
26402
26861
  * `validateSpace`, holding this SDK's own catalogs — the same gate `authorSpace` puts its output through, for documents
26403
26862
  * written anywhere else: the builder saving through the API, an import, an agent's edit, a JSON edited by hand.
@@ -26425,13 +26884,26 @@ var fixSpace = (space, options = {}, codes, elements) => fixSpace$1(space, withP
26425
26884
  }), codes, elements);
26426
26885
  /**
26427
26886
  * `planFixes`, holding the same catalogs: every fix `fixSpace` would make in this declaration, each with the place in
26428
- * the author's code that wrote the element and the edit that makes the fix there — what `plitzi fix` shows and writes.
26887
+ * the author's code that wrote the element and the edit that makes the fix there — what `plitzi space fix` shows and writes.
26429
26888
  */
26430
26889
  var planFixes = (spec, options = {}) => planFixes$1(spec, withPluginCatalogs({
26431
26890
  ...ELEMENT_CATALOGS,
26432
26891
  ...options
26433
26892
  }));
26434
26893
  /**
26894
+ * `locateElements`, holding the same catalogs: every element the space authors to, with the call in the author's code
26895
+ * that wrote it — what `plitzi element where` answers and `plitzi element edit` edits at.
26896
+ */
26897
+ var locateElements = (spec, options = {}) => locateElements$1(spec, withPluginCatalogs({
26898
+ ...ELEMENT_CATALOGS,
26899
+ ...options
26900
+ }));
26901
+ /** `locateClasses`, holding the same catalogs: every class the space declares, with the `styles()` call that wrote it. */
26902
+ var locateClasses = (spec, options = {}) => locateClasses$1(spec, withPluginCatalogs({
26903
+ ...ELEMENT_CATALOGS,
26904
+ ...options
26905
+ }));
26906
+ /**
26435
26907
  * `authorSnippet`, holding the same vocabularies — the artefact you publish when you are not building a space.
26436
26908
  *
26437
26909
  * A snippet is a subtree hosted as a JSON and dragged onto someone else's canvas, so the checks that matter are
@@ -26448,4 +26920,4 @@ var validateSnippet = (snippet, options = {}) => validateSnippet$1(snippet, {
26448
26920
  ...options
26449
26921
  });
26450
26922
  //#endregion
26451
- export { explainKindOf as $, elementAttributeValues as $i, twigTemplate as $n, dropdownPopup as $r, SpaceRefusedError as $t, inspectPage as A, COMPONENT_SOURCES as Ai, BUILTIN_UTILITIES as An, publishOn as Ar, isClassModifier as At, catalogTemplateFiles as B, toBindingSpecs as Bi, clearState as Bn, withPluginCatalogs as Br, toBlocks as Bt, comparePictures as C, video as Ci, authorFlows as Cn, onLoad as Cr, tw as Ct, loadImages as D, defineElement as Di, whenFailed as Dn, onSubmit as Dr, className as Dt, profilePictures as E, defaultLabel as Ei, when as En, onScroll as Er, row as Et, dataIssues as F, bindTemplate as Fi, appendState as Fn, scrollTo as Fr, BREAKPOINTS$1 as Ft, darkScheme as G, source as Gi, moveState as Gn, button$1 as Gr, expandShorthandTraced as Gt, toPortableSource as H, visibleWhen as Hi, delay as Hn, apiContainer as Hr, cssShorthands as Ht, answerAction as I, groupBindings as Ii, authLogin as In, setFieldValue as Ir, STYLE_STATES as It, importProbe as J, AUTHORING_CODES as Ji, runServerAction as Jn, channel as Jr, cssProperties as Jt, importSlug as K, twig as Ki, navigate as Kn, carousel as Kr, shorthandLonghands as Kt, CATALOG_TEMPLATE_IDENTITY as L, hasVisibilityBinding as Li, authLogout as Ln, toggleElement as Lr, css as Lt, failedFlowText as M, activeOn as Mi, getUtility as Mn, resetForm as Mr, modifierClassName as Mt, readDevTools as N, activeWhen as Ni, SET_STATE_TYPES as Nn, scrollBy as Nr, splitClassList as Nt, unrollPage as O, element as Oi, whenSucceeded as On, openDialog as Or, classNames as Ot, readDevToolsInPage as P, authorBinding as Pi, addNotification as Pn, scrollIntoView as Pr, styles as Pt, explain as Q, elementAncestorTypes as Qi, toggleState as Qn, dropdown as Qr, suggestCssProperty as Qt, blankSpace as R, hiddenWhen as Ri, authRefreshDetails as Rn, updateElement as Rr, isRuleSetSpec as Rt, alignPictures as S, themeToggle as Si, authorFlow as Sn, onKey as Sr, createTw as St, pageRegions as T, defaultAttributes as Ti, named$2 as Tn, onPointerDown as Tr, grid as Tt, space as U, withVisibility as Ui, hostAction as Un, blockHtml as Ur, expandShorthand as Ut, emptySpaceSource as V, variantFrom as Vi, cycleState as Vn, e$31 as Vr, toResponsive as Vt, space$1 as W, actionSource as Wi, invalidateQueries as Wn, blockJsx as Wr, expandShorthandPatch as Wt, EXPLAIN_KINDS as X, authoringCodeEntry as Xi, stepState as Xn, custom$1 as Xr, isCssProperty as Xt, BUILDER_NAMES as Y, AuthoringError as Yi, setState as Yn, container as Yr, cssPropertyName as Yt, GLOBAL_CALLBACK_BUILDERS as Z, isSuggestionCode as Zi, toggleInState as Zn, dialogContainer as Zr, isCustomProperty as Zt, inspectRenders as _, s$20 as _a, tabContainer as _i, selectorFor as _n, onClick as _r, suggestSpace as _t, planFixes as a, elementSlots as aa, image as ai, i$2 as an, announceOn as ar, SCHEMA_SETTINGS as at, compareTexts as b, s$22 as ba, tabContainerItem as bi, authoringCodesTable as bn, onFlowProgress as br, unusedDeclarations as bt, a as c, elementTypeNames as ca, listItem as ci, r$4 as cn, carouselNext as cr, actionSpecFromEntry as ct, compactSvg as d, e$38 as da, nodeHtml as di, digest as dn, carouselPrevious as dr, BUILTIN_TRANSFORMERS as dt, elementCallbacks as ea, embed as ei, refusalOf as en, webHook as er, explainList as et, singlePageSpace as f, t$60 as fa, pagination as fi, slugify as fn, closeDialog as fr, getTransformer as ft, openPage as g, o$24 as ga, svg as gi, pathForSlug as gn, on as gr, assertSpaceValid as gt, shortcutKey as h, i$26 as ha, richText as hi, locate as hn, declaredTrigger as hr, assertSnippetValid as ht, lintSpace as i, elementPartTypes as ia, heading as ii, d$2 as in, e$14 as ir, specToSource as it, onScreen as j, GLOBAL_SOURCES as ji, applyUtility as jn, reloadApi as jr, isStyleDeclaration as jt, inspectDocument as k, inferredLinkMode as ki, whileRunning as kn, openModal as kr, classRefs as kt, i as l, typeCallbackDefinitions as la, markdown as li, t$6 as ln, carouselPause as lr, actionToSource as lt, pressShortcut as m, a$22 as ma, reference as mi, instanceSelectorFor as mn, declaredCallback as mr, transformerCatalog as mt, authorSpace as n, elementDefaultAttributes as na, form as ni, notificationsCss as nn, applyBuiltinCallback as nr, ELEMENT_FIELDS as nt, validateSnippet as o, elementSourceTypes as oa, link as oi, FIXABLE_CODES as on, cancelApi as or, specFromSpace as ot, withElement as p, elementAttributeNames as pa, paragraph as pi, buildHandles as pn, closeModal as pr, suggestTransformer as pt, importedFiles as q, scope as qi, removeState as qn, carouselTrack as qr, cssNumberValue as qt, fixSpace as r, elementLeafTypes as ra, formControl as ri, withNotificationsCss as rn, getGlobalCallback as rr, SPACE_FIELDS as rt, validateSpace as s, elementTriggers as sa, list$1 as si, n$6 as sn, carouselGoTo as sr, compareSpaces as st, authorSnippet as t, elementCatalog as ta, fontAwesome as ti, pageFamily as tn, BUILTIN_GLOBAL_CALLBACKS as tr, explanationText as tt, o as u, typeTriggerDefinitions as ua, modalContainer as ui, e$8 as un, carouselPlay as ur, withNamedIds as ut, summariseRenders as v, n$45 as va, tabContainerBody as vi, flagGateOf as vn, onFlowEnd as vr, withoutQuieted as vt, diffPictures as w, component as wi, flowStepIds as wn, onPageLoad as wr, column as wt, pageTexts as x, t$62 as xa, text$1 as xi, defineAction as xn, onInterval as xr, tokens as xt, PAGE_TEXT_LIMIT as y, o$25 as ya, tabContainerHeader as yi, flagSpecOf as yn, onFlowError as yr, suggestClassOverrides as yt, blankTemplateFiles as z, resolveSource as zi, cancelServerAction as zn, elementsFromManifest as zr, sameBlocks as zt };
26923
+ 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$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$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$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 };