@unterberg/nivel 0.1.14 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +8 -9
  2. package/dist/{SearchModal-YJZFUB53.js → SearchModal-Q2MTOIZU.js} +4 -4
  3. package/dist/SearchModal-Q2MTOIZU.js.map +1 -0
  4. package/dist/{chunk-SH5XWPXW.js → chunk-AQJQDMKW.js} +181 -106
  5. package/dist/chunk-AQJQDMKW.js.map +1 -0
  6. package/dist/{chunk-SOVTSE5J.js → chunk-AT4O3RRN.js} +8 -2
  7. package/dist/chunk-AT4O3RRN.js.map +1 -0
  8. package/dist/{chunk-PKXDOKJY.js → chunk-C724XH47.js} +23 -18
  9. package/dist/chunk-C724XH47.js.map +1 -0
  10. package/dist/{chunk-NGX2C26M.js → chunk-GFZ3P4F4.js} +556 -15
  11. package/dist/chunk-GFZ3P4F4.js.map +1 -0
  12. package/dist/{chunk-R6O4NLHC.js → chunk-I75ALNG2.js} +6 -2
  13. package/dist/chunk-I75ALNG2.js.map +1 -0
  14. package/dist/chunk-WMHFKLPG.js +124 -0
  15. package/dist/chunk-WMHFKLPG.js.map +1 -0
  16. package/dist/cli.js +2 -3
  17. package/dist/cli.js.map +1 -1
  18. package/dist/client.d.ts +2 -1
  19. package/dist/client.js +3 -4
  20. package/dist/icons.d.ts +1 -0
  21. package/dist/icons.js +11638 -0
  22. package/dist/icons.js.map +1 -0
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +2 -9
  25. package/dist/mdx/code-blocks.d.ts +1 -1
  26. package/dist/mdx.js +2 -4
  27. package/dist/mdx.js.map +1 -1
  28. package/dist/runtime/client.d.ts +2 -1
  29. package/dist/runtime/client.js +3 -4
  30. package/dist/runtime/node.d.ts +2 -1
  31. package/dist/runtime/node.js +6 -8
  32. package/dist/{types-IiJ1jLWc.d.ts → types-Duk127zu.d.ts} +20 -2
  33. package/dist/vike.d.ts +2 -1
  34. package/dist/vike.js +7 -9
  35. package/dist/vike.js.map +1 -1
  36. package/package.json +10 -9
  37. package/dist/SearchModal-YJZFUB53.js.map +0 -1
  38. package/dist/chunk-JSZZPQEP.js +0 -9
  39. package/dist/chunk-JSZZPQEP.js.map +0 -1
  40. package/dist/chunk-L6ZVB6XH.js +0 -36
  41. package/dist/chunk-L6ZVB6XH.js.map +0 -1
  42. package/dist/chunk-NGX2C26M.js.map +0 -1
  43. package/dist/chunk-PKXDOKJY.js.map +0 -1
  44. package/dist/chunk-QWIYQPCW.js +0 -404
  45. package/dist/chunk-QWIYQPCW.js.map +0 -1
  46. package/dist/chunk-R6O4NLHC.js.map +0 -1
  47. package/dist/chunk-SH5XWPXW.js.map +0 -1
  48. package/dist/chunk-SOVTSE5J.js.map +0 -1
  49. package/dist/config.d.ts +0 -6
  50. package/dist/config.js +0 -9
  51. package/dist/config.js.map +0 -1
@@ -13,19 +13,18 @@ import {
13
13
  } from "./chunk-ESAHWFDZ.js";
