@monospaced/set-core 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const pt = /* @__PURE__ */ new Set([
1
+ const bt = /* @__PURE__ */ new Set([
2
2
  "area",
3
3
  "base",
4
4
  "br",
@@ -13,38 +13,38 @@ const pt = /* @__PURE__ */ new Set([
13
13
  "track",
14
14
  "wbr"
15
15
  ]);
16
- function tt(t) {
16
+ function ot(t) {
17
17
  return t.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
18
18
  }
19
- function ct(t) {
20
- return Object.entries(t).flatMap(([n, e]) => e === !1 || e == null ? [] : e === !0 ? [n] : [`${n}="${tt(String(e))}"`]).join(" ");
19
+ function vt(t) {
20
+ return Object.entries(t).flatMap(([n, e]) => e === !1 || e == null ? [] : e === !0 ? [n] : [`${n}="${ot(String(e))}"`]).join(" ");
21
21
  }
22
22
  function h(t) {
23
- if (t.kind === "text") return tt(t.value);
23
+ if (t.kind === "text") return ot(t.value);
24
24
  if (t.kind === "raw") return t.html;
25
- const n = ct(t.attrs), e = n ? `<${t.tag} ${n}>` : `<${t.tag}>`;
26
- if (pt.has(t.tag)) return e;
25
+ const n = vt(t.attrs), e = n ? `<${t.tag} ${n}>` : `<${t.tag}>`;
26
+ if (bt.has(t.tag)) return e;
27
27
  const i = t.children.map(h).join("");
28
28
  return `${e}${i}</${t.tag}>`;
29
29
  }
30
- function q(t) {
30
+ function I(t) {
31
31
  return /^[A-Za-z][\w:-]*$/.test(t);
32
32
  }
33
33
  function k(t) {
34
34
  if (t === void 0) return;
35
35
  const n = t.trim();
36
36
  if (n) {
37
- if (!q(n))
37
+ if (!I(n))
38
38
  throw new Error(
39
39
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
40
40
  );
41
41
  return n;
42
42
  }
43
43
  }
44
- function A(t) {
44
+ function D(t) {
45
45
  return t == null ? void 0 : t.trim().replace(/\s+/g, " ") || void 0;
46
46
  }
47
- const et = {
47
+ const dt = {
48
48
  adjustment: [
49
49
  {
50
50
  tag: "g",
@@ -150,6 +150,21 @@ const et = {
150
150
  ]
151
151
  }
152
152
  ],
153
+ check: [
154
+ {
155
+ tag: "g",
156
+ attrs: {},
157
+ children: [
158
+ {
159
+ tag: "path",
160
+ attrs: {
161
+ d: "M19.5708 7.37842L10.3785 16.5708L5.42871 11.6211",
162
+ "stroke-linecap": "square"
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ ],
153
168
  "check-circle": [
154
169
  {
155
170
  tag: "g",
@@ -508,6 +523,20 @@ const et = {
508
523
  ]
509
524
  }
510
525
  ],
526
+ moon: [
527
+ {
528
+ tag: "g",
529
+ attrs: {},
530
+ children: [
531
+ {
532
+ tag: "path",
533
+ attrs: {
534
+ d: "M20.5387 14.8522C20.0408 14.9492 19.5263 15 19 15C14.5817 15 11 11.4183 11 7C11 5.54296 11.3194 4.17663 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C15.9737 21 19.3459 18.4248 20.5387 14.8522Z"
535
+ }
536
+ }
537
+ ]
538
+ }
539
+ ],
511
540
  "panel-left": [
512
541
  {
513
542
  tag: "path",
@@ -658,6 +687,49 @@ const et = {
658
687
  ]
659
688
  }
660
689
  ],
690
+ "sticky-note": [
691
+ {
692
+ tag: "g",
693
+ attrs: {},
694
+ children: [
695
+ {
696
+ tag: "path",
697
+ attrs: {
698
+ d: "M20 14H14V20M3 3H21V14L14 21H3V3Z",
699
+ "stroke-linecap": "square"
700
+ }
701
+ },
702
+ {
703
+ tag: "path",
704
+ attrs: {
705
+ d: "M7 9H17M7 13H10",
706
+ "stroke-linecap": "square"
707
+ }
708
+ }
709
+ ]
710
+ }
711
+ ],
712
+ sunny: [
713
+ {
714
+ tag: "g",
715
+ attrs: {},
716
+ children: [
717
+ {
718
+ tag: "path",
719
+ attrs: {
720
+ d: "M17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12Z"
721
+ }
722
+ },
723
+ {
724
+ tag: "path",
725
+ attrs: {
726
+ d: "M12 21V22M12 2V3M3 12H2M22 12H21M5.63603 18.3635L4.92892 19.0706M19.0711 4.92848L18.364 5.63559M5.63601 5.63563L4.9289 4.92852M19.071 19.0707L18.3639 18.3636",
727
+ "stroke-linecap": "square"
728
+ }
729
+ }
730
+ ]
731
+ }
732
+ ],
661
733
  swap: [
662
734
  {
663
735
  tag: "g",
@@ -703,13 +775,13 @@ const et = {
703
775
  ]
704
776
  }
705
777
  ]
706
- }, ve = Object.keys(et);
707
- function it(t) {
778
+ }, Ae = Object.keys(dt);
779
+ function st(t) {
708
780
  return t.map((n) => ({
709
781
  kind: "element",
710
782
  tag: n.tag,
711
783
  attrs: n.attrs,
712
- children: n.children ? it(n.children) : []
784
+ children: n.children ? st(n.children) : []
713
785
  }));
714
786
  }
715
787
  function H({
@@ -720,7 +792,7 @@ function H({
720
792
  size: r = "md",
721
793
  title: a
722
794
  }) {
723
- const o = et[i];
795
+ const o = dt[i];
724
796
  if (!o)
725
797
  throw new Error(`Unknown icon name: ${i}`);
726
798
  const d = k(n), p = a?.trim();
@@ -734,7 +806,7 @@ function H({
734
806
  tag: "title",
735
807
  attrs: { id: s },
736
808
  children: [{ kind: "text", value: p }]
737
- }), l.push(...it(o)), {
809
+ }), l.push(...st(o)), {
738
810
  kind: "element",
739
811
  tag: "svg",
740
812
  attrs: {
@@ -755,10 +827,10 @@ function H({
755
827
  children: l
756
828
  };
757
829
  }
758
- function ut(t) {
830
+ function ft(t) {
759
831
  return h(H(t));
760
832
  }
761
- const fe = {
833
+ const _e = {
762
834
  name: "icon",
763
835
  description: "Use `icon` to render a Set icon.",
764
836
  output: { element: "svg", class: "set-icon" },
@@ -872,7 +944,7 @@ const fe = {
872
944
  ]
873
945
  }
874
946
  };
875
- function G(t) {
947
+ function tt(t) {
876
948
  const {
877
949
  appearance: n = "outline",
878
950
  controls: e,
@@ -886,22 +958,22 @@ function G(t) {
886
958
  iconPlacement: l = "start",
887
959
  label: c,
888
960
  labelVisibility: u = "visible",
889
- name: b,
961
+ name: g,
890
962
  size: v = "md",
891
963
  tone: m = "default",
892
964
  type: f,
893
- value: z
894
- } = t, S = p || void 0, g = !!S;
895
- if (u !== "visible" && !g)
965
+ value: E
966
+ } = t, S = p || void 0, b = !!S;
967
+ if (u !== "visible" && !b)
896
968
  throw new Error("labelVisibility requires icon when label is not visible.");
897
- const y = g && S ? {
969
+ const y = b && S ? {
898
970
  kind: "element",
899
971
  tag: "span",
900
972
  attrs: { class: "icon-wrapper" },
901
973
  children: [
902
974
  {
903
975
  kind: "raw",
904
- html: ut({
976
+ html: ft({
905
977
  ariaHidden: !0,
906
978
  mirrored: s,
907
979
  name: S,
@@ -930,17 +1002,17 @@ function G(t) {
930
1002
  disabled: !!i,
931
1003
  form: a || void 0,
932
1004
  id: d || void 0,
933
- name: b || void 0,
1005
+ name: g || void 0,
934
1006
  type: f || "button",
935
- value: z || void 0
1007
+ value: E || void 0
936
1008
  },
937
1009
  children: y ? l === "end" ? [w, y] : [y, w] : [w]
938
1010
  };
939
1011
  }
940
- function K(t) {
941
- return h(G(t));
1012
+ function et(t) {
1013
+ return h(tt(t));
942
1014
  }
943
- const ye = {
1015
+ const De = {
944
1016
  name: "button",
945
1017
  description: "Use `button` to let users trigger actions.",
946
1018
  output: { element: "button", class: "set-button" },
@@ -1123,10 +1195,10 @@ const ye = {
1123
1195
  }
1124
1196
  ]
1125
1197
  }
1126
- }, O = "set-alert", nt = "set-alert-before-dismiss", rt = "set-alert-dismiss", N = "Dismiss alert";
1127
- function ht(t, n) {
1198
+ }, P = "set-alert", lt = "set-alert-before-dismiss", pt = "set-alert-dismiss", N = "Dismiss alert";
1199
+ function yt(t, n) {
1128
1200
  const e = n.createElement("div");
1129
- return e.setAttribute("data-part", "close"), e.innerHTML = K({
1201
+ return e.setAttribute("data-part", "close"), e.innerHTML = et({
1130
1202
  appearance: "text",
1131
1203
  icon: "close",
1132
1204
  label: t,
@@ -1135,7 +1207,7 @@ function ht(t, n) {
1135
1207
  tone: "neutral"
1136
1208
  }), e;
1137
1209
  }
1138
- function kt(t) {
1210
+ function wt(t) {
1139
1211
  switch (t) {
1140
1212
  case "success":
1141
1213
  return "check-circle";
@@ -1143,14 +1215,16 @@ function kt(t) {
1143
1215
  return "error-triangle";
1144
1216
  case "error":
1145
1217
  return "error-circle";
1146
- default:
1218
+ case "info":
1147
1219
  return "info-circle";
1220
+ default:
1221
+ return "sticky-note";
1148
1222
  }
1149
1223
  }
1150
- function mt(t) {
1224
+ function St(t) {
1151
1225
  return t === "warning" || t === "error" ? "alert" : "status";
1152
1226
  }
1153
- function gt({
1227
+ function xt({
1154
1228
  dismissible: t,
1155
1229
  dismissibleLabel: n = N,
1156
1230
  id: e,
@@ -1173,7 +1247,7 @@ function gt({
1173
1247
  children: [{ kind: "text", value: r }]
1174
1248
  }), {
1175
1249
  kind: "element",
1176
- tag: O,
1250
+ tag: P,
1177
1251
  attrs: {
1178
1252
  class: "set-alert",
1179
1253
  "data-dismissible": t,
@@ -1182,7 +1256,7 @@ function gt({
1182
1256
  "data-size": a,
1183
1257
  "data-tone": o || void 0,
1184
1258
  id: p,
1185
- role: mt(o)
1259
+ role: St(o)
1186
1260
  },
1187
1261
  children: [
1188
1262
  {
@@ -1192,7 +1266,7 @@ function gt({
1192
1266
  children: [
1193
1267
  H({
1194
1268
  ariaHidden: !0,
1195
- name: kt(o),
1269
+ name: wt(o),
1196
1270
  size: a
1197
1271
  })
1198
1272
  ]
@@ -1206,24 +1280,24 @@ function gt({
1206
1280
  ]
1207
1281
  };
1208
1282
  }
1209
- function we(t) {
1210
- return h(gt(t));
1283
+ function He(t) {
1284
+ return h(xt(t));
1211
1285
  }
1212
- function bt() {
1213
- if (customElements.get(O)) return;
1286
+ function Et() {
1287
+ if (customElements.get(P)) return;
1214
1288
  class t extends HTMLElement {
1215
1289
  #t = (e) => {
1216
1290
  const i = e.target;
1217
1291
  if (!(i instanceof Element) || !i.closest('[data-part="close"]')) return;
1218
1292
  const r = new CustomEvent(
1219
- nt,
1293
+ lt,
1220
1294
  {
1221
1295
  bubbles: !0,
1222
1296
  cancelable: !0
1223
1297
  }
1224
1298
  );
1225
1299
  this.dispatchEvent(r) && (this.dispatchEvent(
1226
- new CustomEvent(rt, {
1300
+ new CustomEvent(pt, {
1227
1301
  bubbles: !0
1228
1302
  })
1229
1303
  ), this.remove());
@@ -1236,20 +1310,20 @@ function bt() {
1236
1310
  }
1237
1311
  #e() {
1238
1312
  this.querySelector('[data-part="close"]') || this.append(
1239
- ht(
1313
+ yt(
1240
1314
  this.getAttribute("data-dismissible-label") ?? N,
1241
1315
  this.ownerDocument
1242
1316
  )
1243
1317
  );
1244
1318
  }
1245
1319
  }
1246
- customElements.define(O, t);
1320
+ customElements.define(P, t);
1247
1321
  }
1248
- const Se = {
1322
+ const Ne = {
1249
1323
  name: "alert",
1250
1324
  description: "Use `alert` to surface short, important messages.",
1251
1325
  output: {
1252
- element: O,
1326
+ element: P,
1253
1327
  class: "set-alert"
1254
1328
  },
1255
1329
  content: {
@@ -1300,12 +1374,12 @@ const Se = {
1300
1374
  }
1301
1375
  },
1302
1376
  events: {
1303
- [nt]: {
1377
+ [lt]: {
1304
1378
  bubbles: !0,
1305
1379
  cancelable: !0,
1306
1380
  description: "Fired before the alert is removed by a dismiss action. Call `preventDefault()` to keep the alert mounted."
1307
1381
  },
1308
- [rt]: {
1382
+ [pt]: {
1309
1383
  bubbles: !0,
1310
1384
  description: "Fired after the alert has been removed by an allowed dismiss action."
1311
1385
  }
@@ -1394,11 +1468,11 @@ const Se = {
1394
1468
  ]
1395
1469
  }
1396
1470
  };
1397
- function vt(t) {
1471
+ function zt(t) {
1398
1472
  if (t)
1399
1473
  return t === !0 ? !0 : t;
1400
1474
  }
1401
- function at(t) {
1475
+ function ct(t) {
1402
1476
  const {
1403
1477
  appearance: n = "text",
1404
1478
  current: e,
@@ -1412,12 +1486,12 @@ function at(t) {
1412
1486
  rel: l,
1413
1487
  size: c = "md",
1414
1488
  target: u,
1415
- tone: b = "default",
1489
+ tone: g = "default",
1416
1490
  underline: v
1417
1491
  } = t, m = k(a), f = o?.trim() || void 0;
1418
1492
  if (s !== "visible" && !!!f)
1419
1493
  throw new Error("labelVisibility requires icon when label is not visible.");
1420
- const S = vt(i), g = f ? {
1494
+ const S = zt(i), b = f ? {
1421
1495
  kind: "element",
1422
1496
  tag: "span",
1423
1497
  attrs: { class: "icon-wrapper" },
@@ -1437,7 +1511,7 @@ function at(t) {
1437
1511
  "data-appearance": n === "text" ? void 0 : n,
1438
1512
  "data-label-visibility": s === "visible" ? void 0 : s,
1439
1513
  "data-size": c,
1440
- "data-tone": b === "neutral" ? "neutral" : void 0,
1514
+ "data-tone": g === "neutral" ? "neutral" : void 0,
1441
1515
  "data-underline": v && n === "text" ? !0 : void 0,
1442
1516
  download: S,
1443
1517
  href: r,
@@ -1445,13 +1519,13 @@ function at(t) {
1445
1519
  rel: S ? void 0 : l || void 0,
1446
1520
  target: S ? void 0 : u || void 0
1447
1521
  },
1448
- children: g ? d === "end" ? [y, g] : [g, y] : [y]
1522
+ children: b ? d === "end" ? [y, b] : [b, y] : [y]
1449
1523
  };
1450
1524
  }
1451
- function xe(t) {
1452
- return h(at(t));
1525
+ function Ve(t) {
1526
+ return h(ct(t));
1453
1527
  }
1454
- const Ee = {
1528
+ const Oe = {
1455
1529
  name: "link",
1456
1530
  description: "Use `link` to navigate to another page or resource.",
1457
1531
  output: { element: "a", class: "set-link" },
@@ -1638,10 +1712,10 @@ const Ee = {
1638
1712
  }
1639
1713
  ]
1640
1714
  }
1641
- }, B = "set-banner", ot = "set-banner-before-dismiss", dt = "set-banner-dismiss", P = "Dismiss banner";
1642
- function ft(t, n) {
1715
+ }, B = "set-banner", ut = "set-banner-before-dismiss", ht = "set-banner-dismiss", R = "Dismiss banner";
1716
+ function Ct(t, n) {
1643
1717
  const e = n.createElement("div");
1644
- return e.setAttribute("data-part", "close"), e.innerHTML = K({
1718
+ return e.setAttribute("data-part", "close"), e.innerHTML = et({
1645
1719
  appearance: "text",
1646
1720
  icon: "close",
1647
1721
  label: t,
@@ -1650,20 +1724,20 @@ function ft(t, n) {
1650
1724
  tone: "neutral"
1651
1725
  }), e;
1652
1726
  }
1653
- function yt({
1727
+ function Lt({
1654
1728
  actionHref: t,
1655
1729
  actionLabel: n,
1656
1730
  dismissible: e = !0,
1657
- dismissibleLabel: i = P,
1731
+ dismissibleLabel: i = R,
1658
1732
  id: r,
1659
1733
  message: a,
1660
1734
  tone: o
1661
1735
  }) {
1662
1736
  if (!!t != !!n)
1663
1737
  throw new Error("actionHref and actionLabel must be provided together.");
1664
- const d = k(r), p = i.trim() === "" ? P : i, s = [{ kind: "text", value: a }];
1738
+ const d = k(r), p = i.trim() === "" ? R : i, s = [{ kind: "text", value: a }];
1665
1739
  return t && n && (s.push({ kind: "text", value: " " }), s.push(
1666
- at({
1740
+ ct({
1667
1741
  href: t,
1668
1742
  label: n,
1669
1743
  underline: !0
@@ -1690,24 +1764,24 @@ function yt({
1690
1764
  ]
1691
1765
  };
1692
1766
  }
1693
- function ze(t) {
1694
- return h(yt(t));
1767
+ function Pe(t) {
1768
+ return h(Lt(t));
1695
1769
  }
1696
- function wt() {
1770
+ function Mt() {
1697
1771
  if (customElements.get(B)) return;
1698
1772
  class t extends HTMLElement {
1699
1773
  #t = (e) => {
1700
1774
  const i = e.target;
1701
1775
  if (!(i instanceof Element) || !i.closest('[data-part="close"]')) return;
1702
1776
  const r = new CustomEvent(
1703
- ot,
1777
+ ut,
1704
1778
  {
1705
1779
  bubbles: !0,
1706
1780
  cancelable: !0
1707
1781
  }
1708
1782
  );
1709
1783
  this.dispatchEvent(r) && (this.dispatchEvent(
1710
- new CustomEvent(dt, {
1784
+ new CustomEvent(ht, {
1711
1785
  bubbles: !0
1712
1786
  })
1713
1787
  ), this.remove());
@@ -1720,8 +1794,8 @@ function wt() {
1720
1794
  }
1721
1795
  #e() {
1722
1796
  this.querySelector('[data-part="close"]') || this.append(
1723
- ft(
1724
- this.getAttribute("data-dismissible-label") ?? P,
1797
+ Ct(
1798
+ this.getAttribute("data-dismissible-label") ?? R,
1725
1799
  this.ownerDocument
1726
1800
  )
1727
1801
  );
@@ -1729,7 +1803,7 @@ function wt() {
1729
1803
  }
1730
1804
  customElements.define(B, t);
1731
1805
  }
1732
- const Ce = {
1806
+ const Be = {
1733
1807
  name: "banner",
1734
1808
  description: "Use `banner` to display a prominent site-wide message.",
1735
1809
  output: { element: B, class: "set-banner" },
@@ -1751,7 +1825,7 @@ const Ce = {
1751
1825
  type: { kind: "boolean" }
1752
1826
  },
1753
1827
  dismissibleLabel: {
1754
- default: P,
1828
+ default: R,
1755
1829
  description: "Accessible label for the dismiss control.",
1756
1830
  ignoredWhen: "`dismissible` is false",
1757
1831
  type: { kind: "string" }
@@ -1769,17 +1843,17 @@ const Ce = {
1769
1843
  description: "Semantic tone.",
1770
1844
  type: {
1771
1845
  kind: "enum",
1772
- values: ["info", "success", "warning", "error"]
1846
+ values: ["info", "warning", "error"]
1773
1847
  }
1774
1848
  }
1775
1849
  },
1776
1850
  events: {
1777
- [ot]: {
1851
+ [ut]: {
1778
1852
  bubbles: !0,
1779
1853
  cancelable: !0,
1780
1854
  description: "Fired before the banner is removed by a dismiss action. Call `preventDefault()` to keep the banner mounted."
1781
1855
  },
1782
- [dt]: {
1856
+ [ht]: {
1783
1857
  bubbles: !0,
1784
1858
  description: "Fired after the banner has been removed by an allowed dismiss action."
1785
1859
  }
@@ -1817,8 +1891,219 @@ const Ce = {
1817
1891
  }
1818
1892
  ]
1819
1893
  }
1820
- }, R = "set-menu", st = "set-menu-choose";
1821
- function St({
1894
+ }, W = "set-lightswitch", mt = "set-lightswitch-change", K = "set-theme", Q = "Switch to dark theme", X = "Switch to light theme";
1895
+ function qt(t) {
1896
+ return t === "dark" ? "light" : "dark";
1897
+ }
1898
+ function It(t) {
1899
+ return t === "dark" ? "moon" : "sunny";
1900
+ }
1901
+ function nt(t, n) {
1902
+ return {
1903
+ kind: "element",
1904
+ tag: "span",
1905
+ attrs: { class: "option", "data-option": t },
1906
+ children: [
1907
+ {
1908
+ kind: "element",
1909
+ tag: "span",
1910
+ attrs: { class: "icon-wrapper" },
1911
+ children: [
1912
+ H({
1913
+ ariaHidden: !0,
1914
+ name: It(t),
1915
+ size: "fill"
1916
+ })
1917
+ ]
1918
+ },
1919
+ {
1920
+ kind: "element",
1921
+ tag: "span",
1922
+ attrs: { class: "label" },
1923
+ children: [{ kind: "text", value: n }]
1924
+ }
1925
+ ]
1926
+ };
1927
+ }
1928
+ function Tt({
1929
+ appearance: t = "text",
1930
+ id: n,
1931
+ labelDark: e = Q,
1932
+ labelLight: i = X,
1933
+ size: r = "md"
1934
+ }) {
1935
+ const a = k(n), o = e.trim() === "" ? Q : e, d = i.trim() === "" ? X : i;
1936
+ return {
1937
+ kind: "element",
1938
+ tag: W,
1939
+ attrs: {
1940
+ class: "set-lightswitch",
1941
+ id: a
1942
+ },
1943
+ children: [
1944
+ {
1945
+ kind: "element",
1946
+ tag: "button",
1947
+ attrs: {
1948
+ class: "toggle",
1949
+ "data-appearance": t,
1950
+ "data-size": r,
1951
+ type: "button"
1952
+ },
1953
+ children: [
1954
+ nt("dark", o),
1955
+ nt("light", d)
1956
+ ]
1957
+ }
1958
+ ]
1959
+ };
1960
+ }
1961
+ function Re(t) {
1962
+ return h(Tt(t));
1963
+ }
1964
+ function At() {
1965
+ if (customElements.get(W)) return;
1966
+ class t extends HTMLElement {
1967
+ #t = (e) => {
1968
+ const i = e.target;
1969
+ if (!(i instanceof Element) || !i.closest("button")) return;
1970
+ const r = qt(this.#u());
1971
+ r === this.#r() ? this.#d() : this.#n(r), this.#a(), this.dispatchEvent(
1972
+ new CustomEvent(mt, {
1973
+ bubbles: !0,
1974
+ detail: { stored: !!this.#i(), theme: r }
1975
+ })
1976
+ );
1977
+ };
1978
+ connectedCallback() {
1979
+ this.removeEventListener("click", this.#t), this.addEventListener("click", this.#t), this.#i() && this.#a();
1980
+ }
1981
+ disconnectedCallback() {
1982
+ this.removeEventListener("click", this.#t);
1983
+ }
1984
+ #e() {
1985
+ try {
1986
+ return this.ownerDocument.defaultView?.localStorage;
1987
+ } catch {
1988
+ return;
1989
+ }
1990
+ }
1991
+ #i() {
1992
+ try {
1993
+ const e = this.#e()?.getItem(K);
1994
+ return e === "light" || e === "dark" ? e : void 0;
1995
+ } catch {
1996
+ return;
1997
+ }
1998
+ }
1999
+ #n(e) {
2000
+ try {
2001
+ this.#e()?.setItem(K, e);
2002
+ } catch {
2003
+ }
2004
+ }
2005
+ #d() {
2006
+ try {
2007
+ this.#e()?.removeItem(K);
2008
+ } catch {
2009
+ }
2010
+ }
2011
+ #r() {
2012
+ const e = this.ownerDocument.defaultView;
2013
+ return !e || typeof e.matchMedia != "function" ? "light" : e.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
2014
+ }
2015
+ #c() {
2016
+ return this.closest(".set");
2017
+ }
2018
+ #s() {
2019
+ const e = this.#c()?.getAttribute("data-set-theme");
2020
+ return e === "light" || e === "dark" ? e : void 0;
2021
+ }
2022
+ #u() {
2023
+ return this.#i() ?? this.#s() ?? this.#r();
2024
+ }
2025
+ #a() {
2026
+ const e = this.#c();
2027
+ if (!e) return;
2028
+ const i = this.#i();
2029
+ i ? e.setAttribute("data-set-theme", i) : e.removeAttribute("data-set-theme");
2030
+ }
2031
+ }
2032
+ customElements.define(W, t);
2033
+ }
2034
+ const We = {
2035
+ name: "lightswitch",
2036
+ description: "Use `lightswitch` to let users toggle between light and dark themes.",
2037
+ output: { element: W, class: "set-lightswitch" },
2038
+ content: { kind: "none" },
2039
+ props: {
2040
+ appearance: {
2041
+ default: "text",
2042
+ description: "Visual appearance of the toggle button.",
2043
+ type: { kind: "enum", values: ["outline", "solid", "text"] }
2044
+ },
2045
+ id: {
2046
+ description: "DOM id.",
2047
+ type: { kind: "string" }
2048
+ },
2049
+ labelDark: {
2050
+ default: Q,
2051
+ description: "Accessible label of the switch-to-dark action.",
2052
+ type: { kind: "string" }
2053
+ },
2054
+ labelLight: {
2055
+ default: X,
2056
+ description: "Accessible label of the switch-to-light action.",
2057
+ type: { kind: "string" }
2058
+ },
2059
+ size: {
2060
+ default: "md",
2061
+ description: "Size variant.",
2062
+ type: { kind: "enum", values: ["sm", "md", "lg"] }
2063
+ }
2064
+ },
2065
+ events: {
2066
+ [mt]: {
2067
+ bubbles: !0,
2068
+ description: "Fired after activation applies a theme. `detail.theme` is the theme switched to; `detail.stored` is false when the change cleared the override to follow the system preference again."
2069
+ }
2070
+ },
2071
+ rules: {
2072
+ attributes: [
2073
+ {
2074
+ target: { on: "host" },
2075
+ attribute: "id",
2076
+ condition: { kind: "when-non-empty", prop: "id" },
2077
+ value: { kind: "prop", prop: "id" }
2078
+ },
2079
+ {
2080
+ target: { on: "descendant", selector: "button" },
2081
+ attribute: "class",
2082
+ condition: { kind: "always" },
2083
+ value: { kind: "literal", text: "toggle" }
2084
+ },
2085
+ {
2086
+ target: { on: "descendant", selector: "button" },
2087
+ attribute: "data-appearance",
2088
+ condition: { kind: "always" },
2089
+ value: { kind: "prop", prop: "appearance" }
2090
+ },
2091
+ {
2092
+ target: { on: "descendant", selector: "button" },
2093
+ attribute: "data-size",
2094
+ condition: { kind: "always" },
2095
+ value: { kind: "prop", prop: "size" }
2096
+ },
2097
+ {
2098
+ target: { on: "descendant", selector: "button" },
2099
+ attribute: "type",
2100
+ condition: { kind: "always" },
2101
+ value: { kind: "literal", text: "button" }
2102
+ }
2103
+ ]
2104
+ }
2105
+ }, U = "set-menu", kt = "set-menu-choose";
2106
+ function _t({
1822
2107
  align: t = "start",
1823
2108
  id: n,
1824
2109
  items: e,
@@ -1832,27 +2117,27 @@ function St({
1832
2117
  const s = n.trim();
1833
2118
  if (!s)
1834
2119
  throw new Error("id must be a non-empty string.");
1835
- if (!q(s))
2120
+ if (!I(s))
1836
2121
  throw new Error(
1837
2122
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
1838
2123
  );
1839
2124
  if (!Array.isArray(e))
1840
2125
  throw new Error("items must be an array.");
1841
- const l = `${s}-button`, c = `${s}-popup`, u = e.map((b) => ({
2126
+ const l = `${s}-button`, c = `${s}-popup`, u = e.map((g) => ({
1842
2127
  kind: "element",
1843
2128
  tag: "button",
1844
2129
  attrs: {
1845
- "aria-disabled": b.disabled ? "true" : void 0,
1846
- "data-item-id": b.id || void 0,
2130
+ "aria-disabled": g.disabled ? "true" : void 0,
2131
+ "data-item-id": g.id || void 0,
1847
2132
  role: "menuitem",
1848
2133
  tabindex: "-1",
1849
2134
  type: "button"
1850
2135
  },
1851
- children: [{ kind: "text", value: b.label }]
2136
+ children: [{ kind: "text", value: g.label }]
1852
2137
  }));
1853
2138
  return {
1854
2139
  kind: "element",
1855
- tag: R,
2140
+ tag: U,
1856
2141
  attrs: {
1857
2142
  class: "set-menu",
1858
2143
  "data-align": t === "start" ? void 0 : t,
@@ -1865,7 +2150,7 @@ function St({
1865
2150
  tag: "div",
1866
2151
  attrs: { "data-part": "trigger" },
1867
2152
  children: [
1868
- G({
2153
+ tt({
1869
2154
  appearance: "outline",
1870
2155
  controls: c,
1871
2156
  disclosure: !0,
@@ -1897,61 +2182,61 @@ function St({
1897
2182
  ]
1898
2183
  };
1899
2184
  }
1900
- function Me(t) {
1901
- return h(St(t));
2185
+ function Ue(t) {
2186
+ return h(_t(t));
1902
2187
  }
1903
- function xt() {
1904
- if (customElements.get(R)) return;
2188
+ function Dt() {
2189
+ if (customElements.get(U)) return;
1905
2190
  class t extends HTMLElement {
1906
2191
  #t;
1907
2192
  #e;
1908
2193
  #i;
1909
2194
  #n;
1910
2195
  connectedCallback() {
1911
- this.#l(), this.#r(!1), this.#m();
2196
+ this.#p(), this.#o(!1), this.#k();
1912
2197
  }
1913
2198
  disconnectedCallback() {
1914
- this.#l();
2199
+ this.#p();
1915
2200
  }
1916
- #a() {
2201
+ #d() {
1917
2202
  return this.querySelector(
1918
2203
  '[data-part="trigger"] .set-button'
1919
2204
  );
1920
2205
  }
1921
- #o() {
2206
+ #r() {
1922
2207
  return this.querySelector('[role="menu"]');
1923
2208
  }
1924
- #k() {
2209
+ #c() {
1925
2210
  return Array.from(
1926
2211
  this.querySelectorAll('[role="menuitem"]')
1927
2212
  );
1928
2213
  }
1929
- #p(e) {
2214
+ #s(e) {
1930
2215
  return e.getAttribute("aria-disabled") === "true";
1931
2216
  }
1932
- #c() {
2217
+ #u() {
1933
2218
  return this.hasAttribute("data-open");
1934
2219
  }
1935
- #d(e) {
1936
- const i = this.#k();
2220
+ #a(e) {
2221
+ const i = this.#c();
1937
2222
  if (i.length === 0) return;
1938
2223
  const r = (e % i.length + i.length) % i.length;
1939
2224
  i[r]?.focus();
1940
2225
  }
1941
- #s(e = 0) {
1942
- const i = this.#o(), r = this.#a();
1943
- !i || !r || (i.hidden = !1, this.setAttribute("data-open", ""), r.setAttribute("aria-expanded", "true"), this.#d(e));
2226
+ #l(e = 0) {
2227
+ const i = this.#r(), r = this.#d();
2228
+ !i || !r || (i.hidden = !1, this.setAttribute("data-open", ""), r.setAttribute("aria-expanded", "true"), this.#a(e));
1944
2229
  }
1945
- #r(e = !1) {
1946
- const i = this.#o(), r = this.#a();
2230
+ #o(e = !1) {
2231
+ const i = this.#r(), r = this.#d();
1947
2232
  !i || !r || (i.hidden = !0, this.removeAttribute("data-open"), r.setAttribute("aria-expanded", "false"), e && r.focus());
1948
2233
  }
1949
- #u(e) {
2234
+ #h(e) {
1950
2235
  const r = Array.from(
1951
2236
  this.querySelectorAll('[role="menuitem"]')
1952
2237
  ).indexOf(e);
1953
2238
  this.dispatchEvent(
1954
- new CustomEvent(st, {
2239
+ new CustomEvent(kt, {
1955
2240
  bubbles: !0,
1956
2241
  detail: {
1957
2242
  id: e.getAttribute("data-item-id") || void 0,
@@ -1961,65 +2246,65 @@ function xt() {
1961
2246
  })
1962
2247
  );
1963
2248
  }
1964
- #m() {
2249
+ #k() {
1965
2250
  this.#t = (e) => {
1966
2251
  const i = e.target;
1967
2252
  if (!(i instanceof Element)) return;
1968
2253
  if (i.closest('[data-part="trigger"] .set-button')) {
1969
- if (this.#c()) {
1970
- this.#r();
2254
+ if (this.#u()) {
2255
+ this.#o();
1971
2256
  return;
1972
2257
  }
1973
- this.#s(0);
2258
+ this.#l(0);
1974
2259
  return;
1975
2260
  }
1976
2261
  const r = i.closest('[role="menuitem"]');
1977
2262
  if (r && this.contains(r)) {
1978
- this.#p(r) || (this.#u(r), this.#r(!0));
2263
+ this.#s(r) || (this.#h(r), this.#o(!0));
1979
2264
  return;
1980
2265
  }
1981
2266
  }, this.#e = (e) => {
1982
2267
  const i = e.target;
1983
- i instanceof Node && this.#c() && !this.contains(i) && this.#r();
2268
+ i instanceof Node && this.#u() && !this.contains(i) && this.#o();
1984
2269
  }, this.#n = (e) => {
1985
- const i = this.#a(), r = this.#o();
2270
+ const i = this.#d(), r = this.#r();
1986
2271
  if (!i || !r) return;
1987
- if ((e.key === "Escape" || e.key === "Esc") && this.#c()) {
1988
- e.preventDefault(), this.#r(!0);
2272
+ if ((e.key === "Escape" || e.key === "Esc") && this.#u()) {
2273
+ e.preventDefault(), this.#o(!0);
1989
2274
  return;
1990
2275
  }
1991
- const a = this.ownerDocument.activeElement, o = this.#k(), d = o.indexOf(a);
2276
+ const a = this.ownerDocument.activeElement, o = this.#c(), d = o.indexOf(a);
1992
2277
  if (a === i) {
1993
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#s(0)), e.key === "ArrowDown" && (e.preventDefault(), this.#s(0)), e.key === "ArrowUp" && (e.preventDefault(), this.#s(o.length - 1));
2278
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#l(0)), e.key === "ArrowDown" && (e.preventDefault(), this.#l(0)), e.key === "ArrowUp" && (e.preventDefault(), this.#l(o.length - 1));
1994
2279
  return;
1995
2280
  }
1996
2281
  if (r.contains(a)) {
1997
2282
  if (a instanceof HTMLButtonElement && (e.key === "Enter" || e.key === " ")) {
1998
- e.preventDefault(), this.#p(a) || (this.#u(a), this.#r(!0));
2283
+ e.preventDefault(), this.#s(a) || (this.#h(a), this.#o(!0));
1999
2284
  return;
2000
2285
  }
2001
- e.key === "ArrowDown" && (e.preventDefault(), this.#d(d + 1)), e.key === "ArrowUp" && (e.preventDefault(), this.#d(d - 1)), e.key === "Home" && (e.preventDefault(), this.#d(0)), e.key === "End" && (e.preventDefault(), this.#d(o.length - 1)), e.key === "Tab" && this.#r(!1);
2286
+ e.key === "ArrowDown" && (e.preventDefault(), this.#a(d + 1)), e.key === "ArrowUp" && (e.preventDefault(), this.#a(d - 1)), e.key === "Home" && (e.preventDefault(), this.#a(0)), e.key === "End" && (e.preventDefault(), this.#a(o.length - 1)), e.key === "Tab" && this.#o(!1);
2002
2287
  }
2003
2288
  }, this.#i = (e) => {
2004
2289
  const i = e.relatedTarget;
2005
2290
  if (!(i instanceof Node)) {
2006
- this.#r();
2291
+ this.#o();
2007
2292
  return;
2008
2293
  }
2009
- this.contains(i) || this.#r();
2294
+ this.contains(i) || this.#o();
2010
2295
  }, this.addEventListener("click", this.#t), this.addEventListener("keydown", this.#n), this.addEventListener("focusout", this.#i), this.ownerDocument.addEventListener("click", this.#e);
2011
2296
  }
2012
- #l() {
2297
+ #p() {
2013
2298
  this.#t && this.removeEventListener("click", this.#t), this.#e && this.ownerDocument.removeEventListener("click", this.#e), this.#n && this.removeEventListener("keydown", this.#n), this.#i && this.removeEventListener("focusout", this.#i), this.#t = void 0, this.#e = void 0, this.#i = void 0, this.#n = void 0;
2014
2299
  }
2015
2300
  }
2016
- customElements.define(R, t);
2301
+ customElements.define(U, t);
2017
2302
  }
2018
- const Le = {
2303
+ const $e = {
2019
2304
  name: "menu",
2020
2305
  description: "Use `menu` to show a list of actions from a trigger button.",
2021
2306
  output: {
2022
- element: R,
2307
+ element: U,
2023
2308
  class: "set-menu"
2024
2309
  },
2025
2310
  content: {
@@ -2093,7 +2378,7 @@ const Le = {
2093
2378
  }
2094
2379
  },
2095
2380
  events: {
2096
- [st]: {
2381
+ [kt]: {
2097
2382
  bubbles: !0,
2098
2383
  description: "Fired when a menu item is activated.",
2099
2384
  detail: "{ id?: string; index: number; label: string }"
@@ -2153,15 +2438,15 @@ const Le = {
2153
2438
  }
2154
2439
  ]
2155
2440
  }
2156
- }, j = "Menu";
2157
- function Et({
2441
+ }, Y = "Menu";
2442
+ function Ht({
2158
2443
  controlsId: t,
2159
2444
  expanded: n,
2160
2445
  id: e,
2161
- label: i = j,
2446
+ label: i = Y,
2162
2447
  size: r = "md"
2163
2448
  } = {}) {
2164
- const a = k(e), o = i.trim() === "" ? j : i;
2449
+ const a = k(e), o = i.trim() === "" ? Y : i;
2165
2450
  return {
2166
2451
  kind: "element",
2167
2452
  tag: "button",
@@ -2196,10 +2481,10 @@ function Et({
2196
2481
  ]
2197
2482
  };
2198
2483
  }
2199
- function zt(t = {}) {
2200
- return h(Et(t));
2484
+ function Nt(t = {}) {
2485
+ return h(Ht(t));
2201
2486
  }
2202
- const qe = {
2487
+ const Ge = {
2203
2488
  name: "expander",
2204
2489
  description: "Use `expander` as a toggle for disclosure regions such as menus.",
2205
2490
  output: { element: "button", class: "set-expander" },
@@ -2219,7 +2504,7 @@ const qe = {
2219
2504
  type: { kind: "string" }
2220
2505
  },
2221
2506
  label: {
2222
- default: j,
2507
+ default: Y,
2223
2508
  description: "Accessible label.",
2224
2509
  type: { kind: "text" }
2225
2510
  },
@@ -2264,8 +2549,8 @@ const qe = {
2264
2549
  }
2265
2550
  ]
2266
2551
  }
2267
- }, W = "set-nav", Y = "data-set-scroll-locked";
2268
- function Ct({
2552
+ }, $ = "set-nav", rt = "data-set-scroll-locked";
2553
+ function Vt({
2269
2554
  collapsible: t,
2270
2555
  contentId: n,
2271
2556
  expanderLabel: e,
@@ -2280,7 +2565,7 @@ function Ct({
2280
2565
  throw new Error(
2281
2566
  "contentId must be a non-empty string when collapsible is set."
2282
2567
  );
2283
- if (l && !q(l))
2568
+ if (l && !I(l))
2284
2569
  throw new Error(
2285
2570
  "contentId must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2286
2571
  );
@@ -2303,7 +2588,7 @@ function Ct({
2303
2588
  }));
2304
2589
  return {
2305
2590
  kind: "element",
2306
- tag: W,
2591
+ tag: $,
2307
2592
  attrs: {
2308
2593
  class: "set-nav",
2309
2594
  "data-collapsible": t,
@@ -2342,79 +2627,79 @@ function Ct({
2342
2627
  ]
2343
2628
  };
2344
2629
  }
2345
- function Ie(t) {
2346
- return h(Ct(t));
2630
+ function Ze(t) {
2631
+ return h(Vt(t));
2347
2632
  }
2348
- function Mt() {
2349
- if (customElements.get(W)) return;
2633
+ function Ot() {
2634
+ if (customElements.get($)) return;
2350
2635
  class t extends HTMLElement {
2351
2636
  #t;
2352
2637
  #e;
2353
2638
  #i;
2354
2639
  #n;
2355
2640
  connectedCallback() {
2356
- this.#r(), this.#u(), this.#k(), this.#c(), this.#d();
2641
+ this.#o(), this.#h(), this.#c(), this.#u(), this.#a();
2357
2642
  }
2358
2643
  disconnectedCallback() {
2359
- this.#p(!1), this.#r(), this.#u();
2644
+ this.#s(!1), this.#o(), this.#h();
2360
2645
  }
2361
- #a() {
2646
+ #d() {
2362
2647
  return this.hasAttribute("data-collapsible") ? this.querySelector(".nav") : null;
2363
2648
  }
2364
- #o() {
2649
+ #r() {
2365
2650
  return this.querySelector(
2366
2651
  '[data-part="expander"] .set-expander'
2367
2652
  );
2368
2653
  }
2369
- #k() {
2370
- const e = this.#a();
2654
+ #c() {
2655
+ const e = this.#d();
2371
2656
  if (!e || e.querySelector('[data-part="expander"]')) return;
2372
2657
  const i = e.querySelector(".content");
2373
2658
  i && e.insertAdjacentHTML(
2374
2659
  "afterbegin",
2375
- `<div data-part="expander">${zt({
2660
+ `<div data-part="expander">${Nt({
2376
2661
  controlsId: i.id || void 0,
2377
2662
  label: this.getAttribute("data-expander-label") || void 0,
2378
2663
  size: this.getAttribute("data-size") === "sm" ? "md" : "lg"
2379
2664
  })}</div>`
2380
2665
  );
2381
2666
  }
2382
- #p(e) {
2383
- const i = this.#o();
2384
- !i || i.getAttribute("aria-expanded") === "true" === e || (i.setAttribute("aria-expanded", e ? "true" : "false"), this.#s(e));
2667
+ #s(e) {
2668
+ const i = this.#r();
2669
+ !i || i.getAttribute("aria-expanded") === "true" === e || (i.setAttribute("aria-expanded", e ? "true" : "false"), this.#l(e));
2385
2670
  }
2386
- #c() {
2671
+ #u() {
2387
2672
  this.#t = (e) => {
2388
2673
  const i = e.target;
2389
2674
  if (!(i instanceof Element) || !i.closest('[data-part="expander"] .set-expander')) return;
2390
- const r = this.#o();
2391
- r && this.#p(r.getAttribute("aria-expanded") !== "true");
2675
+ const r = this.#r();
2676
+ r && this.#s(r.getAttribute("aria-expanded") !== "true");
2392
2677
  }, this.addEventListener("click", this.#t);
2393
2678
  }
2394
- #d() {
2395
- const e = this.#a(), i = this.ownerDocument.defaultView;
2679
+ #a() {
2680
+ const e = this.#d(), i = this.ownerDocument.defaultView;
2396
2681
  if (!e || !i || (this.#i = (a) => {
2397
- a.key !== "Escape" && a.key !== "Esc" || this.#p(!1);
2682
+ a.key !== "Escape" && a.key !== "Esc" || this.#s(!1);
2398
2683
  }, i.addEventListener("keydown", this.#i), this.getAttribute("data-collapsible") !== "belowTablet") || typeof i.matchMedia != "function") return;
2399
2684
  const r = i.matchMedia("(min-width: 48em)");
2400
2685
  this.#e = r, this.#n = (a) => {
2401
- a.matches && this.#p(!1);
2686
+ a.matches && this.#s(!1);
2402
2687
  }, r.addEventListener("change", this.#n);
2403
2688
  }
2404
- #s(e) {
2689
+ #l(e) {
2405
2690
  const i = this.ownerDocument.documentElement;
2406
2691
  if (i) {
2407
2692
  if (e) {
2408
- i.setAttribute(Y, "");
2693
+ i.setAttribute(rt, "");
2409
2694
  return;
2410
2695
  }
2411
- i.removeAttribute(Y);
2696
+ i.removeAttribute(rt);
2412
2697
  }
2413
2698
  }
2414
- #r() {
2699
+ #o() {
2415
2700
  this.#t && (this.removeEventListener("click", this.#t), this.#t = void 0);
2416
2701
  }
2417
- #u() {
2702
+ #h() {
2418
2703
  const e = this.ownerDocument.defaultView;
2419
2704
  this.#i && e && e.removeEventListener("keydown", this.#i), this.#e && this.#n && this.#e.removeEventListener(
2420
2705
  "change",
@@ -2422,12 +2707,12 @@ function Mt() {
2422
2707
  ), this.#i = void 0, this.#n = void 0, this.#e = void 0;
2423
2708
  }
2424
2709
  }
2425
- customElements.define(W, t);
2710
+ customElements.define($, t);
2426
2711
  }
2427
- const Te = {
2712
+ const Fe = {
2428
2713
  name: "nav",
2429
2714
  description: "Use `nav` to render a primary navigation list.",
2430
- output: { element: W, class: "set-nav" },
2715
+ output: { element: $, class: "set-nav" },
2431
2716
  content: { kind: "structured", prop: "items" },
2432
2717
  props: {
2433
2718
  items: {
@@ -2539,8 +2824,8 @@ const Te = {
2539
2824
  }
2540
2825
  ]
2541
2826
  }
2542
- }, U = "set-range";
2543
- function Lt({
2827
+ }, G = "set-range";
2828
+ function Pt({
2544
2829
  description: t,
2545
2830
  disabled: n,
2546
2831
  id: e,
@@ -2553,10 +2838,10 @@ function Lt({
2553
2838
  step: s,
2554
2839
  value: l
2555
2840
  }) {
2556
- const c = e.trim(), u = t?.trim(), b = d?.trim();
2841
+ const c = e.trim(), u = t?.trim(), g = d?.trim();
2557
2842
  if (!c)
2558
2843
  throw new Error("id must be a non-empty string.");
2559
- if (!q(c))
2844
+ if (!I(c))
2560
2845
  throw new Error(
2561
2846
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2562
2847
  );
@@ -2590,7 +2875,7 @@ function Lt({
2590
2875
  id: c,
2591
2876
  max: a != null ? String(a) : void 0,
2592
2877
  min: o != null ? String(o) : void 0,
2593
- name: b || void 0,
2878
+ name: g || void 0,
2594
2879
  step: s != null ? String(s) : void 0,
2595
2880
  type: "range",
2596
2881
  value: l != null ? String(l) : void 0
@@ -2605,7 +2890,7 @@ function Lt({
2605
2890
  children: [{ kind: "text", value: u }]
2606
2891
  }), {
2607
2892
  kind: "element",
2608
- tag: U,
2893
+ tag: G,
2609
2894
  attrs: {
2610
2895
  class: "set-range",
2611
2896
  "data-inline-size": i === "fit" ? "fit" : void 0,
@@ -2614,11 +2899,11 @@ function Lt({
2614
2899
  children: m
2615
2900
  };
2616
2901
  }
2617
- function Ae(t) {
2618
- return h(Lt(t));
2902
+ function je(t) {
2903
+ return h(Pt(t));
2619
2904
  }
2620
- function qt() {
2621
- if (customElements.get(U)) return;
2905
+ function Bt() {
2906
+ if (customElements.get(G)) return;
2622
2907
  class t extends HTMLElement {
2623
2908
  #t;
2624
2909
  #e = (e) => {
@@ -2626,10 +2911,10 @@ function qt() {
2626
2911
  i instanceof HTMLInputElement && i.matches(".range") && this.#i();
2627
2912
  };
2628
2913
  connectedCallback() {
2629
- this.removeEventListener("input", this.#e), this.#a(), this.#i(), this.addEventListener("input", this.#e);
2914
+ this.removeEventListener("input", this.#e), this.#d(), this.#i(), this.addEventListener("input", this.#e);
2630
2915
  }
2631
2916
  disconnectedCallback() {
2632
- this.removeEventListener("input", this.#e), this.#o();
2917
+ this.removeEventListener("input", this.#e), this.#r();
2633
2918
  }
2634
2919
  #i() {
2635
2920
  const e = this.querySelector(".range"), i = this.querySelector(".output");
@@ -2647,10 +2932,10 @@ function qt() {
2647
2932
  // not fire an `input` event, so the output wouldn't track it. Override
2648
2933
  // the instance's `value` accessor to sync the output on set, restoring
2649
2934
  // the prototype behaviour on disconnect.
2650
- #a() {
2935
+ #d() {
2651
2936
  const e = this.querySelector(".range");
2652
2937
  if (!e || e === this.#t) return;
2653
- this.#o();
2938
+ this.#r();
2654
2939
  const i = Object.getOwnPropertyDescriptor(
2655
2940
  HTMLInputElement.prototype,
2656
2941
  "value"
@@ -2668,16 +2953,16 @@ function qt() {
2668
2953
  }
2669
2954
  }), this.#t = e;
2670
2955
  }
2671
- #o() {
2956
+ #r() {
2672
2957
  this.#t && (delete this.#t.value, this.#t = void 0);
2673
2958
  }
2674
2959
  }
2675
- customElements.define(U, t);
2960
+ customElements.define(G, t);
2676
2961
  }
2677
- const _e = {
2962
+ const Ke = {
2678
2963
  name: "range",
2679
2964
  description: "Use `range` to let users pick a numeric value along a scale.",
2680
- output: { element: U, class: "set-range" },
2965
+ output: { element: G, class: "set-range" },
2681
2966
  content: { kind: "text", prop: "label" },
2682
2967
  props: {
2683
2968
  description: {
@@ -2806,9 +3091,9 @@ const _e = {
2806
3091
  }
2807
3092
  ]
2808
3093
  }
2809
- }, $ = "set-sidebar", It = "(min-width: 68em)", T = "Collapse sidebar", F = "Open sidebar";
2810
- function Tt(t, n) {
2811
- return `<div data-part="close">${K({
3094
+ }, Z = "set-sidebar", Rt = "(min-width: 68em)", _ = "Collapse sidebar", J = "Open sidebar";
3095
+ function Wt(t, n) {
3096
+ return `<div data-part="close">${et({
2812
3097
  appearance: "text",
2813
3098
  icon: "panel-left",
2814
3099
  iconMirrored: "rtl",
@@ -2819,21 +3104,21 @@ function Tt(t, n) {
2819
3104
  type: "button"
2820
3105
  })}</div>`;
2821
3106
  }
2822
- function At({
3107
+ function Ut({
2823
3108
  aboveNotebook: t = "persistent",
2824
3109
  buttonSize: n = "md",
2825
3110
  children: e,
2826
- collapseLabel: i = T,
3111
+ collapseLabel: i = _,
2827
3112
  footer: r,
2828
3113
  header: a,
2829
3114
  id: o,
2830
3115
  surface: d,
2831
- triggerLabel: p = F
3116
+ triggerLabel: p = J
2832
3117
  }) {
2833
- const s = o.trim(), l = i.trim() || T, c = p.trim() || F;
3118
+ const s = o.trim(), l = i.trim() || _, c = p.trim() || J;
2834
3119
  if (!s)
2835
3120
  throw new Error("id must be a non-empty string.");
2836
- if (!q(s))
3121
+ if (!I(s))
2837
3122
  throw new Error(
2838
3123
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2839
3124
  );
@@ -2857,14 +3142,14 @@ function At({
2857
3142
  attrs: { class: "footer" },
2858
3143
  children: [{ kind: "raw", html: r }]
2859
3144
  });
2860
- const b = `${s}-panel`;
3145
+ const g = `${s}-panel`;
2861
3146
  return {
2862
3147
  kind: "element",
2863
- tag: $,
3148
+ tag: Z,
2864
3149
  attrs: {
2865
3150
  class: "set-sidebar",
2866
3151
  "data-above-notebook": t,
2867
- "data-collapse-label": l !== T ? l : void 0,
3152
+ "data-collapse-label": l !== _ ? l : void 0,
2868
3153
  "data-button-size": n,
2869
3154
  id: s
2870
3155
  },
@@ -2874,9 +3159,9 @@ function At({
2874
3159
  tag: "div",
2875
3160
  attrs: { "data-part": "trigger" },
2876
3161
  children: [
2877
- G({
3162
+ tt({
2878
3163
  appearance: "text",
2879
- controls: b,
3164
+ controls: g,
2880
3165
  disclosure: !0,
2881
3166
  icon: "panel-left",
2882
3167
  iconMirrored: "rtl",
@@ -2894,7 +3179,7 @@ function At({
2894
3179
  attrs: {
2895
3180
  class: "sidebar",
2896
3181
  "data-set-surface": d,
2897
- id: b,
3182
+ id: g,
2898
3183
  tabindex: "-1"
2899
3184
  },
2900
3185
  children: u
@@ -2908,18 +3193,18 @@ function At({
2908
3193
  ]
2909
3194
  };
2910
3195
  }
2911
- function De(t) {
2912
- return h(At(t));
3196
+ function Qe(t) {
3197
+ return h(Ut(t));
2913
3198
  }
2914
- function _t() {
2915
- if (customElements.get($)) return;
3199
+ function $t() {
3200
+ if (customElements.get(Z)) return;
2916
3201
  class t extends HTMLElement {
2917
3202
  #t;
2918
3203
  #e;
2919
3204
  #i;
2920
3205
  #n;
2921
3206
  connectedCallback() {
2922
- this.#v(), this.#s(), this.#g(), this.#f();
3207
+ this.#v(), this.#l(), this.#g(), this.#f();
2923
3208
  }
2924
3209
  disconnectedCallback() {
2925
3210
  this.close(), this.#v();
@@ -2930,99 +3215,99 @@ function _t() {
2930
3215
  close() {
2931
3216
  this.#b(!1);
2932
3217
  }
2933
- #a() {
3218
+ #d() {
2934
3219
  return this.querySelector(".sidebar");
2935
3220
  }
2936
- #o() {
3221
+ #r() {
2937
3222
  return this.querySelector(
2938
3223
  '[data-part="close"] .set-button'
2939
3224
  );
2940
3225
  }
2941
- #k() {
3226
+ #c() {
2942
3227
  return this.querySelector(
2943
3228
  '[data-part="trigger"] .set-button'
2944
3229
  );
2945
3230
  }
2946
- #p() {
3231
+ #s() {
2947
3232
  return this.hasAttribute("data-open");
2948
3233
  }
2949
- #c() {
3234
+ #u() {
2950
3235
  return this.hasAttribute("data-collapsed");
2951
3236
  }
2952
- #d() {
3237
+ #a() {
2953
3238
  const e = this.getAttribute("data-above-notebook");
2954
3239
  return e === "collapsible" || e === "overlay" ? e : "persistent";
2955
3240
  }
2956
- #s() {
2957
- const e = this.#a();
3241
+ #l() {
3242
+ const e = this.#d();
2958
3243
  if (!e || e.querySelector('[data-part="close"]')) return;
2959
- const i = e.querySelector(".header"), r = this.getAttribute("data-collapse-label") || T, a = this.getAttribute("data-button-size") ?? "md";
3244
+ const i = e.querySelector(".header"), r = this.getAttribute("data-collapse-label") || _, a = this.getAttribute("data-button-size") ?? "md";
2960
3245
  i?.insertAdjacentHTML(
2961
3246
  "beforeend",
2962
- Tt(r, a)
3247
+ Wt(r, a)
2963
3248
  );
2964
3249
  }
2965
- #r() {
3250
+ #o() {
2966
3251
  this.querySelector('[data-part="close"]')?.remove();
2967
3252
  }
2968
- #u() {
2969
- const e = this.#o();
3253
+ #h() {
3254
+ const e = this.#r();
2970
3255
  if (e) {
2971
3256
  e.focus();
2972
3257
  return;
2973
3258
  }
2974
- this.#a()?.focus();
3259
+ this.#d()?.focus();
2975
3260
  }
2976
- #m() {
3261
+ #k() {
2977
3262
  return this.#t?.matches ?? !1;
2978
3263
  }
2979
- #l({
3264
+ #p({
2980
3265
  collapsed: e,
2981
3266
  open: i
2982
3267
  }) {
2983
- const r = this.#k();
3268
+ const r = this.#c();
2984
3269
  this.toggleAttribute("data-open", i), this.toggleAttribute("data-collapsed", e), r?.setAttribute("aria-expanded", i ? "true" : "false");
2985
3270
  }
2986
3271
  #g() {
2987
- const e = this.#d();
2988
- if (this.#m()) {
3272
+ const e = this.#a();
3273
+ if (this.#k()) {
2989
3274
  if (e === "overlay") {
2990
- this.#s(), this.#l({ collapsed: !1, open: !1 }), this.#h(!1);
3275
+ this.#l(), this.#p({ collapsed: !1, open: !1 }), this.#m(!1);
2991
3276
  return;
2992
3277
  }
2993
3278
  if (e === "collapsible") {
2994
- this.#s(), this.#l({
2995
- collapsed: this.#c(),
3279
+ this.#l(), this.#p({
3280
+ collapsed: this.#u(),
2996
3281
  open: !0
2997
- }), this.#h(!1);
3282
+ }), this.#m(!1);
2998
3283
  return;
2999
3284
  }
3000
- this.#r(), this.#l({ collapsed: !1, open: !0 }), this.#h(!1);
3285
+ this.#o(), this.#p({ collapsed: !1, open: !0 }), this.#m(!1);
3001
3286
  return;
3002
3287
  }
3003
- this.#s(), this.#l({ collapsed: !1, open: !1 }), this.#h(!1);
3288
+ this.#l(), this.#p({ collapsed: !1, open: !1 }), this.#m(!1);
3004
3289
  }
3005
3290
  #b(e) {
3006
- const i = this.#d();
3007
- if (this.#m()) {
3291
+ const i = this.#a();
3292
+ if (this.#k()) {
3008
3293
  if (i === "persistent") {
3009
- this.#l({ collapsed: !1, open: !0 }), this.#h(!1);
3294
+ this.#p({ collapsed: !1, open: !0 }), this.#m(!1);
3010
3295
  return;
3011
3296
  }
3012
3297
  if (i === "collapsible") {
3013
- this.#l({ collapsed: !e, open: !0 }), this.#h(!1), e && this.#u();
3298
+ this.#p({ collapsed: !e, open: !0 }), this.#m(!1), e && this.#h();
3014
3299
  return;
3015
3300
  }
3016
3301
  }
3017
- if (this.#p() !== e) {
3302
+ if (this.#s() !== e) {
3018
3303
  if (e) {
3019
- this.#l({ collapsed: !1, open: !0 }), this.#h(!0), this.#u();
3304
+ this.#p({ collapsed: !1, open: !0 }), this.#m(!0), this.#h();
3020
3305
  return;
3021
3306
  }
3022
- this.#l({ collapsed: !1, open: !1 }), this.#h(!1), this.#k()?.focus();
3307
+ this.#p({ collapsed: !1, open: !1 }), this.#m(!1), this.#c()?.focus();
3023
3308
  }
3024
3309
  }
3025
- #h(e) {
3310
+ #m(e) {
3026
3311
  const i = this.ownerDocument.documentElement;
3027
3312
  if (i) {
3028
3313
  if (e) {
@@ -3034,7 +3319,7 @@ function _t() {
3034
3319
  }
3035
3320
  #f() {
3036
3321
  const e = this.ownerDocument.defaultView;
3037
- e && (typeof e.matchMedia == "function" && (this.#t = e.matchMedia(It), this.#n = () => {
3322
+ e && (typeof e.matchMedia == "function" && (this.#t = e.matchMedia(Rt), this.#n = () => {
3038
3323
  this.#g();
3039
3324
  }, this.#t.addEventListener("change", this.#n), this.#g()), this.#e = (i) => {
3040
3325
  const r = i.target;
@@ -3044,8 +3329,8 @@ function _t() {
3044
3329
  return;
3045
3330
  }
3046
3331
  if (r.closest('[data-part="close"] .set-button')) {
3047
- if (this.#m() && this.#d() === "collapsible") {
3048
- this.#b(this.#c());
3332
+ if (this.#k() && this.#a() === "collapsible") {
3333
+ this.#b(this.#u());
3049
3334
  return;
3050
3335
  }
3051
3336
  this.close();
@@ -3061,13 +3346,13 @@ function _t() {
3061
3346
  this.#e && this.removeEventListener("click", this.#e), this.#i && this.removeEventListener("keydown", this.#i), this.#t && this.#n && this.#t.removeEventListener("change", this.#n), this.#e = void 0, this.#i = void 0, this.#t = void 0, this.#n = void 0;
3062
3347
  }
3063
3348
  }
3064
- customElements.define($, t);
3349
+ customElements.define(Z, t);
3065
3350
  }
3066
- const Ne = {
3351
+ const Xe = {
3067
3352
  name: "sidebar",
3068
3353
  description: "Use `sidebar` for a side panel alongside main content.",
3069
3354
  output: {
3070
- element: $,
3355
+ element: Z,
3071
3356
  class: "set-sidebar"
3072
3357
  },
3073
3358
  content: {
@@ -3097,7 +3382,7 @@ const Ne = {
3097
3382
  type: { kind: "html" }
3098
3383
  },
3099
3384
  collapseLabel: {
3100
- default: T,
3385
+ default: _,
3101
3386
  description: "Accessible label for the collapse button.",
3102
3387
  type: { kind: "string" }
3103
3388
  },
@@ -3122,7 +3407,7 @@ const Ne = {
3122
3407
  }
3123
3408
  },
3124
3409
  triggerLabel: {
3125
- default: F,
3410
+ default: J,
3126
3411
  description: "Accessible label for the open button.",
3127
3412
  type: { kind: "string" }
3128
3413
  }
@@ -3154,7 +3439,7 @@ const Ne = {
3154
3439
  of: {
3155
3440
  kind: "when-equals",
3156
3441
  prop: "collapseLabel",
3157
- to: T
3442
+ to: _
3158
3443
  }
3159
3444
  }
3160
3445
  ]
@@ -3187,55 +3472,258 @@ const Ne = {
3187
3472
  }
3188
3473
  ]
3189
3474
  }
3475
+ }, F = "set-video";
3476
+ function Gt({
3477
+ autoPlay: t,
3478
+ controls: n,
3479
+ fit: e = "intrinsic",
3480
+ height: i,
3481
+ id: r,
3482
+ loop: a,
3483
+ muted: o,
3484
+ playsInline: d,
3485
+ poster: p,
3486
+ preload: s,
3487
+ src: l,
3488
+ width: c
3489
+ }) {
3490
+ const u = k(r), g = l.trim(), v = p?.trim();
3491
+ if (!g)
3492
+ throw new Error("src must be a non-empty string.");
3493
+ const m = {
3494
+ kind: "element",
3495
+ tag: "video",
3496
+ attrs: {
3497
+ autoplay: !!t,
3498
+ class: "video",
3499
+ controls: !!n,
3500
+ height: i ? String(i) : void 0,
3501
+ loop: !!a,
3502
+ muted: !!o,
3503
+ playsinline: !!d,
3504
+ poster: v || void 0,
3505
+ preload: s,
3506
+ src: g,
3507
+ width: c ? String(c) : void 0
3508
+ },
3509
+ children: []
3510
+ };
3511
+ return {
3512
+ kind: "element",
3513
+ tag: F,
3514
+ attrs: {
3515
+ class: "set-video",
3516
+ "data-fluid": e === "fluid",
3517
+ id: u
3518
+ },
3519
+ children: [m]
3520
+ };
3521
+ }
3522
+ function Ye(t) {
3523
+ return h(Gt(t));
3524
+ }
3525
+ const Zt = "(prefers-reduced-motion: reduce)";
3526
+ function Ft() {
3527
+ if (customElements.get(F)) return;
3528
+ class t extends HTMLElement {
3529
+ #t = !1;
3530
+ #e;
3531
+ #i;
3532
+ connectedCallback() {
3533
+ const e = this.querySelector("video");
3534
+ if (!e || (this.#t ||= e.hasAttribute("autoplay"), !this.#t)) return;
3535
+ const i = this.ownerDocument.defaultView;
3536
+ !i || typeof i.matchMedia != "function" || (this.#e = i.matchMedia(Zt), this.#i = () => {
3537
+ this.#n();
3538
+ }, this.#e.addEventListener("change", this.#i), this.#n());
3539
+ }
3540
+ disconnectedCallback() {
3541
+ this.#e && this.#i && this.#e.removeEventListener("change", this.#i), this.#e = void 0, this.#i = void 0;
3542
+ }
3543
+ #n() {
3544
+ const e = this.querySelector("video");
3545
+ !e || !this.#e || (this.#e.matches ? (e.removeAttribute("autoplay"), e.pause()) : (e.setAttribute("autoplay", ""), e.paused && e.play()?.catch?.(() => {
3546
+ })));
3547
+ }
3548
+ }
3549
+ customElements.define(F, t);
3550
+ }
3551
+ const Je = {
3552
+ name: "video",
3553
+ description: "Use `video` to render a video with intrinsic or fluid fit and native playback behavior.",
3554
+ output: { element: F, class: "set-video" },
3555
+ content: { kind: "none" },
3556
+ props: {
3557
+ autoPlay: {
3558
+ default: !1,
3559
+ description: "Starts playback automatically. Browsers only honor this when `muted` is also set. Suspended when the user prefers reduced motion.",
3560
+ type: { kind: "boolean" }
3561
+ },
3562
+ controls: {
3563
+ default: !1,
3564
+ description: "Shows the browser's native playback controls.",
3565
+ type: { kind: "boolean" }
3566
+ },
3567
+ fit: {
3568
+ default: "intrinsic",
3569
+ description: "Layout mode. `intrinsic` renders at the video's own dimensions, `fluid` scales to the container's full inline size at the video's aspect ratio.",
3570
+ type: { kind: "enum", values: ["intrinsic", "fluid"] }
3571
+ },
3572
+ height: {
3573
+ description: "Intrinsic height in pixels. With `width`, reserves the correctly shaped box before the media loads; rendered height always follows the aspect ratio.",
3574
+ type: { kind: "number" }
3575
+ },
3576
+ id: {
3577
+ description: "DOM id.",
3578
+ type: { kind: "string" }
3579
+ },
3580
+ loop: {
3581
+ default: !1,
3582
+ description: "Restarts playback when the video ends.",
3583
+ type: { kind: "boolean" }
3584
+ },
3585
+ muted: {
3586
+ default: !1,
3587
+ description: "Starts playback silent. Required for `autoPlay` to take effect in most browsers.",
3588
+ type: { kind: "boolean" }
3589
+ },
3590
+ playsInline: {
3591
+ default: !1,
3592
+ description: "Plays inline instead of fullscreen on iOS. Required for `autoPlay` on iOS.",
3593
+ type: { kind: "boolean" }
3594
+ },
3595
+ poster: {
3596
+ description: "Image URL shown before playback begins.",
3597
+ type: { kind: "string" }
3598
+ },
3599
+ preload: {
3600
+ description: "Preload hint. Omitted by default, deferring to the browser.",
3601
+ type: { kind: "enum", values: ["auto", "metadata", "none"] }
3602
+ },
3603
+ src: {
3604
+ description: "Video source URL.",
3605
+ required: !0,
3606
+ type: { kind: "string" }
3607
+ },
3608
+ width: {
3609
+ description: "Intrinsic width in pixels. Sets the rendered width, capped at the container; under `fluid`, an aspect-ratio hint only.",
3610
+ type: { kind: "number" }
3611
+ }
3612
+ },
3613
+ events: {},
3614
+ rules: {
3615
+ attributes: [
3616
+ {
3617
+ target: { on: "host" },
3618
+ attribute: "data-fluid",
3619
+ condition: { kind: "when-equals", prop: "fit", to: "fluid" }
3620
+ },
3621
+ {
3622
+ target: { on: "host" },
3623
+ attribute: "id",
3624
+ condition: { kind: "when-non-empty", prop: "id" },
3625
+ value: { kind: "prop", prop: "id" }
3626
+ },
3627
+ {
3628
+ target: { on: "descendant", selector: "video" },
3629
+ attribute: "class",
3630
+ condition: { kind: "always" },
3631
+ value: { kind: "literal", text: "video" }
3632
+ },
3633
+ {
3634
+ target: { on: "descendant", selector: "video" },
3635
+ attribute: "src",
3636
+ condition: { kind: "always" },
3637
+ value: { kind: "template", pattern: "{src}" }
3638
+ },
3639
+ {
3640
+ target: { on: "descendant", selector: "video" },
3641
+ attribute: "autoplay",
3642
+ condition: { kind: "when-truthy", prop: "autoPlay" }
3643
+ },
3644
+ {
3645
+ target: { on: "descendant", selector: "video" },
3646
+ attribute: "controls",
3647
+ condition: { kind: "when-truthy", prop: "controls" }
3648
+ },
3649
+ {
3650
+ target: { on: "descendant", selector: "video" },
3651
+ attribute: "loop",
3652
+ condition: { kind: "when-truthy", prop: "loop" }
3653
+ },
3654
+ {
3655
+ target: { on: "descendant", selector: "video" },
3656
+ attribute: "muted",
3657
+ condition: { kind: "when-truthy", prop: "muted" }
3658
+ },
3659
+ {
3660
+ target: { on: "descendant", selector: "video" },
3661
+ attribute: "playsinline",
3662
+ condition: { kind: "when-truthy", prop: "playsInline" }
3663
+ },
3664
+ {
3665
+ target: { on: "descendant", selector: "video" },
3666
+ attribute: "poster",
3667
+ condition: { kind: "when-non-empty", prop: "poster" },
3668
+ value: { kind: "prop", prop: "poster" }
3669
+ },
3670
+ {
3671
+ target: { on: "descendant", selector: "video" },
3672
+ attribute: "preload",
3673
+ condition: { kind: "when-provided", prop: "preload" },
3674
+ value: { kind: "prop", prop: "preload" }
3675
+ }
3676
+ ]
3677
+ }
3190
3678
  };
3191
- function Dt(t) {
3679
+ function jt(t) {
3192
3680
  return t ? /[A-Za-z]/.test(t) : !1;
3193
3681
  }
3194
- function Nt(t) {
3682
+ function Kt(t) {
3195
3683
  return /^[a-z]/.test(t);
3196
3684
  }
3197
- function I(t) {
3685
+ function T(t) {
3198
3686
  const n = t.charAt(0);
3199
- return Dt(n) ? n : void 0;
3687
+ return jt(n) ? n : void 0;
3200
3688
  }
3201
- function Ht(t) {
3202
- const n = A(t);
3689
+ function Qt(t) {
3690
+ const n = D(t);
3203
3691
  if (!n) return;
3204
- const e = n.split(" "), i = I(e[0]);
3692
+ const e = n.split(" "), i = T(e[0]);
3205
3693
  if (!i) return;
3206
3694
  const r = [i.toUpperCase()];
3207
3695
  if (e.length === 1)
3208
3696
  return r[0];
3209
- const a = e.slice(1).find(Nt);
3697
+ const a = e.slice(1).find(Kt);
3210
3698
  if (a) {
3211
- const d = I(a);
3699
+ const d = T(a);
3212
3700
  return d ? `${r[0]}${d}` : void 0;
3213
3701
  }
3214
3702
  if (e.length === 2) {
3215
- const d = I(e[1]);
3703
+ const d = T(e[1]);
3216
3704
  if (!d) return;
3217
3705
  r.push(d);
3218
3706
  const p = e[1].split("-").filter(Boolean);
3219
3707
  if (p.length === 2) {
3220
- const s = I(p[1]);
3708
+ const s = T(p[1]);
3221
3709
  s && r.push(s);
3222
3710
  }
3223
3711
  return r.slice(0, 3).join("");
3224
3712
  }
3225
3713
  if (e.length === 3) {
3226
- const d = I(e[1]), p = I(e[2]);
3714
+ const d = T(e[1]), p = T(e[2]);
3227
3715
  return !d || !p ? void 0 : (r.push(d, p), r.slice(0, 3).join(""));
3228
3716
  }
3229
- const o = I(e.at(-1) || "");
3717
+ const o = T(e.at(-1) || "");
3230
3718
  if (o)
3231
3719
  return r.push(o), r.slice(0, 3).join("");
3232
3720
  }
3233
- const Vt = {
3721
+ const Xt = {
3234
3722
  bot: "robot-1",
3235
3723
  organization: "city-6",
3236
3724
  person: "user-1",
3237
3725
  team: "member"
3238
- }, J = [
3726
+ }, at = [
3239
3727
  "01",
3240
3728
  "02",
3241
3729
  "03",
@@ -3246,15 +3734,15 @@ const Vt = {
3246
3734
  "08",
3247
3735
  "09"
3248
3736
  ];
3249
- function Ot(t) {
3737
+ function Yt(t) {
3250
3738
  let n = 5381;
3251
3739
  for (const e of t)
3252
3740
  n = n * 33 ^ e.charCodeAt(0);
3253
3741
  return n >>> 0;
3254
3742
  }
3255
- function Bt(t) {
3743
+ function Jt(t) {
3256
3744
  if (t == null) return;
3257
- const n = A(t);
3745
+ const n = D(t);
3258
3746
  if (n) {
3259
3747
  if (n.length > 3)
3260
3748
  throw new Error("initials must normalize to 3 characters or fewer.");
@@ -3263,26 +3751,26 @@ function Bt(t) {
3263
3751
  return n;
3264
3752
  }
3265
3753
  }
3266
- function Pt({
3754
+ function te({
3267
3755
  alt: t,
3268
3756
  ariaHidden: n,
3269
3757
  name: e
3270
3758
  }) {
3271
3759
  if (!n)
3272
- return A(t) || A(e) || "Avatar";
3760
+ return D(t) || D(e) || "Avatar";
3273
3761
  }
3274
- function Rt({
3762
+ function ee({
3275
3763
  color: t,
3276
3764
  name: n
3277
3765
  }) {
3278
3766
  if (t) return t;
3279
3767
  if (n) {
3280
- const e = Ot(n) % J.length;
3281
- return J[e];
3768
+ const e = Yt(n) % at.length;
3769
+ return at[e];
3282
3770
  }
3283
3771
  return "neutral";
3284
3772
  }
3285
- function Wt({
3773
+ function ie({
3286
3774
  alt: t,
3287
3775
  ariaHidden: n,
3288
3776
  color: e,
@@ -3293,16 +3781,16 @@ function Wt({
3293
3781
  size: d = "md",
3294
3782
  src: p
3295
3783
  }) {
3296
- const s = k(r), l = Bt(a), c = A(o), u = A(p), b = Pt({
3784
+ const s = k(r), l = Jt(a), c = D(o), u = D(p), g = te({
3297
3785
  alt: t,
3298
3786
  ariaHidden: n,
3299
3787
  name: c
3300
- }), v = l || Ht(c), m = !!u, f = Rt({
3788
+ }), v = l || Qt(c), m = !!u, f = ee({
3301
3789
  color: e,
3302
3790
  name: c
3303
- }), z = {
3791
+ }), E = {
3304
3792
  "aria-hidden": n ? "true" : void 0,
3305
- "aria-label": !n && !m ? b : void 0,
3793
+ "aria-label": !n && !m ? g : void 0,
3306
3794
  class: "set-avatar",
3307
3795
  "data-color": f === "neutral" ? void 0 : f,
3308
3796
  "data-entity": i === "person" ? void 0 : i,
@@ -3315,7 +3803,7 @@ function Wt({
3315
3803
  kind: "element",
3316
3804
  tag: "img",
3317
3805
  attrs: {
3318
- alt: n ? "" : b || "",
3806
+ alt: n ? "" : g || "",
3319
3807
  class: "img",
3320
3808
  src: u
3321
3809
  },
@@ -3332,21 +3820,21 @@ function Wt({
3332
3820
  children: [
3333
3821
  H({
3334
3822
  ariaHidden: !0,
3335
- name: Vt[i],
3823
+ name: Xt[i],
3336
3824
  size: "fill"
3337
3825
  })
3338
3826
  ]
3339
3827
  }, {
3340
3828
  kind: "element",
3341
3829
  tag: "span",
3342
- attrs: z,
3830
+ attrs: E,
3343
3831
  children: [S]
3344
3832
  };
3345
3833
  }
3346
- function He(t) {
3347
- return h(Wt(t));
3834
+ function ti(t) {
3835
+ return h(ie(t));
3348
3836
  }
3349
- const Ve = {
3837
+ const ei = {
3350
3838
  name: "avatar",
3351
3839
  description: "Use `avatar` to visually represent a person, team, or entity.",
3352
3840
  output: { element: "span", class: "set-avatar" },
@@ -3453,7 +3941,7 @@ const Ve = {
3453
3941
  ]
3454
3942
  }
3455
3943
  };
3456
- function Ut({
3944
+ function ne({
3457
3945
  floating: t,
3458
3946
  id: n,
3459
3947
  label: e,
@@ -3474,10 +3962,10 @@ function Ut({
3474
3962
  children: [{ kind: "text", value: e }]
3475
3963
  };
3476
3964
  }
3477
- function Oe(t) {
3478
- return h(Ut(t));
3965
+ function ii(t) {
3966
+ return h(ne(t));
3479
3967
  }
3480
- const Be = {
3968
+ const ni = {
3481
3969
  name: "badge",
3482
3970
  description: "Use `badge` to annotate content with a short label.",
3483
3971
  output: { element: "span", class: "set-badge" },
@@ -3504,7 +3992,17 @@ const Be = {
3504
3992
  },
3505
3993
  tone: {
3506
3994
  description: "Semantic tone.",
3507
- type: { kind: "enum", values: ["info", "success", "warning", "error"] }
3995
+ type: {
3996
+ kind: "enum",
3997
+ values: [
3998
+ "notification",
3999
+ "live",
4000
+ "pending",
4001
+ "success",
4002
+ "warning",
4003
+ "error"
4004
+ ]
4005
+ }
3508
4006
  }
3509
4007
  },
3510
4008
  events: {},
@@ -3536,7 +4034,7 @@ const Be = {
3536
4034
  ]
3537
4035
  }
3538
4036
  };
3539
- function Z({
4037
+ function j({
3540
4038
  align: t,
3541
4039
  as: n,
3542
4040
  children: e,
@@ -3564,10 +4062,10 @@ function Z({
3564
4062
  children: [{ kind: "raw", html: e }]
3565
4063
  };
3566
4064
  }
3567
- function Pe(t) {
3568
- return h(Z(t));
4065
+ function ri(t) {
4066
+ return h(j(t));
3569
4067
  }
3570
- const Re = {
4068
+ const ai = {
3571
4069
  name: "text",
3572
4070
  description: "Use `text` for inline or paragraph body copy.",
3573
4071
  output: {
@@ -3681,7 +4179,7 @@ const Re = {
3681
4179
  ]
3682
4180
  }
3683
4181
  };
3684
- function $t({
4182
+ function re({
3685
4183
  align: t = "start",
3686
4184
  attribution: n,
3687
4185
  id: e,
@@ -3705,7 +4203,7 @@ function $t({
3705
4203
  tag: "blockquote",
3706
4204
  attrs: { class: "quote" },
3707
4205
  children: [
3708
- Z({
4206
+ j({
3709
4207
  align: t,
3710
4208
  as: "p",
3711
4209
  children: r,
@@ -3720,7 +4218,7 @@ function $t({
3720
4218
  tag: "figcaption",
3721
4219
  attrs: { class: "attribution" },
3722
4220
  children: [
3723
- Z({
4221
+ j({
3724
4222
  as: "span",
3725
4223
  children: n,
3726
4224
  responsive: a,
@@ -3731,10 +4229,10 @@ function $t({
3731
4229
  ]
3732
4230
  };
3733
4231
  }
3734
- function We(t) {
3735
- return h($t(t));
4232
+ function oi(t) {
4233
+ return h(re(t));
3736
4234
  }
3737
- const Ue = {
4235
+ const di = {
3738
4236
  name: "blockquote",
3739
4237
  description: "Use `blockquote` to display a quote with attribution.",
3740
4238
  output: { element: "figure", class: "set-blockquote" },
@@ -3803,7 +4301,7 @@ const Ue = {
3803
4301
  ]
3804
4302
  }
3805
4303
  };
3806
- function Zt({
4304
+ function ae({
3807
4305
  background: t = "default",
3808
4306
  border: n,
3809
4307
  children: e,
@@ -3832,10 +4330,10 @@ function Zt({
3832
4330
  children: e ? [{ kind: "raw", html: e }] : []
3833
4331
  };
3834
4332
  }
3835
- function $e(t) {
3836
- return h(Zt(t));
4333
+ function si(t) {
4334
+ return h(ae(t));
3837
4335
  }
3838
- const Ze = {
4336
+ const li = {
3839
4337
  name: "box",
3840
4338
  description: "Use `box` to inset content.",
3841
4339
  output: { element: "div", class: "set-box" },
@@ -3948,7 +4446,7 @@ const Ze = {
3948
4446
  ]
3949
4447
  }
3950
4448
  };
3951
- function jt({
4449
+ function oe({
3952
4450
  description: t,
3953
4451
  headingLevel: n,
3954
4452
  href: e,
@@ -4014,10 +4512,10 @@ function jt({
4014
4512
  children: c
4015
4513
  };
4016
4514
  }
4017
- function je(t) {
4018
- return h(jt(t));
4515
+ function pi(t) {
4516
+ return h(oe(t));
4019
4517
  }
4020
- const Fe = {
4518
+ const ci = {
4021
4519
  name: "card",
4022
4520
  description: "Use `card` to display a summary for a single topic.",
4023
4521
  output: {
@@ -4085,7 +4583,7 @@ const Fe = {
4085
4583
  ]
4086
4584
  }
4087
4585
  };
4088
- function Ft({
4586
+ function de({
4089
4587
  checked: t,
4090
4588
  description: n,
4091
4589
  disabled: e,
@@ -4100,7 +4598,7 @@ function Ft({
4100
4598
  const l = k(i), c = n?.trim();
4101
4599
  if (c && !l)
4102
4600
  throw new Error("id must be provided when description is provided.");
4103
- const u = c ? `${l}-description` : void 0, b = !!e, m = [
4601
+ const u = c ? `${l}-description` : void 0, g = !!e, m = [
4104
4602
  {
4105
4603
  kind: "element",
4106
4604
  tag: "label",
@@ -4111,10 +4609,10 @@ function Ft({
4111
4609
  tag: "input",
4112
4610
  attrs: {
4113
4611
  "aria-describedby": u,
4114
- "aria-invalid": !b && !!r ? "true" : void 0,
4612
+ "aria-invalid": !g && !!r ? "true" : void 0,
4115
4613
  checked: !!t,
4116
4614
  class: "checkbox",
4117
- disabled: b,
4615
+ disabled: g,
4118
4616
  id: l,
4119
4617
  name: o || void 0,
4120
4618
  required: !!d,
@@ -4144,10 +4642,10 @@ function Ft({
4144
4642
  children: m
4145
4643
  };
4146
4644
  }
4147
- function Ge(t) {
4148
- return h(Ft(t));
4645
+ function ui(t) {
4646
+ return h(de(t));
4149
4647
  }
4150
- const Ke = {
4648
+ const hi = {
4151
4649
  name: "checkbox",
4152
4650
  description: "Use `checkbox` to let users toggle a single option on or off.",
4153
4651
  output: { element: "div", class: "set-checkbox" },
@@ -4277,7 +4775,7 @@ const Ke = {
4277
4775
  ]
4278
4776
  }
4279
4777
  };
4280
- function Gt({
4778
+ function se({
4281
4779
  children: t,
4282
4780
  gutter: n = "default",
4283
4781
  id: e,
@@ -4296,10 +4794,10 @@ function Gt({
4296
4794
  children: t ? [{ kind: "raw", html: t }] : []
4297
4795
  };
4298
4796
  }
4299
- function Qe(t) {
4300
- return h(Gt(t));
4797
+ function mi(t) {
4798
+ return h(se(t));
4301
4799
  }
4302
- const Xe = {
4800
+ const ki = {
4303
4801
  name: "container",
4304
4802
  description: "Use `container` to wrap page-level content.",
4305
4803
  output: { element: "div", class: "set-container" },
@@ -4356,7 +4854,7 @@ const Xe = {
4356
4854
  ]
4357
4855
  }
4358
4856
  };
4359
- function Kt({
4857
+ function le({
4360
4858
  children: t,
4361
4859
  id: n,
4362
4860
  open: e,
@@ -4408,10 +4906,10 @@ function Kt({
4408
4906
  ]
4409
4907
  };
4410
4908
  }
4411
- function Ye(t) {
4412
- return h(Kt(t));
4909
+ function gi(t) {
4910
+ return h(le(t));
4413
4911
  }
4414
- const Je = {
4912
+ const bi = {
4415
4913
  name: "details",
4416
4914
  description: "Use `details` to let users expand and collapse a section of content.",
4417
4915
  output: { element: "details", class: "set-details" },
@@ -4470,7 +4968,7 @@ const Je = {
4470
4968
  ]
4471
4969
  }
4472
4970
  };
4473
- function Qt({
4971
+ function pe({
4474
4972
  id: t,
4475
4973
  orientation: n = "horizontal",
4476
4974
  tone: e = "default"
@@ -4489,10 +4987,10 @@ function Qt({
4489
4987
  children: []
4490
4988
  };
4491
4989
  }
4492
- function ti(t = {}) {
4493
- return h(Qt(t));
4990
+ function vi(t = {}) {
4991
+ return h(pe(t));
4494
4992
  }
4495
- const ei = {
4993
+ const fi = {
4496
4994
  name: "divider",
4497
4995
  description: "Use `divider` to separate sections with a rule.",
4498
4996
  output: {
@@ -4554,7 +5052,7 @@ const ei = {
4554
5052
  ]
4555
5053
  }
4556
5054
  };
4557
- function lt({
5055
+ function gt({
4558
5056
  children: t,
4559
5057
  description: n,
4560
5058
  disabled: e,
@@ -4566,7 +5064,7 @@ function lt({
4566
5064
  const d = n?.trim(), p = i.trim();
4567
5065
  if (!p)
4568
5066
  throw new Error("id must be a non-empty string.");
4569
- if (!q(p))
5067
+ if (!I(p))
4570
5068
  throw new Error(
4571
5069
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
4572
5070
  );
@@ -4597,10 +5095,10 @@ function lt({
4597
5095
  children: u
4598
5096
  };
4599
5097
  }
4600
- function ii(t) {
4601
- return h(lt(t));
5098
+ function yi(t) {
5099
+ return h(gt(t));
4602
5100
  }
4603
- const ni = {
5101
+ const wi = {
4604
5102
  name: "fieldset",
4605
5103
  description: "Use `fieldset` to group related form controls under a legend.",
4606
5104
  output: { element: "fieldset", class: "set-fieldset" },
@@ -4688,7 +5186,7 @@ const ni = {
4688
5186
  ]
4689
5187
  }
4690
5188
  };
4691
- function Xt({
5189
+ function ce({
4692
5190
  align: t = "start",
4693
5191
  caption: n,
4694
5192
  children: e,
@@ -4711,7 +5209,7 @@ function Xt({
4711
5209
  tag: "figcaption",
4712
5210
  attrs: { class: "figcaption" },
4713
5211
  children: [
4714
- Z({
5212
+ j({
4715
5213
  as: "span",
4716
5214
  children: n,
4717
5215
  responsive: r,
@@ -4722,10 +5220,10 @@ function Xt({
4722
5220
  ]
4723
5221
  };
4724
5222
  }
4725
- function ri(t) {
4726
- return h(Xt(t));
5223
+ function Si(t) {
5224
+ return h(ce(t));
4727
5225
  }
4728
- const ai = {
5226
+ const xi = {
4729
5227
  name: "figure",
4730
5228
  description: "Use `figure` to present media with a caption.",
4731
5229
  output: { element: "figure", class: "set-figure" },
@@ -4783,11 +5281,11 @@ const ai = {
4783
5281
  }
4784
5282
  ]
4785
5283
  }
4786
- }, M = (t) => {
5284
+ }, L = (t) => {
4787
5285
  if (t !== void 0)
4788
5286
  return String(t);
4789
5287
  };
4790
- function Yt({
5288
+ function ue({
4791
5289
  children: t,
4792
5290
  gap: n = "default",
4793
5291
  id: e
@@ -4811,10 +5309,10 @@ function Yt({
4811
5309
  ]
4812
5310
  };
4813
5311
  }
4814
- function oi(t) {
4815
- return h(Yt(t));
5312
+ function Ei(t) {
5313
+ return h(ue(t));
4816
5314
  }
4817
- function Jt({
5315
+ function he({
4818
5316
  align: t,
4819
5317
  children: n,
4820
5318
  colSpan: e,
@@ -4828,7 +5326,7 @@ function Jt({
4828
5326
  rowSpan: l,
4829
5327
  rowSpanNarrow: c,
4830
5328
  rowSpanWide: u,
4831
- rowStart: b,
5329
+ rowStart: g,
4832
5330
  rowStartNarrow: v,
4833
5331
  rowStartWide: m
4834
5332
  }) {
@@ -4840,27 +5338,27 @@ function Jt({
4840
5338
  class: "set-grid-item",
4841
5339
  "data-align": t,
4842
5340
  "data-justify": s,
4843
- "data-col-span-narrow": M(i),
4844
- "data-col-start-narrow": M(o),
4845
- "data-col-span": M(e),
4846
- "data-col-start": M(a),
4847
- "data-col-span-wide": M(r),
4848
- "data-col-start-wide": M(d),
4849
- "data-row-span-narrow": M(c),
4850
- "data-row-start-narrow": M(v),
4851
- "data-row-span": M(l),
4852
- "data-row-start": M(b),
4853
- "data-row-span-wide": M(u),
4854
- "data-row-start-wide": M(m),
5341
+ "data-col-span-narrow": L(i),
5342
+ "data-col-start-narrow": L(o),
5343
+ "data-col-span": L(e),
5344
+ "data-col-start": L(a),
5345
+ "data-col-span-wide": L(r),
5346
+ "data-col-start-wide": L(d),
5347
+ "data-row-span-narrow": L(c),
5348
+ "data-row-start-narrow": L(v),
5349
+ "data-row-span": L(l),
5350
+ "data-row-start": L(g),
5351
+ "data-row-span-wide": L(u),
5352
+ "data-row-start-wide": L(m),
4855
5353
  id: f
4856
5354
  },
4857
5355
  children: n ? [{ kind: "raw", html: n }] : []
4858
5356
  };
4859
5357
  }
4860
- function di(t) {
4861
- return h(Jt(t));
5358
+ function zi(t) {
5359
+ return h(he(t));
4862
5360
  }
4863
- const si = {
5361
+ const Ci = {
4864
5362
  name: "grid",
4865
5363
  description: "Use `grid` to lay out content in a 12-column responsive grid.",
4866
5364
  output: { element: "div", class: "set-grid" },
@@ -4901,12 +5399,12 @@ const si = {
4901
5399
  }
4902
5400
  ]
4903
5401
  }
4904
- }, L = {
5402
+ }, M = {
4905
5403
  kind: "number",
4906
5404
  min: 1,
4907
5405
  max: 12,
4908
5406
  integer: !0
4909
- }, li = {
5407
+ }, Li = {
4910
5408
  name: "grid-item",
4911
5409
  description: "Use `grid-item` to place content within a `grid` layout.",
4912
5410
  output: { element: "div", class: "set-grid-item" },
@@ -4926,11 +5424,11 @@ const si = {
4926
5424
  },
4927
5425
  colSpan: {
4928
5426
  description: "Columns spanned at the default breakpoint.",
4929
- type: L
5427
+ type: M
4930
5428
  },
4931
5429
  colStart: {
4932
5430
  description: "Starting column at the default breakpoint.",
4933
- type: L
5431
+ type: M
4934
5432
  },
4935
5433
  id: {
4936
5434
  description: "DOM id.",
@@ -4938,43 +5436,43 @@ const si = {
4938
5436
  },
4939
5437
  rowSpan: {
4940
5438
  description: "Rows spanned at the default breakpoint.",
4941
- type: L
5439
+ type: M
4942
5440
  },
4943
5441
  rowSpanNarrow: {
4944
5442
  description: "Rows spanned at the narrow breakpoint.",
4945
- type: L
5443
+ type: M
4946
5444
  },
4947
5445
  rowSpanWide: {
4948
5446
  description: "Rows spanned at the wide breakpoint. Effect is only visible above the wide breakpoint.",
4949
- type: L
5447
+ type: M
4950
5448
  },
4951
5449
  rowStart: {
4952
5450
  description: "Starting row at the default breakpoint.",
4953
- type: L
5451
+ type: M
4954
5452
  },
4955
5453
  rowStartNarrow: {
4956
5454
  description: "Starting row at the narrow breakpoint.",
4957
- type: L
5455
+ type: M
4958
5456
  },
4959
5457
  rowStartWide: {
4960
5458
  description: "Starting row at the wide breakpoint. Effect is only visible above the wide breakpoint.",
4961
- type: L
5459
+ type: M
4962
5460
  },
4963
5461
  colSpanNarrow: {
4964
5462
  description: "Columns spanned at the narrow breakpoint.",
4965
- type: L
5463
+ type: M
4966
5464
  },
4967
5465
  colStartNarrow: {
4968
5466
  description: "Starting column at the narrow breakpoint.",
4969
- type: L
5467
+ type: M
4970
5468
  },
4971
5469
  colSpanWide: {
4972
5470
  description: "Columns spanned at the wide breakpoint. Effect is only visible above the wide breakpoint.",
4973
- type: L
5471
+ type: M
4974
5472
  },
4975
5473
  colStartWide: {
4976
5474
  description: "Starting column at the wide breakpoint. Effect is only visible above the wide breakpoint.",
4977
- type: L
5475
+ type: M
4978
5476
  }
4979
5477
  },
4980
5478
  events: {},
@@ -5073,7 +5571,7 @@ const si = {
5073
5571
  ]
5074
5572
  }
5075
5573
  };
5076
- function te({
5574
+ function me({
5077
5575
  align: t = "start",
5078
5576
  id: n,
5079
5577
  level: e,
@@ -5095,10 +5593,10 @@ function te({
5095
5593
  children: [{ kind: "text", value: a }]
5096
5594
  };
5097
5595
  }
5098
- function pi(t) {
5099
- return h(te(t));
5596
+ function Mi(t) {
5597
+ return h(me(t));
5100
5598
  }
5101
- const ci = {
5599
+ const qi = {
5102
5600
  name: "heading",
5103
5601
  description: "Use `heading` to render heading text with consistent type.",
5104
5602
  output: {
@@ -5183,10 +5681,10 @@ const ci = {
5183
5681
  ]
5184
5682
  }
5185
5683
  };
5186
- function ee({
5684
+ function ke({
5187
5685
  alt: t = "",
5188
5686
  aspectRatio: n,
5189
- cover: e,
5687
+ fit: e = "intrinsic",
5190
5688
  gravity: i = "C",
5191
5689
  height: r,
5192
5690
  id: a,
@@ -5197,86 +5695,87 @@ function ee({
5197
5695
  sizes: l,
5198
5696
  sources: c,
5199
5697
  src: u,
5200
- srcSet: b,
5698
+ srcSet: g,
5201
5699
  width: v
5202
5700
  }) {
5203
- const m = k(a), f = u.trim(), z = b?.trim(), S = l?.trim(), g = c?.map((C, E) => {
5204
- const _ = C.srcSet.trim(), D = C.media?.trim(), V = C.type?.trim(), Q = C.sizes?.trim();
5205
- if (!_)
5206
- throw new Error(`sources[${E}].srcSet must be non-empty.`);
5701
+ const m = e === "cover", f = k(a), E = u.trim(), S = g?.trim(), b = l?.trim(), y = c?.map((z, C) => {
5702
+ const A = z.srcSet.trim(), V = z.media?.trim(), it = z.type?.trim(), O = z.sizes?.trim();
5703
+ if (!A)
5704
+ throw new Error(`sources[${C}].srcSet must be non-empty.`);
5207
5705
  return {
5208
- height: C.height,
5209
- media: D || void 0,
5210
- sizes: Q || void 0,
5211
- srcSet: _,
5212
- type: V || void 0,
5213
- width: C.width
5706
+ height: z.height,
5707
+ media: V || void 0,
5708
+ sizes: O || void 0,
5709
+ srcSet: A,
5710
+ type: it || void 0,
5711
+ width: z.width
5214
5712
  };
5215
5713
  }) || [];
5216
- if (!f)
5714
+ if (!E)
5217
5715
  throw new Error("src must be a non-empty string.");
5218
- const y = {
5716
+ const w = {
5219
5717
  kind: "element",
5220
5718
  tag: "img",
5221
5719
  attrs: {
5222
5720
  alt: t,
5223
5721
  class: "img",
5224
5722
  fetchpriority: d ? "high" : void 0,
5225
- height: e ? void 0 : r ? String(r) : void 0,
5723
+ height: m ? void 0 : r ? String(r) : void 0,
5226
5724
  loading: o && !d ? "lazy" : void 0,
5227
- sizes: g.length > 0 ? void 0 : S || void 0,
5228
- src: f,
5229
- srcset: z || void 0,
5230
- width: e ? void 0 : v ? String(v) : void 0
5725
+ sizes: y.length > 0 ? void 0 : b || void 0,
5726
+ src: E,
5727
+ srcset: S || void 0,
5728
+ width: m ? void 0 : v ? String(v) : void 0
5231
5729
  },
5232
5730
  children: []
5233
5731
  };
5234
- let w;
5235
- if (g.length > 0) {
5236
- const C = g.map((E) => ({
5732
+ let x;
5733
+ if (y.length > 0) {
5734
+ const z = y.map((C) => ({
5237
5735
  kind: "element",
5238
5736
  tag: "source",
5239
5737
  attrs: {
5240
- height: E.height ? String(E.height) : void 0,
5241
- media: E.media,
5242
- sizes: E.sizes,
5243
- srcset: E.srcSet,
5244
- type: E.type,
5245
- width: E.width ? String(E.width) : void 0
5738
+ height: C.height ? String(C.height) : void 0,
5739
+ media: C.media,
5740
+ sizes: C.sizes,
5741
+ srcset: C.srcSet,
5742
+ type: C.type,
5743
+ width: C.width ? String(C.width) : void 0
5246
5744
  },
5247
5745
  children: []
5248
5746
  }));
5249
- w = {
5747
+ x = {
5250
5748
  kind: "element",
5251
5749
  tag: "picture",
5252
5750
  attrs: {},
5253
- children: [...C, y]
5751
+ children: [...z, w]
5254
5752
  };
5255
5753
  } else
5256
- w = y;
5257
- const x = [];
5258
- return r && x.push(`--set-image-block-size: ${r / 16}rem`), v && x.push(`--set-image-inline-size: ${v / 16}rem`), {
5754
+ x = w;
5755
+ const q = [];
5756
+ return r && q.push(`--set-image-block-size: ${r / 16}rem`), v && q.push(`--set-image-inline-size: ${v / 16}rem`), {
5259
5757
  kind: "element",
5260
5758
  tag: "div",
5261
5759
  attrs: {
5262
5760
  class: "set-image",
5263
- "data-aspect-ratio": e && !(r && v) ? n : void 0,
5264
- "data-gravity": e && i !== "C" ? i : void 0,
5761
+ "data-aspect-ratio": m && !r ? n : void 0,
5762
+ "data-fluid": e === "fluid",
5763
+ "data-gravity": m && i !== "C" ? i : void 0,
5265
5764
  "data-shadow": !!s,
5266
- "data-object-fit": e ? "cover" : void 0,
5267
- "data-radius": p,
5268
- id: m,
5269
- style: x.length > 0 ? x.join("; ") : void 0
5765
+ "data-object-fit": m ? "cover" : void 0,
5766
+ "data-radius": !!p,
5767
+ id: f,
5768
+ style: q.length > 0 ? q.join("; ") : void 0
5270
5769
  },
5271
- children: [w]
5770
+ children: [x]
5272
5771
  };
5273
5772
  }
5274
- function ie(t) {
5275
- return h(ee(t));
5773
+ function ge(t) {
5774
+ return h(ke(t));
5276
5775
  }
5277
- const ui = {
5776
+ const Ii = {
5278
5777
  name: "image",
5279
- description: "Use `image` to render a responsive image with optional cover fit.",
5778
+ description: "Use `image` to render a responsive image with intrinsic, fluid, or cover fit, and optional art-directed `sources`.",
5280
5779
  output: { element: "div", class: "set-image" },
5281
5780
  content: { kind: "none" },
5282
5781
  props: {
@@ -5288,28 +5787,29 @@ const ui = {
5288
5787
  gravity: {
5289
5788
  default: "C",
5290
5789
  description: "Focal point used when cropping.",
5291
- ignoredWhen: "`cover` is false",
5790
+ ignoredWhen: '`fit` is not `"cover"`',
5292
5791
  type: {
5293
5792
  kind: "enum",
5294
5793
  values: ["N", "NE", "E", "SE", "S", "SW", "W", "NW", "C"]
5295
5794
  }
5296
5795
  },
5297
5796
  radius: {
5298
- description: "Corner radius treatment. `ratio` scales with the image's shortest side — requires `width`/`height` (or `cover` with `aspectRatio`) to determine this, otherwise falls back to `xs`.",
5299
- type: { kind: "enum", values: ["xs", "ratio"] }
5797
+ default: !1,
5798
+ description: "Applies the default corner radius.",
5799
+ type: { kind: "boolean" }
5300
5800
  },
5301
5801
  aspectRatio: {
5302
5802
  description: "Aspect ratio applied to the wrapper.",
5303
- ignoredWhen: "`cover` is false, or both `width` and `height` are set",
5803
+ ignoredWhen: '`fit` is not `"cover"`, or `height` is set',
5304
5804
  type: {
5305
5805
  kind: "enum",
5306
5806
  values: ["1:1", "4:5", "3:2", "16:9", "21:9"]
5307
5807
  }
5308
5808
  },
5309
- cover: {
5310
- default: !1,
5311
- description: "Renders the image as a cropped fill (`object-fit: cover`). Switches `width`/`height` from intrinsic `<img>` dimensions to wrapper sizing.",
5312
- type: { kind: "boolean" }
5809
+ fit: {
5810
+ default: "intrinsic",
5811
+ description: "Layout mode. `intrinsic` renders at the image's own dimensions, `fluid` scales to the container's full inline size at the active source's aspect ratio, `cover` renders a cropped fill (`object-fit: cover`) sized by the wrapper. For `fluid`, provide candidates sized for large viewports via `srcSet`/`sources` so upscaled rendering stays sharp.",
5812
+ type: { kind: "enum", values: ["intrinsic", "fluid", "cover"] }
5313
5813
  },
5314
5814
  shadow: {
5315
5815
  default: !1,
@@ -5317,7 +5817,7 @@ const ui = {
5317
5817
  type: { kind: "boolean" }
5318
5818
  },
5319
5819
  height: {
5320
- description: "Height in pixels. When `cover` is false, sets the intrinsic `<img>` height. When `cover` is true, sizes the wrapper alone it defers to `aspectRatio`, together with `width` it overrides `aspectRatio`.",
5820
+ description: "Height in pixels. Under `intrinsic` and `fluid`, an aspect-ratio hint with `width`, reserves the correctly shaped box before load; rendered height follows the aspect ratio. Under `cover`, the wrapper's block size, overriding `aspectRatio`.",
5321
5821
  type: { kind: "number" }
5322
5822
  },
5323
5823
  id: {
@@ -5336,6 +5836,7 @@ const ui = {
5336
5836
  },
5337
5837
  sizes: {
5338
5838
  description: "`sizes` attribute used with `srcSet`.",
5839
+ ignoredWhen: "`sources` are provided",
5339
5840
  type: { kind: "string" }
5340
5841
  },
5341
5842
  sources: {
@@ -5381,7 +5882,7 @@ const ui = {
5381
5882
  type: { kind: "string" }
5382
5883
  },
5383
5884
  width: {
5384
- description: "Width in pixels. When `cover` is false, sets the intrinsic `<img>` width. When `cover` is true, sizes the wrapper alone it defers to `aspectRatio`, together with `height` it overrides `aspectRatio`.",
5885
+ description: "Width in pixels. Under `intrinsic`, the rendered width, capped at the container; under `fluid`, an aspect-ratio hint; under `cover`, the wrapper's inline size (`aspectRatio` still derives the block size while `height` is unset).",
5385
5886
  type: { kind: "number" }
5386
5887
  }
5387
5888
  },
@@ -5391,7 +5892,7 @@ const ui = {
5391
5892
  {
5392
5893
  target: { on: "host" },
5393
5894
  attribute: "data-object-fit",
5394
- condition: { kind: "when-truthy", prop: "cover" },
5895
+ condition: { kind: "when-equals", prop: "fit", to: "cover" },
5395
5896
  value: { kind: "literal", text: "cover" }
5396
5897
  },
5397
5898
  {
@@ -5402,8 +5903,12 @@ const ui = {
5402
5903
  {
5403
5904
  target: { on: "host" },
5404
5905
  attribute: "data-radius",
5405
- condition: { kind: "when-provided", prop: "radius" },
5406
- value: { kind: "prop", prop: "radius" }
5906
+ condition: { kind: "when-truthy", prop: "radius" }
5907
+ },
5908
+ {
5909
+ target: { on: "host" },
5910
+ attribute: "data-fluid",
5911
+ condition: { kind: "when-equals", prop: "fit", to: "fluid" }
5407
5912
  },
5408
5913
  {
5409
5914
  target: { on: "descendant", selector: "img" },
@@ -5456,7 +5961,7 @@ const ui = {
5456
5961
  ]
5457
5962
  }
5458
5963
  };
5459
- function ne({
5964
+ function be({
5460
5965
  align: t = "center",
5461
5966
  as: n = "div",
5462
5967
  children: e,
@@ -5480,10 +5985,10 @@ function ne({
5480
5985
  children: e ? [{ kind: "raw", html: e }] : []
5481
5986
  };
5482
5987
  }
5483
- function hi(t) {
5484
- return h(ne(t));
5988
+ function Ti(t) {
5989
+ return h(be(t));
5485
5990
  }
5486
- const ki = {
5991
+ const Ai = {
5487
5992
  name: "inline",
5488
5993
  description: "Use `inline` to lay out content in a horizontal row.",
5489
5994
  output: {
@@ -5568,7 +6073,7 @@ const ki = {
5568
6073
  ]
5569
6074
  }
5570
6075
  };
5571
- function re({
6076
+ function ve({
5572
6077
  autocomplete: t,
5573
6078
  description: n,
5574
6079
  disabled: e,
@@ -5582,17 +6087,17 @@ function re({
5582
6087
  size: l = "md",
5583
6088
  spellcheck: c,
5584
6089
  type: u = "text",
5585
- value: b,
6090
+ value: g,
5586
6091
  inlineSize: v = "full"
5587
6092
  }) {
5588
- const m = i.trim(), f = n?.trim(), z = t === !1 ? !1 : t?.trim(), S = o?.trim(), g = d?.trim(), y = b;
6093
+ const m = i.trim(), f = n?.trim(), E = t === !1 ? !1 : t?.trim(), S = o?.trim(), b = d?.trim(), y = g;
5589
6094
  if (!m)
5590
6095
  throw new Error("id must be a non-empty string.");
5591
- if (!q(m))
6096
+ if (!I(m))
5592
6097
  throw new Error(
5593
6098
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
5594
6099
  );
5595
- const w = f ? `${m}-description` : void 0, x = u === "numeric", C = x ? "text" : u, E = g || (x ? "^[0-9]*$" : void 0), _ = c === void 0 && x ? !1 : c, D = !!e, V = !D && !!p, X = [
6100
+ const w = f ? `${m}-description` : void 0, x = u === "numeric", q = x ? "text" : u, z = b || (x ? "^[0-9]*$" : void 0), C = c === void 0 && x ? !1 : c, A = !!e, V = !A && !!p, O = [
5596
6101
  {
5597
6102
  kind: "element",
5598
6103
  tag: "label",
@@ -5604,24 +6109,24 @@ function re({
5604
6109
  tag: "input",
5605
6110
  attrs: {
5606
6111
  "aria-describedby": w,
5607
- "aria-invalid": !D && !V && !!r ? "true" : void 0,
5608
- autocomplete: z === !1 ? "off" : z || void 0,
6112
+ "aria-invalid": !A && !V && !!r ? "true" : void 0,
6113
+ autocomplete: E === !1 ? "off" : E || void 0,
5609
6114
  class: "input",
5610
- disabled: D,
6115
+ disabled: A,
5611
6116
  id: m,
5612
6117
  inputmode: x ? "numeric" : void 0,
5613
6118
  name: S || void 0,
5614
- pattern: E,
6119
+ pattern: z,
5615
6120
  readonly: V,
5616
6121
  required: !!s,
5617
- spellcheck: _ === void 0 ? void 0 : String(_),
5618
- type: C,
6122
+ spellcheck: C === void 0 ? void 0 : String(C),
6123
+ type: q,
5619
6124
  value: y
5620
6125
  },
5621
6126
  children: []
5622
6127
  }
5623
6128
  ];
5624
- return f && X.push({
6129
+ return f && O.push({
5625
6130
  kind: "element",
5626
6131
  tag: "p",
5627
6132
  attrs: { class: "description", id: w },
@@ -5634,13 +6139,13 @@ function re({
5634
6139
  "data-size": l,
5635
6140
  "data-inline-size": v === "fit" ? "fit" : void 0
5636
6141
  },
5637
- children: X
6142
+ children: O
5638
6143
  };
5639
6144
  }
5640
- function mi(t) {
5641
- return h(re(t));
6145
+ function _i(t) {
6146
+ return h(ve(t));
5642
6147
  }
5643
- const gi = {
6148
+ const Di = {
5644
6149
  name: "input",
5645
6150
  description: "Use `input` to collect a single line of text from users.",
5646
6151
  output: { element: "div", class: "set-input" },
@@ -5836,7 +6341,7 @@ const gi = {
5836
6341
  ]
5837
6342
  }
5838
6343
  };
5839
- function ae({
6344
+ function fe({
5840
6345
  id: t,
5841
6346
  label: n,
5842
6347
  size: e = "md",
@@ -5864,10 +6369,10 @@ function ae({
5864
6369
  ]
5865
6370
  };
5866
6371
  }
5867
- function bi(t) {
5868
- return h(ae(t));
6372
+ function Hi(t) {
6373
+ return h(fe(t));
5869
6374
  }
5870
- const vi = {
6375
+ const Ni = {
5871
6376
  name: "logo",
5872
6377
  description: "Use `logo` to display the brand mark.",
5873
6378
  output: { element: "div", class: "set-logo" },
@@ -5935,7 +6440,7 @@ const vi = {
5935
6440
  ]
5936
6441
  }
5937
6442
  };
5938
- function oe({
6443
+ function ye({
5939
6444
  banner: t,
5940
6445
  centerMain: n,
5941
6446
  children: e,
@@ -5976,10 +6481,10 @@ function oe({
5976
6481
  children: l
5977
6482
  };
5978
6483
  }
5979
- function fi(t) {
5980
- return h(oe(t));
6484
+ function Vi(t) {
6485
+ return h(ye(t));
5981
6486
  }
5982
- const yi = {
6487
+ const Oi = {
5983
6488
  name: "page",
5984
6489
  description: "Use `page` as the primary layout for header, main, and footer regions.",
5985
6490
  output: { element: "div", class: "set-page" },
@@ -6069,7 +6574,7 @@ const yi = {
6069
6574
  ]
6070
6575
  }
6071
6576
  };
6072
- function de({
6577
+ function we({
6073
6578
  children: t,
6074
6579
  id: n,
6075
6580
  padding: e = "md",
@@ -6088,10 +6593,10 @@ function de({
6088
6593
  children: t ? [{ kind: "raw", html: t }] : []
6089
6594
  };
6090
6595
  }
6091
- function wi(t) {
6092
- return h(de(t));
6596
+ function Pi(t) {
6597
+ return h(we(t));
6093
6598
  }
6094
- const Si = {
6599
+ const Bi = {
6095
6600
  name: "panel",
6096
6601
  description: "Use `panel` to group related content in a contained region.",
6097
6602
  output: { element: "div", class: "set-panel" },
@@ -6142,7 +6647,7 @@ const Si = {
6142
6647
  ]
6143
6648
  }
6144
6649
  };
6145
- function se({
6650
+ function Se({
6146
6651
  children: t,
6147
6652
  id: n,
6148
6653
  size: e = "md",
@@ -6163,10 +6668,10 @@ function se({
6163
6668
  children: t ? [{ kind: "raw", html: t }] : []
6164
6669
  };
6165
6670
  }
6166
- function xi(t = {}) {
6167
- return h(se(t));
6671
+ function Ri(t = {}) {
6672
+ return h(Se(t));
6168
6673
  }
6169
- const Ei = {
6674
+ const Wi = {
6170
6675
  name: "pattern",
6171
6676
  description: "Use `pattern` to render repeated visual language components behind content.",
6172
6677
  output: { element: "div", class: "set-pattern" },
@@ -6233,15 +6738,15 @@ const Ei = {
6233
6738
  ]
6234
6739
  }
6235
6740
  };
6236
- function zi(t) {
6237
- return ie({
6741
+ function Ui(t) {
6742
+ return ge({
6238
6743
  ...t,
6239
6744
  alt: "",
6240
- cover: !0,
6745
+ fit: "cover",
6241
6746
  priority: !0
6242
6747
  });
6243
6748
  }
6244
- function le({
6749
+ function xe({
6245
6750
  children: t,
6246
6751
  contentTheme: n,
6247
6752
  id: e,
@@ -6273,10 +6778,10 @@ function le({
6273
6778
  children: d
6274
6779
  };
6275
6780
  }
6276
- function Ci(t) {
6277
- return h(le(t));
6781
+ function $i(t) {
6782
+ return h(xe(t));
6278
6783
  }
6279
- const Mi = {
6784
+ const Gi = {
6280
6785
  name: "poster",
6281
6786
  description: "Use `poster` to layer content over background media.",
6282
6787
  output: { element: "div", class: "set-poster" },
@@ -6346,7 +6851,7 @@ const Mi = {
6346
6851
  ]
6347
6852
  }
6348
6853
  };
6349
- function pe({
6854
+ function Ee({
6350
6855
  align: t = "start",
6351
6856
  children: n,
6352
6857
  hangingPunctuation: e,
@@ -6369,10 +6874,10 @@ function pe({
6369
6874
  children: [{ kind: "raw", html: n }]
6370
6875
  };
6371
6876
  }
6372
- function Li(t) {
6373
- return h(pe(t));
6877
+ function Zi(t) {
6878
+ return h(Ee(t));
6374
6879
  }
6375
- const qi = {
6880
+ const Fi = {
6376
6881
  name: "prose",
6377
6882
  description: "Use `prose` to style rich-text markup.",
6378
6883
  output: { element: "div", class: "set-prose" },
@@ -6445,7 +6950,7 @@ const qi = {
6445
6950
  ]
6446
6951
  }
6447
6952
  };
6448
- function ce({
6953
+ function ze({
6449
6954
  description: t,
6450
6955
  disabled: n,
6451
6956
  id: e,
@@ -6458,10 +6963,10 @@ function ce({
6458
6963
  size: s = "md",
6459
6964
  value: l
6460
6965
  }) {
6461
- const c = e.trim(), u = o.trim(), b = l?.trim();
6966
+ const c = e.trim(), u = o.trim(), g = l?.trim();
6462
6967
  if (!c)
6463
6968
  throw new Error("id must be a non-empty string.");
6464
- if (!q(c))
6969
+ if (!I(c))
6465
6970
  throw new Error(
6466
6971
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
6467
6972
  );
@@ -6469,23 +6974,23 @@ function ce({
6469
6974
  throw new Error("name must be a non-empty string.");
6470
6975
  if (r.length < 2)
6471
6976
  throw new Error("radios must include at least 2 options.");
6472
- const v = r.map((g, y) => {
6473
- const w = g.value.trim(), x = g.label.trim(), C = g.description?.trim();
6977
+ const v = r.map((b, y) => {
6978
+ const w = b.value.trim(), x = b.label.trim(), q = b.description?.trim();
6474
6979
  if (!w)
6475
6980
  throw new Error(`radios[${y}].value must be non-empty.`);
6476
6981
  if (!x)
6477
6982
  throw new Error(`radios[${y}].label must be non-empty.`);
6478
6983
  return {
6479
- description: C,
6480
- disabled: !!g.disabled,
6984
+ description: q,
6985
+ disabled: !!b.disabled,
6481
6986
  label: x,
6482
6987
  value: w
6483
6988
  };
6484
6989
  });
6485
- if (new Set(v.map((g) => g.value)).size !== v.length)
6990
+ if (new Set(v.map((b) => b.value)).size !== v.length)
6486
6991
  throw new Error("radios values must be unique.");
6487
- const f = !!n, z = v.map((g) => {
6488
- const y = !!g.disabled, w = g.description ? `${c}-${g.value}-description` : void 0, x = [
6992
+ const f = !!n, E = v.map((b) => {
6993
+ const y = !!b.disabled, w = b.description ? `${c}-${b.value}-description` : void 0, x = [
6489
6994
  {
6490
6995
  kind: "element",
6491
6996
  tag: "label",
@@ -6496,13 +7001,13 @@ function ce({
6496
7001
  tag: "input",
6497
7002
  attrs: {
6498
7003
  "aria-describedby": w,
6499
- checked: b === g.value,
7004
+ checked: g === b.value,
6500
7005
  class: "radio",
6501
7006
  disabled: y,
6502
7007
  name: u,
6503
7008
  required: !!p && !f && !y,
6504
7009
  type: "radio",
6505
- value: g.value
7010
+ value: b.value
6506
7011
  },
6507
7012
  children: []
6508
7013
  },
@@ -6510,16 +7015,16 @@ function ce({
6510
7015
  kind: "element",
6511
7016
  tag: "span",
6512
7017
  attrs: {},
6513
- children: [{ kind: "text", value: g.label }]
7018
+ children: [{ kind: "text", value: b.label }]
6514
7019
  }
6515
7020
  ]
6516
7021
  }
6517
7022
  ];
6518
- return g.description && x.push({
7023
+ return b.description && x.push({
6519
7024
  kind: "element",
6520
7025
  tag: "p",
6521
7026
  attrs: { class: "radio-description", id: w },
6522
- children: [{ kind: "text", value: g.description }]
7027
+ children: [{ kind: "text", value: b.description }]
6523
7028
  }), {
6524
7029
  kind: "element",
6525
7030
  tag: "div",
@@ -6527,7 +7032,7 @@ function ce({
6527
7032
  children: x
6528
7033
  };
6529
7034
  });
6530
- return lt({
7035
+ return gt({
6531
7036
  children: h({
6532
7037
  kind: "element",
6533
7038
  tag: "div",
@@ -6536,7 +7041,7 @@ function ce({
6536
7041
  "data-orientation": d,
6537
7042
  "data-size": s
6538
7043
  },
6539
- children: z
7044
+ children: E
6540
7045
  }),
6541
7046
  description: t,
6542
7047
  disabled: f,
@@ -6545,10 +7050,10 @@ function ce({
6545
7050
  legend: a
6546
7051
  });
6547
7052
  }
6548
- function Ii(t) {
6549
- return h(ce(t));
7053
+ function ji(t) {
7054
+ return h(ze(t));
6550
7055
  }
6551
- const Ti = {
7056
+ const Ki = {
6552
7057
  name: "radios",
6553
7058
  description: "Use `radios` to let users select one option from a short list.",
6554
7059
  output: { element: "fieldset", class: "set-fieldset" },
@@ -6697,7 +7202,7 @@ const Ti = {
6697
7202
  ]
6698
7203
  }
6699
7204
  };
6700
- function ue({
7205
+ function Ce({
6701
7206
  appOverscrollBehavior: t,
6702
7207
  appRoot: n,
6703
7208
  brand: e = "mnsp",
@@ -6724,10 +7229,10 @@ function ue({
6724
7229
  children: i ? [{ kind: "raw", html: i }] : []
6725
7230
  };
6726
7231
  }
6727
- function Ai(t) {
6728
- return h(ue(t));
7232
+ function Qi(t) {
7233
+ return h(Ce(t));
6729
7234
  }
6730
- const _i = {
7235
+ const Xi = {
6731
7236
  name: "root",
6732
7237
  description: "Mandatory top-level `root` wrapper for the Set system.",
6733
7238
  output: { element: "div", class: "set" },
@@ -6820,7 +7325,7 @@ const _i = {
6820
7325
  ]
6821
7326
  }
6822
7327
  };
6823
- function he({
7328
+ function Le({
6824
7329
  id: t,
6825
7330
  label: n,
6826
7331
  size: e = "md",
@@ -6877,10 +7382,10 @@ function he({
6877
7382
  children: o
6878
7383
  };
6879
7384
  }
6880
- function Di(t = {}) {
6881
- return h(he(t));
7385
+ function Yi(t = {}) {
7386
+ return h(Le(t));
6882
7387
  }
6883
- const Ni = {
7388
+ const Ji = {
6884
7389
  name: "spinner",
6885
7390
  description: "Use `spinner` to indicate loading or in-progress state.",
6886
7391
  output: { element: "span", class: "set-spinner" },
@@ -6938,7 +7443,7 @@ const Ni = {
6938
7443
  ]
6939
7444
  }
6940
7445
  };
6941
- function ke({
7446
+ function Me({
6942
7447
  align: t = "stretch",
6943
7448
  as: n = "div",
6944
7449
  children: e,
@@ -6960,10 +7465,10 @@ function ke({
6960
7465
  children: e ? [{ kind: "raw", html: e }] : []
6961
7466
  };
6962
7467
  }
6963
- function Hi(t) {
6964
- return h(ke(t));
7468
+ function tn(t) {
7469
+ return h(Me(t));
6965
7470
  }
6966
- const Vi = {
7471
+ const en = {
6967
7472
  name: "stack",
6968
7473
  description: "Use `stack` to lay out content in a vertical column.",
6969
7474
  output: {
@@ -7034,7 +7539,7 @@ const Vi = {
7034
7539
  ]
7035
7540
  }
7036
7541
  };
7037
- function me({
7542
+ function qe({
7038
7543
  children: t,
7039
7544
  contentTheme: n,
7040
7545
  id: e,
@@ -7053,10 +7558,10 @@ function me({
7053
7558
  children: [{ kind: "raw", html: t }]
7054
7559
  };
7055
7560
  }
7056
- function Oi(t) {
7057
- return h(me(t));
7561
+ function nn(t) {
7562
+ return h(qe(t));
7058
7563
  }
7059
- const Bi = {
7564
+ const rn = {
7060
7565
  name: "surface",
7061
7566
  description: "Use `surface` to set a colour context for nested content.",
7062
7567
  output: { element: "div", class: "set-surface" },
@@ -7108,7 +7613,7 @@ const Bi = {
7108
7613
  ]
7109
7614
  }
7110
7615
  };
7111
- function ge({
7616
+ function Ie({
7112
7617
  checked: t,
7113
7618
  description: n,
7114
7619
  disabled: e,
@@ -7164,10 +7669,10 @@ function ge({
7164
7669
  children: c
7165
7670
  };
7166
7671
  }
7167
- function Pi(t) {
7168
- return h(ge(t));
7672
+ function an(t) {
7673
+ return h(Ie(t));
7169
7674
  }
7170
- const Ri = {
7675
+ const on = {
7171
7676
  name: "switch",
7172
7677
  description: "Use `switch` to let users instantly toggle a setting on or off.",
7173
7678
  output: { element: "div", class: "set-switch" },
@@ -7275,7 +7780,7 @@ const Ri = {
7275
7780
  ]
7276
7781
  }
7277
7782
  };
7278
- function be({
7783
+ function Te({
7279
7784
  autocomplete: t,
7280
7785
  description: n,
7281
7786
  disabled: e,
@@ -7289,19 +7794,19 @@ function be({
7289
7794
  rows: l = 2,
7290
7795
  size: c = "md",
7291
7796
  spellcheck: u,
7292
- value: b,
7797
+ value: g,
7293
7798
  inlineSize: v = "full"
7294
7799
  }) {
7295
- const m = i.trim(), f = n?.trim(), z = t === !1 ? !1 : t?.trim(), S = o?.trim(), g = b;
7800
+ const m = i.trim(), f = n?.trim(), E = t === !1 ? !1 : t?.trim(), S = o?.trim(), b = g;
7296
7801
  if (!m)
7297
7802
  throw new Error("id must be a non-empty string.");
7298
- if (!q(m))
7803
+ if (!I(m))
7299
7804
  throw new Error(
7300
7805
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
7301
7806
  );
7302
7807
  if (!Number.isInteger(l) || l < 2)
7303
7808
  throw new Error("rows must be an integer greater than or equal to 2.");
7304
- const y = f ? `${m}-description` : void 0, w = !!e, x = !w && !!d, E = [
7809
+ const y = f ? `${m}-description` : void 0, w = !!e, x = !w && !!d, z = [
7305
7810
  {
7306
7811
  kind: "element",
7307
7812
  tag: "label",
@@ -7314,7 +7819,7 @@ function be({
7314
7819
  attrs: {
7315
7820
  "aria-describedby": y,
7316
7821
  "aria-invalid": !w && !x && !!r ? "true" : void 0,
7317
- autocomplete: z === !1 ? "off" : z || void 0,
7822
+ autocomplete: E === !1 ? "off" : E || void 0,
7318
7823
  class: "textarea",
7319
7824
  disabled: w,
7320
7825
  id: m,
@@ -7324,10 +7829,10 @@ function be({
7324
7829
  rows: String(l),
7325
7830
  spellcheck: u === void 0 ? void 0 : String(u)
7326
7831
  },
7327
- children: [{ kind: "text", value: g || "" }]
7832
+ children: [{ kind: "text", value: b || "" }]
7328
7833
  }
7329
7834
  ];
7330
- return f && E.push({
7835
+ return f && z.push({
7331
7836
  kind: "element",
7332
7837
  tag: "p",
7333
7838
  attrs: { class: "description", id: y },
@@ -7341,13 +7846,13 @@ function be({
7341
7846
  "data-size": c,
7342
7847
  "data-inline-size": v === "fit" ? "fit" : void 0
7343
7848
  },
7344
- children: E
7849
+ children: z
7345
7850
  };
7346
7851
  }
7347
- function Wi(t) {
7348
- return h(be(t));
7852
+ function dn(t) {
7853
+ return h(Te(t));
7349
7854
  }
7350
- const Ui = {
7855
+ const sn = {
7351
7856
  name: "textarea",
7352
7857
  description: "Use `textarea` to collect multiple lines of text from users.",
7353
7858
  output: { element: "div", class: "set-textarea" },
@@ -7536,154 +8041,166 @@ const Ui = {
7536
8041
  ]
7537
8042
  }
7538
8043
  };
7539
- function $i() {
7540
- bt(), wt(), xt(), Mt(), qt(), _t();
8044
+ function ln() {
8045
+ Et(), Mt(), At(), Dt(), Ot(), Bt(), $t(), Ft();
7541
8046
  }
7542
8047
  export {
7543
- nt as SET_ALERT_EVENT_BEFORE_DISMISS,
7544
- rt as SET_ALERT_EVENT_DISMISS,
7545
- Se as SET_ALERT_SPEC,
7546
- O as SET_ALERT_TAG_NAME,
7547
- Ve as SET_AVATAR_SPEC,
7548
- Be as SET_BADGE_SPEC,
7549
- ot as SET_BANNER_EVENT_BEFORE_DISMISS,
7550
- dt as SET_BANNER_EVENT_DISMISS,
7551
- Ce as SET_BANNER_SPEC,
8048
+ lt as SET_ALERT_EVENT_BEFORE_DISMISS,
8049
+ pt as SET_ALERT_EVENT_DISMISS,
8050
+ Ne as SET_ALERT_SPEC,
8051
+ P as SET_ALERT_TAG_NAME,
8052
+ ei as SET_AVATAR_SPEC,
8053
+ ni as SET_BADGE_SPEC,
8054
+ ut as SET_BANNER_EVENT_BEFORE_DISMISS,
8055
+ ht as SET_BANNER_EVENT_DISMISS,
8056
+ Be as SET_BANNER_SPEC,
7552
8057
  B as SET_BANNER_TAG_NAME,
7553
- Ue as SET_BLOCKQUOTE_SPEC,
7554
- Ze as SET_BOX_SPEC,
7555
- ye as SET_BUTTON_SPEC,
7556
- Fe as SET_CARD_SPEC,
7557
- Ke as SET_CHECKBOX_SPEC,
7558
- Xe as SET_CONTAINER_SPEC,
7559
- Je as SET_DETAILS_SPEC,
7560
- ei as SET_DIVIDER_SPEC,
7561
- qe as SET_EXPANDER_SPEC,
7562
- ni as SET_FIELDSET_SPEC,
7563
- ai as SET_FIGURE_SPEC,
7564
- li as SET_GRID_ITEM_SPEC,
7565
- si as SET_GRID_SPEC,
7566
- ci as SET_HEADING_SPEC,
7567
- ve as SET_ICON_NAMES,
7568
- fe as SET_ICON_SPEC,
7569
- ui as SET_IMAGE_SPEC,
7570
- ki as SET_INLINE_SPEC,
7571
- gi as SET_INPUT_SPEC,
7572
- Ee as SET_LINK_SPEC,
7573
- vi as SET_LOGO_SPEC,
7574
- st as SET_MENU_EVENT_CHOOSE,
7575
- Le as SET_MENU_SPEC,
7576
- R as SET_MENU_TAG_NAME,
7577
- Te as SET_NAV_SPEC,
7578
- W as SET_NAV_TAG_NAME,
7579
- yi as SET_PAGE_SPEC,
7580
- Si as SET_PANEL_SPEC,
7581
- Ei as SET_PATTERN_SPEC,
7582
- Mi as SET_POSTER_SPEC,
7583
- qi as SET_PROSE_SPEC,
7584
- Ti as SET_RADIOS_SPEC,
7585
- _e as SET_RANGE_SPEC,
7586
- U as SET_RANGE_TAG_NAME,
7587
- _i as SET_ROOT_SPEC,
7588
- Ne as SET_SIDEBAR_SPEC,
7589
- $ as SET_SIDEBAR_TAG_NAME,
7590
- Ni as SET_SPINNER_SPEC,
7591
- Vi as SET_STACK_SPEC,
7592
- Bi as SET_SURFACE_SPEC,
7593
- Ri as SET_SWITCH_SPEC,
7594
- Ui as SET_TEXTAREA_SPEC,
7595
- Re as SET_TEXT_SPEC,
7596
- gt as buildSetAlert,
7597
- Wt as buildSetAvatar,
7598
- Ut as buildSetBadge,
7599
- yt as buildSetBanner,
7600
- $t as buildSetBlockquote,
7601
- Zt as buildSetBox,
7602
- G as buildSetButton,
7603
- jt as buildSetCard,
7604
- Ft as buildSetCheckbox,
7605
- Gt as buildSetContainer,
7606
- Kt as buildSetDetails,
7607
- Qt as buildSetDivider,
7608
- Et as buildSetExpander,
7609
- lt as buildSetFieldset,
7610
- Xt as buildSetFigure,
7611
- Yt as buildSetGrid,
7612
- Jt as buildSetGridItem,
7613
- te as buildSetHeading,
8058
+ di as SET_BLOCKQUOTE_SPEC,
8059
+ li as SET_BOX_SPEC,
8060
+ De as SET_BUTTON_SPEC,
8061
+ ci as SET_CARD_SPEC,
8062
+ hi as SET_CHECKBOX_SPEC,
8063
+ ki as SET_CONTAINER_SPEC,
8064
+ bi as SET_DETAILS_SPEC,
8065
+ fi as SET_DIVIDER_SPEC,
8066
+ Ge as SET_EXPANDER_SPEC,
8067
+ wi as SET_FIELDSET_SPEC,
8068
+ xi as SET_FIGURE_SPEC,
8069
+ Li as SET_GRID_ITEM_SPEC,
8070
+ Ci as SET_GRID_SPEC,
8071
+ qi as SET_HEADING_SPEC,
8072
+ Ae as SET_ICON_NAMES,
8073
+ _e as SET_ICON_SPEC,
8074
+ Ii as SET_IMAGE_SPEC,
8075
+ Ai as SET_INLINE_SPEC,
8076
+ Di as SET_INPUT_SPEC,
8077
+ mt as SET_LIGHTSWITCH_EVENT_CHANGE,
8078
+ We as SET_LIGHTSWITCH_SPEC,
8079
+ K as SET_LIGHTSWITCH_STORAGE_KEY,
8080
+ W as SET_LIGHTSWITCH_TAG_NAME,
8081
+ Oe as SET_LINK_SPEC,
8082
+ Ni as SET_LOGO_SPEC,
8083
+ kt as SET_MENU_EVENT_CHOOSE,
8084
+ $e as SET_MENU_SPEC,
8085
+ U as SET_MENU_TAG_NAME,
8086
+ Fe as SET_NAV_SPEC,
8087
+ $ as SET_NAV_TAG_NAME,
8088
+ Oi as SET_PAGE_SPEC,
8089
+ Bi as SET_PANEL_SPEC,
8090
+ Wi as SET_PATTERN_SPEC,
8091
+ Gi as SET_POSTER_SPEC,
8092
+ Fi as SET_PROSE_SPEC,
8093
+ Ki as SET_RADIOS_SPEC,
8094
+ Ke as SET_RANGE_SPEC,
8095
+ G as SET_RANGE_TAG_NAME,
8096
+ Xi as SET_ROOT_SPEC,
8097
+ Xe as SET_SIDEBAR_SPEC,
8098
+ Z as SET_SIDEBAR_TAG_NAME,
8099
+ Ji as SET_SPINNER_SPEC,
8100
+ en as SET_STACK_SPEC,
8101
+ rn as SET_SURFACE_SPEC,
8102
+ on as SET_SWITCH_SPEC,
8103
+ sn as SET_TEXTAREA_SPEC,
8104
+ ai as SET_TEXT_SPEC,
8105
+ Je as SET_VIDEO_SPEC,
8106
+ F as SET_VIDEO_TAG_NAME,
8107
+ xt as buildSetAlert,
8108
+ ie as buildSetAvatar,
8109
+ ne as buildSetBadge,
8110
+ Lt as buildSetBanner,
8111
+ re as buildSetBlockquote,
8112
+ ae as buildSetBox,
8113
+ tt as buildSetButton,
8114
+ oe as buildSetCard,
8115
+ de as buildSetCheckbox,
8116
+ se as buildSetContainer,
8117
+ le as buildSetDetails,
8118
+ pe as buildSetDivider,
8119
+ Ht as buildSetExpander,
8120
+ gt as buildSetFieldset,
8121
+ ce as buildSetFigure,
8122
+ ue as buildSetGrid,
8123
+ he as buildSetGridItem,
8124
+ me as buildSetHeading,
7614
8125
  H as buildSetIcon,
7615
- ee as buildSetImage,
7616
- ne as buildSetInline,
7617
- re as buildSetInput,
7618
- at as buildSetLink,
7619
- ae as buildSetLogo,
7620
- St as buildSetMenu,
7621
- Ct as buildSetNav,
7622
- oe as buildSetPage,
7623
- de as buildSetPanel,
7624
- se as buildSetPattern,
7625
- le as buildSetPoster,
7626
- pe as buildSetProse,
7627
- ce as buildSetRadios,
7628
- Lt as buildSetRange,
7629
- ue as buildSetRoot,
7630
- At as buildSetSidebar,
7631
- he as buildSetSpinner,
7632
- ke as buildSetStack,
7633
- me as buildSetSurface,
7634
- ge as buildSetSwitch,
7635
- Z as buildSetText,
7636
- be as buildSetTextarea,
7637
- bt as defineSetAlert,
7638
- wt as defineSetBanner,
7639
- $i as defineSetComponents,
7640
- xt as defineSetMenu,
7641
- Mt as defineSetNav,
7642
- qt as defineSetRange,
7643
- _t as defineSetSidebar,
7644
- Ht as getSetInitials,
7645
- we as renderSetAlert,
7646
- He as renderSetAvatar,
7647
- Oe as renderSetBadge,
7648
- ze as renderSetBanner,
7649
- We as renderSetBlockquote,
7650
- $e as renderSetBox,
7651
- K as renderSetButton,
7652
- je as renderSetCard,
7653
- Ge as renderSetCheckbox,
7654
- Qe as renderSetContainer,
7655
- Ye as renderSetDetails,
7656
- ti as renderSetDivider,
7657
- zt as renderSetExpander,
7658
- ii as renderSetFieldset,
7659
- ri as renderSetFigure,
7660
- oi as renderSetGrid,
7661
- di as renderSetGridItem,
7662
- pi as renderSetHeading,
7663
- ut as renderSetIcon,
7664
- ie as renderSetImage,
7665
- hi as renderSetInline,
7666
- mi as renderSetInput,
7667
- xe as renderSetLink,
7668
- bi as renderSetLogo,
7669
- Me as renderSetMenu,
7670
- Ie as renderSetNav,
7671
- fi as renderSetPage,
7672
- wi as renderSetPanel,
7673
- xi as renderSetPattern,
7674
- Ci as renderSetPoster,
7675
- zi as renderSetPosterImage,
7676
- Li as renderSetProse,
7677
- Ii as renderSetRadios,
7678
- Ae as renderSetRange,
7679
- Ai as renderSetRoot,
7680
- De as renderSetSidebar,
7681
- Di as renderSetSpinner,
7682
- Hi as renderSetStack,
7683
- Oi as renderSetSurface,
7684
- Pi as renderSetSwitch,
7685
- Pe as renderSetText,
7686
- Wi as renderSetTextarea,
8126
+ ke as buildSetImage,
8127
+ be as buildSetInline,
8128
+ ve as buildSetInput,
8129
+ Tt as buildSetLightswitch,
8130
+ ct as buildSetLink,
8131
+ fe as buildSetLogo,
8132
+ _t as buildSetMenu,
8133
+ Vt as buildSetNav,
8134
+ ye as buildSetPage,
8135
+ we as buildSetPanel,
8136
+ Se as buildSetPattern,
8137
+ xe as buildSetPoster,
8138
+ Ee as buildSetProse,
8139
+ ze as buildSetRadios,
8140
+ Pt as buildSetRange,
8141
+ Ce as buildSetRoot,
8142
+ Ut as buildSetSidebar,
8143
+ Le as buildSetSpinner,
8144
+ Me as buildSetStack,
8145
+ qe as buildSetSurface,
8146
+ Ie as buildSetSwitch,
8147
+ j as buildSetText,
8148
+ Te as buildSetTextarea,
8149
+ Gt as buildSetVideo,
8150
+ Et as defineSetAlert,
8151
+ Mt as defineSetBanner,
8152
+ ln as defineSetComponents,
8153
+ At as defineSetLightswitch,
8154
+ Dt as defineSetMenu,
8155
+ Ot as defineSetNav,
8156
+ Bt as defineSetRange,
8157
+ $t as defineSetSidebar,
8158
+ Ft as defineSetVideo,
8159
+ Qt as getSetInitials,
8160
+ He as renderSetAlert,
8161
+ ti as renderSetAvatar,
8162
+ ii as renderSetBadge,
8163
+ Pe as renderSetBanner,
8164
+ oi as renderSetBlockquote,
8165
+ si as renderSetBox,
8166
+ et as renderSetButton,
8167
+ pi as renderSetCard,
8168
+ ui as renderSetCheckbox,
8169
+ mi as renderSetContainer,
8170
+ gi as renderSetDetails,
8171
+ vi as renderSetDivider,
8172
+ Nt as renderSetExpander,
8173
+ yi as renderSetFieldset,
8174
+ Si as renderSetFigure,
8175
+ Ei as renderSetGrid,
8176
+ zi as renderSetGridItem,
8177
+ Mi as renderSetHeading,
8178
+ ft as renderSetIcon,
8179
+ ge as renderSetImage,
8180
+ Ti as renderSetInline,
8181
+ _i as renderSetInput,
8182
+ Re as renderSetLightswitch,
8183
+ Ve as renderSetLink,
8184
+ Hi as renderSetLogo,
8185
+ Ue as renderSetMenu,
8186
+ Ze as renderSetNav,
8187
+ Vi as renderSetPage,
8188
+ Pi as renderSetPanel,
8189
+ Ri as renderSetPattern,
8190
+ $i as renderSetPoster,
8191
+ Ui as renderSetPosterImage,
8192
+ Zi as renderSetProse,
8193
+ ji as renderSetRadios,
8194
+ je as renderSetRange,
8195
+ Qi as renderSetRoot,
8196
+ Qe as renderSetSidebar,
8197
+ Yi as renderSetSpinner,
8198
+ tn as renderSetStack,
8199
+ nn as renderSetSurface,
8200
+ an as renderSetSwitch,
8201
+ ri as renderSetText,
8202
+ dn as renderSetTextarea,
8203
+ Ye as renderSetVideo,
7687
8204
  h as serializeSetNode
7688
8205
  };
7689
8206
  //# sourceMappingURL=index.js.map