@incremark/vue 0.3.5 → 0.3.7
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/ThemeProvider.vue.d.ts +3 -2
- package/dist/components/AutoScrollContainer.vue.d.ts +3 -2
- package/dist/components/CachedCodeRenderer.vue.d.ts +4 -2
- package/dist/components/ConfigProvider.vue.d.ts +3 -2
- package/dist/components/Incremark.vue.d.ts +2 -1
- package/dist/components/IncremarkBlockquote.vue.d.ts +9 -1
- package/dist/components/IncremarkCode.vue.d.ts +2 -1
- package/dist/components/IncremarkCodeDefault.vue.d.ts +2 -1
- package/dist/components/IncremarkCodeMermaid.vue.d.ts +2 -1
- package/dist/components/IncremarkContainer.vue.d.ts +2 -1
- package/dist/components/IncremarkContent.vue.d.ts +2 -1
- package/dist/components/IncremarkDefault.vue.d.ts +2 -1
- package/dist/components/IncremarkFootnotes.vue.d.ts +2 -1
- package/dist/components/IncremarkHeading.vue.d.ts +2 -1
- package/dist/components/IncremarkHtmlElement.vue.d.ts +2 -1
- package/dist/components/IncremarkInline.vue.d.ts +2 -1
- package/dist/components/IncremarkList.vue.d.ts +9 -1
- package/dist/components/IncremarkMath.vue.d.ts +2 -1
- package/dist/components/IncremarkParagraph.vue.d.ts +2 -1
- package/dist/components/IncremarkRenderer.vue.d.ts +2 -1
- package/dist/components/IncremarkTable.vue.d.ts +2 -1
- package/dist/components/IncremarkThematicBreak.vue.d.ts +2 -1
- package/dist/components/SvgIcon.vue.d.ts +2 -1
- package/dist/composables/useThemeContext.d.ts +7 -0
- package/dist/index.js +129 -66
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -13,10 +13,11 @@ declare var __VLS_1: {};
|
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
default?: (props: typeof __VLS_1) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
17
|
class: string;
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
declare const
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
20
21
|
export default _default;
|
|
21
22
|
type __VLS_WithSlots<T, S> = T & {
|
|
22
23
|
new (): {
|
|
@@ -10,7 +10,7 @@ declare var __VLS_1: {};
|
|
|
10
10
|
type __VLS_Slots = {} & {
|
|
11
11
|
default?: (props: typeof __VLS_1) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
14
14
|
/** 强制滚动到底部 */
|
|
15
15
|
scrollToBottom: () => void;
|
|
16
16
|
/** 是否用户手动向上滚动了 */
|
|
@@ -22,7 +22,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
|
|
|
22
22
|
threshold: number;
|
|
23
23
|
behavior: ScrollBehavior;
|
|
24
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
-
declare const
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
26
27
|
export default _default;
|
|
27
28
|
type __VLS_WithSlots<T, S> = T & {
|
|
28
29
|
new (): {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { HighlighterGeneric, BundledLanguage, BundledTheme } from 'shiki';
|
|
1
2
|
interface Props {
|
|
2
3
|
code: string;
|
|
3
4
|
lang: string;
|
|
4
5
|
theme: string;
|
|
5
|
-
highlighter:
|
|
6
|
+
highlighter: HighlighterGeneric<BundledLanguage, BundledTheme>;
|
|
6
7
|
}
|
|
7
|
-
declare const
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
9
|
"stream-start": () => any;
|
|
9
10
|
"stream-end": () => any;
|
|
10
11
|
"stream-error": () => any;
|
|
@@ -13,4 +14,5 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
13
14
|
"onStream-end"?: (() => any) | undefined;
|
|
14
15
|
"onStream-error"?: (() => any) | undefined;
|
|
15
16
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
16
18
|
export default _default;
|
|
@@ -7,10 +7,11 @@ declare var __VLS_1: {};
|
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
8
|
default?: (props: typeof __VLS_1) => any;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
11
11
|
locale: IncremarkLocale;
|
|
12
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
-
declare const
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
14
15
|
export default _default;
|
|
15
16
|
type __VLS_WithSlots<T, S> = T & {
|
|
16
17
|
new (): {
|
|
@@ -35,7 +35,7 @@ type __VLS_Props = {
|
|
|
35
35
|
/** 可选:useIncremark 返回的对象(用于自动注入数据) */
|
|
36
36
|
incremark?: UseIncremarkReturn;
|
|
37
37
|
};
|
|
38
|
-
declare const
|
|
38
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
39
39
|
blocks: RenderableBlock[];
|
|
40
40
|
isDisplayComplete: boolean;
|
|
41
41
|
customCodeBlocks: Record<string, Component>;
|
|
@@ -46,4 +46,5 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
46
46
|
completedClass: string;
|
|
47
47
|
showBlockStatus: boolean;
|
|
48
48
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
|
+
declare const _default: typeof __VLS_export;
|
|
49
50
|
export default _default;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { Blockquote } from 'mdast';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { CodeBlockConfig } from './Incremark.vue';
|
|
2
4
|
type __VLS_Props = {
|
|
3
5
|
node: Blockquote;
|
|
6
|
+
customContainers?: Record<string, Component>;
|
|
7
|
+
customCodeBlocks?: Record<string, Component>;
|
|
8
|
+
codeBlockConfigs?: Record<string, CodeBlockConfig>;
|
|
9
|
+
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
10
|
+
components?: Partial<Record<string, Component>>;
|
|
4
11
|
};
|
|
5
|
-
declare const
|
|
12
|
+
declare const __VLS_export: 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>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
6
14
|
export default _default;
|
|
@@ -20,7 +20,7 @@ interface Props {
|
|
|
20
20
|
/** 默认代码块渲染组件(当不是 mermaid 且没有自定义组件时使用) */
|
|
21
21
|
defaultCodeComponent?: Component;
|
|
22
22
|
}
|
|
23
|
-
declare const
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
24
24
|
theme: string;
|
|
25
25
|
mermaidDelay: number;
|
|
26
26
|
fallbackTheme: string;
|
|
@@ -30,4 +30,5 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
30
30
|
codeBlockConfigs: Record<string, CodeBlockConfig>;
|
|
31
31
|
defaultCodeComponent: Component;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
33
34
|
export default _default;
|
|
@@ -10,10 +10,11 @@ interface Props {
|
|
|
10
10
|
/** block 状态 */
|
|
11
11
|
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
14
|
theme: string;
|
|
15
15
|
fallbackTheme: string;
|
|
16
16
|
disableHighlight: boolean;
|
|
17
17
|
blockStatus: "pending" | "stable" | "completed";
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
19
20
|
export default _default;
|
|
@@ -4,7 +4,8 @@ interface Props {
|
|
|
4
4
|
/** Mermaid 渲染延迟(毫秒),用于流式输入时防抖 */
|
|
5
5
|
mermaidDelay?: number;
|
|
6
6
|
}
|
|
7
|
-
declare const
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
8
8
|
mermaidDelay: number;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
10
11
|
export default _default;
|
|
@@ -14,5 +14,6 @@ type __VLS_Props = {
|
|
|
14
14
|
node: ContainerNode;
|
|
15
15
|
customContainers?: Record<string, Component>;
|
|
16
16
|
};
|
|
17
|
-
declare const
|
|
17
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
18
19
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IncremarkContentProps } from '../types';
|
|
2
|
-
declare const
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<IncremarkContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IncremarkContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
3
4
|
export default _default;
|
|
@@ -2,5 +2,6 @@ import type { RootContent } from 'mdast';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
node: RootContent;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -2,5 +2,6 @@ import type { Heading } from 'mdast';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
node: Heading;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -16,5 +16,6 @@ interface HtmlElementNode {
|
|
|
16
16
|
type __VLS_Props = {
|
|
17
17
|
node: HtmlElementNode;
|
|
18
18
|
};
|
|
19
|
-
declare const
|
|
19
|
+
declare const __VLS_export: 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>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
20
21
|
export default _default;
|
|
@@ -2,5 +2,6 @@ import type { PhrasingContent } from 'mdast';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
nodes: PhrasingContent[];
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { List } from 'mdast';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
import type { CodeBlockConfig } from './Incremark.vue';
|
|
2
4
|
type __VLS_Props = {
|
|
3
5
|
node: List;
|
|
6
|
+
customContainers?: Record<string, Component>;
|
|
7
|
+
customCodeBlocks?: Record<string, Component>;
|
|
8
|
+
codeBlockConfigs?: Record<string, CodeBlockConfig>;
|
|
9
|
+
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
10
|
+
components?: Partial<Record<string, Component>>;
|
|
4
11
|
};
|
|
5
|
-
declare const
|
|
12
|
+
declare const __VLS_export: 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>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
6
14
|
export default _default;
|
|
@@ -11,7 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
/** 渲染延迟(毫秒),用于流式输入时防抖 */
|
|
12
12
|
renderDelay?: number;
|
|
13
13
|
};
|
|
14
|
-
declare const
|
|
14
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
15
|
renderDelay: number;
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
17
18
|
export default _default;
|
|
@@ -2,5 +2,6 @@ import type { Paragraph } from 'mdast';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
node: Paragraph;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -11,5 +11,6 @@ type __VLS_Props = {
|
|
|
11
11
|
blockStatus?: 'pending' | 'stable' | 'completed';
|
|
12
12
|
components?: Partial<Record<string, Component>>;
|
|
13
13
|
};
|
|
14
|
-
declare const
|
|
14
|
+
declare const __VLS_export: 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>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
15
16
|
export default _default;
|
|
@@ -2,5 +2,6 @@ import type { Table } from 'mdast';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
node: Table;
|
|
4
4
|
};
|
|
5
|
-
declare const
|
|
5
|
+
declare const __VLS_export: 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
|
+
declare const _default: typeof __VLS_export;
|
|
6
7
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -9,5 +9,6 @@ interface Props {
|
|
|
9
9
|
/** 图标大小 class,如 incremark-icon--sm, incremark-icon--md 等 */
|
|
10
10
|
sizeClass?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
13
14
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComputedRef } from 'vue';
|
|
2
|
+
import type { DesignTokens } from '@incremark/theme';
|
|
3
|
+
export declare function provideTheme(theme: ComputedRef<'default' | 'dark' | DesignTokens | Partial<DesignTokens>>): void;
|
|
4
|
+
export declare function useThemeContext(): {
|
|
5
|
+
theme: ComputedRef<DesignTokens | Partial<DesignTokens> | "default" | "dark">;
|
|
6
|
+
isDark: ComputedRef<boolean>;
|
|
7
|
+
};
|