@markdown-next/vue 1.0.0 → 1.1.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/dist/components/MarkdownRenderer.d.ts +31 -5
- package/dist/hooks/useMarkdownRender.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1847 -189
- package/dist/streamdown/createStreamdownRenderer.d.ts +2 -0
- package/dist/streamdown/parseMarkdownIntoBlocks.d.ts +1 -0
- package/dist/types.d.ts +10 -0
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseMarkdownIntoBlocks(markdown: string): string[];
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,17 @@ import type { ParserOptions } from '@markdown-next/parser';
|
|
|
3
3
|
export type MarkdownComponent = Component | FunctionalComponent | string;
|
|
4
4
|
export type MarkdownComponents = Record<string, MarkdownComponent>;
|
|
5
5
|
export type LoadingSlot = Component | FunctionalComponent | (() => VNodeChild);
|
|
6
|
+
export type MarkdownRenderMode = 'static' | 'streaming';
|
|
7
|
+
export interface MarkdownStreamdownOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Repairs incomplete markdown markers while streaming.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
parseIncompleteMarkdown?: boolean;
|
|
13
|
+
}
|
|
6
14
|
export interface MarkdownRenderOptions {
|
|
15
|
+
mode?: MarkdownRenderMode;
|
|
16
|
+
streamdown?: MarkdownStreamdownOptions;
|
|
7
17
|
components?: MarkdownComponents;
|
|
8
18
|
codeRenderer?: MarkdownComponent;
|
|
9
19
|
dynamic?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdown-next/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue renderer for markdown-next",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,12 +37,15 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"hast-util-to-jsx-runtime": "^2.3.0",
|
|
40
|
-
"
|
|
40
|
+
"marked": "^17.0.3",
|
|
41
|
+
"remend": "^1.2.0",
|
|
42
|
+
"@markdown-next/parser": "1.1.0"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@types/hast": "^3.0.4",
|
|
44
46
|
"@types/node": "^25.0.3",
|
|
45
47
|
"@vitejs/plugin-vue-jsx": "^4.2.0",
|
|
48
|
+
"playwright": "^1.58.2",
|
|
46
49
|
"vite": "^5.4.10",
|
|
47
50
|
"vitest": "^4.0.16",
|
|
48
51
|
"vue": "^3.5.0"
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
58
61
|
"lint": "eslint src --ext .ts,.tsx",
|
|
59
62
|
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
60
|
-
"test": "vitest --run --passWithNoTests"
|
|
63
|
+
"test": "vitest --run --passWithNoTests",
|
|
64
|
+
"test:e2e": "vitest run -c vitest.e2e.config.ts"
|
|
61
65
|
}
|
|
62
66
|
}
|