@dogsbay/format-dogsbay-md 0.2.0-beta.28 → 0.2.0-beta.29
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/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/renderers/diagrams.d.ts +25 -0
- package/dist/renderers/diagrams.d.ts.map +1 -0
- package/dist/renderers/diagrams.js +62 -0
- package/dist/renderers/diagrams.js.map +1 -0
- package/dist/renderers/mermaid.d.ts +24 -0
- package/dist/renderers/mermaid.d.ts.map +1 -0
- package/dist/renderers/mermaid.js +135 -0
- package/dist/renderers/mermaid.js.map +1 -0
- package/package.json +5 -2
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAgC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAgC,MAAM,gBAAgB,CAAC;AAsIjF,eAAO,MAAM,MAAM,EAAE,YAcpB,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -9,6 +9,7 @@ import { join, relative, basename } from "node:path";
|
|
|
9
9
|
import { parseMeta } from "@dogsbay/types";
|
|
10
10
|
import { dogsbayMdToTree } from "./parse.js";
|
|
11
11
|
import { buildNavFromDirectory } from "./nav.js";
|
|
12
|
+
import { renderDiagrams } from "./renderers/diagrams.js";
|
|
12
13
|
/**
|
|
13
14
|
* Detect whether a directory contains a Dogsbay MD source tree.
|
|
14
15
|
*
|
|
@@ -61,9 +62,18 @@ async function importDogsbayMd(source, opts) {
|
|
|
61
62
|
const taxonomyNames = Array.isArray(opts.taxonomyNames)
|
|
62
63
|
? opts.taxonomyNames
|
|
63
64
|
: undefined;
|
|
65
|
+
// Pre-parse pass — opt-out via `diagrams: false`. When enabled
|
|
66
|
+
// (default), `code` fences with `lang: mermaid` get transformed
|
|
67
|
+
// to `diagram` nodes with pre-rendered SVG. Fail-open: if mmdc
|
|
68
|
+
// (mermaid-cli) isn't installed the code block is left as-is and
|
|
69
|
+
// a one-line warning is printed. See plans/mermaid-dogsbay-md.md.
|
|
70
|
+
const diagramsOn = opts.diagrams !== false;
|
|
64
71
|
for (const { filePath, slug } of files) {
|
|
65
72
|
const content = readFileSync(filePath, "utf-8");
|
|
66
73
|
const { tree, frontmatter } = dogsbayMdToTree(content);
|
|
74
|
+
if (diagramsOn) {
|
|
75
|
+
await renderDiagrams(tree);
|
|
76
|
+
}
|
|
67
77
|
const title = String(frontmatter.title
|
|
68
78
|
?? prettifyName(basename(slug)));
|
|
69
79
|
// Extract heading metadata for TOC
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SA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|
@@ -7,4 +7,7 @@ export { buildNavFromDirectory } from "./nav.js";
|
|
|
7
7
|
export type { BuildNavOptions } from "./nav.js";
|
|
8
8
|
export { loadNavFile } from "./nav-file.js";
|
|
9
9
|
export type { NavFile, NavFileItem, LoadNavFileOptions } from "./nav-file.js";
|
|
10
|
+
export { renderDiagrams } from "./renderers/diagrams.js";
|
|
11
|
+
export type { RenderDiagramsOptions } from "./renderers/diagrams.js";
|
|
12
|
+
export { renderMermaidSvg, setMmdcOverride, findMmdc } from "./renderers/mermaid.js";
|
|
10
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,4 +7,6 @@ export { inlineToDogsbayMd } from "./inline.js";
|
|
|
7
7
|
export { dogsbayMdToTree, parseInline } from "./parse.js";
|
|
8
8
|
export { buildNavFromDirectory } from "./nav.js";
|
|
9
9
|
export { loadNavFile } from "./nav-file.js";
|
|
10
|
+
export { renderDiagrams } from "./renderers/diagrams.js";
|
|
11
|
+
export { renderMermaidSvg, setMmdcOverride, findMmdc } from "./renderers/mermaid.js";
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,kDAAkD;AAClD,mCAAmC;AAEnC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,EAAE;AACF,kDAAkD;AAClD,mCAAmC;AAEnC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TreeNode } from "@dogsbay/types";
|
|
2
|
+
export interface RenderDiagramsOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Suppress the one-time "mmdc not found" warning printed when
|
|
5
|
+
* the binary can't be resolved. Default false. Tests pass true
|
|
6
|
+
* to keep test output quiet.
|
|
7
|
+
*/
|
|
8
|
+
silent?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Walk a TreeNode tree and replace `code` blocks with a diagram
|
|
12
|
+
* language (today: just `mermaid`) by pre-rendered SVG diagram
|
|
13
|
+
* nodes. Pure async post-parse pass; mutates the tree in place
|
|
14
|
+
* to match the format-mkdocs convention.
|
|
15
|
+
*
|
|
16
|
+
* Fail-open: if mmdc isn't installed or any render fails, the
|
|
17
|
+
* code block is left untouched. A `<CodeBlock>` rendering of the
|
|
18
|
+
* source is the graceful fallback.
|
|
19
|
+
*
|
|
20
|
+
* Warning is printed once per `renderDiagrams` invocation, not
|
|
21
|
+
* per fence — gives the user a clear signal without flooding
|
|
22
|
+
* the build log when many fences are present.
|
|
23
|
+
*/
|
|
24
|
+
export declare function renderDiagrams(tree: TreeNode[], options?: RenderDiagramsOptions): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=diagrams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagrams.d.ts","sourceRoot":"","sources":["../../src/renderers/diagrams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,QAAQ,EAAE,EAChB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmDf"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { renderMermaidSvg } from "./mermaid.js";
|
|
2
|
+
const DIAGRAM_LANGS = new Set(["mermaid"]);
|
|
3
|
+
/**
|
|
4
|
+
* Walk a TreeNode tree and replace `code` blocks with a diagram
|
|
5
|
+
* language (today: just `mermaid`) by pre-rendered SVG diagram
|
|
6
|
+
* nodes. Pure async post-parse pass; mutates the tree in place
|
|
7
|
+
* to match the format-mkdocs convention.
|
|
8
|
+
*
|
|
9
|
+
* Fail-open: if mmdc isn't installed or any render fails, the
|
|
10
|
+
* code block is left untouched. A `<CodeBlock>` rendering of the
|
|
11
|
+
* source is the graceful fallback.
|
|
12
|
+
*
|
|
13
|
+
* Warning is printed once per `renderDiagrams` invocation, not
|
|
14
|
+
* per fence — gives the user a clear signal without flooding
|
|
15
|
+
* the build log when many fences are present.
|
|
16
|
+
*/
|
|
17
|
+
export async function renderDiagrams(tree, options) {
|
|
18
|
+
let warned = false;
|
|
19
|
+
async function walk(nodes) {
|
|
20
|
+
for (const node of nodes) {
|
|
21
|
+
if (node.children)
|
|
22
|
+
await walk(node.children);
|
|
23
|
+
if (node.type !== "code" ||
|
|
24
|
+
!node.props ||
|
|
25
|
+
typeof node.props.lang !== "string" ||
|
|
26
|
+
!DIAGRAM_LANGS.has(node.props.lang)) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const code = typeof node.props.code === "string"
|
|
30
|
+
? node.props.code
|
|
31
|
+
: typeof node.html === "string"
|
|
32
|
+
? node.html
|
|
33
|
+
: "";
|
|
34
|
+
if (!code)
|
|
35
|
+
continue;
|
|
36
|
+
const svg = await renderMermaidSvg(code);
|
|
37
|
+
if (svg === null) {
|
|
38
|
+
if (!warned && !options?.silent) {
|
|
39
|
+
console.warn("[diagrams] mmdc (mermaid-cli) not installed or render " +
|
|
40
|
+
"failed — leaving mermaid fences as plain code blocks. " +
|
|
41
|
+
"Install with `pnpm add -D @mermaid-js/mermaid-cli` to " +
|
|
42
|
+
"enable build-time SVG rendering.");
|
|
43
|
+
warned = true;
|
|
44
|
+
}
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// In-place transform. Keep the source code on the node so
|
|
48
|
+
// the round-trip serializer (treeToDogsbayMd) can emit it
|
|
49
|
+
// back as a mermaid fence — agents that fetch the markdown
|
|
50
|
+
// mirror see the diagram source, not a baked SVG.
|
|
51
|
+
node.type = "diagram";
|
|
52
|
+
node.props = {
|
|
53
|
+
...node.props,
|
|
54
|
+
lang: "mermaid",
|
|
55
|
+
code,
|
|
56
|
+
svg,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
await walk(tree);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=diagrams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagrams.js","sourceRoot":"","sources":["../../src/renderers/diagrams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWh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AA0D;YAC1D,0DAA0D;YAC1D,2DAA2D;YAC3D,kDAAkD;YACjD,IAAiB,CAAC,IAAI,GAAG,SAAS,CAAC;YACpC,IAAI,CAAC,KAAK,GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,IAAI,EAAE,SAAS;gBACf,IAAI;gBACJ,GAAG;aACJ,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test seam — call with a path to force a specific mmdc location,
|
|
3
|
+
* `null` to simulate the binary being absent, or no args to clear
|
|
4
|
+
* the override. Production callers never invoke this.
|
|
5
|
+
*/
|
|
6
|
+
export declare function setMmdcOverride(path: string | null | undefined): void;
|
|
7
|
+
/**
|
|
8
|
+
* Find the mmdc binary from @mermaid-js/mermaid-cli.
|
|
9
|
+
* Tries: PATH lookup, then walks up from cwd and linked package
|
|
10
|
+
* locations. Mirrors the format-mkdocs renderer's heuristic — the
|
|
11
|
+
* only difference is the package-anchor name.
|
|
12
|
+
*/
|
|
13
|
+
export declare function findMmdc(): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Render mermaid code to SVG using mmdc (mermaid-cli).
|
|
16
|
+
* Returns the SVG string, or `null` if rendering fails (mmdc not
|
|
17
|
+
* installed, render error, timeout).
|
|
18
|
+
*
|
|
19
|
+
* Results are cached by sha256 of the source on disk under
|
|
20
|
+
* `os.tmpdir()/dogsbay-mermaid-cache/` to avoid re-rendering
|
|
21
|
+
* identical diagrams across pages or rebuilds.
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderMermaidSvg(code: string): Promise<string | null>;
|
|
24
|
+
//# sourceMappingURL=mermaid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../../src/renderers/mermaid.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CA+BxC;AAwBD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4C3E"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { writeFileSync, readFileSync, unlinkSync, existsSync, mkdirSync, realpathSync } from "node:fs";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
const CACHE_DIR = join(tmpdir(), "dogsbay-mermaid-cache");
|
|
7
|
+
/**
|
|
8
|
+
* Test override for `findMmdc`. Set to a string path to force a
|
|
9
|
+
* specific binary location; set to `null` to simulate "mmdc not
|
|
10
|
+
* installed"; leave `undefined` (default) for the real lookup.
|
|
11
|
+
*/
|
|
12
|
+
let mmdcOverride = undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Test seam — call with a path to force a specific mmdc location,
|
|
15
|
+
* `null` to simulate the binary being absent, or no args to clear
|
|
16
|
+
* the override. Production callers never invoke this.
|
|
17
|
+
*/
|
|
18
|
+
export function setMmdcOverride(path) {
|
|
19
|
+
mmdcOverride = path;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Find the mmdc binary from @mermaid-js/mermaid-cli.
|
|
23
|
+
* Tries: PATH lookup, then walks up from cwd and linked package
|
|
24
|
+
* locations. Mirrors the format-mkdocs renderer's heuristic — the
|
|
25
|
+
* only difference is the package-anchor name.
|
|
26
|
+
*/
|
|
27
|
+
export function findMmdc() {
|
|
28
|
+
if (mmdcOverride !== undefined)
|
|
29
|
+
return mmdcOverride;
|
|
30
|
+
// 1. Try resolving from the package that depends on us (follow symlinks)
|
|
31
|
+
try {
|
|
32
|
+
const pkgDir = resolve(process.cwd(), "node_modules/@dogsbay/format-dogsbay-md");
|
|
33
|
+
const realDir = realpathSync(pkgDir);
|
|
34
|
+
let dir = realDir;
|
|
35
|
+
for (let i = 0; i < 6; i++) {
|
|
36
|
+
const p = join(dir, "node_modules/.pnpm/node_modules/.bin/mmdc");
|
|
37
|
+
if (existsSync(p))
|
|
38
|
+
return p;
|
|
39
|
+
const p2 = join(dir, "node_modules/.bin/mmdc");
|
|
40
|
+
if (existsSync(p2))
|
|
41
|
+
return p2;
|
|
42
|
+
const parent = resolve(dir, "..");
|
|
43
|
+
if (parent === dir)
|
|
44
|
+
break;
|
|
45
|
+
dir = parent;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch { /* ignore */ }
|
|
49
|
+
// 2. Walk up from cwd
|
|
50
|
+
let dir = process.cwd();
|
|
51
|
+
for (let i = 0; i < 6; i++) {
|
|
52
|
+
for (const candidate of ["node_modules/.bin/mmdc", "node_modules/.pnpm/node_modules/.bin/mmdc"]) {
|
|
53
|
+
const full = join(dir, candidate);
|
|
54
|
+
if (existsSync(full))
|
|
55
|
+
return full;
|
|
56
|
+
}
|
|
57
|
+
const parent = resolve(dir, "..");
|
|
58
|
+
if (parent === dir)
|
|
59
|
+
break;
|
|
60
|
+
dir = parent;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function hashCode(code) {
|
|
65
|
+
return createHash("sha256").update(code).digest("hex").slice(0, 16);
|
|
66
|
+
}
|
|
67
|
+
function getCached(hash) {
|
|
68
|
+
const cachePath = join(CACHE_DIR, `${hash}.svg`);
|
|
69
|
+
try {
|
|
70
|
+
return readFileSync(cachePath, "utf-8");
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function setCache(hash, svg) {
|
|
77
|
+
try {
|
|
78
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
79
|
+
writeFileSync(join(CACHE_DIR, `${hash}.svg`), svg);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
// Cache write failure is non-fatal
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Render mermaid code to SVG using mmdc (mermaid-cli).
|
|
87
|
+
* Returns the SVG string, or `null` if rendering fails (mmdc not
|
|
88
|
+
* installed, render error, timeout).
|
|
89
|
+
*
|
|
90
|
+
* Results are cached by sha256 of the source on disk under
|
|
91
|
+
* `os.tmpdir()/dogsbay-mermaid-cache/` to avoid re-rendering
|
|
92
|
+
* identical diagrams across pages or rebuilds.
|
|
93
|
+
*/
|
|
94
|
+
export async function renderMermaidSvg(code) {
|
|
95
|
+
const hash = hashCode(code);
|
|
96
|
+
const cached = getCached(hash);
|
|
97
|
+
if (cached)
|
|
98
|
+
return cached;
|
|
99
|
+
const mmdc = findMmdc();
|
|
100
|
+
if (!mmdc)
|
|
101
|
+
return null;
|
|
102
|
+
const inputFile = join(tmpdir(), `mermaid-${hash}.mmd`);
|
|
103
|
+
const outputFile = join(tmpdir(), `mermaid-${hash}.svg`);
|
|
104
|
+
try {
|
|
105
|
+
writeFileSync(inputFile, code);
|
|
106
|
+
await new Promise((res, reject) => {
|
|
107
|
+
execFile(mmdc, ["-i", inputFile, "-o", outputFile, "-e", "svg", "--quiet"], { timeout: 30000 }, (error) => {
|
|
108
|
+
if (error)
|
|
109
|
+
reject(error);
|
|
110
|
+
else
|
|
111
|
+
res();
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
const svg = readFileSync(outputFile, "utf-8");
|
|
115
|
+
// Strip hard-coded `background-color: white` so the figure
|
|
116
|
+
// honors the surrounding page background (light + dark).
|
|
117
|
+
const cleanSvg = svg.replace(/style="[^"]*background-color:\s*white;?[^"]*"/, (match) => match.replace(/background-color:\s*white;?\s*/, ""));
|
|
118
|
+
setCache(hash, cleanSvg);
|
|
119
|
+
return cleanSvg;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
try {
|
|
126
|
+
unlinkSync(inputFile);
|
|
127
|
+
}
|
|
128
|
+
catch { /* ignore */ }
|
|
129
|
+
try {
|
|
130
|
+
unlinkSync(outputFile);
|
|
131
|
+
}
|
|
132
|
+
catch { /* ignore */ }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=mermaid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mermaid.js","sourceRoot":"","sources":["../../src/renderers/mermaid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC;AAE1D;;;;GAIG;AACH,IAAI,YAAY,GAA8B,SAAS,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAA+B;IAC7D,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ;IACtB,IAAI,YAAY,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC;IACpD,yEAAyE;IACzE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,yCAAyC,CAAC,CAAC;QACjF,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC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,OAAO,CAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;YACtC,QAAQ,CACN,IAAI,EACJ,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,EAC3D,EAAE,OAAO,EAAE,KAAK,EAAE,EAClB,CAAC,KAAK,EAAE,EAAE;gBACR,IAAI,KAAK;oBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;;oBACpB,GAAG,EAAE,CAAC;YACb,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAE9C,2DAA2D;QAC3D,yDAAyD;QACzD,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAC1B,+CAA+C,EAC/C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAC/D,CAAC;QAEF,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QACrD,IAAI,CAAC;YAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/format-dogsbay-md",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.29",
|
|
4
4
|
"description": "Dogsbay Markdown dialect — canonical format for TreeNode[] with directives, YAML bodies, and intelligent fallbacks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
"markdown-it-front-matter": "^0.2.4",
|
|
36
36
|
"gray-matter": "^4.0.3",
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
38
|
-
"@dogsbay/types": "0.2.0-beta.
|
|
38
|
+
"@dogsbay/types": "0.2.0-beta.29"
|
|
39
|
+
},
|
|
40
|
+
"optionalDependencies": {
|
|
41
|
+
"@mermaid-js/mermaid-cli": "^11.0.0"
|
|
39
42
|
},
|
|
40
43
|
"license": "MIT",
|
|
41
44
|
"repository": {
|