boltdocs 1.7.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 (38) hide show
  1. package/dist/{SearchDialog-YOXMFGH6.mjs → SearchDialog-6Z7CUAYJ.mjs} +8 -1
  2. package/dist/{SearchDialog-UOAW6IR3.css → SearchDialog-GOZ6X53X.css} +129 -14
  3. package/dist/{chunk-MULKZFVN.mjs → chunk-SFVOGJ2W.mjs} +269 -165
  4. package/dist/client/index.css +129 -14
  5. package/dist/client/index.d.mts +5 -7
  6. package/dist/client/index.d.ts +5 -7
  7. package/dist/client/index.js +586 -337
  8. package/dist/client/index.mjs +106 -5
  9. package/dist/client/ssr.css +129 -14
  10. package/dist/client/ssr.d.mts +1 -1
  11. package/dist/client/ssr.d.ts +1 -1
  12. package/dist/client/ssr.js +378 -230
  13. package/dist/client/ssr.mjs +1 -1
  14. package/dist/node/index.d.mts +2 -0
  15. package/dist/node/index.d.ts +2 -0
  16. package/dist/node/index.js +4 -1
  17. package/dist/node/index.mjs +4 -1
  18. package/dist/{types-CviV0GbX.d.ts → types-BbceAHA0.d.mts} +2 -0
  19. package/dist/{types-CviV0GbX.d.mts → types-BbceAHA0.d.ts} +2 -0
  20. package/package.json +1 -1
  21. package/src/client/app/index.tsx +8 -7
  22. package/src/client/theme/components/mdx/Table.tsx +108 -10
  23. package/src/client/theme/components/mdx/mdx-components.css +79 -0
  24. package/src/client/theme/styles/variables.css +24 -0
  25. package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +46 -0
  26. package/src/client/theme/ui/ErrorBoundary/index.ts +1 -0
  27. package/src/client/theme/ui/Layout/Layout.tsx +8 -1
  28. package/src/client/theme/ui/Navbar/Tabs.tsx +37 -12
  29. package/src/client/theme/ui/Navbar/navbar.css +26 -18
  30. package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +1 -8
  31. package/src/client/theme/ui/ProgressBar/ProgressBar.css +17 -0
  32. package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +51 -0
  33. package/src/client/theme/ui/ProgressBar/index.ts +1 -0
  34. package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +11 -1
  35. package/src/client/types.ts +2 -0
  36. package/src/node/routes/index.ts +1 -0
  37. package/src/node/routes/parser.ts +11 -0
  38. package/src/node/routes/types.ts +2 -0
@@ -839,8 +839,29 @@ var init_GithubStars = __esm({
839
839
  // src/client/theme/ui/Navbar/Tabs.tsx
840
840
  function Tabs({ tabs, routes }) {
841
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
+ });
842
849
  const currentRoute = routes.find((r) => r.path === location.pathname);
843
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]);
844
865
  if (!tabs || tabs.length === 0) return null;
845
866
  const renderTabIcon = (iconName) => {
846
867
  if (!iconName) return null;
@@ -859,28 +880,37 @@ function Tabs({ tabs, routes }) {
859
880
  }
860
881
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: iconName, alt: "", className: "tab-icon img-icon" });
861
882
  };
862
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs", children: tabs.map((tab, index) => {
863
- const isActive = currentTabId ? currentTabId === tab.id.toLowerCase() : index === 0;
864
- const firstRoute = routes.find((r) => r.tab && r.tab.toLowerCase() === tab.id.toLowerCase());
865
- const linkTo = firstRoute ? firstRoute.path : "#";
866
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
867
- Link,
868
- {
869
- to: linkTo,
870
- className: `boltdocs-tab-item ${isActive ? "active" : ""}`,
871
- children: [
872
- renderTabIcon(tab.icon),
873
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: tab.text })
874
- ]
875
- },
876
- tab.id
877
- );
878
- }) }) });
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
+ ] }) });
879
908
  }
