boltdocs 1.6.0 → 1.7.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 (51) hide show
  1. package/dist/{SearchDialog-3QICRMWF.css → SearchDialog-UOAW6IR3.css} +270 -113
  2. package/dist/{SearchDialog-J3KNRGNO.mjs → SearchDialog-YOXMFGH6.mjs} +1 -1
  3. package/dist/{chunk-HSPDIRTW.mjs → chunk-MULKZFVN.mjs} +872 -758
  4. package/dist/client/index.css +270 -113
  5. package/dist/client/index.d.mts +21 -7
  6. package/dist/client/index.d.ts +21 -7
  7. package/dist/client/index.js +637 -499
  8. package/dist/client/index.mjs +17 -1
  9. package/dist/client/ssr.css +270 -113
  10. package/dist/client/ssr.d.mts +3 -1
  11. package/dist/client/ssr.d.ts +3 -1
  12. package/dist/client/ssr.js +533 -412
  13. package/dist/client/ssr.mjs +3 -2
  14. package/dist/{config-DkZg5aCf.d.ts → config-D68h41CA.d.mts} +21 -2
  15. package/dist/{config-DkZg5aCf.d.mts → config-D68h41CA.d.ts} +21 -2
  16. package/dist/node/index.d.mts +10 -2
  17. package/dist/node/index.d.ts +10 -2
  18. package/dist/node/index.js +45 -21
  19. package/dist/node/index.mjs +45 -21
  20. package/dist/{types-DGIo1VKD.d.mts → types-CviV0GbX.d.mts} +13 -0
  21. package/dist/{types-DGIo1VKD.d.ts → types-CviV0GbX.d.ts} +13 -0
  22. package/package.json +1 -1
  23. package/src/client/app/index.tsx +8 -4
  24. package/src/client/index.ts +2 -0
  25. package/src/client/ssr.tsx +4 -1
  26. package/src/client/theme/components/mdx/Table.tsx +53 -0
  27. package/src/client/theme/components/mdx/index.ts +3 -0
  28. package/src/client/theme/components/mdx/mdx-components.css +49 -0
  29. package/src/client/theme/styles/markdown.css +8 -3
  30. package/src/client/theme/styles/variables.css +10 -9
  31. package/src/client/theme/ui/Layout/Layout.tsx +2 -10
  32. package/src/client/theme/ui/Layout/base.css +15 -3
  33. package/src/client/theme/ui/Link/Link.tsx +2 -2
  34. package/src/client/theme/ui/Link/LinkPreview.tsx +9 -14
  35. package/src/client/theme/ui/Link/link-preview.css +30 -27
  36. package/src/client/theme/ui/Navbar/Navbar.tsx +65 -17
  37. package/src/client/theme/ui/Navbar/Tabs.tsx +74 -0
  38. package/src/client/theme/ui/Navbar/navbar.css +111 -5
  39. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +65 -49
  40. package/src/client/theme/ui/OnThisPage/toc.css +30 -10
  41. package/src/client/theme/ui/Sidebar/Sidebar.tsx +97 -57
  42. package/src/client/theme/ui/Sidebar/sidebar.css +61 -67
  43. package/src/client/types.ts +10 -0
  44. package/src/node/config.ts +19 -1
  45. package/src/node/plugin/entry.ts +5 -1
  46. package/src/node/plugin/index.ts +2 -1
  47. package/src/node/routes/index.ts +12 -1
  48. package/src/node/routes/parser.ts +21 -7
  49. package/src/node/routes/types.ts +9 -1
  50. package/src/node/ssg/index.ts +2 -1
  51. package/src/node/ssg/options.ts +2 -0
@@ -88,30 +88,25 @@ function LinkPreview({
88
88
  x,
89
89
  y
90
90
  }) {
91
- const [mounted, setMounted] = (0, import_react2.useState)(false);
92
91
  const ref = (0, import_react2.useRef)(null);
93
92
  const [position, setPosition] = (0, import_react2.useState)({ top: 0, left: 0 });
94
93
  (0, import_react2.useEffect)(() => {
95
- setMounted(true);
96
- }, []);
97
- (0, import_react2.useEffect)(() => {
98
- if (isVisible && ref.current) {
94
+ if (ref.current) {
99
95
  const rect = ref.current.getBoundingClientRect();
100
- const padding = 15;
96
+ const padding = 12;
101
97
  let top = y + padding;
102
98
  let left = x + padding;
103
- if (left + rect.width > window.innerWidth) {
99
+ if (left + rect.width > window.innerWidth - 20) {
104
100
  left = x - rect.width - padding;
105
101
  }
106
- if (top + rect.height > window.innerHeight) {
102
+ if (top + rect.height > window.innerHeight - 20) {
107
103
  top = y - rect.height - padding;
108
104
  }
109
105
  setPosition({ top, left });
110
106
  }
111
- }, [isVisible, x, y]);
112
- if (!mounted) return null;
107
+ }, [x, y, isVisible]);
113
108
  return (0, import_react_dom.createPortal)(
114
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
109
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
115
110
  "div",
116
111
  {
117
112
  ref,
@@ -120,10 +115,10 @@ function LinkPreview({
120
115
  top: position.top,
121
116
  left: position.left
122
117
  },
123
- children: [
118
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "boltdocs-link-preview-content", children: [
124
119
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "boltdocs-link-preview-title", children: title }),
125
120
  summary && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "boltdocs-link-preview-summary", children: summary })
126
- ]
121
+ ] })
127
122
  }
128
123
  ),
129
124
  document.body
@@ -293,7 +288,7 @@ var init_Link = __esm({
293
288
  ...rest
294
289
  }
295
290
  ),
296
- shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
291
+ preview.visible && shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
297
292
  LinkPreview,
298
293
  {
299
294
  isVisible: preview.visible,
@@ -394,7 +389,7 @@ var init_Link = __esm({
394
389
  ...rest
395
390
  }
396
391
  ),
397
- shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
392
+ preview.visible && shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
398
393
  LinkPreview,
399
394
  {
400
395
  isVisible: preview.visible,
@@ -841,6 +836,58 @@ var init_GithubStars = __esm({
841
836
  }
842
837
  });
843
838
 
839
+ // src/client/theme/ui/Navbar/Tabs.tsx
840
+ function Tabs({ tabs, routes }) {
841
+ const location = (0, import_react_router_dom4.useLocation)();
842
+ const currentRoute = routes.find((r) => r.path === location.pathname);
843
+ const currentTabId = currentRoute?.tab?.toLowerCase();
844
+ if (!tabs || tabs.length === 0) return null;
845
+ const renderTabIcon = (iconName) => {
846
+ if (!iconName) return null;
847
+ if (iconName.trim().startsWith("<svg")) {
848
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
849
+ "span",
850
+ {
851
+ className: "tab-icon svg-icon",
852
+ dangerouslySetInnerHTML: { __html: iconName }
853
+ }
854
+ );
855
+ }
856
+ const LucideIcon = Icons[iconName];
857
+ if (LucideIcon) {
858
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LucideIcon, { size: 16, className: "tab-icon lucide-icon" });
859
+ }
860
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: iconName, alt: "", className: "tab-icon img-icon" });
861
+ };
862
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs", children: tabs.map((tab, index) => {
863
+ const isActive = currentTabId ? currentTabId === tab.id.toLowerCase() : index === 0;
864
+ const firstRoute = routes.find((r) => r.tab && r.tab.toLowerCase() === tab.id.toLowerCase());
865
+ const linkTo = firstRoute ? firstRoute.path : "#";
866
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
867
+ Link,
868
+ {
869
+ to: linkTo,
870
+ className: `boltdocs-tab-item ${isActive ? "active" : ""}`,
871
+ children: [
872
+ renderTabIcon(tab.icon),
873
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: tab.text })
874
+ ]
875
+ },
876
+ tab.id
877
+ );
878
+ }) }) });
879
+ }
880
+ var import_react_router_dom4, Icons, import_jsx_runtime11;
881
+ var init_Tabs = __esm({
882
+ "src/client/theme/ui/Navbar/Tabs.tsx"() {
883
+ "use strict";
884
+ import_react_router_dom4 = require("react-router-dom");
885
+ init_Link2();
886
+ Icons = __toESM(require("lucide-react"));
887
+ import_jsx_runtime11 = require("react/jsx-runtime");
888
+ }
889
+ });
890
+
844
891
  // src/client/theme/ui/SearchDialog/SearchDialog.tsx
845
892
  function SearchDialog({ routes }) {
846
893
  const [isOpen, setIsOpen] = (0, import_react8.useState)(false);
@@ -907,8 +954,8 @@ function SearchDialog({ routes }) {
907
954
  }
908
955
  return uniqueResults.slice(0, 10);
909
956
  }, [routes, query]);
910
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
911
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
957
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
958
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
912
959
  "div",
913
960
  {
914
961
  className: "navbar-search",
@@ -923,19 +970,19 @@ function SearchDialog({ routes }) {
923
970
  },
924
971
  "aria-label": "Open search dialog",
925
972
  children: [
926
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
973
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
927
974
  "Search docs...",
928
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("kbd", { children: "\u2318K" })
975
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: "\u2318K" })
929
976
  ]
930
977
  }
931
978
  ),
932
979
  isOpen && (0, import_react_dom2.createPortal)(
933
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
980
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
934
981
  "div",
935
982
  {
936
983
  className: "boltdocs-search-overlay",
937
984
  onPointerDown: () => setIsOpen(false),
938
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
985
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
939
986
  "div",
940
987
  {
941
988
  className: "boltdocs-search-modal",
@@ -944,9 +991,9 @@ function SearchDialog({ routes }) {
944
991
  "aria-label": "Search",
945
992
  onPointerDown: (e) => e.stopPropagation(),
946
993
  children: [
947
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "boltdocs-search-header", children: [
948
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Search, { size: 18 }),
949
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
994
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-header", children: [
995
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { size: 18 }),
996
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
950
997
  "input",
951
998
  {
952
999
  ref: inputRef,
@@ -957,7 +1004,7 @@ function SearchDialog({ routes }) {
957
1004
  onChange: (e) => setQuery(e.target.value)
958
1005
  }
959
1006
  ),
960
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1007
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
961
1008
  "button",
962
1009
  {
963
1010
  className: "boltdocs-search-close",
@@ -967,7 +1014,7 @@ function SearchDialog({ routes }) {
967
1014
  }
968
1015
  )
969
1016
  ] }),
970
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-search-results", children: searchResults.length > 0 ? searchResults.map((result) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1017
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "boltdocs-search-results", children: searchResults.length > 0 ? searchResults.map((result) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
971
1018
  Link,
972
1019
  {
973
1020
  to: result.path === "" ? "/" : result.path,
@@ -994,15 +1041,15 @@ function SearchDialog({ routes }) {
994
1041
  setIsOpen(false);
995
1042
  },
996
1043
  children: [
997
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "boltdocs-search-result-title", children: [
998
- result.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "heading-indicator", children: "#" }) : null,
1044
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "boltdocs-search-result-title", children: [
1045
+ result.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "heading-indicator", children: "#" }) : null,
999
1046
  result.title
1000
1047
  ] }),
1001
- result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
1048
+ result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
1002
1049
  ]
1003
1050
  },
1004
1051
  result.path
1005
- )) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "boltdocs-search-empty", children: [
1052
+ )) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-empty", children: [
1006
1053
  'No results found for "',
1007
1054
  query,
1008
1055
  '"'
@@ -1016,7 +1063,7 @@ function SearchDialog({ routes }) {
1016
1063
  )
1017
1064
  ] });
1018
1065
  }
