markstream-vue 0.0.14-beta.7 → 0.0.14-beta.8
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/.agents/skills/markstream-install/SKILL.md +1 -1
- package/.agents/skills/markstream-install/references/scenarios.md +1 -1
- package/.agents/skills/markstream-vue/SKILL.md +1 -1
- 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.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index4.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +2 -2
|
@@ -21,7 +21,7 @@ Read [references/scenarios.md](references/scenarios.md) before making dependency
|
|
|
21
21
|
- For Vue 3 Monaco preloading, use `preloadCodeBlockRuntime` from `markstream-vue` so the renderer runtime knows Monaco is warm. Existing `getUseMonaco()` calls are still compatible.
|
|
22
22
|
3. Fix CSS order.
|
|
23
23
|
- Put reset styles before Markstream styles.
|
|
24
|
-
- In Tailwind or UnoCSS projects,
|
|
24
|
+
- In Tailwind or UnoCSS projects, use `@import 'markstream-*/index.css' layer(components);`.
|
|
25
25
|
- Import `katex/dist/katex.min.css` when math is enabled.
|
|
26
26
|
4. Add the smallest working render example.
|
|
27
27
|
- Use `content` for static or low-frequency rendering.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
- reset first
|
|
26
26
|
- Markstream CSS after reset
|
|
27
|
-
- in Tailwind or UnoCSS projects,
|
|
27
|
+
- in Tailwind or UnoCSS projects, use `@import '...' layer(components)`
|
|
28
28
|
- import KaTeX CSS when math is used
|
|
29
29
|
- when standalone node components are rendered directly, wrap them with the package root class such as `.markstream-vue`, `.markstream-react`, or `.markstream-svelte`
|
|
30
30
|
|
|
@@ -12,7 +12,7 @@ Use this skill when the host app is plain Vue 3, typically Vite-based, and not N
|
|
|
12
12
|
1. Confirm the repo is Vue 3 and not Nuxt.
|
|
13
13
|
2. Install `markstream-vue` plus only the optional peers required by the requested features.
|
|
14
14
|
3. Import `markstream-vue/index.css` after resets.
|
|
15
|
-
- In Tailwind or UnoCSS projects,
|
|
15
|
+
- In Tailwind or UnoCSS projects, use `@import 'markstream-vue/index.css' layer(components);`.
|
|
16
16
|
4. Start with `<MarkdownRender :content="markdown" />`.
|
|
17
17
|
- For AI chat or streaming UIs, use `typewriter` or `:max-live-nodes="0"` — smooth streaming is auto-enabled (`smooth-streaming="auto"`, the default) and paces visible output so bursty chunks appear steadily.
|
|
18
18
|
- `typewriter` only controls the blinking cursor and defaults to `false`.
|
package/README.md
CHANGED
|
@@ -151,7 +151,7 @@ createApp({
|
|
|
151
151
|
}).mount('#app')
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
Import `markstream-vue/index.css` after your reset (e.g.,
|
|
154
|
+
Import `markstream-vue/index.css` after your reset (e.g., use `@import 'markstream-vue/index.css' layer(components);` for Tailwind) so renderer styles win over utility classes. Install optional peers such as `stream-monaco`, `shiki`, `stream-markdown`, `mermaid`, and `katex` only when you need Monaco code blocks, Shiki highlighting, diagrams, or math.
|
|
155
155
|
If your app intentionally scales root font size on mobile, use `markstream-vue/index.px.css` to avoid `rem`-based global scaling side effects.
|
|
156
156
|
|
|
157
157
|
Renderer CSS is scoped under an internal `.markstream-vue` container to minimize global style conflicts. If you render exported node components outside of `MarkdownRender`, wrap them in an element with class `markstream-vue`.
|
package/README.zh-CN.md
CHANGED
|
@@ -152,7 +152,7 @@ createApp({
|
|
|
152
152
|
}).mount('#app')
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
确保在 CSS reset(如 `@tailwind base` 或 `@unocss/reset`)之后导入 `markstream-vue/index.css
|
|
155
|
+
确保在 CSS reset(如 `@tailwind base` 或 `@unocss/reset`)之后导入 `markstream-vue/index.css`,推荐使用 `@import 'markstream-vue/index.css' layer(components);` 以避免 Tailwind/UnoCSS 覆盖组件样式。根据需求再按需安装可选 peer 依赖:`stream-monaco`(Monaco 代码块)、`shiki` + `stream-markdown`(Shiki 高亮)、`mermaid`(Mermaid 图表)、`katex`(数学公式)。
|
|
156
156
|
如果你的移动端会主动调大根字号(`html`/`body`),建议改用 `markstream-vue/index.px.css`,避免 `rem` 跟随根字号导致整体放大。
|
|
157
157
|
|
|
158
158
|
渲染器的 CSS 会作用于内部 `.markstream-vue` 容器下,以尽量降低对全局的影响;如果你脱离 `MarkdownRender` 单独使用导出的节点组件,请在外层包一层带 `markstream-vue` 类名的容器。
|