880
- var import_react_router_dom4, Icons, import_jsx_runtime11;
909
+ var import_react8, import_react_router_dom4, Icons, import_jsx_runtime11;
881
910
  var init_Tabs = __esm({
882
911
  "src/client/theme/ui/Navbar/Tabs.tsx"() {
883
912
  "use strict";
913
+ import_react8 = require("react");
884
914
  import_react_router_dom4 = require("react-router-dom");
885
915
  init_Link2();
886
916
  Icons = __toESM(require("lucide-react"));
@@ -890,10 +920,10 @@ var init_Tabs = __esm({
890
920
 
891
921
  // src/client/theme/ui/SearchDialog/SearchDialog.tsx
892
922
  function SearchDialog({ routes }) {
893
- const [isOpen, setIsOpen] = (0, import_react8.useState)(false);
894
- const [query, setQuery] = (0, import_react8.useState)("");
895
- const inputRef = (0, import_react8.useRef)(null);
896
- (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)(() => {
897
927
  const handleKeyDown = (e) => {
898
928
  if ((e.metaKey || e.ctrlKey) && e.key === "k") {
899
929
  e.preventDefault();
@@ -906,14 +936,14 @@ function SearchDialog({ routes }) {
906
936
  window.addEventListener("keydown", handleKeyDown);
907
937
  return () => window.removeEventListener("keydown", handleKeyDown);
908
938
  }, [isOpen]);
909
- (0, import_react8.useEffect)(() => {
939
+ (0, import_react9.useEffect)(() => {
910
940
  if (isOpen) {
911
941
  setTimeout(() => inputRef.current?.focus(), 50);
912
942
  } else {
913
943
  setQuery("");
914
944
  }
915
945
  }, [isOpen]);
916
- const searchResults = import_react8.default.useMemo(() => {
946
+ const searchResults = import_react9.default.useMemo(() => {
917
947
  if (!query) {
918
948
  return routes.slice(0, 10).map((r) => ({
919
949
  title: r.title,
@@ -943,6 +973,13 @@ function SearchDialog({ routes }) {
943
973
  }
944
974
  }
945
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
+ }
946
983
  }
947
984
  const uniqueResults = [];
948
985
  const seenPaths = /* @__PURE__ */ new Set();
@@ -1063,11 +1100,11 @@ function SearchDialog({ routes }) {
1063
1100
  )
1064
1101
  ] });
1065
1102
  }
1066
- var import_react8, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
1103
+ var import_react9, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
1067
1104
  var init_SearchDialog = __esm({
1068
1105
  "src/client/theme/ui/SearchDialog/SearchDialog.tsx"() {
1069
1106
  "use strict";
1070
- import_react8 = __toESM(require("react"));
1107
+ import_react9 = __toESM(require("react"));
1071
1108
  import_react_dom2 = require("react-dom");
1072
1109
  init_Link2();
1073
1110
  import_lucide_react4 = require("lucide-react");
@@ -1173,7 +1210,7 @@ function Navbar({
1173
1210
  ] }),
1174
1211
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-right", children: [
1175
1212
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Right", children: rightItems.map(renderNavItem) }),
1176
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react9.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-search-placeholder" }), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchDialog2, { routes: routes || [] }) }),
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 || [] }) }),
1177
1214
  config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1178
1215
  LanguageSwitcher,
1179
1216
  {
@@ -1213,11 +1250,11 @@ function Navbar({
1213
1250
  )
1214
1251
  ] });
1215
1252
  }
1216
- var import_react9, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
1253
+ var import_react10, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
1217
1254
  var init_Navbar = __esm({
1218
1255
  "src/client/theme/ui/Navbar/Navbar.tsx"() {
1219
1256
  "use strict";
1220
- import_react9 = require("react");
1257
+ import_react10 = require("react");
1221
1258
  import_react_router_dom5 = require("react-router-dom");
1222
1259
  import_lucide_react5 = require("lucide-react");
1223
1260
  init_LanguageSwitcher2();
@@ -1228,7 +1265,7 @@ var init_Navbar = __esm({
1228
1265
  init_GithubStars();
1229
1266
  init_Tabs();
1230
1267
  import_jsx_runtime13 = require("react/jsx-runtime");
1231
- SearchDialog2 = (0, import_react9.lazy)(
1268
+ SearchDialog2 = (0, import_react10.lazy)(
1232
1269
  () => Promise.resolve().then(() => (init_SearchDialog2(), SearchDialog_exports)).then((m) => ({ default: m.SearchDialog }))
1233
1270
  );
1234
1271
  ICON_MAP = {
@@ -1405,7 +1442,7 @@ function SidebarGroupSection({
1405
1442
  currentPath
1406
1443
  }) {
1407
1444
  const isActive = group.routes.some((r) => currentPath === r.path);
1408
- const [open, setOpen] = (0, import_react10.useState)(true);
1445
+ const [open, setOpen] = (0, import_react11.useState)(true);
1409
1446
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-group", children: [
1410
1447
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1411
1448
  "button",
@@ -1437,11 +1474,11 @@ function SidebarGroupSection({
1437
1474
  ) }, route.path)) })
1438
1475
  ] });
1439
1476
  }
1440
- var import_react10, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
1477
+ var import_react11, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
1441
1478
  var init_Sidebar = __esm({
1442
1479
  "src/client/theme/ui/Sidebar/Sidebar.tsx"() {
1443
1480
  "use strict";
1444
- import_react10 = require("react");
1481
+ import_react11 = require("react");
1445
1482
  import_react_router_dom6 = require("react-router-dom");
1446
1483
  init_Link2();
1447
1484
  init_PoweredBy2();
@@ -1466,13 +1503,13 @@ function OnThisPage({
1466
1503
  communityHelp,
1467
1504
  filePath
1468
1505
  }) {
1469
- const [activeId, setActiveId] = (0, import_react11.useState)(null);
1470
- const [indicatorStyle, setIndicatorStyle] = (0, import_react11.useState)({});
1471
- const observerRef = (0, import_react11.useRef)(null);
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);
1472
1509
  const location = (0, import_react_router_dom7.useLocation)();
1473
- const listRef = (0, import_react11.useRef)(null);
1474
- const visibleIdsRef = (0, import_react11.useRef)(/* @__PURE__ */ new Set());
1475
- (0, import_react11.useEffect)(() => {
1510
+ const listRef = (0, import_react12.useRef)(null);
1511
+ const visibleIdsRef = (0, import_react12.useRef)(/* @__PURE__ */ new Set());
1512
+ (0, import_react12.useEffect)(() => {
1476
1513
  if (headings.length > 0) {
1477
1514
  const hash = window.location.hash.substring(1);
1478
1515
  if (hash && headings.some((h) => h.id === hash)) {
@@ -1482,7 +1519,7 @@ function OnThisPage({
1482
1519
  }
1483
1520
  }
1484
1521
  }, [location.pathname, headings]);
1485
- (0, import_react11.useEffect)(() => {
1522
+ (0, import_react12.useEffect)(() => {
1486
1523
  if (!activeId || !listRef.current) return;
1487
1524
  const activeLink = listRef.current.querySelector(
1488
1525
  `a[href="#${activeId}"]`
@@ -1497,7 +1534,7 @@ function OnThisPage({
1497
1534
  });
1498
1535
  }
1499
1536
  }, [activeId, headings]);
1500
- (0, import_react11.useEffect)(() => {
1537
+ (0, import_react12.useEffect)(() => {
1501
1538
  if (headings.length === 0) return;
1502
1539
  visibleIdsRef.current.clear();
1503
1540
  if (observerRef.current) {
@@ -1555,7 +1592,7 @@ function OnThisPage({
1555
1592
  window.removeEventListener("scroll", handleScroll);
1556
1593
  };
1557
1594
  }, [headings, location.pathname]);
1558
- (0, import_react11.useEffect)(() => {
1595
+ (0, import_react12.useEffect)(() => {
1559
1596
  if (!activeId || !listRef.current) return;
1560
1597
  const activeLink = listRef.current.querySelector(
1561
1598
  `a[href="#${activeId}"]`
@@ -1574,18 +1611,12 @@ function OnThisPage({
1574
1611
  }
1575
1612
  }
1576
1613
  }, [activeId]);
1577
- const handleClick = (0, import_react11.useCallback)(
1614
+ const handleClick = (0, import_react12.useCallback)(
1578
1615
  (e, id) => {
1579
1616
  e.preventDefault();
1580
1617
  const el = document.getElementById(id);
1581
1618
  if (el) {
1582
- const offset = 80;
1583
- const bodyRect = document.body.getBoundingClientRect().top;
1584
- const elementRect = el.getBoundingClientRect().top;
1585
- const elementPosition = elementRect - bodyRect;
1586
- const offsetPosition = elementPosition - offset;
1587
- window.scrollTo({
1588
- top: offsetPosition,
1619
+ el.scrollIntoView({
1589
1620
  behavior: "smooth"
1590
1621
  });
1591
1622
  setActiveId(id);
@@ -1643,11 +1674,11 @@ function OnThisPage({
1643
1674
  ] })
1644
1675
  ] });
1645
1676
  }
1646
- var import_react11, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
1677
+ var import_react12, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
1647
1678
  var init_OnThisPage = __esm({
1648
1679
  "src/client/theme/ui/OnThisPage/OnThisPage.tsx"() {
1649
1680
  "use strict";
1650
- import_react11 = require("react");
1681
+ import_react12 = require("react");
1651
1682
  import_react_router_dom7 = require("react-router-dom");
1652
1683
  import_lucide_react8 = require("lucide-react");
1653
1684
  import_jsx_runtime16 = require("react/jsx-runtime");
@@ -1665,7 +1696,7 @@ var init_OnThisPage2 = __esm({
1665
1696
  // src/client/theme/ui/Head/Head.tsx
1666
1697
  function Head({ siteTitle, siteDescription, routes }) {
1667
1698
  const location = (0, import_react_router_dom8.useLocation)();
1668
- (0, import_react12.useEffect)(() => {
1699
+ (0, import_react13.useEffect)(() => {
1669
1700
  const currentRoute = routes.find((r) => r.path === location.pathname);
1670
1701
  const pageTitle = currentRoute?.title;
1671
1702
  const pageDescription = currentRoute?.description || siteDescription || "";
@@ -1709,11 +1740,11 @@ function setMetaTag(attr, key, content) {
1709
1740
  }
1710
1741
  tag.content = content;
1711
1742
  }
1712
- var import_react12, import_react_router_dom8;
1743
+ var import_react13, import_react_router_dom8;
1713
1744
  var init_Head = __esm({
1714
1745
  "src/client/theme/ui/Head/Head.tsx"() {
1715
1746
  "use strict";
1716
- import_react12 = require("react");
1747
+ import_react13 = require("react");
1717
1748
  import_react_router_dom8 = require("react-router-dom");
1718
1749
  }
1719
1750
  });
@@ -1794,6 +1825,118 @@ var init_BackgroundGradient2 = __esm({
1794
1825
  }
1795
1826
  });
1796
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
+
1797
1940
  // src/client/theme/styles.css
1798
1941
  var init_styles = __esm({
1799
1942
  "src/client/theme/styles.css"() {
@@ -1832,13 +1975,14 @@ function ThemeLayout({
1832
1975
  const prevPage = localIndex > 0 ? filteredRoutes[localIndex - 1] : null;
1833
1976
  const nextPage = localIndex >= 0 && localIndex < filteredRoutes.length - 1 ? filteredRoutes[localIndex + 1] : null;
1834
1977
  const { preload } = usePreload();
1835
- import_react13.default.useEffect(() => {
1978
+ import_react16.default.useEffect(() => {
1836
1979
  if (prevPage?.path) preload(prevPage.path);
1837
1980
  if (nextPage?.path) preload(nextPage.path);
1838
1981
  }, [prevPage, nextPage, preload]);
1839
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
1840
- background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BackgroundGradient, {}),
1841
- head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
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)(
1842
1986
  Head,
1843
1987
  {
1844
1988
  siteTitle,
@@ -1846,7 +1990,7 @@ function ThemeLayout({
1846
1990
  routes
1847
1991
  }
1848
1992
  ),
1849
- navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1993
+ navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1850
1994
  Navbar,
1851
1995
  {
1852
1996
  config,
@@ -1856,43 +2000,43 @@ function ThemeLayout({
1856
2000
  currentVersion
1857
2001
  }
1858
2002
  ),
1859
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "boltdocs-main-container", children: [
1860
- sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sidebar, { routes: filteredRoutes, config }),
1861
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "boltdocs-content", children: [
1862
- breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
1863
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-page", children }),
1864
- (prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
1865
- prevPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
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)(
1866
2010
  Link,
1867
2011
  {
1868
2012
  to: prevPage.path || "/",
1869
2013
  className: "page-nav-link page-nav-link--prev",
1870
2014
  children: [
1871
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
1872
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Previous" }),
1873
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: prevPage.title })
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 })
1874
2018
  ] }),
1875
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
2019
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
1876
2020
  ]
1877
2021
  }
1878
- ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {}),
1879
- nextPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2022
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {}),
2023
+ nextPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1880
2024
  Link,
1881
2025
  {
1882
2026
  to: nextPage.path || "/",
1883
2027
  className: "page-nav-link page-nav-link--next",
1884
2028
  children: [
1885
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
1886
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Next" }),
1887
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: nextPage.title })
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 })
1888
2032
  ] }),
1889
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
2033
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
1890
2034
  ]
1891
2035
  }
1892
- ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {})
2036
+ ) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {})
1893
2037
  ] })
1894
2038
  ] }),
1895
- toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2039
+ toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1896
2040
  OnThisPage,
1897
2041
  {
1898
2042
  headings: routes[currentIndex]?.headings,
@@ -1904,11 +2048,11 @@ function ThemeLayout({
1904
2048
  ] })
1905
2049
  ] });
1906
2050
  }
1907
- var import_react13, import_react_router_dom10, import_lucide_react10, import_jsx_runtime19;
2051
+ var import_react16, import_react_router_dom10, import_lucide_react10, import_jsx_runtime21;
1908
2052
  var init_Layout = __esm({
1909
2053
  "src/client/theme/ui/Layout/Layout.tsx"() {
1910
2054
  "use strict";
1911
- import_react13 = __toESM(require("react"));
2055
+ import_react16 = __toESM(require("react"));
1912
2056
  import_react_router_dom10 = require("react-router-dom");
1913
2057
  init_Link2();
1914
2058
  import_lucide_react10 = require("lucide-react");
@@ -1925,8 +2069,10 @@ var init_Layout = __esm({
1925
2069
  init_Head2();
1926
2070
  init_Breadcrumbs2();
1927
2071
  init_BackgroundGradient2();
2072
+ init_ProgressBar3();
2073
+ init_ErrorBoundary2();
1928
2074
  init_styles();
1929
- import_jsx_runtime19 = require("react/jsx-runtime");
2075
+ import_jsx_runtime21 = require("react/jsx-runtime");
1930
2076
  }
1931
2077
  });
1932
2078
 
@@ -1940,23 +2086,23 @@ var init_Layout2 = __esm({
1940
2086
 
1941
2087
  // src/client/theme/ui/NotFound/NotFound.tsx
1942
2088
  function NotFound() {
1943
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "not-found-content", children: [
1944
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "not-found-code", children: "404" }),
1945
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
1946
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
1947
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Link, { to: "/", className: "not-found-link", children: [
1948
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
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 }),
1949
2095
  " Go to Home"
1950
2096
  ] })
1951
2097
  ] }) });
1952
2098
  }
1953
- var import_lucide_react11, import_jsx_runtime20;
2099
+ var import_lucide_react11, import_jsx_runtime22;
1954
2100
  var init_NotFound = __esm({
1955
2101
  "src/client/theme/ui/NotFound/NotFound.tsx"() {
1956
2102
  "use strict";
1957
2103
  init_Link2();
1958
2104
  import_lucide_react11 = require("lucide-react");
1959
- import_jsx_runtime20 = require("react/jsx-runtime");
2105
+ import_jsx_runtime22 = require("react/jsx-runtime");
1960
2106
  }
1961
2107
  });
1962
2108
 
@@ -1970,16 +2116,16 @@ var init_NotFound2 = __esm({
1970
2116
 
1971
2117
  // src/client/theme/ui/Loading/Loading.tsx
1972
2118
  function Loading() {
1973
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-loading", children: [
1974
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "loading-spinner" }),
1975
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "loading-text", children: "Loading..." })
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..." })
1976
2122
  ] });
1977
2123
  }
1978
- var import_jsx_runtime21;
2124
+ var import_jsx_runtime23;
1979
2125
  var init_Loading = __esm({
1980
2126
  "src/client/theme/ui/Loading/Loading.tsx"() {
1981
2127
  "use strict";
1982
- import_jsx_runtime21 = require("react/jsx-runtime");
2128
+ import_jsx_runtime23 = require("react/jsx-runtime");
1983
2129
  }
1984
2130
  });
1985
2131
 
@@ -1993,35 +2139,35 @@ var init_Loading2 = __esm({
1993
2139
 
1994
2140
  // src/client/theme/components/CodeBlock/CodeBlock.tsx
1995
2141
  function CodeBlock({ children, ...props }) {
1996
- const [copied, setCopied] = (0, import_react14.useState)(false);
1997
- const preRef = (0, import_react14.useRef)(null);
1998
- 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 () => {
1999
2145
  const code = preRef.current?.textContent || "";
2000
2146
  copyToClipboard(code);
2001
2147
  setCopied(true);
2002
2148
  setTimeout(() => setCopied(false), 2e3);
2003
2149
  }, []);
2004
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "code-block-wrapper", children: [
2005
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2150
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "code-block-wrapper", children: [
2151
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2006
2152
  "button",
2007
2153
  {
2008
2154
  className: `code-block-copy ${copied ? "copied" : ""}`,
2009
2155
  onClick: handleCopy,
2010
2156
  "aria-label": "Copy code",
2011
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Copy, { size: 16 })
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 })
2012
2158
  }
2013
2159
  ),
2014
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { ref: preRef, ...props, children })
2160
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { ref: preRef, ...props, children })
2015
2161
  ] });
