boltdocs 1.10.1 → 1.10.2
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-MEWGAONO.mjs → SearchDialog-AGVF6JBO.mjs} +1 -1
- package/dist/{SearchDialog-BEVZQ74P.css → SearchDialog-YPDOM7Q6.css} +196 -28
- package/dist/{chunk-OZLYRXAD.mjs → chunk-TKLQWU7H.mjs} +177 -171
- package/dist/client/index.css +196 -28
- package/dist/client/index.d.mts +3 -10
- package/dist/client/index.d.ts +3 -10
- package/dist/client/index.js +377 -341
- package/dist/client/index.mjs +91 -52
- package/dist/client/ssr.css +196 -28
- package/dist/client/ssr.js +190 -192
- package/dist/client/ssr.mjs +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +0 -1
- package/src/client/theme/components/CodeBlock/CodeBlock.tsx +22 -1
- package/src/client/theme/components/Playground/Playground.tsx +104 -48
- package/src/client/theme/components/Playground/playground.css +88 -18
- package/src/client/theme/styles/markdown.css +53 -0
- package/src/client/theme/styles/variables.css +0 -12
- package/src/client/theme/styles.css +1 -0
- package/src/client/theme/ui/CopyMarkdown/copy-markdown.css +0 -2
- package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +19 -15
- package/src/client/theme/ui/ErrorBoundary/error-boundary.css +55 -0
- package/src/client/theme/ui/Layout/Layout.tsx +5 -10
- package/src/client/theme/ui/Layout/base.css +2 -1
- package/src/client/theme/ui/Layout/responsive.css +11 -0
- package/src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx +0 -10
- package/src/client/theme/ui/BackgroundGradient/index.ts +0 -1
package/dist/client/index.js
CHANGED
|
@@ -1802,29 +1802,6 @@ var init_Breadcrumbs2 = __esm({
|
|
|
1802
1802
|
}
|
|
1803
1803
|
});
|
|
1804
1804
|
|
|
1805
|
-
// src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx
|
|
1806
|
-
function BackgroundGradient() {
|
|
1807
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "boltdocs-background-glow", children: [
|
|
1808
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-1" }),
|
|
1809
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-2" })
|
|
1810
|
-
] });
|
|
1811
|
-
}
|
|
1812
|
-
var import_jsx_runtime18;
|
|
1813
|
-
var init_BackgroundGradient = __esm({
|
|
1814
|
-
"src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx"() {
|
|
1815
|
-
"use strict";
|
|
1816
|
-
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1817
|
-
}
|
|
1818
|
-
});
|
|
1819
|
-
|
|
1820
|
-
// src/client/theme/ui/BackgroundGradient/index.ts
|
|
1821
|
-
var init_BackgroundGradient2 = __esm({
|
|
1822
|
-
"src/client/theme/ui/BackgroundGradient/index.ts"() {
|
|
1823
|
-
"use strict";
|
|
1824
|
-
init_BackgroundGradient();
|
|
1825
|
-
}
|
|
1826
|
-
});
|
|
1827
|
-
|
|
1828
1805
|
// src/client/theme/ui/ProgressBar/ProgressBar.css
|
|
1829
1806
|
var init_ProgressBar = __esm({
|
|
1830
1807
|
"src/client/theme/ui/ProgressBar/ProgressBar.css"() {
|
|
@@ -1865,7 +1842,7 @@ function ProgressBar() {
|
|
|
1865
1842
|
if (timer) clearInterval(timer);
|
|
1866
1843
|
};
|
|
1867
1844
|
}, []);
|
|
1868
|
-
return /* @__PURE__ */ (0,
|
|
1845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "boltdocs-progress-container", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1869
1846
|
"div",
|
|
1870
1847
|
{
|
|
1871
1848
|
className: "boltdocs-progress-bar",
|
|
@@ -1873,13 +1850,13 @@ function ProgressBar() {
|
|
|
1873
1850
|
}
|
|
1874
1851
|
) });
|
|
1875
1852
|
}
|
|
1876
|
-
var import_react14,
|
|
1853
|
+
var import_react14, import_jsx_runtime18;
|
|
1877
1854
|
var init_ProgressBar2 = __esm({
|
|
1878
1855
|
"src/client/theme/ui/ProgressBar/ProgressBar.tsx"() {
|
|
1879
1856
|
"use strict";
|
|
1880
1857
|
import_react14 = require("react");
|
|
1881
1858
|
init_ProgressBar();
|
|
1882
|
-
|
|
1859
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1883
1860
|
}
|
|
1884
1861
|
});
|
|
1885
1862
|
|
|
@@ -1891,13 +1868,20 @@ var init_ProgressBar3 = __esm({
|
|
|
1891
1868
|
}
|
|
1892
1869
|
});
|
|
1893
1870
|
|
|
1871
|
+
// src/client/theme/ui/ErrorBoundary/error-boundary.css
|
|
1872
|
+
var init_error_boundary = __esm({
|
|
1873
|
+
"src/client/theme/ui/ErrorBoundary/error-boundary.css"() {
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
|
|
1894
1877
|
// src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx
|
|
1895
|
-
var import_react15,
|
|
1878
|
+
var import_react15, import_jsx_runtime19, ErrorBoundary;
|
|
1896
1879
|
var init_ErrorBoundary = __esm({
|
|
1897
1880
|
"src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx"() {
|
|
1898
1881
|
"use strict";
|
|
1899
1882
|
import_react15 = require("react");
|
|
1900
|
-
|
|
1883
|
+
init_error_boundary();
|
|
1884
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1901
1885
|
ErrorBoundary = class extends import_react15.Component {
|
|
1902
1886
|
state = {
|
|
1903
1887
|
hasError: false
|
|
@@ -1910,10 +1894,10 @@ var init_ErrorBoundary = __esm({
|
|
|
1910
1894
|
}
|
|
1911
1895
|
render() {
|
|
1912
1896
|
if (this.state.hasError) {
|
|
1913
|
-
return this.props.fallback || /* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1897
|
+
return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "boltdocs-error-boundary", children: [
|
|
1898
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-error-title", children: "Something went wrong" }),
|
|
1899
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "boltdocs-error-message", children: this.state.error?.message || "An unexpected error occurred while rendering this page." }),
|
|
1900
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1917
1901
|
"button",
|
|
1918
1902
|
{
|
|
1919
1903
|
className: "boltdocs-error-retry",
|
|
@@ -1972,51 +1956,51 @@ function CopyMarkdown({ content, config }) {
|
|
|
1972
1956
|
window.open(url, "_blank");
|
|
1973
1957
|
setIsOpen(false);
|
|
1974
1958
|
};
|
|
1975
|
-
return /* @__PURE__ */ (0,
|
|
1976
|
-
/* @__PURE__ */ (0,
|
|
1977
|
-
/* @__PURE__ */ (0,
|
|
1959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "boltdocs-copy-markdown", ref: dropdownRef, children: [
|
|
1960
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "copy-btn-group", children: [
|
|
1961
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1978
1962
|
"button",
|
|
1979
1963
|
{
|
|
1980
1964
|
className: "copy-btn",
|
|
1981
1965
|
onClick: handleCopy,
|
|
1982
1966
|
"aria-label": "Copy Markdown",
|
|
1983
1967
|
children: [
|
|
1984
|
-
copied ? /* @__PURE__ */ (0,
|
|
1985
|
-
/* @__PURE__ */ (0,
|
|
1968
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Copy, { size: 16 }),
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "copy-label", children: copied ? "Copied!" : buttonText })
|
|
1986
1970
|
]
|
|
1987
1971
|
}
|
|
1988
1972
|
),
|
|
1989
|
-
/* @__PURE__ */ (0,
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1990
1974
|
"button",
|
|
1991
1975
|
{
|
|
1992
1976
|
className: `copy-dropdown-toggle ${isOpen ? "is-active" : ""}`,
|
|
1993
1977
|
onClick: () => setIsOpen(!isOpen),
|
|
1994
1978
|
"aria-label": "More options",
|
|
1995
1979
|
"aria-expanded": isOpen,
|
|
1996
|
-
children: /* @__PURE__ */ (0,
|
|
1980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.ChevronDown, { size: 14, className: "arrow-icon" })
|
|
1997
1981
|
}
|
|
1998
1982
|
)
|
|
1999
1983
|
] }),
|
|
2000
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2001
|
-
/* @__PURE__ */ (0,
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
1984
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "copy-dropdown", children: [
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "copy-option", onClick: handleCopy, children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.Copy, { size: 14 }),
|
|
2003
1987
|
"Copy Markdown"
|
|
2004
1988
|
] }),
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("button", { className: "copy-option", onClick: handleOpenRaw, children: [
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react10.ExternalLink, { size: 14 }),
|
|
2007
1991
|
"View as Markdown"
|
|
2008
1992
|
] })
|
|
2009
1993
|
] })
|
|
2010
1994
|
] });
|
|
2011
1995
|
}
|
|
2012
|
-
var import_react16, import_lucide_react10,
|
|
1996
|
+
var import_react16, import_lucide_react10, import_jsx_runtime20;
|
|
2013
1997
|
var init_CopyMarkdown = __esm({
|
|
2014
1998
|
"src/client/theme/ui/CopyMarkdown/CopyMarkdown.tsx"() {
|
|
2015
1999
|
"use strict";
|
|
2016
2000
|
import_react16 = require("react");
|
|
2017
2001
|
import_lucide_react10 = require("lucide-react");
|
|
2018
2002
|
init_copy_markdown();
|
|
2019
|
-
|
|
2003
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2020
2004
|
}
|
|
2021
2005
|
});
|
|
2022
2006
|
|
|
@@ -2070,10 +2054,9 @@ function ThemeLayout({
|
|
|
2070
2054
|
if (prevPage?.path) preload(prevPage.path);
|
|
2071
2055
|
if (nextPage?.path) preload(nextPage.path);
|
|
2072
2056
|
}, [prevPage, nextPage, preload]);
|
|
2073
|
-
return /* @__PURE__ */ (0,
|
|
2074
|
-
/* @__PURE__ */ (0,
|
|
2075
|
-
|
|
2076
|
-
head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ProgressBar, {}),
|
|
2059
|
+
head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2077
2060
|
Head,
|
|
2078
2061
|
{
|
|
2079
2062
|
siteTitle,
|
|
@@ -2081,7 +2064,7 @@ function ThemeLayout({
|
|
|
2081
2064
|
routes
|
|
2082
2065
|
}
|
|
2083
2066
|
),
|
|
2084
|
-
navbar !== void 0 ? navbar : /* @__PURE__ */ (0,
|
|
2067
|
+
navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2085
2068
|
Navbar,
|
|
2086
2069
|
{
|
|
2087
2070
|
config,
|
|
@@ -2091,52 +2074,52 @@ function ThemeLayout({
|
|
|
2091
2074
|
currentVersion
|
|
2092
2075
|
}
|
|
2093
2076
|
),
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2095
|
-
sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0,
|
|
2096
|
-
/* @__PURE__ */ (0,
|
|
2097
|
-
breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2077
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-main-container", children: [
|
|
2078
|
+
sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Sidebar, { routes: filteredRoutes, config }),
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("main", { className: "boltdocs-content", children: [
|
|
2080
|
+
breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
|
|
2081
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-page", children: [
|
|
2082
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "boltdocs-page-header", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2100
2083
|
CopyMarkdown,
|
|
2101
2084
|
{
|
|
2102
2085
|
content: routes[currentIndex]?._rawContent,
|
|
2103
2086
|
config: config.themeConfig?.copyMarkdown
|
|
2104
2087
|
}
|
|
2105
2088
|
) }),
|
|
2106
|
-
/* @__PURE__ */ (0,
|
|
2089
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorBoundary, { children })
|
|
2107
2090
|
] }),
|
|
2108
|
-
(prevPage || nextPage) && /* @__PURE__ */ (0,
|
|
2109
|
-
prevPage ? /* @__PURE__ */ (0,
|
|
2091
|
+
(prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
|
|
2092
|
+
prevPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2110
2093
|
Link,
|
|
2111
2094
|
{
|
|
2112
2095
|
to: prevPage.path || "/",
|
|
2113
2096
|
className: "page-nav-link page-nav-link--prev",
|
|
2114
2097
|
children: [
|
|
2115
|
-
/* @__PURE__ */ (0,
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2117
|
-
/* @__PURE__ */ (0,
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
|
|
2099
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Previous" }),
|
|
2100
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: prevPage.title })
|
|
2118
2101
|
] }),
|
|
2119
|
-
/* @__PURE__ */ (0,
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.ChevronLeft, { className: "page-nav-arrow", size: 16 })
|
|
2120
2103
|
]
|
|
2121
2104
|
}
|
|
2122
|
-
) : /* @__PURE__ */ (0,
|
|
2123
|
-
nextPage ? /* @__PURE__ */ (0,
|
|
2105
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {}),
|
|
2106
|
+
nextPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2124
2107
|
Link,
|
|
2125
2108
|
{
|
|
2126
2109
|
to: nextPage.path || "/",
|
|
2127
2110
|
className: "page-nav-link page-nav-link--next",
|
|
2128
2111
|
children: [
|
|
2129
|
-
/* @__PURE__ */ (0,
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Next" }),
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: nextPage.title })
|
|
2132
2115
|
] }),
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react11.ChevronRight, { className: "page-nav-arrow", size: 16 })
|
|
2134
2117
|
]
|
|
2135
2118
|
}
|
|
2136
|
-
) : /* @__PURE__ */ (0,
|
|
2119
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {})
|
|
2137
2120
|
] })
|
|
2138
2121
|
] }),
|
|
2139
|
-
toc !== void 0 ? toc : /* @__PURE__ */ (0,
|
|
2122
|
+
toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2140
2123
|
OnThisPage,
|
|
2141
2124
|
{
|
|
2142
2125
|
headings: routes[currentIndex]?.headings,
|
|
@@ -2148,7 +2131,7 @@ function ThemeLayout({
|
|
|
2148
2131
|
] })
|
|
2149
2132
|
] });
|
|
2150
2133
|
}
|
|
2151
|
-
var import_react17, import_react_router_dom10, import_lucide_react11,
|
|
2134
|
+
var import_react17, import_react_router_dom10, import_lucide_react11, import_jsx_runtime21;
|
|
2152
2135
|
var init_Layout = __esm({
|
|
2153
2136
|
"src/client/theme/ui/Layout/Layout.tsx"() {
|
|
2154
2137
|
"use strict";
|
|
@@ -2162,18 +2145,16 @@ var init_Layout = __esm({
|
|
|
2162
2145
|
init_OnThisPage2();
|
|
2163
2146
|
init_Head2();
|
|
2164
2147
|
init_Breadcrumbs2();
|
|
2165
|
-
init_BackgroundGradient2();
|
|
2166
2148
|
init_Navbar2();
|
|
2167
2149
|
init_Sidebar2();
|
|
2168
2150
|
init_OnThisPage2();
|
|
2169
2151
|
init_Head2();
|
|
2170
2152
|
init_Breadcrumbs2();
|
|
2171
|
-
init_BackgroundGradient2();
|
|
2172
2153
|
init_ProgressBar3();
|
|
2173
2154
|
init_ErrorBoundary2();
|
|
2174
2155
|
init_CopyMarkdown2();
|
|
2175
2156
|
init_styles();
|
|
2176
|
-
|
|
2157
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2177
2158
|
}
|
|
2178
2159
|
});
|
|
2179
2160
|
|
|
@@ -2187,23 +2168,23 @@ var init_Layout2 = __esm({
|
|
|
2187
2168
|
|
|
2188
2169
|
// src/client/theme/ui/NotFound/NotFound.tsx
|
|
2189
2170
|
function NotFound() {
|
|
2190
|
-
return /* @__PURE__ */ (0,
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2192
|
-
/* @__PURE__ */ (0,
|
|
2193
|
-
/* @__PURE__ */ (0,
|
|
2194
|
-
/* @__PURE__ */ (0,
|
|
2195
|
-
/* @__PURE__ */ (0,
|
|
2171
|
+
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: [
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "not-found-code", children: "404" }),
|
|
2173
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
|
|
2174
|
+
/* @__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." }),
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Link, { to: "/", className: "not-found-link", children: [
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.ArrowLeft, { size: 16 }),
|
|
2196
2177
|
" Go to Home"
|
|
2197
2178
|
] })
|
|
2198
2179
|
] }) });
|
|
2199
2180
|
}
|
|
2200
|
-
var import_lucide_react12,
|
|
2181
|
+
var import_lucide_react12, import_jsx_runtime22;
|
|
2201
2182
|
var init_NotFound = __esm({
|
|
2202
2183
|
"src/client/theme/ui/NotFound/NotFound.tsx"() {
|
|
2203
2184
|
"use strict";
|
|
2204
2185
|
init_Link2();
|
|
2205
2186
|
import_lucide_react12 = require("lucide-react");
|
|
2206
|
-
|
|
2187
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2207
2188
|
}
|
|
2208
2189
|
});
|
|
2209
2190
|
|
|
@@ -2217,16 +2198,16 @@ var init_NotFound2 = __esm({
|
|
|
2217
2198
|
|
|
2218
2199
|
// src/client/theme/ui/Loading/Loading.tsx
|
|
2219
2200
|
function Loading() {
|
|
2220
|
-
return /* @__PURE__ */ (0,
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "boltdocs-loading", children: [
|
|
2202
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "loading-spinner" }),
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "loading-text", children: "Loading..." })
|
|
2223
2204
|
] });
|
|
2224
2205
|
}
|
|
2225
|
-
var
|
|
2206
|
+
var import_jsx_runtime23;
|
|
2226
2207
|
var init_Loading = __esm({
|
|
2227
2208
|
"src/client/theme/ui/Loading/Loading.tsx"() {
|
|
2228
2209
|
"use strict";
|
|
2229
|
-
|
|
2210
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2230
2211
|
}
|
|
2231
2212
|
});
|
|
2232
2213
|
|
|
@@ -2241,6 +2222,8 @@ var init_Loading2 = __esm({
|
|
|
2241
2222
|
// src/client/theme/components/CodeBlock/CodeBlock.tsx
|
|
2242
2223
|
function CodeBlock({ children, ...props }) {
|
|
2243
2224
|
const [copied, setCopied] = (0, import_react18.useState)(false);
|
|
2225
|
+
const [isExpanded, setIsExpanded] = (0, import_react18.useState)(false);
|
|
2226
|
+
const [isExpandable, setIsExpandable] = (0, import_react18.useState)(false);
|
|
2244
2227
|
const preRef = (0, import_react18.useRef)(null);
|
|
2245
2228
|
const handleCopy = (0, import_react18.useCallback)(async () => {
|
|
2246
2229
|
const code = preRef.current?.textContent || "";
|
|
@@ -2248,27 +2231,42 @@ function CodeBlock({ children, ...props }) {
|
|
|
2248
2231
|
setCopied(true);
|
|
2249
2232
|
setTimeout(() => setCopied(false), 2e3);
|
|
2250
2233
|
}, []);
|
|
2251
|
-
|
|
2252
|
-
|
|
2234
|
+
import_react18.default.useEffect(() => {
|
|
2235
|
+
if (preRef.current) {
|
|
2236
|
+
const codeLength = preRef.current.textContent?.length || 0;
|
|
2237
|
+
setIsExpandable(codeLength > 500);
|
|
2238
|
+
}
|
|
2239
|
+
}, [children]);
|
|
2240
|
+
const shouldTruncate = isExpandable && !isExpanded;
|
|
2241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: `code-block-wrapper ${shouldTruncate ? "is-truncated" : ""}`, children: [
|
|
2242
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2253
2243
|
"button",
|
|
2254
2244
|
{
|
|
2255
2245
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
2256
2246
|
onClick: handleCopy,
|
|
2257
2247
|
"aria-label": "Copy code",
|
|
2258
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2248
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react13.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react13.Copy, { size: 16 })
|
|
2259
2249
|
}
|
|
2260
2250
|
),
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { ref: preRef, ...props, children }),
|
|
2252
|
+
isExpandable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "code-block-expand-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2253
|
+
"button",
|
|
2254
|
+
{
|
|
2255
|
+
className: "code-block-expand-btn",
|
|
2256
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
2257
|
+
children: isExpanded ? "Show less" : "Expand code"
|
|
2258
|
+
}
|
|
2259
|
+
) })
|
|
2262
2260
|
] });
|
|
2263
2261
|
}
|
|
2264
|
-
var import_react18, import_lucide_react13,
|
|
2262
|
+
var import_react18, import_lucide_react13, import_jsx_runtime24;
|
|
2265
2263
|
var init_CodeBlock = __esm({
|
|
2266
2264
|
"src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
|
|
2267
2265
|
"use strict";
|
|
2268
|
-
import_react18 = require("react");
|
|
2266
|
+
import_react18 = __toESM(require("react"));
|
|
2269
2267
|
import_lucide_react13 = require("lucide-react");
|
|
2270
2268
|
init_utils();
|
|
2271
|
-
|
|
2269
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2272
2270
|
}
|
|
2273
2271
|
});
|
|
2274
2272
|
|
|
@@ -2307,7 +2305,7 @@ function Video({
|
|
|
2307
2305
|
observer.observe(el);
|
|
2308
2306
|
return () => observer.disconnect();
|
|
2309
2307
|
}, []);
|
|
2310
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2311
2309
|
"video",
|
|
2312
2310
|
{
|
|
2313
2311
|
className: "boltdocs-video",
|
|
@@ -2322,7 +2320,7 @@ function Video({
|
|
|
2322
2320
|
"Your browser does not support the video tag."
|
|
2323
2321
|
]
|
|
2324
2322
|
}
|
|
2325
|
-
) : /* @__PURE__ */ (0,
|
|
2323
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2326
2324
|
"div",
|
|
2327
2325
|
{
|
|
2328
2326
|
className: "boltdocs-video-placeholder",
|
|
@@ -2331,12 +2329,12 @@ function Video({
|
|
|
2331
2329
|
}
|
|
2332
2330
|
) });
|
|
2333
2331
|
}
|
|
2334
|
-
var import_react19,
|
|
2332
|
+
var import_react19, import_jsx_runtime25;
|
|
2335
2333
|
var init_Video = __esm({
|
|
2336
2334
|
"src/client/theme/components/Video/Video.tsx"() {
|
|
2337
2335
|
"use strict";
|
|
2338
2336
|
import_react19 = require("react");
|
|
2339
|
-
|
|
2337
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2340
2338
|
}
|
|
2341
2339
|
});
|
|
2342
2340
|
|
|
@@ -2353,14 +2351,14 @@ var init_Video2 = __esm({
|
|
|
2353
2351
|
});
|
|
2354
2352
|
|
|
2355
2353
|
// src/client/theme/icons/npm.tsx
|
|
2356
|
-
var
|
|
2354
|
+
var import_jsx_runtime26, NPM;
|
|
2357
2355
|
var init_npm = __esm({
|
|
2358
2356
|
"src/client/theme/icons/npm.tsx"() {
|
|
2359
2357
|
"use strict";
|
|
2360
|
-
|
|
2361
|
-
NPM = (props) => /* @__PURE__ */ (0,
|
|
2362
|
-
/* @__PURE__ */ (0,
|
|
2363
|
-
/* @__PURE__ */ (0,
|
|
2358
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2359
|
+
NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
|
|
2360
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2364
2362
|
"path",
|
|
2365
2363
|
{
|
|
2366
2364
|
fill: "#fff",
|
|
@@ -2372,69 +2370,69 @@ var init_npm = __esm({
|
|
|
2372
2370
|
});
|
|
2373
2371
|
|
|
2374
2372
|
// src/client/theme/icons/pnpm.tsx
|
|
2375
|
-
var
|
|
2373
|
+
var import_jsx_runtime27, Pnpm;
|
|
2376
2374
|
var init_pnpm = __esm({
|
|
2377
2375
|
"src/client/theme/icons/pnpm.tsx"() {
|
|
2378
2376
|
"use strict";
|
|
2379
|
-
|
|
2380
|
-
Pnpm = (props) => /* @__PURE__ */ (0,
|
|
2377
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2378
|
+
Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2381
2379
|
"svg",
|
|
2382
2380
|
{
|
|
2383
2381
|
...props,
|
|
2384
2382
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2385
2383
|
viewBox: "76.58987244897958 44 164.00775510204068 164",
|
|
2386
2384
|
children: [
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("defs", { children: [
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2389
2387
|
"path",
|
|
2390
2388
|
{
|
|
2391
2389
|
d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
|
|
2392
2390
|
id: "pnpm_dark__b45vdTD8hs"
|
|
2393
2391
|
}
|
|
2394
2392
|
),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2396
2394
|
"path",
|
|
2397
2395
|
{
|
|
2398
2396
|
d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
|
|
2399
2397
|
id: "pnpm_dark__a40WtxIl8d"
|
|
2400
2398
|
}
|
|
2401
2399
|
),
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2403
2401
|
"path",
|
|
2404
2402
|
{
|
|
2405
2403
|
d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
|
|
2406
2404
|
id: "pnpm_dark__h2CN9AEEpe"
|
|
2407
2405
|
}
|
|
2408
2406
|
),
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2410
2408
|
"path",
|
|
2411
2409
|
{
|
|
2412
2410
|
d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
|
|
2413
2411
|
id: "pnpm_dark__dqv5133G8"
|
|
2414
2412
|
}
|
|
2415
2413
|
),
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2414
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2417
2415
|
"path",
|
|
2418
2416
|
{
|
|
2419
2417
|
d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
|
|
2420
2418
|
id: "pnpm_dark__b1Lv79ypvm"
|
|
2421
2419
|
}
|
|
2422
2420
|
),
|
|
2423
|
-
/* @__PURE__ */ (0,
|
|
2421
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2424
2422
|
"path",
|
|
2425
2423
|
{
|
|
2426
2424
|
d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
|
|
2427
2425
|
id: "pnpm_dark__hy1IZWwLX"
|
|
2428
2426
|
}
|
|
2429
2427
|
),
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2431
2429
|
"path",
|
|
2432
2430
|
{
|
|
2433
2431
|
d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
|
|
2434
2432
|
id: "pnpm_dark__akQfjxQes"
|
|
2435
2433
|
}
|
|
2436
2434
|
),
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2435
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2438
2436
|
"path",
|
|
2439
2437
|
{
|
|
2440
2438
|
d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
|
|
@@ -2442,15 +2440,15 @@ var init_pnpm = __esm({
|
|
|
2442
2440
|
}
|
|
2443
2441
|
)
|
|
2444
2442
|
] }),
|
|
2445
|
-
/* @__PURE__ */ (0,
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2447
|
-
/* @__PURE__ */ (0,
|
|
2448
|
-
/* @__PURE__ */ (0,
|
|
2449
|
-
/* @__PURE__ */ (0,
|
|
2450
|
-
/* @__PURE__ */ (0,
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2452
|
-
/* @__PURE__ */ (0,
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("g", { children: [
|
|
2444
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
|
|
2448
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
|
|
2450
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
|
|
2454
2452
|
] })
|
|
2455
2453
|
]
|
|
2456
2454
|
}
|
|
@@ -2459,62 +2457,62 @@ var init_pnpm = __esm({
|
|
|
2459
2457
|
});
|
|
2460
2458
|
|
|
2461
2459
|
// src/client/theme/icons/bun.tsx
|
|
2462
|
-
var
|
|
2460
|
+
var import_jsx_runtime28, Bun;
|
|
2463
2461
|
var init_bun = __esm({
|
|
2464
2462
|
"src/client/theme/icons/bun.tsx"() {
|
|
2465
2463
|
"use strict";
|
|
2466
|
-
|
|
2467
|
-
Bun = (props) => /* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2469
|
-
/* @__PURE__ */ (0,
|
|
2464
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2465
|
+
Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
|
|
2466
|
+
/* @__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" }),
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2470
2468
|
"path",
|
|
2471
2469
|
{
|
|
2472
2470
|
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",
|
|
2473
2471
|
style: { fill: "#fbf0df" }
|
|
2474
2472
|
}
|
|
2475
2473
|
),
|
|
2476
|
-
/* @__PURE__ */ (0,
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2477
2475
|
"path",
|
|
2478
2476
|
{
|
|
2479
2477
|
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",
|
|
2480
2478
|
style: { fill: "#f6dece" }
|
|
2481
2479
|
}
|
|
2482
2480
|
),
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2484
2482
|
"path",
|
|
2485
2483
|
{
|
|
2486
2484
|
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",
|
|
2487
2485
|
style: { fill: "#fffefc" }
|
|
2488
2486
|
}
|
|
2489
2487
|
),
|
|
2490
|
-
/* @__PURE__ */ (0,
|
|
2488
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2491
2489
|
"path",
|
|
2492
2490
|
{
|
|
2493
2491
|
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",
|
|
2494
2492
|
style: { fill: "#ccbea7", fillRule: "evenodd" }
|
|
2495
2493
|
}
|
|
2496
2494
|
),
|
|
2497
|
-
/* @__PURE__ */ (0,
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2499
|
-
/* @__PURE__ */ (0,
|
|
2495
|
+
/* @__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" }),
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2500
2498
|
"path",
|
|
2501
2499
|
{
|
|
2502
2500
|
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",
|
|
2503
2501
|
style: { fill: "#b71422" }
|
|
2504
2502
|
}
|
|
2505
2503
|
),
|
|
2506
|
-
/* @__PURE__ */ (0,
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2507
2505
|
"path",
|
|
2508
2506
|
{
|
|
2509
2507
|
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",
|
|
2510
2508
|
style: { fill: "#ff6164" }
|
|
2511
2509
|
}
|
|
2512
2510
|
),
|
|
2513
|
-
/* @__PURE__ */ (0,
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2511
|
+
/* @__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" }),
|
|
2512
|
+
/* @__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" })
|
|
2515
2513
|
] }),
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2517
|
-
/* @__PURE__ */ (0,
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2518
2516
|
"ellipse",
|
|
2519
2517
|
{
|
|
2520
2518
|
cx: "53.22",
|
|
@@ -2524,7 +2522,7 @@ var init_bun = __esm({
|
|
|
2524
2522
|
style: { fill: "#febbd0" }
|
|
2525
2523
|
}
|
|
2526
2524
|
),
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2525
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2528
2526
|
"ellipse",
|
|
2529
2527
|
{
|
|
2530
2528
|
cx: "22.95",
|
|
@@ -2534,14 +2532,14 @@ var init_bun = __esm({
|
|
|
2534
2532
|
style: { fill: "#febbd0" }
|
|
2535
2533
|
}
|
|
2536
2534
|
),
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2538
2536
|
"path",
|
|
2539
2537
|
{
|
|
2540
2538
|
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",
|
|
2541
2539
|
style: { fillRule: "evenodd" }
|
|
2542
2540
|
}
|
|
2543
2541
|
),
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2545
2543
|
"path",
|
|
2546
2544
|
{
|
|
2547
2545
|
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",
|
|
@@ -2554,12 +2552,12 @@ var init_bun = __esm({
|
|
|
2554
2552
|
});
|
|
2555
2553
|
|
|
2556
2554
|
// src/client/theme/icons/deno.tsx
|
|
2557
|
-
var
|
|
2555
|
+
var import_jsx_runtime29, Deno;
|
|
2558
2556
|
var init_deno = __esm({
|
|
2559
2557
|
"src/client/theme/icons/deno.tsx"() {
|
|
2560
2558
|
"use strict";
|
|
2561
|
-
|
|
2562
|
-
Deno = (props) => /* @__PURE__ */ (0,
|
|
2559
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2560
|
+
Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2563
2561
|
"svg",
|
|
2564
2562
|
{
|
|
2565
2563
|
...props,
|
|
@@ -2569,7 +2567,7 @@ var init_deno = __esm({
|
|
|
2569
2567
|
strokeMiterlimit: "2",
|
|
2570
2568
|
clipRule: "evenodd",
|
|
2571
2569
|
viewBox: "0 0 441 441",
|
|
2572
|
-
children: /* @__PURE__ */ (0,
|
|
2570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2573
2571
|
"path",
|
|
2574
2572
|
{
|
|
2575
2573
|
fill: "currentColor",
|
|
@@ -2624,11 +2622,11 @@ function PackageManagerTabs({
|
|
|
2624
2622
|
setCopied(true);
|
|
2625
2623
|
setTimeout(() => setCopied(false), 2e3);
|
|
2626
2624
|
}, [activeCommand]);
|
|
2627
|
-
return /* @__PURE__ */ (0,
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
|
|
2629
2627
|
const Icon = mgr.icon;
|
|
2630
2628
|
const isActive = activeTab === mgr.id;
|
|
2631
|
-
return /* @__PURE__ */ (0,
|
|
2629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2632
2630
|
"button",
|
|
2633
2631
|
{
|
|
2634
2632
|
className: `pkg-tab-btn ${isActive ? "active" : ""}`,
|
|
@@ -2636,29 +2634,29 @@ function PackageManagerTabs({
|
|
|
2636
2634
|
"aria-selected": isActive,
|
|
2637
2635
|
role: "tab",
|
|
2638
2636
|
children: [
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: mgr.label })
|
|
2641
2639
|
]
|
|
2642
2640
|
},
|
|
2643
2641
|
mgr.id
|
|
2644
2642
|
);
|
|
2645
2643
|
}) }),
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2647
|
-
/* @__PURE__ */ (0,
|
|
2644
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
|
|
2645
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2648
2646
|
"button",
|
|
2649
2647
|
{
|
|
2650
2648
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
2651
2649
|
onClick: handleCopy,
|
|
2652
2650
|
type: "button",
|
|
2653
2651
|
"aria-label": "Copy code",
|
|
2654
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2652
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Copy, { size: 14 })
|
|
2655
2653
|
}
|
|
2656
2654
|
),
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__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 }) }) })
|
|
2658
2656
|
] })
|
|
2659
2657
|
] });
|
|
2660
2658
|
}
|
|
2661
|
-
var import_react20, import_lucide_react14,
|
|
2659
|
+
var import_react20, import_lucide_react14, import_jsx_runtime30, MANAGERS;
|
|
2662
2660
|
var init_PackageManagerTabs = __esm({
|
|
2663
2661
|
"src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
|
|
2664
2662
|
"use strict";
|
|
@@ -2669,7 +2667,7 @@ var init_PackageManagerTabs = __esm({
|
|
|
2669
2667
|
init_bun();
|
|
2670
2668
|
init_deno();
|
|
2671
2669
|
init_utils();
|
|
2672
|
-
|
|
2670
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2673
2671
|
MANAGERS = [
|
|
2674
2672
|
{ id: "npm", label: "npm", icon: NPM },
|
|
2675
2673
|
{ id: "pnpm", label: "pnpm", icon: Pnpm },
|
|
@@ -2718,7 +2716,7 @@ function AppShell({
|
|
|
2718
2716
|
...route,
|
|
2719
2717
|
Component: import_react21.default.lazy(() => {
|
|
2720
2718
|
if (!loader)
|
|
2721
|
-
return Promise.resolve({ default: () => /* @__PURE__ */ (0,
|
|
2719
|
+
return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {}) });
|
|
2722
2720
|
return loader();
|
|
2723
2721
|
})
|
|
2724
2722
|
};
|
|
@@ -2737,14 +2735,14 @@ function AppShell({
|
|
|
2737
2735
|
(0, import_react21.useEffect)(() => {
|
|
2738
2736
|
setResolvedRoutes(resolveRoutes(routesInfo));
|
|
2739
2737
|
}, [routesInfo, modules, docsDirName]);
|
|
2740
|
-
return /* @__PURE__ */ (0,
|
|
2741
|
-
/* @__PURE__ */ (0,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2743
|
-
HomePage && /* @__PURE__ */ (0,
|
|
2738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
|
|
2739
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollHandler, {}),
|
|
2740
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_router_dom11.Routes, { children: [
|
|
2741
|
+
HomePage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2744
2742
|
import_react_router_dom11.Route,
|
|
2745
2743
|
{
|
|
2746
2744
|
path: "/",
|
|
2747
|
-
element: /* @__PURE__ */ (0,
|
|
2745
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2748
2746
|
ThemeLayout,
|
|
2749
2747
|
{
|
|
2750
2748
|
config,
|
|
@@ -2753,20 +2751,20 @@ function AppShell({
|
|
|
2753
2751
|
toc: null,
|
|
2754
2752
|
breadcrumbs: null,
|
|
2755
2753
|
...config.themeConfig?.layoutProps,
|
|
2756
|
-
children: /* @__PURE__ */ (0,
|
|
2754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HomePage, {})
|
|
2757
2755
|
}
|
|
2758
2756
|
)
|
|
2759
2757
|
}
|
|
2760
2758
|
),
|
|
2761
|
-
/* @__PURE__ */ (0,
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2762
2760
|
import_react_router_dom11.Route,
|
|
2763
2761
|
{
|
|
2764
|
-
element: /* @__PURE__ */ (0,
|
|
2765
|
-
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0,
|
|
2762
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DocsLayout, { config, routes: routesInfo }),
|
|
2763
|
+
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2766
2764
|
import_react_router_dom11.Route,
|
|
2767
2765
|
{
|
|
2768
2766
|
path: route.path === "" ? "/" : route.path,
|
|
2769
|
-
element: /* @__PURE__ */ (0,
|
|
2767
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2770
2768
|
MdxPage,
|
|
2771
2769
|
{
|
|
2772
2770
|
Component: route.Component,
|
|
@@ -2779,17 +2777,17 @@ function AppShell({
|
|
|
2779
2777
|
},
|
|
2780
2778
|
"docs-layout"
|
|
2781
2779
|
),
|
|
2782
|
-
/* @__PURE__ */ (0,
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2783
2781
|
import_react_router_dom11.Route,
|
|
2784
2782
|
{
|
|
2785
2783
|
path: "*",
|
|
2786
|
-
element: /* @__PURE__ */ (0,
|
|
2784
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2787
2785
|
ThemeLayout,
|
|
2788
2786
|
{
|
|
2789
2787
|
config,
|
|
2790
2788
|
routes: routesInfo,
|
|
2791
2789
|
...config.themeConfig?.layoutProps,
|
|
2792
|
-
children: /* @__PURE__ */ (0,
|
|
2790
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {})
|
|
2793
2791
|
}
|
|
2794
2792
|
)
|
|
2795
2793
|
}
|
|
@@ -2826,13 +2824,13 @@ function DocsLayout({
|
|
|
2826
2824
|
config,
|
|
2827
2825
|
routes
|
|
2828
2826
|
}) {
|
|
2829
|
-
return /* @__PURE__ */ (0,
|
|
2827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2830
2828
|
ThemeLayout,
|
|
2831
2829
|
{
|
|
2832
2830
|
config,
|
|
2833
2831
|
routes,
|
|
2834
2832
|
...config.themeConfig?.layoutProps,
|
|
2835
|
-
children: /* @__PURE__ */ (0,
|
|
2833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.Outlet, {})
|
|
2836
2834
|
}
|
|
2837
2835
|
);
|
|
2838
2836
|
}
|
|
@@ -2841,7 +2839,7 @@ function MdxPage({
|
|
|
2841
2839
|
customComponents = {}
|
|
2842
2840
|
}) {
|
|
2843
2841
|
const allComponents = { ...mdxComponents, ...customComponents };
|
|
2844
|
-
return /* @__PURE__ */ (0,
|
|
2842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react22.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component2, {}) });
|
|
2845
2843
|
}
|
|
2846
2844
|
function createBoltdocsApp(options) {
|
|
2847
2845
|
const { target, routes, docsDirName, config, modules, hot, homePage } = options;
|
|
@@ -2851,7 +2849,7 @@ function createBoltdocsApp(options) {
|
|
|
2851
2849
|
`[boltdocs] Mount target "${target}" not found in document.`
|
|
2852
2850
|
);
|
|
2853
2851
|
}
|
|
2854
|
-
const app = /* @__PURE__ */ (0,
|
|
2852
|
+
const app = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2855
2853
|
AppShell,
|
|
2856
2854
|
{
|
|
2857
2855
|
initialRoutes: routes,
|
|
@@ -2866,7 +2864,7 @@ function createBoltdocsApp(options) {
|
|
|
2866
2864
|
container.innerHTML = "";
|
|
2867
2865
|
import_client.default.createRoot(container).render(app);
|
|
2868
2866
|
}
|
|
2869
|
-
var import_react21, import_client, import_react_router_dom11, import_react22, import_react23, import_lucide_react15,
|
|
2867
|
+
var import_react21, import_client, import_react_router_dom11, import_react22, import_react23, import_lucide_react15, import_jsx_runtime31, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
|
|
2870
2868
|
var init_app = __esm({
|
|
2871
2869
|
"src/client/app/index.tsx"() {
|
|
2872
2870
|
"use strict";
|
|
@@ -2881,7 +2879,7 @@ var init_app = __esm({
|
|
|
2881
2879
|
import_lucide_react15 = require("lucide-react");
|
|
2882
2880
|
init_CodeBlock2();
|
|
2883
2881
|
init_preload();
|
|
2884
|
-
|
|
2882
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2885
2883
|
ConfigContext = (0, import_react23.createContext)(null);
|
|
2886
2884
|
Video2 = (0, import_react23.lazy)(
|
|
2887
2885
|
() => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
|
|
@@ -2897,21 +2895,21 @@ var init_app = __esm({
|
|
|
2897
2895
|
children
|
|
2898
2896
|
}) => {
|
|
2899
2897
|
const Tag = `h${level}`;
|
|
2900
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
|
|
2901
2899
|
children,
|
|
2902
|
-
id && /* @__PURE__ */ (0,
|
|
2900
|
+
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_react15.Link, { size: 16 }) })
|
|
2903
2901
|
] });
|
|
2904
2902
|
};
|
|
2905
2903
|
mdxComponents = {
|
|
2906
|
-
h1: (props) => /* @__PURE__ */ (0,
|
|
2907
|
-
h2: (props) => /* @__PURE__ */ (0,
|
|
2908
|
-
h3: (props) => /* @__PURE__ */ (0,
|
|
2909
|
-
h4: (props) => /* @__PURE__ */ (0,
|
|
2910
|
-
h5: (props) => /* @__PURE__ */ (0,
|
|
2911
|
-
h6: (props) => /* @__PURE__ */ (0,
|
|
2912
|
-
pre: (props) => /* @__PURE__ */ (0,
|
|
2913
|
-
video: (props) => /* @__PURE__ */ (0,
|
|
2914
|
-
PackageManagerTabs: (props) => /* @__PURE__ */ (0,
|
|
2904
|
+
h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 1, ...props }),
|
|
2905
|
+
h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 2, ...props }),
|
|
2906
|
+
h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 3, ...props }),
|
|
2907
|
+
h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 4, ...props }),
|
|
2908
|
+
h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 5, ...props }),
|
|
2909
|
+
h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 6, ...props }),
|
|
2910
|
+
pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CodeBlock, { ...props, children: props.children }),
|
|
2911
|
+
video: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react23.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Video2, { ...props }) }),
|
|
2912
|
+
PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react23.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PackageManagerTabs2, { ...props }) })
|
|
2915
2913
|
};
|
|
2916
2914
|
}
|
|
2917
2915
|
});
|
|
@@ -2920,7 +2918,6 @@ var init_app = __esm({
|
|
|
2920
2918
|
var client_exports = {};
|
|
2921
2919
|
__export(client_exports, {
|
|
2922
2920
|
Admonition: () => Admonition,
|
|
2923
|
-
BackgroundGradient: () => BackgroundGradient,
|
|
2924
2921
|
Badge: () => Badge,
|
|
2925
2922
|
Breadcrumbs: () => Breadcrumbs,
|
|
2926
2923
|
Button: () => Button,
|
|
@@ -2957,15 +2954,14 @@ init_Sidebar2();
|
|
|
2957
2954
|
init_OnThisPage2();
|
|
2958
2955
|
init_Head2();
|
|
2959
2956
|
init_Breadcrumbs2();
|
|
2960
|
-
init_BackgroundGradient2();
|
|
2961
2957
|
|
|
2962
2958
|
// src/client/theme/components/Playground/Playground.tsx
|
|
2963
2959
|
var import_react24 = __toESM(require("react"));
|
|
2964
2960
|
var import_react_live = require("react-live");
|
|
2965
2961
|
var import_lucide_react16 = require("lucide-react");
|
|
2966
|
-
var
|
|
2962
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2967
2963
|
function prepareCode(raw) {
|
|
2968
|
-
const trimmed = raw.trim();
|
|
2964
|
+
const trimmed = (raw || "").trim();
|
|
2969
2965
|
const fnMatch = trimmed.match(/export\s+default\s+function\s+(\w+)/);
|
|
2970
2966
|
if (fnMatch) {
|
|
2971
2967
|
const name = fnMatch[1];
|
|
@@ -2984,65 +2980,106 @@ render(<${name} />);`;
|
|
|
2984
2980
|
return { code: trimmed, noInline: false };
|
|
2985
2981
|
}
|
|
2986
2982
|
function Playground({
|
|
2987
|
-
code,
|
|
2983
|
+
code: propsCode,
|
|
2988
2984
|
children,
|
|
2985
|
+
preview,
|
|
2989
2986
|
scope = {},
|
|
2990
2987
|
readonly = false,
|
|
2991
2988
|
noInline: forceNoInline
|
|
2992
2989
|
}) {
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2990
|
+
const initialCode = (0, import_react24.useMemo)(() => {
|
|
2991
|
+
let base = propsCode || "";
|
|
2992
|
+
if (!base && typeof children === "string") {
|
|
2993
|
+
base = children;
|
|
2994
|
+
}
|
|
2995
|
+
return base.trim();
|
|
2996
|
+
}, [propsCode, children]);
|
|
2997
|
+
const prepared = (0, import_react24.useMemo)(() => prepareCode(initialCode), [initialCode]);
|
|
2998
2998
|
const useNoInline = forceNoInline ?? prepared.noInline;
|
|
2999
2999
|
const [copied, setCopied] = (0, import_react24.useState)(false);
|
|
3000
3000
|
const [activeCode, setActiveCode] = (0, import_react24.useState)(prepared.code);
|
|
3001
|
+
const [isExpanded, setIsExpanded] = (0, import_react24.useState)(false);
|
|
3002
|
+
import_react24.default.useEffect(() => {
|
|
3003
|
+
setActiveCode(prepared.code);
|
|
3004
|
+
}, [prepared.code]);
|
|
3001
3005
|
const handleCopy = () => {
|
|
3002
|
-
|
|
3006
|
+
const textToCopy = !!preview ? initialCode : activeCode;
|
|
3007
|
+
navigator.clipboard.writeText(textToCopy);
|
|
3003
3008
|
setCopied(true);
|
|
3004
3009
|
setTimeout(() => setCopied(false), 2e3);
|
|
3005
3010
|
};
|
|
3006
3011
|
const extendedScope = { React: import_react24.default, ...scope };
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
)
|
|
3030
|
-
]
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3012
|
+
const charLimit = 800;
|
|
3013
|
+
const isExpandable = (propsCode || initialCode).length > charLimit;
|
|
3014
|
+
const shouldTruncate = isExpandable && !isExpanded;
|
|
3015
|
+
const isStatic = !!preview;
|
|
3016
|
+
const staticTransform = (code) => {
|
|
3017
|
+
return "render(<div style={{display:'none'}} />)";
|
|
3018
|
+
};
|
|
3019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: `boltdocs-playground ${shouldTruncate ? "is-truncated" : ""}`, "data-readonly": readonly || isStatic, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-split-container", children: [
|
|
3020
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel playground-preview-panel", children: [
|
|
3021
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-title", children: [
|
|
3022
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Play, { size: 14 }),
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: "Preview" })
|
|
3024
|
+
] }) }),
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-panel-content playground-preview", children: isStatic ? preview : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3026
|
+
import_react_live.LiveProvider,
|
|
3027
|
+
{
|
|
3028
|
+
code: activeCode,
|
|
3029
|
+
scope: extendedScope,
|
|
3030
|
+
theme: void 0,
|
|
3031
|
+
noInline: useNoInline,
|
|
3032
|
+
children: [
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LivePreview, {}),
|
|
3034
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LiveError, { className: "playground-error" })
|
|
3035
|
+
]
|
|
3036
|
+
}
|
|
3037
|
+
) })
|
|
3038
|
+
] }),
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel playground-editor-panel", children: [
|
|
3040
|
+
!isStatic && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-panel-header", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-title", children: [
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Terminal, { size: 14 }),
|
|
3042
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: readonly ? "Code Example" : "Live Editor" })
|
|
3043
|
+
] }) }),
|
|
3044
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "playground-panel-content playground-editor", children: [
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3046
|
+
"button",
|
|
3047
|
+
{
|
|
3048
|
+
className: "playground-copy-btn-inner",
|
|
3049
|
+
onClick: handleCopy,
|
|
3050
|
+
title: "Copy code",
|
|
3051
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Copy, { size: 14 })
|
|
3052
|
+
}
|
|
3053
|
+
),
|
|
3054
|
+
isStatic ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3055
|
+
import_react_live.LiveProvider,
|
|
3056
|
+
{
|
|
3057
|
+
code: initialCode,
|
|
3058
|
+
noInline: true,
|
|
3059
|
+
transformCode: staticTransform,
|
|
3060
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LiveEditor, { disabled: true })
|
|
3061
|
+
}
|
|
3062
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3063
|
+
import_react_live.LiveProvider,
|
|
3064
|
+
{
|
|
3065
|
+
code: activeCode,
|
|
3066
|
+
scope: extendedScope,
|
|
3067
|
+
theme: void 0,
|
|
3068
|
+
noInline: useNoInline,
|
|
3069
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_live.LiveEditor, { disabled: readonly, onChange: setActiveCode })
|
|
3070
|
+
}
|
|
3071
|
+
)
|
|
3072
|
+
] }),
|
|
3073
|
+
isExpandable && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "playground-expand-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3074
|
+
"button",
|
|
3075
|
+
{
|
|
3076
|
+
className: "playground-expand-btn",
|
|
3077
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
3078
|
+
children: isExpanded ? "Show less" : "Expand code"
|
|
3079
|
+
}
|
|
3080
|
+
) })
|
|
3081
|
+
] })
|
|
3082
|
+
] }) });
|
|
3046
3083
|
}
|
|
3047
3084
|
|
|
3048
3085
|
// src/client/index.ts
|
|
@@ -3052,7 +3089,7 @@ init_CodeBlock2();
|
|
|
3052
3089
|
init_Video2();
|
|
3053
3090
|
|
|
3054
3091
|
// src/client/theme/components/mdx/Button.tsx
|
|
3055
|
-
var
|
|
3092
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3056
3093
|
function Button({
|
|
3057
3094
|
variant = "primary",
|
|
3058
3095
|
size = "md",
|
|
@@ -3063,7 +3100,7 @@ function Button({
|
|
|
3063
3100
|
}) {
|
|
3064
3101
|
const cls = `ld-btn ld-btn--${variant} ld-btn--${size} ${className}`.trim();
|
|
3065
3102
|
if (href) {
|
|
3066
|
-
return /* @__PURE__ */ (0,
|
|
3103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3067
3104
|
"a",
|
|
3068
3105
|
{
|
|
3069
3106
|
href,
|
|
@@ -3074,18 +3111,18 @@ function Button({
|
|
|
3074
3111
|
}
|
|
3075
3112
|
);
|
|
3076
3113
|
}
|
|
3077
|
-
return /* @__PURE__ */ (0,
|
|
3114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { className: cls, ...rest, children });
|
|
3078
3115
|
}
|
|
3079
3116
|
|
|
3080
3117
|
// src/client/theme/components/mdx/Badge.tsx
|
|
3081
|
-
var
|
|
3118
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3082
3119
|
function Badge({
|
|
3083
3120
|
variant = "default",
|
|
3084
3121
|
children,
|
|
3085
3122
|
className = "",
|
|
3086
3123
|
...rest
|
|
3087
3124
|
}) {
|
|
3088
|
-
return /* @__PURE__ */ (0,
|
|
3125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3089
3126
|
"span",
|
|
3090
3127
|
{
|
|
3091
3128
|
className: `ld-badge ld-badge--${variant} ${className}`.trim(),
|
|
@@ -3096,14 +3133,14 @@ function Badge({
|
|
|
3096
3133
|
}
|
|
3097
3134
|
|
|
3098
3135
|
// src/client/theme/components/mdx/Card.tsx
|
|
3099
|
-
var
|
|
3136
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3100
3137
|
function Cards({
|
|
3101
3138
|
cols = 3,
|
|
3102
3139
|
children,
|
|
3103
3140
|
className = "",
|
|
3104
3141
|
...rest
|
|
3105
3142
|
}) {
|
|
3106
|
-
return /* @__PURE__ */ (0,
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `ld-cards ld-cards--${cols} ${className}`.trim(), ...rest, children });
|
|
3107
3144
|
}
|
|
3108
3145
|
function Card({
|
|
3109
3146
|
title,
|
|
@@ -3113,13 +3150,13 @@ function Card({
|
|
|
3113
3150
|
className = "",
|
|
3114
3151
|
...rest
|
|
3115
3152
|
}) {
|
|
3116
|
-
const inner = /* @__PURE__ */ (0,
|
|
3117
|
-
icon && /* @__PURE__ */ (0,
|
|
3118
|
-
title && /* @__PURE__ */ (0,
|
|
3119
|
-
children && /* @__PURE__ */ (0,
|
|
3153
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3154
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ld-card__icon", children: icon }),
|
|
3155
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "ld-card__title", children: title }),
|
|
3156
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ld-card__body", children })
|
|
3120
3157
|
] });
|
|
3121
3158
|
if (href) {
|
|
3122
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3123
3160
|
"a",
|
|
3124
3161
|
{
|
|
3125
3162
|
href,
|
|
@@ -3129,7 +3166,7 @@ function Card({
|
|
|
3129
3166
|
}
|
|
3130
3167
|
);
|
|
3131
3168
|
}
|
|
3132
|
-
return /* @__PURE__ */ (0,
|
|
3169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `ld-card ${className}`.trim(), ...rest, children: inner });
|
|
3133
3170
|
}
|
|
3134
3171
|
|
|
3135
3172
|
// src/client/theme/components/mdx/Tabs.tsx
|
|
@@ -3139,17 +3176,17 @@ init_npm();
|
|
|
3139
3176
|
init_pnpm();
|
|
3140
3177
|
init_bun();
|
|
3141
3178
|
init_deno();
|
|
3142
|
-
var
|
|
3179
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3143
3180
|
function Tab({ children }) {
|
|
3144
|
-
const content = typeof children === "string" ? /* @__PURE__ */ (0,
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
3181
|
+
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;
|
|
3182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-tab-panel", children: content });
|
|
3146
3183
|
}
|
|
3147
3184
|
var getIconForLabel = (label) => {
|
|
3148
3185
|
const l = label.toLowerCase();
|
|
3149
|
-
if (l.includes("pnpm")) return /* @__PURE__ */ (0,
|
|
3150
|
-
if (l.includes("npm")) return /* @__PURE__ */ (0,
|
|
3151
|
-
if (l.includes("bun")) return /* @__PURE__ */ (0,
|
|
3152
|
-
if (l.includes("deno")) return /* @__PURE__ */ (0,
|
|
3186
|
+
if (l.includes("pnpm")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Pnpm, {});
|
|
3187
|
+
if (l.includes("npm")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(NPM, {});
|
|
3188
|
+
if (l.includes("bun")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Bun, {});
|
|
3189
|
+
if (l.includes("deno")) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Deno, {});
|
|
3153
3190
|
return null;
|
|
3154
3191
|
};
|
|
3155
3192
|
function Tabs2({ defaultIndex = 0, children }) {
|
|
@@ -3170,11 +3207,11 @@ function Tabs2({ defaultIndex = 0, children }) {
|
|
|
3170
3207
|
tabRefs.current[newIndex]?.focus();
|
|
3171
3208
|
}
|
|
3172
3209
|
};
|
|
3173
|
-
return /* @__PURE__ */ (0,
|
|
3174
|
-
/* @__PURE__ */ (0,
|
|
3210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ld-tabs", children: [
|
|
3211
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ld-tabs__bar", role: "tablist", onKeyDown: handleKeyDown, children: tabs.map((child, i) => {
|
|
3175
3212
|
const label = child.props.label;
|
|
3176
3213
|
const Icon = getIconForLabel(label);
|
|
3177
|
-
return /* @__PURE__ */ (0,
|
|
3214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3178
3215
|
"button",
|
|
3179
3216
|
{
|
|
3180
3217
|
role: "tab",
|
|
@@ -3189,13 +3226,13 @@ function Tabs2({ defaultIndex = 0, children }) {
|
|
|
3189
3226
|
onClick: () => setActive(i),
|
|
3190
3227
|
children: [
|
|
3191
3228
|
Icon,
|
|
3192
|
-
/* @__PURE__ */ (0,
|
|
3229
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: label })
|
|
3193
3230
|
]
|
|
3194
3231
|
},
|
|
3195
3232
|
i
|
|
3196
3233
|
);
|
|
3197
3234
|
}) }),
|
|
3198
|
-
/* @__PURE__ */ (0,
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3199
3236
|
"div",
|
|
3200
3237
|
{
|
|
3201
3238
|
className: "ld-tabs__content",
|
|
@@ -3210,13 +3247,13 @@ function Tabs2({ defaultIndex = 0, children }) {
|
|
|
3210
3247
|
|
|
3211
3248
|
// src/client/theme/components/mdx/Admonition.tsx
|
|
3212
3249
|
var import_lucide_react17 = require("lucide-react");
|
|
3213
|
-
var
|
|
3250
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3214
3251
|
var ICON_MAP2 = {
|
|
3215
|
-
note: /* @__PURE__ */ (0,
|
|
3216
|
-
tip: /* @__PURE__ */ (0,
|
|
3217
|
-
info: /* @__PURE__ */ (0,
|
|
3218
|
-
warning: /* @__PURE__ */ (0,
|
|
3219
|
-
danger: /* @__PURE__ */ (0,
|
|
3252
|
+
note: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react17.Bookmark, { size: 18 }),
|
|
3253
|
+
tip: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react17.Lightbulb, { size: 18 }),
|
|
3254
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react17.Info, { size: 18 }),
|
|
3255
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react17.AlertTriangle, { size: 18 }),
|
|
3256
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react17.ShieldAlert, { size: 18 })
|
|
3220
3257
|
};
|
|
3221
3258
|
var LABEL_MAP = {
|
|
3222
3259
|
note: "Note",
|
|
@@ -3232,35 +3269,35 @@ function Admonition({
|
|
|
3232
3269
|
className = "",
|
|
3233
3270
|
...rest
|
|
3234
3271
|
}) {
|
|
3235
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3236
3273
|
"div",
|
|
3237
3274
|
{
|
|
3238
3275
|
className: `ld-admonition ld-admonition--${type} ${className}`.trim(),
|
|
3239
3276
|
role: type === "warning" || type === "danger" ? "alert" : "note",
|
|
3240
3277
|
...rest,
|
|
3241
3278
|
children: [
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ld-admonition__header", children: [
|
|
3280
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-admonition__icon", children: ICON_MAP2[type] }),
|
|
3281
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ld-admonition__title", children: title || LABEL_MAP[type] })
|
|
3245
3282
|
] }),
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ld-admonition__body", children })
|
|
3247
3284
|
]
|
|
3248
3285
|
}
|
|
3249
3286
|
);
|
|
3250
3287
|
}
|
|
3251
|
-
var Note = (props) => /* @__PURE__ */ (0,
|
|
3252
|
-
var Tip = (props) => /* @__PURE__ */ (0,
|
|
3253
|
-
var Warning = (props) => /* @__PURE__ */ (0,
|
|
3254
|
-
var Danger = (props) => /* @__PURE__ */ (0,
|
|
3255
|
-
var InfoBox = (props) => /* @__PURE__ */ (0,
|
|
3288
|
+
var Note = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "note", ...props });
|
|
3289
|
+
var Tip = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "tip", ...props });
|
|
3290
|
+
var Warning = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "warning", ...props });
|
|
3291
|
+
var Danger = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "danger", ...props });
|
|
3292
|
+
var InfoBox = (props) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Admonition, { type: "info", ...props });
|
|
3256
3293
|
|
|
3257
3294
|
// src/client/theme/components/mdx/List.tsx
|
|
3258
3295
|
var import_react26 = __toESM(require("react"));
|
|
3259
3296
|
var import_lucide_react18 = require("lucide-react");
|
|
3260
|
-
var
|
|
3297
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3261
3298
|
var ICON_MAP3 = {
|
|
3262
|
-
checked: /* @__PURE__ */ (0,
|
|
3263
|
-
arrow: /* @__PURE__ */ (0,
|
|
3299
|
+
checked: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react18.Check, { size: 14, className: "ld-list__icon" }),
|
|
3300
|
+
arrow: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react18.ChevronRight, { size: 14, className: "ld-list__icon" })
|
|
3264
3301
|
};
|
|
3265
3302
|
function List({
|
|
3266
3303
|
variant = "default",
|
|
@@ -3269,14 +3306,14 @@ function List({
|
|
|
3269
3306
|
...rest
|
|
3270
3307
|
}) {
|
|
3271
3308
|
if (variant === "default") {
|
|
3272
|
-
return /* @__PURE__ */ (0,
|
|
3309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: `ld-list ${className}`.trim(), ...rest, children });
|
|
3273
3310
|
}
|
|
3274
3311
|
const icon = ICON_MAP3[variant];
|
|
3275
|
-
return /* @__PURE__ */ (0,
|
|
3312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: `ld-list ld-list--${variant} ${className}`.trim(), ...rest, children: import_react26.Children.map(children, (child) => {
|
|
3276
3313
|
if (!import_react26.default.isValidElement(child)) return child;
|
|
3277
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("li", { className: "ld-list__item", children: [
|
|
3278
3315
|
icon,
|
|
3279
|
-
/* @__PURE__ */ (0,
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ld-list__text", children: child.props.children })
|
|
3280
3317
|
] });
|
|
3281
3318
|
}) });
|
|
3282
3319
|
}
|
|
@@ -3284,7 +3321,7 @@ function List({
|
|
|
3284
3321
|
// src/client/theme/components/mdx/FileTree.tsx
|
|
3285
3322
|
var import_react27 = __toESM(require("react"));
|
|
3286
3323
|
var import_lucide_react19 = require("lucide-react");
|
|
3287
|
-
var
|
|
3324
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3288
3325
|
function getTextContent(node) {
|
|
3289
3326
|
if (typeof node === "string") return node;
|
|
3290
3327
|
if (typeof node === "number") return node.toString();
|
|
@@ -3297,13 +3334,13 @@ function getTextContent(node) {
|
|
|
3297
3334
|
function getFileIcon(filename) {
|
|
3298
3335
|
const name = filename.toLowerCase();
|
|
3299
3336
|
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")) {
|
|
3300
|
-
return /* @__PURE__ */ (0,
|
|
3337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.FileCode, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
|
|
3301
3338
|
}
|
|
3302
3339
|
if (name.endsWith(".md") || name.endsWith(".mdx") || name.endsWith(".txt")) {
|
|
3303
|
-
return /* @__PURE__ */ (0,
|
|
3340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.FileText, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
|
|
3304
3341
|
}
|
|
3305
3342
|
if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".svg") || name.endsWith(".gif")) {
|
|
3306
|
-
return /* @__PURE__ */ (0,
|
|
3343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3307
3344
|
import_lucide_react19.FileImage,
|
|
3308
3345
|
{
|
|
3309
3346
|
size: 16,
|
|
@@ -3312,7 +3349,7 @@ function getFileIcon(filename) {
|
|
|
3312
3349
|
}
|
|
3313
3350
|
);
|
|
3314
3351
|
}
|
|
3315
|
-
return /* @__PURE__ */ (0,
|
|
3352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.File, { size: 16, strokeWidth: 2, className: "ld-file-tree__icon-file" });
|
|
3316
3353
|
}
|
|
3317
3354
|
function isListElement(node, tag) {
|
|
3318
3355
|
if (typeof node.type === "string") {
|
|
@@ -3335,15 +3372,15 @@ function FolderNode({
|
|
|
3335
3372
|
depth
|
|
3336
3373
|
}) {
|
|
3337
3374
|
const [isOpen, setIsOpen] = (0, import_react27.useState)(true);
|
|
3338
|
-
return /* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("li", { className: "ld-file-tree__item", children: [
|
|
3376
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3340
3377
|
"div",
|
|
3341
3378
|
{
|
|
3342
3379
|
className: "ld-file-tree__label ld-file-tree__label--folder",
|
|
3343
3380
|
onClick: () => setIsOpen(!isOpen),
|
|
3344
3381
|
style: { cursor: "pointer" },
|
|
3345
3382
|
children: [
|
|
3346
|
-
/* @__PURE__ */ (0,
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--chevron", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3347
3384
|
import_lucide_react19.ChevronRight,
|
|
3348
3385
|
{
|
|
3349
3386
|
size: 14,
|
|
@@ -3351,7 +3388,7 @@ function FolderNode({
|
|
|
3351
3388
|
strokeWidth: 3
|
|
3352
3389
|
}
|
|
3353
3390
|
) }),
|
|
3354
|
-
/* @__PURE__ */ (0,
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3355
3392
|
import_lucide_react19.Folder,
|
|
3356
3393
|
{
|
|
3357
3394
|
size: 16,
|
|
@@ -3361,11 +3398,11 @@ function FolderNode({
|
|
|
3361
3398
|
fillOpacity: 0.15
|
|
3362
3399
|
}
|
|
3363
3400
|
) }),
|
|
3364
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__name", children: labelText })
|
|
3365
3402
|
]
|
|
3366
3403
|
}
|
|
3367
3404
|
),
|
|
3368
|
-
isOpen && nestedNodes.length > 0 && /* @__PURE__ */ (0,
|
|
3405
|
+
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_react27.default.Fragment, { children: parseNode(child, depth) }, index)) })
|
|
3369
3406
|
] });
|
|
3370
3407
|
}
|
|
3371
3408
|
function parseNode(node, depth = 0) {
|
|
@@ -3373,11 +3410,11 @@ function parseNode(node, depth = 0) {
|
|
|
3373
3410
|
return node;
|
|
3374
3411
|
}
|
|
3375
3412
|
if (isListElement(node, "ul")) {
|
|
3376
|
-
return /* @__PURE__ */ (0,
|
|
3413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3377
3414
|
"ul",
|
|
3378
3415
|
{
|
|
3379
3416
|
className: `ld-file-tree__list ${depth === 0 ? "ld-file-tree__list--root" : ""}`,
|
|
3380
|
-
children: import_react27.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0,
|
|
3417
|
+
children: import_react27.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react27.default.Fragment, { children: parseNode(child, depth + 1) }, index))
|
|
3381
3418
|
}
|
|
3382
3419
|
);
|
|
3383
3420
|
}
|
|
@@ -3394,7 +3431,7 @@ function parseNode(node, depth = 0) {
|
|
|
3394
3431
|
const labelText = isExplicitDir ? rawLabelContent.slice(0, -1) : rawLabelContent;
|
|
3395
3432
|
const isFolder = hasNested || isExplicitDir;
|
|
3396
3433
|
if (isFolder) {
|
|
3397
|
-
return /* @__PURE__ */ (0,
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3398
3435
|
FolderNode,
|
|
3399
3436
|
{
|
|
3400
3437
|
labelText,
|
|
@@ -3403,25 +3440,25 @@ function parseNode(node, depth = 0) {
|
|
|
3403
3440
|
}
|
|
3404
3441
|
);
|
|
3405
3442
|
}
|
|
3406
|
-
return /* @__PURE__ */ (0,
|
|
3407
|
-
/* @__PURE__ */ (0,
|
|
3408
|
-
/* @__PURE__ */ (0,
|
|
3409
|
-
/* @__PURE__ */ (0,
|
|
3443
|
+
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: [
|
|
3444
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon ld-file-tree__icon--spacer" }),
|
|
3445
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__icon", children: getFileIcon(labelText) }),
|
|
3446
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ld-file-tree__name", children: labelText })
|
|
3410
3447
|
] }) });
|
|
3411
3448
|
}
|
|
3412
3449
|
if (node.props.children) {
|
|
3413
|
-
return import_react27.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0,
|
|
3450
|
+
return import_react27.Children.map(node.props.children, (child, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react27.default.Fragment, { children: parseNode(child, depth) }, index));
|
|
3414
3451
|
}
|
|
3415
3452
|
return node;
|
|
3416
3453
|
}
|
|
3417
3454
|
function FileTree({ children }) {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "ld-file-tree", dir: "ltr", children: import_react27.Children.map(children, (child) => parseNode(child, 0)) });
|
|
3419
3456
|
}
|
|
3420
3457
|
|
|
3421
3458
|
// src/client/theme/components/mdx/Table.tsx
|
|
3422
3459
|
var import_react28 = require("react");
|
|
3423
3460
|
var import_lucide_react20 = require("lucide-react");
|
|
3424
|
-
var
|
|
3461
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3425
3462
|
function Table({
|
|
3426
3463
|
headers,
|
|
3427
3464
|
data,
|
|
@@ -3465,68 +3502,68 @@ function Table({
|
|
|
3465
3502
|
};
|
|
3466
3503
|
const renderSortIcon = (index) => {
|
|
3467
3504
|
if (!sortable) return null;
|
|
3468
|
-
if (sortConfig?.key !== index) return /* @__PURE__ */ (0,
|
|
3469
|
-
return sortConfig.direction === "asc" ? /* @__PURE__ */ (0,
|
|
3505
|
+
if (sortConfig?.key !== index) return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronDown, { size: 14, className: "ld-table-sort-icon ld-table-sort-icon--hidden" });
|
|
3506
|
+
return sortConfig.direction === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronUp, { size: 14, className: "ld-table-sort-icon" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronDown, { size: 14, className: "ld-table-sort-icon" });
|
|
3470
3507
|
};
|
|
3471
|
-
const tableContent = children ? children : /* @__PURE__ */ (0,
|
|
3472
|
-
headers && /* @__PURE__ */ (0,
|
|
3508
|
+
const tableContent = children ? children : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
3509
|
+
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)(
|
|
3473
3510
|
"th",
|
|
3474
3511
|
{
|
|
3475
3512
|
onClick: () => requestSort(i),
|
|
3476
3513
|
className: sortable ? "ld-table-header--sortable" : "",
|
|
3477
|
-
children: /* @__PURE__ */ (0,
|
|
3514
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-header-content", children: [
|
|
3478
3515
|
header,
|
|
3479
3516
|
renderSortIcon(i)
|
|
3480
3517
|
] })
|
|
3481
3518
|
},
|
|
3482
3519
|
i
|
|
3483
3520
|
)) }) }),
|
|
3484
|
-
paginatedData && /* @__PURE__ */ (0,
|
|
3521
|
+
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)) })
|
|
3485
3522
|
] });
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3488
|
-
paginated && totalPages > 1 && /* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: `ld-table-container ${className}`.trim(), children: [
|
|
3524
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "ld-table-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("table", { className: "ld-table", children: tableContent }) }),
|
|
3525
|
+
paginated && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination", children: [
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination-info", children: [
|
|
3490
3527
|
"Page ",
|
|
3491
3528
|
currentPage,
|
|
3492
3529
|
" of ",
|
|
3493
3530
|
totalPages
|
|
3494
3531
|
] }),
|
|
3495
|
-
/* @__PURE__ */ (0,
|
|
3496
|
-
/* @__PURE__ */ (0,
|
|
3532
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ld-table-pagination-controls", children: [
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3497
3534
|
"button",
|
|
3498
3535
|
{
|
|
3499
3536
|
onClick: () => setCurrentPage(1),
|
|
3500
3537
|
disabled: currentPage === 1,
|
|
3501
3538
|
className: "ld-table-pagination-btn",
|
|
3502
|
-
children: /* @__PURE__ */ (0,
|
|
3539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronsLeft, { size: 16 })
|
|
3503
3540
|
}
|
|
3504
3541
|
),
|
|
3505
|
-
/* @__PURE__ */ (0,
|
|
3542
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3506
3543
|
"button",
|
|
3507
3544
|
{
|
|
3508
3545
|
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
3509
3546
|
disabled: currentPage === 1,
|
|
3510
3547
|
className: "ld-table-pagination-btn",
|
|
3511
|
-
children: /* @__PURE__ */ (0,
|
|
3548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronLeft, { size: 16 })
|
|
3512
3549
|
}
|
|
3513
3550
|
),
|
|
3514
|
-
/* @__PURE__ */ (0,
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3515
3552
|
"button",
|
|
3516
3553
|
{
|
|
3517
3554
|
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, totalPages)),
|
|
3518
3555
|
disabled: currentPage === totalPages,
|
|
3519
3556
|
className: "ld-table-pagination-btn",
|
|
3520
|
-
children: /* @__PURE__ */ (0,
|
|
3557
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronRight, { size: 16 })
|
|
3521
3558
|
}
|
|
3522
3559
|
),
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3560
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3524
3561
|
"button",
|
|
3525
3562
|
{
|
|
3526
3563
|
onClick: () => setCurrentPage(totalPages),
|
|
3527
3564
|
disabled: currentPage === totalPages,
|
|
3528
3565
|
className: "ld-table-pagination-btn",
|
|
3529
|
-
children: /* @__PURE__ */ (0,
|
|
3566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.ChevronsRight, { size: 16 })
|
|
3530
3567
|
}
|
|
3531
3568
|
)
|
|
3532
3569
|
] })
|
|
@@ -3535,7 +3572,7 @@ function Table({
|
|
|
3535
3572
|
}
|
|
3536
3573
|
|
|
3537
3574
|
// src/client/theme/components/mdx/Field.tsx
|
|
3538
|
-
var
|
|
3575
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3539
3576
|
function Field({
|
|
3540
3577
|
name,
|
|
3541
3578
|
type,
|
|
@@ -3545,25 +3582,24 @@ function Field({
|
|
|
3545
3582
|
id,
|
|
3546
3583
|
className = ""
|
|
3547
3584
|
}) {
|
|
3548
|
-
return /* @__PURE__ */ (0,
|
|
3549
|
-
/* @__PURE__ */ (0,
|
|
3550
|
-
/* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3552
|
-
type && /* @__PURE__ */ (0,
|
|
3553
|
-
required && /* @__PURE__ */ (0,
|
|
3585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: `ld-field ${className}`.trim(), id, children: [
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ld-field__header", children: [
|
|
3587
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ld-field__signature", children: [
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("code", { className: "ld-field__name", children: name }),
|
|
3589
|
+
type && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ld-field__type-badge", children: type }),
|
|
3590
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ld-field__required-badge", children: "required" })
|
|
3554
3591
|
] }),
|
|
3555
|
-
defaultValue && /* @__PURE__ */ (0,
|
|
3556
|
-
/* @__PURE__ */ (0,
|
|
3557
|
-
/* @__PURE__ */ (0,
|
|
3592
|
+
defaultValue && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ld-field__default", children: [
|
|
3593
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ld-field__default-label", children: "Default:" }),
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("code", { className: "ld-field__default-value", children: defaultValue })
|
|
3558
3595
|
] })
|
|
3559
3596
|
] }),
|
|
3560
|
-
/* @__PURE__ */ (0,
|
|
3597
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "ld-field__content", children })
|
|
3561
3598
|
] });
|
|
3562
3599
|
}
|
|
3563
3600
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3564
3601
|
0 && (module.exports = {
|
|
3565
3602
|
Admonition,
|
|
3566
|
-
BackgroundGradient,
|
|
3567
3603
|
Badge,
|
|
3568
3604
|
Breadcrumbs,
|
|
3569
3605
|
Button,
|