@unterberg/nivel 0.1.2 → 0.1.4

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.
@@ -17,14 +17,15 @@ import {
17
17
  } from "./chunk-NDJ5LYLK.js";
18
18
 
19
19
  // src/runtime/client/AppLayout.tsx
20
+ import { cmMerge as cmMerge5 } from "@classmatejs/react";
20
21
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
21
- import { useState as useState5 } from "react";
22
+ import { useState as useState4 } from "react";
22
23
  import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
23
24
 
24
25
  // src/runtime/client/components/Navbar/index.tsx
25
26
  import cm2, { cmMerge as cmMerge4 } from "@classmatejs/react";
26
27
  import { ChevronDown, TextSearch } from "lucide-react";
27
- import { useCallback, useEffect as useEffect4, useMemo, useRef as useRef2, useState as useState4 } from "react";
28
+ import { useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
28
29
  import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
29
30
 
30
31
  // src/runtime/client/docsGlobalContext.ts
@@ -49,6 +50,10 @@ var defaultDocsSearchState = {
49
50
  isOpen: false,
50
51
  query: ""
51
52
  };
53
+ var defaultDocsSidebarState = {
54
+ openNodes: {},
55
+ scrollTop: 0
56
+ };
52
57
  var createDocsRuntimeStore = () => {
53
58
  return createStore()((set) => {
54
59
  const searchActions = {
@@ -103,9 +108,38 @@ var createDocsRuntimeStore = () => {
103
108
  };
104
109
  })
105
110
  };
111
+ const sidebarActions = {
112
+ setNodeOpen: (nodeId, isOpen) => set((state) => {
113
+ if (state.sidebarState.openNodes[nodeId] === isOpen) {
114
+ return state;
115
+ }
116
+ return {
117
+ sidebarState: {
118
+ ...state.sidebarState,
119
+ openNodes: {
120
+ ...state.sidebarState.openNodes,
121
+ [nodeId]: isOpen
122
+ }
123
+ }
124
+ };
125
+ }),
126
+ setScrollTop: (scrollTop) => set((state) => {
127
+ if (state.sidebarState.scrollTop === scrollTop) {
128
+ return state;
129
+ }
130
+ return {
131
+ sidebarState: {
132
+ ...state.sidebarState,
133
+ scrollTop
134
+ }
135
+ };
136
+ })
137
+ };
106
138
  return {
107
139
  searchActions,
108
- searchState: defaultDocsSearchState
140
+ searchState: defaultDocsSearchState,
141
+ sidebarActions,
142
+ sidebarState: defaultDocsSidebarState
109
143
  };
110
144
  });
111
145
  };
@@ -134,6 +168,17 @@ var useDocsSearchStore = (selector) => {
134
168
  var useDocsSearchActions = () => {
135
169
  return useDocsRuntimeStore((state) => state.searchActions);
136
170
  };
171
+ var useDocsSidebarStore = (selector) => {
172
+ return useDocsRuntimeStore(
173
+ (state) => selector({
174
+ ...state.sidebarState,
175
+ ...state.sidebarActions
176
+ })
177
+ );
178
+ };
179
+ var useDocsSidebarActions = () => {
180
+ return useDocsRuntimeStore((state) => state.sidebarActions);
181
+ };
137
182
 
138
183
  // src/runtime/client/components/Brand.tsx
139
184
  import { cmMerge } from "@classmatejs/react";
@@ -650,7 +695,7 @@ var ThemeSwitch = ({ theme }) => {
650
695
  );
651
696
  };
652
697
 
653
- // src/runtime/client/components/Navbar/MegaMenu/index.tsx
698
+ // src/runtime/client/components/Navbar/MegaMenu.tsx
654
699
  import { cmMerge as cmMerge3 } from "@classmatejs/react";
655
700
  import { useEffect as useEffect2, useState as useState2 } from "react";
