@pokedocs/plugin-mermaid-ssr 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wesley Huber
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @pokedocs/plugin-mermaid-ssr — build-time mermaid rendering (PRD F1.3).
3
+ *
4
+ * Every mermaid code fence compiles to inline SVG during the build (S1.3.1),
5
+ * the verbatim source is preserved in a data attribute for AI agents
6
+ * (S1.3.2), and a syntax error fails the build with file and line (S1.3.3).
7
+ *
8
+ * Engine per ADR-0001: rehype-mermaid `inline-svg`. This package is the CJS
9
+ * wrapper that ADR requires — it defers the ESM-only import to transform
10
+ * time (the Docusaurus config loader cannot import ESM), and shares ONE
11
+ * inner transformer across all files (a per-file transformer launches a
12
+ * browser per file and costs 12x).
13
+ */
14
+ import { type HastNode } from './preserve-source.js';
15
+ export interface MermaidSsrOptions {
16
+ /**
17
+ * Keep the raw mermaid source on the wrapper element as
18
+ * `data-mermaid-source` (S1.3.2). Defaults to true — this is the
19
+ * agent-readability contract; turning it off violates the PRD's
20
+ * "mermaid sources are never discarded" rule.
21
+ */
22
+ preserveSource?: boolean;
23
+ /** Mermaid theme variables forwarded to mermaid.initialize. */
24
+ themeVariables?: Record<string, string>;
25
+ /** Full mermaid config passthrough (merged over themeVariables). */
26
+ mermaidConfig?: Record<string, unknown>;
27
+ }
28
+ /**
29
+ * Engine decision (ADR-0001, S1.3.4): rehype-mermaid `inline-svg`, wrapped in
30
+ * this CJS package with a deferred ESM import, ONE shared transformer across
31
+ * all files (per-file transformers cost 12x), and a source-preservation
32
+ * pre-pass. mermaid-cli was rejected: slower, a second CI browser, and no
33
+ * file/line error story.
34
+ */
35
+ export declare const MERMAID_SSR_ENGINE = "rehype-mermaid";
36
+ /** CSS class on the wrapper that carries the preserved source. */
37
+ export declare const WRAPPER_CLASS = "pokedocs-mermaid";
38
+ interface VFileLike {
39
+ path?: string;
40
+ fail(reason: string, place?: unknown, origin?: string): never;
41
+ }
42
+ /**
43
+ * The rehype plugin. Wire it into the Docusaurus docs pipeline via
44
+ * `beforeDefaultRehypePlugins` (the preset does this automatically once
45
+ * S1.2.1 lands). `markdown.mermaid` and `@docusaurus/theme-mermaid` must be
46
+ * OFF — otherwise fences become React components before rehype sees them.
47
+ */
48
+ export declare function rehypeMermaidSsr(options?: MermaidSsrOptions): (tree: HastNode, file: VFileLike) => Promise<void>;
49
+ export default rehypeMermaidSsr;
50
+ export { wrapMermaidFences } from './preserve-source.js';
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AAEnD,kEAAkE;AAClE,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAIhD,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC/D;AA8CD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,IAEhD,MAAM,QAAQ,EAAE,MAAM,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC,CAW9D;AAED,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ /**
3
+ * @pokedocs/plugin-mermaid-ssr — build-time mermaid rendering (PRD F1.3).
4
+ *
5
+ * Every mermaid code fence compiles to inline SVG during the build (S1.3.1),
6
+ * the verbatim source is preserved in a data attribute for AI agents
7
+ * (S1.3.2), and a syntax error fails the build with file and line (S1.3.3).
8
+ *
9
+ * Engine per ADR-0001: rehype-mermaid `inline-svg`. This package is the CJS
10
+ * wrapper that ADR requires — it defers the ESM-only import to transform
11
+ * time (the Docusaurus config loader cannot import ESM), and shares ONE
12
+ * inner transformer across all files (a per-file transformer launches a
13
+ * browser per file and costs 12x).
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.wrapMermaidFences = exports.WRAPPER_CLASS = exports.MERMAID_SSR_ENGINE = void 0;
17
+ exports.rehypeMermaidSsr = rehypeMermaidSsr;
18
+ const preserve_source_js_1 = require("./preserve-source.js");
19
+ /**
20
+ * Engine decision (ADR-0001, S1.3.4): rehype-mermaid `inline-svg`, wrapped in
21
+ * this CJS package with a deferred ESM import, ONE shared transformer across
22
+ * all files (per-file transformers cost 12x), and a source-preservation
23
+ * pre-pass. mermaid-cli was rejected: slower, a second CI browser, and no
24
+ * file/line error story.
25
+ */
26
+ exports.MERMAID_SSR_ENGINE = 'rehype-mermaid';
27
+ /** CSS class on the wrapper that carries the preserved source. */
28
+ exports.WRAPPER_CLASS = 'pokedocs-mermaid';
29
+ // ONE inner transformer per options-shape for the whole build process —
30
+ // mermaid-isomorphic batches diagrams and reuses its in-flight browser only
31
+ // when the transformer instance is shared (ADR-0001 finding: 12x otherwise).
32
+ const transformerCache = new Map();
33
+ async function getInnerTransformer(options) {
34
+ const key = JSON.stringify([options.themeVariables, options.mermaidConfig]);
35
+ let cached = transformerCache.get(key);
36
+ if (!cached) {
37
+ cached = (async () => {
38
+ // Dynamic import (preserved as real import() under NodeNext): the
39
+ // ESM-only engine loads at transform time, never at config time.
40
+ const { default: rehypeMermaid } = await import('rehype-mermaid');
41
+ const attacher = rehypeMermaid;
42
+ return attacher({
43
+ strategy: 'inline-svg',
44
+ mermaidConfig: {
45
+ ...(options.themeVariables
46
+ ? { themeVariables: options.themeVariables }
47
+ : {}),
48
+ ...options.mermaidConfig,
49
+ },
50
+ });
51
+ })();
52
+ transformerCache.set(key, cached);
53
+ }
54
+ return cached;
55
+ }
56
+ /** Strip rehype-mermaid's serialized hast dump from an error, keep the parse message. */
57
+ function cleanErrorReason(err) {
58
+ const raw = err.reason ?? err.message ?? String(err);
59
+ const dumpStart = raw.search(/\n\s*[[{]"/);
60
+ const message = dumpStart > 0 ? raw.slice(0, dumpStart) : raw;
61
+ return `Invalid mermaid diagram: ${message.trim()}`;
62
+ }
63
+ /**
64
+ * The rehype plugin. Wire it into the Docusaurus docs pipeline via
65
+ * `beforeDefaultRehypePlugins` (the preset does this automatically once
66
+ * S1.2.1 lands). `markdown.mermaid` and `@docusaurus/theme-mermaid` must be
67
+ * OFF — otherwise fences become React components before rehype sees them.
68
+ */
69
+ function rehypeMermaidSsr(options = {}) {
70
+ const preserve = options.preserveSource !== false;
71
+ return async (tree, file) => {
72
+ const wrapped = preserve ? (0, preserve_source_js_1.wrapMermaidFences)(tree) : 0;
73
+ const transformer = await getInnerTransformer(options);
74
+ try {
75
+ await transformer(tree, file);
76
+ }
77
+ catch (err) {
78
+ const e = err;
79
+ file.fail(cleanErrorReason(e), e.place, 'pokedocs:mermaid-ssr');
80
+ }
81
+ void wrapped;
82
+ };
83
+ }
84
+ exports.default = rehypeMermaidSsr;
85
+ var preserve_source_js_2 = require("./preserve-source.js");
86
+ Object.defineProperty(exports, "wrapMermaidFences", { enumerable: true, get: function () { return preserve_source_js_2.wrapMermaidFences; } });
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA2FH,4CAaC;AAtGD,6DAI8B;AAgB9B;;;;;;GAMG;AACU,QAAA,kBAAkB,GAAG,gBAAgB,CAAC;AAEnD,kEAAkE;AACrD,QAAA,aAAa,GAAG,kBAAkB,CAAC;AAchD,wEAAwE;AACxE,4EAA4E;AAC5E,6EAA6E;AAC7E,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEjE,KAAK,UAAU,mBAAmB,CAChC,OAA0B;IAE1B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5E,IAAI,MAAM,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE;YACnB,kEAAkE;YAClE,iEAAiE;YACjE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;YAClE,MAAM,QAAQ,GAAG,aAAuD,CAAC;YACzE,OAAO,QAAQ,CAAC;gBACd,QAAQ,EAAE,YAAY;gBACtB,aAAa,EAAE;oBACb,GAAG,CAAC,OAAO,CAAC,cAAc;wBACxB,CAAC,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE;wBAC5C,CAAC,CAAC,EAAE,CAAC;oBACP,GAAG,OAAO,CAAC,aAAa;iBACzB;aACF,CAAC,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;QACL,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,yFAAyF;AACzF,SAAS,gBAAgB,CAAC,GAAqB;IAC7C,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;IACrD,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC9D,OAAO,4BAA4B,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,UAA6B,EAAE;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,cAAc,KAAK,KAAK,CAAC;IAClD,OAAO,KAAK,EAAE,IAAc,EAAE,IAAe,EAAiB,EAAE;QAC9D,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,sCAAiB,EAAC,IAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,WAAW,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,GAAuB,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC;QAClE,CAAC;QACD,KAAK,OAAO,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,gBAAgB,CAAC;AAChC,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Source-preservation pre-pass (S1.3.2, ADR-0001).
3
+ *
4
+ * Before the engine replaces each mermaid fence with SVG, wrap the fence in
5
+ * `<div class="pokedocs-mermaid" data-mermaid-source="…">`. The engine
6
+ * replaces the inner <pre> in place and leaves the wrapper — so every built
7
+ * page carries BOTH the rendered SVG and the verbatim mermaid source.
8
+ *
9
+ * Hand-rolled hast walk: the unist utilities are ESM-only, and this tiny
10
+ * traversal isn't worth the interop cost in a CJS package.
11
+ */
12
+ export interface HastNode {
13
+ type: string;
14
+ value?: string;
15
+ children?: HastNode[];
16
+ }
17
+ export interface HastElement extends HastNode {
18
+ tagName?: string;
19
+ properties?: Record<string, unknown>;
20
+ }
21
+ /**
22
+ * Wrap every mermaid fence in the tree; returns how many were wrapped.
23
+ * Mutates the tree in place (children arrays are replaced element-wise).
24
+ */
25
+ export declare function wrapMermaidFences(tree: HastElement): number;
26
+ //# sourceMappingURL=preserve-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preserve-source.d.ts","sourceRoot":"","sources":["../src/preserve-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAoBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CA0B3D"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * Source-preservation pre-pass (S1.3.2, ADR-0001).
4
+ *
5
+ * Before the engine replaces each mermaid fence with SVG, wrap the fence in
6
+ * `<div class="pokedocs-mermaid" data-mermaid-source="…">`. The engine
7
+ * replaces the inner <pre> in place and leaves the wrapper — so every built
8
+ * page carries BOTH the rendered SVG and the verbatim mermaid source.
9
+ *
10
+ * Hand-rolled hast walk: the unist utilities are ESM-only, and this tiny
11
+ * traversal isn't worth the interop cost in a CJS package.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.wrapMermaidFences = wrapMermaidFences;
15
+ function textContent(node) {
16
+ if (node.type === 'text')
17
+ return node.value ?? '';
18
+ return (node.children ?? []).map(textContent).join('');
19
+ }
20
+ function isMermaidPre(node) {
21
+ if (node.tagName !== 'pre')
22
+ return false;
23
+ return (node.children ?? []).some((child) => {
24
+ const el = child;
25
+ const cls = el.properties?.className;
26
+ return (el.tagName === 'code' &&
27
+ Array.isArray(cls) &&
28
+ cls.some((c) => c === 'language-mermaid' || c === 'mermaid'));
29
+ });
30
+ }
31
+ /**
32
+ * Wrap every mermaid fence in the tree; returns how many were wrapped.
33
+ * Mutates the tree in place (children arrays are replaced element-wise).
34
+ */
35
+ function wrapMermaidFences(tree) {
36
+ let wrapped = 0;
37
+ const walk = (node) => {
38
+ const children = node.children;
39
+ if (!children)
40
+ return;
41
+ for (let i = 0; i < children.length; i++) {
42
+ const child = children[i];
43
+ if (child && isMermaidPre(child)) {
44
+ const source = textContent(child).trimEnd();
45
+ children[i] = {
46
+ type: 'element',
47
+ tagName: 'div',
48
+ properties: {
49
+ className: ['pokedocs-mermaid'],
50
+ dataMermaidSource: source,
51
+ },
52
+ children: [child],
53
+ };
54
+ wrapped++;
55
+ }
56
+ else if (child) {
57
+ walk(child);
58
+ }
59
+ }
60
+ };
61
+ walk(tree);
62
+ return wrapped;
63
+ }
64
+ //# sourceMappingURL=preserve-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preserve-source.js","sourceRoot":"","sources":["../src/preserve-source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAmCH,8CA0BC;AAhDD,SAAS,WAAW,CAAC,IAAc;IACjC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,YAAY,CAAC,IAAiB;IACrC,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1C,MAAM,EAAE,GAAG,KAAoB,CAAC;QAChC,MAAM,GAAG,GAAG,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACrC,OAAO,CACL,EAAE,CAAC,OAAO,KAAK,MAAM;YACrB,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YAClB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,kBAAkB,IAAI,CAAC,KAAK,SAAS,CAAC,CAC7D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,IAAiB;IACjD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,IAAI,GAAG,CAAC,IAAiB,EAAQ,EAAE;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAqC,CAAC;QAC5D,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;gBACjC,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;gBAC5C,QAAQ,CAAC,CAAC,CAAC,GAAG;oBACZ,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE;wBACV,SAAS,EAAE,CAAC,kBAAkB,CAAC;wBAC/B,iBAAiB,EAAE,MAAM;qBAC1B;oBACD,QAAQ,EAAE,CAAC,KAAK,CAAC;iBAClB,CAAC;gBACF,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,IAAI,KAAK,EAAE,CAAC;gBACjB,IAAI,CAAC,KAAK,CAAC,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@pokedocs/plugin-mermaid-ssr",
3
+ "version": "0.1.0",
4
+ "description": "Build-time mermaid rendering for Docusaurus — SVG baked into static HTML, source preserved for agents, build fails on bad syntax",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/wbaxterh/pokedocs.git",
9
+ "directory": "packages/plugin-mermaid-ssr"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "engines": {
26
+ "node": ">=20"
27
+ },
28
+ "dependencies": {
29
+ "playwright": "^1.61.1",
30
+ "rehype-mermaid": "^3.0.0"
31
+ }
32
+ }