1019
- var import_react8, import_react_dom2, import_lucide_react4, import_jsx_runtime11;
1066
+ var import_react8, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
1020
1067
  var init_SearchDialog = __esm({
1021
1068
  "src/client/theme/ui/SearchDialog/SearchDialog.tsx"() {
1022
1069
  "use strict";
@@ -1024,7 +1071,7 @@ var init_SearchDialog = __esm({
1024
1071
  import_react_dom2 = require("react-dom");
1025
1072
  init_Link2();
1026
1073
  import_lucide_react4 = require("lucide-react");
1027
- import_jsx_runtime11 = require("react/jsx-runtime");
1074
+ import_jsx_runtime12 = require("react/jsx-runtime");
1028
1075
  }
1029
1076
  });
1030
1077
 
@@ -1048,88 +1095,130 @@ function Navbar({
1048
1095
  currentLocale,
1049
1096
  currentVersion
1050
1097
  }) {
1098
+ const location = (0, import_react_router_dom5.useLocation)();
1099
+ const isHomePage = location.pathname === "/";
1051
1100
  const title = config.themeConfig?.title || "Boltdocs";
1052
1101
  const navItems = config.themeConfig?.navbar || [];
1053
1102
  const socialLinks = config.themeConfig?.socialLinks || [];
1054
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("header", { className: "boltdocs-navbar", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-container", children: [
1055
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-left", children: [
1056
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "navbar-logo", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Link, { to: "/", children: [
1057
- config.themeConfig?.logo ? config.themeConfig.logo.trim().startsWith("<svg") ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1058
- "span",
1059
- {
1060
- className: "navbar-logo-svg",
1061
- dangerouslySetInnerHTML: {
1062
- __html: config.themeConfig.logo
1063
- }
1064
- }
1065
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1066
- "img",
1067
- {
1068
- src: config.themeConfig.logo,
1069
- alt: title,
1070
- className: "navbar-logo-img"
1071
- }
1072
- ) : null,
1073
- title
1074
- ] }) }),
1075
- config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1076
- VersionSwitcher,
1077
- {
1078
- versions: config.versions,
1079
- currentVersion,
1080
- currentLocale,
1081
- allRoutes
1082
- }
1083
- ) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-version", children: [
1084
- config.themeConfig.version,
1085
- " ",
1086
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
1087
- ] }) : null,
1088
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation", children: navItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Link, { to: item.link, children: item.text }, i)) })
1089
- ] }),
1090
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-right", children: [
1091
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1092
- import_react9.default.Suspense,
1093
- {
1094
- fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "navbar-search-placeholder" }),
1095
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SearchDialog2, { routes: routes || [] })
1096
- }
1097
- ),
1098
- config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1099
- LanguageSwitcher,
1103
+ const hasTabs = !isHomePage && config.themeConfig?.tabs && config.themeConfig.tabs.length > 0;
1104
+ const leftItems = navItems.filter((item) => item.position !== "right");
1105
+ const rightItems = navItems.filter((item) => item.position === "right");
1106
+ const renderNavItem = (item, i) => {
1107
+ const text = item.label || item.text || "";
1108
+ const href = item.to || item.href || item.link || "";
1109
+ const isExternal = href.startsWith("http") || href.startsWith("//") || href.includes("://");
1110
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: href, target: isExternal ? "_blank" : void 0, children: [
1111
+ text,
1112
+ isExternal && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "navbar-external-icon", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1113
+ "svg",
1100
1114
  {
1101
- i18n: config.i18n,
1102
- currentLocale,
1103
- allRoutes
1115
+ viewBox: "0 0 24 24",
1116
+ width: "13",
1117
+ height: "13",
1118
+ stroke: "currentColor",
1119
+ strokeWidth: "2",
1120
+ fill: "none",
1121
+ strokeLinecap: "round",
1122
+ strokeLinejoin: "round",
1123
+ children: [
1124
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1125
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "15 3 21 3 21 9" }),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1127
+ ]
1104
1128
  }
1105
- ),
1106
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ThemeToggle, {}),
1107
- config.themeConfig?.githubRepo && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(GithubStars, { repo: config.themeConfig.githubRepo }),
1108
- socialLinks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "navbar-divider" }),
1109
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "navbar-icons", children: socialLinks.map((link, i) => {
1110
- const IconComp = ICON_MAP[link.icon.toLowerCase()];
1111
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1112
- "a",
1113
- {
1114
- href: link.link,
1115
- target: "_blank",
1116
- rel: "noopener noreferrer",
1117
- className: "navbar-icon-btn",
1118
- "aria-label": link.icon,
1119
- children: IconComp ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconComp, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: link.icon })
1120
- },
1121
- i
1122
- );
1123
- }) })
1124
- ] })
1125
- ] }) });
1129
+ ) })
1130
+ ] }, i);
1131
+ };
1132
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: `boltdocs-navbar ${hasTabs ? "has-tabs" : ""}`, children: [
1133
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1134
+ "div",
1135
+ {
1136
+ className: "navbar-container",
1137
+ style: { height: "var(--ld-navbar-height)" },
1138
+ children: [
1139
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-left", children: [
1140
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-logo", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: "/", children: [
1141
+ config.themeConfig?.logo ? config.themeConfig.logo.trim().startsWith("<svg") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1142
+ "span",
1143
+ {
1144
+ className: "navbar-logo-svg",
1145
+ dangerouslySetInnerHTML: {
1146
+ __html: config.themeConfig.logo
1147
+ }
1148
+ }
1149
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1150
+ "img",
1151
+ {
1152
+ src: config.themeConfig.logo,
1153
+ alt: title,
1154
+ className: "navbar-logo-img"
1155
+ }
1156
+ ) : null,
1157
+ title
1158
+ ] }) }),
1159
+ config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1160
+ VersionSwitcher,
1161
+ {
1162
+ versions: config.versions,
1163
+ currentVersion,
1164
+ currentLocale,
1165
+ allRoutes
1166
+ }
1167
+ ) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-version", children: [
1168
+ config.themeConfig.version,
1169
+ " ",
1170
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
1171
+ ] }) : null,
1172
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Left", children: leftItems.map(renderNavItem) })
1173
+ ] }),
1174
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-right", children: [
1175
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Right", children: rightItems.map(renderNavItem) }),
1176
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react9.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-search-placeholder" }), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchDialog2, { routes: routes || [] }) }),
1177
+ config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1178
+ LanguageSwitcher,
1179
+ {
1180
+ i18n: config.i18n,
1181
+ currentLocale,
1182
+ allRoutes
1183
+ }
1184
+ ),
1185
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeToggle, {}),
1186
+ config.themeConfig?.githubRepo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GithubStars, { repo: config.themeConfig.githubRepo }),
1187
+ socialLinks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-divider" }),
1188
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-icons", children: socialLinks.map((link, i) => {
1189
+ const IconComp = ICON_MAP[link.icon.toLowerCase()];
1190
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1191
+ "a",
1192
+ {
1193
+ href: link.link,
1194
+ target: "_blank",
1195
+ rel: "noopener noreferrer",
1196
+ className: "navbar-icon-btn",
1197
+ "aria-label": link.icon,
1198
+ children: IconComp ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComp, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: link.icon })
1199
+ },
1200
+ i
1201
+ );
1202
+ }) })
1203
+ ] })
1204
+ ]
1205
+ }
1206
+ ),
1207
+ hasTabs && config.themeConfig?.tabs && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1208
+ Tabs,
1209
+ {
1210
+ tabs: config.themeConfig.tabs,
1211
+ routes: allRoutes || routes || []
1212
+ }
1213
+ )
1214
+ ] });
1126
1215
  }
1127
- var import_react9, import_lucide_react5, import_jsx_runtime12, SearchDialog2, ICON_MAP;
1216
+ var import_react9, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
1128
1217
  var init_Navbar = __esm({
1129
1218
  "src/client/theme/ui/Navbar/Navbar.tsx"() {
1130
1219
  "use strict";
1131
- import_react9 = __toESM(require("react"));
1132
- init_Link2();
1220
+ import_react9 = require("react");
1221
+ import_react_router_dom5 = require("react-router-dom");
1133
1222
  import_lucide_react5 = require("lucide-react");
1134
1223
  init_LanguageSwitcher2();
1135
1224
  init_VersionSwitcher2();
@@ -1137,8 +1226,9 @@ var init_Navbar = __esm({
1137
1226
  init_discord();
1138
1227
  init_twitter();
1139
1228
  init_GithubStars();
1140
- import_jsx_runtime12 = require("react/jsx-runtime");
1141
- SearchDialog2 = import_react9.default.lazy(
1229
+ init_Tabs();
1230
+ import_jsx_runtime13 = require("react/jsx-runtime");
1231
+ SearchDialog2 = (0, import_react9.lazy)(
1142
1232
  () => Promise.resolve().then(() => (init_SearchDialog2(), SearchDialog_exports)).then((m) => ({ default: m.SearchDialog }))
1143
1233
  );
1144
1234
  ICON_MAP = {
@@ -1159,7 +1249,7 @@ var init_Navbar2 = __esm({
1159
1249
 
1160
1250
  // src/client/theme/ui/PoweredBy/PoweredBy.tsx
1161
1251
  function PoweredBy() {
1162
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1252
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1163
1253
  "a",
1164
1254
  {
1165
1255
  href: "https://github.com/jesusalcaladev/boltdocs",
@@ -1167,19 +1257,19 @@ function PoweredBy() {
1167
1257
  rel: "noopener noreferrer",
1168
1258
  className: "powered-by-link",
1169
1259
  children: [
1170
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Zap, { className: "powered-by-icon", size: 12, fill: "currentColor" }),
1171
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Powered by" }),
1172
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "powered-by-brand", children: "LiteDocs" })
1260
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.Zap, { className: "powered-by-icon", size: 12, fill: "currentColor" }),
1261
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Powered by" }),
1262
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "powered-by-brand", children: "LiteDocs" })
1173
1263
  ]
1174
1264
  }
1175
1265
  ) });
1176
1266
  }
1177
- var import_lucide_react6, import_jsx_runtime13;
1267
+ var import_lucide_react6, import_jsx_runtime14;
1178
1268
  var init_PoweredBy = __esm({
1179
1269
  "src/client/theme/ui/PoweredBy/PoweredBy.tsx"() {
1180
1270
  "use strict";
1181
1271
  import_lucide_react6 = require("lucide-react");
1182
- import_jsx_runtime13 = require("react/jsx-runtime");
1272
+ import_jsx_runtime14 = require("react/jsx-runtime");
1183
1273
  }
1184
1274
  });
1185
1275
 
@@ -1212,7 +1302,6 @@ function renderBadge(badgeRaw) {
1212
1302
  }
1213
1303
  }
1214
1304
  if (!text) return null;
1215
- if (!text) return null;
1216
1305
  let typeClass = "badge-default";
1217
1306
  const lowerText = text.toLowerCase();
1218
1307
  if (lowerText === "new") {
@@ -1222,18 +1311,51 @@ function renderBadge(badgeRaw) {
1222
1311
  } else if (lowerText === "updated") {
1223
1312
  typeClass = "badge-updated";
1224
1313
  }
1225
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
1314
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
1315
+ }
1316
+ function renderIcon(iconName, size = 16) {
1317
+ if (!iconName) return null;
1318
+ const trimmed = iconName.trim();
1319
+ if (trimmed.startsWith("<svg") || trimmed.includes("http")) {
1320
+ if (trimmed.startsWith("<svg")) {
1321
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1322
+ "span",
1323
+ {
1324
+ className: "sidebar-icon svg-icon",
1325
+ dangerouslySetInnerHTML: { __html: trimmed }
1326
+ }
1327
+ );
1328
+ }
1329
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1330
+ "img",
1331
+ {
1332
+ src: trimmed,
1333
+ className: "sidebar-icon",
1334
+ style: { width: size, height: size },
1335
+ alt: ""
1336
+ }
1337
+ );
1338
+ }
1339
+ const IconComponent = LucideIcons[iconName];
1340
+ if (IconComponent) {
1341
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { size, className: "sidebar-icon lucide-icon" });
1342
+ }
1343
+ return null;
1226
1344
  }
