boltdocs 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{SearchDialog-J3KNRGNO.mjs → SearchDialog-6Z7CUAYJ.mjs} +8 -1
  2. package/dist/{SearchDialog-3QICRMWF.css → SearchDialog-GOZ6X53X.css} +385 -113
  3. package/dist/{chunk-HSPDIRTW.mjs → chunk-SFVOGJ2W.mjs} +955 -737
  4. package/dist/client/index.css +385 -113
  5. package/dist/client/index.d.mts +19 -7
  6. package/dist/client/index.d.ts +19 -7
  7. package/dist/client/index.js +964 -577
  8. package/dist/client/index.mjs +118 -1
  9. package/dist/client/ssr.css +385 -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 +743 -474
  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 +12 -2
  17. package/dist/node/index.d.ts +12 -2
  18. package/dist/node/index.js +48 -21
  19. package/dist/node/index.mjs +48 -21
  20. package/dist/{types-DGIo1VKD.d.mts → types-BbceAHA0.d.mts} +15 -0
  21. package/dist/{types-DGIo1VKD.d.ts → types-BbceAHA0.d.ts} +15 -0
  22. package/package.json +1 -1
  23. package/src/client/app/index.tsx +16 -11
  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 +151 -0
  27. package/src/client/theme/components/mdx/index.ts +3 -0
  28. package/src/client/theme/components/mdx/mdx-components.css +128 -0
  29. package/src/client/theme/styles/markdown.css +8 -3
  30. package/src/client/theme/styles/variables.css +34 -9
  31. package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +46 -0
  32. package/src/client/theme/ui/ErrorBoundary/index.ts +1 -0
  33. package/src/client/theme/ui/Layout/Layout.tsx +10 -11
  34. package/src/client/theme/ui/Layout/base.css +15 -3
  35. package/src/client/theme/ui/Link/Link.tsx +2 -2
  36. package/src/client/theme/ui/Link/LinkPreview.tsx +9 -14
  37. package/src/client/theme/ui/Link/link-preview.css +30 -27
  38. package/src/client/theme/ui/Navbar/Navbar.tsx +65 -17
  39. package/src/client/theme/ui/Navbar/Tabs.tsx +99 -0
  40. package/src/client/theme/ui/Navbar/navbar.css +119 -5
  41. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +66 -57
  42. package/src/client/theme/ui/OnThisPage/toc.css +30 -10
  43. package/src/client/theme/ui/ProgressBar/ProgressBar.css +17 -0
  44. package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +51 -0
  45. package/src/client/theme/ui/ProgressBar/index.ts +1 -0
  46. package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +11 -1
  47. package/src/client/theme/ui/Sidebar/Sidebar.tsx +97 -57
  48. package/src/client/theme/ui/Sidebar/sidebar.css +61 -67
  49. package/src/client/types.ts +12 -0
  50. package/src/node/config.ts +19 -1
  51. package/src/node/plugin/entry.ts +5 -1
  52. package/src/node/plugin/index.ts +2 -1
  53. package/src/node/routes/index.ts +13 -1
  54. package/src/node/routes/parser.ts +32 -7
  55. package/src/node/routes/types.ts +11 -1
  56. package/src/node/ssg/index.ts +2 -1
  57. 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,12 +836,94 @@ 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 containerRef = (0, import_react8.useRef)(null);
843
+ const tabRefs = (0, import_react8.useRef)([]);
844
+ const [indicatorStyle, setIndicatorStyle] = (0, import_react8.useState)({
845
+ opacity: 0,
846
+ transform: "translateX(0) scaleX(0)",
847
+ width: 0
848
+ });
849
+ const currentRoute = routes.find((r) => r.path === location.pathname);
850
+ const currentTabId = currentRoute?.tab?.toLowerCase();
851
+ const activeIndex = tabs.findIndex(
852
+ (tab) => currentTabId ? currentTabId === tab.id.toLowerCase() : false
853
+ );
854
+ const finalActiveIndex = activeIndex === -1 ? 0 : activeIndex;
855
+ (0, import_react8.useEffect)(() => {
856
+ const activeTab = tabRefs.current[finalActiveIndex];
857
+ if (activeTab) {
858
+ setIndicatorStyle({
859
+ opacity: 1,
860
+ width: activeTab.offsetWidth,
861
+ transform: `translateX(${activeTab.offsetLeft}px)`
862
+ });
863
+ }
864
+ }, [finalActiveIndex, tabs, location.pathname]);
865
+ if (!tabs || tabs.length === 0) return null;
866
+ const renderTabIcon = (iconName) => {
867
+ if (!iconName) return null;
868
+ if (iconName.trim().startsWith("<svg")) {
869
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
870
+ "span",
871
+ {
872
+ className: "tab-icon svg-icon",
873
+ dangerouslySetInnerHTML: { __html: iconName }
874
+ }
875
+ );
876
+ }
877
+ const LucideIcon = Icons[iconName];
878
+ if (LucideIcon) {
879
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LucideIcon, { size: 16, className: "tab-icon lucide-icon" });
880
+ }
881
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: iconName, alt: "", className: "tab-icon img-icon" });
882
+ };
883
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "boltdocs-tabs", ref: containerRef, children: [
884
+ tabs.map((tab, index) => {
885
+ const isActive = index === finalActiveIndex;
886
+ const firstRoute = routes.find(
887
+ (r) => r.tab && r.tab.toLowerCase() === tab.id.toLowerCase()
888
+ );
889
+ const linkTo = firstRoute ? firstRoute.path : "#";
890
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
891
+ Link,
892
+ {
893
+ to: linkTo,
894
+ ref: (el) => {
895
+ tabRefs.current[index] = el;
896
+ },
897
+ className: `boltdocs-tab-item ${isActive ? "active" : ""}`,
898
+ children: [
899
+ renderTabIcon(tab.icon),
900
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: tab.text })
901
+ ]
902
+ },
903
+ tab.id
904
+ );
905
+ }),
906
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tab-indicator", style: indicatorStyle })
907
+ ] }) });
908
+ }
909
+ var import_react8, import_react_router_dom4, Icons, import_jsx_runtime11;
910
+ var init_Tabs = __esm({
911
+ "src/client/theme/ui/Navbar/Tabs.tsx"() {
912
+ "use strict";
913
+ import_react8 = require("react");
914
+ import_react_router_dom4 = require("react-router-dom");
915
+ init_Link2();
916
+ Icons = __toESM(require("lucide-react"));
917
+ import_jsx_runtime11 = require("react/jsx-runtime");
918
+ }
919
+ });
920
+
844
921
  // src/client/theme/ui/SearchDialog/SearchDialog.tsx