2016
2162
  }
2017
- var import_react14, import_lucide_react12, import_jsx_runtime22;
2163
+ var import_react17, import_lucide_react12, import_jsx_runtime24;
2018
2164
  var init_CodeBlock = __esm({
2019
2165
  "src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
2020
2166
  "use strict";
2021
- import_react14 = require("react");
2167
+ import_react17 = require("react");
2022
2168
  import_lucide_react12 = require("lucide-react");
2023
2169
  init_utils();
2024
- import_jsx_runtime22 = require("react/jsx-runtime");
2170
+ import_jsx_runtime24 = require("react/jsx-runtime");
2025
2171
  }
2026
2172
  });
2027
2173
 
@@ -2043,9 +2189,9 @@ function Video({
2043
2189
  preload = "metadata",
2044
2190
  ...rest
2045
2191
  }) {
2046
- const containerRef = (0, import_react15.useRef)(null);
2047
- const [isVisible, setIsVisible] = (0, import_react15.useState)(false);
2048
- (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)(() => {
2049
2195
  const el = containerRef.current;
2050
2196
  if (!el) return;
2051
2197
  const observer = new IntersectionObserver(
@@ -2060,7 +2206,7 @@ function Video({
2060
2206
  observer.observe(el);
2061
2207
  return () => observer.disconnect();
2062
2208
  }, []);
2063
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2209
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2064
2210
  "video",
2065
2211
  {
2066
2212
  className: "boltdocs-video",
@@ -2075,7 +2221,7 @@ function Video({
2075
2221
  "Your browser does not support the video tag."
2076
2222
  ]
2077
2223
  }
2078
- ) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2224
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2079
2225
  "div",
2080
2226
  {
2081
2227
  className: "boltdocs-video-placeholder",
@@ -2084,12 +2230,12 @@ function Video({
2084
2230
  }
2085
2231
  ) });
2086
2232
  }
2087
- var import_react15, import_jsx_runtime23;
2233
+ var import_react18, import_jsx_runtime25;
2088
2234
  var init_Video = __esm({
2089
2235
  "src/client/theme/components/Video/Video.tsx"() {
2090
2236
  "use strict";
2091
- import_react15 = require("react");
2092
- import_jsx_runtime23 = require("react/jsx-runtime");
2237
+ import_react18 = require("react");
2238
+ import_jsx_runtime25 = require("react/jsx-runtime");
2093
2239
  }
2094
2240
  });
2095
2241
 
@@ -2106,14 +2252,14 @@ var init_Video2 = __esm({
2106
2252
  });
2107
2253
 
2108
2254
  // src/client/theme/icons/npm.tsx
2109
- var import_jsx_runtime24, NPM;
2255
+ var import_jsx_runtime26, NPM;
2110
2256
  var init_npm = __esm({
2111
2257
  "src/client/theme/icons/npm.tsx"() {
2112
2258
  "use strict";
2113
- import_jsx_runtime24 = require("react/jsx-runtime");
2114
- NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
2115
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
2116
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
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)(
2117
2263
  "path",
2118
2264
  {
2119
2265
  fill: "#fff",
@@ -2125,69 +2271,69 @@ var init_npm = __esm({
2125
2271
  });
2126
2272
 
2127
2273
  // src/client/theme/icons/pnpm.tsx
2128
- var import_jsx_runtime25, Pnpm;
2274
+ var import_jsx_runtime27, Pnpm;
2129
2275
  var init_pnpm = __esm({
2130
2276
  "src/client/theme/icons/pnpm.tsx"() {
2131
2277
  "use strict";
2132
- import_jsx_runtime25 = require("react/jsx-runtime");
2133
- Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2278
+ import_jsx_runtime27 = require("react/jsx-runtime");
2279
+ Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2134
2280
  "svg",
2135
2281
  {
2136
2282
  ...props,
2137
2283
  xmlnsXlink: "http://www.w3.org/1999/xlink",
2138
2284
  viewBox: "76.58987244897958 44 164.00775510204068 164",
2139
2285
  children: [
2140
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("defs", { children: [
2141
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2286
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("defs", { children: [
2287
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2142
2288
  "path",
2143
2289
  {
2144
2290
  d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
2145
2291
  id: "pnpm_dark__b45vdTD8hs"
2146
2292
  }
2147
2293
  ),
2148
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2294
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2149
2295
  "path",
2150
2296
  {
2151
2297
  d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
2152
2298
  id: "pnpm_dark__a40WtxIl8d"
2153
2299
  }
2154
2300
  ),
2155
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2301
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2156
2302
  "path",
2157
2303
  {
2158
2304
  d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
2159
2305
  id: "pnpm_dark__h2CN9AEEpe"
2160
2306
  }
2161
2307
  ),
2162
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2308
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2163
2309
  "path",
2164
2310
  {
2165
2311
  d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
2166
2312
  id: "pnpm_dark__dqv5133G8"
2167
2313
  }
2168
2314
  ),
2169
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2315
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2170
2316
  "path",
2171
2317
  {
2172
2318
  d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
2173
2319
  id: "pnpm_dark__b1Lv79ypvm"
2174
2320
  }
2175
2321
  ),
2176
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2322
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2177
2323
  "path",
2178
2324
  {
2179
2325
  d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
2180
2326
  id: "pnpm_dark__hy1IZWwLX"
2181
2327
  }
2182
2328
  ),
2183
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2329
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2184
2330
  "path",
2185
2331
  {
2186
2332
  d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
2187
2333
  id: "pnpm_dark__akQfjxQes"
2188
2334
  }
2189
2335
  ),
2190
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2336
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2191
2337
  "path",
2192
2338
  {
2193
2339
  d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
@@ -2195,15 +2341,15 @@ var init_pnpm = __esm({
2195
2341
  }
2196
2342
  )
2197
2343
  ] }),
2198
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
2199
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
2200
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
2201
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
2202
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
2203
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
2204
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
2205
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
2206
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
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" }) })
2207
2353
  ] })
2208
2354
  ]
2209
2355
  }
@@ -2212,62 +2358,62 @@ var init_pnpm = __esm({
2212
2358
  });
2213
2359
 
2214
2360
  // src/client/theme/icons/bun.tsx
2215
- var import_jsx_runtime26, Bun;
2361
+ var import_jsx_runtime28, Bun;
2216
2362
  var init_bun = __esm({
2217
2363
  "src/client/theme/icons/bun.tsx"() {
2218
2364
  "use strict";
2219
- import_jsx_runtime26 = require("react/jsx-runtime");
2220
- Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
2221
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z" }),
2222
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
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)(
2223
2369
  "path",
2224
2370
  {
2225
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",
2226
2372
  style: { fill: "#fbf0df" }
2227
2373
  }
2228
2374
  ),
2229
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2375
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2230
2376
  "path",
2231
2377
  {
2232
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",
2233
2379
  style: { fill: "#f6dece" }
2234
2380
  }
2235
2381
  ),
2236
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2382
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2237
2383
  "path",
2238
2384
  {
2239
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",
2240
2386
  style: { fill: "#fffefc" }
2241
2387
  }
2242
2388
  ),
2243
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2389
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2244
2390
  "path",
2245
2391
  {
2246
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",
2247
2393
  style: { fill: "#ccbea7", fillRule: "evenodd" }
2248
2394
  }
2249
2395
  ),
2250
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z" }),
2251
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
2252
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
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)(
2253
2399
  "path",
2254
2400
  {
2255
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",
2256
2402
  style: { fill: "#b71422" }
2257
2403
  }
2258
2404
  ),
2259
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2405
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2260
2406
  "path",
2261
2407
  {
2262
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",
2263
2409
  style: { fill: "#ff6164" }
2264
2410
  }
2265
2411
  ),
