@yiitap/vue 0.5.0 → 0.7.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/dist/index.cjs +188 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +188 -104
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54829 -25494
- package/dist/index.mjs.map +1 -1
- package/dist/vue.css +1 -1
- package/package.json +48 -43
- package/types/components/YiiEditor.vue.d.ts +29 -23
- package/types/components/buttons/ODetailsBtn.vue.d.ts +12 -0
- package/types/components/buttons/OHighlightDropdown.vue.d.ts +10 -0
- package/types/components/common/OBlockMenu.vue.d.ts +67 -21
- package/types/components/common/OColorBoard.vue.d.ts +9 -0
- package/types/components/common/OCommandBtn.vue.d.ts +2 -2
- package/types/components/common/OCommonBtn.vue.d.ts +2 -2
- package/types/components/common/OMenubarBtn.vue.d.ts +2 -2
- package/types/components/common/OMetaInput.vue.d.ts +2 -2
- package/types/components/common/o-side-menu/AddNode.vue.d.ts +69 -13
- package/types/components/common/o-side-menu/AddNodeView.vue.d.ts +58 -12
- package/types/components/common/o-side-menu/DragNode.vue.d.ts +58 -14
- package/types/components/common/o-side-menu/DragNodeView.vue.d.ts +58 -12
- package/types/components/menus/OSideMenu.vue.d.ts +9 -0
- package/types/components/ui/OBtn.vue.d.ts +2 -2
- package/types/components/ui/OBtnGroup.vue.d.ts +2 -2
- package/types/components/ui/OIcon.vue.d.ts +1 -1
- package/types/components/ui/OInput.vue.d.ts +7 -7
- package/types/constants/empty-block.d.ts +13 -0
- package/types/extensions/blockquote/index.d.ts +4 -1
- package/types/extensions/char-command/colon/suggestion.d.ts +14 -0
- package/types/extensions/char-command/colon/view.vue.d.ts +72 -0
- package/types/extensions/char-command/emoji/suggestion.d.ts +7 -8
- package/types/extensions/char-command/emoji/view.vue.d.ts +12 -46
- package/types/extensions/char-command/slash/view.vue.d.ts +1 -1
- package/types/extensions/details/index.d.ts +6 -0
- package/types/extensions/details/view.vue.d.ts +92 -0
- package/types/extensions/dynamic.d.ts +1 -0
- package/types/extensions/index.d.ts +11 -8
- package/types/i18n/messages/en.d.ts +3 -0
- package/types/i18n/messages/zh-hans.d.ts +3 -0
- package/types/i18n/messages/zh-hant.d.ts +9 -0
- package/types/utils/convert.d.ts +13 -1
- /package/types/components/buttons/{OBackColorDropdown.vue.d.ts → OBackgroundColorDropdown.vue.d.ts} +0 -0
- /package/types/components/buttons/{OForeColorDropdown.vue.d.ts → OColorDropdown.vue.d.ts} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/core';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
2
|
items: {
|
|
4
|
-
type:
|
|
3
|
+
type: ArrayConstructor;
|
|
5
4
|
required: true;
|
|
6
5
|
};
|
|
7
6
|
command: {
|
|
@@ -10,26 +9,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
10
9
|
};
|
|
11
10
|
editor: {
|
|
12
11
|
type: ObjectConstructor;
|
|
12
|
+
required: true;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
}>, {
|
|
18
|
-
locale: {
|
|
19
|
-
value: string;
|
|
20
|
-
};
|
|
21
|
-
tr: (key: string) => any;
|
|
22
|
-
run: (editor: Editor, command: string, options?: Indexable) => void;
|
|
23
|
-
}, {
|
|
24
|
-
view: string;
|
|
14
|
+
}>, {}, {
|
|
15
|
+
selectedIndex: number;
|
|
25
16
|
}, {}, {
|
|
26
|
-
onSelect(options: Indexable): void;
|
|
27
17
|
onKeyDown({ event }: {
|
|
28
18
|
event: any;
|
|
29
|
-
}):
|
|
19
|
+
}): boolean;
|
|
20
|
+
upHandler(): void;
|
|
21
|
+
downHandler(): void;
|
|
22
|
+
enterHandler(): void;
|
|
23
|
+
selectItem(index: any): void;
|
|
30
24
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
25
|
items: {
|
|
32
|
-
type:
|
|
26
|
+
type: ArrayConstructor;
|
|
33
27
|
required: true;
|
|
34
28
|
};
|
|
35
29
|
command: {
|
|
@@ -38,35 +32,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
38
32
|
};
|
|
39
33
|
editor: {
|
|
40
34
|
type: ObjectConstructor;
|
|
35
|
+
required: true;
|
|
41
36
|
};
|
|
42
|
-
|
|
43
|
-
type: ObjectConstructor;
|
|
44
|
-
};
|
|
45
|
-
}>> & Readonly<{}>, {}, {}, {
|
|
46
|
-
OEmojiSelect: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
47
|
-
items: {
|
|
48
|
-
type: () => Indexable[];
|
|
49
|
-
required: true;
|
|
50
|
-
};
|
|
51
|
-
enableSearch: {
|
|
52
|
-
type: BooleanConstructor;
|
|
53
|
-
default: boolean;
|
|
54
|
-
};
|
|
55
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
-
select: (...args: any[]) => void;
|
|
57
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
-
items: {
|
|
59
|
-
type: () => Indexable[];
|
|
60
|
-
required: true;
|
|
61
|
-
};
|
|
62
|
-
enableSearch: {
|
|
63
|
-
type: BooleanConstructor;
|
|
64
|
-
default: boolean;
|
|
65
|
-
};
|
|
66
|
-
}>> & Readonly<{
|
|
67
|
-
onSelect?: (...args: any[]) => any;
|
|
68
|
-
}>, {
|
|
69
|
-
enableSearch: boolean;
|
|
70
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
71
|
-
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
72
38
|
export default _default;
|
|
@@ -91,8 +91,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
91
91
|
default: boolean;
|
|
92
92
|
};
|
|
93
93
|
}>> & Readonly<{}>, {
|
|
94
|
-
name: string;
|
|
95
94
|
small: boolean;
|
|
95
|
+
name: string;
|
|
96
96
|
color: string;
|
|
97
97
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
98
|
OList: {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
editor: {
|
|
3
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
node: {
|
|
7
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["node"]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
decorations: {
|
|
11
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
selected: {
|
|
15
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["selected"]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
extension: {
|
|
19
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["extension"]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
getPos: {
|
|
23
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
updateAttributes: {
|
|
27
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
deleteNode: {
|
|
31
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
view: {
|
|
35
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["view"]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
innerDecorations: {
|
|
39
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
HTMLAttributes: {
|
|
43
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
editor: {
|
|
48
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
node: {
|
|
52
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["node"]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
decorations: {
|
|
56
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
selected: {
|
|
60
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["selected"]>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
extension: {
|
|
64
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["extension"]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
getPos: {
|
|
68
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
|
|
69
|
+
required: true;
|
|
70
|
+
};
|
|
71
|
+
updateAttributes: {
|
|
72
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
deleteNode: {
|
|
76
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
|
|
77
|
+
required: true;
|
|
78
|
+
};
|
|
79
|
+
view: {
|
|
80
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["view"]>;
|
|
81
|
+
required: true;
|
|
82
|
+
};
|
|
83
|
+
innerDecorations: {
|
|
84
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
HTMLAttributes: {
|
|
88
|
+
type: import("vue").PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
|
|
89
|
+
required: true;
|
|
90
|
+
};
|
|
91
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
export default _default;
|
|
@@ -3,5 +3,6 @@ declare class DynamicClass {
|
|
|
3
3
|
}
|
|
4
4
|
export default DynamicClass;
|
|
5
5
|
export declare const getDynamicExtension: (name: string) => DynamicClass;
|
|
6
|
+
export declare const DetailsExtensions: import("@tiptap/core").Node<import("@tiptap/extension-details").DetailsContentOptions, any>[];
|
|
6
7
|
export declare const TableExtensions: import("@tiptap/core").Node<any, any>[];
|
|
7
8
|
export declare const DefaultTableExtensions: import("@tiptap/core").Node<import("@tiptap/extension-table").TableCellOptions, any>[];
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { Focus } from '@tiptap/extensions';
|
|
2
|
+
import { Details, DetailsContent, DetailsSummary } from '@tiptap/extension-details';
|
|
3
|
+
import { TaskItem, TaskList } from '@tiptap/extension-list';
|
|
2
4
|
import { Table, TableRow, TableCell, TableHeader } from '@tiptap/extension-table';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import { BackgroundColor, Color, FontFamily, TextStyle } from '@tiptap/extension-text-style';
|
|
6
|
+
import { Markdown } from '@tiptap/markdown';
|
|
7
|
+
import Highlight from '@tiptap/extension-highlight';
|
|
8
|
+
import Emoji from '@tiptap/extension-emoji';
|
|
7
9
|
import Image from '@tiptap/extension-image';
|
|
8
10
|
import Link from '@tiptap/extension-link';
|
|
9
11
|
import Mention from '@tiptap/extension-mention';
|
|
10
|
-
import
|
|
12
|
+
import Subscript from '@tiptap/extension-subscript';
|
|
13
|
+
import Superscript from '@tiptap/extension-superscript';
|
|
11
14
|
import TextAlign from '@tiptap/extension-text-align';
|
|
12
15
|
import Typography from '@tiptap/extension-typography';
|
|
13
16
|
import Underline from '@tiptap/extension-underline';
|
|
14
|
-
import Text from '@tiptap/extension-text';
|
|
15
17
|
import OColorHighlighter from '@yiitap/extension-color-highlighter';
|
|
16
18
|
import OFocus from '@yiitap/extension-focus';
|
|
17
19
|
import OPlaceholder from '@yiitap/extension-placeholder';
|
|
18
20
|
import OSelectionDecoration from '@yiitap/extension-selection-decoration';
|
|
21
|
+
import OShortcut from '@yiitap/extension-shortcut';
|
|
19
22
|
import OTable from '@yiitap/extension-table';
|
|
20
23
|
import OTrailingNode from '@yiitap/extension-trailing-node';
|
|
21
24
|
import OUniqueID from '@yiitap/extension-unique-id';
|
|
@@ -25,6 +28,7 @@ import OAiBlock from './ai-block';
|
|
|
25
28
|
import OBlockquote from './blockquote';
|
|
26
29
|
import OCallout from './callout';
|
|
27
30
|
import OCodeBlock from './code-block';
|
|
31
|
+
import ODetails from './details';
|
|
28
32
|
import OHeading from './heading';
|
|
29
33
|
import OHorizontalRule from './horizontal-rule';
|
|
30
34
|
import OImage from './image';
|
|
@@ -41,5 +45,4 @@ export declare const DefaultExtensionNames: string[];
|
|
|
41
45
|
export declare const TiptapExtensionNames: string[];
|
|
42
46
|
export declare const YiitapExtensionNames: string[];
|
|
43
47
|
export declare const BuiltinExtensionNames: string[];
|
|
44
|
-
export
|
|
45
|
-
export { Document, BackColor, Focus, FontFamily, ForeColor, Image, Link, Mention, TaskItem, TaskList, TextAlign, Typography, Underline, Table, TableHeader, TableCell, TableRow, Text, OAiBlock, OBlockquote, OCallout, OCharCommand, OCodeBlock, OColonCommand, OColorHighlighter, OFocus, OSelectionDecoration, OSlashCommand, OSlashZhCommand, OHeading, OHorizontalRule, OImage, OLink, OParagraph, OPlaceholder, OTable, OTableCell, OTableHeader, OTableWrapper, OTrailingNode, OUniqueID, OVideo, };
|
|
48
|
+
export { BackgroundColor, Color, Details, DetailsContent, DetailsSummary, Emoji, Focus, FontFamily, Highlight, Image, Link, Markdown, Mention, Subscript, Superscript, Table, TableHeader, TableCell, TableRow, TaskItem, TaskList, TextAlign, TextStyle, Typography, Underline, OAiBlock, OBlockquote, OCallout, OCharCommand, OCodeBlock, OColonCommand, OColorHighlighter, ODetails, OFocus, OSelectionDecoration, OShortcut, OSlashCommand, OSlashZhCommand, OHeading, OHorizontalRule, OImage, OLink, OParagraph, OPlaceholder, OTable, OTableCell, OTableHeader, OTableWrapper, OTrailingNode, OUniqueID, OVideo, };
|
|
@@ -65,6 +65,7 @@ declare const _default: {
|
|
|
65
65
|
size7: string;
|
|
66
66
|
viewSource: string;
|
|
67
67
|
textColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
68
69
|
highlightColor: string;
|
|
69
70
|
default: string;
|
|
70
71
|
lineHeight: string;
|
|
@@ -84,6 +85,7 @@ declare const _default: {
|
|
|
84
85
|
delete: string;
|
|
85
86
|
duplicate: string;
|
|
86
87
|
aiBlock: string;
|
|
88
|
+
toggleList: string;
|
|
87
89
|
};
|
|
88
90
|
label: {
|
|
89
91
|
ai: string;
|
|
@@ -127,6 +129,7 @@ declare const _default: {
|
|
|
127
129
|
generate: string;
|
|
128
130
|
generatedBy: string;
|
|
129
131
|
update: string;
|
|
132
|
+
turnInto: string;
|
|
130
133
|
};
|
|
131
134
|
table: {
|
|
132
135
|
cellBackground: string;
|
|
@@ -65,6 +65,7 @@ declare const _default: {
|
|
|
65
65
|
size7: string;
|
|
66
66
|
viewSource: string;
|
|
67
67
|
textColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
68
69
|
highlightColor: string;
|
|
69
70
|
default: string;
|
|
70
71
|
lineHeight: string;
|
|
@@ -84,6 +85,7 @@ declare const _default: {
|
|
|
84
85
|
delete: string;
|
|
85
86
|
duplicate: string;
|
|
86
87
|
aiBlock: string;
|
|
88
|
+
toggleList: string;
|
|
87
89
|
};
|
|
88
90
|
label: {
|
|
89
91
|
ai: string;
|
|
@@ -125,6 +127,7 @@ declare const _default: {
|
|
|
125
127
|
generate: string;
|
|
126
128
|
generatedBy: string;
|
|
127
129
|
update: string;
|
|
130
|
+
turnInto: string;
|
|
128
131
|
};
|
|
129
132
|
table: {
|
|
130
133
|
cellBackground: string;
|
|
@@ -65,6 +65,7 @@ declare const _default: {
|
|
|
65
65
|
size7: string;
|
|
66
66
|
viewSource: string;
|
|
67
67
|
textColor: string;
|
|
68
|
+
backgroundColor: string;
|
|
68
69
|
highlightColor: string;
|
|
69
70
|
default: string;
|
|
70
71
|
lineHeight: string;
|
|
@@ -83,6 +84,8 @@ declare const _default: {
|
|
|
83
84
|
noColor: string;
|
|
84
85
|
delete: string;
|
|
85
86
|
duplicate: string;
|
|
87
|
+
aiBlock: string;
|
|
88
|
+
toggleList: string;
|
|
86
89
|
};
|
|
87
90
|
label: {
|
|
88
91
|
ai: string;
|
|
@@ -116,6 +119,12 @@ declare const _default: {
|
|
|
116
119
|
copy: string;
|
|
117
120
|
cut: string;
|
|
118
121
|
search: string;
|
|
122
|
+
think: string;
|
|
123
|
+
noResults: string;
|
|
124
|
+
generate: string;
|
|
125
|
+
generatedBy: string;
|
|
126
|
+
update: string;
|
|
127
|
+
turnInto: string;
|
|
119
128
|
};
|
|
120
129
|
table: {
|
|
121
130
|
cellBackground: string;
|
package/types/utils/convert.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Convert
|
|
3
|
+
*/
|
|
4
|
+
import { Editor } from '@tiptap/core';
|
|
5
|
+
export declare const toJSON: (editor: Editor, html: string) => Record<string, any>;
|
|
6
|
+
export declare const systemKeymap: () => {
|
|
7
|
+
mod: string;
|
|
8
|
+
alt: string;
|
|
9
|
+
shift: string;
|
|
10
|
+
ctrl: string;
|
|
11
|
+
meta: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const convertShortcut: (shortcut: string) => string;
|
/package/types/components/buttons/{OBackColorDropdown.vue.d.ts → OBackgroundColorDropdown.vue.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|