14
14
  import {
15
15
  createHeadingSlugger,
16
+ getDocsIconMapKey,
16
17
  normalizeHeadingTitle
17
- } from "./chunk-SOVTSE5J.js";
18
+ } from "./chunk-AT4O3RRN.js";
18
19
  import {
19
20
  UniversalMdxProvider,
20
- renderInlineMarkdown
21
- } from "./chunk-L6ZVB6XH.js";
22
- import {
23
21
  getActiveSectionByPathname,
24
22
  getResolvedPageByPathname,
25
23
  getResolvedSectionById,
26
24
  isSamePagePathname,
25
+ renderInlineMarkdown,
27
26
  resolveDocsHref
28
- } from "./chunk-QWIYQPCW.js";
27
+ } from "./chunk-WMHFKLPG.js";
29
28
  import {
30
29
  nivelAssetUrl,
31
30
  withSiteBaseUrl
@@ -33,19 +32,18 @@ import {
33
32
 
34
33
  // src/runtime/client/AppLayout.tsx
35
34
  import { cmMerge as cmMerge5 } from "@classmatejs/react";
36
- import { usePageContext as usePageContext2 } from "vike-react/usePageContext";
35
+ import { usePageContext as usePageContext3 } from "vike-react/usePageContext";
37
36
 
38
37
  // src/runtime/client/components/Navbar/index.tsx
39
38
  import cm3 from "@classmatejs/react";
40
- import { useEffect as useEffect4, useState as useState4 } from "react";
41
- import { usePageContext } from "vike-react/usePageContext";
39
+ import { usePageContext as usePageContext2 } from "vike-react/usePageContext";
42
40
 
43
41
  // src/runtime/client/components/Search.tsx
44
42
  import { useEffect, useState } from "react";
45
43
  import { jsx } from "react/jsx-runtime";
46
44
  var searchModalModulePromise = null;
47
45
  var loadSearchModalModule = () => {
48
- searchModalModulePromise ??= import("./SearchModal-YJZFUB53.js");
46
+ searchModalModulePromise ??= import("./SearchModal-Q2MTOIZU.js");
49
47
  return searchModalModulePromise;
50
48
  };
51
49
  var Search = () => {
@@ -249,8 +247,8 @@ var ThemeSwitch = ({ theme }) => {
249
247
  onClick: () => setThemePreference(effectiveThemePreference === "light" ? "dark" : "light"),
250
248
  className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-base-muted-light bg-base-200",
251
249
  children: [
252
- /* @__PURE__ */ jsx4(Sun, { className: "h-4 w-4 dark:hidden" }),
253
- /* @__PURE__ */ jsx4(Moon, { className: "hidden h-4 w-4 dark:block" })
250
+ /* @__PURE__ */ jsx4(Sun, { className: "size-4 dark:hidden" }),
251
+ /* @__PURE__ */ jsx4(Moon, { className: "hidden size-4 dark:block" })
254
252
  ]
255
253
  }
256
254
  );
@@ -295,6 +293,7 @@ var DocsNavbar = ({
295
293
  /* @__PURE__ */ jsx6("div", { className: "lg:min-w-76 min-w-none", children: /* @__PURE__ */ jsx6(Brand, { brand: docs.brand }) }),
296
294
  /* @__PURE__ */ jsx6(StyledNav, { "aria-label": "Primary", children: /* @__PURE__ */ jsxs4(StyledNavList, { className: "", children: [
297
295
  docs.navbarItems.map((item) => {
296
+ const ItemIcon = docs.docsIconMap[getDocsIconMapKey("section", item.id)];
298
297
  const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
299
298
  return /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsx6(
300
299
  "a",
@@ -314,12 +313,13 @@ var DocsNavbar = ({
314
313
  activeSection?.id === item.id ? "btn-primary btn-soft" : "btn-ghost "
315
314
  ),
316
315
  children: [
316
+ ItemIcon ? /* @__PURE__ */ jsx6(ItemIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
317
317
  renderInlineMarkdown(item.title),
318
318
  /* @__PURE__ */ jsx6(
319
319
  ChevronDown,
320
320
  {
321
321
  className: cmMerge2(
322
- "h-4 w-4 shrink-0 transition-transform duration-200",
322
+ "size-4 shrink-0 transition-transform duration-200",
323
323
  isMegaMenuItemActive ? "rotate-180" : "rotate-0"
324
324
  )
325
325
  }
@@ -338,7 +338,7 @@ var DocsNavbar = ({
338
338
  className: "btn btn-ghost btn-sm text-base md:min-w-30 px-2 whitespace-nowrap tracking-tight",
339
339
  children: [
340
340
  "Search",
341
- /* @__PURE__ */ jsx6(TextSearch, { className: "h-4 w-4" })
341
+ /* @__PURE__ */ jsx6(TextSearch, { className: "size-4" })
342
342
  ]
343
343
  }
344
344
  ) }) : null
@@ -378,6 +378,7 @@ var LandingPageNavbar = ({
378
378
  /* @__PURE__ */ jsx7("div", { className: "min-w-40", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
379
379
  /* @__PURE__ */ jsx7(StyledNav2, { "aria-label": "Primary", className: "flex-1 flex hidden lg:flex", children: /* @__PURE__ */ jsxs5(StyledNavList2, { className: "justify-end ", children: [
380
380
  docs.navbarItems.map((item) => {
381
+ const ItemIcon = docs.docsIconMap[getDocsIconMapKey("section", item.id)];
381
382
  const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
382
383
  return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
383
384
  "a",
@@ -396,12 +397,13 @@ var LandingPageNavbar = ({
396
397
  "btn btn-ghost text-base lg:text-lg btn-sm lg:min-w-30 px-2 whitespace-nowrap tracking-tight"
397
398
  ),
398
399
  children: [
400
+ ItemIcon ? /* @__PURE__ */ jsx7(ItemIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
399
401
  renderInlineMarkdown(item.title),
400
402
  /* @__PURE__ */ jsx7(
401
403
  ChevronDown2,
402
404
  {
403
405
  className: cmMerge3(
404
- "h-4 w-4 shrink-0 transition-transform duration-200",
406
+ "size-4 shrink-0 transition-transform duration-200",
405
407
  isMegaMenuItemActive ? "rotate-180" : "rotate-0"
406
408
  )
407
409
  }
@@ -420,7 +422,7 @@ var LandingPageNavbar = ({
420
422
  className: "btn btn-ghost btn-sm text-base lg:text-lg lg:min-w-30 px-2 whitespace-nowrap tracking-tight",
421
423
  children: [
422
424
  "Search",
423
- /* @__PURE__ */ jsx7(TextSearch2, { className: "h-4 w-4" })
425
+ /* @__PURE__ */ jsx7(TextSearch2, { className: "size-4" })
424
426
  ]
425
427
  }
426
428
  ) }) : null
@@ -433,8 +435,27 @@ var LandingPageNavbar_default = LandingPageNavbar;
433
435
 
434
436
  // src/runtime/client/components/Navbar/MegaMenu.tsx
435
437
  import { cmMerge as cmMerge4 } from "@classmatejs/react";
436
- import { useEffect as useEffect2, useState as useState2 } from "react";
438
+ import { useEffect as useEffect2, useMemo, useState as useState2 } from "react";
439
+ import { usePageContext } from "vike-react/usePageContext";
437
440
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
441
+ var findActiveItemId = (section, currentHref) => {
442
+ if (!section) {
443
+ return void 0;
444
+ }
445
+ for (const item of section.items) {
446
+ if (item.href === currentHref) {
447
+ return item.id;
448
+ }
449
+ if (item.kind === "group") {
450
+ for (const child of item.items) {
451
+ if (child.href === currentHref) {
452
+ return child.id;
453
+ }
454
+ }
455
+ }
456
+ }
457
+ return void 0;
458
+ };
438
459
  var MegaMenu = ({
439
460
  isActive,
440
461
  onOpen,
@@ -444,9 +465,18 @@ var MegaMenu = ({
444
465
  hoveredSectionId,
445
466
  isLandingPage
446
467
  }) => {
468
+ const docs = useDocsGlobalContext();
469
+ const { urlPathname } = usePageContext();
447
470
  const visibleSectionId = hoveredSectionId ?? activeSectionId ?? sections[0]?.id;
448
471
  const [visibleSectionElement, setVisibleSectionElement] = useState2(null);
449
472
  const [contentHeight, setContentHeight] = useState2(0);
473
+ const activeItemId = useMemo(
474
+ () => findActiveItemId(
475
+ sections.find((section) => section.id === visibleSectionId),
476
+ urlPathname
477
+ ),
478
+ [sections, visibleSectionId, urlPathname]
479
+ );
450
480
  useEffect2(() => {
451
481
  if (!isActive || !visibleSectionId || visibleSectionElement === null) {
452
482
  return;
@@ -486,8 +516,8 @@ var MegaMenu = ({
486
516
  "div",
487
517
  {
488
518
  className: cmMerge4(
489
- "relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300",
490
- isLandingPage && !isActive ? "" : "border-b border-base-muted-light ease-out"
519
+ "relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300 ease-out",
520
+ !isLandingPage && isActive ? "" : "border-b border-base-muted-light"
491
521
  ),
492
522
  style: { height: isActive ? contentHeight : 0 },
493
523
  children: /* @__PURE__ */ jsx8(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx8(
@@ -505,19 +535,52 @@ var MegaMenu = ({
505
535
  section.id === visibleSectionId ? "opacity-100" : "opacity-0 pointer-events-none",
506
536
  "transition-all absolute w-full duration-300"
507
537
  ),
508
- children: section.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "mt-2 flex ", children: section.items.map(
509
- (child) => child.showInNav !== false && /* @__PURE__ */ jsxs6("li", { className: "flex-1 py-3 mb-6 px-4", children: [
510
- child.href ? /* @__PURE__ */ jsx8(
538
+ children: section.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "mt-2 flex ", children: section.items.map((child) => {
539
+ if (child.showInNav === false) {
540
+ return null;
541
+ }
542
+ const ChildIcon = docs.docsIconMap[getDocsIconMapKey(child.kind, child.id)];
543
+ return /* @__PURE__ */ jsxs6("li", { className: "flex-1 py-3 mb-6 px-4", children: [
544
+ child.href ? /* @__PURE__ */ jsxs6(
511
545
  "a",
512
546
  {
513
- className: "mb-4 block text-lg font-semibold tracking-tight",
547
+ className: cmMerge4(
548
+ "mb-4 flex items-center gap-2 text-lg font-semibold tracking-tight",
549
+ activeItemId === child.id && "text-primary!"
550
+ ),
514
551
  href: withSiteBaseUrl(child.href),
515
- children: child.title
552
+ children: [
553
+ ChildIcon ? /* @__PURE__ */ jsx8(ChildIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
554
+ /* @__PURE__ */ jsx8("span", { children: child.title })
555
+ ]
516
556
  }
517
- ) : /* @__PURE__ */ jsx8("span", { className: "mb-4 block text-lg font-semibold tracking-tight", children: child.title }),
518
- child.kind === "group" && child.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "menu border-l border-base-muted-light py-0 w-full", children: child.items.map((subChild) => /* @__PURE__ */ jsx8("li", { children: subChild.href ? /* @__PURE__ */ jsx8("a", { href: withSiteBaseUrl(subChild.href), onClick: onClose, children: renderInlineMarkdown(subChild.title) }) : /* @__PURE__ */ jsx8("span", { children: renderInlineMarkdown(subChild.title) }) }, subChild.id)) })
519
- ] }, child.id)
520
- ) })
557
+ ) : /* @__PURE__ */ jsxs6("span", { className: "mb-4 flex items-center gap-2 text-lg font-semibold tracking-tight", children: [
558
+ ChildIcon ? /* @__PURE__ */ jsx8(ChildIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
559
+ /* @__PURE__ */ jsx8("span", { children: child.title })
560
+ ] }),
561
+ child.kind === "group" && child.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "menu border-l border-base-muted-light py-0 w-full", children: child.items.map((subChild) => {
562
+ const SubChildIcon = docs.docsIconMap[getDocsIconMapKey(subChild.kind, subChild.id)];
563
+ return /* @__PURE__ */ jsx8("li", { children: subChild.href ? /* @__PURE__ */ jsx8(
564
+ "a",
565
+ {
566
+ className: cmMerge4(
567
+ "text-base-muted hover:text-base-content",
568
+ activeItemId === subChild.id && "text-primary! font-semibold"
569
+ ),
570
+ href: withSiteBaseUrl(subChild.href),
571
+ onClick: onClose,
572
+ children: /* @__PURE__ */ jsxs6("span", { className: "flex items-center gap-2", children: [
573
+ SubChildIcon ? /* @__PURE__ */ jsx8(SubChildIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
574
+ /* @__PURE__ */ jsx8("span", { children: renderInlineMarkdown(subChild.title) })
575
+ ] })
576
+ }
577
+ ) : /* @__PURE__ */ jsxs6("span", { className: "flex items-center gap-2", children: [
578
+ SubChildIcon ? /* @__PURE__ */ jsx8(SubChildIcon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
579
+ /* @__PURE__ */ jsx8("span", { children: renderInlineMarkdown(subChild.title) })
580
+ ] }) }, subChild.id);
581
+ }) })
582
+ ] }, child.id);
583
+ }) })
521
584
  },
522
585
  section.id
523
586
  ))
@@ -611,33 +674,17 @@ var useMegaMenu_default = useMegaMenu;
611
674
 
612
675
  // src/runtime/client/components/Navbar/index.tsx
613
676
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
614
- var LARGE_SCREEN_MEDIA_QUERY = "(min-width: 1024px)";
615
677
  var NavbarNew = () => {
616
678
  const docs = useDocsGlobalContext();
617
- const { urlPathname, urlParsed } = usePageContext();
679
+ const { urlPathname, urlParsed } = usePageContext2();
618
680
  const isLandingPage = urlParsed.pathname === "/";
619
681
  const sections = docs.sidebarSections;
620
682
  const activeSection = getActiveSectionByPathname(docs, urlPathname);
621
683
  const { toggle: toggleSearch } = useDocsSearchActions();
622
- const [isLargeScreen, setIsLargeScreen] = useState4(false);
623
684
  const { closeMegaMenu, hoveredSectionId, isMegaMenuOpen, openMegaMenu, scheduleMegaMenuOpen, scheduleMegaMenuClose } = useMegaMenu_default({
624
685
  activeSectionId: activeSection?.id,
625
686
  sections
626
687
  });
627
- useEffect4(() => {
628
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
629
- return;
630
- }
631
- const mediaQueryList = window.matchMedia(LARGE_SCREEN_MEDIA_QUERY);
632
- const updateLargeScreenState = () => {
633
- setIsLargeScreen(mediaQueryList.matches);
634
- };
635
- updateLargeScreenState();
636
- mediaQueryList.addEventListener("change", updateLargeScreenState);
637
- return () => {
638
- mediaQueryList.removeEventListener("change", updateLargeScreenState);
639
- };
640
- }, []);
641
688
  return /* @__PURE__ */ jsxs7(StyledNavbar, { $border: isLandingPage, children: [
642
689
  /* @__PURE__ */ jsx9(LayoutComponent, { children: isLandingPage ? /* @__PURE__ */ jsx9(
643
690
  LandingPageNavbar_default,
@@ -664,7 +711,7 @@ var NavbarNew = () => {
664
711
  }
665
712
  ) }),
666
713
  /* @__PURE__ */ jsx9(Search, {}),
667
- isLargeScreen ? /* @__PURE__ */ jsx9(
714
+ /* @__PURE__ */ jsx9(
668
715
  MegaMenu,
669
716
  {
670
717
  sections,
@@ -675,7 +722,7 @@ var NavbarNew = () => {
675
722
  onClose: scheduleMegaMenuClose,
676
723
  isLandingPage
677
724
  }
678
- ) : null
725
+ )
679
726
  ] });
680
727
  };
681
728
  var Navbar_default = NavbarNew;
@@ -686,18 +733,18 @@ var StyledNavbar = cm3.header`
686
733
  `;
687
734
 
688
735
  // src/runtime/client/components/UserSettingsSync.tsx
689
- import { useEffect as useEffect5, useMemo } from "react";
736
+ import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
690
737
  var UserSettingsSync = ({ theme }) => {
691
738
  const themePreference = useDocsUserSettingsStore((state) => state.themePreference);
692
739
  const lightTheme = theme?.light ?? "consumer-light";
693
740
  const darkTheme = theme?.dark ?? "consumer-dark";
694
741
  const defaultThemePreference = theme?.defaultPreference ?? "light";
695
- const resolvedTheme = useMemo(
742
+ const resolvedTheme = useMemo2(
696
743
  () => ({ light: lightTheme, dark: darkTheme, defaultPreference: defaultThemePreference }),
697
744
  [darkTheme, defaultThemePreference, lightTheme]
698
745
  );
699
746
  const effectiveThemePreference = resolveThemePreference(themePreference, resolvedTheme);
700
- useEffect5(() => {
747
+ useEffect4(() => {
701
748
  applyThemePreference(effectiveThemePreference, resolvedTheme);
702
749
  }, [effectiveThemePreference, resolvedTheme]);
703
750
  return null;
@@ -707,8 +754,8 @@ var UserSettingsSync = ({ theme }) => {
707
754
  import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
708
755
  var runtimeStore = createDocsRuntimeStore();
709
756
  var AppLayout = ({ children, header }) => {
710
- const { urlPathname } = usePageContext2();
711
- const pageContext = usePageContext2();
757
+ const { urlPathname } = usePageContext3();
758
+ const pageContext = usePageContext3();
712
759
  const docs = getDocsFromGlobalContext(pageContext);
713
760
  const isLandingPage = urlPathname === "/";
714
761
  return /* @__PURE__ */ jsx10(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsxs8(DocsGlobalContextProvider, { docs, children: [
@@ -868,9 +915,9 @@ var PaginationCard = ({ item, direction, isOffset }) => {
868
915
  isPrevious ? "justify-start" : "justify-end"
869
916
  ),
870
917
  children: [
871
- isPrevious && /* @__PURE__ */ jsx15(ChevronLeft, { className: "h-4 w-4" }),
918
+ isPrevious && /* @__PURE__ */ jsx15(ChevronLeft, { className: "size-4" }),
872
919
  /* @__PURE__ */ jsx15("span", { children: isPrevious ? "Previous" : "Next" }),
873
- !isPrevious && /* @__PURE__ */ jsx15(ChevronRight, { className: "h-4 w-4" })
920
+ !isPrevious && /* @__PURE__ */ jsx15(ChevronRight, { className: "size-4" })
874
921
  ]
875
922
  }
876
923
  )
@@ -906,11 +953,11 @@ var DocsFooter = memo2(() => {
906
953
  return /* @__PURE__ */ jsxs13("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
907
954
  /* @__PURE__ */ jsxs13("div", { className: "mb-16 flex items-center gap-2", children: [
908
955
  /* @__PURE__ */ jsxs13("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
909
- /* @__PURE__ */ jsx16(Pencil, { className: "w-3 h-3" }),
956
+ /* @__PURE__ */ jsx16(Pencil, { className: "size-3" }),
910
957
  " Edit this page"
911
958
  ] }),
912
959
  /* @__PURE__ */ jsxs13("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
913
- /* @__PURE__ */ jsx16(Bug, { className: "w-3 h-3" }),
960
+ /* @__PURE__ */ jsx16(Bug, { className: "size-3" }),
914
961
  " Report Issue"
915
962
  ] })
916
963
  ] }),
@@ -922,7 +969,7 @@ var DocsFooter = memo2(() => {
922
969
  });
923
970
 
924
971
  // src/runtime/client/components/HeadingLinkCopy.tsx
925
- import { useEffect as useEffect6 } from "react";
972
+ import { useEffect as useEffect5 } from "react";
926
973
  var copyText = async (value) => {
927
974
  try {
928
975
  await navigator.clipboard.writeText(value);
@@ -941,7 +988,7 @@ var copyText = async (value) => {
941
988
  };
942
989
  var getHeadingLink = (target) => target instanceof Element ? target.closest("a[data-copy-heading-link]") : null;
943
990
  var HeadingLinkCopy = () => {
944
- useEffect6(() => {
991
+ useEffect5(() => {
945
992
  const handleClick = (event) => {
946
993
  if (event.defaultPrevented || event.button !== 0) {
947
994
  return;
@@ -973,8 +1020,8 @@ var HeadingLinkCopy = () => {
973
1020
 
974
1021
  // src/runtime/client/components/Sidebar.tsx
975
1022
  import { cmMerge as cmMerge7 } from "@classmatejs/react";
976
- import { memo as memo3, useEffect as useEffect7, useRef as useRef2 } from "react";
977
- import { usePageContext as usePageContext3 } from "vike-react/usePageContext";
1023
+ import { memo as memo3, useEffect as useEffect6, useRef as useRef2 } from "react";
1024
+ import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
978
1025
 
979
1026
  // src/runtime/client/components/docsNavigation.ts
980
1027
  var containsActiveHref = (items, currentHref) => {
@@ -1007,7 +1054,7 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1007
1054
  const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
1008
1055
  const { setNodeOpen } = useDocsSidebarActions();
1009
1056
  const isOpen = storedOpen === void 0 ? isOpenByDefault || hasActiveDescendant : storedOpen || hasActiveDescendant;
1010
- useEffect7(() => {
1057
+ useEffect6(() => {
1011
1058
  if (hasActiveDescendant) {
1012
1059
  setNodeOpen(nodeId, true);
1013
1060
  return;
@@ -1021,7 +1068,7 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1021
1068
  setIsOpen: (nextOpen) => setNodeOpen(nodeId, nextOpen)
1022
1069
  };
1023
1070
  };
1024
- var SidebarPageLink = ({ title, href, currentHref }) => {
1071
+ var SidebarPageLink = ({ title, href, currentHref, icon: Icon }) => {
1025
1072
  return /* @__PURE__ */ jsx17("li", { className: "rounded-none", children: /* @__PURE__ */ jsx17(
1026
1073
  "a",
1027
1074
  {
@@ -1030,24 +1077,33 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
1030
1077
  "text-base-muted hover:text-base-content justify-start hover:bg-base-200",
1031
1078
  href === currentHref && "text-primary! font-semibold bg-base-200"
1032
1079
  ),
1033
- children: renderInlineMarkdown(title, { codeClassName: "text-sm!" })
1080
+ children: /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-2", children: [
1081
+ Icon ? /* @__PURE__ */ jsx17(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
1082
+ /* @__PURE__ */ jsx17("span", { children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) })
1083
+ ] })
1034
1084
  }
1035
1085
  ) });
1036
1086
  };
1037
- var SidebarGroupDivider = ({ title }) => {
1038
- return /* @__PURE__ */ jsx17("li", { className: "ml-3 mt-2 mb-2 border-b border-base-muted-light text-xs text-base-muted-medium pointer-events-none font-semibold", children: /* @__PURE__ */ jsx17("span", { className: "-ml-3", children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) }) });
1087
+ var SidebarGroupDivider = ({ title, icon: Icon }) => {
1088
+ return /* @__PURE__ */ jsx17("li", { className: "ml-3 mt-2 mb-2 border-b border-base-muted-light text-xs text-base-muted-medium pointer-events-none font-semibold", children: /* @__PURE__ */ jsxs14("span", { className: "-ml-3 flex items-center gap-2", children: [
1089
+ Icon ? /* @__PURE__ */ jsx17(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
1090
+ /* @__PURE__ */ jsx17("span", { children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) })
1091
+ ] }) });
1039
1092
  };
1040
- var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) => {
1041
- const content = /* @__PURE__ */ jsx17(
1042
- "span",
1043
- {
1044
- className: cmMerge7(
1045
- allowNavigation ? "font-medium" : "font-semibold",
1046
- isActive && allowNavigation && "text-primary!"
1047
- ),
1048
- children: title ? renderInlineMarkdown(title, { codeClassName: "text-sm!" }) : null
1049
- }
1050
- );
1093
+ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false, icon: Icon }) => {
1094
+ const content = /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-2", children: [
1095
+ Icon ? /* @__PURE__ */ jsx17(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
1096
+ /* @__PURE__ */ jsx17(
1097
+ "span",
1098
+ {
1099
+ className: cmMerge7(
1100
+ allowNavigation ? "font-medium" : "font-semibold",
1101
+ isActive && allowNavigation && "text-primary!"
1102
+ ),
1103
+ children: title ? renderInlineMarkdown(title, { codeClassName: "text-sm!" }) : null
1104
+ }
1105
+ )
1106
+ ] });
1051
1107
  if (allowNavigation && href) {
1052
1108
  return /* @__PURE__ */ jsx17(
1053
1109
  "a",
@@ -1063,32 +1119,42 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1063
1119
  }
1064
1120
  return /* @__PURE__ */ jsx17("span", { className: "flex items-center gap-2 text-base-content", children: content });
1065
1121
  };
1066
- var renderSidebarItems = (items, currentHref) => {
1122
+ var renderSidebarItems = (items, currentHref, docsIconMap) => {
1067
1123
  return items.map((item) => {
1068
1124
  if (item.kind === "page") {
1069
- return /* @__PURE__ */ jsx17(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
1125
+ return /* @__PURE__ */ jsx17(
1126
+ SidebarPageLink,
1127
+ {
1128
+ title: item.navTitle,
1129
+ href: item.href,
1130
+ currentHref,
1131
+ icon: docsIconMap[getDocsIconMapKey("page", item.id)]
1132
+ },
1133
+ item.id
1134
+ );
1070
1135
  }
1071
- return /* @__PURE__ */ jsx17(SidebarNestedGroup, { group: item, currentHref }, item.id);
1136
+ return /* @__PURE__ */ jsx17(SidebarNestedGroup, { group: item, currentHref, docsIconMap }, item.id);
1072
1137
  });
1073
1138
  };
1074
- var SidebarItemList = ({ items, currentHref }) => {
1139
+ var SidebarItemList = ({ items, currentHref, docsIconMap }) => {
1075
1140
  const visibleItems = getVisibleNavItems(items);
1076
- return /* @__PURE__ */ jsx17("ul", { className: "menu lg:w-[97%]", children: renderSidebarItems(visibleItems, currentHref) });
1141
+ return /* @__PURE__ */ jsx17("ul", { className: "menu lg:w-[97%]", children: renderSidebarItems(visibleItems, currentHref, docsIconMap) });
1077
1142
  };
1078
- var SidebarNestedGroup = ({ group, currentHref }) => {
1143
+ var SidebarNestedGroup = ({ group, currentHref, docsIconMap }) => {
1079
1144
  const groupHref = getGroupHref(group);
1080
1145
  const visibleItems = getVisibleGroupItems(group);
1081
1146
  const isCollapsible = group.collapsible !== void 0;
1082
1147
  const isOpenByDefault = group.collapsible?.isDefaultOpen ?? true;
1083
1148
  const nestedHasActiveItem = groupHref === currentHref || hasActiveItem(group.items, currentHref);
1084
1149
  const { isOpen, setIsOpen } = useAutoOpenDetails(`group:${group.id}`, isOpenByDefault, nestedHasActiveItem);
1150
+ const GroupIcon = docsIconMap[getDocsIconMapKey("group", group.id)];
1085
1151
  if (!isCollapsible) {
1086
1152
  if (!group.title) {
1087
- return /* @__PURE__ */ jsx17(Fragment4, { children: renderSidebarItems(visibleItems, currentHref) });
1153
+ return /* @__PURE__ */ jsx17(Fragment4, { children: renderSidebarItems(visibleItems, currentHref, docsIconMap) });
1088
1154
  }
1089
1155
  return /* @__PURE__ */ jsxs14(Fragment4, { children: [
1090
- /* @__PURE__ */ jsx17(SidebarGroupDivider, { title: group.title }),
1091
- renderSidebarItems(visibleItems, currentHref)
1156
+ /* @__PURE__ */ jsx17(SidebarGroupDivider, { title: group.title, icon: GroupIcon }),
1157
+ renderSidebarItems(visibleItems, currentHref, docsIconMap)
1092
1158
  ] });
1093
1159
  }
1094
1160
  return /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsxs14(
@@ -1105,15 +1171,18 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1105
1171
  title: group.title,
1106
1172
  href: groupHref ?? void 0,
1107
1173
  isActive: nestedHasActiveItem,
1108
- allowNavigation: Boolean(groupHref)
1174
+ allowNavigation: Boolean(groupHref),
1175
+ icon: GroupIcon
1109
1176
  }
1110
1177
  ) }),
1111
- visibleItems.length > 0 ? /* @__PURE__ */ jsx17(SidebarItemList, { items: visibleItems, currentHref }) : null
1178
+ visibleItems.length > 0 ? /* @__PURE__ */ jsx17(SidebarItemList, { items: visibleItems, currentHref, docsIconMap }) : null
1112
1179
  ]
1113
1180
  }
1114
1181
  ) });
1115
1182
  };
1116
1183
  var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1184
+ const docs = useDocsGlobalContext();
1185
+ const SectionIcon = docs.docsIconMap[getDocsIconMapKey("section", section.id)];
1117
1186
  const sectionHasActiveItem = section.id === activeSectionId || containsActiveHref(section.items, currentHref);
1118
1187
  const { isOpen, setIsOpen } = useAutoOpenDetails(
1119
1188
  `section:${section.id}`,
@@ -1128,8 +1197,8 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1128
1197
  setIsOpen(event.currentTarget.open);
1129
1198
  },
1130
1199
  children: [
1131
- /* @__PURE__ */ jsx17("summary", { children: /* @__PURE__ */ jsx17(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1132
- /* @__PURE__ */ jsx17(SidebarItemList, { items: section.items, currentHref })
1200
+ /* @__PURE__ */ jsx17("summary", { children: /* @__PURE__ */ jsx17(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem, icon: SectionIcon }) }),
1201
+ /* @__PURE__ */ jsx17(SidebarItemList, { items: section.items, currentHref, docsIconMap: docs.docsIconMap })
1133
1202
  ]
1134
1203
  }
1135
1204
  ) });
@@ -1137,7 +1206,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1137
1206
  var Sidebar = memo3(
1138
1207
  ({ currentHref: currentHrefProp = "", activeSectionId: activeSectionIdProp = "" }) => {
1139
1208
  const scrollContainerRef = useRef2(null);
1140
- const { urlPathname } = usePageContext3();
1209
+ const { urlPathname } = usePageContext4();
1141
1210
  const currentHref = currentHrefProp || urlPathname;
1142
1211
  const docs = useDocsGlobalContext();
1143
1212
  const activeSectionId = activeSectionIdProp || getActiveSectionByPathname(docs, currentHref)?.id || "";
@@ -1180,7 +1249,7 @@ var TableOfContents = ({
1180
1249
  return /* @__PURE__ */ jsx18("aside", { className: cmMerge8(effectiveTableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx18("div", { className: "sticky top-14", children: /* @__PURE__ */ jsxs15("div", { className: "relative h-[calc(100svh-14*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1181
1250
  effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs15(Fragment5, { children: [
1182
1251
  /* @__PURE__ */ jsxs15("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1183
- /* @__PURE__ */ jsx18(TableOfContentsIcon, { className: "h-3 w-3" }),
1252
+ /* @__PURE__ */ jsx18(TableOfContentsIcon, { className: "size-3" }),
1184
1253
  "On this page"
1185
1254
  ] }),
1186
1255
  /* @__PURE__ */ jsx18("nav", { "aria-label": "On this page", className: "mb-12", children: /* @__PURE__ */ jsx18("ul", { children: effectiveHeadings.map((heading) => /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsx18(
@@ -1207,7 +1276,7 @@ var Adbar = ({ partners }) => {
1207
1276
  }
1208
1277
  return /* @__PURE__ */ jsxs15("aside", { children: [
1209
1278
  /* @__PURE__ */ jsxs15("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1210
- /* @__PURE__ */ jsx18(Flame, { className: "h-3 w-3" }),
1279
+ /* @__PURE__ */ jsx18(Flame, { className: "size-3" }),
1211
1280
  "Partners"
1212
1281
  ] }),
1213
1282
  /* @__PURE__ */ jsxs15("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
@@ -1225,12 +1294,12 @@ var PartnerLogo = ({
1225
1294
  {
1226
1295
  src: partner.logoLight,
1227
1296
  width: 200,
1228
- height: 100,
1297
+ height: 200,
1229
1298
  alt: partner.logoAlt,
1230
1299
  className: cmMerge8("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1231
1300
  }
1232
1301
  ),
1233
- partner.logoDark ? /* @__PURE__ */ jsx18(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1302
+ partner.logoDark ? /* @__PURE__ */ jsx18(Image, { src: partner.logoDark, width: 200, height: 200, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1234
1303
  ] });
1235
1304
  };
1236
1305
  var AdbarItem = cm5.div`
@@ -1253,11 +1322,13 @@ var AdbarLink = cm5.a`
1253
1322
  var Image = cm5.img`
1254
1323
  mx-auto
1255
1324
  w-24
1325
+ h-auto
1256
1326
  `;
1257
1327
 
1258
1328
  // src/runtime/client/components/TableOfContentsMobile.tsx
1259
1329
  import cm6 from "@classmatejs/react";
1260
1330
  import { TableOfContents as TableOfContents2 } from "lucide-react";
1331
+ import { useId } from "react";
1261
1332
 
1262
1333
  // src/runtime/client/components/BreadcrumbSidebarTrigger.tsx
1263
1334
  import { ChevronLast, ChevronsRight } from "lucide-react";
@@ -1298,9 +1369,9 @@ var BreadcrumbSidebarTrigger = ({ currentHref }) => {
1298
1369
  alert("TODO: Open mobile menu");
1299
1370
  }, []);
1300
1371
  return /* @__PURE__ */ jsx19("button", { className: "cursor-pointer min-w-0 max-w-full hidden md:block", type: "button", onClick: handleClick, children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center gap-1 min-w-0 overflow-hidden lg:hidden", children: [
1301
- /* @__PURE__ */ jsx19(ChevronLast, { className: "w-4 h-4 shrink-0 text-primary" }),
1372
+ /* @__PURE__ */ jsx19(ChevronLast, { className: "size-4 shrink-0 text-primary" }),
1302
1373
  /* @__PURE__ */ jsx19("span", { className: "hidden md:flex items-center gap-1", children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs16("span", { className: "contents", children: [
1303
- index > 0 ? /* @__PURE__ */ jsx19(ChevronsRight, { className: "w-4 h-4 shrink-0 text-base-muted-medium" }) : null,
1374
+ index > 0 ? /* @__PURE__ */ jsx19(ChevronsRight, { className: "size-4 shrink-0 text-base-muted-medium" }) : null,
1304
1375
  /* @__PURE__ */ jsx19("span", { className: index === 0 ? "font-semibold truncate" : "text-sm truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
1305
1376
  ] }, item.id)) })
1306
1377
  ] }) });
@@ -1318,17 +1389,21 @@ var TableOfContentsMobile = ({
1318
1389
  setActiveHeadingId = () => void 0
1319
1390
  }) => {
1320
1391
  const topOptionValue = "__docs-page-top__";
1392
+ const selectId = useId();
1393
+ const labelId = `${selectId}-label`;
1321
1394
  const selectedValue = tableOfContents && headings.some((heading) => heading.id === activeHeadingId) ? activeHeadingId : "";
1322
1395
  return /* @__PURE__ */ jsxs17(Fragment6, { children: [
1323
1396
  /* @__PURE__ */ jsx20("div", { className: "h-12 xl:hidden" }),
1324
1397
  /* @__PURE__ */ jsx20(StyledTOC, { children: /* @__PURE__ */ jsxs17(StyledTOCInner, { children: [
1325
1398
  /* @__PURE__ */ jsx20(BreadcrumbSidebarTrigger_default, { currentHref }),
1326
- /* @__PURE__ */ jsxs17("label", { className: "select select-sm md:w-80 w-full", htmlFor: "table-of-contents-select", children: [
1327
- /* @__PURE__ */ jsx20("span", { className: "label flex", children: /* @__PURE__ */ jsx20(TableOfContents2, { className: "w-4 h-4" }) }),
1399
+ /* @__PURE__ */ jsxs17("label", { className: "select select-sm md:w-80 w-full", htmlFor: selectId, children: [
1400
+ /* @__PURE__ */ jsx20("span", { id: labelId, className: "sr-only", children: pageTitle }),
1401
+ /* @__PURE__ */ jsx20("span", { className: "label flex", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(TableOfContents2, { className: "size-4" }) }),
1328
1402
  /* @__PURE__ */ jsxs17(
1329
1403
  "select",
1330
1404
  {
1331
- id: "table-of-contents-select",
1405
+ id: selectId,
1406
+ "aria-labelledby": labelId,
1332
1407
  value: selectedValue || topOptionValue,
1333
1408
  onChange: (e) => {
1334
1409
  const value = e.target.value;
@@ -1368,7 +1443,7 @@ var StyledTOCInner = cm6.div`
1368
1443
  `;
1369
1444
 
1370
1445
  // src/runtime/client/components/useTableOfContentsState.ts
1371
- import { useEffect as useEffect8, useState as useState5 } from "react";
1446
+ import { useEffect as useEffect7, useState as useState4 } from "react";
1372
1447
  var getCurrentHash = () => {
1373
1448
  try {
1374
1449
  return decodeURIComponent(window.location.hash);
@@ -1450,10 +1525,10 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1450
1525
  var useTableOfContentsState = ({
1451
1526
  headings: routeHeadings = []
1452
1527
  }) => {
1453
- const [activeHeadingId, setActiveHeadingId] = useState5("");
1454
- const [domHeadings, setDomHeadings] = useState5(routeHeadings);
1528
+ const [activeHeadingId, setActiveHeadingId] = useState4("");
1529
+ const [domHeadings, setDomHeadings] = useState4(routeHeadings);
1455
1530
  const effectiveHeadings = domHeadings.length > 0 ? domHeadings : routeHeadings;
1456
- useEffect8(() => {
1531
+ useEffect7(() => {
1457
1532
  let scrollFrame = 0;
1458
1533
  const syncActiveHeading = () => {
1459
1534
  if (scrollFrame) {
@@ -1489,7 +1564,7 @@ var useTableOfContentsState = ({
1489
1564
  window.removeEventListener("resize", syncActiveHeading);
1490
1565
  };
1491
1566
  }, []);
1492
- useEffect8(() => {
1567
+ useEffect7(() => {
1493
1568
  if (typeof window === "undefined") {
1494
1569
  return;
1495
1570
  }
@@ -1555,7 +1630,7 @@ var DocsLayout = ({ children }) => {
1555
1630
 
1556
1631
  // src/runtime/client/DocsPage.tsx
1557
1632
  import { useData as useData2 } from "vike-react/useData";
1558
- import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
1633
+ import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
1559
1634
 
1560
1635
  // src/runtime/client/getMdxRuntimeValue.tsx
1561
1636
  var isExternalHref = (href) => {
@@ -1653,7 +1728,7 @@ var getMdxRuntimeValue = (options) => {
1653
1728
  // src/runtime/client/DocsPage.tsx
1654
1729
  import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1655
1730
  var DocsPage = ({ Content }) => {
1656
- const pageContext = usePageContext4();
1731
+ const pageContext = usePageContext5();
1657
1732
  const docs = useDocsGlobalContext();
1658
1733
  const { page } = useData2();
1659
1734
  return /* @__PURE__ */ jsx22(
@@ -1682,4 +1757,4 @@ export {
1682
1757
  DocsLayout,
1683
1758
  DocsPage
1684
1759
  };
1685
- //# sourceMappingURL=chunk-SH5XWPXW.js.map
1760
+ //# sourceMappingURL=chunk-AQJQDMKW.js.map