2266
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z" }),
2267
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z" })
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" })
2268
2414
  ] }),
2269
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
2270
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2415
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
2416
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2271
2417
  "ellipse",
2272
2418
  {
2273
2419
  cx: "53.22",
@@ -2277,7 +2423,7 @@ var init_bun = __esm({
2277
2423
  style: { fill: "#febbd0" }
2278
2424
  }
2279
2425
  ),
2280
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2426
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2281
2427
  "ellipse",
2282
2428
  {
2283
2429
  cx: "22.95",
@@ -2287,14 +2433,14 @@ var init_bun = __esm({
2287
2433
  style: { fill: "#febbd0" }
2288
2434
  }
2289
2435
  ),
2290
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2436
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2291
2437
  "path",
2292
2438
  {
2293
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",
2294
2440
  style: { fillRule: "evenodd" }
2295
2441
  }
2296
2442
  ),
2297
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2443
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2298
2444
  "path",
2299
2445
  {
2300
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",
@@ -2307,12 +2453,12 @@ var init_bun = __esm({
2307
2453
  });
2308
2454
 
2309
2455
  // src/client/theme/icons/deno.tsx
2310
- var import_jsx_runtime27, Deno;
2456
+ var import_jsx_runtime29, Deno;
2311
2457
  var init_deno = __esm({
2312
2458
  "src/client/theme/icons/deno.tsx"() {
2313
2459
  "use strict";
2314
- import_jsx_runtime27 = require("react/jsx-runtime");
2315
- Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2460
+ import_jsx_runtime29 = require("react/jsx-runtime");
2461
+ Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2316
2462
  "svg",
2317
2463
  {
2318
2464
  ...props,
@@ -2322,7 +2468,7 @@ var init_deno = __esm({
2322
2468
  strokeMiterlimit: "2",
2323
2469
  clipRule: "evenodd",
2324
2470
  viewBox: "0 0 441 441",
2325
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2471
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2326
2472
  "path",
2327
2473
  {
2328
2474
  fill: "currentColor",
@@ -2369,19 +2515,19 @@ function PackageManagerTabs({
2369
2515
  pkg = "",
2370
2516
  className = ""
2371
2517
  }) {
2372
- const [activeTab, setActiveTab] = (0, import_react16.useState)("npm");
2373
- 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);
2374
2520
  const activeCommand = getCommandForManager(activeTab, command, pkg);
2375
- const handleCopy = (0, import_react16.useCallback)(async () => {
2521
+ const handleCopy = (0, import_react19.useCallback)(async () => {
2376
2522
  copyToClipboard(activeCommand);
2377
2523
  setCopied(true);
2378
2524
  setTimeout(() => setCopied(false), 2e3);
2379
2525
  }, [activeCommand]);
2380
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
2381
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
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) => {
2382
2528
  const Icon = mgr.icon;
2383
2529
  const isActive = activeTab === mgr.id;
2384
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2530
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2385
2531
  "button",
2386
2532
  {
2387
2533
  className: `pkg-tab-btn ${isActive ? "active" : ""}`,
@@ -2389,40 +2535,40 @@ function PackageManagerTabs({
2389
2535
  "aria-selected": isActive,
2390
2536
  role: "tab",
2391
2537
  children: [
2392
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
2393
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: mgr.label })
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 })
2394
2540
  ]
2395
2541
  },
2396
2542
  mgr.id
2397
2543
  );
2398
2544
  }) }),
2399
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2400
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2545
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
2546
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2401
2547
  "button",
2402
2548
  {
2403
2549
  className: `code-block-copy ${copied ? "copied" : ""}`,
2404
2550
  onClick: handleCopy,
2405
2551
  type: "button",
2406
2552
  "aria-label": "Copy code",
2407
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Copy, { size: 14 })
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 })
2408
2554
  }
2409
2555
  ),