1227
1345
  function Sidebar({
1228
1346
  routes,
1229
- config,
1230
- isCollapsed,
1231
- onToggle
1347
+ config
1232
1348
  }) {
1233
- const location = (0, import_react_router_dom4.useLocation)();
1349
+ const location = (0, import_react_router_dom6.useLocation)();
1350
+ const currentRoute = routes.find((r) => r.path === location.pathname);
1351
+ const activeTabId = currentRoute?.tab?.toLowerCase();
1352
+ const filteredRoutes = activeTabId ? routes.filter((r) => {
1353
+ if (!r.tab) return true;
1354
+ return r.tab.toLowerCase() === activeTabId;
1355
+ }) : routes;
1234
1356
  const ungrouped = [];
1235
1357
  const groupMap = /* @__PURE__ */ new Map();
1236
- for (const route of routes) {
1358
+ for (const route of filteredRoutes) {
1237
1359
  if (!route.group) {
1238
1360
  ungrouped.push(route);
1239
1361
  } else {
@@ -1241,49 +1363,41 @@ function Sidebar({
1241
1363
  groupMap.set(route.group, {
1242
1364
  slug: route.group,
1243
1365
  title: route.groupTitle || route.group,
1244
- routes: []
1366
+ routes: [],
1367
+ icon: route.groupIcon
1245
1368
  });
1246
1369
  }
1247
1370
  groupMap.get(route.group).routes.push(route);
1248
1371
  }
1249
1372
  }
1250
1373
  const groups = Array.from(groupMap.values());
1251
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("aside", { className: "boltdocs-sidebar", children: [
1252
- onToggle && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "sidebar-collapse", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1253
- "button",
1254
- {
1255
- className: "sidebar-collapse-btn",
1256
- onClick: onToggle,
1257
- "aria-label": isCollapsed ? "Expand Sidebar" : "Collapse Sidebar",
1258
- title: isCollapsed ? "Expand Sidebar" : "Collapse Sidebar",
1259
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.PanelLeft, { size: 18 })
1260
- }
1261
- ) }),
1262
- !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1263
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("nav", { "aria-label": "Main Navigation", children: [
1264
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "sidebar-list", children: ungrouped.map((route) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1265
- Link,
1266
- {
1267
- to: route.path === "" ? "/" : route.path,
1268
- className: `sidebar-link ${location.pathname === route.path ? "active" : ""}`,
1269
- "aria-current": location.pathname === route.path ? "page" : void 0,
1270
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "sidebar-link-content", children: [
1271
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: route.title }),
1272
- renderBadge(route.badge)
1273
- ] })
1274
- }
1275
- ) }, route.path)) }),
1276
- groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1277
- SidebarGroupSection,
1278
- {
1279
- group,
1280
- currentPath: location.pathname
1281
- },
1282
- group.slug
1283
- ))
1284
- ] }),
1285
- config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PoweredBy, {})
1286
- ] })
1374
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "boltdocs-sidebar", children: [
1375
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { "aria-label": "Main Navigation", children: [
1376
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "sidebar-list", children: ungrouped.map((route) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1377
+ Link,
1378
+ {
1379
+ to: route.path === "" ? "/" : route.path,
1380
+ className: `sidebar-link ${location.pathname === route.path ? "active" : ""}`,
1381
+ "aria-current": location.pathname === route.path ? "page" : void 0,
1382
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
1383
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
1384
+ renderIcon(route.icon),
1385
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
1386
+ ] }),
1387
+ renderBadge(route.badge)
1388
+ ] })
1389
+ }
1390
+ ) }, route.path)) }),
1391
+ groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1392
+ SidebarGroupSection,
1393
+ {
1394
+ group,
1395
+ currentPath: location.pathname
1396
+ },
1397
+ group.slug
1398
+ ))
1399
+ ] }),
1400
+ config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PoweredBy, {})
1287
1401
  ] });
1288
1402
  }
1289
1403
  function SidebarGroupSection({
@@ -1292,8 +1406,8 @@ function SidebarGroupSection({
1292
1406
  }) {
1293
1407
  const isActive = group.routes.some((r) => currentPath === r.path);
1294
1408
  const [open, setOpen] = (0, import_react10.useState)(true);
1295
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "sidebar-group", children: [
1296
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1409
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-group", children: [
1410
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1297
1411
  "button",
1298
1412
  {
1299
1413
  className: `sidebar-group-header ${isActive ? "active" : ""}`,
@@ -1301,35 +1415,39 @@ function SidebarGroupSection({
1301
1415
  "aria-expanded": open,
1302
1416
  "aria-controls": `sidebar-group-${group.slug}`,
1303
1417
  children: [
1304
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sidebar-group-title", children: group.title }),
1305
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `sidebar-group-chevron ${open ? "open" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.ChevronRight, { size: 16 }) })
1418
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sidebar-group-header-content", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sidebar-group-title", children: group.title }) }),
1419
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-group-chevron ${open ? "open" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.ChevronRight, { size: 16 }) })
1306
1420
  ]
1307
1421
  }
1308
1422
  ),
1309
- open && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "sidebar-group-list", id: `sidebar-group-${group.slug}`, children: group.routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1423
+ open && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "sidebar-group-list", id: `sidebar-group-${group.slug}`, children: group.routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1310
1424
  Link,
1311
1425
  {
1312
1426
  to: route.path === "" ? "/" : route.path,
1313
1427
  className: `sidebar-link sidebar-link-nested ${currentPath === route.path ? "active" : ""}`,
1314
1428
  "aria-current": currentPath === route.path ? "page" : void 0,
1315
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "sidebar-link-content", children: [
1316
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: route.title }),
1429
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
1430
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
1431
+ renderIcon(route.icon),
1432
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
1433
+ ] }),
1317
1434
  renderBadge(route.badge)
1318
1435
  ] })
1319
1436
  }
1320
1437
  ) }, route.path)) })
1321
1438
  ] });
1322
1439
  }
1323
- var import_react10, import_react_router_dom4, import_lucide_react7, import_jsx_runtime14;
1440
+ var import_react10, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
1324
1441
  var init_Sidebar = __esm({
1325
1442
  "src/client/theme/ui/Sidebar/Sidebar.tsx"() {
1326
1443
  "use strict";
1327
1444
  import_react10 = require("react");
1328
- import_react_router_dom4 = require("react-router-dom");
1445
+ import_react_router_dom6 = require("react-router-dom");
1329
1446
  init_Link2();
1330
1447
  init_PoweredBy2();
1331
1448
  import_lucide_react7 = require("lucide-react");
1332
- import_jsx_runtime14 = require("react/jsx-runtime");
1449
+ LucideIcons = __toESM(require("lucide-react"));
1450
+ import_jsx_runtime15 = require("react/jsx-runtime");
1333
1451
  }
1334
1452
  });
1335
1453
 
@@ -1348,11 +1466,12 @@ function OnThisPage({
1348
1466
  communityHelp,
1349
1467
  filePath
1350
1468
  }) {
1351
- const [activeId, setActiveId] = (0, import_react11.useState)("");
1469
+ const [activeId, setActiveId] = (0, import_react11.useState)(null);
1352
1470
  const [indicatorStyle, setIndicatorStyle] = (0, import_react11.useState)({});
1353
1471
  const observerRef = (0, import_react11.useRef)(null);
1354
- const location = (0, import_react_router_dom5.useLocation)();
1472
+ const location = (0, import_react_router_dom7.useLocation)();
1355
1473
  const listRef = (0, import_react11.useRef)(null);
1474
+ const visibleIdsRef = (0, import_react11.useRef)(/* @__PURE__ */ new Set());
1356
1475
  (0, import_react11.useEffect)(() => {
1357
1476
  if (headings.length > 0) {
1358
1477
  const hash = window.location.hash.substring(1);
@@ -1365,36 +1484,53 @@ function OnThisPage({
1365
1484
  }, [location.pathname, headings]);
1366
1485
  (0, import_react11.useEffect)(() => {
1367
1486
  if (!activeId || !listRef.current) return;
1368
- const activeElement = listRef.current.querySelector(
1487
+ const activeLink = listRef.current.querySelector(
1369
1488
  `a[href="#${activeId}"]`
1370
1489
  );
1371
- if (activeElement) {
1372
- const { offsetTop, offsetHeight } = activeElement;
1490
+ if (activeLink) {
1491
+ const top = activeLink.offsetTop;
1492
+ const height = activeLink.offsetHeight;
1373
1493
  setIndicatorStyle({
1374
- transform: `translateY(${offsetTop}px)`,
1375
- height: `${offsetHeight}px`,
1494
+ transform: `translateY(${top}px)`,
1495
+ height: `${height}px`,
1376
1496
  opacity: 1
1377
1497
  });
1378
1498
  }
1379
1499
  }, [activeId, headings]);
1380
1500
  (0, import_react11.useEffect)(() => {
1381
1501
  if (headings.length === 0) return;
1502
+ visibleIdsRef.current.clear();
1382
1503
  if (observerRef.current) {
1383
1504
  observerRef.current.disconnect();
1384
1505
  }
1385
1506
  const callback = (entries) => {
1386
- const visibleEntries = entries.filter((entry) => entry.isIntersecting);
1387
- if (visibleEntries.length > 0) {
1388
- const closest = visibleEntries.reduce((prev, curr) => {
1389
- return Math.abs(curr.boundingClientRect.top - 100) < Math.abs(prev.boundingClientRect.top - 100) ? curr : prev;
1390
- });
1391
- setActiveId(closest.target.id);
1507
+ entries.forEach((entry) => {
1508
+ if (entry.isIntersecting) {
1509
+ visibleIdsRef.current.add(entry.target.id);
1510
+ } else {
1511
+ visibleIdsRef.current.delete(entry.target.id);
1512
+ }
1513
+ });
1514
+ const firstVisible = headings.find((h) => visibleIdsRef.current.has(h.id));
1515
+ if (firstVisible) {
1516
+ setActiveId(firstVisible.id);
1517
+ } else {
1518
+ const firstEl = document.getElementById(headings[0].id);
1519
+ if (firstEl) {
1520
+ const rect = firstEl.getBoundingClientRect();
1521
+ if (rect.top > 200) {
1522
+ setActiveId(headings[0].id);
1523
+ return;
1524
+ }
1525
+ }
1392
1526
  }
1393
1527
  };
1394
- observerRef.current = new IntersectionObserver(callback, {
1395
- rootMargin: "-100px 0px -70% 0px",
1528
+ const observerOptions = {
1529
+ root: document.querySelector(".boltdocs-content"),
1530
+ rootMargin: "-20% 0px -70% 0px",
1396
1531
  threshold: [0, 1]
1397
- });
1532
+ };
1533
+ observerRef.current = new IntersectionObserver(callback, observerOptions);
1398
1534
  const observeHeadings = () => {
1399
1535
  headings.forEach(({ id }) => {
1400
1536
  const el = document.getElementById(id);
@@ -1425,16 +1561,14 @@ function OnThisPage({
1425
1561
  `a[href="#${activeId}"]`
1426
1562
  );
1427
1563
  if (activeLink) {
1428
- const container = listRef.current.closest(
1429
- ".boltdocs-on-this-page"
1430
- );
1564
+ const container = listRef.current.parentElement;
1431
1565
  if (!container) return;
1432
1566
  const linkRect = activeLink.getBoundingClientRect();
1433
1567
  const containerRect = container.getBoundingClientRect();
1434
1568
  const isVisible = linkRect.top >= containerRect.top && linkRect.bottom <= containerRect.bottom;
1435
1569
  if (!isVisible) {
1436
1570
  activeLink.scrollIntoView({
1437
- behavior: "smooth",
1571
+ behavior: "auto",
1438
1572
  block: "nearest"
1439
1573
  });
1440
1574
  }
@@ -1461,11 +1595,11 @@ function OnThisPage({
1461
1595
  []
1462
1596
  );
1463
1597
  if (headings.length === 0) return null;
1464
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { className: "boltdocs-on-this-page", "aria-label": "Table of contents", children: [
1465
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "on-this-page-title", children: "On this page" }),
1466
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "on-this-page-container", children: [
1467
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "toc-indicator", style: indicatorStyle }),
1468
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "on-this-page-list", ref: listRef, children: headings.map((h) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { className: h.level === 3 ? "toc-indent" : "", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1598
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "boltdocs-on-this-page", "aria-label": "Table of contents", children: [
1599
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "on-this-page-title", children: "On this page" }),
1600
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "on-this-page-container", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "on-this-page-list-container", children: [
1601
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "toc-indicator", style: indicatorStyle }),
1602
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "on-this-page-list", ref: listRef, children: headings.map((h) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { className: h.level === 3 ? "toc-indent" : "", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1469
1603
  "a",
1470
1604
  {
1471
1605
  href: `#${h.id}`,
@@ -1475,11 +1609,11 @@ function OnThisPage({
1475
1609
  children: h.text
1476
1610
  }
1477
1611
  ) }, h.id)) })
1478
- ] }),
1479
- (editLink || communityHelp) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "toc-help", children: [
1480
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "toc-help-title", children: "Need help?" }),
1481
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("ul", { className: "toc-help-links", children: [
1482
- editLink && filePath && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1612
+ ] }) }),
1613
+ (editLink || communityHelp) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "toc-help", children: [
1614
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "toc-help-title", children: "Need help?" }),
1615
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ul", { className: "toc-help-links", children: [
1616
+ editLink && filePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1483
1617
  "a",