845
922
  function SearchDialog({ routes }) {
846
- const [isOpen, setIsOpen] = (0, import_react8.useState)(false);
847
- const [query, setQuery] = (0, import_react8.useState)("");
848
- const inputRef = (0, import_react8.useRef)(null);
849
- (0, import_react8.useEffect)(() => {
923
+ const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
924
+ const [query, setQuery] = (0, import_react9.useState)("");
925
+ const inputRef = (0, import_react9.useRef)(null);
926
+ (0, import_react9.useEffect)(() => {
850
927
  const handleKeyDown = (e) => {
851
928
  if ((e.metaKey || e.ctrlKey) && e.key === "k") {
852
929
  e.preventDefault();
@@ -859,14 +936,14 @@ function SearchDialog({ routes }) {
859
936
  window.addEventListener("keydown", handleKeyDown);
860
937
  return () => window.removeEventListener("keydown", handleKeyDown);
861
938
  }, [isOpen]);
862
- (0, import_react8.useEffect)(() => {
939
+ (0, import_react9.useEffect)(() => {
863
940
  if (isOpen) {
864
941
  setTimeout(() => inputRef.current?.focus(), 50);
865
942
  } else {
866
943
  setQuery("");
867
944
  }
868
945
  }, [isOpen]);
869
- const searchResults = import_react8.default.useMemo(() => {
946
+ const searchResults = import_react9.default.useMemo(() => {
870
947
  if (!query) {
871
948
  return routes.slice(0, 10).map((r) => ({
872
949
  title: r.title,
@@ -896,6 +973,13 @@ function SearchDialog({ routes }) {
896
973
  }
897
974
  }
898
975
  }
976
+ if (route._content && route._content.toLowerCase().includes(lowerQuery)) {
977
+ results.push({
978
+ title: route.title,
979
+ path: route.path,
980
+ groupTitle: route.groupTitle
981
+ });
982
+ }
899
983
  }
900
984
  const uniqueResults = [];
901
985
  const seenPaths = /* @__PURE__ */ new Set();
@@ -907,8 +991,8 @@ function SearchDialog({ routes }) {
907
991
  }
908
992
  return uniqueResults.slice(0, 10);
909
993
  }, [routes, query]);
910
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
911
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
994
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
995
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
912
996
  "div",
913
997
  {
914
998
  className: "navbar-search",
@@ -923,19 +1007,19 @@ function SearchDialog({ routes }) {
923
1007
  },
924
1008
  "aria-label": "Open search dialog",
925
1009
  children: [
926
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
1010
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
927
1011
  "Search docs...",
928
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("kbd", { children: "\u2318K" })
1012
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: "\u2318K" })
929
1013
  ]
930
1014
  }
931
1015
  ),
932
1016
  isOpen && (0, import_react_dom2.createPortal)(
933
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1017
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
934
1018
  "div",
935
1019
  {
936
1020
  className: "boltdocs-search-overlay",
937
1021
  onPointerDown: () => setIsOpen(false),
938
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1022
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
939
1023
  "div",
940
1024
  {
941
1025
  className: "boltdocs-search-modal",
@@ -944,9 +1028,9 @@ function SearchDialog({ routes }) {
944
1028
  "aria-label": "Search",
945
1029
  onPointerDown: (e) => e.stopPropagation(),
946
1030
  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)(
1031
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-header", children: [
1032
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { size: 18 }),
1033
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
950
1034
  "input",
951
1035
  {
952
1036
  ref: inputRef,
@@ -957,7 +1041,7 @@ function SearchDialog({ routes }) {
957
1041
  onChange: (e) => setQuery(e.target.value)
958
1042
  }
959
1043
  ),
960
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1044
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
961
1045
  "button",
962
1046
  {
963
1047
  className: "boltdocs-search-close",
@@ -967,7 +1051,7 @@ function SearchDialog({ routes }) {
967
1051
  }
968
1052
  )
969
1053
  ] }),
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)(
1054
+ /* @__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
1055
  Link,
972
1056
  {
973
1057
  to: result.path === "" ? "/" : result.path,
@@ -994,15 +1078,15 @@ function SearchDialog({ routes }) {
994
1078
  setIsOpen(false);
995
1079
  },
996
1080
  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,
1081
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "boltdocs-search-result-title", children: [
1082
+ result.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "heading-indicator", children: "#" }) : null,
999
1083
  result.title
1000
1084
  ] }),
1001
- result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
1085
+ result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
1002
1086
  ]
1003
1087
  },
1004
1088
  result.path
1005
- )) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "boltdocs-search-empty", children: [
1089
+ )) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-empty", children: [
1006
1090
  'No results found for "',
1007
1091
  query,
1008
1092
  '"'
@@ -1016,15 +1100,15 @@ function SearchDialog({ routes }) {
1016
1100
  )
1017
1101
  ] });
1018
1102
  }
1019
- var import_react8, import_react_dom2, import_lucide_react4, import_jsx_runtime11;
1103
+ var import_react9, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
1020
1104
  var init_SearchDialog = __esm({
1021
1105
  "src/client/theme/ui/SearchDialog/SearchDialog.tsx"() {
1022
1106
  "use strict";
1023
- import_react8 = __toESM(require("react"));
1107
+ import_react9 = __toESM(require("react"));
1024
1108
  import_react_dom2 = require("react-dom");
1025
1109
  init_Link2();
1026
1110
  import_lucide_react4 = require("lucide-react");
1027
- import_jsx_runtime11 = require("react/jsx-runtime");
1111
+ import_jsx_runtime12 = require("react/jsx-runtime");
1028
1112
  }
1029
1113
  });
1030
1114
 
@@ -1048,88 +1132,130 @@ function Navbar({
1048
1132
  currentLocale,
1049
1133
  currentVersion
1050
1134
  }) {
1135
+ const location = (0, import_react_router_dom5.useLocation)();
1136
+ const isHomePage = location.pathname === "/";
1051
1137
  const title = config.themeConfig?.title || "Boltdocs";
1052
1138
  const navItems = config.themeConfig?.navbar || [];
1053
1139
  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,
1140
+ const hasTabs = !isHomePage && config.themeConfig?.tabs && config.themeConfig.tabs.length > 0;
1141
+ const leftItems = navItems.filter((item) => item.position !== "right");
1142
+ const rightItems = navItems.filter((item) => item.position === "right");
1143
+ const renderNavItem = (item, i) => {
1144
+ const text = item.label || item.text || "";
1145
+ const href = item.to || item.href || item.link || "";
1146
+ const isExternal = href.startsWith("http") || href.startsWith("//") || href.includes("://");
1147
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: href, target: isExternal ? "_blank" : void 0, children: [
1148
+ text,
1149
+ isExternal && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "navbar-external-icon", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1150
+ "svg",
1093
1151
  {
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,
1100
- {
1101
- i18n: config.i18n,
1102
- currentLocale,
1103
- allRoutes
1152
+ viewBox: "0 0 24 24",
1153
+ width: "13",
1154
+ height: "13",
1155
+ stroke: "currentColor",
1156
+ strokeWidth: "2",
1157
+ fill: "none",
1158
+ strokeLinecap: "round",
1159
+ strokeLinejoin: "round",
1160
+ children: [
1161
+ /* @__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" }),
1162
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "15 3 21 3 21 9" }),
1163
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1164
+ ]
1104
1165
  }
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
- ] }) });
1166
+ ) })
1167
+ ] }, i);
1168
+ };
1169
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: `boltdocs-navbar ${hasTabs ? "has-tabs" : ""}`, children: [
1170
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1171
+ "div",
1172
+ {
1173
+ className: "navbar-container",
1174
+ style: { height: "var(--ld-navbar-height)" },
1175
+ children: [
1176
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-left", children: [
1177
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-logo", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: "/", children: [
1178
+ config.themeConfig?.logo ? config.themeConfig.logo.trim().startsWith("<svg") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1179
+ "span",
1180
+ {
1181
+ className: "navbar-logo-svg",
1182
+ dangerouslySetInnerHTML: {
1183
+ __html: config.themeConfig.logo
1184
+ }
1185
+ }
1186
+ ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1187
+ "img",
1188
+ {
1189
+ src: config.themeConfig.logo,
1190
+ alt: title,
1191
+ className: "navbar-logo-img"
1192
+ }
1193
+ ) : null,
1194
+ title
1195
+ ] }) }),
1196
+ config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1197
+ VersionSwitcher,
1198
+ {
1199
+ versions: config.versions,
1200
+ currentVersion,
1201
+ currentLocale,
1202
+ allRoutes
1203
+ }
1204
+ ) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-version", children: [
1205
+ config.themeConfig.version,
1206
+ " ",
1207
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
1208
+ ] }) : null,
1209
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Left", children: leftItems.map(renderNavItem) })
1210
+ ] }),
1211
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-right", children: [
1212
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Right", children: rightItems.map(renderNavItem) }),
1213
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react10.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-search-placeholder" }), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchDialog2, { routes: routes || [] }) }),
1214
+ config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1215
+ LanguageSwitcher,
1216
+ {
1217
+ i18n: config.i18n,
1218
+ currentLocale,
1219
+ allRoutes
1220
+ }
1221
+ ),
1222
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeToggle, {}),
1223
+ config.themeConfig?.githubRepo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GithubStars, { repo: config.themeConfig.githubRepo }),
1224
+ socialLinks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-divider" }),
1225
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-icons", children: socialLinks.map((link, i) => {
1226
+ const IconComp = ICON_MAP[link.icon.toLowerCase()];
1227
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1228
+ "a",
1229
+ {
1230
+ href: link.link,
1231
+ target: "_blank",
1232
+ rel: "noopener noreferrer",
1233
+ className: "navbar-icon-btn",
1234
+ "aria-label": link.icon,
1235
+ children: IconComp ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComp, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: link.icon })
1236
+ },
1237
+ i
1238
+ );
1239
+ }) })
1240
+ ] })
1241
+ ]
1242
+ }
1243
+ ),
1244
+ hasTabs && config.themeConfig?.tabs && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1245
+ Tabs,
1246
+ {
1247
+ tabs: config.themeConfig.tabs,
1248
+ routes: allRoutes || routes || []
1249
+ }
1250
+ )
1251
+ ] });
1126
1252
  }
1127
- var import_react9, import_lucide_react5, import_jsx_runtime12, SearchDialog2, ICON_MAP;
1253
+ var import_react10, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
1128
1254
  var init_Navbar = __esm({
1129
1255
  "src/client/theme/ui/Navbar/Navbar.tsx"() {
1130
1256
  "use strict";
1131
- import_react9 = __toESM(require("react"));
1132
- init_Link2();
1257
+ import_react10 = require("react");
1258
+ import_react_router_dom5 = require("react-router-dom");
1133
1259
  import_lucide_react5 = require("lucide-react");
1134
1260
  init_LanguageSwitcher2();
1135
1261
  init_VersionSwitcher2();
@@ -1137,8 +1263,9 @@ var init_Navbar = __esm({
1137
1263
  init_discord();
1138
1264
  init_twitter();
1139
1265
  init_GithubStars();
1140
- import_jsx_runtime12 = require("react/jsx-runtime");
1141
- SearchDialog2 = import_react9.default.lazy(
1266
+ init_Tabs();
1267
+ import_jsx_runtime13 = require("react/jsx-runtime");
1268
+ SearchDialog2 = (0, import_react10.lazy)(
1142
1269
  () => Promise.resolve().then(() => (init_SearchDialog2(), SearchDialog_exports)).then((m) => ({ default: m.SearchDialog }))
1143
1270
  );
1144
1271
  ICON_MAP = {
@@ -1159,7 +1286,7 @@ var init_Navbar2 = __esm({
1159
1286
 
1160
1287
  // src/client/theme/ui/PoweredBy/PoweredBy.tsx
1161
1288
  function PoweredBy() {
1162
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1163
1290
  "a",
1164
1291
  {
1165
1292
  href: "https://github.com/jesusalcaladev/boltdocs",
@@ -1167,19 +1294,19 @@ function PoweredBy() {
1167
1294
  rel: "noopener noreferrer",
1168
1295
  className: "powered-by-link",
1169
1296
  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" })
1297
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.Zap, { className: "powered-by-icon", size: 12, fill: "currentColor" }),
1298
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Powered by" }),
1299
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "powered-by-brand", children: "LiteDocs" })
1173
1300
  ]
1174
1301
  }
1175
1302
  ) });
1176
1303
  }
1177
- var import_lucide_react6, import_jsx_runtime13;
1304
+ var import_lucide_react6, import_jsx_runtime14;
1178
1305
  var init_PoweredBy = __esm({
1179
1306
  "src/client/theme/ui/PoweredBy/PoweredBy.tsx"() {
1180
1307
  "use strict";
1181
1308
  import_lucide_react6 = require("lucide-react");
1182
- import_jsx_runtime13 = require("react/jsx-runtime");
1309
+ import_jsx_runtime14 = require("react/jsx-runtime");
1183
1310
  }
1184
1311
  });
1185
1312
 
@@ -1212,7 +1339,6 @@ function renderBadge(badgeRaw) {
1212
1339
  }
1213
1340
  }
1214
1341
  if (!text) return null;
1215
- if (!text) return null;
1216
1342
  let typeClass = "badge-default";
1217
1343
  const lowerText = text.toLowerCase();
1218
1344
  if (lowerText === "new") {
@@ -1222,18 +1348,51 @@ function renderBadge(badgeRaw) {
1222
1348
  } else if (lowerText === "updated") {
1223
1349
  typeClass = "badge-updated";
1224
1350
  }
1225
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
1351
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
1352
+ }
1353
+ function renderIcon(iconName, size = 16) {
1354
+ if (!iconName) return null;
1355
+ const trimmed = iconName.trim();
1356
+ if (trimmed.startsWith("<svg") || trimmed.includes("http")) {
1357
+ if (trimmed.startsWith("<svg")) {
1358
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1359
+ "span",
1360
+ {
1361
+ className: "sidebar-icon svg-icon",
1362
+ dangerouslySetInnerHTML: { __html: trimmed }
1363
+ }
1364
+ );
1365
+ }
1366
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1367
+ "img",
1368
+ {
1369
+ src: trimmed,
1370
+ className: "sidebar-icon",
1371
+ style: { width: size, height: size },
1372
+ alt: ""
1373
+ }
1374
+ );
1375
+ }
1376
+ const IconComponent = LucideIcons[iconName];
1377
+ if (IconComponent) {
1378
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { size, className: "sidebar-icon lucide-icon" });
1379
+ }
1380
+ return null;
1226
1381
  }
1227
1382
  function Sidebar({
1228
1383
  routes,
1229
- config,
1230
- isCollapsed,
1231
- onToggle
1384
+ config
1232
1385
  }) {
1233
- const location = (0, import_react_router_dom4.useLocation)();
1386
+ const location = (0, import_react_router_dom6.useLocation)();
1387
+ const currentRoute = routes.find((r) => r.path === location.pathname);
1388
+ const activeTabId = currentRoute?.tab?.toLowerCase();
1389
+ const filteredRoutes = activeTabId ? routes.filter((r) => {
1390
+ if (!r.tab) return true;
1391
+ return r.tab.toLowerCase() === activeTabId;
1392
+ }) : routes;
1234
1393
  const ungrouped = [];
1235
1394
  const groupMap = /* @__PURE__ */ new Map();
1236
- for (const route of routes) {
1395
+ for (const route of filteredRoutes) {
1237
1396
  if (!route.group) {
1238
1397
  ungrouped.push(route);
1239
1398
  } else {
@@ -1241,49 +1400,41 @@ function Sidebar({
1241
1400
  groupMap.set(route.group, {
1242
1401
  slug: route.group,
1243
1402
  title: route.groupTitle || route.group,
1244
- routes: []
1403
+ routes: [],
1404
+ icon: route.groupIcon
1245
1405
  });
1246
1406
  }
1247
1407
  groupMap.get(route.group).routes.push(route);
1248
1408
  }
1249
1409
  }
1250
1410
  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
- ] })
1411
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "boltdocs-sidebar", children: [
1412
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { "aria-label": "Main Navigation", children: [
1413
+ /* @__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)(
1414
+ Link,
1415
+ {
1416
+ to: route.path === "" ? "/" : route.path,
1417
+ className: `sidebar-link ${location.pathname === route.path ? "active" : ""}`,
1418
+ "aria-current": location.pathname === route.path ? "page" : void 0,
1419
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
1420
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
1421
+ renderIcon(route.icon),
1422
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
1423
+ ] }),
1424
+ renderBadge(route.badge)
1425
+ ] })
1426
+ }
1427
+ ) }, route.path)) }),
1428
+ groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1429
+ SidebarGroupSection,
1430
+ {
1431
+ group,
1432
+ currentPath: location.pathname
1433
+ },
1434
+ group.slug
1435
+ ))
1436
+ ] }),
1437
+ config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PoweredBy, {})
1287
1438
  ] });
1288
1439
  }
1289
1440
  function SidebarGroupSection({
@@ -1291,9 +1442,9 @@ function SidebarGroupSection({
1291
1442
  currentPath
1292
1443
  }) {
1293
1444
  const isActive = group.routes.some((r) => currentPath === r.path);
1294
- 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)(
1445
+ const [open, setOpen] = (0, import_react11.useState)(true);
1446
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-group", children: [
1447
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1297
1448
  "button",
1298
1449
  {
1299
1450
  className: `sidebar-group-header ${isActive ? "active" : ""}`,
@@ -1301,35 +1452,39 @@ function SidebarGroupSection({
1301
1452
  "aria-expanded": open,
1302
1453
  "aria-controls": `sidebar-group-${group.slug}`,
1303
1454
  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 }) })
1455
+ /* @__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 }) }),
1456
+ /* @__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
1457
  ]
1307
1458
  }
1308
1459
  ),
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)(
1460
+ 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
1461
  Link,
1311
1462
  {
1312
1463
  to: route.path === "" ? "/" : route.path,
1313
1464
  className: `sidebar-link sidebar-link-nested ${currentPath === route.path ? "active" : ""}`,
1314
1465
  "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 }),
1466
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
1467
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
1468
+ renderIcon(route.icon),
1469
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
1470
+ ] }),
1317
1471
  renderBadge(route.badge)
1318
1472
  ] })
1319
1473
  }
1320
1474
  ) }, route.path)) })
1321
1475
  ] });
1322
1476
  }
1323
- var import_react10, import_react_router_dom4, import_lucide_react7, import_jsx_runtime14;
1477
+ var import_react11, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
1324
1478
  var init_Sidebar = __esm({
1325
1479
  "src/client/theme/ui/Sidebar/Sidebar.tsx"() {
1326
1480
  "use strict";
1327
- import_react10 = require("react");
1328
- import_react_router_dom4 = require("react-router-dom");
1481
+ import_react11 = require("react");
1482
+ import_react_router_dom6 = require("react-router-dom");
1329
1483
  init_Link2();
1330
1484
  init_PoweredBy2();
1331
1485
  import_lucide_react7 = require("lucide-react");
1332
- import_jsx_runtime14 = require("react/jsx-runtime");
1486
+ LucideIcons = __toESM(require("lucide-react"));
1487
+ import_jsx_runtime15 = require("react/jsx-runtime");
1333
1488
  }
1334
1489
  });
1335
1490
 
@@ -1348,12 +1503,13 @@ function OnThisPage({
1348
1503
  communityHelp,
1349
1504
  filePath
1350
1505
  }) {
1351
- const [activeId, setActiveId] = (0, import_react11.useState)("");
1352
- const [indicatorStyle, setIndicatorStyle] = (0, import_react11.useState)({});
1353
- const observerRef = (0, import_react11.useRef)(null);
1354
- const location = (0, import_react_router_dom5.useLocation)();
1355
- const listRef = (0, import_react11.useRef)(null);
1356
- (0, import_react11.useEffect)(() => {
1506
+ const [activeId, setActiveId] = (0, import_react12.useState)(null);
1507
+ const [indicatorStyle, setIndicatorStyle] = (0, import_react12.useState)({});
1508
+ const observerRef = (0, import_react12.useRef)(null);
1509
+ const location = (0, import_react_router_dom7.useLocation)();
1510
+ const listRef = (0, import_react12.useRef)(null);
1511
+ const visibleIdsRef = (0, import_react12.useRef)(/* @__PURE__ */ new Set());
1512
+ (0, import_react12.useEffect)(() => {
1357
1513
  if (headings.length > 0) {
1358
1514
  const hash = window.location.hash.substring(1);
1359
1515
  if (hash && headings.some((h) => h.id === hash)) {
@@ -1363,38 +1519,55 @@ function OnThisPage({
1363
1519
  }
1364
1520
  }
1365
1521
  }, [location.pathname, headings]);
1366
- (0, import_react11.useEffect)(() => {
1522
+ (0, import_react12.useEffect)(() => {
1367
1523
  if (!activeId || !listRef.current) return;
1368
- const activeElement = listRef.current.querySelector(
1524
+ const activeLink = listRef.current.querySelector(
1369
1525
  `a[href="#${activeId}"]`
1370
1526
  );
1371
- if (activeElement) {
1372
- const { offsetTop, offsetHeight } = activeElement;
1527
+ if (activeLink) {
1528
+ const top = activeLink.offsetTop;
1529
+ const height = activeLink.offsetHeight;
1373
1530
  setIndicatorStyle({
1374
- transform: `translateY(${offsetTop}px)`,
1375
- height: `${offsetHeight}px`,
1531
+ transform: `translateY(${top}px)`,
1532
+ height: `${height}px`,
1376
1533
  opacity: 1
1377
1534
  });
1378
1535
  }
1379
1536
  }, [activeId, headings]);
1380
- (0, import_react11.useEffect)(() => {
1537
+ (0, import_react12.useEffect)(() => {
1381
1538
  if (headings.length === 0) return;
1539
+ visibleIdsRef.current.clear();
1382
1540
  if (observerRef.current) {
1383
1541
  observerRef.current.disconnect();
1384
1542
  }
1385
1543
  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);
1544
+ entries.forEach((entry) => {
1545
+ if (entry.isIntersecting) {
1546
+ visibleIdsRef.current.add(entry.target.id);
1547
+ } else {
1548
+ visibleIdsRef.current.delete(entry.target.id);
1549
+ }
1550
+ });
1551
+ const firstVisible = headings.find((h) => visibleIdsRef.current.has(h.id));
1552
+ if (firstVisible) {
1553
+ setActiveId(firstVisible.id);
1554
+ } else {
1555
+ const firstEl = document.getElementById(headings[0].id);
1556
+ if (firstEl) {
1557
+ const rect = firstEl.getBoundingClientRect();
1558
+ if (rect.top > 200) {
1559
+ setActiveId(headings[0].id);
1560
+ return;
1561
+ }
1562
+ }
1392
1563
  }
1393
1564
  };
1394
- observerRef.current = new IntersectionObserver(callback, {
1395
- rootMargin: "-100px 0px -70% 0px",
1565
+ const observerOptions = {
1566
+ root: document.querySelector(".boltdocs-content"),
1567
+ rootMargin: "-20% 0px -70% 0px",
1396
1568
  threshold: [0, 1]
1397
- });
1569
+ };
1570
+ observerRef.current = new IntersectionObserver(callback, observerOptions);
1398
1571
  const observeHeadings = () => {
1399
1572
  headings.forEach(({ id }) => {
1400
1573
  const el = document.getElementById(id);
@@ -1419,39 +1592,31 @@ function OnThisPage({
1419
1592
  window.removeEventListener("scroll", handleScroll);
1420
1593
  };
1421
1594
  }, [headings, location.pathname]);
1422
- (0, import_react11.useEffect)(() => {
1595
+ (0, import_react12.useEffect)(() => {
1423
1596
  if (!activeId || !listRef.current) return;
1424
1597
  const activeLink = listRef.current.querySelector(
1425
1598
  `a[href="#${activeId}"]`
1426
1599
  );
1427
1600
  if (activeLink) {
1428
- const container = listRef.current.closest(
1429
- ".boltdocs-on-this-page"
1430
- );
1601
+ const container = listRef.current.parentElement;
1431
1602
  if (!container) return;
1432
1603
  const linkRect = activeLink.getBoundingClientRect();
1433
1604
  const containerRect = container.getBoundingClientRect();
1434
1605
  const isVisible = linkRect.top >= containerRect.top && linkRect.bottom <= containerRect.bottom;
1435
1606
  if (!isVisible) {
1436
1607
  activeLink.scrollIntoView({
1437
- behavior: "smooth",
1608
+ behavior: "auto",
1438
1609
  block: "nearest"
1439
1610
  });
1440
1611
  }
1441
1612
  }
1442
1613
  }, [activeId]);
1443
- const handleClick = (0, import_react11.useCallback)(
1614
+ const handleClick = (0, import_react12.useCallback)(
1444
1615
  (e, id) => {
1445
1616
  e.preventDefault();
1446
1617
  const el = document.getElementById(id);
1447
1618
  if (el) {
1448
- const offset = 80;
1449
- const bodyRect = document.body.getBoundingClientRect().top;
1450
- const elementRect = el.getBoundingClientRect().top;
1451
- const elementPosition = elementRect - bodyRect;
1452
- const offsetPosition = elementPosition - offset;
1453
- window.scrollTo({
1454
- top: offsetPosition,
1619
+ el.scrollIntoView({
1455
1620
  behavior: "smooth"
1456
1621
  });
1457
1622
  setActiveId(id);
@@ -1461,11 +1626,11 @@ function OnThisPage({
1461
1626
  []
1462
1627
  );
1463
1628
  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)(
1629
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "boltdocs-on-this-page", "aria-label": "Table of contents", children: [
1630
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "on-this-page-title", children: "On this page" }),
1631
+ /* @__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: [
1632
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "toc-indicator", style: indicatorStyle }),
1633
+ /* @__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
1634
  "a",
1470
1635
  {
1471
1636
  href: `#${h.id}`,
@@ -1475,11 +1640,11 @@ function OnThisPage({
1475
1640
  children: h.text
1476
1641
  }
1477
1642
  ) }, 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)(
1643
+ ] }) }),
1644
+ (editLink || communityHelp) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "toc-help", children: [
1645
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "toc-help-title", children: "Need help?" }),
1646
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ul", { className: "toc-help-links", children: [
1647
+ editLink && filePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1483
1648
  "a",
1484
1649
  {
1485
1650
  href: editLink.replace(":path", filePath),
@@ -1487,12 +1652,12 @@ function OnThisPage({
1487
1652
  rel: "noopener noreferrer",
1488
1653
  className: "toc-help-link",
1489
1654
  children: [
1490
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.Pencil, { size: 16 }),
1655
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Pencil, { size: 16 }),
1491
1656
  "Edit this page"
1492
1657
  ]
1493
1658
  }
1494
1659
  ) }),
1495
- communityHelp && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1660
+ communityHelp && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1496
1661
  "a",
1497
1662
  {
1498
1663
  href: communityHelp,
@@ -1500,7 +1665,7 @@ function OnThisPage({
1500
1665
  rel: "noopener noreferrer",
1501
1666
  className: "toc-help-link",
1502
1667
  children: [
1503
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
1668
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
1504
1669
  "Community help"
1505
1670
  ]
1506
1671
  }
@@ -1509,14 +1674,14 @@ function OnThisPage({
1509
1674
  ] })
1510
1675
  ] });
1511
1676
  }
1512
- var import_react11, import_react_router_dom5, import_lucide_react8, import_jsx_runtime15;
1677
+ var import_react12, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
1513
1678
  var init_OnThisPage = __esm({
1514
1679
  "src/client/theme/ui/OnThisPage/OnThisPage.tsx"() {
1515
1680
  "use strict";
1516
- import_react11 = require("react");
1517
- import_react_router_dom5 = require("react-router-dom");
1681
+ import_react12 = require("react");
1682
+ import_react_router_dom7 = require("react-router-dom");
1518
1683
  import_lucide_react8 = require("lucide-react");
1519
- import_jsx_runtime15 = require("react/jsx-runtime");
1684
+ import_jsx_runtime16 = require("react/jsx-runtime");
1520
1685
  }
1521
1686
  });
1522
1687
 
@@ -1530,8 +1695,8 @@ var init_OnThisPage2 = __esm({
1530
1695
 
1531
1696
  // src/client/theme/ui/Head/Head.tsx
1532
1697
  function Head({ siteTitle, siteDescription, routes }) {
1533
- const location = (0, import_react_router_dom6.useLocation)();
1534
- (0, import_react12.useEffect)(() => {
1698
+ const location = (0, import_react_router_dom8.useLocation)();
1699
+ (0, import_react13.useEffect)(() => {
1535
1700
  const currentRoute = routes.find((r) => r.path === location.pathname);
1536
1701
  const pageTitle = currentRoute?.title;
1537
1702
  const pageDescription = currentRoute?.description || siteDescription || "";
@@ -1575,12 +1740,12 @@ function setMetaTag(attr, key, content) {
1575
1740
  }
1576
1741
  tag.content = content;
1577
1742
  }
1578
- var import_react12, import_react_router_dom6;
1743
+ var import_react13, import_react_router_dom8;
1579
1744
  var init_Head = __esm({
1580
1745
  "src/client/theme/ui/Head/Head.tsx"() {
1581
1746
  "use strict";
1582
- import_react12 = require("react");
1583
- import_react_router_dom6 = require("react-router-dom");
1747
+ import_react13 = require("react");
1748
+ import_react_router_dom8 = require("react-router-dom");
1584
1749
  }
1585
1750
  });
1586
1751
 
@@ -1594,21 +1759,21 @@ var init_Head2 = __esm({
1594
1759
 
1595
1760
  // src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx
1596
1761
  function Breadcrumbs({ routes, config }) {
1597
- const location = (0, import_react_router_dom7.useLocation)();
1762
+ const location = (0, import_react_router_dom9.useLocation)();
1598
1763
  if (config.themeConfig?.breadcrumbs === false) return null;
1599
1764
  if (location.pathname === "/") return null;
1600
1765
  const currentRoute = routes.find((r) => r.path === location.pathname);
1601
1766
  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 }) })
1767
+ 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: [
1768
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1769
+ /* @__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 }) }),
1770
+ /* @__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
1771
  ] }),
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 }) })
1772
+ currentRoute?.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
1773
+ 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 }),
1774
+ /* @__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
1775
  ] }),
1611
- currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1776
+ currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1612
1777
  "span",
1613
1778
  {
1614
1779
  className: "boltdocs-breadcrumbs-text boltdocs-breadcrumbs-active",
@@ -1618,14 +1783,14 @@ function Breadcrumbs({ routes, config }) {
1618
1783
  ) })
1619
1784
  ] }) });
1620
1785
  }
1621
- var import_react_router_dom7, import_lucide_react9, import_jsx_runtime16;
1786
+ var import_react_router_dom9, import_lucide_react9, import_jsx_runtime17;
1622
1787
  var init_Breadcrumbs = __esm({
1623
1788
  "src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx"() {
1624
1789
  "use strict";
1625
- import_react_router_dom7 = require("react-router-dom");
1790
+ import_react_router_dom9 = require("react-router-dom");
1626
1791
  init_Link2();
1627
1792
  import_lucide_react9 = require("lucide-react");
1628
- import_jsx_runtime16 = require("react/jsx-runtime");
1793
+ import_jsx_runtime17 = require("react/jsx-runtime");
1629
1794
  }
1630
1795
  });
1631
1796
 
@@ -1639,16 +1804,16 @@ var init_Breadcrumbs2 = __esm({
1639
1804
 
1640
1805
  // src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx
1641
1806
  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" })
1807
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "boltdocs-background-glow", children: [
1808
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-1" }),
1809
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-2" })
1645
1810
  ] });
1646
1811
  }
1647
- var import_jsx_runtime17;
1812
+ var import_jsx_runtime18;
1648
1813
  var init_BackgroundGradient = __esm({
1649
1814
  "src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx"() {
1650
1815
  "use strict";
1651
- import_jsx_runtime17 = require("react/jsx-runtime");
1816
+ import_jsx_runtime18 = require("react/jsx-runtime");
1652
1817
  }
1653
1818
  });
1654
1819
 
@@ -1660,6 +1825,118 @@ var init_BackgroundGradient2 = __esm({
1660
1825
  }
1661
1826
  });
1662
1827
 
1828
+ // src/client/theme/ui/ProgressBar/ProgressBar.css
1829
+ var init_ProgressBar = __esm({
1830
+ "src/client/theme/ui/ProgressBar/ProgressBar.css"() {
1831
+ }
1832
+ });
1833
+
1834
+ // src/client/theme/ui/ProgressBar/ProgressBar.tsx
1835
+ function ProgressBar() {
1836
+ const [progress, setProgress] = (0, import_react14.useState)(0);
1837
+ (0, import_react14.useEffect)(() => {
1838
+ let container = null;
1839
+ let timer;
1840
+ const handleScroll = () => {
1841
+ if (!container) return;
1842
+ const { scrollTop, scrollHeight, clientHeight } = container;
1843
+ if (scrollHeight <= clientHeight) {
1844
+ setProgress(0);
1845
+ return;
1846
+ }
1847
+ const scrollPercent = scrollTop / (scrollHeight - clientHeight) * 100;
1848
+ setProgress(Math.min(100, Math.max(0, scrollPercent)));
1849
+ };
1850
+ const attachListener = () => {
1851
+ container = document.querySelector(".boltdocs-content");
1852
+ if (container) {
1853
+ container.addEventListener("scroll", handleScroll);
1854
+ handleScroll();
1855
+ if (timer) clearInterval(timer);
1856
+ return true;
1857
+ }
1858
+ return false;
1859
+ };
1860
+ if (!attachListener()) {
1861
+ timer = setInterval(attachListener, 100);
1862
+ }
1863
+ return () => {
1864
+ if (container) container.removeEventListener("scroll", handleScroll);
1865
+ if (timer) clearInterval(timer);
1866
+ };
1867
+ }, []);
1868
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-progress-container", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1869
+ "div",
1870
+ {
1871
+ className: "boltdocs-progress-bar",
1872
+ style: { width: `${progress}%` }
1873
+ }
1874
+ ) });
1875
+ }
1876
+ var import_react14, import_jsx_runtime19;
1877
+ var init_ProgressBar2 = __esm({
1878
+ "src/client/theme/ui/ProgressBar/ProgressBar.tsx"() {
1879
+ "use strict";
1880
+ import_react14 = require("react");
1881
+ init_ProgressBar();
1882
+ import_jsx_runtime19 = require("react/jsx-runtime");
1883
+ }
1884
+ });
1885
+
1886
+ // src/client/theme/ui/ProgressBar/index.ts
1887
+ var init_ProgressBar3 = __esm({
1888
+ "src/client/theme/ui/ProgressBar/index.ts"() {
1889
+ "use strict";
1890
+ init_ProgressBar2();
1891
+ }
1892
+ });
1893
+
1894
+ // src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx
1895
+ var import_react15, import_jsx_runtime20, ErrorBoundary;
1896
+ var init_ErrorBoundary = __esm({
1897
+ "src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx"() {
1898
+ "use strict";
1899
+ import_react15 = require("react");
1900
+ import_jsx_runtime20 = require("react/jsx-runtime");
1901
+ ErrorBoundary = class extends import_react15.Component {
1902
+ state = {
1903
+ hasError: false
1904
+ };
1905
+ static getDerivedStateFromError(error) {
1906
+ return { hasError: true, error };
1907
+ }
1908
+ componentDidCatch(error, errorInfo) {
1909
+ console.error("Uncaught error in Boltdocs Layout:", error, errorInfo);
1910
+ }
1911
+ render() {
1912
+ if (this.state.hasError) {
1913
+ return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "boltdocs-error-boundary", children: [
1914
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "boltdocs-error-title", children: "Something went wrong" }),
1915
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "boltdocs-error-message", children: this.state.error?.message || "An unexpected error occurred while rendering this page." }),
1916
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1917
+ "button",
1918
+ {
1919
+ className: "boltdocs-error-retry",
1920
+ onClick: () => this.setState({ hasError: false }),
1921
+ children: "Try again"
1922
+ }
1923
+ )
1924
+ ] });
1925
+ }
1926
+ return this.props.children;
1927
+ }
1928
+ };
1929
+ }
1930
+ });
1931
+
1932
+ // src/client/theme/ui/ErrorBoundary/index.ts
1933
+ var init_ErrorBoundary2 = __esm({
1934
+ "src/client/theme/ui/ErrorBoundary/index.ts"() {
1935
+ "use strict";
1936
+ init_ErrorBoundary();
1937
+ }
1938
+ });
1939
+
1663
1940
  // src/client/theme/styles.css
1664
1941
  var init_styles = __esm({
1665
1942
  "src/client/theme/styles.css"() {
@@ -1680,10 +1957,9 @@ function ThemeLayout({
1680
1957
  className = "",
1681
1958
  style
1682
1959
  }) {
1683
- const [isSidebarOpen, setIsSidebarOpen] = (0, import_react13.useState)(true);
1684
1960
  const siteTitle = config.themeConfig?.title || "Boltdocs";
1685
1961
  const siteDescription = config.themeConfig?.description || "";
1686
- const location = (0, import_react_router_dom8.useLocation)();
1962
+ const location = (0, import_react_router_dom10.useLocation)();
1687
1963
  const currentIndex = routes.findIndex((r) => r.path === location.pathname);
1688
1964
  const currentRoute = routes[currentIndex];
1689
1965
  const currentLocale = config.i18n ? currentRoute?.locale || config.i18n.defaultLocale : void 0;
@@ -1699,13 +1975,14 @@ function ThemeLayout({
1699
1975
  const prevPage = localIndex > 0 ? filteredRoutes[localIndex - 1] : null;
1700
1976
  const nextPage = localIndex >= 0 && localIndex < filteredRoutes.length - 1 ? filteredRoutes[localIndex + 1] : null;
1701
1977
  const { preload } = usePreload();
1702
- import_react13.default.useEffect(() => {
1978
+ import_react16.default.useEffect(() => {
1703
1979
  if (prevPage?.path) preload(prevPage.path);
1704
1980
  if (nextPage?.path) preload(nextPage.path);
1705
1981
  }, [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)(
1982
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
1983
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ProgressBar, {}),
1984
+ background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BackgroundGradient, {}),
1985
+ head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1709
1986
  Head,
1710
1987
  {
1711
1988
  siteTitle,
@@ -1713,7 +1990,7 @@ function ThemeLayout({
1713
1990
  routes
1714
1991
  }
1715
1992
  ),
1716
- navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1993
+ navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1717
1994
  Navbar,
1718
1995
  {
1719
1996
  config,
@@ -1723,74 +2000,60 @@ function ThemeLayout({
1723
2000
  currentVersion
1724
2001
  }
1725
2002
  ),
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,
2003
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-main-container", children: [
2004
+ sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Sidebar, { routes: filteredRoutes, config }),
2005
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("main", { className: "boltdocs-content", children: [
2006
+ breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
2007
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "boltdocs-page", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorBoundary, { children }) }),
2008
+ (prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
2009
+ prevPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2010
+ Link,
1733
2011
  {
1734
- routes: filteredRoutes,
1735
- config,
1736
- isCollapsed: !isSidebarOpen,
1737
- onToggle: () => setIsSidebarOpen(!isSidebarOpen)
2012
+ to: prevPage.path || "/",
2013
+ className: "page-nav-link page-nav-link--prev",
2014
+ children: [
2015
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
2016
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Previous" }),
2017
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: prevPage.title })
2018
+ ] }),
2019
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
2020
+ ]
1738
2021
  }
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,
2022
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {}),
2023
+ nextPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2024
+ Link,
1776
2025
  {
1777
- headings: routes[currentIndex]?.headings,
1778
- editLink: config.themeConfig?.editLink,
1779
- communityHelp: config.themeConfig?.communityHelp,
1780
- filePath: routes[currentIndex]?.filePath
2026
+ to: nextPage.path || "/",
2027
+ className: "page-nav-link page-nav-link--next",
2028
+ children: [
2029
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
2030
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Next" }),
2031
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: nextPage.title })
2032
+ ] }),
2033
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
2034
+ ]
1781
2035
  }
1782
- )
1783
- ]
1784
- }
1785
- )
2036
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {})
2037
+ ] })
2038
+ ] }),
2039
+ toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2040
+ OnThisPage,
2041
+ {
2042
+ headings: routes[currentIndex]?.headings,
2043
+ editLink: config.themeConfig?.editLink,
2044
+ communityHelp: config.themeConfig?.communityHelp,
2045
+ filePath: routes[currentIndex]?.filePath
2046
+ }
2047
+ )
2048
+ ] })
1786
2049
  ] });
1787
2050
  }
1788
- var import_react13, import_react_router_dom8, import_lucide_react10, import_jsx_runtime18;
2051
+ var import_react16, import_react_router_dom10, import_lucide_react10, import_jsx_runtime21;
1789
2052
  var init_Layout = __esm({
1790
2053
  "src/client/theme/ui/Layout/Layout.tsx"() {
1791
2054
  "use strict";
1792
- import_react13 = __toESM(require("react"));
1793
- import_react_router_dom8 = require("react-router-dom");
2055
+ import_react16 = __toESM(require("react"));
2056
+ import_react_router_dom10 = require("react-router-dom");
1794
2057
  init_Link2();
1795
2058
  import_lucide_react10 = require("lucide-react");
1796
2059
  init_preload();
@@ -1806,8 +2069,10 @@ var init_Layout = __esm({
1806
2069
  init_Head2();
1807
2070
  init_Breadcrumbs2();
1808
2071
  init_BackgroundGradient2();
2072
+ init_ProgressBar3();
2073
+ init_ErrorBoundary2();
1809
2074
  init_styles();
1810
- import_jsx_runtime18 = require("react/jsx-runtime");
2075
+ import_jsx_runtime21 = require("react/jsx-runtime");
1811
2076
  }
1812
2077
  });
1813
2078
 
@@ -1821,23 +2086,23 @@ var init_Layout2 = __esm({
1821
2086
 
1822
2087
  // src/client/theme/ui/NotFound/NotFound.tsx
1823
2088
  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 }),
2089
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "not-found-content", children: [
2090
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "not-found-code", children: "404" }),
2091
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
2092
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
2093
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Link, { to: "/", className: "not-found-link", children: [
2094
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
1830
2095
  " Go to Home"
1831
2096
  ] })
1832
2097
  ] }) });
1833
2098
  }
1834
- var import_lucide_react11, import_jsx_runtime19;
2099
+ var import_lucide_react11, import_jsx_runtime22;
1835
2100
  var init_NotFound = __esm({
1836
2101
  "src/client/theme/ui/NotFound/NotFound.tsx"() {
1837
2102
  "use strict";
1838
2103
  init_Link2();
1839
2104
  import_lucide_react11 = require("lucide-react");
1840
- import_jsx_runtime19 = require("react/jsx-runtime");
2105
+ import_jsx_runtime22 = require("react/jsx-runtime");
1841
2106
  }
1842
2107
  });
1843
2108
 
@@ -1851,16 +2116,16 @@ var init_NotFound2 = __esm({
1851
2116
 
1852
2117
  // src/client/theme/ui/Loading/Loading.tsx
1853
2118
  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..." })
2119
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "boltdocs-loading", children: [
2120
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "loading-spinner" }),
2121
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "loading-text", children: "Loading..." })
1857
2122
  ] });
1858
2123
  }
1859
- var import_jsx_runtime20;
2124
+ var import_jsx_runtime23;
1860
2125
  var init_Loading = __esm({
1861
2126
  "src/client/theme/ui/Loading/Loading.tsx"() {
1862
2127
  "use strict";
1863
- import_jsx_runtime20 = require("react/jsx-runtime");
2128
+ import_jsx_runtime23 = require("react/jsx-runtime");
1864
2129
  }
1865
2130
  });
1866
2131
 
@@ -1874,35 +2139,35 @@ var init_Loading2 = __esm({
1874
2139
 
1875
2140
  // src/client/theme/components/CodeBlock/CodeBlock.tsx
1876
2141
  function CodeBlock({ children, ...props }) {
1877
- const [copied, setCopied] = (0, import_react14.useState)(false);
1878
- const preRef = (0, import_react14.useRef)(null);
1879
- const handleCopy = (0, import_react14.useCallback)(async () => {
2142
+ const [copied, setCopied] = (0, import_react17.useState)(false);
2143
+ const preRef = (0, import_react17.useRef)(null);
2144
+ const handleCopy = (0, import_react17.useCallback)(async () => {
1880
2145
  const code = preRef.current?.textContent || "";
1881
2146
  copyToClipboard(code);
1882
2147
  setCopied(true);
1883
2148
  setTimeout(() => setCopied(false), 2e3);
1884
2149
  }, []);
1885
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "code-block-wrapper", children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2150
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "code-block-wrapper", children: [
2151
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1887
2152
  "button",
1888
2153
  {
1889
2154
  className: `code-block-copy ${copied ? "copied" : ""}`,
1890
2155
  onClick: handleCopy,
1891
2156
  "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 })
2157
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.Copy, { size: 16 })
1893
2158
  }
1894
2159
  ),
1895
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { ref: preRef, ...props, children })
2160
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { ref: preRef, ...props, children })
1896
2161
  ] });
1897
2162
  }
1898
- var import_react14, import_lucide_react12, import_jsx_runtime21;
2163
+ var import_react17, import_lucide_react12, import_jsx_runtime24;
1899
2164
  var init_CodeBlock = __esm({
1900
2165
  "src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
1901
2166
  "use strict";
1902
- import_react14 = require("react");
2167
+ import_react17 = require("react");
1903
2168
  import_lucide_react12 = require("lucide-react");
1904
2169
  init_utils();
1905
- import_jsx_runtime21 = require("react/jsx-runtime");
2170
+ import_jsx_runtime24 = require("react/jsx-runtime");
1906
2171
  }
1907
2172
  });
1908
2173
 
@@ -1924,9 +2189,9 @@ function Video({
1924
2189
  preload = "metadata",
1925
2190
  ...rest
1926
2191
  }) {
1927
- const containerRef = (0, import_react15.useRef)(null);
1928
- const [isVisible, setIsVisible] = (0, import_react15.useState)(false);
1929
- (0, import_react15.useEffect)(() => {
2192
+ const containerRef = (0, import_react18.useRef)(null);
2193
+ const [isVisible, setIsVisible] = (0, import_react18.useState)(false);
2194
+ (0, import_react18.useEffect)(() => {
1930
2195
  const el = containerRef.current;
1931
2196
  if (!el) return;
1932
2197
  const observer = new IntersectionObserver(
@@ -1941,7 +2206,7 @@ function Video({
1941
2206
  observer.observe(el);
1942
2207
  return () => observer.disconnect();
1943
2208
  }, []);
1944
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2209
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1945
2210
  "video",
1946
2211
  {
1947
2212
  className: "boltdocs-video",
@@ -1956,7 +2221,7 @@ function Video({
1956
2221
  "Your browser does not support the video tag."
1957
2222
  ]
1958
2223
  }
1959
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2224
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1960
2225
  "div",
1961
2226
  {
1962
2227
  className: "boltdocs-video-placeholder",
@@ -1965,12 +2230,12 @@ function Video({
1965
2230
  }
1966
2231
  ) });
1967
2232
  }
1968
- var import_react15, import_jsx_runtime22;
2233
+ var import_react18, import_jsx_runtime25;
1969
2234
  var init_Video = __esm({
1970
2235
  "src/client/theme/components/Video/Video.tsx"() {
1971
2236
  "use strict";
1972
- import_react15 = require("react");
1973
- import_jsx_runtime22 = require("react/jsx-runtime");
2237
+ import_react18 = require("react");
2238
+ import_jsx_runtime25 = require("react/jsx-runtime");
1974
2239
  }
1975
2240
  });
1976
2241
 
@@ -1987,14 +2252,14 @@ var init_Video2 = __esm({
1987
2252
  });
1988
2253
 
1989
2254
  // src/client/theme/icons/npm.tsx
1990
- var import_jsx_runtime23, NPM;
2255
+ var import_jsx_runtime26, NPM;
1991
2256
  var init_npm = __esm({
1992
2257
  "src/client/theme/icons/npm.tsx"() {
1993
2258
  "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)(
2259
+ import_jsx_runtime26 = require("react/jsx-runtime");
2260
+ NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
2261
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
2262
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1998
2263
  "path",
1999
2264
  {
2000
2265
  fill: "#fff",
@@ -2006,69 +2271,69 @@ var init_npm = __esm({
2006
2271
  });
2007
2272
 
2008
2273
  // src/client/theme/icons/pnpm.tsx
2009
- var import_jsx_runtime24, Pnpm;
2274
+ var import_jsx_runtime27, Pnpm;
2010
2275
  var init_pnpm = __esm({
2011
2276
  "src/client/theme/icons/pnpm.tsx"() {
2012
2277
  "use strict";
2013
- import_jsx_runtime24 = require("react/jsx-runtime");
2014
- Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2278
+ import_jsx_runtime27 = require("react/jsx-runtime");
2279
+ Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2015
2280
  "svg",
2016
2281
  {
2017
2282
  ...props,
2018
2283
  xmlnsXlink: "http://www.w3.org/1999/xlink",
2019
2284
  viewBox: "76.58987244897958 44 164.00775510204068 164",
2020
2285
  children: [
2021
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("defs", { children: [
2022
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2286
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("defs", { children: [
2287
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2023
2288
  "path",
2024
2289
  {
2025
2290
  d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
2026
2291
  id: "pnpm_dark__b45vdTD8hs"
2027
2292
  }
2028
2293
  ),
2029
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2294
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2030
2295
  "path",
2031
2296
  {
2032
2297
  d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
2033
2298
  id: "pnpm_dark__a40WtxIl8d"
2034
2299
  }
2035
2300
  ),
2036
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2301
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2037
2302
  "path",
2038
2303
  {
2039
2304
  d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
2040
2305
  id: "pnpm_dark__h2CN9AEEpe"
2041
2306
  }
2042
2307
  ),
2043
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2308
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2044
2309
  "path",
2045
2310
  {
2046
2311
  d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
2047
2312
  id: "pnpm_dark__dqv5133G8"
2048
2313
  }
2049
2314
  ),
2050
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2315
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2051
2316
  "path",
2052
2317
  {
2053
2318
  d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
2054
2319
  id: "pnpm_dark__b1Lv79ypvm"
2055
2320
  }
2056
2321
  ),
2057
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2322
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2058
2323
  "path",
2059
2324
  {
2060
2325
  d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
2061
2326
  id: "pnpm_dark__hy1IZWwLX"
2062
2327
  }
2063
2328
  ),
2064
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2329
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2065
2330
  "path",
2066
2331
  {
2067
2332
  d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
2068
2333
  id: "pnpm_dark__akQfjxQes"
2069
2334
  }
2070
2335
  ),
2071
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2336
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2072
2337
  "path",
2073
2338
  {
2074
2339
  d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
@@ -2076,15 +2341,15 @@ var init_pnpm = __esm({
2076
2341
  }
2077
2342
  )
2078
2343
  ] }),
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" }) })
2344
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("g", { children: [
2345
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
2346
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
2347
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
2348
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
2349
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
2350
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
2351
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
2352
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
2088
2353
  ] })
2089
2354
  ]
2090
2355
  }
@@ -2093,62 +2358,62 @@ var init_pnpm = __esm({
2093
2358
  });
2094
2359
 
2095
2360
  // src/client/theme/icons/bun.tsx
2096
- var import_jsx_runtime25, Bun;
2361
+ var import_jsx_runtime28, Bun;
2097
2362
  var init_bun = __esm({
2098
2363
  "src/client/theme/icons/bun.tsx"() {
2099
2364
  "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)(
2365
+ import_jsx_runtime28 = require("react/jsx-runtime");
2366
+ Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
2367
+ /* @__PURE__ */ (0, import_jsx_runtime28.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" }),
2368
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2104
2369
  "path",
2105
2370
  {
2106
2371
  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
2372
  style: { fill: "#fbf0df" }
2108
2373
  }
2109
2374
  ),
2110
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2375
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2111
2376
  "path",
2112
2377
  {
2113
2378
  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
2379
  style: { fill: "#f6dece" }
2115
2380
  }
2116
2381
  ),
2117
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2382
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2118
2383
  "path",
2119
2384
  {
2120
2385
  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
2386
  style: { fill: "#fffefc" }
2122
2387
  }
2123
2388
  ),
2124
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2389
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2125
2390
  "path",
2126
2391
  {
2127
2392
  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
2393
  style: { fill: "#ccbea7", fillRule: "evenodd" }
2129
2394
  }
2130
2395
  ),
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)(
2396
+ /* @__PURE__ */ (0, import_jsx_runtime28.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" }),
2397
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
2398
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2134
2399
  "path",
2135
2400
  {
2136
2401
  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
2402
  style: { fill: "#b71422" }
2138
2403
  }
2139
2404
  ),
2140
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2405
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2141
2406
  "path",
2142
2407
  {
2143
2408
  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
2409
  style: { fill: "#ff6164" }
2145
2410
  }
2146
2411
  ),
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" })
2412
+ /* @__PURE__ */ (0, import_jsx_runtime28.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" }),
2413
+ /* @__PURE__ */ (0, import_jsx_runtime28.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
2414
  ] }),
2150
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
2151
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2415
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
2416
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2152
2417
  "ellipse",
2153
2418
  {
2154
2419
  cx: "53.22",
@@ -2158,7 +2423,7 @@ var init_bun = __esm({
2158
2423
  style: { fill: "#febbd0" }
2159
2424
  }
2160
2425
  ),
2161
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2426
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2162
2427
  "ellipse",
2163
2428
  {
2164
2429
  cx: "22.95",
@@ -2168,14 +2433,14 @@ var init_bun = __esm({
2168
2433
  style: { fill: "#febbd0" }
2169
2434
  }
2170
2435
  ),
2171
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2436
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2172
2437
  "path",
2173
2438
  {
2174
2439
  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
2440
  style: { fillRule: "evenodd" }
2176
2441
  }
2177
2442
  ),
2178
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2443
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2179
2444
  "path",
2180
2445
  {
2181
2446
  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 +2453,12 @@ var init_bun = __esm({
2188
2453
  });
2189
2454
 
2190
2455
  // src/client/theme/icons/deno.tsx
2191
- var import_jsx_runtime26, Deno;
2456
+ var import_jsx_runtime29, Deno;
2192
2457
  var init_deno = __esm({
2193
2458
  "src/client/theme/icons/deno.tsx"() {
2194
2459
  "use strict";
2195
- import_jsx_runtime26 = require("react/jsx-runtime");
2196
- Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2460
+ import_jsx_runtime29 = require("react/jsx-runtime");
2461
+ Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2197
2462
  "svg",
2198
2463
  {
2199
2464
  ...props,
@@ -2203,7 +2468,7 @@ var init_deno = __esm({
2203
2468
  strokeMiterlimit: "2",
2204
2469
  clipRule: "evenodd",
2205
2470
  viewBox: "0 0 441 441",
2206
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2471
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2207
2472
  "path",
2208
2473
  {
2209
2474
  fill: "currentColor",
@@ -2250,19 +2515,19 @@ function PackageManagerTabs({
2250
2515
  pkg = "",
2251
2516
  className = ""
2252
2517
  }) {
2253
- const [activeTab, setActiveTab] = (0, import_react16.useState)("npm");
2254
- const [copied, setCopied] = (0, import_react16.useState)(false);
2518
+ const [activeTab, setActiveTab] = (0, import_react19.useState)("npm");
2519
+ const [copied, setCopied] = (0, import_react19.useState)(false);
2255
2520
  const activeCommand = getCommandForManager(activeTab, command, pkg);
2256
- const handleCopy = (0, import_react16.useCallback)(async () => {
2521
+ const handleCopy = (0, import_react19.useCallback)(async () => {
2257
2522
  copyToClipboard(activeCommand);
2258
2523
  setCopied(true);
2259
2524
  setTimeout(() => setCopied(false), 2e3);
2260
2525
  }, [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) => {
2526
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
2527
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
2263
2528
  const Icon = mgr.icon;
2264
2529
  const isActive = activeTab === mgr.id;
2265
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2530
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2266
2531
  "button",
2267
2532
  {
2268
2533
  className: `pkg-tab-btn ${isActive ? "active" : ""}`,
@@ -2270,40 +2535,40 @@ function PackageManagerTabs({
2270
2535
  "aria-selected": isActive,
2271
2536
  role: "tab",
2272
2537
  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 })
2538
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
2539
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: mgr.label })
2275
2540
  ]
2276
2541
  },
2277
2542
  mgr.id
2278
2543
  );
2279
2544
  }) }),
2280
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2281
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2545
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2546
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2282
2547
  "button",
2283
2548
  {
2284
2549
  className: `code-block-copy ${copied ? "copied" : ""}`,
2285
2550
  onClick: handleCopy,
2286
2551
  type: "button",
2287
2552
  "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 })
2553
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.Copy, { size: 14 })
2289
2554
  }
2290
2555
  ),
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 }) }) })
2556
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "line", children: activeCommand }) }) })
2292
2557
  ] })
2293
2558
  ] });
2294
2559
  }
2295
- var import_react16, import_lucide_react13, import_jsx_runtime27, MANAGERS;
2560
+ var import_react19, import_lucide_react13, import_jsx_runtime30, MANAGERS;
2296
2561
  var init_PackageManagerTabs = __esm({
2297
2562
  "src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
2298
2563
  "use strict";
2299
- import_react16 = require("react");
2564
+ import_react19 = require("react");
2300
2565
  import_lucide_react13 = require("lucide-react");
2301
2566
  init_npm();
2302
2567
  init_pnpm();
2303
2568
  init_bun();
2304
2569
  init_deno();
2305
2570
  init_utils();
2306
- import_jsx_runtime27 = require("react/jsx-runtime");
2571
+ import_jsx_runtime30 = require("react/jsx-runtime");
2307
2572
  MANAGERS = [
2308
2573
  { id: "npm", label: "npm", icon: NPM },
2309
2574
  { id: "pnpm", label: "pnpm", icon: Pnpm },
@@ -2327,57 +2592,58 @@ var init_PackageManagerTabs2 = __esm({
2327
2592
 
2328
2593
  // src/client/app/index.tsx
2329
2594
  function useConfig() {
2330
- return (0, import_react19.useContext)(ConfigContext);
2595
+ return (0, import_react22.useContext)(ConfigContext);
2331
2596
  }
2332
2597
  function AppShell({
2333
2598
  initialRoutes,
2334
2599
  initialConfig,
2600
+ docsDirName,
2335
2601
  modules,
2336
2602
  hot,
2337
2603
  homePage: HomePage,
2338
2604
  components: customComponents = {}
2339
2605
  }) {
2340
- const [routesInfo, setRoutesInfo] = (0, import_react17.useState)(initialRoutes);
2341
- const [config] = (0, import_react17.useState)(initialConfig);
2606
+ const [routesInfo, setRoutesInfo] = (0, import_react20.useState)(initialRoutes);
2607
+ const [config] = (0, import_react20.useState)(initialConfig);
2342
2608
  const resolveRoutes = (infos) => {
2343
2609
  return infos.filter(
2344
2610
  (route) => !(HomePage && (route.path === "/" || route.path === ""))
2345
2611
  ).map((route) => {
2346
2612
  const loaderKey = Object.keys(modules).find(
2347
- (k) => k.endsWith("/" + route.filePath)
2613
+ (k) => k === `/${docsDirName}/${route.filePath}`
2348
2614
  );
2349
2615
  const loader = loaderKey ? modules[loaderKey] : null;
2350
2616
  return {
2351
2617
  ...route,
2352
- Component: import_react17.default.lazy(() => {
2618
+ Component: import_react20.default.lazy(() => {
2353
2619
  if (!loader)
2354
- return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NotFound, {}) });
2620
+ return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {}) });
2355
2621
  return loader();
2356
2622
  })
2357
2623
  };
2358
2624
  });
2359
2625
  };
2360
- const [resolvedRoutes, setResolvedRoutes] = (0, import_react17.useState)(
2626
+ const [resolvedRoutes, setResolvedRoutes] = (0, import_react20.useState)(
2361
2627
  () => resolveRoutes(initialRoutes)
2362
2628
  );
2363
- (0, import_react17.useEffect)(() => {
2629
+ (0, import_react20.useEffect)(() => {
2364
2630
  if (hot) {
2365
2631
  hot.on("boltdocs:routes-update", (newRoutes) => {
2366
2632
  setRoutesInfo(newRoutes);
2367
2633
  });
2368
2634
  }
2369
2635
  }, [hot]);
2370
- (0, import_react17.useEffect)(() => {
2636
+ (0, import_react20.useEffect)(() => {
2371
2637
  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,
2638
+ }, [routesInfo, modules, docsDirName]);
2639
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
2640
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollHandler, {}),
2641
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_router_dom11.Routes, { children: [
2642
+ HomePage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2643
+ import_react_router_dom11.Route,
2378
2644
  {
2379
2645
  path: "/",
2380
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2646
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2381
2647
  ThemeLayout,
2382
2648
  {
2383
2649
  config,
@@ -2386,20 +2652,20 @@ function AppShell({
2386
2652
  toc: null,
2387
2653
  breadcrumbs: null,
2388
2654
  ...config.themeConfig?.layoutProps,
2389
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(HomePage, {})
2655
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HomePage, {})
2390
2656
  }
2391
2657
  )
2392
2658
  }
2393
2659
  ),
2394
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2395
- import_react_router_dom9.Route,
2660
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2661
+ import_react_router_dom11.Route,
2396
2662
  {
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,
2663
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DocsLayout, { config, routes: routesInfo }),
2664
+ children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2665
+ import_react_router_dom11.Route,
2400
2666
  {
2401
2667
  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)(
2668
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react20.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2403
2669
  MdxPage,
2404
2670
  {
2405
2671
  Component: route.Component,
@@ -2412,17 +2678,17 @@ function AppShell({
2412
2678
  },
2413
2679
  "docs-layout"
2414
2680
  ),
2415
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2416
- import_react_router_dom9.Route,
2681
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2682
+ import_react_router_dom11.Route,
2417
2683
  {
2418
2684
  path: "*",
2419
- element: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2685
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2420
2686
  ThemeLayout,
2421
2687
  {
2422
2688
  config,
2423
2689
  routes: routesInfo,
2424
2690
  ...config.themeConfig?.layoutProps,
2425
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(NotFound, {})
2691
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {})
2426
2692
  }
2427
2693
  )
2428
2694
  }
@@ -2431,25 +2697,27 @@ function AppShell({
2431
2697
  ] }) });
2432
2698
  }
2433
2699
  function ScrollHandler() {
2434
- const { pathname, hash } = (0, import_react_router_dom9.useLocation)();
2435
- (0, import_react19.useLayoutEffect)(() => {
2700
+ const { pathname, hash } = (0, import_react_router_dom11.useLocation)();
2701
+ (0, import_react22.useLayoutEffect)(() => {
2702
+ const container = document.querySelector(".boltdocs-content");
2703
+ if (!container) return;
2436
2704
  if (hash) {
2437
2705
  const id = hash.replace("#", "");
2438
2706
  const element = document.getElementById(id);
2439
2707
  if (element) {
2440
2708
  const offset = 80;
2441
- const bodyRect = document.body.getBoundingClientRect().top;
2709
+ const containerRect = container.getBoundingClientRect().top;
2442
2710
  const elementRect = element.getBoundingClientRect().top;
2443
- const elementPosition = elementRect - bodyRect;
2444
- const offsetPosition = elementPosition - offset;
2445
- window.scrollTo({
2711
+ const elementPosition = elementRect - containerRect;
2712
+ const offsetPosition = elementPosition - offset + container.scrollTop;
2713
+ container.scrollTo({
2446
2714
  top: offsetPosition,
2447
2715
  behavior: "smooth"
2448
2716
  });
2449
2717
  return;
2450
2718
  }
2451
2719
  }
2452
- window.scrollTo(0, 0);
2720
+ container.scrollTo(0, 0);
2453
2721
  }, [pathname, hash]);
2454
2722
  return null;
2455
2723
  }
@@ -2457,36 +2725,37 @@ function DocsLayout({
2457
2725
  config,
2458
2726
  routes
2459
2727
  }) {
2460
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2728
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2461
2729
  ThemeLayout,
2462
2730
  {
2463
2731
  config,
2464
2732
  routes,
2465
2733
  ...config.themeConfig?.layoutProps,
2466
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_router_dom9.Outlet, {})
2734
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.Outlet, {})
2467
2735
  }
2468
2736
  );
2469
2737
  }
2470
2738
  function MdxPage({
2471
- Component,
2739
+ Component: Component2,
2472
2740
  customComponents = {}
2473
2741
  }) {
2474
2742
  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, {}) });
2743
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component2, {}) });
2476
2744
  }
2477
2745
  function createBoltdocsApp(options) {
2478
- const { target, routes, config, modules, hot, homePage } = options;
2746
+ const { target, routes, docsDirName, config, modules, hot, homePage } = options;
2479
2747
  const container = document.querySelector(target);
2480
2748
  if (!container) {
2481
2749
  throw new Error(
2482
2750
  `[boltdocs] Mount target "${target}" not found in document.`
2483
2751
  );
2484
2752
  }
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)(
2753
+ const app = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react20.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2486
2754
  AppShell,
2487
2755
  {
2488
2756
  initialRoutes: routes,
2489
2757
  initialConfig: config,
2758
+ docsDirName,
2490
2759
  modules,
2491
2760
  hot,
2492
2761
  homePage,
@@ -2496,27 +2765,27 @@ function createBoltdocsApp(options) {
2496
2765
  container.innerHTML = "";
2497
2766
  import_client.default.createRoot(container).render(app);
2498
2767
  }
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;
2768
+ var import_react20, import_client, import_react_router_dom11, import_react21, import_react22, import_lucide_react14, import_jsx_runtime31, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
2500
2769
  var init_app = __esm({
2501
2770
  "src/client/app/index.tsx"() {
2502
2771
  "use strict";
2503
- import_react17 = __toESM(require("react"));
2772
+ import_react20 = __toESM(require("react"));
2504
2773
  import_client = __toESM(require("react-dom/client"));
2505
- import_react_router_dom9 = require("react-router-dom");
2774
+ import_react_router_dom11 = require("react-router-dom");
2506
2775
  init_Layout2();
2507
2776
  init_NotFound2();
2508
2777
  init_Loading2();
2509
- import_react18 = require("@mdx-js/react");
2510
- import_react19 = require("react");
2778
+ import_react21 = require("@mdx-js/react");
2779
+ import_react22 = require("react");
2511
2780
  import_lucide_react14 = require("lucide-react");
2512
2781
  init_CodeBlock2();
2513
2782
  init_preload();
2514
- import_jsx_runtime28 = require("react/jsx-runtime");
2515
- ConfigContext = (0, import_react19.createContext)(null);
2516
- Video2 = (0, import_react19.lazy)(
2783
+ import_jsx_runtime31 = require("react/jsx-runtime");
2784
+ ConfigContext = (0, import_react22.createContext)(null);
2785
+ Video2 = (0, import_react22.lazy)(
2517
2786
  () => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
2518
2787
  );
2519
- PackageManagerTabs2 = (0, import_react19.lazy)(
2788
+ PackageManagerTabs2 = (0, import_react22.lazy)(
2520
2789
  () => Promise.resolve().then(() => (init_PackageManagerTabs2(), PackageManagerTabs_exports)).then((m) => ({
2521
2790
  default: m.PackageManagerTabs
2522
2791
  }))
@@ -2527,21 +2796,21 @@ var init_app = __esm({
2527
2796
  children
2528
2797
  }) => {
2529
2798
  const Tag = `h${level}`;
2530
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2799
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2531
2800
  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 }) })
2801
+ id && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react14.Link, { size: 16 }) })
2533
2802
  ] });
2534
2803
  };
2535
2804
  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 }) })
