@incremark/vue 0.2.3 → 0.2.4
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/Incremark.vue.d.ts +6 -0
- package/dist/components/IncremarkCode.vue.d.ts +7 -0
- package/dist/components/IncremarkContainer.vue.d.ts +18 -0
- package/dist/components/IncremarkRenderer.vue.d.ts +7 -1
- package/dist/index.js +427 -220
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -11,6 +11,10 @@ type __VLS_Props = {
|
|
|
11
11
|
blocks?: BlockWithStableId[];
|
|
12
12
|
/** 自定义组件映射,key 为节点类型 */
|
|
13
13
|
components?: ComponentMap;
|
|
14
|
+
/** 自定义容器组件映射,key 为容器名称(如 'warning', 'info') */
|
|
15
|
+
customContainers?: Record<string, Component>;
|
|
16
|
+
/** 自定义代码块组件映射,key 为代码语言名称(如 'echart', 'mermaid') */
|
|
17
|
+
customCodeBlocks?: Record<string, Component>;
|
|
14
18
|
/** 待处理块的样式类名 */
|
|
15
19
|
pendingClass?: string;
|
|
16
20
|
/** 已完成块的样式类名 */
|
|
@@ -22,6 +26,8 @@ type __VLS_Props = {
|
|
|
22
26
|
};
|
|
23
27
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
28
|
blocks: BlockWithStableId[];
|
|
29
|
+
customCodeBlocks: Record<string, Component>;
|
|
30
|
+
customContainers: Record<string, Component>;
|
|
25
31
|
components: Partial<Record<string, Component>>;
|
|
26
32
|
pendingClass: string;
|
|
27
33
|
completedClass: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Code } from 'mdast';
|
|
2
|
+
import type { Component } from 'vue';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
node: Code;
|
|
4
5
|
/** Shiki 主题,默认 github-dark */
|
|
@@ -7,10 +8,16 @@ type __VLS_Props = {
|
|
|
7
8
|
disableHighlight?: boolean;
|
|
8
9
|
/** Mermaid 渲染延迟(毫秒),用于流式输入时防抖 */
|
|
9
10
|
mermaidDelay?: number;
|
|
11
|
+
/** 自定义代码块组件映射,key 为代码语言名称 */
|
|
12
|
+
customCodeBlocks?: Record<string, Component>;
|
|
13
|
+
/** 块状态,用于判断是否使用自定义组件 */
|
|
14
|
+
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
10
15
|
};
|
|
11
16
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
17
|
theme: string;
|
|
13
18
|
disableHighlight: boolean;
|
|
14
19
|
mermaidDelay: number;
|
|
20
|
+
customCodeBlocks: Record<string, Component>;
|
|
21
|
+
blockStatus: "pending" | "stable" | "completed";
|
|
15
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
23
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RootContent } from 'mdast';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* 容器节点类型定义
|
|
5
|
+
* 根据 directive 解析后的结构
|
|
6
|
+
*/
|
|
7
|
+
export interface ContainerNode {
|
|
8
|
+
type: 'containerDirective' | 'leafDirective' | 'textDirective';
|
|
9
|
+
name: string;
|
|
10
|
+
attributes?: Record<string, string>;
|
|
11
|
+
children?: RootContent[];
|
|
12
|
+
}
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
node: ContainerNode;
|
|
15
|
+
customContainers?: Record<string, Component>;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { RootContent } from 'mdast';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { ContainerNode } from './IncremarkContainer.vue';
|
|
4
|
+
type ExtendedRootContent = RootContent | ContainerNode;
|
|
2
5
|
type __VLS_Props = {
|
|
3
|
-
node:
|
|
6
|
+
node: ExtendedRootContent;
|
|
7
|
+
customContainers?: Record<string, Component>;
|
|
8
|
+
customCodeBlocks?: Record<string, Component>;
|
|
9
|
+
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
4
10
|
};
|
|
5
11
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
12
|
export default _default;
|