@docubook/flame 2.0.0-alpha.1 → 2.0.0-alpha.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/.docu/components/Menu.tsx +38 -32
- package/.docu/components/Sublink.tsx +72 -9
- package/.docu/lib/build.deno.js +3 -3
- package/.docu/lib/{build.impl-VXB4KL4D.js → build.impl-AZBZN66Q.js} +3 -3
- package/.docu/lib/build.node.js +3 -3
- package/.docu/lib/{chunk-MQWWCO6O.js → chunk-3LRUTZZD.js} +2 -2
- package/.docu/lib/{chunk-TRT6WQZG.js → chunk-42JQLAKP.js} +46 -12
- package/.docu/lib/{chunk-A6FIEG3H.js → chunk-HF3KKRQL.js} +2 -2
- package/.docu/lib/{chunk-JRERMREW.js → chunk-IN2QAGDZ.js} +1 -1
- package/.docu/lib/{chunk-LZDEWK25.js → chunk-PGIHPW5L.js} +1 -1
- package/.docu/lib/{chunk-7PRQ3RQB.js → chunk-PJVCY4FK.js} +1 -1
- package/.docu/lib/clean.js +1 -1
- package/.docu/lib/deploy.deno.js +1 -1
- package/.docu/lib/deploy.node.js +1 -1
- package/.docu/lib/preview.deno.js +2 -2
- package/.docu/lib/preview.node.js +2 -2
- package/.docu/lib/server.deno.js +3 -3
- package/.docu/lib/server.node.js +3 -3
- package/.docu/styles/globals.css +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import Sublink from "./Sublink";
|
|
4
|
+
import Sublink, { GroupAccordionProvider } from "./Sublink";
|
|
5
5
|
import SidebarGroupHeader from "./SidebarGroupHeader";
|
|
6
6
|
import type { DocuRoute } from "../node/types";
|
|
7
7
|
import { cn } from "../node/utils";
|
|
@@ -76,28 +76,32 @@ export default function Menu({ onNavigate, className = "", pathname, routes = []
|
|
|
76
76
|
// No context routes defined — fall back to flat list of all routes
|
|
77
77
|
if (contextRoutes.length === 0) {
|
|
78
78
|
return (
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
<GroupAccordionProvider>
|
|
80
|
+
<nav {...navProps}>
|
|
81
|
+
<ul className={sharedUlClasses}>
|
|
82
|
+
{menuRoutes.map((route) => renderBorderItem(route, "", route.href))}
|
|
83
|
+
</ul>
|
|
84
|
+
</nav>
|
|
85
|
+
</GroupAccordionProvider>
|
|
84
86
|
);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
return (
|
|
88
|
-
<
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
<GroupAccordionProvider>
|
|
91
|
+
<nav {...navProps}>
|
|
92
|
+
{contextRoutes.map((route, i) => (
|
|
93
|
+
<div key={route.href} className={i > 0 ? "mt-6 lg:mt-8" : ""}>
|
|
94
|
+
<SidebarGroupHeader
|
|
95
|
+
icon={route.context?.icon}
|
|
96
|
+
title={route.context?.title || route.title}
|
|
97
|
+
/>
|
|
98
|
+
<ul className={sharedUlClasses}>
|
|
99
|
+
{route.items?.map((item) => renderBorderItem(item, route.href, item.href))}
|
|
100
|
+
</ul>
|
|
101
|
+
</div>
|
|
102
|
+
))}
|
|
103
|
+
</nav>
|
|
104
|
+
</GroupAccordionProvider>
|
|
101
105
|
);
|
|
102
106
|
}
|
|
103
107
|
|
|
@@ -119,18 +123,20 @@ export default function Menu({ onNavigate, className = "", pathname, routes = []
|
|
|
119
123
|
if (!contextRoute) return null;
|
|
120
124
|
|
|
121
125
|
return (
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
<GroupAccordionProvider>
|
|
127
|
+
<nav {...navProps}>
|
|
128
|
+
<ul className="flex flex-col gap-0.5 py-4">
|
|
129
|
+
<li key={contextRoute.title}>
|
|
130
|
+
<Sublink
|
|
131
|
+
{...contextRoute}
|
|
132
|
+
href={contextRoute.href}
|
|
133
|
+
level={0}
|
|
134
|
+
onNavigate={onNavigate}
|
|
135
|
+
parentHref="/docs"
|
|
136
|
+
/>
|
|
137
|
+
</li>
|
|
138
|
+
</ul>
|
|
139
|
+
</nav>
|
|
140
|
+
</GroupAccordionProvider>
|
|
135
141
|
);
|
|
136
142
|
}
|
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createContext,
|
|
5
|
+
useContext,
|
|
6
|
+
useState,
|
|
7
|
+
useRef,
|
|
8
|
+
useEffect,
|
|
9
|
+
useCallback,
|
|
10
|
+
type ReactNode,
|
|
11
|
+
} from "react";
|
|
4
12
|
import { ChevronDown } from "lucide-react";
|
|
5
13
|
import Anchor from "./Anchor";
|
|
6
14
|
import type { DocuRoute } from "../node/types";
|
|
7
15
|
import { cn, docsHtmlHref } from "../node/utils";
|
|
8
16
|
import { config as docuConfig } from "../node/client-routes";
|
|
9
17
|
|
|
18
|
+
/** Exclusive accordion for level >= 2 sidebar groups — opening one group
|
|
19
|
+
* closes the previously open one. All level >= 2 groups default to closed
|
|
20
|
+
* and expand only when the header is clicked. `open` is used to auto-expand
|
|
21
|
+
* the group containing the active page. */
|
|
22
|
+
export const GroupAccordionContext = createContext<{
|
|
23
|
+
openId: string | null;
|
|
24
|
+
open: (id: string) => void;
|
|
25
|
+
toggle: (id: string) => void;
|
|
26
|
+
}>({ openId: null, open: () => {}, toggle: () => {} });
|
|
27
|
+
|
|
28
|
+
export function GroupAccordionProvider({ children }: { children: ReactNode }) {
|
|
29
|
+
const [openId, setOpenId] = useState<string | null>(null);
|
|
30
|
+
// Exclusive: expanding B closes A — only one group stays open at a time;
|
|
31
|
+
// clicking the open group again collapses it.
|
|
32
|
+
const open = useCallback((id: string) => setOpenId(id), []);
|
|
33
|
+
const toggle = useCallback((id: string) => setOpenId((prev) => (prev === id ? null : id)), []);
|
|
34
|
+
return (
|
|
35
|
+
<GroupAccordionContext.Provider value={{ openId, open, toggle }}>
|
|
36
|
+
{children}
|
|
37
|
+
</GroupAccordionContext.Provider>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
10
41
|
interface SublinkProps extends DocuRoute {
|
|
11
42
|
level: number;
|
|
12
43
|
onNavigate?: () => void;
|
|
@@ -28,12 +59,39 @@ export default function Sublink({
|
|
|
28
59
|
const currentPathname =
|
|
29
60
|
pathnameProp || (typeof window !== "undefined" ? window.location.pathname : "/docs");
|
|
30
61
|
|
|
62
|
+
// Groups with children are exclusive accordions (default closed, expand on
|
|
63
|
+
// click). In separator mode every nav item renders at level 0 (sections are
|
|
64
|
+
// SidebarGroupHeader, not Sublinks), so depth can't tell them apart — the
|
|
65
|
+
// mode does. In dropdown mode the top section is level 0 (stays open) and
|
|
66
|
+
// everything deeper is an accordion.
|
|
67
|
+
const isSeparator = docuConfig.sidebar?.context === "separator";
|
|
68
|
+
const { openId, open, toggle } = useContext(GroupAccordionContext);
|
|
69
|
+
const isAccordionGroup = Boolean(items) && (isSeparator || level >= 1);
|
|
70
|
+
// Routes-tree level: separator mode renders every item at level 0 (sections
|
|
71
|
+
// are SidebarGroupHeader), dropdown starts the context section at level 0.
|
|
72
|
+
const treeLevel = level + (isSeparator ? 2 : 1);
|
|
73
|
+
|
|
31
74
|
const [isOpen, setIsOpen] = useState(() => {
|
|
32
|
-
if (
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
75
|
+
if (isAccordionGroup) return false; // default closed — context controls it
|
|
76
|
+
if (level === 0) return true; // top-level section stays open
|
|
77
|
+
return false; // leaves
|
|
35
78
|
});
|
|
36
79
|
|
|
80
|
+
const effectiveOpen = isAccordionGroup ? openId === fullHref : isOpen;
|
|
81
|
+
const handleToggle = () => {
|
|
82
|
+
if (isAccordionGroup) toggle(fullHref);
|
|
83
|
+
else setIsOpen((o) => !o);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// Auto-expand the accordion group that contains the active page — on mount
|
|
87
|
+
// and whenever the current path changes. `open` is stable (useCallback), so
|
|
88
|
+
// this only fires on real path changes; a manual collapse by the user is
|
|
89
|
+
// respected until the path changes again.
|
|
90
|
+
const isInsideActive = currentPathname.startsWith(fullHref) && currentPathname !== fullHref;
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (isAccordionGroup && isInsideActive) open(fullHref);
|
|
93
|
+
}, [isAccordionGroup, isInsideActive, fullHref, open]);
|
|
94
|
+
|
|
37
95
|
// Shared padding based on nesting level
|
|
38
96
|
const levelPadding = cn(level === 1 && "pl-4", level === 2 && "pl-8", level >= 3 && "pl-12");
|
|
39
97
|
const isActive = currentPathname === fullHref || currentPathname === `${fullHref}.html`;
|
|
@@ -113,12 +171,15 @@ export default function Sublink({
|
|
|
113
171
|
{/* Section header */}
|
|
114
172
|
<button
|
|
115
173
|
type="button"
|
|
116
|
-
onClick={
|
|
174
|
+
onClick={handleToggle}
|
|
117
175
|
className={cn(
|
|
118
176
|
"flex w-full cursor-pointer items-center justify-between py-1 text-left text-sm transition-colors",
|
|
119
|
-
|
|
177
|
+
// Only the top-level section label (routes-tree level 1) is bold.
|
|
178
|
+
// Deeper groups (e.g. Search at level 2) are children that happen to
|
|
179
|
+
// have items — style them like links, no header weight.
|
|
180
|
+
noLink && treeLevel === 1
|
|
120
181
|
? "text-base-content font-semibold"
|
|
121
|
-
: "text-
|
|
182
|
+
: "text-foreground hover:text-foreground/80"
|
|
122
183
|
)}
|
|
123
184
|
>
|
|
124
185
|
{noLink ? (
|
|
@@ -137,13 +198,15 @@ export default function Sublink({
|
|
|
137
198
|
<ChevronDown
|
|
138
199
|
className={cn(
|
|
139
200
|
"text-base-content/40 h-4 w-4 shrink-0 transition-transform duration-200",
|
|
140
|
-
|
|
201
|
+
// Tree convention: closed = chevron pointing right (expandable),
|
|
202
|
+
// open = pointing down — a 90° turn instead of the 180° flip.
|
|
203
|
+
effectiveOpen ? "rotate-0" : "-rotate-90"
|
|
141
204
|
)}
|
|
142
205
|
/>
|
|
143
206
|
</button>
|
|
144
207
|
|
|
145
208
|
{/* Children */}
|
|
146
|
-
{
|
|
209
|
+
{effectiveOpen && (
|
|
147
210
|
<div className="flex flex-col py-1">
|
|
148
211
|
{items.map((item) => (
|
|
149
212
|
<Sublink
|
package/.docu/lib/build.deno.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuildCli
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3LRUTZZD.js";
|
|
4
|
+
import "./chunk-42JQLAKP.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-IN2QAGDZ.js";
|
|
7
7
|
import "./chunk-4IQXHHPF.js";
|
|
8
8
|
|
|
9
9
|
// .docu/node/build.deno.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
runBuildCli
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-3LRUTZZD.js";
|
|
5
|
+
import "./chunk-42JQLAKP.js";
|
|
6
6
|
import "./chunk-EOK6KATZ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-IN2QAGDZ.js";
|
|
8
8
|
import "./chunk-4IQXHHPF.js";
|
|
9
9
|
export {
|
|
10
10
|
runBuild,
|
package/.docu/lib/build.node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuildCli
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3LRUTZZD.js";
|
|
4
|
+
import "./chunk-42JQLAKP.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-IN2QAGDZ.js";
|
|
7
7
|
import "./chunk-4IQXHHPF.js";
|
|
8
8
|
|
|
9
9
|
// .docu/node/build.node.ts
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
htmlShell,
|
|
16
16
|
initSentry,
|
|
17
17
|
loadPlugins
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-42JQLAKP.js";
|
|
19
19
|
import {
|
|
20
20
|
cspHeader,
|
|
21
21
|
generateNonce,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-EOK6KATZ.js";
|
|
24
24
|
import {
|
|
25
25
|
logger
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IN2QAGDZ.js";
|
|
27
27
|
import {
|
|
28
28
|
ASSETS_DIR,
|
|
29
29
|
CACHE_FILE,
|
|
@@ -2161,7 +2161,14 @@ import React2 from "react";
|
|
|
2161
2161
|
import { useState as useState4 } from "react";
|
|
2162
2162
|
|
|
2163
2163
|
// .docu/components/Sublink.tsx
|
|
2164
|
-
import {
|
|
2164
|
+
import {
|
|
2165
|
+
createContext,
|
|
2166
|
+
useContext,
|
|
2167
|
+
useState as useState3,
|
|
2168
|
+
useRef as useRef2,
|
|
2169
|
+
useEffect as useEffect3,
|
|
2170
|
+
useCallback as useCallback3
|
|
2171
|
+
} from "react";
|
|
2165
2172
|
import { ChevronDown } from "lucide-react";
|
|
2166
2173
|
|
|
2167
2174
|
// .docu/components/Anchor.tsx
|
|
@@ -2212,6 +2219,15 @@ var config = docuConfig5;
|
|
|
2212
2219
|
|
|
2213
2220
|
// .docu/components/Sublink.tsx
|
|
2214
2221
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2222
|
+
var GroupAccordionContext = createContext({ openId: null, open: () => {
|
|
2223
|
+
}, toggle: () => {
|
|
2224
|
+
} });
|
|
2225
|
+
function GroupAccordionProvider({ children }) {
|
|
2226
|
+
const [openId, setOpenId] = useState3(null);
|
|
2227
|
+
const open = useCallback3((id) => setOpenId(id), []);
|
|
2228
|
+
const toggle = useCallback3((id) => setOpenId((prev) => prev === id ? null : id), []);
|
|
2229
|
+
return /* @__PURE__ */ jsx16(GroupAccordionContext.Provider, { value: { openId, open, toggle }, children });
|
|
2230
|
+
}
|
|
2215
2231
|
function Sublink({
|
|
2216
2232
|
title,
|
|
2217
2233
|
href,
|
|
@@ -2224,11 +2240,24 @@ function Sublink({
|
|
|
2224
2240
|
}) {
|
|
2225
2241
|
const fullHref = parentHref ? `${parentHref}${href}` : `/docs${href}`;
|
|
2226
2242
|
const currentPathname = pathnameProp || (typeof window !== "undefined" ? window.location.pathname : "/docs");
|
|
2243
|
+
const isSeparator = config.sidebar?.context === "separator";
|
|
2244
|
+
const { openId, open, toggle } = useContext(GroupAccordionContext);
|
|
2245
|
+
const isAccordionGroup = Boolean(items) && (isSeparator || level >= 1);
|
|
2246
|
+
const treeLevel = level + (isSeparator ? 2 : 1);
|
|
2227
2247
|
const [isOpen, setIsOpen] = useState3(() => {
|
|
2248
|
+
if (isAccordionGroup) return false;
|
|
2228
2249
|
if (level === 0) return true;
|
|
2229
|
-
|
|
2230
|
-
return currentPathname.startsWith(fullHref) && currentPathname !== fullHref;
|
|
2250
|
+
return false;
|
|
2231
2251
|
});
|
|
2252
|
+
const effectiveOpen = isAccordionGroup ? openId === fullHref : isOpen;
|
|
2253
|
+
const handleToggle = () => {
|
|
2254
|
+
if (isAccordionGroup) toggle(fullHref);
|
|
2255
|
+
else setIsOpen((o) => !o);
|
|
2256
|
+
};
|
|
2257
|
+
const isInsideActive = currentPathname.startsWith(fullHref) && currentPathname !== fullHref;
|
|
2258
|
+
useEffect3(() => {
|
|
2259
|
+
if (isAccordionGroup && isInsideActive) open(fullHref);
|
|
2260
|
+
}, [isAccordionGroup, isInsideActive, fullHref, open]);
|
|
2232
2261
|
const levelPadding = cn(level === 1 && "pl-4", level === 2 && "pl-8", level >= 3 && "pl-12");
|
|
2233
2262
|
const isActive = currentPathname === fullHref || currentPathname === `${fullHref}.html`;
|
|
2234
2263
|
const activeRef = useRef2(null);
|
|
@@ -2287,10 +2316,13 @@ function Sublink({
|
|
|
2287
2316
|
"button",
|
|
2288
2317
|
{
|
|
2289
2318
|
type: "button",
|
|
2290
|
-
onClick:
|
|
2319
|
+
onClick: handleToggle,
|
|
2291
2320
|
className: cn(
|
|
2292
2321
|
"flex w-full cursor-pointer items-center justify-between py-1 text-left text-sm transition-colors",
|
|
2293
|
-
|
|
2322
|
+
// Only the top-level section label (routes-tree level 1) is bold.
|
|
2323
|
+
// Deeper groups (e.g. Search at level 2) are children that happen to
|
|
2324
|
+
// have items — style them like links, no header weight.
|
|
2325
|
+
noLink && treeLevel === 1 ? "text-base-content font-semibold" : "text-foreground hover:text-foreground/80"
|
|
2294
2326
|
),
|
|
2295
2327
|
children: [
|
|
2296
2328
|
noLink ? /* @__PURE__ */ jsx16("span", { children: title }) : /* @__PURE__ */ jsx16(
|
|
@@ -2309,14 +2341,16 @@ function Sublink({
|
|
|
2309
2341
|
{
|
|
2310
2342
|
className: cn(
|
|
2311
2343
|
"text-base-content/40 h-4 w-4 shrink-0 transition-transform duration-200",
|
|
2312
|
-
|
|
2344
|
+
// Tree convention: closed = chevron pointing right (expandable),
|
|
2345
|
+
// open = pointing down — a 90° turn instead of the 180° flip.
|
|
2346
|
+
effectiveOpen ? "rotate-0" : "-rotate-90"
|
|
2313
2347
|
)
|
|
2314
2348
|
}
|
|
2315
2349
|
)
|
|
2316
2350
|
]
|
|
2317
2351
|
}
|
|
2318
2352
|
),
|
|
2319
|
-
|
|
2353
|
+
effectiveOpen && /* @__PURE__ */ jsx16("div", { className: "flex flex-col py-1", children: items.map((item) => /* @__PURE__ */ jsx16(
|
|
2320
2354
|
Sublink,
|
|
2321
2355
|
{
|
|
2322
2356
|
...item,
|
|
@@ -2391,9 +2425,9 @@ function Menu({ onNavigate, className = "", pathname, routes: routes3 = [] }) {
|
|
|
2391
2425
|
if (mode === "separator") {
|
|
2392
2426
|
const contextRoutes = menuRoutes.filter((r) => r.context);
|
|
2393
2427
|
if (contextRoutes.length === 0) {
|
|
2394
|
-
return /* @__PURE__ */ jsx18("nav", { ...navProps, children: /* @__PURE__ */ jsx18("ul", { className: sharedUlClasses, children: menuRoutes.map((route) => renderBorderItem(route, "", route.href)) }) });
|
|
2428
|
+
return /* @__PURE__ */ jsx18(GroupAccordionProvider, { children: /* @__PURE__ */ jsx18("nav", { ...navProps, children: /* @__PURE__ */ jsx18("ul", { className: sharedUlClasses, children: menuRoutes.map((route) => renderBorderItem(route, "", route.href)) }) }) });
|
|
2395
2429
|
}
|
|
2396
|
-
return /* @__PURE__ */ jsx18("nav", { ...navProps, children: contextRoutes.map((route, i) => /* @__PURE__ */ jsxs14("div", { className: i > 0 ? "mt-6 lg:mt-8" : "", children: [
|
|
2430
|
+
return /* @__PURE__ */ jsx18(GroupAccordionProvider, { children: /* @__PURE__ */ jsx18("nav", { ...navProps, children: contextRoutes.map((route, i) => /* @__PURE__ */ jsxs14("div", { className: i > 0 ? "mt-6 lg:mt-8" : "", children: [
|
|
2397
2431
|
/* @__PURE__ */ jsx18(
|
|
2398
2432
|
SidebarGroupHeader,
|
|
2399
2433
|
{
|
|
@@ -2402,13 +2436,13 @@ function Menu({ onNavigate, className = "", pathname, routes: routes3 = [] }) {
|
|
|
2402
2436
|
}
|
|
2403
2437
|
),
|
|
2404
2438
|
/* @__PURE__ */ jsx18("ul", { className: sharedUlClasses, children: route.items?.map((item) => renderBorderItem(item, route.href, item.href)) })
|
|
2405
|
-
] }, route.href)) });
|
|
2439
|
+
] }, route.href)) }) });
|
|
2406
2440
|
}
|
|
2407
2441
|
const isDocsRoot = currentPath === "/docs" || currentPath === "/docs/";
|
|
2408
2442
|
const currentContext = isDocsRoot ? menuRoutes[0]?.href.replace(/^\/+|\/+$/, "") : getCurrentContext(currentPath);
|
|
2409
2443
|
const contextRoute = isDocsRoot && menuRoutes[0] ? currentContext ? getContextRoute(currentContext, menuRoutes) : menuRoutes[0] : currentContext ? getContextRoute(currentContext, menuRoutes) : void 0;
|
|
2410
2444
|
if (!contextRoute) return null;
|
|
2411
|
-
return /* @__PURE__ */ jsx18("nav", { ...navProps, children: /* @__PURE__ */ jsx18("ul", { className: "flex flex-col gap-0.5 py-4", children: /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsx18(
|
|
2445
|
+
return /* @__PURE__ */ jsx18(GroupAccordionProvider, { children: /* @__PURE__ */ jsx18("nav", { ...navProps, children: /* @__PURE__ */ jsx18("ul", { className: "flex flex-col gap-0.5 py-4", children: /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsx18(
|
|
2412
2446
|
Sublink,
|
|
2413
2447
|
{
|
|
2414
2448
|
...contextRoute,
|
|
@@ -2417,7 +2451,7 @@ function Menu({ onNavigate, className = "", pathname, routes: routes3 = [] }) {
|
|
|
2417
2451
|
onNavigate,
|
|
2418
2452
|
parentHref: "/docs"
|
|
2419
2453
|
}
|
|
2420
|
-
) }, contextRoute.title) }) });
|
|
2454
|
+
) }, contextRoute.title) }) }) });
|
|
2421
2455
|
}
|
|
2422
2456
|
|
|
2423
2457
|
// .docu/components/DocsLayout.tsx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
htmlShell,
|
|
16
16
|
initSentry,
|
|
17
17
|
loadPlugins
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-42JQLAKP.js";
|
|
19
19
|
import {
|
|
20
20
|
SECURITY_HEADERS,
|
|
21
21
|
generateNonce,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk-EOK6KATZ.js";
|
|
29
29
|
import {
|
|
30
30
|
logger
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IN2QAGDZ.js";
|
|
32
32
|
import {
|
|
33
33
|
DIST_DIR,
|
|
34
34
|
DOCS_DIR,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@docubook/flame",
|
|
8
|
-
version: "2.0.0-alpha.
|
|
8
|
+
version: "2.0.0-alpha.2",
|
|
9
9
|
description: "A blazing-fast React + MDX framework powered by Bun, built for modern documentation experiences.",
|
|
10
10
|
type: "module",
|
|
11
11
|
bin: {
|
|
@@ -137,7 +137,7 @@ async function runBuild() {
|
|
|
137
137
|
process.env.FLAME_BUILD_SILENT = "1";
|
|
138
138
|
process.env.LOG_LEVEL = "error";
|
|
139
139
|
}
|
|
140
|
-
const { runBuildCli } = await import("./build.impl-
|
|
140
|
+
const { runBuildCli } = await import("./build.impl-AZBZN66Q.js");
|
|
141
141
|
await runBuildCli();
|
|
142
142
|
}
|
|
143
143
|
async function writeDockerFiles() {
|
package/.docu/lib/clean.js
CHANGED
package/.docu/lib/deploy.deno.js
CHANGED
package/.docu/lib/deploy.node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPreview
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PGIHPW5L.js";
|
|
4
4
|
import {
|
|
5
5
|
denoAdapter
|
|
6
6
|
} from "./chunk-UISOJ4RW.js";
|
|
7
7
|
import "./chunk-EOK6KATZ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IN2QAGDZ.js";
|
|
9
9
|
import "./chunk-4IQXHHPF.js";
|
|
10
10
|
|
|
11
11
|
// .docu/node/preview.deno.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPreview
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PGIHPW5L.js";
|
|
4
4
|
import {
|
|
5
5
|
nodeAdapter
|
|
6
6
|
} from "./chunk-UISOJ4RW.js";
|
|
7
7
|
import "./chunk-EOK6KATZ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-IN2QAGDZ.js";
|
|
9
9
|
import "./chunk-4IQXHHPF.js";
|
|
10
10
|
|
|
11
11
|
// .docu/node/preview.node.ts
|
package/.docu/lib/server.deno.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HF3KKRQL.js";
|
|
4
|
+
import "./chunk-42JQLAKP.js";
|
|
5
5
|
import {
|
|
6
6
|
denoAdapter
|
|
7
7
|
} from "./chunk-UISOJ4RW.js";
|
|
8
8
|
import "./chunk-EOK6KATZ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-IN2QAGDZ.js";
|
|
10
10
|
import "./chunk-4IQXHHPF.js";
|
|
11
11
|
|
|
12
12
|
// .docu/node/server.deno.ts
|
package/.docu/lib/server.node.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HF3KKRQL.js";
|
|
4
|
+
import "./chunk-42JQLAKP.js";
|
|
5
5
|
import {
|
|
6
6
|
nodeAdapter
|
|
7
7
|
} from "./chunk-UISOJ4RW.js";
|
|
8
8
|
import "./chunk-EOK6KATZ.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-IN2QAGDZ.js";
|
|
10
10
|
import "./chunk-4IQXHHPF.js";
|
|
11
11
|
|
|
12
12
|
// .docu/node/server.node.ts
|
package/.docu/styles/globals.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@plugin "@tailwindcss/typography";
|
|
10
10
|
@source "../../.docu/components";
|
|
11
11
|
@source "../../.docu/pages";
|
|
12
|
-
@
|
|
12
|
+
@import "@docubook/ui-react/styles.css";
|
|
13
13
|
|
|
14
14
|
/* daisyUI breadcrumbs underline every li child on hover (including plain
|
|
15
15
|
spans) — crumbs are not links, so strip the underline (and pointer cursor)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docubook/flame",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"description": "A blazing-fast React + MDX framework powered by Bun, built for modern documentation experiences.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"react-dom": "^19.2.7",
|
|
57
57
|
"unified": "^11.0.0",
|
|
58
58
|
"zod": "^4.4.3",
|
|
59
|
-
"@docubook/
|
|
60
|
-
"@docubook/
|
|
61
|
-
"@docubook/themes-colors": "^2.0.0-alpha.
|
|
62
|
-
"@docubook/
|
|
59
|
+
"@docubook/markdown": "^2.0.0-alpha.2",
|
|
60
|
+
"@docubook/ui-react": "^2.0.0-alpha.2",
|
|
61
|
+
"@docubook/themes-colors": "^2.0.0-alpha.2",
|
|
62
|
+
"@docubook/core": "^2.0.0-alpha.2"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@sentry/bun": "^10.0.0"
|