2805
+ h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 1, ...props }),
2806
+ h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 2, ...props }),
2807
+ h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 3, ...props }),
2808
+ h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 4, ...props }),
2809
+ h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 5, ...props }),
2810
+ h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 6, ...props }),
2811
+ pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CodeBlock, { ...props, children: props.children }),
2812
+ video: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Video2, { ...props }) }),
2813
+ PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PackageManagerTabs2, { ...props }) })
2545
2814
  };
2546
2815
  }
2547
2816
  });
@@ -2570,7 +2839,8 @@ __export(client_exports, {
2570
2839
  Playground: () => Playground,
2571
2840
  Sidebar: () => Sidebar,
2572
2841
  Tab: () => Tab,
2573
- Tabs: () => Tabs,
2842
+ Table: () => Table,
2843
+ Tabs: () => Tabs2,
2574
2844
  ThemeLayout: () => ThemeLayout,
2575
2845
  Tip: () => Tip,
2576
2846
  Video: () => Video,
@@ -2588,10 +2858,10 @@ init_Breadcrumbs2();
2588
2858
  init_BackgroundGradient2();
2589
2859
 
2590
2860
  // src/client/theme/components/Playground/Playground.tsx
2591
- var import_react20 = __toESM(require("react"));
2861
+ var import_react23 = __toESM(require("react"));
2592
2862
  var import_react_live = require("react-live");
2593
2863
  var import_lucide_react15 = require("lucide-react");
2594
- var import_jsx_runtime29 = require("react/jsx-runtime");
2864
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2595
2865
  function prepareCode(raw) {
2596
2866
  const trimmed = raw.trim();
2597
2867
  const fnMatch = trimmed.match(/export\s+default\s+function\s+(\w+)/);
@@ -2624,48 +2894,48 @@ function Playground({
2624
2894
  }
2625
2895
  const prepared = prepareCode(initialCode);
2626
2896
  const useNoInline = forceNoInline ?? prepared.noInline;
2627
- const [copied, setCopied] = (0, import_react20.useState)(false);
2628
- const [activeCode, setActiveCode] = (0, import_react20.useState)(prepared.code);
2897
+ const [copied, setCopied] = (0, import_react23.useState)(false);
2898
+ const [activeCode, setActiveCode] = (0, import_react23.useState)(prepared.code);
2629
2899
  const handleCopy = () => {
2630
2900
  navigator.clipboard.writeText(activeCode);
2631
2901
  setCopied(true);
2632
2902
  setTimeout(() => setCopied(false), 2e3);
2633
2903
  };
2634
- 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)(
2904
+ const extendedScope = { React: import_react23.default, ...scope };
2905
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boltdocs-playground", "data-readonly": readonly, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2636
2906
  import_react_live.LiveProvider,
2637
2907
  {
2638
2908
  code: activeCode,
2639
2909
  scope: extendedScope,
2640
2910
  theme: void 0,
2641
2911
  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" })
2912
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-split-container", children: [
2913
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel playground-editor-panel", children: [
2914
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-header", children: [
2915
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-title", children: [
2916
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.Terminal, { size: 14 }),
2917
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: readonly ? "Code Example" : "Live Editor" })
2648
2918
  ] }),
