@tdacorp/hyle-sdk 0.21.0 → 0.23.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.
Files changed (58) hide show
  1. package/README.md +141 -18
  2. package/dist/check-routes-bin.js +174 -42
  3. package/dist/{chunk-56Y24XBV.js → chunk-JHZJOJDC.js} +4 -3
  4. package/dist/{chunk-K5VDLROQ.js → chunk-SFFBZFEN.js} +34 -1
  5. package/dist/{chunk-HJX57NLI.js → chunk-UFMKLCXS.js} +246 -225
  6. package/dist/{chunk-X2TLYM7Y.js → chunk-VUML2UPD.js} +1 -1
  7. package/dist/chunk-VXARM37R.js +68 -0
  8. package/dist/{chunk-75JFLML4.js → chunk-YHXE3TGS.js} +94 -12
  9. package/dist/{client-41fU6OY2.d.cts → client--ighAWaj.d.ts} +13 -1
  10. package/dist/{client-LwzHwqpM.d.ts → client-DK-S2580.d.cts} +13 -1
  11. package/dist/code-copy.cjs +4 -2
  12. package/dist/code-copy.d.cts +5 -2
  13. package/dist/code-copy.d.ts +5 -2
  14. package/dist/code-copy.js +5 -3
  15. package/dist/comments.cjs +14 -6
  16. package/dist/comments.js +14 -6
  17. package/dist/docs-enhance.cjs +7 -4
  18. package/dist/docs-enhance.d.cts +5 -3
  19. package/dist/docs-enhance.d.ts +5 -3
  20. package/dist/docs-enhance.js +8 -5
  21. package/dist/{embed-BUFRQboD.d.ts → embed-XT0x_Jaa.d.cts} +4 -2
  22. package/dist/{embed-CYt-q13P.d.cts → embed-g7NT1CyB.d.ts} +4 -2
  23. package/dist/html.cjs +14 -6
  24. package/dist/html.d.cts +1 -1
  25. package/dist/html.d.ts +1 -1
  26. package/dist/html.js +2 -2
  27. package/dist/index.cjs +85 -12
  28. package/dist/index.d.cts +13 -11
  29. package/dist/index.d.ts +13 -11
  30. package/dist/index.js +2 -2
  31. package/dist/mermaid-diagram.cjs +46 -6
  32. package/dist/mermaid-diagram.js +15 -6
  33. package/dist/mermaid-image.cjs +4 -1
  34. package/dist/mermaid-image.js +1 -1
  35. package/dist/next.cjs +521 -242
  36. package/dist/next.d.cts +74 -17
  37. package/dist/next.d.ts +74 -17
  38. package/dist/next.js +207 -33
  39. package/dist/print-coordinator.js +1 -1
  40. package/dist/react.cjs +233 -197
  41. package/dist/react.d.cts +17 -6
  42. package/dist/react.d.ts +17 -6
  43. package/dist/react.js +5 -3
  44. package/dist/{resolve-BjAK0k_Y.d.ts → resolve-BqC9l5RH.d.ts} +1 -1
  45. package/dist/{resolve-eI1muCKL.d.cts → resolve-CiZCPysX.d.cts} +1 -1
  46. package/dist/{sanitize-ijiWjEm9.d.cts → sanitize-BpY_AdZh.d.cts} +1 -1
  47. package/dist/{sanitize-ijiWjEm9.d.ts → sanitize-BpY_AdZh.d.ts} +1 -1
  48. package/dist/styles.css +4 -4
  49. package/dist/toc-spy.cjs +2 -1
  50. package/dist/toc-spy.js +2 -1
  51. package/dist/{types-3F0wqD-o.d.cts → types-b9QbmEDd.d.cts} +44 -1
  52. package/dist/{types-3F0wqD-o.d.ts → types-b9QbmEDd.d.ts} +44 -1
  53. package/dist/use-cache.cjs +73 -3
  54. package/dist/use-cache.d.cts +3 -3
  55. package/dist/use-cache.d.ts +3 -3
  56. package/dist/use-cache.js +3 -3
  57. package/package.json +3 -3
  58. package/dist/chunk-67IOIAVW.js +0 -35
@@ -9,10 +9,12 @@ import {
9
9
  scopeId,
10
10
  stringsFor,
11
11
  youtubeId
12
- } from "./chunk-56Y24XBV.js";
12
+ } from "./chunk-JHZJOJDC.js";
13
13
  import {
14
- hostAssetHtml
15
- } from "./chunk-67IOIAVW.js";
14
+ hostAssetHtml,
15
+ themeFontHrefs,
16
+ themeStylesheetHref
17
+ } from "./chunk-VXARM37R.js";
16
18
 
17
19
  // src/react/content.tsx
18
20
  import { toJsxRuntime } from "hast-util-to-jsx-runtime";
@@ -469,79 +471,94 @@ function CommentBody({ tree }) {
469
471
  return /* @__PURE__ */ jsx6("div", { className: "hyle-cm-body", children: toJsxRuntime2({ type: "root", children }, { Fragment: Fragment5, jsx: jsx5, jsxs: jsxs5, elementAttributeNameCase: "react", stylePropertyNameCase: "dom" }) });
470
472
  }
471
473
 
