vdc-editor 0.0.1
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/README.md +177 -0
- package/lib/index.d.ts +3 -0
- package/lib/src/components/ActionButton.vue.d.ts +90 -0
- package/lib/src/components/ActionDropdownButton.vue.d.ts +67 -0
- package/lib/src/components/ActionDropdownButtonSplit.vue.d.ts +71 -0
- package/lib/src/components/ActionMenuButton.vue.d.ts +62 -0
- package/lib/src/components/ColorPicker.vue.d.ts +51 -0
- package/lib/src/components/CoreEditor.vue.d.ts +162 -0
- package/lib/src/components/SelectContextMenu.vue.d.ts +28 -0
- package/lib/src/components/SuperTextView.vue.d.ts +2 -0
- package/lib/src/components/Toolbar.vue.d.ts +31 -0
- package/lib/src/components/icons/Icon.vue.d.ts +20 -0
- package/lib/src/components/icons/icons.d.ts +106 -0
- package/lib/src/components/icons/index.d.ts +4 -0
- package/lib/src/components/icons/setupIcon.d.ts +1 -0
- package/lib/src/components/menus/BasicBubble.d.ts +59 -0
- package/lib/src/components/menus/ColumnsBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/LinkBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/TableBubbleMenu.vue.d.ts +24 -0
- package/lib/src/components/ui/accordion/index.d.ts +4 -0
- package/lib/src/components/ui/alert/index.d.ts +9 -0
- package/lib/src/components/ui/badge/Badge.vue.d.ts +29 -0
- package/lib/src/components/ui/badge/index.d.ts +7 -0
- package/lib/src/components/ui/button/Button.vue.d.ts +43 -0
- package/lib/src/components/ui/button/index.d.ts +8 -0
- package/lib/src/components/ui/checkbox/Checkbox.vue.d.ts +31 -0
- package/lib/src/components/ui/checkbox/index.d.ts +1 -0
- package/lib/src/components/ui/context-menu/ContextMenu.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/context-menu/ContextMenuContent.vue.d.ts +39 -0
- package/lib/src/components/ui/context-menu/ContextMenuGroup.vue.d.ts +22 -0
- package/lib/src/components/ui/context-menu/ContextMenuItem.vue.d.ts +33 -0
- package/lib/src/components/ui/context-menu/ContextMenuLabel.vue.d.ts +29 -0
- package/lib/src/components/ui/context-menu/ContextMenuRadioGroup.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuRadioItem.vue.d.ts +31 -0
- package/lib/src/components/ui/context-menu/ContextMenuSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/context-menu/ContextMenuShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuSub.vue.d.ts +26 -0
- package/lib/src/components/ui/context-menu/ContextMenuSubContent.vue.d.ts +43 -0
- package/lib/src/components/ui/context-menu/ContextMenuSubTrigger.vue.d.ts +29 -0
- package/lib/src/components/ui/context-menu/ContextMenuTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/context-menu/index.d.ts +14 -0
- package/lib/src/components/ui/dialog/Dialog.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogClose.vue.d.ts +22 -0
- package/lib/src/components/ui/dialog/DialogContent.vue.d.ts +41 -0
- package/lib/src/components/ui/dialog/DialogDescription.vue.d.ts +27 -0
- package/lib/src/components/ui/dialog/DialogFooter.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogHeader.vue.d.ts +26 -0
- package/lib/src/components/ui/dialog/DialogScrollContent.vue.d.ts +41 -0
- package/lib/src/components/ui/dialog/DialogTitle.vue.d.ts +27 -0
- package/lib/src/components/ui/dialog/DialogTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/dialog/index.d.ts +9 -0
- package/lib/src/components/ui/drawer/index.d.ts +8 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +53 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +22 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +29 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +29 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +31 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +26 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +43 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/dropdown-menu/index.d.ts +15 -0
- package/lib/src/components/ui/input/Input.vue.d.ts +25 -0
- package/lib/src/components/ui/input/index.d.ts +1 -0
- package/lib/src/components/ui/label/Label.vue.d.ts +27 -0
- package/lib/src/components/ui/label/index.d.ts +1 -0
- package/lib/src/components/ui/menubar/index.d.ts +15 -0
- package/lib/src/components/ui/popover/Popover.vue.d.ts +26 -0
- package/lib/src/components/ui/popover/PopoverContent.vue.d.ts +58 -0
- package/lib/src/components/ui/popover/PopoverTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/popover/index.d.ts +4 -0
- package/lib/src/components/ui/resizable/ResizableHandle.vue.d.ts +24 -0
- package/lib/src/components/ui/resizable/ResizablePanelGroup.vue.d.ts +31 -0
- package/lib/src/components/ui/resizable/index.d.ts +3 -0
- package/lib/src/components/ui/scroll-area/ScrollArea.vue.d.ts +27 -0
- package/lib/src/components/ui/scroll-area/ScrollBar.vue.d.ts +32 -0
- package/lib/src/components/ui/scroll-area/index.d.ts +2 -0
- package/lib/src/components/ui/select/Select.vue.d.ts +28 -0
- package/lib/src/components/ui/select/SelectContent.vue.d.ts +49 -0
- package/lib/src/components/ui/select/SelectGroup.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectItem.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectItemText.vue.d.ts +22 -0
- package/lib/src/components/ui/select/SelectLabel.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectScrollDownButton.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectScrollUpButton.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/select/SelectTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/select/SelectValue.vue.d.ts +22 -0
- package/lib/src/components/ui/select/index.d.ts +11 -0
- package/lib/src/components/ui/separator/Separator.vue.d.ts +18 -0
- package/lib/src/components/ui/separator/index.d.ts +1 -0
- package/lib/src/components/ui/sheet/index.d.ts +14 -0
- package/lib/src/components/ui/slider/index.d.ts +1 -0
- package/lib/src/components/ui/switch/index.d.ts +1 -0
- package/lib/src/components/ui/tabs/Tabs.vue.d.ts +26 -0
- package/lib/src/components/ui/tabs/TabsContent.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/TabsList.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/TabsTrigger.vue.d.ts +27 -0
- package/lib/src/components/ui/tabs/index.d.ts +4 -0
- package/lib/src/components/ui/textarea/Textarea.vue.d.ts +25 -0
- package/lib/src/components/ui/textarea/index.d.ts +1 -0
- package/lib/src/components/ui/toast/index.d.ts +22 -0
- package/lib/src/components/ui/toast/use-toast.d.ts +349 -0
- package/lib/src/components/ui/toggle/Toggle.vue.d.ts +56 -0
- package/lib/src/components/ui/toggle/index.d.ts +8 -0
- package/lib/src/components/ui/toggle-group/index.d.ts +2 -0
- package/lib/src/components/ui/tooltip/Tooltip.vue.d.ts +26 -0
- package/lib/src/components/ui/tooltip/TooltipContent.vue.d.ts +47 -0
- package/lib/src/components/ui/tooltip/TooltipProvider.vue.d.ts +22 -0
- package/lib/src/components/ui/tooltip/TooltipTrigger.vue.d.ts +22 -0
- package/lib/src/components/ui/tooltip/index.d.ts +4 -0
- package/lib/src/constants/index.d.ts +55 -0
- package/lib/src/extensions/Ai/AI.d.ts +16 -0
- package/lib/src/extensions/Ai/components/AIButton.vue.d.ts +74 -0
- package/lib/src/extensions/Ai/index.d.ts +1 -0
- package/lib/src/extensions/AttributesSetup/AttributesSetup.d.ts +3 -0
- package/lib/src/extensions/AttributesSetup/index.d.ts +1 -0
- package/lib/src/extensions/BaseKit.d.ts +118 -0
- package/lib/src/extensions/Blockquote/Blockquote.d.ts +6 -0
- package/lib/src/extensions/Blockquote/index.d.ts +1 -0
- package/lib/src/extensions/Bold/Bold.d.ts +6 -0
- package/lib/src/extensions/Bold/index.d.ts +1 -0
- package/lib/src/extensions/BulletList/BulletList.d.ts +6 -0
- package/lib/src/extensions/BulletList/components/BulletListMenuButton.vue.d.ts +35 -0
- package/lib/src/extensions/BulletList/index.d.ts +1 -0
- package/lib/src/extensions/Clear/Clear.d.ts +6 -0
- package/lib/src/extensions/Clear/index.d.ts +1 -0
- package/lib/src/extensions/Code/Code.d.ts +6 -0
- package/lib/src/extensions/Code/index.d.ts +1 -0
- package/lib/src/extensions/CodeBlock/CodeBlock.d.ts +6 -0
- package/lib/src/extensions/CodeBlock/components/CodeBlockView.vue.d.ts +68 -0
- package/lib/src/extensions/CodeBlock/index.d.ts +1 -0
- package/lib/src/extensions/Color/Color.d.ts +6 -0
- package/lib/src/extensions/Color/components/ColorActionButton.vue.d.ts +48 -0
- package/lib/src/extensions/Color/index.d.ts +1 -0
- package/lib/src/extensions/Document/Document.d.ts +2 -0
- package/lib/src/extensions/Document/index.d.ts +1 -0
- package/lib/src/extensions/FindAndReplace/FindAndReplace.d.ts +58 -0
- package/lib/src/extensions/FindAndReplace/index.d.ts +1 -0
- package/lib/src/extensions/FontFamily/FontFamily.d.ts +25 -0
- package/lib/src/extensions/FontFamily/components/FontFamilyMenuButton.vue.d.ts +65 -0
- package/lib/src/extensions/FontFamily/index.d.ts +1 -0
- package/lib/src/extensions/FontSize/FontSize.d.ts +32 -0
- package/lib/src/extensions/FontSize/components/FontSizeMenuButton.vue.d.ts +64 -0
- package/lib/src/extensions/FontSize/index.d.ts +1 -0
- package/lib/src/extensions/FormatPainter/FormatPainter.d.ts +24 -0
- package/lib/src/extensions/FormatPainter/index.d.ts +1 -0
- package/lib/src/extensions/Fullscreen/Fullscreen.d.ts +6 -0
- package/lib/src/extensions/Fullscreen/index.d.ts +1 -0
- package/lib/src/extensions/Heading/Heading.d.ts +6 -0
- package/lib/src/extensions/Heading/components/HeadingButton.vue.d.ts +65 -0
- package/lib/src/extensions/Heading/index.d.ts +1 -0
- package/lib/src/extensions/Highlight/Highlight.d.ts +6 -0
- package/lib/src/extensions/Highlight/components/HighlightActionButton.vue.d.ts +49 -0
- package/lib/src/extensions/Highlight/index.d.ts +1 -0
- package/lib/src/extensions/History/History.d.ts +6 -0
- package/lib/src/extensions/History/index.d.ts +1 -0
- package/lib/src/extensions/HorizontalRule/HorizontalRule.d.ts +6 -0
- package/lib/src/extensions/HorizontalRule/index.d.ts +1 -0
- package/lib/src/extensions/IDAttr/IDPlugin.d.ts +4 -0
- package/lib/src/extensions/IDAttr/index.d.ts +1 -0
- package/lib/src/extensions/Iframe/Iframe.d.ts +24 -0
- package/lib/src/extensions/Iframe/embed.d.ts +113 -0
- package/lib/src/extensions/Iframe/index.d.ts +1 -0
- package/lib/src/extensions/Image/Image.d.ts +29 -0
- package/lib/src/extensions/Image/components/ImageView.vue.d.ts +68 -0
- package/lib/src/extensions/Image/index.d.ts +1 -0
- package/lib/src/extensions/ImageUpload/ImageUpload.d.ts +16 -0
- package/lib/src/extensions/ImageUpload/components/ImageUploader.vue.d.ts +68 -0
- package/lib/src/extensions/ImageUpload/index.d.ts +1 -0
- package/lib/src/extensions/ImportWord/ImportWord.d.ts +28 -0
- package/lib/src/extensions/ImportWord/index.d.ts +1 -0
- package/lib/src/extensions/ImportWord/utils.d.ts +2 -0
- package/lib/src/extensions/Indent/Indent.d.ts +23 -0
- package/lib/src/extensions/Indent/index.d.ts +1 -0
- package/lib/src/extensions/Italic/Italic.d.ts +6 -0
- package/lib/src/extensions/Italic/index.d.ts +1 -0
- package/lib/src/extensions/LineHeight/LineHeight.d.ts +17 -0
- package/lib/src/extensions/LineHeight/components/LineHeightDropdown.vue.d.ts +48 -0
- package/lib/src/extensions/LineHeight/index.d.ts +1 -0
- package/lib/src/extensions/Link/Link.d.ts +6 -0
- package/lib/src/extensions/Link/components/LinkEditBlock.vue.d.ts +30 -0
- package/lib/src/extensions/Link/components/LinkEditPopover.vue.d.ts +56 -0
- package/lib/src/extensions/Link/components/LinkViewBlock.vue.d.ts +37 -0
- package/lib/src/extensions/Link/index.d.ts +1 -0
- package/lib/src/extensions/ListItem/ListItem.d.ts +3 -0
- package/lib/src/extensions/ListItem/index.d.ts +1 -0
- package/lib/src/extensions/MoreMark/MoreMark.d.ts +20 -0
- package/lib/src/extensions/MoreMark/components/ActionMoreButton.vue.d.ts +65 -0
- package/lib/src/extensions/MoreMark/index.d.ts +1 -0
- package/lib/src/extensions/MultiColumn/Column.d.ts +4 -0
- package/lib/src/extensions/MultiColumn/Columns.d.ts +22 -0
- package/lib/src/extensions/MultiColumn/index.d.ts +2 -0
- package/lib/src/extensions/OrderedList/OrderedList.d.ts +6 -0
- package/lib/src/extensions/OrderedList/components/OrderedListMenuButton.vue.d.ts +44 -0
- package/lib/src/extensions/OrderedList/index.d.ts +1 -0
- package/lib/src/extensions/Page/computed.d.ts +122 -0
- package/lib/src/extensions/Page/core.d.ts +79 -0
- package/lib/src/extensions/Page/index.d.ts +23 -0
- package/lib/src/extensions/Page/node-view.vue.d.ts +68 -0
- package/lib/src/extensions/Page/page-plugin.d.ts +7 -0
- package/lib/src/extensions/Page/split-block.d.ts +3 -0
- package/lib/src/extensions/Page/split-list-item.d.ts +7 -0
- package/lib/src/extensions/Page/types.d.ts +40 -0
- package/lib/src/extensions/Page/utils.d.ts +48 -0
- package/lib/src/extensions/Preview/Preview.d.ts +13 -0
- package/lib/src/extensions/Preview/index.d.ts +1 -0
- package/lib/src/extensions/Printer/Printer.d.ts +6 -0
- package/lib/src/extensions/Printer/index.d.ts +1 -0
- package/lib/src/extensions/Selection/Selection.d.ts +4 -0
- package/lib/src/extensions/Selection/index.d.ts +1 -0
- package/lib/src/extensions/SlashCommand/CommandsList.vue.d.ts +35 -0
- package/lib/src/extensions/SlashCommand/SlashCommand.d.ts +4 -0
- package/lib/src/extensions/SlashCommand/groups.d.ts +4 -0
- package/lib/src/extensions/SlashCommand/index.d.ts +1 -0
- package/lib/src/extensions/SlashCommand/types.d.ts +26 -0
- package/lib/src/extensions/SpellChecker/hunspell-proofreader.d.ts +16 -0
- package/lib/src/extensions/SpellChecker/i-proofreader-interface.d.ts +10 -0
- package/lib/src/extensions/SpellChecker/index.d.ts +6 -0
- package/lib/src/extensions/SpellChecker/sapling-proofreader.d.ts +13 -0
- package/lib/src/extensions/SpellChecker/spellchecker-extension.d.ts +27 -0
- package/lib/src/extensions/SpellChecker/spellchecker.d.ts +44 -0
- package/lib/src/extensions/Strike/Strike.d.ts +6 -0
- package/lib/src/extensions/Strike/index.d.ts +1 -0
- package/lib/src/extensions/Subscript/Subscript.d.ts +23 -0
- package/lib/src/extensions/Subscript/index.d.ts +1 -0
- package/lib/src/extensions/SuperText/SuperText.d.ts +11 -0
- package/lib/src/extensions/SuperText/components/SuperText.vue.d.ts +68 -0
- package/lib/src/extensions/SuperText/index.d.ts +1 -0
- package/lib/src/extensions/Table/cell-background.d.ts +19 -0
- package/lib/src/extensions/Table/components/CreateTablePopover.vue.d.ts +32 -0
- package/lib/src/extensions/Table/components/TableActionButton.vue.d.ts +53 -0
- package/lib/src/extensions/Table/index.d.ts +7 -0
- package/lib/src/extensions/Table/table.d.ts +24 -0
- package/lib/src/extensions/TaskList/TaskList.d.ts +12 -0
- package/lib/src/extensions/TaskList/index.d.ts +1 -0
- package/lib/src/extensions/TextAlign/TextAlign.d.ts +18 -0
- package/lib/src/extensions/TextAlign/components/TextAlignMenuButton.vue.d.ts +65 -0
- package/lib/src/extensions/TextAlign/index.d.ts +1 -0
- package/lib/src/extensions/TextBubble/TextBubble.d.ts +7 -0
- package/lib/src/extensions/TextBubble/components/TextDropdown.vue.d.ts +49 -0
- package/lib/src/extensions/TextBubble/index.d.ts +1 -0
- package/lib/src/extensions/TrailingNode/TrailingNode.d.ts +12 -0
- package/lib/src/extensions/TrailingNode/index.d.ts +1 -0
- package/lib/src/extensions/UnderLine/Underline.d.ts +6 -0
- package/lib/src/extensions/UnderLine/index.d.ts +1 -0
- package/lib/src/extensions/Video/Video.d.ts +55 -0
- package/lib/src/extensions/Video/index.d.ts +1 -0
- package/lib/src/extensions/VideoUpload/VideoUpload.d.ts +14 -0
- package/lib/src/extensions/VideoUpload/components/VideoUploader.vue.d.ts +68 -0
- package/lib/src/extensions/VideoUpload/index.d.ts +1 -0
- package/lib/src/extensions/index.d.ts +74 -0
- package/lib/src/hooks/index.d.ts +6 -0
- package/lib/src/hooks/useCheckSpellStore.d.ts +9 -0
- package/lib/src/hooks/useConfigTiptap.d.ts +8 -0
- package/lib/src/hooks/useContext.d.ts +21 -0
- package/lib/src/hooks/useHotkeys.d.ts +4 -0
- package/lib/src/hooks/useNodePosition.d.ts +7 -0
- package/lib/src/hooks/useStore.d.ts +160 -0
- package/lib/src/hooks/useSuperTextStore.d.ts +20 -0
- package/lib/src/i18n.d.ts +337 -0
- package/lib/src/index.d.ts +12 -0
- package/lib/src/plugins/image-upload.d.ts +12 -0
- package/lib/src/type.d.ts +145 -0
- package/lib/src/utils/content.d.ts +4 -0
- package/lib/src/utils/getRenderContainer.d.ts +4 -0
- package/lib/src/utils/indent.d.ts +15 -0
- package/lib/src/utils/is-mobile.d.ts +19 -0
- package/lib/src/utils/line-height.d.ts +7 -0
- package/lib/src/utils/loadFonts.d.ts +1 -0
- package/lib/src/utils/mitt.d.ts +24 -0
- package/lib/src/utils/node-names.d.ts +31 -0
- package/lib/src/utils/plateform.d.ts +11 -0
- package/lib/src/utils/utils.d.ts +18 -0
- package/lib/src/utils.d.ts +3 -0
- package/lib/style.css +1 -0
- package/lib/vdc-editor.mjs +61980 -0
- package/lib/vdc-editor.umd.js +197 -0
- package/lib/vite.config.d.ts +2 -0
- package/package.json +174 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
editor: {
|
|
3
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
node: {
|
|
7
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
decorations: {
|
|
11
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
selected: {
|
|
15
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
extension: {
|
|
19
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
getPos: {
|
|
23
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
updateAttributes: {
|
|
27
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
deleteNode: {
|
|
31
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
35
|
+
editor: {
|
|
36
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
node: {
|
|
40
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
decorations: {
|
|
44
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
selected: {
|
|
48
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
extension: {
|
|
52
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
getPos: {
|
|
56
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
updateAttributes: {
|
|
60
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
deleteNode: {
|
|
64
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
3
|
+
import { PageState } from './types';
|
|
4
|
+
import { PageOption } from '../../type';
|
|
5
|
+
|
|
6
|
+
export declare const paginationPluginKey: PluginKey<any>;
|
|
7
|
+
export declare const pagePlugin: (editor: Editor, pageOpt: PageOption) => Plugin<PageState>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NodeViewRenderer } from '@tiptap/core';
|
|
2
|
+
import { Attrs, Node, NodeType, Schema } from '@tiptap/pm/model';
|
|
3
|
+
import { Transaction } from '@tiptap/pm/state';
|
|
4
|
+
import { SplitContext } from './computed';
|
|
5
|
+
|
|
6
|
+
export type ComputedFn = (splitContex: SplitContext, node: Node, pos: number, parent: Node | null, dom: HTMLElement, startIndex: number, forcePageId: string, i: number) => boolean;
|
|
7
|
+
export type NodesComputed = Record<string, ComputedFn>;
|
|
8
|
+
export interface PageOptions {
|
|
9
|
+
SystemAttributes: Record<string, any>;
|
|
10
|
+
nodesComputed: NodesComputed;
|
|
11
|
+
View: NodeViewRenderer;
|
|
12
|
+
types: string[];
|
|
13
|
+
slots: any;
|
|
14
|
+
}
|
|
15
|
+
export interface SplitInfo {
|
|
16
|
+
pos: number;
|
|
17
|
+
depth: number;
|
|
18
|
+
attributes?: Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
export interface SplitParams {
|
|
21
|
+
pos: number;
|
|
22
|
+
depth?: number;
|
|
23
|
+
typesAfter?: ({
|
|
24
|
+
type: NodeType;
|
|
25
|
+
attrs?: Attrs | null;
|
|
26
|
+
} | null)[];
|
|
27
|
+
schema: Schema;
|
|
28
|
+
force: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare class PageState {
|
|
31
|
+
bodyOptions: any;
|
|
32
|
+
deleting: boolean;
|
|
33
|
+
inserting: boolean;
|
|
34
|
+
splitPage: boolean;
|
|
35
|
+
initSplit: boolean;
|
|
36
|
+
scrollHeight: number;
|
|
37
|
+
runState: boolean;
|
|
38
|
+
constructor(deleting: boolean, inserting: boolean, splitPage: boolean, initSplit: boolean, scrollHeight: number, runState?: boolean);
|
|
39
|
+
transform(tr: Transaction): PageState;
|
|
40
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Node, NodeType } from '@tiptap/pm/model';
|
|
2
|
+
import { NodeSelection } from '@tiptap/pm/state';
|
|
3
|
+
import { EditorView } from '@tiptap/pm/view';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generates a random ID.
|
|
7
|
+
* @returns {string} - A random string ID.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getId(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Finds the parent DOM reference of a specific node type.
|
|
12
|
+
*/
|
|
13
|
+
export declare const findParentDomRefOfType: (nodeType: NodeType, domAtPos: EditorView["domAtPos"]) => (selection: NodeSelection) => ChildNode | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the node type matches the specified type.
|
|
16
|
+
*/
|
|
17
|
+
export declare const equalNodeType: (nodeType: NodeType, node: Node) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Finds the parent DOM reference based on a predicate.
|
|
20
|
+
*/
|
|
21
|
+
export declare const findParentDomRef: (predicate: (node: Node) => boolean, domAtPos: EditorView["domAtPos"]) => (selection: NodeSelection) => ChildNode | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Finds the DOM reference at a given position.
|
|
24
|
+
*/
|
|
25
|
+
export declare const findDomRefAtPos: (position: number, domAtPos: EditorView["domAtPos"]) => ChildNode;
|
|
26
|
+
/**
|
|
27
|
+
* Finds the parent node based on a predicate.
|
|
28
|
+
*/
|
|
29
|
+
export declare const findParentNode: (predicate: (node: Node) => boolean) => ({ $from }: {
|
|
30
|
+
$from: any;
|
|
31
|
+
}) => {
|
|
32
|
+
pos: any;
|
|
33
|
+
start: any;
|
|
34
|
+
depth: any;
|
|
35
|
+
node: any;
|
|
36
|
+
} | null;
|
|
37
|
+
/**
|
|
38
|
+
* Finds the parent node closest to a given position.
|
|
39
|
+
* @param {any} $pos - The position in the document.
|
|
40
|
+
* @param {function} predicate - Predicate to determine the parent node.
|
|
41
|
+
* @returns {Object|null} - The parent node and its details if found, or null.
|
|
42
|
+
*/
|
|
43
|
+
export declare const findParentNodeClosestToPos: ($pos: any, predicate: (node: Node) => boolean) => {
|
|
44
|
+
pos: any;
|
|
45
|
+
start: any;
|
|
46
|
+
depth: any;
|
|
47
|
+
node: any;
|
|
48
|
+
} | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { GeneralOptions } from '../../type';
|
|
3
|
+
|
|
4
|
+
declare module '@tiptap/core' {
|
|
5
|
+
interface Commands<ReturnType> {
|
|
6
|
+
preview: {
|
|
7
|
+
togglePreview: () => ReturnType;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export interface PreviewOptions extends GeneralOptions<PreviewOptions> {
|
|
12
|
+
}
|
|
13
|
+
export declare const Preview: Extension<PreviewOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Preview';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Printer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Selection';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MenuListProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare function onKeyDown({ event }: {
|
|
4
|
+
event: any;
|
|
5
|
+
}): boolean;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuListProps>, {
|
|
7
|
+
items: undefined;
|
|
8
|
+
command: undefined;
|
|
9
|
+
}>>, {
|
|
10
|
+
onKeyDown: typeof onKeyDown;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuListProps>, {
|
|
12
|
+
items: undefined;
|
|
13
|
+
command: undefined;
|
|
14
|
+
}>>> & Readonly<{}>, {
|
|
15
|
+
command: (command: import('./types').Command) => void;
|
|
16
|
+
items: import('./types').Group[];
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
+
} : {
|
|
24
|
+
type: import('vue').PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type __VLS_WithDefaults<P, D> = {
|
|
29
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
30
|
+
default: D[K];
|
|
31
|
+
}> : P[K];
|
|
32
|
+
};
|
|
33
|
+
type __VLS_Prettify<T> = {
|
|
34
|
+
[K in keyof T]: T[K];
|
|
35
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SlashCommand';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Editor, Range } from '@tiptap/core';
|
|
2
|
+
import { icons } from '../../components/icons/icons';
|
|
3
|
+
|
|
4
|
+
export interface Group {
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
commands: Command[];
|
|
8
|
+
}
|
|
9
|
+
export interface Command {
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
aliases?: string[];
|
|
14
|
+
iconName?: keyof typeof icons;
|
|
15
|
+
iconUrl?: string;
|
|
16
|
+
action: ({ editor, range }: {
|
|
17
|
+
editor: Editor;
|
|
18
|
+
range: Range;
|
|
19
|
+
}) => void;
|
|
20
|
+
shouldBeHidden?: (editor: Editor) => boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface MenuListProps {
|
|
23
|
+
editor: Editor;
|
|
24
|
+
items: Group[];
|
|
25
|
+
command: (command: Command) => void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Typo } from 'typo-js-ts';
|
|
2
|
+
import { IProofreaderInterface, ITextWithPosition } from './i-proofreader-interface';
|
|
3
|
+
import { Hunspell } from 'hunspell-asm';
|
|
4
|
+
|
|
5
|
+
export interface WordList {
|
|
6
|
+
[word: string]: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class Proofreader implements IProofreaderInterface {
|
|
9
|
+
private hunspell;
|
|
10
|
+
private typo;
|
|
11
|
+
constructor(typo: Typo | null, hunspell: Hunspell | null);
|
|
12
|
+
getSuggestions(word: string): Promise<string[]>;
|
|
13
|
+
normalizeTextForLanguage(text: string): string;
|
|
14
|
+
proofreadText(sentence: string): Promise<ITextWithPosition[]>;
|
|
15
|
+
private tokenizeString;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ITextWithPosition {
|
|
2
|
+
offset: number;
|
|
3
|
+
length: number;
|
|
4
|
+
word: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IProofreaderInterface {
|
|
7
|
+
proofreadText(sentence: string): Promise<ITextWithPosition[]>;
|
|
8
|
+
getSuggestions(word: string): Promise<string[]>;
|
|
9
|
+
normalizeTextForLanguage(text: string): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SpellcheckerExtension } from './spellchecker-extension';
|
|
2
|
+
import { IProofreaderInterface, ITextWithPosition } from './i-proofreader-interface';
|
|
3
|
+
|
|
4
|
+
export default SpellcheckerExtension;
|
|
5
|
+
export { Proofreader } from './sapling-proofreader';
|
|
6
|
+
export type { IProofreaderInterface, ITextWithPosition };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IProofreaderInterface, ITextWithPosition } from './i-proofreader-interface';
|
|
2
|
+
|
|
3
|
+
export interface WordList {
|
|
4
|
+
[word: string]: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class Proofreader implements IProofreaderInterface {
|
|
7
|
+
private suggestions;
|
|
8
|
+
constructor();
|
|
9
|
+
setSuggestions(data: any): void;
|
|
10
|
+
getSuggestions(word: string): Promise<string[]>;
|
|
11
|
+
normalizeTextForLanguage(text: string): string;
|
|
12
|
+
proofreadText(sentence: string): Promise<ITextWithPosition[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { IProofreaderInterface } from './i-proofreader-interface';
|
|
3
|
+
import { default as Spellchecker } from './spellchecker';
|
|
4
|
+
|
|
5
|
+
export declare const SPELLCHECKER_TRANSACTION = "spellchecker-transation";
|
|
6
|
+
export declare const LOADING_TRANSACTION = "loading";
|
|
7
|
+
export interface IUiStrings {
|
|
8
|
+
noSuggestions?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ISpellcheckerOptions {
|
|
11
|
+
proofreader?: IProofreaderInterface;
|
|
12
|
+
uiStrings?: IUiStrings;
|
|
13
|
+
onShowSuggestionsEvent?: (word: string) => void;
|
|
14
|
+
}
|
|
15
|
+
interface ISpellcheckerStorage {
|
|
16
|
+
didPaste: boolean;
|
|
17
|
+
spellchecker?: Spellchecker;
|
|
18
|
+
}
|
|
19
|
+
declare module '@tiptap/core' {
|
|
20
|
+
interface Commands<ReturnType> {
|
|
21
|
+
spellchecker: {
|
|
22
|
+
checkSpelling: () => ReturnType;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare const SpellcheckerExtension: Extension<ISpellcheckerOptions, ISpellcheckerStorage>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Node } from 'prosemirror-model';
|
|
2
|
+
import { Transaction } from 'prosemirror-state';
|
|
3
|
+
import { DecorationSet, EditorView } from 'prosemirror-view';
|
|
4
|
+
import { IProofreaderInterface } from './i-proofreader-interface';
|
|
5
|
+
import { IUiStrings } from './spellchecker-extension';
|
|
6
|
+
|
|
7
|
+
export default class Spellchecker {
|
|
8
|
+
get completeProofreadingDone(): boolean;
|
|
9
|
+
debouncedProofreadDoc: import('lodash').DebouncedFunc<(doc: Node) => void>;
|
|
10
|
+
debouncedGetMatchAndSetDecorations: import('lodash').DebouncedFunc<(node: Node, text: string, originalFrom: number) => Promise<void>>;
|
|
11
|
+
debouncedClickEventsListener: import('lodash').DebouncedFunc<(e: Event) => Promise<false | undefined>>;
|
|
12
|
+
debouncedAcceptSuggestionEventsListener: import('lodash').DebouncedFunc<(e: Event) => void>;
|
|
13
|
+
private proofreader;
|
|
14
|
+
private uiStrings?;
|
|
15
|
+
private showSuggestionsEvent?;
|
|
16
|
+
private decorationSet;
|
|
17
|
+
private editorView?;
|
|
18
|
+
private isInitialProofreadingDone;
|
|
19
|
+
private lastOriginalFrom;
|
|
20
|
+
private readonly suggestionBox;
|
|
21
|
+
constructor(proofreader: IProofreaderInterface, uiStrings?: IUiStrings, showSuggestionsEvent?: (word: string) => void);
|
|
22
|
+
setDecorationSet(decorationSet: DecorationSet): void;
|
|
23
|
+
getDecorationSet(): DecorationSet;
|
|
24
|
+
setEditorView(editorView: EditorView): void;
|
|
25
|
+
getEditorView(): EditorView | undefined;
|
|
26
|
+
getSuggestionBox(): HTMLDivElement;
|
|
27
|
+
hideSuggestionBox(): void;
|
|
28
|
+
/**
|
|
29
|
+
* This function is called on initial load of the editor and when content is pasted into the editor.
|
|
30
|
+
* For manual modificaitons, only the changed nodes are spellchecked again.
|
|
31
|
+
*
|
|
32
|
+
* @param doc
|
|
33
|
+
*/
|
|
34
|
+
proofreadDoc(doc: Node): void;
|
|
35
|
+
getMatchAndSetDecorations(node: Node, text: string, originalFrom: number): Promise<void>;
|
|
36
|
+
addEventListenersToDecorations(): void;
|
|
37
|
+
addEventListenersToSuggestionBox(): void;
|
|
38
|
+
dispatch(tr: Transaction): void;
|
|
39
|
+
findChangedTextNodes(node: Node, pos: number, from: number, to: number): false | undefined;
|
|
40
|
+
onNodeChanged(node: Node, text: string, originalFrom: number): void;
|
|
41
|
+
private clickEventsListener;
|
|
42
|
+
private acceptSuggestionListener;
|
|
43
|
+
private addSuggestionsList;
|
|
44
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StrikeOptions as TiptapStrikeOptions } from '@tiptap/extension-strike';
|
|
2
|
+
import { GeneralOptions } from '../../type';
|
|
3
|
+
|
|
4
|
+
export interface StrikeOptions extends TiptapStrikeOptions, GeneralOptions<StrikeOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Strike: import('@tiptap/core').Mark<StrikeOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Strike';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import { SubscriptExtensionOptions as TiptapSubscriptOptions } from '@tiptap/extension-subscript';
|
|
3
|
+
import { SuperscriptExtensionOptions as TiptapSuperscriptOptions } from '@tiptap/extension-superscript';
|
|
4
|
+
import { GeneralOptions } from '../../type';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Represents the interface for subscript and superscript options, extending GeneralOptions.
|
|
8
|
+
*/
|
|
9
|
+
export interface SubAndSuperScriptOptions extends GeneralOptions<SubAndSuperScriptOptions> {
|
|
10
|
+
/**
|
|
11
|
+
* subscript options or false, indicating whether subscript is enabled
|
|
12
|
+
*
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
subscript: Partial<TiptapSubscriptOptions> | false;
|
|
16
|
+
/**
|
|
17
|
+
* superscript options or false, indicating whether superscript is enabled
|
|
18
|
+
*
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
superscript: Partial<TiptapSuperscriptOptions> | false;
|
|
22
|
+
}
|
|
23
|
+
export declare const SubAndSuperScript: Extension<SubAndSuperScriptOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Subscript';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
editor: {
|
|
3
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
node: {
|
|
7
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
decorations: {
|
|
11
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
selected: {
|
|
15
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
extension: {
|
|
19
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
getPos: {
|
|
23
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
updateAttributes: {
|
|
27
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
deleteNode: {
|
|
31
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
35
|
+
editor: {
|
|
36
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
node: {
|
|
40
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
|
|
41
|
+
required: true;
|
|
42
|
+
};
|
|
43
|
+
decorations: {
|
|
44
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
selected: {
|
|
48
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
extension: {
|
|
52
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
getPos: {
|
|
56
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
updateAttributes: {
|
|
60
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
deleteNode: {
|
|
64
|
+
type: PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SuperText';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command, Extension } from '@tiptap/core';
|
|
2
|
+
import { Transaction } from '@tiptap/pm/state';
|
|
3
|
+
|
|
4
|
+
export type TableCellBackgroundOptions = {
|
|
5
|
+
HTMLAttributes: Record<string, any>;
|
|
6
|
+
types?: any;
|
|
7
|
+
};
|
|
8
|
+
declare module '@tiptap/core' {
|
|
9
|
+
interface Commands<ReturnType> {
|
|
10
|
+
tableCellBackground: {
|
|
11
|
+
setTableCellBackground: (color: string) => ReturnType;
|
|
12
|
+
unsetTableCellBackground: () => ReturnType;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export declare const setCellBackgroundMarkup: (tr: Transaction, pos: number, backgroundColor: string) => Transaction;
|
|
17
|
+
export declare const updateCellBackground: (tr: Transaction, options: TableCellBackgroundOptions, backgroundColor: string) => Transaction;
|
|
18
|
+
export declare const createCellBackgroundCommand: (backgroundColor: string, options: TableCellBackgroundOptions) => Command;
|
|
19
|
+
export declare const TableCellBackground: Extension<TableCellBackgroundOptions, any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface GridSize {
|
|
2
|
+
rows: number;
|
|
3
|
+
cols: number;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateTablePayload extends GridSize {
|
|
6
|
+
withHeaderRow: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
trigger?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
12
|
+
disabled: {
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"create-table": (payload: CreateTablePayload) => void;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
+
disabled: {
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
"onCreate-table"?: ((payload: CreateTablePayload) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
import { ButtonViewReturnComponentProps } from '../../../type';
|
|
3
|
+
import { icons } from '../../../components/icons';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
icon?: keyof typeof icons;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
color?: string;
|
|
11
|
+
action?: ButtonViewReturnComponentProps['action'];
|
|
12
|
+
isActive?: ButtonViewReturnComponentProps['isActive'];
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
15
|
+
icon: undefined;
|
|
16
|
+
tooltip: undefined;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
color: undefined;
|
|
19
|
+
action: undefined;
|
|
20
|
+
isActive: undefined;
|
|
21
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
22
|
+
icon: undefined;
|
|
23
|
+
tooltip: undefined;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
color: undefined;
|
|
26
|
+
action: undefined;
|
|
27
|
+
isActive: undefined;
|
|
28
|
+
}>>> & Readonly<{}>, {
|
|
29
|
+
icon: keyof typeof icons;
|
|
30
|
+
color: string;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
tooltip: string;
|
|
33
|
+
action: (value?: any) => void;
|
|
34
|
+
isActive: () => boolean;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
38
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
39
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
40
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
41
|
+
} : {
|
|
42
|
+
type: import('vue').PropType<T[K]>;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
type __VLS_WithDefaults<P, D> = {
|
|
47
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
48
|
+
default: D[K];
|
|
49
|
+
}> : P[K];
|
|
50
|
+
};
|
|
51
|
+
type __VLS_Prettify<T> = {
|
|
52
|
+
[K in keyof T]: T[K];
|
|
53
|
+
} & {};
|