2410
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "line", children: activeCommand }) }) })
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 }) }) })
2411
2557
  ] })
2412
2558
  ] });
2413
2559
  }
2414
- var import_react16, import_lucide_react13, import_jsx_runtime28, MANAGERS;
2560
+ var import_react19, import_lucide_react13, import_jsx_runtime30, MANAGERS;
2415
2561
  var init_PackageManagerTabs = __esm({
2416
2562
  "src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
2417
2563
  "use strict";
2418
- import_react16 = require("react");
2564
+ import_react19 = require("react");
2419
2565
  import_lucide_react13 = require("lucide-react");
2420
2566
  init_npm();
2421
2567
  init_pnpm();
2422
2568
  init_bun();
2423
2569
  init_deno();
2424
2570
  init_utils();
2425
- import_jsx_runtime28 = require("react/jsx-runtime");
2571
+ import_jsx_runtime30 = require("react/jsx-runtime");
2426
2572
  MANAGERS = [
2427
2573
  { id: "npm", label: "npm", icon: NPM },
2428
2574
  { id: "pnpm", label: "pnpm", icon: Pnpm },
@@ -2446,7 +2592,7 @@ var init_PackageManagerTabs2 = __esm({
2446
2592
 
2447
2593
  // src/client/app/index.tsx
2448
2594
  function useConfig() {
2449
- return (0, import_react19.useContext)(ConfigContext);
2595
+ return (0, import_react22.useContext)(ConfigContext);
2450
2596
  }
2451
2597
  function AppShell({
2452
2598
  initialRoutes,
@@ -2457,8 +2603,8 @@ function AppShell({
2457
2603
  homePage: HomePage,
2458
2604
  components: customComponents = {}
2459
2605
  }) {
2460
- const [routesInfo, setRoutesInfo] = (0, import_react17.useState)(initialRoutes);
2461
- const [config] = (0, import_react17.useState)(initialConfig);
2606
+ const [routesInfo, setRoutesInfo] = (0, import_react20.useState)(initialRoutes);
2607
+ const [config] = (0, import_react20.useState)(initialConfig);
2462
2608
  const resolveRoutes = (infos) => {
2463
2609
  return infos.filter(
2464
2610
  (route) => !(HomePage && (route.path === "/" || route.path === ""))
@@ -2469,35 +2615,35 @@ function AppShell({
2469
2615
  const loader = loaderKey ? modules[loaderKey] : null;
2470
2616
  return {
2471
2617
  ...route,
2472
- Component: import_react17.default.lazy(() => {
2618
+ Component: import_react20.default.lazy(() => {
2473
2619
  if (!loader)
2474
- return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {}) });
2620
+ return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {}) });
2475
2621
  return loader();
2476
2622
  })
2477
2623
  };
2478
2624
  });
2479
2625
  };
2480
- const [resolvedRoutes, setResolvedRoutes] = (0, import_react17.useState)(
2626
+ const [resolvedRoutes, setResolvedRoutes] = (0, import_react20.useState)(
2481
2627
  () => resolveRoutes(initialRoutes)
2482
2628
  );
2483
- (0, import_react17.useEffect)(() => {
2629
+ (0, import_react20.useEffect)(() => {
2484
2630
  if (hot) {
2485
2631
  hot.on("boltdocs:routes-update", (newRoutes) => {
2486
2632
  setRoutesInfo(newRoutes);
2487
2633
  });
2488
2634
  }
2489
2635
  }, [hot]);
2490
- (0, import_react17.useEffect)(() => {
2636
+ (0, import_react20.useEffect)(() => {
2491
2637
  setResolvedRoutes(resolveRoutes(routesInfo));
2492
2638
  }, [routesInfo, modules, docsDirName]);
2493
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
2494
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScrollHandler, {}),
2495
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_router_dom11.Routes, { children: [
2496
- HomePage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
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)(
2497
2643
  import_react_router_dom11.Route,
2498
2644
  {
2499
2645
  path: "/",
2500
- element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2646
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2501
2647
  ThemeLayout,
2502
2648
  {
2503
2649
  config,
@@ -2506,20 +2652,20 @@ function AppShell({
2506
2652
  toc: null,
2507
2653
  breadcrumbs: null,
2508
2654
  ...config.themeConfig?.layoutProps,
2509
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HomePage, {})
2655
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HomePage, {})
2510
2656
  }
2511
2657
  )
2512
2658
  }
2513
2659
  ),
2514
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2660
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2515
2661
  import_react_router_dom11.Route,
2516
2662
  {
2517
- element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DocsLayout, { config, routes: routesInfo }),
2518
- children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2663
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DocsLayout, { config, routes: routesInfo }),
2664
+ children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2519
2665
  import_react_router_dom11.Route,
2520
2666
  {
2521
2667
  path: route.path === "" ? "/" : route.path,
2522
- element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react17.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
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)(
2523
2669
  MdxPage,
2524
2670
  {
2525
2671
  Component: route.Component,
@@ -2532,17 +2678,17 @@ function AppShell({
2532
2678
  },
2533
2679
  "docs-layout"
2534
2680
  ),
2535
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2681
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2536
2682
  import_react_router_dom11.Route,
2537
2683
  {
2538
2684
  path: "*",
2539
- element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2685
+ element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2540
2686
  ThemeLayout,
2541
2687
  {
2542
2688
  config,
2543
2689
  routes: routesInfo,
2544
2690
  ...config.themeConfig?.layoutProps,
2545
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {})
2691
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {})
2546
2692
  }
2547
2693
  )
2548
2694
  }
@@ -2552,24 +2698,26 @@ function AppShell({
2552
2698
  }
2553
2699
  function ScrollHandler() {
2554
2700
  const { pathname, hash } = (0, import_react_router_dom11.useLocation)();
2555
- (0, import_react19.useLayoutEffect)(() => {
2701
+ (0, import_react22.useLayoutEffect)(() => {
2702
+ const container = document.querySelector(".boltdocs-content");
2703
+ if (!container) return;
2556
2704
  if (hash) {
2557
2705
  const id = hash.replace("#", "");
2558
2706
  const element = document.getElementById(id);
2559
2707
  if (element) {
2560
2708
  const offset = 80;
2561
- const bodyRect = document.body.getBoundingClientRect().top;
2709
+ const containerRect = container.getBoundingClientRect().top;
2562
2710
  const elementRect = element.getBoundingClientRect().top;
2563
- const elementPosition = elementRect - bodyRect;
2564
- const offsetPosition = elementPosition - offset;
2565
- window.scrollTo({
2711
+ const elementPosition = elementRect - containerRect;
2712
+ const offsetPosition = elementPosition - offset + container.scrollTop;
2713
+ container.scrollTo({
2566
2714
  top: offsetPosition,
2567
2715
  behavior: "smooth"
2568
2716
  });
2569
2717
  return;
2570
2718
  }
2571
2719
  }
2572
- window.scrollTo(0, 0);
2720
+ container.scrollTo(0, 0);
2573
2721
  }, [pathname, hash]);
2574
2722
  return null;
2575
2723
  }
@@ -2577,22 +2725,22 @@ function DocsLayout({
2577
2725
  config,
2578
2726
  routes
2579
2727
  }) {
2580
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2728
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2581
2729
  ThemeLayout,
2582
2730
  {
2583
2731
  config,
2584
2732
  routes,
2585
2733
  ...config.themeConfig?.layoutProps,
2586
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_router_dom11.Outlet, {})
2734
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.Outlet, {})
2587
2735
  }
2588
2736
  );
2589
2737
  }
2590
2738
  function MdxPage({
2591
- Component,
2739
+ Component: Component2,
2592
2740
  customComponents = {}
2593
2741
  }) {
2594
2742
  const allComponents = { ...mdxComponents, ...customComponents };
2595
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react18.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Component, {}) });
2743
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component2, {}) });
2596
2744
  }
2597
2745
  function createBoltdocsApp(options) {
2598
2746
  const { target, routes, docsDirName, config, modules, hot, homePage } = options;
@@ -2602,7 +2750,7 @@ function createBoltdocsApp(options) {
2602
2750
  `[boltdocs] Mount target "${target}" not found in document.`
2603
2751
  );
2604
2752
  }
2605
- const app = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react17.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_router_dom11.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
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)(
2606
2754
  AppShell,
2607
2755
  {
2608
2756
  initialRoutes: routes,
@@ -2617,27 +2765,27 @@ function createBoltdocsApp(options) {
2617
2765
  container.innerHTML = "";
2618
2766
  import_client.default.createRoot(container).render(app);
2619
2767
  }
2620
- var import_react17, import_client, import_react_router_dom11, import_react18, import_react19, import_lucide_react14, import_jsx_runtime29, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
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;
2621
2769
  var init_app = __esm({
2622
2770
  "src/client/app/index.tsx"() {
2623
2771
  "use strict";
2624
- import_react17 = __toESM(require("react"));
2772
+ import_react20 = __toESM(require("react"));
2625
2773
  import_client = __toESM(require("react-dom/client"));
2626
2774
  import_react_router_dom11 = require("react-router-dom");
2627
2775
  init_Layout2();
2628
2776
  init_NotFound2();
2629
2777
  init_Loading2();
2630
- import_react18 = require("@mdx-js/react");
2631
- import_react19 = require("react");
2778
+ import_react21 = require("@mdx-js/react");
2779
+ import_react22 = require("react");
2632
2780
  import_lucide_react14 = require("lucide-react");
2633
2781
  init_CodeBlock2();
2634
2782
  init_preload();
2635
- import_jsx_runtime29 = require("react/jsx-runtime");
2636
- ConfigContext = (0, import_react19.createContext)(null);
2637
- 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)(
2638
2786
  () => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
2639
2787
  );
2640
- PackageManagerTabs2 = (0, import_react19.lazy)(
2788
+ PackageManagerTabs2 = (0, import_react22.lazy)(
2641
2789
  () => Promise.resolve().then(() => (init_PackageManagerTabs2(), PackageManagerTabs_exports)).then((m) => ({
2642
2790
  default: m.PackageManagerTabs
2643
2791
  }))
@@ -2648,21 +2796,21 @@ var init_app = __esm({
2648
2796
  children
2649
2797
  }) => {
2650
2798
  const Tag = `h${level}`;
2651
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2799
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
2652
2800
  children,
2653
- id && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Link, { size: 16 }) })
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 }) })
2654
2802
  ] });
