@plitzi/sdk-authoring 0.38.3 → 0.38.4

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.js CHANGED
@@ -18,23 +18,23 @@ var n$42 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$37}(?:\\.${t$58})*)\\s*\\]`;
18
18
  var r$29 = `${`${e$37}(?:${n$42})*(?:\\??\\.${t$58}(?:${n$42})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
19
19
  var i$24 = `\\{\\{\\s*${r$29}\\s*\\}\\}`;
20
20
  var a$20 = `(?:${`\\{\\{\\{\\s*${r$29}\\s*\\}\\}\\}`}|${i$24})`;
21
- var o$22 = new RegExp(a$20, "g");
22
- var s$18 = RegExp(`^${a$20}$`);
21
+ var o$23 = new RegExp(a$20, "g");
22
+ var s$19 = RegExp(`^${a$20}$`);
23
23
  //#endregion
24
24
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
25
25
  var n$41 = (n, r = !1) => {
26
26
  if (typeof n != "string") return !1;
27
- let i = r ? s$18 : o$22;
27
+ let i = r ? s$19 : o$23;
28
28
  return i.lastIndex = 0, i.test(n.trim());
29
29
  };
30
30
  //#endregion
31
31
  //#region ../sdk-shared/dist/authoring/paramSpec.mjs
32
- var t$1 = (e, t, n) => {
32
+ var t$2 = (e, t, n) => {
33
33
  let r = [];
34
34
  for (let [i, a] of Object.entries(n)) a.when && e[i] !== void 0 && !a.when(t) && r.push(i);
35
35
  return r;
36
36
  };
37
- var n = (e, t, n) => {
37
+ var n$1 = (e, t, n) => {
38
38
  let r = [];
39
39
  for (let [i, a] of Object.entries(n)) a.required && e[i] === void 0 && (!a.when || a.when(t)) && r.push(i);
40
40
  return r;
@@ -82,7 +82,7 @@ var t$57 = [
82
82
  "end",
83
83
  "nearest"
84
84
  ];
85
- var s$17 = "onScroll";
85
+ var s$18 = "onScroll";
86
86
  //#endregion
87
87
  //#region ../sdk-shared/dist/authoring/elementCallbacks.mjs
88
88
  var r$27 = {
@@ -266,6 +266,7 @@ var elementAttributeNames = {
266
266
  "ariaPressed",
267
267
  "content",
268
268
  "contentPlacement",
269
+ "controls",
269
270
  "disabled",
270
271
  "icon",
271
272
  "iconPlacement",
@@ -295,6 +296,7 @@ var elementAttributeNames = {
295
296
  container: [
296
297
  "decorative",
297
298
  "label",
299
+ "live",
298
300
  "subType"
299
301
  ],
300
302
  custom: null,
@@ -370,6 +372,7 @@ var elementAttributeNames = {
370
372
  "fetchPriority",
371
373
  "height",
372
374
  "loadMode",
375
+ "resize",
373
376
  "sizes",
374
377
  "src",
375
378
  "width"
@@ -900,10 +903,10 @@ var e$35 = {
900
903
  //#endregion
901
904
  //#region ../sdk-shared/dist/authoring/declare.mjs
902
905
  var e$1 = () => (e) => e;
903
- var t = () => (e) => e;
906
+ var t$1 = () => (e) => e;
904
907
  //#endregion
905
908
  //#region ../sdk-elements/dist/elements/advanced/BlockHtml/declaration.mjs
906
- var t$56 = t()({
909
+ var t$56 = t$1()({
907
910
  type: "blockHtml",
908
911
  content: {
909
912
  attributes: { content: "" },
@@ -943,7 +946,7 @@ var t$56 = t()({
943
946
  });
944
947
  //#endregion
945
948
  //#region ../sdk-elements/dist/elements/advanced/BlockJsx/declaration.mjs
946
- var t$55 = t()({
949
+ var t$55 = t$1()({
947
950
  type: "blockJsx",
948
951
  content: {
949
952
  attributes: {
@@ -988,7 +991,7 @@ var t$55 = t()({
988
991
  });
989
992
  //#endregion
990
993
  //#region ../sdk-elements/dist/elements/advanced/Custom/declaration.mjs
991
- var t$54 = t()({
994
+ var t$54 = t$1()({
992
995
  type: "custom",
993
996
  content: {
994
997
  attributes: {
@@ -1034,7 +1037,7 @@ var t$54 = t()({
1034
1037
  });
1035
1038
  //#endregion
1036
1039
  //#region ../sdk-elements/dist/elements/advanced/NodeHtml/declaration.mjs
1037
- var t$53 = t()({
1040
+ var t$53 = t$1()({
1038
1041
  type: "nodeHtml",
1039
1042
  content: {
1040
1043
  attributes: { subType: "div" },
@@ -1080,7 +1083,7 @@ var t$53 = t()({
1080
1083
  });
1081
1084
  //#endregion
1082
1085
  //#region ../sdk-elements/dist/elements/advanced/Reference/declaration.mjs
1083
- var t$52 = t()({
1086
+ var t$52 = t$1()({
1084
1087
  type: "reference",
1085
1088
  content: {
1086
1089
  attributes: {
@@ -1124,7 +1127,7 @@ var t$52 = t()({
1124
1127
  });
1125
1128
  //#endregion
1126
1129
  //#region ../sdk-elements/dist/elements/basic/Button/declaration.mjs
1127
- var n$40 = t()({
1130
+ var n$40 = t$1()({
1128
1131
  type: "button",
1129
1132
  attributeValues: {
1130
1133
  subType: e$1()([
@@ -1237,7 +1240,7 @@ var n$40 = t()({
1237
1240
  });
1238
1241
  //#endregion
1239
1242
  //#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
1240
- var n$39 = t()({
1243
+ var n$39 = t$1()({
1241
1244
  type: "dropdown",
1242
1245
  attributeValues: { popupPlacement: e$1()([
1243
1246
  "left",
@@ -1311,7 +1314,7 @@ var n$39 = t()({
1311
1314
  });
1312
1315
  //#endregion
1313
1316
  //#region ../sdk-elements/dist/elements/basic/Dropdown/DropdownPopup/declaration.mjs
1314
- var t$51 = t()({
1317
+ var t$51 = t$1()({
1315
1318
  type: "dropdownPopup",
1316
1319
  ancestorType: "dropdown",
1317
1320
  content: {
@@ -1370,7 +1373,7 @@ var t$51 = t()({
1370
1373
  });
1371
1374
  //#endregion
1372
1375
  //#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
1373
- var n$38 = t()({
1376
+ var n$38 = t$1()({
1374
1377
  type: "heading",
1375
1378
  attributeValues: { subType: e$1()([
1376
1379
  "h1",
@@ -1489,7 +1492,7 @@ var n$38 = t()({
1489
1492
  });
1490
1493
  //#endregion
1491
1494
  //#region ../sdk-elements/dist/elements/basic/Link/declaration.mjs
1492
- var n$37 = t()({
1495
+ var n$37 = t$1()({
1493
1496
  type: "link",
1494
1497
  attributeValues: {
1495
1498
  mode: e$1()([
@@ -1562,7 +1565,7 @@ var n$37 = t()({
1562
1565
  });
1563
1566
  //#endregion
1564
1567
  //#region ../sdk-elements/dist/elements/basic/Markdown/declaration.mjs
1565
- var t$50 = t()({
1568
+ var t$50 = t$1()({
1566
1569
  type: "markdown",
1567
1570
  content: {
1568
1571
  attributes: { content: "Markdown" },
@@ -1605,7 +1608,7 @@ var t$50 = t()({
1605
1608
  });
1606
1609
  //#endregion
1607
1610
  //#region ../sdk-elements/dist/elements/basic/Paragraph/declaration.mjs
1608
- var t$49 = t()({
1611
+ var t$49 = t$1()({
1609
1612
  type: "paragraph",
1610
1613
  content: {
1611
1614
  attributes: { content: "Paragraph" },
@@ -1648,7 +1651,7 @@ var t$49 = t()({
1648
1651
  });
1649
1652
  //#endregion
1650
1653
  //#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
1651
- var n$36 = t()({
1654
+ var n$36 = t$1()({
1652
1655
  type: "richText",
1653
1656
  attributeValues: { format: e$1()([
1654
1657
  "html",
@@ -1699,7 +1702,7 @@ var n$36 = t()({
1699
1702
  });
1700
1703
  //#endregion
1701
1704
  //#region ../sdk-elements/dist/elements/basic/Text/declaration.mjs
1702
- var t$48 = t()({
1705
+ var t$48 = t$1()({
1703
1706
  type: "text",
1704
1707
  content: {
1705
1708
  attributes: { content: "Text" },
@@ -1743,7 +1746,7 @@ var t$48 = t()({
1743
1746
  });
1744
1747
  //#endregion
1745
1748
  //#region ../sdk-elements/dist/elements/basic/ThemeToggle/declaration.mjs
1746
- var n$35 = t()({
1749
+ var n$35 = t$1()({
1747
1750
  type: "themeToggle",
1748
1751
  attributeValues: { subType: e$1()(["switch", "segmented"]) },
1749
1752
  triggers: { onThemeChange: {
@@ -1807,7 +1810,7 @@ var n$35 = t()({
1807
1810
  });
1808
1811
  //#endregion
1809
1812
  //#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
1810
- var n$34 = t()({
1813
+ var n$34 = t$1()({
1811
1814
  type: "form",
1812
1815
  attributeValues: { method: e$1()(["get", "post"]) },
1813
1816
  sourceType: "apiContainer",
@@ -1959,13 +1962,16 @@ var a$18 = {
1959
1962
  color: "red",
1960
1963
  "margin-top": "4px"
1961
1964
  };
1962
- var o$21 = t()({
1965
+ var o$22 = t$1()({
1963
1966
  type: "formControl",
1964
1967
  attributeValues: { subType: e$1()([
1965
1968
  "text",
1966
1969
  "number",
1967
1970
  "email",
1968
1971
  "password",
1972
+ "search",
1973
+ "url",
1974
+ "tel",
1969
1975
  "date",
1970
1976
  "time",
1971
1977
  "checkbox",
@@ -2140,7 +2146,7 @@ var o$21 = t()({
2140
2146
  });
2141
2147
  //#endregion
2142
2148
  //#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
2143
- var n$32 = t()({
2149
+ var n$32 = t$1()({
2144
2150
  type: "layoutContainer",
2145
2151
  attributeValues: { subType: e$1()([
2146
2152
  "div",
@@ -2194,7 +2200,7 @@ var n$32 = t()({
2194
2200
  });
2195
2201
  //#endregion
2196
2202
  //#region ../sdk-elements/dist/elements/internal/Loading/declaration.mjs
2197
- var t$47 = t()({
2203
+ var t$47 = t$1()({
2198
2204
  type: "loading",
2199
2205
  content: {
2200
2206
  attributes: {},
@@ -2234,7 +2240,7 @@ var t$47 = t()({
2234
2240
  });
2235
2241
  //#endregion
2236
2242
  //#region ../sdk-elements/dist/elements/internal/NotFound/declaration.mjs
2237
- var t$46 = t()({
2243
+ var t$46 = t$1()({
2238
2244
  type: "notFound",
2239
2245
  content: {
2240
2246
  attributes: {},
@@ -2274,7 +2280,7 @@ var t$46 = t()({
2274
2280
  });
2275
2281
  //#endregion
2276
2282
  //#region ../sdk-elements/dist/elements/internal/Page/declaration.mjs
2277
- var t$45 = t()({
2283
+ var t$45 = t$1()({
2278
2284
  type: "page",
2279
2285
  triggers: { onPageLoad: {
2280
2286
  action: "onPageLoad",
@@ -2348,7 +2354,7 @@ var t$45 = t()({
2348
2354
  });
2349
2355
  //#endregion
2350
2356
  //#region ../sdk-elements/dist/elements/media/Embed/declaration.mjs
2351
- var t$44 = t()({
2357
+ var t$44 = t$1()({
2352
2358
  type: "embed",
2353
2359
  content: {
2354
2360
  attributes: {
@@ -2400,7 +2406,7 @@ var t$44 = t()({
2400
2406
  });
2401
2407
  //#endregion
2402
2408
  //#region ../sdk-elements/dist/elements/media/FontAwesome/declaration.mjs
2403
- var t$43 = t()({
2409
+ var t$43 = t$1()({
2404
2410
  type: "fontAwesome",
2405
2411
  content: {
2406
2412
  attributes: {
@@ -2447,7 +2453,7 @@ var t$43 = t()({
2447
2453
  });
2448
2454
  //#endregion
2449
2455
  //#region ../sdk-elements/dist/elements/media/Image/declaration.mjs
2450
- var n$31 = t()({
2456
+ var n$31 = t$1()({
2451
2457
  type: "image",
2452
2458
  attributeValues: {
2453
2459
  fetchPriority: e$1()([
@@ -2463,7 +2469,7 @@ var n$31 = t()({
2463
2469
  },
2464
2470
  content: {
2465
2471
  attributes: {
2466
- src: "https://cdn.plitzi.com/resources/img/placeholder-img.svg",
2472
+ src: "",
2467
2473
  alt: "",
2468
2474
  decorative: !1,
2469
2475
  fetchPriority: "auto",
@@ -2509,7 +2515,7 @@ var n$31 = t()({
2509
2515
  });
2510
2516
  //#endregion
2511
2517
  //#region ../sdk-elements/dist/elements/media/Svg/declaration.mjs
2512
- var t$42 = t()({
2518
+ var t$42 = t$1()({
2513
2519
  type: "svg",
2514
2520
  content: {
2515
2521
  attributes: {
@@ -2556,7 +2562,7 @@ var t$42 = t()({
2556
2562
  });
2557
2563
  //#endregion
2558
2564
  //#region ../sdk-elements/dist/elements/media/Video/declaration.mjs
2559
- var t$41 = t()({
2565
+ var t$41 = t$1()({
2560
2566
  type: "video",
2561
2567
  content: {
2562
2568
  attributes: {
@@ -2606,7 +2612,7 @@ var t$41 = t()({
2606
2612
  });
2607
2613
  //#endregion
2608
2614
  //#region ../sdk-elements/dist/elements/provider/ApiContainer/declaration.mjs
2609
- var n$30 = t()({
2615
+ var n$30 = t$1()({
2610
2616
  type: "apiContainer",
2611
2617
  attributeValues: {
2612
2618
  subType: e$1()([
@@ -2775,7 +2781,7 @@ var n$30 = t()({
2775
2781
  });
2776
2782
  //#endregion
2777
2783
  //#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
2778
- var n$29 = t()({
2784
+ var n$29 = t$1()({
2779
2785
  type: "channel",
2780
2786
  attributeValues: { subType: e$1()([
2781
2787
  "",
@@ -2898,7 +2904,7 @@ var n$29 = t()({
2898
2904
  });
2899
2905
  //#endregion
2900
2906
  //#region ../sdk-elements/dist/elements/structure/Carousel/declaration.mjs
2901
- var t$40 = t()({
2907
+ var t$40 = t$1()({
2902
2908
  type: "carousel",
2903
2909
  sourceType: "carousel",
2904
2910
  triggers: { onChange: {
@@ -3002,7 +3008,7 @@ var t$40 = t()({
3002
3008
  });
3003
3009
  //#endregion
3004
3010
  //#region ../sdk-elements/dist/elements/structure/Carousel/CarouselTrack/declaration.mjs
3005
- var t$39 = t()({
3011
+ var t$39 = t$1()({
3006
3012
  type: "carouselTrack",
3007
3013
  ancestorType: "carousel",
3008
3014
  content: {
@@ -3065,31 +3071,39 @@ var B = {
3065
3071
  Carousel: t$40,
3066
3072
  CarouselTrack: t$39,
3067
3073
  Channel: n$29,
3068
- Container: t()({
3074
+ Container: t$1()({
3069
3075
  type: "container",
3070
- attributeValues: { subType: e$1()([
3071
- "div",
3072
- "header",
3073
- "footer",
3074
- "nav",
3075
- "main",
3076
- "section",
3077
- "article",
3078
- "aside",
3079
- "address",
3080
- "figure",
3081
- "dl",
3082
- "dt",
3083
- "dd",
3084
- "li",
3085
- "h1",
3086
- "h2",
3087
- "h3",
3088
- "h4",
3089
- "h5",
3090
- "h6",
3091
- "span"
3092
- ]) },
3076
+ attributeValues: {
3077
+ subType: e$1()([
3078
+ "div",
3079
+ "header",
3080
+ "footer",
3081
+ "nav",
3082
+ "main",
3083
+ "section",
3084
+ "article",
3085
+ "aside",
3086
+ "address",
3087
+ "figure",
3088
+ "dl",
3089
+ "dt",
3090
+ "dd",
3091
+ "li",
3092
+ "h1",
3093
+ "h2",
3094
+ "h3",
3095
+ "h4",
3096
+ "h5",
3097
+ "h6",
3098
+ "p",
3099
+ "span"
3100
+ ]),
3101
+ live: e$1()([
3102
+ "",
3103
+ "polite",
3104
+ "assertive"
3105
+ ])
3106
+ },
3093
3107
  content: {
3094
3108
  attributes: { subType: "div" },
3095
3109
  definition: {
@@ -3129,7 +3143,7 @@ var B = {
3129
3143
  }
3130
3144
  }),
3131
3145
  Custom: t$54,
3132
- DialogContainer: t()({
3146
+ DialogContainer: t$1()({
3133
3147
  type: "dialogContainer",
3134
3148
  sourceType: "dialogContainer",
3135
3149
  triggers: {
@@ -3321,12 +3335,12 @@ var B = {
3321
3335
  Embed: t$44,
3322
3336
  FontAwesome: t$43,
3323
3337
  Form: n$34,
3324
- FormControl: o$21,
3338
+ FormControl: o$22,
3325
3339
  Heading: n$38,
3326
3340
  Image: n$31,
3327
3341
  LayoutContainer: n$32,
3328
3342
  Link: n$37,
3329
- List: t()({
3343
+ List: t$1()({
3330
3344
  type: "list",
3331
3345
  attributeValues: {
3332
3346
  subType: e$1()(["ul", "ol"]),
@@ -3399,7 +3413,7 @@ var B = {
3399
3413
  "listItem"
3400
3414
  ]
3401
3415
  }),
3402
- ListItem: t()({
3416
+ ListItem: t$1()({
3403
3417
  type: "listItem",
3404
3418
  content: {
3405
3419
  attributes: {},
@@ -3440,7 +3454,7 @@ var B = {
3440
3454
  }),
3441
3455
  Loading: t$47,
3442
3456
  Markdown: t$50,
3443
- ModalContainer: t()({
3457
+ ModalContainer: t$1()({
3444
3458
  type: "modalContainer",
3445
3459
  sourceType: "modalContainer",
3446
3460
  triggers: {
@@ -3605,7 +3619,7 @@ var B = {
3605
3619
  NodeHtml: t$53,
3606
3620
  NotFound: t$46,
3607
3621
  Page: t$45,
3608
- Pagination: t()({
3622
+ Pagination: t$1()({
3609
3623
  type: "pagination",
3610
3624
  attributeValues: {
3611
3625
  mode: e$1()(["pages", "loadMore"]),
@@ -3674,7 +3688,7 @@ var B = {
3674
3688
  Reference: t$52,
3675
3689
  RichText: n$36,
3676
3690
  Svg: t$42,
3677
- TabContainer: t()({
3691
+ TabContainer: t$1()({
3678
3692
  type: "tabContainer",
3679
3693
  content: {
3680
3694
  attributes: {},
@@ -3715,7 +3729,7 @@ var B = {
3715
3729
  },
3716
3730
  initialItems: ["tabContainerHeader", "tabContainerBody"]
3717
3731
  }),
3718
- TabContainerBody: t()({
3732
+ TabContainerBody: t$1()({
3719
3733
  type: "tabContainerBody",
3720
3734
  ancestorType: "tabContainer",
3721
3735
  content: {
@@ -3761,7 +3775,7 @@ var B = {
3761
3775
  "tabContainerItem"
3762
3776
  ]
3763
3777
  }),
3764
- TabContainerHeader: t()({
3778
+ TabContainerHeader: t$1()({
3765
3779
  type: "tabContainerHeader",
3766
3780
  ancestorType: "tabContainer",
3767
3781
  content: {
@@ -3807,7 +3821,7 @@ var B = {
3807
3821
  "tabContainerItem"
3808
3822
  ]
3809
3823
  }),
3810
- TabContainerItem: t()({
3824
+ TabContainerItem: t$1()({
3811
3825
  type: "tabContainerItem",
3812
3826
  content: {
3813
3827
  attributes: {},
@@ -4077,10 +4091,25 @@ var AUTHORING_CODES = {
4077
4091
  means: "an id a binding, a template or a test cannot name",
4078
4092
  fix: "a letter first, then letters, digits, `-` and `_`: `'hero-title'`"
4079
4093
  },
4094
+ "controls-no-anchor": {
4095
+ kind: "warned",
4096
+ means: "a button's `controls` naming no anchor — `aria-controls` points at nothing",
4097
+ fix: "an `anchor` on the element it shows and hides, and `controls` naming it"
4098
+ },
4099
+ "quiet-unknown": {
4100
+ kind: "refused",
4101
+ means: "an element's `quiet` naming something that is not a suggestion's code — a problem is never quieted",
4102
+ fix: "the code of the suggestion it was offered: `quiet: ['repeated-shape']`"
4103
+ },
4104
+ "controls-unknown": {
4105
+ kind: "refused",
4106
+ means: "a button's `controls` naming no element of the space",
4107
+ fix: "the id of the element it shows and hides: `controls: 'faq-answer'`"
4108
+ },
4080
4109
  "id-taken": {
4081
4110
  kind: "refused",
4082
4111
  means: "two elements with one id — ids are one namespace for the whole space",
4083
- fix: "wrap what a helper builds in `scope('promos', ref => …)`: every id inside is prefixed, `ref('slides')` names one"
4112
+ fix: "a name taken by a page or a layout: a name of its own; a helper called twice: `scope('promos', ref => …)`, every id inside prefixed"
4084
4113
  },
4085
4114
  "id-shadows-global": {
4086
4115
  kind: "refused",
@@ -4259,8 +4288,8 @@ var AUTHORING_CODES = {
4259
4288
  },
4260
4289
  "span-holds-block": {
4261
4290
  kind: "warned",
4262
- means: "a `container({ subType: 'span' })` holding a heading, a paragraph, a list, a form or prose",
4263
- fix: "a `div` (leave `subType` out), or words: a `text` with `display: inline` in its class"
4291
+ means: "a `container` with `subType: 'span'` or `'p'` holding a heading, a paragraph, a list, a form or prose",
4292
+ fix: "a `div` (leave `subType` out), or words and inline elements: a `text`, a `link`"
4264
4293
  },
4265
4294
  "part-missing": {
4266
4295
  kind: "refused",
@@ -4347,10 +4376,20 @@ var AUTHORING_CODES = {
4347
4376
  means: "an `apiContainer` that asks nothing",
4348
4377
  fix: "a `query` (or `action`, `connector`, `resource`)"
4349
4378
  },
4379
+ "path-not-in-data": {
4380
+ kind: "warned",
4381
+ means: "a binding onto a provider whose answer the author could read (`data`), through a path that answer does not have",
4382
+ fix: "the path the message lists the keys for — `p.data.plans`, not `p.data.landing.plans`"
4383
+ },
4384
+ "server-provider-in-component": {
4385
+ kind: "refused",
4386
+ means: "a `runtime: 'server'` element inside a component: the page server resolves a page's and its layouts', never a component's",
4387
+ fix: "put the provider on the page, around the instance, and hand the component its rows as a prop"
4388
+ },
4350
4389
  "server-data-without-rsc": {
4351
4390
  kind: "warned",
4352
- means: "a `runtime: 'server'` provider with a `connector` or `action` in a space that does not turn server data on",
4353
- fix: "`rsc: { enabled: true }` on the space"
4391
+ means: "a `runtime: 'server'` provider — `connector`, `action` or `query` — in a space that turns server data off (`rsc: { enabled: false }`)",
4392
+ fix: "drop `rsc: { enabled: false }`: server data is on unless a space turns it off"
4354
4393
  },
4355
4394
  "route-param-undeclared": {
4356
4395
  kind: "warned",
@@ -4789,6 +4828,8 @@ var AUTHORING_CODES = {
4789
4828
  }
4790
4829
  };
4791
4830
  var isAuthoringCode = (code) => Object.hasOwn(AUTHORING_CODES, code);
4831
+ /** Whether a code is a suggestion's: what an element's `quiet` may name. */
4832
+ var isSuggestionCode = (code) => typeof code === "string" && isAuthoringCode(code) && AUTHORING_CODES[code].kind === "suggested";
4792
4833
  /**
4793
4834
  * The row of a code a problem was reported with — what any tool that relays a problem adds to it (the MCP, the CLI),
4794
4835
  * so the fix travels with the code and nobody needs the skill's page to read it. `undefined` for a structural
@@ -4895,11 +4936,11 @@ var fieldShape = (name, shape, key) => {
4895
4936
  const has = Array.isArray(shape) ? `"${name}" is a list, read by position: \`.0\`, or \`[0]\`.` : typeof shape === "object" ? `"${name}" has ${fields.map((field) => `"${field}"`).join(", ") || "no fields"} in the sample.` : `"${name}" is a ${typeof shape} in the sample, with no fields.`;
4896
4937
  throw new AuthoringError("source-field-unknown", `"${name}.${key}" is not in the sample its source was typed with${didYouMean(key, fields)} ${has} A field the sample lacks is one the answer may not have either: add it to the sample, or read one it has.`);
4897
4938
  };
