@yiitap/vue 0.4.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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/index.cjs +199 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +199 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +45043 -0
- package/dist/index.mjs.map +1 -0
- package/dist/vue.css +1 -0
- package/package.json +120 -0
- package/types/__tests__/index.spec.d.ts +1 -0
- package/types/components/YiiEditor.vue.d.ts +701 -0
- package/types/components/buttons/OAiBtn.vue.d.ts +20 -0
- package/types/components/buttons/OAlignDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OAlignGroup.vue.d.ts +11 -0
- package/types/components/buttons/OBackColorDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OEmojiBtn.vue.d.ts +10 -0
- package/types/components/buttons/OFontFamilyDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OForeColorDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OHeadingDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OLinkBtn.vue.d.ts +11 -0
- package/types/components/buttons/OLinkEditBtn.vue.d.ts +13 -0
- package/types/components/buttons/OLinkOpenBtn.vue.d.ts +10 -0
- package/types/components/buttons/OListDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OListGroup.vue.d.ts +13 -0
- package/types/components/buttons/OMoreBubble.vue.d.ts +13 -0
- package/types/components/buttons/OSimpleCommandBtn.vue.d.ts +20 -0
- package/types/components/buttons/OStyleDropdown.vue.d.ts +10 -0
- package/types/components/buttons/OTableBtn.vue.d.ts +10 -0
- package/types/components/buttons/OTableGroup.vue.d.ts +13 -0
- package/types/components/buttons/OTextColorDropdown.vue.d.ts +11 -0
- package/types/components/buttons/OTextFormatDropdown.vue.d.ts +11 -0
- package/types/components/common/OBlockList.vue.d.ts +26 -0
- package/types/components/common/OBlockListItem.vue.d.ts +16 -0
- package/types/components/common/OBlockMenu.vue.d.ts +69 -0
- package/types/components/common/OBlockPlaceholder.vue.d.ts +23 -0
- package/types/components/common/OBlockPopover.vue.d.ts +534 -0
- package/types/components/common/OBlockToolbar.vue.d.ts +593 -0
- package/types/components/common/OCalloutColorBoard.vue.d.ts +36 -0
- package/types/components/common/OCalloutColorDropdown.vue.d.ts +14 -0
- package/types/components/common/OColorBoard.vue.d.ts +36 -0
- package/types/components/common/OCommandBtn.vue.d.ts +196 -0
- package/types/components/common/OCommonBtn.vue.d.ts +214 -0
- package/types/components/common/OContextMenu.vue.d.ts +469 -0
- package/types/components/common/ODocToc.vue.d.ts +68 -0
- package/types/components/common/OEmojiSelect.vue.d.ts +26 -0
- package/types/components/common/OLanguageDropdown.vue.d.ts +18 -0
- package/types/components/common/OMediaInput.vue.d.ts +27 -0
- package/types/components/common/OMenubarBtn.vue.d.ts +179 -0
- package/types/components/common/OMetaInput.vue.d.ts +155 -0
- package/types/components/common/ONodeView.vue.d.ts +213 -0
- package/types/components/common/OTableCellBackground.vue.d.ts +10 -0
- package/types/components/common/OTableGrid.vue.d.ts +6 -0
- package/types/components/common/OTextColorBoard.vue.d.ts +36 -0
- package/types/components/common/OToast.d.ts +11 -0
- package/types/components/common/o-side-menu/AddNode.vue.d.ts +46 -0
- package/types/components/common/o-side-menu/AddNodeView.vue.d.ts +50 -0
- package/types/components/common/o-side-menu/DragNode.vue.d.ts +54 -0
- package/types/components/common/o-side-menu/DragNodeMenu.vue.d.ts +64 -0
- package/types/components/common/o-side-menu/DragNodeView.vue.d.ts +50 -0
- package/types/components/common/o-side-node/AddNode.vue.d.ts +92 -0
- package/types/components/common/o-side-node/AddNodeView.vue.d.ts +96 -0
- package/types/components/common/o-side-node/DragNode.vue.d.ts +96 -0
- package/types/components/common/o-side-node/DragNodeView.vue.d.ts +96 -0
- package/types/components/common/o-side-node/index.vue.d.ts +96 -0
- package/types/components/index.d.ts +37 -0
- package/types/components/menu.d.ts +1 -0
- package/types/components/menus/OAiMenu.vue.d.ts +27 -0
- package/types/components/menus/OBubbleMenu.vue.d.ts +39 -0
- package/types/components/menus/OFloatingMenu.vue.d.ts +39 -0
- package/types/components/menus/OMainMenu.vue.d.ts +59 -0
- package/types/components/menus/OSideMenu.vue.d.ts +23 -0
- package/types/components/menus/side-menu/index.d.ts +2 -0
- package/types/components/ui/OBtn.vue.d.ts +123 -0
- package/types/components/ui/OBtnGroup.vue.d.ts +100 -0
- package/types/components/ui/OCheckbox.vue.d.ts +27 -0
- package/types/components/ui/ODivider.vue.d.ts +14 -0
- package/types/components/ui/OIcon.vue.d.ts +50 -0
- package/types/components/ui/OInput.vue.d.ts +125 -0
- package/types/components/ui/OList.vue.d.ts +56 -0
- package/types/components/ui/OListItem.vue.d.ts +42 -0
- package/types/components/ui/OPopover.vue.d.ts +242 -0
- package/types/components/ui/OTooltip.d.ts +16 -0
- package/types/components/ui/OTooltip.vue.d.ts +119 -0
- package/types/constants/ai.d.ts +6 -0
- package/types/constants/block.d.ts +7 -0
- package/types/constants/color.d.ts +5 -0
- package/types/constants/data.d.ts +4 -0
- package/types/constants/empty-block.d.ts +21 -0
- package/types/constants/index.d.ts +4 -0
- package/types/constants/language.d.ts +1 -0
- package/types/constants/menu.d.ts +31 -0
- package/types/extensions/ai-block/index.d.ts +3 -0
- package/types/extensions/ai-block/view.vue.d.ts +92 -0
- package/types/extensions/blockquote/index.d.ts +3 -0
- package/types/extensions/blockquote/view.vue.d.ts +92 -0
- package/types/extensions/callout/index.d.ts +3 -0
- package/types/extensions/callout/view.vue.d.ts +92 -0
- package/types/extensions/char-command/emoji/suggestion.d.ts +14 -0
- package/types/extensions/char-command/emoji/view.vue.d.ts +72 -0
- package/types/extensions/char-command/slash/suggestion.d.ts +14 -0
- package/types/extensions/char-command/slash/view.vue.d.ts +192 -0
- package/types/extensions/code-block/index.d.ts +3 -0
- package/types/extensions/code-block/view.vue.d.ts +92 -0
- package/types/extensions/dynamic.d.ts +7 -0
- package/types/extensions/heading/index.d.ts +7 -0
- package/types/extensions/heading/view.vue.d.ts +92 -0
- package/types/extensions/horizontal-rule/index.d.ts +2 -0
- package/types/extensions/horizontal-rule/view.vue.d.ts +92 -0
- package/types/extensions/image/index.d.ts +3 -0
- package/types/extensions/image/view.vue.d.ts +92 -0
- package/types/extensions/index.d.ts +49 -0
- package/types/extensions/link/helpers/clickSelectHandler.d.ts +2 -0
- package/types/extensions/link/index.d.ts +3 -0
- package/types/extensions/paragraph/index.d.ts +2 -0
- package/types/extensions/paragraph/view.vue.d.ts +92 -0
- package/types/extensions/side-menu/index.d.ts +2 -0
- package/types/extensions/side-menu/side-menu-plugin.d.ts +72 -0
- package/types/extensions/side-menu/utils.d.ts +50 -0
- package/types/extensions/table-cell/index.d.ts +3 -0
- package/types/extensions/table-cell/view.vue.d.ts +92 -0
- package/types/extensions/table-header/index.d.ts +3 -0
- package/types/extensions/table-header/view.vue.d.ts +92 -0
- package/types/extensions/table-wrapper/index.d.ts +2 -0
- package/types/extensions/table-wrapper/view.vue.d.ts +92 -0
- package/types/extensions/video/index.d.ts +2 -0
- package/types/extensions/video/view.vue.d.ts +92 -0
- package/types/hooks/index.d.ts +5 -0
- package/types/hooks/useAi.d.ts +6 -0
- package/types/hooks/useI18n.d.ts +8 -0
- package/types/hooks/useNodeView.d.ts +6 -0
- package/types/hooks/useTheme.d.ts +6 -0
- package/types/hooks/useTiptap.d.ts +8 -0
- package/types/i18n/index.d.ts +4 -0
- package/types/i18n/messages/en.d.ts +232 -0
- package/types/i18n/messages/pl.d.ts +182 -0
- package/types/i18n/messages/pt-br.d.ts +182 -0
- package/types/i18n/messages/zh-hans.d.ts +230 -0
- package/types/i18n/messages/zh-hant.d.ts +183 -0
- package/types/index.d.ts +11 -0
- package/types/utils/convert.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { FocusPosition } from '@tiptap/core';
|
|
3
|
+
import { EditorContent } from '@tiptap/vue-3';
|
|
4
|
+
import OMainMenu from './menus/OMainMenu.vue';
|
|
5
|
+
import OBubbleMenu from './menus/OBubbleMenu.vue';
|
|
6
|
+
import OFloatingMenu from './menus/OFloatingMenu.vue';
|
|
7
|
+
import OSideMenu from './menus/OSideMenu.vue';
|
|
8
|
+
import type { Editor } from '@tiptap/core';
|
|
9
|
+
declare const darkModeAlt: import("vue").Ref<boolean, boolean>;
|
|
10
|
+
declare const editor: import("vue").ShallowRef<import("@tiptap/vue-3").Editor, import("@tiptap/vue-3").Editor>;
|
|
11
|
+
declare const mainMenuOptions: import("vue").ComputedRef<{
|
|
12
|
+
editor: import("@tiptap/vue-3").Editor;
|
|
13
|
+
menu: string[];
|
|
14
|
+
}>;
|
|
15
|
+
declare const bubbleMenuOptions: import("vue").ComputedRef<{
|
|
16
|
+
editor: import("@tiptap/vue-3").Editor;
|
|
17
|
+
menu: string[];
|
|
18
|
+
}>;
|
|
19
|
+
declare const floatingMenuOptions: import("vue").ComputedRef<{
|
|
20
|
+
editor: import("@tiptap/vue-3").Editor;
|
|
21
|
+
menu: string[];
|
|
22
|
+
}>;
|
|
23
|
+
declare const sideMenuOptions: import("vue").ComputedRef<{
|
|
24
|
+
editor: import("@tiptap/vue-3").Editor;
|
|
25
|
+
menu: any[];
|
|
26
|
+
}>;
|
|
27
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
28
|
+
declare var __VLS_4: {}, __VLS_6: {};
|
|
29
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
30
|
+
'toolbar-left'?: (props: typeof __VLS_4) => any;
|
|
31
|
+
} & {
|
|
32
|
+
'toolbar-right'?: (props: typeof __VLS_6) => any;
|
|
33
|
+
}>;
|
|
34
|
+
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
35
|
+
/**
|
|
36
|
+
* Initial content. This can be HTML or JSON.
|
|
37
|
+
*/
|
|
38
|
+
content: {
|
|
39
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Set first block as title.
|
|
44
|
+
*/
|
|
45
|
+
title: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Determines if users can write into the editor.
|
|
51
|
+
*/
|
|
52
|
+
editable: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Force the cursor to jump in the editor on initialization.
|
|
58
|
+
*/
|
|
59
|
+
autofocus: {
|
|
60
|
+
type: PropType<FocusPosition>;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Set the locale of the editor
|
|
65
|
+
*/
|
|
66
|
+
locale: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* By default, Yiitap is in light mode, you can set it to dark mode.
|
|
72
|
+
*/
|
|
73
|
+
darkMode: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Show main menu or not.
|
|
79
|
+
*/
|
|
80
|
+
showMainMenu: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Show bubble menu or not.
|
|
86
|
+
*/
|
|
87
|
+
showBubbleMenu: {
|
|
88
|
+
type: BooleanConstructor;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Show floating menu or not.
|
|
93
|
+
*/
|
|
94
|
+
showFloatingMenu: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Show side menu or not.
|
|
100
|
+
*/
|
|
101
|
+
showSideMenu: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Show side node or not.
|
|
107
|
+
*/
|
|
108
|
+
showSideNode: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Configure the list of extensions you want to enable.
|
|
114
|
+
*
|
|
115
|
+
* By default, Yiitap enables
|
|
116
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/extensions/index.ts" target="_blank">BuiltinExtensions</a>.
|
|
117
|
+
*/
|
|
118
|
+
extensions: {
|
|
119
|
+
type: () => string[];
|
|
120
|
+
default: () => any[];
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Configure the list of menu items you want to enable in main menu.
|
|
124
|
+
*
|
|
125
|
+
* By default, Yiitap uses
|
|
126
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultMenu</a>.
|
|
127
|
+
*/
|
|
128
|
+
mainMenu: {
|
|
129
|
+
type: () => string[];
|
|
130
|
+
default: () => any[];
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Configure the list of menu items you want to enable in table menu.
|
|
134
|
+
*
|
|
135
|
+
* By default, Yiitap uses
|
|
136
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">TableMenu</a>.
|
|
137
|
+
*/
|
|
138
|
+
tableMenu: {
|
|
139
|
+
type: () => string[];
|
|
140
|
+
default: () => any[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Configure the list of menu items you want to enable in bubble menu.
|
|
144
|
+
*
|
|
145
|
+
* By default, Yiitap uses
|
|
146
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultBubble</a>.
|
|
147
|
+
*/
|
|
148
|
+
bubbleMenu: {
|
|
149
|
+
type: () => string[];
|
|
150
|
+
default: () => any[];
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Configure the list of menu items you want to enable in floating menu.
|
|
154
|
+
*
|
|
155
|
+
* By default, Yiitap uses
|
|
156
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultFloating</a>.
|
|
157
|
+
*/
|
|
158
|
+
floatingMenu: {
|
|
159
|
+
type: () => string[];
|
|
160
|
+
default: () => any[];
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Set the page view of the editor.
|
|
164
|
+
*/
|
|
165
|
+
pageView: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: string;
|
|
168
|
+
validator: (value: string) => boolean;
|
|
169
|
+
};
|
|
170
|
+
aiOption: {
|
|
171
|
+
type: PropType<AiOption>;
|
|
172
|
+
default: () => void;
|
|
173
|
+
};
|
|
174
|
+
}>, {
|
|
175
|
+
EditorContent: typeof EditorContent;
|
|
176
|
+
OMainMenu: typeof OMainMenu;
|
|
177
|
+
OBubbleMenu: typeof OBubbleMenu;
|
|
178
|
+
OFloatingMenu: typeof OFloatingMenu;
|
|
179
|
+
OSideMenu: typeof OSideMenu;
|
|
180
|
+
darkModeAlt: typeof darkModeAlt;
|
|
181
|
+
editor: typeof editor;
|
|
182
|
+
mainMenuOptions: typeof mainMenuOptions;
|
|
183
|
+
bubbleMenuOptions: typeof bubbleMenuOptions;
|
|
184
|
+
floatingMenuOptions: typeof floatingMenuOptions;
|
|
185
|
+
sideMenuOptions: typeof sideMenuOptions;
|
|
186
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
187
|
+
update: (payload: {
|
|
188
|
+
json: Object;
|
|
189
|
+
html: string;
|
|
190
|
+
}) => any;
|
|
191
|
+
transaction: (payload: {
|
|
192
|
+
editor: Editor;
|
|
193
|
+
transaction: Object;
|
|
194
|
+
}) => any;
|
|
195
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
196
|
+
/**
|
|
197
|
+
* Initial content. This can be HTML or JSON.
|
|
198
|
+
*/
|
|
199
|
+
content: {
|
|
200
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
201
|
+
default: string;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Set first block as title.
|
|
205
|
+
*/
|
|
206
|
+
title: {
|
|
207
|
+
type: BooleanConstructor;
|
|
208
|
+
default: boolean;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Determines if users can write into the editor.
|
|
212
|
+
*/
|
|
213
|
+
editable: {
|
|
214
|
+
type: BooleanConstructor;
|
|
215
|
+
default: boolean;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Force the cursor to jump in the editor on initialization.
|
|
219
|
+
*/
|
|
220
|
+
autofocus: {
|
|
221
|
+
type: PropType<FocusPosition>;
|
|
222
|
+
default: boolean;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Set the locale of the editor
|
|
226
|
+
*/
|
|
227
|
+
locale: {
|
|
228
|
+
type: StringConstructor;
|
|
229
|
+
default: string;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* By default, Yiitap is in light mode, you can set it to dark mode.
|
|
233
|
+
*/
|
|
234
|
+
darkMode: {
|
|
235
|
+
type: BooleanConstructor;
|
|
236
|
+
default: boolean;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Show main menu or not.
|
|
240
|
+
*/
|
|
241
|
+
showMainMenu: {
|
|
242
|
+
type: BooleanConstructor;
|
|
243
|
+
default: boolean;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Show bubble menu or not.
|
|
247
|
+
*/
|
|
248
|
+
showBubbleMenu: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
default: boolean;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Show floating menu or not.
|
|
254
|
+
*/
|
|
255
|
+
showFloatingMenu: {
|
|
256
|
+
type: BooleanConstructor;
|
|
257
|
+
default: boolean;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Show side menu or not.
|
|
261
|
+
*/
|
|
262
|
+
showSideMenu: {
|
|
263
|
+
type: BooleanConstructor;
|
|
264
|
+
default: boolean;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Show side node or not.
|
|
268
|
+
*/
|
|
269
|
+
showSideNode: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Configure the list of extensions you want to enable.
|
|
275
|
+
*
|
|
276
|
+
* By default, Yiitap enables
|
|
277
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/extensions/index.ts" target="_blank">BuiltinExtensions</a>.
|
|
278
|
+
*/
|
|
279
|
+
extensions: {
|
|
280
|
+
type: () => string[];
|
|
281
|
+
default: () => any[];
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Configure the list of menu items you want to enable in main menu.
|
|
285
|
+
*
|
|
286
|
+
* By default, Yiitap uses
|
|
287
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultMenu</a>.
|
|
288
|
+
*/
|
|
289
|
+
mainMenu: {
|
|
290
|
+
type: () => string[];
|
|
291
|
+
default: () => any[];
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* Configure the list of menu items you want to enable in table menu.
|
|
295
|
+
*
|
|
296
|
+
* By default, Yiitap uses
|
|
297
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">TableMenu</a>.
|
|
298
|
+
*/
|
|
299
|
+
tableMenu: {
|
|
300
|
+
type: () => string[];
|
|
301
|
+
default: () => any[];
|
|
302
|
+
};
|
|
303
|
+
/**
|
|
304
|
+
* Configure the list of menu items you want to enable in bubble menu.
|
|
305
|
+
*
|
|
306
|
+
* By default, Yiitap uses
|
|
307
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultBubble</a>.
|
|
308
|
+
*/
|
|
309
|
+
bubbleMenu: {
|
|
310
|
+
type: () => string[];
|
|
311
|
+
default: () => any[];
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Configure the list of menu items you want to enable in floating menu.
|
|
315
|
+
*
|
|
316
|
+
* By default, Yiitap uses
|
|
317
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultFloating</a>.
|
|
318
|
+
*/
|
|
319
|
+
floatingMenu: {
|
|
320
|
+
type: () => string[];
|
|
321
|
+
default: () => any[];
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Set the page view of the editor.
|
|
325
|
+
*/
|
|
326
|
+
pageView: {
|
|
327
|
+
type: StringConstructor;
|
|
328
|
+
default: string;
|
|
329
|
+
validator: (value: string) => boolean;
|
|
330
|
+
};
|
|
331
|
+
aiOption: {
|
|
332
|
+
type: PropType<AiOption>;
|
|
333
|
+
default: () => void;
|
|
334
|
+
};
|
|
335
|
+
}>> & Readonly<{
|
|
336
|
+
onUpdate?: (payload: {
|
|
337
|
+
json: Object;
|
|
338
|
+
html: string;
|
|
339
|
+
}) => any;
|
|
340
|
+
onTransaction?: (payload: {
|
|
341
|
+
editor: Editor;
|
|
342
|
+
transaction: Object;
|
|
343
|
+
}) => any;
|
|
344
|
+
}>, {
|
|
345
|
+
title: boolean;
|
|
346
|
+
aiOption: AiOption;
|
|
347
|
+
locale: string;
|
|
348
|
+
darkMode: boolean;
|
|
349
|
+
content: string | Record<string, any>;
|
|
350
|
+
extensions: string[];
|
|
351
|
+
autofocus: FocusPosition;
|
|
352
|
+
editable: boolean;
|
|
353
|
+
bubbleMenu: string[];
|
|
354
|
+
floatingMenu: string[];
|
|
355
|
+
showMainMenu: boolean;
|
|
356
|
+
showBubbleMenu: boolean;
|
|
357
|
+
showFloatingMenu: boolean;
|
|
358
|
+
showSideMenu: boolean;
|
|
359
|
+
showSideNode: boolean;
|
|
360
|
+
mainMenu: string[];
|
|
361
|
+
tableMenu: string[];
|
|
362
|
+
pageView: string;
|
|
363
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
364
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
365
|
+
/**
|
|
366
|
+
* Initial content. This can be HTML or JSON.
|
|
367
|
+
*/
|
|
368
|
+
content: {
|
|
369
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
370
|
+
default: string;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Set first block as title.
|
|
374
|
+
*/
|
|
375
|
+
title: {
|
|
376
|
+
type: BooleanConstructor;
|
|
377
|
+
default: boolean;
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Determines if users can write into the editor.
|
|
381
|
+
*/
|
|
382
|
+
editable: {
|
|
383
|
+
type: BooleanConstructor;
|
|
384
|
+
default: boolean;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Force the cursor to jump in the editor on initialization.
|
|
388
|
+
*/
|
|
389
|
+
autofocus: {
|
|
390
|
+
type: PropType<FocusPosition>;
|
|
391
|
+
default: boolean;
|
|
392
|
+
};
|
|
393
|
+
/**
|
|
394
|
+
* Set the locale of the editor
|
|
395
|
+
*/
|
|
396
|
+
locale: {
|
|
397
|
+
type: StringConstructor;
|
|
398
|
+
default: string;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* By default, Yiitap is in light mode, you can set it to dark mode.
|
|
402
|
+
*/
|
|
403
|
+
darkMode: {
|
|
404
|
+
type: BooleanConstructor;
|
|
405
|
+
default: boolean;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Show main menu or not.
|
|
409
|
+
*/
|
|
410
|
+
showMainMenu: {
|
|
411
|
+
type: BooleanConstructor;
|
|
412
|
+
default: boolean;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Show bubble menu or not.
|
|
416
|
+
*/
|
|
417
|
+
showBubbleMenu: {
|
|
418
|
+
type: BooleanConstructor;
|
|
419
|
+
default: boolean;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* Show floating menu or not.
|
|
423
|
+
*/
|
|
424
|
+
showFloatingMenu: {
|
|
425
|
+
type: BooleanConstructor;
|
|
426
|
+
default: boolean;
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* Show side menu or not.
|
|
430
|
+
*/
|
|
431
|
+
showSideMenu: {
|
|
432
|
+
type: BooleanConstructor;
|
|
433
|
+
default: boolean;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* Show side node or not.
|
|
437
|
+
*/
|
|
438
|
+
showSideNode: {
|
|
439
|
+
type: BooleanConstructor;
|
|
440
|
+
default: boolean;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Configure the list of extensions you want to enable.
|
|
444
|
+
*
|
|
445
|
+
* By default, Yiitap enables
|
|
446
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/extensions/index.ts" target="_blank">BuiltinExtensions</a>.
|
|
447
|
+
*/
|
|
448
|
+
extensions: {
|
|
449
|
+
type: () => string[];
|
|
450
|
+
default: () => any[];
|
|
451
|
+
};
|
|
452
|
+
/**
|
|
453
|
+
* Configure the list of menu items you want to enable in main menu.
|
|
454
|
+
*
|
|
455
|
+
* By default, Yiitap uses
|
|
456
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultMenu</a>.
|
|
457
|
+
*/
|
|
458
|
+
mainMenu: {
|
|
459
|
+
type: () => string[];
|
|
460
|
+
default: () => any[];
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Configure the list of menu items you want to enable in table menu.
|
|
464
|
+
*
|
|
465
|
+
* By default, Yiitap uses
|
|
466
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">TableMenu</a>.
|
|
467
|
+
*/
|
|
468
|
+
tableMenu: {
|
|
469
|
+
type: () => string[];
|
|
470
|
+
default: () => any[];
|
|
471
|
+
};
|
|
472
|
+
/**
|
|
473
|
+
* Configure the list of menu items you want to enable in bubble menu.
|
|
474
|
+
*
|
|
475
|
+
* By default, Yiitap uses
|
|
476
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultBubble</a>.
|
|
477
|
+
*/
|
|
478
|
+
bubbleMenu: {
|
|
479
|
+
type: () => string[];
|
|
480
|
+
default: () => any[];
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Configure the list of menu items you want to enable in floating menu.
|
|
484
|
+
*
|
|
485
|
+
* By default, Yiitap uses
|
|
486
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultFloating</a>.
|
|
487
|
+
*/
|
|
488
|
+
floatingMenu: {
|
|
489
|
+
type: () => string[];
|
|
490
|
+
default: () => any[];
|
|
491
|
+
};
|
|
492
|
+
/**
|
|
493
|
+
* Set the page view of the editor.
|
|
494
|
+
*/
|
|
495
|
+
pageView: {
|
|
496
|
+
type: StringConstructor;
|
|
497
|
+
default: string;
|
|
498
|
+
validator: (value: string) => boolean;
|
|
499
|
+
};
|
|
500
|
+
aiOption: {
|
|
501
|
+
type: PropType<AiOption>;
|
|
502
|
+
default: () => void;
|
|
503
|
+
};
|
|
504
|
+
}>, {
|
|
505
|
+
/**
|
|
506
|
+
* Editor instance. More about <a href="https://tiptap.dev/docs/editor/api/editor" target="_blank">editor api</a>.
|
|
507
|
+
*/
|
|
508
|
+
editor: import("vue").ShallowRef<import("@tiptap/vue-3").Editor, import("@tiptap/vue-3").Editor>;
|
|
509
|
+
/**
|
|
510
|
+
* Whether in dark mode
|
|
511
|
+
*/
|
|
512
|
+
darkMode: import("vue").Ref<boolean, boolean>;
|
|
513
|
+
/**
|
|
514
|
+
* Current locale
|
|
515
|
+
*/
|
|
516
|
+
locale: import("vue").Ref<string, string>;
|
|
517
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
518
|
+
update: (payload: {
|
|
519
|
+
json: Object;
|
|
520
|
+
html: string;
|
|
521
|
+
}) => any;
|
|
522
|
+
transaction: (payload: {
|
|
523
|
+
editor: Editor;
|
|
524
|
+
transaction: Object;
|
|
525
|
+
}) => any;
|
|
526
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
527
|
+
/**
|
|
528
|
+
* Initial content. This can be HTML or JSON.
|
|
529
|
+
*/
|
|
530
|
+
content: {
|
|
531
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
532
|
+
default: string;
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Set first block as title.
|
|
536
|
+
*/
|
|
537
|
+
title: {
|
|
538
|
+
type: BooleanConstructor;
|
|
539
|
+
default: boolean;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Determines if users can write into the editor.
|
|
543
|
+
*/
|
|
544
|
+
editable: {
|
|
545
|
+
type: BooleanConstructor;
|
|
546
|
+
default: boolean;
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* Force the cursor to jump in the editor on initialization.
|
|
550
|
+
*/
|
|
551
|
+
autofocus: {
|
|
552
|
+
type: PropType<FocusPosition>;
|
|
553
|
+
default: boolean;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Set the locale of the editor
|
|
557
|
+
*/
|
|
558
|
+
locale: {
|
|
559
|
+
type: StringConstructor;
|
|
560
|
+
default: string;
|
|
561
|
+
};
|
|
562
|
+
/**
|
|
563
|
+
* By default, Yiitap is in light mode, you can set it to dark mode.
|
|
564
|
+
*/
|
|
565
|
+
darkMode: {
|
|
566
|
+
type: BooleanConstructor;
|
|
567
|
+
default: boolean;
|
|
568
|
+
};
|
|
569
|
+
/**
|
|
570
|
+
* Show main menu or not.
|
|
571
|
+
*/
|
|
572
|
+
showMainMenu: {
|
|
573
|
+
type: BooleanConstructor;
|
|
574
|
+
default: boolean;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* Show bubble menu or not.
|
|
578
|
+
*/
|
|
579
|
+
showBubbleMenu: {
|
|
580
|
+
type: BooleanConstructor;
|
|
581
|
+
default: boolean;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* Show floating menu or not.
|
|
585
|
+
*/
|
|
586
|
+
showFloatingMenu: {
|
|
587
|
+
type: BooleanConstructor;
|
|
588
|
+
default: boolean;
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* Show side menu or not.
|
|
592
|
+
*/
|
|
593
|
+
showSideMenu: {
|
|
594
|
+
type: BooleanConstructor;
|
|
595
|
+
default: boolean;
|
|
596
|
+
};
|
|
597
|
+
/**
|
|
598
|
+
* Show side node or not.
|
|
599
|
+
*/
|
|
600
|
+
showSideNode: {
|
|
601
|
+
type: BooleanConstructor;
|
|
602
|
+
default: boolean;
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* Configure the list of extensions you want to enable.
|
|
606
|
+
*
|
|
607
|
+
* By default, Yiitap enables
|
|
608
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/extensions/index.ts" target="_blank">BuiltinExtensions</a>.
|
|
609
|
+
*/
|
|
610
|
+
extensions: {
|
|
611
|
+
type: () => string[];
|
|
612
|
+
default: () => any[];
|
|
613
|
+
};
|
|
614
|
+
/**
|
|
615
|
+
* Configure the list of menu items you want to enable in main menu.
|
|
616
|
+
*
|
|
617
|
+
* By default, Yiitap uses
|
|
618
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultMenu</a>.
|
|
619
|
+
*/
|
|
620
|
+
mainMenu: {
|
|
621
|
+
type: () => string[];
|
|
622
|
+
default: () => any[];
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Configure the list of menu items you want to enable in table menu.
|
|
626
|
+
*
|
|
627
|
+
* By default, Yiitap uses
|
|
628
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">TableMenu</a>.
|
|
629
|
+
*/
|
|
630
|
+
tableMenu: {
|
|
631
|
+
type: () => string[];
|
|
632
|
+
default: () => any[];
|
|
633
|
+
};
|
|
634
|
+
/**
|
|
635
|
+
* Configure the list of menu items you want to enable in bubble menu.
|
|
636
|
+
*
|
|
637
|
+
* By default, Yiitap uses
|
|
638
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultBubble</a>.
|
|
639
|
+
*/
|
|
640
|
+
bubbleMenu: {
|
|
641
|
+
type: () => string[];
|
|
642
|
+
default: () => any[];
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Configure the list of menu items you want to enable in floating menu.
|
|
646
|
+
*
|
|
647
|
+
* By default, Yiitap uses
|
|
648
|
+
* <a href="https://github.com/yiitap/yiitap/blob/main/packages/vue/src/constants/menu.ts" target="_blank">DefaultFloating</a>.
|
|
649
|
+
*/
|
|
650
|
+
floatingMenu: {
|
|
651
|
+
type: () => string[];
|
|
652
|
+
default: () => any[];
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* Set the page view of the editor.
|
|
656
|
+
*/
|
|
657
|
+
pageView: {
|
|
658
|
+
type: StringConstructor;
|
|
659
|
+
default: string;
|
|
660
|
+
validator: (value: string) => boolean;
|
|
661
|
+
};
|
|
662
|
+
aiOption: {
|
|
663
|
+
type: PropType<AiOption>;
|
|
664
|
+
default: () => void;
|
|
665
|
+
};
|
|
666
|
+
}>> & Readonly<{
|
|
667
|
+
onUpdate?: (payload: {
|
|
668
|
+
json: Object;
|
|
669
|
+
html: string;
|
|
670
|
+
}) => any;
|
|
671
|
+
onTransaction?: (payload: {
|
|
672
|
+
editor: Editor;
|
|
673
|
+
transaction: Object;
|
|
674
|
+
}) => any;
|
|
675
|
+
}>, {
|
|
676
|
+
title: boolean;
|
|
677
|
+
aiOption: AiOption;
|
|
678
|
+
locale: string;
|
|
679
|
+
darkMode: boolean;
|
|
680
|
+
content: string | Record<string, any>;
|
|
681
|
+
extensions: string[];
|
|
682
|
+
autofocus: FocusPosition;
|
|
683
|
+
editable: boolean;
|
|
684
|
+
bubbleMenu: string[];
|
|
685
|
+
floatingMenu: string[];
|
|
686
|
+
showMainMenu: boolean;
|
|
687
|
+
showBubbleMenu: boolean;
|
|
688
|
+
showFloatingMenu: boolean;
|
|
689
|
+
showSideMenu: boolean;
|
|
690
|
+
showSideNode: boolean;
|
|
691
|
+
mainMenu: string[];
|
|
692
|
+
tableMenu: string[];
|
|
693
|
+
pageView: string;
|
|
694
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
695
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
696
|
+
export default _default;
|
|
697
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
698
|
+
new (): {
|
|
699
|
+
$slots: S;
|
|
700
|
+
};
|
|
701
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
name: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
editor: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
name: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
editor: {
|
|
15
|
+
type: ObjectConstructor;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
18
|
+
name: string;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|