2655
2803
  };
2656
2804
  mdxComponents = {
2657
- h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 1, ...props }),
2658
- h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 2, ...props }),
2659
- h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 3, ...props }),
2660
- h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 4, ...props }),
2661
- h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 5, ...props }),
2662
- h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 6, ...props }),
2663
- pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CodeBlock, { ...props, children: props.children }),
2664
- video: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Video2, { ...props }) }),
2665
- PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PackageManagerTabs2, { ...props }) })
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 }) })
2666
2814
  };
2667
2815
  }
2668
2816
  });
@@ -2710,10 +2858,10 @@ init_Breadcrumbs2();
2710
2858
  init_BackgroundGradient2();
2711
2859
 
2712
2860
  // src/client/theme/components/Playground/Playground.tsx
2713
- var import_react20 = __toESM(require("react"));
2861
+ var import_react23 = __toESM(require("react"));
2714
2862
  var import_react_live = require("react-live");
2715
2863
  var import_lucide_react15 = require("lucide-react");
2716
- var import_jsx_runtime30 = require("react/jsx-runtime");
2864
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2717
2865
  function prepareCode(raw) {
2718
2866
  const trimmed = raw.trim();
2719
2867
  const fnMatch = trimmed.match(/export\s+default\s+function\s+(\w+)/);
@@ -2746,48 +2894,48 @@ function Playground({
2746
2894
  }
2747
2895
  const prepared = prepareCode(initialCode);
2748
2896
  const useNoInline = forceNoInline ?? prepared.noInline;
2749
- const [copied, setCopied] = (0, import_react20.useState)(false);
2750
- 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);
2751
2899
  const handleCopy = () => {
2752
2900
  navigator.clipboard.writeText(activeCode);
2753
2901
  setCopied(true);
2754
2902
  setTimeout(() => setCopied(false), 2e3);
2755
2903
  };
2756
- const extendedScope = { React: import_react20.default, ...scope };
2757
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "boltdocs-playground", "data-readonly": readonly, children: /* @__PURE__ */ (0, import_jsx_runtime30.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)(
2758
2906
  import_react_live.LiveProvider,
2759
2907
  {
2760
2908
  code: activeCode,
2761
2909
  scope: extendedScope,
2762
2910
  theme: void 0,
2763
2911
  noInline: useNoInline,
2764
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-split-container", children: [
2765
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel playground-editor-panel", children: [
2766
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-header", children: [
2767
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-title", children: [
2768
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Terminal, { size: 14 }),
2769
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: readonly ? "Code Example" : "Live Editor" })
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" })
2770
2918
  ] }),
2771
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2919
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2772
2920
  "button",
2773
2921
  {
2774
2922
  className: "playground-copy-btn",
2775
2923
  onClick: handleCopy,
2776
2924
  title: "Copy code",
2777
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Copy, { size: 14 })
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 })
2778
2926
  }