2649
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2919
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2650
2920
  "button",
2651
2921
  {
2652
2922
  className: "playground-copy-btn",
2653
2923
  onClick: handleCopy,
2654
2924
  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 })
2925
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.Copy, { size: 14 })
2656
2926
  }
2657
2927
  )
2658
2928
  ] }),
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 }) })
2929
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-panel-content playground-editor", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LiveEditor, { disabled: readonly, onChange: setActiveCode }) })
2660
2930
  ] }),
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" })
2931
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel playground-preview-panel", children: [
2932
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-title", children: [
2933
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.Play, { size: 14 }),
2934
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: "Preview" })
2665
2935
  ] }) }),
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" })
2936
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-content playground-preview", children: [
2937
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LivePreview, {}),
2938
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LiveError, { className: "playground-error" })
2669
2939
  ] })
2670
2940
  ] })
2671
2941
  ] })
@@ -2680,7 +2950,7 @@ init_CodeBlock2();
2680
2950
  init_Video2();
2681
2951
 
2682
2952
  // src/client/theme/components/mdx/Button.tsx
2683
- var import_jsx_runtime30 = require("react/jsx-runtime");
2953
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2684
2954
  function Button({
2685
2955
  variant = "primary",
2686
2956
  size = "md",
@@ -2691,7 +2961,7 @@ function Button({
2691
2961
  }) {
2692
2962
  const cls = `ld-btn ld-btn--${variant} ld-btn--${size} ${className}`.trim();
2693
2963
  if (href) {
2694
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2964
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2695
2965
  "a",
2696
2966
  {
2697
2967
  href,
@@ -2702,18 +2972,18 @@ function Button({
2702
2972
  }
2703
2973
  );
2704
2974
  }
2705
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("button", { className: cls, ...rest, children });
2975
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { className: cls, ...rest, children });
2706
2976
  }
2707
2977
 
2708
2978
  // src/client/theme/components/mdx/Badge.tsx
2709
- var import_jsx_runtime31 = require("react/jsx-runtime");
2979
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2710
2980
  function Badge({
2711
2981
  variant = "default",
2712
2982
  children,
2713
2983
  className = "",
2714
2984
  ...rest
2715
2985
  }) {
2716
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2986
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2717
2987
  "span",
2718
2988
  {
2719
2989
  className: `ld-badge ld-badge--${variant} ${className}`.trim(),
@@ -2724,14 +2994,14 @@ function Badge({
2724
2994
  }
2725
2995
 
2726
2996
  // src/client/theme/components/mdx/Card.tsx
2727
- var import_jsx_runtime32 = require("react/jsx-runtime");
2997
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2728
2998
  function Cards({
2729
2999
  cols = 3,
2730
3000
  children,
2731
3001
  className = "",
2732
3002
  ...rest
2733
3003
  }) {
2734
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `ld-cards ld-cards--${cols} ${className}`.trim(), ...rest, children });
3004
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `ld-cards ld-cards--${cols} ${className}`.trim(), ...rest, children });
2735
3005
  }
2736
3006
  function Card({
2737
3007
  title,
@@ -2741,13 +3011,13 @@ function Card({
2741
3011
  className = "",
2742
3012
  ...rest
2743
3013
  }) {
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 })
3014
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
3015
+ icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-card__icon", children: icon }),
3016
+ title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "ld-card__title", children: title }),
3017
+ children && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ld-card__body", children })
2748
3018
  ] });