656
701
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -660,7 +705,8 @@ var MegaMenu = ({
660
705
  onClose,
661
706
  sections,
662
707
  activeSectionId,
663
- hoveredSectionId
708
+ hoveredSectionId,
709
+ isLandingPage
664
710
  }) => {
665
711
  const visibleSectionId = hoveredSectionId ?? activeSectionId ?? sections[0]?.id;
666
712
  const [visibleSectionElement, setVisibleSectionElement] = useState2(null);
@@ -709,7 +755,8 @@ var MegaMenu = ({
709
755
  "div",
710
756
  {
711
757
  className: cmMerge3(
712
- "relative z-4 overflow-hidden bg-base-100 transition-[height] duration-300 ease-out border-b border-base-muted-light"
758
+ "relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300",
759
+ isLandingPage && !isActive ? "" : "border-b border-base-muted-light ease-out"
713
760
  ),
714
761
  style: { height: isActive ? contentHeight : 0 },
715
762
  children: /* @__PURE__ */ jsx6(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx6(
@@ -753,46 +800,18 @@ var MegaMenu = ({
753
800
  );
754
801
  };
755
802
 
756
- // src/runtime/client/components/Navbar/useNavbarScroll.ts
757
- import { useEffect as useEffect3, useState as useState3 } from "react";
758
- var useNavbarScroll = (isLandingPage) => {
759
- const [isLandingPageScrolled, setIsLandingPageScrolled] = useState3(false);
760
- useEffect3(() => {
761
- if (!isLandingPage) {
762
- setIsLandingPageScrolled(false);
763
- return;
764
- }
765
- const handleScroll = () => {
766
- setIsLandingPageScrolled(window.scrollY > 20);
767
- };
768
- handleScroll();
769
- window.addEventListener("scroll", handleScroll, { passive: true });
770
- return () => {
771
- window.removeEventListener("scroll", handleScroll);
772
- };
773
- }, [isLandingPage]);
774
- return {
775
- isLandingPageScrolled
776
- };
777
- };
778
-
779
803
  // src/runtime/client/components/Navbar/index.tsx
780
804
  import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
781
805
  var Navbar = ({ brand, navbarItems, theme, sections }) => {
782
806
  const { urlPathname } = usePageContext4();
783
807
  const isLandingPage = urlPathname === "/";
784
- const { isLandingPageScrolled } = useNavbarScroll(isLandingPage);
785
- const [isMegaMenuOpen, setIsMegaMenuOpen] = useState4(false);
808
+ const [isMegaMenuOpen, setIsMegaMenuOpen] = useState3(false);
786
809
  const megaMenuCloseTimeoutRef = useRef2(null);
787
810
  const pageContext = usePageContext4();
788
811
  const docs = getDocsGlobalContext(pageContext);
789
812
  const activeSection = getActiveSectionByPathname(docs, pageContext.urlPathname);
790
- const [hoveredSectionId, setHoveredSectionId] = useState4(activeSection?.id ?? sections[0]?.id);
813
+ const [hoveredSectionId, setHoveredSectionId] = useState3(activeSection?.id ?? sections[0]?.id);
791
814
  const { toggle: toggleSearch } = useDocsSearchActions();
792
- const showChrome = useMemo(
793
- () => !isLandingPage || isLandingPageScrolled || !isMegaMenuOpen,
794
- [isLandingPage, isLandingPageScrolled, isMegaMenuOpen]
795
- );
796
815
  const clearMegaMenuCloseTimeout = useCallback(() => {
797
816
  if (megaMenuCloseTimeoutRef.current === null) {
798
817
  return;
@@ -816,15 +835,15 @@ var Navbar = ({ brand, navbarItems, theme, sections }) => {
816
835
  megaMenuCloseTimeoutRef.current = window.setTimeout(() => {
817
836
  setIsMegaMenuOpen(false);
818
837
  megaMenuCloseTimeoutRef.current = null;
819
- }, 120);
838
+ }, 140);
820
839
  };
821
- useEffect4(() => {
840
+ useEffect3(() => {
822
841
  return () => {
823
842
  clearMegaMenuCloseTimeout();
824
843
  };
825
844
  }, [clearMegaMenuCloseTimeout]);
826
845
  return /* @__PURE__ */ jsxs5(Fragment2, { children: [
827
- /* @__PURE__ */ jsx7(StyledNavbar, { $border: showChrome, children: /* @__PURE__ */ jsx7(LayoutComponent, { className: "h-full", children: isLandingPage ? /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
846
+ /* @__PURE__ */ jsx7(StyledNavbar, { $border: isLandingPage, children: /* @__PURE__ */ jsx7(LayoutComponent, { className: "h-full", children: isLandingPage ? /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
828
847
  /* @__PURE__ */ jsx7("div", { className: "flex flex-1 items-center gap-4", children: /* @__PURE__ */ jsx7(Brand, { brand }) }),
829
848
  /* @__PURE__ */ jsx7(
830
849
  "nav",
@@ -915,17 +934,19 @@ var Navbar = ({ brand, navbarItems, theme, sections }) => {
915
934
  hoveredSectionId,
916
935
  isActive: isMegaMenuOpen,
917
936
  onOpen: openMegaMenu,
918
- onClose: scheduleMegaMenuClose
937
+ onClose: scheduleMegaMenuClose,
938
+ isLandingPage
919
939
  }
920
940
  )
921
941
  ] });
922
942
  };
923
943
  var StyledNavbar = cm2.header`
924
- fixed top-0 left-0 z-20 h-16 w-full bg-base-100
944
+ top-0 left-0 z-20 h-16 w-full bg-base-100
945
+ ${({ $border }) => $border ? "relative" : "fixed"}
925
946
  `;
926
947
 
927
948
  // src/runtime/client/components/UserSettingsSync.tsx
928
- import { useEffect as useEffect5 } from "react";
949
+ import { useEffect as useEffect4 } from "react";
929
950
  var UserSettingsSync = ({ theme }) => {
930
951
  const themePreference = useDocsUserSettingsStore((state) => state.themePreference);
931
952
  const lightTheme = theme?.light ?? "consumer-light";
@@ -933,7 +954,7 @@ var UserSettingsSync = ({ theme }) => {
933
954
  const defaultThemePreference = theme?.defaultPreference ?? "light";
934
955
  const resolvedTheme = { light: lightTheme, dark: darkTheme, defaultPreference: defaultThemePreference };
935
956
  const effectiveThemePreference = resolveThemePreference(themePreference, resolvedTheme);
936
- useEffect5(() => {
957
+ useEffect4(() => {
937
958
  applyThemePreference(effectiveThemePreference, resolvedTheme);
938
959
  }, [darkTheme, defaultThemePreference, effectiveThemePreference, lightTheme]);
939
960
  return null;
@@ -942,10 +963,12 @@ var UserSettingsSync = ({ theme }) => {
942
963
  // src/runtime/client/AppLayout.tsx
943
964
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
944
965
  var AppLayout = ({ children }) => {
966
+ const { urlPathname } = usePageContext5();
945
967
  const pageContext = usePageContext5();
946
968
  const docs = getDocsGlobalContext(pageContext);
947
- const [docsRuntimeStore] = useState5(() => createDocsRuntimeStore());
948
- const [queryClient] = useState5(() => new QueryClient());
969
+ const isLandingPage = urlPathname === "/";
970
+ const [docsRuntimeStore] = useState4(() => createDocsRuntimeStore());
971
+ const [queryClient] = useState4(() => new QueryClient());
949
972
  return /* @__PURE__ */ jsx8(DocsRuntimeStoreProvider, { store: docsRuntimeStore, children: /* @__PURE__ */ jsxs6(QueryClientProvider, { client: queryClient, children: [
950
973
  /* @__PURE__ */ jsx8(UserSettingsSync, { theme: docs.theme }),
951
974
  /* @__PURE__ */ jsxs6("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
@@ -958,7 +981,7 @@ var AppLayout = ({ children }) => {
958
981
  theme: docs.theme
959
982
  }
960
983
  ),
961
- /* @__PURE__ */ jsx8("div", { className: "pt-16", children })
984
+ /* @__PURE__ */ jsx8("div", { className: cmMerge5(isLandingPage ? "" : "pt-16"), children })
962
985
  ] })
963
986
  ] }) });
964
987
  };
@@ -1059,7 +1082,7 @@ import { useData as useData2 } from "vike-react/useData";
1059
1082
  import { usePageContext as usePageContext6 } from "vike-react/usePageContext";
1060
1083
 
1061
1084
  // src/runtime/client/components/DocsPagination.tsx
1062
- import { cmMerge as cmMerge5 } from "@classmatejs/react";
1085
+ import { cmMerge as cmMerge6 } from "@classmatejs/react";
1063
1086
  import { ChevronLeft, ChevronRight } from "lucide-react";
1064
1087
  import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1065
1088
  var PaginationCard = ({ item, direction, isOffset }) => {
@@ -1068,7 +1091,7 @@ var PaginationCard = ({ item, direction, isOffset }) => {
1068
1091
  "a",
1069
1092
  {
1070
1093
  href: withSiteBaseUrl(item.href),
1071
- className: cmMerge5(
1094
+ className: cmMerge6(
1072
1095
  "group rounded-box border border-base-muted-light bg-base-100 p-5 no-underline hover:border-primary-muted-medium hover:bg-base-200",
1073
1096
  isPrevious ? "text-left" : "text-right",
1074
1097
  isOffset && "sm:col-start-2"
@@ -1079,7 +1102,7 @@ var PaginationCard = ({ item, direction, isOffset }) => {
1079
1102
  /* @__PURE__ */ jsxs10(
1080
1103
  "div",
1081
1104
  {
1082
- className: cmMerge5(
1105
+ className: cmMerge6(
1083
1106
  "flex items-center gap-1 text-base-muted group-hover:text-base-content",
1084
1107
  isPrevious ? "justify-start" : "justify-end"
1085
1108
  ),
@@ -1126,10 +1149,59 @@ var DocsFooter = ({ brand }) => {
1126
1149
  ] });
1127
1150
  };
1128
1151
 
1152
+ // src/runtime/client/components/HeadingLinkCopy.tsx
1153
+ import { useEffect as useEffect5 } from "react";
1154
+ var copyText = async (value) => {
1155
+ try {
1156
+ await navigator.clipboard.writeText(value);
1157
+ return;
1158
+ } catch {
1159
+ const textarea = document.createElement("textarea");
1160
+ textarea.value = value;
1161
+ textarea.setAttribute("readonly", "true");
1162
+ textarea.style.position = "fixed";
1163
+ textarea.style.opacity = "0";
1164
+ document.body.appendChild(textarea);
1165
+ textarea.select();
1166
+ document.execCommand("copy");
1167
+ document.body.removeChild(textarea);
1168
+ }
1169
+ };
1170
+ var getHeadingLink = (target) => target instanceof Element ? target.closest("a[data-copy-heading-link]") : null;
1171
+ var HeadingLinkCopy = () => {
1172
+ useEffect5(() => {
1173
+ const handleClick = (event) => {
1174
+ if (event.defaultPrevented || event.button !== 0) {
1175
+ return;
1176
+ }
1177
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
1178
+ return;
1179
+ }
1180
+ const link = getHeadingLink(event.target);
1181
+ if (!link) {
1182
+ return;
1183
+ }
1184
+ const href = link.getAttribute("href");
1185
+ if (!href) {
1186
+ return;
1187
+ }
1188
+ const nextUrl = new URL(href, window.location.href);
1189
+ if (nextUrl.hash && window.location.hash !== nextUrl.hash) {
1190
+ history.replaceState(null, "", nextUrl.hash);
1191
+ }
1192
+ void copyText(nextUrl.href);
1193
+ };
1194
+ document.addEventListener("click", handleClick);
1195
+ return () => {
1196
+ document.removeEventListener("click", handleClick);
1197
+ };
1198
+ }, []);
1199
+ return null;
1200
+ };
1201
+
1129
1202
  // src/runtime/client/components/Sidebar.tsx
1130
- import { cmMerge as cmMerge6 } from "@classmatejs/react";
1131
- import { useEffect as useEffect6 } from "react";
1132
- import { create as create2 } from "zustand";
1203
+ import { cmMerge as cmMerge7 } from "@classmatejs/react";
1204
+ import { useEffect as useEffect6, useRef as useRef3 } from "react";
1133
1205
 
1134
1206
  // src/runtime/client/components/docsNavigation.ts
1135
1207
  var containsActiveHref = (items, currentHref) => {
@@ -1158,23 +1230,9 @@ var getGroupHref = (group) => group.href ?? null;
1158
1230
 
1159
1231
  // src/runtime/client/components/Sidebar.tsx
1160
1232
  import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1161
- var useSidebarDisclosureStore = create2()((set) => ({
1162
- openNodes: {},
1163
- setNodeOpen: (nodeId, isOpen) => set((state) => {
1164
- if (state.openNodes[nodeId] === isOpen) {
1165
- return state;
1166
- }
1167
- return {
1168
- openNodes: {
1169
- ...state.openNodes,
1170
- [nodeId]: isOpen
1171
- }
1172
- };
1173
- })
1174
- }));
1175
1233
  var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1176
- const storedOpen = useSidebarDisclosureStore((state) => state.openNodes[nodeId]);
1177
- const setNodeOpen = useSidebarDisclosureStore((state) => state.setNodeOpen);
1234
+ const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
1235
+ const { setNodeOpen } = useDocsSidebarActions();
1178
1236
  const isOpen = storedOpen === void 0 ? isOpenByDefault || hasActiveDescendant : storedOpen || hasActiveDescendant;
1179
1237
  useEffect6(() => {
1180
1238
  if (hasActiveDescendant) {
@@ -1195,7 +1253,7 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
1195
1253
  "a",
1196
1254
  {
1197
1255
  href: withSiteBaseUrl(href),
1198
- className: cmMerge6(
1256
+ className: cmMerge7(
1199
1257
  "text-base-muted hover:text-base-content justify-start hover:bg-base-200",
1200
1258
  href === currentHref && "text-primary! font-semibold bg-base-200"
1201
1259
  ),
@@ -1210,7 +1268,7 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1210
1268
  const content = /* @__PURE__ */ jsx15(
1211
1269
  "span",
1212
1270
  {
1213
- className: cmMerge6(
1271
+ className: cmMerge7(
1214
1272
  allowNavigation ? "font-medium" : "font-semibold",
1215
1273
  isActive && allowNavigation && "text-primary!"
1216
1274
  ),
@@ -1222,7 +1280,7 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1222
1280
  "a",
1223
1281
  {
1224
1282
  href: withSiteBaseUrl(href),
1225
- className: cmMerge6(
1283
+ className: cmMerge7(
1226
1284
  "flex items-center gap-2 text-base-muted hover:text-base-content no-underline",
1227
1285
  isActive && "text-primary! font-semibold"
1228
1286
  ),
@@ -1304,24 +1362,44 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1304
1362
  ) });
1305
1363
  };
1306
1364
  var Sidebar = ({ sections, activeSectionId, currentHref, horizontal }) => {
1365
+ const scrollContainerRef = useRef3(null);
1366
+ const scrollTop = useDocsSidebarStore((state) => state.scrollTop);
1367
+ const { setScrollTop } = useDocsSidebarActions();
1368
+ useEffect6(() => {
1369
+ const scrollContainer = scrollContainerRef.current;
1370
+ if (!scrollContainer || scrollContainer.scrollTop === scrollTop) {
1371
+ return;
1372
+ }
1373
+ scrollContainer.scrollTop = scrollTop;
1374
+ }, [scrollTop]);
1307
1375
  return /* @__PURE__ */ jsx15("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs12("div", { className: "-ml-3 sticky top-16", children: [
1308
1376
  /* @__PURE__ */ jsx15("div", { className: "absolute h-full w-px right-0 top-0 bg-linear-to-t to-base-muted-light via-base-muted-light pointer-events-none z-1" }),
1309
- /* @__PURE__ */ jsx15("div", { className: "pr-4 h-[calc(100svh-16*var(--spacing))] overflow-y-scroll overflow-x-hidden relative z-10", children: /* @__PURE__ */ jsx15("ul", { className: cmMerge6("menu w-full px-0 py-5 li:last-child:border-0"), children: sections.map((section) => /* @__PURE__ */ jsx15(
1310
- SidebarSectionGroup,
1377
+ /* @__PURE__ */ jsx15(
1378
+ "div",
1311
1379
  {
1312
- section,
1313
- currentHref,
1314
- activeSectionId
1315
- },
1316
- section.id
1317
- )) }) })
1380
+ ref: scrollContainerRef,
1381
+ className: "pr-4 h-[calc(100svh-16*var(--spacing))] overflow-y-scroll overflow-x-hidden relative z-10",
1382
+ onScroll: (event) => {
1383
+ setScrollTop(event.currentTarget.scrollTop);
1384
+ },
1385
+ children: /* @__PURE__ */ jsx15("ul", { className: cmMerge7("menu w-full px-0 py-5 li:last-child:border-0"), children: sections.map((section) => /* @__PURE__ */ jsx15(
1386
+ SidebarSectionGroup,
1387
+ {
1388
+ section,
1389
+ currentHref,
1390
+ activeSectionId
1391
+ },
1392
+ section.id
1393
+ )) })
1394
+ }
1395
+ )
1318
1396
  ] }) });
1319
1397
  };
1320
1398
 
1321
1399
  // src/runtime/client/components/TableOfContents.tsx
1322
- import cm4, { cmMerge as cmMerge7 } from "@classmatejs/react";
1400
+ import cm4, { cmMerge as cmMerge8 } from "@classmatejs/react";
1323
1401
  import { TableOfContentsIcon } from "lucide-react";
1324
- import { useEffect as useEffect7, useState as useState6 } from "react";
1402
+ import { useEffect as useEffect7, useState as useState5 } from "react";
1325
1403
  import { useData } from "vike-react/useData";
1326
1404
  import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1327
1405
  var getCurrentHash = () => {
@@ -1402,8 +1480,8 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1402
1480
  setActiveHeadingId(nextActiveHeadingId);
1403
1481
  };
1404
1482
  var TableOfContents = ({ headings, partners }) => {
1405
- const [activeHeadingId, setActiveHeadingId] = useState6("");
1406
- const [domHeadings, setDomHeadings] = useState6(headings);
1483
+ const [activeHeadingId, setActiveHeadingId] = useState5("");
1484
+ const [domHeadings, setDomHeadings] = useState5(headings);
1407
1485
  const effectiveHeadings = domHeadings.length > 0 ? domHeadings : headings;
1408
1486
  const { page } = useData();
1409
1487
  useEffect7(() => {
@@ -1458,7 +1536,7 @@ var TableOfContents = ({ headings, partners }) => {
1458
1536
  updateActiveHeadingFromScroll(setActiveHeadingId);
1459
1537
  });
1460
1538
  }, [headings]);
1461
- return /* @__PURE__ */ jsx16("aside", { className: cmMerge7(page.tableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx16("div", { className: "sticky top-16", children: /* @__PURE__ */ jsxs13("div", { className: "relative h-[calc(100svh-16*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1539
+ return /* @__PURE__ */ jsx16("aside", { className: cmMerge8(page.tableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx16("div", { className: "sticky top-16", children: /* @__PURE__ */ jsxs13("div", { className: "relative h-[calc(100svh-16*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1462
1540
  page.tableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs13(Fragment7, { children: [
1463
1541
  /* @__PURE__ */ jsxs13("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1464
1542
  /* @__PURE__ */ jsx16(TableOfContentsIcon, { className: "h-3 w-3" }),
@@ -1470,7 +1548,7 @@ var TableOfContents = ({ headings, partners }) => {
1470
1548
  href: `#${heading.id}`,
1471
1549
  "aria-current": activeHeadingId === heading.id ? "location" : void 0,
1472
1550
  onClick: () => setActiveHeadingId(heading.id),
1473
- className: cmMerge7(
1551
+ className: cmMerge8(
1474
1552
  "cursor-pointer block border-l border-base-muted-light py-1.5 text-sm text-base-muted hover:border-primary-muted hover:text-base-content",
1475
1553
  heading.depth > 2 ? "pl-6" : "pl-4",
1476
1554
  activeHeadingId ? activeHeadingId === heading.id ? "border-l-2 border-primary font-semibold text-base-content" : "" : index === 0 ? "border-l-2 border-primary font-semibold text-base-content" : ""
@@ -1514,7 +1592,7 @@ var PartnerLogo = ({
1514
1592
  width: 200,
1515
1593
  height: 100,
1516
1594
  alt: partner.logoAlt,
1517
- className: cmMerge7("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1595
+ className: cmMerge8("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1518
1596
  }
1519
1597
  ),
1520
1598
  partner.logoDark ? /* @__PURE__ */ jsx16(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
@@ -1649,7 +1727,8 @@ var DocsPage = ({ Content }) => {
1649
1727
  currentPathname: pageContext.urlPathname
1650
1728
  }),
1651
1729
  children: [
1652
- /* @__PURE__ */ jsx17("div", { className: "absolute top-0 left-0 w-full h-[60svh] bg-radial-[at_65%_-85%] from-primary-muted-light to-65%" }),
1730
+ /* @__PURE__ */ jsx17(HeadingLinkCopy, {}),
1731
+ /* @__PURE__ */ jsx17("div", { className: "absolute top-0 left-0 w-full h-[60svh] bg-radial-[at_65%_-85%] from-primary-muted-light/40 dark:from-primary-muted-light/60 to-65%" }),
1653
1732
  /* @__PURE__ */ jsx17(LayoutComponent, { children: /* @__PURE__ */ jsxs14("div", { className: "lg:flex lg:gap-10 xl:gap-14", children: [
1654
1733
  /* @__PURE__ */ jsx17(Sidebar, { sections: docs.sidebarSections, activeSectionId: page.sectionId, currentHref: page.href }),
1655
1734
  /* @__PURE__ */ jsxs14("main", { className: "mt-10 min-w-0 flex-1 basis-auto shrink", children: [
@@ -1670,6 +1749,8 @@ var DocsPage = ({ Content }) => {
1670
1749
  export {
1671
1750
  useDocsSearchStore,
1672
1751
  useDocsSearchActions,
1752
+ useDocsSidebarStore,
1753
+ useDocsSidebarActions,
1673
1754
  LayoutComponent,
1674
1755
  useDocsUserSettingsStore,
1675
1756
  DEFAULT_THEME_PREFERENCE,
@@ -1680,4 +1761,4 @@ export {
1680
1761
  ProseContainer,
1681
1762
  DocsPage
1682
1763
  };
1683
- //# sourceMappingURL=chunk-RJMKSYUK.js.map
1764
+ //# sourceMappingURL=chunk-5NW6G3SG.js.map