2779
2927
  )
2780
2928
  ] }),
2781
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "playground-panel-content playground-editor", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LiveEditor, { disabled: readonly, onChange: setActiveCode }) })
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 }) })
2782
2930
  ] }),
2783
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel playground-preview-panel", children: [
2784
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-title", children: [
2785
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Play, { size: 14 }),
2786
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: "Preview" })
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" })
2787
2935
  ] }) }),
2788
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "playground-panel-content playground-preview", children: [
2789
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LivePreview, {}),
2790
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_live.LiveError, { className: "playground-error" })
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" })
2791
2939
  ] })
2792
2940
  ] })
2793
2941
  ] })
@@ -2802,7 +2950,7 @@ init_CodeBlock2();
2802
2950
  init_Video2();
2803
2951
 
2804
2952
  // src/client/theme/components/mdx/Button.tsx
2805
- var import_jsx_runtime31 = require("react/jsx-runtime");
2953
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2806
2954
  function Button({
2807
2955
  variant = "primary",
2808
2956
  size = "md",
@@ -2813,7 +2961,7 @@ function Button({
2813
2961
  }) {
2814
2962
  const cls = `ld-btn ld-btn--${variant} ld-btn--${size} ${className}`.trim();
2815
2963
  if (href) {
2816
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2964
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2817
2965
  "a",
2818
2966
  {
2819
2967
  href,
@@ -2824,18 +2972,18 @@ function Button({
2824
2972
  }
2825
2973
  );
2826
2974
  }
2827
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { className: cls, ...rest, children });
2975
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { className: cls, ...rest, children });
2828
2976
  }
2829
2977
 
2830
2978
  // src/client/theme/components/mdx/Badge.tsx
2831
- var import_jsx_runtime32 = require("react/jsx-runtime");
2979
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2832
2980
  function Badge({
2833
2981
  variant = "default",
2834
2982
  children,
2835
2983
  className = "",
2836
2984
  ...rest
2837
2985
  }) {
2838
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2986
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2839
2987
  "span",
2840
2988
  {
2841
2989
  className: `ld-badge ld-badge--${variant} ${className}`.trim(),
@@ -2846,14 +2994,14 @@ function Badge({
2846
2994
  }
2847
2995
 
2848
2996
  // src/client/theme/components/mdx/Card.tsx
2849
- var import_jsx_runtime33 = require("react/jsx-runtime");
2997
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2850
2998
  function Cards({
2851
2999
  cols = 3,
2852
3000
  children,
2853
3001
  className = "",
2854
3002
  ...rest
2855
3003
  }) {
2856
- return /* @__PURE__ */ (0, import_jsx_runtime33.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 });
2857
3005
  }
2858
3006
  function Card({
2859
3007
  title,
@@ -2863,13 +3011,13 @@ function Card({
2863
3011
  className = "",
2864
3012
  ...rest
2865
3013
  }) {
2866
- const inner = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2867
- icon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "ld-card__icon", children: icon }),
2868
- title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h3", { className: "ld-card__title", children: title }),
2869
- children && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "ld-card__body", children })
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 })
2870
3018
  ] });
2871
3019
  if (href) {
2872
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3020
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2873
3021
  "a",
2874
3022
  {
2875
3023
  href,
@@ -2879,34 +3027,34 @@ function Card({
2879
3027
  }
2880
3028
  );
2881
3029
  }
2882
- return /* @__PURE__ */ (0, import_jsx_runtime33.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 });
2883
3031
  }
2884
3032
 
2885
3033
  // src/client/theme/components/mdx/Tabs.tsx
2886
- var import_react21 = require("react");
3034
+ var import_react24 = require("react");
2887
3035
  init_CodeBlock2();
2888
3036
  init_npm();
2889
3037
  init_pnpm();
2890
3038
  init_bun();
2891
3039
  init_deno();
2892
- var import_jsx_runtime34 = require("react/jsx-runtime");
3040
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2893
3041
  function Tab({ children }) {
2894
- const content = typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CodeBlock, { className: "language-bash", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("code", { children: children.trim() }) }) : children;
2895
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tab-panel", children: content });
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 });
2896
3044
  }
2897
3045
  var getIconForLabel = (label) => {
2898
3046
  const l = label.toLowerCase();
2899
- if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Pnpm, {});
2900
- if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NPM, {});
2901
- if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Bun, {});
2902
- if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Deno, {});
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, {});
2903
3051
  return null;
2904
3052
  };
2905
3053
  function Tabs2({ defaultIndex = 0, children }) {
2906
- const [active, setActive] = (0, import_react21.useState)(defaultIndex);
2907
- const tabRefs = (0, import_react21.useRef)([]);
2908
- const tabs = import_react21.Children.toArray(children).filter(
2909
- (child) => (0, import_react21.isValidElement)(child) && child.props?.label
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
2910
3058
  );
2911
3059
  const handleKeyDown = (e) => {
2912
3060
  let newIndex = active;
@@ -2920,11 +3068,11 @@ function Tabs2({ defaultIndex = 0, children }) {
2920
3068
  tabRefs.current[newIndex]?.focus();
2921
3069
  }
2922
3070
  };
2923
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ld-tabs", children: [
2924
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
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) => {
2925
3073
  const label = child.props.label;
2926
3074
  const Icon = getIconForLabel(label);
2927
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3075
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2928
3076
  "button",
2929
3077
  {
2930
3078
  role: "tab",
@@ -2939,13 +3087,13 @@ function Tabs2({ defaultIndex = 0, children }) {
2939
3087
  onClick: () => setActive(i),
2940
3088
  children: [
2941
3089
  Icon,
2942
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label })
3090
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: label })
2943
3091
  ]
2944
3092
  },
2945
3093
  i
2946
3094
  );
2947
3095
  }) }),
2948
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3096
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2949
3097
  "div",
2950
3098
  {
2951
3099
  className: "ld-tabs__content",
@@ -2960,13 +3108,13 @@ function Tabs2({ defaultIndex = 0, children }) {
2960
3108
 
2961
3109
  // src/client/theme/components/mdx/Admonition.tsx
2962
3110
  var import_lucide_react16 = require("lucide-react");
2963
- var import_jsx_runtime35 = require("react/jsx-runtime");
3111
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2964
3112
  var ICON_MAP2 = {
2965
- note: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Bookmark, { size: 18 }),
2966
- tip: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Lightbulb, { size: 18 }),
2967
- info: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Info, { size: 18 }),
2968
- warning: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.AlertTriangle, { size: 18 }),
2969
- danger: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ShieldAlert, { size: 18 })
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 })
2970
3118
  };
2971
3119
  var LABEL_MAP = {
2972
3120
  note: "Note",
@@ -2982,35 +3130,35 @@ function Admonition({
2982
3130
  className = "",
2983
3131
  ...rest
2984
3132
  }) {
2985
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3133
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2986
3134
  "div",
2987
3135
  {
2988
3136
  className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
2989
3137
  role: type === "warning" || type === "danger" ? "alert" : "note",
2990
3138
  ...rest,
2991
3139
  children: [
2992
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "ld-admonition__header", children: [
2993
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
2994
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
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] })
2995
3143
  ] }),
2996
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ld-admonition__body", children })
3144
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-admonition__body", children })
2997
3145
  ]
2998
3146
  }
2999
3147
  );
3000
3148
  }
3001
- var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "note", ...props });
3002
- var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "tip", ...props });
3003
- var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "warning", ...props });
3004
- var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "danger", ...props });
3005
- var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Admonition, { type: "info", ...props });
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 });
3006
3154
 
3007
3155
  // src/client/theme/components/mdx/List.tsx
3008
- var import_react22 = __toESM(require("react"));
3156
+ var import_react25 = __toESM(require("react"));
3009
3157
  var import_lucide_react17 = require("lucide-react");