1484
1618
  {
1485
1619
  href: editLink.replace(":path", filePath),
@@ -1487,12 +1621,12 @@ function OnThisPage({
1487
1621
  rel: "noopener noreferrer",
1488
1622
  className: "toc-help-link",
1489
1623
  children: [
1490
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.Pencil, { size: 16 }),
1624
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Pencil, { size: 16 }),
1491
1625
  "Edit this page"
1492
1626
  ]
1493
1627
  }
1494
1628
  ) }),
1495
- communityHelp && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1629
+ communityHelp && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1496
1630
  "a",
1497
1631
  {
1498
1632
  href: communityHelp,
@@ -1500,7 +1634,7 @@ function OnThisPage({
1500
1634
  rel: "noopener noreferrer",
1501
1635
  className: "toc-help-link",
1502
1636
  children: [
1503
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
1637
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
1504
1638
  "Community help"
1505
1639
  ]
1506
1640
  }
@@ -1509,14 +1643,14 @@ function OnThisPage({
1509
1643
  ] })
1510
1644
  ] });
1511
1645
  }
1512
- var import_react11, import_react_router_dom5, import_lucide_react8, import_jsx_runtime15;
1646
+ var import_react11, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
1513
1647
  var init_OnThisPage = __esm({
1514
1648
  "src/client/theme/ui/OnThisPage/OnThisPage.tsx"() {
1515
1649
  "use strict";
1516
1650
  import_react11 = require("react");
1517
- import_react_router_dom5 = require("react-router-dom");
1651
+ import_react_router_dom7 = require("react-router-dom");
1518
1652
  import_lucide_react8 = require("lucide-react");
1519
- import_jsx_runtime15 = require("react/jsx-runtime");
1653
+ import_jsx_runtime16 = require("react/jsx-runtime");
1520
1654
  }
1521
1655
  });
1522
1656
 
@@ -1530,7 +1664,7 @@ var init_OnThisPage2 = __esm({
1530
1664
 
1531
1665
  // src/client/theme/ui/Head/Head.tsx
1532
1666
  function Head({ siteTitle, siteDescription, routes }) {
1533
- const location = (0, import_react_router_dom6.useLocation)();
1667
+ const location = (0, import_react_router_dom8.useLocation)();
1534
1668
  (0, import_react12.useEffect)(() => {
1535
1669
  const currentRoute = routes.find((r) => r.path === location.pathname);
1536
1670
  const pageTitle = currentRoute?.title;
@@ -1575,12 +1709,12 @@ function setMetaTag(attr, key, content) {
1575
1709
  }
1576
1710
  tag.content = content;
1577
1711
  }
1578
- var import_react12, import_react_router_dom6;
1712
+ var import_react12, import_react_router_dom8;
1579
1713
  var init_Head = __esm({
1580
1714
  "src/client/theme/ui/Head/Head.tsx"() {
1581
1715
  "use strict";
1582
1716
  import_react12 = require("react");
1583
- import_react_router_dom6 = require("react-router-dom");
1717
+ import_react_router_dom8 = require("react-router-dom");
1584
1718
  }
1585
1719
  });
1586
1720
 
@@ -1594,21 +1728,21 @@ var init_Head2 = __esm({
1594
1728
 
1595
1729
  // src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx
1596
1730
  function Breadcrumbs({ routes, config }) {
1597
- const location = (0, import_react_router_dom7.useLocation)();
1731
+ const location = (0, import_react_router_dom9.useLocation)();
1598
1732
  if (config.themeConfig?.breadcrumbs === false) return null;
1599
1733
  if (location.pathname === "/") return null;
1600
1734
  const currentRoute = routes.find((r) => r.path === location.pathname);
1601
1735
  const groupRoute = currentRoute?.group ? routes.find((r) => r.group === currentRoute.group) : null;
1602
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { className: "boltdocs-breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ol", { className: "boltdocs-breadcrumbs-list", children: [
1603
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1604
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Link, { to: "/", className: "boltdocs-breadcrumbs-link", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.Home, { size: 14 }) }),
1605
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
1736
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "boltdocs-breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("ol", { className: "boltdocs-breadcrumbs-list", children: [
1737
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1738
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { to: "/", className: "boltdocs-breadcrumbs-link", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.Home, { size: 14 }) }),
1739
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
1606
1740
  ] }),
1607
- currentRoute?.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1608
- groupRoute ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Link, { to: groupRoute.path, className: "boltdocs-breadcrumbs-link", children: currentRoute.groupTitle }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "boltdocs-breadcrumbs-text", children: currentRoute.groupTitle }),
1609
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
1741
+ currentRoute?.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1742
+ groupRoute ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { to: groupRoute.path, className: "boltdocs-breadcrumbs-link", children: currentRoute.groupTitle }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-text", children: currentRoute.groupTitle }),
1743
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
1610
1744
  ] }),
1611
- currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1745
+ currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1612
1746
  "span",
1613
1747
  {
1614
1748
  className: "boltdocs-breadcrumbs-text boltdocs-breadcrumbs-active",
@@ -1618,14 +1752,14 @@ function Breadcrumbs({ routes, config }) {
1618
1752
  ) })
1619
1753
  ] }) });
1620
1754
  }
1621
- var import_react_router_dom7, import_lucide_react9, import_jsx_runtime16;
1755
+ var import_react_router_dom9, import_lucide_react9, import_jsx_runtime17;
1622
1756
  var init_Breadcrumbs = __esm({
1623
1757
  "src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx"() {
1624
1758
  "use strict";
1625
- import_react_router_dom7 = require("react-router-dom");
1759
+ import_react_router_dom9 = require("react-router-dom");
1626
1760
  init_Link2();
1627
1761
  import_lucide_react9 = require("lucide-react");
1628
- import_jsx_runtime16 = require("react/jsx-runtime");
1762
+ import_jsx_runtime17 = require("react/jsx-runtime");
1629
1763
  }
1630
1764
  });
1631
1765
 
@@ -1639,16 +1773,16 @@ var init_Breadcrumbs2 = __esm({
1639
1773
 
1640
1774
  // src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx
1641
1775
  function BackgroundGradient() {
1642
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "boltdocs-background-glow", children: [
1643
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "glow-shape glow-1" }),
1644
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "glow-shape glow-2" })
1776
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "boltdocs-background-glow", children: [
1777
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-1" }),
1778
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-2" })
1645
1779
  ] });
1646
1780
  }
1647
- var import_jsx_runtime17;
1781
+ var import_jsx_runtime18;
1648
1782
  var init_BackgroundGradient = __esm({
1649
1783
  "src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx"() {
1650
1784
  "use strict";
1651
- import_jsx_runtime17 = require("react/jsx-runtime");
1785
+ import_jsx_runtime18 = require("react/jsx-runtime");
1652
1786
  }
1653
1787
  });
1654
1788
 
@@ -1680,10 +1814,9 @@ function ThemeLayout({
1680
1814
  className = "",
1681
1815
  style
1682
1816
  }) {
1683
- const [isSidebarOpen, setIsSidebarOpen] = (0, import_react13.useState)(true);
1684
1817
  const siteTitle = config.themeConfig?.title || "Boltdocs";
1685
1818
  const siteDescription = config.themeConfig?.description || "";
1686
- const location = (0, import_react_router_dom8.useLocation)();
1819
+ const location = (0, import_react_router_dom10.useLocation)();
1687
1820
  const currentIndex = routes.findIndex((r) => r.path === location.pathname);
1688
1821
  const currentRoute = routes[currentIndex];
1689
1822
  const currentLocale = config.i18n ? currentRoute?.locale || config.i18n.defaultLocale : void 0;
@@ -1703,9 +1836,9 @@ function ThemeLayout({
1703
1836
  if (prevPage?.path) preload(prevPage.path);
1704
1837
  if (nextPage?.path) preload(nextPage.path);
1705
1838
  }, [prevPage, nextPage, preload]);
1706
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
1707
- background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BackgroundGradient, {}),
1708
- head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1839
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
1840
+ background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BackgroundGradient, {}),
1841
+ head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1709
1842
  Head,
1710
1843
  {
1711
1844
  siteTitle,
@@ -1713,7 +1846,7 @@ function ThemeLayout({
1713
1846
  routes
1714
1847
  }
1715
1848
  ),
1716
- navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1849
+ navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1717
1850
  Navbar,
1718
1851
  {
1719
1852
  config,
@@ -1723,74 +1856,60 @@ function ThemeLayout({
1723
1856
  currentVersion
1724
1857
  }
1725
1858
  ),
1726
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1727
- "div",
1728
- {
1729
- className: `boltdocs-main-container ${!isSidebarOpen ? "sidebar-collapsed" : ""}`,
1730
- children: [
1731
- sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1732
- Sidebar,
1859
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "boltdocs-main-container", children: [
1860
+ sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sidebar, { routes: filteredRoutes, config }),
1861
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "boltdocs-content", children: [
1862
+ breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
1863
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-page", children }),
1864
+ (prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
1865
+ prevPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1866
+ Link,
1733
1867
  {
1734
- routes: filteredRoutes,
1735
- config,
1736
- isCollapsed: !isSidebarOpen,
1737
- onToggle: () => setIsSidebarOpen(!isSidebarOpen)
1868
+ to: prevPage.path || "/",
1869
+ className: "page-nav-link page-nav-link--prev",
1870
+ children: [
1871
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Previous" }),
1873
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: prevPage.title })
1874
+ ] }),
1875
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
1876
+ ]
1738
1877
  }
1739
- ),
1740
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("main", { className: "boltdocs-content", children: [
1741
- breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
1742
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "boltdocs-page", children }),
1743
- (prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
1744
- prevPage ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1745
- Link,
1746
- {
1747
- to: prevPage.path || "/",
1748
- className: "page-nav-link page-nav-link--prev",
1749
- children: [
1750
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "page-nav-info", children: [
1751
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-label", children: "Previous" }),
1752
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-title", children: prevPage.title })
1753
- ] }),
1754
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
1755
- ]
1756
- }
1757
- ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {}),
1758
- nextPage ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1759
- Link,
1760
- {
1761
- to: nextPage.path || "/",
1762
- className: "page-nav-link page-nav-link--next",
1763
- children: [
1764
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "page-nav-info", children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-label", children: "Next" }),
1766
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-title", children: nextPage.title })
1767
- ] }),
1768
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
1769
- ]
1770
- }
1771
- ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {})
1772
- ] })
1773
- ] }),
1774
- toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1775
- OnThisPage,
1878
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {}),
1879
+ nextPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1880
+ Link,
1776
1881
  {
1777
- headings: routes[currentIndex]?.headings,
1778
- editLink: config.themeConfig?.editLink,
1779
- communityHelp: config.themeConfig?.communityHelp,
1780
- filePath: routes[currentIndex]?.filePath
1882
+ to: nextPage.path || "/",
1883
+ className: "page-nav-link page-nav-link--next",
1884
+ children: [
1885
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Next" }),
1887
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: nextPage.title })
1888
+ ] }),
1889
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
1890
+ ]
1781
1891
  }
