@monospaced/set-core 0.2.0 → 0.4.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",
@@ -385,6 +385,28 @@ const et = {
385
385
  ]
386
386
  }
387
387
  ],
388
+ image: [
389
+ {
390
+ tag: "g",
391
+ attrs: {},
392
+ children: [
393
+ {
394
+ tag: "path",
395
+ attrs: {
396
+ d: "M3 16V3H21V21H20M3 16V21H20M3 16L9 10L20 21"
397
+ }
398
+ },
399
+ {
400
+ tag: "circle",
401
+ attrs: {
402
+ cx: "15.75",
403
+ cy: "8.25",
404
+ r: "2"
405
+ }
406
+ }
407
+ ]
408
+ }
409
+ ],
388
410
  "info-circle": [
389
411
  {
390
412
  tag: "g",
@@ -486,6 +508,20 @@ const et = {
486
508
  ]
487
509
  }
488
510
  ],
511
+ moon: [
512
+ {
513
+ tag: "g",
514
+ attrs: {},
515
+ children: [
516
+ {
517
+ tag: "path",
518
+ attrs: {
519
+ 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"
520
+ }
521
+ }
522
+ ]
523
+ }
524
+ ],
489
525
  "panel-left": [
490
526
  {
491
527
  tag: "path",
@@ -636,6 +672,49 @@ const et = {
636
672
  ]
637
673
  }
638
674
  ],
675
+ "sticky-note": [
676
+ {
677
+ tag: "g",
678
+ attrs: {},
679
+ children: [
680
+ {
681
+ tag: "path",
682
+ attrs: {
683
+ d: "M20 14H14V20M3 3H21V14L14 21H3V3Z",
684
+ "stroke-linecap": "square"
685
+ }
686
+ },
687
+ {
688
+ tag: "path",
689
+ attrs: {
690
+ d: "M7 9H17M7 13H10",
691
+ "stroke-linecap": "square"
692
+ }
693
+ }
694
+ ]
695
+ }
696
+ ],
697
+ sunny: [
698
+ {
699
+ tag: "g",
700
+ attrs: {},
701
+ children: [
702
+ {
703
+ tag: "path",
704
+ attrs: {
705
+ 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"
706
+ }
707
+ },
708
+ {
709
+ tag: "path",
710
+ attrs: {
711
+ 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",
712
+ "stroke-linecap": "square"
713
+ }
714
+ }
715
+ ]
716
+ }
717
+ ],
639
718
  swap: [
640
719
  {
641
720
  tag: "g",
@@ -681,13 +760,13 @@ const et = {
681
760
  ]
682
761
  }
683
762
  ]
684
- }, ve = Object.keys(et);
685
- function it(t) {
763
+ }, Ae = Object.keys(dt);
764
+ function st(t) {
686
765
  return t.map((n) => ({
687
766
  kind: "element",
688
767
  tag: n.tag,
689
768
  attrs: n.attrs,
690
- children: n.children ? it(n.children) : []
769
+ children: n.children ? st(n.children) : []
691
770
  }));
692
771
  }
