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.
- package/dist/{SearchDialog-YOXMFGH6.mjs → SearchDialog-6Z7CUAYJ.mjs} +8 -1
- package/dist/{SearchDialog-UOAW6IR3.css → SearchDialog-GOZ6X53X.css} +129 -14
- package/dist/{chunk-MULKZFVN.mjs → chunk-SFVOGJ2W.mjs} +269 -165
- package/dist/client/index.css +129 -14
- package/dist/client/index.d.mts +5 -7
- package/dist/client/index.d.ts +5 -7
- package/dist/client/index.js +586 -337
- package/dist/client/index.mjs +106 -5
- package/dist/client/ssr.css +129 -14
- package/dist/client/ssr.d.mts +1 -1
- package/dist/client/ssr.d.ts +1 -1
- package/dist/client/ssr.js +378 -230
- package/dist/client/ssr.mjs +1 -1
- package/dist/node/index.d.mts +2 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.js +4 -1
- package/dist/node/index.mjs +4 -1
- package/dist/{types-CviV0GbX.d.ts → types-BbceAHA0.d.mts} +2 -0
- package/dist/{types-CviV0GbX.d.mts → types-BbceAHA0.d.ts} +2 -0
- package/package.json +1 -1
- package/src/client/app/index.tsx +8 -7
- package/src/client/theme/components/mdx/Table.tsx +108 -10
- package/src/client/theme/components/mdx/mdx-components.css +79 -0
- package/src/client/theme/styles/variables.css +24 -0
- package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +46 -0
- package/src/client/theme/ui/ErrorBoundary/index.ts +1 -0
- package/src/client/theme/ui/Layout/Layout.tsx +8 -1
- package/src/client/theme/ui/Navbar/Tabs.tsx +37 -12
- package/src/client/theme/ui/Navbar/navbar.css +26 -18
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +1 -8
- package/src/client/theme/ui/ProgressBar/ProgressBar.css +17 -0
- package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +51 -0
- package/src/client/theme/ui/ProgressBar/index.ts +1 -0
- package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +11 -1
- package/src/client/types.ts +2 -0
- package/src/node/routes/index.ts +1 -0
- package/src/node/routes/parser.ts +11 -0
- package/src/node/routes/types.ts +2 -0
package/dist/client/ssr.js
CHANGED
|
@@ -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.
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
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,
|
|
894
|
-
const [query, setQuery] = (0,
|
|
895
|
-
const inputRef = (0,
|
|
896
|
-
(0,
|
|
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,
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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)(
|
|
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
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
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,
|
|
1470
|
-
const [indicatorStyle, setIndicatorStyle] = (0,
|
|
1471
|
-
const observerRef = (0,
|
|
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,
|
|
1474
|
-
const visibleIdsRef = (0,
|
|
1475
|
-
(0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
1840
|
-
|
|
1841
|
-
|
|
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,
|
|
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,
|
|
1860
|
-
sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0,
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
1862
|
-
breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0,
|
|
1863
|
-
/* @__PURE__ */ (0,
|
|
1864
|
-
(prevPage || nextPage) && /* @__PURE__ */ (0,
|
|
1865
|
-
prevPage ? /* @__PURE__ */ (0,
|
|
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,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
|
|
1876
2020
|
]
|
|
1877
2021
|
}
|
|
1878
|
-
) : /* @__PURE__ */ (0,
|
|
1879
|
-
nextPage ? /* @__PURE__ */ (0,
|
|
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,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
1887
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
|
|
1890
2034
|
]
|
|
1891
2035
|
}
|
|
1892
|
-
) : /* @__PURE__ */ (0,
|
|
2036
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {})
|
|
1893
2037
|
] })
|
|
1894
2038
|
] }),
|
|
1895
|
-
toc !== void 0 ? toc : /* @__PURE__ */ (0,
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
1944
|
-
/* @__PURE__ */ (0,
|
|
1945
|
-
/* @__PURE__ */ (0,
|
|
1946
|
-
/* @__PURE__ */ (0,
|
|
1947
|
-
/* @__PURE__ */ (0,
|
|
1948
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
-
|
|
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,
|
|
1997
|
-
const preRef = (0,
|
|
1998
|
-
const handleCopy = (0,
|
|
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,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { ref: preRef, ...props, children })
|
|
2015
2161
|
] });
|
|
2016
2162
|
}
|
|
2017
|
-
var
|
|
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
|
-
|
|
2167
|
+
import_react17 = require("react");
|
|
2022
2168
|
import_lucide_react12 = require("lucide-react");
|
|
2023
2169
|
init_utils();
|
|
2024
|
-
|
|
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,
|
|
2047
|
-
const [isVisible, setIsVisible] = (0,
|
|
2048
|
-
(0,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
2092
|
-
|
|
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
|
|
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
|
-
|
|
2114
|
-
NPM = (props) => /* @__PURE__ */ (0,
|
|
2115
|
-
/* @__PURE__ */ (0,
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
-
|
|
2133
|
-
Pnpm = (props) => /* @__PURE__ */ (0,
|
|
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,
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
2199
|
-
/* @__PURE__ */ (0,
|
|
2200
|
-
/* @__PURE__ */ (0,
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2203
|
-
/* @__PURE__ */ (0,
|
|
2204
|
-
/* @__PURE__ */ (0,
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2206
|
-
/* @__PURE__ */ (0,
|
|
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
|
|
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
|
-
|
|
2220
|
-
Bun = (props) => /* @__PURE__ */ (0,
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2252
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2267
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
2315
|
-
Deno = (props) => /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2373
|
-
const [copied, setCopied] = (0,
|
|
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,
|
|
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,
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
2400
|
-
/* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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,
|
|
2461
|
-
const [config] = (0,
|
|
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:
|
|
2618
|
+
Component: import_react20.default.lazy(() => {
|
|
2473
2619
|
if (!loader)
|
|
2474
|
-
return Promise.resolve({ default: () => /* @__PURE__ */ (0,
|
|
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,
|
|
2626
|
+
const [resolvedRoutes, setResolvedRoutes] = (0, import_react20.useState)(
|
|
2481
2627
|
() => resolveRoutes(initialRoutes)
|
|
2482
2628
|
);
|
|
2483
|
-
(0,
|
|
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,
|
|
2636
|
+
(0, import_react20.useEffect)(() => {
|
|
2491
2637
|
setResolvedRoutes(resolveRoutes(routesInfo));
|
|
2492
2638
|
}, [routesInfo, modules, docsDirName]);
|
|
2493
|
-
return /* @__PURE__ */ (0,
|
|
2494
|
-
/* @__PURE__ */ (0,
|
|
2495
|
-
/* @__PURE__ */ (0,
|
|
2496
|
-
HomePage && /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HomePage, {})
|
|
2510
2656
|
}
|
|
2511
2657
|
)
|
|
2512
2658
|
}
|
|
2513
2659
|
),
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2515
2661
|
import_react_router_dom11.Route,
|
|
2516
2662
|
{
|
|
2517
|
-
element: /* @__PURE__ */ (0,
|
|
2518
|
-
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2536
2682
|
import_react_router_dom11.Route,
|
|
2537
2683
|
{
|
|
2538
2684
|
path: "*",
|
|
2539
|
-
element: /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
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
|
|
2709
|
+
const containerRect = container.getBoundingClientRect().top;
|
|
2562
2710
|
const elementRect = element.getBoundingClientRect().top;
|
|
2563
|
-
const elementPosition = elementRect -
|
|
2564
|
-
const offsetPosition = elementPosition - offset;
|
|
2565
|
-
|
|
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
|
-
|
|
2720
|
+
container.scrollTo(0, 0);
|
|
2573
2721
|
}, [pathname, hash]);
|
|
2574
2722
|
return null;
|
|
2575
2723
|
}
|
|
@@ -2577,44 +2725,44 @@ function DocsLayout({
|
|
|
2577
2725
|
config,
|
|
2578
2726
|
routes
|
|
2579
2727
|
}) {
|
|
2580
|
-
return /* @__PURE__ */ (0,
|
|
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,
|
|
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,
|
|
2743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component2, {}) });
|
|
2596
2744
|
}
|
|
2597
|
-
var
|
|
2745
|
+
var import_react20, import_client, import_react_router_dom11, import_react21, import_react22, import_lucide_react14, import_jsx_runtime31, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
|
|
2598
2746
|
var init_app = __esm({
|
|
2599
2747
|
"src/client/app/index.tsx"() {
|
|
2600
2748
|
"use strict";
|
|
2601
|
-
|
|
2749
|
+
import_react20 = __toESM(require("react"));
|
|
2602
2750
|
import_client = __toESM(require("react-dom/client"));
|
|
2603
2751
|
import_react_router_dom11 = require("react-router-dom");
|
|
2604
2752
|
init_Layout2();
|
|
2605
2753
|
init_NotFound2();
|
|
2606
2754
|
init_Loading2();
|
|
2607
|
-
|
|
2608
|
-
|
|
2755
|
+
import_react21 = require("@mdx-js/react");
|
|
2756
|
+
import_react22 = require("react");
|
|
2609
2757
|
import_lucide_react14 = require("lucide-react");
|
|
2610
2758
|
init_CodeBlock2();
|
|
2611
2759
|
init_preload();
|
|
2612
|
-
|
|
2613
|
-
ConfigContext = (0,
|
|
2614
|
-
Video2 = (0,
|
|
2760
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2761
|
+
ConfigContext = (0, import_react22.createContext)(null);
|
|
2762
|
+
Video2 = (0, import_react22.lazy)(
|
|
2615
2763
|
() => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
|
|
2616
2764
|
);
|
|
2617
|
-
PackageManagerTabs2 = (0,
|
|
2765
|
+
PackageManagerTabs2 = (0, import_react22.lazy)(
|
|
2618
2766
|
() => Promise.resolve().then(() => (init_PackageManagerTabs2(), PackageManagerTabs_exports)).then((m) => ({
|
|
2619
2767
|
default: m.PackageManagerTabs
|
|
2620
2768
|
}))
|
|
@@ -2625,21 +2773,21 @@ var init_app = __esm({
|
|
|
2625
2773
|
children
|
|
2626
2774
|
}) => {
|
|
2627
2775
|
const Tag = `h${level}`;
|
|
2628
|
-
return /* @__PURE__ */ (0,
|
|
2776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
|
|
2629
2777
|
children,
|
|
2630
|
-
id && /* @__PURE__ */ (0,
|
|
2778
|
+
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 }) })
|
|
2631
2779
|
] });
|
|
2632
2780
|
};
|
|
2633
2781
|
mdxComponents = {
|
|
2634
|
-
h1: (props) => /* @__PURE__ */ (0,
|
|
2635
|
-
h2: (props) => /* @__PURE__ */ (0,
|
|
2636
|
-
h3: (props) => /* @__PURE__ */ (0,
|
|
2637
|
-
h4: (props) => /* @__PURE__ */ (0,
|
|
2638
|
-
h5: (props) => /* @__PURE__ */ (0,
|
|
2639
|
-
h6: (props) => /* @__PURE__ */ (0,
|
|
2640
|
-
pre: (props) => /* @__PURE__ */ (0,
|
|
2641
|
-
video: (props) => /* @__PURE__ */ (0,
|
|
2642
|
-
PackageManagerTabs: (props) => /* @__PURE__ */ (0,
|
|
2782
|
+
h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 1, ...props }),
|
|
2783
|
+
h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 2, ...props }),
|
|
2784
|
+
h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 3, ...props }),
|
|
2785
|
+
h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 4, ...props }),
|
|
2786
|
+
h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 5, ...props }),
|
|
2787
|
+
h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 6, ...props }),
|
|
2788
|
+
pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CodeBlock, { ...props, children: props.children }),
|
|
2789
|
+
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 }) }),
|
|
2790
|
+
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 }) })
|
|
2643
2791
|
};
|
|
2644
2792
|
}
|
|
2645
2793
|
});
|
|
@@ -2650,11 +2798,11 @@ __export(ssr_exports, {
|
|
|
2650
2798
|
render: () => render
|
|
2651
2799
|
});
|
|
2652
2800
|
module.exports = __toCommonJS(ssr_exports);
|
|
2653
|
-
var
|
|
2801
|
+
var import_react23 = __toESM(require("react"));
|
|
2654
2802
|
var import_server = __toESM(require("react-dom/server"));
|
|
2655
2803
|
var import_server2 = require("react-router-dom/server");
|
|
2656
2804
|
init_app();
|
|
2657
|
-
var
|
|
2805
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2658
2806
|
async function render(options) {
|
|
2659
2807
|
const { path, routes, config, modules, homePage, docsDirName } = options;
|
|
2660
2808
|
const resolvedModules = {};
|
|
@@ -2662,7 +2810,7 @@ async function render(options) {
|
|
|
2662
2810
|
resolvedModules[key] = () => Promise.resolve(mod);
|
|
2663
2811
|
}
|
|
2664
2812
|
const html = import_server.default.renderToString(
|
|
2665
|
-
/* @__PURE__ */ (0,
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react23.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_server2.StaticRouter, { location: path, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2666
2814
|
AppShell,
|
|
2667
2815
|
{
|
|
2668
2816
|
initialRoutes: routes,
|