mdast-util-to-vnode 0.3.2 → 0.4.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/README.md CHANGED
@@ -8,6 +8,9 @@ This package is a utility that takes [mdast](https://github.com/syntax-tree/mdas
8
8
 
9
9
  ## When should I use this?
10
10
 
11
+ > [!TIP]
12
+ > Vue Markdown: the vue component for render markdown string, and support streaming for AI. [Learn more 👉](https://github.com/litingyes/vue-markdown)
13
+
11
14
  If you want to use Vue.js to render mdast, use it. It is especially useful when you want to render streamed MarkDown strings in AI application development.
12
15
 
13
16
  ## Install
package/dist/index.js CHANGED
@@ -53,8 +53,8 @@ function v(r, l = {}, c) {
53
53
  ) : t(
54
54
  "pre",
55
55
  {
56
- dataLang: r.lang,
57
- dataMeta: r.meta
56
+ "data-lang": r.lang,
57
+ "data-meta": r.meta
58
58
  },
59
59
  t("code", r.value)
60
60
  );
@@ -211,12 +211,15 @@ function v(r, l = {}, c) {
211
211
  ) : t(
212
212
  "pre",
213
213
  {
214
- dataLang: "yaml"
214
+ "data-lang": "yaml"
215
215
  },
216
216
  t("code", r.value)
217
217
  );
218
218
  default:
219
- return t(O, JSON.stringify(r));
219
+ return e ? t(
220
+ e,
221
+ a
222
+ ) : t(O, JSON.stringify(r));
220
223
  }
221
224
  }
222
225
  function u(r, l = {}) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mdast-util-to-vnode",
3
3
  "type": "module",
4
- "version": "0.3.2",
4
+ "version": "0.4.0",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@10.5.2+sha512.da9dc28cd3ff40d0592188235ab25d3202add8a207afbedc682220e4a0029ffbff4562102b9e6e46b4e3f9e8bd53e6d05de48544b0c57d4b0179e22c76d1199b",
7
7
  "description": "mdast utility to get the vue vnode",