693
772
  function H({
@@ -698,7 +777,7 @@ function H({
698
777
  size: r = "md",
699
778
  title: a
700
779
  }) {
701
- const o = et[i];
780
+ const o = dt[i];
702
781
  if (!o)
703
782
  throw new Error(`Unknown icon name: ${i}`);
704
783
  const d = k(n), p = a?.trim();
@@ -712,7 +791,7 @@ function H({
712
791
  tag: "title",
713
792
  attrs: { id: s },
714
793
  children: [{ kind: "text", value: p }]
715
- }), l.push(...it(o)), {
794
+ }), l.push(...st(o)), {
716
795
  kind: "element",
717
796
  tag: "svg",
718
797
  attrs: {
@@ -733,10 +812,10 @@ function H({
733
812
  children: l
734
813
  };
735
814
  }
736
- function ut(t) {
815
+ function ft(t) {
737
816
  return h(H(t));
738
817
  }
739
- const fe = {
818
+ const _e = {
740
819
  name: "icon",
741
820
  description: "Use `icon` to render a Set icon.",
742
821
  output: { element: "svg", class: "set-icon" },
@@ -850,7 +929,7 @@ const fe = {
850
929
  ]
851
930
  }
852
931
  };
853
- function G(t) {
932
+ function tt(t) {
854
933
  const {
855
934
  appearance: n = "outline",
856
935
  controls: e,
@@ -864,22 +943,22 @@ function G(t) {
864
943
  iconPlacement: l = "start",
865
944
  label: c,
866
945
  labelVisibility: u = "visible",
867
- name: b,
946
+ name: g,
868
947
  size: v = "md",
869
948
  tone: m = "default",
870
949
  type: f,
871
- value: z
872
- } = t, S = p || void 0, g = !!S;
873
- if (u !== "visible" && !g)
950
+ value: E
951
+ } = t, S = p || void 0, b = !!S;
952
+ if (u !== "visible" && !b)
874
953
  throw new Error("labelVisibility requires icon when label is not visible.");
875
- const y = g && S ? {
954
+ const y = b && S ? {
876
955
  kind: "element",
877
956
  tag: "span",
878
957
  attrs: { class: "icon-wrapper" },
879
958
  children: [
880
959
  {
881
960
  kind: "raw",
882
- html: ut({
961
+ html: ft({
883
962
  ariaHidden: !0,
884
963
  mirrored: s,
885
964
  name: S,
@@ -908,17 +987,17 @@ function G(t) {
908
987
  disabled: !!i,
909
988
  form: a || void 0,
910
989
  id: d || void 0,
911
- name: b || void 0,
990
+ name: g || void 0,
912
991
  type: f || "button",
913
- value: z || void 0
992
+ value: E || void 0
914
993
  },
915
994
  children: y ? l === "end" ? [w, y] : [y, w] : [w]
916
995
  };
917
996
  }
918
- function K(t) {
919
- return h(G(t));
997
+ function et(t) {
998
+ return h(tt(t));
920
999
  }
921
- const ye = {
1000
+ const De = {
922
1001
  name: "button",
923
1002
  description: "Use `button` to let users trigger actions.",
924
1003
  output: { element: "button", class: "set-button" },
@@ -1101,10 +1180,10 @@ const ye = {
1101
1180
  }
1102
1181
  ]
1103
1182
  }
1104
- }, O = "set-alert", nt = "set-alert-before-dismiss", rt = "set-alert-dismiss", N = "Dismiss alert";
1105
- function ht(t, n) {
1183
+ }, P = "set-alert", lt = "set-alert-before-dismiss", pt = "set-alert-dismiss", N = "Dismiss alert";
1184
+ function yt(t, n) {
1106
1185
  const e = n.createElement("div");
1107
- return e.setAttribute("data-part", "close"), e.innerHTML = K({
1186
+ return e.setAttribute("data-part", "close"), e.innerHTML = et({
1108
1187
  appearance: "text",
1109
1188
  icon: "close",
1110
1189
  label: t,
@@ -1113,7 +1192,7 @@ function ht(t, n) {
1113
1192
  tone: "neutral"
1114
1193
  }), e;
1115
1194
  }
1116
- function kt(t) {
1195
+ function wt(t) {
1117
1196
  switch (t) {
1118
1197
  case "success":
1119
1198
  return "check-circle";
@@ -1121,14 +1200,16 @@ function kt(t) {
1121
1200
  return "error-triangle";
1122
1201
  case "error":
1123
1202
  return "error-circle";
1124
- default:
1203
+ case "info":
1125
1204
  return "info-circle";
1205
+ default:
1206
+ return "sticky-note";
1126
1207
  }
1127
1208
  }
1128
- function mt(t) {
1209
+ function St(t) {
1129
1210
  return t === "warning" || t === "error" ? "alert" : "status";
1130
1211
  }
1131
- function gt({
1212
+ function xt({
1132
1213
  dismissible: t,
1133
1214
  dismissibleLabel: n = N,
1134
1215
  id: e,
@@ -1151,7 +1232,7 @@ function gt({
1151
1232
  children: [{ kind: "text", value: r }]
1152
1233
  }), {
1153
1234
  kind: "element",
1154
- tag: O,
1235
+ tag: P,
1155
1236
  attrs: {
1156
1237
  class: "set-alert",
1157
1238
  "data-dismissible": t,
@@ -1160,7 +1241,7 @@ function gt({
1160
1241
  "data-size": a,
1161
1242
  "data-tone": o || void 0,
1162
1243
  id: p,
1163
- role: mt(o)
1244
+ role: St(o)
1164
1245
  },
1165
1246
  children: [
1166
1247
  {
@@ -1170,7 +1251,7 @@ function gt({
1170
1251
  children: [
1171
1252
  H({
1172
1253
  ariaHidden: !0,
1173
- name: kt(o),
1254
+ name: wt(o),
1174
1255
  size: a
1175
1256
  })
1176
1257
  ]
@@ -1184,24 +1265,24 @@ function gt({
1184
1265
  ]
1185
1266
  };
1186
1267
  }
1187
- function we(t) {
1188
- return h(gt(t));
1268
+ function He(t) {
1269
+ return h(xt(t));
1189
1270
  }
1190
- function bt() {
1191
- if (customElements.get(O)) return;
1271
+ function Et() {
1272
+ if (customElements.get(P)) return;
1192
1273
  class t extends HTMLElement {
1193
1274
  #t = (e) => {
1194
1275
  const i = e.target;
1195
1276
  if (!(i instanceof Element) || !i.closest('[data-part="close"]')) return;
1196
1277
  const r = new CustomEvent(
1197
- nt,
1278
+ lt,
1198
1279
  {
1199
1280
  bubbles: !0,
1200
1281
  cancelable: !0
1201
1282
  }
1202
1283
  );
1203
1284
  this.dispatchEvent(r) && (this.dispatchEvent(
1204
- new CustomEvent(rt, {
1285
+ new CustomEvent(pt, {
1205
1286
  bubbles: !0
1206
1287
  })
1207
1288
  ), this.remove());
@@ -1214,20 +1295,20 @@ function bt() {
1214
1295
  }
1215
1296
  #e() {
1216
1297
  this.querySelector('[data-part="close"]') || this.append(
1217
- ht(
1298
+ yt(
1218
1299
  this.getAttribute("data-dismissible-label") ?? N,
1219
1300
  this.ownerDocument
1220
1301
  )
1221
1302
  );
1222
1303
  }
1223
1304
  }
1224
- customElements.define(O, t);
1305
+ customElements.define(P, t);
1225
1306
  }
1226
- const Se = {
1307
+ const Ne = {
1227
1308
  name: "alert",
1228
1309
  description: "Use `alert` to surface short, important messages.",
1229
1310
  output: {
1230
- element: O,
1311
+ element: P,
1231
1312
  class: "set-alert"
1232
1313
  },
1233
1314
  content: {
@@ -1278,12 +1359,12 @@ const Se = {
1278
1359
  }
1279
1360
  },
1280
1361
  events: {
1281
- [nt]: {
1362
+ [lt]: {
1282
1363
  bubbles: !0,
1283
1364
  cancelable: !0,
1284
1365
  description: "Fired before the alert is removed by a dismiss action. Call `preventDefault()` to keep the alert mounted."
1285
1366
  },
1286
- [rt]: {
1367
+ [pt]: {
1287
1368
  bubbles: !0,
1288
1369
  description: "Fired after the alert has been removed by an allowed dismiss action."
1289
1370
  }
@@ -1372,11 +1453,11 @@ const Se = {
1372
1453
  ]
1373
1454
  }
1374
1455
  };
1375
- function vt(t) {
1456
+ function zt(t) {
1376
1457
  if (t)
1377
1458
  return t === !0 ? !0 : t;
1378
1459
  }
1379
- function at(t) {
1460
+ function ct(t) {
1380
1461
  const {
1381
1462
  appearance: n = "text",
1382
1463
  current: e,
@@ -1390,12 +1471,12 @@ function at(t) {
1390
1471
  rel: l,
1391
1472
  size: c = "md",
1392
1473
  target: u,
1393
- tone: b = "default",
1474
+ tone: g = "default",
1394
1475
  underline: v
1395
1476
  } = t, m = k(a), f = o?.trim() || void 0;
1396
1477
  if (s !== "visible" && !!!f)
1397
1478
  throw new Error("labelVisibility requires icon when label is not visible.");
1398
- const S = vt(i), g = f ? {
1479
+ const S = zt(i), b = f ? {
1399
1480
  kind: "element",
1400
1481
  tag: "span",
1401
1482
  attrs: { class: "icon-wrapper" },
@@ -1415,7 +1496,7 @@ function at(t) {
1415
1496
  "data-appearance": n === "text" ? void 0 : n,
1416
1497
  "data-label-visibility": s === "visible" ? void 0 : s,
1417
1498
  "data-size": c,
1418
- "data-tone": b === "neutral" ? "neutral" : void 0,
1499
+ "data-tone": g === "neutral" ? "neutral" : void 0,
1419
1500
  "data-underline": v && n === "text" ? !0 : void 0,
1420
1501
  download: S,
1421
1502
  href: r,
@@ -1423,13 +1504,13 @@ function at(t) {
1423
1504
  rel: S ? void 0 : l || void 0,
1424
1505
  target: S ? void 0 : u || void 0
1425
1506
  },
1426
- children: g ? d === "end" ? [y, g] : [g, y] : [y]
1507
+ children: b ? d === "end" ? [y, b] : [b, y] : [y]
1427
1508
  };
1428
1509
  }
1429
- function xe(t) {
1430
- return h(at(t));
1510
+ function Ve(t) {
1511
+ return h(ct(t));
1431
1512
  }
1432
- const Ee = {
1513
+ const Oe = {
1433
1514
  name: "link",
1434
1515
  description: "Use `link` to navigate to another page or resource.",
1435
1516
  output: { element: "a", class: "set-link" },
@@ -1616,10 +1697,10 @@ const Ee = {
1616
1697
  }
1617
1698
  ]
1618
1699
  }
1619
- }, B = "set-banner", ot = "set-banner-before-dismiss", dt = "set-banner-dismiss", P = "Dismiss banner";
1620
- function ft(t, n) {
1700
+ }, B = "set-banner", ut = "set-banner-before-dismiss", ht = "set-banner-dismiss", R = "Dismiss banner";
1701
+ function Ct(t, n) {
1621
1702
  const e = n.createElement("div");
1622
- return e.setAttribute("data-part", "close"), e.innerHTML = K({
1703
+ return e.setAttribute("data-part", "close"), e.innerHTML = et({
1623
1704
  appearance: "text",
1624
1705
  icon: "close",
1625
1706
  label: t,
@@ -1628,20 +1709,20 @@ function ft(t, n) {
1628
1709
  tone: "neutral"
1629
1710
  }), e;
1630
1711
  }
1631
- function yt({
1712
+ function Mt({
1632
1713
  actionHref: t,
1633
1714
  actionLabel: n,
1634
1715
  dismissible: e = !0,
1635
- dismissibleLabel: i = P,
1716
+ dismissibleLabel: i = R,
1636
1717
  id: r,
1637
1718
  message: a,
1638
1719
  tone: o
1639
1720
  }) {
1640
1721
  if (!!t != !!n)
1641
1722
  throw new Error("actionHref and actionLabel must be provided together.");
1642
- const d = k(r), p = i.trim() === "" ? P : i, s = [{ kind: "text", value: a }];
1723
+ const d = k(r), p = i.trim() === "" ? R : i, s = [{ kind: "text", value: a }];
1643
1724
  return t && n && (s.push({ kind: "text", value: " " }), s.push(
1644
- at({
1725
+ ct({
1645
1726
  href: t,
1646
1727
  label: n,
1647
1728
  underline: !0
@@ -1668,24 +1749,24 @@ function yt({
1668
1749
  ]
1669
1750
  };
1670
1751
  }
1671
- function ze(t) {
1672
- return h(yt(t));
1752
+ function Pe(t) {
1753
+ return h(Mt(t));
1673
1754
  }
1674
- function wt() {
1755
+ function Lt() {
1675
1756
  if (customElements.get(B)) return;
1676
1757
  class t extends HTMLElement {
1677
1758
  #t = (e) => {
1678
1759
  const i = e.target;
1679
1760
  if (!(i instanceof Element) || !i.closest('[data-part="close"]')) return;
1680
1761
  const r = new CustomEvent(
1681
- ot,
1762
+ ut,
1682
1763
  {
1683
1764
  bubbles: !0,
1684
1765
  cancelable: !0
1685
1766
  }
1686
1767
  );
1687
1768
  this.dispatchEvent(r) && (this.dispatchEvent(
1688
- new CustomEvent(dt, {
1769
+ new CustomEvent(ht, {
1689
1770
  bubbles: !0
1690
1771
  })
1691
1772
  ), this.remove());
@@ -1698,8 +1779,8 @@ function wt() {
1698
1779
  }
1699
1780
  #e() {
1700
1781
  this.querySelector('[data-part="close"]') || this.append(
1701
- ft(
1702
- this.getAttribute("data-dismissible-label") ?? P,
1782
+ Ct(
1783
+ this.getAttribute("data-dismissible-label") ?? R,
1703
1784
  this.ownerDocument
1704
1785
  )
1705
1786
  );
@@ -1707,7 +1788,7 @@ function wt() {
1707
1788
  }
1708
1789
  customElements.define(B, t);
1709
1790
  }
1710
- const Ce = {
1791
+ const Be = {
1711
1792
  name: "banner",
1712
1793
  description: "Use `banner` to display a prominent site-wide message.",
1713
1794
  output: { element: B, class: "set-banner" },
@@ -1729,7 +1810,7 @@ const Ce = {
1729
1810
  type: { kind: "boolean" }
1730
1811
  },
1731
1812
  dismissibleLabel: {
1732
- default: P,
1813
+ default: R,
1733
1814
  description: "Accessible label for the dismiss control.",
1734
1815
  ignoredWhen: "`dismissible` is false",
1735
1816
  type: { kind: "string" }
@@ -1747,17 +1828,17 @@ const Ce = {
1747
1828
  description: "Semantic tone.",
1748
1829
  type: {
1749
1830
  kind: "enum",
1750
- values: ["info", "success", "warning", "error"]
1831
+ values: ["info", "warning", "error"]
1751
1832
  }
1752
1833
  }
1753
1834
  },
1754
1835
  events: {
1755
- [ot]: {
1836
+ [ut]: {
1756
1837
  bubbles: !0,
1757
1838
  cancelable: !0,
1758
1839
  description: "Fired before the banner is removed by a dismiss action. Call `preventDefault()` to keep the banner mounted."
1759
1840
  },
1760
- [dt]: {
1841
+ [ht]: {
1761
1842
  bubbles: !0,
1762
1843
  description: "Fired after the banner has been removed by an allowed dismiss action."
1763
1844
  }
@@ -1795,8 +1876,219 @@ const Ce = {
1795
1876
  }
1796
1877
  ]
1797
1878
  }
1798
- }, R = "set-menu", st = "set-menu-choose";
1799
- function St({
1879
+ }, W = "set-lightswitch", mt = "set-lightswitch-change", K = "set-theme", Q = "Switch to dark theme", X = "Switch to light theme";
1880
+ function qt(t) {
1881
+ return t === "dark" ? "light" : "dark";
1882
+ }
1883
+ function It(t) {
1884
+ return t === "dark" ? "moon" : "sunny";
1885
+ }
1886
+ function nt(t, n) {
1887
+ return {
1888
+ kind: "element",
1889
+ tag: "span",
1890
+ attrs: { class: "option", "data-option": t },
1891
+ children: [
1892
+ {
1893
+ kind: "element",
1894
+ tag: "span",
1895
+ attrs: { class: "icon-wrapper" },
1896
+ children: [
1897
+ H({
1898
+ ariaHidden: !0,
1899
+ name: It(t),
1900
+ size: "fill"
1901
+ })
1902
+ ]
1903
+ },
1904
+ {
1905
+ kind: "element",
1906
+ tag: "span",
1907
+ attrs: { class: "label" },
1908
+ children: [{ kind: "text", value: n }]
1909
+ }
1910
+ ]
1911
+ };
1912
+ }
1913
+ function Tt({
1914
+ appearance: t = "text",
1915
+ id: n,
1916
+ labelDark: e = Q,
1917
+ labelLight: i = X,
1918
+ size: r = "md"
1919
+ }) {
1920
+ const a = k(n), o = e.trim() === "" ? Q : e, d = i.trim() === "" ? X : i;
1921
+ return {
1922
+ kind: "element",
1923
+ tag: W,
1924
+ attrs: {
1925
+ class: "set-lightswitch",
1926
+ id: a
1927
+ },
1928
+ children: [
1929
+ {
1930
+ kind: "element",
1931
+ tag: "button",
1932
+ attrs: {
1933
+ class: "toggle",
1934
+ "data-appearance": t,
1935
+ "data-size": r,
1936
+ type: "button"
1937
+ },
1938
+ children: [
1939
+ nt("dark", o),
1940
+ nt("light", d)
1941
+ ]
1942
+ }
1943
+ ]
1944
+ };
1945
+ }
1946
+ function Re(t) {
1947
+ return h(Tt(t));
1948
+ }
1949
+ function At() {
1950
+ if (customElements.get(W)) return;
1951
+ class t extends HTMLElement {
1952
+ #t = (e) => {
1953
+ const i = e.target;
1954
+ if (!(i instanceof Element) || !i.closest("button")) return;
1955
+ const r = qt(this.#u());
1956
+ r === this.#r() ? this.#d() : this.#n(r), this.#a(), this.dispatchEvent(
1957
+ new CustomEvent(mt, {
1958
+ bubbles: !0,
1959
+ detail: { stored: !!this.#i(), theme: r }
1960
+ })
1961
+ );
1962
+ };
1963
+ connectedCallback() {
1964
+ this.removeEventListener("click", this.#t), this.addEventListener("click", this.#t), this.#i() && this.#a();
1965
+ }
1966
+ disconnectedCallback() {
1967
+ this.removeEventListener("click", this.#t);
1968
+ }
1969
+ #e() {
1970
+ try {
1971
+ return this.ownerDocument.defaultView?.localStorage;
1972
+ } catch {
1973
+ return;
1974
+ }
1975
+ }
1976
+ #i() {
1977
+ try {
1978
+ const e = this.#e()?.getItem(K);
1979
+ return e === "light" || e === "dark" ? e : void 0;
1980
+ } catch {
1981
+ return;
1982
+ }
1983
+ }
1984
+ #n(e) {
1985
+ try {
1986
+ this.#e()?.setItem(K, e);
1987
+ } catch {
1988
+ }
1989
+ }
1990
+ #d() {
1991
+ try {
1992
+ this.#e()?.removeItem(K);
1993
+ } catch {
1994
+ }
1995
+ }
1996
+ #r() {
1997
+ const e = this.ownerDocument.defaultView;
1998
+ return !e || typeof e.matchMedia != "function" ? "light" : e.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1999
+ }
2000
+ #c() {
2001
+ return this.closest(".set");
2002
+ }
2003
+ #s() {
2004
+ const e = this.#c()?.getAttribute("data-set-theme");
2005
+ return e === "light" || e === "dark" ? e : void 0;
2006
+ }
2007
+ #u() {
2008
+ return this.#i() ?? this.#s() ?? this.#r();
2009
+ }
2010
+ #a() {
2011
+ const e = this.#c();
2012
+ if (!e) return;
2013
+ const i = this.#i();
2014
+ i ? e.setAttribute("data-set-theme", i) : e.removeAttribute("data-set-theme");
2015
+ }
2016
+ }
2017
+ customElements.define(W, t);
2018
+ }
2019
+ const We = {
2020
+ name: "lightswitch",
2021
+ description: "Use `lightswitch` to let users toggle between light and dark themes.",
2022
+ output: { element: W, class: "set-lightswitch" },
2023
+ content: { kind: "none" },
2024
+ props: {
2025
+ appearance: {
2026
+ default: "text",
2027
+ description: "Visual appearance of the toggle button.",
2028
+ type: { kind: "enum", values: ["outline", "solid", "text"] }
2029
+ },
2030
+ id: {
2031
+ description: "DOM id.",
2032
+ type: { kind: "string" }
2033
+ },
2034
+ labelDark: {
2035
+ default: Q,
2036
+ description: "Accessible label of the switch-to-dark action.",
2037
+ type: { kind: "string" }
2038
+ },
2039
+ labelLight: {
2040
+ default: X,
2041
+ description: "Accessible label of the switch-to-light action.",
2042
+ type: { kind: "string" }
2043
+ },
2044
+ size: {
2045
+ default: "md",
2046
+ description: "Size variant.",
2047
+ type: { kind: "enum", values: ["sm", "md", "lg"] }
2048
+ }
2049
+ },
2050
+ events: {
2051
+ [mt]: {
2052
+ bubbles: !0,
2053
+ 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."
2054
+ }
2055
+ },
2056
+ rules: {
2057
+ attributes: [
2058
+ {
2059
+ target: { on: "host" },
2060
+ attribute: "id",
2061
+ condition: { kind: "when-non-empty", prop: "id" },
2062
+ value: { kind: "prop", prop: "id" }
2063
+ },
2064
+ {
2065
+ target: { on: "descendant", selector: "button" },
2066
+ attribute: "class",
2067
+ condition: { kind: "always" },
2068
+ value: { kind: "literal", text: "toggle" }
2069
+ },
2070
+ {
2071
+ target: { on: "descendant", selector: "button" },
2072
+ attribute: "data-appearance",
2073
+ condition: { kind: "always" },
2074
+ value: { kind: "prop", prop: "appearance" }
2075
+ },
2076
+ {
2077
+ target: { on: "descendant", selector: "button" },
2078
+ attribute: "data-size",
2079
+ condition: { kind: "always" },
2080
+ value: { kind: "prop", prop: "size" }
2081
+ },
2082
+ {
2083
+ target: { on: "descendant", selector: "button" },
2084
+ attribute: "type",
2085
+ condition: { kind: "always" },
2086
+ value: { kind: "literal", text: "button" }
2087
+ }
2088
+ ]
2089
+ }
2090
+ }, U = "set-menu", kt = "set-menu-choose";
2091
+ function _t({
1800
2092
  align: t = "start",
1801
2093
  id: n,
1802
2094
  items: e,
@@ -1810,27 +2102,27 @@ function St({
1810
2102
  const s = n.trim();
1811
2103
  if (!s)
1812
2104
  throw new Error("id must be a non-empty string.");
1813
- if (!q(s))
2105
+ if (!I(s))
1814
2106
  throw new Error(
1815
2107
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
1816
2108
  );
1817
2109
  if (!Array.isArray(e))
1818
2110
  throw new Error("items must be an array.");
1819
- const l = `${s}-button`, c = `${s}-popup`, u = e.map((b) => ({
2111
+ const l = `${s}-button`, c = `${s}-popup`, u = e.map((g) => ({
1820
2112
  kind: "element",
1821
2113
  tag: "button",
1822
2114
  attrs: {
1823
- "aria-disabled": b.disabled ? "true" : void 0,
1824
- "data-item-id": b.id || void 0,
2115
+ "aria-disabled": g.disabled ? "true" : void 0,
2116
+ "data-item-id": g.id || void 0,
1825
2117
  role: "menuitem",
1826
2118
  tabindex: "-1",
1827
2119
  type: "button"
1828
2120
  },
1829
- children: [{ kind: "text", value: b.label }]
2121
+ children: [{ kind: "text", value: g.label }]
1830
2122
  }));
1831
2123
  return {
1832
2124
  kind: "element",
1833
- tag: R,
2125
+ tag: U,
1834
2126
  attrs: {
1835
2127
  class: "set-menu",
1836
2128
  "data-align": t === "start" ? void 0 : t,
@@ -1843,7 +2135,7 @@ function St({
1843
2135
  tag: "div",
1844
2136
  attrs: { "data-part": "trigger" },
1845
2137
  children: [
1846
- G({
2138
+ tt({
1847
2139
  appearance: "outline",
1848
2140
  controls: c,
1849
2141
  disclosure: !0,
@@ -1875,61 +2167,61 @@ function St({
1875
2167
  ]
1876
2168
  };
1877
2169
  }
1878
- function Me(t) {
1879
- return h(St(t));
2170
+ function Ue(t) {
2171
+ return h(_t(t));
1880
2172
  }
1881
- function xt() {
1882
- if (customElements.get(R)) return;
2173
+ function Dt() {
2174
+ if (customElements.get(U)) return;
1883
2175
  class t extends HTMLElement {
1884
2176
  #t;
1885
2177
  #e;
1886
2178
  #i;
1887
2179
  #n;
1888
2180
  connectedCallback() {
1889
- this.#l(), this.#r(!1), this.#m();
2181
+ this.#p(), this.#o(!1), this.#k();
1890
2182
  }
1891
2183
  disconnectedCallback() {
1892
- this.#l();
2184
+ this.#p();
1893
2185
  }
1894
- #a() {
2186
+ #d() {
1895
2187
  return this.querySelector(
1896
2188
  '[data-part="trigger"] .set-button'
1897
2189
  );
1898
2190
  }
1899
- #o() {
2191
+ #r() {
1900
2192
  return this.querySelector('[role="menu"]');
1901
2193
  }
1902
- #k() {
2194
+ #c() {
1903
2195
  return Array.from(
1904
2196
  this.querySelectorAll('[role="menuitem"]')
1905
2197
  );
1906
2198
  }
1907
- #p(e) {
2199
+ #s(e) {
1908
2200
  return e.getAttribute("aria-disabled") === "true";
1909
2201
  }
1910
- #c() {
2202
+ #u() {
1911
2203
  return this.hasAttribute("data-open");
1912
2204
  }
1913
- #d(e) {
1914
- const i = this.#k();
2205
+ #a(e) {
2206
+ const i = this.#c();
1915
2207
  if (i.length === 0) return;
1916
2208
  const r = (e % i.length + i.length) % i.length;
1917
2209
  i[r]?.focus();
1918
2210
  }
1919
- #s(e = 0) {
1920
- const i = this.#o(), r = this.#a();
1921
- !i || !r || (i.hidden = !1, this.setAttribute("data-open", ""), r.setAttribute("aria-expanded", "true"), this.#d(e));
2211
+ #l(e = 0) {
2212
+ const i = this.#r(), r = this.#d();
2213
+ !i || !r || (i.hidden = !1, this.setAttribute("data-open", ""), r.setAttribute("aria-expanded", "true"), this.#a(e));
1922
2214
  }
1923
- #r(e = !1) {
1924
- const i = this.#o(), r = this.#a();
2215
+ #o(e = !1) {
2216
+ const i = this.#r(), r = this.#d();
1925
2217
  !i || !r || (i.hidden = !0, this.removeAttribute("data-open"), r.setAttribute("aria-expanded", "false"), e && r.focus());
1926
2218
  }
1927
- #u(e) {
2219
+ #h(e) {
1928
2220
  const r = Array.from(
1929
2221
  this.querySelectorAll('[role="menuitem"]')
1930
2222
  ).indexOf(e);
1931
2223
  this.dispatchEvent(
1932
- new CustomEvent(st, {
2224
+ new CustomEvent(kt, {
1933
2225
  bubbles: !0,
1934
2226
  detail: {
1935
2227
  id: e.getAttribute("data-item-id") || void 0,
@@ -1939,65 +2231,65 @@ function xt() {
1939
2231
  })
1940
2232
  );
1941
2233
  }
1942
- #m() {
2234
+ #k() {
1943
2235
  this.#t = (e) => {
1944
2236
  const i = e.target;
1945
2237
  if (!(i instanceof Element)) return;
1946
2238
  if (i.closest('[data-part="trigger"] .set-button')) {
1947
- if (this.#c()) {
1948
- this.#r();
2239
+ if (this.#u()) {
2240
+ this.#o();
1949
2241
  return;
1950
2242
  }
1951
- this.#s(0);
2243
+ this.#l(0);
1952
2244
  return;
1953
2245
  }
1954
2246
  const r = i.closest('[role="menuitem"]');
1955
2247
  if (r && this.contains(r)) {
1956
- this.#p(r) || (this.#u(r), this.#r(!0));
2248
+ this.#s(r) || (this.#h(r), this.#o(!0));
1957
2249
  return;
1958
2250
  }
1959
2251
  }, this.#e = (e) => {
1960
2252
  const i = e.target;
1961
- i instanceof Node && this.#c() && !this.contains(i) && this.#r();
2253
+ i instanceof Node && this.#u() && !this.contains(i) && this.#o();
1962
2254
  }, this.#n = (e) => {
1963
- const i = this.#a(), r = this.#o();
2255
+ const i = this.#d(), r = this.#r();
1964
2256
  if (!i || !r) return;
1965
- if ((e.key === "Escape" || e.key === "Esc") && this.#c()) {
1966
- e.preventDefault(), this.#r(!0);
2257
+ if ((e.key === "Escape" || e.key === "Esc") && this.#u()) {
2258
+ e.preventDefault(), this.#o(!0);
1967
2259
  return;
1968
2260
  }
1969
- const a = this.ownerDocument.activeElement, o = this.#k(), d = o.indexOf(a);
2261
+ const a = this.ownerDocument.activeElement, o = this.#c(), d = o.indexOf(a);
1970
2262
  if (a === i) {
1971
- (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));
2263
+ (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));
1972
2264
  return;
1973
2265
  }
1974
2266
  if (r.contains(a)) {
1975
2267
  if (a instanceof HTMLButtonElement && (e.key === "Enter" || e.key === " ")) {
1976
- e.preventDefault(), this.#p(a) || (this.#u(a), this.#r(!0));
2268
+ e.preventDefault(), this.#s(a) || (this.#h(a), this.#o(!0));
1977
2269
  return;
1978
2270
  }
1979
- 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);
2271
+ 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);
1980
2272
  }
1981
2273
  }, this.#i = (e) => {
1982
2274
  const i = e.relatedTarget;
1983
2275
  if (!(i instanceof Node)) {
1984
- this.#r();
2276
+ this.#o();
1985
2277
  return;
1986
2278
  }
1987
- this.contains(i) || this.#r();
2279
+ this.contains(i) || this.#o();
1988
2280
  }, this.addEventListener("click", this.#t), this.addEventListener("keydown", this.#n), this.addEventListener("focusout", this.#i), this.ownerDocument.addEventListener("click", this.#e);
1989
2281
  }
1990
- #l() {
2282
+ #p() {
1991
2283
  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;
1992
2284
  }
1993
2285
  }
1994
- customElements.define(R, t);
2286
+ customElements.define(U, t);
1995
2287
  }
1996
- const Le = {
2288
+ const $e = {
1997
2289
  name: "menu",
1998
2290
  description: "Use `menu` to show a list of actions from a trigger button.",
1999
2291
  output: {
2000
- element: R,
2292
+ element: U,
2001
2293
  class: "set-menu"
2002
2294
  },
2003
2295
  content: {
@@ -2071,7 +2363,7 @@ const Le = {
2071
2363
  }
2072
2364
  },
2073
2365
  events: {
2074
- [st]: {
2366
+ [kt]: {
2075
2367
  bubbles: !0,
2076
2368
  description: "Fired when a menu item is activated.",
2077
2369
  detail: "{ id?: string; index: number; label: string }"
@@ -2131,15 +2423,15 @@ const Le = {
2131
2423
  }
2132
2424
  ]
2133
2425
  }
2134
- }, j = "Menu";
2135
- function Et({
2426
+ }, Y = "Menu";
2427
+ function Ht({
2136
2428
  controlsId: t,
2137
2429
  expanded: n,
2138
2430
  id: e,
2139
- label: i = j,
2431
+ label: i = Y,
2140
2432
  size: r = "md"
2141
2433
  } = {}) {
2142
- const a = k(e), o = i.trim() === "" ? j : i;
2434
+ const a = k(e), o = i.trim() === "" ? Y : i;
2143
2435
  return {
2144
2436
  kind: "element",
2145
2437
  tag: "button",
@@ -2174,10 +2466,10 @@ function Et({
2174
2466
  ]
2175
2467
  };
2176
2468
  }
2177
- function zt(t = {}) {
2178
- return h(Et(t));
2469
+ function Nt(t = {}) {
2470
+ return h(Ht(t));
2179
2471
  }
2180
- const qe = {
2472
+ const Ge = {
2181
2473
  name: "expander",
2182
2474
  description: "Use `expander` as a toggle for disclosure regions such as menus.",
2183
2475
  output: { element: "button", class: "set-expander" },
@@ -2197,7 +2489,7 @@ const qe = {
2197
2489
  type: { kind: "string" }
2198
2490
  },
2199
2491
  label: {
2200
- default: j,
2492
+ default: Y,
2201
2493
  description: "Accessible label.",
2202
2494
  type: { kind: "text" }
2203
2495
  },
@@ -2242,8 +2534,8 @@ const qe = {
2242
2534
  }
2243
2535
  ]
2244
2536
  }
2245
- }, W = "set-nav", Y = "data-set-scroll-locked";
2246
- function Ct({
2537
+ }, $ = "set-nav", rt = "data-set-scroll-locked";
2538
+ function Vt({
2247
2539
  collapsible: t,
2248
2540
  contentId: n,
2249
2541
  expanderLabel: e,
@@ -2258,7 +2550,7 @@ function Ct({
2258
2550
  throw new Error(
2259
2551
  "contentId must be a non-empty string when collapsible is set."
2260
2552
  );
2261
- if (l && !q(l))
2553
+ if (l && !I(l))
2262
2554
  throw new Error(
2263
2555
  "contentId must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2264
2556
  );
@@ -2281,7 +2573,7 @@ function Ct({
2281
2573
  }));
2282
2574
  return {
2283
2575
  kind: "element",
2284
- tag: W,
2576
+ tag: $,
2285
2577
  attrs: {
2286
2578
  class: "set-nav",
2287
2579
  "data-collapsible": t,
@@ -2320,79 +2612,79 @@ function Ct({
2320
2612
  ]
2321
2613
  };
2322
2614
  }
2323
- function Ie(t) {
2324
- return h(Ct(t));
2615
+ function Ze(t) {
2616
+ return h(Vt(t));
2325
2617
  }
2326
- function Mt() {
2327
- if (customElements.get(W)) return;
2618
+ function Ot() {
2619
+ if (customElements.get($)) return;
2328
2620
  class t extends HTMLElement {
2329
2621
  #t;
2330
2622
  #e;
2331
2623
  #i;
2332
2624
  #n;
2333
2625
  connectedCallback() {
2334
- this.#r(), this.#u(), this.#k(), this.#c(), this.#d();
2626
+ this.#o(), this.#h(), this.#c(), this.#u(), this.#a();
2335
2627
  }
2336
2628
  disconnectedCallback() {
2337
- this.#p(!1), this.#r(), this.#u();
2629
+ this.#s(!1), this.#o(), this.#h();
2338
2630
  }
2339
- #a() {
2631
+ #d() {
2340
2632
  return this.hasAttribute("data-collapsible") ? this.querySelector(".nav") : null;
2341
2633
  }
2342
- #o() {
2634
+ #r() {
2343
2635
  return this.querySelector(
2344
2636
  '[data-part="expander"] .set-expander'
2345
2637
  );
2346
2638
  }
2347
- #k() {
2348
- const e = this.#a();
2639
+ #c() {
2640
+ const e = this.#d();
2349
2641
  if (!e || e.querySelector('[data-part="expander"]')) return;
2350
2642
  const i = e.querySelector(".content");
2351
2643
  i && e.insertAdjacentHTML(
2352
2644
  "afterbegin",
2353
- `<div data-part="expander">${zt({
2645
+ `<div data-part="expander">${Nt({
2354
2646
  controlsId: i.id || void 0,
2355
2647
  label: this.getAttribute("data-expander-label") || void 0,
2356
2648
  size: this.getAttribute("data-size") === "sm" ? "md" : "lg"
2357
2649
  })}</div>`
2358
2650
  );
2359
2651
  }
2360
- #p(e) {
2361
- const i = this.#o();
2362
- !i || i.getAttribute("aria-expanded") === "true" === e || (i.setAttribute("aria-expanded", e ? "true" : "false"), this.#s(e));
2652
+ #s(e) {
2653
+ const i = this.#r();
2654
+ !i || i.getAttribute("aria-expanded") === "true" === e || (i.setAttribute("aria-expanded", e ? "true" : "false"), this.#l(e));
2363
2655
  }
2364
- #c() {
2656
+ #u() {
2365
2657
  this.#t = (e) => {
2366
2658
  const i = e.target;
2367
2659
  if (!(i instanceof Element) || !i.closest('[data-part="expander"] .set-expander')) return;
2368
- const r = this.#o();
2369
- r && this.#p(r.getAttribute("aria-expanded") !== "true");
2660
+ const r = this.#r();
2661
+ r && this.#s(r.getAttribute("aria-expanded") !== "true");
2370
2662
  }, this.addEventListener("click", this.#t);
2371
2663
  }
2372
- #d() {
2373
- const e = this.#a(), i = this.ownerDocument.defaultView;
2664
+ #a() {
2665
+ const e = this.#d(), i = this.ownerDocument.defaultView;
2374
2666
  if (!e || !i || (this.#i = (a) => {
2375
- a.key !== "Escape" && a.key !== "Esc" || this.#p(!1);
2667
+ a.key !== "Escape" && a.key !== "Esc" || this.#s(!1);
2376
2668
  }, i.addEventListener("keydown", this.#i), this.getAttribute("data-collapsible") !== "belowTablet") || typeof i.matchMedia != "function") return;
2377
2669
  const r = i.matchMedia("(min-width: 48em)");
2378
2670
  this.#e = r, this.#n = (a) => {
2379
- a.matches && this.#p(!1);
2671
+ a.matches && this.#s(!1);
2380
2672
  }, r.addEventListener("change", this.#n);
2381
2673
  }
2382
- #s(e) {
2674
+ #l(e) {
2383
2675
  const i = this.ownerDocument.documentElement;
2384
2676
  if (i) {
2385
2677
  if (e) {
2386
- i.setAttribute(Y, "");
2678
+ i.setAttribute(rt, "");
2387
2679
  return;
2388
2680
  }
2389
- i.removeAttribute(Y);
2681
+ i.removeAttribute(rt);
2390
2682
  }
2391
2683
  }
2392
- #r() {
2684
+ #o() {
2393
2685
  this.#t && (this.removeEventListener("click", this.#t), this.#t = void 0);
2394
2686
  }
2395
- #u() {
2687
+ #h() {
2396
2688
  const e = this.ownerDocument.defaultView;
2397
2689
  this.#i && e && e.removeEventListener("keydown", this.#i), this.#e && this.#n && this.#e.removeEventListener(
2398
2690
  "change",
@@ -2400,12 +2692,12 @@ function Mt() {
2400
2692
  ), this.#i = void 0, this.#n = void 0, this.#e = void 0;
2401
2693
  }
2402
2694
  }
2403
- customElements.define(W, t);
2695
+ customElements.define($, t);
2404
2696
  }
2405
- const Te = {
2697
+ const Fe = {
2406
2698
  name: "nav",
2407
2699
  description: "Use `nav` to render a primary navigation list.",
2408
- output: { element: W, class: "set-nav" },
2700
+ output: { element: $, class: "set-nav" },
2409
2701
  content: { kind: "structured", prop: "items" },
2410
2702
  props: {
2411
2703
  items: {
@@ -2517,8 +2809,8 @@ const Te = {
2517
2809
  }
2518
2810
  ]
2519
2811
  }
2520
- }, U = "set-range";
2521
- function Lt({
2812
+ }, G = "set-range";
2813
+ function Pt({
2522
2814
  description: t,
2523
2815
  disabled: n,
2524
2816
  id: e,
@@ -2531,10 +2823,10 @@ function Lt({
2531
2823
  step: s,
2532
2824
  value: l
2533
2825
  }) {
2534
- const c = e.trim(), u = t?.trim(), b = d?.trim();
2826
+ const c = e.trim(), u = t?.trim(), g = d?.trim();
2535
2827
  if (!c)
2536
2828
  throw new Error("id must be a non-empty string.");
2537
- if (!q(c))
2829
+ if (!I(c))
2538
2830
  throw new Error(
2539
2831
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2540
2832
  );
@@ -2568,7 +2860,7 @@ function Lt({
2568
2860
  id: c,
2569
2861
  max: a != null ? String(a) : void 0,
2570
2862
  min: o != null ? String(o) : void 0,
2571
- name: b || void 0,
2863
+ name: g || void 0,
2572
2864
  step: s != null ? String(s) : void 0,
2573
2865
  type: "range",
2574
2866
  value: l != null ? String(l) : void 0
@@ -2583,7 +2875,7 @@ function Lt({
2583
2875
  children: [{ kind: "text", value: u }]
2584
2876
  }), {
2585
2877
  kind: "element",
2586
- tag: U,
2878
+ tag: G,
2587
2879
  attrs: {
2588
2880
  class: "set-range",
2589
2881
  "data-inline-size": i === "fit" ? "fit" : void 0,
@@ -2592,11 +2884,11 @@ function Lt({
2592
2884
  children: m
2593
2885
  };
2594
2886
  }
2595
- function Ae(t) {
2596
- return h(Lt(t));
2887
+ function je(t) {
2888
+ return h(Pt(t));
2597
2889
  }
2598
- function qt() {
2599
- if (customElements.get(U)) return;
2890
+ function Bt() {
2891
+ if (customElements.get(G)) return;
2600
2892
  class t extends HTMLElement {
2601
2893
  #t;
2602
2894
  #e = (e) => {
@@ -2604,10 +2896,10 @@ function qt() {
2604
2896
  i instanceof HTMLInputElement && i.matches(".range") && this.#i();
2605
2897
  };
2606
2898
  connectedCallback() {
2607
- this.removeEventListener("input", this.#e), this.#a(), this.#i(), this.addEventListener("input", this.#e);
2899
+ this.removeEventListener("input", this.#e), this.#d(), this.#i(), this.addEventListener("input", this.#e);
2608
2900
  }
2609
2901
  disconnectedCallback() {
2610
- this.removeEventListener("input", this.#e), this.#o();
2902
+ this.removeEventListener("input", this.#e), this.#r();
2611
2903
  }
2612
2904
  #i() {
2613
2905
  const e = this.querySelector(".range"), i = this.querySelector(".output");
@@ -2625,10 +2917,10 @@ function qt() {
2625
2917
  // not fire an `input` event, so the output wouldn't track it. Override
2626
2918
  // the instance's `value` accessor to sync the output on set, restoring
2627
2919
  // the prototype behaviour on disconnect.
2628
- #a() {
2920
+ #d() {
2629
2921
  const e = this.querySelector(".range");
2630
2922
  if (!e || e === this.#t) return;
2631
- this.#o();
2923
+ this.#r();
2632
2924
  const i = Object.getOwnPropertyDescriptor(
2633
2925
  HTMLInputElement.prototype,
2634
2926
  "value"
@@ -2646,16 +2938,16 @@ function qt() {
2646
2938
  }
2647
2939
  }), this.#t = e;
2648
2940
  }
2649
- #o() {
2941
+ #r() {
2650
2942
  this.#t && (delete this.#t.value, this.#t = void 0);
2651
2943
  }
2652
2944
  }
2653
- customElements.define(U, t);
2945
+ customElements.define(G, t);
2654
2946
  }
2655
- const _e = {
2947
+ const Ke = {
2656
2948
  name: "range",
2657
2949
  description: "Use `range` to let users pick a numeric value along a scale.",
2658
- output: { element: U, class: "set-range" },
2950
+ output: { element: G, class: "set-range" },
2659
2951
  content: { kind: "text", prop: "label" },
2660
2952
  props: {
2661
2953
  description: {
@@ -2784,9 +3076,9 @@ const _e = {
2784
3076
  }
2785
3077
  ]
2786
3078
  }
2787
- }, $ = "set-sidebar", It = "(min-width: 68em)", T = "Collapse sidebar", F = "Open sidebar";
2788
- function Tt(t, n) {
2789
- return `<div data-part="close">${K({
3079
+ }, Z = "set-sidebar", Rt = "(min-width: 68em)", _ = "Collapse sidebar", J = "Open sidebar";
3080
+ function Wt(t, n) {
3081
+ return `<div data-part="close">${et({
2790
3082
  appearance: "text",
2791
3083
  icon: "panel-left",
2792
3084
  iconMirrored: "rtl",
@@ -2797,21 +3089,21 @@ function Tt(t, n) {
2797
3089
  type: "button"
2798
3090
  })}</div>`;
2799
3091
  }
2800
- function At({
3092
+ function Ut({
2801
3093
  aboveNotebook: t = "persistent",
2802
3094
  buttonSize: n = "md",
2803
3095
  children: e,
2804
- collapseLabel: i = T,
3096
+ collapseLabel: i = _,
2805
3097
  footer: r,
2806
3098
  header: a,
2807
3099
  id: o,
2808
3100
  surface: d,
2809
- triggerLabel: p = F
3101
+ triggerLabel: p = J
2810
3102
  }) {
2811
- const s = o.trim(), l = i.trim() || T, c = p.trim() || F;
3103
+ const s = o.trim(), l = i.trim() || _, c = p.trim() || J;
2812
3104
  if (!s)
2813
3105
  throw new Error("id must be a non-empty string.");
2814
- if (!q(s))
3106
+ if (!I(s))
2815
3107
  throw new Error(
2816
3108
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
2817
3109
  );
@@ -2835,14 +3127,14 @@ function At({
2835
3127
  attrs: { class: "footer" },
2836
3128
  children: [{ kind: "raw", html: r }]
2837
3129
  });
2838
- const b = `${s}-panel`;
3130
+ const g = `${s}-panel`;
2839
3131
  return {
2840
3132
  kind: "element",
2841
- tag: $,
3133
+ tag: Z,
2842
3134
  attrs: {
2843
3135
  class: "set-sidebar",
2844
3136
  "data-above-notebook": t,
2845
- "data-collapse-label": l !== T ? l : void 0,
3137
+ "data-collapse-label": l !== _ ? l : void 0,
2846
3138
  "data-button-size": n,
2847
3139
  id: s
2848
3140
  },
@@ -2852,9 +3144,9 @@ function At({
2852
3144
  tag: "div",
2853
3145
  attrs: { "data-part": "trigger" },
2854
3146
  children: [
2855
- G({
3147
+ tt({
2856
3148
  appearance: "text",
2857
- controls: b,
3149
+ controls: g,
2858
3150
  disclosure: !0,
2859
3151
  icon: "panel-left",
2860
3152
  iconMirrored: "rtl",
@@ -2872,7 +3164,7 @@ function At({
2872
3164
  attrs: {
2873
3165
  class: "sidebar",
2874
3166
  "data-set-surface": d,
2875
- id: b,
3167
+ id: g,
2876
3168
  tabindex: "-1"
2877
3169
  },
2878
3170
  children: u
@@ -2886,18 +3178,18 @@ function At({
2886
3178
  ]
2887
3179
  };
2888
3180
  }
2889
- function De(t) {
2890
- return h(At(t));
3181
+ function Qe(t) {
3182
+ return h(Ut(t));
2891
3183
  }
2892
- function _t() {
2893
- if (customElements.get($)) return;
3184
+ function $t() {
3185
+ if (customElements.get(Z)) return;
2894
3186
  class t extends HTMLElement {
2895
3187
  #t;
2896
3188
  #e;
2897
3189
  #i;
2898
3190
  #n;
2899
3191
  connectedCallback() {
2900
- this.#v(), this.#s(), this.#g(), this.#f();
3192
+ this.#v(), this.#l(), this.#g(), this.#f();
2901
3193
  }
2902
3194
  disconnectedCallback() {
2903
3195
  this.close(), this.#v();
@@ -2908,99 +3200,99 @@ function _t() {
2908
3200
  close() {
2909
3201
  this.#b(!1);
2910
3202
  }
2911
- #a() {
3203
+ #d() {
2912
3204
  return this.querySelector(".sidebar");
2913
3205
  }
2914
- #o() {
3206
+ #r() {
2915
3207
  return this.querySelector(
2916
3208
  '[data-part="close"] .set-button'
2917
3209
  );
2918
3210
  }
2919
- #k() {
3211
+ #c() {
2920
3212
  return this.querySelector(
2921
3213
  '[data-part="trigger"] .set-button'
2922
3214
  );
2923
3215
  }
2924
- #p() {
3216
+ #s() {
2925
3217
  return this.hasAttribute("data-open");
2926
3218
  }
2927
- #c() {
3219
+ #u() {
2928
3220
  return this.hasAttribute("data-collapsed");
2929
3221
  }
2930
- #d() {
3222
+ #a() {
2931
3223
  const e = this.getAttribute("data-above-notebook");
2932
3224
  return e === "collapsible" || e === "overlay" ? e : "persistent";
2933
3225
  }
2934
- #s() {
2935
- const e = this.#a();
3226
+ #l() {
3227
+ const e = this.#d();
2936
3228
  if (!e || e.querySelector('[data-part="close"]')) return;
2937
- const i = e.querySelector(".header"), r = this.getAttribute("data-collapse-label") || T, a = this.getAttribute("data-button-size") ?? "md";
3229
+ const i = e.querySelector(".header"), r = this.getAttribute("data-collapse-label") || _, a = this.getAttribute("data-button-size") ?? "md";
2938
3230
  i?.insertAdjacentHTML(
2939
3231
  "beforeend",
2940
- Tt(r, a)
3232
+ Wt(r, a)
2941
3233
  );
2942
3234
  }
2943
- #r() {
3235
+ #o() {
2944
3236
  this.querySelector('[data-part="close"]')?.remove();
2945
3237
  }
2946
- #u() {
2947
- const e = this.#o();
3238
+ #h() {
3239
+ const e = this.#r();
2948
3240
  if (e) {
2949
3241
  e.focus();
2950
3242
  return;
2951
3243
  }
2952
- this.#a()?.focus();
3244
+ this.#d()?.focus();
2953
3245
  }
2954
- #m() {
3246
+ #k() {
2955
3247
  return this.#t?.matches ?? !1;
2956
3248
  }
2957
- #l({
3249
+ #p({
2958
3250
  collapsed: e,
2959
3251
  open: i
2960
3252
  }) {
2961
- const r = this.#k();
3253
+ const r = this.#c();
2962
3254
  this.toggleAttribute("data-open", i), this.toggleAttribute("data-collapsed", e), r?.setAttribute("aria-expanded", i ? "true" : "false");
2963
3255
  }
2964
3256
  #g() {
2965
- const e = this.#d();
2966
- if (this.#m()) {
3257
+ const e = this.#a();
3258
+ if (this.#k()) {
2967
3259
  if (e === "overlay") {
2968
- this.#s(), this.#l({ collapsed: !1, open: !1 }), this.#h(!1);
3260
+ this.#l(), this.#p({ collapsed: !1, open: !1 }), this.#m(!1);
2969
3261
  return;
2970
3262
  }
2971
3263
  if (e === "collapsible") {
2972
- this.#s(), this.#l({
2973
- collapsed: this.#c(),
3264
+ this.#l(), this.#p({
3265
+ collapsed: this.#u(),
2974
3266
  open: !0
2975
- }), this.#h(!1);
3267
+ }), this.#m(!1);
2976
3268
  return;
2977
3269
  }
2978
- this.#r(), this.#l({ collapsed: !1, open: !0 }), this.#h(!1);
3270
+ this.#o(), this.#p({ collapsed: !1, open: !0 }), this.#m(!1);
2979
3271
  return;
2980
3272
  }
2981
- this.#s(), this.#l({ collapsed: !1, open: !1 }), this.#h(!1);
3273
+ this.#l(), this.#p({ collapsed: !1, open: !1 }), this.#m(!1);
2982
3274
  }
2983
3275
  #b(e) {
2984
- const i = this.#d();
2985
- if (this.#m()) {
3276
+ const i = this.#a();
3277
+ if (this.#k()) {
2986
3278
  if (i === "persistent") {
2987
- this.#l({ collapsed: !1, open: !0 }), this.#h(!1);
3279
+ this.#p({ collapsed: !1, open: !0 }), this.#m(!1);
2988
3280
  return;
2989
3281
  }
2990
3282
  if (i === "collapsible") {
2991
- this.#l({ collapsed: !e, open: !0 }), this.#h(!1), e && this.#u();
3283
+ this.#p({ collapsed: !e, open: !0 }), this.#m(!1), e && this.#h();
2992
3284
  return;
2993
3285
  }
2994
3286
  }
2995
- if (this.#p() !== e) {
3287
+ if (this.#s() !== e) {
2996
3288
  if (e) {
2997
- this.#l({ collapsed: !1, open: !0 }), this.#h(!0), this.#u();
3289
+ this.#p({ collapsed: !1, open: !0 }), this.#m(!0), this.#h();
2998
3290
  return;
2999
3291
  }
3000
- this.#l({ collapsed: !1, open: !1 }), this.#h(!1), this.#k()?.focus();
3292
+ this.#p({ collapsed: !1, open: !1 }), this.#m(!1), this.#c()?.focus();
3001
3293
  }
3002
3294
  }
3003
- #h(e) {
3295
+ #m(e) {
3004
3296
  const i = this.ownerDocument.documentElement;
3005
3297
  if (i) {
3006
3298
  if (e) {
@@ -3012,7 +3304,7 @@ function _t() {
3012
3304
  }
3013
3305
  #f() {
3014
3306
  const e = this.ownerDocument.defaultView;
3015
- e && (typeof e.matchMedia == "function" && (this.#t = e.matchMedia(It), this.#n = () => {
3307
+ e && (typeof e.matchMedia == "function" && (this.#t = e.matchMedia(Rt), this.#n = () => {
3016
3308
  this.#g();
3017
3309
  }, this.#t.addEventListener("change", this.#n), this.#g()), this.#e = (i) => {
3018
3310
  const r = i.target;
@@ -3022,8 +3314,8 @@ function _t() {
3022
3314
  return;
3023
3315
  }
3024
3316
  if (r.closest('[data-part="close"] .set-button')) {
3025
- if (this.#m() && this.#d() === "collapsible") {
3026
- this.#b(this.#c());
3317
+ if (this.#k() && this.#a() === "collapsible") {
3318
+ this.#b(this.#u());
3027
3319
  return;
3028
3320
  }
3029
3321
  this.close();
@@ -3039,13 +3331,13 @@ function _t() {
3039
3331
  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;
3040
3332
  }
3041
3333
  }
3042
- customElements.define($, t);
3334
+ customElements.define(Z, t);
3043
3335
  }
3044
- const Ne = {
3336
+ const Xe = {
3045
3337
  name: "sidebar",
3046
3338
  description: "Use `sidebar` for a side panel alongside main content.",
3047
3339
  output: {
3048
- element: $,
3340
+ element: Z,
3049
3341
  class: "set-sidebar"
3050
3342
  },
3051
3343
  content: {
@@ -3075,7 +3367,7 @@ const Ne = {
3075
3367
  type: { kind: "html" }
3076
3368
  },
3077
3369
  collapseLabel: {
3078
- default: T,
3370
+ default: _,
3079
3371
  description: "Accessible label for the collapse button.",
3080
3372
  type: { kind: "string" }
3081
3373
  },
@@ -3100,7 +3392,7 @@ const Ne = {
3100
3392
  }
3101
3393
  },
3102
3394
  triggerLabel: {
3103
- default: F,
3395
+ default: J,
3104
3396
  description: "Accessible label for the open button.",
3105
3397
  type: { kind: "string" }
3106
3398
  }
@@ -3132,7 +3424,7 @@ const Ne = {
3132
3424
  of: {
3133
3425
  kind: "when-equals",
3134
3426
  prop: "collapseLabel",
3135
- to: T
3427
+ to: _
3136
3428
  }
3137
3429
  }
3138
3430
  ]
@@ -3165,55 +3457,258 @@ const Ne = {
3165
3457
  }
3166
3458
  ]
3167
3459
  }
3460
+ }, F = "set-video";
3461
+ function Gt({
3462
+ autoPlay: t,
3463
+ controls: n,
3464
+ fit: e = "intrinsic",
3465
+ height: i,
3466
+ id: r,
3467
+ loop: a,
3468
+ muted: o,
3469
+ playsInline: d,
3470
+ poster: p,
3471
+ preload: s,
3472
+ src: l,
3473
+ width: c
3474
+ }) {
3475
+ const u = k(r), g = l.trim(), v = p?.trim();
3476
+ if (!g)
3477
+ throw new Error("src must be a non-empty string.");
3478
+ const m = {
3479
+ kind: "element",
3480
+ tag: "video",
3481
+ attrs: {
3482
+ autoplay: !!t,
3483
+ class: "video",
3484
+ controls: !!n,
3485
+ height: i ? String(i) : void 0,
3486
+ loop: !!a,
3487
+ muted: !!o,
3488
+ playsinline: !!d,
3489
+ poster: v || void 0,
3490
+ preload: s,
3491
+ src: g,
3492
+ width: c ? String(c) : void 0
3493
+ },
3494
+ children: []
3495
+ };
3496
+ return {
3497
+ kind: "element",
3498
+ tag: F,
3499
+ attrs: {
3500
+ class: "set-video",
3501
+ "data-fluid": e === "fluid",
3502
+ id: u
3503
+ },
3504
+ children: [m]
3505
+ };
3506
+ }
3507
+ function Ye(t) {
3508
+ return h(Gt(t));
3509
+ }
3510
+ const Zt = "(prefers-reduced-motion: reduce)";
3511
+ function Ft() {
3512
+ if (customElements.get(F)) return;
3513
+ class t extends HTMLElement {
3514
+ #t = !1;
3515
+ #e;
3516
+ #i;
3517
+ connectedCallback() {
3518
+ const e = this.querySelector("video");
3519
+ if (!e || (this.#t ||= e.hasAttribute("autoplay"), !this.#t)) return;
3520
+ const i = this.ownerDocument.defaultView;
3521
+ !i || typeof i.matchMedia != "function" || (this.#e = i.matchMedia(Zt), this.#i = () => {
3522
+ this.#n();
3523
+ }, this.#e.addEventListener("change", this.#i), this.#n());
3524
+ }
3525
+ disconnectedCallback() {
3526
+ this.#e && this.#i && this.#e.removeEventListener("change", this.#i), this.#e = void 0, this.#i = void 0;
3527
+ }
3528
+ #n() {
3529
+ const e = this.querySelector("video");
3530
+ !e || !this.#e || (this.#e.matches ? (e.removeAttribute("autoplay"), e.pause()) : (e.setAttribute("autoplay", ""), e.paused && e.play()?.catch?.(() => {
3531
+ })));
3532
+ }
3533
+ }
3534
+ customElements.define(F, t);
3535
+ }
3536
+ const Je = {
3537
+ name: "video",
3538
+ description: "Use `video` to render a video with intrinsic or fluid fit and native playback behavior.",
3539
+ output: { element: F, class: "set-video" },
3540
+ content: { kind: "none" },
3541
+ props: {
3542
+ autoPlay: {
3543
+ default: !1,
3544
+ description: "Starts playback automatically. Browsers only honor this when `muted` is also set. Suspended when the user prefers reduced motion.",
3545
+ type: { kind: "boolean" }
3546
+ },
3547
+ controls: {
3548
+ default: !1,
3549
+ description: "Shows the browser's native playback controls.",
3550
+ type: { kind: "boolean" }
3551
+ },
3552
+ fit: {
3553
+ default: "intrinsic",
3554
+ 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.",
3555
+ type: { kind: "enum", values: ["intrinsic", "fluid"] }
3556
+ },
3557
+ height: {
3558
+ description: "Intrinsic height in pixels. With `width`, reserves the correctly shaped box before the media loads; rendered height always follows the aspect ratio.",
3559
+ type: { kind: "number" }
3560
+ },
3561
+ id: {
3562
+ description: "DOM id.",
3563
+ type: { kind: "string" }
3564
+ },
3565
+ loop: {
3566
+ default: !1,
3567
+ description: "Restarts playback when the video ends.",
3568
+ type: { kind: "boolean" }
3569
+ },
3570
+ muted: {
3571
+ default: !1,
3572
+ description: "Starts playback silent. Required for `autoPlay` to take effect in most browsers.",
3573
+ type: { kind: "boolean" }
3574
+ },
3575
+ playsInline: {
3576
+ default: !1,
3577
+ description: "Plays inline instead of fullscreen on iOS. Required for `autoPlay` on iOS.",
3578
+ type: { kind: "boolean" }
3579
+ },
3580
+ poster: {
3581
+ description: "Image URL shown before playback begins.",
3582
+ type: { kind: "string" }
3583
+ },
3584
+ preload: {
3585
+ description: "Preload hint. Omitted by default, deferring to the browser.",
3586
+ type: { kind: "enum", values: ["auto", "metadata", "none"] }
3587
+ },
3588
+ src: {
3589
+ description: "Video source URL.",
3590
+ required: !0,
3591
+ type: { kind: "string" }
3592
+ },
3593
+ width: {
3594
+ description: "Intrinsic width in pixels. Sets the rendered width, capped at the container; under `fluid`, an aspect-ratio hint only.",
3595
+ type: { kind: "number" }
3596
+ }
3597
+ },
3598
+ events: {},
3599
+ rules: {
3600
+ attributes: [
3601
+ {
3602
+ target: { on: "host" },
3603
+ attribute: "data-fluid",
3604
+ condition: { kind: "when-equals", prop: "fit", to: "fluid" }
3605
+ },
3606
+ {
3607
+ target: { on: "host" },
3608
+ attribute: "id",
3609
+ condition: { kind: "when-non-empty", prop: "id" },
3610
+ value: { kind: "prop", prop: "id" }
3611
+ },
3612
+ {
3613
+ target: { on: "descendant", selector: "video" },
3614
+ attribute: "class",
3615
+ condition: { kind: "always" },
3616
+ value: { kind: "literal", text: "video" }
3617
+ },
3618
+ {
3619
+ target: { on: "descendant", selector: "video" },
3620
+ attribute: "src",
3621
+ condition: { kind: "always" },
3622
+ value: { kind: "template", pattern: "{src}" }
3623
+ },
3624
+ {
3625
+ target: { on: "descendant", selector: "video" },
3626
+ attribute: "autoplay",
3627
+ condition: { kind: "when-truthy", prop: "autoPlay" }
3628
+ },
3629
+ {
3630
+ target: { on: "descendant", selector: "video" },
3631
+ attribute: "controls",
3632
+ condition: { kind: "when-truthy", prop: "controls" }
3633
+ },
3634
+ {
3635
+ target: { on: "descendant", selector: "video" },
3636
+ attribute: "loop",
3637
+ condition: { kind: "when-truthy", prop: "loop" }
3638
+ },
3639
+ {
3640
+ target: { on: "descendant", selector: "video" },
3641
+ attribute: "muted",
3642
+ condition: { kind: "when-truthy", prop: "muted" }
3643
+ },
3644
+ {
3645
+ target: { on: "descendant", selector: "video" },
3646
+ attribute: "playsinline",
3647
+ condition: { kind: "when-truthy", prop: "playsInline" }
3648
+ },
3649
+ {
3650
+ target: { on: "descendant", selector: "video" },
3651
+ attribute: "poster",
3652
+ condition: { kind: "when-non-empty", prop: "poster" },
3653
+ value: { kind: "prop", prop: "poster" }
3654
+ },
3655
+ {
3656
+ target: { on: "descendant", selector: "video" },
3657
+ attribute: "preload",
3658
+ condition: { kind: "when-provided", prop: "preload" },
3659
+ value: { kind: "prop", prop: "preload" }
3660
+ }
3661
+ ]
3662
+ }
3168
3663
  };
3169
- function Dt(t) {
3664
+ function jt(t) {
3170
3665
  return t ? /[A-Za-z]/.test(t) : !1;
3171
3666
  }
3172
- function Nt(t) {
3667
+ function Kt(t) {
3173
3668
  return /^[a-z]/.test(t);
3174
3669
  }
3175
- function I(t) {
3670
+ function T(t) {
3176
3671
  const n = t.charAt(0);
3177
- return Dt(n) ? n : void 0;
3672
+ return jt(n) ? n : void 0;
3178
3673
  }
3179
- function Ht(t) {
3180
- const n = A(t);
3674
+ function Qt(t) {
3675
+ const n = D(t);
3181
3676
  if (!n) return;
3182
- const e = n.split(" "), i = I(e[0]);
3677
+ const e = n.split(" "), i = T(e[0]);
3183
3678
  if (!i) return;
3184
3679
  const r = [i.toUpperCase()];
3185
3680
  if (e.length === 1)
3186
3681
  return r[0];
3187
- const a = e.slice(1).find(Nt);
3682
+ const a = e.slice(1).find(Kt);
3188
3683
  if (a) {
3189
- const d = I(a);
3684
+ const d = T(a);
3190
3685
  return d ? `${r[0]}${d}` : void 0;
3191
3686
  }
3192
3687
  if (e.length === 2) {
3193
- const d = I(e[1]);
3688
+ const d = T(e[1]);
3194
3689
  if (!d) return;
3195
3690
  r.push(d);
3196
3691
  const p = e[1].split("-").filter(Boolean);
3197
3692
  if (p.length === 2) {
3198
- const s = I(p[1]);
3693
+ const s = T(p[1]);
3199
3694
  s && r.push(s);
3200
3695
  }
3201
3696
  return r.slice(0, 3).join("");
3202
3697
  }
3203
3698
  if (e.length === 3) {
3204
- const d = I(e[1]), p = I(e[2]);
3699
+ const d = T(e[1]), p = T(e[2]);
3205
3700
  return !d || !p ? void 0 : (r.push(d, p), r.slice(0, 3).join(""));
3206
3701
  }
3207
- const o = I(e.at(-1) || "");
3702
+ const o = T(e.at(-1) || "");
3208
3703
  if (o)
3209
3704
  return r.push(o), r.slice(0, 3).join("");
3210
3705
  }
3211
- const Vt = {
3706
+ const Xt = {
3212
3707
  bot: "robot-1",
3213
3708
  organization: "city-6",
3214
3709
  person: "user-1",
3215
3710
  team: "member"
3216
- }, J = [
3711
+ }, at = [
3217
3712
  "01",
3218
3713
  "02",
3219
3714
  "03",
@@ -3224,15 +3719,15 @@ const Vt = {
3224
3719
  "08",
3225
3720
  "09"
3226
3721
  ];
3227
- function Ot(t) {
3722
+ function Yt(t) {
3228
3723
  let n = 5381;
3229
3724
  for (const e of t)
3230
3725
  n = n * 33 ^ e.charCodeAt(0);
3231
3726
  return n >>> 0;
3232
3727
  }
3233
- function Bt(t) {
3728
+ function Jt(t) {
3234
3729
  if (t == null) return;
3235
- const n = A(t);
3730
+ const n = D(t);
3236
3731
  if (n) {
3237
3732
  if (n.length > 3)
3238
3733
  throw new Error("initials must normalize to 3 characters or fewer.");
@@ -3241,26 +3736,26 @@ function Bt(t) {
3241
3736
  return n;
3242
3737
  }
3243
3738
  }
3244
- function Pt({
3739
+ function te({
3245
3740
  alt: t,
3246
3741
  ariaHidden: n,
3247
3742
  name: e
3248
3743
  }) {
3249
3744
  if (!n)
3250
- return A(t) || A(e) || "Avatar";
3745
+ return D(t) || D(e) || "Avatar";
3251
3746
  }
3252
- function Rt({
3747
+ function ee({
3253
3748
  color: t,
3254
3749
  name: n
3255
3750
  }) {
3256
3751
  if (t) return t;
3257
3752
  if (n) {
3258
- const e = Ot(n) % J.length;
3259
- return J[e];
3753
+ const e = Yt(n) % at.length;
3754
+ return at[e];
3260
3755
  }
3261
3756
  return "neutral";
3262
3757
  }
3263
- function Wt({
3758
+ function ie({
3264
3759
  alt: t,
3265
3760
  ariaHidden: n,
3266
3761
  color: e,
@@ -3271,16 +3766,16 @@ function Wt({
3271
3766
  size: d = "md",
3272
3767
  src: p
3273
3768
  }) {
3274
- const s = k(r), l = Bt(a), c = A(o), u = A(p), b = Pt({
3769
+ const s = k(r), l = Jt(a), c = D(o), u = D(p), g = te({
3275
3770
  alt: t,
3276
3771
  ariaHidden: n,
3277
3772
  name: c
3278
- }), v = l || Ht(c), m = !!u, f = Rt({
3773
+ }), v = l || Qt(c), m = !!u, f = ee({
3279
3774
  color: e,
3280
3775
  name: c
3281
- }), z = {
3776
+ }), E = {
3282
3777
  "aria-hidden": n ? "true" : void 0,
3283
- "aria-label": !n && !m ? b : void 0,
3778
+ "aria-label": !n && !m ? g : void 0,
3284
3779
  class: "set-avatar",
3285
3780
  "data-color": f === "neutral" ? void 0 : f,
3286
3781
  "data-entity": i === "person" ? void 0 : i,
@@ -3293,7 +3788,7 @@ function Wt({
3293
3788
  kind: "element",
3294
3789
  tag: "img",
3295
3790
  attrs: {
3296
- alt: n ? "" : b || "",
3791
+ alt: n ? "" : g || "",
3297
3792
  class: "img",
3298
3793
  src: u
3299
3794
  },
@@ -3310,21 +3805,21 @@ function Wt({
3310
3805
  children: [
3311
3806
  H({
3312
3807
  ariaHidden: !0,
3313
- name: Vt[i],
3808
+ name: Xt[i],
3314
3809
  size: "fill"
3315
3810
  })
3316
3811
  ]
3317
3812
  }, {
3318
3813
  kind: "element",
3319
3814
  tag: "span",
3320
- attrs: z,
3815
+ attrs: E,
3321
3816
  children: [S]
3322
3817
  };
3323
3818
  }
3324
- function He(t) {
3325
- return h(Wt(t));
3819
+ function ti(t) {
3820
+ return h(ie(t));
3326
3821
  }
3327
- const Ve = {
3822
+ const ei = {
3328
3823
  name: "avatar",
3329
3824
  description: "Use `avatar` to visually represent a person, team, or entity.",
3330
3825
  output: { element: "span", class: "set-avatar" },
@@ -3431,7 +3926,7 @@ const Ve = {
3431
3926
  ]
3432
3927
  }
3433
3928
  };
3434
- function Ut({
3929
+ function ne({
3435
3930
  floating: t,
3436
3931
  id: n,
3437
3932
  label: e,
@@ -3452,10 +3947,10 @@ function Ut({
3452
3947
  children: [{ kind: "text", value: e }]
3453
3948
  };
3454
3949
  }
3455
- function Oe(t) {
3456
- return h(Ut(t));
3950
+ function ii(t) {
3951
+ return h(ne(t));
3457
3952
  }
3458
- const Be = {
3953
+ const ni = {
3459
3954
  name: "badge",
3460
3955
  description: "Use `badge` to annotate content with a short label.",
3461
3956
  output: { element: "span", class: "set-badge" },
@@ -3482,7 +3977,17 @@ const Be = {
3482
3977
  },
3483
3978
  tone: {
3484
3979
  description: "Semantic tone.",
3485
- type: { kind: "enum", values: ["info", "success", "warning", "error"] }
3980
+ type: {
3981
+ kind: "enum",
3982
+ values: [
3983
+ "notification",
3984
+ "live",
3985
+ "pending",
3986
+ "success",
3987
+ "warning",
3988
+ "error"
3989
+ ]
3990
+ }
3486
3991
  }
3487
3992
  },
3488
3993
  events: {},
@@ -3514,7 +4019,7 @@ const Be = {
3514
4019
  ]
3515
4020
  }
3516
4021
  };
3517
- function Z({
4022
+ function j({
3518
4023
  align: t,
3519
4024
  as: n,
3520
4025
  children: e,
@@ -3542,10 +4047,10 @@ function Z({
3542
4047
  children: [{ kind: "raw", html: e }]
3543
4048
  };
3544
4049
  }
3545
- function Pe(t) {
3546
- return h(Z(t));
4050
+ function ri(t) {
4051
+ return h(j(t));
3547
4052
  }
3548
- const Re = {
4053
+ const ai = {
3549
4054
  name: "text",
3550
4055
  description: "Use `text` for inline or paragraph body copy.",
3551
4056
  output: {
@@ -3659,7 +4164,7 @@ const Re = {
3659
4164
  ]
3660
4165
  }
3661
4166
  };
3662
- function $t({
4167
+ function re({
3663
4168
  align: t = "start",
3664
4169
  attribution: n,
3665
4170
  id: e,
@@ -3683,7 +4188,7 @@ function $t({
3683
4188
  tag: "blockquote",
3684
4189
  attrs: { class: "quote" },
3685
4190
  children: [
3686
- Z({
4191
+ j({
3687
4192
  align: t,
3688
4193
  as: "p",
3689
4194
  children: r,
@@ -3698,7 +4203,7 @@ function $t({
3698
4203
  tag: "figcaption",
3699
4204
  attrs: { class: "attribution" },
3700
4205
  children: [
3701
- Z({
4206
+ j({
3702
4207
  as: "span",
3703
4208
  children: n,
3704
4209
  responsive: a,
@@ -3709,10 +4214,10 @@ function $t({
3709
4214
  ]
3710
4215
  };
3711
4216
  }
3712
- function We(t) {
3713
- return h($t(t));
4217
+ function oi(t) {
4218
+ return h(re(t));
3714
4219
  }
3715
- const Ue = {
4220
+ const di = {
3716
4221
  name: "blockquote",
3717
4222
  description: "Use `blockquote` to display a quote with attribution.",
3718
4223
  output: { element: "figure", class: "set-blockquote" },
@@ -3781,7 +4286,7 @@ const Ue = {
3781
4286
  ]
3782
4287
  }
3783
4288
  };
3784
- function Zt({
4289
+ function ae({
3785
4290
  background: t = "default",
3786
4291
  border: n,
3787
4292
  children: e,
@@ -3810,10 +4315,10 @@ function Zt({
3810
4315
  children: e ? [{ kind: "raw", html: e }] : []
3811
4316
  };
3812
4317
  }
3813
- function $e(t) {
3814
- return h(Zt(t));
4318
+ function si(t) {
4319
+ return h(ae(t));
3815
4320
  }
3816
- const Ze = {
4321
+ const li = {
3817
4322
  name: "box",
3818
4323
  description: "Use `box` to inset content.",
3819
4324
  output: { element: "div", class: "set-box" },
@@ -3926,7 +4431,7 @@ const Ze = {
3926
4431
  ]
3927
4432
  }
3928
4433
  };
3929
- function jt({
4434
+ function oe({
3930
4435
  description: t,
3931
4436
  headingLevel: n,
3932
4437
  href: e,
@@ -3992,10 +4497,10 @@ function jt({
3992
4497
  children: c
3993
4498
  };
3994
4499
  }
3995
- function je(t) {
3996
- return h(jt(t));
4500
+ function pi(t) {
4501
+ return h(oe(t));
3997
4502
  }
3998
- const Fe = {
4503
+ const ci = {
3999
4504
  name: "card",
4000
4505
  description: "Use `card` to display a summary for a single topic.",
4001
4506
  output: {
@@ -4063,7 +4568,7 @@ const Fe = {
4063
4568
  ]
4064
4569
  }
4065
4570
  };
4066
- function Ft({
4571
+ function de({
4067
4572
  checked: t,
4068
4573
  description: n,
4069
4574
  disabled: e,
@@ -4078,7 +4583,7 @@ function Ft({
4078
4583
  const l = k(i), c = n?.trim();
4079
4584
  if (c && !l)
4080
4585
  throw new Error("id must be provided when description is provided.");
4081
- const u = c ? `${l}-description` : void 0, b = !!e, m = [
4586
+ const u = c ? `${l}-description` : void 0, g = !!e, m = [
4082
4587
  {
4083
4588
  kind: "element",
4084
4589
  tag: "label",
@@ -4089,10 +4594,10 @@ function Ft({
4089
4594
  tag: "input",
4090
4595
  attrs: {
4091
4596
  "aria-describedby": u,
4092
- "aria-invalid": !b && !!r ? "true" : void 0,
4597
+ "aria-invalid": !g && !!r ? "true" : void 0,
4093
4598
  checked: !!t,
4094
4599
  class: "checkbox",
4095
- disabled: b,
4600
+ disabled: g,
4096
4601
  id: l,
4097
4602
  name: o || void 0,
4098
4603
  required: !!d,
@@ -4122,10 +4627,10 @@ function Ft({
4122
4627
  children: m
4123
4628
  };
4124
4629
  }
4125
- function Ge(t) {
4126
- return h(Ft(t));
4630
+ function ui(t) {
4631
+ return h(de(t));
4127
4632
  }
4128
- const Ke = {
4633
+ const hi = {
4129
4634
  name: "checkbox",
4130
4635
  description: "Use `checkbox` to let users toggle a single option on or off.",
4131
4636
  output: { element: "div", class: "set-checkbox" },
@@ -4255,7 +4760,7 @@ const Ke = {
4255
4760
  ]
4256
4761
  }
4257
4762
  };
4258
- function Gt({
4763
+ function se({
4259
4764
  children: t,
4260
4765
  gutter: n = "default",
4261
4766
  id: e,
@@ -4274,10 +4779,10 @@ function Gt({
4274
4779
  children: t ? [{ kind: "raw", html: t }] : []
4275
4780
  };
4276
4781
  }
4277
- function Qe(t) {
4278
- return h(Gt(t));
4782
+ function mi(t) {
4783
+ return h(se(t));
4279
4784
  }
4280
- const Xe = {
4785
+ const ki = {
4281
4786
  name: "container",
4282
4787
  description: "Use `container` to wrap page-level content.",
4283
4788
  output: { element: "div", class: "set-container" },
@@ -4334,7 +4839,7 @@ const Xe = {
4334
4839
  ]
4335
4840
  }
4336
4841
  };
4337
- function Kt({
4842
+ function le({
4338
4843
  children: t,
4339
4844
  id: n,
4340
4845
  open: e,
@@ -4386,10 +4891,10 @@ function Kt({
4386
4891
  ]
4387
4892
  };
4388
4893
  }
4389
- function Ye(t) {
4390
- return h(Kt(t));
4894
+ function gi(t) {
4895
+ return h(le(t));
4391
4896
  }
4392
- const Je = {
4897
+ const bi = {
4393
4898
  name: "details",
4394
4899
  description: "Use `details` to let users expand and collapse a section of content.",
4395
4900
  output: { element: "details", class: "set-details" },
@@ -4448,7 +4953,7 @@ const Je = {
4448
4953
  ]
4449
4954
  }
4450
4955
  };
4451
- function Qt({
4956
+ function pe({
4452
4957
  id: t,
4453
4958
  orientation: n = "horizontal",
4454
4959
  tone: e = "default"
@@ -4467,10 +4972,10 @@ function Qt({
4467
4972
  children: []
4468
4973
  };
4469
4974
  }
4470
- function ti(t = {}) {
4471
- return h(Qt(t));
4975
+ function vi(t = {}) {
4976
+ return h(pe(t));
4472
4977
  }
4473
- const ei = {
4978
+ const fi = {
4474
4979
  name: "divider",
4475
4980
  description: "Use `divider` to separate sections with a rule.",
4476
4981
  output: {
@@ -4532,7 +5037,7 @@ const ei = {
4532
5037
  ]
4533
5038
  }
4534
5039
  };
4535
- function lt({
5040
+ function gt({
4536
5041
  children: t,
4537
5042
  description: n,
4538
5043
  disabled: e,
@@ -4544,7 +5049,7 @@ function lt({
4544
5049
  const d = n?.trim(), p = i.trim();
4545
5050
  if (!p)
4546
5051
  throw new Error("id must be a non-empty string.");
4547
- if (!q(p))
5052
+ if (!I(p))
4548
5053
  throw new Error(
4549
5054
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
4550
5055
  );
@@ -4575,10 +5080,10 @@ function lt({
4575
5080
  children: u
4576
5081
  };
4577
5082
  }
4578
- function ii(t) {
4579
- return h(lt(t));
5083
+ function yi(t) {
5084
+ return h(gt(t));
4580
5085
  }
4581
- const ni = {
5086
+ const wi = {
4582
5087
  name: "fieldset",
4583
5088
  description: "Use `fieldset` to group related form controls under a legend.",
4584
5089
  output: { element: "fieldset", class: "set-fieldset" },
@@ -4666,7 +5171,7 @@ const ni = {
4666
5171
  ]
4667
5172
  }
4668
5173
  };
4669
- function Xt({
5174
+ function ce({
4670
5175
  align: t = "start",
4671
5176
  caption: n,
4672
5177
  children: e,
@@ -4689,7 +5194,7 @@ function Xt({
4689
5194
  tag: "figcaption",
4690
5195
  attrs: { class: "figcaption" },
4691
5196
  children: [
4692
- Z({
5197
+ j({
4693
5198
  as: "span",
4694
5199
  children: n,
4695
5200
  responsive: r,
@@ -4700,10 +5205,10 @@ function Xt({
4700
5205
  ]
4701
5206
  };
4702
5207
  }
4703
- function ri(t) {
4704
- return h(Xt(t));
5208
+ function Si(t) {
5209
+ return h(ce(t));
4705
5210
  }
4706
- const ai = {
5211
+ const xi = {
4707
5212
  name: "figure",
4708
5213
  description: "Use `figure` to present media with a caption.",
4709
5214
  output: { element: "figure", class: "set-figure" },
@@ -4765,7 +5270,7 @@ const ai = {
4765
5270
  if (t !== void 0)
4766
5271
  return String(t);
4767
5272
  };
4768
- function Yt({
5273
+ function ue({
4769
5274
  children: t,
4770
5275
  gap: n = "default",
4771
5276
  id: e
@@ -4789,10 +5294,10 @@ function Yt({
4789
5294
  ]
4790
5295
  };
4791
5296
  }
4792
- function oi(t) {
4793
- return h(Yt(t));
5297
+ function Ei(t) {
5298
+ return h(ue(t));
4794
5299
  }
4795
- function Jt({
5300
+ function he({
4796
5301
  align: t,
4797
5302
  children: n,
4798
5303
  colSpan: e,
@@ -4806,7 +5311,7 @@ function Jt({
4806
5311
  rowSpan: l,
4807
5312
  rowSpanNarrow: c,
4808
5313
  rowSpanWide: u,
4809
- rowStart: b,
5314
+ rowStart: g,
4810
5315
  rowStartNarrow: v,
4811
5316
  rowStartWide: m
4812
5317
  }) {
@@ -4827,7 +5332,7 @@ function Jt({
4827
5332
  "data-row-span-narrow": M(c),
4828
5333
  "data-row-start-narrow": M(v),
4829
5334
  "data-row-span": M(l),
4830
- "data-row-start": M(b),
5335
+ "data-row-start": M(g),
4831
5336
  "data-row-span-wide": M(u),
4832
5337
  "data-row-start-wide": M(m),
4833
5338
  id: f
@@ -4835,10 +5340,10 @@ function Jt({
4835
5340
  children: n ? [{ kind: "raw", html: n }] : []
4836
5341
  };
4837
5342
  }
4838
- function di(t) {
4839
- return h(Jt(t));
5343
+ function zi(t) {
5344
+ return h(he(t));
4840
5345
  }
4841
- const si = {
5346
+ const Ci = {
4842
5347
  name: "grid",
4843
5348
  description: "Use `grid` to lay out content in a 12-column responsive grid.",
4844
5349
  output: { element: "div", class: "set-grid" },
@@ -4884,7 +5389,7 @@ const si = {
4884
5389
  min: 1,
4885
5390
  max: 12,
4886
5391
  integer: !0
4887
- }, li = {
5392
+ }, Mi = {
4888
5393
  name: "grid-item",
4889
5394
  description: "Use `grid-item` to place content within a `grid` layout.",
4890
5395
  output: { element: "div", class: "set-grid-item" },
@@ -5051,7 +5556,7 @@ const si = {
5051
5556
  ]
5052
5557
  }
5053
5558
  };
5054
- function te({
5559
+ function me({
5055
5560
  align: t = "start",
5056
5561
  id: n,
5057
5562
  level: e,
@@ -5073,10 +5578,10 @@ function te({
5073
5578
  children: [{ kind: "text", value: a }]
5074
5579
  };
5075
5580
  }
5076
- function pi(t) {
5077
- return h(te(t));
5581
+ function Li(t) {
5582
+ return h(me(t));
5078
5583
  }
5079
- const ci = {
5584
+ const qi = {
5080
5585
  name: "heading",
5081
5586
  description: "Use `heading` to render heading text with consistent type.",
5082
5587
  output: {
@@ -5161,10 +5666,10 @@ const ci = {
5161
5666
  ]
5162
5667
  }
5163
5668
  };
5164
- function ee({
5669
+ function ke({
5165
5670
  alt: t = "",
5166
5671
  aspectRatio: n,
5167
- cover: e,
5672
+ fit: e = "intrinsic",
5168
5673
  gravity: i = "C",
5169
5674
  height: r,
5170
5675
  id: a,
@@ -5175,86 +5680,87 @@ function ee({
5175
5680
  sizes: l,
5176
5681
  sources: c,
5177
5682
  src: u,
5178
- srcSet: b,
5683
+ srcSet: g,
5179
5684
  width: v
5180
5685
  }) {
5181
- const m = k(a), f = u.trim(), z = b?.trim(), S = l?.trim(), g = c?.map((C, E) => {
5182
- const _ = C.srcSet.trim(), D = C.media?.trim(), V = C.type?.trim(), Q = C.sizes?.trim();
5183
- if (!_)
5184
- throw new Error(`sources[${E}].srcSet must be non-empty.`);
5686
+ const m = e === "cover", f = k(a), E = u.trim(), S = g?.trim(), b = l?.trim(), y = c?.map((z, C) => {
5687
+ const A = z.srcSet.trim(), V = z.media?.trim(), it = z.type?.trim(), O = z.sizes?.trim();
5688
+ if (!A)
5689
+ throw new Error(`sources[${C}].srcSet must be non-empty.`);
5185
5690
  return {
5186
- height: C.height,
5187
- media: D || void 0,
5188
- sizes: Q || void 0,
5189
- srcSet: _,
5190
- type: V || void 0,
5191
- width: C.width
5691
+ height: z.height,
5692
+ media: V || void 0,
5693
+ sizes: O || void 0,
5694
+ srcSet: A,
5695
+ type: it || void 0,
5696
+ width: z.width
5192
5697
  };
5193
5698
  }) || [];
5194
- if (!f)
5699
+ if (!E)
5195
5700
  throw new Error("src must be a non-empty string.");
5196
- const y = {
5701
+ const w = {
5197
5702
  kind: "element",
5198
5703
  tag: "img",
5199
5704
  attrs: {
5200
5705
  alt: t,
5201
5706
  class: "img",
5202
5707
  fetchpriority: d ? "high" : void 0,
5203
- height: e ? void 0 : r ? String(r) : void 0,
5708
+ height: m ? void 0 : r ? String(r) : void 0,
5204
5709
  loading: o && !d ? "lazy" : void 0,
5205
- sizes: g.length > 0 ? void 0 : S || void 0,
5206
- src: f,
5207
- srcset: z || void 0,
5208
- width: e ? void 0 : v ? String(v) : void 0
5710
+ sizes: y.length > 0 ? void 0 : b || void 0,
5711
+ src: E,
5712
+ srcset: S || void 0,
5713
+ width: m ? void 0 : v ? String(v) : void 0
5209
5714
  },
5210
5715
  children: []
5211
5716
  };
5212
- let w;
5213
- if (g.length > 0) {
5214
- const C = g.map((E) => ({
5717
+ let x;
5718
+ if (y.length > 0) {
5719
+ const z = y.map((C) => ({
5215
5720
  kind: "element",
5216
5721
  tag: "source",
5217
5722
  attrs: {
5218
- height: E.height ? String(E.height) : void 0,
5219
- media: E.media,
5220
- sizes: E.sizes,
5221
- srcset: E.srcSet,
5222
- type: E.type,
5223
- width: E.width ? String(E.width) : void 0
5723
+ height: C.height ? String(C.height) : void 0,
5724
+ media: C.media,
5725
+ sizes: C.sizes,
5726
+ srcset: C.srcSet,
5727
+ type: C.type,
5728
+ width: C.width ? String(C.width) : void 0
5224
5729
  },
5225
5730
  children: []
5226
5731
  }));
5227
- w = {
5732
+ x = {
5228
5733
  kind: "element",
5229
5734
  tag: "picture",
5230
5735
  attrs: {},
5231
- children: [...C, y]
5736
+ children: [...z, w]
5232
5737
  };
5233
5738
  } else
5234
- w = y;
5235
- const x = [];
5236
- return r && x.push(`--set-image-block-size: ${r / 16}rem`), v && x.push(`--set-image-inline-size: ${v / 16}rem`), {
5739
+ x = w;
5740
+ const q = [];
5741
+ return r && q.push(`--set-image-block-size: ${r / 16}rem`), v && q.push(`--set-image-inline-size: ${v / 16}rem`), {
5237
5742
  kind: "element",
5238
5743
  tag: "div",
5239
5744
  attrs: {
5240
5745
  class: "set-image",
5241
- "data-aspect-ratio": e && !(r && v) ? n : void 0,
5242
- "data-gravity": e && i !== "C" ? i : void 0,
5746
+ "data-aspect-ratio": m && !r ? n : void 0,
5747
+ "data-fluid": e === "fluid",
5748
+ "data-gravity": m && i !== "C" ? i : void 0,
5243
5749
  "data-shadow": !!s,
5244
- "data-object-fit": e ? "cover" : void 0,
5245
- "data-radius": p,
5246
- id: m,
5247
- style: x.length > 0 ? x.join("; ") : void 0
5750
+ "data-object-fit": m ? "cover" : void 0,
5751
+ "data-radius": !!p,
5752
+ id: f,
5753
+ style: q.length > 0 ? q.join("; ") : void 0
5248
5754
  },
5249
- children: [w]
5755
+ children: [x]
5250
5756
  };
5251
5757
  }
5252
- function ie(t) {
5253
- return h(ee(t));
5758
+ function ge(t) {
5759
+ return h(ke(t));
5254
5760
  }
5255
- const ui = {
5761
+ const Ii = {
5256
5762
  name: "image",
5257
- description: "Use `image` to render a responsive image with optional cover fit.",
5763
+ description: "Use `image` to render a responsive image with intrinsic, fluid, or cover fit, and optional art-directed `sources`.",
5258
5764
  output: { element: "div", class: "set-image" },
5259
5765
  content: { kind: "none" },
5260
5766
  props: {
@@ -5266,28 +5772,29 @@ const ui = {
5266
5772
  gravity: {
5267
5773
  default: "C",
5268
5774
  description: "Focal point used when cropping.",
5269
- ignoredWhen: "`cover` is false",
5775
+ ignoredWhen: '`fit` is not `"cover"`',
5270
5776
  type: {
5271
5777
  kind: "enum",
5272
5778
  values: ["N", "NE", "E", "SE", "S", "SW", "W", "NW", "C"]
5273
5779
  }
5274
5780
  },
5275
5781
  radius: {
5276
- 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`.",
5277
- type: { kind: "enum", values: ["xs", "ratio"] }
5782
+ default: !1,
5783
+ description: "Applies the default corner radius.",
5784
+ type: { kind: "boolean" }
5278
5785
  },
5279
5786
  aspectRatio: {
5280
5787
  description: "Aspect ratio applied to the wrapper.",
5281
- ignoredWhen: "`cover` is false, or both `width` and `height` are set",
5788
+ ignoredWhen: '`fit` is not `"cover"`, or `height` is set',
5282
5789
  type: {
5283
5790
  kind: "enum",
5284
5791
  values: ["1:1", "4:5", "3:2", "16:9", "21:9"]
5285
5792
  }
5286
5793
  },
5287
- cover: {
5288
- default: !1,
5289
- description: "Renders the image as a cropped fill (`object-fit: cover`). Switches `width`/`height` from intrinsic `<img>` dimensions to wrapper sizing.",
5290
- type: { kind: "boolean" }
5794
+ fit: {
5795
+ default: "intrinsic",
5796
+ 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.",
5797
+ type: { kind: "enum", values: ["intrinsic", "fluid", "cover"] }
5291
5798
  },
5292
5799
  shadow: {
5293
5800
  default: !1,
@@ -5295,7 +5802,7 @@ const ui = {
5295
5802
  type: { kind: "boolean" }
5296
5803
  },
5297
5804
  height: {
5298
- 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`.",
5805
+ 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`.",
5299
5806
  type: { kind: "number" }
5300
5807
  },
5301
5808
  id: {
@@ -5314,6 +5821,7 @@ const ui = {
5314
5821
  },
5315
5822
  sizes: {
5316
5823
  description: "`sizes` attribute used with `srcSet`.",
5824
+ ignoredWhen: "`sources` are provided",
5317
5825
  type: { kind: "string" }
5318
5826
  },
5319
5827
  sources: {
@@ -5359,7 +5867,7 @@ const ui = {
5359
5867
  type: { kind: "string" }
5360
5868
  },
5361
5869
  width: {
5362
- 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`.",
5870
+ 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).",
5363
5871
  type: { kind: "number" }
5364
5872
  }
5365
5873
  },
@@ -5369,7 +5877,7 @@ const ui = {
5369
5877
  {
5370
5878
  target: { on: "host" },
5371
5879
  attribute: "data-object-fit",
5372
- condition: { kind: "when-truthy", prop: "cover" },
5880
+ condition: { kind: "when-equals", prop: "fit", to: "cover" },
5373
5881
  value: { kind: "literal", text: "cover" }
5374
5882
  },
5375
5883
  {
@@ -5380,8 +5888,12 @@ const ui = {
5380
5888
  {
5381
5889
  target: { on: "host" },
5382
5890
  attribute: "data-radius",
5383
- condition: { kind: "when-provided", prop: "radius" },
5384
- value: { kind: "prop", prop: "radius" }
5891
+ condition: { kind: "when-truthy", prop: "radius" }
5892
+ },
5893
+ {
5894
+ target: { on: "host" },
5895
+ attribute: "data-fluid",
5896
+ condition: { kind: "when-equals", prop: "fit", to: "fluid" }
5385
5897
  },
5386
5898
  {
5387
5899
  target: { on: "descendant", selector: "img" },
@@ -5434,7 +5946,7 @@ const ui = {
5434
5946
  ]
5435
5947
  }
5436
5948
  };
5437
- function ne({
5949
+ function be({
5438
5950
  align: t = "center",
5439
5951
  as: n = "div",
5440
5952
  children: e,
@@ -5458,10 +5970,10 @@ function ne({
5458
5970
  children: e ? [{ kind: "raw", html: e }] : []
5459
5971
  };
5460
5972
  }
5461
- function hi(t) {
5462
- return h(ne(t));
5973
+ function Ti(t) {
5974
+ return h(be(t));
5463
5975
  }
5464
- const ki = {
5976
+ const Ai = {
5465
5977
  name: "inline",
5466
5978
  description: "Use `inline` to lay out content in a horizontal row.",
5467
5979
  output: {
@@ -5546,7 +6058,7 @@ const ki = {
5546
6058
  ]
5547
6059
  }
5548
6060
  };
5549
- function re({
6061
+ function ve({
5550
6062
  autocomplete: t,
5551
6063
  description: n,
5552
6064
  disabled: e,
@@ -5560,17 +6072,17 @@ function re({
5560
6072
  size: l = "md",
5561
6073
  spellcheck: c,
5562
6074
  type: u = "text",
5563
- value: b,
6075
+ value: g,
5564
6076
  inlineSize: v = "full"
5565
6077
  }) {
5566
- const m = i.trim(), f = n?.trim(), z = t === !1 ? !1 : t?.trim(), S = o?.trim(), g = d?.trim(), y = b;
6078
+ const m = i.trim(), f = n?.trim(), E = t === !1 ? !1 : t?.trim(), S = o?.trim(), b = d?.trim(), y = g;
5567
6079
  if (!m)
5568
6080
  throw new Error("id must be a non-empty string.");
5569
- if (!q(m))
6081
+ if (!I(m))
5570
6082
  throw new Error(
5571
6083
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
5572
6084
  );
5573
- 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 = [
6085
+ 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 = [
5574
6086
  {
5575
6087
  kind: "element",
5576
6088
  tag: "label",
@@ -5582,24 +6094,24 @@ function re({
5582
6094
  tag: "input",
5583
6095
  attrs: {
5584
6096
  "aria-describedby": w,
5585
- "aria-invalid": !D && !V && !!r ? "true" : void 0,
5586
- autocomplete: z === !1 ? "off" : z || void 0,
6097
+ "aria-invalid": !A && !V && !!r ? "true" : void 0,
6098
+ autocomplete: E === !1 ? "off" : E || void 0,
5587
6099
  class: "input",
5588
- disabled: D,
6100
+ disabled: A,
5589
6101
  id: m,
5590
6102
  inputmode: x ? "numeric" : void 0,
5591
6103
  name: S || void 0,
5592
- pattern: E,
6104
+ pattern: z,
5593
6105
  readonly: V,
5594
6106
  required: !!s,
5595
- spellcheck: _ === void 0 ? void 0 : String(_),
5596
- type: C,
6107
+ spellcheck: C === void 0 ? void 0 : String(C),
6108
+ type: q,
5597
6109
  value: y
5598
6110
  },
5599
6111
  children: []
5600
6112
  }
5601
6113
  ];
5602
- return f && X.push({
6114
+ return f && O.push({
5603
6115
  kind: "element",
5604
6116
  tag: "p",
5605
6117
  attrs: { class: "description", id: w },
@@ -5612,13 +6124,13 @@ function re({
5612
6124
  "data-size": l,
5613
6125
  "data-inline-size": v === "fit" ? "fit" : void 0
5614
6126
  },
5615
- children: X
6127
+ children: O
5616
6128
  };
5617
6129
  }
5618
- function mi(t) {
5619
- return h(re(t));
6130
+ function _i(t) {
6131
+ return h(ve(t));
5620
6132
  }
5621
- const gi = {
6133
+ const Di = {
5622
6134
  name: "input",
5623
6135
  description: "Use `input` to collect a single line of text from users.",
5624
6136
  output: { element: "div", class: "set-input" },
@@ -5814,7 +6326,7 @@ const gi = {
5814
6326
  ]
5815
6327
  }
5816
6328
  };
5817
- function ae({
6329
+ function fe({
5818
6330
  id: t,
5819
6331
  label: n,
5820
6332
  size: e = "md",
@@ -5842,10 +6354,10 @@ function ae({
5842
6354
  ]
5843
6355
  };
5844
6356
  }
5845
- function bi(t) {
5846
- return h(ae(t));
6357
+ function Hi(t) {
6358
+ return h(fe(t));
5847
6359
  }
5848
- const vi = {
6360
+ const Ni = {
5849
6361
  name: "logo",
5850
6362
  description: "Use `logo` to display the brand mark.",
5851
6363
  output: { element: "div", class: "set-logo" },
@@ -5913,7 +6425,7 @@ const vi = {
5913
6425
  ]
5914
6426
  }
5915
6427
  };
5916
- function oe({
6428
+ function ye({
5917
6429
  banner: t,
5918
6430
  centerMain: n,
5919
6431
  children: e,
@@ -5954,10 +6466,10 @@ function oe({
5954
6466
  children: l
5955
6467
  };
5956
6468
  }
5957
- function fi(t) {
5958
- return h(oe(t));
6469
+ function Vi(t) {
6470
+ return h(ye(t));
5959
6471
  }
5960
- const yi = {
6472
+ const Oi = {
5961
6473
  name: "page",
5962
6474
  description: "Use `page` as the primary layout for header, main, and footer regions.",
5963
6475
  output: { element: "div", class: "set-page" },
@@ -6047,7 +6559,7 @@ const yi = {
6047
6559
  ]
6048
6560
  }
6049
6561
  };
6050
- function de({
6562
+ function we({
6051
6563
  children: t,
6052
6564
  id: n,
6053
6565
  padding: e = "md",
@@ -6066,10 +6578,10 @@ function de({
6066
6578
  children: t ? [{ kind: "raw", html: t }] : []
6067
6579
  };
6068
6580
  }
6069
- function wi(t) {
6070
- return h(de(t));
6581
+ function Pi(t) {
6582
+ return h(we(t));
6071
6583
  }
6072
- const Si = {
6584
+ const Bi = {
6073
6585
  name: "panel",
6074
6586
  description: "Use `panel` to group related content in a contained region.",
6075
6587
  output: { element: "div", class: "set-panel" },
@@ -6120,7 +6632,7 @@ const Si = {
6120
6632
  ]
6121
6633
  }
6122
6634
  };
6123
- function se({
6635
+ function Se({
6124
6636
  children: t,
6125
6637
  id: n,
6126
6638
  size: e = "md",
@@ -6141,10 +6653,10 @@ function se({
6141
6653
  children: t ? [{ kind: "raw", html: t }] : []
6142
6654
  };
6143
6655
  }
6144
- function xi(t = {}) {
6145
- return h(se(t));
6656
+ function Ri(t = {}) {
6657
+ return h(Se(t));
6146
6658
  }
6147
- const Ei = {
6659
+ const Wi = {
6148
6660
  name: "pattern",
6149
6661
  description: "Use `pattern` to render repeated visual language components behind content.",
6150
6662
  output: { element: "div", class: "set-pattern" },
@@ -6211,15 +6723,15 @@ const Ei = {
6211
6723
  ]
6212
6724
  }
6213
6725
  };
6214
- function zi(t) {
6215
- return ie({
6726
+ function Ui(t) {
6727
+ return ge({
6216
6728
  ...t,
6217
6729
  alt: "",
6218
- cover: !0,
6730
+ fit: "cover",
6219
6731
  priority: !0
6220
6732
  });
6221
6733
  }
6222
- function le({
6734
+ function xe({
6223
6735
  children: t,
6224
6736
  contentTheme: n,
6225
6737
  id: e,
@@ -6251,10 +6763,10 @@ function le({
6251
6763
  children: d
6252
6764
  };
6253
6765
  }
6254
- function Ci(t) {
6255
- return h(le(t));
6766
+ function $i(t) {
6767
+ return h(xe(t));
6256
6768
  }
6257
- const Mi = {
6769
+ const Gi = {
6258
6770
  name: "poster",
6259
6771
  description: "Use `poster` to layer content over background media.",
6260
6772
  output: { element: "div", class: "set-poster" },
@@ -6324,7 +6836,7 @@ const Mi = {
6324
6836
  ]
6325
6837
  }
6326
6838
  };
6327
- function pe({
6839
+ function Ee({
6328
6840
  align: t = "start",
6329
6841
  children: n,
6330
6842
  hangingPunctuation: e,
@@ -6347,10 +6859,10 @@ function pe({
6347
6859
  children: [{ kind: "raw", html: n }]
6348
6860
  };
6349
6861
  }
6350
- function Li(t) {
6351
- return h(pe(t));
6862
+ function Zi(t) {
6863
+ return h(Ee(t));
6352
6864
  }
6353
- const qi = {
6865
+ const Fi = {
6354
6866
  name: "prose",
6355
6867
  description: "Use `prose` to style rich-text markup.",
6356
6868
  output: { element: "div", class: "set-prose" },
@@ -6423,7 +6935,7 @@ const qi = {
6423
6935
  ]
6424
6936
  }
6425
6937
  };
6426
- function ce({
6938
+ function ze({
6427
6939
  description: t,
6428
6940
  disabled: n,
6429
6941
  id: e,
@@ -6436,10 +6948,10 @@ function ce({
6436
6948
  size: s = "md",
6437
6949
  value: l
6438
6950
  }) {
6439
- const c = e.trim(), u = o.trim(), b = l?.trim();
6951
+ const c = e.trim(), u = o.trim(), g = l?.trim();
6440
6952
  if (!c)
6441
6953
  throw new Error("id must be a non-empty string.");
6442
- if (!q(c))
6954
+ if (!I(c))
6443
6955
  throw new Error(
6444
6956
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
6445
6957
  );
@@ -6447,23 +6959,23 @@ function ce({
6447
6959
  throw new Error("name must be a non-empty string.");
6448
6960
  if (r.length < 2)
6449
6961
  throw new Error("radios must include at least 2 options.");
6450
- const v = r.map((g, y) => {
6451
- const w = g.value.trim(), x = g.label.trim(), C = g.description?.trim();
6962
+ const v = r.map((b, y) => {
6963
+ const w = b.value.trim(), x = b.label.trim(), q = b.description?.trim();
6452
6964
  if (!w)
6453
6965
  throw new Error(`radios[${y}].value must be non-empty.`);
6454
6966
  if (!x)
6455
6967
  throw new Error(`radios[${y}].label must be non-empty.`);
6456
6968
  return {
6457
- description: C,
6458
- disabled: !!g.disabled,
6969
+ description: q,
6970
+ disabled: !!b.disabled,
6459
6971
  label: x,
6460
6972
  value: w
6461
6973
  };
6462
6974
  });
6463
- if (new Set(v.map((g) => g.value)).size !== v.length)
6975
+ if (new Set(v.map((b) => b.value)).size !== v.length)
6464
6976
  throw new Error("radios values must be unique.");
6465
- const f = !!n, z = v.map((g) => {
6466
- const y = !!g.disabled, w = g.description ? `${c}-${g.value}-description` : void 0, x = [
6977
+ const f = !!n, E = v.map((b) => {
6978
+ const y = !!b.disabled, w = b.description ? `${c}-${b.value}-description` : void 0, x = [
6467
6979
  {
6468
6980
  kind: "element",
6469
6981
  tag: "label",
@@ -6474,13 +6986,13 @@ function ce({
6474
6986
  tag: "input",
6475
6987
  attrs: {
6476
6988
  "aria-describedby": w,
6477
- checked: b === g.value,
6989
+ checked: g === b.value,
6478
6990
  class: "radio",
6479
6991
  disabled: y,
6480
6992
  name: u,
6481
6993
  required: !!p && !f && !y,
6482
6994
  type: "radio",
6483
- value: g.value
6995
+ value: b.value
6484
6996
  },
6485
6997
  children: []
6486
6998
  },
@@ -6488,16 +7000,16 @@ function ce({
6488
7000
  kind: "element",
6489
7001
  tag: "span",
6490
7002
  attrs: {},
6491
- children: [{ kind: "text", value: g.label }]
7003
+ children: [{ kind: "text", value: b.label }]
6492
7004
  }
6493
7005
  ]
6494
7006
  }
6495
7007
  ];
6496
- return g.description && x.push({
7008
+ return b.description && x.push({
6497
7009
  kind: "element",
6498
7010
  tag: "p",
6499
7011
  attrs: { class: "radio-description", id: w },
6500
- children: [{ kind: "text", value: g.description }]
7012
+ children: [{ kind: "text", value: b.description }]
6501
7013
  }), {
6502
7014
  kind: "element",
6503
7015
  tag: "div",
@@ -6505,7 +7017,7 @@ function ce({
6505
7017
  children: x
6506
7018
  };
6507
7019
  });
6508
- return lt({
7020
+ return gt({
6509
7021
  children: h({
6510
7022
  kind: "element",
6511
7023
  tag: "div",
@@ -6514,7 +7026,7 @@ function ce({
6514
7026
  "data-orientation": d,
6515
7027
  "data-size": s
6516
7028
  },
6517
- children: z
7029
+ children: E
6518
7030
  }),
6519
7031
  description: t,
6520
7032
  disabled: f,
@@ -6523,10 +7035,10 @@ function ce({
6523
7035
  legend: a
6524
7036
  });
6525
7037
  }
6526
- function Ii(t) {
6527
- return h(ce(t));
7038
+ function ji(t) {
7039
+ return h(ze(t));
6528
7040
  }
6529
- const Ti = {
7041
+ const Ki = {
6530
7042
  name: "radios",
6531
7043
  description: "Use `radios` to let users select one option from a short list.",
6532
7044
  output: { element: "fieldset", class: "set-fieldset" },
@@ -6675,7 +7187,7 @@ const Ti = {
6675
7187
  ]
6676
7188
  }
6677
7189
  };
6678
- function ue({
7190
+ function Ce({
6679
7191
  appOverscrollBehavior: t,
6680
7192
  appRoot: n,
6681
7193
  brand: e = "mnsp",
@@ -6702,10 +7214,10 @@ function ue({
6702
7214
  children: i ? [{ kind: "raw", html: i }] : []
6703
7215
  };
6704
7216
  }
6705
- function Ai(t) {
6706
- return h(ue(t));
7217
+ function Qi(t) {
7218
+ return h(Ce(t));
6707
7219
  }
6708
- const _i = {
7220
+ const Xi = {
6709
7221
  name: "root",
6710
7222
  description: "Mandatory top-level `root` wrapper for the Set system.",
6711
7223
  output: { element: "div", class: "set" },
@@ -6798,7 +7310,7 @@ const _i = {
6798
7310
  ]
6799
7311
  }
6800
7312
  };
6801
- function he({
7313
+ function Me({
6802
7314
  id: t,
6803
7315
  label: n,
6804
7316
  size: e = "md",
@@ -6855,10 +7367,10 @@ function he({
6855
7367
  children: o
6856
7368
  };
6857
7369
  }
6858
- function Di(t = {}) {
6859
- return h(he(t));
7370
+ function Yi(t = {}) {
7371
+ return h(Me(t));
6860
7372
  }
6861
- const Ni = {
7373
+ const Ji = {
6862
7374
  name: "spinner",
6863
7375
  description: "Use `spinner` to indicate loading or in-progress state.",
6864
7376
  output: { element: "span", class: "set-spinner" },
@@ -6916,7 +7428,7 @@ const Ni = {
6916
7428
  ]
6917
7429
  }
6918
7430
  };
6919
- function ke({
7431
+ function Le({
6920
7432
  align: t = "stretch",
6921
7433
  as: n = "div",
6922
7434
  children: e,
@@ -6938,10 +7450,10 @@ function ke({
6938
7450
  children: e ? [{ kind: "raw", html: e }] : []
6939
7451
  };
6940
7452
  }
6941
- function Hi(t) {
6942
- return h(ke(t));
7453
+ function tn(t) {
7454
+ return h(Le(t));
6943
7455
  }
6944
- const Vi = {
7456
+ const en = {
6945
7457
  name: "stack",
6946
7458
  description: "Use `stack` to lay out content in a vertical column.",
6947
7459
  output: {
@@ -7012,7 +7524,7 @@ const Vi = {
7012
7524
  ]
7013
7525
  }
7014
7526
  };
7015
- function me({
7527
+ function qe({
7016
7528
  children: t,
7017
7529
  contentTheme: n,
7018
7530
  id: e,
@@ -7031,10 +7543,10 @@ function me({
7031
7543
  children: [{ kind: "raw", html: t }]
7032
7544
  };
7033
7545
  }
7034
- function Oi(t) {
7035
- return h(me(t));
7546
+ function nn(t) {
7547
+ return h(qe(t));
7036
7548
  }
7037
- const Bi = {
7549
+ const rn = {
7038
7550
  name: "surface",
7039
7551
  description: "Use `surface` to set a colour context for nested content.",
7040
7552
  output: { element: "div", class: "set-surface" },
@@ -7086,7 +7598,7 @@ const Bi = {
7086
7598
  ]
7087
7599
  }
7088
7600
  };
7089
- function ge({
7601
+ function Ie({
7090
7602
  checked: t,
7091
7603
  description: n,
7092
7604
  disabled: e,
@@ -7142,10 +7654,10 @@ function ge({
7142
7654
  children: c
7143
7655
  };
7144
7656
  }
7145
- function Pi(t) {
7146
- return h(ge(t));
7657
+ function an(t) {
7658
+ return h(Ie(t));
7147
7659
  }
7148
- const Ri = {
7660
+ const on = {
7149
7661
  name: "switch",
7150
7662
  description: "Use `switch` to let users instantly toggle a setting on or off.",
7151
7663
  output: { element: "div", class: "set-switch" },
@@ -7253,7 +7765,7 @@ const Ri = {
7253
7765
  ]
7254
7766
  }
7255
7767
  };
7256
- function be({
7768
+ function Te({
7257
7769
  autocomplete: t,
7258
7770
  description: n,
7259
7771
  disabled: e,
@@ -7267,19 +7779,19 @@ function be({
7267
7779
  rows: l = 2,
7268
7780
  size: c = "md",
7269
7781
  spellcheck: u,
7270
- value: b,
7782
+ value: g,
7271
7783
  inlineSize: v = "full"
7272
7784
  }) {
7273
- const m = i.trim(), f = n?.trim(), z = t === !1 ? !1 : t?.trim(), S = o?.trim(), g = b;
7785
+ const m = i.trim(), f = n?.trim(), E = t === !1 ? !1 : t?.trim(), S = o?.trim(), b = g;
7274
7786
  if (!m)
7275
7787
  throw new Error("id must be a non-empty string.");
7276
- if (!q(m))
7788
+ if (!I(m))
7277
7789
  throw new Error(
7278
7790
  "id must start with a letter and contain only letters, numbers, '_', '-', or ':'."
7279
7791
  );
7280
7792
  if (!Number.isInteger(l) || l < 2)
7281
7793
  throw new Error("rows must be an integer greater than or equal to 2.");
7282
- const y = f ? `${m}-description` : void 0, w = !!e, x = !w && !!d, E = [
7794
+ const y = f ? `${m}-description` : void 0, w = !!e, x = !w && !!d, z = [
7283
7795
  {
7284
7796
  kind: "element",
7285
7797
  tag: "label",
@@ -7292,7 +7804,7 @@ function be({
7292
7804
  attrs: {
7293
7805
  "aria-describedby": y,
7294
7806
  "aria-invalid": !w && !x && !!r ? "true" : void 0,
7295
- autocomplete: z === !1 ? "off" : z || void 0,
7807
+ autocomplete: E === !1 ? "off" : E || void 0,
7296
7808
  class: "textarea",
7297
7809
  disabled: w,
7298
7810
  id: m,
@@ -7302,10 +7814,10 @@ function be({
7302
7814
  rows: String(l),
7303
7815
  spellcheck: u === void 0 ? void 0 : String(u)
7304
7816
  },
7305
- children: [{ kind: "text", value: g || "" }]
7817
+ children: [{ kind: "text", value: b || "" }]
7306
7818
  }
7307
7819
  ];
7308
- return f && E.push({
7820
+ return f && z.push({
7309
7821
  kind: "element",
7310
7822
  tag: "p",
7311
7823
  attrs: { class: "description", id: y },
@@ -7319,13 +7831,13 @@ function be({
7319
7831
  "data-size": c,
7320
7832
  "data-inline-size": v === "fit" ? "fit" : void 0
7321
7833
  },
7322
- children: E
7834
+ children: z
7323
7835
  };
7324
7836
  }
7325
- function Wi(t) {
7326
- return h(be(t));
7837
+ function dn(t) {
7838
+ return h(Te(t));
7327
7839
  }
7328
- const Ui = {
7840
+ const sn = {
7329
7841
  name: "textarea",
7330
7842
  description: "Use `textarea` to collect multiple lines of text from users.",
7331
7843
  output: { element: "div", class: "set-textarea" },
@@ -7514,154 +8026,166 @@ const Ui = {
7514
8026
  ]
7515
8027
  }
7516
8028
  };
7517
- function $i() {
7518
- bt(), wt(), xt(), Mt(), qt(), _t();
8029
+ function ln() {
8030
+ Et(), Lt(), At(), Dt(), Ot(), Bt(), $t(), Ft();
7519
8031
  }
7520
8032
  export {
7521
- nt as SET_ALERT_EVENT_BEFORE_DISMISS,
7522
- rt as SET_ALERT_EVENT_DISMISS,
7523
- Se as SET_ALERT_SPEC,
7524
- O as SET_ALERT_TAG_NAME,
7525
- Ve as SET_AVATAR_SPEC,
7526
- Be as SET_BADGE_SPEC,
7527
- ot as SET_BANNER_EVENT_BEFORE_DISMISS,
7528
- dt as SET_BANNER_EVENT_DISMISS,
7529
- Ce as SET_BANNER_SPEC,
8033
+ lt as SET_ALERT_EVENT_BEFORE_DISMISS,
8034
+ pt as SET_ALERT_EVENT_DISMISS,
8035
+ Ne as SET_ALERT_SPEC,
8036
+ P as SET_ALERT_TAG_NAME,
8037
+ ei as SET_AVATAR_SPEC,
8038
+ ni as SET_BADGE_SPEC,
8039
+ ut as SET_BANNER_EVENT_BEFORE_DISMISS,
8040
+ ht as SET_BANNER_EVENT_DISMISS,
8041
+ Be as SET_BANNER_SPEC,
7530
8042
  B as SET_BANNER_TAG_NAME,
7531
- Ue as SET_BLOCKQUOTE_SPEC,
7532
- Ze as SET_BOX_SPEC,
7533
- ye as SET_BUTTON_SPEC,
7534
- Fe as SET_CARD_SPEC,
7535
- Ke as SET_CHECKBOX_SPEC,
7536
- Xe as SET_CONTAINER_SPEC,
7537
- Je as SET_DETAILS_SPEC,
7538
- ei as SET_DIVIDER_SPEC,
7539
- qe as SET_EXPANDER_SPEC,
7540
- ni as SET_FIELDSET_SPEC,
7541
- ai as SET_FIGURE_SPEC,
7542
- li as SET_GRID_ITEM_SPEC,
7543
- si as SET_GRID_SPEC,
7544
- ci as SET_HEADING_SPEC,
7545
- ve as SET_ICON_NAMES,
7546
- fe as SET_ICON_SPEC,
7547
- ui as SET_IMAGE_SPEC,
7548
- ki as SET_INLINE_SPEC,
7549
- gi as SET_INPUT_SPEC,
7550
- Ee as SET_LINK_SPEC,
7551
- vi as SET_LOGO_SPEC,
7552
- st as SET_MENU_EVENT_CHOOSE,
7553
- Le as SET_MENU_SPEC,
7554
- R as SET_MENU_TAG_NAME,
7555
- Te as SET_NAV_SPEC,
7556
- W as SET_NAV_TAG_NAME,
7557
- yi as SET_PAGE_SPEC,
7558
- Si as SET_PANEL_SPEC,
7559
- Ei as SET_PATTERN_SPEC,
7560
- Mi as SET_POSTER_SPEC,
7561
- qi as SET_PROSE_SPEC,
7562
- Ti as SET_RADIOS_SPEC,
7563
- _e as SET_RANGE_SPEC,
7564
- U as SET_RANGE_TAG_NAME,
7565
- _i as SET_ROOT_SPEC,
7566
- Ne as SET_SIDEBAR_SPEC,
7567
- $ as SET_SIDEBAR_TAG_NAME,
7568
- Ni as SET_SPINNER_SPEC,
7569
- Vi as SET_STACK_SPEC,
7570
- Bi as SET_SURFACE_SPEC,
7571
- Ri as SET_SWITCH_SPEC,
7572
- Ui as SET_TEXTAREA_SPEC,
7573
- Re as SET_TEXT_SPEC,
7574
- gt as buildSetAlert,
7575
- Wt as buildSetAvatar,
7576
- Ut as buildSetBadge,
7577
- yt as buildSetBanner,
7578
- $t as buildSetBlockquote,
7579
- Zt as buildSetBox,
7580
- G as buildSetButton,
7581
- jt as buildSetCard,
7582
- Ft as buildSetCheckbox,
7583
- Gt as buildSetContainer,
7584
- Kt as buildSetDetails,
7585
- Qt as buildSetDivider,
7586
- Et as buildSetExpander,
7587
- lt as buildSetFieldset,
7588
- Xt as buildSetFigure,
7589
- Yt as buildSetGrid,
7590
- Jt as buildSetGridItem,
7591
- te as buildSetHeading,
8043
+ di as SET_BLOCKQUOTE_SPEC,
8044
+ li as SET_BOX_SPEC,
8045
+ De as SET_BUTTON_SPEC,
8046
+ ci as SET_CARD_SPEC,
8047
+ hi as SET_CHECKBOX_SPEC,
8048
+ ki as SET_CONTAINER_SPEC,
8049
+ bi as SET_DETAILS_SPEC,
8050
+ fi as SET_DIVIDER_SPEC,
8051
+ Ge as SET_EXPANDER_SPEC,
8052
+ wi as SET_FIELDSET_SPEC,
8053
+ xi as SET_FIGURE_SPEC,
8054
+ Mi as SET_GRID_ITEM_SPEC,
8055
+ Ci as SET_GRID_SPEC,
8056
+ qi as SET_HEADING_SPEC,
8057
+ Ae as SET_ICON_NAMES,
8058
+ _e as SET_ICON_SPEC,
8059
+ Ii as SET_IMAGE_SPEC,
8060
+ Ai as SET_INLINE_SPEC,
8061
+ Di as SET_INPUT_SPEC,
8062
+ mt as SET_LIGHTSWITCH_EVENT_CHANGE,
8063
+ We as SET_LIGHTSWITCH_SPEC,
8064
+ K as SET_LIGHTSWITCH_STORAGE_KEY,
8065
+ W as SET_LIGHTSWITCH_TAG_NAME,
8066
+ Oe as SET_LINK_SPEC,
8067
+ Ni as SET_LOGO_SPEC,
8068
+ kt as SET_MENU_EVENT_CHOOSE,
8069
+ $e as SET_MENU_SPEC,
8070
+ U as SET_MENU_TAG_NAME,
8071
+ Fe as SET_NAV_SPEC,
8072
+ $ as SET_NAV_TAG_NAME,
8073
+ Oi as SET_PAGE_SPEC,
8074
+ Bi as SET_PANEL_SPEC,
8075
+ Wi as SET_PATTERN_SPEC,
8076
+ Gi as SET_POSTER_SPEC,
8077
+ Fi as SET_PROSE_SPEC,
8078
+ Ki as SET_RADIOS_SPEC,
8079
+ Ke as SET_RANGE_SPEC,
8080
+ G as SET_RANGE_TAG_NAME,
8081
+ Xi as SET_ROOT_SPEC,
8082
+ Xe as SET_SIDEBAR_SPEC,
8083
+ Z as SET_SIDEBAR_TAG_NAME,
8084
+ Ji as SET_SPINNER_SPEC,
8085
+ en as SET_STACK_SPEC,
8086
+ rn as SET_SURFACE_SPEC,
8087
+ on as SET_SWITCH_SPEC,
8088
+ sn as SET_TEXTAREA_SPEC,
8089
+ ai as SET_TEXT_SPEC,
8090
+ Je as SET_VIDEO_SPEC,
8091
+ F as SET_VIDEO_TAG_NAME,
8092
+ xt as buildSetAlert,
8093
+ ie as buildSetAvatar,
8094
+ ne as buildSetBadge,
8095
+ Mt as buildSetBanner,
8096
+ re as buildSetBlockquote,
8097
+ ae as buildSetBox,
8098
+ tt as buildSetButton,
8099
+ oe as buildSetCard,
8100
+ de as buildSetCheckbox,
8101
+ se as buildSetContainer,
8102
+ le as buildSetDetails,
8103
+ pe as buildSetDivider,
8104
+ Ht as buildSetExpander,
8105
+ gt as buildSetFieldset,
8106
+ ce as buildSetFigure,
8107
+ ue as buildSetGrid,
8108
+ he as buildSetGridItem,
8109
+ me as buildSetHeading,
7592
8110
  H as buildSetIcon,
7593
- ee as buildSetImage,
7594
- ne as buildSetInline,
7595
- re as buildSetInput,
7596
- at as buildSetLink,
7597
- ae as buildSetLogo,
7598
- St as buildSetMenu,
7599
- Ct as buildSetNav,
7600
- oe as buildSetPage,
7601
- de as buildSetPanel,
7602
- se as buildSetPattern,
7603
- le as buildSetPoster,
7604
- pe as buildSetProse,
7605
- ce as buildSetRadios,
7606
- Lt as buildSetRange,
7607
- ue as buildSetRoot,
7608
- At as buildSetSidebar,
7609
- he as buildSetSpinner,
7610
- ke as buildSetStack,
7611
- me as buildSetSurface,
7612
- ge as buildSetSwitch,
7613
- Z as buildSetText,
7614
- be as buildSetTextarea,
7615
- bt as defineSetAlert,
7616
- wt as defineSetBanner,
7617
- $i as defineSetComponents,
7618
- xt as defineSetMenu,
7619
- Mt as defineSetNav,
7620
- qt as defineSetRange,
7621
- _t as defineSetSidebar,
7622
- Ht as getSetInitials,
7623
- we as renderSetAlert,
7624
- He as renderSetAvatar,
7625
- Oe as renderSetBadge,
7626
- ze as renderSetBanner,
7627
- We as renderSetBlockquote,
7628
- $e as renderSetBox,
7629
- K as renderSetButton,
7630
- je as renderSetCard,
7631
- Ge as renderSetCheckbox,
7632
- Qe as renderSetContainer,
7633
- Ye as renderSetDetails,
7634
- ti as renderSetDivider,
7635
- zt as renderSetExpander,
7636
- ii as renderSetFieldset,
7637
- ri as renderSetFigure,
7638
- oi as renderSetGrid,
7639
- di as renderSetGridItem,
7640
- pi as renderSetHeading,
7641
- ut as renderSetIcon,
7642
- ie as renderSetImage,
7643
- hi as renderSetInline,
7644
- mi as renderSetInput,
7645
- xe as renderSetLink,
7646
- bi as renderSetLogo,
7647
- Me as renderSetMenu,
7648
- Ie as renderSetNav,
7649
- fi as renderSetPage,
7650
- wi as renderSetPanel,
7651
- xi as renderSetPattern,
7652
- Ci as renderSetPoster,
7653
- zi as renderSetPosterImage,
7654
- Li as renderSetProse,
7655
- Ii as renderSetRadios,
7656
- Ae as renderSetRange,
7657
- Ai as renderSetRoot,
7658
- De as renderSetSidebar,
7659
- Di as renderSetSpinner,
7660
- Hi as renderSetStack,
7661
- Oi as renderSetSurface,
7662
- Pi as renderSetSwitch,
7663
- Pe as renderSetText,
7664
- Wi as renderSetTextarea,
8111
+ ke as buildSetImage,
8112
+ be as buildSetInline,
8113
+ ve as buildSetInput,
8114
+ Tt as buildSetLightswitch,
8115
+ ct as buildSetLink,
8116
+ fe as buildSetLogo,
8117
+ _t as buildSetMenu,
8118
+ Vt as buildSetNav,
8119
+ ye as buildSetPage,
8120
+ we as buildSetPanel,
8121
+ Se as buildSetPattern,
8122
+ xe as buildSetPoster,
8123
+ Ee as buildSetProse,
8124
+ ze as buildSetRadios,
8125
+ Pt as buildSetRange,
8126
+ Ce as buildSetRoot,
8127
+ Ut as buildSetSidebar,
8128
+ Me as buildSetSpinner,
8129
+ Le as buildSetStack,
8130
+ qe as buildSetSurface,
8131
+ Ie as buildSetSwitch,
8132
+ j as buildSetText,
8133
+ Te as buildSetTextarea,
8134
+ Gt as buildSetVideo,
8135
+ Et as defineSetAlert,
8136
+ Lt as defineSetBanner,
8137
+ ln as defineSetComponents,
8138
+ At as defineSetLightswitch,
8139
+ Dt as defineSetMenu,
8140
+ Ot as defineSetNav,
8141
+ Bt as defineSetRange,
8142
+ $t as defineSetSidebar,
8143
+ Ft as defineSetVideo,
8144
+ Qt as getSetInitials,
8145
+ He as renderSetAlert,
8146
+ ti as renderSetAvatar,
8147
+ ii as renderSetBadge,
8148
+ Pe as renderSetBanner,
8149
+ oi as renderSetBlockquote,
8150
+ si as renderSetBox,
8151
+ et as renderSetButton,
8152
+ pi as renderSetCard,
8153
+ ui as renderSetCheckbox,
8154
+ mi as renderSetContainer,
8155
+ gi as renderSetDetails,
8156
+ vi as renderSetDivider,
8157
+ Nt as renderSetExpander,
8158
+ yi as renderSetFieldset,
8159
+ Si as renderSetFigure,
8160
+ Ei as renderSetGrid,
8161
+ zi as renderSetGridItem,
8162
+ Li as renderSetHeading,
8163
+ ft as renderSetIcon,
8164
+ ge as renderSetImage,
8165
+ Ti as renderSetInline,
8166
+ _i as renderSetInput,
8167
+ Re as renderSetLightswitch,
8168
+ Ve as renderSetLink,
8169
+ Hi as renderSetLogo,
8170
+ Ue as renderSetMenu,
8171
+ Ze as renderSetNav,
8172
+ Vi as renderSetPage,
8173
+ Pi as renderSetPanel,
8174
+ Ri as renderSetPattern,
8175
+ $i as renderSetPoster,
8176
+ Ui as renderSetPosterImage,
8177
+ Zi as renderSetProse,
8178
+ ji as renderSetRadios,
8179
+ je as renderSetRange,
8180
+ Qi as renderSetRoot,
8181
+ Qe as renderSetSidebar,
8182
+ Yi as renderSetSpinner,
8183
+ tn as renderSetStack,
8184
+ nn as renderSetSurface,
8185
+ an as renderSetSwitch,
8186
+ ri as renderSetText,
8187
+ dn as renderSetTextarea,
8188
+ Ye as renderSetVideo,
7665
8189
  h as serializeSetNode
7666
8190
  };
7667
8191
  //# sourceMappingURL=index.js.map