markstream-vue2 0.0.40 → 0.0.41
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 +17 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -178,6 +178,23 @@ Notes:
|
|
|
178
178
|
- Use kebab-case in templates: `mermaid-props`, `d2-props`, `infographic-props`.
|
|
179
179
|
- These props are forwarded to the built-in Mermaid / D2 / Infographic blocks and to custom `mermaid` / `d2` / `infographic` overrides registered with `setCustomComponents(...)`.
|
|
180
180
|
|
|
181
|
+
## Language-specific code block overrides
|
|
182
|
+
|
|
183
|
+
You can also register a renderer for one fenced language directly:
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
import { setCustomComponents } from 'markstream-vue2'
|
|
187
|
+
|
|
188
|
+
setCustomComponents('docs', {
|
|
189
|
+
echarts: EChartsBlockNode,
|
|
190
|
+
})
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Notes:
|
|
194
|
+
- `echarts` only catches fences whose language is `echarts`.
|
|
195
|
+
- Code block routing priority is exact language key -> built-in `mermaid` / `d2` / `infographic` routes -> `code_block`.
|
|
196
|
+
- `mermaid`, `d2`, and `infographic` overrides keep their specialized prop forwarding; other language keys receive the normal code-block-level bindings.
|
|
197
|
+
|
|
181
198
|
## Mermaid tuning
|
|
182
199
|
|
|
183
200
|
Common `mermaid-props` keys for streaming scenarios:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-vue2",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.41",
|
|
5
5
|
"description": "Vue 2 Markdown renderer optimized for large documents with progressive Mermaid rendering, streaming diff code blocks, and fast real-time preview. Perfect for documentation sites, AI chat interfaces, and content management systems.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@floating-ui/dom": "^1.7.6",
|
|
120
120
|
"vue-demi": "^0.14.10",
|
|
121
|
-
"stream-markdown-parser": "0.0.
|
|
121
|
+
"stream-markdown-parser": "0.0.90"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@vitejs/plugin-vue2": "^2.3.4",
|