@kaitify/vue 0.0.4-beta.9 → 0.0.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/lib/core/button/button.vue.d.ts +5 -4
- package/lib/core/checkbox/checkbox.vue.d.ts +2 -2
- package/lib/core/divider/divider.vue.d.ts +1 -1
- package/lib/core/popover/popover.vue.d.ts +15 -459
- package/lib/core/tabs/tabs.vue.d.ts +3 -2
- package/lib/editor/bubble/bubble.vue.d.ts +9 -457
- package/lib/editor/bubble/props.d.ts +1 -5
- package/lib/editor/menu/built-in/align-center/align-center.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/align-justify/align-justify.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/align-left/align-left.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/align-right/align-right.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/attachment/attachment.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/back-color/back-color.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/blockquote/blockquote.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/bold/bold.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/clear-format/clear-format.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/code/code.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/code-block/code-block-languages.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/code-block/code-block.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/color/color.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/decrease-indent/decrease-indent.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/emoji/emoji.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/font-family/font-family.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/font-size/font-size.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/full-screen/full-screen.vue.d.ts +2 -2
- package/lib/editor/menu/built-in/heading/heading.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/horizontal/horizontal.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/image/image.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/increase-indent/increase-indent.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/italic/italic.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/line-height/line-height.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/link/link-unset.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/link/link.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/math/math.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/ordered-list/ordered-list.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/redo/redo.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/strikethrough/strikethrough.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/subscript/subscript.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/superscript/superscript.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-add-column.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-add-row.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-delete-column.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-delete-row.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-merge-cell.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table-unset.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/table/table.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/task/task.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/underline/underline.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/undo/undo.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/unordered-list/unordered-list.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/video/video-controls.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/video/video-loop.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/video/video-muted.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/video/video.vue.d.ts +234 -1
- package/lib/editor/menu/built-in/wrap-down/wrap-down.vue.d.ts +1 -1
- package/lib/editor/menu/built-in/wrap-up/wrap-up.vue.d.ts +1 -1
- package/lib/editor/menu/menu.vue.d.ts +136 -914
- package/lib/editor/wrapper/props.d.ts +5 -141
- package/lib/editor/wrapper/wrapper.vue.d.ts +14 -21
- package/lib/kaitify-vue.es.js +2589 -2060
- package/lib/kaitify-vue.umd.js +2 -2
- package/package.json +7 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocaleType } from '../../locale';
|
|
2
|
-
import { Editor,
|
|
2
|
+
import { Editor, EditorConfigureOptionType, Selection } from '@kaitify/core';
|
|
3
3
|
/**
|
|
4
4
|
* 编辑器参数类型
|
|
5
5
|
*/
|
|
@@ -8,10 +8,6 @@ export type WrapperPropsType = {
|
|
|
8
8
|
* 编辑器的值
|
|
9
9
|
*/
|
|
10
10
|
modelValue: string;
|
|
11
|
-
/**
|
|
12
|
-
* 编辑器是否禁用
|
|
13
|
-
*/
|
|
14
|
-
disabled?: boolean;
|
|
15
11
|
/**
|
|
16
12
|
* 语言环境
|
|
17
13
|
*/
|
|
@@ -25,101 +21,9 @@ export type WrapperPropsType = {
|
|
|
25
21
|
*/
|
|
26
22
|
appendAfterTo?: string | HTMLElement;
|
|
27
23
|
/**
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
autofocus?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* 编辑器内容只有一个段落时的默认文本
|
|
33
|
-
*/
|
|
34
|
-
placeholder?: string;
|
|
35
|
-
/**
|
|
36
|
-
* 是否深色模式
|
|
37
|
-
*/
|
|
38
|
-
dark?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* 是否允许复制
|
|
41
|
-
*/
|
|
42
|
-
allowCopy?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 是否允许粘贴
|
|
45
|
-
*/
|
|
46
|
-
allowPaste?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* 是否允许剪切
|
|
49
|
-
*/
|
|
50
|
-
allowCut?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* 是否允许粘贴html
|
|
53
|
-
*/
|
|
54
|
-
allowPasteHtml?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* 剪切板同时存在文件和html/text时,是否优先粘贴文件
|
|
57
|
-
*/
|
|
58
|
-
priorityPasteFiles?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* 自定义编辑器内渲染文本节点的真实标签
|
|
61
|
-
*/
|
|
62
|
-
textRenderTag?: string;
|
|
63
|
-
/**
|
|
64
|
-
* 自定义编辑内渲染默认块级节点的真实标签,即段落标签
|
|
65
|
-
*/
|
|
66
|
-
blockRenderTag?: string;
|
|
67
|
-
/**
|
|
68
|
-
* 自定义编辑器内定义需要置空的标签
|
|
69
|
-
*/
|
|
70
|
-
emptyRenderTags?: string[];
|
|
71
|
-
/**
|
|
72
|
-
* 自定义编辑器内额外保留的标签
|
|
73
|
-
*/
|
|
74
|
-
extraKeepTags?: string[];
|
|
75
|
-
/**
|
|
76
|
-
* 自定义插件数组
|
|
77
|
-
*/
|
|
78
|
-
extensions?: Extension[];
|
|
79
|
-
/**
|
|
80
|
-
* 自定义节点数组格式化规则
|
|
81
|
-
*/
|
|
82
|
-
formatRules?: RuleFunctionType[];
|
|
83
|
-
/**
|
|
84
|
-
* 自定义dom转为非文本节点的后续处理
|
|
85
|
-
*/
|
|
86
|
-
onDomParseNode?: (this: Editor, node: KNode) => KNode;
|
|
87
|
-
/**
|
|
88
|
-
* 节点粘贴保留标记的自定义方法
|
|
89
|
-
*/
|
|
90
|
-
onPasteKeepMarks?: (this: Editor, node: KNode) => KNodeMarksType;
|
|
91
|
-
/**
|
|
92
|
-
* 节点粘贴保留样式的自定义方法
|
|
24
|
+
* 编辑器配置参数
|
|
93
25
|
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 编辑器粘贴纯文本时触发,如果返回true则表示继续使用默认逻辑,返回false则不走默认逻辑,需要进行自定义处理
|
|
97
|
-
*/
|
|
98
|
-
onPasteText?: (this: Editor, text: string) => boolean | Promise<boolean>;
|
|
99
|
-
/**
|
|
100
|
-
* 编辑器粘贴html内容时触发,如果返回true则表示继续使用默认逻辑,返回false则不走默认逻辑,需要进行自定义处理
|
|
101
|
-
*/
|
|
102
|
-
onPasteHtml?: (this: Editor, nodes: KNode[], html: string) => boolean | Promise<boolean>;
|
|
103
|
-
/**
|
|
104
|
-
* 编辑器粘贴图片时触发,如果返回true则表示继续使用默认逻辑,返回false则不走默认逻辑,需要进行自定义处理
|
|
105
|
-
*/
|
|
106
|
-
onPasteImage?: (this: Editor, file: File) => boolean | Promise<boolean>;
|
|
107
|
-
/**
|
|
108
|
-
* 编辑器粘贴视频时触发,如果返回true则表示继续使用默认逻辑,返回false则不走默认逻辑,需要进行自定义处理
|
|
109
|
-
*/
|
|
110
|
-
onPasteVideo?: (this: Editor, file: File) => boolean | Promise<boolean>;
|
|
111
|
-
/**
|
|
112
|
-
* 编辑器粘贴除了图片和视频以外的文件时触发,需要自定义处理
|
|
113
|
-
*/
|
|
114
|
-
onPasteFile?: (this: Editor, file: File) => void | Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
* 在删除和换行操作中块节点节点从其父节点中抽离出去成为与父节点同级的节点后触发,如果返回true则表示继续使用默认逻辑,会将该节点转为段落,返回false则不走默认逻辑,需要自定义处理
|
|
117
|
-
*/
|
|
118
|
-
onDetachMentBlockFromParent?: (this: Editor, node: KNode) => boolean;
|
|
119
|
-
/**
|
|
120
|
-
* 编辑器updateView执行时,通过比对新旧节点数组获取需要格式化的节点,在这些节点被格式化前,触发此方法,回调参数即当前需要被格式化的节点,该方法返回一个节点,返回的节点将会被格式化,如果你不需要任何特殊处理,返回入参提供的节点即可
|
|
121
|
-
*/
|
|
122
|
-
onBeforePatchNodeToFormat?: (this: Editor, node: KNode) => KNode;
|
|
26
|
+
options?: Omit<EditorConfigureOptionType, 'el' | 'value' | 'onChange' | 'onUpdateView'>;
|
|
123
27
|
};
|
|
124
28
|
/**
|
|
125
29
|
* 编辑器事件类型
|
|
@@ -129,51 +33,11 @@ export type WrapperEmitsType = {
|
|
|
129
33
|
* 编辑器值改变触发的事件
|
|
130
34
|
*/
|
|
131
35
|
(e: 'update:modelValue', value: string): void;
|
|
132
|
-
/**
|
|
133
|
-
* 编辑器光标发生变化触发的事件
|
|
134
|
-
*/
|
|
135
|
-
(e: 'selectionUpdate', value: Selection): void;
|
|
136
|
-
/**
|
|
137
|
-
* 编辑器进行换行时触发的事件
|
|
138
|
-
*/
|
|
139
|
-
(e: 'insertParagraph', value: KNode): void;
|
|
140
|
-
/**
|
|
141
|
-
* 编辑器执行删除操作完成的时候触发的事件
|
|
142
|
-
*/
|
|
143
|
-
(e: 'deleteComplete'): void;
|
|
144
|
-
/**
|
|
145
|
-
* 编辑器内键盘按下触发的事件
|
|
146
|
-
*/
|
|
147
|
-
(e: 'keydown', value: KeyboardEvent): void;
|
|
148
|
-
/**
|
|
149
|
-
* 编辑器内键盘松开触发的事件
|
|
150
|
-
*/
|
|
151
|
-
(e: 'keyup', value: KeyboardEvent): void;
|
|
152
|
-
/**
|
|
153
|
-
* 编辑器获取光标触发的事件
|
|
154
|
-
*/
|
|
155
|
-
(e: 'focus', value: FocusEvent): void;
|
|
156
|
-
/**
|
|
157
|
-
* 编辑器失去光标触发的事件
|
|
158
|
-
*/
|
|
159
|
-
(e: 'blur', value: FocusEvent): void;
|
|
160
|
-
/**
|
|
161
|
-
* 编辑器视图更新前触发的事件
|
|
162
|
-
*/
|
|
163
|
-
(e: 'beforeUpdateView'): void;
|
|
164
|
-
/**
|
|
165
|
-
* 编辑器视图更新后触发的事件
|
|
166
|
-
*/
|
|
167
|
-
(e: 'afterUpdateView'): void;
|
|
168
|
-
/**
|
|
169
|
-
* 编辑器创建完成后触发的事件
|
|
170
|
-
*/
|
|
171
|
-
(e: 'created', value: Editor): void;
|
|
172
36
|
};
|
|
173
37
|
/**
|
|
174
38
|
* 编辑器状态对象
|
|
175
39
|
*/
|
|
176
40
|
export type StateType = {
|
|
177
|
-
editor
|
|
178
|
-
selection
|
|
41
|
+
editor?: Editor;
|
|
42
|
+
selection?: Selection;
|
|
179
43
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
1
2
|
import { StateType, WrapperPropsType } from './props';
|
|
2
3
|
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
3
5
|
slots: {
|
|
4
6
|
before?(_: {
|
|
5
7
|
state: StateType;
|
|
@@ -17,34 +19,25 @@ declare function __VLS_template(): {
|
|
|
17
19
|
state: StateType;
|
|
18
20
|
}): any;
|
|
19
21
|
};
|
|
20
|
-
refs: {
|
|
21
|
-
|
|
22
|
+
refs: {
|
|
23
|
+
wrapper: HTMLDivElement;
|
|
24
|
+
};
|
|
25
|
+
rootEl: any;
|
|
22
26
|
};
|
|
23
27
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
28
|
declare const __VLS_component: import('vue').DefineComponent<WrapperPropsType, {
|
|
25
|
-
state:
|
|
26
|
-
|
|
27
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
-
|
|
29
|
-
} & {
|
|
30
|
-
[x: string]: any;
|
|
29
|
+
state: Ref<StateType, StateType>;
|
|
30
|
+
wrapperRef: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
32
|
+
"update:modelValue": (value: string) => any;
|
|
31
33
|
}, string, import('vue').PublicProps, Readonly<WrapperPropsType> & Readonly<{
|
|
32
|
-
|
|
34
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
33
35
|
}>, {
|
|
34
|
-
dark: boolean;
|
|
35
|
-
disabled: boolean;
|
|
36
36
|
modelValue: string;
|
|
37
37
|
locale: import('../../locale').LocaleType;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
allowPaste: boolean;
|
|
42
|
-
allowCut: boolean;
|
|
43
|
-
allowPasteHtml: boolean;
|
|
44
|
-
priorityPasteFiles: boolean;
|
|
45
|
-
textRenderTag: string;
|
|
46
|
-
blockRenderTag: string;
|
|
47
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
|
+
wrapper: HTMLDivElement;
|
|
40
|
+
}, any>;
|
|
48
41
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
49
42
|
export default _default;
|
|
50
43
|
type __VLS_WithTemplateSlots<T, S> = T & {
|