1782
- )
1783
- ]
1784
- }
1785
- )
1892
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {})
1893
+ ] })
1894
+ ] }),
1895
+ toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1896
+ OnThisPage,
1897
+ {
1898
+ headings: routes[currentIndex]?.headings,
1899
+ editLink: config.themeConfig?.editLink,
1900
+ communityHelp: config.themeConfig?.communityHelp,
1901
+ filePath: routes[currentIndex]?.filePath
1902
+ }
1903
+ )
1904
+ ] })
1786
1905
  ] });
1787
1906
  }
1788
- var import_react13, import_react_router_dom8, import_lucide_react10, import_jsx_runtime18;
1907
+ var import_react13, import_react_router_dom10, import_lucide_react10, import_jsx_runtime19;
1789
1908
  var init_Layout = __esm({
1790
1909
  "src/client/theme/ui/Layout/Layout.tsx"() {
1791
1910
  "use strict";
1792
1911
  import_react13 = __toESM(require("react"));
1793
- import_react_router_dom8 = require("react-router-dom");
1912
+ import_react_router_dom10 = require("react-router-dom");
1794
1913
  init_Link2();
1795
1914
  import_lucide_react10 = require("lucide-react");
1796
1915
  init_preload();
@@ -1807,7 +1926,7 @@ var init_Layout = __esm({
1807
1926
  init_Breadcrumbs2();
1808
1927
  init_BackgroundGradient2();
1809
1928
  init_styles();
1810
- import_jsx_runtime18 = require("react/jsx-runtime");
1929
+ import_jsx_runtime19 = require("react/jsx-runtime");
1811
1930
  }
1812
1931
  });
1813
1932
 
@@ -1821,23 +1940,23 @@ var init_Layout2 = __esm({
1821
1940
 
1822
1941
  // src/client/theme/ui/NotFound/NotFound.tsx
1823
1942
  function NotFound() {
1824
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "not-found-content", children: [
1825
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "not-found-code", children: "404" }),
1826
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
1827
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
1828
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Link, { to: "/", className: "not-found-link", children: [
1829
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
1943
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "not-found-content", children: [
1944
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "not-found-code", children: "404" }),
1945
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
1946
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
1947
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Link, { to: "/", className: "not-found-link", children: [
1948
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
1830
1949
  " Go to Home"
1831
1950
  ] })
1832
1951
  ] }) });
1833
1952
  }
1834
- var import_lucide_react11, import_jsx_runtime19;
1953
+ var import_lucide_react11, import_jsx_runtime20;
1835
1954
  var init_NotFound = __esm({
1836
1955
  "src/client/theme/ui/NotFound/NotFound.tsx"() {
1837
1956
  "use strict";
1838
1957
  init_Link2();
1839
1958
  import_lucide_react11 = require("lucide-react");
1840
- import_jsx_runtime19 = require("react/jsx-runtime");
1959
+ import_jsx_runtime20 = require("react/jsx-runtime");
1841
1960
  }
1842
1961
  });
1843
1962
 
@@ -1851,16 +1970,16 @@ var init_NotFound2 = __esm({
1851
1970
 
1852
1971
  // src/client/theme/ui/Loading/Loading.tsx
1853
1972
  function Loading() {
1854
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "boltdocs-loading", children: [
1855
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "loading-spinner" }),
1856
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "loading-text", children: "Loading..." })
1973
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-loading", children: [
1974
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "loading-spinner" }),
1975
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "loading-text", children: "Loading..." })
1857
1976
  ] });
1858
1977
  }
1859
- var import_jsx_runtime20;
1978
+ var import_jsx_runtime21;
1860
1979
  var init_Loading = __esm({
1861
1980
  "src/client/theme/ui/Loading/Loading.tsx"() {
1862
1981
  "use strict";
1863
- import_jsx_runtime20 = require("react/jsx-runtime");
1982
+ import_jsx_runtime21 = require("react/jsx-runtime");
1864
1983
  }
1865
1984
  });
1866
1985
 
@@ -1882,27 +2001,27 @@ function CodeBlock({ children, ...props }) {
1882
2001
  setCopied(true);
1883
2002
  setTimeout(() => setCopied(false), 2e3);
1884
2003
  }, []);
1885
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "code-block-wrapper", children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2004
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "code-block-wrapper", children: [
2005
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1887
2006
  "button",
1888
2007
  {
1889
2008
  className: `code-block-copy ${copied ? "copied" : ""}`,
1890
2009
  onClick: handleCopy,
1891
2010
  "aria-label": "Copy code",
1892
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react12.Copy, { size: 16 })
2011
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Copy, { size: 16 })
1893
2012
  }
1894
2013
  ),
1895
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { ref: preRef, ...props, children })
2014
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { ref: preRef, ...props, children })
1896
2015
  ] });
1897
2016
  }
1898
- var import_react14, import_lucide_react12, import_jsx_runtime21;
2017
+ var import_react14, import_lucide_react12, import_jsx_runtime22;
1899
2018
  var init_CodeBlock = __esm({
1900
2019
  "src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
1901
2020
  "use strict";
1902
2021
  import_react14 = require("react");
1903
2022
  import_lucide_react12 = require("lucide-react");
1904
2023
  init_utils();
1905
- import_jsx_runtime21 = require("react/jsx-runtime");
2024
+ import_jsx_runtime22 = require("react/jsx-runtime");
1906
2025
  }
1907
2026
  });
1908
2027
 
@@ -1941,7 +2060,7 @@ function Video({
1941
2060
  observer.observe(el);
1942
2061
  return () => observer.disconnect();
1943
2062
  }, []);
1944
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2063
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1945
2064
  "video",
1946
2065
  {
1947
2066
  className: "boltdocs-video",
@@ -1956,7 +2075,7 @@ function Video({
1956
2075
  "Your browser does not support the video tag."
1957
2076
  ]
1958
2077
  }
1959
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2078
+ ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1960
2079
  "div",
1961
2080
  {
1962
2081
  className: "boltdocs-video-placeholder",
@@ -1965,12 +2084,12 @@ function Video({
1965
2084
  }
1966
2085
  ) });
1967
2086
  }
1968
- var import_react15, import_jsx_runtime22;
2087
+ var import_react15, import_jsx_runtime23;
1969
2088
  var init_Video = __esm({
1970
2089
  "src/client/theme/components/Video/Video.tsx"() {
1971
2090
  "use strict";
1972
2091
  import_react15 = require("react");
1973
- import_jsx_runtime22 = require("react/jsx-runtime");
2092
+ import_jsx_runtime23 = require("react/jsx-runtime");
1974
2093
  }
1975
2094
  });
1976
2095
 
@@ -1987,14 +2106,14 @@ var init_Video2 = __esm({
1987
2106
  });
1988
2107
 
1989
2108
  // src/client/theme/icons/npm.tsx
