featherdown 0.1.0 → 0.1.1
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 -1
- package/dist/node.js +1 -1
- package/dist/node.js.map +1 -1
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -12,9 +12,10 @@ npm install featherdown
|
|
|
12
12
|
|
|
13
13
|
Node.js 18+ is required.
|
|
14
14
|
|
|
15
|
-
If you use Mermaid rendering from `featherdown/node`, install Playwright Chromium:
|
|
15
|
+
If you use Mermaid rendering from `featherdown/node`, install Playwright and Chromium:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
+
npm install playwright
|
|
18
19
|
npx playwright install chromium
|
|
19
20
|
```
|
|
20
21
|
|
package/dist/node.js
CHANGED
|
@@ -2,7 +2,7 @@ import { remarkHeadingIds, rehypeChartBlocks_default, schemaWithSvg, rehypeCdnIm
|
|
|
2
2
|
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
|
|
3
3
|
import rehypeHighlight from 'rehype-highlight';
|
|
4
4
|
import rehypeKatex from 'rehype-katex';
|
|
5
|
-
import rehypeMermaid from 'rehype-
|
|
5
|
+
import rehypeMermaid from 'rehype-mermaid';
|
|
6
6
|
import rehypeRaw from 'rehype-raw';
|
|
7
7
|
import rehypeSanitize from 'rehype-sanitize';
|
|
8
8
|
import rehypeSlug from 'rehype-slug';
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/createMarkdownProcessorWithMermaidInternal.ts","../src/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,2CACd,OAAA,EACA;AACA,EAAA,OAAO,OAAA,EAAQ,CACZ,GAAA,CAAI,WAAW,CAAA,CACf,GAAA,CAAI,SAAS,CAAA,CACb,GAAA,CAAI,UAAU,CAAA,CACd,GAAA,CAAI,gBAAgB,CAAA,CACpB,GAAA,CAAI,YAAA,EAAc,EAAE,kBAAA,EAAoB,IAAA,EAAM,CAAA,CAC9C,GAAA,CAAI,SAAS,CAAA,CACb,GAAA,CAAI,yBAAyB,CAAA,CAC7B,GAAA,CAAI,UAAU,CAAA,CACd,GAAA,CAAI,sBAAA,EAAwB,EAAE,QAAA,EAAU,MAAA,EAAQ,CAAA,CAChD,GAAA,CAAI,WAAA,EAAa,EAAE,MAAA,EAAQ,MAAA,EAAQ,CAAA,CACnC,GAAA,CAAI,eAAe,CAAA,CACnB,GAAA,CAAI,aAAA,EAAe,EAAE,QAAA,EAAU,YAAA,EAAc,CAAA,CAC7C,GAAA,CAAI,cAAA,EAAgB,aAAa,CAAA,CACjC,GAAA,CAAI,eAAA,EAAyB,OAAO,CAAA,CACpC,IAAI,eAAe,CAAA;AACxB;;;ACnCA,eAAsB,+BAAA,CACpB,UACA,OAAA,EACiB;AACjB,EAAA,MAAM,SAAA,GAAY,2CAA2C,OAAO,CAAA;AACpE,EAAA,MAAM,IAAA,GAAO,MAAM,SAAA,CAAU,OAAA,CAAQ,QAAQ,CAAA;AAC7C,EAAA,OAAO,OAAO,IAAI,CAAA;AACpB","file":"node.js","sourcesContent":["import rehypeAutolinkHeadings from 'rehype-autolink-headings';\nimport rehypeHighlight from 'rehype-highlight';\nimport rehypeKatex from 'rehype-katex';\nimport rehypeMermaid from 'rehype-
|
|
1
|
+
{"version":3,"sources":["../src/internal/createMarkdownProcessorWithMermaidInternal.ts","../src/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBO,SAAS,2CACd,OAAA,EACA;AACA,EAAA,OAAO,OAAA,EAAQ,CACZ,GAAA,CAAI,WAAW,CAAA,CACf,GAAA,CAAI,SAAS,CAAA,CACb,GAAA,CAAI,UAAU,CAAA,CACd,GAAA,CAAI,gBAAgB,CAAA,CACpB,GAAA,CAAI,YAAA,EAAc,EAAE,kBAAA,EAAoB,IAAA,EAAM,CAAA,CAC9C,GAAA,CAAI,SAAS,CAAA,CACb,GAAA,CAAI,yBAAyB,CAAA,CAC7B,GAAA,CAAI,UAAU,CAAA,CACd,GAAA,CAAI,sBAAA,EAAwB,EAAE,QAAA,EAAU,MAAA,EAAQ,CAAA,CAChD,GAAA,CAAI,WAAA,EAAa,EAAE,MAAA,EAAQ,MAAA,EAAQ,CAAA,CACnC,GAAA,CAAI,eAAe,CAAA,CACnB,GAAA,CAAI,aAAA,EAAe,EAAE,QAAA,EAAU,YAAA,EAAc,CAAA,CAC7C,GAAA,CAAI,cAAA,EAAgB,aAAa,CAAA,CACjC,GAAA,CAAI,eAAA,EAAyB,OAAO,CAAA,CACpC,IAAI,eAAe,CAAA;AACxB;;;ACnCA,eAAsB,+BAAA,CACpB,UACA,OAAA,EACiB;AACjB,EAAA,MAAM,SAAA,GAAY,2CAA2C,OAAO,CAAA;AACpE,EAAA,MAAM,IAAA,GAAO,MAAM,SAAA,CAAU,OAAA,CAAQ,QAAQ,CAAA;AAC7C,EAAA,OAAO,OAAO,IAAI,CAAA;AACpB","file":"node.js","sourcesContent":["import rehypeAutolinkHeadings from 'rehype-autolink-headings';\nimport rehypeHighlight from 'rehype-highlight';\nimport rehypeKatex from 'rehype-katex';\nimport rehypeMermaid from 'rehype-mermaid';\nimport rehypeRaw from 'rehype-raw';\nimport rehypeSanitize from 'rehype-sanitize';\nimport rehypeSlug from 'rehype-slug';\nimport rehypeStringify from 'rehype-stringify';\nimport remarkGfm from 'remark-gfm';\nimport remarkMath from 'remark-math';\nimport remarkParse from 'remark-parse';\nimport remarkRehype from 'remark-rehype';\nimport { unified } from 'unified';\nimport type { RenderMarkdownOptions } from '../types.js';\nimport rehypeChartBlocksInternal from './rehypeChartBlocksInternal.js';\nimport rehypeCdnImagesInternal from './rehypeCdnImagesInternal.js';\nimport { remarkHeadingIds } from './headingIdsRemark.js';\nimport { schemaWithSvg } from './sanitizeSchema.js';\n\nexport function createMarkdownProcessorWithMermaidInternal(\n options?: RenderMarkdownOptions,\n) {\n return unified()\n .use(remarkParse)\n .use(remarkGfm)\n .use(remarkMath)\n .use(remarkHeadingIds)\n .use(remarkRehype, { allowDangerousHtml: true })\n .use(rehypeRaw)\n .use(rehypeChartBlocksInternal)\n .use(rehypeSlug)\n .use(rehypeAutolinkHeadings, { behavior: 'wrap' })\n .use(rehypeKatex, { output: 'html' })\n .use(rehypeHighlight)\n .use(rehypeMermaid, { strategy: 'inline-svg' })\n .use(rehypeSanitize, schemaWithSvg)\n .use(rehypeCdnImagesInternal, options)\n .use(rehypeStringify);\n}\n\n","import { createMarkdownProcessorWithMermaidInternal } from './internal/createMarkdownProcessorWithMermaidInternal.js';\nimport type { RenderMarkdownOptions } from './types.js';\n\nexport async function renderMarkdownToHtmlWithMermaid(\n markdown: string,\n options?: RenderMarkdownOptions,\n): Promise<string> {\n const processor = createMarkdownProcessorWithMermaidInternal(options);\n const file = await processor.process(markdown);\n return String(file);\n}\n\nexport type { RenderMarkdownOptions } from './types.js';\n\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "featherdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Markdown-to-HTML pipeline with sanitization, diagnostics, and optional Node Mermaid rendering.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,10 +45,19 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=18"
|
|
47
47
|
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"playwright": "^1.59.1"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"playwright": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
48
56
|
"devDependencies": {
|
|
49
57
|
"@eslint/js": "^9.18.0",
|
|
50
58
|
"@types/js-yaml": "^4.0.9",
|
|
51
59
|
"eslint": "^9.18.0",
|
|
60
|
+
"playwright": "^1.59.1",
|
|
52
61
|
"tsup": "^8.3.5",
|
|
53
62
|
"typescript": "^5.7.3",
|
|
54
63
|
"typescript-eslint": "^8.21.0",
|
|
@@ -61,7 +70,7 @@
|
|
|
61
70
|
"rehype-autolink-headings": "^7.1.0",
|
|
62
71
|
"rehype-highlight": "^7.0.2",
|
|
63
72
|
"rehype-katex": "^7.0.1",
|
|
64
|
-
"rehype-
|
|
73
|
+
"rehype-mermaid": "^3.0.0",
|
|
65
74
|
"rehype-raw": "^7.0.0",
|
|
66
75
|
"rehype-sanitize": "^6.0.0",
|
|
67
76
|
"rehype-slug": "^6.0.0",
|