2749
3019
  if (href) {
2750
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3020
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2751
3021
  "a",
2752
3022
  {
2753
3023
  href,
@@ -2757,34 +3027,34 @@ function Card({
2757
3027
  }
2758
3028
  );
2759
3029
  }
2760
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `ld-card ${className}`.trim(), ...rest, children: inner });
3030
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `ld-card ${className}`.trim(), ...rest, children: inner });
2761
3031
  }
2762
3032
 
2763
3033
  // src/client/theme/components/mdx/Tabs.tsx
2764
- var import_react21 = require("react");
3034
+ var import_react24 = require("react");
2765
3035
  init_CodeBlock2();
2766
3036
  init_npm();
2767
3037
  init_pnpm();
2768
3038
  init_bun();
2769
3039
  init_deno();
2770
- var import_jsx_runtime33 = require("react/jsx-runtime");
3040
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2771
3041
  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 });
3042
+ const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("code", { children: children.trim() }) }) : children;
3043
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-tab-panel", children: content });
2774
3044
  }
2775
3045
  var getIconForLabel = (label) => {
2776
3046
  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, {});
3047
+ if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Pnpm, {});
3048
+ if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NPM, {});
3049
+ if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Bun, {});
3050
+ if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Deno, {});
2781
3051
  return null;