4898
- var named$2 = (name) => name;
4939
+ var named$3 = (name) => name;
4899
4940
  var pathTo = (name, shape, own = {}) => new Proxy({ [PATH]: name }, { get: (target, key) => {
4900
4941
  if (key === PATH) return target[PATH];
4901
4942
  if (key === SHAPE) return shape;
4902
- if (key === Symbol.toPrimitive || key === "toString" || key === "toJSON" || key === "valueOf") return named$2.bind(null, name);
4943
+ if (key === Symbol.toPrimitive || key === "toString" || key === "toJSON" || key === "valueOf") return named$3.bind(null, name);
4903
4944
  if (typeof key === "symbol" || key === "then") return;
4904
4945
  if (Object.hasOwn(own, key)) return own[key];
4905
4946
  return pathTo(`${name}.${key}`, fieldShape(name, shape, key));
@@ -5004,13 +5045,13 @@ var n$25 = (n) => t$30(n) || n >= e$33.Zero && n <= e$33.Nine;
5004
5045
  var r$24 = (t) => n$25(t) || t === e$33.Minus;
5005
5046
  var i$21 = (t) => t >= e$33.Zero && t <= e$33.Nine;
5006
5047
  var a$17 = (t) => t === e$33.Space || t === e$33.Tab || t === e$33.Newline || t === e$33.CarriageReturn;
5007
- var o$20 = (e) => {
5048
+ var o$21 = (e) => {
5008
5049
  let r = e.length;
5009
5050
  if (r === 0 || !t$30(e.charCodeAt(0))) return !1;
5010
5051
  for (let t = 1; t < r; t++) if (!n$25(e.charCodeAt(t))) return !1;
5011
5052
  return !0;
5012
5053
  };
5013
- var s$16 = (r) => {
5054
+ var s$17 = (r) => {
5014
5055
  let a = r.length;
5015
5056
  if (a === 0 || !t$30(r.charCodeAt(0))) return !1;
5016
5057
  let o = !1, s = !1;
@@ -5030,7 +5071,7 @@ var s$16 = (r) => {
5030
5071
  }
5031
5072
  return !o;
5032
5073
  };
5033
- var c$14 = (e) => o$20(e);
5074
+ var c$14 = (e) => o$21(e);
5034
5075
  //#endregion
5035
5076
  //#region ../sdk-shared/dist/helpers/twigWrapper/Lexer/Lexer.mjs
5036
5077
  var e$32 = (e) => {
@@ -5095,7 +5136,7 @@ var t$29 = (t) => {
5095
5136
  };
5096
5137
  //#endregion
5097
5138
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/Cursor.mjs
5098
- var o$19 = class {
5139
+ var o$20 = class {
5099
5140
  src;
5100
5141
  pos = 0;
5101
5142
  constructor(e) {
@@ -5162,16 +5203,16 @@ var o$19 = class {
5162
5203
  //#endregion
5163
5204
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs
5164
5205
  var r$23 = (e, t) => {
5165
- let n = new s$15(e, t), r = n.parseTernary();
5206
+ let n = new s$16(e, t), r = n.parseTernary();
5166
5207
  return n.expectEnd(), r;
5167
5208
  };
5168
5209
  var i$20 = (e, t) => {
5169
- let n = new s$15(e, t), r = n.parseApplyChain();
5210
+ let n = new s$16(e, t), r = n.parseApplyChain();
5170
5211
  return n.expectEnd(), r;
5171
5212
  };
5172
5213
  var a$16 = ["same as", "divisible by"];
5173
- var o$18 = "`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`.";
5174
- var s$15 = class extends o$19 {
5214
+ var o$19 = "`matches` is not supported: templates evaluate no regular expressions. Use `starts with`, `ends with` or `in`.";
5215
+ var s$16 = class extends o$20 {
5175
5216
  issues;
5176
5217
  constructor(e, t) {
5177
5218
  super(e), this.issues = t;
@@ -5308,7 +5349,7 @@ var s$15 = class extends o$19 {
5308
5349
  continue;
5309
5350
  }
5310
5351
  if (this.matchKeyword("matches")) {
5311
- this.report(o$18), e = {
5352
+ this.report(o$19), e = {
5312
5353
  type: "binary",
5313
5354
  operator: "matches",
5314
5355
  left: e,
@@ -5637,7 +5678,7 @@ var r$22 = (t) => {
5637
5678
  //#endregion
5638
5679
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/Parser.mjs
5639
5680
  var c$13 = (e, t = !1, n) => {
5640
- let r = new f$6(e, t, n), i = r.parseBody();
5681
+ let r = new f$7(e, t, n), i = r.parseBody();
5641
5682
  if (!r.error) {
5642
5683
  let e = r.peek();
5643
5684
  if (e && e.type === "tag") {
@@ -5679,7 +5720,7 @@ var d$9 = () => ({
5679
5720
  body: [],
5680
5721
  elseBody: null
5681
5722
  });
5682
- var f$6 = class {
5723
+ var f$7 = class {
5683
5724
  tokens;
5684
5725
  keepEmptyTokens;
5685
5726
  issues;
@@ -5730,7 +5771,7 @@ var f$6 = class {
5730
5771
  source: ""
5731
5772
  };
5732
5773
  let r = t.content.trim(), i = this.keepEmptyTokens ? e$31(t.content, t.raw) : "";
5733
- if (o$20(r)) return {
5774
+ if (o$21(r)) return {
5734
5775
  type: "variable",
5735
5776
  raw: t.raw,
5736
5777
  expression: {
@@ -5888,7 +5929,7 @@ var c$12 = (t) => {
5888
5929
  n = !0;
5889
5930
  break;
5890
5931
  }
5891
- if (a.type === "variable" && !s$16(a.content.trim())) {
5932
+ if (a.type === "variable" && !s$17(a.content.trim())) {
5892
5933
  r = !1;
5893
5934
  break;
5894
5935
  }
@@ -6067,7 +6108,13 @@ var t$27 = {
6067
6108
  CLIP_PATH: "clip-path",
6068
6109
  TRANSFORM: "transform",
6069
6110
  TRANSFORM_ORIGIN: "transform-origin",
6111
+ TRANSLATE: "translate",
6112
+ ROTATE: "rotate",
6113
+ SCALE: "scale",
6114
+ TRANSFORM_STYLE: "transform-style",
6070
6115
  PERSPECTIVE: "perspective",
6116
+ PERSPECTIVE_ORIGIN: "perspective-origin",
6117
+ BACKFACE_VISIBILITY: "backface-visibility",
6071
6118
  WILL_CHANGE: "will-change",
6072
6119
  OUTLINE_WIDTH: "outline-width",
6073
6120
  OUTLINE_STYLE: "outline-style",
@@ -6109,6 +6156,8 @@ var t$27 = {
6109
6156
  OVERFLOW_Y: "overflow-y",
6110
6157
  SCROLLBAR_WIDTH: "scrollbar-width",
6111
6158
  SCROLLBAR_COLOR: "scrollbar-color",
6159
+ CONTAINER_TYPE: "container-type",
6160
+ CONTAINER_NAME: "container-name",
6112
6161
  OBJECT_FIT: "object-fit",
6113
6162
  OBJECT_POSITION: "object-position",
6114
6163
  COLUMN_WIDTH: "column-width",
@@ -6189,7 +6238,7 @@ Object.values(t$27).map((e) => ({
6189
6238
  path: e,
6190
6239
  label: e
6191
6240
  }));
6192
- t$27.DISPLAY, t$27.FLEX_WRAP, t$27.FLEX_DIRECTION, t$27.ALIGN_ITEMS, t$27.JUSTIFY_ITEMS, t$27.JUSTIFY_CONTENT, t$27.ALIGN_CONTENT, t$27.ROW_GAP, t$27.COLUMN_GAP, t$27.GRID_ROW_GAP, t$27.GRID_COLUMN_GAP, t$27.GRID_TEMPLATE_AREAS, t$27.GRID_TEMPLATE_COLUMNS, t$27.GRID_TEMPLATE_ROWS, t$27.GRID_AUTO_FLOW, t$27.GRID_AUTO_ROWS, t$27.GRID_AUTO_COLUMNS, t$27.GRID_ROW_START, t$27.GRID_COLUMN_START, t$27.GRID_ROW_END, t$27.GRID_COLUMN_END, t$27.ALIGN_SELF, t$27.JUSTIFY_SELF, t$27.ORDER, t$27.FLEX_GROW, t$27.FLEX_SHRINK, t$27.FLEX_BASIS, t$27.LIST_STYLE, t$27.LIST_STYLE_TYPE, t$27.LIST_STYLE_POSITION, t$27.LIST_STYLE_IMAGE, t$27.BACKGROUND_COLOR, t$27.BACKGROUND_IMAGE, t$27.BACKGROUND_POSITION, t$27.BACKGROUND_SIZE, t$27.BACKGROUND_CLIP, t$27.BACKGROUND_ORIGIN, t$27.BACKGROUND_REPEAT, t$27.BACKGROUND_ATTACHMENT, t$27.BACKGROUND_BLEND_MODE, t$27.MASK_IMAGE, t$27.MASK_SIZE, t$27.MASK_POSITION, t$27.MASK_REPEAT, t$27.MASK_COMPOSITE, t$27.WEBKIT_MASK_IMAGE, t$27.BORDER_TOP_STYLE, t$27.BORDER_TOP_WIDTH, t$27.BORDER_TOP_COLOR, t$27.BORDER_BOTTOM_STYLE, t$27.BORDER_BOTTOM_WIDTH, t$27.BORDER_BOTTOM_COLOR, t$27.BORDER_LEFT_STYLE, t$27.BORDER_LEFT_WIDTH, t$27.BORDER_LEFT_COLOR, t$27.BORDER_RIGHT_STYLE, t$27.BORDER_RIGHT_WIDTH, t$27.BORDER_RIGHT_COLOR, t$27.BORDER_TOP_LEFT_RADIUS, t$27.BORDER_TOP_RIGHT_RADIUS, t$27.BORDER_BOTTOM_LEFT_RADIUS, t$27.BORDER_BOTTOM_RIGHT_RADIUS, t$27.BORDER_COLLAPSE, t$27.BORDER_SPACING, t$27.TABLE_LAYOUT, t$27.OPACITY, t$27.VISIBILITY, t$27.CURSOR, t$27.TRANSITION, t$27.TRANSITION_PROPERTY, t$27.TRANSITION_DURATION, t$27.TRANSITION_TIMING_FUNCTION, t$27.TRANSITION_DELAY, t$27.TRANSITION_BEHAVIOR, t$27.ANIMATION, t$27.ANIMATION_NAME, t$27.ANIMATION_DURATION, t$27.ANIMATION_TIMING_FUNCTION, t$27.ANIMATION_DELAY, t$27.ANIMATION_ITERATION_COUNT, t$27.ANIMATION_DIRECTION, t$27.ANIMATION_FILL_MODE, t$27.ANIMATION_PLAY_STATE, t$27.ANIMATION_TIMELINE, t$27.ANIMATION_RANGE, t$27.BOX_SHADOW, t$27.FILTER, t$27.BACKDROP_FILTER, t$27.MIX_BLEND_MODE, t$27.ISOLATION, t$27.CLIP_PATH, t$27.TRANSFORM, t$27.TRANSFORM_ORIGIN, t$27.PERSPECTIVE, t$27.WILL_CHANGE, t$27.OUTLINE_WIDTH, t$27.OUTLINE_STYLE, t$27.OUTLINE_COLOR, t$27.OUTLINE_OFFSET, t$27.POINTER_EVENTS, t$27.USER_SELECT, t$27.TOUCH_ACTION, t$27.RESIZE, t$27.APPEARANCE, t$27.SCROLL_BEHAVIOR, t$27.OVERSCROLL_BEHAVIOR, t$27.SCROLL_SNAP_TYPE, t$27.SCROLL_SNAP_ALIGN, t$27.SCROLL_SNAP_STOP, t$27.SCROLL_PADDING_TOP, t$27.SCROLL_MARGIN_TOP, t$27.ACCENT_COLOR, t$27.CARET_COLOR, t$27.COLOR_SCHEME, t$27.POSITION, t$27.FLOAT, t$27.CLEAR, t$27.Z_INDEX, t$27.TOP, t$27.BOTTOM, t$27.LEFT, t$27.RIGHT, t$27.BOX_SIZING, t$27.ASPECT_RATIO, t$27.WIDTH, t$27.HEIGHT, t$27.MIN_WIDTH, t$27.MIN_HEIGHT, t$27.MAX_WIDTH, t$27.MAX_HEIGHT, t$27.OVERFLOW, t$27.OVERFLOW_X, t$27.OVERFLOW_Y, t$27.SCROLLBAR_WIDTH, t$27.SCROLLBAR_COLOR, t$27.OBJECT_FIT, t$27.OBJECT_POSITION, t$27.COLUMN_WIDTH, t$27.COLUMN_COUNT, t$27.MARGIN_TOP, t$27.MARGIN_BOTTOM, t$27.MARGIN_LEFT, t$27.MARGIN_RIGHT, t$27.PADDING_TOP, t$27.PADDING_BOTTOM, t$27.PADDING_LEFT, t$27.PADDING_RIGHT, t$27.FONT_FAMILY, t$27.FONT_WEIGHT, t$27.FONT_SIZE, t$27.LINE_HEIGHT, t$27.COLOR, t$27.TEXT_ALIGN, t$27.FONT_STYLE, t$27.FONT_VARIANT, t$27.FONT_VARIANT_NUMERIC, t$27.FONT_FEATURE_SETTINGS, t$27.TEXT_DECORATION, t$27.TEXT_DECORATION_LINE, t$27.TEXT_DECORATION_COLOR, t$27.TEXT_DECORATION_STYLE, t$27.TEXT_DECORATION_THICKNESS, t$27.TEXT_UNDERLINE_OFFSET, t$27.LETTER_SPACING, t$27.WORD_SPACING, t$27.TEXT_INDENT, t$27.TEXT_TRANSFORM, t$27.DIRECTION, t$27.WHITE_SPACE, t$27.TEXT_WRAP, t$27.WORD_BREAK, t$27.OVERFLOW_WRAP, t$27.HYPHENS, t$27.VERTICAL_ALIGN, t$27.TEXT_OVERFLOW, t$27.TEXT_SHADOW, t$27.LINE_CLAMP, t$27.WEBKIT_LINE_CLAMP, t$27.WEBKIT_BOX_ORIENT, t$27.WEBKIT_TEXT_FILL_COLOR, t$27.WEBKIT_BACKGROUND_CLIP, t$27.BOX_DECORATION_BREAK, t$27.WEBKIT_BOX_DECORATION_BREAK, t$27.FILL, t$27.STROKE, t$27.STROKE_WIDTH;
6241
+ t$27.DISPLAY, t$27.FLEX_WRAP, t$27.FLEX_DIRECTION, t$27.ALIGN_ITEMS, t$27.JUSTIFY_ITEMS, t$27.JUSTIFY_CONTENT, t$27.ALIGN_CONTENT, t$27.ROW_GAP, t$27.COLUMN_GAP, t$27.GRID_ROW_GAP, t$27.GRID_COLUMN_GAP, t$27.GRID_TEMPLATE_AREAS, t$27.GRID_TEMPLATE_COLUMNS, t$27.GRID_TEMPLATE_ROWS, t$27.GRID_AUTO_FLOW, t$27.GRID_AUTO_ROWS, t$27.GRID_AUTO_COLUMNS, t$27.GRID_ROW_START, t$27.GRID_COLUMN_START, t$27.GRID_ROW_END, t$27.GRID_COLUMN_END, t$27.ALIGN_SELF, t$27.JUSTIFY_SELF, t$27.ORDER, t$27.FLEX_GROW, t$27.FLEX_SHRINK, t$27.FLEX_BASIS, t$27.LIST_STYLE, t$27.LIST_STYLE_TYPE, t$27.LIST_STYLE_POSITION, t$27.LIST_STYLE_IMAGE, t$27.BACKGROUND_COLOR, t$27.BACKGROUND_IMAGE, t$27.BACKGROUND_POSITION, t$27.BACKGROUND_SIZE, t$27.BACKGROUND_CLIP, t$27.BACKGROUND_ORIGIN, t$27.BACKGROUND_REPEAT, t$27.BACKGROUND_ATTACHMENT, t$27.BACKGROUND_BLEND_MODE, t$27.MASK_IMAGE, t$27.MASK_SIZE, t$27.MASK_POSITION, t$27.MASK_REPEAT, t$27.MASK_COMPOSITE, t$27.WEBKIT_MASK_IMAGE, t$27.BORDER_TOP_STYLE, t$27.BORDER_TOP_WIDTH, t$27.BORDER_TOP_COLOR, t$27.BORDER_BOTTOM_STYLE, t$27.BORDER_BOTTOM_WIDTH, t$27.BORDER_BOTTOM_COLOR, t$27.BORDER_LEFT_STYLE, t$27.BORDER_LEFT_WIDTH, t$27.BORDER_LEFT_COLOR, t$27.BORDER_RIGHT_STYLE, t$27.BORDER_RIGHT_WIDTH, t$27.BORDER_RIGHT_COLOR, t$27.BORDER_TOP_LEFT_RADIUS, t$27.BORDER_TOP_RIGHT_RADIUS, t$27.BORDER_BOTTOM_LEFT_RADIUS, t$27.BORDER_BOTTOM_RIGHT_RADIUS, t$27.BORDER_COLLAPSE, t$27.BORDER_SPACING, t$27.TABLE_LAYOUT, t$27.OPACITY, t$27.VISIBILITY, t$27.CURSOR, t$27.TRANSITION, t$27.TRANSITION_PROPERTY, t$27.TRANSITION_DURATION, t$27.TRANSITION_TIMING_FUNCTION, t$27.TRANSITION_DELAY, t$27.TRANSITION_BEHAVIOR, t$27.ANIMATION, t$27.ANIMATION_NAME, t$27.ANIMATION_DURATION, t$27.ANIMATION_TIMING_FUNCTION, t$27.ANIMATION_DELAY, t$27.ANIMATION_ITERATION_COUNT, t$27.ANIMATION_DIRECTION, t$27.ANIMATION_FILL_MODE, t$27.ANIMATION_PLAY_STATE, t$27.ANIMATION_TIMELINE, t$27.ANIMATION_RANGE, t$27.BOX_SHADOW, t$27.FILTER, t$27.BACKDROP_FILTER, t$27.MIX_BLEND_MODE, t$27.ISOLATION, t$27.CLIP_PATH, t$27.TRANSFORM, t$27.TRANSFORM_ORIGIN, t$27.TRANSLATE, t$27.ROTATE, t$27.SCALE, t$27.TRANSFORM_STYLE, t$27.PERSPECTIVE, t$27.PERSPECTIVE_ORIGIN, t$27.BACKFACE_VISIBILITY, t$27.WILL_CHANGE, t$27.OUTLINE_WIDTH, t$27.OUTLINE_STYLE, t$27.OUTLINE_COLOR, t$27.OUTLINE_OFFSET, t$27.POINTER_EVENTS, t$27.USER_SELECT, t$27.TOUCH_ACTION, t$27.RESIZE, t$27.APPEARANCE, t$27.SCROLL_BEHAVIOR, t$27.OVERSCROLL_BEHAVIOR, t$27.SCROLL_SNAP_TYPE, t$27.SCROLL_SNAP_ALIGN, t$27.SCROLL_SNAP_STOP, t$27.SCROLL_PADDING_TOP, t$27.SCROLL_MARGIN_TOP, t$27.ACCENT_COLOR, t$27.CARET_COLOR, t$27.COLOR_SCHEME, t$27.POSITION, t$27.FLOAT, t$27.CLEAR, t$27.Z_INDEX, t$27.TOP, t$27.BOTTOM, t$27.LEFT, t$27.RIGHT, t$27.BOX_SIZING, t$27.ASPECT_RATIO, t$27.WIDTH, t$27.HEIGHT, t$27.MIN_WIDTH, t$27.MIN_HEIGHT, t$27.MAX_WIDTH, t$27.MAX_HEIGHT, t$27.OVERFLOW, t$27.OVERFLOW_X, t$27.OVERFLOW_Y, t$27.SCROLLBAR_WIDTH, t$27.SCROLLBAR_COLOR, t$27.CONTAINER_TYPE, t$27.CONTAINER_NAME, t$27.OBJECT_FIT, t$27.OBJECT_POSITION, t$27.COLUMN_WIDTH, t$27.COLUMN_COUNT, t$27.MARGIN_TOP, t$27.MARGIN_BOTTOM, t$27.MARGIN_LEFT, t$27.MARGIN_RIGHT, t$27.PADDING_TOP, t$27.PADDING_BOTTOM, t$27.PADDING_LEFT, t$27.PADDING_RIGHT, t$27.FONT_FAMILY, t$27.FONT_WEIGHT, t$27.FONT_SIZE, t$27.LINE_HEIGHT, t$27.COLOR, t$27.TEXT_ALIGN, t$27.FONT_STYLE, t$27.FONT_VARIANT, t$27.FONT_VARIANT_NUMERIC, t$27.FONT_FEATURE_SETTINGS, t$27.TEXT_DECORATION, t$27.TEXT_DECORATION_LINE, t$27.TEXT_DECORATION_COLOR, t$27.TEXT_DECORATION_STYLE, t$27.TEXT_DECORATION_THICKNESS, t$27.TEXT_UNDERLINE_OFFSET, t$27.LETTER_SPACING, t$27.WORD_SPACING, t$27.TEXT_INDENT, t$27.TEXT_TRANSFORM, t$27.DIRECTION, t$27.WHITE_SPACE, t$27.TEXT_WRAP, t$27.WORD_BREAK, t$27.OVERFLOW_WRAP, t$27.HYPHENS, t$27.VERTICAL_ALIGN, t$27.TEXT_OVERFLOW, t$27.TEXT_SHADOW, t$27.LINE_CLAMP, t$27.WEBKIT_LINE_CLAMP, t$27.WEBKIT_BOX_ORIENT, t$27.WEBKIT_TEXT_FILL_COLOR, t$27.WEBKIT_BACKGROUND_CLIP, t$27.BOX_DECORATION_BREAK, t$27.WEBKIT_BOX_DECORATION_BREAK, t$27.FILL, t$27.STROKE, t$27.STROKE_WIDTH;
6193
6242
  //#endregion
6194
6243
  //#region ../sdk-shared/dist/schema/schemaConstants.mjs
6195
6244
  var t$26 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
@@ -6480,6 +6529,14 @@ var OWN_ROOT = (() => {
6480
6529
  })();
6481
6530
  /** A frame of this package or of a dependency: not where the author wrote anything. */
6482
6531
  var isOwnFrame = (file) => file.startsWith("node:") || file.includes("/node_modules/") || OWN_ROOT !== "" && file.startsWith(OWN_ROOT);
6532
+ /**
6533
+ * The working directory, with its trailing slash — or nothing where there is none to ask: a browser bundle may carry a
6534
+ * `process` shim (Vite's has `env` and no `cwd`), so its presence alone says nothing.
6535
+ */
6536
+ var workingDirectory = () => {
6537
+ const cwd = typeof process === "undefined" ? void 0 : Reflect.get(process, "cwd");
6538
+ return typeof cwd === "function" ? `${String(Reflect.apply(cwd, process, []))}/` : "";
6539
+ };
6483
6540
  var FRAME = /\(?((?:file:\/\/)?[^\s()]+?):(\d+):(\d+)\)?$/;
6484
6541
  var markWrittenAt = (spec) => {
6485
6542
  if (!isProduction()) Object.defineProperty(spec, WRITTEN_AT, {
@@ -6495,7 +6552,7 @@ var markWrittenAt = (spec) => {
6495
6552
  var writtenAtPosition = (spec) => {
6496
6553
  const marker = typeof spec === "object" && spec !== null ? Reflect.get(spec, WRITTEN_AT) : void 0;
6497
6554
  if (!(marker instanceof Error) || !marker.stack) return;
6498
- const cwd = typeof process !== "undefined" ? `${process.cwd()}/` : "";
6555
+ const cwd = workingDirectory();
6499
6556
  for (const line of marker.stack.split("\n").slice(1)) {
6500
6557
  const match = FRAME.exec(line.trim());
6501
6558
  if (!match) continue;
@@ -6601,7 +6658,7 @@ var listShape = (kind, id, attributes, bind, row, children, fed) => {
6601
6658
  };
6602
6659
  };
6603
6660
  var buildSpec = (type, declaration, props) => {
6604
- const { id: givenId, class: shared, css, states, selector, variant, slots, bind: givenBind, from: givenFrom, as, row, visible: givenVisible, flows, runtime, loadStrategy, anchor, motion, flag, children, meta, ...attributes } = props;
6661
+ const { id: givenId, class: shared, css, states, selector, variant, slots, bind: givenBind, from: givenFrom, as, row, visible: givenVisible, flows, runtime, loadStrategy, anchor, motion, flag, quiet, children, meta, ...attributes } = props;
6605
6662
  const id = givenId === void 0 ? void 0 : scoped(givenId);
6606
6663
  const bind = givenBind === void 0 ? void 0 : bindingsOf$3(givenBind);
6607
6664
  const from = givenFrom === void 0 ? void 0 : sourceName(givenFrom);
@@ -6628,6 +6685,7 @@ var buildSpec = (type, declaration, props) => {
6628
6685
  ...anchor === void 0 ? {} : { anchor },
6629
6686
  ...motion === void 0 ? {} : { motion },
6630
6687
  ...flag === void 0 ? {} : { flag },
6688
+ ...quiet === void 0 ? {} : { quiet },
6631
6689
  ...list ? list.children === void 0 ? {} : { children: list.children } : children === void 0 ? {} : { children },
6632
6690
  attributes: {
6633
6691
  ...declaration?.content?.attributes,
@@ -6831,19 +6889,19 @@ var a$14 = (e, t) => {
6831
6889
  }
6832
6890
  return !0;
6833
6891
  };
6834
- var o$17 = (e) => e.replace(/[^A-Za-z0-9]/g, "") || "element";
6835
- var s$14 = "abcdefghijklmnopqrstuvwxyz0123456789";
6892
+ var o$18 = (e) => e.replace(/[^A-Za-z0-9]/g, "") || "element";
6893
+ var s$15 = "abcdefghijklmnopqrstuvwxyz0123456789";
6836
6894
  var c$11 = (e, t) => {
6837
- let n = o$17(e);
6895
+ let n = o$18(e);
6838
6896
  for (let e = 0; e < 100; e += 1) {
6839
6897
  let e = "";
6840
- for (let t = 0; t < 4; t += 1) e += s$14[Math.floor(Math.random() * s$14.length)];
6898
+ for (let t = 0; t < 4; t += 1) e += s$15[Math.floor(Math.random() * s$15.length)];
6841
6899
  if (!t(`${n}-${e}`)) return `${n}-${e}`;
6842
6900
  }
6843
6901
  return l$7(e, t);
6844
6902
  };
6845
6903
  var l$7 = (e, t) => {
6846
- let n = o$17(e), r = 1;
6904
+ let n = o$18(e), r = 1;
6847
6905
  for (; t(`${n}-${r}`);) r += 1;
6848
6906
  return `${n}-${r}`;
6849
6907
  };
@@ -6864,18 +6922,18 @@ var d$7 = {
6864
6922
  when: (e) => e.mode === "page"
6865
6923
  }]
6866
6924
  };
6867
- var f$5 = { navigate: [{
6925
+ var f$6 = { navigate: [{
6868
6926
  param: "url",
6869
6927
  when: (e) => e.urlType === "page"
6870
6928
  }] };
6871
- var p$5 = (e, t) => {
6929
+ var p$6 = (e, t) => {
6872
6930
  let n = e.indexOf("."), r = n === -1 ? e : e.slice(0, n), i = r.indexOf("_");
6873
6931
  if (i === -1) return e;
6874
6932
  let a = t[r.slice(i + 1)];
6875
6933
  return a ? `${r.slice(0, i + 1)}${a}${n === -1 ? "" : e.slice(n)}` : e;
6876
6934
  };
6877
- var m$6 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
6878
- var h$5 = (e, t) => e.replace(m$6, (e, n, r) => {
6935
+ var m$5 = /([A-Za-z][A-Za-z0-9]*)_([A-Za-z][A-Za-z0-9_-]*)/g;
6936
+ var h$4 = (e, t) => e.replace(m$5, (e, n, r) => {
6879
6937
  let i = t[r];
6880
6938
  return i ? `${n}_${i}` : e;
6881
6939
  });
@@ -6883,7 +6941,7 @@ var g$3 = (e, t) => {
6883
6941
  let n = !1;
6884
6942
  if (Array.isArray(e)) return e.forEach((r, i) => {
6885
6943
  if (typeof r == "string") {
6886
- let a = h$5(r, t);
6944
+ let a = h$4(r, t);
6887
6945
  a !== r && (e[i] = a, n = !0);
6888
6946
  return;
6889
6947
  }
@@ -6893,7 +6951,7 @@ var g$3 = (e, t) => {
6893
6951
  let r = e;
6894
6952
  for (let [e, i] of Object.entries(r)) {
6895
6953
  if (typeof i == "string") {
6896
- let a = h$5(i, t);
6954
+ let a = h$4(i, t);
6897
6955
  a !== i && (r[e] = a, n = !0);
6898
6956
  continue;
6899
6957
  }
@@ -6901,7 +6959,7 @@ var g$3 = (e, t) => {
6901
6959
  }
6902
6960
  return n;
6903
6961
  };
6904
- var _$1 = (e, t, n) => {
6962
+ var _$2 = (e, t, n) => {
6905
6963
  let r = Object.entries(t).filter(([e, t]) => e !== t);
6906
6964
  if (r.length === 0) return [];
6907
6965
  let i = (e) => t[e] ?? e, a = /* @__PURE__ */ new Set();
@@ -6917,12 +6975,12 @@ var _$1 = (e, t, n) => {
6917
6975
  let { slot: s } = o;
6918
6976
  typeof s == "string" && t[s] && (o.slot = t[s], e = !0);
6919
6977
  for (let n of Object.values(r.bindings ?? {})) for (let r of n) {
6920
- let n = p$5(r.source, t);
6978
+ let n = p$6(r.source, t);
6921
6979
  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);
6922
6980
  }
6923
6981
  for (let n of Object.values(r.interactions ?? {})) {
6924
6982
  n.elementId && t[n.elementId] && (n.elementId = t[n.elementId], e = !0);
6925
- for (let { param: r, when: i } of f$5[n.action] ?? []) {
6983
+ for (let { param: r, when: i } of f$6[n.action] ?? []) {
6926
6984
  let a = n.params[r];
6927
6985
  typeof a == "string" && t[a] && (!i || i(n.params)) && (n.params[r] = t[a], e = !0);
6928
6986
  }
@@ -7035,6 +7093,7 @@ var ELEMENT_SPEC_KEYS = [
7035
7093
  "anchor",
7036
7094
  "motion",
7037
7095
  "flag",
7096
+ "quiet",
7038
7097
  "children",
7039
7098
  "meta"
7040
7099
  ];
@@ -7093,10 +7152,13 @@ var STEP_TYPES = [
7093
7152
  "callback",
7094
7153
  "utility"
7095
7154
  ];
7096
- /** Refuses a field the spec does not take, naming the one it probably meant. */
7155
+ /**
7156
+ * Refuses a field the spec does not take, naming the one it probably meant. `hint` is said after it — for the field
7157
+ * written, when it depends on which one: a hint about one field is noise about every other.
7158
+ */
7097
7159
  function assertKnownKeys(value, keys, where, hint = "") {
7098
7160
  if (!e$28(value)) throw new AuthoringError("element-shape", `${where} is ${value === null ? "null" : typeof value}, not an object.`);
7099
- 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(", ")}.${hint}`);
7161
+ 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)}`);
7100
7162
  }
7101
7163
  /** Refuses an id nothing can name: empty, or with characters a template or a selector cannot carry. */
7102
7164
  var assertId = (id, where) => {
@@ -7132,7 +7194,7 @@ var paramIssue = (params, spec, where) => {
7132
7194
  const suggestion = typeof value === "string" && invalid.options ? didYouMean(value, invalid.options) : "";
7133
7195
  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}.`;
7134
7196
  }
7135
- const missing = n(provided, effective, declared).at(0);
7197
+ const missing = n$1(provided, effective, declared).at(0);
7136
7198
  return missing === void 0 ? void 0 : `${where} needs "${missing}": ${declared[missing].description}`;
7137
7199
  };
7138
7200
  //#endregion
@@ -7206,21 +7268,21 @@ var r$15 = /* @__PURE__ */ new Set([
7206
7268
  ]);
7207
7269
  var i$15 = /* @__PURE__ */ new Set(["woff2", "woff"]);
7208
7270
  var a$13 = 100;
7209
- var o$16 = (e) => {
7271
+ var o$17 = (e) => {
7210
7272
  for (let t = 0; t < e.length; t += 1) {
7211
7273
  let n = e.charCodeAt(t);
7212
7274
  if (n < 32 || n === 127) return !0;
7213
7275
  }
7214
7276
  return !1;
7215
7277
  };
7216
- var s$13 = class extends Error {};
7278
+ var s$14 = class extends Error {};
7217
7279
  var c$10 = (e) => {
7218
- throw new s$13(e);
7280
+ throw new s$14(e);
7219
7281
  };
7220
7282
  var l$6 = (e) => {
7221
7283
  if (typeof e != "string") return c$10("font.family must be a string");
7222
7284
  let t = e.trim();
7223
- return t ? t.length > a$13 ? c$10(`font.family cannot be longer than ${a$13} characters`) : o$16(t) ? c$10("font.family cannot contain control characters") : t : c$10("font.family cannot be empty");
7285
+ return t ? t.length > a$13 ? c$10(`font.family cannot be longer than ${a$13} characters`) : o$17(t) ? c$10("font.family cannot contain control characters") : t : c$10("font.family cannot be empty");
7224
7286
  };
7225
7287
  var u$5 = (e) => {
7226
7288
  if (e === void 0) return [400];
@@ -7234,7 +7296,7 @@ var d$6 = (e) => {
7234
7296
  let t = e.map((e) => e !== "normal" && e !== "italic" ? c$10("font.styles may only hold \"normal\" or \"italic\"") : e);
7235
7297
  return [...new Set(t)];
7236
7298
  };
7237
- var f$4 = (t, n) => {
7299
+ var f$5 = (t, n) => {
7238
7300
  if (!e$28(t)) return c$10(`font.files[${n}] must be an object`);
7239
7301
  let { weight: r, style: a, format: o, unicodeRange: s } = t;
7240
7302
  if (typeof r != "number" || !Number.isInteger(r) || r < 1 || r > 1e3) return c$10(`font.files[${n}].weight must be a whole number between 1 and 1000`);
@@ -7251,9 +7313,9 @@ var f$4 = (t, n) => {
7251
7313
  }
7252
7314
  return l;
7253
7315
  };
7254
- var p$4 = (e, t) => typeof e != "string" || !e ? c$10(`font.files[${t}].path must be a non-empty string`) : e.includes("://") || e.startsWith("/") ? c$10(`font.files[${t}].path must be relative to the font store, not a URL`) : e.split("/").includes("..") ? c$10(`font.files[${t}].path cannot climb out of the font store`) : e;
7255
- var m$5 = (e) => !Array.isArray(e) || e.length === 0 ? c$10("font.files must be a non-empty list") : e;
7256
- var h$4 = (i) => {
7316
+ var p$5 = (e, t) => typeof e != "string" || !e ? c$10(`font.files[${t}].path must be a non-empty string`) : e.includes("://") || e.startsWith("/") ? c$10(`font.files[${t}].path must be relative to the font store, not a URL`) : e.split("/").includes("..") ? c$10(`font.files[${t}].path cannot climb out of the font store`) : e;
7317
+ var m$4 = (e) => !Array.isArray(e) || e.length === 0 ? c$10("font.files must be a non-empty list") : e;
7318
+ var h$3 = (i) => {
7257
7319
  if (!e$28(i)) return c$10("a font must be an object");
7258
7320
  let { source: a, fallback: o, display: s, preload: h } = i;
7259
7321
  if (typeof a != "string" || !n$19.has(a)) return c$10("font.source must be one of: system, google, remote, hosted");
@@ -7285,8 +7347,8 @@ var h$4 = (i) => {
7285
7347
  return e === void 0 && n === void 0 ? c$10("a remote font needs either a stylesheet URL or the font files themselves") : e === void 0 ? {
7286
7348
  ...g,
7287
7349
  source: "remote",
7288
- files: m$5(n).map((e, n) => {
7289
- let r = f$4(e, n), { url: i } = e;
7350
+ files: m$4(n).map((e, n) => {
7351
+ let r = f$5(e, n), { url: i } = e;
7290
7352
  return typeof i != "string" || !i$16(i) ? c$10(`font.files[${n}].url must be an https URL with no credentials in it`) : {
7291
7353
  ...r,
7292
7354
  url: i
@@ -7301,9 +7363,9 @@ var h$4 = (i) => {
7301
7363
  return {
7302
7364
  ...g,
7303
7365
  source: "hosted",
7304
- files: m$5(i.files).map((e, t) => ({
7305
- ...f$4(e, t),
7306
- path: p$4(e.path, t)
7366
+ files: m$4(i.files).map((e, t) => ({
7367
+ ...f$5(e, t),
7368
+ path: p$5(e.path, t)
7307
7369
  }))
7308
7370
  };
7309
7371
  };
@@ -7343,9 +7405,9 @@ var r$14 = {
7343
7405
  };
7344
7406
  var i$14 = (e) => Object.hasOwn(r$14, e);
7345
7407
  var a$12 = (t) => i$14(t) ? r$14[t] : e$23.length;
7346
- var o$15 = (e) => Object.entries(e).sort(([e], [t]) => a$12(e) - a$12(t));
7347
- var s$12 = "[aria-current=\"page\"]";
7348
- var c$9 = (e) => e === "hidden" ? `.${t$20}` : e === "current" ? s$12 : `:${e}`;
7408
+ var o$16 = (e) => Object.entries(e).sort(([e], [t]) => a$12(e) - a$12(t));
7409
+ var s$13 = "[aria-current=\"page\"]";
7410
+ var c$9 = (e) => e === "hidden" ? `.${t$20}` : e === "current" ? s$13 : `:${e}`;
7349
7411
  var l$5 = (e) => e === "hidden";
7350
7412
  //#endregion
7351
7413
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/shared.js
@@ -7471,7 +7533,7 @@ var a$11 = (e, n, r, i) => {
7471
7533
  isDefault: !0
7472
7534
  };
7473
7535
  };
7474
- var o$14 = (e, t, n, r, i) => {
7536
+ var o$15 = (e, t, n, r, i) => {
7475
7537
  let a = e[t];
7476
7538
  if (!a) return {};
7477
7539
  let o = a.default ?? {};
@@ -7492,7 +7554,7 @@ var o$14 = (e, t, n, r, i) => {
7492
7554
  ...l
7493
7555
  };
7494
7556
  };
7495
- var s$11 = (e, t, n, r, i) => o$14(e.attributes, t, n, r, i);
7557
+ var s$12 = (e, t, n, r, i) => o$15(e.attributes, t, n, r, i);
7496
7558
  var c$8 = (t, o, c, l, u = {}, d = {}) => {
7497
7559
  let { componentSubType: f, styleSelector: p = "base", styleState: m, styleVariant: h, styleAncestor: g, includeSelf: _ = !1, skipSelectors: v = [], addSelectors: y = [] } = d, b = {
7498
7560
  tree: [],
@@ -7562,7 +7624,7 @@ var c$8 = (t, o, c, l, u = {}, d = {}) => {
7562
7624
  }
7563
7625
  let C = {};
7564
7626
  for (let t of b.tree) {
7565
- let r = s$11(t, p, m, h, g);
7627
+ let r = s$12(t, p, m, h, g);
7566
7628
  if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$16(r, n$22)), Object.keys(r).length)) for (let e of Object.keys(r)) C[e] || (C[e] = []), C[e].push({
7567
7629
  key: t.name,
7568
7630
  value: r[e],
@@ -7571,7 +7633,7 @@ var c$8 = (t, o, c, l, u = {}, d = {}) => {
7571
7633
  }
7572
7634
  let w = b.tree.filter((e) => e.isParent).reduce((e, t) => ({
7573
7635
  ...e,
7574
- ...s$11(t, p, m, h, g)
7636
+ ...s$12(t, p, m, h, g)
7575
7637
  }), {});
7576
7638
  return {
7577
7639
  ...b,
@@ -7625,7 +7687,7 @@ var d$5 = class {
7625
7687
  });
7626
7688
  };
7627
7689
  updateElement = (e) => !e || !this.flat[e.id] ? !1 : (this.flat[e.id] = e, !0);
7628
- renameElement = (t, n) => this.flat[t] ? t === n ? [] : i$17(this.flat, n) || this.takenElsewhere(n) ? !1 : _$1(this.flat, { [t]: n }, this.pages) : !1;
7690
+ renameElement = (t, n) => this.flat[t] ? t === n ? [] : i$17(this.flat, n) || this.takenElsewhere(n) ? !1 : _$2(this.flat, { [t]: n }, this.pages) : !1;
7629
7691
  moveElement = (e, t, n, r = "inside") => {
7630
7692
  let i = this.flat[e], a = this.flat[n];
7631
7693
  if (!i || !a || n === t || t$24(this.flat, t).includes(n)) return !1;
@@ -7651,7 +7713,7 @@ var d$5 = class {
7651
7713
  let t = structuredClone(this.flat[e]);
7652
7714
  n && (t.definition.rootId = n), p[e] = t;
7653
7715
  }
7654
- _$1(p, l), c.acum = p, c.item = p[l[e]], s && delete c.acum[l[e]];
7716
+ _$2(p, l), c.acum = p, c.item = p[l[e]], s && delete c.acum[l[e]];
7655
7717
  let m = this.flat[t];
7656
7718
  return m?.definition.items || (t = m?.definition.parentId ?? u.definition.parentId ?? ""), t && (c.item.definition.parentId = t), c;
7657
7719
  };
@@ -7775,7 +7837,7 @@ var d$5 = class {
7775
7837
  };
7776
7838
  //#endregion
7777
7839
  //#region ../sdk-schema/dist/helpers/components.mjs
7778
- var o$13 = /* @__PURE__ */ new Set([
7840
+ var o$14 = /* @__PURE__ */ new Set([
7779
7841
  "referenceType",
7780
7842
  "referenceId",
7781
7843
  "slot",
@@ -7785,10 +7847,10 @@ var o$13 = /* @__PURE__ */ new Set([
7785
7847
  "ref",
7786
7848
  "id"
7787
7849
  ]);
7788
- var s$10 = /^[A-Za-z][A-Za-z0-9_]*$/;
7789
- var c$7 = (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} }}`;
7790
- var p$3 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
7791
- var m$4 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
7850
+ var s$11 = /^[A-Za-z][A-Za-z0-9_]*$/;
7851
+ var c$7 = (e) => s$11.test(e) ? o$14.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} }}`;
7852
+ var p$4 = (e, t) => Object.hasOwn(e.components, t) ? e.components[t] : void 0;
7853
+ var m$3 = (e, t) => e.definition.type === "reference" && e.attributes.referenceType === "component" && (t === void 0 || e.attributes.referenceId === t);
7792
7854
  //#endregion
7793
7855
  //#region ../sdk-shared/dist/navigation/routes.mjs
7794
7856
  var r$11 = (e) => e.replaceAll(/\/+/g, "/");
@@ -7798,7 +7860,7 @@ var a$10 = (e, t) => {
7798
7860
  let { slug: n, parentId: r } = e[t];
7799
7861
  return r ? `${a$10(e, r)}/${n}` : n;
7800
7862
  };
7801
- function o$12(e, t, n, o = !1) {
7863
+ function o$13(e, t, n, o = !1) {
7802
7864
  let s = n.replace(/^\/+/, ""), { slug: c = "", folder: l, default: u } = e[s]?.attributes ?? {
7803
7865
  slug: s,
7804
7866
  folder: "",
@@ -7828,7 +7890,7 @@ function o$12(e, t, n, o = !1) {
7828
7890
  };
7829
7891
  }
7830
7892
  var d$4 = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
7831
- var f$3 = (e) => d$4(i$12(e));
7893
+ var f$4 = (e) => d$4(i$12(e));
7832
7894
  //#endregion
7833
7895
  //#region src/schema/lint/context.ts
7834
7896
  /**
@@ -7903,7 +7965,7 @@ var LintContext = class {
7903
7965
  /** The component an instance places, when the space declares it. */
7904
7966
  instanceOf(element) {
7905
7967
  const { referenceId } = element.attributes;
7906
- return m$4(element) && typeof referenceId === "string" ? p$3(this.schema, referenceId) : void 0;
7968
+ return m$3(element) && typeof referenceId === "string" ? p$4(this.schema, referenceId) : void 0;
7907
7969
  }
7908
7970
  element(id) {
7909
7971
  return Object.hasOwn(this.flat, id) ? this.flat[id] : void 0;
@@ -7936,7 +7998,7 @@ var LintContext = class {
7936
7998
  const names = this.attributeNames(this.catalogType(element) ?? element.definition.type);
7937
7999
  const parentId = element.definition.parentId;
7938
8000
  const parent = parentId ? this.element(parentId) : void 0;
7939
- const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$4(parent) ? ["slot"] : []];
8001
+ const extra = [...Object.keys(this.instanceOf(element)?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
7940
8002
  return names && extra.length > 0 ? [...names, ...extra] : names;
7941
8003
  }
7942
8004
  /** How a message names an element: its type and id, and the page or layout it is on. */
@@ -7965,8 +8027,8 @@ var LintContext = class {
7965
8027
  routeParams(id) {
7966
8028
  const rootId = this.element(id)?.definition.rootId ?? id;
7967
8029
  const slugOf = (pageId) => textOf(this.element(pageId)?.attributes.slug);
7968
- if (this.pageIds.has(rootId)) return f$3(slugOf(rootId));
7969
- return [...new Set([...this.pageIds].flatMap((pageId) => f$3(slugOf(pageId))))];
8030
+ if (this.pageIds.has(rootId)) return f$4(slugOf(rootId));
8031
+ return [...new Set([...this.pageIds].flatMap((pageId) => f$4(slugOf(pageId))))];
7970
8032
  }
7971
8033
  };
7972
8034
  //#endregion
@@ -8120,7 +8182,7 @@ var i$11 = /* @__PURE__ */ new Set([
8120
8182
  ...Array.from({ length: 12 }, (e, t) => `f${t + 1}`)
8121
8183
  ]);
8122
8184
  var a$9 = (e, n) => [...t$16.filter((t) => e.has(t)), n].join("+");
8123
- var o$11 = (e, t) => {
8185
+ var o$12 = (e, t) => {
8124
8186
  let o = e.trim().toLowerCase();
8125
8187
  if (!o) return { problem: "an empty shortcut (two commas in a row, or one at the end)" };
8126
8188
  let s = o.endsWith("++") ? [...o.slice(0, -2).split("+"), "+"] : o.split("+"), c = o === "+" ? ["+"] : s.filter((e) => e !== ""), l = /* @__PURE__ */ new Set(), u = [];
@@ -8136,8 +8198,8 @@ var o$11 = (e, t) => {
8136
8198
  let [d] = u;
8137
8199
  return d.length !== 1 && !i$11.has(d) ? { problem: `"${d}" in "${e.trim()}" is not a key: use one character ("f", "?", "+") or a key's name (${[...i$11].slice(0, 15).join(", ")}, f1…f12)` } : { combo: a$9(l, d) };
8138
8200
  };
8139
- var s$9 = (e, t = !1) => {
8140
- let n = e.split(",").map((e) => o$11(e, t));
8201
+ var s$10 = (e, t = !1) => {
8202
+ let n = e.split(",").map((e) => o$12(e, t));
8141
8203
  return {
8142
8204
  combos: n.flatMap((e) => e.combo ? [e.combo] : []),
8143
8205
  problems: n.flatMap((e) => e.problem ? [e.problem] : [])
@@ -8222,7 +8284,7 @@ var onLoad = () => on("onLoad");
8222
8284
  * editing even then (⌘A, ⌘Z, ⌘C/⌘V, moving by word). `{{ <this step's id>.key }}` is the key pressed, canonical (`shift+f`) — for one flow answering several shortcuts.
8223
8285
  */
8224
8286
  var onKey = (keys) => {
8225
- const { problems } = s$9(keys);
8287
+ const { problems } = s$10(keys);
8226
8288
  if (problems.length || !keys.trim()) throw new AuthoringError("trigger-keys", `onKey('${keys}') is not a shortcut: ${problems.join("; ") || "it is empty"}. Write one or several, with commas: 'f', 'shift+f', 'mod+k', 'escape, q'.`);
8227
8289
  return on("onKey", { keys });
8228
8290
  };
@@ -8249,7 +8311,7 @@ var onInterval = (ms) => {
8249
8311
  * and hide the arrow at the end already reached: `[named('row', onScroll()), setState({ key: 'atEnd', type:
8250
8312
  * 'boolean', value: '{{ row.atEnd }}' })]`.
8251
8313
  */
8252
- var onScroll = () => on(s$17);
8314
+ var onScroll = () => on(s$18);
8253
8315
  var onPageLoad = () => on("onPageLoad");
8254
8316
  /**
8255
8317
  * The end of a server action this element started — the trigger a `detached` run needs, because that step returns
@@ -10093,12 +10155,14 @@ var n$9 = (t, n) => {
10093
10155
  return [];
10094
10156
  };
10095
10157
  //#endregion
10158
+ //#region src/schema/anchor.ts
10159
+ /** The anchor someone probably meant: the same words, in the form an anchor takes (`ANCHOR_PATTERN`). */
10160
+ var asAnchor = (text) => text.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section";
10161
+ //#endregion
10096
10162
  //#region src/schema/lint/anchors.ts
10097
10163
  /** The element types that render their children once per row, so an `id` inside them would repeat in the DOM. */
10098
10164
  var REPEATERS = /* @__PURE__ */ new Set(["list"]);
10099
10165
  var FORMAT = "lowercase letters, digits and \"-\", starting with a letter";
10100
- /** The anchor someone probably meant: the same words, in the form an anchor takes. */
10101
- var asAnchor = (text) => text.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section";
10102
10166
  var attributeText = (element, key) => {
10103
10167
  const value = element.attributes[key];
10104
10168
  return typeof value === "string" ? value : "";
@@ -10138,8 +10202,8 @@ var lintLinkHash = (ctx, link, anchorsByPage) => {
10138
10202
  }
10139
10203
  if ((attributeText(link, "mode") || "page") !== "page") return;
10140
10204
  const { flat, schema } = ctx;
10141
- const path = o$12(flat, schema.pageFolders, attributeText(link, "href"), true);
10142
- const pageId = [...ctx.pageIds].find((id) => o$12(flat, schema.pageFolders, id, true) === path);
10205
+ const path = o$13(flat, schema.pageFolders, attributeText(link, "href"), true);
10206
+ const pageId = [...ctx.pageIds].find((id) => o$13(flat, schema.pageFolders, id, true) === path);
10143
10207
  if (!pageId) return;
10144
10208
  const anchors = anchorsByPage(pageId);
10145
10209
  if (!anchors.has(hash)) {
@@ -10152,11 +10216,25 @@ var lintLinkHash = (ctx, link, anchorsByPage) => {
10152
10216
  * tree and every layout around it, which render as one document — on an element that renders, never repeated by a list
10153
10217
  * or a component, and every link to a section naming one that is there.
10154
10218
  */
10219
+ /**
10220
+ * A button's `controls` is `aria-controls`: an id the DOM carries, which on a page is an anchor. One naming no anchor
10221
+ * points a screen reader at nothing — authoring resolves an element's id to its anchor, a hand-written document does
10222
+ * not.
10223
+ */
10224
+ var lintControls = (ctx) => {
10225
+ const anchors = new Set(Object.values(ctx.flat).flatMap((element) => element.definition.anchor ?? []));
10226
+ Object.values(ctx.flat).forEach((element) => {
10227
+ const controls = attributeText(element, "controls");
10228
+ if (element.definition.type !== "button" || controls === "" || anchors.has(controls)) return;
10229
+ ctx.warn("controls-no-anchor", `${ctx.describe(element.id)} controls "${controls}", and no element carries that anchor, so a screen reader is pointed at nothing. Give the element it shows and hides \`anchor: '${asAnchor(controls)}'\` and name that.`, element.id);
10230
+ });
10231
+ };
10155
10232
  var lintAnchors = (ctx) => {
10156
10233
  Object.values(ctx.flat).forEach((element) => {
10157
10234
  const { anchor } = element.definition;
10158
10235
  if (anchor !== void 0) lintOwnAnchor(ctx, element, anchor);
10159
10236
  });
10237
+ lintControls(ctx);
10160
10238
  if (ctx.component) return;
10161
10239
  const byPage = /* @__PURE__ */ new Map();
10162
10240
  const anchorsByPage = (pageId) => {
@@ -10191,17 +10269,17 @@ var a$6 = (e, t) => {
10191
10269
  declaration: t[n]
10192
10270
  };
10193
10271
  };
10194
- var o$10 = /^(?=.)[A-Za-z0-9:_.-]*(\{[A-Za-z0-9_]+\}[A-Za-z0-9:_.-]*)*$/;
10195
- var s$8 = /* @__PURE__ */ new Set([
10272
+ var o$11 = /^(?=.)[A-Za-z0-9:_.-]*(\{[A-Za-z0-9_]+\}[A-Za-z0-9:_.-]*)*$/;
10273
+ var s$9 = /* @__PURE__ */ new Set([
10196
10274
  "public",
10197
10275
  "session",
10198
10276
  "role"
10199
10277
  ]);
10200
10278
  var c$6 = (t, n) => {
10201
10279
  let r = [];
10202
- if (o$10.test(t) || r.push("a pattern is letters, digits and `:_.-`, with `{name}` for the part a page fills in — `board:{id}`"), !e$28(n)) return [...r, "a channel is an object: `{ access: { mode: \"public\" } }`"];
10280
+ if (o$11.test(t) || r.push("a pattern is letters, digits and `:_.-`, with `{name}` for the part a page fills in — `board:{id}`"), !e$28(n)) return [...r, "a channel is an object: `{ access: { mode: \"public\" } }`"];
10203
10281
  let { access: i, publish: a, presence: c, grant: l, maxMessageBytes: u, messagesPerSecond: d } = n, f = e$28(i) ? i.mode : void 0;
10204
- typeof f != "string" || !s$8.has(f) ? r.push("`access` is { mode: \"public\" }, { mode: \"session\" } or { mode: \"role\", permissions: […] }") : f === "role" && !(e$28(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");
10282
+ typeof f != "string" || !s$9.has(f) ? r.push("`access` is { mode: \"public\" }, { mode: \"session\" } or { mode: \"role\", permissions: […] }") : f === "role" && !(e$28(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");
10205
10283
  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`);
10206
10284
  return r;
10207
10285
  };
@@ -10260,6 +10338,94 @@ var lintInstances = (ctx) => {
10260
10338
  }
10261
10339
  };
10262
10340
  //#endregion
10341
+ //#region src/schema/dataPath.ts
10342
+ /**
10343
+ * Following a binding's path into a value — a provider's answer, a sample of it — the one way the linter (against a
10344
+ * sample of the answer) and a page check (against the answer itself) both do it, so the two say the same thing.
10345
+ */
10346
+ var isRecord$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
10347
+ /** A path as its steps: `apiContainer_site.data.rows[2].title` is `apiContainer_site`, `data`, `rows`, `2`, `title`. */
10348
+ var pathSteps = (path) => path.split(/[.[\]]/).filter((step) => step !== "");
10349
+ /** Where a path leads in a value — or how far it got, and what was there to choose from where it stopped. */
10350
+ var followPath = (value, steps) => {
10351
+ let current = value;
10352
+ for (const [index, step] of steps.entries()) {
10353
+ const next = Array.isArray(current) ? current[Number(step)] : isRecord$1(current) ? current[step] : void 0;
10354
+ if (next === void 0) {
10355
+ const keys = isRecord$1(current) ? Object.keys(current) : Array.isArray(current) ? [`0…${String(current.length - 1)}`] : [];
10356
+ return {
10357
+ found: false,
10358
+ at: steps.slice(0, index),
10359
+ keys
10360
+ };
10361
+ }
10362
+ current = next;
10363
+ }
10364
+ return {
10365
+ found: true,
10366
+ value: current
10367
+ };
10368
+ };
10369
+ /**
10370
+ * Whether a path that did not reach is a wrong path rather than a quiet field: a missing LAST step may be a field some
10371
+ * answers do not carry — a badge, an avatar — and a binding onto it is written for that; one that stops before it read
10372
+ * a branch the answer never had. A list's rows are never optional: a list reading nothing draws nothing.
10373
+ */
10374
+ var isWrongPath = (reach, pathLength, rows) => !reach.found && (rows || reach.at.length < pathLength - 1);
10375
+ /** Where a path stopped, and what was there: `apiContainer_landing.data has plans, compare, faq`. */
10376
+ var stoppedAt = (root, reach) => {
10377
+ const where = [root, ...reach.at].join(".");
10378
+ return reach.keys.length > 0 ? `${where} has ${reach.keys.slice(0, 12).join(", ")}` : `${where} is not an object`;
10379
+ };
10380
+ //#endregion
10381
+ //#region src/schema/lint/dataPaths.ts
10382
+ /** What a provider publishes beside its answer: its state, which every binding may read too. */
10383
+ var PUBLISHED_STATE = {
10384
+ isLoading: false,
10385
+ isEmpty: false,
10386
+ hasError: false,
10387
+ errorMessage: "",
10388
+ isStale: false
10389
+ };
10390
+ var PROVIDER$1 = "apiContainer_";
10391
+ /**
10392
+ * Every binding onto a provider whose answer the author can read (`data` — a JSON file the project serves), held to
10393
+ * that answer: a path it does not have is the binding that renders nothing, found where it is written instead of on a
10394
+ * page that was served empty. A provider fed by a connector or an action publishes its own slice, which no file says,
10395
+ * and a `query` with `{{tokens}}` is asked of the visitor's route and state: both are left unchecked.
10396
+ */
10397
+ var lintDataPaths = (ctx) => {
10398
+ const answerOf = ctx.catalogs.data;
10399
+ if (!answerOf) return;
10400
+ const answers = /* @__PURE__ */ new Map();
10401
+ const answer = (providerId) => {
10402
+ if (answers.has(providerId)) return answers.get(providerId);
10403
+ const provider = ctx.flat[providerId];
10404
+ const query = textOf(provider?.attributes.query);
10405
+ const fed = ["connector", "action"].some((key) => textOf(provider?.attributes[key]) !== "");
10406
+ const sample = provider && query && !fed && !query.includes("{{") ? answerOf(query) : void 0;
10407
+ const published = sample === void 0 ? void 0 : {
10408
+ status: 200,
10409
+ data: sample,
10410
+ ...PUBLISHED_STATE
10411
+ };
10412
+ answers.set(providerId, published);
10413
+ return published;
10414
+ };
10415
+ for (const element of Object.values(ctx.flat)) for (const binding of Object.values(element.definition.bindings ?? {}).flat()) {
10416
+ if (binding.enabled === false || !binding.source.startsWith(PROVIDER$1)) continue;
10417
+ const [root, ...path] = pathSteps(binding.source);
10418
+ const published = answer(root.slice(13));
10419
+ if (published === void 0) continue;
10420
+ const reach = followPath(published, path);
10421
+ const rows = element.definition.type === "list" && binding.to === "items";
10422
+ if (!reach.found && isWrongPath(reach, path.length, rows)) {
10423
+ const query = textOf(ctx.element(root.slice(13))?.attributes.query);
10424
+ ctx.warn("path-not-in-data", `${ctx.describe(element.id)} reads \`${binding.source}\` for its ${binding.to}, and ${query} has no such path — ${stoppedAt(root, reach)}.`, element.id, { source: binding.source });
10425
+ }
10426
+ }
10427
+ };
10428
+ //#endregion
10263
10429
  //#region ../sdk-elements/dist/elements/media/Svg/sanitizeSvg.mjs
10264
10430
  var r$6 = /^\s*(?:<!--[\s\S]*?-->\s*)*<svg\b[\s\S]*<\/svg>\s*$/i;
10265
10431
  var i$6 = (e) => r$6.test(e);
@@ -10275,12 +10441,12 @@ var a$5 = (e) => {
10275
10441
  for (let e = 0; e < t.length; e++) n += String.fromCharCode(t[e]);
10276
10442
  return btoa(n);
10277
10443
  };
10278
- var o$9 = (e) => {
10444
+ var o$10 = (e) => {
10279
10445
  let t = atob(e), n = new Uint8Array(t.length);
10280
10446
  for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
10281
10447
  return new TextDecoder().decode(n);
10282
10448
  };
10283
- var s$7 = (e) => {
10449
+ var s$8 = (e) => {
10284
10450
  let t = [
10285
10451
  7,
10286
10452
  12,
@@ -10375,7 +10541,7 @@ var u$4 = (e) => ({
10375
10541
  __raw: e,
10376
10542
  __marker: c$5
10377
10543
  });
10378
- var f$2 = [
10544
+ var f$3 = [
10379
10545
  "Sun",
10380
10546
  "Mon",
10381
10547
  "Tue",
@@ -10384,10 +10550,10 @@ var f$2 = [
10384
10550
  "Fri",
10385
10551
  "Sat"
10386
10552
  ];
10387
- var p$2 = /* @__PURE__ */ new Map();
10388
- var m$3 = (e) => {
10389
- if (!p$2.has(e)) try {
10390
- p$2.set(e, new Intl.DateTimeFormat("en-US", {
10553
+ var p$3 = /* @__PURE__ */ new Map();
10554
+ var m$2 = (e) => {
10555
+ if (!p$3.has(e)) try {
10556
+ p$3.set(e, new Intl.DateTimeFormat("en-US", {
10391
10557
  timeZone: e,
10392
10558
  hourCycle: "h23",
10393
10559
  year: "numeric",
@@ -10399,11 +10565,11 @@ var m$3 = (e) => {
10399
10565
  weekday: "short"
10400
10566
  }));
10401
10567
  } catch {
10402
- p$2.set(e, null);
10568
+ p$3.set(e, null);
10403
10569
  }
10404
- return p$2.get(e) ?? null;
10570
+ return p$3.get(e) ?? null;
10405
10571
  };
10406
- var h$3 = (e) => {
10572
+ var h$2 = (e) => {
10407
10573
  if (e instanceof Date) return e;
10408
10574
  if (typeof e == "number") return new Date(e);
10409
10575
  let t = String(e).trim();
@@ -10419,7 +10585,7 @@ var g$2 = (e, t) => {
10419
10585
  seconds: e.getSeconds(),
10420
10586
  weekday: e.getDay()
10421
10587
  };
10422
- let n = m$3(t);
10588
+ let n = m$2(t);
10423
10589
  if (!n) return;
10424
10590
  let r = n.formatToParts(e), i = (e) => r.find((t) => t.type === e)?.value ?? "";
10425
10591
  return {
@@ -10429,10 +10595,10 @@ var g$2 = (e, t) => {
10429
10595
  hours: Number(i("hour")),
10430
10596
  minutes: Number(i("minute")),
10431
10597
  seconds: Number(i("second")),
10432
- weekday: f$2.indexOf(i("weekday"))
10598
+ weekday: f$3.indexOf(i("weekday"))
10433
10599
  };
10434
10600
  };
10435
- var _ = (e) => {
10601
+ var _$1 = (e) => {
10436
10602
  if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
10437
10603
  if (typeof e == "string" && e.trim() !== "") {
10438
10604
  let t = Number(e);
@@ -10517,7 +10683,7 @@ var y = {
10517
10683
  return s[0] = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, a), s.join(r);
10518
10684
  },
10519
10685
  currency: (e, t) => {
10520
- let n = _(e);
10686
+ let n = _$1(e);
10521
10687
  if (n === void 0 || t.length === 0) return e;
10522
10688
  let r = t[2], a = typeof r == "object" && !!r && "trimZeros" in r && r.trimZeros === !0 && Number.isInteger(n);
10523
10689
  return v(n, t[1], {
@@ -10530,7 +10696,7 @@ var y = {
10530
10696
  });
10531
10697
  },
10532
10698
  percent: (e, t) => {
10533
- let n = _(e);
10699
+ let n = _$1(e);
10534
10700
  if (n === void 0) return e;
10535
10701
  let r = Number(t[0]) || 0;
10536
10702
  return v(n, t[1], {
@@ -10643,7 +10809,7 @@ var y = {
10643
10809
  random: (e) => Array.isArray(e) ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : void 0 : typeof e == "string" ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : "" : typeof e == "number" ? Math.floor(Math.random() * e) : e,
10644
10810
  date: (e, t) => {
10645
10811
  if (t.length === 0) return e;
10646
- let n = i$5(t[0]), r = h$3(e);
10812
+ let n = i$5(t[0]), r = h$2(e);
10647
10813
  if (Number.isNaN(r.getTime())) return "";
10648
10814
  let a = g$2(r, t.length > 1 ? i$5(t[1]) : "");
10649
10815
  if (!a) return "";
@@ -10708,8 +10874,8 @@ var y = {
10708
10874
  return d;
10709
10875
  },
10710
10876
  base64_encode: (e) => typeof e == "string" ? a$5(e) : e,
10711
- base64_decode: (e) => typeof e == "string" ? o$9(e) : e,
10712
- md5: (e) => typeof e == "string" ? s$7(e) : e,
10877
+ base64_decode: (e) => typeof e == "string" ? o$10(e) : e,
10878
+ md5: (e) => typeof e == "string" ? s$8(e) : e,
10713
10879
  without: (e, t) => {
10714
10880
  if (typeof e != "object" || !e || Array.isArray(e)) return e;
10715
10881
  let n = t.map(i$5), r = {};
@@ -10865,7 +11031,7 @@ var a$4 = class {
10865
11031
  }
10866
11032
  }
10867
11033
  };
10868
- var o$8 = (e) => {
11034
+ var o$9 = (e) => {
10869
11035
  let r = e$32(e);
10870
11036
  if (r.error) return {
10871
11037
  issues: [r.error],
@@ -10982,13 +11148,15 @@ var checkName = (ctx, name, template, where, site, scope, id) => {
10982
11148
  if (!scope.has(sourceId)) ctx.error("template-source-out-of-scope", `${where} reads "${name}" in "${shorten$1(template)}", but "${sourceId}" is not around it. An element's source reaches only the elements inside it — move this one into "${sourceId}", or read the value through something both can see, like \`state\`.`, id);
10983
11149
  return;
10984
11150
  }
11151
+ const sourceNames = [...ctx.sources].map(([key, value]) => `${value}_${key}`);
11152
+ const hyphenated = sourceNames.find((source) => source.includes("-") && source.replaceAll("-", "_") === name);
10985
11153
  const known = [
10986
11154
  ...GLOBAL_SOURCES,
10987
11155
  ...ctx.variables,
10988
- ...[...ctx.sources].map(([key, value]) => `${value}_${key}`)
11156
+ ...sourceNames
10989
11157
  ];
10990
11158
  const flattened = site.kind === "attribute" ? ` A query parameter is \`navigation.queryParams.${name}\`${site.routeParams.length > 0 ? `; this page's route params are ${site.routeParams.join(", ")}` : ""}.` : " The bound value is `source`.";
10991
- ctx.error("template-unknown-name", `${where} reads "${name}" in "${shorten$1(template)}", which nothing here answers to${didYouMean(name, known) || "."} A template reads the globals (${GLOBAL_SOURCES.join(", ")}), the space's variables, and an element's source named in full (\`list_rows\`, \`apiContainer_posts\`) from inside that element.${flattened}`, id);
11159
+ ctx.error("template-unknown-name", `${where} reads "${name}" in "${shorten$1(template)}", which nothing here answers to${hyphenated ? `. The source is "${hyphenated}", spelled with its \`-\`: a template reads a \`-\` between two letters as part of the name (a minus is written with spaces, \`a - b\`).` : didYouMean(name, known) || "."} A template reads the globals (${GLOBAL_SOURCES.join(", ")}), the space's variables, and an element's source named in full (\`list_rows\`, \`apiContainer_posts\`) from inside that element.${flattened}`, id);
10992
11160
  };
10993
11161
  /**
10994
11162
  * A template read the way the runtime will read it: refused when the interpreter would read past part of it — it
@@ -10999,7 +11167,7 @@ var checkName = (ctx, name, template, where, site, scope, id) => {
10999
11167
  */
11000
11168
  var checkTemplate = (ctx, template, where, site, scope = /* @__PURE__ */ new Set(), id) => {
11001
11169
  if (!e$7(template)) return;
11002
- const { issues, freeNames } = o$8(template);
11170
+ const { issues, freeNames } = o$9(template);
11003
11171
  checkComputedReads(ctx, template, where, site, id);
11004
11172
  checkFlagReads(ctx, template, where, id);
11005
11173
  for (const [path] of template.matchAll(/(?<![\w.])props\.[A-Za-z_][A-Za-z0-9_]*/g)) checkPropsRead(ctx, path, where, id);
@@ -11137,17 +11305,19 @@ var BLOCK_TYPES = /* @__PURE__ */ new Set([
11137
11305
  "richText"
11138
11306
  ]);
11139
11307
  /**
11140
- * A `span` container is for a run of text — a dot before a title, a word dressed apart. A heading or a paragraph
11141
- * inside it breaks that line in two, and no class on the span makes it otherwise.
11308
+ * A `span` container is for a run of text — a dot before a title, a word dressed apart — and a `p` one for a sentence
11309
+ * made of parts, a link in the middle of it. A heading or a paragraph inside either breaks it: a span's line in two, and
11310
+ * a `<p>` the browser closes before the block, so the page it parses is not the one written.
11142
11311
  */
11143
11312
  var warnSpanHoldsBlock = (ctx, element, where) => {
11144
- if (element.definition.type !== "container" || element.attributes.subType !== "span") return;
11313
+ const tag = element.attributes.subType;
11314
+ if (element.definition.type !== "container" || tag !== "span" && tag !== "p") return;
11145
11315
  const blocks = (element.definition.items ?? []).flatMap((id) => {
11146
11316
  const child = ctx.element(id);
11147
11317
  return child && BLOCK_TYPES.has(child.definition.type) ? [child] : [];
11148
11318
  });
11149
11319
  if (!blocks.length) return;
11150
- ctx.warn("span-holds-block", `${where} is a \`span\` but holds ${blocks.map((child) => ctx.describe(child.id)).join(", ")}, which ${blocks.length === 1 ? "is a block" : "are blocks"}: a span sits in a line of text, and a block breaks it in two. Make it a \`div\` (leave \`subType\` out), or put words there instead — a \`text\` with \`display: inline\` in its class.`, element.id);
11320
+ ctx.warn("span-holds-block", `${where} is a \`${tag}\` but holds ${blocks.map((child) => ctx.describe(child.id)).join(", ")}, which ${blocks.length === 1 ? "is a block" : "are blocks"}: ${tag === "p" ? "a browser closes a `<p>` before a block, so the page it builds is not the one written" : "a span sits in a line of text, and a block breaks it in two"}. Make it a \`div\` (leave \`subType\` out), or put words there instead — a \`text\`, a \`link\`, inline.`, element.id);
11151
11321
  };
11152
11322
  /**
11153
11323
  * Every binding's shape and transformers: a category that exists, visibility where visibility is read, transformers
@@ -11280,8 +11450,13 @@ var checkIntent = (ctx, element, where) => {
11280
11450
  const mockData = attributes.mockData;
11281
11451
  const mocked = typeof mockData === "string" ? mockData !== "" && mockData !== "{}" : mockData !== void 0;
11282
11452
  if (type === "apiContainer" && !asks && !sources.some(bound) && !mocked) ctx.warn("provider-without-source", `${where} asks nothing: it has no \`query\`, \`action\`, \`connector\` or \`resource\`, so everything bound to it stays empty. Give it one — \`query: '/data/games.json'\`.`, element.id);
11283
- const serverSource = ["connector", "action"].find((key) => typeof attributes[key] === "string" && attributes[key] !== "");
11284
- if (element.definition.runtime === "server" && serverSource && ctx.schema.rsc?.enabled !== true) ctx.warn("server-data-without-rsc", `${where} is resolved on the server (\`runtime: 'server'\`) through its \`${serverSource}\`, but the space does not turn server data on, so it renders its mock data and never asks. Add \`rsc: { enabled: true }\` to the space.`, element.id, { source: serverSource });
11453
+ const serverSource = [
11454
+ "connector",
11455
+ "action",
11456
+ "query"
11457
+ ].find((key) => typeof attributes[key] === "string" && attributes[key] !== "");
11458
+ 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);
11459
+ 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 });
11285
11460
  const fallback = ctx.catalogs.defaultAttributes?.[type]?.content;
11286
11461
  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, {
11287
11462
  type,
@@ -11497,7 +11672,7 @@ var checkAction = (ctx, node, where, hostId) => {
11497
11672
  var checkTriggerKeys = (ctx, node, where, hostId) => {
11498
11673
  if (node.action !== "onKey") return;
11499
11674
  const { keys } = node.params;
11500
- const problems = typeof keys === "string" && keys.trim() ? s$9(keys).problems : ["no keys at all"];
11675
+ const problems = typeof keys === "string" && keys.trim() ? s$10(keys).problems : ["no keys at all"];
11501
11676
  if (!problems.length) return;
11502
11677
  ctx.error("trigger-keys", `${where} starts a flow on a keyboard shortcut that cannot fire: ${problems.join("; ")}. Write one or several, with commas: \`onKey('f')\`, \`onKey('shift+f')\`, \`onKey('mod+k, escape')\`.`, hostId);
11503
11678
  };
@@ -11723,23 +11898,145 @@ var lintFlows = (ctx) => {
11723
11898
  };
11724
11899
  //#endregion
11725
11900
  //#region ../sdk-shared/dist/schema/motion.mjs
11726
- var t$6 = [
11901
+ var t = [
11727
11902
  "fade",
11728
11903
  "fade-up",
11729
11904
  "fade-down",
11730
11905
  "slide-left",
11731
11906
  "slide-right",
11732
- "scale"
11907
+ "slide-up",
11908
+ "scale",
11909
+ "zoom-in",
11910
+ "zoom-out",
11911
+ "pop",
11912
+ "bounce-in",
11913
+ "tilt",
11914
+ "spin-in"
11915
+ ];
11916
+ var n = [
11917
+ "load",
11918
+ "view",
11919
+ "scroll"
11733
11920
  ];
11734
- var n$6 = ["load", "view"];
11735
- var r$3 = [
11921
+ var r = [
11736
11922
  "float",
11737
11923
  "pulse",
11738
11924
  "spin",
11739
- "sway"
11925
+ "sway",
11926
+ "bounce",
11927
+ "wobble",
11928
+ "orbit",
11929
+ "heartbeat",
11930
+ "drift"
11740
11931
  ];
11741
- var l$4 = (e, t) => typeof t == "string" && e.includes(t);
11742
- var u$3 = /* @__PURE__ */ new Set([
11932
+ var o$8 = {
11933
+ fade: [{
11934
+ at: 0,
11935
+ opacity: 0
11936
+ }],
11937
+ "fade-up": [{
11938
+ at: 0,
11939
+ opacity: 0,
11940
+ translate: "0 24px"
11941
+ }],
11942
+ "fade-down": [{
11943
+ at: 0,
11944
+ opacity: 0,
11945
+ translate: "0 -24px"
11946
+ }],
11947
+ "slide-left": [{
11948
+ at: 0,
11949
+ opacity: 0,
11950
+ translate: "32px 0"
11951
+ }],
11952
+ "slide-right": [{
11953
+ at: 0,
11954
+ opacity: 0,
11955
+ translate: "-32px 0"
11956
+ }],
11957
+ "slide-up": [{
11958
+ at: 0,
11959
+ opacity: 0,
11960
+ translate: "0 72px"
11961
+ }],
11962
+ scale: [{
11963
+ at: 0,
11964
+ opacity: 0,
11965
+ scale: "0.94"
11966
+ }],
11967
+ "zoom-in": [{
11968
+ at: 0,
11969
+ opacity: 0,
11970
+ scale: "0.6"
11971
+ }],
11972
+ "zoom-out": [{
11973
+ at: 0,
11974
+ opacity: 0,
11975
+ scale: "1.25"
11976
+ }],
11977
+ pop: [
11978
+ {
11979
+ at: 0,
11980
+ opacity: 0,
11981
+ scale: "0.5"
11982
+ },
11983
+ {
11984
+ at: 55,
11985
+ opacity: 1,
11986
+ scale: "1.08"
11987
+ },
11988
+ {
11989
+ at: 78,
11990
+ scale: "0.97"
11991
+ }
11992
+ ],
11993
+ "bounce-in": [
11994
+ {
11995
+ at: 0,
11996
+ opacity: 0,
11997
+ translate: "0 -64px"
11998
+ },
11999
+ {
12000
+ at: 55,
12001
+ opacity: 1,
12002
+ translate: "0 10px"
12003
+ },
12004
+ {
12005
+ at: 75,
12006
+ translate: "0 -5px"
12007
+ },
12008
+ {
12009
+ at: 90,
12010
+ translate: "0 2px"
12011
+ }
12012
+ ],
12013
+ tilt: [{
12014
+ at: 0,
12015
+ opacity: 0,
12016
+ translate: "0 32px",
12017
+ rotate: "-6deg"
12018
+ }],
12019
+ "spin-in": [{
12020
+ at: 0,
12021
+ opacity: 0,
12022
+ scale: "0.4",
12023
+ rotate: "-180deg"
12024
+ }]
12025
+ };
12026
+ Object.fromEntries(t.map((e) => {
12027
+ let [{ at: t, ...n }] = o$8[e];
12028
+ return [e, n];
12029
+ }));
12030
+ var c$4 = (e, t) => {
12031
+ let n = t * 2 * Math.PI, r = Math.round(Math.sin(n) * e * 10) / 10, i = Math.round(-Math.cos(n) * e * 10) / 10;
12032
+ return `translate(${String(r)}px, ${String(i)}px)`;
12033
+ };
12034
+ Array.from({ length: 9 }, (e, t) => ({
12035
+ at: t * 100 / 8,
12036
+ transform: c$4(6, t / 8)
12037
+ }));
12038
+ var d$3 = (e, t) => typeof t == "string" && e.includes(t);
12039
+ var f$2 = /* @__PURE__ */ new Set([
11743
12040
  "enter",
11744
12041
  "on",
11745
12042
  "duration",
@@ -11747,11 +12044,11 @@ var u$3 = /* @__PURE__ */ new Set([
11747
12044
  "stagger",
11748
12045
  "loop"
11749
12046
  ]);
11750
- var d$3 = (i) => {
12047
+ var p$2 = (i) => {
11751
12048
  if (!e$28(i)) return ["motion is an object: `{ enter: 'fade-up', on: 'view' }`"];
11752
12049
  let a = [];
11753
- for (let e of Object.keys(i)) u$3.has(e) || a.push(`motion has no "${e}" — it takes enter, on, duration, delay, stagger and loop`);
11754
- i.enter !== void 0 && !l$4(t$6, i.enter) && a.push(`motion.enter is one of ${t$6.join(", ")}`), i.on !== void 0 && !l$4(n$6, i.on) && a.push(`motion.on is ${n$6.join(" or ")}`), i.loop !== void 0 && !l$4(r$3, i.loop) && a.push(`motion.loop is one of ${r$3.join(", ")}`);
12050
+ for (let e of Object.keys(i)) f$2.has(e) || a.push(`motion has no "${e}" — it takes enter, on, duration, delay, stagger and loop`);
12051
+ i.enter !== void 0 && !d$3(t, i.enter) && a.push(`motion.enter is one of ${t.join(", ")}`), i.on !== void 0 && !d$3(n, i.on) && a.push(`motion.on is ${n.slice(0, -1).join(", ")} or ${String(n.at(-1))}`), i.loop !== void 0 && !d$3(r, i.loop) && a.push(`motion.loop is one of ${r.join(", ")}`);
11755
12052
  for (let e of [
11756
12053
  "duration",
11757
12054
  "delay",
@@ -11762,7 +12059,11 @@ var d$3 = (i) => {
11762
12059
  }
11763
12060
  return i.enter === void 0 && i.loop === void 0 && a.push("motion says nothing to play: give it an `enter`, a `loop`, or both"), i.stagger !== void 0 && i.enter === void 0 && a.push("motion.stagger staggers the children’s `enter`: give it one"), a;
11764
12061
  };
11765
- ["[data-motion-loop] { animation-play-state: running, running !important; }", "[data-motion-on=\"view\"][data-motion-enter], [data-motion-on=\"view\"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }"].join("\n");
12062
+ [
12063
+ "[data-motion-loop] { animation-play-state: running, running !important; }",
12064
+ "[data-motion-on=\"view\"][data-motion-enter], [data-motion-on=\"view\"][data-motion-stagger] > * { animation-play-state: running, running !important; }",
12065
+ "[data-motion-on=\"scroll\"][data-motion-enter], [data-motion-on=\"scroll\"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }"
12066
+ ].join("\n");
11766
12067
  //#endregion
11767
12068
  //#region src/schema/lint/motion.ts
11768
12069
  /**
@@ -11775,12 +12076,26 @@ var lintMotion = (ctx) => {
11775
12076
  const { motion } = element.definition;
11776
12077
  if (motion === void 0) return;
11777
12078
  const where = ctx.describe(element.id);
11778
- const problems = d$3(motion);
12079
+ const problems = p$2(motion);
11779
12080
  if (problems.length > 0) ctx.error("motion-invalid", `${where} has a motion the page cannot play: ${problems.join("; ")}. For example \`motion: { enter: 'fade-up', on: 'view' }\`.`, element.id);
11780
12081
  if (i$8(element)) ctx.error("motion-no-tag", `${where} has a motion but renders no element of its own (no \`subType\`), so there is nothing to move. Put the motion on what it wraps, or give it a tag.`, element.id);
11781
12082
  });
11782
12083
  };
11783
12084
  //#endregion
12085
+ //#region src/schema/lint/quiet.ts
12086
+ /** Every suggestion's code, in the order the table holds them: what `quiet` may name. */
12087
+ var SUGGESTION_CODES = Object.entries(AUTHORING_CODES).filter(([, entry]) => entry.kind === "suggested").map(([code]) => code);
12088
+ /**
12089
+ * An element's `quiet` as a document holds it — written by authoring, the builder or the MCP: suggestions' codes and
12090
+ * only those. A problem is never quieted, and a misspelt code quiets nothing while reading as if it did.
12091
+ */
12092
+ var lintQuiet = (ctx) => {
12093
+ Object.values(ctx.flat).forEach((element) => {
12094
+ const wrong = (element.definition.quiet ?? []).filter((code) => !isSuggestionCode(code));
12095
+ if (wrong.length > 0) ctx.error("quiet-unknown", `${ctx.describe(element.id)} quiets ${wrong.map((code) => `"${code}"`).join(", ")}, which ${wrong.length === 1 ? "is" : "are"} no suggestion's code. \`quiet\` lists the codes suggestions are offered with: ${SUGGESTION_CODES.join(", ")}.`, element.id);
12096
+ });
12097
+ };
12098
+ //#endregion
11784
12099
  //#region src/schema/lint/style.ts
11785
12100
  /**
11786
12101
  * A colour token with a light value and no dark one: a dark theme shows the light value, which is how a near-black
@@ -12128,8 +12443,10 @@ var lintSpace$1 = ({ schema, style }, catalogs = {}) => {
12128
12443
  lintComputed(ctx);
12129
12444
  lintFlags(ctx);
12130
12445
  lintElements(ctx);
12446
+ lintDataPaths(ctx);
12131
12447
  lintAnchors(ctx);
12132
12448
  lintMotion(ctx);
12449
+ lintQuiet(ctx);
12133
12450
  lintInstances(ctx);
12134
12451
  lintChannels(ctx);
12135
12452
  lintFlows(ctx);
@@ -12140,6 +12457,7 @@ var lintSpace$1 = ({ schema, style }, catalogs = {}) => {
12140
12457
  for (const component of Object.values(schema.components)) {
12141
12458
  const own = new LintContext(schema, style, catalogs, component);
12142
12459
  lintElements(own);
12460
+ lintDataPaths(own);
12143
12461
  lintAnchors(own);
12144
12462
  lintInstances(own);
12145
12463
  lintFlows(own);
@@ -12166,25 +12484,25 @@ var e$6 = {
12166
12484
  shadow: ["--toastify-toast-shadow"],
12167
12485
  padding: ["--toastify-toast-padding"]
12168
12486
  };
12169
- var t$5 = {
12487
+ var t$6 = {
12170
12488
  fontSize: "font-size",
12171
12489
  border: "border"
12172
12490
  };
12173
- var n$5 = [...Object.keys(e$6), ...Object.keys(t$5)];
12174
- var r$2 = (e) => n$5.includes(e);
12175
- var i = n$5.filter(r$2);
12491
+ var n$6 = [...Object.keys(e$6), ...Object.keys(t$6)];
12492
+ var r$3 = (e) => n$6.includes(e);
12493
+ var i = n$6.filter(r$3);
12176
12494
  var a$3 = ".Toastify__toast-container.plitzi-sdk-toasts";
12177
12495
  var o$7 = (e) => {
12178
12496
  for (let [t, i] of Object.entries(e ?? {})) {
12179
- if (!r$2(t)) return `\`notifications\` has no "${t}". It takes ${n$5.join(", ")}.`;
12497
+ if (!r$3(t)) return `\`notifications\` has no "${t}". It takes ${n$6.join(", ")}.`;
12180
12498
  if (i !== void 0 && (typeof i != "string" || i.trim() === "" || /[;{}]/.test(i))) return `\`notifications.${t}\` is ${JSON.stringify(i)}, which is not one CSS value. Write a colour or a length, like 'var(--card)' or '12px'.`;
12181
12499
  }
12182
12500
  };
12183
12501
  var s$6 = (n) => {
12184
12502
  let i = [], o = [];
12185
12503
  for (let [a, s] of Object.entries(n ?? {})) {
12186
- if (!r$2(a) || typeof s != "string" || s.trim() === "") continue;
12187
- let n = t$5[a];
12504
+ if (!r$3(a) || typeof s != "string" || s.trim() === "") continue;
12505
+ let n = t$6[a];
12188
12506
  n ? o.push(` ${n}: ${s.trim()};`) : i.push(...(e$6[a] ?? []).map((e) => ` ${e}: ${s.trim()};`));
12189
12507
  }
12190
12508
  return [i.length > 0 ? `${a$3} {\n${i.join("\n")}\n}` : "", o.length > 0 ? `:where(${a$3} .Toastify__toast) {\n${o.join("\n")}\n}` : ""].filter(Boolean).join("\n");
@@ -12202,8 +12520,8 @@ var f$1 = (e, t) => {
12202
12520
  }
12203
12521
  return n;
12204
12522
  };
12205
- var p$1 = new Map(Object.entries(e$6).flatMap(([e, t]) => r$2(e) ? t.map((t) => [t, e]) : []));
12206
- var m$1 = new Map(Object.entries(t$5).flatMap(([e, t]) => r$2(e) ? [[t, e]] : []));
12523
+ var p$1 = new Map(Object.entries(e$6).flatMap(([e, t]) => r$3(e) ? t.map((t) => [t, e]) : []));
12524
+ var m$1 = new Map(Object.entries(t$6).flatMap(([e, t]) => r$3(e) ? [[t, e]] : []));
12207
12525
  var h = (e) => {
12208
12526
  let t = {};
12209
12527
  for (let [n, r] of [[u$2, (e) => p$1.get(e)], [d$2, (e) => m$1.get(e)]]) {
@@ -12270,11 +12588,11 @@ var SpaceRefusedError = class extends Error {
12270
12588
  //#endregion
12271
12589
  //#region ../sdk-shared/dist/auth/visitorRoles.mjs
12272
12590
  var e$5 = /^[A-Za-z][\w-]{0,63}$/;
12273
- var t$4 = "`visitorRoles: { author: [\"postPublish\"], editor: [\"postPublish\", \"postEdit\"] }`";
12274
- var n$4 = (n) => {
12591
+ var t$5 = "`visitorRoles: { author: [\"postPublish\"], editor: [\"postPublish\", \"postEdit\"] }`";
12592
+ var n$5 = (n) => {
12275
12593
  if (typeof n != "object" || !n || Array.isArray(n)) return {
12276
12594
  ok: !1,
12277
- problem: `\`settings.visitorRoles\` is ${JSON.stringify(n)}. Write each role with its permissions: ${t$4}.`
12595
+ problem: `\`settings.visitorRoles\` is ${JSON.stringify(n)}. Write each role with its permissions: ${t$5}.`
12278
12596
  };
12279
12597
  let r = {};
12280
12598
  for (let [i, a] of Object.entries(n)) {
@@ -12284,7 +12602,7 @@ var n$4 = (n) => {
12284
12602
  };
12285
12603
  if (!Array.isArray(a) || a.length === 0) return {
12286
12604
  ok: !1,
12287
- problem: `\`settings.visitorRoles.${i}\` is ${JSON.stringify(a)}. A role is the permissions it gives, as a list of names: ${t$4}.`
12605
+ problem: `\`settings.visitorRoles.${i}\` is ${JSON.stringify(a)}. A role is the permissions it gives, as a list of names: ${t$5}.`
12288
12606
  };
12289
12607
  let n = /* @__PURE__ */ new Set();
12290
12608
  for (let t of a) {
@@ -12328,9 +12646,9 @@ var e$4 = (e, t, { keepEmpty: n = !1, closeEndsPart: r = !1 } = {}) => {
12328
12646
  }
12329
12647
  return c(), i;
12330
12648
  };
12331
- var t$3 = (e) => /\s/.test(e);
12332
- var n$3 = (e, t, n = !1) => n ? t : `${e}:${t};`;
12333
- var r$1 = (e) => {
12649
+ var t$4 = (e) => /\s/.test(e);
12650
+ var n$4 = (e, t, n = !1) => n ? t : `${e}:${t};`;
12651
+ var r$2 = (e) => {
12334
12652
  if (!e) return [];
12335
12653
  let t = [];
12336
12654
  for (let [n, r] of Object.entries(e)) {
@@ -12344,9 +12662,9 @@ var i$3 = (e, t, r, i = !1) => {
12344
12662
  variables: {},
12345
12663
  value: ""
12346
12664
  }, o = r.replaceAll("\"", "").match(/var\((?<variableName>--[\w-]+)\)(?<extraContent>\S.+)/);
12347
- if (!o || !o.groups) return a.value = n$3(t, r, i), a;
12665
+ if (!o || !o.groups) return a.value = n$4(t, r, i), a;
12348
12666
  let { variableName: s, extraContent: c } = o.groups, l = `${s}-parsed`, u = `var(${s})+"${c}"`;
12349
- return e.variables[l] && e.variables[l] !== u && (l = `${l}-${Object.keys(e.variables).length}`), a.variables[l] = u, a.value = n$3(t, `var(${l})`, i), a;
12667
+ return e.variables[l] && e.variables[l] !== u && (l = `${l}-${Object.keys(e.variables).length}`), a.variables[l] = u, a.value = n$4(t, `var(${l})`, i), a;
12350
12668
  };
12351
12669
  var a$2 = (e, t, r, a, o = !1) => {
12352
12670
  let s = {
@@ -12358,15 +12676,15 @@ var a$2 = (e, t, r, a, o = !1) => {
12358
12676
  s.variables = {
12359
12677
  ...s.variables,
12360
12678
  ...c.variables
12361
- }, s.value = n$3(t, `${r}(${c.value})`, o);
12362
- } else s.value = n$3(t, `${r}(${a})`, o);
12679
+ }, s.value = n$4(t, `${r}(${c.value})`, o);
12680
+ } else s.value = n$4(t, `${r}(${a})`, o);
12363
12681
  return s;
12364
12682
  };
12365
12683
  var o$6 = (n, r, s, c = !1, l = !1) => {
12366
12684
  let u = {
12367
12685
  variables: {},
12368
12686
  value: ""
12369
- }, d = e$4(s.replace(/\s*;\s*$/, ""), t$3, { closeEndsPart: !0 });
12687
+ }, d = e$4(s.replace(/\s*;\s*$/, ""), t$4, { closeEndsPart: !0 });
12370
12688
  if (!c && d.length > 1) return d.forEach((e) => {
12371
12689
  let t = o$6(n, r, e, !0, l);
12372
12690
  u.variables = {
@@ -12400,7 +12718,7 @@ var c$2 = (e) => {
12400
12718
  if (!e) return;
12401
12719
  let t = {};
12402
12720
  for (let [n, i] of Object.entries(e)) {
12403
- let e = r$1(i);
12721
+ let e = r$2(i);
12404
12722
  e.length && (t[n] = e);
12405
12723
  }
12406
12724
  return Object.keys(t).length ? t : void 0;
@@ -12411,7 +12729,7 @@ var l$2 = (e) => {
12411
12729
  for (let [n, i] of Object.entries(e)) {
12412
12730
  let e = c$2(i.states);
12413
12731
  t[n] = {
12414
- default: r$1(i.default),
12732
+ default: r$2(i.default),
12415
12733
  ...e && { states: e }
12416
12734
  };
12417
12735
  }
@@ -12421,7 +12739,7 @@ var u$1 = (e) => {
12421
12739
  if (!e) return;
12422
12740
  let t = {};
12423
12741
  for (let [n, i] of Object.entries(e)) {
12424
- let e = r$1(i.default), a = c$2(i.states), o = l$2(i.variants);
12742
+ let e = r$2(i.default), a = c$2(i.states), o = l$2(i.variants);
12425
12743
  (e.length || a || o) && (t[n] = {
12426
12744
  ...e.length && { default: e },
12427
12745
  ...a && { states: a },
@@ -12436,7 +12754,7 @@ function d$1(e) {
12436
12754
  for (let n in e.attributes) {
12437
12755
  let i = e.attributes[n], a = c$2(i.states), o = l$2(i.variants), s = u$1(i.ancestors);
12438
12756
  t[n] = {
12439
- default: r$1(i.default),
12757
+ default: r$2(i.default),
12440
12758
  ...a && { states: a },
12441
12759
  ...o && { variants: o },
12442
12760
  ...s && { ancestors: s }
@@ -12461,7 +12779,7 @@ var e$3 = (e) => {
12461
12779
  };
12462
12780
  //#endregion
12463
12781
  //#region ../sdk-style/dist/helpers/processSelectorVariables.mjs
12464
- var n$2 = (n) => {
12782
+ var n$3 = (n) => {
12465
12783
  let { variables: r } = n;
12466
12784
  if (!r || !Object.keys(r).length) return;
12467
12785
  let i = {
@@ -12507,13 +12825,13 @@ var d = (e, t, n) => {
12507
12825
  let o = t ? "," : ", ", s = [];
12508
12826
  for (let [c, { default: l, states: d, variants: f }] of Object.entries(e)) {
12509
12827
  l?.length && s.push(m(`:where(.${c}) &`, l, {}, t, n));
12510
- for (let [e, o] of o$15(d ?? {})) s.push(m(`:where(.${c}${c$9(e)}) &`, o, {}, t, n)), l$5(e) && s.push(p(`:where(.${c}) &`, o, t, n));
12828
+ for (let [e, o] of o$16(d ?? {})) s.push(m(`:where(.${c}${c$9(e)}) &`, o, {}, t, n)), l$5(e) && s.push(p(`:where(.${c}) &`, o, t, n));
12511
12829
  for (let [e, l] of Object.entries(f ?? {})) {
12512
12830
  if (l.default.length) {
12513
12831
  let r = u(`.${c}`, e).join(o);
12514
12832
  s.push(m(`:where(${r}) &`, l.default, {}, t, n));
12515
12833
  }
12516
- for (let [d, f] of o$15(l.states ?? {})) {
12834
+ for (let [d, f] of o$16(l.states ?? {})) {
12517
12835
  let r = u(`.${c}`, e, c$9(d)).join(o);
12518
12836
  if (s.push(m(`:where(${r}) &`, f, {}, t, n)), l$5(d)) {
12519
12837
  let r = u(`.${c}`, e).join(o);
@@ -12525,7 +12843,7 @@ var d = (e, t, n) => {
12525
12843
  return s;
12526
12844
  };
12527
12845
  var f = (e, t, n, c = !0, l = o$5) => {
12528
- let { states: u, variants: f, ancestors: h } = n, g = c ? t.join("") : t.map((e) => `${s$4(l + o$5)}${e}`).join("\n").replaceAll(":", ": "), _ = u ? o$15(u).flatMap(([e, t]) => {
12846
+ let { states: u, variants: f, ancestors: h } = n, g = c ? t.join("") : t.map((e) => `${s$4(l + o$5)}${e}`).join("\n").replaceAll(":", ": "), _ = u ? o$16(u).flatMap(([e, t]) => {
12529
12847
  let n = m(`&${c$9(e)}`, t, {}, c, l + o$5);
12530
12848
  return l$5(e) ? [n, p("&", t, c, l + o$5)] : [n];
12531
12849
  }) : [], v = e.replace("plitzi__", ""), y = f ? Object.entries(f).map(([e, t]) => m(`&[data-variant="${e}"]${c ? "," : ", "}&${v}--${e}`, t.default, { states: t.states }, c, l + o$5)) : [], b = h ? d(h, c, l + o$5) : [];
@@ -12556,7 +12874,7 @@ var h$1 = (e, t, n = !0, r = o$5) => {
12556
12874
  return n ? `${e}{${i.join("")}}` : `${e} {\n${i.join("\n\n")}\n}`;
12557
12875
  };
12558
12876
  var g = (r, i = !0) => {
12559
- let a = e$3(r), o = n$2(r), s = d$1(r), u = o ? l$1(a, o, i) : void 0;
12877
+ let a = e$3(r), o = n$3(r), s = d$1(r), u = o ? l$1(a, o, i) : void 0;
12560
12878
  o && s.attributes.base.default.push(...o.default);
12561
12879
  let d = h$1(a, s.attributes, i, 0);
12562
12880
  return u ? c$1(d, u, i) : d;
@@ -12632,6 +12950,7 @@ var UNITLESS = /* @__PURE__ */ new Set([
12632
12950
  "orphans",
12633
12951
  "widows",
12634
12952
  "zoom",
12953
+ "scale",
12635
12954
  "tab-size",
12636
12955
  "animation-iteration-count",
12637
12956
  "grid-row-start",
@@ -13324,7 +13643,7 @@ var css = (input) => {
13324
13643
  if (unknown.length > 0) throw new AuthoringError("css-property-unknown", `Unknown CSS ${unknown.length === 1 ? "property" : "properties"}: ${unknown.map((key) => {
13325
13644
  const suggestion = suggestCssProperty(key);
13326
13645
  return suggestion ? `"${key}" (did you mean "${suggestion}"?)` : `"${key}"`;
13327
- }).join(", ")}. Plitzi's style vocabulary is a closed list of kebab-case properties.`);
13646
+ }).join(", ")}. Plitzi's style vocabulary is a closed list of kebab-case properties — a shorthand is expanded into them. One that is standard CSS and not a typo is not in it yet: write it in the space's \`customCss\`, under the element's class, until it is.`);
13328
13647
  return expanded;
13329
13648
  };
13330
13649
  /** The breakpoints a rule set can be written for, widest first — the order they cascade in. */
@@ -13502,7 +13821,7 @@ var sameBlocks = (a, b) => JSON.stringify(canonical$1(a)) === JSON.stringify(can
13502
13821
  * property is refused on this line. What a declaration MEANS — where it is collected from, what happens when one
13503
13822
  * name is declared twice — belongs to whoever assembles the document; this fragment only names rules.
13504
13823
  */
13505
- var styles = (name, rules) => ({
13824
+ var styles = (name, rules) => markWrittenAt({
13506
13825
  name,
13507
13826
  rules: toBlocks(rules),
13508
13827
  toString: () => name
@@ -14831,7 +15150,7 @@ var targetKey = ({ state, ancestor }) => `${state ?? ""}|${ancestor ? `${ancesto
14831
15150
  var refuse$1 = (code, reason) => {
14832
15151
  throw new AuthoringError(code, reason);
14833
15152
  };
14834
- var BREAKPOINT_HELP = "Plitzi has three ranges — mobile below 48rem, tablet 48–64rem, desktop above — so `md:` (tablet and desktop), `lg:` (desktop), `max-md:` (mobile) and `max-lg:` (mobile and tablet) have an equivalent and the others do not.";
15153
+ var BREAKPOINT_HELP = "Plitzi has three ranges — mobile up to 48rem, tablet 48–64rem, desktop above — so `md:` (tablet and desktop), `lg:` (desktop), `max-md:` (mobile) and `max-lg:` (mobile and tablet) have an equivalent and the others do not.";
14835
15154
  /** The variants a class is written under: `md:hover:bg-x` is `md`, `hover`, `bg-x`. Brackets keep their colons. */
14836
15155
  var splitVariants = (written) => {
14837
15156
  const parts = [];
@@ -15656,12 +15975,21 @@ var signaturesOf = (flat, declared) => {
15656
15975
  const open = [...own, ...items.flatMap((child) => leaving.get(child) ?? [])].filter((read) => read.depth < depth(id));
15657
15976
  leaving.set(id, open);
15658
15977
  const outside = stable([...new Set(open.map((read) => read.source))].sort());
15978
+ const wired = /* @__PURE__ */ new Set([
15979
+ ...Object.values(bindings ?? {}).flat().flatMap(({ source }) => own.some((read) => read.source === source) ? [] : [`read:${source}`]),
15980
+ ...Object.values(interactions ?? {}).flatMap((node) => {
15981
+ const key = e$28(node.params) ? node.params.key : void 0;
15982
+ return typeof key === "string" ? [`write:${key}`] : [];
15983
+ }),
15984
+ ...children.flatMap((child) => child.wiring.split("\n").filter(Boolean))
15985
+ ]);
15659
15986
  const body = `${type}|${stable(element.attributes)}|${stable(initialState?.visibility ?? null)}|${stable(reads)}`;
15660
15987
  const signatures = {
15661
15988
  exact: `${body}|${classes}(${children.map((child) => child.exact).join(",")})`,
15662
15989
  near: `${body}(${children.map((child) => child.near).join(",")})`,
15663
15990
  shape: `${type}|${classes}|${flows}(${children.map((child) => child.shape).join(",")})`,
15664
15991
  outside,
15992
+ wiring: [...wired].sort().join("\n"),
15665
15993
  size: 1 + children.reduce((sum, child) => sum + child.size, 0)
15666
15994
  };
15667
15995
  memo.set(id, signatures);
@@ -15670,7 +15998,7 @@ var signaturesOf = (flat, declared) => {
15670
15998
  Object.keys(flat).forEach(visit);
15671
15999
  return memo;
15672
16000
  };
15673
- var named$1 = (ids) => {
16001
+ var named$2 = (ids) => {
15674
16002
  const shown = ids.slice(0, 3).map((id) => `"${id}"`);
15675
16003
  return ids.length > 3 ? `${shown.join(", ")} and ${String(ids.length - 3)} more` : shown.join(", ");
15676
16004
  };
@@ -15727,7 +16055,7 @@ var suggestRepeats = (schema, style) => {
15727
16055
  const size = sizeOf(fresh[0]);
15728
16056
  const type = flat[fresh[0]].definition.type;
15729
16057
  const onlyClasses = key === "near" ? " They differ only in their classes — nearly always the link to the page being shown: a link marks its own page by itself, so its class says how with `states: { current: { … } }` (or `activeOn` for an entry lit on several pages), and the copies become one." : "";
15730
- const carried = `${String(fresh.length)} pages carry the same ${type} of ${String(size)} elements (${named$1(fresh)}).`;
16058
+ const carried = `${String(fresh.length)} pages carry the same ${type} of ${String(size)} elements (${named$2(fresh)}).`;
15731
16059
  const layouts = new Set([...pagesWithIt].map((page) => flat[page].attributes.layout));
15732
16060
  const [only] = layouts;
15733
16061
  const layout = layouts.size === 1 && typeof only === "string" && only !== "" ? only : void 0;
@@ -15751,12 +16079,13 @@ var suggestRepeats = (schema, style) => {
15751
16079
  const size = sizeOf(group[0]);
15752
16080
  if (size < MIN_SHAPE || fresh.length < (size >= MIN_PAIR ? 2 : MIN_SHAPE_COPIES)) continue;
15753
16081
  const siblings = new Set(fresh.map((id) => flat[id].definition.parentId)).size === 1;
16082
+ if (siblings && new Set(fresh.map((id) => signatures.get(id)?.wiring)).size > 1) continue;
15754
16083
  const type = flat[fresh[0]].definition.type;
15755
16084
  suggestions.push({
15756
16085
  code: "repeated-shape",
15757
16086
  elementIds: fresh,
15758
16087
  saves: siblings ? (fresh.length - 1) * size : (fresh.length - 1) * size - fresh.length,
15759
- message: siblings ? `${String(fresh.length)} ${type}s of ${String(size)} elements side by side (${named$1(fresh)}) are one item written again for each row of data. One \`list\` over the rows draws them: its item template is written once and reads each row (\`{{ <list>.item.<field> }}\`). Worth it when they are data — an array they were written from, rows that come and go; a few cards a person edits word by word on the canvas can stay as they are.` : `${String(fresh.length)} ${type}s of ${String(size)} elements share one structure (${named$1(fresh)}) and differ only in what they say. Make it a component — \`components: [{ id, props, root }]\` — and place it with \`component(id, { props })\`: one tree to read and edit, and every copy changes with it. What a copy says or does differently is a prop: an attribute reads \`{{ props.title }}\`, and so does a flow's step; what it reads from the page is a prop the instance binds (\`component(id, { bind: [{ to: prop, source }] })\`).`
16088
+ message: siblings ? `${String(fresh.length)} ${type}s of ${String(size)} elements side by side (${named$2(fresh)}) are one item written again for each row of data. One \`list\` over the rows draws them: its item template is written once and reads each row (\`{{ <list>.item.<field> }}\`). Worth it when they are data — an array they were written from, rows that come and go; a few cards a person edits word by word on the canvas can stay as they are.` : `${String(fresh.length)} ${type}s of ${String(size)} elements share one structure (${named$2(fresh)}) and differ only in what they say. Make it a component — \`components: [{ id, props, root }]\` — and place it with \`component(id, { props })\`: one tree to read and edit, and every copy changes with it. What a copy says or does differently is a prop: an attribute reads \`{{ props.title }}\`, and so does a flow's step; what it reads from the page is a prop the instance binds (\`component(id, { bind: [{ to: prop, source }] })\`).`
15760
16089
  });
15761
16090
  fresh.forEach(cover);
15762
16091
  }
@@ -15765,6 +16094,12 @@ var suggestRepeats = (schema, style) => {
15765
16094
  //#endregion
15766
16095
  //#region src/schema/advice/index.ts
15767
16096
  /**
16097
+ * What each element quiets (`definition.quiet`): a suggestion about an element written that way on purpose is left
16098
+ * out — here, so authoring, the builder's list and the MCP leave out the same ones. The pages' tree and every
16099
+ * component's.
16100
+ */
16101
+ var quietCodes = (schema) => new Map([schema.flat, ...Object.values(schema.components).map((component) => component.flat)].flatMap((flat) => Object.values(flat)).flatMap((element) => element.definition.quiet ? [[element.id, element.definition.quiet]] : []));
16102
+ /**
15768
16103
  * A shorter way to the same page: what a space's documents could say with fewer elements or less CSS — or, for its
15769
16104
  * animations, a lighter one.
15770
16105
  *
@@ -15775,12 +16110,15 @@ var suggestRepeats = (schema, style) => {
15775
16110
  * that did not know them, or a person who has not met them yet. Each names what to write instead, and the ones about
15776
16111
  * elements say how many it saves, which is what they are ranked by.
15777
16112
  */
15778
- var suggestSpace = ({ schema, style }) => [
15779
- ...suggestRepeats(schema, style),
15780
- ...suggestContent(schema, style),
15781
- ...suggestCustomCss(schema, style),
15782
- ...suggestMotion(schema, style)
15783
- ].sort((a, b) => b.saves - a.saves);
16113
+ var suggestSpace = ({ schema, style }) => {
16114
+ const quiets = quietCodes(schema);
16115
+ return [
16116
+ ...suggestRepeats(schema, style),
16117
+ ...suggestContent(schema, style),
16118
+ ...suggestCustomCss(schema, style),
16119
+ ...suggestMotion(schema, style)
16120
+ ].filter((suggestion) => !suggestion.elementIds.some((id) => quiets.get(id)?.includes(suggestion.code) === true)).sort((a, b) => b.saves - a.saves);
16121
+ };
15784
16122
  //#endregion
15785
16123
  //#region ../sdk-schema/dist/helpers/schemaValidator.mjs
15786
16124
  var o$3 = (i, a) => {
@@ -16235,7 +16573,7 @@ var o$3 = (i, a) => {
16235
16573
  }));
16236
16574
  }), [["", l], ...Object.entries(p).map(([e, t]) => [e, t.flat])].forEach(([e, n]) => {
16237
16575
  Object.values(n).forEach((r) => {
16238
- if (!r || !m$4(r)) return;
16576
+ if (!r || !m$3(r)) return;
16239
16577
  let i = r.attributes.referenceId, a = typeof i == "string" ? p[i] : void 0;
16240
16578
  if (!a || typeof i != "string") {
16241
16579
  s.push({
@@ -16369,6 +16707,25 @@ var assertSpaceValid = (space, context, options = {}, allow = []) => {
16369
16707
  };
16370
16708
  //#endregion
16371
16709
  //#region src/schema/space.ts
16710
+ /** What a page field nobody takes was probably for: the page's own fields for search, or a setting of the space. */
16711
+ var pageFieldHint = (key) => {
16712
+ if ([
16713
+ "seo",
16714
+ "title",
16715
+ "description"
16716
+ ].includes(key)) return " A page’s title and description for search engines and shared links are `seoTitle` and `seoDescription`.";
16717
+ return [
16718
+ "keepState",
16719
+ "transientState",
16720
+ "paintedState",
16721
+ "stateStorage"
16722
+ ].includes(key) ? " Keeping state across visits is a setting of the whole space: `settings: { keepState: true }`, with `transientState` for the keys to leave out." : "";
16723
+ };
16724
+ /** A `styles()` declaration in words: its name, and the line of the author's that wrote it when it is known. */
16725
+ var declaredAt = (declaration) => {
16726
+ const at = writtenAt(declaration);
16727
+ return `styles('${declaration.name}')${at === void 0 ? "" : ` at ${at}`}`;
16728
+ };
16372
16729
  /** The types that render their children once per item: everything inside one is repeated, one copy per row. */
16373
16730
  var REPEATING_TYPES = /* @__PURE__ */ new Set(["list", "carouselTrack"]);
16374
16731
  /**
@@ -16440,6 +16797,8 @@ var SpaceAuthor = class {
16440
16797
  layoutHandles = {};
16441
16798
  /** Every class this space declares, whether from `classes` or from a `styles()` declaration found in the tree. */
16442
16799
  classRules = /* @__PURE__ */ new Map();
16800
+ /** Where each class was first declared, in words — what a second declaration that disagrees is told it disagrees with. */
16801
+ classOrigins = /* @__PURE__ */ new Map();
16443
16802
  /** Every element's own selector, named or derived — each one is that element's alone. */
16444
16803
  ownSelectors = /* @__PURE__ */ new Set();
16445
16804
  /** Every element in this space that publishes a data source, by id, and the name it publishes it under. */
@@ -16500,6 +16859,15 @@ var SpaceAuthor = class {
16500
16859
  suggestions
16501
16860
  };
16502
16861
  }
16862
+ /**
16863
+ * An element's `quiet`: suggestions' codes, and only those — a problem is never quieted, and a misspelt code would
16864
+ * quiet nothing while reading as if it did. Writes nothing into the documents: it is about the advice, not the page.
16865
+ */
16866
+ assertQuiet(quiet, where) {
16867
+ const suggestions = Object.entries(AUTHORING_CODES).filter(([, entry]) => entry.kind === "suggested").map(([code]) => code);
16868
+ const wrong = (Array.isArray(quiet) ? quiet : [quiet]).filter((code) => !isSuggestionCode(code));
16869
+ if (!Array.isArray(quiet) || wrong.length > 0) throw new AuthoringError("quiet-unknown", `${where} quiets ${wrong.map((code) => JSON.stringify(code)).join(", ")}, which ${wrong.length === 1 ? "is" : "are"} no suggestion's code: \`quiet\` is a list of the codes suggestions were offered with — ${suggestions.join(", ")}${didYouMean(String(wrong[0]), suggestions) || "."}`);
16870
+ }
16503
16871
  /** The spec an element was written from, by its id in the documents. */
16504
16872
  specOf(id) {
16505
16873
  return this.specs.get(id);
@@ -16514,17 +16882,17 @@ var SpaceAuthor = class {
16514
16882
  for (const [type, elementSpec] of Object.entries(this.spec.elements ?? {})) this.writeElementDefaults(type, elementSpec);
16515
16883
  for (const [name, value] of Object.entries(this.spec.classes ?? {})) {
16516
16884
  if (!isStyleDeclaration(value)) {
16517
- this.declareClass(name, toBlocks(value), "The space-wide `classes`");
16885
+ this.declareClass(name, toBlocks(value), () => `the space-wide \`classes\` entry "${name}"`);
16518
16886
  continue;
16519
16887
  }
16520
16888
  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.`);
16521
- this.declareClass(name, value.rules, "The space-wide `classes`");
16889
+ this.declareClass(name, value.rules, () => `${declaredAt(value)}, listed in the space-wide \`classes\``);
16522
16890
  }
16523
16891
  const layouts = this.spec.layouts ?? [];
16524
16892
  const components = this.spec.components ?? [];
16525
- components.forEach((component) => this.collectDeclarations(void 0, [component.root], `Component "${component.id}"`));
16526
- layouts.forEach((layout) => this.collectDeclarations(layout.class, layout.body, `Layout "${layout.id}"`));
16527
- this.spec.pages.forEach((page) => this.collectDeclarations(page.class, page.body, `Page "${page.name}"`));
16893
+ components.forEach((component) => this.collectDeclarations(void 0, [component.root], `component "${component.id}"`));
16894
+ layouts.forEach((layout) => this.collectDeclarations(layout.class, layout.body, `layout "${layout.id}"`));
16895
+ this.spec.pages.forEach((page) => this.collectDeclarations(page.class, page.body, `page "${page.name}"`));
16528
16896
  components.forEach((component) => {
16529
16897
  const sources = /* @__PURE__ */ new Map();
16530
16898
  this.collectSources(component.root, sources);
@@ -16563,6 +16931,7 @@ var SpaceAuthor = class {
16563
16931
  layouts.forEach((layout) => this.assertLayoutRef(layout.layout, `Layout "${layout.id}"`));
16564
16932
  this.spec.pages.forEach((page) => this.assertLayoutRef(page.layout, `Page "${page.name}"`));
16565
16933
  this.spec.pages.forEach((page, index) => this.writeRedirect(page, pages[index]));
16934
+ this.resolveControls();
16566
16935
  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: [] }]`.");
16567
16936
  const style = {
16568
16937
  ...e$30,
@@ -16574,6 +16943,8 @@ var SpaceAuthor = class {
16574
16943
  cache: ""
16575
16944
  };
16576
16945
  style.cache = l(style);
16946
+ const serverResolved = [this.flatMap.flat, ...declared.map((component) => component.flat)].some((flat) => Object.values(flat).some((element) => element.definition.runtime === "server"));
16947
+ const rsc = this.spec.rsc ?? (serverResolved ? { enabled: true } : void 0);
16577
16948
  return {
16578
16949
  schema: {
16579
16950
  definition: {
@@ -16589,7 +16960,7 @@ var SpaceAuthor = class {
16589
16960
  ...this.spec.computed ? { computed: this.spec.computed } : {},
16590
16961
  ...this.spec.channels ? { channels: this.spec.channels } : {}
16591
16962
  },
16592
- ...this.spec.rsc ? { rsc: this.spec.rsc } : {},
16963
+ ...rsc ? { rsc } : {},
16593
16964
  pages,
16594
16965
  pageFolders,
16595
16966
  components: Object.fromEntries(declared.map((component) => [component.id, component]))
@@ -16665,14 +17036,18 @@ var SpaceAuthor = class {
16665
17036
  * arriving twice is the ordinary case and not an error. Arriving twice saying DIFFERENT things is: a class name
16666
17037
  * that means one thing on one page and another somewhere else is a rule that silently depends on which file the
16667
17038
  * bundler reached first, which is the shape of bug this whole surface exists to make impossible.
17039
+ *
17040
+ * `origin` says where, and is only asked for when there is a conflict to report: reading where an element was written
17041
+ * means formatting a stack, which every element of every space would otherwise pay for on every write.
16668
17042
  */
16669
- declareClass(name, blocks, where) {
17043
+ declareClass(name, blocks, origin) {
16670
17044
  const existing = this.classRules.get(name);
16671
17045
  if (!existing) {
16672
17046
  this.classRules.set(name, blocks);
17047
+ this.classOrigins.set(name, origin);
16673
17048
  return;
16674
17049
  }
16675
- if (!sameBlocks(existing, blocks)) throw new AuthoringError("class-conflict", `${where} declares the class "${name}" with different rules to a declaration already made for that name. A class is one rule set per space: rename one of them, or make them agree.`);
17050
+ 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.`);
16676
17051
  }
16677
17052
  /**
16678
17053
  * Every `styles()` declaration the tree names, gathered before a line of it is written.
@@ -16681,15 +17056,19 @@ var SpaceAuthor = class {
16681
17056
  * rules stay next to the element they dress — and it means one declared and never named writes nothing at all.
16682
17057
  */
16683
17058
  collectDeclarations(rootClass, body, rootWhere) {
16684
- const collect = (value, where) => {
16685
- for (const ref of value ? classRefs(value) : []) if (typeof ref !== "string") this.declareClass(ref.name, ref.rules, where);
17059
+ const collect = (value, usedBy) => {
17060
+ for (const ref of value ? classRefs(value) : []) if (typeof ref !== "string") this.declareClass(ref.name, ref.rules, () => `${declaredAt(ref)}, used by ${usedBy()}`);
16686
17061
  };
16687
17062
  const walk = (spec) => {
16688
- collect(spec.class === void 0 ? void 0 : splitClassList(spec.class).refs, `Element "${spec.type}"`);
16689
- Object.entries(spec.slots ?? {}).forEach(([slot, value]) => collect(value, `Slot "${slot}" of element "${spec.type}"`));
17063
+ const element = () => {
17064
+ const at = writtenAt(spec);
17065
+ return `${spec.type}${spec.id === void 0 ? "" : ` "${spec.id}"`}${at === void 0 ? "" : ` at ${at}`}`;
17066
+ };
17067
+ collect(spec.class === void 0 ? void 0 : splitClassList(spec.class).refs, element);
17068
+ Object.entries(spec.slots ?? {}).forEach(([slot, value]) => collect(value, () => `the "${slot}" slot of ${element()}`));
16690
17069
  spec.children?.forEach(walk);
16691
17070
  };
16692
- collect(rootClass, rootWhere);
17071
+ collect(rootClass, () => rootWhere);
16693
17072
  body.forEach(walk);
16694
17073
  }
16695
17074
  /**
@@ -16741,7 +17120,7 @@ var SpaceAuthor = class {
16741
17120
  parseFonts(fonts) {
16742
17121
  return fonts.map((font, index) => {
16743
17122
  try {
16744
- return h$4(font);
17123
+ return h$3(font);
16745
17124
  } catch (error) {
16746
17125
  const reason = error instanceof Error ? error.message : String(error);
16747
17126
  throw new AuthoringError("font-invalid", `Font ${index} ("${font.family}") in space "${this.spec.permanentUrl}": ${reason}`, { cause: error });
@@ -16751,7 +17130,7 @@ var SpaceAuthor = class {
16751
17130
  /**
16752
17131
  * A tablet rule a phone never sees.
16753
17132
  *
16754
- * The breakpoints are RANGES, not a cascade: `tablet` is 48–64rem, `mobile` is below 48rem, and each inherits
17133
+ * The breakpoints are RANGES, not a cascade: `tablet` is 48–64rem, `mobile` is up to 48rem, and each inherits
16755
17134
  * only from `desktop`. So a layout that collapses to a column at tablet and says nothing for mobile comes back as
16756
17135
  * desktop columns on a phone — the narrowest screen gets the widest layout, and every check passes. A warning and
16757
17136
  * not a refusal, because a rule meant for tablets alone is legal, just rarely what anybody meant.
@@ -16764,7 +17143,7 @@ var SpaceAuthor = class {
16764
17143
  if (skipped.length === 0) return;
16765
17144
  this.styleWarnings.push({
16766
17145
  code: "tablet-rule-skips-mobile",
16767
- message: `${where} sets ${skipped.join(", ")} for tablet but not for mobile. Tablet (48–64rem) and mobile (below 48rem) are separate ranges and mobile inherits desktop, not tablet — so phones get the desktop value back. For both, write it once under \`compact\` (tablet and mobile together); repeat it under \`mobile\` otherwise.`,
17146
+ message: `${where} sets ${skipped.join(", ")} for tablet but not for mobile. Tablet (48–64rem) and mobile (up to 48rem) are separate ranges and mobile inherits desktop, not tablet — so phones get the desktop value back. For both, write it once under \`compact\` (tablet and mobile together); repeat it under \`mobile\` otherwise.`,
16768
17147
  details: { properties: skipped }
16769
17148
  });
16770
17149
  }
@@ -16861,6 +17240,26 @@ var SpaceAuthor = class {
16861
17240
  return name;
16862
17241
  }
16863
17242
  /**
17243
+ * A button's `controls` names what it shows and hides by that element's id, as every reference here does; the page
17244
+ * needs it by an id the DOM carries — an anchor. The element is given one (its id, when that is one already) and the
17245
+ * button names it. A value that already is an anchor of the space is kept as written.
17246
+ */
17247
+ resolveControls() {
17248
+ const { flat } = this.flatMap;
17249
+ for (const element of Object.values(flat)) {
17250
+ const controls = element.attributes.controls;
17251
+ if (element.definition.type !== "button" || typeof controls !== "string" || controls === "") continue;
17252
+ if (!Object.hasOwn(flat, controls)) {
17253
+ if (Object.values(flat).some((other) => other.definition.anchor === controls)) continue;
17254
+ throw new AuthoringError("controls-unknown", `Button "${element.id}" controls "${controls}", which is no element of the space${didYouMean(controls, Object.keys(flat)) || "."} Name the element it shows and hides by its id: \`controls: 'faq-answer'\`.`);
17255
+ }
17256
+ const target = flat[controls];
17257
+ const anchor = target.definition.anchor ?? asAnchor(target.id);
17258
+ target.definition.anchor = anchor;
17259
+ element.attributes.controls = anchor;
17260
+ }
17261
+ }
17262
+ /**
16864
17263
  * Inserts through `FlatMap`, and refuses to carry on when it declines.
16865
17264
  *
16866
17265
  * It answers `false` rather than throwing — a builder dropping an element somewhere it may not go is not an
@@ -16870,7 +17269,11 @@ var SpaceAuthor = class {
16870
17269
  */
16871
17270
  insert(element, to, position, path = to, tree = this.pagesTree) {
16872
17271
  const earlier = this.authoredAt.get(element.id);
16873
- if (earlier !== void 0) throw new AuthoringError("id-taken", `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.`);
17272
+ if (earlier !== void 0) {
17273
+ const holder = tree.map.flat[element.id]?.definition.type;
17274
+ const root = holder === "page" ? "page" : holder === "layoutContainer" ? "layout" : void 0;
17275
+ 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.`);
17276
+ }
16874
17277
  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`);
16875
17278
  this.authoredAt.set(element.id, path);
16876
17279
  }
@@ -16902,7 +17305,7 @@ var SpaceAuthor = class {
16902
17305
  }
16903
17306
  for (const page of this.spec.pages) {
16904
17307
  const where = `Page "${page.name}"`;
16905
- assertKnownKeys(page, PAGE_SPEC_KEYS, where, " Keeping state across visits is a setting of the whole space: `settings: { keepState: true }`, with `transientState` for the keys to leave out.");
17308
+ assertKnownKeys(page, PAGE_SPEC_KEYS, where, pageFieldHint);
16906
17309
  assertId(page.id, where);
16907
17310
  if (typeof page.slug !== "string") throw new AuthoringError("page-without-slug", `${where} has no \`slug\`. The home page's is '' and every other page's is its path: 'about', 'blog/{{slug}}'.`);
16908
17311
  }
@@ -16987,7 +17390,7 @@ var SpaceAuthor = class {
16987
17390
  assertVisitorRoles() {
16988
17391
  const roles = this.spec.settings?.visitorRoles;
16989
17392
  if (roles === void 0) return;
16990
- const checked = n$4(roles);
17393
+ const checked = n$5(roles);
16991
17394
  if (!checked.ok) throw new AuthoringError("visitor-roles", checked.problem);
16992
17395
  }
16993
17396
  /** The element about to be placed under `parentId`, and everything that one is nested in. */
@@ -17122,7 +17525,7 @@ var SpaceAuthor = class {
17122
17525
  slug: page.slug,
17123
17526
  path: this.routeFor(page),
17124
17527
  ...page.accessLevel ? { accessLevel: page.accessLevel } : {},
17125
- params: f$3(page.slug),
17528
+ params: f$4(page.slug),
17126
17529
  ...page.layout ? { layout: page.layout.id } : {},
17127
17530
  elements: {}
17128
17531
  };
@@ -17161,7 +17564,7 @@ var SpaceAuthor = class {
17161
17564
  if (!target) throw new AuthoringError("component-undeclared", `${where} places component "${String(componentId)}", which this space does not declare${typeof componentId === "string" ? didYouMean(componentId, declared.map((candidate) => candidate.id)) || "." : "."} Declare it in \`components\`.`);
17162
17565
  const props = target.props ?? {};
17163
17566
  const names = Object.keys(props);
17164
- const given = Object.fromEntries(Object.entries(spec.attributes ?? {}).filter(([name]) => !o$13.has(name)));
17567
+ const given = Object.fromEntries(Object.entries(spec.attributes ?? {}).filter(([name]) => !o$14.has(name)));
17165
17568
  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"}.`);
17166
17569
  const bound = new Set(spec.bind === void 0 ? [] : toBindingSpecs(spec.bind).map((binding) => binding.to));
17167
17570
  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.`);
@@ -17310,7 +17713,7 @@ var SpaceAuthor = class {
17310
17713
  });
17311
17714
  }
17312
17715
  if (spec.variant === void 0 || this.variantDeclared(spec, spec.variant)) return;
17313
- const plugin = reserved.includes("variant") ? " If it was meant for the plugin’s own `variant`, that attribute is never set: rename it in the plugin." : "";
17716
+ const plugin = reserved.includes("variant") ? " If it was meant for the plugin’s own `variant`, that attribute is never set: rename it in the plugin." : element.definition.type === "custom" ? " On a `custom` element `variant` is its style variant, never a prop of the component it hosts: hand the component a prop of another name (`tone`)." : "";
17314
17717
  this.styleWarnings.push({
17315
17718
  code: "unknown-variant",
17316
17719
  message: `${where} is written with \`variant: '${spec.variant}'\`, which no class of it and no style of its type declares, so nothing applies.${plugin} Declare it — \`styles(name, { variants: { ${spec.variant}: { … } } })\` — or name one that is.`,
@@ -17383,6 +17786,7 @@ var SpaceAuthor = class {
17383
17786
  const where = `Element "${spec.type}" (${id}) at ${place}`;
17384
17787
  this.assertFlowShapes(spec.flows, where);
17385
17788
  if (spec.type === "reference" && spec.attributes?.referenceType === "component") this.assertInstance(spec, where);
17789
+ if (spec.quiet !== void 0) this.assertQuiet(spec.quiet, where);
17386
17790
  const isRoot = parentId === "";
17387
17791
  const ownRootId = isRoot ? id : rootId;
17388
17792
  const bindings = withVisibility({
@@ -17428,6 +17832,7 @@ var SpaceAuthor = class {
17428
17832
  ...spec.loadStrategy ? { loadStrategy: spec.loadStrategy } : {},
17429
17833
  ...spec.anchor === void 0 ? {} : { anchor: spec.anchor },
17430
17834
  ...spec.motion === void 0 ? {} : { motion: spec.motion },
17835
+ ...spec.quiet === void 0 ? {} : { quiet: [...spec.quiet] },
17431
17836
  ...spec.flag === void 0 ? {} : { flag: flagGateOf(spec.flag, where) },
17432
17837
  ...bindings?.length ? { bindings: groupBindings(path, bindings, sourceIndex, where, tree.globals) } : {},
17433
17838
  ...spec.flows ? { interactions: authorFlows(spec.flows, id) } : {}
@@ -18003,7 +18408,7 @@ var withNamedIds = (schema) => {
18003
18408
  });
18004
18409
  const flat = structuredClone(schema.flat);
18005
18410
  const pages = [...schema.pages];
18006
- _$1(flat, Object.fromEntries(renames.map(({ from, to }) => [from, to])), pages);
18411
+ _$2(flat, Object.fromEntries(renames.map(({ from, to }) => [from, to])), pages);
18007
18412
  return {
18008
18413
  schema: {
18009
18414
  ...schema,
@@ -18541,6 +18946,7 @@ var SpaceComparer = class {
18541
18946
  this.check(at, "flag", a.definition.flag, b.definition.flag);
18542
18947
  this.check(at, "anchor", a.definition.anchor, b.definition.anchor);
18543
18948
  this.check(at, "motion", a.definition.motion, b.definition.motion);
18949
+ this.check(at, "quiet", a.definition.quiet, b.definition.quiet);
18544
18950
  const childrenA = this.childrenOf(this.expected, a);
18545
18951
  const childrenB = this.childrenOf(this.actual, b);
18546
18952
  if (childrenA.length !== childrenB.length) this.differ(at, `children: expected ${childrenA.length}, got ${childrenB.length}`);
@@ -18872,7 +19278,8 @@ var DEFINITION_FIELDS = /* @__PURE__ */ new Set([
18872
19278
  "loadStrategy",
18873
19279
  "flag",
18874
19280
  "anchor",
18875
- "motion"
19281
+ "motion",
19282
+ "quiet"
18876
19283
  ]);
18877
19284
  var PAGE_ATTRIBUTES = /* @__PURE__ */ new Set([
18878
19285
  "slug",
@@ -19644,6 +20051,7 @@ var SpecReader = class {
19644
20051
  ...definition.loadStrategy ? { loadStrategy: definition.loadStrategy } : {},
19645
20052
  ...definition.anchor ? { anchor: definition.anchor } : {},
19646
20053
  ...definition.motion ? { motion: definition.motion } : {},
20054
+ ...definition.quiet ? { quiet: definition.quiet.filter(isSuggestionCode) } : {},
19647
20055
  ...definition.flag ? { flag: flagSpecOf(definition.flag) } : {},
19648
20056
  meta: { label: definition.label },
19649
20057
  ...this.childrenSpec(element)
@@ -19662,10 +20070,10 @@ var SpecReader = class {
19662
20070
  */
19663
20071
  placedNames(element) {
19664
20072
  const { referenceId } = element.attributes;
19665
- const component = m$4(element) && typeof referenceId === "string" ? p$3(this.documents.schema, referenceId) : void 0;
20073
+ const component = m$3(element) && typeof referenceId === "string" ? p$4(this.documents.schema, referenceId) : void 0;
19666
20074
  const parentId = element.definition.parentId;
19667
20075
  const parent = parentId && Object.hasOwn(this.flat, parentId) ? this.flat[parentId] : void 0;
19668
- return [...Object.keys(component?.props ?? {}), ...parent && m$4(parent) ? ["slot"] : []];
20076
+ return [...Object.keys(component?.props ?? {}), ...parent && m$3(parent) ? ["slot"] : []];
19669
20077
  }
19670
20078
  readAttributes(type, attributes, placed = []) {
19671
20079
  const declared = Object.hasOwn(ATTRIBUTE_NAMES, type) ? ATTRIBUTE_NAMES[type] : void 0;
@@ -19946,6 +20354,7 @@ var ELEMENT_FIELDS = [
19946
20354
  "anchor",
19947
20355
  "motion",
19948
20356
  "flag",
20357
+ "quiet",
19949
20358
  "meta",
19950
20359
  "children"
19951
20360
  ];
@@ -20301,6 +20710,101 @@ var SourceWriter = class {
20301
20710
  /** Writes a spec out as source files. See {@link SpecSourceOptions}. */
20302
20711
  var specToSource = (spec, options) => new SourceWriter(spec, options).write();
20303
20712
  //#endregion
20713
+ //#region src/explain/builders.ts
20714
+ /**
20715
+ * How a step or trigger builder is CALLED, for the ones not called with their params as one object — `delay(ms)`, not
20716
+ * `delay({ time })`. `explain` lists a step's params as the document stores them; without this, an agent writes the
20717
+ * builder with the document's keys and is refused. A builder missing here takes one object of the params listed.
20718
+ * `explain.test.ts` holds every name to an export, and the arguments to the builder's own.
20719
+ */
20720
+ var BUILDER_SIGNATURES = {
20721
+ delay: "delay(ms)",
20722
+ on: "on('onArrival', params?)",
20723
+ onKey: "onKey('mod+k, escape')",
20724
+ onInterval: "onInterval(ms)",
20725
+ resetForm: "resetForm('form-id')",
20726
+ setFieldValue: "setFieldValue('form-id', 'field', value)",
20727
+ reloadApi: "reloadApi('provider-id', input?)",
20728
+ openModal: "openModal('modal-id', data?)",
20729
+ closeModal: "closeModal('modal-id')",
20730
+ openDialog: "openDialog('dialog-id', data?)",
20731
+ closeDialog: "closeDialog('dialog-id')",
20732
+ publishOn: "publishOn('channel-id', type, data?)",
20733
+ announceOn: "announceOn('channel-id', state)",
20734
+ scrollBy: "scrollBy('row-id', { x: '80%' })",
20735
+ scrollTo: "scrollTo('row-id', { x: 'end' })",
20736
+ scrollIntoView: "scrollIntoView('element-id', { block: 'center' }?)",
20737
+ carouselNext: "carouselNext('carousel-id')",
20738
+ carouselPrevious: "carouselPrevious('carousel-id')",
20739
+ carouselGoTo: "carouselGoTo('carousel-id', index)",
20740
+ carouselPlay: "carouselPlay('carousel-id')",
20741
+ carouselPause: "carouselPause('carousel-id')",
20742
+ updateElement: "updateElement({ category, key, value }, 'element-id'?)",
20743
+ toggleElement: "toggleElement({ category, key }, 'element-id'?)"
20744
+ };
20745
+ /** How a builder is written: its own signature, or its params as one object (`setState({ … })`). */
20746
+ var builderCall = (builder) => BUILDER_SIGNATURES[builder] ?? `${builder}({ … })`;
20747
+ //#endregion
20748
+ //#region src/explain/helpers.ts
20749
+ var AUTHORING_HELPERS = {
20750
+ bindTemplate: {
20751
+ signature: "bindTemplate(to, source, template, { returns?: 'text' | 'value', category? })",
20752
+ summary: "An attribute computed by a template over a source: a label with units, a URL with an id, a filtered list.",
20753
+ example: "text('', { bind: [bindTemplate('content', 'state.xp', '{{ source }} XP')] })"
20754
+ },
20755
+ visibleWhen: {
20756
+ signature: "visibleWhen(source, template?)",
20757
+ summary: "Shows or hides an element from a value — the visibility binding, whose category nobody guesses.",
20758
+ example: "container({ bind: [visibleWhen('state.menuOpen')] }) // or visible: 'state.menuOpen'"
20759
+ },
20760
+ variantFrom: {
20761
+ signature: "variantFrom(class, source, { template? })",
20762
+ summary: "Switches one of a class's variants from a value: a status pill that turns amber, green or red.",
20763
+ example: "text({ class: pill, bind: [variantFrom(pill, 'list_jobs.item.status')] })"
20764
+ },
20765
+ activeOn: {
20766
+ signature: "activeOn(class, pageIds)",
20767
+ summary: "Marks a navigation entry as current on the pages it stands for, through the class's `active` variant.",
20768
+ example: "link({ href: 'docs', class: navLink, bind: [activeOn(navLink, 'docs')] })"
20769
+ },
20770
+ activeWhen: {
20771
+ signature: "activeWhen(class, condition)",
20772
+ summary: "Wears a class's `active` variant while a condition holds: the dot of the slide on screen, the open tab.",
20773
+ example: "container({ class: dot, bind: [activeWhen(dot, '{{ list_dots.index == state.slide }}')] })"
20774
+ },
20775
+ when: {
20776
+ signature: "when(rules, step, combinator = 'and')",
20777
+ summary: "Runs a step only when a rule holds — what is conditional in a flow is said on its steps, not by branching.",
20778
+ example: "when({ field: 'saved.ok', operator: '=', value: true }, navigate({ to: 'thanks' }))"
20779
+ },
20780
+ named: {
20781
+ signature: "named(id, step)",
20782
+ summary: "Names a step, so a later one reads what it produced: `{{ <id>.field }}`.",
20783
+ example: "[named('sent', onSubmit()), setState({ key: 'email', type: 'text', value: '{{ sent.values.email }}' })]"
20784
+ },
20785
+ scope: {
20786
+ signature: "scope(prefix, ref => …)",
20787
+ summary: "Builds a part whose ids are its own — every id inside is prefixed — so a helper called twice writes two.",
20788
+ example: "scope('promos', ref => container({ id: 'panel', children: [list({ id: 'slides' })] })) // promos-panel"
20789
+ },
20790
+ source: {
20791
+ signature: "source(id, sample)",
20792
+ summary: "An `apiContainer`'s source typed by a sample of its answer: a path the sample lacks is a type error.",
20793
+ example: "const site = source('site', home); heading({ from: site.data.hero.title })"
20794
+ },
20795
+ twig: {
20796
+ signature: "twig`…`",
20797
+ summary: "A template whose paths are typed source paths, each written as its full name.",
20798
+ example: "text(twig`{{ ${site.data.total} + 1 }}`)"
20799
+ }
20800
+ };
20801
+ /** `motion`, an element's field: what it takes, from the presets the SDK plays. */
20802
+ var MOTION_ENTRY = {
20803
+ signature: `motion: { enter?: ${t.map((name) => `'${name}'`).join(" | ")}; on?: ${n.map((name) => `'${name}'`).join(" | ")}; duration?; delay?; stagger?; loop?: ${r.map((name) => `'${name}'`).join(" | ")} }`,
20804
+ summary: "How an element arrives and whether it keeps moving, played by the SDK's stylesheet and stilled for reduced motion. `on: 'view'` plays once as it comes into view; `on: 'scroll'` follows the scroll both ways.",
20805
+ example: "container({ motion: { enter: 'fade-up', on: 'view', stagger: 60 }, children })"
20806
+ };
20807
+ //#endregion
20304
20808
  //#region src/explain/explain.ts
20305
20809
  /** What each kind is called when listed. */
20306
20810
  var EXPLAIN_KINDS = {
@@ -20308,7 +20812,8 @@ var EXPLAIN_KINDS = {
20308
20812
  step: "steps",
20309
20813
  trigger: "triggers",
20310
20814
  code: "codes",
20311
- transformer: "transformers"
20815
+ transformer: "transformers",
20816
+ helper: "helpers"
20312
20817
  };
20313
20818
  var isExplainKind = (kind) => Object.hasOwn(EXPLAIN_KINDS, kind);
20314
20819
  /** A kind by what it is called when listed (`steps`) or by itself (`step`). */
@@ -20441,12 +20946,18 @@ var explainSteps = (name) => {
20441
20946
  }
20442
20947
  return steps;
20443
20948
  };
20949
+ /** The helpers `explain` knows, `motion` with them: an element's field said as one. */
20950
+ var HELPERS = {
20951
+ ...AUTHORING_HELPERS,
20952
+ motion: MOTION_ENTRY
20953
+ };
20444
20954
  /** Everything a name is — an action can be both a global and an element callback (`setState`), and is said as both. */
20445
20955
  var explain = (name) => {
20446
20956
  const code = authoringCodeEntry(name);
20447
20957
  const element = explainElement(name);
20448
20958
  const trigger = explainTrigger(name);
20449
20959
  const transformer = Object.hasOwn(BUILTIN_TRANSFORMERS, name) ? BUILTIN_TRANSFORMERS[name] : void 0;
20960
+ const helper = Object.hasOwn(HELPERS, name) ? HELPERS[name] : void 0;
20450
20961
  return [
20451
20962
  ...code ? [{
20452
20963
  kind: "code",
@@ -20464,6 +20975,11 @@ var explain = (name) => {
20464
20975
  title: transformer.title,
20465
20976
  description: transformer.description,
20466
20977
  params: fromSpec(transformer.params)
20978
+ }] : [],
20979
+ ...helper ? [{
20980
+ kind: "helper",
20981
+ name,
20982
+ ...helper
20467
20983
  }] : []
20468
20984
  ];
20469
20985
  };
@@ -20504,6 +21020,10 @@ var explainList = (kind) => {
20504
21020
  name,
20505
21021
  summary: entry.title
20506
21022
  })));
21023
+ case "helper": return sorted(Object.entries(HELPERS).map(([name, entry]) => ({
21024
+ name,
21025
+ summary: entry.summary
21026
+ })));
20507
21027
  }
20508
21028
  };
20509
21029
  var valueText = (value) => JSON.stringify(value);
@@ -20526,13 +21046,13 @@ var explanationText = (explanation) => {
20526
21046
  ].join("\n");
20527
21047
  case "step": return [
20528
21048
  `${explanation.name} — step (${stepPlace(explanation.type, explanation.answeredBy)}): ${explanation.title}`,
20529
- ...explanation.builder ? [`Written: ${explanation.builder}(…)`] : [],
21049
+ ...explanation.builder ? [`Written: ${builderCall(explanation.builder)}`] : [],
20530
21050
  "Params:",
20531
21051
  ...paramsText(explanation.params)
20532
21052
  ].join("\n");
20533
21053
  case "trigger": return [
20534
21054
  `${explanation.name} — trigger: ${explanation.title}. Fired by ${Array.isArray(explanation.firedBy) ? explanation.firedBy.join(", ") : explanation.firedBy}.`,
20535
- `Written: ${explanation.builder ? `${explanation.builder}()` : `on('${explanation.name}')`}; name it to read what it hands over — [named('x', …), …] then {{ x.field }}`,
21055
+ `Written: ${explanation.builder ? BUILDER_SIGNATURES[explanation.builder] ?? `${explanation.builder}()` : `on('${explanation.name}')`}; name it to read what it hands over — [named('x', …), …] then {{ x.field }}`,
20536
21056
  `Reads: ${explanation.reads.length > 0 ? explanation.reads.join(", ") : "(nothing)"}`,
20537
21057
  ...explanation.params.length > 0 ? ["Params:", ...paramsText(explanation.params)] : []
20538
21058
  ].join("\n");
@@ -20542,6 +21062,11 @@ var explanationText = (explanation) => {
20542
21062
  "Params:",
20543
21063
  ...paramsText(explanation.params)
20544
21064
  ].join("\n");
21065
+ case "helper": return [
21066
+ `${explanation.name} — helper: ${explanation.summary}`,
21067
+ `Written: ${explanation.signature}`,
21068
+ `Example: ${explanation.example}`
21069
+ ].join("\n");
20545
21070
  }
20546
21071
  };
20547
21072
  //#endregion
@@ -21216,8 +21741,8 @@ var importedFiles = ({ probes, dark }) => {
21216
21741
  * documents and there is no generated file to keep in step.
21217
21742
  *
21218
21743
  * It starts as the space Plitzi gives a new account, and it is yours: rename things, change the palette, delete the
21219
- * guides. The guides are one function mapped over one list, which is not a saving of keystrokes — change `guideCard`
21220
- * and all six follow, add an entry to `GUIDES` and a seventh appears, styled like the rest.
21744
+ * guides. The paths and the guides are each one function mapped over one list, which is not a saving of keystrokes —
21745
+ * change `guideCard` and all six follow, add an entry to `GUIDES` and a seventh appears, styled like the rest.
21221
21746
  *
21222
21747
  * Name anything a test, a binding or an agent should be able to point at (`id: 'hero-title'`). An element with no
21223
21748
  * name gets a positional one, which moves the moment something is inserted above it.
@@ -21252,21 +21777,27 @@ var shell$1 = styles("shell", { css: {
21252
21777
  }
21253
21778
  } });
21254
21779
  /**
21255
- * The grid behind everything, pinned to the viewport.
21780
+ * The grid behind the top of the page, fading into the background as it goes down.
21256
21781
  *
21257
- * Two gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the line
21258
- * colour is a variable, so it is faint on light and faint on dark without a second asset.
21259
- */
21260
- var backdrop = styles("backdrop", {
21261
- inset: "0%",
21262
- position: "fixed",
21263
- "background-image": "linear-gradient(0deg, var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px)",
21264
- "background-size": "48px 48px, 48px 48px",
21265
- "background-position": "0% 0%, 0% 0%",
21266
- "background-repeat": "repeat, repeat",
21267
- "background-attachment": "scroll, scroll",
21268
- "background-clip": "border-box, border-box"
21269
- });
21782
+ * Gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the line colour
21783
+ * and the fade are variables, so it is faint on light and faint on dark without a second asset. The fade is the first
21784
+ * layer, drawn over the lines, so the grid ends softly instead of at an edge.
21785
+ */
21786
+ var backdrop = styles("backdrop", { css: {
21787
+ desktop: {
21788
+ position: "absolute",
21789
+ top: "0px",
21790
+ left: "0px",
21791
+ right: "0px",
21792
+ height: "760px",
21793
+ "pointer-events": "none",
21794
+ "background-image": "linear-gradient(180deg, transparent 0%, var(--background) 100%), linear-gradient(0deg, var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px)",
21795
+ "background-size": "100% 100%, 48px 48px, 48px 48px",
21796
+ "background-position": "0% 0%, 50% 0%, 50% 0%",
21797
+ "background-repeat": "no-repeat, repeat, repeat"
21798
+ },
21799
+ mobile: { height: "560px" }
21800
+ } });
21270
21801
  var navLink = styles("nav-link", {
21271
21802
  css: {
21272
21803
  display: "flex",
@@ -21284,6 +21815,11 @@ var navLink = styles("nav-link", {
21284
21815
  "focus-visible": focusRing
21285
21816
  }
21286
21817
  });
21818
+ /** The mark beside the name, at the size the bar wants. */
21819
+ var brandMark = styles("brand-mark", {
21820
+ width: "24px",
21821
+ height: "24px"
21822
+ });
21287
21823
  /** The theme switch, dressed like the rest of the bar: a browser draws a bare button grey and square. */
21288
21824
  var iconButton = styles("icon-button", {
21289
21825
  css: {
@@ -21341,8 +21877,40 @@ var button$1 = styles("button", {
21341
21877
  } }
21342
21878
  } }
21343
21879
  });
21344
- /** One guide: the whole card is the link, so the target is as large as what it describes. */
21345
- var card = styles("guide-card", {
21880
+ /** A section's small label over its title: what the band is about, in the palette's primary. */
21881
+ var kicker = styles("kicker", {
21882
+ color: "var(--primary)",
21883
+ "font-size": "13px",
21884
+ "font-weight": "600",
21885
+ "letter-spacing": "0.04em",
21886
+ "text-transform": "uppercase",
21887
+ margin: "0px"
21888
+ });
21889
+ var sectionTitle = styles("section-title", { css: {
21890
+ desktop: {
21891
+ "font-size": "32px",
21892
+ "font-weight": "700",
21893
+ "letter-spacing": "-0.02em",
21894
+ "line-height": "1.15",
21895
+ margin: "0px"
21896
+ },
21897
+ mobile: { "font-size": "26px" }
21898
+ } });
21899
+ var sectionHead = styles("section-head", {
21900
+ display: "flex",
21901
+ "flex-direction": "column",
21902
+ gap: "8px",
21903
+ "margin-bottom": "8px"
21904
+ });
21905
+ /** Copy under a title or in a card: the palette's quiet colour, at a size made for reading. */
21906
+ var bodyText = styles("body-text", {
21907
+ color: "var(--muted)",
21908
+ "font-size": "15px",
21909
+ "line-height": "1.6",
21910
+ margin: "0px"
21911
+ });
21912
+ /** A card of either band: the whole card is the link, so the target is as large as what it describes. */
21913
+ var card = styles("card", {
21346
21914
  css: {
21347
21915
  display: "flex",
21348
21916
  "flex-direction": "column",
@@ -21366,13 +21934,19 @@ var card = styles("guide-card", {
21366
21934
  "focus-visible": focusRing
21367
21935
  }
21368
21936
  });
21369
- var cardHead = styles("guide-head", {
21937
+ var cardHead = styles("card-head", {
21370
21938
  display: "flex",
21371
21939
  "align-items": "center",
21372
- gap: "8px"
21940
+ gap: "10px"
21941
+ });
21942
+ var cardTitle = styles("card-title", {
21943
+ color: "var(--foreground)",
21944
+ "font-size": "17px",
21945
+ "font-weight": "600",
21946
+ margin: "0px"
21373
21947
  });
21374
21948
  /** The arrow slides while the card around it is hovered. */
21375
- var cardArrow = styles("guide-arrow", {
21949
+ var cardArrow = styles("card-arrow", {
21376
21950
  css: {
21377
21951
  color: "var(--muted)",
21378
21952
  "font-size": "13px",
@@ -21393,6 +21967,7 @@ var tile = styles("tile", {
21393
21967
  "justify-content": "center",
21394
21968
  width: "40px",
21395
21969
  height: "40px",
21970
+ "flex-shrink": "0",
21396
21971
  "border-radius": "10px",
21397
21972
  "font-size": "16px"
21398
21973
  });
@@ -21423,6 +21998,49 @@ var tones = {
21423
21998
  "background-color": "var(--tint-blue-bg)"
21424
21999
  })
21425
22000
  };
22001
+ /** A path's number, in a circle: the order the three are worth reading in, not an order they must be taken in. */
22002
+ var step = styles("step", {
22003
+ display: "flex",
22004
+ "align-items": "center",
22005
+ "justify-content": "center",
22006
+ width: "28px",
22007
+ height: "28px",
22008
+ "flex-shrink": "0",
22009
+ "border-radius": "999px",
22010
+ border: "1px solid var(--border)",
22011
+ color: "var(--muted)",
22012
+ "font-size": "13px",
22013
+ "font-weight": "600"
22014
+ });
22015
+ /** What a path does, as it would be typed — the one place the page shows code. */
22016
+ var command = styles("command", {
22017
+ display: "flex",
22018
+ "align-items": "center",
22019
+ gap: "8px",
22020
+ "margin-top": "auto",
22021
+ padding: "10px 12px",
22022
+ "border-radius": "10px",
22023
+ border: "1px solid var(--border)",
22024
+ "background-color": "var(--code-bg)",
22025
+ color: "var(--foreground)",
22026
+ "font-family": "var(--font-mono)",
22027
+ "font-size": "13px",
22028
+ "white-space": "nowrap",
22029
+ overflow: "hidden"
22030
+ });
22031
+ /** A guide is smaller than a path: one line under its title, its icon beside it rather than above. */
22032
+ var guide = styles("guide", {
22033
+ "flex-direction": "row",
22034
+ "align-items": "flex-start",
22035
+ gap: "16px",
22036
+ padding: "20px"
22037
+ });
22038
+ var guideCopy = styles("guide-copy", {
22039
+ display: "flex",
22040
+ "flex-direction": "column",
22041
+ gap: "4px",
22042
+ "min-width": "0px"
22043
+ });
21426
22044
  /** Each band of the page wears `shell` for its width, and one of these for what is its own. */
21427
22045
  var topBarBand = styles("top-bar", {
21428
22046
  "flex-direction": "row",
@@ -21435,30 +22053,48 @@ var heroBand = styles("hero", { css: {
21435
22053
  desktop: {
21436
22054
  "align-items": "center",
21437
22055
  gap: "24px",
21438
- "padding-top": "96px",
21439
- "padding-bottom": "80px"
22056
+ "padding-top": "88px",
22057
+ "padding-bottom": "88px"
21440
22058
  },
21441
22059
  tablet: {
21442
22060
  "padding-top": "64px",
21443
- "padding-bottom": "56px"
22061
+ "padding-bottom": "64px"
21444
22062
  },
21445
22063
  mobile: {
21446
- "padding-top": "48px",
21447
- "padding-bottom": "40px"
22064
+ "padding-top": "40px",
22065
+ "padding-bottom": "48px"
21448
22066
  }
21449
22067
  } });
21450
- var guidesBand = styles("guides", {
22068
+ /** The two bands of cards: the paths first, the guides after, each under its own head. */
22069
+ var cardsBand = styles("cards-band", {
21451
22070
  gap: "20px",
21452
22071
  "padding-bottom": "80px"
21453
22072
  });
22073
+ /** Three columns that become two and then one, so a card is never narrower than its words. */
22074
+ var cardGrid = styles("card-grid", { css: {
22075
+ desktop: {
22076
+ display: "grid",
22077
+ "grid-template-columns": "repeat(3, minmax(0, 1fr))",
22078
+ gap: "16px"
22079
+ },
22080
+ tablet: { "grid-template-columns": "repeat(2, minmax(0, 1fr))" },
22081
+ mobile: { "grid-template-columns": "minmax(0, 1fr)" }
22082
+ } });
22083
+ /** The footer's line spans the content, not the band's padding: it belongs to what it closes. */
21454
22084
  var footerBand = styles("footer", { css: {
21455
22085
  desktop: {
21456
- "flex-direction": "row",
22086
+ "margin-top": "auto",
22087
+ "padding-bottom": "32px"
22088
+ },
22089
+ mobile: { "padding-bottom": "24px" }
22090
+ } });
22091
+ var footerRow = styles("footer-row", { css: {
22092
+ desktop: {
22093
+ display: "flex",
21457
22094
  "align-items": "center",
21458
22095
  "justify-content": "space-between",
21459
- "margin-top": "auto",
22096
+ gap: "16px",
21460
22097
  "padding-top": "24px",
21461
- "padding-bottom": "32px",
21462
22098
  "border-top": "1px solid var(--border)"
21463
22099
  },
21464
22100
  mobile: {
@@ -21466,12 +22102,43 @@ var footerBand = styles("footer", { css: {
21466
22102
  gap: "8px"
21467
22103
  }
21468
22104
  } });
21469
- /** Where to go next, as data: the grid below is this list, mapped. Each one is a page of the docs. */
22105
+ /**
22106
+ * The three ways to change this page — the builder, code, an agent — as data: the band is this list, mapped. They
22107
+ * are the same space either way, so any one of them can be put down and another picked up.
22108
+ */
22109
+ var PATHS = [
22110
+ {
22111
+ id: "path-builder",
22112
+ title: "In the builder",
22113
+ body: "Select anything on this page and change it: drag elements in, style them, wire them to data, and publish.",
22114
+ path: "elements",
22115
+ icon: "fas fa-pen-ruler",
22116
+ tone: "violet"
22117
+ },
22118
+ {
22119
+ id: "path-code",
22120
+ title: "In code",
22121
+ body: "The same space as TypeScript, in a project of your own — served by your server, or pushed back here.",
22122
+ path: "cli",
22123
+ icon: "fas fa-code",
22124
+ tone: "cyan",
22125
+ command: "npx @plitzi/cli create my-site"
22126
+ },
22127
+ {
22128
+ id: "path-agent",
22129
+ title: "With an agent",
22130
+ body: "Connect Claude or any MCP client. It reads and edits this space under the same rules as you do.",
22131
+ path: "agents",
22132
+ icon: "fas fa-robot",
22133
+ tone: "blue"
22134
+ }
22135
+ ];
22136
+ /** Where to read on, as data: the grid below is this list, mapped. Each one is a page of the docs. */
21470
22137
  var GUIDES = [
21471
22138
  {
21472
22139
  id: "concepts",
21473
22140
  title: "Core concepts",
21474
- body: "Spaces, pages and elements, the two documents behind them, and who owns what.",
22141
+ body: "Spaces, pages, elements, and who owns what.",
21475
22142
  path: "concepts",
21476
22143
  icon: "fas fa-shapes",
21477
22144
  tone: "violet"
@@ -21479,7 +22146,7 @@ var GUIDES = [
21479
22146
  {
21480
22147
  id: "authoring",
21481
22148
  title: "A space in code",
21482
- body: "Write this page as TypeScript: one declaration in, two documents out.",
22149
+ body: "One declaration in, two documents out.",
21483
22150
  path: "authoring",
21484
22151
  icon: "fas fa-code",
21485
22152
  tone: "cyan"
@@ -21487,7 +22154,7 @@ var GUIDES = [
21487
22154
  {
21488
22155
  id: "styling",
21489
22156
  title: "Styling and themes",
21490
- body: "Shared classes, states, breakpoints, and a palette that follows light and dark.",
22157
+ body: "Classes, states, breakpoints, light and dark.",
21491
22158
  path: "styling",
21492
22159
  icon: "fas fa-palette",
21493
22160
  tone: "rose"
@@ -21495,7 +22162,7 @@ var GUIDES = [
21495
22162
  {
21496
22163
  id: "data",
21497
22164
  title: "Data and bindings",
21498
- body: "Fetch from an API and bind what comes back to any element on the page.",
22165
+ body: "Fetch from an API, show it anywhere.",
21499
22166
  path: "data",
21500
22167
  icon: "fas fa-database",
21501
22168
  tone: "emerald"
@@ -21503,60 +22170,117 @@ var GUIDES = [
21503
22170
  {
21504
22171
  id: "interactions",
21505
22172
  title: "Interactions and flows",
21506
- body: "Clicks, forms and page loads wired to steps — no client code to write.",
22173
+ body: "Clicks and forms wired to steps, no code.",
21507
22174
  path: "interactions",
21508
22175
  icon: "fas fa-bolt",
21509
22176
  tone: "amber"
21510
22177
  },
21511
22178
  {
21512
- id: "agents",
21513
- title: "Agents and MCP",
21514
- body: "Let an AI agent read and edit this space through the same rules you do.",
21515
- path: "agents",
21516
- icon: "fas fa-robot",
22179
+ id: "quickstart",
22180
+ title: "Quickstart",
22181
+ body: "From a new space to a published site.",
22182
+ path: "quickstart",
22183
+ icon: "fas fa-flag-checkered",
21517
22184
  tone: "blue"
21518
22185
  }
21519
22186
  ];
21520
- var guideCard = (guide) => link({
21521
- id: guide.id,
21522
- href: `${DOCS}/${guide.path}`,
22187
+ var pathCard = (entry, index) => link({
22188
+ id: entry.id,
22189
+ href: `${DOCS}/${entry.path}`,
21523
22190
  mode: "external",
21524
22191
  target: "blank",
21525
22192
  class: card,
21526
22193
  children: [
21527
22194
  container({
21528
22195
  class: cardHead,
22196
+ children: [
22197
+ container({
22198
+ class: [tile, tones[entry.tone]],
22199
+ children: [fontAwesome({ icon: entry.icon })]
22200
+ }),
22201
+ container({
22202
+ class: step,
22203
+ decorative: true,
22204
+ children: [text({ content: String(index + 1) })]
22205
+ }),
22206
+ fontAwesome({
22207
+ icon: "fas fa-arrow-right",
22208
+ class: cardArrow
22209
+ })
22210
+ ]
22211
+ }),
22212
+ heading({
22213
+ id: `${entry.id}-title`,
22214
+ content: entry.title,
22215
+ subType: "h3",
22216
+ class: cardTitle
22217
+ }),
22218
+ paragraph({
22219
+ content: entry.body,
22220
+ class: bodyText
22221
+ }),
22222
+ ...entry.command ? [container({
22223
+ class: command,
21529
22224
  children: [container({
21530
- class: [tile, tones[guide.tone]],
21531
- children: [fontAwesome({ icon: guide.icon })]
21532
- }), fontAwesome({
21533
- icon: "fas fa-arrow-right",
21534
- class: cardArrow
22225
+ decorative: true,
22226
+ css: { color: "var(--muted)" },
22227
+ children: [text({ content: "$" })]
22228
+ }), text({ content: entry.command })]
22229
+ })] : []
22230
+ ]
22231
+ });
22232
+ var guideCard = (entry) => link({
22233
+ id: entry.id,
22234
+ href: `${DOCS}/${entry.path}`,
22235
+ mode: "external",
22236
+ target: "blank",
22237
+ class: [card, guide],
22238
+ children: [
22239
+ container({
22240
+ class: [tile, tones[entry.tone]],
22241
+ children: [fontAwesome({ icon: entry.icon })]
22242
+ }),
22243
+ container({
22244
+ class: guideCopy,
22245
+ children: [heading({
22246
+ id: `${entry.id}-title`,
22247
+ content: entry.title,
22248
+ subType: "h3",
22249
+ class: cardTitle
22250
+ }), paragraph({
22251
+ content: entry.body,
22252
+ class: bodyText
21535
22253
  })]
21536
22254
  }),
22255
+ fontAwesome({
22256
+ icon: "fas fa-arrow-right",
22257
+ class: cardArrow
22258
+ })
22259
+ ]
22260
+ });
22261
+ /** A band's head: its kicker, its title, and a line saying what is in it. */
22262
+ var sectionHeader = (id, kickerText, title, lede) => container({
22263
+ class: sectionHead,
22264
+ children: [
22265
+ text({
22266
+ content: kickerText,
22267
+ class: kicker
22268
+ }),
21537
22269
  heading({
21538
- id: `${guide.id}-title`,
21539
- content: guide.title,
21540
- subType: "h3",
21541
- css: {
21542
- "font-size": "17px",
21543
- "font-weight": "600",
21544
- margin: "4px 0px 0px"
21545
- }
22270
+ id: `${id}-title`,
22271
+ content: title,
22272
+ subType: "h2",
22273
+ class: sectionTitle
21546
22274
  }),
21547
22275
  paragraph({
21548
- content: guide.body,
21549
- css: {
21550
- color: "var(--muted)",
21551
- "font-size": "14px",
21552
- "line-height": "1.6",
21553
- margin: "0px"
21554
- }
22276
+ content: lede,
22277
+ class: bodyText
21555
22278
  })
21556
22279
  ]
21557
22280
  });
21558
22281
  var topBar = container({
21559
22282
  id: "top-bar",
22283
+ subType: "header",
21560
22284
  class: [shell$1, topBarBand],
21561
22285
  children: [link({
21562
22286
  id: "brand",
@@ -21567,17 +22291,19 @@ var topBar = container({
21567
22291
  children: [image({
21568
22292
  src: "https://cdn.plitzi.com/resources/img/favicon.svg",
21569
22293
  decorative: true,
22294
+ class: brandMark
22295
+ }), text({
22296
+ content: "Plitzi",
21570
22297
  css: {
21571
- width: "24px",
21572
- height: "24px"
22298
+ color: "var(--foreground)",
22299
+ "font-size": "16px",
22300
+ "font-weight": "700"
21573
22301
  }
21574
- }), text("Plitzi", { css: {
21575
- color: "var(--foreground)",
21576
- "font-size": "16px",
21577
- "font-weight": "700"
21578
- } })]
22302
+ })]
21579
22303
  }), container({
21580
22304
  id: "top-actions",
22305
+ subType: "nav",
22306
+ label: "Plitzi",
21581
22307
  css: {
21582
22308
  display: "flex",
21583
22309
  "align-items": "center",
@@ -21589,7 +22315,7 @@ var topBar = container({
21589
22315
  mode: "external",
21590
22316
  target: "blank",
21591
22317
  class: navLink,
21592
- children: [text("Docs")]
22318
+ content: "Docs"
21593
22319
  }), themeToggle({
21594
22320
  id: "theme",
21595
22321
  class: iconButton
@@ -21614,7 +22340,10 @@ var heroEyebrow = container({
21614
22340
  height: "8px",
21615
22341
  "border-radius": "999px",
21616
22342
  "background-color": "var(--tint-emerald)"
21617
- } }), text("Your new space", { css: { color: "var(--muted)" } })]
22343
+ } }), text({
22344
+ content: "Your new space",
22345
+ css: { color: "var(--muted)" }
22346
+ })]
21618
22347
  });
21619
22348
  var heroTitle = heading({
21620
22349
  id: "hero-title",
@@ -21635,14 +22364,14 @@ var heroTitle = heading({
21635
22364
  });
21636
22365
  var heroLede = paragraph({
21637
22366
  id: "hero-lede",
21638
- content: "This page is where your space starts. Change it in the builder, in code, or by asking an agent — and when you want to know how something works, the guides below go straight to it.",
22367
+ content: "This page is where your space starts, and it is already yours. Change any of it in the builder, in code, or by asking an agent — below is how, and where to read more.",
21639
22368
  css: {
21640
22369
  desktop: {
21641
22370
  color: "var(--muted)",
21642
22371
  "font-size": "18px",
21643
22372
  "line-height": "1.6",
21644
22373
  "text-align": "center",
21645
- "max-width": "620px",
22374
+ "max-width": "600px",
21646
22375
  margin: "0px"
21647
22376
  },
21648
22377
  mobile: { "font-size": "16px" }
@@ -21665,20 +22394,23 @@ var heroActions = container({
21665
22394
  }
21666
22395
  },
21667
22396
  children: [link({
21668
- id: "cta-docs",
21669
- href: DOCS,
22397
+ id: "cta-quickstart",
22398
+ href: `${DOCS}/quickstart`,
21670
22399
  mode: "external",
21671
22400
  target: "blank",
21672
22401
  class: button$1,
21673
22402
  variant: "primary",
21674
- children: [text("Read the docs"), fontAwesome({ icon: "fas fa-arrow-right" })]
22403
+ content: "Start the quickstart",
22404
+ icon: "fas fa-arrow-right",
22405
+ iconPlacement: "after"
21675
22406
  }), link({
21676
- id: "cta-quickstart",
21677
- href: `${DOCS}/quickstart`,
22407
+ id: "cta-docs",
22408
+ href: DOCS,
21678
22409
  mode: "external",
21679
22410
  target: "blank",
21680
22411
  class: button$1,
21681
- children: [fontAwesome({ icon: "fas fa-terminal" }), text("Quickstart")]
22412
+ content: "Read the docs",
22413
+ icon: "fas fa-book-open"
21682
22414
  })]
21683
22415
  });
21684
22416
  var space = {
@@ -21717,6 +22449,11 @@ var space = {
21717
22449
  dark: "#111115",
21718
22450
  default: "#ffffff"
21719
22451
  },
22452
+ "code-bg": {
22453
+ light: "#f4f4f8",
22454
+ dark: "#18181d",
22455
+ default: "#f4f4f8"
22456
+ },
21720
22457
  border: {
21721
22458
  light: "#e6e6ee",
21722
22459
  dark: "#27272d",
@@ -21743,9 +22480,9 @@ var space = {
21743
22480
  default: "rgba(91, 61, 245, 0.16)"
21744
22481
  },
21745
22482
  grid: {
21746
- light: "#0000000a",
21747
- dark: "#ffffff0a",
21748
- default: "#0000000a"
22483
+ light: "#0000000d",
22484
+ dark: "#ffffff0d",
22485
+ default: "#0000000d"
21749
22486
  },
21750
22487
  "tint-violet": {
21751
22488
  light: "#5b3df5",
@@ -21825,7 +22562,10 @@ var space = {
21825
22562
  default: "0 2px 4px rgba(12, 12, 20, 0.05), 0 24px 48px -20px rgba(12, 12, 20, 0.25)"
21826
22563
  }
21827
22564
  },
21828
- custom: { "font-sans": "Geist, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif" }
22565
+ custom: {
22566
+ "font-sans": "Geist, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
22567
+ "font-mono": "\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
22568
+ }
21829
22569
  },
21830
22570
  /** Loaded by the page itself: a face the space names here is the only one it ever fetches. */
21831
22571
  fonts: [{
@@ -21841,6 +22581,13 @@ var space = {
21841
22581
  display: "swap",
21842
22582
  preload: true,
21843
22583
  source: "google"
22584
+ }, {
22585
+ family: "Geist Mono",
22586
+ fallback: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
22587
+ weights: [400],
22588
+ styles: ["normal"],
22589
+ display: "swap",
22590
+ source: "google"
21844
22591
  }],
21845
22592
  /**
21846
22593
  * What text is, before any class touches it.
@@ -21873,59 +22620,72 @@ var space = {
21873
22620
  body: [
21874
22621
  container({
21875
22622
  id: "backdrop",
21876
- class: backdrop
22623
+ class: backdrop,
22624
+ decorative: true
21877
22625
  }),
21878
22626
  topBar,
21879
22627
  container({
21880
- id: "hero",
21881
- class: [shell$1, heroBand],
22628
+ id: "main",
22629
+ subType: "main",
22630
+ css: {
22631
+ display: "flex",
22632
+ "flex-direction": "column"
22633
+ },
21882
22634
  children: [
21883
- heroEyebrow,
21884
- heroTitle,
21885
- heroLede,
21886
- heroActions
22635
+ container({
22636
+ id: "hero",
22637
+ class: [shell$1, heroBand],
22638
+ children: [
22639
+ heroEyebrow,
22640
+ heroTitle,
22641
+ heroLede,
22642
+ heroActions
22643
+ ]
22644
+ }),
22645
+ container({
22646
+ id: "paths",
22647
+ subType: "section",
22648
+ label: "Make it yours",
22649
+ class: [shell$1, cardsBand],
22650
+ children: [sectionHeader("paths", "Make it yours", "Three ways in, one space", "Start with whichever suits you — the others see every change it makes."), container({
22651
+ id: "path-cards",
22652
+ class: cardGrid,
22653
+ children: PATHS.map(pathCard)
22654
+ })]
22655
+ }),
22656
+ container({
22657
+ id: "guides",
22658
+ subType: "section",
22659
+ label: "Guides",
22660
+ class: [shell$1, cardsBand],
22661
+ children: [sectionHeader("guides", "Guides", "Learn the building blocks", "Each one is a page of the docs, short enough to read before you change the page it explains."), container({
22662
+ id: "cards",
22663
+ class: cardGrid,
22664
+ children: GUIDES.map(guideCard)
22665
+ })]
22666
+ })
21887
22667
  ]
21888
22668
  }),
21889
- container({
21890
- id: "guides",
21891
- class: [shell$1, guidesBand],
21892
- children: [heading({
21893
- id: "guides-title",
21894
- content: "Where to go next",
21895
- subType: "h2",
21896
- css: {
21897
- "font-size": "14px",
21898
- "font-weight": "600",
21899
- color: "var(--muted)",
21900
- margin: "0px"
21901
- }
21902
- }), container({
21903
- id: "cards",
21904
- css: {
21905
- desktop: {
21906
- display: "grid",
21907
- "grid-template-columns": "repeat(3, minmax(0, 1fr))",
21908
- gap: "16px"
21909
- },
21910
- tablet: { "grid-template-columns": "repeat(2, minmax(0, 1fr))" },
21911
- mobile: { "grid-template-columns": "minmax(0, 1fr)" }
21912
- },
21913
- children: GUIDES.map(guideCard)
21914
- })]
21915
- }),
21916
22669
  container({
21917
22670
  id: "footer",
22671
+ subType: "footer",
21918
22672
  class: [shell$1, footerBand],
21919
- children: [text("Made with Plitzi", { css: {
21920
- color: "var(--muted)",
21921
- "font-size": "13px"
21922
- } }), link({
21923
- id: "footer-docs",
21924
- href: DOCS,
21925
- mode: "external",
21926
- target: "blank",
21927
- class: navLink,
21928
- children: [text("plitzi.com/docs")]
22673
+ children: [container({
22674
+ class: footerRow,
22675
+ children: [text({
22676
+ content: "Made with Plitzi",
22677
+ css: {
22678
+ color: "var(--muted)",
22679
+ "font-size": "13px"
22680
+ }
22681
+ }), link({
22682
+ id: "footer-docs",
22683
+ href: DOCS,
22684
+ mode: "external",
22685
+ target: "blank",
22686
+ class: navLink,
22687
+ content: "plitzi.com/docs"
22688
+ })]
21929
22689
  })]
21930
22690
  })
21931
22691
  ]
@@ -21933,7 +22693,7 @@ var space = {
21933
22693
  };
21934
22694
  //#endregion
21935
22695
  //#region src/spaces/blank/spec.ts?raw
21936
- var spec_default$1 = "import { container, fontAwesome, heading, image, link, paragraph, text, themeToggle } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared.\n *\n * This is the whole site: a tree, some CSS and a palette. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written here, so authoring it twice writes byte-identical\n * documents and there is no generated file to keep in step.\n *\n * It starts as the space Plitzi gives a new account, and it is yours: rename things, change the palette, delete the\n * guides. The guides are one function mapped over one list, which is not a saving of keystrokes — change `guideCard`\n * 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/** Where the documentation lives. Every link on the page starts here, so moving the docs is one line. */\nconst DOCS = 'https://plitzi.com/docs';\n\n// ── Classes ────────────────────────────────────────────────────────────────────────────────────────────────────\n// Declared once and named by the elements that wear them, so re-theming a card re-themes every card.\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.\nconst 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 everything, pinned to the viewport.\n *\n * Two gradients rather than an image: it scales to any screen, costs no request, and follows the theme — the line\n * colour is a variable, so it is faint on light and faint on dark without a second asset.\n */\nconst backdrop = styles('backdrop', {\n inset: '0%',\n position: 'fixed',\n 'background-image':\n 'linear-gradient(0deg, var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px)',\n 'background-size': '48px 48px, 48px 48px',\n 'background-position': '0% 0%, 0% 0%',\n 'background-repeat': 'repeat, repeat',\n 'background-attachment': 'scroll, scroll',\n 'background-clip': 'border-box, border-box'\n});\n\nconst 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 theme switch, dressed like the rest of the bar: a browser draws a bare button grey and square. */\nconst iconButton = styles('icon-button', {\n css: {\n display: 'flex',\n 'align-items': 'center',\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 cursor: 'pointer'\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. */\nconst 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/** One guide: the whole card is the link, so the target is as large as what it describes. */\nconst card = styles('guide-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\nconst cardHead = styles('guide-head', { display: 'flex', 'align-items': 'center', gap: '8px' });\n\n/** The arrow slides while the card around it is hovered. */\nconst cardArrow = styles('guide-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]`. */\nconst tile = styles('tile', {\n display: 'flex',\n 'align-items': 'center',\n 'justify-content': 'center',\n width: '40px',\n height: '40px',\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. */\nconst 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/** Each band of the page wears `shell` for its width, and one of these for what is its own. */\nconst 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\nconst heroBand = styles('hero', {\n css: {\n desktop: { 'align-items': 'center', gap: '24px', 'padding-top': '96px', 'padding-bottom': '80px' },\n tablet: { 'padding-top': '64px', 'padding-bottom': '56px' },\n mobile: { 'padding-top': '48px', 'padding-bottom': '40px' }\n }\n});\n\nconst guidesBand = styles('guides', { gap: '20px', 'padding-bottom': '80px' });\n\nconst footerBand = styles('footer', {\n css: {\n desktop: {\n 'flex-direction': 'row',\n 'align-items': 'center',\n 'justify-content': 'space-between',\n 'margin-top': 'auto',\n 'padding-top': '24px',\n 'padding-bottom': '32px',\n 'border-top': '1px solid var(--border)'\n },\n mobile: { 'flex-direction': 'column', gap: '8px' }\n }\n});\n\n// ── Content ────────────────────────────────────────────────────────────────────────────────────────────────────\n\ntype Guide = { id: string; title: string; body: string; path: string; icon: string; tone: keyof typeof tones };\n\n/** Where to go next, as data: the grid below is this list, mapped. Each one is a page of the docs. */\nconst GUIDES: Guide[] = [\n {\n id: 'concepts',\n title: 'Core concepts',\n body: 'Spaces, pages and elements, the two documents behind them, 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: 'Write this page as TypeScript: 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: 'Shared classes, states, breakpoints, and a palette that follows 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 and bind what comes back to any element on the page.',\n path: 'data',\n icon: 'fas fa-database',\n tone: 'emerald'\n },\n {\n id: 'interactions',\n title: 'Interactions and flows',\n body: 'Clicks, forms and page loads wired to steps — no client code to write.',\n path: 'interactions',\n icon: 'fas fa-bolt',\n tone: 'amber'\n },\n {\n id: 'agents',\n title: 'Agents and MCP',\n body: 'Let an AI agent read and edit this space through the same rules you do.',\n path: 'agents',\n icon: 'fas fa-robot',\n tone: 'blue'\n }\n];\n\nconst guideCard = (guide: Guide): ElementSpec =>\n link({\n id: guide.id,\n href: `${DOCS}/${guide.path}`,\n mode: 'external',\n target: 'blank',\n class: card,\n children: [\n container({\n class: cardHead,\n children: [\n container({ class: [tile, tones[guide.tone]], children: [fontAwesome({ icon: guide.icon })] }),\n fontAwesome({ icon: 'fas fa-arrow-right', class: cardArrow })\n ]\n }),\n heading({\n id: `${guide.id}-title`,\n content: guide.title,\n subType: 'h3',\n css: { 'font-size': '17px', 'font-weight': '600', margin: '4px 0px 0px' }\n }),\n paragraph({\n content: guide.body,\n css: {\n color: 'var(--muted)',\n 'font-size': '14px',\n 'line-height': '1.6',\n margin: '0px'\n }\n })\n ]\n });\n\n// ── The page ───────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst topBar = container({\n id: 'top-bar',\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({\n src: 'https://cdn.plitzi.com/resources/img/favicon.svg',\n decorative: true,\n css: { width: '24px', height: '24px' }\n }),\n text('Plitzi', { css: { color: 'var(--foreground)', 'font-size': '16px', 'font-weight': '700' } })\n ]\n }),\n container({\n id: 'top-actions',\n css: { display: 'flex', 'align-items': 'center', gap: '8px' },\n children: [\n link({\n id: 'top-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: navLink,\n children: [text('Docs')]\n }),\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('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. Change it in the builder, in code, or by asking an agent — ' +\n 'and when you want to know how something works, the guides below go straight to it.',\n css: {\n desktop: {\n color: 'var(--muted)',\n 'font-size': '18px',\n 'line-height': '1.6',\n 'text-align': 'center',\n 'max-width': '620px',\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-docs',\n href: DOCS,\n mode: 'external',\n target: 'blank',\n class: button,\n variant: 'primary',\n children: [text('Read the docs'), fontAwesome({ icon: 'fas fa-arrow-right' })]\n }),\n link({\n id: 'cta-quickstart',\n href: `${DOCS}/quickstart`,\n mode: 'external',\n target: 'blank',\n class: button,\n children: [fontAwesome({ icon: 'fas fa-terminal' }), text('Quickstart')]\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 /**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. Nothing above names a colour directly — they are all\n * `var(--…)` — so switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\n variables: {\n color: {\n 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 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: '#0000000a', dark: '#ffffff0a', default: '#0000000a' },\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 }\n },\n /** Loaded by the page itself: a face the space names here is the only one it ever fetches. */\n 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 /**\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 }),\n topBar,\n container({\n id: 'hero',\n class: [shell, heroBand],\n children: [heroEyebrow, heroTitle, heroLede, heroActions]\n }),\n container({\n id: 'guides',\n class: [shell, guidesBand],\n children: [\n heading({\n id: 'guides-title',\n content: 'Where to go next',\n subType: 'h2',\n css: {\n 'font-size': '14px',\n 'font-weight': '600',\n color: 'var(--muted)',\n margin: '0px'\n }\n }),\n container({\n id: 'cards',\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 children: GUIDES.map(guideCard)\n })\n ]\n }),\n container({\n id: 'footer',\n class: [shell, footerBand],\n children: [\n text('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 children: [text('plitzi.com/docs')]\n })\n ]\n })\n ]\n }\n ]\n};\n";
22696
+ var spec_default$1 = "import { container, fontAwesome, heading, image, link, paragraph, text, themeToggle } from '../../elements';\nimport { styles } from '../../style';\n\nimport type { ElementSpec, SpaceSpec } from '../../schema';\n\n/**\n * The space, declared.\n *\n * This is the whole site: a tree, some CSS and a palette. Everything else — element ids, style selector names, the\n * back-references between them — is derived from what is written here, so authoring it twice writes byte-identical\n * documents and there is no generated file to keep in step.\n *\n * It starts as the space Plitzi gives a new account, and it is yours: rename things, change the palette, delete 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/** Where the documentation lives. Every link on the page starts here, so moving the docs is one line. */\nconst DOCS = 'https://plitzi.com/docs';\n\n// ── Classes ────────────────────────────────────────────────────────────────────────────────────────────────────\n// Declared once and named by the elements that wear them, so re-theming a card re-themes every card.\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.\nconst 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 */\nconst 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\nconst 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. */\nconst brandMark = styles('brand-mark', { width: '24px', height: '24px' });\n\n/** The theme switch, dressed like the rest of the bar: a browser draws a bare button grey and square. */\nconst iconButton = styles('icon-button', {\n css: {\n display: 'flex',\n 'align-items': 'center',\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 cursor: 'pointer'\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. */\nconst 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. */\nconst 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\nconst 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\nconst 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. */\nconst 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. */\nconst 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\nconst cardHead = styles('card-head', { display: 'flex', 'align-items': 'center', gap: '10px' });\n\nconst 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. */\nconst 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]`. */\nconst 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. */\nconst 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. */\nconst 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. */\nconst 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. */\nconst guide = styles('guide', { 'flex-direction': 'row', 'align-items': 'flex-start', gap: '16px', padding: '20px' });\n\nconst guideCopy = styles('guide-copy', { display: 'flex', 'flex-direction': 'column', gap: '4px', 'min-width': '0px' });\n\n/** Each band of the page wears `shell` for its width, and one of these for what is its own. */\nconst 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\nconst 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. */\nconst 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. */\nconst 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. */\nconst footerBand = styles('footer', {\n css: {\n desktop: { 'margin-top': 'auto', 'padding-bottom': '32px' },\n mobile: { 'padding-bottom': '24px' }\n }\n});\n\nconst 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// ── Content ────────────────────────────────────────────────────────────────────────────────────────────────────\n\ntype Path = { id: string; title: string; body: string; path: string; icon: string; tone: keyof typeof tones };\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 */\nconst 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. */\nconst 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\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 /**\n * Every colour the page uses, per scheme.\n *\n * `default` is what a browser with no preference gets. Nothing above names a colour directly — they are all\n * `var(--…)` — so switching the palette here re-themes the whole page, in both schemes, without touching a rule.\n */\n variables: {\n color: {\n 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 /** Loaded by the page itself: a face the space names here is the only one it ever fetches. */\n 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 /**\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";
21937
22697
  var space$1 = {
21938
22698
  name: "Empty space",
21939
22699
  permanentUrl: "empty-space",
@@ -22261,6 +23021,65 @@ var catalogTemplateFiles = ({ name } = {}) => {
22261
23021
  return Object.fromEntries(Object.entries(files).map(([path, source]) => [path, source.replace(/^\/\* eslint-disable quotes[^\n]*\*\/\n/, "")]));
22262
23022
  };
22263
23023
  //#endregion
23024
+ //#region src/testing/dataIssues.ts
23025
+ var PROVIDER = "apiContainer_";
23026
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
23027
+ /** Whether a provider has answered and what it answered can be read: not on its way, and not failed. */
23028
+ var failureOf = (answer) => {
23029
+ if (answer.hasError === true) return typeof answer.errorMessage === "string" && answer.errorMessage ? answer.errorMessage : "it could not be reached";
23030
+ return typeof answer.status === "number" && answer.status >= 400 ? `it answered ${String(answer.status)}` : void 0;
23031
+ };
23032
+ /** The elements a page renders: its own, and those of every shell it is rendered inside. */
23033
+ var pageElements = (schema, pageId) => {
23034
+ const page = Object.hasOwn(schema.flat, pageId) ? schema.flat[pageId] : void 0;
23035
+ const text = (value) => typeof value === "string" ? value : "";
23036
+ const shells = page ? t$9((id) => Object.hasOwn(schema.flat, id) ? schema.flat[id] : void 0, text(page.attributes.layout), text(page.attributes.layoutContainer)).map((link) => link.layout) : [];
23037
+ const roots = /* @__PURE__ */ new Set([pageId, ...shells]);
23038
+ return Object.values(schema.flat).filter((element) => roots.has(element.definition.rootId));
23039
+ };
23040
+ var named$1 = (element) => `${element.definition.type} "${element.id}"`;
23041
+ /**
23042
+ * Every binding of the page onto a provider that has answered, read against that answer: a path that stops before its
23043
+ * last step — or a list's rows that are not there — is an issue that says where it stopped and what was there; a
23044
+ * provider that failed is one too. A provider still on
23045
+ * its way, or not on this page, is passed over — its answer is not in yet, or not this page's to judge.
23046
+ */
23047
+ var dataIssues = (schema, pageId, sources) => {
23048
+ const issues = [];
23049
+ const lists = {};
23050
+ const failed = /* @__PURE__ */ new Set();
23051
+ for (const element of pageElements(schema, pageId)) for (const binding of Object.values(element.definition.bindings ?? {}).flat()) {
23052
+ if (binding.enabled === false || !binding.source.startsWith(PROVIDER)) continue;
23053
+ const [provider, ...path] = pathSteps(binding.source);
23054
+ const answer = sources[provider];
23055
+ if (!isRecord(answer) || answer.isLoading === true) continue;
23056
+ const failure = failureOf(answer);
23057
+ if (failure) {
23058
+ if (!failed.has(provider)) {
23059
+ failed.add(provider);
23060
+ issues.push({
23061
+ code: "provider-failed",
23062
+ message: `${provider} failed — ${failure} — so everything bound to it is empty`,
23063
+ elementId: provider.slice(13)
23064
+ });
23065
+ }
23066
+ continue;
23067
+ }
23068
+ const reached = followPath(answer, path);
23069
+ const items = element.definition.type === "list" && binding.to === "items";
23070
+ if (items) lists[element.id] = reached.found && Array.isArray(reached.value) ? reached.value.length : null;
23071
+ if (!reached.found && isWrongPath(reached, path.length, items)) issues.push({
23072
+ code: "binding-reads-nothing",
23073
+ message: `${named$1(element)} reads ${binding.source} for its ${binding.to}, and the answer has no such path — ${stoppedAt(provider, reached)}`,
23074
+ elementId: element.id
23075
+ });
23076
+ }
23077
+ return {
23078
+ issues,
23079
+ lists
23080
+ };
23081
+ };
23082
+ //#endregion
22264
23083
  //#region src/testing/devTools.ts
22265
23084
  /** Runs in the page. Self-contained — it is serialised — and it trusts nothing it reads off `window`. */
22266
23085
  var readDevToolsInPage = ({ state, element }) => {
@@ -22429,9 +23248,11 @@ function probePage(input) {
22429
23248
  * An image element that failed draws a fallback that loads fine, so the browser alone would call it loaded: it says
22430
23249
  * which source failed in `data-plitzi-failed`. Any other `img` is asked the browser's way — except a lazy one out of
22431
23250
  * sight (below the fold, or beside it in a carousel's track), which has not been asked for yet: it working, not
22432
- * failing.
23251
+ * failing. An image nobody can see — hidden itself or under something hidden (`visible: false`) — is not asked at
23252
+ * all: a browser may never fetch it, and it is not on the page as far as a visitor can tell.
22433
23253
  */
22434
23254
  const brokenImages = input.images ? [...document.querySelectorAll("img")].flatMap((image) => {
23255
+ if (hiderOf(image)) return [];
22435
23256
  const failed = image.getAttribute("data-plitzi-failed");
22436
23257
  const elementId = elementIdOf(image);
22437
23258
  const at = elementId === void 0 ? {} : { elementId };
@@ -22654,9 +23475,199 @@ var inspectPage = async (driver, handles, options = {}) => {
22654
23475
  */
22655
23476
  var inspectDocument = async (driver, options = {}) => inspect(driver, "document", [], options);
22656
23477
  //#endregion
23478
+ //#region src/testing/images.ts
23479
+ /**
23480
+ * Runs in the page: every picture fetched and decoded before a picture of the whole page is taken. Self-contained — it
23481
+ * is serialised.
23482
+ *
23483
+ * A picture of the page is taken without scrolling, and a lazy image is fetched only once it is near the screen: below
23484
+ * the fold it is a hole, and a comparison counts the hole. So the page's scroller is walked down once — a loader of a
23485
+ * site's own (one that swaps `data-src` from an `IntersectionObserver`) and an arrival waiting to be seen react to the
23486
+ * scroll, not to an attribute — and back up; then `loading="lazy"` is made eager and the pictures are awaited, in
23487
+ * rounds while loading one turns up another (a blurred placeholder swapped for its picture), for `budgetMs` at most.
23488
+ */
23489
+ var loadImages = async (budgetMs) => {
23490
+ const deadline = Date.now() + budgetMs;
23491
+ const left = () => Math.max(0, deadline - Date.now());
23492
+ const capped = (promise) => Promise.race([promise, new Promise((resolve) => setTimeout(resolve, left()))]);
23493
+ const frame = () => Promise.race([new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve))), new Promise((resolve) => setTimeout(resolve, 100))]);
23494
+ const scroller = Array.from(document.querySelectorAll("*")).filter((element) => element.scrollHeight > element.clientHeight + 1 && element.clientHeight > 0).sort((a, b) => b.scrollHeight - a.scrollHeight).at(0) ?? document.scrollingElement;
23495
+ if (scroller) {
23496
+ const step = Math.max(scroller.clientHeight * .9, 200);
23497
+ for (let top = step; top < scroller.scrollHeight && left() > 0; top += step) {
23498
+ scroller.scrollTop = top;
23499
+ await frame();
23500
+ }
23501
+ scroller.scrollTop = 0;
23502
+ await frame();
23503
+ }
23504
+ for (let round = 0; round < 4 && left() > 0; round += 1) {
23505
+ const pending = Array.from(document.images).filter((image) => {
23506
+ if (image.loading === "lazy") image.loading = "eager";
23507
+ return !image.complete;
23508
+ });
23509
+ if (round > 0 && pending.length === 0) break;
23510
+ await capped(Promise.all(pending.map((image) => image.decode().catch(() => void 0))));
23511
+ await frame();
23512
+ }
23513
+ const images = Array.from(document.images);
23514
+ return {
23515
+ images: images.length,
23516
+ missing: images.filter((image) => !image.complete || image.naturalWidth === 0).length
23517
+ };
23518
+ };
23519
+ /**
23520
+ * Runs in the page: the document made as tall as what it holds, so a picture of the whole page is the whole page.
23521
+ * Self-contained — it is serialised.
23522
+ *
23523
+ * The SDK renders into `.plitzi-sdk` with a column of its own that scrolls, so the document never does and a driver's
23524
+ * full-page picture has nothing to extend: it is one screen. The column that scrolls, and every element up to `<html>`,
23525
+ * stops clipping and stops being held to a height. The viewport is left as it is on purpose: grown to the content, every
23526
+ * `vh` would mean that height and a `100vh` hero would be thousands of pixels tall. Answers the document's height.
23527
+ */
23528
+ var unrollPage = () => {
23529
+ const scroller = Array.from(document.querySelectorAll("*")).filter((element) => element.scrollHeight > element.clientHeight + 1 && element.clientHeight > 0).sort((a, b) => b.scrollHeight - a.scrollHeight).at(0);
23530
+ for (let element = scroller ?? null; element; element = element.parentElement) {
23531
+ element.style.setProperty("overflow", "visible", "important");
23532
+ element.style.setProperty("height", "auto", "important");
23533
+ element.style.setProperty("max-height", "none", "important");
23534
+ }
23535
+ return Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
23536
+ };
23537
+ //#endregion
22657
23538
  //#region src/testing/pictures.ts
23539
+ /** How many bands a row is read in: enough to tell a heading from a paragraph, few enough to compare fast. */
23540
+ var PROFILE_COLUMNS = 16;
23541
+ /** Runs in the page: both pictures read as row profiles, which is what aligning them needs. Self-contained. */
23542
+ var profilePictures = async ({ a, b, columns }) => {
23543
+ const profileOf = async (source) => {
23544
+ const image = await new Promise((resolve, reject) => {
23545
+ const loaded = new Image();
23546
+ loaded.onload = () => resolve(loaded);
23547
+ loaded.onerror = () => reject(/* @__PURE__ */ new Error("a picture could not be decoded"));
23548
+ loaded.src = source;
23549
+ });
23550
+ const canvas = document.createElement("canvas");
23551
+ canvas.width = image.width;
23552
+ canvas.height = image.height;
23553
+ const context = canvas.getContext("2d");
23554
+ if (!context) throw new Error("no 2D canvas in this page");
23555
+ context.drawImage(image, 0, 0);
23556
+ const pixels = context.getImageData(0, 0, image.width, image.height).data;
23557
+ const rows = [];
23558
+ for (let y = 0; y < image.height; y += 1) for (let band = 0; band < columns; band += 1) {
23559
+ const from = Math.floor(band * image.width / columns);
23560
+ const to = Math.max(from + 1, Math.floor((band + 1) * image.width / columns));
23561
+ const sum = [
23562
+ 0,
23563
+ 0,
23564
+ 0
23565
+ ];
23566
+ for (let x = from; x < to; x += 1) {
23567
+ const at = (y * image.width + x) * 4;
23568
+ sum[0] += pixels[at];
23569
+ sum[1] += pixels[at + 1];
23570
+ sum[2] += pixels[at + 2];
23571
+ }
23572
+ rows.push(...sum.map((channel) => Math.round(channel / (to - from))));
23573
+ }
23574
+ return {
23575
+ width: image.width,
23576
+ height: image.height,
23577
+ columns,
23578
+ rows
23579
+ };
23580
+ };
23581
+ return {
23582
+ a: await profileOf(a),
23583
+ b: await profileOf(b)
23584
+ };
23585
+ };
23586
+ /** How much two rows differ: the mean distance of their bands, 0–255. */
23587
+ var rowDistance = (a, rowA, b, rowB) => {
23588
+ const values = a.columns * 3;
23589
+ let sum = 0;
23590
+ for (let index = 0; index < values; index += 1) sum += Math.abs(a.rows[rowA * values + index] - b.rows[rowB * values + index]);
23591
+ return sum / values;
23592
+ };
23593
+ /** Two placements that differ by less than this are the same match: a blank band fits anywhere, and stays put. */
23594
+ var SAME_FIT = 1;
23595
+ /** The fewest rows a region is compared by: a band of a page is not told by one row. */
23596
+ var SAMPLED_ROWS = 96;
23597
+ /**
23598
+ * Where a region of `a` sits in `b`: the shift whose rows fit best. Among shifts that fit as well, the one nearest the
23599
+ * section before it — a blank band fits anywhere, and the page is likelier to have moved as a block.
23600
+ */
23601
+ var shiftOf = (a, b, top, bottom, near, reach) => {
23602
+ const stride = Math.max(1, Math.floor((bottom - top) / SAMPLED_ROWS));
23603
+ const sampled = [];
23604
+ for (let row = top; row < bottom; row += stride) sampled.push(row);
23605
+ const lowest = 0 - Math.min(top, reach);
23606
+ const highest = Math.min(b.height - bottom, reach);
23607
+ const fits = [];
23608
+ for (let shift = lowest; shift <= highest; shift += 1) {
23609
+ let cost = 0;
23610
+ for (const row of sampled) cost += rowDistance(a, row, b, row + shift);
23611
+ fits.push({
23612
+ shift,
23613
+ cost: cost / sampled.length
23614
+ });
23615
+ }
23616
+ if (fits.length === 0) return 0;
23617
+ const best = Math.min(...fits.map((fit) => fit.cost));
23618
+ return fits.filter((fit) => fit.cost <= best + SAME_FIT).reduce((nearest, fit) => Math.abs(fit.shift - near) < Math.abs(nearest.shift - near) ? fit : nearest).shift;
23619
+ };
23620
+ /** A shift within this is the same place: a pixel or two is rounding, not a page that moved. */
23621
+ var DRIFT_PX = 2;
23622
+ /**
23623
+ * Where each region of one picture sits in the other, from their row profiles — so two pages of different heights are
23624
+ * compared section by section, not row for row: one section 400 px taller pushes everything under it down, and compared
23625
+ * row for row every one of them would differ. Regions are placed from the top down; a row no region holds keeps the
23626
+ * shift of the row above it.
23627
+ */
23628
+ var alignPictures = (a, b, regions) => {
23629
+ const reach = Math.max(Math.abs(b.height - a.height) + 240, Math.round(Math.min(a.height, b.height) / 2));
23630
+ const shifts = regions.map(() => 0);
23631
+ const topDown = regions.map((region, index) => ({
23632
+ region,
23633
+ index
23634
+ })).sort((one, two) => Math.round(one.region.y) - Math.round(two.region.y) || one.region.width * one.region.height - two.region.width * two.region.height);
23635
+ let near = 0;
23636
+ for (const { region, index } of topDown) {
23637
+ const top = Math.max(0, Math.floor(region.y));
23638
+ const bottom = Math.min(a.height, Math.ceil(region.y + region.height));
23639
+ if (bottom <= top) continue;
23640
+ const shift = shiftOf(a, b, top, bottom, near, reach);
23641
+ shifts[index] = shift;
23642
+ near = shift;
23643
+ }
23644
+ const inside = (inner, outer) => inner !== outer && inner.y >= outer.y && inner.x >= outer.x && inner.y + inner.height <= outer.y + outer.height && inner.x + inner.width <= outer.x + outer.width;
23645
+ const moved = topDown.find(({ region, index }) => Math.abs(shifts[index]) > DRIFT_PX && !regions.some((other) => inside(other, region)));
23646
+ const drift = moved ? {
23647
+ name: moved.region.name,
23648
+ shift: shifts[moved.index]
23649
+ } : void 0;
23650
+ const rowShift = new Array(a.height).fill(void 0);
23651
+ const bySize = regions.map((region, index) => ({
23652
+ region,
23653
+ shift: shifts[index]
23654
+ })).sort((one, two) => two.region.width * two.region.height - one.region.width * one.region.height);
23655
+ for (const { region, shift } of bySize) {
23656
+ const bottom = Math.min(a.height, Math.ceil(region.y + region.height));
23657
+ for (let row = Math.max(0, Math.floor(region.y)); row < bottom; row += 1) rowShift[row] = shift;
23658
+ }
23659
+ let carried = 0;
23660
+ return {
23661
+ shifts,
23662
+ rowShift: rowShift.map((shift) => {
23663
+ carried = shift ?? carried;
23664
+ return carried;
23665
+ }),
23666
+ ...drift ? { drift } : {}
23667
+ };
23668
+ };
22658
23669
  /** Runs in the page: both pictures decoded on canvases, compared pixel by pixel. Self-contained — it is serialised. */
22659
- var diffPictures = async ({ a, b, regions, tolerance }) => {
23670
+ var diffPictures = async ({ a, b, regions, tolerance, rowShift }) => {
22660
23671
  const load = (source) => new Promise((resolve, reject) => {
22661
23672
  const image = new Image();
22662
23673
  image.onload = () => resolve(image);
@@ -22665,18 +23676,19 @@ var diffPictures = async ({ a, b, regions, tolerance }) => {
22665
23676
  });
22666
23677
  const [first, second] = await Promise.all([load(a), load(b)]);
22667
23678
  const width = Math.max(first.width, second.width);
22668
- const height = Math.max(first.height, second.height);
22669
- const pixelsOf = (image) => {
23679
+ const height = rowShift ? first.height : Math.max(first.height, second.height);
23680
+ const pixelsOf = (image, rows) => {
22670
23681
  const canvas = document.createElement("canvas");
22671
23682
  canvas.width = width;
22672
- canvas.height = height;
23683
+ canvas.height = rows;
22673
23684
  const context = canvas.getContext("2d");
22674
23685
  if (!context) throw new Error("no 2D canvas in this page");
22675
23686
  context.drawImage(image, 0, 0);
22676
- return context.getImageData(0, 0, width, height).data;
23687
+ return context.getImageData(0, 0, width, rows).data;
22677
23688
  };
22678
- const one = pixelsOf(first);
22679
- const two = pixelsOf(second);
23689
+ const otherHeight = rowShift ? second.height : height;
23690
+ const one = pixelsOf(first, height);
23691
+ const two = pixelsOf(second, otherHeight);
22680
23692
  const diffCanvas = document.createElement("canvas");
22681
23693
  diffCanvas.width = width;
22682
23694
  diffCanvas.height = height;
@@ -22685,16 +23697,20 @@ var diffPictures = async ({ a, b, regions, tolerance }) => {
22685
23697
  const out = diffContext.createImageData(width, height);
22686
23698
  const differs = new Uint8Array(width * height);
22687
23699
  let changed = 0;
22688
- for (let pixel = 0; pixel < width * height; pixel += 1) {
22689
- const at = pixel * 4;
22690
- const moved = Math.abs(one[at] - two[at]) > tolerance || Math.abs(one[at + 1] - two[at + 1]) > tolerance || Math.abs(one[at + 2] - two[at + 2]) > tolerance || Math.abs(one[at + 3] - two[at + 3]) > tolerance;
22691
- differs[pixel] = moved ? 1 : 0;
22692
- changed += moved ? 1 : 0;
22693
- const grey = Math.round((one[at] + one[at + 1] + one[at + 2]) / 3);
22694
- out.data[at] = moved ? 255 : grey;
22695
- out.data[at + 1] = moved ? 0 : grey;
22696
- out.data[at + 2] = moved ? 0 : grey;
22697
- out.data[at + 3] = moved ? 255 : 60;
23700
+ for (let y = 0; y < height; y += 1) {
23701
+ const otherRow = y + (rowShift?.[y] ?? 0);
23702
+ for (let x = 0; x < width; x += 1) {
23703
+ const at = (y * width + x) * 4;
23704
+ const there = (otherRow * width + x) * 4;
23705
+ const moved = otherRow < 0 || otherRow >= otherHeight || Math.abs(one[at] - two[there]) > tolerance || Math.abs(one[at + 1] - two[there + 1]) > tolerance || Math.abs(one[at + 2] - two[there + 2]) > tolerance || Math.abs(one[at + 3] - two[there + 3]) > tolerance;
23706
+ differs[y * width + x] = moved ? 1 : 0;
23707
+ changed += moved ? 1 : 0;
23708
+ const grey = Math.round((one[at] + one[at + 1] + one[at + 2]) / 3);
23709
+ out.data[at] = moved ? 255 : grey;
23710
+ out.data[at + 1] = moved ? 0 : grey;
23711
+ out.data[at + 2] = moved ? 0 : grey;
23712
+ out.data[at + 3] = moved ? 255 : 60;
23713
+ }
22698
23714
  }
22699
23715
  diffContext.putImageData(out, 0, 0);
22700
23716
  const share = (count, of) => of === 0 ? 0 : Math.round(count / of * 1e3) / 10;
@@ -22712,7 +23728,7 @@ var diffPictures = async ({ a, b, regions, tolerance }) => {
22712
23728
  });
22713
23729
  const pair = document.createElement("canvas");
22714
23730
  pair.width = width * 2;
22715
- pair.height = height;
23731
+ pair.height = Math.max(first.height, second.height);
22716
23732
  const pairContext = pair.getContext("2d");
22717
23733
  if (!pairContext) throw new Error("no 2D canvas in this page");
22718
23734
  pairContext.drawImage(first, 0, 0);
@@ -22723,7 +23739,11 @@ var diffPictures = async ({ a, b, regions, tolerance }) => {
22723
23739
  changed: share(changed, width * height),
22724
23740
  regions: regionChange,
22725
23741
  sideBySide: pair.toDataURL("image/png"),
22726
- diff: diffCanvas.toDataURL("image/png")
23742
+ diff: diffCanvas.toDataURL("image/png"),
23743
+ heights: {
23744
+ a: first.height,
23745
+ b: second.height
23746
+ }
22727
23747
  };
22728
23748
  };
22729
23749
  /**
@@ -22751,12 +23771,160 @@ var pageRegions = () => {
22751
23771
  return named.filter((element) => element !== page && element.parentElement?.closest("[data-plitzi-el]") === page).flatMap(regionOf);
22752
23772
  };
22753
23773
  /** Two pictures compared in a page the driver holds — any page will do, nothing of it is read. */
22754
- var comparePictures = (driver, a, b, regions = [], tolerance = 32) => driver.evaluate(diffPictures, {
22755
- a,
22756
- b,
22757
- regions,
22758
- tolerance
22759
- });
23774
+ var comparePictures = async (driver, a, b, { regions = [], tolerance = 32, align = false } = {}) => {
23775
+ if (!align) return driver.evaluate(diffPictures, {
23776
+ a,
23777
+ b,
23778
+ regions,
23779
+ tolerance
23780
+ });
23781
+ const profiles = await driver.evaluate(profilePictures, {
23782
+ a,
23783
+ b,
23784
+ columns: PROFILE_COLUMNS
23785
+ });
23786
+ const { shifts, rowShift, drift } = alignPictures(profiles.a, profiles.b, regions);
23787
+ const diff = await driver.evaluate(diffPictures, {
23788
+ a,
23789
+ b,
23790
+ regions,
23791
+ tolerance,
23792
+ rowShift
23793
+ });
23794
+ return {
23795
+ ...diff,
23796
+ regions: diff.regions.map((region, index) => ({
23797
+ ...region,
23798
+ shift: shifts[index]
23799
+ })),
23800
+ rowShift,
23801
+ ...drift ? { driftFrom: drift } : {}
23802
+ };
23803
+ };
23804
+ //#endregion
23805
+ //#region src/testing/texts.ts
23806
+ /**
23807
+ * Runs in the page: every element that holds words of its own and is drawn, with what decides how they look. Skips the
23808
+ * dev tools' own chrome, and what a visitor cannot see. Self-contained — it is serialised.
23809
+ */
23810
+ var pageTexts = (limit) => {
23811
+ const texts = [];
23812
+ const seen = /* @__PURE__ */ new Set();
23813
+ const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
23814
+ for (let node = walker.nextNode(); node && texts.length < limit; node = walker.nextNode()) {
23815
+ const element = node.parentElement;
23816
+ if (!element || seen.has(element) || !node.textContent?.trim()) continue;
23817
+ seen.add(element);
23818
+ if (element.closest("script, style, noscript, template, [data-plitzi-devtools]")) continue;
23819
+ const box = element.getBoundingClientRect();
23820
+ const style = getComputedStyle(element);
23821
+ if (box.width === 0 || box.height === 0 || style.visibility === "hidden" || Number(style.opacity) === 0) continue;
23822
+ const text = element.textContent.replace(/\s+/g, " ").trim().slice(0, 120);
23823
+ texts.push({
23824
+ text,
23825
+ tag: element.tagName.toLowerCase(),
23826
+ x: Math.round(box.left + window.scrollX),
23827
+ y: Math.round(box.top + window.scrollY),
23828
+ width: Math.round(box.width),
23829
+ height: Math.round(box.height),
23830
+ fontSize: Number.parseFloat(style.fontSize),
23831
+ fontWeight: style.fontWeight,
23832
+ lineHeight: style.lineHeight,
23833
+ letterSpacing: style.letterSpacing,
23834
+ fontFamily: (style.fontFamily.split(",")[0] ?? "").replace(/["']/g, "").trim().toLowerCase(),
23835
+ color: style.color,
23836
+ background: style.backgroundColor,
23837
+ padding: style.padding,
23838
+ radius: style.borderRadius
23839
+ });
23840
+ }
23841
+ return texts;
23842
+ };
23843
+ /** How many texts a page is read for: enough for a long page, few enough to stay quick. */
23844
+ var PAGE_TEXT_LIMIT = 2e3;
23845
+ /** Below these, two measures are the same: half a pixel of type is rounding, a few pixels of box is a border. */
23846
+ var TYPE_PX = .5;
23847
+ var BOX_PX = 4;
23848
+ var px = (value) => `${String(Math.round(value * 10) / 10)}px`;
23849
+ var signed = (value) => `${value > 0 ? "+" : ""}${String(Math.round(value))}px`;
23850
+ var MEASURE = /^(-?[\d.]+)([a-z%]*)$/;
23851
+ /**
23852
+ * Two values of a property as the browser computed them. One measure in one unit each (`24px`, `0.5px`) compares by
23853
+ * the half pixel; anything else — `normal`, a colour, `8px 16px` — as written.
23854
+ */
23855
+ var changed = (a, b) => {
23856
+ const [one, two] = [MEASURE.exec(a), MEASURE.exec(b)];
23857
+ if (!one || !two || one[2] !== two[2]) return a !== b;
23858
+ return Math.abs(Number(one[1]) - Number(two[1])) >= TYPE_PX;
23859
+ };
23860
+ /**
23861
+ * What a text does differently on the second page. A position is said after taking off how far the whole section around
23862
+ * it moved (`shiftAt`, from `alignPictures`): a page 400 px longer above it is not a heading out of place.
23863
+ */
23864
+ var differencesOf = (here, there, shiftAt) => {
23865
+ const differences = [];
23866
+ if (Math.abs(here.fontSize - there.fontSize) >= TYPE_PX) differences.push(`font-size ${px(here.fontSize)} → ${px(there.fontSize)}`);
23867
+ for (const [name, key] of [
23868
+ ["font-weight", "fontWeight"],
23869
+ ["line-height", "lineHeight"],
23870
+ ["letter-spacing", "letterSpacing"],
23871
+ ["font-family", "fontFamily"],
23872
+ ["color", "color"],
23873
+ ["background", "background"],
23874
+ ["padding", "padding"],
23875
+ ["border-radius", "radius"]
23876
+ ]) {
23877
+ const [a, b] = [String(here[key]), String(there[key])];
23878
+ if (changed(a, b)) differences.push(`${name} ${a} → ${b}`);
23879
+ }
23880
+ for (const [name, a, b] of [[
23881
+ "width",
23882
+ here.width,
23883
+ there.width
23884
+ ], [
23885
+ "height",
23886
+ here.height,
23887
+ there.height
23888
+ ]]) if (Math.abs(a - b) >= BOX_PX) differences.push(`${name} ${px(a)} → ${px(b)}`);
23889
+ const across = there.x - here.x;
23890
+ const down = there.y - here.y - shiftAt(here.y);
23891
+ if (Math.abs(across) >= BOX_PX) differences.push(`x ${signed(across)}`);
23892
+ if (Math.abs(down) >= BOX_PX) differences.push(`y ${signed(down)}`);
23893
+ return differences;
23894
+ };
23895
+ /**
23896
+ * The texts of two pages paired by their words — the second "Pricing" with the second "Pricing" — and what each pair
23897
+ * does differently on the second page. `shiftAt` says how far down the second page the rows around a point of the first
23898
+ * are, when the two were aligned; left out, nothing moved.
23899
+ */
23900
+ var compareTexts = (here, there, shiftAt = () => 0) => {
23901
+ const waiting = /* @__PURE__ */ new Map();
23902
+ for (const text of there) waiting.set(text.text, [...waiting.get(text.text) ?? [], text]);
23903
+ const differ = [];
23904
+ const onlyHere = [];
23905
+ let same = 0;
23906
+ for (const text of [...here].sort((one, two) => one.y - two.y)) {
23907
+ const match = waiting.get(text.text)?.shift();
23908
+ if (!match) {
23909
+ onlyHere.push(text.text);
23910
+ continue;
23911
+ }
23912
+ const differences = differencesOf(text, match, shiftAt);
23913
+ if (differences.length === 0) same += 1;
23914
+ else differ.push({
23915
+ tag: text.tag,
23916
+ text: text.text,
23917
+ y: text.y,
23918
+ differences
23919
+ });
23920
+ }
23921
+ return {
23922
+ same,
23923
+ differ,
23924
+ onlyHere,
23925
+ onlyThere: [...waiting.values()].flat().map((text) => text.text)
23926
+ };
23927
+ };
22760
23928
  //#endregion
22761
23929
  //#region src/testing/renders.ts
22762
23930
  var NO_TRACING = "The page has no render tracing (`window.plitziTracing`). It is on only under `debugMode`: render the space with `debugMode` (the harness: `renderSpace(page, space, { debugMode: true })`; a server: authorize it), then ask again.";
@@ -22849,7 +24017,7 @@ var MODIFIER_NAMES = {
22849
24017
  var isMacIn = () => /Mac|iPhone|iPad|iPod/.test(navigator.userAgent);
22850
24018
  /** A shortcut as `onKey` writes it, as the key a driver presses. Refuses anything `onKey` would. */
22851
24019
  var shortcutKey = (shortcut, isMac) => {
22852
- const { combos, problems } = s$9(shortcut, isMac);
24020
+ const { combos, problems } = s$10(shortcut, isMac);
22853
24021
  if (problems.length > 0 || combos.length !== 1) throw new Error(problems.length > 0 ? `Not a shortcut: ${problems.join("; ")}` : `"${shortcut}" is ${combos.length} shortcuts: press one at a time`);
22854
24022
  const [combo] = combos;
22855
24023
  const plus = combo.endsWith("+");
@@ -22969,23 +24137,23 @@ var e$2 = {
22969
24137
  json: "codemirror-json",
22970
24138
  elementIds: "elements"
22971
24139
  };
22972
- var t$2 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[-_\s]+/).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");
22973
- var n$1 = (n, r) => ({
24140
+ var t$3 = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[-_\s]+/).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ");
24141
+ var n$2 = (n, r) => ({
22974
24142
  type: r.builderType ?? e$2[r.type],
22975
- label: r.label ?? t$2(n),
24143
+ label: r.label ?? t$3(n),
22976
24144
  ...r.default === void 0 ? {} : { defaultValue: r.default },
22977
24145
  ...r.options ? { options: r.options.map((e) => ({
22978
24146
  value: e,
22979
- label: r.optionLabels?.[e] ?? t$2(e)
24147
+ label: r.optionLabels?.[e] ?? t$3(e)
22980
24148
  })) } : {},
22981
24149
  ...r.when ? { when: r.when } : {},
22982
24150
  ...r.canBind === void 0 ? {} : { canBind: r.canBind },
22983
24151
  ...r.elementType === void 0 ? {} : { elementType: r.elementType }
22984
24152
  });
22985
- var r = /* @__PURE__ */ new WeakMap();
24153
+ var r$1 = /* @__PURE__ */ new WeakMap();
22986
24154
  var i$2 = (e) => {
22987
- let t = r.get(e);
22988
- return t || (t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, n$1(e, t)])), r.set(e, t)), t;
24155
+ let t = r$1.get(e);
24156
+ return t || (t = Object.fromEntries(Object.entries(e).map(([e, t]) => [e, n$2(e, t)])), r$1.set(e, t)), t;
22989
24157
  };
22990
24158
  var a$1 = (e, t, n, r = {}) => ({
22991
24159
  action: e,
@@ -23086,4 +24254,4 @@ var validateSnippet = (snippet, options = {}) => validateSnippet$1(snippet, {
23086
24254
  ...options
23087
24255
  });
23088
24256
  //#endregion
23089
- export { AUTHORING_CODES, AuthoringError, BREAKPOINTS, BUILDER_NAMES, a as BUILTIN_ELEMENT_CALLBACKS, BUILTIN_GLOBAL_CALLBACKS, BUILTIN_TRANSFORMERS, BUILTIN_UTILITIES, CATALOG_TEMPLATE_IDENTITY, COMPONENT_SOURCES, ELEMENT_FIELDS, EXPLAIN_KINDS, FIXABLE_CODES, GLOBAL_SOURCES, i as NOTIFICATIONS_FIELDS, SCHEMA_SETTINGS, i$1 as SCROLL_CALLBACKS, SET_STATE_TYPES, SPACE_FIELDS, STYLE_STATES, SpaceRefusedError, actionSpecFromEntry, actionToSource, activeOn, activeWhen, addNotification, announceOn, apiContainer, appendState, applyBuiltinCallback, s as applyElementCallback, applyUtility, assertSnippetValid, assertSpaceValid, authLogin, authLogout, authRefreshDetails, authorBinding, authorFlow, authorFlows, authorSnippet, authorSpace, authoringCodeEntry, authoringCodesTable, bindTemplate, blankSpace, blankSpaceSource, space as blankSpaceSpec, blockHtml, blockJsx, buildHandles, button, cancelServerAction, carousel, carouselGoTo, carouselNext, carouselPause, carouselPlay, carouselPrevious, carouselTrack, catalogTemplateFiles, channel, className, classNames, classRefs, clearState, closeDialog, closeModal, column, compactSvg, comparePictures, compareSpaces, component, container, createTw, css, cssNumberValue, cssProperties, cssPropertyName, cssShorthands, custom, cycleState, darkScheme, declaredCallback, declaredTrigger, defaultAttributes, defaultLabel, defineAction, defineElement, delay, dialogContainer, diffPictures, digest, dropdown, dropdownPopup, element, elementAncestorTypes, elementAttributeNames, elementAttributeValues, elementCallbacks, elementCatalog, t as elementDeclaration, elementDefaultAttributes, elementLeafTypes, elementPartTypes, elementSlots, elementSourceTypes, elementTriggers, elementTypeNames, elementsFromManifest, embed, emptySpaceSource, space$1 as emptySpaceSpec, expandShorthand, expandShorthandPatch, explain, explainKindOf, explainList, explanationText, failedFlowText, fixSpace, flagGateOf, flagSpecOf, flowStepIds, fontAwesome, form, formControl, o as getElementCallback, getGlobalCallback, getTransformer, getUtility, grid, groupBindings, hasVisibilityBinding, heading, t$1 as hiddenParams, hiddenWhen, hostAction, image, importProbe, importSlug, importedFiles, inferredLinkMode, inspectDocument, inspectPage, inspectRenders, instanceSelectorFor, o$1 as invalidParams, invalidateQueries, isClassModifier, isCssProperty, isCustomProperty, isRuleSetSpec, isStyleDeclaration, link, lintSpace, list, listItem, locate, markdown, n as missingRequiredParams, modalContainer, modifierClassName, moveState, named, navigate, nodeHtml, notificationsCss, on, onClick, onFlowEnd, onFlowError, onFlowProgress, onInterval, onKey, onLoad, onPageLoad, onPointerDown, onScreen, onScroll, onSubmit, openDialog, openModal, pageRegions, pagination, paragraph, pathForSlug, planFixes, pressShortcut, publishOn, readDevTools, readDevToolsInPage, s$1 as reconcileParams, reference, refusalOf, reloadApi, removeState, resetForm, resolveSource, richText, row, runServerAction, sameBlocks, scope, scrollBy, scrollIntoView, scrollTo, selectorFor, setFieldValue, setState, shortcutKey, shorthandLonghands, singlePageSpace, slugify, source, e as spaceCallbacks, specFromSpace, specToSource, splitClassList, h as splitNotificationsCss, stepState, styles, suggestCssProperty, suggestSpace, suggestTransformer, summariseRenders, svg, tabContainer, tabContainerBody, tabContainerHeader, tabContainerItem, text, themeToggle, toBindingSpecs, toBlocks, i$2 as toBuilderParams, a$1 as toInteractionCallback, o$2 as toInteractionCallbacks, toPortableSource, toResponsive, toggleElement, toggleInState, toggleState, tokens, transformerCatalog, tw, twig, twigTemplate, typeCallbackDefinitions, typeTriggerDefinitions, updateElement, validateSnippet, validateSpace, e$1 as valuesOf, variantFrom, video, visibleWhen, webHook, when, whenFailed, whenSucceeded, whileRunning, withElement, withNamedIds, withNotificationsCss, withPluginCatalogs, withVisibility };
24257
+ export { AUTHORING_CODES, AuthoringError, BREAKPOINTS, BUILDER_NAMES, a as BUILTIN_ELEMENT_CALLBACKS, BUILTIN_GLOBAL_CALLBACKS, BUILTIN_TRANSFORMERS, BUILTIN_UTILITIES, CATALOG_TEMPLATE_IDENTITY, COMPONENT_SOURCES, ELEMENT_FIELDS, EXPLAIN_KINDS, FIXABLE_CODES, GLOBAL_SOURCES, t as MOTION_ENTERS, r as MOTION_LOOPS, n as MOTION_TRIGGERS, i as NOTIFICATIONS_FIELDS, PAGE_TEXT_LIMIT, SCHEMA_SETTINGS, i$1 as SCROLL_CALLBACKS, SET_STATE_TYPES, SPACE_FIELDS, STYLE_STATES, SpaceRefusedError, actionSpecFromEntry, actionToSource, activeOn, activeWhen, addNotification, alignPictures, announceOn, apiContainer, appendState, applyBuiltinCallback, s as applyElementCallback, applyUtility, assertSnippetValid, assertSpaceValid, authLogin, authLogout, authRefreshDetails, authorBinding, authorFlow, authorFlows, authorSnippet, authorSpace, authoringCodeEntry, authoringCodesTable, bindTemplate, blankSpace, blankSpaceSource, space as blankSpaceSpec, blockHtml, blockJsx, buildHandles, button, cancelServerAction, carousel, carouselGoTo, carouselNext, carouselPause, carouselPlay, carouselPrevious, carouselTrack, catalogTemplateFiles, channel, className, classNames, classRefs, clearState, closeDialog, closeModal, column, compactSvg, comparePictures, compareSpaces, compareTexts, component, container, createTw, css, cssNumberValue, cssProperties, cssPropertyName, cssShorthands, custom, cycleState, darkScheme, dataIssues, declaredCallback, declaredTrigger, defaultAttributes, defaultLabel, defineAction, defineElement, delay, dialogContainer, diffPictures, digest, dropdown, dropdownPopup, element, elementAncestorTypes, elementAttributeNames, elementAttributeValues, elementCallbacks, elementCatalog, t$1 as elementDeclaration, elementDefaultAttributes, elementLeafTypes, elementPartTypes, elementSlots, elementSourceTypes, elementTriggers, elementTypeNames, elementsFromManifest, embed, emptySpaceSource, space$1 as emptySpaceSpec, expandShorthand, expandShorthandPatch, explain, explainKindOf, explainList, explanationText, failedFlowText, fixSpace, flagGateOf, flagSpecOf, flowStepIds, fontAwesome, form, formControl, o as getElementCallback, getGlobalCallback, getTransformer, getUtility, grid, groupBindings, hasVisibilityBinding, heading, t$2 as hiddenParams, hiddenWhen, hostAction, image, importProbe, importSlug, importedFiles, inferredLinkMode, inspectDocument, inspectPage, inspectRenders, instanceSelectorFor, o$1 as invalidParams, invalidateQueries, isClassModifier, isCssProperty, isCustomProperty, isRuleSetSpec, isStyleDeclaration, isSuggestionCode, link, lintSpace, list, listItem, loadImages, locate, markdown, n$1 as missingRequiredParams, modalContainer, modifierClassName, moveState, named, navigate, nodeHtml, notificationsCss, on, onClick, onFlowEnd, onFlowError, onFlowProgress, onInterval, onKey, onLoad, onPageLoad, onPointerDown, onScreen, onScroll, onSubmit, openDialog, openModal, pageRegions, pageTexts, pagination, paragraph, pathForSlug, planFixes, pressShortcut, profilePictures, publishOn, readDevTools, readDevToolsInPage, s$1 as reconcileParams, reference, refusalOf, reloadApi, removeState, resetForm, resolveSource, richText, row, runServerAction, sameBlocks, scope, scrollBy, scrollIntoView, scrollTo, selectorFor, setFieldValue, setState, shortcutKey, shorthandLonghands, singlePageSpace, slugify, source, e as spaceCallbacks, specFromSpace, specToSource, splitClassList, h as splitNotificationsCss, stepState, styles, suggestCssProperty, suggestSpace, suggestTransformer, summariseRenders, svg, tabContainer, tabContainerBody, tabContainerHeader, tabContainerItem, text, themeToggle, toBindingSpecs, toBlocks, i$2 as toBuilderParams, a$1 as toInteractionCallback, o$2 as toInteractionCallbacks, toPortableSource, toResponsive, toggleElement, toggleInState, toggleState, tokens, transformerCatalog, tw, twig, twigTemplate, typeCallbackDefinitions, typeTriggerDefinitions, unrollPage, updateElement, validateSnippet, validateSpace, e$1 as valuesOf, variantFrom, video, visibleWhen, webHook, when, whenFailed, whenSucceeded, whileRunning, withElement, withNamedIds, withNotificationsCss, withPluginCatalogs, withVisibility };