boltdocs 2.7.11 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/banner-3N4Jd_L9.d.ts +100 -0
- package/dist/banner-MynZD_Ox.d.cts +100 -0
- package/dist/cache-BMUyNiiA.mjs +6 -0
- package/dist/cache-CKm45d2w.cjs +6 -0
- package/dist/client/index.cjs +782 -443
- package/dist/client/index.d.cts +86 -110
- package/dist/client/index.d.ts +87 -111
- package/dist/client/index.js +773 -439
- package/dist/client/mdx.cjs +8 -3
- package/dist/client/mdx.d.cts +39 -93
- package/dist/client/mdx.d.ts +38 -93
- package/dist/client/mdx.js +3 -3
- package/dist/client/primitives.cjs +7 -7
- package/dist/client/primitives.d.cts +411 -347
- package/dist/client/primitives.d.ts +411 -347
- package/dist/client/primitives.js +4 -4
- package/dist/{docs-layout-BXHV0xw_.cjs → docs-layout-CwCq42Zt.cjs} +95 -178
- package/dist/{docs-layout-DwFndmj5.js → docs-layout-Dn6S5g59.js} +99 -163
- package/dist/doctor-BArviV8X.cjs +28 -0
- package/dist/doctor-CgLA7_Uv.mjs +28 -0
- package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
- package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
- package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
- package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
- package/dist/{icons-dev-3cZMyt8r.cjs → icons-dev-DvJ-hh9x.cjs} +116 -111
- package/dist/{icons-dev-Df8OQ481.js → icons-dev-Oju24Wjp.js} +120 -114
- package/dist/{image-DtrI2cw3.cjs → image-Ch4-GxdO.cjs} +13 -13
- package/dist/{image-jxPb-2iV.js → image-Do8V9PCW.js} +13 -13
- package/dist/{mdx-UTTLFWJq.js → mdx-D3A2_l7P.js} +106 -80
- package/dist/{mdx-BdWkJTeB.cjs → mdx-PLhhPJRS.cjs} +104 -96
- package/dist/node/cli-entry.cjs +3 -1
- package/dist/node/cli-entry.mjs +3 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +258 -152
- package/dist/node/index.d.mts +258 -150
- package/dist/node/index.mjs +1 -1
- package/dist/node/routes/worker.cjs +1 -1
- package/dist/node/routes/worker.mjs +1 -1
- package/dist/node-BmlP0eBP.cjs +159 -0
- package/dist/node-Y8_4ayje.mjs +159 -0
- package/dist/package-2nFy_NsW.cjs +6 -0
- package/dist/{package-K0zsjGIz.mjs → package-DAbtltXX.mjs} +1 -1
- package/dist/parser-B7-6PyQz.cjs +6 -0
- package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
- package/dist/parser-WGZdWs0X.mjs +6 -0
- package/dist/routes-BDDSxAl0.mjs +6 -0
- package/dist/routes-DJNJ-rTt.cjs +6 -0
- package/dist/routes-DiYC4nD2.cjs +6 -0
- package/dist/routes-_Bb2f4eI.mjs +6 -0
- package/dist/{search-dialog-C7xuvyNk.cjs → search-dialog-BXVoecTx.cjs} +175 -78
- package/dist/{search-dialog-BwkDuI9R.cjs → search-dialog-BYhOov4S.cjs} +118 -7
- package/dist/{search-dialog-D-DDN7zJ.js → search-dialog-C09riYmx.js} +113 -8
- package/dist/{search-dialog-CIQg6k8c.cjs → search-dialog-CUeAfy-8.cjs} +1 -1
- package/dist/{search-dialog-BNF10tDl.js → search-dialog-D8gLkhUV.js} +158 -80
- package/dist/{search-dialog-BHuIiUC6.js → search-dialog-DHc_8FFX.js} +1 -1
- package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-DNq4_ZAa.d.ts} +117 -51
- package/dist/{sidebar-CcBkrm06.d.cts → sidebar-Dlkgbxs6.d.cts} +117 -51
- package/dist/utils-BYITg7T5.mjs +7 -0
- package/dist/utils-Cjmx1hhk.cjs +7 -0
- package/dist/worker-pool-CtqklOXq.cjs +6 -0
- package/dist/worker-pool-k0DY6k8T.mjs +6 -0
- package/package.json +3 -3
- package/src/shared/config-utils.ts +4 -0
- package/src/shared/types.ts +52 -6
- package/dist/cache-Ba-DZQNH.cjs +0 -6
- package/dist/cache-BuMZ58L5.mjs +0 -6
- package/dist/cards-BakZPTz9.d.ts +0 -30
- package/dist/cards-CQn9mXZS.d.cts +0 -30
- package/dist/doctor-Be7Ly1oM.mjs +0 -21
- package/dist/doctor-jMxWZyLJ.cjs +0 -21
- package/dist/node-BSM4qcDK.cjs +0 -111
- package/dist/node-BspZN3R2.mjs +0 -111
- package/dist/package-DIIrjuWI.cjs +0 -6
- package/dist/parser-CdNbqN5y.cjs +0 -6
- package/dist/parser-nE792MLO.mjs +0 -6
- package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
- package/dist/routes-2k3tbUmC.cjs +0 -6
- package/dist/routes-CpxZIsMM.mjs +0 -6
- package/dist/utils-CG65J0Sc.mjs +0 -7
- package/dist/utils-CKunkU96.cjs +0 -7
- package/dist/worker-pool-CGn7DrLb.mjs +0 -6
- package/dist/worker-pool-Crbqgw5R.cjs +0 -6
- /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { _ as Link, v as NavLink, y as cn } from "../icons-dev-
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { n as Navbar, t as SearchDialog } from "../search-dialog-
|
|
6
|
+
import { _ as Link, v as NavLink, y as cn } from "../icons-dev-Oju24Wjp.js";
|
|
7
|
+
import { a as CodeBlockGroup, i as CodeBlockContent, n as Tooltip, o as CodeBlockHeader, r as CodeBlock, s as Heading, t as Image } from "../image-Do8V9PCW.js";
|
|
8
|
+
import { C as useItems, D as ButtonGroup, E as Popover, O as Breadcrumbs, S as useActiveAnchors, T as Menu, _ as OnThisPage, a as SidebarContent, b as ScrollProvider, c as SidebarItem, d as SidebarMobile, f as SidebarRoot, g as AnchorProvider, h as PageNav, i as Sidebar, l as SidebarItems, o as SidebarGroup, p as SidebarSubGroup, s as SidebarHeader, t as DocsLayout, u as SidebarLink, v as OnThisPageItems, w as Tabs, x as useActiveAnchor, y as OnThisPageTree } from "../docs-layout-Dn6S5g59.js";
|
|
9
|
+
import { a as Button, i as ErrorBoundaryFallback, n as Navbar, r as ErrorBoundary, t as SearchDialog } from "../search-dialog-D8gLkhUV.js";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
|
|
12
12
|
//#region src/client/components/primitives/skeleton.tsx
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
const require_icons_dev = require('./icons-dev-
|
|
7
|
-
let react_router_dom = require("react-router-dom");
|
|
6
|
+
const require_icons_dev = require('./icons-dev-DvJ-hh9x.cjs');
|
|
8
7
|
let react = require("react");
|
|
9
|
-
|
|
8
|
+
let react_router_dom = require("react-router-dom");
|
|
10
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
10
|
let react_aria_components = require("react-aria-components");
|
|
12
11
|
react_aria_components = require_icons_dev.__toESM(react_aria_components);
|
|
@@ -15,49 +14,73 @@ virtual_boltdocs_icons = require_icons_dev.__toESM(virtual_boltdocs_icons);
|
|
|
15
14
|
let scroll_into_view_if_needed = require("scroll-into-view-if-needed");
|
|
16
15
|
scroll_into_view_if_needed = require_icons_dev.__toESM(scroll_into_view_if_needed);
|
|
17
16
|
|
|
17
|
+
//#region src/client/app/ui-context.tsx
|
|
18
|
+
const UIContext = (0, react.createContext)(void 0);
|
|
19
|
+
function UIProvider({ children }) {
|
|
20
|
+
const [isSidebarOpen, setIsSidebarOpen] = (0, react.useState)(false);
|
|
21
|
+
const location = (0, react_router_dom.useLocation)();
|
|
22
|
+
const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);
|
|
23
|
+
const closeSidebar = () => setIsSidebarOpen(false);
|
|
24
|
+
(0, react.useEffect)(() => {
|
|
25
|
+
setIsSidebarOpen(false);
|
|
26
|
+
}, [location.pathname]);
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UIContext.Provider, {
|
|
28
|
+
value: {
|
|
29
|
+
isSidebarOpen,
|
|
30
|
+
toggleSidebar,
|
|
31
|
+
closeSidebar
|
|
32
|
+
},
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function useUI() {
|
|
37
|
+
const context = (0, react.useContext)(UIContext);
|
|
38
|
+
if (context === void 0) return {
|
|
39
|
+
isSidebarOpen: false,
|
|
40
|
+
toggleSidebar: () => {},
|
|
41
|
+
closeSidebar: () => {}
|
|
42
|
+
};
|
|
43
|
+
return context;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
18
47
|
//#region src/client/components/primitives/breadcrumbs.tsx
|
|
19
|
-
|
|
48
|
+
function Breadcrumbs({ children, className, ...props }) {
|
|
20
49
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumbs, {
|
|
21
50
|
className: require_icons_dev.cn("flex flex-wrap items-center", className),
|
|
22
51
|
...props,
|
|
23
52
|
children
|
|
24
53
|
});
|
|
25
|
-
}
|
|
26
|
-
|
|
54
|
+
}
|
|
55
|
+
function BreadcrumbsItem({ children, className, ...props }) {
|
|
27
56
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Breadcrumb, {
|
|
28
57
|
className: require_icons_dev.cn("flex items-center", className),
|
|
29
58
|
...props,
|
|
30
59
|
children
|
|
31
60
|
});
|
|
32
|
-
}
|
|
33
|
-
|
|
61
|
+
}
|
|
62
|
+
function BreadcrumbsLink({ children, href, className, ...props }) {
|
|
34
63
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.Link, {
|
|
35
64
|
href,
|
|
36
65
|
className: require_icons_dev.cn("cursor-pointer", className),
|
|
37
66
|
...props,
|
|
38
67
|
children
|
|
39
68
|
});
|
|
40
|
-
}
|
|
41
|
-
|
|
69
|
+
}
|
|
70
|
+
function BreadcrumbsSeparator({ className }) {
|
|
42
71
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, {
|
|
43
72
|
size: 14,
|
|
44
73
|
className: require_icons_dev.cn("shrink-0", className)
|
|
45
74
|
});
|
|
46
|
-
}
|
|
75
|
+
}
|
|
47
76
|
Breadcrumbs.Root = Breadcrumbs;
|
|
48
77
|
Breadcrumbs.Item = BreadcrumbsItem;
|
|
49
78
|
Breadcrumbs.Link = BreadcrumbsLink;
|
|
50
79
|
Breadcrumbs.Separator = BreadcrumbsSeparator;
|
|
51
80
|
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/client/components/primitives/button.tsx
|
|
54
|
-
const Button = ({ ...props }) => {
|
|
55
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, { ...props });
|
|
56
|
-
};
|
|
57
|
-
|
|
58
81
|
//#endregion
|
|
59
82
|
//#region src/client/components/primitives/button-group.tsx
|
|
60
|
-
|
|
83
|
+
function ButtonGroup({ children, className, vertical = false }) {
|
|
61
84
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
62
85
|
className: require_icons_dev.cn("inline-flex", vertical ? "flex-col" : "flex-row", !vertical && [
|
|
63
86
|
"[&>*:not(:first-child)]:-ml-px",
|
|
@@ -76,21 +99,21 @@ const ButtonGroup = ({ children, className, vertical = false }) => {
|
|
|
76
99
|
], className),
|
|
77
100
|
children
|
|
78
101
|
});
|
|
79
|
-
}
|
|
102
|
+
}
|
|
80
103
|
|
|
81
104
|
//#endregion
|
|
82
105
|
//#region src/client/components/primitives/popover.tsx
|
|
83
106
|
/**
|
|
84
107
|
* A reusable Popover primitive with premium glassmorphism styling and smooth animations.
|
|
85
108
|
*/
|
|
86
|
-
|
|
109
|
+
function Popover({ children, className, ...props }) {
|
|
87
110
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Popover, {
|
|
88
111
|
offset: 8,
|
|
89
112
|
className: require_icons_dev.cn("z-50 overflow-auto outline-none transition-none", className),
|
|
90
113
|
...props,
|
|
91
114
|
children
|
|
92
115
|
});
|
|
93
|
-
}
|
|
116
|
+
}
|
|
94
117
|
|
|
95
118
|
//#endregion
|
|
96
119
|
//#region src/client/components/primitives/menu.tsx
|
|
@@ -177,85 +200,23 @@ Menu.SubTrigger = SubmenuTrigger;
|
|
|
177
200
|
Menu.Section = MenuSection;
|
|
178
201
|
Menu.Separator = MenuSeparator;
|
|
179
202
|
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/client/components/primitives/error-boundary.tsx
|
|
182
|
-
var ErrorBoundary = class extends react.Component {
|
|
183
|
-
state = {
|
|
184
|
-
hasError: false,
|
|
185
|
-
error: null
|
|
186
|
-
};
|
|
187
|
-
static getDerivedStateFromError(error) {
|
|
188
|
-
return {
|
|
189
|
-
hasError: true,
|
|
190
|
-
error
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
componentDidCatch(error, errorInfo) {
|
|
194
|
-
if (this.props.onError) this.props.onError(error, errorInfo);
|
|
195
|
-
else console.error("ErrorBoundary caught an unhandled error:", error, errorInfo);
|
|
196
|
-
}
|
|
197
|
-
resetErrorBoundary = () => {
|
|
198
|
-
if (this.props.onReset) this.props.onReset();
|
|
199
|
-
this.setState({
|
|
200
|
-
hasError: false,
|
|
201
|
-
error: null
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
render() {
|
|
205
|
-
const { hasError, error } = this.state;
|
|
206
|
-
const { children, fallback, FallbackComponent } = this.props;
|
|
207
|
-
if (hasError && error) {
|
|
208
|
-
if (FallbackComponent) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FallbackComponent, {
|
|
209
|
-
error,
|
|
210
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
211
|
-
});
|
|
212
|
-
if (fallback) return fallback;
|
|
213
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ErrorBoundaryFallback, {
|
|
214
|
-
error,
|
|
215
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
return children;
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
function ErrorBoundaryFallback({ error, resetErrorBoundary }) {
|
|
222
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
223
|
-
className: "flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-6 py-8 border border-subtle bg-surface rounded-2xl max-w-lg mx-auto shadow-xs",
|
|
224
|
-
children: [
|
|
225
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
226
|
-
className: "text-lg font-bold text-rose-600 dark:text-rose-400",
|
|
227
|
-
children: "Something went wrong"
|
|
228
|
-
}),
|
|
229
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
230
|
-
className: "text-sm text-muted max-w-sm leading-relaxed",
|
|
231
|
-
children: error?.message || "An unexpected error occurred while rendering this page."
|
|
232
|
-
}),
|
|
233
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
234
|
-
className: "rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none",
|
|
235
|
-
onPress: resetErrorBoundary,
|
|
236
|
-
children: "Try again"
|
|
237
|
-
})
|
|
238
|
-
]
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
|
|
242
203
|
//#endregion
|
|
243
204
|
//#region src/client/components/primitives/tabs.tsx
|
|
244
|
-
|
|
205
|
+
function Tabs({ children, className = "", ...props }) {
|
|
245
206
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
246
207
|
className: require_icons_dev.cn("w-full", className),
|
|
247
208
|
...props,
|
|
248
209
|
children
|
|
249
210
|
});
|
|
250
|
-
}
|
|
251
|
-
|
|
211
|
+
}
|
|
212
|
+
function TabsList({ children, className = "" }) {
|
|
252
213
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
253
214
|
role: "tablist",
|
|
254
|
-
className: require_icons_dev.cn("relative flex flex-row items-center", className),
|
|
215
|
+
className: require_icons_dev.cn("relative flex flex-row items-center overflow-x-auto", className),
|
|
255
216
|
children
|
|
256
217
|
});
|
|
257
|
-
}
|
|
258
|
-
|
|
218
|
+
}
|
|
219
|
+
function TabsItem({ children, id, selected, className = "", ...props }) {
|
|
259
220
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
260
221
|
role: "tab",
|
|
261
222
|
"aria-selected": selected,
|
|
@@ -264,55 +225,25 @@ const TabsItem = ({ children, id, selected, className = "", ...props }) => {
|
|
|
264
225
|
...props,
|
|
265
226
|
children
|
|
266
227
|
});
|
|
267
|
-
}
|
|
268
|
-
|
|
228
|
+
}
|
|
229
|
+
function TabsContent({ children, className = "" }) {
|
|
269
230
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
270
231
|
className: require_icons_dev.cn("outline-none", className),
|
|
271
232
|
children
|
|
272
233
|
});
|
|
273
|
-
}
|
|
274
|
-
|
|
234
|
+
}
|
|
235
|
+
function TabsIndicator({ className = "", style }) {
|
|
275
236
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
276
237
|
className: require_icons_dev.cn("absolute bottom-0", className),
|
|
277
238
|
style
|
|
278
239
|
});
|
|
279
|
-
}
|
|
240
|
+
}
|
|
280
241
|
Tabs.Root = Tabs;
|
|
281
242
|
Tabs.List = TabsList;
|
|
282
243
|
Tabs.Item = TabsItem;
|
|
283
244
|
Tabs.Content = TabsContent;
|
|
284
245
|
Tabs.Indicator = TabsIndicator;
|
|
285
246
|
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region src/client/app/ui-context.tsx
|
|
288
|
-
const UIContext = (0, react.createContext)(void 0);
|
|
289
|
-
function UIProvider({ children }) {
|
|
290
|
-
const [isSidebarOpen, setIsSidebarOpen] = (0, react.useState)(false);
|
|
291
|
-
const location = (0, react_router_dom.useLocation)();
|
|
292
|
-
const toggleSidebar = () => setIsSidebarOpen((prev) => !prev);
|
|
293
|
-
const closeSidebar = () => setIsSidebarOpen(false);
|
|
294
|
-
(0, react.useEffect)(() => {
|
|
295
|
-
setIsSidebarOpen(false);
|
|
296
|
-
}, [location.pathname]);
|
|
297
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UIContext.Provider, {
|
|
298
|
-
value: {
|
|
299
|
-
isSidebarOpen,
|
|
300
|
-
toggleSidebar,
|
|
301
|
-
closeSidebar
|
|
302
|
-
},
|
|
303
|
-
children
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
function useUI() {
|
|
307
|
-
const context = (0, react.useContext)(UIContext);
|
|
308
|
-
if (context === void 0) return {
|
|
309
|
-
isSidebarOpen: false,
|
|
310
|
-
toggleSidebar: () => {},
|
|
311
|
-
closeSidebar: () => {}
|
|
312
|
-
};
|
|
313
|
-
return context;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
247
|
//#endregion
|
|
317
248
|
//#region src/client/components/primitives/helpers/observer.ts
|
|
318
249
|
function getItemId(url) {
|
|
@@ -323,6 +254,7 @@ var Observer = class {
|
|
|
323
254
|
items = [];
|
|
324
255
|
single = false;
|
|
325
256
|
observer = null;
|
|
257
|
+
timers = [];
|
|
326
258
|
onChange;
|
|
327
259
|
callback(_entries) {
|
|
328
260
|
for (const item of this.items) {
|
|
@@ -386,9 +318,9 @@ var Observer = class {
|
|
|
386
318
|
}
|
|
387
319
|
this.watchItems();
|
|
388
320
|
if (typeof window !== "undefined") {
|
|
389
|
-
setTimeout(() => this.watchItems(), 100);
|
|
390
|
-
setTimeout(() => this.watchItems(), 500);
|
|
391
|
-
setTimeout(() => this.watchItems(), 1e3);
|
|
321
|
+
this.timers.push(setTimeout(() => this.watchItems(), 100));
|
|
322
|
+
this.timers.push(setTimeout(() => this.watchItems(), 500));
|
|
323
|
+
this.timers.push(setTimeout(() => this.watchItems(), 1e3));
|
|
392
324
|
}
|
|
393
325
|
this.onChange?.();
|
|
394
326
|
}
|
|
@@ -406,6 +338,8 @@ var Observer = class {
|
|
|
406
338
|
}
|
|
407
339
|
}
|
|
408
340
|
unwatch() {
|
|
341
|
+
for (const timer of this.timers) clearTimeout(timer);
|
|
342
|
+
this.timers = [];
|
|
409
343
|
this.observer?.disconnect();
|
|
410
344
|
this.observer = null;
|
|
411
345
|
}
|
|
@@ -473,20 +407,20 @@ function AnchorProvider({ toc, single = false, observerOptions, children }) {
|
|
|
473
407
|
children
|
|
474
408
|
});
|
|
475
409
|
}
|
|
476
|
-
|
|
410
|
+
function OnThisPage({ children, className }) {
|
|
477
411
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
478
412
|
className: require_icons_dev.cn("sticky top-navbar hidden xl:flex flex-col shrink-0", "w-toc", "py-4 pl-6 pr-4", className),
|
|
479
413
|
children
|
|
480
414
|
});
|
|
481
|
-
}
|
|
482
|
-
|
|
415
|
+
}
|
|
416
|
+
function OnThisPageHeader({ children, className, ...props }) {
|
|
483
417
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
484
418
|
className: require_icons_dev.cn("mb-4 text-xs font-bold text-body", className),
|
|
485
419
|
...props,
|
|
486
420
|
children
|
|
487
421
|
});
|
|
488
|
-
}
|
|
489
|
-
|
|
422
|
+
}
|
|
423
|
+
function OnThisPageContent({ children, className, ref, ...props }) {
|
|
490
424
|
const internalRef = (0, react.useRef)(null);
|
|
491
425
|
(0, react.useImperativeHandle)(ref, () => internalRef.current);
|
|
492
426
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -499,21 +433,21 @@ const OnThisPageContent = ({ children, className, ref, ...props }) => {
|
|
|
499
433
|
...props,
|
|
500
434
|
children
|
|
501
435
|
});
|
|
502
|
-
}
|
|
436
|
+
}
|
|
503
437
|
OnThisPageContent.displayName = "OnThisPageContent";
|
|
504
|
-
|
|
438
|
+
function OnThisPageList({ children, className }) {
|
|
505
439
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
506
440
|
className: require_icons_dev.cn("relative space-y-0.5 text-sm border-l border-subtle", className),
|
|
507
441
|
children
|
|
508
442
|
});
|
|
509
|
-
}
|
|
510
|
-
|
|
443
|
+
}
|
|
444
|
+
function OnThisPageItem({ level, children, className }) {
|
|
511
445
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
512
446
|
className: require_icons_dev.cn(level === 3 && "pl-3", className),
|
|
513
447
|
children
|
|
514
448
|
});
|
|
515
|
-
}
|
|
516
|
-
|
|
449
|
+
}
|
|
450
|
+
function OnThisPageLink({ children, href, active, onClick, className }) {
|
|
517
451
|
const items = (0, react.use)(ItemsContext);
|
|
518
452
|
const containerRef = (0, react.use)(ScrollContext);
|
|
519
453
|
const id = href ? getItemId(href) : null;
|
|
@@ -548,8 +482,8 @@ const OnThisPageLink = ({ children, href, active, onClick, className }) => {
|
|
|
548
482
|
className: require_icons_dev.cn("block py-0.5 pl-4 text-[13px] outline-none transition-colors", computedActive ? "text-primary-500" : "text-muted hover:text-body", className),
|
|
549
483
|
children
|
|
550
484
|
});
|
|
551
|
-
}
|
|
552
|
-
|
|
485
|
+
}
|
|
486
|
+
function OnThisPageIndicator({ style, className }) {
|
|
553
487
|
const containerRef = (0, react.useRef)(null);
|
|
554
488
|
const [internalStyle, setInternalStyle] = (0, react.useState)({
|
|
555
489
|
opacity: 0,
|
|
@@ -586,7 +520,7 @@ const OnThisPageIndicator = ({ style, className }) => {
|
|
|
586
520
|
...internalStyle
|
|
587
521
|
}
|
|
588
522
|
});
|
|
589
|
-
}
|
|
523
|
+
}
|
|
590
524
|
/**
|
|
591
525
|
* High-level automated list of toc items
|
|
592
526
|
*/
|
|
@@ -643,13 +577,13 @@ OnThisPage.Tree = OnThisPageTree;
|
|
|
643
577
|
|
|
644
578
|
//#endregion
|
|
645
579
|
//#region src/client/components/primitives/page-nav.tsx
|
|
646
|
-
|
|
580
|
+
function PageNav({ children, className }) {
|
|
647
581
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
648
582
|
className: require_icons_dev.cn("grid sm:grid-cols-2 gap-4", className),
|
|
649
583
|
children
|
|
650
584
|
});
|
|
651
|
-
}
|
|
652
|
-
|
|
585
|
+
}
|
|
586
|
+
function PageNavLink({ children, to, direction, className }) {
|
|
653
587
|
const isNext = direction === "next";
|
|
654
588
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
|
|
655
589
|
href: to,
|
|
@@ -663,22 +597,22 @@ const PageNavLink = ({ children, to, direction, className }) => {
|
|
|
663
597
|
isNext && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_dev.ChevronRight, { className: "shrink-0" })
|
|
664
598
|
]
|
|
665
599
|
});
|
|
666
|
-
}
|
|
667
|
-
|
|
600
|
+
}
|
|
601
|
+
function PageNavTitle({ children, className }) {
|
|
668
602
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
669
603
|
className: require_icons_dev.cn(className),
|
|
670
604
|
children
|
|
671
605
|
});
|
|
672
|
-
}
|
|
673
|
-
|
|
606
|
+
}
|
|
607
|
+
function PageNavDescription({ children, className }) {
|
|
674
608
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
675
609
|
className: require_icons_dev.cn("truncate", className),
|
|
676
610
|
children
|
|
677
611
|
});
|
|
678
|
-
}
|
|
679
|
-
|
|
612
|
+
}
|
|
613
|
+
function PageNavIcon({ children }) {
|
|
680
614
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
681
|
-
}
|
|
615
|
+
}
|
|
682
616
|
PageNav.Root = PageNav;
|
|
683
617
|
PageNav.Link = PageNavLink;
|
|
684
618
|
PageNav.Title = PageNavTitle;
|
|
@@ -693,7 +627,8 @@ function useSidebar(routes) {
|
|
|
693
627
|
return (0, react.useMemo)(() => {
|
|
694
628
|
const activeRoute = routes.find((r) => require_icons_dev.normalizePath(r.path) === currentPath);
|
|
695
629
|
const activeTabId = activeRoute?.tab?.toLowerCase();
|
|
696
|
-
const
|
|
630
|
+
const noCollection = routes.filter((r) => !r.collection);
|
|
631
|
+
const filteredRoutes = activeTabId ? noCollection.filter((r) => !r.tab || r.tab.toLowerCase() === activeTabId) : noCollection;
|
|
697
632
|
const directoryMeta = {};
|
|
698
633
|
if (config.directoryMeta) for (const [key, value] of Object.entries(config.directoryMeta)) {
|
|
699
634
|
const cleanKey = key.split("/").filter((part) => !part.startsWith("(") || !part.endsWith(")")).map((part) => part.replace(/^\d+-/, "")).join("/");
|
|
@@ -818,7 +753,7 @@ function getIcon(iconName) {
|
|
|
818
753
|
/**
|
|
819
754
|
* Internal Badge component for links
|
|
820
755
|
*/
|
|
821
|
-
|
|
756
|
+
function Badge({ badge }) {
|
|
822
757
|
const colors = {
|
|
823
758
|
new: "bg-primary-500/10 text-primary-500 border border-primary-500/20",
|
|
824
759
|
updated: "bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",
|
|
@@ -830,7 +765,7 @@ const Badge = ({ badge }) => {
|
|
|
830
765
|
className: require_icons_dev.cn("ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider", colors[text] || colors.new),
|
|
831
766
|
children: text
|
|
832
767
|
});
|
|
833
|
-
}
|
|
768
|
+
}
|
|
834
769
|
/**
|
|
835
770
|
* Desktop Sidebar Container
|
|
836
771
|
*/
|
|
@@ -897,7 +832,7 @@ function SidebarContent({ children, className }) {
|
|
|
897
832
|
/**
|
|
898
833
|
* Navigation Group
|
|
899
834
|
*/
|
|
900
|
-
|
|
835
|
+
function SidebarGroup({ title, icon: Icon, children, className }) {
|
|
901
836
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
902
837
|
className,
|
|
903
838
|
children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h4", {
|
|
@@ -908,8 +843,8 @@ const SidebarGroup = ({ title, icon: Icon, children, className }) => {
|
|
|
908
843
|
children
|
|
909
844
|
})]
|
|
910
845
|
});
|
|
911
|
-
}
|
|
912
|
-
|
|
846
|
+
}
|
|
847
|
+
function SidebarLink({ label, href, active, icon: Icon, badge, className }) {
|
|
913
848
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icons_dev.Link, {
|
|
914
849
|
href,
|
|
915
850
|
className: require_icons_dev.cn("group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none", active ? "bg-primary-500/10 text-primary-500 font-medium shadow-sm" : "text-muted hover:bg-surface hover:text-body", className),
|
|
@@ -925,11 +860,11 @@ const SidebarLink = ({ label, href, active, icon: Icon, badge, className }) => {
|
|
|
925
860
|
badge && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Badge, { badge })
|
|
926
861
|
]
|
|
927
862
|
});
|
|
928
|
-
}
|
|
863
|
+
}
|
|
929
864
|
/**
|
|
930
865
|
* Nested SubGroup
|
|
931
866
|
*/
|
|
932
|
-
|
|
867
|
+
function SidebarSubGroup({ label, href, active, icon: Icon, badge, isOpen, onToggle, children, className }) {
|
|
933
868
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
934
869
|
className: "flex flex-col gap-0.5",
|
|
935
870
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -958,7 +893,7 @@ const SidebarSubGroup = ({ label, href, active, icon: Icon, badge, isOpen, onTog
|
|
|
958
893
|
children
|
|
959
894
|
})]
|
|
960
895
|
});
|
|
961
|
-
}
|
|
896
|
+
}
|
|
962
897
|
function SidebarItem({ route, activePath, activeRoute, className }) {
|
|
963
898
|
const localizedHref = require_icons_dev.useLocalizedTo(route.path);
|
|
964
899
|
const isCurrent = activePath === (localizedHref.endsWith("/") ? localizedHref.slice(0, -1) : localizedHref) || !!activeRoute?.filePath && !!route.filePath && activeRoute.filePath === route.filePath;
|
|
@@ -1243,12 +1178,6 @@ Object.defineProperty(exports, 'Breadcrumbs', {
|
|
|
1243
1178
|
return Breadcrumbs;
|
|
1244
1179
|
}
|
|
1245
1180
|
});
|
|
1246
|
-
Object.defineProperty(exports, 'Button', {
|
|
1247
|
-
enumerable: true,
|
|
1248
|
-
get: function () {
|
|
1249
|
-
return Button;
|
|
1250
|
-
}
|
|
1251
|
-
});
|
|
1252
1181
|
Object.defineProperty(exports, 'ButtonGroup', {
|
|
1253
1182
|
enumerable: true,
|
|
1254
1183
|
get: function () {
|
|
@@ -1261,18 +1190,6 @@ Object.defineProperty(exports, 'DocsLayout', {
|
|
|
1261
1190
|
return DocsLayout;
|
|
1262
1191
|
}
|
|
1263
1192
|
});
|
|
1264
|
-
Object.defineProperty(exports, 'ErrorBoundary', {
|
|
1265
|
-
enumerable: true,
|
|
1266
|
-
get: function () {
|
|
1267
|
-
return ErrorBoundary;
|
|
1268
|
-
}
|
|
1269
|
-
});
|
|
1270
|
-
Object.defineProperty(exports, 'ErrorBoundaryFallback', {
|
|
1271
|
-
enumerable: true,
|
|
1272
|
-
get: function () {
|
|
1273
|
-
return ErrorBoundaryFallback;
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
1193
|
Object.defineProperty(exports, 'Menu', {
|
|
1277
1194
|
enumerable: true,
|
|
1278
1195
|
get: function () {
|