2782
3052
  };
2783
- function Tabs({ defaultIndex = 0, children }) {
2784
- const [active, setActive] = (0, import_react21.useState)(defaultIndex);
2785
- const tabRefs = (0, import_react21.useRef)([]);
2786
- const tabs = import_react21.Children.toArray(children).filter(
2787
- (child) => (0, import_react21.isValidElement)(child) && child.props?.label
3053
+ function Tabs2({ defaultIndex = 0, children }) {
3054
+ const [active, setActive] = (0, import_react24.useState)(defaultIndex);
3055
+ const tabRefs = (0, import_react24.useRef)([]);
3056
+ const tabs = import_react24.Children.toArray(children).filter(
3057
+ (child) => (0, import_react24.isValidElement)(child) && child.props?.label
2788
3058
  );
2789
3059
  const handleKeyDown = (e) => {
2790
3060
  let newIndex = active;
@@ -2798,11 +3068,11 @@ function Tabs({ defaultIndex = 0, children }) {
2798
3068
  tabRefs.current[newIndex]?.focus();
2799
3069
  }
2800
3070
  };
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) => {
3071
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ld-tabs", children: [
3072
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
2803
3073
  const label = child.props.label;
2804
3074
  const Icon = getIconForLabel(label);
2805
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3075
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2806
3076
  "button",
2807
3077
  {
2808
3078
  role: "tab",
@@ -2817,13 +3087,13 @@ function Tabs({ defaultIndex = 0, children }) {
2817
3087
  onClick: () => setActive(i),
2818
3088
  children: [
2819
3089
  Icon,
2820
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: label })
3090
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: label })
2821
3091
  ]
2822
3092
  },
