vdc-editor 0.0.4 → 0.0.6
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/src/components/ActionButton.vue.d.ts +6 -8
- package/lib/src/components/ActionDropdownButton.vue.d.ts +4 -6
- package/lib/src/components/ActionDropdownButtonSplit.vue.d.ts +4 -6
- package/lib/src/components/ColorPicker.vue.d.ts +4 -6
- package/lib/src/components/CoreEditor.vue.d.ts +3 -3
- package/lib/src/components/SelectContextMenu.vue.d.ts +4 -6
- package/lib/src/components/icons/Icon.vue.d.ts +2 -2
- package/lib/src/components/ui/badge/Badge.vue.d.ts +8 -13
- package/lib/src/components/ui/button/Button.vue.d.ts +5 -7
- package/lib/src/components/ui/checkbox/Checkbox.vue.d.ts +6 -9
- package/lib/src/components/ui/context-menu/ContextMenu.vue.d.ts +4 -6
- package/lib/src/components/ui/context-menu/ContextMenuCheckboxItem.vue.d.ts +6 -9
- package/lib/src/components/ui/context-menu/ContextMenuContent.vue.d.ts +6 -9
- package/lib/src/components/ui/context-menu/ContextMenuGroup.vue.d.ts +2 -4
- package/lib/src/components/ui/context-menu/ContextMenuItem.vue.d.ts +8 -11
- package/lib/src/components/ui/context-menu/ContextMenuLabel.vue.d.ts +8 -11
- package/lib/src/components/ui/context-menu/ContextMenuRadioGroup.vue.d.ts +4 -6
- package/lib/src/components/ui/context-menu/ContextMenuRadioItem.vue.d.ts +6 -9
- package/lib/src/components/ui/context-menu/ContextMenuSeparator.vue.d.ts +2 -2
- package/lib/src/components/ui/context-menu/ContextMenuShortcut.vue.d.ts +6 -10
- package/lib/src/components/ui/context-menu/ContextMenuSub.vue.d.ts +4 -6
- package/lib/src/components/ui/context-menu/ContextMenuSubContent.vue.d.ts +6 -9
- package/lib/src/components/ui/context-menu/ContextMenuSubTrigger.vue.d.ts +8 -11
- package/lib/src/components/ui/context-menu/ContextMenuTrigger.vue.d.ts +2 -4
- package/lib/src/components/ui/dialog/Dialog.vue.d.ts +4 -6
- package/lib/src/components/ui/dialog/DialogClose.vue.d.ts +2 -4
- package/lib/src/components/ui/dialog/DialogContent.vue.d.ts +6 -9
- package/lib/src/components/ui/dialog/DialogDescription.vue.d.ts +6 -9
- package/lib/src/components/ui/dialog/DialogFooter.vue.d.ts +6 -10
- package/lib/src/components/ui/dialog/DialogHeader.vue.d.ts +6 -10
- package/lib/src/components/ui/dialog/DialogScrollContent.vue.d.ts +6 -9
- package/lib/src/components/ui/dialog/DialogTitle.vue.d.ts +6 -9
- package/lib/src/components/ui/dialog/DialogTrigger.vue.d.ts +2 -4
- package/lib/src/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +4 -6
- package/lib/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +6 -9
- package/lib/src/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +6 -9
- package/lib/src/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +2 -4
- package/lib/src/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +8 -11
- package/lib/src/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +8 -11
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +4 -6
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +6 -9
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +2 -2
- package/lib/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +6 -10
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +4 -6
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +6 -9
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +6 -9
- package/lib/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +2 -4
- package/lib/src/components/ui/input/Input.vue.d.ts +6 -6
- package/lib/src/components/ui/label/Label.vue.d.ts +6 -9
- package/lib/src/components/ui/popover/Popover.vue.d.ts +4 -6
- package/lib/src/components/ui/popover/PopoverContent.vue.d.ts +7 -10
- package/lib/src/components/ui/popover/PopoverTrigger.vue.d.ts +2 -4
- package/lib/src/components/ui/resizable/ResizableHandle.vue.d.ts +4 -4
- package/lib/src/components/ui/resizable/ResizablePanelGroup.vue.d.ts +6 -9
- package/lib/src/components/ui/scroll-area/ScrollArea.vue.d.ts +6 -9
- package/lib/src/components/ui/scroll-area/ScrollBar.vue.d.ts +3 -3
- package/lib/src/components/ui/select/Select.vue.d.ts +4 -6
- package/lib/src/components/ui/select/SelectContent.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectGroup.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectItem.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectItemText.vue.d.ts +2 -4
- package/lib/src/components/ui/select/SelectLabel.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectScrollDownButton.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectScrollUpButton.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectSeparator.vue.d.ts +2 -2
- package/lib/src/components/ui/select/SelectTrigger.vue.d.ts +6 -9
- package/lib/src/components/ui/select/SelectValue.vue.d.ts +2 -4
- package/lib/src/components/ui/separator/Separator.vue.d.ts +2 -2
- package/lib/src/components/ui/tabs/Tabs.vue.d.ts +4 -6
- package/lib/src/components/ui/tabs/TabsContent.vue.d.ts +6 -9
- package/lib/src/components/ui/tabs/TabsList.vue.d.ts +6 -9
- package/lib/src/components/ui/tabs/TabsTrigger.vue.d.ts +6 -9
- package/lib/src/components/ui/textarea/Textarea.vue.d.ts +6 -6
- package/lib/src/components/ui/toast/use-toast.d.ts +23 -99
- package/lib/src/components/ui/toggle/Toggle.vue.d.ts +10 -14
- package/lib/src/components/ui/tooltip/Tooltip.vue.d.ts +4 -6
- package/lib/src/components/ui/tooltip/TooltipContent.vue.d.ts +6 -9
- package/lib/src/components/ui/tooltip/TooltipProvider.vue.d.ts +2 -4
- package/lib/src/components/ui/tooltip/TooltipTrigger.vue.d.ts +2 -4
- package/lib/src/extensions/Ai/components/AIButton.vue.d.ts +1 -1
- package/lib/src/extensions/CodeBlock/components/CodeBlockView.vue.d.ts +16 -16
- package/lib/src/extensions/Image/components/ImageView.vue.d.ts +14 -14
- package/lib/src/extensions/ImageUpload/components/ImageUploader.vue.d.ts +16 -16
- package/lib/src/extensions/ImageUpload/image-upload-plugin.d.ts +2 -2
- package/lib/src/extensions/Page/node-view.vue.d.ts +16 -16
- package/lib/src/extensions/Page/utils.d.ts +3 -3
- package/lib/src/extensions/SpellChecker/i-proofreader-interface.d.ts +13 -2
- package/lib/src/extensions/SpellChecker/index.d.ts +1 -1
- package/lib/src/extensions/SpellChecker/proofreader.d.ts +20 -0
- package/lib/src/extensions/SpellChecker/spell-check.service.d.ts +3 -0
- package/lib/src/extensions/SuperText/components/SuperText.vue.d.ts +16 -16
- package/lib/src/extensions/Table/components/CreateTablePopover.vue.d.ts +4 -6
- package/lib/src/extensions/Table/components/TableActionButton.vue.d.ts +1 -1
- package/lib/src/extensions/VideoUpload/components/VideoUploader.vue.d.ts +16 -16
- package/lib/src/hooks/useConfigTiptap.d.ts +1 -1
- package/lib/src/hooks/useStore.d.ts +2 -2
- package/lib/src/hooks/useSuperTextStore.d.ts +2 -2
- package/lib/src/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/lib/vdc-editor.mjs +31632 -26639
- package/lib/vdc-editor.umd.js +68 -62
- package/package.json +1 -1
- package/lib/src/extensions/SpellChecker/hunspell-proofreader.d.ts +0 -16
- package/lib/src/extensions/SpellChecker/sapling-proofreader.d.ts +0 -13
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
editor: {
|
|
3
|
-
type: PropType<import('@tiptap/
|
|
3
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
node: {
|
|
7
|
-
type: PropType<import('
|
|
7
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
10
|
decorations: {
|
|
11
|
-
type: PropType<import('@tiptap/vue-3').
|
|
11
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
selected: {
|
|
15
|
-
type: PropType<
|
|
15
|
+
type: globalThis.PropType<boolean>;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
18
|
extension: {
|
|
19
|
-
type: PropType<import('@tiptap/vue-3').
|
|
19
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
22
|
getPos: {
|
|
23
|
-
type: PropType<
|
|
23
|
+
type: globalThis.PropType<() => number>;
|
|
24
24
|
required: true;
|
|
25
25
|
};
|
|
26
26
|
updateAttributes: {
|
|
27
|
-
type: PropType<
|
|
27
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
30
|
deleteNode: {
|
|
31
|
-
type: PropType<
|
|
31
|
+
type: globalThis.PropType<() => void>;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
34
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
35
35
|
editor: {
|
|
36
|
-
type: PropType<import('@tiptap/
|
|
36
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
37
37
|
required: true;
|
|
38
38
|
};
|
|
39
39
|
node: {
|
|
40
|
-
type: PropType<import('
|
|
40
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
41
41
|
required: true;
|
|
42
42
|
};
|
|
43
43
|
decorations: {
|
|
44
|
-
type: PropType<import('@tiptap/vue-3').
|
|
44
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
45
45
|
required: true;
|
|
46
46
|
};
|
|
47
47
|
selected: {
|
|
48
|
-
type: PropType<
|
|
48
|
+
type: globalThis.PropType<boolean>;
|
|
49
49
|
required: true;
|
|
50
50
|
};
|
|
51
51
|
extension: {
|
|
52
|
-
type: PropType<import('@tiptap/vue-3').
|
|
52
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
53
53
|
required: true;
|
|
54
54
|
};
|
|
55
55
|
getPos: {
|
|
56
|
-
type: PropType<
|
|
56
|
+
type: globalThis.PropType<() => number>;
|
|
57
57
|
required: true;
|
|
58
58
|
};
|
|
59
59
|
updateAttributes: {
|
|
60
|
-
type: PropType<
|
|
60
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
61
61
|
required: true;
|
|
62
62
|
};
|
|
63
63
|
deleteNode: {
|
|
64
|
-
type: PropType<
|
|
64
|
+
type: globalThis.PropType<() => void>;
|
|
65
65
|
required: true;
|
|
66
66
|
};
|
|
67
67
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -10,7 +10,7 @@ export declare function getId(): string;
|
|
|
10
10
|
/**
|
|
11
11
|
* Finds the parent DOM reference of a specific node type.
|
|
12
12
|
*/
|
|
13
|
-
export declare const findParentDomRefOfType: (nodeType: NodeType, domAtPos: EditorView[
|
|
13
|
+
export declare const findParentDomRefOfType: (nodeType: NodeType, domAtPos: EditorView['domAtPos']) => (selection: NodeSelection) => ChildNode | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Checks if the node type matches the specified type.
|
|
16
16
|
*/
|
|
@@ -18,11 +18,11 @@ export declare const equalNodeType: (nodeType: NodeType, node: Node) => boolean;
|
|
|
18
18
|
/**
|
|
19
19
|
* Finds the parent DOM reference based on a predicate.
|
|
20
20
|
*/
|
|
21
|
-
export declare const findParentDomRef: (predicate: (node: Node) => boolean, domAtPos: EditorView[
|
|
21
|
+
export declare const findParentDomRef: (predicate: (node: Node) => boolean, domAtPos: EditorView['domAtPos']) => (selection: NodeSelection) => ChildNode | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Finds the DOM reference at a given position.
|
|
24
24
|
*/
|
|
25
|
-
export declare const findDomRefAtPos: (position: number, domAtPos: EditorView[
|
|
25
|
+
export declare const findDomRefAtPos: (position: number, domAtPos: EditorView['domAtPos']) => ChildNode;
|
|
26
26
|
/**
|
|
27
27
|
* Finds the parent node based on a predicate.
|
|
28
28
|
*/
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export interface ITextWithPosition {
|
|
2
|
-
|
|
2
|
+
startIndex: number;
|
|
3
3
|
length: number;
|
|
4
|
-
|
|
4
|
+
wrongWord: string;
|
|
5
5
|
}
|
|
6
|
+
export interface ITransferSpellData {
|
|
7
|
+
errorText: ITextWithPosition;
|
|
8
|
+
spellData: SpellCheckDataType;
|
|
9
|
+
}
|
|
10
|
+
export type SpellCheckDataType = {
|
|
11
|
+
correctWord: string[];
|
|
12
|
+
startIndex: number;
|
|
13
|
+
endIndex: number;
|
|
14
|
+
wrongWordIndex: number;
|
|
15
|
+
wrongWord: string;
|
|
16
|
+
};
|
|
6
17
|
export interface IProofreaderInterface {
|
|
7
18
|
proofreadText(sentence: string): Promise<ITextWithPosition[]>;
|
|
8
19
|
getSuggestions(word: string): Promise<string[]>;
|
|
@@ -2,5 +2,5 @@ import { SpellcheckerExtension } from './spellchecker-extension';
|
|
|
2
2
|
import { IProofreaderInterface, ITextWithPosition } from './i-proofreader-interface';
|
|
3
3
|
|
|
4
4
|
export default SpellcheckerExtension;
|
|
5
|
-
export { Proofreader } from './
|
|
5
|
+
export { Proofreader } from './proofreader';
|
|
6
6
|
export type { IProofreaderInterface, ITextWithPosition };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IProofreaderInterface, ITextWithPosition, ITransferSpellData } from './i-proofreader-interface';
|
|
2
|
+
import { AxiosResponse } from 'axios';
|
|
3
|
+
|
|
4
|
+
export declare class Proofreader implements IProofreaderInterface {
|
|
5
|
+
private suggestions;
|
|
6
|
+
private api;
|
|
7
|
+
limit: number | undefined;
|
|
8
|
+
transfer?: (data: AxiosResponse<any, any>) => ITransferSpellData[];
|
|
9
|
+
constructor({ api, limit, transfer, }: {
|
|
10
|
+
api: string;
|
|
11
|
+
limit?: number;
|
|
12
|
+
transfer: (data: AxiosResponse<any, any>) => ITransferSpellData[];
|
|
13
|
+
});
|
|
14
|
+
setSuggestions(data: ITransferSpellData[]): void;
|
|
15
|
+
getSuggestions(word: string): Promise<string[]>;
|
|
16
|
+
getApi(): string;
|
|
17
|
+
normalizeTextForLanguage(text: string): string;
|
|
18
|
+
proofreadText(sentence: string): Promise<ITextWithPosition[]>;
|
|
19
|
+
}
|
|
20
|
+
export type ProofreaderType = typeof Proofreader;
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
editor: {
|
|
3
|
-
type: PropType<import('@tiptap/
|
|
3
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
node: {
|
|
7
|
-
type: PropType<import('
|
|
7
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
10
|
decorations: {
|
|
11
|
-
type: PropType<import('@tiptap/vue-3').
|
|
11
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
selected: {
|
|
15
|
-
type: PropType<
|
|
15
|
+
type: globalThis.PropType<boolean>;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
18
|
extension: {
|
|
19
|
-
type: PropType<import('@tiptap/vue-3').
|
|
19
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
22
|
getPos: {
|
|
23
|
-
type: PropType<
|
|
23
|
+
type: globalThis.PropType<() => number>;
|
|
24
24
|
required: true;
|
|
25
25
|
};
|
|
26
26
|
updateAttributes: {
|
|
27
|
-
type: PropType<
|
|
27
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
30
|
deleteNode: {
|
|
31
|
-
type: PropType<
|
|
31
|
+
type: globalThis.PropType<() => void>;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
34
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
35
35
|
editor: {
|
|
36
|
-
type: PropType<import('@tiptap/
|
|
36
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
37
37
|
required: true;
|
|
38
38
|
};
|
|
39
39
|
node: {
|
|
40
|
-
type: PropType<import('
|
|
40
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
41
41
|
required: true;
|
|
42
42
|
};
|
|
43
43
|
decorations: {
|
|
44
|
-
type: PropType<import('@tiptap/vue-3').
|
|
44
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
45
45
|
required: true;
|
|
46
46
|
};
|
|
47
47
|
selected: {
|
|
48
|
-
type: PropType<
|
|
48
|
+
type: globalThis.PropType<boolean>;
|
|
49
49
|
required: true;
|
|
50
50
|
};
|
|
51
51
|
extension: {
|
|
52
|
-
type: PropType<import('@tiptap/vue-3').
|
|
52
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
53
53
|
required: true;
|
|
54
54
|
};
|
|
55
55
|
getPos: {
|
|
56
|
-
type: PropType<
|
|
56
|
+
type: globalThis.PropType<() => number>;
|
|
57
57
|
required: true;
|
|
58
58
|
};
|
|
59
59
|
updateAttributes: {
|
|
60
|
-
type: PropType<
|
|
60
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
61
61
|
required: true;
|
|
62
62
|
};
|
|
63
63
|
deleteNode: {
|
|
64
|
-
type: PropType<
|
|
64
|
+
type: globalThis.PropType<() => void>;
|
|
65
65
|
required: true;
|
|
66
66
|
};
|
|
67
67
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,10 +5,7 @@ export interface GridSize {
|
|
|
5
5
|
export interface CreateTablePayload extends GridSize {
|
|
6
6
|
withHeaderRow: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
9
|
-
trigger?(_: {}): any;
|
|
10
|
-
};
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
8
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
12
9
|
disabled: {
|
|
13
10
|
default: boolean;
|
|
14
11
|
};
|
|
@@ -22,8 +19,9 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
22
19
|
"onCreate-table"?: ((payload: CreateTablePayload) => any) | undefined;
|
|
23
20
|
}>, {
|
|
24
21
|
disabled: boolean;
|
|
25
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any
|
|
26
|
-
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
23
|
+
trigger?(_: {}): any;
|
|
24
|
+
}>;
|
|
27
25
|
export default _default;
|
|
28
26
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
27
|
new (): {
|
|
@@ -26,7 +26,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
26
26
|
action: undefined;
|
|
27
27
|
isActive: undefined;
|
|
28
28
|
}>>> & Readonly<{}>, {
|
|
29
|
-
icon:
|
|
29
|
+
icon: "Bold" | "LoaderCircle" | "Italic" | "Underline" | "Quote" | "TextQuote" | "Strikethrough" | "Minus" | "Eraser" | "PaintRoller" | "Redo2" | "Undo2" | "AlignCenter" | "AlignJustify" | "AlignLeft" | "AlignRight" | "ChevronUp" | "ChevronDown" | "Subscript" | "Superscript" | "Code" | "Code2" | "Type" | "IndentIncrease" | "IndentDecrease" | "List" | "ListOrdered" | "ListTodo" | "Link" | "ImageUp" | "Video" | "Maximize" | "Minimize" | "Table" | "Sparkles" | "Magic" | "Pencil" | "Unlink" | "BetweenHorizonalEnd" | "BetweenHorizonalStart" | "ColumnDelete" | "BetweenVerticalStart" | "BetweenVerticalEnd" | "RowDelete" | "TableCellsMerge" | "TableCellsSplit" | "Trash2" | "Trash" | "Replace" | "ChevronsUpDown" | "LineHeight" | "Word" | "Paragraph" | "Heading1" | "Heading2" | "Heading3" | "Columns2" | "Columns3" | "Columns4" | "Plus" | "Grip" | "Copy" | "Clipboard" | "MenuDown" | "SizeS" | "SizeM" | "SizeL" | "AspectRatio" | "Gaode" | "Baidu" | "Youku" | "BiliBili" | "Modao" | "Lanhu" | "QQVideo" | "Figma" | "Canva" | "Processon" | "Codepen" | "Jinshuju" | "PanelLeft" | "PanelRight" | "Columns" | "AI" | "ChevronRight" | "Paste" | "Cut" | "File" | "Refresh" | "Eye" | "Printer" | "Tablet" | "Phone" | "Monitor" | "TextSelect" | "SpellCheck" | "DocSearch" | "Close" | "ImageSize" | "FlipVertical" | "FlipHorizontal" | "LucidePanelLeft" | "LucidePanelRight";
|
|
30
30
|
color: string;
|
|
31
31
|
disabled: boolean;
|
|
32
32
|
tooltip: string;
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
editor: {
|
|
3
|
-
type: PropType<import('@tiptap/
|
|
3
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
6
|
node: {
|
|
7
|
-
type: PropType<import('
|
|
7
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
8
8
|
required: true;
|
|
9
9
|
};
|
|
10
10
|
decorations: {
|
|
11
|
-
type: PropType<import('@tiptap/vue-3').
|
|
11
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
selected: {
|
|
15
|
-
type: PropType<
|
|
15
|
+
type: globalThis.PropType<boolean>;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
18
|
extension: {
|
|
19
|
-
type: PropType<import('@tiptap/vue-3').
|
|
19
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
20
20
|
required: true;
|
|
21
21
|
};
|
|
22
22
|
getPos: {
|
|
23
|
-
type: PropType<
|
|
23
|
+
type: globalThis.PropType<() => number>;
|
|
24
24
|
required: true;
|
|
25
25
|
};
|
|
26
26
|
updateAttributes: {
|
|
27
|
-
type: PropType<
|
|
27
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
28
28
|
required: true;
|
|
29
29
|
};
|
|
30
30
|
deleteNode: {
|
|
31
|
-
type: PropType<
|
|
31
|
+
type: globalThis.PropType<() => void>;
|
|
32
32
|
required: true;
|
|
33
33
|
};
|
|
34
34
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
35
35
|
editor: {
|
|
36
|
-
type: PropType<import('@tiptap/
|
|
36
|
+
type: globalThis.PropType<import('@tiptap/core').Editor>;
|
|
37
37
|
required: true;
|
|
38
38
|
};
|
|
39
39
|
node: {
|
|
40
|
-
type: PropType<import('
|
|
40
|
+
type: globalThis.PropType<import('prosemirror-model').Node>;
|
|
41
41
|
required: true;
|
|
42
42
|
};
|
|
43
43
|
decorations: {
|
|
44
|
-
type: PropType<import('@tiptap/vue-3').
|
|
44
|
+
type: globalThis.PropType<readonly import('@tiptap/vue-3').DecorationWithType[]>;
|
|
45
45
|
required: true;
|
|
46
46
|
};
|
|
47
47
|
selected: {
|
|
48
|
-
type: PropType<
|
|
48
|
+
type: globalThis.PropType<boolean>;
|
|
49
49
|
required: true;
|
|
50
50
|
};
|
|
51
51
|
extension: {
|
|
52
|
-
type: PropType<import('@tiptap/vue-3').
|
|
52
|
+
type: globalThis.PropType<import('@tiptap/vue-3').Node<any, any>>;
|
|
53
53
|
required: true;
|
|
54
54
|
};
|
|
55
55
|
getPos: {
|
|
56
|
-
type: PropType<
|
|
56
|
+
type: globalThis.PropType<() => number>;
|
|
57
57
|
required: true;
|
|
58
58
|
};
|
|
59
59
|
updateAttributes: {
|
|
60
|
-
type: PropType<
|
|
60
|
+
type: globalThis.PropType<(attributes: Record<string, any>) => void>;
|
|
61
61
|
required: true;
|
|
62
62
|
};
|
|
63
63
|
deleteNode: {
|
|
64
|
-
type: PropType<
|
|
64
|
+
type: globalThis.PropType<() => void>;
|
|
65
65
|
required: true;
|
|
66
66
|
};
|
|
67
67
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -3,6 +3,6 @@ import { PageOption } from '../type';
|
|
|
3
3
|
export declare function useConfigTiptap(config?: {
|
|
4
4
|
page: PageOption;
|
|
5
5
|
}): {
|
|
6
|
-
defaultExtensions: globalThis.ComputedRef<(import('@tiptap/core').Extension<
|
|
6
|
+
defaultExtensions: globalThis.ComputedRef<(import('@tiptap/core').Extension<import('../extensions').BaseKitOptions, any> | import('@tiptap/core').Node<import('../extensions').ClearOptions, any> | import('@tiptap/core').Mark<import('../extensions').LinkOptions, any> | import('@tiptap/core').Extension<import('../extensions').HistoryOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any> | import('@tiptap/core').Node<import('../extensions').TableOptions, any> | import('@tiptap/core').Extension<import('../extensions').FormatPainterOptions, any> | import('@tiptap/core').Node<import('../extensions').ColumnsOptions, any> | import('@tiptap/core').Node<import('../extensions').ImageUploadOptions, any>)[]>;
|
|
7
7
|
content: globalThis.Ref<string, string>;
|
|
8
8
|
};
|
|
@@ -143,8 +143,8 @@ export declare const useTiptapStore: () => {
|
|
|
143
143
|
removeSuperText: (state: Pick<import('./useSuperTextStore').ModalState, "id">) => void;
|
|
144
144
|
superText: import('vue').Reactive<import('./useSuperTextStore').ModalState[]>;
|
|
145
145
|
updateSuperText: (state: import('./useSuperTextStore').ModalState) => void;
|
|
146
|
-
updatePositionSuperText: (state: Pick<import('./useSuperTextStore').ModalState, "
|
|
147
|
-
addMoreSuperText: (text: string, position?: DOMRect) => string;
|
|
146
|
+
updatePositionSuperText: (state: Pick<import('./useSuperTextStore').ModalState, "id" | "position">) => void;
|
|
147
|
+
addMoreSuperText: (text: string, position?: DOMRect | undefined) => string;
|
|
148
148
|
addSuperText: (state: import('./useSuperTextStore').ModalState) => void;
|
|
149
149
|
onUpdatePositionEvent: import('@vueuse/shared').EventHookOn<any>;
|
|
150
150
|
onUpdatePositionTrigger: import('@vueuse/shared').EventHookTrigger<any>;
|
|
@@ -7,10 +7,10 @@ export type ModalState = {
|
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export declare const useSuperTextStore: () => {
|
|
10
|
-
removeSuperText: (state: Pick<ModalState,
|
|
10
|
+
removeSuperText: (state: Pick<ModalState, 'id'>) => void;
|
|
11
11
|
superText: import('vue').Reactive<ModalState[]>;
|
|
12
12
|
updateSuperText: (state: ModalState) => void;
|
|
13
|
-
updatePositionSuperText: (state: Pick<ModalState,
|
|
13
|
+
updatePositionSuperText: (state: Pick<ModalState, 'position' | 'id'>) => void;
|
|
14
14
|
addMoreSuperText: (text: string, position?: DOMRect) => string;
|
|
15
15
|
addSuperText: (state: ModalState) => void;
|
|
16
16
|
onUpdatePositionEvent: import('@vueuse/shared').EventHookOn<any>;
|
package/lib/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { default as ActionButton } from './components/ActionButton.vue';
|
|
|
5
5
|
declare const SBSEditorPlugin: Plugin;
|
|
6
6
|
export * from './extensions';
|
|
7
7
|
export * from './hooks';
|
|
8
|
+
export * from './utils/node-names';
|
|
8
9
|
export type * from './type';
|
|
9
10
|
export { useEditor } from '@tiptap/vue-3';
|
|
10
11
|
export { type Editor as EditorInstance } from '@tiptap/core';
|