markstream-vue2 0.0.46 → 0.0.48
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 +11 -3
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +168 -40
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/tailwind.ts +1 -1
- package/package.json +29 -8
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# markstream-vue2
|
|
2
2
|
|
|
3
|
-
Vue 2.6
|
|
3
|
+
Vue 2.6 / 2.7 compatibility renderer for legacy Vue 2 apps that need streaming Markdown, AI chat output, long documents, progressive Mermaid/KaTeX, and streaming code blocks.
|
|
4
|
+
|
|
5
|
+
- Docs: https://markstream.simonhe.me/frameworks/vue2
|
|
6
|
+
- Quick start: https://markstream.simonhe.me/guide/vue2-quick-start
|
|
7
|
+
|
|
8
|
+
For Vue 3 or new Vue/Nuxt projects, use `markstream-vue` instead.
|
|
4
9
|
|
|
5
10
|
## Install
|
|
6
11
|
|
|
@@ -14,6 +19,7 @@ pnpm add markstream-vue2
|
|
|
14
19
|
|
|
15
20
|
- Vue 2.6.14+ (Vue 2.7 recommended for better TS support)
|
|
16
21
|
- @vue/composition-api (required for Vue 2.6.x)
|
|
22
|
+
- `vue` and `vue-template-compiler` must use the same Vue 2 version
|
|
17
23
|
|
|
18
24
|
## Composition API compatibility
|
|
19
25
|
|
|
@@ -141,7 +147,8 @@ new Vue({
|
|
|
141
147
|
|
|
142
148
|
## Streaming best practices
|
|
143
149
|
|
|
144
|
-
- For
|
|
150
|
+
- For simple chat streaming, passing `content` is the fastest way to integrate.
|
|
151
|
+
- For high-frequency SSE / token streaming, long conversations, or very large code/table/math blocks, prefer parsing outside the renderer and pass `nodes` instead of reparsing the whole `content` string every chunk.
|
|
145
152
|
- Keep `viewport-priority` enabled unless you explicitly want eager rendering. Mermaid / Monaco / D2 blocks now stay idle while offscreen and resume when they approach the viewport.
|
|
146
153
|
|
|
147
154
|
```vue
|
|
@@ -319,9 +326,10 @@ module.exports = {
|
|
|
319
326
|
|
|
320
327
|
## Notes
|
|
321
328
|
|
|
322
|
-
- The Vue 2 package mirrors the Vue 3 renderer feature set where
|
|
329
|
+
- The Vue 2 package is a compatibility port for legacy Vue 2 apps and mirrors the Vue 3 renderer feature set where practical (virtualization, streaming code blocks, Monaco, Mermaid, KaTeX, tooltip singleton).
|
|
323
330
|
- Optional peers are still required for those features (`stream-monaco`, `stream-markdown`, `mermaid`, `katex`, etc.).
|
|
324
331
|
- Custom node components are supported via `setCustomComponents` from `markstream-vue2`.
|
|
332
|
+
- If you only render short static Markdown, a smaller Vue 2 Markdown component may be a simpler fit.
|
|
325
333
|
|
|
326
334
|
## TypeScript
|
|
327
335
|
|