@halo-dev/richtext-editor 0.0.0-alpha.9 → 2.13.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/components/Editor.vue.d.ts +44 -0
- package/dist/components/EditorBubbleMenu.vue.d.ts +14 -0
- package/dist/components/EditorHeader.vue.d.ts +11 -17
- package/dist/components/block/BlockActionButton.vue.d.ts +41 -0
- package/dist/components/block/BlockActionInput.vue.d.ts +38 -0
- package/dist/components/block/BlockActionSeparator.vue.d.ts +2 -0
- package/dist/components/block/BlockCard.vue.d.ts +44 -0
- package/dist/components/block/index.d.ts +4 -0
- package/dist/components/bubble/BubbleItem.vue.d.ts +76 -0
- package/dist/components/bubble/BubbleMenuPlugin.d.ts +53 -0
- package/dist/components/bubble/index.d.ts +2 -0
- package/dist/components/common/ColorPickerDropdown.vue.d.ts +41 -0
- package/dist/components/icon/MdiDeleteForeverOutline.vue.d.ts +2 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/toolbar/ToolbarItem.vue.d.ts +50 -0
- package/dist/components/toolbar/ToolbarSubItem.vue.d.ts +50 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbox/ToolboxItem.vue.d.ts +51 -0
- package/dist/components/toolbox/index.d.ts +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/extensions/audio/AudioView.vue.d.ts +31 -0
- package/dist/extensions/audio/BubbleItemAudioLink.vue.d.ts +39 -0
- package/dist/extensions/audio/index.d.ts +13 -0
- package/dist/extensions/blockquote/index.d.ts +4 -0
- package/dist/extensions/bold/index.d.ts +4 -0
- package/dist/extensions/bullet-list/index.d.ts +4 -0
- package/dist/extensions/code/index.d.ts +4 -0
- package/dist/extensions/code-block/CodeBlockViewRenderer.vue.d.ts +31 -0
- package/dist/extensions/code-block/code-block.d.ts +14 -1
- package/dist/extensions/code-block/lowlight.d.ts +15 -1
- package/dist/extensions/color/ColorBubbleItem.vue.d.ts +39 -0
- package/dist/extensions/color/ColorToolbarItem.vue.d.ts +56 -0
- package/dist/extensions/color/index.d.ts +4 -0
- package/dist/extensions/columns/column.d.ts +3 -0
- package/dist/extensions/columns/columns.d.ts +15 -0
- package/dist/extensions/columns/index.d.ts +2 -0
- package/dist/extensions/commands-menu/CommandsView.vue.d.ts +13 -19
- package/dist/extensions/commands-menu/commands.d.ts +1 -1
- package/dist/extensions/commands-menu/index.d.ts +0 -2
- package/dist/extensions/draggable/index.d.ts +14 -0
- package/dist/extensions/font-size/index.d.ts +14 -0
- package/dist/extensions/heading/index.d.ts +4 -0
- package/dist/extensions/highlight/HighlightBubbleItem.vue.d.ts +39 -0
- package/dist/extensions/highlight/HighlightToolbarItem.vue.d.ts +56 -0
- package/dist/extensions/highlight/index.d.ts +4 -0
- package/dist/extensions/history/index.d.ts +4 -0
- package/dist/extensions/iframe/BubbleItemIframeLink.vue.d.ts +39 -0
- package/dist/extensions/iframe/BubbleItemIframeSize.vue.d.ts +16 -0
- package/dist/extensions/iframe/IframeView.vue.d.ts +31 -0
- package/dist/extensions/iframe/index.d.ts +13 -0
- package/dist/extensions/image/BubbleItemImageAlt.vue.d.ts +39 -0
- package/dist/extensions/image/BubbleItemImageHref.vue.d.ts +39 -0
- package/dist/extensions/image/BubbleItemImageLink.vue.d.ts +39 -0
- package/dist/extensions/image/BubbleItemImageSize.vue.d.ts +39 -0
- package/dist/extensions/image/ImageView.vue.d.ts +31 -0
- package/dist/extensions/image/index.d.ts +4 -0
- package/dist/extensions/indent/index.d.ts +22 -0
- package/dist/extensions/index.d.ts +38 -30
- package/dist/extensions/italic/index.d.ts +4 -0
- package/dist/extensions/link/LinkBubbleButton.vue.d.ts +39 -0
- package/dist/extensions/link/index.d.ts +4 -0
- package/dist/extensions/list-keymap/index.d.ts +7 -0
- package/dist/extensions/node-selected/index.d.ts +6 -0
- package/dist/extensions/ordered-list/index.d.ts +4 -0
- package/dist/extensions/paragraph/index.d.ts +4 -0
- package/dist/extensions/search-and-replace/SearchAndReplace.vue.d.ts +33 -0
- package/dist/extensions/search-and-replace/SearchAndReplacePlugin.d.ts +108 -0
- package/dist/extensions/search-and-replace/index.d.ts +34 -0
- package/dist/extensions/strike/index.d.ts +4 -0
- package/dist/extensions/subscript/index.d.ts +4 -0
- package/dist/extensions/superscript/index.d.ts +4 -0
- package/dist/extensions/table/index.d.ts +4 -0
- package/dist/extensions/table/table-cell.d.ts +6 -0
- package/dist/extensions/table/table-header.d.ts +6 -0
- package/dist/extensions/table/table-row.d.ts +2 -0
- package/dist/extensions/table/util.d.ts +27 -0
- package/dist/extensions/task-list/index.d.ts +4 -0
- package/dist/extensions/text/index.d.ts +3 -0
- package/dist/extensions/text-align/index.d.ts +4 -0
- package/dist/extensions/trailing-node/index.d.ts +9 -0
- package/dist/extensions/underline/index.d.ts +4 -0
- package/dist/extensions/video/BubbleItemVideoLink.vue.d.ts +39 -0
- package/dist/extensions/video/BubbleItemVideoSize.vue.d.ts +39 -0
- package/dist/extensions/video/VideoView.vue.d.ts +31 -0
- package/dist/extensions/video/index.d.ts +13 -0
- package/dist/index.d.ts +8 -5
- package/dist/locales/index.d.ts +7 -0
- package/dist/rich-text-editor.es.js +48938 -85657
- package/dist/rich-text-editor.iife.js +146 -89087
- package/dist/style.css +10 -1423
- package/dist/tiptap/core/index.d.ts +1 -0
- package/dist/tiptap/index.d.ts +6 -0
- package/dist/tiptap/pm/index.d.ts +20 -0
- package/dist/tiptap/vue-3/index.d.ts +1 -0
- package/dist/types/index.d.ts +115 -0
- package/dist/utils/anchor.d.ts +2 -0
- package/dist/utils/delete-node.d.ts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +83 -77
- package/dist/extensions/commands-menu/suggestion.d.ts +0 -21
- package/dist/extensions/katex/index.d.ts +0 -2
- package/dist/menus/index.d.ts +0 -26
- package/dist/rich-text-editor.es.js.map +0 -1
- package/dist/rich-text-editor.iife.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Editor } from '../tiptap/vue-3';
|
|
2
|
+
import { type CSSProperties, type PropType } from "vue";
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<Editor>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
contentStyles: {
|
|
9
|
+
type: PropType<CSSProperties>;
|
|
10
|
+
required: false;
|
|
11
|
+
default: () => {};
|
|
12
|
+
};
|
|
13
|
+
locale: {
|
|
14
|
+
type: PropType<"en" | "zh-CN" | "zh" | "en-US">;
|
|
15
|
+
required: false;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
editor: {
|
|
20
|
+
type: PropType<Editor>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
contentStyles: {
|
|
24
|
+
type: PropType<CSSProperties>;
|
|
25
|
+
required: false;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
28
|
+
locale: {
|
|
29
|
+
type: PropType<"en" | "zh-CN" | "zh" | "en-US">;
|
|
30
|
+
required: false;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
}>>, {
|
|
34
|
+
locale: "en" | "zh-CN" | "zh" | "en-US";
|
|
35
|
+
contentStyles: CSSProperties;
|
|
36
|
+
}, {}>, {
|
|
37
|
+
extra?(_: {}): any;
|
|
38
|
+
}>;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropType } from "vue";
|
|
2
|
+
import type { Editor } from '../tiptap/vue-3';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
editor: {
|
|
5
|
+
type: PropType<Editor>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
editor: {
|
|
10
|
+
type: PropType<Editor>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}, {}>;
|
|
14
|
+
export default _default;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
type:
|
|
5
|
-
required:
|
|
6
|
-
default: () => any[];
|
|
1
|
+
import { Editor } from '../tiptap/vue-3';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
editor: {
|
|
4
|
+
type: typeof Editor;
|
|
5
|
+
required: true;
|
|
7
6
|
};
|
|
8
|
-
}, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type: PropType<MenuItem[]>;
|
|
13
|
-
required: false;
|
|
14
|
-
default: () => any[];
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
editor: {
|
|
9
|
+
type: typeof Editor;
|
|
10
|
+
required: true;
|
|
15
11
|
};
|
|
16
|
-
}>>, {
|
|
17
|
-
|
|
18
|
-
}>;
|
|
19
|
-
export default _sfc_main;
|
|
12
|
+
}>>, {}, {}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
tooltip?: string | undefined;
|
|
3
|
+
selected?: boolean | undefined;
|
|
4
|
+
}>, {
|
|
5
|
+
tooltip: undefined;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
tooltip?: string | undefined;
|
|
9
|
+
selected?: boolean | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
tooltip: undefined;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}>>>, {
|
|
14
|
+
tooltip: string;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
}, {}>, {
|
|
17
|
+
icon?(_: {}): any;
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
tooltip?: string | undefined;
|
|
3
|
+
modelValue?: string | undefined;
|
|
4
|
+
}>, {
|
|
5
|
+
modelValue: string;
|
|
6
|
+
tooltip: undefined;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: string) => void;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
tooltip?: string | undefined;
|
|
11
|
+
modelValue?: string | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
modelValue: string;
|
|
14
|
+
tooltip: undefined;
|
|
15
|
+
}>>> & {
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
tooltip: string;
|
|
19
|
+
modelValue: string;
|
|
20
|
+
}, {}>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
24
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
25
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
26
|
+
} : {
|
|
27
|
+
type: import('vue').PropType<T[K]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
33
|
+
default: D[K];
|
|
34
|
+
}> : P[K];
|
|
35
|
+
};
|
|
36
|
+
type __VLS_Prettify<T> = {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} & {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Editor } from '../../tiptap/vue-3';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
selected: boolean;
|
|
4
|
+
editor: Editor;
|
|
5
|
+
getPos: () => number;
|
|
6
|
+
deleteNode: () => void;
|
|
7
|
+
}>, {
|
|
8
|
+
selected: boolean;
|
|
9
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
selected: boolean;
|
|
11
|
+
editor: Editor;
|
|
12
|
+
getPos: () => number;
|
|
13
|
+
deleteNode: () => void;
|
|
14
|
+
}>, {
|
|
15
|
+
selected: boolean;
|
|
16
|
+
}>>>, {
|
|
17
|
+
selected: boolean;
|
|
18
|
+
}, {}>, {
|
|
19
|
+
content?(_: {}): any;
|
|
20
|
+
actions?(_: {}): any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type __VLS_WithDefaults<P, D> = {
|
|
33
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
|
+
default: D[K];
|
|
35
|
+
}> : P[K];
|
|
36
|
+
};
|
|
37
|
+
type __VLS_Prettify<T> = {
|
|
38
|
+
[K in keyof T]: T[K];
|
|
39
|
+
} & {};
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as BlockActionButton } from "./BlockActionButton.vue";
|
|
2
|
+
export { default as BlockActionInput } from "./BlockActionInput.vue";
|
|
3
|
+
export { default as BlockActionSeparator } from "./BlockActionSeparator.vue";
|
|
4
|
+
export { default as BlockCard } from "./BlockCard.vue";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Editor } from '../../tiptap/vue-3';
|
|
2
|
+
import { type Component } from "vue";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
editor: Editor;
|
|
5
|
+
isActive?: (({ editor }: {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
}) => boolean) | undefined;
|
|
8
|
+
visible?: (({ editor }: {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
}) => boolean) | undefined;
|
|
11
|
+
icon?: Component | undefined;
|
|
12
|
+
iconStyle?: string | undefined;
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
action?: (({ editor }: {
|
|
15
|
+
editor: Editor;
|
|
16
|
+
}) => Component | void) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
isActive: () => false;
|
|
19
|
+
visible: () => true;
|
|
20
|
+
title: undefined;
|
|
21
|
+
action: undefined;
|
|
22
|
+
icon: undefined;
|
|
23
|
+
iconStyle: undefined;
|
|
24
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
25
|
+
editor: Editor;
|
|
26
|
+
isActive?: (({ editor }: {
|
|
27
|
+
editor: Editor;
|
|
28
|
+
}) => boolean) | undefined;
|
|
29
|
+
visible?: (({ editor }: {
|
|
30
|
+
editor: Editor;
|
|
31
|
+
}) => boolean) | undefined;
|
|
32
|
+
icon?: Component | undefined;
|
|
33
|
+
iconStyle?: string | undefined;
|
|
34
|
+
title?: string | undefined;
|
|
35
|
+
action?: (({ editor }: {
|
|
36
|
+
editor: Editor;
|
|
37
|
+
}) => Component | void) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
isActive: () => false;
|
|
40
|
+
visible: () => true;
|
|
41
|
+
title: undefined;
|
|
42
|
+
action: undefined;
|
|
43
|
+
icon: undefined;
|
|
44
|
+
iconStyle: undefined;
|
|
45
|
+
}>>>, {
|
|
46
|
+
title: string;
|
|
47
|
+
visible: ({ editor }: {
|
|
48
|
+
editor: Editor;
|
|
49
|
+
}) => boolean;
|
|
50
|
+
isActive: ({ editor }: {
|
|
51
|
+
editor: Editor;
|
|
52
|
+
}) => boolean;
|
|
53
|
+
icon: Component;
|
|
54
|
+
iconStyle: string;
|
|
55
|
+
action: ({ editor }: {
|
|
56
|
+
editor: Editor;
|
|
57
|
+
}) => Component | void;
|
|
58
|
+
}, {}>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
61
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
62
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
63
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
64
|
+
} : {
|
|
65
|
+
type: import('vue').PropType<T[K]>;
|
|
66
|
+
required: true;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
type __VLS_WithDefaults<P, D> = {
|
|
70
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
71
|
+
default: D[K];
|
|
72
|
+
}> : P[K];
|
|
73
|
+
};
|
|
74
|
+
type __VLS_Prettify<T> = {
|
|
75
|
+
[K in keyof T]: T[K];
|
|
76
|
+
} & {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Editor } from '../../tiptap/vue-3';
|
|
2
|
+
import { EditorState, Plugin, PluginKey } from '../../tiptap/pm';
|
|
3
|
+
import type { EditorView } from '../../tiptap/pm';
|
|
4
|
+
import { type Instance, type Props } from "tippy.js";
|
|
5
|
+
export interface TippyOptionProps extends Props {
|
|
6
|
+
fixed?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface BubbleMenuPluginProps {
|
|
9
|
+
pluginKey: PluginKey | string;
|
|
10
|
+
editor: Editor;
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
tippyOptions?: Partial<TippyOptionProps>;
|
|
13
|
+
updateDelay?: number;
|
|
14
|
+
shouldShow?: ((props: {
|
|
15
|
+
editor: Editor;
|
|
16
|
+
state: EditorState;
|
|
17
|
+
node?: HTMLElement;
|
|
18
|
+
view?: EditorView;
|
|
19
|
+
oldState?: EditorState;
|
|
20
|
+
from?: number;
|
|
21
|
+
to?: number;
|
|
22
|
+
}) => boolean) | null;
|
|
23
|
+
getRenderContainer?: (node: HTMLElement) => HTMLElement;
|
|
24
|
+
defaultAnimation?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type BubbleMenuViewProps = BubbleMenuPluginProps & {
|
|
27
|
+
view: EditorView;
|
|
28
|
+
};
|
|
29
|
+
export declare class BubbleMenuView {
|
|
30
|
+
editor: Editor;
|
|
31
|
+
element: HTMLElement;
|
|
32
|
+
view: EditorView;
|
|
33
|
+
preventHide: boolean;
|
|
34
|
+
tippy: Instance<TippyOptionProps> | undefined;
|
|
35
|
+
tippyOptions?: Partial<TippyOptionProps>;
|
|
36
|
+
getRenderContainer?: BubbleMenuPluginProps["getRenderContainer"];
|
|
37
|
+
defaultAnimation?: BubbleMenuPluginProps["defaultAnimation"];
|
|
38
|
+
shouldShow: Exclude<BubbleMenuPluginProps["shouldShow"], null>;
|
|
39
|
+
constructor({ editor, element, view, tippyOptions, shouldShow, getRenderContainer, defaultAnimation, }: BubbleMenuViewProps);
|
|
40
|
+
mousedownHandler: () => void;
|
|
41
|
+
dragstartHandler: () => void;
|
|
42
|
+
blurHandler: ({ event }: {
|
|
43
|
+
event: FocusEvent;
|
|
44
|
+
}) => void;
|
|
45
|
+
createTooltip(): void;
|
|
46
|
+
update(view: EditorView, oldState?: EditorState): void;
|
|
47
|
+
addActiveBubbleMenu: () => void;
|
|
48
|
+
removeActiveBubbleMenu: () => void;
|
|
49
|
+
show(): void;
|
|
50
|
+
hide(): void;
|
|
51
|
+
destroy(): void;
|
|
52
|
+
}
|
|
53
|
+
export declare const BubbleMenuPlugin: (options: BubbleMenuPluginProps) => Plugin<any>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
modelValue?: string | undefined;
|
|
3
|
+
}>, {
|
|
4
|
+
modelValue: undefined;
|
|
5
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value?: string | undefined) => void;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
modelValue?: string | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
modelValue: undefined;
|
|
11
|
+
}>>> & {
|
|
12
|
+
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
modelValue: string;
|
|
15
|
+
}, {}>, {
|
|
16
|
+
default?(_: {}): any;
|
|
17
|
+
prefix?(_: {}): any;
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
isActive?: boolean | undefined;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
action?: (() => void) | undefined;
|
|
7
|
+
icon?: Component | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
title: undefined;
|
|
12
|
+
action: undefined;
|
|
13
|
+
icon: undefined;
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
15
|
+
isActive?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
action?: (() => void) | undefined;
|
|
19
|
+
icon?: Component | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
title: undefined;
|
|
24
|
+
action: undefined;
|
|
25
|
+
icon: undefined;
|
|
26
|
+
}>>>, {
|
|
27
|
+
title: string;
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
icon: Component;
|
|
30
|
+
action: () => void;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
36
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
+
} : {
|
|
39
|
+
type: import('vue').PropType<T[K]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
45
|
+
default: D[K];
|
|
46
|
+
}> : P[K];
|
|
47
|
+
};
|
|
48
|
+
type __VLS_Prettify<T> = {
|
|
49
|
+
[K in keyof T]: T[K];
|
|
50
|
+
} & {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
isActive?: boolean | undefined;
|
|
4
|
+
disabled?: boolean | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
action?: (() => void) | undefined;
|
|
7
|
+
icon?: Component | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
title: undefined;
|
|
12
|
+
action: undefined;
|
|
13
|
+
icon: undefined;
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
15
|
+
isActive?: boolean | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
action?: (() => void) | undefined;
|
|
19
|
+
icon?: Component | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
title: undefined;
|
|
24
|
+
action: undefined;
|
|
25
|
+
icon: undefined;
|
|
26
|
+
}>>>, {
|
|
27
|
+
title: string;
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
icon: Component;
|
|
30
|
+
action: () => void;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
36
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
37
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
38
|
+
} : {
|
|
39
|
+
type: import('vue').PropType<T[K]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
type __VLS_WithDefaults<P, D> = {
|
|
44
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
45
|
+
default: D[K];
|
|
46
|
+
}> : P[K];
|
|
47
|
+
};
|
|
48
|
+
type __VLS_Prettify<T> = {
|
|
49
|
+
[K in keyof T]: T[K];
|
|
50
|
+
} & {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
import type { Editor } from '../../tiptap/vue-3';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
editor?: Editor | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
action?: (() => void) | undefined;
|
|
8
|
+
icon?: Component | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
editor: undefined;
|
|
11
|
+
title: undefined;
|
|
12
|
+
description: undefined;
|
|
13
|
+
action: undefined;
|
|
14
|
+
icon: undefined;
|
|
15
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
+
editor?: Editor | undefined;
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
action?: (() => void) | undefined;
|
|
20
|
+
icon?: Component | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
editor: undefined;
|
|
23
|
+
title: undefined;
|
|
24
|
+
description: undefined;
|
|
25
|
+
action: undefined;
|
|
26
|
+
icon: undefined;
|
|
27
|
+
}>>>, {
|
|
28
|
+
editor: Editor;
|
|
29
|
+
title: string;
|
|
30
|
+
icon: Component;
|
|
31
|
+
action: () => void;
|
|
32
|
+
description: string;
|
|
33
|
+
}, {}>;
|
|
34
|
+
export default _default;
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
37
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
38
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
39
|
+
} : {
|
|
40
|
+
type: import('vue').PropType<T[K]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type __VLS_WithDefaults<P, D> = {
|
|
45
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
46
|
+
default: D[K];
|
|
47
|
+
}> : P[K];
|
|
48
|
+
};
|
|
49
|
+
type __VLS_Prettify<T> = {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ToolboxItem } from "./ToolboxItem.vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode, Decoration } from '../../tiptap/pm';
|
|
2
|
+
import type { Editor, Node } from '../../tiptap/vue-3';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
editor: Editor;
|
|
5
|
+
node: ProseMirrorNode;
|
|
6
|
+
decorations: Decoration[];
|
|
7
|
+
selected: boolean;
|
|
8
|
+
extension: Node<any, any>;
|
|
9
|
+
getPos: () => number;
|
|
10
|
+
updateAttributes: (attributes: Record<string, any>) => void;
|
|
11
|
+
deleteNode: () => void;
|
|
12
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
13
|
+
editor: Editor;
|
|
14
|
+
node: ProseMirrorNode;
|
|
15
|
+
decorations: Decoration[];
|
|
16
|
+
selected: boolean;
|
|
17
|
+
extension: Node<any, any>;
|
|
18
|
+
getPos: () => number;
|
|
19
|
+
updateAttributes: (attributes: Record<string, any>) => void;
|
|
20
|
+
deleteNode: () => void;
|
|
21
|
+
}>>>, {}, {}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Editor } from '../../tiptap/vue-3';
|
|
2
|
+
import { type Component } from "vue";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
editor: Editor;
|
|
5
|
+
isActive: ({ editor }: {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
}) => boolean;
|
|
8
|
+
visible?: (({ editor }: {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
}) => boolean) | undefined;
|
|
11
|
+
icon?: Component | undefined;
|
|
12
|
+
title?: string | undefined;
|
|
13
|
+
action?: (({ editor }: {
|
|
14
|
+
editor: Editor;
|
|
15
|
+
}) => void) | undefined;
|
|
16
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
17
|
+
editor: Editor;
|
|
18
|
+
isActive: ({ editor }: {
|
|
19
|
+
editor: Editor;
|
|
20
|
+
}) => boolean;
|
|
21
|
+
visible?: (({ editor }: {
|
|
22
|
+
editor: Editor;
|
|
23
|
+
}) => boolean) | undefined;
|
|
24
|
+
icon?: Component | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
action?: (({ editor }: {
|
|
27
|
+
editor: Editor;
|
|
28
|
+
}) => void) | undefined;
|
|
29
|
+
}>>>, {}, {}>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
33
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
34
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
35
|
+
} : {
|
|
36
|
+
type: import('vue').PropType<T[K]>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ExtensionOptions } from '../../types';
|
|
2
|
+
import { Node } from '../../tiptap/vue-3';
|
|
3
|
+
declare module "@/tiptap" {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
audio: {
|
|
6
|
+
setAudio: (options: {
|
|
7
|
+
src: string;
|
|
8
|
+
}) => ReturnType;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare const Audio: Node<ExtensionOptions, any>;
|
|
13
|
+
export default Audio;
|