1990
- var import_jsx_runtime23, NPM;
2109
+ var import_jsx_runtime24, NPM;
1991
2110
  var init_npm = __esm({
1992
2111
  "src/client/theme/icons/npm.tsx"() {
1993
2112
  "use strict";
1994
- import_jsx_runtime23 = require("react/jsx-runtime");
1995
- NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
1996
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
1997
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2113
+ import_jsx_runtime24 = require("react/jsx-runtime");
2114
+ NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
2115
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
2116
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1998
2117
  "path",
1999
2118
  {
2000
2119
  fill: "#fff",
@@ -2006,69 +2125,69 @@ var init_npm = __esm({
2006
2125
  });
2007
2126
 
2008
2127
  // src/client/theme/icons/pnpm.tsx
2009
- var import_jsx_runtime24, Pnpm;
2128
+ var import_jsx_runtime25, Pnpm;
2010
2129
  var init_pnpm = __esm({
2011
2130
  "src/client/theme/icons/pnpm.tsx"() {
2012
2131
  "use strict";
2013
- import_jsx_runtime24 = require("react/jsx-runtime");
2014
- Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2132
+ import_jsx_runtime25 = require("react/jsx-runtime");
2133
+ Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2015
2134
  "svg",
2016
2135
  {
2017
2136
  ...props,
2018
2137
  xmlnsXlink: "http://www.w3.org/1999/xlink",
2019
2138
  viewBox: "76.58987244897958 44 164.00775510204068 164",
2020
2139
  children: [
2021
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("defs", { children: [
2022
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2140
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("defs", { children: [
2141
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2023
2142
  "path",
2024
2143
  {
2025
2144
  d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
2026
2145
  id: "pnpm_dark__b45vdTD8hs"
2027
2146
  }
2028
2147
  ),
2029
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2148
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2030
2149
  "path",
2031
2150
  {
2032
2151
  d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
2033
2152
  id: "pnpm_dark__a40WtxIl8d"
2034
2153
  }
2035
2154
  ),
2036
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2155
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2037
2156
  "path",
2038
2157
  {
2039
2158
  d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
2040
2159
  id: "pnpm_dark__h2CN9AEEpe"
2041
2160
  }
2042
2161
  ),
2043
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2162
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2044
2163
  "path",
2045
2164
  {
2046
2165
  d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
2047
2166
  id: "pnpm_dark__dqv5133G8"
2048
2167
  }
2049
2168
  ),
2050
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2169
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2051
2170
  "path",
2052
2171
  {
2053
2172
  d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
2054
2173
  id: "pnpm_dark__b1Lv79ypvm"
2055
2174
  }
2056
2175
  ),
2057
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2176
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2058
2177
  "path",
2059
2178
  {
2060
2179
  d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
2061
2180
  id: "pnpm_dark__hy1IZWwLX"
2062
2181
  }
2063
2182
  ),
2064
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2183
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2065
2184
  "path",
2066
2185
  {
2067
2186
  d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
2068
2187
  id: "pnpm_dark__akQfjxQes"
2069
2188
  }
2070
2189
  ),
2071
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2190
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2072
2191
  "path",
2073
2192
  {
2074
2193
  d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
@@ -2076,15 +2195,15 @@ var init_pnpm = __esm({
2076
2195
  }
2077
2196
  )
2078
2197
  ] }),
2079
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("g", { children: [
2080
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
2081
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
2082
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
2083
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
2084
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
2085
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
2086
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
2087
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
2198
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
2199
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
2200
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
2201
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
2202
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
2203
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
2204
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
2205
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
2206
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
2088
2207
  ] })
2089
2208
  ]
2090
2209
  }
@@ -2093,62 +2212,62 @@ var init_pnpm = __esm({
2093
2212
  });
2094
2213
 
2095
2214
  // src/client/theme/icons/bun.tsx
2096
- var import_jsx_runtime25, Bun;
2215
+ var import_jsx_runtime26, Bun;
2097
2216
  var init_bun = __esm({
2098
2217
  "src/client/theme/icons/bun.tsx"() {
2099
2218
  "use strict";
2100
- import_jsx_runtime25 = require("react/jsx-runtime");
2101
- Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
2102
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z" }),
2103
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2219
+ import_jsx_runtime26 = require("react/jsx-runtime");
2220
+ Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
2221
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z" }),
2222
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2104
2223
  "path",
2105
2224
  {
2106
2225
  d: "M73 35.7c0 15.21-15.67 27.54-35 27.54S3 50.91 3 35.7C3 26.27 9 17.94 18.22 13S33.18 3 38 3s8.94 4.13 19.78 10C67 17.94 73 26.27 73 35.7Z",
2107
2226
  style: { fill: "#fbf0df" }
2108
2227
  }
2109
2228
  ),
2110
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2229
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2111
2230
  "path",
2112
2231
  {
2113
2232
  d: "M73 35.7a21.67 21.67 0 0 0-.8-5.78c-2.73 33.3-43.35 34.9-59.32 24.94A40 40 0 0 0 38 63.24c19.3 0 35-12.35 35-27.54Z",
2114
2233
  style: { fill: "#f6dece" }
2115
2234
  }
2116
2235
  ),
2117
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2236
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2118
2237
  "path",
2119
2238
  {
2120
2239
  d: "M24.53 11.17C29 8.49 34.94 3.46 40.78 3.45A9.29 9.29 0 0 0 38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7v1.19c6.06-21.41 17.07-23.04 21.53-25.72Z",
2121
2240
  style: { fill: "#fffefc" }
2122
2241
  }
2123
2242
  ),
2124
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2243
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2125
2244
  "path",
2126
2245
  {
2127
2246
  d: "M35.12 5.53A16.41 16.41 0 0 1 29.49 18c-.28.25-.06.73.3.59 3.37-1.31 7.92-5.23 6-13.14-.08-.45-.67-.33-.67.08Zm2.27 0A16.24 16.24 0 0 1 39 19c-.12.35.31.65.55.36 2.19-2.8 4.1-8.36-1.62-14.36-.29-.26-.74.14-.54.49Zm2.76-.17A16.42 16.42 0 0 1 47 17.12a.33.33 0 0 0 .65.11c.92-3.49.4-9.44-7.17-12.53-.4-.16-.66.38-.33.62Zm-18.46 10.4a16.94 16.94 0 0 0 10.47-9c.18-.36.75-.22.66.18-1.73 8-7.52 9.67-11.12 9.45-.38.01-.37-.52-.01-.63Z",
2128
2247
  style: { fill: "#ccbea7", fillRule: "evenodd" }
2129
2248
  }
2130
2249
  ),
2131
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z" }),
2132
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
2133
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2250
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z" }),
2251
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
2252
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2134
2253
  "path",
2135
2254
  {
2136
2255
  d: "M45.05 43a8.93 8.93 0 0 1-2.92 4.71 6.81 6.81 0 0 1-4 1.88A6.84 6.84 0 0 1 34 47.71 8.93 8.93 0 0 1 31.12 43a.72.72 0 0 1 .8-.81h12.34a.72.72 0 0 1 .79.81Z",
2137
2256
  style: { fill: "#b71422" }
2138
2257
  }
2139
2258
  ),
2140
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2259
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2141
2260
  "path",
2142
2261
  {
2143
2262
  d: "M34 47.79a6.91 6.91 0 0 0 4.12 1.9 6.91 6.91 0 0 0 4.11-1.9 10.63 10.63 0 0 0 1-1.07 6.83 6.83 0 0 0-4.9-2.31 6.15 6.15 0 0 0-5 2.78c.23.21.43.41.67.6Z",
2144
2263
  style: { fill: "#ff6164" }
2145
2264
  }
2146
2265
  ),
2147
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z" }),
2148
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z" })
2266
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z" }),
2267
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z" })
2149
2268
  ] }),
2150
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
2151
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2269
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
2270
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2152
2271
  "ellipse",
2153
2272
  {
2154
2273
  cx: "53.22",
@@ -2158,7 +2277,7 @@ var init_bun = __esm({
2158
2277
  style: { fill: "#febbd0" }
2159
2278
  }
2160
2279
  ),
2161
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2280
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2162
2281
  "ellipse",
2163
2282
  {
2164
2283
  cx: "22.95",
@@ -2168,14 +2287,14 @@ var init_bun = __esm({
2168
2287
  style: { fill: "#febbd0" }
2169
2288
  }
2170
2289
  ),
2171
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2290
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2172
2291
  "path",
2173
2292
  {
2174
2293
  d: "M25.7 38.8a5.51 5.51 0 1 0-5.5-5.51 5.51 5.51 0 0 0 5.5 5.51Zm24.77 0A5.51 5.51 0 1 0 45 33.29a5.5 5.5 0 0 0 5.47 5.51Z",
2175
2294
  style: { fillRule: "evenodd" }
2176
2295
  }
2177
2296
  ),
2178
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2297
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2179
2298
  "path",
2180
2299
  {
2181
2300
  d: "M24 33.64a2.07 2.07 0 1 0-2.06-2.07A2.07 2.07 0 0 0 24 33.64Zm24.77 0a2.07 2.07 0 1 0-2.06-2.07 2.07 2.07 0 0 0 2.04 2.07Z",
@@ -2188,12 +2307,12 @@ var init_bun = __esm({
2188
2307
  });
2189
2308
 
2190
2309
  // src/client/theme/icons/deno.tsx
2191
- var import_jsx_runtime26, Deno;
2310
+ var import_jsx_runtime27, Deno;
2192
2311
  var init_deno = __esm({
2193
2312
  "src/client/theme/icons/deno.tsx"() {
2194
2313
  "use strict";
2195
- import_jsx_runtime26 = require("react/jsx-runtime");
2196
- Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2314
+ import_jsx_runtime27 = require("react/jsx-runtime");
2315
+ Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2197
2316
  "svg",
2198
2317
  {
2199
2318
  ...props,
@@ -2203,7 +2322,7 @@ var init_deno = __esm({
2203
2322
  strokeMiterlimit: "2",
2204
2323
  clipRule: "evenodd",
2205
2324
  viewBox: "0 0 441 441",
2206
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2325
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2207
2326
  "path",
2208
2327
  {
2209
2328
  fill: "currentColor",
@@ -2258,11 +2377,11 @@ function PackageManagerTabs({
2258
2377
  setCopied(true);
2259
2378
  setTimeout(() => setCopied(false), 2e3);
2260
2379
  }, [activeCommand]);
2261
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
2262
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
2380
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
2381
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
2263
2382
  const Icon = mgr.icon;
2264
2383
  const isActive = activeTab === mgr.id;
2265
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2384
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2266
2385
  "button",
2267
2386
  {
2268
2387
  className: `pkg-tab-btn ${isActive ? "active" : ""}`,
@@ -2270,29 +2389,29 @@ function PackageManagerTabs({
2270
2389
  "aria-selected": isActive,
2271
2390
  role: "tab",
2272
2391
  children: [
2273
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
2274
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: mgr.label })
2392
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
2393
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: mgr.label })
2275
2394
  ]
2276
2395
  },
2277
2396
  mgr.id
2278
2397
  );
2279
2398
  }) }),
2280
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2281
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2399
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2400
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2282
2401
  "button",
2283
2402
  {
2284
2403
  className: `code-block-copy ${copied ? "copied" : ""}`,
2285
2404
  onClick: handleCopy,
2286
2405
  type: "button",
2287
2406
  "aria-label": "Copy code",
2288
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react13.Copy, { size: 14 })
2407
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Copy, { size: 14 })
2289
2408
  }
2290
2409
  ),
2291
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "line", children: activeCommand }) }) })
2410
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "line", children: activeCommand }) }) })
2292
2411
  ] })
2293
2412
  ] });
2294
2413
  }
2295
- var import_react16, import_lucide_react13, import_jsx_runtime27, MANAGERS;
2414
+ var import_react16, import_lucide_react13, import_jsx_runtime28, MANAGERS;
2296
2415
  var init_PackageManagerTabs = __esm({
2297
2416
  "src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
2298
2417
  "use strict";
@@ -2303,7 +2422,7 @@ var init_PackageManagerTabs = __esm({
2303
2422
  init_bun();
2304
2423
  init_deno();
2305
2424
  init_utils();
2306
- import_jsx_runtime27 = require("react/jsx-runtime");
2425
+ import_jsx_runtime28 = require("react/jsx-runtime");
2307
2426
  MANAGERS = [
2308
2427
  { id: "npm", label: "npm", icon: NPM },
2309
2428
  { id: "pnpm", label: "pnpm", icon: Pnpm },
@@ -2332,6 +2451,7 @@ function useConfig() {
2332
2451
  function AppShell({
2333
2452
  initialRoutes,
2334
2453
  initialConfig,
2454
+ docsDirName,
2335
2455
  modules,
2336
2456
  hot,
2337
2457
  homePage: HomePage,
@@ -2344,14 +2464,14 @@ function AppShell({
2344
2464
  (route) => !(HomePage && (route.path === "/" || route.path === ""))
2345
2465
  ).map((route) => {
2346
2466
  const loaderKey = Object.keys(modules).find(
2347
- (k) => k.endsWith("/" + route.filePath)
2467
+ (k) => k === `/${docsDirName}/${route.filePath}`
2348
2468
  );
2349
2469
  const loader = loaderKey ? modules[loaderKey] : null;
2350
2470
  return {
2351
2471
  ...route,
2352
2472
  Component: import_react17.default.lazy(() => {
2353
2473
  if (!loader)
2354
- return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NotFound, {}) });
2474
+ return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {}) });
2355
2475
  return loader();
2356
2476
  })
2357
2477
  };
@@ -2369,15 +2489,15 @@ function AppShell({
2369
2489
  }, [hot]);
2370
2490
  (0, import_react17.useEffect)(() => {
2371
2491
  setResolvedRoutes(resolveRoutes(routesInfo));
2372
- }, [routesInfo, modules]);
2373
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
2374
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ScrollHandler, {}),
2375
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_router_dom9.Routes, { children: [
2376
- HomePage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2377
- import_react_router_dom9.Route,
2492
+ }, [routesInfo, modules, docsDirName]);
2493
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
2494
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScrollHandler, {}),
2495
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_router_dom11.Routes, { children: [
2496
+ HomePage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2497
+ import_react_router_dom11.Route,
2378
2498
  {
2379
2499
  path: "/",
2380
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2500
+ element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2381
2501
  ThemeLayout,
2382
2502
  {
2383
2503
  config,
@@ -2386,20 +2506,20 @@ function AppShell({
2386
2506
  toc: null,
2387
2507
  breadcrumbs: null,
2388
2508
  ...config.themeConfig?.layoutProps,
2389
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(HomePage, {})
2509
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HomePage, {})
2390
2510
  }
2391
2511
  )
2392
2512
  }
2393
2513
  ),
2394
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2395
- import_react_router_dom9.Route,
2514
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2515
+ import_react_router_dom11.Route,
2396
2516
  {
2397
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DocsLayout, { config, routes: routesInfo }),
2398
- children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2399
- import_react_router_dom9.Route,
2517
+ element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DocsLayout, { config, routes: routesInfo }),
2518
+ children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2519
+ import_react_router_dom11.Route,
2400
2520
  {
2401
2521
  path: route.path === "" ? "/" : route.path,
2402
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react17.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2522
+ element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react17.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2403
2523
  MdxPage,
2404
2524
  {
2405
2525
  Component: route.Component,
@@ -2412,17 +2532,17 @@ function AppShell({
2412
2532
  },
2413
2533
  "docs-layout"
2414
2534
  ),
2415
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2416
- import_react_router_dom9.Route,
2535
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2536
+ import_react_router_dom11.Route,
2417
2537
  {
2418
2538
  path: "*",
2419
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2539
+ element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2420
2540
  ThemeLayout,
2421
2541
  {
2422
2542
  config,
2423
2543
  routes: routesInfo,
2424
2544
  ...config.themeConfig?.layoutProps,
2425
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NotFound, {})
2545
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {})
2426
2546
  }
2427
2547
  )
2428
2548
  }
@@ -2431,7 +2551,7 @@ function AppShell({
2431
2551
  ] }) });
