vue-devui 1.5.4-alpha.0 → 1.5.5
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/action-timeline/index.es.js +161 -0
- package/action-timeline/index.umd.js +1 -0
- package/action-timeline/package.json +8 -0
- package/action-timeline/style.css +1 -0
- package/carousel/index.es.js +448 -0
- package/carousel/index.umd.js +1 -0
- package/carousel/package.json +8 -0
- package/carousel/style.css +1 -0
- package/code-editor/index.es.js +1 -1
- package/code-editor/index.umd.js +1 -1
- package/code-review/index.es.js +73 -0
- package/code-review/index.umd.js +1 -0
- package/code-review/package.json +8 -0
- package/code-review/style.css +1 -0
- package/editor-md/index.es.js +9173 -0
- package/editor-md/index.umd.js +142 -0
- package/editor-md/package.json +8 -0
- package/editor-md/style.css +1 -0
- package/global.d.ts +10 -4
- package/grid/index.es.js +25 -1
- package/grid/index.umd.js +1 -1
- package/modal/index.es.js +10 -10
- package/modal/index.umd.js +1 -1
- package/nuxt/components/ActionTimeline.js +3 -0
- package/nuxt/components/Carousel.js +3 -0
- package/nuxt/components/CarouselItem.js +3 -0
- package/nuxt/components/CodeReview.js +3 -0
- package/nuxt/components/EditorMd.js +3 -0
- package/nuxt/components/EditorMdInjectionKey.js +3 -0
- package/nuxt/components/MdRender.js +3 -0
- package/nuxt/components/ModalBody.js +3 -0
- package/nuxt/components/ModalFooter.js +3 -0
- package/nuxt/components/ModalHeader.js +3 -0
- package/nuxt/components/SplitterPane.js +3 -0
- package/nuxt/components/actionTimelineProps.js +3 -0
- package/nuxt/components/codeReviewProps.js +3 -0
- package/nuxt/components/editorMdProps.js +3 -0
- package/nuxt/components/mdRenderProps.js +3 -0
- package/nuxt/components/mdToolbarItemProps.js +3 -0
- package/package.json +10 -3
- package/splitter/index.es.js +1 -1
- package/splitter/index.umd.js +7 -7
- package/style.css +1 -1
- package/types/action-timeline/index.d.ts +11 -0
- package/types/action-timeline/src/action-timeline-types.d.ts +46 -0
- package/types/action-timeline/src/action-timeline.d.ts +55 -0
- package/types/auto-complete/src/auto-complete.d.ts +1 -1
- package/types/carousel/index.d.ts +1 -2
- package/types/code-review/index.d.ts +11 -0
- package/types/code-review/src/code-review-types.d.ts +14 -0
- package/types/code-review/src/code-review.d.ts +27 -0
- package/types/code-review/src/composables/use-code-review.d.ts +4 -0
- package/types/editor-md/index.d.ts +12 -0
- package/types/editor-md/src/components/font-color.d.ts +2 -0
- package/types/editor-md/src/components/font-size.d.ts +2 -0
- package/types/editor-md/src/components/md-render.d.ts +95 -0
- package/types/editor-md/src/components/toolbar-item.d.ts +14 -0
- package/types/editor-md/src/components/toolbar.d.ts +3 -0
- package/types/editor-md/src/composables/helper.d.ts +2 -0
- package/types/editor-md/src/composables/md-render-service.d.ts +26 -0
- package/types/editor-md/src/composables/use-editor-md-render.d.ts +10 -0
- package/types/editor-md/src/composables/use-editor-md-theme.d.ts +3 -0
- package/types/editor-md/src/composables/use-editor-md-toolbar.d.ts +4 -0
- package/types/editor-md/src/composables/use-editor-md.d.ts +15 -0
- package/types/editor-md/src/editor-md-types.d.ts +172 -0
- package/types/editor-md/src/editor-md.d.ts +198 -0
- package/types/editor-md/src/icons-config.d.ts +23 -0
- package/types/editor-md/src/plugins/mermaid.d.ts +2 -0
- package/types/editor-md/src/plugins/toc.d.ts +1 -0
- package/types/editor-md/src/toolbar-config.d.ts +22 -0
- package/types/editor-md/src/utils.d.ts +2 -0
- package/types/grid/src/grid-types.d.ts +4 -0
- package/types/grid/src/row.d.ts +9 -0
- package/types/menu/src/menu.d.ts +1 -1
- package/types/modal/index.d.ts +4 -1
- package/types/nav-sprite/src/nav-sprite.d.ts +1 -1
- package/types/splitter/index.d.ts +2 -1
- package/types/upload/index.d.ts +2 -1
- package/types/vue-devui.d.ts +7 -4
- package/upload/index.es.js +1 -1
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +16173 -14198
- package/vue-devui.umd.js +135 -20
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import ActionTimeline from './src/action-timeline';
|
|
3
|
+
export * from './src/action-timeline-types';
|
|
4
|
+
export { ActionTimeline };
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
status: string;
|
|
9
|
+
install(app: App): void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface ActionItem {
|
|
3
|
+
action?: string;
|
|
4
|
+
actionContent?: string;
|
|
5
|
+
createdAt?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
status?: 'color-none' | 'color-danger' | 'color-info' | 'color-success';
|
|
8
|
+
[k: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface ActionData {
|
|
11
|
+
time?: string;
|
|
12
|
+
actions?: ActionItem[];
|
|
13
|
+
}
|
|
14
|
+
export declare type TimelineLayout = 'horizontal' | 'vertical';
|
|
15
|
+
export interface LoadMoreConfig {
|
|
16
|
+
type?: string;
|
|
17
|
+
loadMore?: boolean;
|
|
18
|
+
isToTop?: boolean;
|
|
19
|
+
loadMoreText?: string;
|
|
20
|
+
toTopText?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const actionTimelineProps: {
|
|
23
|
+
data: {
|
|
24
|
+
type: PropType<ActionData[]>;
|
|
25
|
+
};
|
|
26
|
+
layout: {
|
|
27
|
+
type: PropType<TimelineLayout>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
loadMoreConfig: {
|
|
31
|
+
type: PropType<LoadMoreConfig>;
|
|
32
|
+
};
|
|
33
|
+
showTailLine: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
showStatusBgColor: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
showStatusLineColor: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare type ActionTimelineProps = ExtractPropTypes<typeof actionTimelineProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ActionData } from './action-timeline-types';
|
|
2
|
+
import './action-timeline.scss';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
data: {
|
|
5
|
+
type: import("vue").PropType<ActionData[]>;
|
|
6
|
+
};
|
|
7
|
+
layout: {
|
|
8
|
+
type: import("vue").PropType<import("./action-timeline-types").TimelineLayout>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
loadMoreConfig: {
|
|
12
|
+
type: import("vue").PropType<import("./action-timeline-types").LoadMoreConfig>;
|
|
13
|
+
};
|
|
14
|
+
showTailLine: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
showStatusBgColor: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
showStatusLineColor: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "actionLoadMore", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
|
+
data: {
|
|
28
|
+
type: import("vue").PropType<ActionData[]>;
|
|
29
|
+
};
|
|
30
|
+
layout: {
|
|
31
|
+
type: import("vue").PropType<import("./action-timeline-types").TimelineLayout>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
loadMoreConfig: {
|
|
35
|
+
type: import("vue").PropType<import("./action-timeline-types").LoadMoreConfig>;
|
|
36
|
+
};
|
|
37
|
+
showTailLine: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
showStatusBgColor: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
showStatusLineColor: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
}>>, {
|
|
50
|
+
layout: import("./action-timeline-types").TimelineLayout;
|
|
51
|
+
showTailLine: boolean;
|
|
52
|
+
showStatusBgColor: boolean;
|
|
53
|
+
showStatusLineColor: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
export default _default;
|
|
@@ -227,6 +227,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
227
|
readonly size: import("./auto-complete-types").AutoCompleteSize;
|
|
228
228
|
readonly placeholder: string;
|
|
229
229
|
readonly disabledKey: string;
|
|
230
|
+
readonly loadMore: () => void;
|
|
230
231
|
readonly modelValue: string;
|
|
231
232
|
readonly allowEmptyValueSearch: boolean;
|
|
232
233
|
readonly appendToBody: boolean;
|
|
@@ -242,7 +243,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
242
243
|
readonly showAnimation: boolean;
|
|
243
244
|
readonly transInputFocusEmit: () => void;
|
|
244
245
|
readonly selectValue: (val: string) => string;
|
|
245
|
-
readonly loadMore: () => void;
|
|
246
246
|
readonly suffix: string;
|
|
247
247
|
readonly clearable: boolean;
|
|
248
248
|
}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
2
|
import Carousel from './src/carousel';
|
|
3
3
|
import CarouselItem from './src/item';
|
|
4
|
-
export { Carousel };
|
|
5
|
-
export { CarouselItem };
|
|
4
|
+
export { Carousel, CarouselItem };
|
|
6
5
|
declare const _default: {
|
|
7
6
|
title: string;
|
|
8
7
|
category: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import CodeReview from './src/code-review';
|
|
3
|
+
export * from './src/code-review-types';
|
|
4
|
+
export { CodeReview };
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
category: string;
|
|
8
|
+
status: string;
|
|
9
|
+
install(app: App): void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare type OutputFormat = 'line-by-line' | 'side-by-side';
|
|
3
|
+
export declare const codeReviewProps: {
|
|
4
|
+
diff: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: boolean;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
outputFormat: {
|
|
10
|
+
type: PropType<OutputFormat>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare type CodeReviewProps = ExtractPropTypes<typeof codeReviewProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import 'diff2html/bundles/css/diff2html.min.css';
|
|
2
|
+
import './code-review.scss';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
diff: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
required: boolean;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
outputFormat: {
|
|
10
|
+
type: import("vue").PropType<import("./code-review-types").OutputFormat>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
diff: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: boolean;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
outputFormat: {
|
|
20
|
+
type: import("vue").PropType<import("./code-review-types").OutputFormat>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
}>>, {
|
|
24
|
+
diff: string;
|
|
25
|
+
outputFormat: import("./code-review-types").OutputFormat;
|
|
26
|
+
}>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import EditorMd from './src/editor-md';
|
|
3
|
+
import MdRender from './src/components/md-render';
|
|
4
|
+
export * from './src/editor-md-types';
|
|
5
|
+
export { EditorMd, MdRender };
|
|
6
|
+
declare const _default: {
|
|
7
|
+
title: string;
|
|
8
|
+
category: string;
|
|
9
|
+
status: string;
|
|
10
|
+
install(app: App): void;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
content: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
disableRender: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
baseUrl: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: null;
|
|
13
|
+
};
|
|
14
|
+
breaks: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
customParse: {
|
|
19
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
22
|
+
renderParse: {
|
|
23
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
mdRules: {
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
default: () => {};
|
|
29
|
+
};
|
|
30
|
+
customRendererRules: {
|
|
31
|
+
type: import("vue").PropType<import("../editor-md-types").ICustomRenderRule[]>;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
customXssRules: {
|
|
35
|
+
type: import("vue").PropType<import("../editor-md-types").ICustomXssRule[]>;
|
|
36
|
+
default: () => never[];
|
|
37
|
+
};
|
|
38
|
+
mdPlugins: {
|
|
39
|
+
type: import("vue").PropType<import("../editor-md-types").MdPlugin[]>;
|
|
40
|
+
default: () => never[];
|
|
41
|
+
};
|
|
42
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "mdCheckedEvent" | "mdRenderChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
content: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
disableRender: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
baseUrl: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: null;
|
|
54
|
+
};
|
|
55
|
+
breaks: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
customParse: {
|
|
60
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
61
|
+
default: null;
|
|
62
|
+
};
|
|
63
|
+
renderParse: {
|
|
64
|
+
type: import("vue").PropType<(html: string) => string>;
|
|
65
|
+
default: null;
|
|
66
|
+
};
|
|
67
|
+
mdRules: {
|
|
68
|
+
type: ObjectConstructor;
|
|
69
|
+
default: () => {};
|
|
70
|
+
};
|
|
71
|
+
customRendererRules: {
|
|
72
|
+
type: import("vue").PropType<import("../editor-md-types").ICustomRenderRule[]>;
|
|
73
|
+
default: () => never[];
|
|
74
|
+
};
|
|
75
|
+
customXssRules: {
|
|
76
|
+
type: import("vue").PropType<import("../editor-md-types").ICustomXssRule[]>;
|
|
77
|
+
default: () => never[];
|
|
78
|
+
};
|
|
79
|
+
mdPlugins: {
|
|
80
|
+
type: import("vue").PropType<import("../editor-md-types").MdPlugin[]>;
|
|
81
|
+
default: () => never[];
|
|
82
|
+
};
|
|
83
|
+
}>>, {
|
|
84
|
+
content: string;
|
|
85
|
+
baseUrl: string;
|
|
86
|
+
breaks: boolean;
|
|
87
|
+
customParse: (html: string) => string;
|
|
88
|
+
renderParse: (html: string) => string;
|
|
89
|
+
mdRules: Record<string, any>;
|
|
90
|
+
customRendererRules: import("../editor-md-types").ICustomRenderRule[];
|
|
91
|
+
customXssRules: import("../editor-md-types").ICustomXssRule[];
|
|
92
|
+
mdPlugins: import("../editor-md-types").MdPlugin[];
|
|
93
|
+
disableRender: boolean;
|
|
94
|
+
}>;
|
|
95
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
config: {
|
|
3
|
+
type: import("vue").PropType<import("../toolbar-config").IToolbarItemConfig>;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
config: {
|
|
8
|
+
type: import("vue").PropType<import("../toolbar-config").IToolbarItemConfig>;
|
|
9
|
+
default: () => {};
|
|
10
|
+
};
|
|
11
|
+
}>>, {
|
|
12
|
+
config: import("../toolbar-config").IToolbarItemConfig;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './toolbar.scss';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IWhiteList } from 'xss';
|
|
2
|
+
import type { MdPlugin, ICustomXssRule, ICustomRenderRule } from '../editor-md-types';
|
|
3
|
+
export declare class MDRenderService {
|
|
4
|
+
private xssWhiteList;
|
|
5
|
+
private cssWhiteList;
|
|
6
|
+
private mdt;
|
|
7
|
+
private baseUrl;
|
|
8
|
+
private breaks;
|
|
9
|
+
private renderParse;
|
|
10
|
+
constructor();
|
|
11
|
+
private setDefaultXss;
|
|
12
|
+
setBaseUrl(url: string): void;
|
|
13
|
+
setBreaks(breaks: boolean): void;
|
|
14
|
+
setRenderParse(func: Function): void;
|
|
15
|
+
getXssWhiteList(): IWhiteList;
|
|
16
|
+
setXssWhiteList(list: IWhiteList): void;
|
|
17
|
+
setCustomXssRules(rules: ICustomXssRule[]): void;
|
|
18
|
+
setCustomRendererRules(rules: ICustomRenderRule[]): void;
|
|
19
|
+
setOptions(options?: {}): void;
|
|
20
|
+
setPlugins(plugins: Array<MdPlugin>): void;
|
|
21
|
+
private onIgnoreTagAttr;
|
|
22
|
+
private replaceInternalUrl;
|
|
23
|
+
private handleHeaderId;
|
|
24
|
+
generateHTML(text: string): string;
|
|
25
|
+
setRules(mdRules: Record<string, any>): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SetupContext } from 'vue';
|
|
2
|
+
import { MdRenderProps } from '../editor-md-types';
|
|
3
|
+
import { MDRenderService } from './md-render-service';
|
|
4
|
+
export declare function useEditorMdRender(props: MdRenderProps, ctx: SetupContext): {
|
|
5
|
+
previewRef: import("vue").Ref<any>;
|
|
6
|
+
renderService: MDRenderService;
|
|
7
|
+
onPreviewClick: (e: any) => void;
|
|
8
|
+
setContainerContent: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function useMdRenderWatcher(props: MdRenderProps, renderService: MDRenderService, setContainerContent: () => void): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref, SetupContext } from 'vue';
|
|
2
|
+
import { EditorMdProps } from '../editor-md-types';
|
|
3
|
+
export declare function useEditorMd(props: EditorMdProps, ctx: SetupContext): {
|
|
4
|
+
editorRef: Ref<any>;
|
|
5
|
+
renderRef: Ref<any>;
|
|
6
|
+
toolbars: Record<string, import("../toolbar-config").IToolbarItemConfig>;
|
|
7
|
+
previewHtmlList: Ref<any[]>;
|
|
8
|
+
getEditorIns: () => any;
|
|
9
|
+
onPaste: (e: ClipboardEvent) => void;
|
|
10
|
+
previewContentChange: (html: string) => void;
|
|
11
|
+
onChecked: (e: string) => void;
|
|
12
|
+
onPreviewScroll: () => void;
|
|
13
|
+
onPreviewMouseout: () => void;
|
|
14
|
+
onPreviewMouseover: () => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { PropType, ExtractPropTypes, InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { IToolbarItemConfig } from './toolbar-config';
|
|
3
|
+
export interface MDThemeToolbarConfig {
|
|
4
|
+
icons: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface MDThemeConfig {
|
|
9
|
+
toolbar: MDThemeToolbarConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface MdPlugin {
|
|
12
|
+
plugin: any;
|
|
13
|
+
opts?: Object;
|
|
14
|
+
}
|
|
15
|
+
export interface ICustomXssRule {
|
|
16
|
+
key: string;
|
|
17
|
+
value: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface ICustomRenderRule {
|
|
20
|
+
key: string;
|
|
21
|
+
value: Function;
|
|
22
|
+
}
|
|
23
|
+
export declare type Mode = 'editonly' | 'readonly' | 'normal';
|
|
24
|
+
export declare type ToolbarConfigProp = Array<string | string[]>;
|
|
25
|
+
export declare const editorMdProps: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
options: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
default: () => {};
|
|
33
|
+
};
|
|
34
|
+
mode: {
|
|
35
|
+
type: PropType<Mode>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
customThemeConfig: {
|
|
39
|
+
type: PropType<MDThemeConfig>;
|
|
40
|
+
};
|
|
41
|
+
customToolbars: {
|
|
42
|
+
type: PropType<Record<string, IToolbarItemConfig>>;
|
|
43
|
+
};
|
|
44
|
+
disableChangeEvent: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
editorContainerHeight: {
|
|
49
|
+
type: NumberConstructor;
|
|
50
|
+
};
|
|
51
|
+
imageUploadToServer: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
hidePreviewView: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
maxlength: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
default: null;
|
|
62
|
+
};
|
|
63
|
+
placeholder: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
toolbarConfig: {
|
|
68
|
+
type: PropType<ToolbarConfigProp>;
|
|
69
|
+
default: () => (string | string[])[];
|
|
70
|
+
};
|
|
71
|
+
fullscreenZIndex: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
hintConfig: {
|
|
76
|
+
type: PropType<Record<string, any>>;
|
|
77
|
+
};
|
|
78
|
+
customHintReplaceFn: {
|
|
79
|
+
type: PropType<(prefix: string, row: any) => string>;
|
|
80
|
+
};
|
|
81
|
+
baseUrl: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: null;
|
|
84
|
+
};
|
|
85
|
+
breaks: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
customParse: {
|
|
90
|
+
type: PropType<(html: string) => string>;
|
|
91
|
+
default: null;
|
|
92
|
+
};
|
|
93
|
+
renderParse: {
|
|
94
|
+
type: PropType<(html: string) => string>;
|
|
95
|
+
default: null;
|
|
96
|
+
};
|
|
97
|
+
mdRules: {
|
|
98
|
+
type: ObjectConstructor;
|
|
99
|
+
default: () => {};
|
|
100
|
+
};
|
|
101
|
+
customRendererRules: {
|
|
102
|
+
type: PropType<ICustomRenderRule[]>;
|
|
103
|
+
default: () => never[];
|
|
104
|
+
};
|
|
105
|
+
customXssRules: {
|
|
106
|
+
type: PropType<ICustomXssRule[]>;
|
|
107
|
+
default: () => never[];
|
|
108
|
+
};
|
|
109
|
+
mdPlugins: {
|
|
110
|
+
type: PropType<MdPlugin[]>;
|
|
111
|
+
default: () => never[];
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export declare type EditorMdProps = ExtractPropTypes<typeof editorMdProps>;
|
|
115
|
+
export interface IEditorMdInjection {
|
|
116
|
+
showFullscreen: Ref<boolean>;
|
|
117
|
+
toolbars: Record<string, IToolbarItemConfig>;
|
|
118
|
+
toolbarConfig: Ref<ToolbarConfigProp>;
|
|
119
|
+
getEditorIns: () => any;
|
|
120
|
+
t: (name: string) => string;
|
|
121
|
+
}
|
|
122
|
+
export declare const EditorMdInjectionKey: InjectionKey<IEditorMdInjection>;
|
|
123
|
+
export declare const mdRenderProps: {
|
|
124
|
+
content: {
|
|
125
|
+
type: StringConstructor;
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
disableRender: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
132
|
+
baseUrl: {
|
|
133
|
+
type: StringConstructor;
|
|
134
|
+
default: null;
|
|
135
|
+
};
|
|
136
|
+
breaks: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: boolean;
|
|
139
|
+
};
|
|
140
|
+
customParse: {
|
|
141
|
+
type: PropType<(html: string) => string>;
|
|
142
|
+
default: null;
|
|
143
|
+
};
|
|
144
|
+
renderParse: {
|
|
145
|
+
type: PropType<(html: string) => string>;
|
|
146
|
+
default: null;
|
|
147
|
+
};
|
|
148
|
+
mdRules: {
|
|
149
|
+
type: ObjectConstructor;
|
|
150
|
+
default: () => {};
|
|
151
|
+
};
|
|
152
|
+
customRendererRules: {
|
|
153
|
+
type: PropType<ICustomRenderRule[]>;
|
|
154
|
+
default: () => never[];
|
|
155
|
+
};
|
|
156
|
+
customXssRules: {
|
|
157
|
+
type: PropType<ICustomXssRule[]>;
|
|
158
|
+
default: () => never[];
|
|
159
|
+
};
|
|
160
|
+
mdPlugins: {
|
|
161
|
+
type: PropType<MdPlugin[]>;
|
|
162
|
+
default: () => never[];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
export declare type MdRenderProps = ExtractPropTypes<typeof mdRenderProps>;
|
|
166
|
+
export declare const mdToolbarItemProps: {
|
|
167
|
+
config: {
|
|
168
|
+
type: PropType<IToolbarItemConfig>;
|
|
169
|
+
default: () => {};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export declare type MdToolbarItemProps = ExtractPropTypes<typeof mdToolbarItemProps>;
|