2823
3093
  i
2824
3094
  );
2825
3095
  }) }),
2826
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3096
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2827
3097
  "div",
2828
3098
  {
2829
3099
  className: "ld-tabs__content",
@@ -2838,13 +3108,13 @@ function Tabs({ defaultIndex = 0, children }) {
2838
3108
 
2839
3109
  // src/client/theme/components/mdx/Admonition.tsx
2840
3110
  var import_lucide_react16 = require("lucide-react");
2841
- var import_jsx_runtime34 = require("react/jsx-runtime");
3111
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2842
3112
  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 })
3113
+ note: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
3114
+ tip: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
3115
+ info: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.Info, { size: 18 }),
3116
+ warning: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
3117
+ danger: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
2848
3118
  };
2849
3119
  var LABEL_MAP = {
2850
3120
  note: "Note",
@@ -2860,35 +3130,35 @@ function Admonition({
2860
3130
  className = "",
2861
3131
  ...rest
2862
3132
  }) {
2863
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3133
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2864
3134
  "div",
2865
3135
  {
2866
3136
  className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
2867
3137
  role: type === "warning" || type === "danger" ? "alert" : "note",
2868
3138
  ...rest,
2869
3139
  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] })
3140
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ld-admonition__header", children: [
3141
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
3142
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
2873
3143
  ] }),