472
- // src/react/embed.tsx
474
+ // src/react/theme.tsx
473
475
  import { Fragment as Fragment6, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
474
- function HyleListView({ items, layout = "list", title, headingLevel = 2, moreHref, olderHref, ...base }) {
476
+ function HyleTheme({ theme }) {
477
+ const href = theme ? themeStylesheetHref(theme) : void 0;
478
+ if (!href) return null;
479
+ return /* @__PURE__ */ jsxs6(Fragment6, { children: [
480
+ themeFontHrefs(Array.isArray(theme?.preload) ? theme.preload : []).map((font) => /* @__PURE__ */ jsx7("link", { rel: "preload", as: "font", type: "font/woff2", href: font, crossOrigin: "anonymous" }, font)),
481
+ /* @__PURE__ */ jsx7("link", { rel: "stylesheet", href, precedence: "hyle-theme" })
482
+ ] });
483
+ }
484
+
485
+ // src/react/embed.tsx
486
+ import { Fragment as Fragment7, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
487
+ function HyleListView({ items, layout = "list", title, headingLevel = 2, moreHref, olderHref, theme, ...base }) {
475
488
  const c = ctx(base, "en");
476
489
  const { s, Link } = c;
477
490
  const Row = base.slots?.["list.item"];
478
491
  const Heading = `h${headingLevel}`;
479
492
  const safe = items.filter((item) => item.canonical_path.startsWith("/"));
480
- if (safe.length === 0) return base.slots?.["list.empty"] ? /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", "data-layout": layout, children: /* @__PURE__ */ jsx7(Slot, { name: "list.empty", slots: base.slots }) }) : null;
481
- return /* @__PURE__ */ jsxs6("div", { className: "hyle hyle-embed", "data-layout": layout, lang: c.locale, children: [
482
- title ? /* @__PURE__ */ jsx7(Heading, { className: "hyle-title", children: title }) : null,
483
- /* @__PURE__ */ jsx7("ul", { className: "hyle-items", children: safe.map((item) => /* @__PURE__ */ jsx7("li", { children: Row ? /* @__PURE__ */ jsx7(Row, { item, href: c.href(item.canonical_path), locale: c.locale }) : /* @__PURE__ */ jsxs6(Link, { className: "hyle-item", href: c.href(item.canonical_path), children: [
484
- item.published_at ? /* @__PURE__ */ jsx7("time", { dateTime: item.published_at, title: item.published_at, children: formatDate(item.published_at, c.locale) }) : null,
485
- /* @__PURE__ */ jsxs6("div", { children: [
486
- /* @__PURE__ */ jsx7("span", { className: "t", children: item.title }),
487
- item.description ? /* @__PURE__ */ jsx7("p", { children: item.description }) : null
493
+ if (safe.length === 0) return base.slots?.["list.empty"] ? /* @__PURE__ */ jsx8("div", { className: "hyle hyle-embed", "data-layout": layout, children: /* @__PURE__ */ jsx8(Slot, { name: "list.empty", slots: base.slots }) }) : null;
494
+ return /* @__PURE__ */ jsxs7("div", { className: "hyle hyle-embed", "data-layout": layout, lang: c.locale, children: [
495
+ /* @__PURE__ */ jsx8(HyleTheme, { theme }),
496
+ title ? /* @__PURE__ */ jsx8(Heading, { className: "hyle-title", children: title }) : null,
497
+ /* @__PURE__ */ jsx8("ul", { className: "hyle-items", children: safe.map((item) => /* @__PURE__ */ jsx8("li", { children: Row ? /* @__PURE__ */ jsx8(Row, { item, href: c.href(item.canonical_path), locale: c.locale }) : /* @__PURE__ */ jsxs7(Link, { className: "hyle-item", href: c.href(item.canonical_path), children: [
498
+ item.published_at ? /* @__PURE__ */ jsx8("time", { dateTime: item.published_at, title: item.published_at, children: formatDate(item.published_at, c.locale) }) : null,
499
+ /* @__PURE__ */ jsxs7("div", { children: [
500
+ /* @__PURE__ */ jsx8("span", { className: "t", children: item.title }),
501
+ item.description ? /* @__PURE__ */ jsx8("p", { children: item.description }) : null
488
502
  ] })
489
503
  ] }) }, item.canonical_path)) }),
490
- olderHref ? /* @__PURE__ */ jsx7(OlderNav, { href: olderHref, c }) : null,
491
- moreHref ? /* @__PURE__ */ jsx7("a", { className: "hyle-more", href: moreHref, children: s.viewAll }) : null
504
+ olderHref ? /* @__PURE__ */ jsx8(OlderNav, { href: olderHref, c }) : null,
505
+ moreHref ? /* @__PURE__ */ jsx8("a", { className: "hyle-more", href: moreHref, children: s.viewAll }) : null
492
506
  ] });
493
507
  }
494
508
  function HyleArticleView({ article, headingLevel = 2, ...base }) {
495
509
  const { publication: pub } = article;
496
510
  const c = ctx(base, pub.locale);
497
511
  const Heading = `h${headingLevel}`;
498
- return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsxs6("article", { lang: c.locale, children: [
499
- /* @__PURE__ */ jsxs6("header", { className: "hyle-head", children: [
500
- /* @__PURE__ */ jsx7(Heading, { className: "hyle-title", children: pub.title }),
501
- pub.description ? /* @__PURE__ */ jsx7("p", { className: "hyle-desc", children: pub.description }) : null,
502
- /* @__PURE__ */ jsx7("div", { className: "hyle-meta", children: /* @__PURE__ */ jsx7("span", { children: /* @__PURE__ */ jsx7("time", { dateTime: pub.published_at, title: pub.published_at, children: formatDate(pub.published_at, c.locale) }) }) })
503
- ] }),
504
- /* @__PURE__ */ jsx7(Body, { article, components: base.components, locale: c.locale }),
505
- pub.canonical_path.startsWith("/") ? /* @__PURE__ */ jsxs6("a", { className: "hyle-more", href: c.href(pub.canonical_path, pub.locale), rel: "bookmark", children: [
506
- c.s.readAtSource,
507
- /* @__PURE__ */ jsxs6("span", { className: "hyle-sr", children: [
508
- ": ",
509
- pub.title
510
- ] })
511
- ] }) : null
512
- ] }) });
512
+ return /* @__PURE__ */ jsxs7("div", { className: "hyle hyle-embed", children: [
513
+ /* @__PURE__ */ jsx8(HyleTheme, { theme: article.theme }),
514
+ /* @__PURE__ */ jsxs7("article", { lang: c.locale, children: [
515
+ /* @__PURE__ */ jsxs7("header", { className: "hyle-head", children: [
516
+ /* @__PURE__ */ jsx8(Heading, { className: "hyle-title", children: pub.title }),
517
+ pub.description ? /* @__PURE__ */ jsx8("p", { className: "hyle-desc", children: pub.description }) : null,
518
+ /* @__PURE__ */ jsx8("div", { className: "hyle-meta", children: /* @__PURE__ */ jsx8("span", { children: /* @__PURE__ */ jsx8("time", { dateTime: pub.published_at, title: pub.published_at, children: formatDate(pub.published_at, c.locale) }) }) })
519
+ ] }),
520
+ /* @__PURE__ */ jsx8(Body, { article, components: base.components, locale: c.locale }),
521
+ pub.canonical_path.startsWith("/") ? /* @__PURE__ */ jsxs7("a", { className: "hyle-more", href: c.href(pub.canonical_path, pub.locale), rel: "bookmark", children: [
522
+ c.s.readAtSource,
523
+ /* @__PURE__ */ jsxs7("span", { className: "hyle-sr", children: [
524
+ ": ",
525
+ pub.title
526
+ ] })
527
+ ] }) : null
528
+ ] })
529
+ ] });
513
530
  }
514
531
  var initials = (name) => name.trim().split(/\s+/).slice(0, 2).map((w) => [...w][0] ?? "").join("").toUpperCase() || "?";
515
532
  function StaticThread({ nodes, locale, s, level = 1 }) {
516
- return /* @__PURE__ */ jsx7("ol", { className: "hyle-cm-list", role: "list", children: nodes.map((node) => {
517
- const kids = node.kids.length > 0 && level < 32 ? /* @__PURE__ */ jsx7(StaticThread, { nodes: node.kids, locale, s, level: level + 1 }) : null;
533
+ return /* @__PURE__ */ jsx8("ol", { className: "hyle-cm-list", role: "list", children: nodes.map((node) => {
534
+ const kids = node.kids.length > 0 && level < 32 ? /* @__PURE__ */ jsx8(StaticThread, { nodes: node.kids, locale, s, level: level + 1 }) : null;
518
535
  if (node.status === "removed") {
519
536
  const why = node.removedBy === "moderator" ? s.removedByModerator : node.removedBy === "author" ? s.removedByAuthor : s.removed;
520
- return /* @__PURE__ */ jsxs6("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "removed", "data-removed-by": node.removedBy, children: [
521
- /* @__PURE__ */ jsxs6("article", { "aria-label": why, children: [
522
- /* @__PURE__ */ jsx7("span", { className: "hyle-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(Icon, { name: "ban" }) }),
523
- /* @__PURE__ */ jsx7("div", { className: "hyle-cm-main", children: /* @__PURE__ */ jsx7("div", { className: "hyle-cm-body", children: /* @__PURE__ */ jsx7("p", { children: why }) }) })
537
+ return /* @__PURE__ */ jsxs7("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "removed", "data-removed-by": node.removedBy, children: [
538
+ /* @__PURE__ */ jsxs7("article", { "aria-label": why, children: [
539
+ /* @__PURE__ */ jsx8("span", { className: "hyle-avatar", "aria-hidden": "true", children: /* @__PURE__ */ jsx8(Icon, { name: "ban" }) }),
540
+ /* @__PURE__ */ jsx8("div", { className: "hyle-cm-main", children: /* @__PURE__ */ jsx8("div", { className: "hyle-cm-body", children: /* @__PURE__ */ jsx8("p", { children: why }) }) })
524
541
  ] }),
525
542
  kids
526
543
  ] }, node.id);
527
544
  }
528
- return /* @__PURE__ */ jsxs6("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "visible", children: [
529
- /* @__PURE__ */ jsxs6("article", { children: [
530
- /* @__PURE__ */ jsx7("span", { className: "hyle-avatar", "aria-hidden": "true", children: initials(node.name ?? "") }),
531
- /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-main", children: [
532
- /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-by", children: [
533
- /* @__PURE__ */ jsx7("b", { children: node.name }),
534
- /* @__PURE__ */ jsxs6("span", { children: [
535
- /* @__PURE__ */ jsx7("time", { dateTime: node.createdAt, title: node.createdAt, children: formatDate(node.createdAt, locale) }),
536
- node.editedAt ? /* @__PURE__ */ jsxs6(Fragment6, { children: [
545
+ return /* @__PURE__ */ jsxs7("li", { className: "hyle-cm", "data-depth": node.depth, "data-status": "visible", children: [
546
+ /* @__PURE__ */ jsxs7("article", { children: [
547
+ /* @__PURE__ */ jsx8("span", { className: "hyle-avatar", "aria-hidden": "true", children: initials(node.name ?? "") }),
548
+ /* @__PURE__ */ jsxs7("div", { className: "hyle-cm-main", children: [
549
+ /* @__PURE__ */ jsxs7("div", { className: "hyle-cm-by", children: [
550
+ /* @__PURE__ */ jsx8("b", { children: node.name }),
551
+ /* @__PURE__ */ jsxs7("span", { children: [
552
+ /* @__PURE__ */ jsx8("time", { dateTime: node.createdAt, title: node.createdAt, children: formatDate(node.createdAt, locale) }),
553
+ node.editedAt ? /* @__PURE__ */ jsxs7(Fragment7, { children: [
537
554
  " ",
538
- /* @__PURE__ */ jsx7("span", { "aria-hidden": "true", children: "\xB7" }),
555
+ /* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\xB7" }),
539
556
  " ",
540
- /* @__PURE__ */ jsx7("span", { children: s.edited })
557
+ /* @__PURE__ */ jsx8("span", { children: s.edited })
541
558
  ] }) : null
542
559
  ] })
543
560
  ] }),
544
- node.unrenderable ? /* @__PURE__ */ jsx7("div", { className: "hyle-cm-body", children: /* @__PURE__ */ jsx7("p", { children: s.unrenderable }) }) : /* @__PURE__ */ jsx7(CommentBody, { tree: node.tree })
561
+ node.unrenderable ? /* @__PURE__ */ jsx8("div", { className: "hyle-cm-body", children: /* @__PURE__ */ jsx8("p", { children: s.unrenderable }) }) : /* @__PURE__ */ jsx8(CommentBody, { tree: node.tree })
545
562
  ] })
546
563
  ] }),
547
564
  kids
@@ -552,26 +569,26 @@ function HyleCommentsView({ listing, locale }) {
552
569
  const thread = buildThread(listing, []);
553
570
  if (thread.length === 0) return null;
554
571
  const s = stringsFor(locale).comments;
555
- return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsxs6("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", lang: locale, children: [
556
- /* @__PURE__ */ jsx7("div", { className: "hyle-cm-head", children: /* @__PURE__ */ jsxs6("h2", { children: [
572
+ return /* @__PURE__ */ jsx8("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsxs7("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", lang: locale, children: [
573
+ /* @__PURE__ */ jsx8("div", { className: "hyle-cm-head", children: /* @__PURE__ */ jsxs7("h2", { children: [
557
574
  s.heading,
558
575
  " ",
559
- /* @__PURE__ */ jsx7("span", { className: "hyle-cm-count", "aria-label": s.countLabel.replace("{n}", String(listing.comment_count)), children: listing.comment_count })
576
+ /* @__PURE__ */ jsx8("span", { className: "hyle-cm-count", "aria-label": s.countLabel.replace("{n}", String(listing.comment_count)), children: listing.comment_count })
560
577
  ] }) }),
561
- /* @__PURE__ */ jsx7(StaticThread, { nodes: thread, locale, s }),
562
- listing.truncated ? /* @__PURE__ */ jsx7("p", { className: "hyle-cm-note", children: s.truncated }) : null
578
+ /* @__PURE__ */ jsx8(StaticThread, { nodes: thread, locale, s }),
579
+ listing.truncated ? /* @__PURE__ */ jsx8("p", { className: "hyle-cm-note", children: s.truncated }) : null
563
580
  ] }) });
564
581
  }
565
582
  function HyleCommentsFallback({ locale }) {
566
583
  const s = stringsFor(locale).comments;
567
- return /* @__PURE__ */ jsx7("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsx7("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", children: /* @__PURE__ */ jsxs6("div", { role: "status", "aria-live": "polite", "aria-busy": "true", children: [
568
- /* @__PURE__ */ jsx7("span", { className: "hyle-sr", children: s.loading }),
569
- /* @__PURE__ */ jsx7("div", { "aria-hidden": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs6("div", { className: "hyle-cm-sk", children: [
570
- /* @__PURE__ */ jsx7("span", { className: "hyle-sk c" }),
571
- /* @__PURE__ */ jsxs6("div", { children: [
572
- /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: 120 } }),
573
- /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: "100%" } }),
574
- /* @__PURE__ */ jsx7("span", { className: "hyle-sk l", style: { width: "72%" } })
584
+ return /* @__PURE__ */ jsx8("div", { className: "hyle hyle-embed", children: /* @__PURE__ */ jsx8("section", { className: "hyle-comments", "aria-label": s.heading, "data-slot-component": "Comments", children: /* @__PURE__ */ jsxs7("div", { role: "status", "aria-live": "polite", "aria-busy": "true", children: [
585
+ /* @__PURE__ */ jsx8("span", { className: "hyle-sr", children: s.loading }),
586
+ /* @__PURE__ */ jsx8("div", { "aria-hidden": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs7("div", { className: "hyle-cm-sk", children: [
587
+ /* @__PURE__ */ jsx8("span", { className: "hyle-sk c" }),
588
+ /* @__PURE__ */ jsxs7("div", { children: [
589
+ /* @__PURE__ */ jsx8("span", { className: "hyle-sk l", style: { width: 120 } }),
590
+ /* @__PURE__ */ jsx8("span", { className: "hyle-sk l", style: { width: "100%" } }),
591
+ /* @__PURE__ */ jsx8("span", { className: "hyle-sk l", style: { width: "72%" } })
575
592
  ] })
576
593
  ] }, i)) })
577
594
  ] }) }) });
@@ -702,13 +719,16 @@ function listJsonLd({ list, origin, href, path, locale, description, jsonLd, cur
702
719
 
703
720
  // src/react/pages.tsx
704
721
  import { TocSpy } from "./toc-spy.js";
705
- import { Fragment as Fragment7, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
722
+ import { Fragment as Fragment8, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
706
723
  function Slot({ name, slots, tag: Tag = "div", className }) {
707
724
  const fill = slots?.[name];
708
- return fill ? /* @__PURE__ */ jsx8(Tag, { "data-slot": name, className, children: fill }) : null;
725
+ return fill ? /* @__PURE__ */ jsx9(Tag, { "data-slot": name, className, children: fill }) : null;
709
726
  }
710
- function Shell({ children }) {
711
- return /* @__PURE__ */ jsx8("div", { className: "hyle", children: /* @__PURE__ */ jsx8("div", { className: "hyle-page", children }) });
727
+ function Shell({ children, theme }) {
728
+ return /* @__PURE__ */ jsxs8(Fragment8, { children: [
729
+ /* @__PURE__ */ jsx9(HyleTheme, { theme }),
730
+ /* @__PURE__ */ jsx9("div", { className: "hyle", children: /* @__PURE__ */ jsx9("div", { className: "hyle-page", children }) })
731
+ ] });
712
732
  }
713
733
  function ctx(p, fallbackLocale) {
714
734
  const locale = p.locale ?? fallbackLocale;
@@ -717,29 +737,29 @@ function ctx(p, fallbackLocale) {
717
737
  function Pager({ prev, next, c }) {
718
738
  if (!prev && !next) return null;
719
739
  const { Link, s } = c;
720
- return /* @__PURE__ */ jsxs7("nav", { className: "hyle-pager", "aria-label": s.pager, children: [
721
- prev ? /* @__PURE__ */ jsxs7(Link, { href: c.href(prev.canonical_path), rel: "prev", children: [
722
- /* @__PURE__ */ jsxs7("span", { className: "dir", children: [
723
- /* @__PURE__ */ jsx8(Icon, { name: "chev-left" }),
740
+ return /* @__PURE__ */ jsxs8("nav", { className: "hyle-pager", "aria-label": s.pager, children: [
741
+ prev ? /* @__PURE__ */ jsxs8(Link, { href: c.href(prev.canonical_path), rel: "prev", children: [
742
+ /* @__PURE__ */ jsxs8("span", { className: "dir", children: [
743
+ /* @__PURE__ */ jsx9(Icon, { name: "chev-left" }),
724
744
  s.prev
725
745
  ] }),
726
- /* @__PURE__ */ jsx8("span", { className: "ttl", children: prev.title })
727
- ] }) : /* @__PURE__ */ jsx8("span", { className: "none", "aria-hidden": "true" }),
728
- next ? /* @__PURE__ */ jsxs7(Link, { href: c.href(next.canonical_path), rel: "next", className: "next", children: [
729
- /* @__PURE__ */ jsxs7("span", { className: "dir", children: [
746
+ /* @__PURE__ */ jsx9("span", { className: "ttl", children: prev.title })
747
+ ] }) : /* @__PURE__ */ jsx9("span", { className: "none", "aria-hidden": "true" }),
748
+ next ? /* @__PURE__ */ jsxs8(Link, { href: c.href(next.canonical_path), rel: "next", className: "next", children: [
749
+ /* @__PURE__ */ jsxs8("span", { className: "dir", children: [
730
750
  s.next,
731
- /* @__PURE__ */ jsx8(Icon, { name: "chev" })
751
+ /* @__PURE__ */ jsx9(Icon, { name: "chev" })
732
752
  ] }),
733
- /* @__PURE__ */ jsx8("span", { className: "ttl", children: next.title })
753
+ /* @__PURE__ */ jsx9("span", { className: "ttl", children: next.title })
734
754
  ] }) : null
735
755
  ] });
736
756
  }
737
757
  function OlderNav({ href, c }) {
738
- return /* @__PURE__ */ jsxs7("nav", { className: "hyle-pagination", "aria-label": c.s.pager, children: [
739
- /* @__PURE__ */ jsx8("span", { className: "sp" }),
740
- /* @__PURE__ */ jsxs7(c.Link, { className: "hyle-btn sm", href, rel: "next", children: [
758
+ return /* @__PURE__ */ jsxs8("nav", { className: "hyle-pagination", "aria-label": c.s.pager, children: [
759
+ /* @__PURE__ */ jsx9("span", { className: "sp" }),
760
+ /* @__PURE__ */ jsxs8(c.Link, { className: "hyle-btn sm", href, rel: "next", children: [
741
761
  c.s.older,
742
- /* @__PURE__ */ jsx8(Icon, { name: "chev" })
762
+ /* @__PURE__ */ jsx9(Icon, { name: "chev" })
743
763
  ] })
744
764
  ] });
745
765
  }
@@ -750,9 +770,9 @@ function TocList({ toc }) {
750
770
  if (entry.depth === 3 && last) last.subs.push(entry);
751
771
  else groups.push({ entry, subs: [] });
752
772
  }
753
- return /* @__PURE__ */ jsx8("ul", { children: groups.map(({ entry, subs }) => /* @__PURE__ */ jsxs7("li", { children: [
754
- /* @__PURE__ */ jsx8("a", { href: `#${scopeId(entry.id)}`, children: entry.text }),
755
- subs.length > 0 ? /* @__PURE__ */ jsx8("ul", { children: subs.map((sub) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8("a", { href: `#${scopeId(sub.id)}`, children: sub.text }) }, sub.id)) }) : null
773
+ return /* @__PURE__ */ jsx9("ul", { children: groups.map(({ entry, subs }) => /* @__PURE__ */ jsxs8("li", { children: [
774
+ /* @__PURE__ */ jsx9("a", { href: `#${scopeId(entry.id)}`, children: entry.text }),
775
+ subs.length > 0 ? /* @__PURE__ */ jsx9("ul", { children: subs.map((sub) => /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsx9("a", { href: `#${scopeId(sub.id)}`, children: sub.text }) }, sub.id)) }) : null
756
776
  ] }, entry.id)) });
757
777
  }
758
778
  function Toc({ toc, c, aside, spy, className }) {
@@ -761,21 +781,21 @@ function Toc({ toc, c, aside, spy, className }) {
761
781
  const { s } = c;
762
782
  const classes = (own) => className ? `${className} ${own}` : own;
763
783
  return {
764
- narrow: entries.length === 0 ? null : /* @__PURE__ */ jsxs7("details", { className: classes("hyle-toc-m"), children: [
765
- /* @__PURE__ */ jsxs7("summary", { children: [
766
- /* @__PURE__ */ jsx8(Icon, { name: "file" }),
784
+ narrow: entries.length === 0 ? null : /* @__PURE__ */ jsxs8("details", { className: classes("hyle-toc-m"), children: [
785
+ /* @__PURE__ */ jsxs8("summary", { children: [
786
+ /* @__PURE__ */ jsx9(Icon, { name: "file" }),
767
787
  s.toc,
768
- /* @__PURE__ */ jsx8(Icon, { name: "chev-down", className: "hyle-chev" })
788
+ /* @__PURE__ */ jsx9(Icon, { name: "chev-down", className: "hyle-chev" })
769
789
  ] }),
770
- /* @__PURE__ */ jsx8("nav", { className: "hyle-toc-list", "aria-label": s.toc, children: /* @__PURE__ */ jsx8(TocList, { toc: entries }) })
790
+ /* @__PURE__ */ jsx9("nav", { className: "hyle-toc-list", "aria-label": s.toc, children: /* @__PURE__ */ jsx9(TocList, { toc: entries }) })
771
791
  ] }),
772
- wide: /* @__PURE__ */ jsxs7("aside", { className: classes("hyle-toc-d"), "aria-label": s.toc, children: [
773
- entries.length === 0 ? null : /* @__PURE__ */ jsxs7(Fragment7, { children: [
774
- /* @__PURE__ */ jsx8("p", { className: "hyle-toc-title", children: s.toc }),
775
- /* @__PURE__ */ jsx8("nav", { className: "hyle-toc-list", children: /* @__PURE__ */ jsx8(TocList, { toc: entries }) })
792
+ wide: /* @__PURE__ */ jsxs8("aside", { className: classes("hyle-toc-d"), "aria-label": s.toc, children: [
793
+ entries.length === 0 ? null : /* @__PURE__ */ jsxs8(Fragment8, { children: [
794
+ /* @__PURE__ */ jsx9("p", { className: "hyle-toc-title", children: s.toc }),
795
+ /* @__PURE__ */ jsx9("nav", { className: "hyle-toc-list", children: /* @__PURE__ */ jsx9(TocList, { toc: entries }) })
776
796
  ] }),
777
797
  aside,
778
- spy && entries.length > 0 ? /* @__PURE__ */ jsx8(TocSpy, { ids: entries.map((t) => scopeId(t.id)) }) : null
798
+ spy && entries.length > 0 ? /* @__PURE__ */ jsx9(TocSpy, { ids: entries.map((t) => scopeId(t.id)) }) : null
779
799
  ] })
780
800
  };
781
801
  }
@@ -787,27 +807,27 @@ function Body({ article, components, locale }) {
787
807
  const { content, publication } = article;
788
808
  const lang = article.fallback ? void 0 : publication.locale;
789
809
  if (content.format === "hast") {
790
- return /* @__PURE__ */ jsx8(ProseBody, { className: "hyle-body hyle-prose", lang, tree: content.tree, title: publication.title, description: publication.description, components: components ?? {}, locale });
810
+ return /* @__PURE__ */ jsx9(ProseBody, { className: "hyle-body hyle-prose", lang, tree: content.tree, title: publication.title, description: publication.description, components: components ?? {}, locale });
791
811
  }
792
- return /* @__PURE__ */ jsx8("div", { className: "hyle-body hyle-prose", lang, children: content.format === "html" ? /* @__PURE__ */ jsx8(TrustedServerHtml, { html: content.html }) : null });
812
+ return /* @__PURE__ */ jsx9("div", { className: "hyle-body hyle-prose", lang, children: content.format === "html" ? /* @__PURE__ */ jsx9(TrustedServerHtml, { html: content.html }) : null });
793
813
  }
794
814
  function Languages({ alternates, current, c }) {
795
815
  if (alternates.length < 2) return null;
796
816
  const { Link, s } = c;
797
- return /* @__PURE__ */ jsxs7("nav", { className: "hyle-langs", "aria-label": s.languages, children: [
798
- /* @__PURE__ */ jsx8("span", { children: s.readIn }),
799
- /* @__PURE__ */ jsx8("ul", { children: alternates.map((a) => {
817
+ return /* @__PURE__ */ jsxs8("nav", { className: "hyle-langs", "aria-label": s.languages, children: [
818
+ /* @__PURE__ */ jsx9("span", { children: s.readIn }),
819
+ /* @__PURE__ */ jsx9("ul", { children: alternates.map((a) => {
800
820
  const label = languageName(a.locale, a.locale);
801
- return /* @__PURE__ */ jsx8("li", { children: a.locale === current ? /* @__PURE__ */ jsx8("a", { href: c.href(a.canonical_path, a.locale), hrefLang: a.locale, lang: a.locale, "aria-current": "true", children: label }) : /* @__PURE__ */ jsx8(Link, { href: c.href(a.canonical_path, a.locale), hrefLang: a.locale, lang: a.locale, children: label }) }, a.locale);
821
+ return /* @__PURE__ */ jsx9("li", { children: a.locale === current ? /* @__PURE__ */ jsx9("a", { href: c.href(a.canonical_path, a.locale), hrefLang: a.locale, lang: a.locale, "aria-current": "true", children: label }) : /* @__PURE__ */ jsx9(Link, { href: c.href(a.canonical_path, a.locale), hrefLang: a.locale, lang: a.locale, children: label }) }, a.locale);
802
822
  }) })
803
823
  ] });
804
824
  }
805
825
  function LdScript({ json }) {
806
- return /* @__PURE__ */ jsx8("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: json } });
826
+ return /* @__PURE__ */ jsx9("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: json } });
807
827
  }
808
828
  function Crumbs({ items, c }) {
809
829
  const { Link } = c;
810
- return /* @__PURE__ */ jsx8("nav", { className: "hyle-crumbs", "aria-label": c.s.crumbs, children: /* @__PURE__ */ jsx8("ol", { children: items.map((b, i) => /* @__PURE__ */ jsx8("li", { "aria-current": i === items.length - 1 ? "page" : void 0, children: i === items.length - 1 ? b.title : /* @__PURE__ */ jsx8(Link, { href: crumbHref(c.href, b.canonical_path, c.locale), children: b.title }) }, b.canonical_path)) }) });
830
+ return /* @__PURE__ */ jsx9("nav", { className: "hyle-crumbs", "aria-label": c.s.crumbs, children: /* @__PURE__ */ jsx9("ol", { children: items.map((b, i) => /* @__PURE__ */ jsx9("li", { "aria-current": i === items.length - 1 ? "page" : void 0, children: i === items.length - 1 ? b.title : /* @__PURE__ */ jsx9(Link, { href: crumbHref(c.href, b.canonical_path, c.locale), children: b.title }) }, b.canonical_path)) }) });
811
831
  }
812
832
  function ArticlePage({ article, engagement, origin, jsonLd, imageUrl, imageWidth, imageHeight, related, ...base }) {
813
833
  const { publication: pub } = article;
@@ -817,66 +837,66 @@ function ArticlePage({ article, engagement, origin, jsonLd, imageUrl, imageWidth
817
837
  const author = articleAuthor(article, jsonLd)?.name;
818
838
  const modified = modifiedAt(pub);
819
839
  const words = wordCountOf(pub);
820
- const toc = Toc({ toc: article.toc, c, spy: true, aside: /* @__PURE__ */ jsx8(Slot, { name: "article.aside", slots: base.slots, className: "hyle-slot-wrap" }) });
840
+ const toc = Toc({ toc: article.toc, c, spy: true, aside: /* @__PURE__ */ jsx9(Slot, { name: "article.aside", slots: base.slots, className: "hyle-slot-wrap" }) });
821
841
  const notTranslated = article.fallback ? s.fallbackTitle.replace("{language}", languageName(article.fallback.requested_locale, c.locale)) : void 0;
822
- return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("article", { className: "hyle-article", "data-hyle-page": "article", lang: c.locale, children: [
823
- /* @__PURE__ */ jsxs7("header", { className: "hyle-head", children: [
824
- /* @__PURE__ */ jsx8(Slot, { name: "article.before", slots: base.slots, className: "hyle-eyebrow" }),
825
- /* @__PURE__ */ jsx8(Crumbs, { items: breadcrumbItems(article, jsonLd), c }),
826
- /* @__PURE__ */ jsx8("h1", { className: "hyle-title", children: pub.title }),
827
- pub.description ? /* @__PURE__ */ jsx8("p", { className: "hyle-desc", children: pub.description }) : null,
828
- /* @__PURE__ */ jsxs7("div", { className: "hyle-meta", children: [
829
- author ? /* @__PURE__ */ jsxs7("span", { children: [
830
- /* @__PURE__ */ jsx8("span", { className: "hyle-avatar", "aria-hidden": "true", children: author.slice(0, 2).toUpperCase() }),
831
- /* @__PURE__ */ jsxs7("span", { children: [
832
- /* @__PURE__ */ jsxs7("span", { className: "hyle-sr", children: [
842
+ return /* @__PURE__ */ jsx9(Shell, { theme: article.theme, children: /* @__PURE__ */ jsxs8("article", { className: "hyle-article", "data-hyle-page": "article", lang: c.locale, children: [
843
+ /* @__PURE__ */ jsxs8("header", { className: "hyle-head", children: [
844
+ /* @__PURE__ */ jsx9(Slot, { name: "article.before", slots: base.slots, className: "hyle-eyebrow" }),
845
+ /* @__PURE__ */ jsx9(Crumbs, { items: breadcrumbItems(article, jsonLd), c }),
846
+ /* @__PURE__ */ jsx9("h1", { className: "hyle-title", children: pub.title }),
847
+ pub.description ? /* @__PURE__ */ jsx9("p", { className: "hyle-desc", children: pub.description }) : null,
848
+ /* @__PURE__ */ jsxs8("div", { className: "hyle-meta", children: [
849
+ author ? /* @__PURE__ */ jsxs8("span", { children: [
850
+ /* @__PURE__ */ jsx9("span", { className: "hyle-avatar", "aria-hidden": "true", children: author.slice(0, 2).toUpperCase() }),
851
+ /* @__PURE__ */ jsxs8("span", { children: [
852
+ /* @__PURE__ */ jsxs8("span", { className: "hyle-sr", children: [
833
853
  s.by,
834
854
  " "
835
855
  ] }),
836
- /* @__PURE__ */ jsx8("span", { className: "by", children: author })
856
+ /* @__PURE__ */ jsx9("span", { className: "by", children: author })
837
857
  ] })
838
858
  ] }) : null,
839
- /* @__PURE__ */ jsxs7("span", { children: [
840
- /* @__PURE__ */ jsx8(Icon, { name: "calendar" }),
841
- /* @__PURE__ */ jsx8("time", { dateTime: pub.published_at, title: pub.published_at, children: formatDate(pub.published_at, c.locale) })
859
+ /* @__PURE__ */ jsxs8("span", { children: [
860
+ /* @__PURE__ */ jsx9(Icon, { name: "calendar" }),
861
+ /* @__PURE__ */ jsx9("time", { dateTime: pub.published_at, title: pub.published_at, children: formatDate(pub.published_at, c.locale) })
842
862
  ] }),
843
- modified ? /* @__PURE__ */ jsxs7("span", { children: [
844
- /* @__PURE__ */ jsx8(Icon, { name: "calendar" }),
863
+ modified ? /* @__PURE__ */ jsxs8("span", { children: [
864
+ /* @__PURE__ */ jsx9(Icon, { name: "calendar" }),
845
865
  s.updated,
846
866
  " ",
847
- /* @__PURE__ */ jsx8("time", { dateTime: modified, title: modified, children: formatDate(modified, c.locale) })
867
+ /* @__PURE__ */ jsx9("time", { dateTime: modified, title: modified, children: formatDate(modified, c.locale) })
848
868
  ] }) : null,
849
- words ? /* @__PURE__ */ jsxs7("span", { children: [
850
- /* @__PURE__ */ jsx8(Icon, { name: "clock" }),
869
+ words ? /* @__PURE__ */ jsxs8("span", { children: [
870
+ /* @__PURE__ */ jsx9(Icon, { name: "clock" }),
851
871
  s.readingTime.replace("{n}", String(readingMinutes(words)))
852
872
  ] }) : null,
853
- /* @__PURE__ */ jsxs7("span", { children: [
854
- /* @__PURE__ */ jsx8(Icon, { name: "globe" }),
855
- /* @__PURE__ */ jsx8("span", { lang: pub.locale, children: languageName(pub.locale, c.locale) })
873
+ /* @__PURE__ */ jsxs8("span", { children: [
874
+ /* @__PURE__ */ jsx9(Icon, { name: "globe" }),
875
+ /* @__PURE__ */ jsx9("span", { lang: pub.locale, children: languageName(pub.locale, c.locale) })
856
876
  ] }),
857
- /* @__PURE__ */ jsx8(Slot, { name: "article.meta", slots: base.slots, tag: "span" })
877
+ /* @__PURE__ */ jsx9(Slot, { name: "article.meta", slots: base.slots, tag: "span" })
858
878
  ] }),
859
- /* @__PURE__ */ jsx8(Languages, { alternates: article.alternates, current: pub.locale, c }),
860
- notTranslated ? /* @__PURE__ */ jsxs7("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
861
- /* @__PURE__ */ jsx8(Icon, { name: "alert" }),
862
- /* @__PURE__ */ jsxs7("div", { children: [
863
- /* @__PURE__ */ jsx8("b", { children: notTranslated }),
879
+ /* @__PURE__ */ jsx9(Languages, { alternates: article.alternates, current: pub.locale, c }),
880
+ notTranslated ? /* @__PURE__ */ jsxs8("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
881
+ /* @__PURE__ */ jsx9(Icon, { name: "alert" }),
882
+ /* @__PURE__ */ jsxs8("div", { children: [
883
+ /* @__PURE__ */ jsx9("b", { children: notTranslated }),
864
884
  " ",
865
885
  s.fallbackBody
866
886
  ] })
867
887
  ] }) : null
868
888
  ] }),
869
889
  toc.narrow,
870
- /* @__PURE__ */ jsx8(Body, { article, components: base.components, locale: c.locale }),
871
- engagement ? /* @__PURE__ */ jsx8(Comments, { path: pub.canonical_path, endpoint: engagement.endpoint ?? "/api/hyle/engage", signInHref: engagement.signInHref, locale: c.locale, labels: s.comments }) : null,
872
- /* @__PURE__ */ jsx8(Pager, { prev: article.prev, next: article.next, c }),
873
- related ? /* @__PURE__ */ jsxs7(Fragment7, { children: [
874
- related.items.length > 0 ? /* @__PURE__ */ jsx8(HyleListView, { items: related.items, title: related.title ?? s.moreInSection, ...base, locale: c.locale }) : null,
875
- article.children.length > 0 ? /* @__PURE__ */ jsx8(HyleListView, { items: article.children.map((child) => ({ ...child, description: null, published_at: "" })), title: s.subPages, ...base, locale: c.locale }) : null
890
+ /* @__PURE__ */ jsx9(Body, { article, components: base.components, locale: c.locale }),
891
+ engagement ? /* @__PURE__ */ jsx9(Comments, { path: pub.canonical_path, endpoint: engagement.endpoint ?? "/api/hyle/engage", signInHref: engagement.signInHref, locale: c.locale, labels: s.comments }) : null,
892
+ /* @__PURE__ */ jsx9(Pager, { prev: article.prev, next: article.next, c }),
893
+ related ? /* @__PURE__ */ jsxs8(Fragment8, { children: [
894
+ related.items.length > 0 ? /* @__PURE__ */ jsx9(HyleListView, { items: related.items, title: related.title ?? s.moreInSection, ...base, locale: c.locale }) : null,
895
+ article.children.length > 0 ? /* @__PURE__ */ jsx9(HyleListView, { items: article.children.map((child) => ({ ...child, description: null, published_at: "" })), title: s.subPages, ...base, locale: c.locale }) : null
876
896
  ] }) : null,
877
- /* @__PURE__ */ jsx8(Slot, { name: "article.after", slots: base.slots, className: "hyle-after" }),
897
+ /* @__PURE__ */ jsx9(Slot, { name: "article.after", slots: base.slots, className: "hyle-after" }),
878
898
  toc.wide,
879
- jsonLdOrigin ? /* @__PURE__ */ jsx8(LdScript, { json: articleJsonLd({ article, origin: jsonLdOrigin, href: c.href, jsonLd, imageUrl, imageWidth, imageHeight }) }) : null
899
+ jsonLdOrigin ? /* @__PURE__ */ jsx9(LdScript, { json: articleJsonLd({ article, origin: jsonLdOrigin, href: c.href, jsonLd, imageUrl, imageWidth, imageHeight }) }) : null
880
900
  ] }) });
881
901
  }
882
902
  function ListPage({ list, olderHref, description, origin, path, jsonLd, cursor, ...base }) {
@@ -887,85 +907,85 @@ function ListPage({ list, olderHref, description, origin, path, jsonLd, cursor,
887
907
  for (const item of list.items) groups.set(item.published_at.slice(0, 7), [...groups.get(item.published_at.slice(0, 7)) ?? [], item]);
888
908
  const notTranslated = list.fallback ? s.fallbackTitle.replace("{language}", languageName(list.fallback.requested_locale, c.locale)) : void 0;
889
909
  const jsonLdOrigin = bareOrigin(origin);
890
- return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("div", { className: "hyle-listpage", "data-hyle-page": "list", lang: c.locale, children: [
891
- /* @__PURE__ */ jsxs7("header", { className: "hyle-head", children: [
892
- /* @__PURE__ */ jsx8("h1", { className: "hyle-title", children: list.section.title }),
893
- description ? /* @__PURE__ */ jsx8("p", { className: "hyle-desc", children: description }) : null,
894
- /* @__PURE__ */ jsx8(Slot, { name: "list.header", slots: base.slots, className: "hyle-slot-wrap" }),
895
- notTranslated ? /* @__PURE__ */ jsxs7("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
896
- /* @__PURE__ */ jsx8(Icon, { name: "alert" }),
897
- /* @__PURE__ */ jsxs7("div", { children: [
898
- /* @__PURE__ */ jsx8("b", { children: notTranslated }),
910
+ return /* @__PURE__ */ jsx9(Shell, { theme: list.theme, children: /* @__PURE__ */ jsxs8("div", { className: "hyle-listpage", "data-hyle-page": "list", lang: c.locale, children: [
911
+ /* @__PURE__ */ jsxs8("header", { className: "hyle-head", children: [
912
+ /* @__PURE__ */ jsx9("h1", { className: "hyle-title", children: list.section.title }),
913
+ description ? /* @__PURE__ */ jsx9("p", { className: "hyle-desc", children: description }) : null,
914
+ /* @__PURE__ */ jsx9(Slot, { name: "list.header", slots: base.slots, className: "hyle-slot-wrap" }),
915
+ notTranslated ? /* @__PURE__ */ jsxs8("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
916
+ /* @__PURE__ */ jsx9(Icon, { name: "alert" }),
917
+ /* @__PURE__ */ jsxs8("div", { children: [
918
+ /* @__PURE__ */ jsx9("b", { children: notTranslated }),
899
919
  " ",
900
920
  s.fallbackBody
901
921
  ] })
902
922
  ] }) : null
903
923
  ] }),
904
- list.items.length === 0 ? /* @__PURE__ */ jsxs7("div", { className: "hyle-empty", "data-slot-state": "empty", children: [
905
- /* @__PURE__ */ jsx8(Icon, { name: "file" }),
906
- /* @__PURE__ */ jsx8("h2", { children: s.emptyTitle }),
907
- /* @__PURE__ */ jsx8("p", { children: s.emptyBody }),
908
- /* @__PURE__ */ jsx8(Slot, { name: "list.empty", slots: base.slots })
909
- ] }) : [...groups].map(([month, items]) => /* @__PURE__ */ jsxs7("section", { "aria-label": formatDate(`${month}-01`, c.locale, { month: "long", year: "numeric" }), children: [
910
- /* @__PURE__ */ jsx8("h2", { className: "hyle-year", children: formatDate(`${month}-01`, c.locale, { month: "long", year: "numeric" }) }),
911
- /* @__PURE__ */ jsx8("ul", { className: "hyle-items", children: items.map((item) => /* @__PURE__ */ jsx8("li", { children: Row ? /* @__PURE__ */ jsx8(Row, { item, href: c.href(item.canonical_path), locale: c.locale }) : /* @__PURE__ */ jsxs7(Link, { className: "hyle-item", href: c.href(item.canonical_path), children: [
912
- /* @__PURE__ */ jsx8("time", { dateTime: item.published_at, title: item.published_at, children: formatDate(item.published_at, c.locale) }),
913
- /* @__PURE__ */ jsxs7("div", { children: [
914
- /* @__PURE__ */ jsx8("span", { className: "t", children: item.title }),
915
- item.description ? /* @__PURE__ */ jsx8("p", { children: item.description }) : null
924
+ list.items.length === 0 ? /* @__PURE__ */ jsxs8("div", { className: "hyle-empty", "data-slot-state": "empty", children: [
925
+ /* @__PURE__ */ jsx9(Icon, { name: "file" }),
926
+ /* @__PURE__ */ jsx9("h2", { children: s.emptyTitle }),
927
+ /* @__PURE__ */ jsx9("p", { children: s.emptyBody }),
928
+ /* @__PURE__ */ jsx9(Slot, { name: "list.empty", slots: base.slots })
929
+ ] }) : [...groups].map(([month, items]) => /* @__PURE__ */ jsxs8("section", { "aria-label": formatDate(`${month}-01`, c.locale, { month: "long", year: "numeric" }), children: [
930
+ /* @__PURE__ */ jsx9("h2", { className: "hyle-year", children: formatDate(`${month}-01`, c.locale, { month: "long", year: "numeric" }) }),
931
+ /* @__PURE__ */ jsx9("ul", { className: "hyle-items", children: items.map((item) => /* @__PURE__ */ jsx9("li", { children: Row ? /* @__PURE__ */ jsx9(Row, { item, href: c.href(item.canonical_path), locale: c.locale }) : /* @__PURE__ */ jsxs8(Link, { className: "hyle-item", href: c.href(item.canonical_path), children: [
932
+ /* @__PURE__ */ jsx9("time", { dateTime: item.published_at, title: item.published_at, children: formatDate(item.published_at, c.locale) }),
933
+ /* @__PURE__ */ jsxs8("div", { children: [
934
+ /* @__PURE__ */ jsx9("span", { className: "t", children: item.title }),
935
+ item.description ? /* @__PURE__ */ jsx9("p", { children: item.description }) : null
916
936
  ] })
917
937
  ] }) }, item.canonical_path)) })
918
938
  ] }, month)),
919
- olderHref ? /* @__PURE__ */ jsx8(OlderNav, { href: olderHref, c }) : null,
920
- jsonLdOrigin && path ? /* @__PURE__ */ jsx8(LdScript, { json: listJsonLd({ list, origin: jsonLdOrigin, href: c.href, path, locale: c.locale, description, jsonLd, cursor }) }) : null
939
+ olderHref ? /* @__PURE__ */ jsx9(OlderNav, { href: olderHref, c }) : null,
940
+ jsonLdOrigin && path ? /* @__PURE__ */ jsx9(LdScript, { json: listJsonLd({ list, origin: jsonLdOrigin, href: c.href, path, locale: c.locale, description, jsonLd, cursor }) }) : null
921
941
  ] }) });
922
942
  }
923
943
  function NotFound({ path, homeHref = "/", ...base }) {
924
944
  const c = ctx(base, "en");
925
945
  const { Link, s } = c;
926
946
  const body = base.slots?.["notfound.body"];
927
- return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("section", { className: "hyle-state", "data-hyle-page": "not-found", lang: c.locale, children: [
928
- /* @__PURE__ */ jsx8("span", { className: "kind", children: s.nfKind }),
929
- /* @__PURE__ */ jsx8("h1", { children: s.nfTitle }),
930
- body ? /* @__PURE__ */ jsx8("div", { "data-slot": "notfound.body", children: body }) : /* @__PURE__ */ jsx8("p", { children: s.nfBody }),
931
- path ? /* @__PURE__ */ jsx8("dl", { className: "hyle-addr", children: /* @__PURE__ */ jsxs7("div", { children: [
932
- /* @__PURE__ */ jsx8("dt", { children: s.path }),
933
- /* @__PURE__ */ jsx8("dd", { children: path })
947
+ return /* @__PURE__ */ jsx9(Shell, { children: /* @__PURE__ */ jsxs8("section", { className: "hyle-state", "data-hyle-page": "not-found", lang: c.locale, children: [
948
+ /* @__PURE__ */ jsx9("span", { className: "kind", children: s.nfKind }),
949
+ /* @__PURE__ */ jsx9("h1", { children: s.nfTitle }),
950
+ body ? /* @__PURE__ */ jsx9("div", { "data-slot": "notfound.body", children: body }) : /* @__PURE__ */ jsx9("p", { children: s.nfBody }),
951
+ path ? /* @__PURE__ */ jsx9("dl", { className: "hyle-addr", children: /* @__PURE__ */ jsxs8("div", { children: [
952
+ /* @__PURE__ */ jsx9("dt", { children: s.path }),
953
+ /* @__PURE__ */ jsx9("dd", { children: path })
934
954
  ] }) }) : null,
935
- /* @__PURE__ */ jsxs7("div", { className: "hyle-actions", children: [
936
- /* @__PURE__ */ jsx8(Link, { className: "hyle-btn primary", href: crumbHref(c.href, homeHref, c.locale), children: s.home }),
937
- /* @__PURE__ */ jsx8(Slot, { name: "notfound.actions", slots: base.slots, tag: "span" })
955
+ /* @__PURE__ */ jsxs8("div", { className: "hyle-actions", children: [
956
+ /* @__PURE__ */ jsx9(Link, { className: "hyle-btn primary", href: crumbHref(c.href, homeHref, c.locale), children: s.home }),
957
+ /* @__PURE__ */ jsx9(Slot, { name: "notfound.actions", slots: base.slots, tag: "span" })
938
958
  ] })
939
959
  ] }) });
940
960
  }
941
961
  function Unavailable(base) {
942
962
  const c = ctx(base, "en");
943
- return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("section", { className: "hyle-state", "data-hyle-page": "unavailable", lang: c.locale, role: "status", children: [
944
- /* @__PURE__ */ jsx8("span", { className: "kind", children: c.s.unKind }),
945
- /* @__PURE__ */ jsx8("h1", { children: c.s.unTitle }),
946
- /* @__PURE__ */ jsx8("p", { children: c.s.unBody })
963
+ return /* @__PURE__ */ jsx9(Shell, { children: /* @__PURE__ */ jsxs8("section", { className: "hyle-state", "data-hyle-page": "unavailable", lang: c.locale, role: "status", children: [
964
+ /* @__PURE__ */ jsx9("span", { className: "kind", children: c.s.unKind }),
965
+ /* @__PURE__ */ jsx9("h1", { children: c.s.unTitle }),
966
+ /* @__PURE__ */ jsx9("p", { children: c.s.unBody })
947
967
  ] }) });
948
968
  }
949
969
  function Redirecting({ from, to, ...base }) {
950
970
  const c = ctx(base, "en");
951
971
  const { Link, s } = c;
952
972
  const extra = base.slots?.["redirecting.body"];
953
- return /* @__PURE__ */ jsx8(Shell, { children: /* @__PURE__ */ jsxs7("section", { className: "hyle-state", "data-hyle-page": "redirecting", role: "status", lang: c.locale, children: [
954
- /* @__PURE__ */ jsx8("span", { className: "kind", children: s.rdKind }),
955
- /* @__PURE__ */ jsx8("h1", { children: s.rdTitle }),
956
- /* @__PURE__ */ jsx8("p", { children: s.rdBody }),
957
- /* @__PURE__ */ jsxs7("dl", { className: "hyle-addr", children: [
958
- from ? /* @__PURE__ */ jsxs7("div", { children: [
959
- /* @__PURE__ */ jsx8("dt", { children: s.from }),
960
- /* @__PURE__ */ jsx8("dd", { children: from })
973
+ return /* @__PURE__ */ jsx9(Shell, { children: /* @__PURE__ */ jsxs8("section", { className: "hyle-state", "data-hyle-page": "redirecting", role: "status", lang: c.locale, children: [
974
+ /* @__PURE__ */ jsx9("span", { className: "kind", children: s.rdKind }),
975
+ /* @__PURE__ */ jsx9("h1", { children: s.rdTitle }),
976
+ /* @__PURE__ */ jsx9("p", { children: s.rdBody }),
977
+ /* @__PURE__ */ jsxs8("dl", { className: "hyle-addr", children: [
978
+ from ? /* @__PURE__ */ jsxs8("div", { children: [
979
+ /* @__PURE__ */ jsx9("dt", { children: s.from }),
980
+ /* @__PURE__ */ jsx9("dd", { children: from })
961
981
  ] }) : null,
962
- /* @__PURE__ */ jsxs7("div", { children: [
963
- /* @__PURE__ */ jsx8("dt", { children: s.to }),
964
- /* @__PURE__ */ jsx8("dd", { children: to })
982
+ /* @__PURE__ */ jsxs8("div", { children: [
983
+ /* @__PURE__ */ jsx9("dt", { children: s.to }),
984
+ /* @__PURE__ */ jsx9("dd", { children: to })
965
985
  ] })
966
986
  ] }),
967
- /* @__PURE__ */ jsx8("p", { className: "fine", children: /* @__PURE__ */ jsx8(Link, { href: c.href(to), children: s.rdFallback }) }),
968
- extra ? /* @__PURE__ */ jsx8("p", { "data-slot": "redirecting.body", className: "fine", children: extra }) : null
987
+ /* @__PURE__ */ jsx9("p", { className: "fine", children: /* @__PURE__ */ jsx9(Link, { href: c.href(to), children: s.rdFallback }) }),
988
+ extra ? /* @__PURE__ */ jsx9("p", { "data-slot": "redirecting.body", className: "fine", children: extra }) : null
969
989
  ] }) });
970
990
  }
971
991
 
@@ -975,7 +995,7 @@ import { HyleReactions } from "./reactions.js";
975
995
 
976
996
  // src/react/docs.tsx
977
997
  import { DocsEnhance } from "./docs-enhance.js";
978
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
998
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
979
999
  var ROOT_ID = "hyle-docs";
980
1000
  var NAV_ID = "hyle-docs-nav";
981
1001
  function navTreeOf(article) {
@@ -999,15 +1019,15 @@ function pathTo(nodes, path) {
999
1019
  }
1000
1020
  function Branch({ nodes, current, onPath, c }) {
1001
1021
  const { Link } = c;
1002
- return /* @__PURE__ */ jsx9("ul", { children: nodes.map((node) => {
1003
- const link = /* @__PURE__ */ jsx9(Link, { href: c.href(node.canonical_path), ...node.canonical_path === current ? { "aria-current": "page" } : {}, children: node.title });
1004
- if (node.children.length === 0) return /* @__PURE__ */ jsx9("li", { children: link }, node.canonical_path);
1005
- return /* @__PURE__ */ jsx9("li", { children: /* @__PURE__ */ jsxs8("details", { ...onPath.has(node.canonical_path) ? { open: true } : {}, children: [
1006
- /* @__PURE__ */ jsxs8("summary", { children: [
1007
- /* @__PURE__ */ jsx9(Icon, { name: "chev" }),
1022
+ return /* @__PURE__ */ jsx10("ul", { children: nodes.map((node) => {
1023
+ const link = /* @__PURE__ */ jsx10(Link, { href: c.href(node.canonical_path), ...node.canonical_path === current ? { "aria-current": "page" } : {}, children: node.title });
1024
+ if (node.children.length === 0) return /* @__PURE__ */ jsx10("li", { children: link }, node.canonical_path);
1025
+ return /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsxs9("details", { ...onPath.has(node.canonical_path) ? { open: true } : {}, children: [
1026
+ /* @__PURE__ */ jsxs9("summary", { children: [
1027
+ /* @__PURE__ */ jsx10(Icon, { name: "chev" }),
1008
1028
  link
1009
1029
  ] }),
1010
- /* @__PURE__ */ jsx9(Branch, { nodes: node.children, current, onPath, c })
1030
+ /* @__PURE__ */ jsx10(Branch, { nodes: node.children, current, onPath, c })
1011
1031
  ] }) }, node.canonical_path);
1012
1032
  }) });
1013
1033
  }
@@ -1021,47 +1041,47 @@ function DocsPage({ article, ...base }) {
1021
1041
  const siteName = article.breadcrumbs[0]?.title ?? "";
1022
1042
  const headingIds = article.toc.filter((t) => t.depth === 2 || t.depth === 3).map((t) => scopeId(t.id));
1023
1043
  const notTranslated = article.fallback ? s.fallbackTitle.replace("{language}", languageName(article.fallback.requested_locale, c.locale)) : void 0;
1024
- return /* @__PURE__ */ jsx9(Shell, { children: /* @__PURE__ */ jsxs8("div", { className: "hyle-docs", id: ROOT_ID, lang: c.locale, children: [
1025
- /* @__PURE__ */ jsx9(DocsEnhance, { headingIds, rootId: ROOT_ID }),
1026
- /* @__PURE__ */ jsxs8("button", { type: "button", className: "hyle-nav-bar", popoverTarget: NAV_ID, children: [
1027
- /* @__PURE__ */ jsx9(Icon, { name: "file" }),
1044
+ return /* @__PURE__ */ jsx10(Shell, { theme: article.theme, children: /* @__PURE__ */ jsxs9("div", { className: "hyle-docs", id: ROOT_ID, lang: c.locale, children: [
1045
+ /* @__PURE__ */ jsx10(DocsEnhance, { headingIds, rootId: ROOT_ID }),
1046
+ /* @__PURE__ */ jsxs9("button", { type: "button", className: "hyle-nav-bar", popoverTarget: NAV_ID, children: [
1047
+ /* @__PURE__ */ jsx10(Icon, { name: "file" }),
1028
1048
  s.menu,
1029
- /* @__PURE__ */ jsx9("span", { className: "cur", children: pub.title }),
1030
- /* @__PURE__ */ jsx9(Icon, { name: "chev-down", className: "hyle-chev" })
1049
+ /* @__PURE__ */ jsx10("span", { className: "cur", children: pub.title }),
1050
+ /* @__PURE__ */ jsx10(Icon, { name: "chev-down", className: "hyle-chev" })
1031
1051
  ] }),
1032
- /* @__PURE__ */ jsxs8("aside", { className: "hyle-nav-d", id: NAV_ID, popover: "auto", "aria-label": s.docs, children: [
1033
- /* @__PURE__ */ jsxs8("div", { className: "hyle-side-head", children: [
1034
- /* @__PURE__ */ jsx9("b", { children: siteName }),
1035
- /* @__PURE__ */ jsx9(Slot, { name: "docs.version", slots: base.slots, tag: "span" }),
1036
- /* @__PURE__ */ jsx9("button", { type: "button", className: "hyle-nav-x", popoverTarget: NAV_ID, popoverTargetAction: "hide", "aria-label": s.closeMenu, children: /* @__PURE__ */ jsx9(Icon, { name: "x" }) })
1052
+ /* @__PURE__ */ jsxs9("aside", { className: "hyle-nav-d", id: NAV_ID, popover: "auto", "aria-label": s.docs, children: [
1053
+ /* @__PURE__ */ jsxs9("div", { className: "hyle-side-head", children: [
1054
+ /* @__PURE__ */ jsx10("b", { children: siteName }),
1055
+ /* @__PURE__ */ jsx10(Slot, { name: "docs.version", slots: base.slots, tag: "span" }),
1056
+ /* @__PURE__ */ jsx10("button", { type: "button", className: "hyle-nav-x", popoverTarget: NAV_ID, popoverTargetAction: "hide", "aria-label": s.closeMenu, children: /* @__PURE__ */ jsx10(Icon, { name: "x" }) })
1037
1057
  ] }),
1038
- /* @__PURE__ */ jsx9(Slot, { name: "docs.sidebar-header", slots: base.slots, className: "hyle-side-slot" }),
1039
- /* @__PURE__ */ jsx9("nav", { className: "hyle-tree", "aria-label": s.docs, children: /* @__PURE__ */ jsx9(Branch, { nodes: tree, current: pub.canonical_path, onPath, c }) }),
1040
- /* @__PURE__ */ jsx9(Slot, { name: "docs.sidebar-footer", slots: base.slots, className: "hyle-side-slot" })
1058
+ /* @__PURE__ */ jsx10(Slot, { name: "docs.sidebar-header", slots: base.slots, className: "hyle-side-slot" }),
1059
+ /* @__PURE__ */ jsx10("nav", { className: "hyle-tree", "aria-label": s.docs, children: /* @__PURE__ */ jsx10(Branch, { nodes: tree, current: pub.canonical_path, onPath, c }) }),
1060
+ /* @__PURE__ */ jsx10(Slot, { name: "docs.sidebar-footer", slots: base.slots, className: "hyle-side-slot" })
1041
1061
  ] }),
1042
- /* @__PURE__ */ jsxs8("div", { className: "hyle-docs-main", "data-hyle-page": "docs", children: [
1043
- notTranslated ? /* @__PURE__ */ jsxs8("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
1044
- /* @__PURE__ */ jsx9(Icon, { name: "alert" }),
1045
- /* @__PURE__ */ jsxs8("div", { children: [
1046
- /* @__PURE__ */ jsx9("b", { children: notTranslated }),
1062
+ /* @__PURE__ */ jsxs9("div", { className: "hyle-docs-main", "data-hyle-page": "docs", children: [
1063
+ notTranslated ? /* @__PURE__ */ jsxs9("div", { className: "hyle-banner", "data-kind": "warn", role: "status", children: [
1064
+ /* @__PURE__ */ jsx10(Icon, { name: "alert" }),
1065
+ /* @__PURE__ */ jsxs9("div", { children: [
1066
+ /* @__PURE__ */ jsx10("b", { children: notTranslated }),
1047
1067
  " ",
1048
1068
  s.fallbackBody
1049
1069
  ] })
1050
1070
  ] }) : null,
1051
- /* @__PURE__ */ jsx9("nav", { className: "hyle-crumbs", "aria-label": s.crumbs, children: /* @__PURE__ */ jsx9("ol", { children: article.breadcrumbs.map((b, i) => /* @__PURE__ */ jsx9("li", { "aria-current": i === article.breadcrumbs.length - 1 ? "page" : void 0, children: i === article.breadcrumbs.length - 1 ? b.title : /* @__PURE__ */ jsx9(Link, { href: c.href(b.canonical_path), children: b.title }) }, b.canonical_path)) }) }),
1052
- /* @__PURE__ */ jsx9("h1", { className: "hyle-title", children: pub.title }),
1053
- pub.description ? /* @__PURE__ */ jsx9("p", { className: "hyle-desc", children: pub.description }) : null,
1054
- /* @__PURE__ */ jsxs8("p", { className: "hyle-updated", children: [
1055
- /* @__PURE__ */ jsx9(Icon, { name: "calendar" }),
1071
+ /* @__PURE__ */ jsx10("nav", { className: "hyle-crumbs", "aria-label": s.crumbs, children: /* @__PURE__ */ jsx10("ol", { children: article.breadcrumbs.map((b, i) => /* @__PURE__ */ jsx10("li", { "aria-current": i === article.breadcrumbs.length - 1 ? "page" : void 0, children: i === article.breadcrumbs.length - 1 ? b.title : /* @__PURE__ */ jsx10(Link, { href: c.href(b.canonical_path), children: b.title }) }, b.canonical_path)) }) }),
1072
+ /* @__PURE__ */ jsx10("h1", { className: "hyle-title", children: pub.title }),
1073
+ pub.description ? /* @__PURE__ */ jsx10("p", { className: "hyle-desc", children: pub.description }) : null,
1074
+ /* @__PURE__ */ jsxs9("p", { className: "hyle-updated", children: [
1075
+ /* @__PURE__ */ jsx10(Icon, { name: "calendar" }),
1056
1076
  s.updated,
1057
1077
  " ",
1058
- /* @__PURE__ */ jsx9("time", { dateTime: pub.updated_at, title: pub.updated_at, children: formatDate(pub.updated_at, c.locale) })
1078
+ /* @__PURE__ */ jsx10("time", { dateTime: pub.updated_at, title: pub.updated_at, children: formatDate(pub.updated_at, c.locale) })
1059
1079
  ] }),
1060
1080
  toc.narrow,
1061
- /* @__PURE__ */ jsx9(Body, { article, components: base.components, locale: c.locale }),
1062
- /* @__PURE__ */ jsx9(Pager, { prev: article.prev, next: article.next, c }),
1063
- /* @__PURE__ */ jsx9(Slot, { name: "docs.after", slots: base.slots, className: "hyle-after" }),
1064
- /* @__PURE__ */ jsx9("span", { className: "hyle-docs-end", "aria-hidden": "true" })
1081
+ /* @__PURE__ */ jsx10(Body, { article, components: base.components, locale: c.locale }),
1082
+ /* @__PURE__ */ jsx10(Pager, { prev: article.prev, next: article.next, c }),
1083
+ /* @__PURE__ */ jsx10(Slot, { name: "docs.after", slots: base.slots, className: "hyle-after" }),
1084
+ /* @__PURE__ */ jsx10("span", { className: "hyle-docs-end", "aria-hidden": "true" })
1065
1085
  ] }),
1066
1086
  toc.wide
1067
1087
  ] }) });
@@ -1077,6 +1097,7 @@ export {
1077
1097
  REACTION_KINDS,
1078
1098
  isCursor,
1079
1099
  parseListing,
1100
+ HyleTheme,
1080
1101
  HyleListView,
1081
1102
  HyleArticleView,
1082
1103
  HyleCommentsView,