2432
2552
  }
2433
2553
  function ScrollHandler() {
2434
- const { pathname, hash } = (0, import_react_router_dom9.useLocation)();
2554
+ const { pathname, hash } = (0, import_react_router_dom11.useLocation)();
2435
2555
  (0, import_react19.useLayoutEffect)(() => {
2436
2556
  if (hash) {
2437
2557
  const id = hash.replace("#", "");
@@ -2457,13 +2577,13 @@ function DocsLayout({
2457
2577
  config,
2458
2578
  routes
2459
2579
  }) {
2460
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2580
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2461
2581
  ThemeLayout,
2462
2582
  {
2463
2583
  config,
2464
2584
  routes,
2465
2585
  ...config.themeConfig?.layoutProps,
2466
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_router_dom9.Outlet, {})
2586
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_router_dom11.Outlet, {})
2467
2587
  }
2468
2588
  );
2469
2589
  }
@@ -2472,21 +2592,22 @@ function MdxPage({
2472
2592
  customComponents = {}
2473
2593
  }) {
2474
2594
  const allComponents = { ...mdxComponents, ...customComponents };
2475
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react18.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Component, {}) });
2595
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react18.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Component, {}) });
2476
2596
  }
2477
2597
  function createBoltdocsApp(options) {
2478
- const { target, routes, config, modules, hot, homePage } = options;
2598
+ const { target, routes, docsDirName, config, modules, hot, homePage } = options;
2479
2599
  const container = document.querySelector(target);
2480
2600
  if (!container) {
2481
2601
  throw new Error(
2482
2602
  `[boltdocs] Mount target "${target}" not found in document.`
2483
2603
  );
2484
2604
  }
2485
- const app = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react17.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_router_dom9.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2605
+ const app = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react17.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_router_dom11.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2486
2606
  AppShell,
2487
2607
  {
2488
2608
  initialRoutes: routes,
2489
2609
  initialConfig: config,
2610
+ docsDirName,
2490
2611
  modules,
2491
2612
  hot,
2492
2613
  homePage,
@@ -2496,13 +2617,13 @@ function createBoltdocsApp(options) {
2496
2617
  container.innerHTML = "";
2497
2618
  import_client.default.createRoot(container).render(app);
2498
2619
  }
2499
- var import_react17, import_client, import_react_router_dom9, import_react18, import_react19, import_lucide_react14, import_jsx_runtime28, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
2620
+ var import_react17, import_client, import_react_router_dom11, import_react18, import_react19, import_lucide_react14, import_jsx_runtime29, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
2500
2621
  var init_app = __esm({
2501
2622
  "src/client/app/index.tsx"() {
2502
2623
  "use strict";
2503
2624
  import_react17 = __toESM(require("react"));
2504
2625
  import_client = __toESM(require("react-dom/client"));
2505
- import_react_router_dom9 = require("react-router-dom");
2626
+ import_react_router_dom11 = require("react-router-dom");
2506
2627
  init_Layout2();
2507
2628
  init_NotFound2();
2508
2629
  init_Loading2();
@@ -2511,7 +2632,7 @@ var init_app = __esm({
2511
2632
  import_lucide_react14 = require("lucide-react");
2512
2633
  init_CodeBlock2();
2513
2634
  init_preload();
2514
- import_jsx_runtime28 = require("react/jsx-runtime");
2635
+ import_jsx_runtime29 = require("react/jsx-runtime");
2515
2636
  ConfigContext = (0, import_react19.createContext)(null);
2516
2637
  Video2 = (0, import_react19.lazy)(
2517
2638
  () => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
@@ -2527,21 +2648,21 @@ var init_app = __esm({
2527
2648
  children
2528
2649
  }) => {
2529
2650
  const Tag = `h${level}`;
2530
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2651
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2531
2652
  children,
2532
- id && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react14.Link, { size: 16 }) })
2653
+ id && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Link, { size: 16 }) })
2533
2654
  ] });
2534
2655
  };
2535
2656
  mdxComponents = {
2536
- h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 1, ...props }),
2537
- h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 2, ...props }),
2538
- h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 3, ...props }),
2539
- h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 4, ...props }),
2540
- h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 5, ...props }),
2541
- h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Heading, { level: 6, ...props }),
2542
- pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CodeBlock, { ...props, children: props.children }),
2543
- video: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Video2, { ...props }) }),
2544
- PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PackageManagerTabs2, { ...props }) })
2657
+ h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 1, ...props }),
2658
+ h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 2, ...props }),
2659
+ h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 3, ...props }),
2660
+ h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 4, ...props }),
2661
+ h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 5, ...props }),
2662
+ h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 6, ...props }),
2663
+ pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CodeBlock, { ...props, children: props.children }),
2664
+ video: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Video2, { ...props }) }),
2665
+ PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PackageManagerTabs2, { ...props }) })
2545
2666
  };
2546
2667
  }
2547
2668
  });
@@ -2570,7 +2691,8 @@ __export(client_exports, {
2570
2691
  Playground: () => Playground,
2571
2692
  Sidebar: () => Sidebar,
2572
2693
  Tab: () => Tab,
2573
- Tabs: () => Tabs,
2694
+ Table: () => Table,
2695
+ Tabs: () => Tabs2,
2574
2696
  ThemeLayout: () => ThemeLayout,
2575
2697
  Tip: () => Tip,
2576
2698
  Video: () => Video,
@@ -2591,7 +2713,7 @@ init_BackgroundGradient2();
2591
2713
  var import_react20 = __toESM(require("react"));
2592
2714
  var import_react_live = require("react-live");
2593
2715
  var import_lucide_react15 = require("lucide-react");
2594
- var import_jsx_runtime29 = require("react/jsx-runtime");
2716
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2595
2717
  function prepareCode(raw) {
2596
2718
  const trimmed = raw.trim();
2597
2719
  const fnMatch = trimmed.match(/export\s+default\s+function\s+(\w+)/);
@@ -2632,40 +2754,40 @@ function Playground({
2632
2754
  setTimeout(() => setCopied(false), 2e3);
2633
2755
  };
2634
2756
  const extendedScope = { React: import_react20.default, ...scope };
2635
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "boltdocs-playground", "data-readonly": readonly, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2757
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "boltdocs-playground", "data-readonly": readonly, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2636
2758
  import_react_live.LiveProvider,
2637
2759
  {
2638
2760
  code: activeCode,
2639
2761
  scope: extendedScope,
2640
2762
  theme: void 0,
2641
2763
  noInline: useNoInline,
2642
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-split-container", children: [
2643
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel playground-editor-panel", children: [
2644
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel-header", children: [
2645
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel-title", children: [
2646
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Terminal, { size: 14 }),
2647
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: readonly ? "Code Example" : "Live Editor" })
2764
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-split-container", children: [
2765
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel playground-editor-panel", children: [
2766
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-header", children: [
2767
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-title", children: [
2768
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Terminal, { size: 14 }),
2769
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: readonly ? "Code Example" : "Live Editor" })
2648
2770
  ] }),
2649
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2771
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2650
2772
  "button",
2651
2773
  {
2652
2774
  className: "playground-copy-btn",
2653
2775
  onClick: handleCopy,
2654
2776
  title: "Copy code",
2655
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Copy, { size: 14 })
2777
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Copy, { size: 14 })
2656
2778
  }
2657
2779
  )
2658
2780
  ] }),
2659
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "playground-panel-content playground-editor", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_live.LiveEditor, { disabled: readonly, onChange: setActiveCode }) })
2781
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "playground-panel-content playground-editor", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LiveEditor, { disabled: readonly, onChange: setActiveCode }) })
2660
2782
  ] }),
2661
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel playground-preview-panel", children: [
2662
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel-title", children: [
2663
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react15.Play, { size: 14 }),
2664
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Preview" })
2783
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel playground-preview-panel", children: [
2784
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-title", children: [
2785
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Play, { size: 14 }),
2786
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Preview" })
2665
2787
  ] }) }),
2666
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "playground-panel-content playground-preview", children: [
2667
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_live.LivePreview, {}),
2668
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_live.LiveError, { className: "playground-error" })
2788
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-content playground-preview", children: [
2789
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LivePreview, {}),
2790
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LiveError, { className: "playground-error" })
2669
2791
  ] })
2670
2792
  ] })
2671
2793
  ] })
@@ -2680,7 +2802,7 @@ init_CodeBlock2();
2680
2802
  init_Video2();
2681
2803
 
2682
2804
  // src/client/theme/components/mdx/Button.tsx
2683
- var import_jsx_runtime30 = require("react/jsx-runtime");
2805
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2684
2806
  function Button({
2685
2807
  variant = "primary",
2686
2808
  size = "md",
@@ -2691,7 +2813,7 @@ function Button({
2691
2813
  }) {
2692
2814
  const cls = `ld-btn ld-btn--${variant} ld-btn--${size} ${className}`.trim();
2693
2815
  if (href) {
2694
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2816
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2695
2817
  "a",
2696
2818
  {
2697
2819
  href,
@@ -2702,18 +2824,18 @@ function Button({
2702
2824
  }
2703
2825
  );
2704
2826
  }
2705
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { className: cls, ...rest, children });
2827
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { className: cls, ...rest, children });
2706
2828
  }
2707
2829
 
2708
2830
  // src/client/theme/components/mdx/Badge.tsx
2709
- var import_jsx_runtime31 = require("react/jsx-runtime");
2831
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2710
2832
  function Badge({
2711
2833
  variant = "default",
2712
2834
  children,
2713
2835
  className = "",
2714
2836
  ...rest
2715
2837
  }) {
2716
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2838
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2717
2839
  "span",
2718
2840
  {
2719
2841
  className: `ld-badge ld-badge--${variant} ${className}`.trim(),
@@ -2724,14 +2846,14 @@ function Badge({
2724
2846
  }
2725
2847
 
2726
2848
  // src/client/theme/components/mdx/Card.tsx
2727
- var import_jsx_runtime32 = require("react/jsx-runtime");
2849
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2728
2850
  function Cards({
2729
2851
  cols = 3,
2730
2852
  children,
2731
2853
  className = "",
2732
2854
  ...rest
2733
2855
  }) {
2734
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `ld-cards ld-cards--${cols} ${className}`.trim(), ...rest, children });
2856
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `ld-cards ld-cards--${cols} ${className}`.trim(), ...rest, children });
2735
2857
  }
2736
2858
  function Card({
2737
2859
  title,
@@ -2741,13 +2863,13 @@ function Card({
2741
2863
  className = "",
2742
2864
  ...rest
2743
2865
  }) {
2744
- const inner = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2745
- icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ld-card__icon", children: icon }),
2746
- title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "ld-card__title", children: title }),
2747
- children && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "ld-card__body", children })
2866
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2867
+ icon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ld-card__icon", children: icon }),
2868
+ title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "ld-card__title", children: title }),
2869
+ children && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-card__body", children })
2748
2870
  ] });
