markstream-vue 2.0.10 → 2.0.11
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/exports.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/tailwind.js +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -358,7 +358,7 @@ Choose the renderer mode by surface:
|
|
|
358
358
|
/>
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
-
Use `mode="minimal"` when you want the same lightweight defaults as `chat`, but prefer a neutral mode name for non-chat surfaces.
|
|
361
|
+
Use `mode="minimal"` when you want the same lightweight defaults as `chat`, but prefer a neutral mode name for non-chat surfaces. In Vue 3 (including Nuxt), `smooth-streaming` controls output pacing and `fade` controls opacity; they can be enabled together. `mode="chat"` keeps `fade=false` as a lightweight default. Add `fade` when gradual text reveal is desired; keep it off when animation cost matters more.
|
|
362
362
|
For the same chat message, do not switch from `mode="chat"` to `mode="docs"` only because `final` changed. Keep the mode stable and switch pacing/animation props (`smooth-streaming`, `typewriter`, `fade`) instead; `docs` changes the layout strategy.
|
|
363
363
|
For surfaces that do not need enhanced code blocks, set `:render-code-blocks-as-pre="true"`. If you want the rich `CodeBlockNode` UI and File/Diff rendering, install `stream-diffs`; otherwise the renderer intentionally falls back to `<pre>` rendering. To own ordinary fenced-code rendering, register a scoped `code_block` with `setCustomComponents`.
|
|
364
364
|
`stream-diffs` is a framework-agnostic DOM runtime. `CodeBlockNode` owns the Vue-side decision of when to replace the streaming `<pre>` with its finalized File or FileDiff surface.
|
package/README.zh-CN.md
CHANGED
|
@@ -333,7 +333,7 @@ createApp({
|
|
|
333
333
|
/>
|
|
334
334
|
```
|
|
335
335
|
|
|
336
|
-
当你想要和 `chat` 相同的轻量默认值,但当前页面不是聊天语义时,可以使用 `mode="minimal"
|
|
336
|
+
当你想要和 `chat` 相同的轻量默认值,但当前页面不是聊天语义时,可以使用 `mode="minimal"`。在 Vue 3(含 Nuxt)中,`smooth-streaming` 控制出字节奏,`fade` 控制透明度,两者可以同时开启。`mode="chat"` 保留 `fade=false` 作为轻量默认值;需要文字渐显时添加 `fade`,更看重动画成本时保持关闭。
|
|
337
337
|
同一条聊天消息不要仅因为 `final` 变为 `true` 就从 `mode="chat"` 切到 `mode="docs"`。保持 mode 稳定,只切换 `smooth-streaming`、`typewriter`、`fade` 等节奏/动画 props;`docs` 会改变布局策略。
|
|
338
338
|
如果某个渲染面不需要增强代码块,建议设置 `:render-code-blocks-as-pre="true"`;如果需要富 `CodeBlockNode` UI 与 File/Diff 渲染,请安装 `stream-diffs`,否则渲染器会按设计降级为 `<pre>` 渲染。如果应用要完全接管普通 fenced code,用 `setCustomComponents` 注册带作用域的 `code_block`。
|
|
339
339
|
`stream-diffs` 是与框架无关的 DOM runtime;由 `CodeBlockNode` 决定何时把流式 `<pre>` 切换为最终的 File 或 FileDiff surface。
|