@halo-dev/richtext-editor 2.21.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/dist/components/Editor.vue.d.ts +6 -5
- package/dist/components/EditorHeader.vue.d.ts +4 -4
- package/dist/components/base/DropdownItem.vue.d.ts +29 -0
- package/dist/components/base/Input.vue.d.ts +29 -0
- package/dist/components/base/index.d.ts +2 -0
- package/dist/components/block/BlockActionButton.vue.d.ts +13 -8
- package/dist/{dev/App.vue.d.ts → components/block/BlockActionHorizontalSeparator.vue.d.ts} +1 -1
- package/dist/components/block/BlockActionSeparator.vue.d.ts +2 -1
- package/dist/components/block/index.d.ts +1 -2
- package/dist/components/bubble/BubbleButton.vue.d.ts +28 -0
- package/dist/components/bubble/BubbleItem.vue.d.ts +3 -37
- package/dist/components/{EditorBubbleMenu.vue.d.ts → bubble/EditorBubbleMenu.vue.d.ts} +3 -3
- package/dist/components/bubble/index.d.ts +2 -1
- package/dist/components/common/ColorPickerDropdown.vue.d.ts +7 -7
- package/dist/components/drag/EditorDragButtonItem.vue.d.ts +8 -0
- package/dist/components/drag/EditorDragHandle.vue.d.ts +14 -0
- package/dist/components/drag/EditorDragMenu.vue.d.ts +43 -0
- package/dist/components/drag/default-drag.d.ts +8 -0
- package/dist/components/drag/index.d.ts +4 -0
- package/dist/components/index.d.ts +4 -2
- package/dist/components/toolbar/ToolbarItem.vue.d.ts +2 -24
- package/dist/components/toolbar/ToolbarSubItem.vue.d.ts +2 -20
- package/dist/components/toolbox/ToolboxItem.vue.d.ts +2 -21
- package/dist/components/upload/EditorLinkObtain.vue.d.ts +51 -0
- package/dist/components/upload/ResourceReplaceButton.vue.d.ts +13 -0
- package/dist/components/upload/index.d.ts +2 -0
- package/dist/composables/use-attachment.d.ts +7 -0
- package/dist/extensions/align/index.d.ts +6 -0
- package/dist/extensions/audio/AudioView.vue.d.ts +106 -2
- package/dist/extensions/audio/BubbleItemAudioLink.vue.d.ts +2 -29
- package/dist/extensions/audio/BubbleItemAudioPosition.vue.d.ts +7 -0
- package/dist/extensions/audio/index.d.ts +9 -4
- package/dist/extensions/block-position/index.d.ts +48 -0
- package/dist/extensions/blockquote/index.d.ts +3 -3
- package/dist/extensions/bold/index.d.ts +3 -3
- package/dist/extensions/bullet-list/index.d.ts +3 -3
- package/dist/extensions/character-count/index.d.ts +1 -0
- package/dist/extensions/clear-format/index.d.ts +2 -2
- package/dist/extensions/code/index.d.ts +3 -3
- package/dist/extensions/code-block/CodeBlockSelect.vue.d.ts +7 -5
- package/dist/extensions/code-block/code-block.d.ts +7 -5
- package/dist/extensions/code-block/index.d.ts +0 -1
- package/dist/extensions/color/ColorBubbleItem.vue.d.ts +2 -29
- package/dist/extensions/color/ColorToolbarItem.vue.d.ts +2 -24
- package/dist/extensions/color/index.d.ts +3 -3
- package/dist/extensions/columns/column.d.ts +6 -2
- package/dist/extensions/columns/columns.d.ts +11 -4
- package/dist/extensions/columns/index.d.ts +2 -2
- package/dist/extensions/commands-menu/CommandsView.vue.d.ts +2 -2
- package/dist/extensions/commands-menu/commands.d.ts +2 -3
- package/dist/extensions/commands-menu/index.d.ts +1 -1
- package/dist/extensions/details/index.d.ts +6 -0
- package/dist/extensions/document/index.d.ts +2 -0
- package/dist/extensions/drop-cursor/index.d.ts +1 -0
- package/dist/extensions/extensions-kit.d.ts +96 -0
- package/dist/extensions/figure/FigureCaptionView.vue.d.ts +3 -0
- package/dist/extensions/figure/figure-caption.d.ts +2 -0
- package/dist/extensions/figure/index.d.ts +15 -0
- package/dist/extensions/font-size/index.d.ts +4 -14
- package/dist/extensions/format-brush/index.d.ts +4 -4
- package/dist/extensions/gallery/BubbleItemAddImage.vue.d.ts +7 -0
- package/dist/extensions/gallery/BubbleItemGap.vue.d.ts +493 -0
- package/dist/extensions/gallery/BubbleItemGroupSize.vue.d.ts +493 -0
- package/dist/extensions/gallery/BubbleItemLayout.vue.d.ts +493 -0
- package/dist/extensions/gallery/GalleryView.vue.d.ts +3 -0
- package/dist/extensions/gallery/gallery-bubble.d.ts +8 -0
- package/dist/extensions/gallery/index.d.ts +28 -0
- package/dist/extensions/gallery/useGalleryImages.d.ts +7 -0
- package/dist/extensions/gap-cursor/index.d.ts +1 -17
- package/dist/extensions/hard-break/index.d.ts +1 -0
- package/dist/extensions/heading/index.d.ts +3 -3
- package/dist/extensions/highlight/HighlightBubbleItem.vue.d.ts +2 -29
- package/dist/extensions/highlight/HighlightToolbarItem.vue.d.ts +2 -24
- package/dist/extensions/highlight/index.d.ts +3 -3
- package/dist/extensions/history/index.d.ts +1 -3
- package/dist/extensions/horizontal-rule/index.d.ts +1 -0
- package/dist/extensions/iframe/BubbleItemIframeAlign.vue.d.ts +7 -0
- package/dist/extensions/iframe/BubbleItemIframeLink.vue.d.ts +2 -29
- package/dist/extensions/iframe/BubbleItemIframeSize.vue.d.ts +2 -6
- package/dist/extensions/iframe/IframeView.vue.d.ts +54 -1
- package/dist/extensions/iframe/index.d.ts +4 -4
- package/dist/extensions/image/BubbleItemImageAlt.vue.d.ts +2 -29
- package/dist/extensions/image/BubbleItemImageHref.vue.d.ts +2 -29
- package/dist/extensions/image/BubbleItemImageLink.vue.d.ts +2 -29
- package/dist/extensions/image/BubbleItemImagePosition.vue.d.ts +7 -0
- package/dist/extensions/image/BubbleItemImageSize.vue.d.ts +2 -29
- package/dist/extensions/image/ImageView.vue.d.ts +108 -2
- package/dist/extensions/image/index.d.ts +9 -3
- package/dist/extensions/indent/index.d.ts +5 -5
- package/dist/extensions/index.d.ts +50 -47
- package/dist/extensions/italic/index.d.ts +3 -3
- package/dist/extensions/link/LinkBubbleButton.vue.d.ts +2 -29
- package/dist/extensions/link/index.d.ts +3 -3
- package/dist/extensions/list-extra/index.d.ts +6 -0
- package/dist/extensions/list-keymap/index.d.ts +4 -4
- package/dist/extensions/node-selected/index.d.ts +3 -4
- package/dist/extensions/ordered-list/index.d.ts +3 -3
- package/dist/extensions/paragraph/index.d.ts +3 -3
- package/dist/extensions/placeholder/index.d.ts +1 -0
- package/dist/extensions/range-selection/index.d.ts +2 -2
- package/dist/extensions/search-and-replace/IconButton.vue.d.ts +20 -0
- package/dist/extensions/search-and-replace/MatchToggleButton.vue.d.ts +20 -0
- package/dist/extensions/search-and-replace/SearchAndReplace.vue.d.ts +5 -2
- package/dist/extensions/search-and-replace/SearchAndReplacePlugin.d.ts +3 -2
- package/dist/extensions/search-and-replace/index.d.ts +2 -3
- package/dist/extensions/smart-scroll/index.d.ts +28 -0
- package/dist/extensions/strike/index.d.ts +3 -3
- package/dist/extensions/subscript/index.d.ts +3 -3
- package/dist/extensions/superscript/index.d.ts +3 -3
- package/dist/extensions/table/index.d.ts +5 -3
- package/dist/extensions/table/table-row.d.ts +1 -1
- package/dist/extensions/task-list/index.d.ts +3 -3
- package/dist/extensions/text/BubbleItemTextType.vue.d.ts +3 -0
- package/dist/extensions/text/index.d.ts +4 -2
- package/dist/extensions/text-align/index.d.ts +3 -3
- package/dist/extensions/text-style/index.d.ts +3 -3
- package/dist/extensions/trailing-node/index.d.ts +1 -2
- package/dist/extensions/underline/index.d.ts +3 -3
- package/dist/extensions/upload/index.d.ts +8 -0
- package/dist/extensions/video/BubbleItemVideoLink.vue.d.ts +2 -29
- package/dist/extensions/video/BubbleItemVideoPosition.vue.d.ts +7 -0
- package/dist/extensions/video/BubbleItemVideoSize.vue.d.ts +2 -29
- package/dist/extensions/video/VideoView.vue.d.ts +106 -2
- package/dist/extensions/video/index.d.ts +18 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.es.js +41115 -0
- package/dist/index.iife.js +176 -0
- package/dist/locales/en.json.d.ts +177 -0
- package/dist/locales/es.json.d.ts +177 -0
- package/dist/locales/index.d.ts +1044 -4
- package/dist/locales/zh-CN.json.d.ts +177 -0
- package/dist/style.css +2 -1
- package/dist/tiptap/index.d.ts +3 -3
- package/dist/tiptap/pm/index.d.ts +0 -1
- package/dist/types/index.d.ts +115 -59
- package/dist/utils/attachment.d.ts +3 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/delete-node.d.ts +1 -1
- package/dist/utils/filter-duplicate-extensions.d.ts +2 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/{isListActive.d.ts → is-list-active.d.ts} +2 -2
- package/dist/utils/is-node-empty.d.ts +6 -0
- package/dist/utils/keyboard.d.ts +37 -0
- package/dist/utils/upload.d.ts +78 -0
- package/package.json +52 -64
- package/dist/components/block/BlockActionInput.vue.d.ts +0 -15
- package/dist/components/block/BlockCard.vue.d.ts +0 -30
- package/dist/components/bubble/BubbleMenu.vue.d.ts +0 -84
- package/dist/components/bubble/BubbleMenuPlugin.d.ts +0 -52
- package/dist/dev/main.d.ts +0 -1
- package/dist/extensions/draggable/index.d.ts +0 -13
- package/dist/rich-text-editor.es.js +0 -41650
- package/dist/rich-text-editor.iife.js +0 -136
- package/dist/utils/isNodeEmpty.d.ts +0 -4
- /package/dist/components/icon/{MdiDeleteForeverOutline.vue.d.ts → MingcuteDelete2Line.vue.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ExtensionPlaceholder: import('@tiptap/core').Extension<import('@tiptap/extensions').PlaceholderOptions, any>;
|
|
@@ -18,5 +18,5 @@ declare module "@tiptap/core" {
|
|
|
18
18
|
}) => boolean | null);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
declare const ExtensionRangeSelection: Extension<any, any>;
|
|
22
|
-
export {
|
|
21
|
+
export declare const ExtensionRangeSelection: Extension<any, any>;
|
|
22
|
+
export { RangeSelection };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLButtonElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isActive: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
attrs: Partial<{}>;
|
|
6
|
+
slots: {
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLButtonElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
14
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Editor, PluginKey } from '../../tiptap';
|
|
2
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { Editor } from '../../tiptap';
|
|
3
|
+
import { PluginKey } from '../../tiptap/pm';
|
|
3
4
|
import { SearchAndReplacePluginState } from './SearchAndReplacePlugin';
|
|
4
5
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
6
|
editor: {
|
|
@@ -29,5 +30,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
29
30
|
};
|
|
30
31
|
}>> & Readonly<{}>, {
|
|
31
32
|
visible: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
34
|
+
searchInput: HTMLInputElement;
|
|
35
|
+
}, any>;
|
|
33
36
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PMNode
|
|
2
|
-
import { Decoration, EditorView, Plugin, PluginKey, Transaction } from '../../tiptap/pm';
|
|
1
|
+
import { PMNode } from '../../tiptap';
|
|
2
|
+
import { Decoration, EditorView, Plugin, PluginKey, Selection, Transaction } from '../../tiptap/pm';
|
|
3
3
|
import { Editor } from '../../tiptap/vue-3';
|
|
4
4
|
export interface SearchAndReplacePluginProps {
|
|
5
5
|
editor: Editor;
|
|
@@ -19,6 +19,7 @@ export declare class SearchAndReplacePluginView {
|
|
|
19
19
|
constructor({ view, editor, element }: SearchAndReplacePluginViewProps);
|
|
20
20
|
update(): boolean;
|
|
21
21
|
destroy(): boolean;
|
|
22
|
+
private findEditorEntryElement;
|
|
22
23
|
}
|
|
23
24
|
export interface TextNodesWithPosition {
|
|
24
25
|
text: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Extension } from '../../tiptap/vue-3';
|
|
2
2
|
import { ExtensionOptions } from '../../types';
|
|
3
|
-
declare module
|
|
3
|
+
declare module '../../tiptap' {
|
|
4
4
|
interface Commands<ReturnType> {
|
|
5
5
|
searchAndReplace: {
|
|
6
6
|
/**
|
|
@@ -30,5 +30,4 @@ declare module "@/tiptap" {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
declare const
|
|
34
|
-
export default SearchAndReplace;
|
|
33
|
+
export declare const ExtensionSearchAndReplace: Extension<ExtensionOptions, any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EditorView, Extension } from '../../tiptap';
|
|
2
|
+
export interface SmartScrollOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The container to scroll
|
|
5
|
+
*/
|
|
6
|
+
scrollContainer?: string | HTMLElement | ((editor: EditorView) => HTMLElement);
|
|
7
|
+
/**
|
|
8
|
+
* Top threshold (pixels), when the cursor is less than this value from the top of the viewport, trigger scrolling
|
|
9
|
+
* @default 150
|
|
10
|
+
*/
|
|
11
|
+
topThreshold: number;
|
|
12
|
+
/**
|
|
13
|
+
* Bottom threshold (pixels), when the cursor is less than this value from the bottom of the viewport, trigger scrolling
|
|
14
|
+
* @default 150
|
|
15
|
+
*/
|
|
16
|
+
bottomThreshold: number;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to enable smooth scrolling
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
smooth: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Smart scroll extension
|
|
25
|
+
*
|
|
26
|
+
* When the cursor is close to the top or bottom of the viewport, trigger scrolling to keep the cursor in the center of the viewport
|
|
27
|
+
*/
|
|
28
|
+
export declare const ExtensionSmartScroll: Extension<SmartScrollOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { StrikeOptions } from '@tiptap/extension-strike';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
|
+
export type ExtensionStrikeOptions = ExtensionOptions & Partial<StrikeOptions>;
|
|
4
|
+
export declare const ExtensionStrike: import('@tiptap/core').Mark<ExtensionStrikeOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
|
+
export type ExtensionSubscriptOptions = Partial<SubscriptExtensionOptions> & ExtensionOptions;
|
|
4
|
+
export declare const ExtensionSubscript: import('@tiptap/core').Mark<ExtensionSubscriptOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
|
+
export type ExtensionSuperscriptOptions = Partial<SuperscriptExtensionOptions> & ExtensionOptions;
|
|
4
|
+
export declare const ExtensionSuperscript: import('@tiptap/core').Mark<ExtensionSuperscriptOptions, any>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { TableOptions } from '@tiptap/extension-table';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { PluginKey } from '../../tiptap/pm';
|
|
3
|
+
import { ExtensionOptions } from '../../types';
|
|
4
|
+
export declare const TABLE_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
5
|
+
export type ExtensionTableOptions = ExtensionOptions & Partial<TableOptions>;
|
|
6
|
+
export declare const ExtensionTable: import('@tiptap/core').Node<ExtensionTableOptions, any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const TableRow: import('@tiptap/core').Node<import('@tiptap/extension-table
|
|
1
|
+
declare const TableRow: import('@tiptap/core').Node<import('@tiptap/extension-table').TableRowOptions, any>;
|
|
2
2
|
export default TableRow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { TaskListOptions } from '@tiptap/extension-list';
|
|
1
2
|
import { ExtensionOptions } from '../../types';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
export default TaskList;
|
|
3
|
+
export type ExtensionTaskListOptions = Partial<TaskListOptions> & ExtensionOptions;
|
|
4
|
+
export declare const ExtensionTaskList: import('@tiptap/core').Node<ExtensionTaskListOptions, any>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BubbleItemComponentProps } from '../../types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PluginKey } from '../../tiptap/pm';
|
|
1
2
|
import { ExtensionOptions } from '../../types';
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
3
|
+
export declare const TEXT_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
4
|
+
export type ExtensionTextOptions = ExtensionOptions;
|
|
5
|
+
export declare const ExtensionText: import('@tiptap/core').Node<ExtensionOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { TextAlignOptions } from '@tiptap/extension-text-align';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
|
+
export type ExtensionTextAlignOptions = ExtensionOptions & Partial<TextAlignOptions>;
|
|
4
|
+
export declare const ExtensionTextAlign: import('@tiptap/core').Extension<ExtensionTextAlignOptions, any>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { TextStyleKitOptions } from '@tiptap/extension-text-style';
|
|
2
|
+
export type ExtensionTextStyleOptions = Partial<TextStyleKitOptions>;
|
|
3
|
+
export declare const ExtensionTextStyle: import('@tiptap/core').Extension<Partial<TextStyleKitOptions>, any>;
|
|
@@ -5,5 +5,4 @@ import { Extension } from '../../tiptap/vue-3';
|
|
|
5
5
|
* - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
|
|
6
6
|
* - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
|
|
7
7
|
*/
|
|
8
|
-
declare const
|
|
9
|
-
export default TrailingNode;
|
|
8
|
+
export declare const ExtensionTrailingNode: Extension<any, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { UnderlineOptions } from '@tiptap/extension-underline';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
|
+
export type ExtensionUnderlineOptions = ExtensionOptions & Partial<UnderlineOptions>;
|
|
4
|
+
export declare const ExtensionUnderline: import('@tiptap/core').Mark<ExtensionUnderlineOptions, any>;
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: import('vue').DefineComponent<{
|
|
4
|
-
editor: Editor;
|
|
5
|
-
isActive: ({ editor }: {
|
|
6
|
-
editor: Editor;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
visible?: ({ editor }: {
|
|
9
|
-
editor: Editor;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
icon?: Component;
|
|
12
|
-
title?: string;
|
|
13
|
-
action?: ({ editor }: {
|
|
14
|
-
editor: Editor;
|
|
15
|
-
}) => void;
|
|
16
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
|
-
editor: Editor;
|
|
18
|
-
isActive: ({ editor }: {
|
|
19
|
-
editor: Editor;
|
|
20
|
-
}) => boolean;
|
|
21
|
-
visible?: ({ editor }: {
|
|
22
|
-
editor: Editor;
|
|
23
|
-
}) => boolean;
|
|
24
|
-
icon?: Component;
|
|
25
|
-
title?: string;
|
|
26
|
-
action?: ({ editor }: {
|
|
27
|
-
editor: Editor;
|
|
28
|
-
}) => void;
|
|
29
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
1
|
+
import { BubbleItemComponentProps } from '../../types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
3
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BubbleItemComponentProps } from '../../types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {
|
|
3
|
+
visible: ({ editor }: {
|
|
4
|
+
editor: import('@tiptap/core').Editor;
|
|
5
|
+
}) => boolean;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: import('vue').DefineComponent<{
|
|
4
|
-
editor: Editor;
|
|
5
|
-
isActive?: ({ editor }: {
|
|
6
|
-
editor: Editor;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
visible?: ({ editor }: {
|
|
9
|
-
editor: Editor;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
icon?: Component;
|
|
12
|
-
title?: string;
|
|
13
|
-
action?: ({ editor }: {
|
|
14
|
-
editor: Editor;
|
|
15
|
-
}) => void;
|
|
16
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
17
|
-
editor: Editor;
|
|
18
|
-
isActive?: ({ editor }: {
|
|
19
|
-
editor: Editor;
|
|
20
|
-
}) => boolean;
|
|
21
|
-
visible?: ({ editor }: {
|
|
22
|
-
editor: Editor;
|
|
23
|
-
}) => boolean;
|
|
24
|
-
icon?: Component;
|
|
25
|
-
title?: string;
|
|
26
|
-
action?: ({ editor }: {
|
|
27
|
-
editor: Editor;
|
|
28
|
-
}) => void;
|
|
29
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
1
|
+
import { BubbleItemComponentProps } from '../../types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
3
|
export default _default;
|
|
@@ -1,3 +1,107 @@
|
|
|
1
|
-
import { NodeViewProps } from '../../tiptap
|
|
2
|
-
declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
1
|
+
import { NodeViewProps } from '../../tiptap';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NodeViewProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
3
|
+
editorLinkObtain: ({
|
|
4
|
+
$: import('vue').ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: {
|
|
7
|
+
readonly editor: import('@tiptap/core').Editor;
|
|
8
|
+
readonly accept?: string | undefined;
|
|
9
|
+
readonly uploadedFile?: File | undefined;
|
|
10
|
+
readonly uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
11
|
+
readonly onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
12
|
+
readonly onOnUploadReady?: ((file: File) => any) | undefined;
|
|
13
|
+
readonly onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
14
|
+
readonly onOnUploadFinish?: (() => any) | undefined;
|
|
15
|
+
readonly onOnUploadError?: ((error: Error) => any) | undefined;
|
|
16
|
+
readonly onOnUploadAbort?: (() => any) | undefined;
|
|
17
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
18
|
+
$attrs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$refs: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
$slots: Readonly<{
|
|
25
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
28
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
29
|
+
$host: Element | null;
|
|
30
|
+
$emit: ((event: "setExternalLink", attachment?: any) => void) & ((event: "onUploadReady", file: File) => void) & ((event: "onUploadProgress", progress: number) => void) & ((event: "onUploadFinish") => void) & ((event: "onUploadError", error: Error) => void) & ((event: "onUploadAbort") => void);
|
|
31
|
+
$el: any;
|
|
32
|
+
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
33
|
+
editor: import('@tiptap/core').Editor;
|
|
34
|
+
accept?: string;
|
|
35
|
+
uploadedFile?: File;
|
|
36
|
+
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
37
|
+
}> & Readonly<{
|
|
38
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
39
|
+
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
40
|
+
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
41
|
+
onOnUploadFinish?: (() => any) | undefined;
|
|
42
|
+
onOnUploadError?: ((error: Error) => any) | undefined;
|
|
43
|
+
onOnUploadAbort?: (() => any) | undefined;
|
|
44
|
+
}>, {
|
|
45
|
+
abort: () => void;
|
|
46
|
+
retry: () => void;
|
|
47
|
+
reset: () => void;
|
|
48
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
49
|
+
setExternalLink: (attachment?: any) => any;
|
|
50
|
+
onUploadReady: (file: File) => any;
|
|
51
|
+
onUploadProgress: (progress: number) => any;
|
|
52
|
+
onUploadFinish: () => any;
|
|
53
|
+
onUploadError: (error: Error) => any;
|
|
54
|
+
onUploadAbort: () => any;
|
|
55
|
+
}, string, {
|
|
56
|
+
accept: string;
|
|
57
|
+
uploadedFile: File;
|
|
58
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
59
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
60
|
+
created?: (() => void) | (() => void)[];
|
|
61
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
62
|
+
mounted?: (() => void) | (() => void)[];
|
|
63
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
64
|
+
updated?: (() => void) | (() => void)[];
|
|
65
|
+
activated?: (() => void) | (() => void)[];
|
|
66
|
+
deactivated?: (() => void) | (() => void)[];
|
|
67
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
68
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
69
|
+
destroyed?: (() => void) | (() => void)[];
|
|
70
|
+
unmounted?: (() => void) | (() => void)[];
|
|
71
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
72
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
73
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
74
|
+
};
|
|
75
|
+
$forceUpdate: () => void;
|
|
76
|
+
$nextTick: typeof import('vue').nextTick;
|
|
77
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
78
|
+
} & Readonly<{
|
|
79
|
+
accept: string;
|
|
80
|
+
uploadedFile: File;
|
|
81
|
+
}> & Omit<Readonly<{
|
|
82
|
+
editor: import('@tiptap/core').Editor;
|
|
83
|
+
accept?: string;
|
|
84
|
+
uploadedFile?: File;
|
|
85
|
+
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
86
|
+
}> & Readonly<{
|
|
87
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
88
|
+
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
89
|
+
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
90
|
+
onOnUploadFinish?: (() => any) | undefined;
|
|
91
|
+
onOnUploadError?: ((error: Error) => any) | undefined;
|
|
92
|
+
onOnUploadAbort?: (() => any) | undefined;
|
|
93
|
+
}>, "reset" | "abort" | "retry" | ("accept" | "uploadedFile")> & import('vue').ShallowUnwrapRef<{
|
|
94
|
+
abort: () => void;
|
|
95
|
+
retry: () => void;
|
|
96
|
+
reset: () => void;
|
|
97
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
98
|
+
$slots: {
|
|
99
|
+
uploading?(_: {
|
|
100
|
+
progress: number | undefined;
|
|
101
|
+
}): any;
|
|
102
|
+
error?(_: {}): any;
|
|
103
|
+
icon?(_: {}): any;
|
|
104
|
+
};
|
|
105
|
+
}) | null;
|
|
106
|
+
}, any>;
|
|
3
107
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Attachment } from '@halo-dev/api-client';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Editor, Node, PluginKey } from '../../tiptap';
|
|
2
4
|
import { ExtensionOptions } from '../../types';
|
|
3
|
-
declare module
|
|
5
|
+
declare module '../../tiptap' {
|
|
4
6
|
interface Commands<ReturnType> {
|
|
5
7
|
video: {
|
|
6
8
|
setVideo: (options: {
|
|
@@ -9,5 +11,17 @@ declare module "@/tiptap" {
|
|
|
9
11
|
};
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
|
-
declare const
|
|
13
|
-
export
|
|
14
|
+
export declare const VIDEO_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
15
|
+
export type ExtensionVideoOptions = ExtensionOptions & {
|
|
16
|
+
uploadVideo?: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
|
|
17
|
+
};
|
|
18
|
+
export declare const ExtensionVideo: Node<ExtensionVideoOptions, any>;
|
|
19
|
+
export declare const getVideoElement: (editor: Editor) => HTMLVideoElement | null;
|
|
20
|
+
export declare const getVideoSizePercentage: (editor: Editor, percentage: number, videoElement?: HTMLVideoElement | null) => {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
export declare const handleSetSize: (editor: Editor, size: {
|
|
25
|
+
width?: string;
|
|
26
|
+
height?: string;
|
|
27
|
+
}) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { Plugin } from 'vue';
|
|
2
|
-
declare const plugin: Plugin;
|
|
3
|
-
export default plugin;
|
|
4
1
|
export * from './components';
|
|
5
2
|
export * from './extensions';
|
|
6
3
|
export * from './tiptap';
|
|
7
4
|
export * from './types';
|
|
8
|
-
export
|
|
5
|
+
export { convertToMediaContents, deleteNode, deleteNodeByPos, filterDuplicateExtensions, generateAnchor, generateAnchorId, isAllowedUri, isBlockEmpty, isEmpty, isListActive, isNodeContentEmpty, } from './utils';
|