@plitzi/sdk-authoring 0.37.10 → 0.38.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.js +150 -149
  3. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @plitzi/sdk-authoring
2
2
 
3
+ ## 0.38.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 266e691: ## A shutdown that does not wait on idle connections
8
+
9
+ A server shutting down while it answered a request waited, once the answer was sent, for the client to let go of the
10
+ keep-alive connection it came on — three seconds for Node's own `fetch`, longer for others — before it could stop. The
11
+ connection is now closed as soon as its answer is finished.
12
+
13
+ ## 0.38.0
14
+
15
+ ### Minor Changes
16
+
17
+ - v0.38.0
18
+
3
19
  ## 0.37.10
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -13,15 +13,15 @@ var __exportAll = (all, no_symbols) => {
13
13
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs
14
14
  var e$37 = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*";
15
15
  var t$57 = `(?:${e$37}|\\d+)`;
16
- var n$39 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$37}(?:\\.${t$57})*)\\s*\\]`;
17
- var r$28 = `${`${e$37}(?:${n$39})*(?:\\??\\.${t$57}(?:${n$39})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
16
+ var n$41 = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e$37}(?:\\.${t$57})*)\\s*\\]`;
17
+ var r$28 = `${`${e$37}(?:${n$41})*(?:\\??\\.${t$57}(?:${n$41})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`;
18
18
  var i$24 = `\\{\\{\\s*${r$28}\\s*\\}\\}`;
19
19
  var a$20 = `(?:${`\\{\\{\\{\\s*${r$28}\\s*\\}\\}\\}`}|${i$24})`;
20
20
  var o$22 = new RegExp(a$20, "g");
21
21
  var s$18 = RegExp(`^${a$20}$`);
22
22
  //#endregion
23
23
  //#region ../sdk-shared/dist/helpers/twigWrapper/tokens/hasValidToken.mjs
24
- var n$38 = (n, r = !1) => {
24
+ var n$40 = (n, r = !1) => {
25
25
  if (typeof n != "string") return !1;
26
26
  let i = r ? s$18 : o$22;
27
27
  return i.lastIndex = 0, i.test(n.trim());
@@ -39,7 +39,7 @@ var n = (e, t, n) => {
39
39
  return r;
40
40
  };
41
41
  var r$27 = (e) => e.trim() !== "" && Number.isFinite(Number(e));
42
- var i$23 = (t) => typeof t == "string" && n$38(t);
42
+ var i$23 = (t) => typeof t == "string" && n$40(t);
43
43
  var a$19 = (e, t) => {
44
44
  switch (t.type) {
45
45
  case "boolean": return typeof e == "boolean";
@@ -1123,7 +1123,7 @@ var t$51 = t()({
1123
1123
  });
1124
1124
  //#endregion
1125
1125
  //#region ../sdk-elements/dist/elements/basic/Button/declaration.mjs
1126
- var n$37 = t()({
1126
+ var n$39 = t()({
1127
1127
  type: "button",
1128
1128
  attributeValues: {
1129
1129
  subType: e$1()([
@@ -1236,7 +1236,7 @@ var n$37 = t()({
1236
1236
  });
1237
1237
  //#endregion
1238
1238
  //#region ../sdk-elements/dist/elements/basic/Dropdown/declaration.mjs
1239
- var n$36 = t()({
1239
+ var n$38 = t()({
1240
1240
  type: "dropdown",
1241
1241
  attributeValues: { popupPlacement: e$1()([
1242
1242
  "left",
@@ -1369,7 +1369,7 @@ var t$50 = t()({
1369
1369
  });
1370
1370
  //#endregion
1371
1371
  //#region ../sdk-elements/dist/elements/basic/Heading/declaration.mjs
1372
- var n$35 = t()({
1372
+ var n$37 = t()({
1373
1373
  type: "heading",
1374
1374
  attributeValues: { subType: e$1()([
1375
1375
  "h1",
@@ -1488,7 +1488,7 @@ var n$35 = t()({
1488
1488
  });
1489
1489
  //#endregion
1490
1490
  //#region ../sdk-elements/dist/elements/basic/Link/declaration.mjs
1491
- var n$34 = t()({
1491
+ var n$36 = t()({
1492
1492
  type: "link",
1493
1493
  attributeValues: {
1494
1494
  mode: e$1()([
@@ -1647,7 +1647,7 @@ var t$48 = t()({
1647
1647
  });
1648
1648
  //#endregion
1649
1649
  //#region ../sdk-elements/dist/elements/basic/RichText/declaration.mjs
1650
- var n$33 = t()({
1650
+ var n$35 = t()({
1651
1651
  type: "richText",
1652
1652
  attributeValues: { format: e$1()([
1653
1653
  "html",
@@ -1742,7 +1742,7 @@ var t$47 = t()({
1742
1742
  });
1743
1743
  //#endregion
1744
1744
  //#region ../sdk-elements/dist/elements/basic/ThemeToggle/declaration.mjs
1745
- var n$32 = t()({
1745
+ var n$34 = t()({
1746
1746
  type: "themeToggle",
1747
1747
  attributeValues: { subType: e$1()(["switch", "segmented"]) },
1748
1748
  triggers: { onThemeChange: {
@@ -1806,7 +1806,7 @@ var n$32 = t()({
1806
1806
  });
1807
1807
  //#endregion
1808
1808
  //#region ../sdk-elements/dist/elements/form/Form/declaration.mjs
1809
- var n$31 = t()({
1809
+ var n$33 = t()({
1810
1810
  type: "form",
1811
1811
  attributeValues: { method: e$1()(["get", "post"]) },
1812
1812
  sourceType: "apiContainer",
@@ -1910,7 +1910,7 @@ var n$31 = t()({
1910
1910
  });
1911
1911
  //#endregion
1912
1912
  //#region ../sdk-elements/dist/elements/form/FormControl/declaration.mjs
1913
- var n$30 = {
1913
+ var n$32 = {
1914
1914
  width: "100%",
1915
1915
  display: "flex",
1916
1916
  "align-items": "center",
@@ -2059,7 +2059,7 @@ var o$21 = t()({
2059
2059
  displayMode: "desktop",
2060
2060
  style: {
2061
2061
  base: { default: {} },
2062
- input: { default: n$30 },
2062
+ input: { default: n$32 },
2063
2063
  label: { default: i$22 },
2064
2064
  error: { default: a$18 }
2065
2065
  }
@@ -2069,7 +2069,7 @@ var o$21 = t()({
2069
2069
  displayMode: "desktop",
2070
2070
  style: {
2071
2071
  base: { default: {} },
2072
- input: { default: n$30 },
2072
+ input: { default: n$32 },
2073
2073
  label: { default: i$22 },
2074
2074
  error: { default: a$18 }
2075
2075
  }
@@ -2079,7 +2079,7 @@ var o$21 = t()({
2079
2079
  displayMode: "desktop",
2080
2080
  style: {
2081
2081
  base: { default: {} },
2082
- input: { default: n$30 },
2082
+ input: { default: n$32 },
2083
2083
  label: { default: i$22 },
2084
2084
  error: { default: a$18 }
2085
2085
  }
@@ -2089,7 +2089,7 @@ var o$21 = t()({
2089
2089
  displayMode: "desktop",
2090
2090
  style: {
2091
2091
  base: { default: {} },
2092
- input: { default: n$30 },
2092
+ input: { default: n$32 },
2093
2093
  label: { default: i$22 },
2094
2094
  error: { default: a$18 }
2095
2095
  }
@@ -2099,7 +2099,7 @@ var o$21 = t()({
2099
2099
  displayMode: "desktop",
2100
2100
  style: {
2101
2101
  base: { default: {} },
2102
- input: { default: n$30 },
2102
+ input: { default: n$32 },
2103
2103
  label: { default: i$22 },
2104
2104
  error: { default: a$18 }
2105
2105
  }
@@ -2125,7 +2125,7 @@ var o$21 = t()({
2125
2125
  style: {
2126
2126
  base: { default: {} },
2127
2127
  input: { default: {
2128
- ...n$30,
2128
+ ...n$32,
2129
2129
  cursor: "pointer"
2130
2130
  } },
2131
2131
  label: i$22,
@@ -2139,7 +2139,7 @@ var o$21 = t()({
2139
2139
  });
2140
2140
  //#endregion
2141
2141
  //#region ../sdk-elements/dist/elements/internal/LayoutContainer/declaration.mjs
2142
- var n$29 = t()({
2142
+ var n$31 = t()({
2143
2143
  type: "layoutContainer",
2144
2144
  attributeValues: { subType: e$1()([
2145
2145
  "div",
@@ -2446,7 +2446,7 @@ var t$42 = t()({
2446
2446
  });
2447
2447
  //#endregion
2448
2448
  //#region ../sdk-elements/dist/elements/media/Image/declaration.mjs
2449
- var n$28 = t()({
2449
+ var n$30 = t()({
2450
2450
  type: "image",
2451
2451
  attributeValues: {
2452
2452
  fetchPriority: e$1()([
@@ -2605,7 +2605,7 @@ var t$40 = t()({
2605
2605
  });
2606
2606
  //#endregion
2607
2607
  //#region ../sdk-elements/dist/elements/provider/ApiContainer/declaration.mjs
2608
- var n$27 = t()({
2608
+ var n$29 = t()({
2609
2609
  type: "apiContainer",
2610
2610
  attributeValues: {
2611
2611
  subType: e$1()([
@@ -2774,7 +2774,7 @@ var n$27 = t()({
2774
2774
  });
2775
2775
  //#endregion
2776
2776
  //#region ../sdk-elements/dist/elements/provider/Channel/declaration.mjs
2777
- var n$26 = t()({
2777
+ var n$28 = t()({
2778
2778
  type: "channel",
2779
2779
  attributeValues: { subType: e$1()([
2780
2780
  "",
@@ -3043,7 +3043,7 @@ var t$38 = t()({
3043
3043
  });
3044
3044
  //#endregion
3045
3045
  //#region ../sdk-elements/dist/elements/structure/Container/declaration.mjs
3046
- var n$25 = [
3046
+ var n$27 = [
3047
3047
  "div",
3048
3048
  "header",
3049
3049
  "footer",
@@ -3057,13 +3057,13 @@ var n$25 = [
3057
3057
  //#endregion
3058
3058
  //#region ../sdk-elements/dist/elements/declarations/index.mjs
3059
3059
  var B = {
3060
- ApiContainer: n$27,
3060
+ ApiContainer: n$29,
3061
3061
  BlockHtml: t$55,
3062
3062
  BlockJsx: t$54,
3063
- Button: n$37,
3063
+ Button: n$39,
3064
3064
  Carousel: t$39,
3065
3065
  CarouselTrack: t$38,
3066
- Channel: n$26,
3066
+ Channel: n$28,
3067
3067
  Container: t()({
3068
3068
  type: "container",
3069
3069
  attributeValues: { subType: e$1()([
@@ -3315,16 +3315,16 @@ var B = {
3315
3315
  },
3316
3316
  initialItems: ["container"]
3317
3317
  }),
3318
- Dropdown: n$36,
3318
+ Dropdown: n$38,
3319
3319
  DropdownPopup: t$50,
3320
3320
  Embed: t$43,
3321
3321
  FontAwesome: t$42,
3322
- Form: n$31,
3322
+ Form: n$33,
3323
3323
  FormControl: o$21,
3324
- Heading: n$35,
3325
- Image: n$28,
3326
- LayoutContainer: n$29,
3327
- Link: n$34,
3324
+ Heading: n$37,
3325
+ Image: n$30,
3326
+ LayoutContainer: n$31,
3327
+ Link: n$36,
3328
3328
  List: t()({
3329
3329
  type: "list",
3330
3330
  attributeValues: {
@@ -3671,7 +3671,7 @@ var B = {
3671
3671
  }),
3672
3672
  Paragraph: t$48,
3673
3673
  Reference: t$51,
3674
- RichText: n$33,
3674
+ RichText: n$35,
3675
3675
  Svg: t$41,
3676
3676
  TabContainer: t()({
3677
3677
  type: "tabContainer",
@@ -3851,7 +3851,7 @@ var B = {
3851
3851
  }
3852
3852
  }),
3853
3853
  Text: t$47,
3854
- ThemeToggle: n$32,
3854
+ ThemeToggle: n$34,
3855
3855
  Video: t$40
3856
3856
  };
3857
3857
  //#endregion
@@ -4974,14 +4974,14 @@ var e$33 = {
4974
4974
  LowerT: 116
4975
4975
  };
4976
4976
  var t$29 = (t) => t >= 97 && t <= 122 || t >= 65 && t <= 90 || t === e$33.Underscore;
4977
- var n$22 = (n) => t$29(n) || n >= e$33.Zero && n <= e$33.Nine;
4978
- var r$23 = (t) => n$22(t) || t === e$33.Minus;
4977
+ var n$24 = (n) => t$29(n) || n >= e$33.Zero && n <= e$33.Nine;
4978
+ var r$23 = (t) => n$24(t) || t === e$33.Minus;
4979
4979
  var i$21 = (t) => t >= e$33.Zero && t <= e$33.Nine;
4980
4980
  var a$17 = (t) => t === e$33.Space || t === e$33.Tab || t === e$33.Newline || t === e$33.CarriageReturn;
4981
4981
  var o$20 = (e) => {
4982
4982
  let r = e.length;
4983
4983
  if (r === 0 || !t$29(e.charCodeAt(0))) return !1;
4984
- for (let t = 1; t < r; t++) if (!n$22(e.charCodeAt(t))) return !1;
4984
+ for (let t = 1; t < r; t++) if (!n$24(e.charCodeAt(t))) return !1;
4985
4985
  return !0;
4986
4986
  };
4987
4987
  var s$16 = (r) => {
@@ -5000,7 +5000,7 @@ var s$16 = (r) => {
5000
5000
  o = !1;
5001
5001
  continue;
5002
5002
  }
5003
- if (s ? !i$21(a) : !n$22(a)) return !1;
5003
+ if (s ? !i$21(a) : !n$24(a)) return !1;
5004
5004
  }
5005
5005
  return !o;
5006
5006
  };
@@ -5119,7 +5119,7 @@ var o$19 = class {
5119
5119
  let t = this.pos + e.length;
5120
5120
  if (t > this.src.length) return !1;
5121
5121
  for (let t = 0; t < e.length; t++) if (this.src.charCodeAt(this.pos + t) !== e.charCodeAt(t)) return !1;
5122
- return t < this.src.length && n$22(this.src.charCodeAt(t)) ? !1 : (this.pos = t, this.skipWs(), !0);
5122
+ return t < this.src.length && n$24(this.src.charCodeAt(t)) ? !1 : (this.pos = t, this.skipWs(), !0);
5123
5123
  }
5124
5124
  matchBinaryOp() {
5125
5125
  this.skipWs();
@@ -5583,7 +5583,7 @@ var s$15 = class extends o$19 {
5583
5583
  };
5584
5584
  //#endregion
5585
5585
  //#region ../sdk-shared/dist/helpers/twigWrapper/Parser/helpers.mjs
5586
- var n$21 = (e) => {
5586
+ var n$23 = (e) => {
5587
5587
  let n = 0;
5588
5588
  for (; n < e.length && !a$17(e.charCodeAt(n));) n++;
5589
5589
  return e.slice(0, n);
@@ -5605,7 +5605,7 @@ var c$12 = (e, t = !1, n) => {
5605
5605
  if (!r.error) {
5606
5606
  let e = r.peek();
5607
5607
  if (e && e.type === "tag") {
5608
- let t = n$21(e.content.trim());
5608
+ let t = n$23(e.content.trim());
5609
5609
  l$8.has(t) && (r.error = `Orphan closing tag: {% ${t} %} without matching opening tag`);
5610
5610
  }
5611
5611
  }
@@ -5669,7 +5669,7 @@ var f$6 = class {
5669
5669
  let e = [];
5670
5670
  for (; this.pos < this.tokens.length;) {
5671
5671
  let t = this.peek();
5672
- if (!t || t.type === "tag" && l$8.has(n$21(t.content.trim()))) break;
5672
+ if (!t || t.type === "tag" && l$8.has(n$23(t.content.trim()))) break;
5673
5673
  let n = this.parseNode();
5674
5674
  n && e.push(n);
5675
5675
  }
@@ -5714,7 +5714,7 @@ var f$6 = class {
5714
5714
  parseTag() {
5715
5715
  let e = this.peek();
5716
5716
  if (!e || e.type !== "tag") return null;
5717
- let n = n$21(e.content.trim());
5717
+ let n = n$23(e.content.trim());
5718
5718
  switch (n) {
5719
5719
  case "if": return this.parseIf();
5720
5720
  case "for": return this.parseFor();
@@ -5735,7 +5735,7 @@ var f$6 = class {
5735
5735
  for (; this.peek();) {
5736
5736
  let e = this.peek();
5737
5737
  if (!e || e.type !== "tag") break;
5738
- let t = n$21(e.content.trim());
5738
+ let t = n$23(e.content.trim());
5739
5739
  if (t === "elseif") {
5740
5740
  this.advance();
5741
5741
  let t = e.content.trim(), r = r$22(t.slice(t.indexOf(" ") + 1).trim(), this.issues), i = this.parseBody();
@@ -5774,10 +5774,10 @@ var f$6 = class {
5774
5774
  let _ = this.parseBody(), v = null;
5775
5775
  if (this.peek()) {
5776
5776
  let e = this.peek();
5777
- e && e.type === "tag" && n$21(e.content.trim()) === "else" && (this.advance(), v = this.parseBody());
5777
+ e && e.type === "tag" && n$23(e.content.trim()) === "else" && (this.advance(), v = this.parseBody());
5778
5778
  }
5779
5779
  let y = this.peek();
5780
- y && y.type === "tag" && n$21(y.content.trim()) === "endfor" ? this.advance() : this.error = "Malformed {% for %} block: missing {% endfor %}";
5780
+ y && y.type === "tag" && n$23(y.content.trim()) === "endfor" ? this.advance() : this.error = "Malformed {% for %} block: missing {% endfor %}";
5781
5781
  let b = this.keepEmptyTokens ? this.reconstructRange(e, this.pos) : void 0;
5782
5782
  return {
5783
5783
  type: "for",
@@ -5913,13 +5913,13 @@ var t$27 = (e, n) => {
5913
5913
  for (let r of Object.values(e)) t$27(r, n);
5914
5914
  }
5915
5915
  };
5916
- var n$20 = (n) => {
5916
+ var n$22 = (n) => {
5917
5917
  let r = d$7(n);
5918
5918
  if (!r) return [];
5919
5919
  let i = /* @__PURE__ */ new Set();
5920
5920
  return t$27(r.nodes ?? r.nodesWithSource, i), [...i];
5921
5921
  };
5922
- var r$19 = (e) => [...new Set(n$20(e).map((e) => e.split(".")[0]))];
5922
+ var r$19 = (e) => [...new Set(n$22(e).map((e) => e.split(".")[0]))];
5923
5923
  //#endregion
5924
5924
  //#region ../sdk-shared/dist/style/styleConstants.mjs
5925
5925
  var e$30 = {
@@ -6117,7 +6117,7 @@ var t$26 = {
6117
6117
  STROKE: "stroke",
6118
6118
  STROKE_WIDTH: "stroke-width"
6119
6119
  };
6120
- var n$19 = [
6120
+ var n$21 = [
6121
6121
  t$26.FONT_FAMILY,
6122
6122
  t$26.FONT_SIZE,
6123
6123
  t$26.FONT_STYLE,
@@ -6149,7 +6149,7 @@ t$26.DISPLAY, t$26.FLEX_WRAP, t$26.FLEX_DIRECTION, t$26.ALIGN_ITEMS, t$26.JUSTIF
6149
6149
  //#endregion
6150
6150
  //#region ../sdk-shared/dist/schema/schemaConstants.mjs
6151
6151
  var t$25 = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/;
6152
- var n$18 = "props";
6152
+ var n$20 = "props";
6153
6153
  var r$17 = {
6154
6154
  schema: {
6155
6155
  definition: {
@@ -6186,7 +6186,7 @@ var r$17 = {
6186
6186
  */
6187
6187
  var GLOBAL_SOURCES = e$34;
6188
6188
  /** What an element inside a component can read besides its own tree: the globals, and what its instance hands in. */
6189
- var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$18];
6189
+ var COMPONENT_SOURCES = [...GLOBAL_SOURCES, n$20];
6190
6190
  /**
6191
6191
  * Turns what an author wrote into the name the runtime resolves.
6192
6192
  *
@@ -6205,7 +6205,7 @@ var resolveSource = (source, index, where, globals = GLOBAL_SOURCES) => {
6205
6205
  if (globals.includes(head)) return source;
6206
6206
  const prefix = index.get(head);
6207
6207
  if (!prefix) {
6208
- const inComponent = globals.includes(n$18);
6208
+ const inComponent = globals.includes(n$20);
6209
6209
  throw new AuthoringError("binding-source-unknown", `${where} binds to "${source}", but nothing ${inComponent ? "in this component" : "in this space"} answers to "${head}"${didYouMean(head, [...index.keys(), ...globals]) || "."} A source names an element by its id, or one of the globals: ${globals.join(", ")}.${inComponent ? " A component is closed: what it needs from where it is placed comes in as a prop." : ""}`);
6210
6210
  }
6211
6211
  return field ? `${prefix}_${head}.${field}` : `${prefix}_${head}`;
@@ -6900,7 +6900,7 @@ var t$23 = (t, n) => {
6900
6900
  for (let a = e$28(t, e$28(t, n)?.definition.parentId); a && !i.has(a.id);) i.add(a.id), r.push(a.id), a = e$28(t, a.definition.parentId);
6901
6901
  return r;
6902
6902
  };
6903
- var n$17 = (n, r) => {
6903
+ var n$19 = (n, r) => {
6904
6904
  let i = [], a = /* @__PURE__ */ new Set([r]), o = (s) => {
6905
6905
  for (let c of [s, ...t$23(n, s)]) {
6906
6906
  let t = e$28(n, c);
@@ -6951,7 +6951,7 @@ var i$16 = (e) => {
6951
6951
  var e$25 = (e) => typeof e == "object" && !!e && !Array.isArray(e);
6952
6952
  //#endregion
6953
6953
  //#region ../sdk-shared/dist/style/fontValidation.mjs
6954
- var n$16 = /* @__PURE__ */ new Set([
6954
+ var n$18 = /* @__PURE__ */ new Set([
6955
6955
  "system",
6956
6956
  "google",
6957
6957
  "remote",
@@ -7016,7 +7016,7 @@ var m$4 = (e) => !Array.isArray(e) || e.length === 0 ? c$9("font.files must be a
7016
7016
  var h$3 = (i) => {
7017
7017
  if (!e$25(i)) return c$9("a font must be an object");
7018
7018
  let { source: a, fallback: o, display: s, preload: h } = i;
7019
- if (typeof a != "string" || !n$16.has(a)) return c$9("font.source must be one of: system, google, remote, hosted");
7019
+ if (typeof a != "string" || !n$18.has(a)) return c$9("font.source must be one of: system, google, remote, hosted");
7020
7020
  if (typeof o != "string" || !o.trim()) return c$9("font.fallback is required: it is what renders until the face arrives");
7021
7021
  if (s !== void 0 && (typeof s != "string" || !r$14.has(s))) return c$9("font.display must be one of: auto, block, swap, fallback, optional");
7022
7022
  if (h !== void 0 && typeof h != "boolean") return c$9("font.preload must be a boolean");
@@ -7072,6 +7072,8 @@ var h$3 = (i) => {
7072
7072
  var e$24 = /* @__PURE__ */ function(e) {
7073
7073
  return e.COLOR = "color", e.SPACING = "spacing", e.SHADOW = "shadow", e.CUSTOM = "custom", e;
7074
7074
  }({});
7075
+ var t$20 = Object.values(e$24);
7076
+ var n$17 = (e) => typeof e == "string" && t$20.includes(e);
7075
7077
  //#endregion
7076
7078
  //#region ../sdk-shared/dist/style/styleStates.mjs
7077
7079
  var e$23 = [
@@ -7086,7 +7088,7 @@ var e$23 = [
7086
7088
  "current",
7087
7089
  "hidden"
7088
7090
  ];
7089
- var t$20 = "plitzi-component--hidden";
7091
+ var t$19 = "plitzi-component--hidden";
7090
7092
  var r$13 = {
7091
7093
  visited: 0,
7092
7094
  checked: 1,
@@ -7103,7 +7105,7 @@ var i$14 = (e) => Object.hasOwn(r$13, e);
7103
7105
  var a$12 = (t) => i$14(t) ? r$13[t] : e$23.length;
7104
7106
  var o$15 = (e) => Object.entries(e).sort(([e], [t]) => a$12(e) - a$12(t));
7105
7107
  var s$12 = "[aria-current=\"page\"]";
7106
- var c$8 = (e) => e === "hidden" ? `.${t$20}` : e === "current" ? s$12 : `:${e}`;
7108
+ var c$8 = (e) => e === "hidden" ? `.${t$19}` : e === "current" ? s$12 : `:${e}`;
7107
7109
  var l$4 = (e) => e === "hidden";
7108
7110
  //#endregion
7109
7111
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/shared.js
@@ -7114,7 +7116,7 @@ function e$22(e) {
7114
7116
  }
7115
7117
  return null;
7116
7118
  }
7117
- function t$19(t, n) {
7119
+ function t$18(t, n) {
7118
7120
  if (!t || t.startsWith(".") || t.endsWith(".") || /[^a-zA-Z0-9_.[\]-]/.test(t) || n && (/\.\.|(\[\])/g.test(t) || (t.match(/\[/g) || []).length !== (t.match(/\]/g) || []).length || /\][^.[]/.test(t))) return [];
7119
7121
  let r = [], i = /([^.[\]]+)|\[(\d+)\]/g, a;
7120
7122
  for (; a = i.exec(t);) if (a[1]) {
@@ -7129,7 +7131,7 @@ function t$19(t, n) {
7129
7131
  }
7130
7132
  return r.length ? r : [];
7131
7133
  }
7132
- function n$15(t, n) {
7134
+ function n$16(t, n) {
7133
7135
  if (!Array.isArray(t)) return [];
7134
7136
  let r = [];
7135
7137
  for (let i of t) {
@@ -7140,11 +7142,11 @@ function n$15(t, n) {
7140
7142
  return r;
7141
7143
  }
7142
7144
  function r$12(e, r = !0) {
7143
- return e ? typeof e == "string" ? t$19(e, r) : Array.isArray(e) ? n$15(e, r) : [] : [];
7145
+ return e ? typeof e == "string" ? t$18(e, r) : Array.isArray(e) ? n$16(e, r) : [] : [];
7144
7146
  }
7145
7147
  //#endregion
7146
7148
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/get.js
7147
- function t$18(t, n, r) {
7149
+ function t$17(t, n, r) {
7148
7150
  if (t == null || !n) return r;
7149
7151
  let i = r$12(n);
7150
7152
  if (!i.length) return r;
@@ -7160,7 +7162,7 @@ function t$18(t, n, r) {
7160
7162
  }
7161
7163
  //#endregion
7162
7164
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/set.js
7163
- function t$17(t, n, r) {
7165
+ function t$16(t, n, r) {
7164
7166
  let i = r$12(n);
7165
7167
  if (!i.length) return t;
7166
7168
  let a = t;
@@ -7179,11 +7181,11 @@ function t$17(t, n, r) {
7179
7181
  }
7180
7182
  //#endregion
7181
7183
  //#region ../../node_modules/@plitzi/plitzi-ui/dist/helpers/lodash/pick.js
7182
- function n$14(n, r) {
7184
+ function n$15(n, r) {
7183
7185
  let i = {}, a = Array.isArray(r) ? r : [r];
7184
7186
  for (let r of a) {
7185
- let a = t$18(n, r);
7186
- a !== void 0 && t$17(i, r, a);
7187
+ let a = t$17(n, r);
7188
+ a !== void 0 && t$16(i, r, a);
7187
7189
  }
7188
7190
  return i;
7189
7191
  }
@@ -7219,10 +7221,10 @@ var i$13 = (e, t, n, r, i) => {
7219
7221
  return a;
7220
7222
  };
7221
7223
  var a$11 = (e, n, r, i) => {
7222
- let a = t$18(i, `${e}.defaultStyle`, void 0);
7224
+ let a = t$17(i, `${e}.defaultStyle`, void 0);
7223
7225
  if (a) return a.subTypes && !n && (n = Object.keys(a.subTypes)[0]), n && a.subTypes?.[n] && (a = a.subTypes[n]), {
7224
7226
  name: "defaultStyle",
7225
- attributes: { [r]: t$18(a, `style.${r}`, {}) },
7227
+ attributes: { [r]: t$17(a, `style.${r}`, {}) },
7226
7228
  componentType: e,
7227
7229
  isParent: !1,
7228
7230
  isAncestor: !1,
@@ -7321,7 +7323,7 @@ var c$7 = (t, o, c, l, u = {}, d = {}) => {
7321
7323
  let C = {};
7322
7324
  for (let t of b.tree) {
7323
7325
  let r = s$11(t, p, m, h, g);
7324
- if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$14(r, n$19)), Object.keys(r).length)) for (let e of Object.keys(r)) C[e] || (C[e] = []), C[e].push({
7326
+ if (r && Object.keys(r).length && ((t.isAncestor || t.isDefault && t.componentType !== o) && (r = n$15(r, n$21)), Object.keys(r).length)) for (let e of Object.keys(r)) C[e] || (C[e] = []), C[e].push({
7325
7327
  key: t.name,
7326
7328
  value: r[e],
7327
7329
  displayMode: t.displayMode
@@ -7717,7 +7719,7 @@ var LintContext = class {
7717
7719
  * — the walk the runtime makes, so a provider beside the slot in a layout is not in it.
7718
7720
  */
7719
7721
  scope(id) {
7720
- return new Set(n$17(this.flat, id));
7722
+ return new Set(n$19(this.flat, id));
7721
7723
  }
7722
7724
  /** The route params an element's page declares; a layout renders on every page, so it sees all of them. */
7723
7725
  routeParams(id) {
@@ -7817,17 +7819,17 @@ var withPluginCatalogs = (options) => {
7817
7819
  leafTypes: [...rest.leafTypes ?? [], ...plugins.filter((declaration) => declaration.content?.definition && !Array.isArray(declaration.content.definition.items)).map((declaration) => declaration.type)]
7818
7820
  };
7819
7821
  };
7820
- var n$13 = (e) => {
7822
+ var n$14 = (e) => {
7821
7823
  let t = typeof e == "string" && e.trim() !== "" ? Number(e) : e;
7822
7824
  return typeof t == "number" && Number.isInteger(t) && t >= 250 ? t : void 0;
7823
7825
  };
7824
- var t$16 = [
7826
+ var t$15 = [
7825
7827
  "ctrl",
7826
7828
  "alt",
7827
7829
  "shift",
7828
7830
  "meta"
7829
7831
  ];
7830
- var n$12 = {
7832
+ var n$13 = {
7831
7833
  ctrl: "ctrl",
7832
7834
  control: "ctrl",
7833
7835
  alt: "alt",
@@ -7869,14 +7871,14 @@ var i$11 = /* @__PURE__ */ new Set([
7869
7871
  "pagedown",
7870
7872
  ...Array.from({ length: 12 }, (e, t) => `f${t + 1}`)
7871
7873
  ]);
7872
- var a$9 = (e, n) => [...t$16.filter((t) => e.has(t)), n].join("+");
7874
+ var a$9 = (e, n) => [...t$15.filter((t) => e.has(t)), n].join("+");
7873
7875
  var o$11 = (e, t) => {
7874
7876
  let o = e.trim().toLowerCase();
7875
7877
  if (!o) return { problem: "an empty shortcut (two commas in a row, or one at the end)" };
7876
7878
  let s = o.endsWith("++") ? [...o.slice(0, -2).split("+"), "+"] : o.split("+"), c = o === "+" ? ["+"] : s.filter((e) => e !== ""), l = /* @__PURE__ */ new Set(), u = [];
7877
7879
  for (let e of c) {
7878
- if (Object.hasOwn(n$12, e)) {
7879
- let r = n$12[e];
7880
+ if (Object.hasOwn(n$13, e)) {
7881
+ let r = n$13[e];
7880
7882
  l.add(r === "mod" ? t ? "meta" : "ctrl" : r);
7881
7883
  continue;
7882
7884
  }
@@ -7984,7 +7986,7 @@ var onKey = (keys) => {
7984
7986
  * (`when(...)`) — a state an `onMouseEnter` sets, say. `{{ <this step's id>.count }}` is how many times it has ticked.
7985
7987
  */
7986
7988
  var onInterval = (ms) => {
7987
- if (n$13(ms) === void 0) throw new AuthoringError("trigger-interval", `onInterval(${String(ms)}) is not an interval a flow can repeat on: it takes a whole number of milliseconds, at least 250 — \`onInterval(5000)\` is every five seconds.`);
7989
+ if (n$14(ms) === void 0) throw new AuthoringError("trigger-interval", `onInterval(${String(ms)}) is not an interval a flow can repeat on: it takes a whole number of milliseconds, at least 250 — \`onInterval(5000)\` is every five seconds.`);
7988
7990
  return on("onInterval", { interval: ms });
7989
7991
  };
7990
7992
  /**
@@ -8243,7 +8245,7 @@ var e$19 = {
8243
8245
  elements: "Only these containers",
8244
8246
  none: "None — this only reads"
8245
8247
  };
8246
- var t$15 = (t, n = () => !0) => ({
8248
+ var t$14 = (t, n = () => !0) => ({
8247
8249
  invalidateQueries: {
8248
8250
  type: "select",
8249
8251
  description: "What to refresh once the write succeeded, so the page shows the new data: the cached requests to the same site, all of them, only the api containers named in `invalidateElements`, or none for a step that only reads. Containers on screen ask again at once; the rest when they are shown.",
@@ -8265,7 +8267,7 @@ var t$15 = (t, n = () => !0) => ({
8265
8267
  });
8266
8268
  //#endregion
8267
8269
  //#region ../sdk-interactions/dist/sources/ActionsSource/callbacks.mjs
8268
- var t$14 = {
8270
+ var t$13 = {
8269
8271
  runServerAction: {
8270
8272
  source: "actions",
8271
8273
  title: "Run Server Action",
@@ -8305,7 +8307,7 @@ var t$14 = {
8305
8307
  default: "",
8306
8308
  when: (e) => e.mode !== "detached"
8307
8309
  },
8308
- ...t$15([
8310
+ ...t$14([
8309
8311
  "all",
8310
8312
  "elements",
8311
8313
  "none"
@@ -8715,7 +8717,7 @@ var BUILTIN_GLOBAL_CALLBACKS = {
8715
8717
  ...e$17,
8716
8718
  ...e$16,
8717
8719
  ...e$18,
8718
- ...t$14,
8720
+ ...t$13,
8719
8721
  ...e$15
8720
8722
  };
8721
8723
  /** The built-in globalCallback for an action, or undefined when the action is not a known built-in (a plugin
@@ -8946,7 +8948,7 @@ var webHook = (params) => utilityStep("webHook", params);
8946
8948
  var twigTemplate = (params) => utilityStep("twigTemplate", params);
8947
8949
  //#endregion
8948
8950
  //#region ../sdk-interactions/dist/utility/webHookSpec.mjs
8949
- var t$13 = (e) => {
8951
+ var t$12 = (e) => {
8950
8952
  let t = typeof e.method == "string" ? e.method.toLowerCase() : "get";
8951
8953
  return t === "get" || t === "head";
8952
8954
  };
@@ -9041,21 +9043,21 @@ var BUILTIN_UTILITIES = {
9041
9043
  description: "Serve a GET from the page’s query cache while it is fresh, and keep the answer there — shared with any api container asking the same thing.",
9042
9044
  default: !1,
9043
9045
  label: "Cache response",
9044
- when: t$13
9046
+ when: t$12
9045
9047
  },
9046
9048
  staleTime: {
9047
9049
  type: "number",
9048
9050
  description: "With `cache`: seconds the answer is served without asking again.",
9049
9051
  default: 30,
9050
9052
  label: "Fresh for (s)",
9051
- when: (e) => t$13(e) && (e.cache === !0 || e.cache === "true")
9053
+ when: (e) => t$12(e) && (e.cache === !0 || e.cache === "true")
9052
9054
  },
9053
- ...t$15([
9055
+ ...t$14([
9054
9056
  "origin",
9055
9057
  "all",
9056
9058
  "elements",
9057
9059
  "none"
9058
- ], (e) => !t$13(e))
9060
+ ], (e) => !t$12(e))
9059
9061
  },
9060
9062
  preview: { response: {
9061
9063
  status: "",
@@ -9083,7 +9085,7 @@ var applyUtility = (action, params) => {
9083
9085
  var e$13 = "flow.onFailure";
9084
9086
  //#endregion
9085
9087
  //#region ../sdk-shared/dist/actions/functions.mjs
9086
- var n$10 = (e) => e === "/fn" || e.startsWith("/fn/");
9088
+ var n$11 = (e) => e === "/fn" || e.startsWith("/fn/");
9087
9089
  //#endregion
9088
9090
  //#region ../sdk-shared/dist/types/SchemaTypes.mjs
9089
9091
  var e$12 = [
@@ -9426,15 +9428,15 @@ var authoringCodesTable = (kind) => {
9426
9428
  };
9427
9429
  //#endregion
9428
9430
  //#region ../sdk-shared/dist/flags/schemaFlag.mjs
9429
- var t$12 = "[A-Za-z_][A-Za-z0-9_]*";
9430
- var n$9 = RegExp(`^${t$12}$`);
9431
- RegExp(`^!?${t$12}$`);
9431
+ var t$11 = "[A-Za-z_][A-Za-z0-9_]*";
9432
+ var n$10 = RegExp(`^${t$11}$`);
9433
+ RegExp(`^!?${t$11}$`);
9432
9434
  var i$10 = /* @__PURE__ */ new Set([
9433
9435
  "__proto__",
9434
9436
  "constructor",
9435
9437
  "prototype"
9436
9438
  ]);
9437
- var a$8 = (e) => n$9.test(e) && !i$10.has(e);
9439
+ var a$8 = (e) => n$10.test(e) && !i$10.has(e);
9438
9440
  //#endregion
9439
9441
  //#region ../sdk-shared/dist/flags/resolveFlags.mjs
9440
9442
  var i$9 = (e) => typeof e == "object" && !!e && "rules" in e && Array.isArray(e.rules) && e.rules.some((e) => typeof e == "object" && !!e && !("enabled" in e && e.enabled === !1));
@@ -9717,8 +9719,8 @@ var warnClickOnStaticElement = (ctx, element, where) => {
9717
9719
  var warnIgnoredRegionName = (ctx, element, where) => {
9718
9720
  if (element.definition.type !== "container" || !says(ctx, element, "label")) return;
9719
9721
  const subType = textOf(attributeValue(ctx, element, "subType"), "div");
9720
- if (n$25.some((tag) => tag === subType)) return;
9721
- ctx.warn("label-ignored", `${where} is a "${subType}" with a \`label\`, which nobody reads: it takes its name from what it holds. Put the words inside it — or, if it is a part of the page of its own, make it one of ${n$25.map((tag) => `'${tag}'`).join(", ")}.`, element.id);
9722
+ if (n$27.some((tag) => tag === subType)) return;
9723
+ ctx.warn("label-ignored", `${where} is a "${subType}" with a \`label\`, which nobody reads: it takes its name from what it holds. Put the words inside it — or, if it is a part of the page of its own, make it one of ${n$27.map((tag) => `'${tag}'`).join(", ")}.`, element.id);
9722
9724
  };
9723
9725
  /**
9724
9726
  * Whether `id`'s subtree holds something a keyboard can reach — or markup the linter cannot read, which may — leaving
@@ -9795,9 +9797,9 @@ var lintAccessibility = (ctx) => {
9795
9797
  //#endregion
9796
9798
  //#region ../sdk-schema/dist/helpers/styleWithoutTag.mjs
9797
9799
  var e$11 = (e) => Object.keys(e ?? {}).length > 0;
9798
- var t$11 = (t) => Object.values(t ?? {}).some(e$11);
9799
- var n$8 = (n) => e$11(n.default) || t$11(n.states) || Object.values(n.variants ?? {}).some((n) => e$11(n.default) || t$11(n.states));
9800
- var r$7 = (e, t) => Object.values(e.platform).some((e) => Object.hasOwn(e, t) && Object.values(e[t].attributes).some(n$8));
9800
+ var t$10 = (t) => Object.values(t ?? {}).some(e$11);
9801
+ var n$9 = (n) => e$11(n.default) || t$10(n.states) || Object.values(n.variants ?? {}).some((n) => e$11(n.default) || t$10(n.states));
9802
+ var r$7 = (e, t) => Object.values(e.platform).some((e) => Object.hasOwn(e, t) && Object.values(e[t].attributes).some(n$9));
9801
9803
  var i$8 = (e) => {
9802
9804
  let t = e.attributes.subType;
9803
9805
  return e.definition.type === "apiContainer" && (typeof t != "string" || t === "");
@@ -9810,14 +9812,14 @@ var a$7 = (e, t) => {
9810
9812
  //#endregion
9811
9813
  //#region ../sdk-shared/dist/schema/anchor.mjs
9812
9814
  var e$10 = /^[a-z][a-z0-9-]*$/;
9813
- var t$10 = (t) => typeof t == "string" && e$10.test(t);
9815
+ var t$9 = (t) => typeof t == "string" && e$10.test(t);
9814
9816
  //#endregion
9815
9817
  //#region ../sdk-shared/dist/schema/layoutChain.mjs
9816
9818
  var e$9 = (e, t) => {
9817
9819
  let n = e?.attributes[t];
9818
9820
  return typeof n == "string" ? n : "";
9819
9821
  };
9820
- var t$9 = (t, n, r) => {
9822
+ var t$8 = (t, n, r) => {
9821
9823
  let i = [], a = /* @__PURE__ */ new Set(), o = n, s = r;
9822
9824
  for (; o && !a.has(o) && i.length < 16;) {
9823
9825
  let n = t(o);
@@ -9829,7 +9831,7 @@ var t$9 = (t, n, r) => {
9829
9831
  }
9830
9832
  return i;
9831
9833
  };
9832
- var n$7 = (t, n) => {
9834
+ var n$8 = (t, n) => {
9833
9835
  let r = [], i = n;
9834
9836
  for (; i && r.length <= 16;) {
9835
9837
  if (r.includes(i)) return [...r.slice(r.indexOf(i)), i];
@@ -9851,7 +9853,7 @@ var attributeText = (element, key) => {
9851
9853
  /** Every anchor a rendered page carries — its own tree and the layouts around it — with the elements that carry it. */
9852
9854
  var anchorsOfPage = (ctx, pageId) => {
9853
9855
  const page = ctx.element(pageId);
9854
- const chain = page ? t$9((id) => ctx.element(id), attributeText(page, "layout"), attributeText(page, "layoutContainer")) : [];
9856
+ const chain = page ? t$8((id) => ctx.element(id), attributeText(page, "layout"), attributeText(page, "layoutContainer")) : [];
9855
9857
  const roots = /* @__PURE__ */ new Set([pageId, ...chain.map((link) => link.layout)]);
9856
9858
  const anchors = /* @__PURE__ */ new Map();
9857
9859
  Object.values(ctx.flat).forEach((element) => {
@@ -9863,7 +9865,7 @@ var anchorsOfPage = (ctx, pageId) => {
9863
9865
  /** One element's own anchor: well formed, on something that renders, and rendered once. */
9864
9866
  var lintOwnAnchor = (ctx, element, anchor) => {
9865
9867
  const where = ctx.describe(element.id);
9866
- if (!t$10(anchor)) ctx.error("anchor-invalid", `${where} has the anchor ${JSON.stringify(anchor)}. An anchor is the element's id in the URL (\`/page#anchor\`): ${FORMAT} — "${asAnchor(anchor)}".`, element.id);
9868
+ if (!t$9(anchor)) ctx.error("anchor-invalid", `${where} has the anchor ${JSON.stringify(anchor)}. An anchor is the element's id in the URL (\`/page#anchor\`): ${FORMAT} — "${asAnchor(anchor)}".`, element.id);
9867
9869
  if (i$8(element)) ctx.error("anchor-no-tag", `${where} has the anchor "${anchor}" but renders no element of its own (no \`subType\`), so there is nothing to scroll to. Put the anchor on the section it wraps, or give it a tag.`, element.id);
9868
9870
  if (ctx.component) {
9869
9871
  ctx.error("anchor-repeated", `${where} has the anchor "${anchor}", and a component renders its tree once per instance — two instances would put the same id in the page twice. Put the anchor on the element around the instance, on the page.`, element.id);
@@ -9877,7 +9879,7 @@ var lintLinkHash = (ctx, link, anchorsByPage) => {
9877
9879
  const hash = attributeText(link, "hash");
9878
9880
  if (!hash || attributeText(link, "mode") === "external") return;
9879
9881
  const where = ctx.describe(link.id);
9880
- if (!t$10(hash)) {
9882
+ if (!t$9(hash)) {
9881
9883
  ctx.error("anchor-invalid", `${where} goes to the section ${JSON.stringify(hash)}: an anchor is ${FORMAT}, written without the "#".`, link.id);
9882
9884
  return;
9883
9885
  }
@@ -9924,10 +9926,10 @@ var lintAnchors = (ctx) => {
9924
9926
  };
9925
9927
  //#endregion
9926
9928
  //#region ../sdk-shared/dist/realtime/topics.mjs
9927
- var t$8 = /^[A-Za-z0-9:_.-]{1,128}$/;
9928
- var n$6 = "[A-Za-z0-9_.-]{1,64}";
9929
- var r$6 = (e) => t$8.test(e);
9930
- var i$7 = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n$6 : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`);
9929
+ var t$7 = /^[A-Za-z0-9:_.-]{1,128}$/;
9930
+ var n$7 = "[A-Za-z0-9_.-]{1,64}";
9931
+ var r$6 = (e) => t$7.test(e);
9932
+ var i$7 = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n$7 : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`);
9931
9933
  var a$6 = (e, t) => {
9932
9934
  if (!t || !r$6(e)) return;
9933
9935
  let n = Object.keys(t).find((t) => i$7(t).test(e));
@@ -10011,8 +10013,8 @@ var i$6 = (e) => r$5.test(e);
10011
10013
  //#endregion
10012
10014
  //#region ../sdk-shared/dist/helpers/twigWrapper/filters/filters.mjs
10013
10015
  var e$8 = Symbol("twigArrowParams");
10014
- var t$7 = (e) => e == null || e === "";
10015
- var n$5 = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
10016
+ var t$6 = (e) => e == null || e === "";
10017
+ var n$6 = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
10016
10018
  var r$4 = (e) => e === void 0 || typeof e == "function" || typeof e == "symbol" ? "null" : typeof e == "bigint" ? e.toString() : JSON.stringify(e);
10017
10019
  var i$5 = (e) => e == null ? "" : String(e);
10018
10020
  var a$5 = (e) => {
@@ -10197,7 +10199,7 @@ var y = {
10197
10199
  to_json: (e) => r$4(e),
10198
10200
  json_encode: (e) => r$4(e),
10199
10201
  object_as_json: (e) => typeof e == "object" && e ? JSON.stringify(e) : e,
10200
- default: (e, n) => t$7(e) ? n[0] : e,
10202
+ default: (e, n) => t$6(e) ? n[0] : e,
10201
10203
  upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
10202
10204
  lower: (e) => typeof e == "string" ? e.toLowerCase() : e,
10203
10205
  trim: (e) => typeof e == "string" ? e.trim() : e,
@@ -10289,9 +10291,9 @@ var y = {
10289
10291
  let i = [...t], a = r[0];
10290
10292
  if (typeof a == "function") {
10291
10293
  let t = a;
10292
- return (t[e$8] ?? 1) >= 2 ? i.sort((e, n) => Number(t(e, n))) : i.sort((e, r) => n$5(t(e), t(r)));
10294
+ return (t[e$8] ?? 1) >= 2 ? i.sort((e, n) => Number(t(e, n))) : i.sort((e, r) => n$6(t(e), t(r)));
10293
10295
  }
10294
- return i.sort(n$5);
10296
+ return i.sort(n$6);
10295
10297
  },
10296
10298
  batch: (e, t) => {
10297
10299
  if (!Array.isArray(e) || t.length === 0) return e;
@@ -10856,7 +10858,7 @@ var lintPages = (ctx) => {
10856
10858
  const { accessLevel, slug, folder } = page.attributes;
10857
10859
  if (accessLevel !== void 0 && accessLevel !== "" && !ACCESS_LEVELS.includes(accessLevel)) ctx.error("page-access-level", `${where}: \`accessLevel\` is ${JSON.stringify(accessLevel)}. It is one of ${ACCESS_LEVELS.map((level) => `'${level}'`).join(", ")}.`, pageId);
10858
10860
  const path = `/${[typeof folder === "string" && folder ? folderPath(ctx, folder) : "", textOf(slug)].filter(Boolean).join("/")}`;
10859
- if (n$10(path)) ctx.error("page-route-reserved", `${where} answers at ${path}, under /fn — which is where the space's functions answer, never a page. Give it another slug (or its folder another one).`, pageId);
10861
+ if (n$11(path)) ctx.error("page-route-reserved", `${where} answers at ${path}, under /fn — which is where the space's functions answer, never a page. Give it another slug (or its folder another one).`, pageId);
10860
10862
  const key = `${path} ${typeof accessLevel === "string" && accessLevel ? accessLevel : "everyone"}`;
10861
10863
  const earlier = routes.get(key);
10862
10864
  if (earlier !== void 0) ctx.error("page-route-taken", `${where} answers at ${path} for the same visitors as ${earlier}, so one of them can never be reached. Give it another slug — or, for a sign-in page and the page behind it, \`accessLevel\` 'public' on one and 'authenticated' on the other.`, pageId);
@@ -11038,7 +11040,7 @@ var checkAttributes = (ctx, element, where) => {
11038
11040
  ctx.error("unknown-attribute", `${where} sets "${name}", which a "${type}" never reads${didYouMean(name, names) || "."}${trigger || ` It reads ${names.join(", ")}.`}`, element.id);
11039
11041
  continue;
11040
11042
  }
11041
- if (value === void 0 || value === null || typeof value === "string" && n$38(value)) continue;
11043
+ if (value === void 0 || value === null || typeof value === "string" && n$40(value)) continue;
11042
11044
  if (Object.hasOwn(enums, name) && !(typeof value === "string" && enums[name].includes(value))) {
11043
11045
  ctx.error("attribute-value", `${where}: \`${name}\` is ${JSON.stringify(value)}${typeof value === "string" && didYouMean(value, enums[name]) || "."} It is one of ${enums[name].map((item) => `'${item}'`).join(", ")}.`, element.id);
11044
11046
  continue;
@@ -11136,10 +11138,10 @@ var checkBindings = (ctx, element, where) => {
11136
11138
  */
11137
11139
  var checkAttributeTemplates = (ctx, element, where) => {
11138
11140
  if (PROSE_TYPES.has(element.definition.type)) return;
11139
- for (const value of stringsIn$1(element.attributes)) if (e$7(value) && !n$38(value)) ctx.warn("template-never-resolved", `${where} carries "${shorten(value)}", which is never resolved: an attribute only reads a name with filters (\`{{ post.slug|upper }}\`). Move the expression into a binding's \`twigTemplate\`, where it is evaluated in full.`, element.id, { value });
11141
+ for (const value of stringsIn$1(element.attributes)) if (e$7(value) && !n$40(value)) ctx.warn("template-never-resolved", `${where} carries "${shorten(value)}", which is never resolved: an attribute only reads a name with filters (\`{{ post.slug|upper }}\`). Move the expression into a binding's \`twigTemplate\`, where it is evaluated in full.`, element.id, { value });
11140
11142
  const routeParams = ctx.routeParams(element.id);
11141
11143
  const scope = ctx.scope(element.id);
11142
- for (const [name, value] of Object.entries(element.attributes)) if (typeof value === "string" && n$38(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
11144
+ for (const [name, value] of Object.entries(element.attributes)) if (typeof value === "string" && n$40(value)) checkTemplate(ctx, value, `${where}: its "${name}"`, {
11143
11145
  kind: "attribute",
11144
11146
  routeParams
11145
11147
  }, scope, element.id);
@@ -11419,7 +11421,7 @@ var checkTriggerKeys = (ctx, node, where, hostId) => {
11419
11421
  };
11420
11422
  /** A repeating flow whose interval cannot repeat: not a whole number of milliseconds, or faster than the floor. */
11421
11423
  var checkTriggerInterval = (ctx, node, where, hostId) => {
11422
- if (node.action !== "onInterval" || n$13(node.params.interval) !== void 0) return;
11424
+ if (node.action !== "onInterval" || n$14(node.params.interval) !== void 0) return;
11423
11425
  ctx.error("trigger-interval", `${where} repeats a flow every ${JSON.stringify(node.params.interval)} ms, which never ticks: an interval is a whole number of milliseconds, at least 250 — \`onInterval(5000)\`.`, hostId);
11424
11426
  };
11425
11427
  /**
@@ -12009,17 +12011,17 @@ var e$6 = {
12009
12011
  shadow: ["--toastify-toast-shadow"],
12010
12012
  padding: ["--toastify-toast-padding"]
12011
12013
  };
12012
- var t$6 = {
12014
+ var t$5 = {
12013
12015
  fontSize: "font-size",
12014
12016
  border: "border"
12015
12017
  };
12016
- var n$4 = [...Object.keys(e$6), ...Object.keys(t$6)];
12017
- var r$2 = (e) => n$4.includes(e);
12018
- var i = n$4.filter(r$2);
12018
+ var n$5 = [...Object.keys(e$6), ...Object.keys(t$5)];
12019
+ var r$2 = (e) => n$5.includes(e);
12020
+ var i = n$5.filter(r$2);
12019
12021
  var a$3 = ".Toastify__toast-container.plitzi-sdk-toasts";
12020
12022
  var o$7 = (e) => {
12021
12023
  for (let [t, i] of Object.entries(e ?? {})) {
12022
- if (!r$2(t)) return `\`notifications\` has no "${t}". It takes ${n$4.join(", ")}.`;
12024
+ if (!r$2(t)) return `\`notifications\` has no "${t}". It takes ${n$5.join(", ")}.`;
12023
12025
  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'.`;
12024
12026
  }
12025
12027
  };
@@ -12027,7 +12029,7 @@ var s$6 = (n) => {
12027
12029
  let i = [], o = [];
12028
12030
  for (let [a, s] of Object.entries(n ?? {})) {
12029
12031
  if (!r$2(a) || typeof s != "string" || s.trim() === "") continue;
12030
- let n = t$6[a];
12032
+ let n = t$5[a];
12031
12033
  n ? o.push(` ${n}: ${s.trim()};`) : i.push(...(e$6[a] ?? []).map((e) => ` ${e}: ${s.trim()};`));
12032
12034
  }
12033
12035
  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");
@@ -12046,7 +12048,7 @@ var f$1 = (e, t) => {
12046
12048
  return n;
12047
12049
  };
12048
12050
  var p$1 = new Map(Object.entries(e$6).flatMap(([e, t]) => r$2(e) ? t.map((t) => [t, e]) : []));
12049
- var m$1 = new Map(Object.entries(t$6).flatMap(([e, t]) => r$2(e) ? [[t, e]] : []));
12051
+ var m$1 = new Map(Object.entries(t$5).flatMap(([e, t]) => r$2(e) ? [[t, e]] : []));
12050
12052
  var h = (e) => {
12051
12053
  let t = {};
12052
12054
  for (let [n, r] of [[u$2, (e) => p$1.get(e)], [d$2, (e) => m$1.get(e)]]) {
@@ -12113,11 +12115,11 @@ var SpaceRefusedError = class extends Error {
12113
12115
  //#endregion
12114
12116
  //#region ../sdk-shared/dist/auth/visitorRoles.mjs
12115
12117
  var e$5 = /^[A-Za-z][\w-]{0,63}$/;
12116
- var t$5 = "`visitorRoles: { author: [\"postPublish\"], editor: [\"postPublish\", \"postEdit\"] }`";
12117
- var n$3 = (n) => {
12118
+ var t$4 = "`visitorRoles: { author: [\"postPublish\"], editor: [\"postPublish\", \"postEdit\"] }`";
12119
+ var n$4 = (n) => {
12118
12120
  if (typeof n != "object" || !n || Array.isArray(n)) return {
12119
12121
  ok: !1,
12120
- problem: `\`settings.visitorRoles\` is ${JSON.stringify(n)}. Write each role with its permissions: ${t$5}.`
12122
+ problem: `\`settings.visitorRoles\` is ${JSON.stringify(n)}. Write each role with its permissions: ${t$4}.`
12121
12123
  };
12122
12124
  let r = {};
12123
12125
  for (let [i, a] of Object.entries(n)) {
@@ -12127,7 +12129,7 @@ var n$3 = (n) => {
12127
12129
  };
12128
12130
  if (!Array.isArray(a) || a.length === 0) return {
12129
12131
  ok: !1,
12130
- problem: `\`settings.visitorRoles.${i}\` is ${JSON.stringify(a)}. A role is the permissions it gives, as a list of names: ${t$5}.`
12132
+ problem: `\`settings.visitorRoles.${i}\` is ${JSON.stringify(a)}. A role is the permissions it gives, as a list of names: ${t$4}.`
12131
12133
  };
12132
12134
  let n = /* @__PURE__ */ new Set();
12133
12135
  for (let t of a) {
@@ -12171,8 +12173,8 @@ var e$4 = (e, t, { keepEmpty: n = !1, closeEndsPart: r = !1 } = {}) => {
12171
12173
  }
12172
12174
  return c(), i;
12173
12175
  };
12174
- var t$4 = (e) => /\s/.test(e);
12175
- var n$2 = (e, t, n = !1) => n ? t : `${e}:${t};`;
12176
+ var t$3 = (e) => /\s/.test(e);
12177
+ var n$3 = (e, t, n = !1) => n ? t : `${e}:${t};`;
12176
12178
  var r$1 = (e) => {
12177
12179
  if (!e) return [];
12178
12180
  let t = [];
@@ -12187,9 +12189,9 @@ var i$3 = (e, t, r, i = !1) => {
12187
12189
  variables: {},
12188
12190
  value: ""
12189
12191
  }, o = r.replaceAll("\"", "").match(/var\((?<variableName>--[\w-]+)\)(?<extraContent>\S.+)/);
12190
- if (!o || !o.groups) return a.value = n$2(t, r, i), a;
12192
+ if (!o || !o.groups) return a.value = n$3(t, r, i), a;
12191
12193
  let { variableName: s, extraContent: c } = o.groups, l = `${s}-parsed`, u = `var(${s})+"${c}"`;
12192
- return e.variables[l] && e.variables[l] !== u && (l = `${l}-${Object.keys(e.variables).length}`), a.variables[l] = u, a.value = n$2(t, `var(${l})`, i), a;
12194
+ 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;
12193
12195
  };
12194
12196
  var a$2 = (e, t, r, a, o = !1) => {
12195
12197
  let s = {
@@ -12201,15 +12203,15 @@ var a$2 = (e, t, r, a, o = !1) => {
12201
12203
  s.variables = {
12202
12204
  ...s.variables,
12203
12205
  ...c.variables
12204
- }, s.value = n$2(t, `${r}(${c.value})`, o);
12205
- } else s.value = n$2(t, `${r}(${a})`, o);
12206
+ }, s.value = n$3(t, `${r}(${c.value})`, o);
12207
+ } else s.value = n$3(t, `${r}(${a})`, o);
12206
12208
  return s;
12207
12209
  };
12208
12210
  var o$6 = (n, r, s, c = !1, l = !1) => {
12209
12211
  let u = {
12210
12212
  variables: {},
12211
12213
  value: ""
12212
- }, d = e$4(s.replace(/\s*;\s*$/, ""), t$4, { closeEndsPart: !0 });
12214
+ }, d = e$4(s.replace(/\s*;\s*$/, ""), t$3, { closeEndsPart: !0 });
12213
12215
  if (!c && d.length > 1) return d.forEach((e) => {
12214
12216
  let t = o$6(n, r, e, !0, l);
12215
12217
  u.variables = {
@@ -12304,31 +12306,30 @@ var e$3 = (e) => {
12304
12306
  };
12305
12307
  //#endregion
12306
12308
  //#region ../sdk-style/dist/helpers/processSelectorVariables.mjs
12307
- var t$3 = (t) => {
12308
- let { variables: n } = t;
12309
- if (!n || !Object.keys(n).length) return;
12310
- let r = {
12309
+ var n$2 = (n) => {
12310
+ let { variables: r } = n;
12311
+ if (!r || !Object.keys(r).length) return;
12312
+ let i = {
12311
12313
  default: [],
12312
12314
  light: [],
12313
12315
  dark: []
12314
12316
  };
12315
- return Object.keys(n).forEach((t) => {
12316
- let i = n[t];
12317
- if (i) switch (t) {
12317
+ return Object.entries(r).forEach(([n, r]) => {
12318
+ switch (n$17(n) ? n : e$24.CUSTOM) {
12318
12319
  case e$24.COLOR:
12319
- Object.keys(i).forEach((e) => {
12320
- let t = i[e];
12321
- r.default.push(`--${e}:${t.default};`), t.light && r.light.push(`--${e}:${t.light};`), t.dark && r.dark.push(`--${e}:${t.dark};`);
12320
+ Object.keys(r).forEach((e) => {
12321
+ let t = r[e];
12322
+ i.default.push(`--${e}:${t.default};`), t.light && i.light.push(`--${e}:${t.light};`), t.dark && i.dark.push(`--${e}:${t.dark};`);
12322
12323
  });
12323
12324
  break;
12324
12325
  case e$24.SPACING:
12325
12326
  case e$24.SHADOW:
12326
12327
  case e$24.CUSTOM:
12327
- default: Object.keys(i).forEach((e) => {
12328
- r.default.push(`--${e}:${i[e]};`);
12328
+ default: Object.keys(r).forEach((e) => {
12329
+ i.default.push(`--${e}:${r[e]};`);
12329
12330
  });
12330
12331
  }
12331
- }), r;
12332
+ }), i;
12332
12333
  };
12333
12334
  //#endregion
12334
12335
  //#region ../sdk-style/dist/helpers/processSelector.mjs
@@ -12400,7 +12401,7 @@ var h$1 = (e, t, n = !0, r = o$5) => {
12400
12401
  return n ? `${e}{${i.join("")}}` : `${e} {\n${i.join("\n\n")}\n}`;
12401
12402
  };
12402
12403
  var g = (r, i = !0) => {
12403
- let a = e$3(r), o = t$3(r), s = d$1(r), u = o ? l$1(a, o, i) : void 0;
12404
+ let a = e$3(r), o = n$2(r), s = d$1(r), u = o ? l$1(a, o, i) : void 0;
12404
12405
  o && s.attributes.base.default.push(...o.default);
12405
12406
  let d = h$1(a, s.attributes, i, 0);
12406
12407
  return u ? c$1(d, u, i) : d;
@@ -15834,7 +15835,7 @@ var o$3 = (i, a) => {
15834
15835
  }, E = () => {
15835
15836
  let e = /* @__PURE__ */ new Set();
15836
15837
  _().forEach((t) => {
15837
- let n = n$7(g, t);
15838
+ let n = n$8(g, t);
15838
15839
  n.length === 0 || e.has(n[0]) || (n.forEach((t) => e.add(t)), s.push({
15839
15840
  code: "LAYOUT_CYCLE",
15840
15841
  message: `Layouts sit inside each other in a circle: ${n.join(" → ")}`,
@@ -16814,7 +16815,7 @@ var SpaceAuthor = class {
16814
16815
  assertVisitorRoles() {
16815
16816
  const roles = this.spec.settings?.visitorRoles;
16816
16817
  if (roles === void 0) return;
16817
- const checked = n$3(roles);
16818
+ const checked = n$4(roles);
16818
16819
  if (!checked.ok) throw new AuthoringError("visitor-roles", checked.problem);
16819
16820
  }
16820
16821
  /** The element about to be placed under `parentId`, and everything that one is nested in. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-authoring",
3
- "version": "0.37.10",
3
+ "version": "0.38.1",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist/index.js",
@@ -44,18 +44,18 @@
44
44
  }
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.59.2",
47
+ "@microsoft/api-extractor": "^7.59.3",
48
48
  "@plitzi/plitzi-ui": "^1.6.29",
49
- "@plitzi/sdk-elements": "0.37.10",
50
- "@plitzi/sdk-interactions": "0.37.10",
51
- "@plitzi/sdk-schema": "0.37.10",
52
- "@plitzi/sdk-shared": "0.37.10",
53
- "@plitzi/sdk-style": "0.37.10",
49
+ "@plitzi/sdk-elements": "0.38.1",
50
+ "@plitzi/sdk-interactions": "0.38.1",
51
+ "@plitzi/sdk-schema": "0.38.1",
52
+ "@plitzi/sdk-shared": "0.38.1",
53
+ "@plitzi/sdk-style": "0.38.1",
54
54
  "@types/react": "^19.3.0",
55
55
  "eslint": "^9.39.5",
56
56
  "typescript": "^6.0.3",
57
- "vite": "^8.3.1",
58
- "vite-plugin-dts": "^5.1.1",
59
- "vitest": "^5.0.1"
57
+ "vite": "^8.3.2",
58
+ "vite-plugin-dts": "^5.1.2",
59
+ "vitest": "^5.0.3"
60
60
  }
61
61
  }