2874
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-admonition__body", children })
3144
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-admonition__body", children })
2875
3145
  ]
2876
3146
  }
2877
3147
  );
2878
3148
  }
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 });
3149
+ var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "note", ...props });
3150
+ var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "tip", ...props });
3151
+ var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "warning", ...props });
3152
+ var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "danger", ...props });
3153
+ var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "info", ...props });
2884
3154
 
2885
3155
  // src/client/theme/components/mdx/List.tsx
2886
- var import_react22 = __toESM(require("react"));
3156
+ var import_react25 = __toESM(require("react"));
2887
3157
  var import_lucide_react17 = require("lucide-react");
2888
- var import_jsx_runtime35 = require("react/jsx-runtime");
3158
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2889
3159
  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" })
3160
+ checked: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
3161
+ arrow: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
2892
3162
  };
2893
3163
  function List({
2894
3164
  variant = "default",
@@ -2897,27 +3167,27 @@ function List({
2897
3167
  ...rest
2898
3168
  }) {
2899
3169
  if (variant === "default") {
2900
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
3170
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
2901
3171
  }
2902
3172
  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) => {
2904
- if (!import_react22.default.isValidElement(child)) return child;
2905
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { className: "ld-list__item", children: [
3173
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react25.Children.map(children, (child) => {
3174
+ if (!import_react25.default.isValidElement(child)) return child;
3175
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("li", { className: "ld-list__item", children: [
2906
3176
  icon,
2907
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-list__text", children: child.props.children })
3177
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ld-list__text", children: child.props.children })
2908
3178
  ] });
2909
3179
  }) });
2910
3180
  }
2911
3181
 
2912
3182
  // src/client/theme/components/mdx/FileTree.tsx
2913
- var import_react23 = __toESM(require("react"));
3183
+ var import_react26 = __toESM(require("react"));
2914
3184
  var import_lucide_react18 = require("lucide-react");
2915
- var import_jsx_runtime36 = require("react/jsx-runtime");
3185
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2916
3186
  function getTextContent(node) {
2917
3187
  if (typeof node === "string") return node;
2918
3188
  if (typeof node === "number") return node.toString();
2919
3189
  if (Array.isArray(node)) return node.map(getTextContent).join("");
2920
- if ((0, import_react23.isValidElement)(node)) {
3190
+ if ((0, import_react26.isValidElement)(node)) {
2921
3191
  return getTextContent(node.props.children);
2922
3192
  }
2923
3193
  return "";
@@ -2925,13 +3195,13 @@ function getTextContent(node) {
2925
3195
  function getFileIcon(filename) {
2926
3196
  const name = filename.toLowerCase();
2927
3197
  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" });
3198
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react18.FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2929
3199
  }
2930
3200
  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" });
3201
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react18.FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2932
3202
  }
2933
3203
  if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
2934
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3204
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2935
3205
  import_lucide_react18.FileImage,
2936
3206
  {
2937
3207
  size: 16,
@@ -2940,7 +3210,7 @@ function getFileIcon(filename) {
2940
3210
  }
2941
3211
  );
2942
3212
  }
2943
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
3213
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react18.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
2944
3214
  }
2945
3215
  function isListElement(node, tag) {
2946
3216
  if (typeof node.type === "string") {
@@ -2962,16 +3232,16 @@ function FolderNode({
2962
3232
  nestedNodes,
2963
3233
  depth
2964
3234
  }) {
2965
- 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)(
3235
+ const [isOpen, setIsOpen] = (0, import_react26.useState)(true);
3236
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("li", { className: "ld-file-tree__item", children: [
3237
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2968
3238
  "div",
2969
3239
  {
2970
3240
  className: "ld-file-tree__label ld-file-tree__label--folder",
2971
3241
  onClick: () => setIsOpen(!isOpen),
2972
3242
  style: { cursor: "pointer" },
2973
3243
  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)(
3244
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2975
3245
  import_lucide_react18.ChevronRight,
2976
3246
  {
2977
3247
  size: 14,
@@ -2979,7 +3249,7 @@ function FolderNode({
2979
3249
  strokeWidth: 3
2980
3250
  }
2981
3251
  ) }),
2982
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3252
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2983
3253
  import_lucide_react18.Folder,
2984
3254
  {
2985
3255
  size: 16,
@@ -2989,30 +3259,30 @@ function FolderNode({
2989
3259
  fillOpacity: 0.15
2990
3260
  }
2991
3261
  ) }),
2992
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3262
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__name", children: labelText })
2993
3263
  ]
2994
3264
  }
2995
3265
  ),
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)) })
3266
+ isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react26.default.Fragment, { children: parseNode(child, depth) }, index)) })
2997
3267
  ] });
2998
3268
  }
2999
3269
  function parseNode(node, depth = 0) {
3000
- if (!(0, import_react23.isValidElement)(node)) {
3270
+ if (!(0, import_react26.isValidElement)(node)) {
3001
3271
  return node;
3002
3272
  }
3003
3273
  if (isListElement(node, "ul")) {
3004
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3274
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3005
3275
  "ul",
3006
3276
  {
3007
3277
  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))
3278
+ children: import_react26.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react26.default.Fragment, { children: parseNode(child, depth + 1) }, index))
3009
3279
  }
3010
3280
  );
3011
3281
  }
3012
3282
  if (isListElement(node, "li")) {
3013
- const children = import_react23.Children.toArray(node.props.children);
3283
+ const children = import_react26.Children.toArray(node.props.children);
3014
3284
  const nestedListIndex = children.findIndex(
3015
- (child) => (0, import_react23.isValidElement)(child) && isListElement(child, "ul")
3285
+ (child) => (0, import_react26.isValidElement)(child) && isListElement(child, "ul")
3016
3286
  );
3017
3287
  const hasNested = nestedListIndex !== -1;
3018
3288
  const labelNodes = hasNested ? children.slice(0, nestedListIndex) : children;
@@ -3022,7 +3292,7 @@ function parseNode(node, depth = 0) {
3022
3292
  const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
3023
3293
  const isFolder = hasNested || isExplicitDir;
3024
3294
  if (isFolder) {
3025
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3295
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3026
3296
  FolderNode,
3027
3297
  {
3028
3298
  labelText,
@@ -3031,19 +3301,135 @@ function parseNode(node, depth = 0) {
3031
3301
  }
3032
3302
  );
3033
3303
  }
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 })
3304
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
3305
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
3306
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
3307
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3038
3308
  ] }) });
3039
3309
  }
3040
3310
  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));
3311
+ return import_react26.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react26.default.Fragment, { children: parseNode(child, depth) }, index));
3042
3312
  }
3043
3313
  return node;
3044
3314
  }
3045
3315
  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)) });
3316
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react26.Children.map(children, (child) => parseNode(child, 0)) });
3317
+ }
3318
+
3319
+ // src/client/theme/components/mdx/Table.tsx
3320
+ var import_react27 = require("react");
3321
+ var import_lucide_react19 = require("lucide-react");
3322
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3323
+ function Table({
3324
+ headers,
3325
+ data,
3326
+ children,
3327
+ className = "",
3328
+ sortable = false,
3329
+ paginated = false,
3330
+ pageSize = 10
3331
+ }) {
3332
+ const [sortConfig, setSortConfig] = (0, import_react27.useState)(null);
3333
+ const [currentPage, setCurrentPage] = (0, import_react27.useState)(1);
3334
+ const processedData = (0, import_react27.useMemo)(() => {
3335
+ if (!data) return [];
3336
+ let items = [...data];
3337
+ if (sortable && sortConfig !== null) {
3338
+ items.sort((a, b) => {
3339
+ const aVal = a[sortConfig.key];
3340
+ const bVal = b[sortConfig.key];
3341
+ const aStr = typeof aVal === "string" ? aVal : "";
3342
+ const bStr = typeof bVal === "string" ? bVal : "";
3343
+ if (aStr < bStr) return sortConfig.direction === "asc" ? -1 : 1;
3344
+ if (aStr > bStr) return sortConfig.direction === "asc" ? 1 : -1;
3345
+ return 0;
3346
+ });
3347
+ }
3348
+ return items;
3349
+ }, [data, sortConfig, sortable]);
3350
+ const totalPages = Math.ceil(processedData.length / pageSize);
3351
+ const paginatedData = (0, import_react27.useMemo)(() => {
3352
+ if (!paginated) return processedData;
3353
+ const start = (currentPage - 1) * pageSize;
3354
+ return processedData.slice(start, start + pageSize);
3355
+ }, [processedData, paginated, currentPage, pageSize]);
3356
+ const requestSort = (index) => {
3357
+ if (!sortable) return;
3358
+ let direction = "asc";
3359
+ if (sortConfig && sortConfig.key === index && sortConfig.direction === "asc") {
3360
+ direction = "desc";
3361
+ }
3362
+ setSortConfig({ key: index, direction });
3363
+ };
3364
+ const renderSortIcon = (index) => {
3365
+ if (!sortable) return null;
3366
+ if (sortConfig?.key !== index) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronDown, { size: 14, className: "ld-table-sort-icon ld-table-sort-icon--hidden" });
3367
+ return sortConfig.direction === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronUp, { size: 14, className: "ld-table-sort-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronDown, { size: 14, className: "ld-table-sort-icon" });
3368
+ };
3369
+ const tableContent = children ? children : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
3370
+ headers && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3371
+ "th",
3372
+ {
3373
+ onClick: () => requestSort(i),
3374
+ className: sortable ? "ld-table-header--sortable" : "",
3375
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-header-content", children: [
3376
+ header,
3377
+ renderSortIcon(i)
3378
+ ] })
3379
+ },
3380
+ i
3381
+ )) }) }),
3382
+ paginatedData && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tbody", { children: paginatedData.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tr", { children: row.map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { children: cell }, j)) }, i)) })
3383
+ ] });
3384
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: `ld-table-container ${className}`.trim(), children: [
3385
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "ld-table-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("table", { className: "ld-table", children: tableContent }) }),
3386
+ paginated && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination", children: [
3387
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination-info", children: [
3388
+ "Page ",
3389
+ currentPage,
3390
+ " of ",
3391
+ totalPages
3392
+ ] }),
3393
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination-controls", children: [
3394
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3395
+ "button",
3396
+ {
3397
+ onClick: () => setCurrentPage(1),
3398
+ disabled: currentPage === 1,
3399
+ className: "ld-table-pagination-btn",
3400
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronsLeft, { size: 16 })
3401
+ }
3402
+ ),
3403
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3404
+ "button",
3405
+ {
3406
+ onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
3407
+ disabled: currentPage === 1,
3408
+ className: "ld-table-pagination-btn",
3409
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronLeft, { size: 16 })
3410
+ }
3411
+ ),
3412
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3413
+ "button",
3414
+ {
3415
+ onClick: () => setCurrentPage((prev) => Math.min(prev + 1, totalPages)),
3416
+ disabled: currentPage === totalPages,
3417
+ className: "ld-table-pagination-btn",
3418
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronRight, { size: 16 })
3419
+ }
3420
+ ),
3421
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3422
+ "button",
3423
+ {
3424
+ onClick: () => setCurrentPage(totalPages),
3425
+ disabled: currentPage === totalPages,
3426
+ className: "ld-table-pagination-btn",
3427
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.ChevronsRight, { size: 16 })
3428
+ }
3429
+ )
3430
+ ] })
3431
+ ] })
3432
+ ] });
3047
3433
  }
3048
3434
  // Annotate the CommonJS export names for ESM import in node:
3049
3435
  0 && (module.exports = {
@@ -3068,6 +3454,7 @@ function FileTree({ children }) {
3068
3454
  Playground,
3069
3455
  Sidebar,
3070
3456
  Tab,
3457
+ Table,
3071
3458
  Tabs,
3072
3459
  ThemeLayout,
3073
3460
  Tip,