3010
- var import_jsx_runtime36 = require("react/jsx-runtime");
3158
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3011
3159
  var ICON_MAP3 = {
3012
- checked: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Check, { size: 14, className: "ld-list__icon" }),
3013
- arrow: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronRight, { size: 14, className: "ld-list__icon" })
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" })
3014
3162
  };
3015
3163
  function List({
3016
3164
  variant = "default",
@@ -3019,27 +3167,27 @@ function List({
3019
3167
  ...rest
3020
3168
  }) {
3021
3169
  if (variant === "default") {
3022
- return /* @__PURE__ */ (0, import_jsx_runtime36.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 });
3023
3171
  }
3024
3172
  const icon = ICON_MAP3[variant];
3025
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react22.Children.map(children, (child) => {
3026
- if (!import_react22.default.isValidElement(child)) return child;
3027
- return /* @__PURE__ */ (0, import_jsx_runtime36.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: [
3028
3176
  icon,
3029
- /* @__PURE__ */ (0, import_jsx_runtime36.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 })
3030
3178
  ] });
3031
3179
  }) });
3032
3180
  }
3033
3181
 
3034
3182
  // src/client/theme/components/mdx/FileTree.tsx
3035
- var import_react23 = __toESM(require("react"));
3183
+ var import_react26 = __toESM(require("react"));
3036
3184
  var import_lucide_react18 = require("lucide-react");
3037
- var import_jsx_runtime37 = require("react/jsx-runtime");
3185
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3038
3186
  function getTextContent(node) {
3039
3187
  if (typeof node === "string") return node;
3040
3188
  if (typeof node === "number") return node.toString();
3041
3189
  if (Array.isArray(node)) return node.map(getTextContent).join("");
3042
- if ((0, import_react23.isValidElement)(node)) {
3190
+ if ((0, import_react26.isValidElement)(node)) {
3043
3191
  return getTextContent(node.props.children);
3044
3192
  }
3045
3193
  return "";
@@ -3047,13 +3195,13 @@ function getTextContent(node) {
3047
3195
  function getFileIcon(filename) {
3048
3196
  const name = filename.toLowerCase();
3049
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")) {
3050
- return /* @__PURE__ */ (0, import_jsx_runtime37.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" });
3051
3199
  }
3052
3200
  if (name.endsWith(".md") || name.endsWith(".mdx") || name.endsWith(".txt")) {
3053
- return /* @__PURE__ */ (0, import_jsx_runtime37.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" });
3054
3202
  }
3055
3203
  if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
3056
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3204
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3057
3205
  import_lucide_react18.FileImage,
3058
3206
  {
3059
3207
  size: 16,
@@ -3062,7 +3210,7 @@ function getFileIcon(filename) {
3062
3210
  }
3063
3211
  );
3064
3212
  }
3065
- return /* @__PURE__ */ (0, import_jsx_runtime37.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" });
3066
3214
  }
3067
3215
  function isListElement(node, tag) {
3068
3216
  if (typeof node.type === "string") {
@@ -3084,16 +3232,16 @@ function FolderNode({
3084
3232
  nestedNodes,
3085
3233
  depth
3086
3234
  }) {
3087
- const [isOpen, setIsOpen] = (0, import_react23.useState)(true);
3088
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { className: "ld-file-tree__item", children: [
3089
- /* @__PURE__ */ (0, import_jsx_runtime37.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)(
3090
3238
  "div",
3091
3239
  {
3092
3240
  className: "ld-file-tree__label ld-file-tree__label--folder",
3093
3241
  onClick: () => setIsOpen(!isOpen),
3094
3242
  style: { cursor: "pointer" },
3095
3243
  children: [
3096
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
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)(
3097
3245
  import_lucide_react18.ChevronRight,
3098
3246
  {
3099
3247
  size: 14,
@@ -3101,7 +3249,7 @@ function FolderNode({
3101
3249
  strokeWidth: 3
3102
3250
  }
3103
3251
  ) }),
3104
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3252
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3105
3253
  import_lucide_react18.Folder,
3106
3254
  {
3107
3255
  size: 16,
@@ -3111,30 +3259,30 @@ function FolderNode({
3111
3259
  fillOpacity: 0.15
3112
3260
  }
3113
3261
  ) }),
3114
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3262
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__name", children: labelText })
3115
3263
  ]
3116
3264
  }
3117
3265
  ),
3118
- isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-file-tree__nested", children: nestedNodes.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index)) })
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)) })
3119
3267
  ] });
3120
3268
  }
3121
3269
  function parseNode(node, depth = 0) {
3122
- if (!(0, import_react23.isValidElement)(node)) {
3270
+ if (!(0, import_react26.isValidElement)(node)) {
3123
3271
  return node;
3124
3272
  }
3125
3273
  if (isListElement(node, "ul")) {
3126
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3274
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3127
3275
  "ul",
3128
3276
  {
3129
3277
  className: `ld-file-tree__list ${depth === 0 ? "ld-file-tree__list--root" : ""}`,
3130
- children: import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth + 1) }, index))
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))
3131
3279
  }
3132
3280
  );
3133
3281
  }
3134
3282
  if (isListElement(node, "li")) {
3135
- const children = import_react23.Children.toArray(node.props.children);
3283
+ const children = import_react26.Children.toArray(node.props.children);
3136
3284
  const nestedListIndex = children.findIndex(
3137
- (child) => (0, import_react23.isValidElement)(child) && isListElement(child, "ul")
3285
+ (child) => (0, import_react26.isValidElement)(child) && isListElement(child, "ul")
3138
3286
  );
3139
3287
  const hasNested = nestedListIndex !== -1;
3140
3288
  const labelNodes = hasNested ? children.slice(0, nestedListIndex) : children;
@@ -3144,7 +3292,7 @@ function parseNode(node, depth = 0) {
3144
3292
  const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
3145
3293
  const isFolder = hasNested || isExplicitDir;
3146
3294
  if (isFolder) {
3147
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3295
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3148
3296
  FolderNode,
3149
3297
  {
3150
3298
  labelText,
@@ -3153,34 +3301,135 @@ function parseNode(node, depth = 0) {
3153
3301
  }
3154
3302
  );
3155
3303
  }
3156
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { className: "ld-file-tree__item", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ld-file-tree__label ld-file-tree__label--file", children: [
3157
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
3158
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
3159
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-file-tree__name", children: labelText })
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 })
3160
3308
  ] }) });
3161
3309
  }
3162
3310
  if (node.props.children) {
3163
- return import_react23.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.default.Fragment, { children: parseNode(child, depth) }, index));
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));
3164
3312
  }
3165
3313
  return node;
3166
3314
  }
3167
3315
  function FileTree({ children }) {
3168
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react23.Children.map(children, (child) => parseNode(child, 0)) });
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)) });
3169
3317
  }
3170
3318
 
3171
3319
  // src/client/theme/components/mdx/Table.tsx
3172
- var import_jsx_runtime38 = require("react/jsx-runtime");
3320
+ var import_react27 = require("react");
3321
+ var import_lucide_react19 = require("lucide-react");
3322
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3173
3323
  function Table({
3174
3324
  headers,
3175
3325
  data,
3176
3326
  children,
3177
- className = ""
3327
+ className = "",
3328
+ sortable = false,
3329
+ paginated = false,
3330
+ pageSize = 10
3178
3331
  }) {
3179
- const tableContent = children ? children : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3180
- headers && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("th", { children: header }, i)) }) }),
3181
- data && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tbody", { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { children: row.map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("td", { children: cell }, j)) }, i)) })
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
+ ] })
3182
3432
  ] });
3183
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: `ld-table-container ${className}`.trim(), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("table", { className: "ld-table", children: tableContent }) });
3184
3433
  }
3185
3434
  // Annotate the CommonJS export names for ESM import in node:
3186
3435
  0 && (module.exports = {