vix-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/LICENSE +21 -0
- package/README.md +122 -0
- package/README.zh-CN.md +121 -0
- package/lib/en_Us-CzkSpEfR.mjs +214 -0
- package/lib/index.d.ts +3 -0
- package/lib/src/components/ActionButton.vue.d.ts +86 -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/EchoEditor.vue.d.ts +99 -0
- package/lib/src/components/FindAndReplace.vue.d.ts +43 -0
- package/lib/src/components/Menubars.vue.d.ts +31 -0
- package/lib/src/components/Preview.vue.d.ts +31 -0
- package/lib/src/components/Printer.vue.d.ts +31 -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 +116 -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/AIMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/BasicBubble.d.ts +59 -0
- package/lib/src/components/menus/BasicBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/ColumnsBubbleMenu.vue.d.ts +31 -0
- package/lib/src/components/menus/ContentMenu.vue.d.ts +40 -0
- package/lib/src/components/menus/ImageBubbleMenu.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/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/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 +57 -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 +57 -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/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 +69 -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 +59 -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/menu/MenuCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/menu/MenuItem.vue.d.ts +29 -0
- package/lib/src/components/ui/menu/MenuSeparator.vue.d.ts +17 -0
- package/lib/src/components/ui/menu/MenuShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/menu/index.d.ts +5 -0
- package/lib/src/components/ui/menu.vue.d.ts +28 -0
- package/lib/src/components/ui/menubar/Menubar.vue.d.ts +31 -0
- package/lib/src/components/ui/menubar/MenubarCheckboxItem.vue.d.ts +33 -0
- package/lib/src/components/ui/menubar/MenubarContent.vue.d.ts +47 -0
- package/lib/src/components/ui/menubar/MenubarGroup.vue.d.ts +22 -0
- package/lib/src/components/ui/menubar/MenubarItem.vue.d.ts +33 -0
- package/lib/src/components/ui/menubar/MenubarLabel.vue.d.ts +29 -0
- package/lib/src/components/ui/menubar/MenubarMenu.vue.d.ts +22 -0
- package/lib/src/components/ui/menubar/MenubarRadioGroup.vue.d.ts +26 -0
- package/lib/src/components/ui/menubar/MenubarRadioItem.vue.d.ts +31 -0
- package/lib/src/components/ui/menubar/MenubarSeparator.vue.d.ts +18 -0
- package/lib/src/components/ui/menubar/MenubarShortcut.vue.d.ts +26 -0
- package/lib/src/components/ui/menubar/MenubarSub.vue.d.ts +28 -0
- package/lib/src/components/ui/menubar/MenubarSubContent.vue.d.ts +59 -0
- package/lib/src/components/ui/menubar/MenubarSubTrigger.vue.d.ts +29 -0
- package/lib/src/components/ui/menubar/MenubarTrigger.vue.d.ts +27 -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 +74 -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 +53 -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 +20 -0
- package/lib/src/components/ui/separator/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/toast/Toast.vue.d.ts +104 -0
- package/lib/src/components/ui/toast/ToastAction.vue.d.ts +27 -0
- package/lib/src/components/ui/toast/ToastClose.vue.d.ts +18 -0
- package/lib/src/components/ui/toast/ToastDescription.vue.d.ts +27 -0
- package/lib/src/components/ui/toast/ToastProvider.vue.d.ts +22 -0
- package/lib/src/components/ui/toast/ToastTitle.vue.d.ts +27 -0
- package/lib/src/components/ui/toast/ToastViewport.vue.d.ts +18 -0
- package/lib/src/components/ui/toast/Toaster.vue.d.ts +2 -0
- package/lib/src/components/ui/toast/index.d.ts +22 -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/ToggleGroup.vue.d.ts +38 -0
- package/lib/src/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +34 -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-en.d.ts +41 -0
- package/lib/src/constants/index.d.ts +41 -0
- package/lib/src/extensions/AI/AI.d.ts +27 -0
- package/lib/src/extensions/AI/components/AIButton.vue.d.ts +74 -0
- package/lib/src/extensions/AI/constants.d.ts +7 -0
- package/lib/src/extensions/AI/index.d.ts +1 -0
- package/lib/src/extensions/BaseKit.d.ts +113 -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/Card/card.d.ts +16 -0
- package/lib/src/extensions/Card/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 +21 -0
- package/lib/src/extensions/CodeBlock/components/NodeView.vue.d.ts +93 -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/EChartsView/EChartsView.d.ts +3 -0
- package/lib/src/extensions/EChartsView/components/ChartView.vue.d.ts +2 -0
- package/lib/src/extensions/EChartsView/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 +43 -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 +13 -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 +52 -0
- package/lib/src/extensions/Heading/index.d.ts +1 -0
- package/lib/src/extensions/Heading/types.d.ts +15 -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/HighlightParagraph/HighlightParagraph.d.ts +19 -0
- package/lib/src/extensions/HighlightParagraph/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/Iframe/Iframe.d.ts +23 -0
- package/lib/src/extensions/Iframe/IframeNodeView.vue.d.ts +92 -0
- package/lib/src/extensions/Iframe/embed.d.ts +120 -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 +92 -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 +92 -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/Mention/index.d.ts +1 -0
- package/lib/src/extensions/Mention/mention.d.ts +108 -0
- package/lib/src/extensions/Mention/utils/get-default-suggestion-attributes.d.ts +38 -0
- package/lib/src/extensions/MoreMark/MoreMark.d.ts +20 -0
- package/lib/src/extensions/MoreMark/components/ActionMoreButton.vue.d.ts +52 -0
- package/lib/src/extensions/MoreMark/index.d.ts +1 -0
- package/lib/src/extensions/MoreMark/types.d.ts +15 -0
- package/lib/src/extensions/MultiColumn/Column.d.ts +4 -0
- package/lib/src/extensions/MultiColumn/Columns.d.ts +26 -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/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/ReferenceDot/ReferenceDot.d.ts +4 -0
- package/lib/src/extensions/ReferenceDot/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/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/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 +92 -0
- package/lib/src/extensions/VideoUpload/index.d.ts +1 -0
- package/lib/src/extensions/index.d.ts +80 -0
- package/lib/src/hooks/index.d.ts +4 -0
- package/lib/src/hooks/useAIConversation.d.ts +19 -0
- package/lib/src/hooks/useContext.d.ts +21 -0
- package/lib/src/hooks/useEditorFocus.d.ts +17 -0
- package/lib/src/hooks/useHotkeys.d.ts +4 -0
- package/lib/src/hooks/useStore.d.ts +50 -0
- package/lib/src/index.d.ts +14 -0
- package/lib/src/lib/utils.d.ts +7 -0
- package/lib/src/locales/index.d.ts +31 -0
- package/lib/src/locales/locales/en.d.ts +2 -0
- package/lib/src/locales/locales/zh.d.ts +2 -0
- package/lib/src/plugins/DragHandle/index.d.ts +20 -0
- package/lib/src/plugins/DragHandle/range.d.ts +32 -0
- package/lib/src/plugins/DragHandle/utils.d.ts +17 -0
- package/lib/src/plugins/image-upload.d.ts +12 -0
- package/lib/src/type.d.ts +172 -0
- package/lib/src/utils/content.d.ts +3 -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/mitt.d.ts +24 -0
- package/lib/src/utils/plateform.d.ts +11 -0
- package/lib/src/utils/themeIcons.d.ts +6 -0
- package/lib/src/utils/utils.d.ts +21 -0
- package/lib/src/utils.d.ts +3 -0
- package/lib/style.css +1 -0
- package/lib/vite.config.d.ts +2 -0
- package/lib/vix-editor.mjs +98018 -0
- package/lib/zh_CN-3QknuiII.mjs +212 -0
- package/package.json +157 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
editor: Editor;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
maxHeight?: string | number;
|
|
8
|
+
icon?: any;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
color: undefined;
|
|
14
|
+
maxHeight: undefined;
|
|
15
|
+
icon: undefined;
|
|
16
|
+
tooltip: string;
|
|
17
|
+
items: () => never[];
|
|
18
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
color: undefined;
|
|
21
|
+
maxHeight: undefined;
|
|
22
|
+
icon: undefined;
|
|
23
|
+
tooltip: string;
|
|
24
|
+
items: () => never[];
|
|
25
|
+
}>>> & Readonly<{}>, {
|
|
26
|
+
icon: any;
|
|
27
|
+
color: string;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
tooltip: string;
|
|
30
|
+
maxHeight: string | number;
|
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
34
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
35
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
|
+
} : {
|
|
38
|
+
type: import('vue').PropType<T[K]>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
type __VLS_WithDefaults<P, D> = {
|
|
43
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
44
|
+
default: D[K];
|
|
45
|
+
}> : P[K];
|
|
46
|
+
};
|
|
47
|
+
type __VLS_Prettify<T> = {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextBubble';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Extension based on:
|
|
5
|
+
* - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
|
|
6
|
+
* - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
|
|
7
|
+
*/
|
|
8
|
+
export interface TrailingNodeOptions {
|
|
9
|
+
node: string;
|
|
10
|
+
notAfter: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const TrailingNode: Extension<TrailingNodeOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TrailingNode';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UnderlineOptions as TiptapUnderlineOptions } from '@tiptap/extension-underline';
|
|
2
|
+
import { GeneralOptions } from '../../type';
|
|
3
|
+
|
|
4
|
+
export interface UnderlineOptions extends TiptapUnderlineOptions, GeneralOptions<UnderlineOptions> {
|
|
5
|
+
}
|
|
6
|
+
export declare const Underline: import('@tiptap/core').Mark<UnderlineOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Underline';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents the interface for video options, extending GeneralOptions.
|
|
5
|
+
*/
|
|
6
|
+
export interface VideoOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Indicates whether fullscreen play is allowed
|
|
9
|
+
*
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
allowFullscreen: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether to display the frameborder
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
frameborder: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Width of the video, can be a number or string
|
|
21
|
+
*
|
|
22
|
+
* @default VIDEO_SIZE['size-medium']
|
|
23
|
+
*/
|
|
24
|
+
width: number | string;
|
|
25
|
+
/** HTML attributes object for passing additional attributes */
|
|
26
|
+
HTMLAttributes: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
upload?: (file: File) => Promise<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents the type for setting video options
|
|
33
|
+
*/
|
|
34
|
+
type SetVideoOptions = {
|
|
35
|
+
/** The source URL of the video */
|
|
36
|
+
src: string;
|
|
37
|
+
/** The width of the video */
|
|
38
|
+
width: string | number;
|
|
39
|
+
};
|
|
40
|
+
declare module '@tiptap/core' {
|
|
41
|
+
interface Commands<ReturnType> {
|
|
42
|
+
video: {
|
|
43
|
+
/**
|
|
44
|
+
* Add an video
|
|
45
|
+
*/
|
|
46
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
47
|
+
/**
|
|
48
|
+
* Update an video
|
|
49
|
+
*/
|
|
50
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export declare const Video: Node<VideoOptions, any>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Video';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Node } from '@tiptap/vue-3';
|
|
2
|
+
|
|
3
|
+
export interface VideoOptions {
|
|
4
|
+
upload?: (files: File[]) => void;
|
|
5
|
+
}
|
|
6
|
+
declare module '@tiptap/core' {
|
|
7
|
+
interface Commands<ReturnType> {
|
|
8
|
+
videoUpload: {
|
|
9
|
+
setVideoUpload: () => ReturnType;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare const VideoUpload: Node<VideoOptions, any>;
|
|
14
|
+
export default VideoUpload;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
editor: {
|
|
3
|
+
type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
node: {
|
|
7
|
+
type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
decorations: {
|
|
11
|
+
type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
selected: {
|
|
15
|
+
type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
extension: {
|
|
19
|
+
type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
getPos: {
|
|
23
|
+
type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
updateAttributes: {
|
|
27
|
+
type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
deleteNode: {
|
|
31
|
+
type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
view: {
|
|
35
|
+
type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
innerDecorations: {
|
|
39
|
+
type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
HTMLAttributes: {
|
|
43
|
+
type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
47
|
+
editor: {
|
|
48
|
+
type: PropType<import('@tiptap/core').NodeViewProps["editor"]>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
node: {
|
|
52
|
+
type: PropType<import('@tiptap/core').NodeViewProps["node"]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
decorations: {
|
|
56
|
+
type: PropType<import('@tiptap/core').NodeViewProps["decorations"]>;
|
|
57
|
+
required: true;
|
|
58
|
+
};
|
|
59
|
+
selected: {
|
|
60
|
+
type: PropType<import('@tiptap/core').NodeViewProps["selected"]>;
|
|
61
|
+
required: true;
|
|
62
|
+
};
|
|
63
|
+
extension: {
|
|
64
|
+
type: PropType<import('@tiptap/core').NodeViewProps["extension"]>;
|
|
65
|
+
required: true;
|
|
66
|
+
};
|
|
67
|
+
getPos: {
|
|
68
|
+
type: PropType<import('@tiptap/core').NodeViewProps["getPos"]>;
|
|
69
|
+
required: true;
|
|
70
|
+
};
|
|
71
|
+
updateAttributes: {
|
|
72
|
+
type: PropType<import('@tiptap/core').NodeViewProps["updateAttributes"]>;
|
|
73
|
+
required: true;
|
|
74
|
+
};
|
|
75
|
+
deleteNode: {
|
|
76
|
+
type: PropType<import('@tiptap/core').NodeViewProps["deleteNode"]>;
|
|
77
|
+
required: true;
|
|
78
|
+
};
|
|
79
|
+
view: {
|
|
80
|
+
type: PropType<import('@tiptap/core').NodeViewProps["view"]>;
|
|
81
|
+
required: true;
|
|
82
|
+
};
|
|
83
|
+
innerDecorations: {
|
|
84
|
+
type: PropType<import('@tiptap/core').NodeViewProps["innerDecorations"]>;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
HTMLAttributes: {
|
|
88
|
+
type: PropType<import('@tiptap/core').NodeViewProps["HTMLAttributes"]>;
|
|
89
|
+
required: true;
|
|
90
|
+
};
|
|
91
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VideoUpload';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export { Bold } from './Bold';
|
|
2
|
+
export type { BoldOptions } from './Bold';
|
|
3
|
+
export { Italic } from './Italic';
|
|
4
|
+
export type { ItalicOptions } from './Italic';
|
|
5
|
+
export { Underline } from './UnderLine';
|
|
6
|
+
export type { UnderlineOptions } from './UnderLine';
|
|
7
|
+
export { Strike } from './Strike';
|
|
8
|
+
export type { StrikeOptions } from './Strike';
|
|
9
|
+
export { Code } from './Code';
|
|
10
|
+
export type { CodeOptions } from './Code';
|
|
11
|
+
export { CodeBlock } from './CodeBlock';
|
|
12
|
+
export type { CodeBlockOptions } from './CodeBlock';
|
|
13
|
+
export { Heading } from './Heading';
|
|
14
|
+
export type { HeadingOptions } from './Heading';
|
|
15
|
+
export { TextAlign } from './TextAlign';
|
|
16
|
+
export type { TextAlignOptions } from './TextAlign';
|
|
17
|
+
export { FontSize } from './FontSize';
|
|
18
|
+
export type { FontSizeOptions } from './FontSize';
|
|
19
|
+
export { Color } from './Color';
|
|
20
|
+
export type { ColorOptions } from './Color';
|
|
21
|
+
export { Highlight } from './Highlight';
|
|
22
|
+
export type { HighlightOptions } from './Highlight';
|
|
23
|
+
export { BulletList } from './BulletList';
|
|
24
|
+
export type { BulletListOptions } from './BulletList';
|
|
25
|
+
export { Clear } from './Clear';
|
|
26
|
+
export type { ClearOptions } from './Clear';
|
|
27
|
+
export { OrderedList } from './OrderedList';
|
|
28
|
+
export type { OrderedListOptions } from './OrderedList';
|
|
29
|
+
export { TaskList } from './TaskList';
|
|
30
|
+
export type { TaskListOptions } from './TaskList';
|
|
31
|
+
export { Blockquote } from './Blockquote';
|
|
32
|
+
export type { BlockquoteOptions } from './Blockquote';
|
|
33
|
+
export { Link } from './Link';
|
|
34
|
+
export type { LinkOptions } from './Link';
|
|
35
|
+
export { HorizontalRule } from './HorizontalRule';
|
|
36
|
+
export type { HorizontalRuleOptions } from './HorizontalRule';
|
|
37
|
+
export { History } from './History';
|
|
38
|
+
export type { HistoryOptions } from './History';
|
|
39
|
+
export { Fullscreen } from './Fullscreen';
|
|
40
|
+
export type { FullscreenOptions } from './Fullscreen';
|
|
41
|
+
export { BaseKit } from './BaseKit';
|
|
42
|
+
export type { BaseKitOptions } from './BaseKit';
|
|
43
|
+
export { SubAndSuperScript } from './Subscript';
|
|
44
|
+
export type { SubAndSuperScriptOptions } from './Subscript';
|
|
45
|
+
export type { MoreMarkOptions } from './MoreMark';
|
|
46
|
+
export { MoreMark } from './MoreMark';
|
|
47
|
+
export { Indent } from './Indent';
|
|
48
|
+
export type { IndentOptions } from './Indent';
|
|
49
|
+
export { LineHeight } from './LineHeight';
|
|
50
|
+
export type { LineHeightOptions } from './LineHeight';
|
|
51
|
+
export { SlashCommand } from './SlashCommand';
|
|
52
|
+
export { Image } from './Image';
|
|
53
|
+
export type { SetImageAttrsOptions } from './Image';
|
|
54
|
+
export { Video } from './Video/Video';
|
|
55
|
+
export type { VideoOptions } from './Video';
|
|
56
|
+
export { Table } from './Table';
|
|
57
|
+
export type { TableOptions } from './Table';
|
|
58
|
+
export { AI } from './AI';
|
|
59
|
+
export { FormatPainter } from './FormatPainter';
|
|
60
|
+
export type { FormatPainterOptions } from './FormatPainter';
|
|
61
|
+
export { ImportWord } from './ImportWord';
|
|
62
|
+
export type { ImportWordOptions } from './ImportWord';
|
|
63
|
+
export { Columns } from './MultiColumn';
|
|
64
|
+
export type { ColumnsOptions } from './MultiColumn';
|
|
65
|
+
export { ImageUpload } from './ImageUpload';
|
|
66
|
+
export type { ImageUploadOptions } from './ImageUpload';
|
|
67
|
+
export { VideoUpload } from './VideoUpload';
|
|
68
|
+
export { FontFamily } from './FontFamily';
|
|
69
|
+
export type { FontFamilyOptions } from './FontFamily';
|
|
70
|
+
export type { PreviewOptions } from './Preview';
|
|
71
|
+
export { Preview } from './Preview';
|
|
72
|
+
export { FindAndReplace } from './FindAndReplace';
|
|
73
|
+
export { Printer } from './Printer';
|
|
74
|
+
export type { PrinterOptions } from './Printer';
|
|
75
|
+
export { Iframe } from './Iframe';
|
|
76
|
+
export type { IframeOptions } from './Iframe';
|
|
77
|
+
export { MentionCommand } from './Mention';
|
|
78
|
+
export { Card } from './Card';
|
|
79
|
+
export { ReferenceDot } from './ReferenceDot';
|
|
80
|
+
export { EChartsView } from './EChartsView';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/vue-3';
|
|
2
|
+
|
|
3
|
+
export declare function useAIConversation(editor: Editor): {
|
|
4
|
+
result: globalThis.Ref<string, string>;
|
|
5
|
+
status: globalThis.Ref<"init" | "generating" | "completed", "init" | "generating" | "completed">;
|
|
6
|
+
conversationHistory: globalThis.Ref<{
|
|
7
|
+
role: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}[], {
|
|
10
|
+
role: string;
|
|
11
|
+
content: string;
|
|
12
|
+
}[] | {
|
|
13
|
+
role: string;
|
|
14
|
+
content: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
handleCompletion: (context: string, prompt: string) => Promise<string>;
|
|
17
|
+
resetConversation: () => void;
|
|
18
|
+
stopGeneration: () => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnyExtension } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
interface Instance {
|
|
4
|
+
/**
|
|
5
|
+
* List of extensions
|
|
6
|
+
*
|
|
7
|
+
* @default []
|
|
8
|
+
*/
|
|
9
|
+
extensions: AnyExtension[];
|
|
10
|
+
/**
|
|
11
|
+
* Default language setting
|
|
12
|
+
*
|
|
13
|
+
* @default DEFAULT_LANG_VALUE
|
|
14
|
+
*/
|
|
15
|
+
defaultLang?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function createContext(instance: Partial<Instance>): void;
|
|
18
|
+
export declare function useContext(): {
|
|
19
|
+
state: Instance;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
export interface UseEditorFocusOptions {
|
|
4
|
+
editor: Editor | null;
|
|
5
|
+
/**
|
|
6
|
+
* 更新聚焦状态的防抖等待时间(毫秒)
|
|
7
|
+
* @default 250
|
|
8
|
+
*/
|
|
9
|
+
wait?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 处理编辑器聚焦状态的 Hook
|
|
13
|
+
* 用于防止在操作工具栏等界面元素时出现边框闪烁的问题
|
|
14
|
+
*/
|
|
15
|
+
export declare function useEditorFocus({ editor, wait }: UseEditorFocusOptions): {
|
|
16
|
+
isFocused: globalThis.Ref<boolean, boolean>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { AnyExtension } from '@tiptap/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing an tiptap editor instance.
|
|
6
|
+
*/
|
|
7
|
+
interface Instance {
|
|
8
|
+
/**
|
|
9
|
+
* List of extensions
|
|
10
|
+
*
|
|
11
|
+
* @default []
|
|
12
|
+
*/
|
|
13
|
+
extensions: AnyExtension[];
|
|
14
|
+
/**
|
|
15
|
+
* Default language setting
|
|
16
|
+
*
|
|
17
|
+
* @default DEFAULT_LANG_VALUE
|
|
18
|
+
*/
|
|
19
|
+
defaultLang?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether it is in fullscreen mode
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
isFullscreen: boolean;
|
|
26
|
+
/** Text color */
|
|
27
|
+
color?: string;
|
|
28
|
+
/** Highlight color */
|
|
29
|
+
highlight?: string;
|
|
30
|
+
/** AI Menu visibility */
|
|
31
|
+
AIMenu: boolean;
|
|
32
|
+
/** Preview visibility */
|
|
33
|
+
showPreview: boolean;
|
|
34
|
+
/** SpellCheck */
|
|
35
|
+
spellCheck: boolean;
|
|
36
|
+
/** FindAndReplace */
|
|
37
|
+
findAndReplace: boolean;
|
|
38
|
+
/** Printer */
|
|
39
|
+
printer: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare const useTiptapStore: () => {
|
|
42
|
+
state: Instance;
|
|
43
|
+
isFullscreen: ComputedRef<boolean>;
|
|
44
|
+
toggleFullscreen: () => void;
|
|
45
|
+
togglePreview: () => void;
|
|
46
|
+
toggleSpellCheck: () => void;
|
|
47
|
+
toggleFindAndReplace: () => void;
|
|
48
|
+
togglePrinter: () => void;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { default as EchoEditor } from './components/EchoEditor.vue';
|
|
3
|
+
import { default as ActionButton } from './components/ActionButton.vue';
|
|
4
|
+
import { default as locale, zh_CN, en_US } from './locales';
|
|
5
|
+
|
|
6
|
+
declare const EchoEditorPlugin: Plugin;
|
|
7
|
+
export { en_US, locale, zh_CN };
|
|
8
|
+
export * from './extensions';
|
|
9
|
+
export { useEditor } from '@tiptap/vue-3';
|
|
10
|
+
export type * from './type';
|
|
11
|
+
export { type Editor as EditorInstance, type JSONContent } from '@tiptap/core';
|
|
12
|
+
export type { EchoEditorProps, EchoEditorEmits } from './type';
|
|
13
|
+
export { EchoEditorPlugin, EchoEditor, ActionButton };
|
|
14
|
+
export default EchoEditorPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as zh_CN } from './locales/zh';
|
|
2
|
+
import { default as en_US } from './locales/en';
|
|
3
|
+
|
|
4
|
+
interface LocaleInterface {
|
|
5
|
+
lang: string;
|
|
6
|
+
message: Record<string, Record<string, string>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_LOCALE: LocaleInterface;
|
|
9
|
+
declare class Locale {
|
|
10
|
+
private emitter;
|
|
11
|
+
constructor();
|
|
12
|
+
get lang(): string;
|
|
13
|
+
set lang(lang: string);
|
|
14
|
+
get message(): Record<string, Record<string, string>>;
|
|
15
|
+
set message(message: Record<string, Record<string, string>>);
|
|
16
|
+
loadLangMessage(lang: string): Record<string, string>;
|
|
17
|
+
private isLangSupported;
|
|
18
|
+
setLang(lang: string): void;
|
|
19
|
+
registerWatchLang(hook: (lang: string) => void): {
|
|
20
|
+
unsubscribe: () => void;
|
|
21
|
+
};
|
|
22
|
+
setMessage(lang: string, message: Record<string, string>): void;
|
|
23
|
+
buildLocalesHandler(lang?: string): (path: string) => string;
|
|
24
|
+
}
|
|
25
|
+
declare const locale: Locale;
|
|
26
|
+
declare const useLocale: () => {
|
|
27
|
+
lang: globalThis.Ref<string, string>;
|
|
28
|
+
t: globalThis.ComputedRef<(path: string) => string>;
|
|
29
|
+
};
|
|
30
|
+
export default locale;
|
|
31
|
+
export { Locale, useLocale, zh_CN, en_US };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PluginKey, Plugin } from '@tiptap/pm/state';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import { Node } from '@tiptap/pm/model';
|
|
4
|
+
import { Props as TippyProps } from 'tippy.js';
|
|
5
|
+
|
|
6
|
+
declare const dragHandlePluginDefaultKey: PluginKey<any>;
|
|
7
|
+
declare const DragHandlePlugin: ({ pluginKey: customPluginKey, element: dragHandleElement, editor, tippyOptions, onNodeChange }: {
|
|
8
|
+
pluginKey?: PluginKey | string;
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
editor: Editor;
|
|
11
|
+
tippyOptions?: Partial<TippyProps>;
|
|
12
|
+
onNodeChange?: (data: {
|
|
13
|
+
editor: Editor;
|
|
14
|
+
node: Node | null;
|
|
15
|
+
pos: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
}) => Plugin<{
|
|
18
|
+
locked: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export { DragHandlePlugin, dragHandlePluginDefaultKey };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Selection, SelectionRange } from '@tiptap/pm/state';
|
|
2
|
+
import { ResolvedPos, Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
+
import { Mapping, Mappable } from '@tiptap/pm/transform';
|
|
4
|
+
|
|
5
|
+
export declare function getSelectionRanges(state: ResolvedPos, range: ResolvedPos, depth?: number): SelectionRange[];
|
|
6
|
+
declare class NodeRangeBookmark {
|
|
7
|
+
anchor: number;
|
|
8
|
+
head: number;
|
|
9
|
+
constructor(anchor: number, head: number);
|
|
10
|
+
map(mapping: Mappable): NodeRangeBookmark;
|
|
11
|
+
resolve(doc: ProseMirrorNode): NodeRangeSelection;
|
|
12
|
+
}
|
|
13
|
+
export declare class NodeRangeSelection extends Selection {
|
|
14
|
+
depth: number | undefined;
|
|
15
|
+
constructor(from: ResolvedPos, to: ResolvedPos, depth?: number, bias?: number);
|
|
16
|
+
get $to(): ResolvedPos;
|
|
17
|
+
eq(other: Selection): boolean;
|
|
18
|
+
map(doc: ProseMirrorNode, mapping: Mapping): NodeRangeSelection;
|
|
19
|
+
toJSON(): {
|
|
20
|
+
type: string;
|
|
21
|
+
anchor: number;
|
|
22
|
+
head: number;
|
|
23
|
+
};
|
|
24
|
+
get isForwards(): boolean;
|
|
25
|
+
get isBackwards(): boolean;
|
|
26
|
+
extendBackwards(): NodeRangeSelection;
|
|
27
|
+
extendForwards(): NodeRangeSelection;
|
|
28
|
+
static fromJSON(doc: ProseMirrorNode, json: any): NodeRangeSelection;
|
|
29
|
+
static create(doc: ProseMirrorNode, anchor: number, head: number, depth?: number, bias?: number): NodeRangeSelection;
|
|
30
|
+
getBookmark(): NodeRangeBookmark;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
export declare function cloneElement(node: HTMLElement): any;
|
|
4
|
+
export declare function getComputedStyles(element: Element, styleProperty: any): string;
|
|
5
|
+
export declare function minMax(value?: number, minimum?: number, maximum?: number): number;
|
|
6
|
+
export declare function removeNode(node: HTMLElement): void;
|
|
7
|
+
export type FindElementNextToCoords = {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
direction?: 'left' | 'right';
|
|
11
|
+
editor: Editor;
|
|
12
|
+
};
|
|
13
|
+
export declare const findElementNextToCoords: (options: FindElementNextToCoords) => {
|
|
14
|
+
resultElement: any;
|
|
15
|
+
resultNode: any;
|
|
16
|
+
pos: any;
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Plugin } from '@tiptap/pm/state';
|
|
2
|
+
import { DecorationSet, EditorView } from '@tiptap/pm/view';
|
|
3
|
+
|
|
4
|
+
export declare const UploadImagesPlugin: () => Plugin<DecorationSet>;
|
|
5
|
+
export interface ImageUploadOptions {
|
|
6
|
+
validateFn?: (file: File) => boolean;
|
|
7
|
+
onUpload: (file: File) => Promise<string | object>;
|
|
8
|
+
}
|
|
9
|
+
export type UploadFn = (files: File[], view: EditorView, pos: number) => void;
|
|
10
|
+
export declare const createImageUpload: ({ validateFn, onUpload }: ImageUploadOptions) => UploadFn;
|
|
11
|
+
export declare const handleImagePaste: (view: EditorView, event: ClipboardEvent, uploadFn: UploadFn) => boolean;
|
|
12
|
+
export declare const handleImageDrop: (view: EditorView, event: DragEvent, moved: boolean, uploadFn: UploadFn) => boolean;
|