@docubook/flame 1.6.1 → 1.6.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/lib/build.deno.js +3 -3
- package/.docu/lib/{build.impl-5VMX2INF.js → build.impl-CFTUVIX7.js} +3 -3
- package/.docu/lib/build.node.js +3 -3
- package/.docu/lib/{chunk-GC62TPBC.js → chunk-77NNQDFX.js} +2 -2
- package/.docu/lib/{chunk-EINCC7ET.js → chunk-KHRQUSNL.js} +1 -1
- package/.docu/lib/{chunk-P3ZT4S3D.js → chunk-N25ZVCKO.js} +1 -1
- package/.docu/lib/{chunk-XX2VVJMV.js → chunk-OREEWUOV.js} +2 -2
- package/.docu/lib/{chunk-2VUUBIN3.js → chunk-TU7G4RJV.js} +1 -1
- package/.docu/lib/{chunk-IJFMQFWW.js → chunk-WSJC3PRH.js} +31 -28
- 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/node/client-routes.ts +4 -2
- package/.docu/node/hydrate.node.ts +14 -4
- package/.docu/node/hydrate.ts +14 -4
- package/bin/compile-lib.mjs +0 -24
- package/package.json +3 -3
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-OREEWUOV.js";
|
|
4
|
+
import "./chunk-WSJC3PRH.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TU7G4RJV.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-OREEWUOV.js";
|
|
5
|
+
import "./chunk-WSJC3PRH.js";
|
|
6
6
|
import "./chunk-EOK6KATZ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TU7G4RJV.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-OREEWUOV.js";
|
|
4
|
+
import "./chunk-WSJC3PRH.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TU7G4RJV.js";
|
|
7
7
|
import "./chunk-4IQXHHPF.js";
|
|
8
8
|
|
|
9
9
|
// .docu/node/build.node.ts
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
htmlShell,
|
|
15
15
|
initSentry,
|
|
16
16
|
loadPlugins
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WSJC3PRH.js";
|
|
18
18
|
import {
|
|
19
19
|
SECURITY_HEADERS,
|
|
20
20
|
generateNonce,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-EOK6KATZ.js";
|
|
28
28
|
import {
|
|
29
29
|
logger
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-TU7G4RJV.js";
|
|
31
31
|
import {
|
|
32
32
|
DIST_DIR,
|
|
33
33
|
DOCS_DIR,
|
|
@@ -127,7 +127,7 @@ async function runBuild() {
|
|
|
127
127
|
process.env.FLAME_BUILD_SILENT = "1";
|
|
128
128
|
process.env.LOG_LEVEL = "error";
|
|
129
129
|
}
|
|
130
|
-
const { runBuildCli } = await import("./build.impl-
|
|
130
|
+
const { runBuildCli } = await import("./build.impl-CFTUVIX7.js");
|
|
131
131
|
await runBuildCli();
|
|
132
132
|
}
|
|
133
133
|
async function writeDockerFiles() {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
htmlShell,
|
|
14
14
|
initSentry,
|
|
15
15
|
loadPlugins
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WSJC3PRH.js";
|
|
17
17
|
import {
|
|
18
18
|
cspHeader,
|
|
19
19
|
generateNonce,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-EOK6KATZ.js";
|
|
22
22
|
import {
|
|
23
23
|
logger
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TU7G4RJV.js";
|
|
25
25
|
import {
|
|
26
26
|
ASSETS_DIR,
|
|
27
27
|
CACHE_FILE,
|
|
@@ -103,8 +103,8 @@ var BuildPluginBuilder = class {
|
|
|
103
103
|
_remarkPlugins = [];
|
|
104
104
|
_transformFrontmatter = [];
|
|
105
105
|
_transformHtml = [];
|
|
106
|
-
constructor(
|
|
107
|
-
this.config =
|
|
106
|
+
constructor(config2) {
|
|
107
|
+
this.config = config2;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Collect and deduplicate all `<body>` injection snippets from registered plugins.
|
|
@@ -646,8 +646,8 @@ function getThemeConfig() {
|
|
|
646
646
|
if (process.env.FLAME_THEME) {
|
|
647
647
|
return process.env.FLAME_THEME;
|
|
648
648
|
}
|
|
649
|
-
const
|
|
650
|
-
return
|
|
649
|
+
const config2 = loadDocuConfig();
|
|
650
|
+
return config2.themes?.colors;
|
|
651
651
|
}
|
|
652
652
|
function buildThemeCss(baseCss, themeConfig) {
|
|
653
653
|
try {
|
|
@@ -683,19 +683,19 @@ import { existsSync, readFileSync, readdirSync as readdirSync2 } from "node:fs";
|
|
|
683
683
|
import { promisify } from "node:util";
|
|
684
684
|
import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
685
685
|
import { createHash } from "node:crypto";
|
|
686
|
-
function extractConfigIcons(
|
|
686
|
+
function extractConfigIcons(config2) {
|
|
687
687
|
const icons = [];
|
|
688
688
|
const pushIf = (s) => {
|
|
689
689
|
if (s) icons.push(s);
|
|
690
690
|
};
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
config2.home?.hero?.actions?.forEach((a) => pushIf(a.icon));
|
|
692
|
+
config2.home?.features?.forEach((f) => pushIf(f.icon));
|
|
693
693
|
(function walk(routes3) {
|
|
694
694
|
for (const r of routes3) {
|
|
695
695
|
pushIf(r.context?.icon);
|
|
696
696
|
if (r.items) walk(r.items);
|
|
697
697
|
}
|
|
698
|
-
})(
|
|
698
|
+
})(config2.routes ?? []);
|
|
699
699
|
return [...new Set(icons.filter((n) => /^[A-Z]/.test(n)))];
|
|
700
700
|
}
|
|
701
701
|
var execFileAsync = promisify(execFile);
|
|
@@ -874,17 +874,25 @@ async function buildClientBundle() {
|
|
|
874
874
|
{
|
|
875
875
|
name: "docu-config",
|
|
876
876
|
setup(build2) {
|
|
877
|
-
build2.onResolve({ filter: /
|
|
877
|
+
build2.onResolve({ filter: /client-routes$/ }, (args) => ({
|
|
878
878
|
path: args.path,
|
|
879
|
-
namespace: "
|
|
879
|
+
namespace: "client-routes"
|
|
880
880
|
}));
|
|
881
|
-
build2.onLoad({ filter: /.*/, namespace: "
|
|
882
|
-
const
|
|
881
|
+
build2.onLoad({ filter: /.*/, namespace: "client-routes" }, () => {
|
|
882
|
+
const config2 = loadDocuConfig();
|
|
883
883
|
const resolved = {
|
|
884
|
-
...
|
|
885
|
-
routes: resolveRoutes(
|
|
884
|
+
...config2,
|
|
885
|
+
routes: resolveRoutes(config2.routes)
|
|
886
|
+
};
|
|
887
|
+
return {
|
|
888
|
+
contents: [
|
|
889
|
+
`import type { DocuRoute, DocuConfig } from "./types";`,
|
|
890
|
+
`const docuConfig = ${JSON.stringify(resolved)};`,
|
|
891
|
+
`export const routes = docuConfig.routes || [];`,
|
|
892
|
+
`export const config = docuConfig;`
|
|
893
|
+
].join("\n"),
|
|
894
|
+
loader: "ts"
|
|
886
895
|
};
|
|
887
|
-
return { contents: JSON.stringify(resolved), loader: "json" };
|
|
888
896
|
});
|
|
889
897
|
}
|
|
890
898
|
}
|
|
@@ -2028,15 +2036,10 @@ function Anchor({
|
|
|
2028
2036
|
return /* @__PURE__ */ jsx15("a", { href, className: baseClasses, ...props, children });
|
|
2029
2037
|
}
|
|
2030
2038
|
|
|
2031
|
-
// docu-config-runtime:../../docu.json
|
|
2032
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
2033
|
-
import { join as join4 } from "node:path";
|
|
2034
|
-
var config = JSON.parse(readFileSync2(join4(process.cwd(), "docu.json"), "utf-8"));
|
|
2035
|
-
var docu_default = config;
|
|
2036
|
-
|
|
2037
2039
|
// .docu/node/client-routes.ts
|
|
2038
|
-
var
|
|
2039
|
-
var
|
|
2040
|
+
var docuConfig5 = loadDocuConfig();
|
|
2041
|
+
var routes2 = resolveRoutes(docuConfig5.routes || []);
|
|
2042
|
+
var config = docuConfig5;
|
|
2040
2043
|
|
|
2041
2044
|
// .docu/components/Sublink.tsx
|
|
2042
2045
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -2078,7 +2081,7 @@ function Sublink({
|
|
|
2078
2081
|
}
|
|
2079
2082
|
);
|
|
2080
2083
|
if (level >= 1) {
|
|
2081
|
-
if (
|
|
2084
|
+
if (config.sidebar?.context === "separator") {
|
|
2082
2085
|
const sectionOffsets = { 1: 16, 2: 32 };
|
|
2083
2086
|
let overlap = 14;
|
|
2084
2087
|
for (let l = 1; l < level; l++) {
|
|
@@ -2187,7 +2190,7 @@ function Menu({ onNavigate, className = "", pathname, routes: routes3 = [] }) {
|
|
|
2187
2190
|
() => pathname || (typeof window !== "undefined" ? window.location.pathname : "/docs")
|
|
2188
2191
|
);
|
|
2189
2192
|
if (!currentPath.startsWith("/docs")) return null;
|
|
2190
|
-
const mode =
|
|
2193
|
+
const mode = config.sidebar?.context || "dropdown";
|
|
2191
2194
|
const navProps = {
|
|
2192
2195
|
"aria-label": "Documentation navigation",
|
|
2193
2196
|
className: cn("transition-all duration-200", className)
|
|
@@ -2249,7 +2252,7 @@ function Menu({ onNavigate, className = "", pathname, routes: routes3 = [] }) {
|
|
|
2249
2252
|
}
|
|
2250
2253
|
|
|
2251
2254
|
// .docu/components/DocsLayout.tsx
|
|
2252
|
-
var
|
|
2255
|
+
var docuConfig6 = loadDocuConfig();
|
|
2253
2256
|
function DocsLayout({ children, repoUrl, pathname = "/docs" }) {
|
|
2254
2257
|
return React2.createElement(
|
|
2255
2258
|
"div",
|
|
@@ -2270,7 +2273,7 @@ function DocsLayout({ children, repoUrl, pathname = "/docs" }) {
|
|
|
2270
2273
|
React2.createElement(
|
|
2271
2274
|
"div",
|
|
2272
2275
|
{ className: "flex h-full flex-col overflow-y-auto px-4" },
|
|
2273
|
-
React2.createElement(Menu, { pathname, routes:
|
|
2276
|
+
React2.createElement(Menu, { pathname, routes: docuConfig6.routes || [] })
|
|
2274
2277
|
)
|
|
2275
2278
|
),
|
|
2276
2279
|
React2.createElement(
|
|
@@ -2282,7 +2285,7 @@ function DocsLayout({ children, repoUrl, pathname = "/docs" }) {
|
|
|
2282
2285
|
React2.createElement(
|
|
2283
2286
|
"nav",
|
|
2284
2287
|
{ className: "flex items-center gap-6 text-sm font-medium text-base-content/80" },
|
|
2285
|
-
...(
|
|
2288
|
+
...(docuConfig6.navbar?.menu || []).map((item) => {
|
|
2286
2289
|
const isExternal = /^https?:\/\//.test(item.href);
|
|
2287
2290
|
const isDocsActive = item.href === "/docs";
|
|
2288
2291
|
return React2.createElement(
|
package/.docu/lib/clean.js
CHANGED
package/.docu/lib/deploy.deno.js
CHANGED
package/.docu/lib/deploy.node.js
CHANGED
package/.docu/lib/server.deno.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-77NNQDFX.js";
|
|
4
|
+
import "./chunk-WSJC3PRH.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TU7G4RJV.js";
|
|
7
7
|
import "./chunk-4IQXHHPF.js";
|
|
8
8
|
|
|
9
9
|
// .docu/node/server.deno.ts
|
package/.docu/lib/server.node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-77NNQDFX.js";
|
|
4
|
+
import "./chunk-WSJC3PRH.js";
|
|
5
5
|
import "./chunk-EOK6KATZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TU7G4RJV.js";
|
|
7
7
|
import "./chunk-4IQXHHPF.js";
|
|
8
8
|
|
|
9
9
|
// .docu/node/server.node.ts
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { DocuRoute, DocuConfig } from "./types";
|
|
2
|
-
import
|
|
2
|
+
import { loadDocuConfig } from "./paths";
|
|
3
|
+
import { resolveRoutes } from "./fs-scanner";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const docuConfig = loadDocuConfig();
|
|
6
|
+
export const routes: DocuRoute[] = resolveRoutes(docuConfig.routes || []);
|
|
5
7
|
export const config = docuConfig as unknown as DocuConfig;
|
|
@@ -270,17 +270,27 @@ export async function buildClientBundle(): Promise<{ js: string; css: string }>
|
|
|
270
270
|
{
|
|
271
271
|
name: "docu-config",
|
|
272
272
|
setup(build) {
|
|
273
|
-
|
|
273
|
+
// Components import as "../node/client-routes" (no .ts extension),
|
|
274
|
+
// so filter matches the path tail without requiring the extension.
|
|
275
|
+
build.onResolve({ filter: /client-routes$/ }, (args) => ({
|
|
274
276
|
path: args.path,
|
|
275
|
-
namespace: "
|
|
277
|
+
namespace: "client-routes",
|
|
276
278
|
}));
|
|
277
|
-
build.onLoad({ filter: /.*/, namespace: "
|
|
279
|
+
build.onLoad({ filter: /.*/, namespace: "client-routes" }, () => {
|
|
278
280
|
const config = loadDocuConfig();
|
|
279
281
|
const resolved = {
|
|
280
282
|
...config,
|
|
281
283
|
routes: resolveRoutes(config.routes as DocuRoute[] | undefined),
|
|
282
284
|
};
|
|
283
|
-
return {
|
|
285
|
+
return {
|
|
286
|
+
contents: [
|
|
287
|
+
`import type { DocuRoute, DocuConfig } from "./types";`,
|
|
288
|
+
`const docuConfig = ${JSON.stringify(resolved)};`,
|
|
289
|
+
`export const routes = docuConfig.routes || [];`,
|
|
290
|
+
`export const config = docuConfig;`,
|
|
291
|
+
].join("\n"),
|
|
292
|
+
loader: "ts",
|
|
293
|
+
};
|
|
284
294
|
});
|
|
285
295
|
},
|
|
286
296
|
},
|
package/.docu/node/hydrate.ts
CHANGED
|
@@ -142,17 +142,27 @@ export async function buildClientBundle(): Promise<{ js: string; css: string }>
|
|
|
142
142
|
{
|
|
143
143
|
name: "docu-config",
|
|
144
144
|
setup(build) {
|
|
145
|
-
|
|
145
|
+
// Components import as "../node/client-routes" (no .ts extension),
|
|
146
|
+
// so filter matches the path tail without requiring the extension.
|
|
147
|
+
build.onResolve({ filter: /client-routes$/ }, (args) => ({
|
|
146
148
|
path: args.path,
|
|
147
|
-
namespace: "
|
|
149
|
+
namespace: "client-routes",
|
|
148
150
|
}));
|
|
149
|
-
build.onLoad({ filter: /.*/, namespace: "
|
|
151
|
+
build.onLoad({ filter: /.*/, namespace: "client-routes" }, () => {
|
|
150
152
|
const config = loadDocuConfig();
|
|
151
153
|
const resolved = {
|
|
152
154
|
...config,
|
|
153
155
|
routes: resolveRoutes(config.routes as DocuRoute[] | undefined),
|
|
154
156
|
};
|
|
155
|
-
return {
|
|
157
|
+
return {
|
|
158
|
+
contents: [
|
|
159
|
+
`import type { DocuRoute, DocuConfig } from "./types";`,
|
|
160
|
+
`const docuConfig = ${JSON.stringify(resolved)};`,
|
|
161
|
+
`export const routes = docuConfig.routes || [];`,
|
|
162
|
+
`export const config = docuConfig;`,
|
|
163
|
+
].join("\n"),
|
|
164
|
+
loader: "ts",
|
|
165
|
+
};
|
|
156
166
|
});
|
|
157
167
|
},
|
|
158
168
|
},
|
package/bin/compile-lib.mjs
CHANGED
|
@@ -35,30 +35,6 @@ await build({
|
|
|
35
35
|
packages: "external",
|
|
36
36
|
jsx: "automatic",
|
|
37
37
|
logLevel: "info",
|
|
38
|
-
plugins: [
|
|
39
|
-
{
|
|
40
|
-
// The SSR component graph imports `docu.json` statically
|
|
41
|
-
// (client-routes.ts). At runtime that must be the USER's project
|
|
42
|
-
// config, so replace the import with a cwd-relative read instead of
|
|
43
|
-
// baking the monorepo's docu.json into the published bundle.
|
|
44
|
-
name: "docu-config-runtime",
|
|
45
|
-
setup(build) {
|
|
46
|
-
build.onResolve({ filter: /docu\.json$/ }, (args) => ({
|
|
47
|
-
path: args.path,
|
|
48
|
-
namespace: "docu-config-runtime",
|
|
49
|
-
}));
|
|
50
|
-
build.onLoad({ filter: /.*/, namespace: "docu-config-runtime" }, () => ({
|
|
51
|
-
contents: [
|
|
52
|
-
`import { readFileSync } from "node:fs";`,
|
|
53
|
-
`import { join } from "node:path";`,
|
|
54
|
-
`const config = JSON.parse(readFileSync(join(process.cwd(), "docu.json"), "utf-8"));`,
|
|
55
|
-
`export default config;`,
|
|
56
|
-
].join("\n"),
|
|
57
|
-
loader: "js",
|
|
58
|
-
}));
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
38
|
});
|
|
63
39
|
|
|
64
40
|
// esbuild's service process keeps Deno's event loop alive after one-shot
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docubook/flame",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.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,9 +56,9 @@
|
|
|
56
56
|
"unified": "^11.0.0",
|
|
57
57
|
"@docubook/core": "^1.8.2",
|
|
58
58
|
"@docubook/mdx-content": "^3.4.5",
|
|
59
|
-
"@docubook/
|
|
59
|
+
"@docubook/runt": "^1.0.0",
|
|
60
60
|
"@docubook/ui-react": "^1.0.0",
|
|
61
|
-
"@docubook/
|
|
61
|
+
"@docubook/themes-colors": "^1.0.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@sentry/bun": "^10.0.0"
|