markstream-svelte 0.0.1-beta.6 → 0.0.2
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 +18 -2
- package/package.json +43 -14
package/README.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# markstream-svelte
|
|
2
2
|
|
|
3
|
-
Svelte 5
|
|
3
|
+
Svelte 5 streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown states, long documents, custom components, Mermaid, KaTeX, Monaco, D2, and Infographic.
|
|
4
|
+
|
|
5
|
+
## When to use it
|
|
6
|
+
|
|
7
|
+
Use `markstream-svelte` when Markdown changes while users are reading it:
|
|
8
|
+
LLM output, SSE streams, WebSocket streams, AI chat messages, long generated answers,
|
|
9
|
+
progressive diagrams, math, or code blocks.
|
|
10
|
+
|
|
11
|
+
For normal chat streaming, start with the raw `content` string path. Use pre-parsed
|
|
12
|
+
`nodes` only when another part of your app already owns the parser or AST state.
|
|
13
|
+
|
|
14
|
+
## Known limitations
|
|
15
|
+
|
|
16
|
+
- **Svelte 5 only.** Svelte 4 is not supported.
|
|
17
|
+
- This package is currently beta. Check npm and the [Svelte guide](https://markstream.simonhe.me/guide/svelte) for the latest API maturity.
|
|
18
|
+
- It is not the first choice for short static Markdown or apps that require a fully stable Svelte 4-compatible API.
|
|
4
19
|
|
|
5
20
|
## Install
|
|
6
21
|
|
|
@@ -8,7 +23,8 @@ Svelte 5-only renderer aligned with `markstream-vue`, `markstream-vue2`, and `ma
|
|
|
8
23
|
pnpm add markstream-svelte svelte@^5
|
|
9
24
|
```
|
|
10
25
|
|
|
11
|
-
Optional heavy renderers stay as peer dependencies, matching the Vue and React packages
|
|
26
|
+
Optional heavy renderers stay as peer dependencies, matching the Vue and React packages.
|
|
27
|
+
Plain Markdown does not require these packages:
|
|
12
28
|
|
|
13
29
|
```bash
|
|
14
30
|
pnpm add katex mermaid stream-monaco @terrastruct/d2 @antv/infographic
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-svelte",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "Svelte Markdown renderer for
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"description": "Svelte 5 and SvelteKit streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, Mermaid, KaTeX, Monaco-powered code blocks, and custom Svelte components.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://markstream.simonhe.me/frameworks/svelte",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/Simon-He95/markstream-vue.git",
|
|
@@ -16,11 +16,40 @@
|
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"svelte",
|
|
19
|
+
"svelte5",
|
|
20
|
+
"sveltekit",
|
|
19
21
|
"markdown",
|
|
20
22
|
"markdown-renderer",
|
|
23
|
+
"svelte-markdown",
|
|
24
|
+
"svelte-markdown-renderer",
|
|
25
|
+
"svelte5-markdown",
|
|
26
|
+
"sveltekit-markdown",
|
|
27
|
+
"svelte-streaming-markdown",
|
|
28
|
+
"svelte-ai-chat",
|
|
21
29
|
"streaming-markdown",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
30
|
+
"ai-markdown-renderer",
|
|
31
|
+
"ai-chat",
|
|
32
|
+
"llm",
|
|
33
|
+
"llm-markdown",
|
|
34
|
+
"llm-streaming",
|
|
35
|
+
"sse",
|
|
36
|
+
"sse-markdown",
|
|
37
|
+
"websocket",
|
|
38
|
+
"websocket-markdown",
|
|
39
|
+
"incomplete-markdown",
|
|
40
|
+
"mermaid",
|
|
41
|
+
"streaming-mermaid",
|
|
42
|
+
"katex",
|
|
43
|
+
"streaming-katex",
|
|
44
|
+
"streaming-code-blocks",
|
|
45
|
+
"d2",
|
|
46
|
+
"infographic",
|
|
47
|
+
"monaco-editor",
|
|
48
|
+
"large-documents",
|
|
49
|
+
"custom-components",
|
|
50
|
+
"beta",
|
|
51
|
+
"markstream-svelte",
|
|
52
|
+
"markstream"
|
|
24
53
|
],
|
|
25
54
|
"sideEffects": [
|
|
26
55
|
"**/*.css"
|
|
@@ -49,7 +78,7 @@
|
|
|
49
78
|
"@terrastruct/d2": ">=0.1.33",
|
|
50
79
|
"katex": ">=0.16.22",
|
|
51
80
|
"mermaid": ">=11",
|
|
52
|
-
"stream-monaco": ">=0.0.
|
|
81
|
+
"stream-monaco": ">=0.0.48",
|
|
53
82
|
"svelte": ">=5 <6"
|
|
54
83
|
},
|
|
55
84
|
"peerDependenciesMeta": {
|
|
@@ -70,21 +99,21 @@
|
|
|
70
99
|
}
|
|
71
100
|
},
|
|
72
101
|
"dependencies": {
|
|
73
|
-
"@floating-ui/dom": "^1.
|
|
102
|
+
"@floating-ui/dom": "^1.8.0",
|
|
74
103
|
"markstream-core": "1.0.3",
|
|
75
|
-
"stream-markdown-parser": "1.
|
|
104
|
+
"stream-markdown-parser": "1.1.3"
|
|
76
105
|
},
|
|
77
106
|
"devDependencies": {
|
|
78
|
-
"@sveltejs/package": "^2.5.
|
|
107
|
+
"@sveltejs/package": "^2.5.8",
|
|
79
108
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
80
109
|
"@types/node": "^18.19.130",
|
|
81
|
-
"autoprefixer": "^10.5.
|
|
110
|
+
"autoprefixer": "^10.5.2",
|
|
82
111
|
"postcss-cli": "^11.0.1",
|
|
83
|
-
"svelte": "^5.
|
|
84
|
-
"svelte-check": "^4.
|
|
112
|
+
"svelte": "^5.56.4",
|
|
113
|
+
"svelte-check": "^4.7.2",
|
|
85
114
|
"tailwindcss": "^3.4.19",
|
|
86
115
|
"typescript": "^5.9.3",
|
|
87
|
-
"vite": "^7.3.
|
|
116
|
+
"vite": "^7.3.6"
|
|
88
117
|
},
|
|
89
118
|
"scripts": {
|
|
90
119
|
"build": "pnpm --dir ../markstream-core build && svelte-package -i src -o dist && postcss src/index.css -o dist/index.css && cp dist/index.css dist/index.tailwind.css && node ../../scripts/generate-px-css.mjs",
|
|
@@ -93,6 +122,6 @@
|
|
|
93
122
|
"typecheck": "svelte-check --tsconfig ./tsconfig.json",
|
|
94
123
|
"check:core-published": "node ../../scripts/check-core-published.mjs --package-json package.json --core-package-json ../markstream-core/package.json",
|
|
95
124
|
"check:workspace-deps-published": "node ../../scripts/check-workspace-deps-published.mjs --package-json package.json",
|
|
96
|
-
"release": "pnpm run check:workspace-deps-published && bumpp --commit --no-tag --no-push && pnpm publish --access public && node ../../scripts/tag-package.mjs --package-json package.json --push"
|
|
125
|
+
"release": "pnpm run check:workspace-deps-published && bumpp --all --commit --no-tag --no-push --execute 'pnpm --workspace-root run docs:llms:generate' && pnpm publish --access public && node ../../scripts/tag-package.mjs --package-json package.json --push"
|
|
97
126
|
}
|
|
98
127
|
}
|