2749
2871
  if (href) {
2750
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2872
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2751
2873
  "a",
2752
2874
  {
2753
2875
  href,
@@ -2757,7 +2879,7 @@ function Card({
2757
2879
  }
2758
2880
  );
2759
2881
  }
2760
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `ld-card ${className}`.trim(), ...rest, children: inner });
2882
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `ld-card ${className}`.trim(), ...rest, children: inner });
2761
2883
  }
2762
2884
 
2763
2885
  // src/client/theme/components/mdx/Tabs.tsx
@@ -2767,20 +2889,20 @@ init_npm();
2767
2889
  init_pnpm();
2768
2890
  init_bun();
2769
2891
  init_deno();
2770
- var import_jsx_runtime33 = require("react/jsx-runtime");
2892
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2771
2893
  function Tab({ children }) {
2772
- const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("code", { children: children.trim() }) }) : children;
2773
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-tab-panel", children: content });
2894
+ const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("code", { children: children.trim() }) }) : children;
2895
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tab-panel", children: content });
2774
2896
  }
2775
2897
  var getIconForLabel = (label) => {
2776
2898
  const l = label.toLowerCase();
2777
- if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Pnpm, {});
2778
- if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(NPM, {});
2779
- if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Bun, {});
2780
- if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Deno, {});
2899
+ if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Pnpm, {});
2900
+ if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NPM, {});
2901
+ if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Bun, {});
2902
+ if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Deno, {});
2781
2903
  return null;
2782
2904
  };
2783
- function Tabs({ defaultIndex = 0, children }) {
2905
+ function Tabs2({ defaultIndex = 0, children }) {
2784
2906
  const [active, setActive] = (0, import_react21.useState)(defaultIndex);
2785
2907
  const tabRefs = (0, import_react21.useRef)([]);
2786
2908
  const tabs = import_react21.Children.toArray(children).filter(
@@ -2798,11 +2920,11 @@ function Tabs({ defaultIndex = 0, children }) {
2798
2920
  tabRefs.current[newIndex]?.focus();
2799
2921
  }
2800
2922
  };
2801
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "ld-tabs", children: [
2802
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
2923
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ld-tabs", children: [
2924
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
2803
2925
  const label = child.props.label;
2804
2926
  const Icon = getIconForLabel(label);
2805
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2927
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2806
2928
  "button",
2807
2929
  {
2808
2930
  role: "tab",
@@ -2817,13 +2939,13 @@ function Tabs({ defaultIndex = 0, children }) {
2817
2939
  onClick: () => setActive(i),
2818
2940
  children: [
2819
2941
  Icon,
2820
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: label })
2942
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label })
2821
2943
  ]
2822
2944
  },
2823
2945
  i
2824
2946
  );
2825
2947
  }) }),
2826
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2948
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2827
2949
  "div",
2828
2950
  {
2829
2951
  className: "ld-tabs__content",
@@ -2838,13 +2960,13 @@ function Tabs({ defaultIndex = 0, children }) {
2838
2960
 
2839
2961
  // src/client/theme/components/mdx/Admonition.tsx
2840
2962
  var import_lucide_react16 = require("lucide-react");
2841
- var import_jsx_runtime34 = require("react/jsx-runtime");
2963
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2842
2964
  var ICON_MAP2 = {
2843
- note: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
2844
- tip: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
2845
- info: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.Info, { size: 18 }),
2846
- warning: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
2847
- danger: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
2965
+ note: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
2966
+ tip: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
2967
+ info: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Info, { size: 18 }),
2968
+ warning: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
2969
+ danger: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
2848
2970
  };
2849
2971
  var LABEL_MAP = {
2850
2972
  note: "Note",
@@ -2860,35 +2982,35 @@ function Admonition({
2860
2982
  className = "",
2861
2983
  ...rest
2862
2984
  }) {
2863
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2985
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2864
2986
  "div",
2865
2987
  {
2866
2988
  className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
2867
2989
  role: type === "warning" || type === "danger" ? "alert" : "note",
2868
2990
  ...rest,
2869
2991
  children: [
2870
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ld-admonition__header", children: [
2871
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
2872
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
2992
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "ld-admonition__header", children: [
2993
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
2994
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
2873
2995
  ] }),
2874
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-admonition__body", children })
2996
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ld-admonition__body", children })
2875
2997
  ]
2876
2998
  }
2877
2999
  );
2878
3000
  }
2879
- var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "note", ...props });
2880
- var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "tip", ...props });
2881
- var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "warning", ...props });
2882
- var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "danger", ...props });
2883
- var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Admonition, { type: "info", ...props });
3001
+ var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "note", ...props });
3002
+ var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "tip", ...props });
3003
+ var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "warning", ...props });
3004
+ var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "danger", ...props });
3005
+ var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "info", ...props });
2884
3006
 
2885
3007
  // src/client/theme/components/mdx/List.tsx
2886
3008
  var import_react22 = __toESM(require("react"));
2887
3009
  var import_lucide_react17 = require("lucide-react");
2888
- var import_jsx_runtime35 = require("react/jsx-runtime");
3010
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2889
3011
  var ICON_MAP3 = {
2890
- checked: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
2891
- arrow: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
3012
+ checked: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
3013
+ arrow: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
2892
3014
  };
2893
3015
  function List({
2894
3016
  variant = "default",
@@ -2897,14 +3019,14 @@ function List({
2897
3019
  ...rest
2898
3020
  }) {
2899
3021
  if (variant === "default") {
2900
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
3022
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
2901
3023
  }
2902
3024
  const icon = ICON_MAP3[variant];
2903
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react22.Children.map(children, (child) => {
3025
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react22.Children.map(children, (child) => {
2904
3026
  if (!import_react22.default.isValidElement(child)) return child;
2905
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { className: "ld-list__item", children: [
3027
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "ld-list__item", children: [
2906
3028
  icon,
2907
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-list__text", children: child.props.children })
3029
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-list__text", children: child.props.children })
2908
3030
  ] });
2909
3031
  }) });
2910
3032
  }
@@ -2912,7 +3034,7 @@ function List({
2912
3034
  // src/client/theme/components/mdx/FileTree.tsx
2913
3035
  var import_react23 = __toESM(require("react"));
2914
3036
  var import_lucide_react18 = require("lucide-react");
2915
- var import_jsx_runtime36 = require("react/jsx-runtime");
3037
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2916
3038
  function getTextContent(node) {
2917
3039
  if (typeof node === "string") return node;
2918
3040
  if (typeof node === "number") return node.toString();
@@ -2925,13 +3047,13 @@ function getTextContent(node) {
2925
3047
  function getFileIcon(filename) {
2926
3048
  const name = filename.toLowerCase();
2927
3049
  if (name.endsWith(".ts") || name.endsWith(".tsx") || name.endsWith(".js") || name.endsWith(".jsx") || name.endsWith(".json") || name.endsWith(".mjs") || name.endsWith(".cjs") || name.endsWith(".astro") || name.endsWith(".vue") || name.endsWith(".svelte")) {
2928
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
3050
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2929
3051
  }
2930
3052
  if (name.endsWith(".md") || name.endsWith(".mdx") || name.endsWith(".txt")) {
2931
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
3053
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2932
3054
  }
2933
3055
  if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
2934
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3056
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2935
3057
  import_lucide_react18.FileImage,
2936
3058
  {
2937
3059
  size: 16,
@@ -2940,7 +3062,7 @@ function getFileIcon(filename) {
2940
3062
  }
2941
3063
  );
2942
3064
  }
2943
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
3065
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2944
3066
  }
2945
3067
  function isListElement(node, tag) {
2946
3068
  if (typeof node.type === "string") {
@@ -2963,15 +3085,15 @@ function FolderNode({
2963
3085
  depth
2964
3086
  }) {
2965
3087
  const [isOpen, setIsOpen] = (0, import_react23.useState)(true);
2966
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("li", { className: "ld-file-tree__item", children: [
2967
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3088
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { className: "ld-file-tree__item", children: [
3089
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2968
3090
  "div",
2969
3091
  {
2970
3092
  className: "ld-file-tree__label ld-file-tree__label--folder",
2971
3093
  onClick: () => setIsOpen(!isOpen),
2972
3094
  style: { cursor: "pointer" },
2973
3095
  children: [
2974
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3096
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2975
3097
  import_lucide_react18.ChevronRight,
2976
3098
  {
2977
3099
  size: 14,
@@ -2979,7 +3101,7 @@ function FolderNode({
2979
3101
  strokeWidth: 3
2980
3102
  }
2981
3103
  ) }),
2982
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3104
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2983
3105
  import_lucide_react18.Folder,
2984
3106
  {
2985
3107
  size: 16,
@@ -2989,11 +3111,11 @@ function FolderNode({
2989
3111
  fillOpacity: 0.15
2990
3112
  }
2991
3113
  ) }),
2992
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3114
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__name", children: labelText })
2993
3115
  ]
2994
3116
  }
2995
3117
  ),
2996
- isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index)) })
3118
+ isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index)) })
2997
3119
  ] });
2998
3120
  }
2999
3121
  function parseNode(node, depth = 0) {
@@ -3001,11 +3123,11 @@ function parseNode(node, depth = 0) {
3001
3123
  return node;
3002
3124
  }
3003
3125
  if (isListElement(node, "ul")) {
3004
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3126
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3005
3127
  "ul",
3006
3128
  {
3007
3129
  className: `ld-file-tree__list ${depth === 0 ? "ld-file-tree__list--root" : ""}`,
3008
- children: import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth + 1) }, index))
3130
+ children: import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth + 1) }, index))
3009
3131
  }
3010
3132
  );
3011
3133
  }
@@ -3022,7 +3144,7 @@ function parseNode(node, depth = 0) {
3022
3144
  const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
3023
3145
  const isFolder = hasNested || isExplicitDir;
3024
3146
  if (isFolder) {
3025
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3147
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3026
3148
  FolderNode,
3027
3149
  {
3028
3150
  labelText,
@@ -3031,19 +3153,34 @@ function parseNode(node, depth = 0) {
3031
3153
  }
3032
3154
  );
3033
3155
  }
3034
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
3035
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
3036
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
3037
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3156
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
3157
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
3158
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
3159
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3038
3160
  ] }) });
3039
3161
  }
3040
3162
  if (node.props.children) {
3041
- return import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index));
3163
+ return import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index));
3042
3164
  }
3043
3165
  return node;
3044
3166
  }
3045
3167
  function FileTree({ children }) {
3046
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react23.Children.map(children, (child) => parseNode(child, 0)) });
3168
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react23.Children.map(children, (child) => parseNode(child, 0)) });
3169
+ }
3170
+
3171
+ // src/client/theme/components/mdx/Table.tsx
3172
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3173
+ function Table({
3174
+ headers,
3175
+ data,
3176
+ children,
3177
+ className = ""
3178
+ }) {
3179
+ const tableContent = children ? children : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3180
+ headers && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("th", { children: header }, i)) }) }),
3181
+ data && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tbody", { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { children: row.map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", { children: cell }, j)) }, i)) })
3182
+ ] });
3183
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `ld-table-container ${className}`.trim(), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("table", { className: "ld-table", children: tableContent }) });
3047
3184
  }
3048
3185
  // Annotate the CommonJS export names for ESM import in node:
3049
3186
  0 && (module.exports = {
@@ -3068,6 +3205,7 @@ function FileTree({ children }) {
3068
3205
  Playground,
3069
3206
  Sidebar,
3070
3207
  Tab,
3208
+ Table,
3071
3209
  Tabs,
3072
3210
  ThemeLayout,
3073
3211
  Tip,