@halo-dev/richtext-editor 2.22.0 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Editor.vue.d.ts +2 -2
- package/dist/components/bubble/EditorBubbleMenu.vue.d.ts +1 -1
- package/dist/components/drag/EditorDragHandle.vue.d.ts +1 -1
- package/dist/components/drag/EditorDragMenu.vue.d.ts +1 -1
- package/dist/components/upload/EditorLinkObtain.vue.d.ts +3 -4
- package/dist/components/upload/ResourceReplaceButton.vue.d.ts +2 -3
- package/dist/extensions/align/index.d.ts +6 -0
- package/dist/extensions/audio/AudioView.vue.d.ts +5 -6
- package/dist/extensions/audio/index.d.ts +2 -2
- package/dist/extensions/block-position/index.d.ts +48 -0
- package/dist/extensions/blockquote/index.d.ts +1 -1
- package/dist/extensions/bold/index.d.ts +1 -1
- package/dist/extensions/bullet-list/index.d.ts +1 -1
- package/dist/extensions/code/index.d.ts +1 -1
- package/dist/extensions/color/index.d.ts +1 -1
- package/dist/extensions/commands-menu/CommandsView.vue.d.ts +1 -1
- package/dist/extensions/details/index.d.ts +1 -1
- package/dist/extensions/extensions-kit.d.ts +7 -2
- package/dist/extensions/font-size/index.d.ts +1 -1
- package/dist/extensions/gallery/gallery-bubble.d.ts +2 -2
- package/dist/extensions/gallery/index.d.ts +2 -2
- package/dist/extensions/heading/index.d.ts +1 -1
- package/dist/extensions/highlight/index.d.ts +1 -1
- package/dist/extensions/image/ImageView.vue.d.ts +5 -6
- package/dist/extensions/image/index.d.ts +2 -2
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/italic/index.d.ts +1 -1
- package/dist/extensions/link/index.d.ts +1 -1
- package/dist/extensions/list-extra/index.d.ts +1 -1
- package/dist/extensions/ordered-list/index.d.ts +1 -1
- package/dist/extensions/paragraph/index.d.ts +1 -1
- package/dist/extensions/search-and-replace/SearchAndReplace.vue.d.ts +1 -1
- package/dist/extensions/smart-scroll/index.d.ts +28 -0
- package/dist/extensions/strike/index.d.ts +1 -1
- package/dist/extensions/subscript/index.d.ts +1 -1
- package/dist/extensions/superscript/index.d.ts +1 -1
- package/dist/extensions/table/index.d.ts +1 -1
- package/dist/extensions/task-list/index.d.ts +1 -1
- package/dist/extensions/text-align/index.d.ts +1 -1
- package/dist/extensions/underline/index.d.ts +1 -1
- package/dist/extensions/video/VideoView.vue.d.ts +5 -6
- package/dist/extensions/video/index.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +30771 -28499
- package/dist/index.iife.js +65 -62
- 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 +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/attachment.d.ts +1 -1
- package/dist/utils/get-cursor-coords.d.ts +19 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/upload.d.ts +19 -8
- package/package.json +49 -49
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VueEditor } from '../tiptap';
|
|
2
1
|
import { CSSProperties, PropType } from 'vue';
|
|
2
|
+
import { VueEditor } from '../tiptap';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
@@ -41,7 +41,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
41
41
|
default: string;
|
|
42
42
|
};
|
|
43
43
|
}>> & Readonly<{}>, {
|
|
44
|
-
locale: "en" | "zh
|
|
44
|
+
locale: "en" | "zh" | "en-US" | "zh-CN";
|
|
45
45
|
contentStyles: CSSProperties;
|
|
46
46
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
47
47
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { PMNode, VueEditor } from '../../tiptap';
|
|
2
3
|
import { DragButtonType } from '../../types';
|
|
3
|
-
import { PropType } from 'vue';
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
5
|
editor: {
|
|
6
6
|
type: PropType<VueEditor>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Editor } from '../../tiptap';
|
|
2
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
3
|
-
import { AttachmentSimple } from '@halo-dev/ui-shared';
|
|
4
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Editor } from '../../tiptap';
|
|
5
4
|
type __VLS_Props = {
|
|
6
5
|
editor: Editor;
|
|
7
6
|
accept?: string;
|
|
@@ -26,14 +25,14 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
26
25
|
retry: () => void;
|
|
27
26
|
reset: () => void;
|
|
28
27
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
29
|
-
setExternalLink: (attachment?:
|
|
28
|
+
setExternalLink: (attachment?: any) => any;
|
|
30
29
|
onUploadReady: (file: File) => any;
|
|
31
30
|
onUploadProgress: (progress: number) => any;
|
|
32
31
|
onUploadFinish: () => any;
|
|
33
32
|
onUploadError: (error: Error) => any;
|
|
34
33
|
onUploadAbort: () => any;
|
|
35
34
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
-
onSetExternalLink?: ((attachment?:
|
|
35
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
37
36
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
38
37
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
39
38
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
2
|
-
import { AttachmentSimple } from '@halo-dev/ui-shared';
|
|
3
2
|
import { AxiosRequestConfig } from 'axios';
|
|
4
3
|
type __VLS_Props = {
|
|
5
4
|
originalLink?: string;
|
|
@@ -7,8 +6,8 @@ type __VLS_Props = {
|
|
|
7
6
|
upload: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
|
|
8
7
|
};
|
|
9
8
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
-
change: (attachment?:
|
|
9
|
+
change: (attachment?: any) => any;
|
|
11
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
onChange?: ((attachment?:
|
|
11
|
+
onChange?: ((attachment?: any) => any) | undefined;
|
|
13
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
13
|
export default _default;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NodeViewProps } from '../../tiptap';
|
|
2
|
-
import { AttachmentSimple } from '@halo-dev/ui-shared';
|
|
3
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, {
|
|
4
3
|
editorLinkObtain: ({
|
|
5
4
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -9,7 +8,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
9
8
|
readonly accept?: string | undefined;
|
|
10
9
|
readonly uploadedFile?: File | undefined;
|
|
11
10
|
readonly uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
12
|
-
readonly onSetExternalLink?: ((attachment?:
|
|
11
|
+
readonly onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
13
12
|
readonly onOnUploadReady?: ((file: File) => any) | undefined;
|
|
14
13
|
readonly onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
15
14
|
readonly onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -28,7 +27,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
28
27
|
$root: import('vue').ComponentPublicInstance | null;
|
|
29
28
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
30
29
|
$host: Element | null;
|
|
31
|
-
$emit: ((event: "setExternalLink", attachment?:
|
|
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);
|
|
32
31
|
$el: any;
|
|
33
32
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
34
33
|
editor: import('@tiptap/core').Editor;
|
|
@@ -36,7 +35,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
36
35
|
uploadedFile?: File;
|
|
37
36
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
38
37
|
}> & Readonly<{
|
|
39
|
-
onSetExternalLink?: ((attachment?:
|
|
38
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
40
39
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
41
40
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
42
41
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -47,7 +46,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
47
46
|
retry: () => void;
|
|
48
47
|
reset: () => void;
|
|
49
48
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
50
|
-
setExternalLink: (attachment?:
|
|
49
|
+
setExternalLink: (attachment?: any) => any;
|
|
51
50
|
onUploadReady: (file: File) => any;
|
|
52
51
|
onUploadProgress: (progress: number) => any;
|
|
53
52
|
onUploadFinish: () => any;
|
|
@@ -85,7 +84,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
85
84
|
uploadedFile?: File;
|
|
86
85
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
87
86
|
}> & Readonly<{
|
|
88
|
-
onSetExternalLink?: ((attachment?:
|
|
87
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
89
88
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
90
89
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
91
90
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node, PluginKey } from '../../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../../types';
|
|
3
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
4
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Node, PluginKey } from '../../tiptap';
|
|
4
|
+
import { ExtensionOptions } from '../../types';
|
|
5
5
|
declare module '../../tiptap' {
|
|
6
6
|
interface Commands<ReturnType> {
|
|
7
7
|
audio: {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
export interface ExtensionBlockPositionOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The types where the block position attribute can be applied.
|
|
5
|
+
* @default []
|
|
6
|
+
* @example ['figure']
|
|
7
|
+
*/
|
|
8
|
+
types: string[];
|
|
9
|
+
/**
|
|
10
|
+
* The positions which are allowed.
|
|
11
|
+
* @default ['start', 'center', 'end']
|
|
12
|
+
* @example ['start', 'center']
|
|
13
|
+
*/
|
|
14
|
+
positions: string[];
|
|
15
|
+
/**
|
|
16
|
+
* The default position.
|
|
17
|
+
* @default null
|
|
18
|
+
* @example 'start'
|
|
19
|
+
*/
|
|
20
|
+
defaultPosition: string | null;
|
|
21
|
+
}
|
|
22
|
+
declare module "@tiptap/core" {
|
|
23
|
+
interface Commands<ReturnType> {
|
|
24
|
+
blockPosition: {
|
|
25
|
+
/**
|
|
26
|
+
* Set the block position attribute
|
|
27
|
+
* @param position The position ("start", "center", "end")
|
|
28
|
+
* @example editor.commands.setBlockPosition('start')
|
|
29
|
+
*/
|
|
30
|
+
setBlockPosition: (position: string) => ReturnType;
|
|
31
|
+
/**
|
|
32
|
+
* Unset the block position attribute
|
|
33
|
+
* @example editor.commands.unsetBlockPosition()
|
|
34
|
+
*/
|
|
35
|
+
unsetBlockPosition: () => ReturnType;
|
|
36
|
+
/**
|
|
37
|
+
* Toggle the block position attribute
|
|
38
|
+
* @param alignment The alignment
|
|
39
|
+
* @example editor.commands.toggleBlockPosition('end')
|
|
40
|
+
*/
|
|
41
|
+
toggleBlockPosition: (position: string) => ReturnType;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This extension allows to set the block position.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ExtensionBlockPosition: Extension<ExtensionBlockPositionOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { BlockquoteOptions } from '@tiptap/extension-blockquote';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionBlockquoteOptions = Partial<BlockquoteOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionBlockquote: import('@tiptap/core').Node<ExtensionBlockquoteOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { BoldOptions } from '@tiptap/extension-bold';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionBoldOptions = Partial<BoldOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionBold: import('@tiptap/core').Mark<ExtensionBoldOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { BulletListOptions } from '@tiptap/extension-list';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionBulletListOptions = Partial<BulletListOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionBulletList: import('@tiptap/core').Node<ExtensionOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { CodeOptions } from '@tiptap/extension-code';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionCodeOptions = Partial<CodeOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionCode: import('@tiptap/core').Mark<ExtensionCodeOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { ColorOptions } from '@tiptap/extension-color';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionColorOptions = Partial<ColorOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionColor: import('@tiptap/core').Extension<ExtensionColorOptions, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DetailsOptions } from '@tiptap/extension-details';
|
|
1
2
|
import { PluginKey } from '../../tiptap';
|
|
2
3
|
import { ExtensionOptions } from '../../types';
|
|
3
|
-
import { DetailsOptions } from '@tiptap/extension-details';
|
|
4
4
|
export declare const DETAILS_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
5
5
|
export type ExtensionDetailsOptions = Partial<DetailsOptions> & ExtensionOptions;
|
|
6
6
|
export declare const ExtensionDetails: import('@tiptap/core').Node<ExtensionDetailsOptions, any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Extension, Extensions } from '../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../types';
|
|
3
1
|
import { HardBreakOptions } from '@tiptap/extension-hard-break';
|
|
4
2
|
import { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule';
|
|
5
3
|
import { CharacterCountOptions, DropcursorOptions, PlaceholderOptions } from '@tiptap/extensions';
|
|
4
|
+
import { Extension, Extensions } from '../tiptap';
|
|
5
|
+
import { ExtensionOptions } from '../types';
|
|
6
6
|
import { ExtensionAudioOptions } from './audio';
|
|
7
|
+
import { ExtensionBlockPositionOptions } from './block-position';
|
|
7
8
|
import { ExtensionBlockquoteOptions } from './blockquote';
|
|
8
9
|
import { ExtensionBoldOptions } from './bold';
|
|
9
10
|
import { ExtensionBulletListOptions } from './bullet-list';
|
|
@@ -26,6 +27,7 @@ import { ExtensionListKeymapOptions } from './list-keymap';
|
|
|
26
27
|
import { ExtensionNodeSelectedOptions } from './node-selected';
|
|
27
28
|
import { ExtensionOrderedListOptions } from './ordered-list';
|
|
28
29
|
import { ExtensionParagraphOptions } from './paragraph';
|
|
30
|
+
import { SmartScrollOptions } from './smart-scroll';
|
|
29
31
|
import { ExtensionStrikeOptions } from './strike';
|
|
30
32
|
import { ExtensionSubscriptOptions } from './subscript';
|
|
31
33
|
import { ExtensionSuperscriptOptions } from './superscript';
|
|
@@ -73,6 +75,7 @@ export interface ExtensionsKitOptions {
|
|
|
73
75
|
placeholder: Partial<PlaceholderOptions> | false;
|
|
74
76
|
rangeSelection?: boolean;
|
|
75
77
|
searchAndReplace?: boolean;
|
|
78
|
+
smartScroll: Partial<SmartScrollOptions> | false;
|
|
76
79
|
strike: Partial<ExtensionStrikeOptions> | false;
|
|
77
80
|
subscript: Partial<ExtensionSubscriptOptions> | false;
|
|
78
81
|
superscript: Partial<ExtensionSuperscriptOptions> | false;
|
|
@@ -86,6 +89,8 @@ export interface ExtensionsKitOptions {
|
|
|
86
89
|
upload?: boolean;
|
|
87
90
|
video: Partial<ExtensionVideoOptions> | false;
|
|
88
91
|
listExtra: Partial<ExtensionOptions> | false;
|
|
92
|
+
blockPosition: Partial<ExtensionBlockPositionOptions> | false;
|
|
93
|
+
align: Partial<ExtensionOptions> | false;
|
|
89
94
|
customExtensions?: Extensions;
|
|
90
95
|
}
|
|
91
96
|
export declare const ExtensionsKit: Extension<ExtensionsKitOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { FontSizeOptions } from '@tiptap/extension-text-style';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionFontSizeOptions = Partial<FontSizeOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionFontSize: import('@tiptap/core').Extension<ExtensionFontSizeOptions, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Extension } from '../../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../../types';
|
|
3
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
4
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Extension } from '../../tiptap';
|
|
4
|
+
import { ExtensionOptions } from '../../types';
|
|
5
5
|
export type ExtensionGalleryBubbleOptions = ExtensionOptions & {
|
|
6
6
|
uploadImage?: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node, PluginKey } from '../../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../../types';
|
|
3
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
4
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Node, PluginKey } from '../../tiptap';
|
|
4
|
+
import { ExtensionOptions } from '../../types';
|
|
5
5
|
declare module '../../tiptap' {
|
|
6
6
|
interface Commands<ReturnType> {
|
|
7
7
|
gallery: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { HeadingOptions } from '@tiptap/extension-heading';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionHeadingOptions = ExtensionOptions & HeadingOptions;
|
|
4
4
|
export declare const ExtensionHeading: import('@tiptap/core').Node<ExtensionHeadingOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { HighlightOptions } from '@tiptap/extension-highlight';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionHighlightOptions = ExtensionOptions & Partial<HighlightOptions>;
|
|
4
4
|
export declare const ExtensionHighlight: import('@tiptap/core').Mark<ExtensionHighlightOptions, any>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NodeViewProps } from '../../tiptap';
|
|
2
|
-
import { AttachmentSimple } from '@halo-dev/ui-shared';
|
|
3
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, {
|
|
4
3
|
resizeRef: HTMLDivElement;
|
|
5
4
|
resizeHandleRef: HTMLDivElement;
|
|
@@ -11,7 +10,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
11
10
|
readonly accept?: string | undefined;
|
|
12
11
|
readonly uploadedFile?: File | undefined;
|
|
13
12
|
readonly uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
14
|
-
readonly onSetExternalLink?: ((attachment?:
|
|
13
|
+
readonly onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
15
14
|
readonly onOnUploadReady?: ((file: File) => any) | undefined;
|
|
16
15
|
readonly onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
17
16
|
readonly onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -30,7 +29,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
30
29
|
$root: import('vue').ComponentPublicInstance | null;
|
|
31
30
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
32
31
|
$host: Element | null;
|
|
33
|
-
$emit: ((event: "setExternalLink", attachment?:
|
|
32
|
+
$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);
|
|
34
33
|
$el: any;
|
|
35
34
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
36
35
|
editor: import('@tiptap/core').Editor;
|
|
@@ -38,7 +37,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
38
37
|
uploadedFile?: File;
|
|
39
38
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
40
39
|
}> & Readonly<{
|
|
41
|
-
onSetExternalLink?: ((attachment?:
|
|
40
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
42
41
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
43
42
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
44
43
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -49,7 +48,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
49
48
|
retry: () => void;
|
|
50
49
|
reset: () => void;
|
|
51
50
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
52
|
-
setExternalLink: (attachment?:
|
|
51
|
+
setExternalLink: (attachment?: any) => any;
|
|
53
52
|
onUploadReady: (file: File) => any;
|
|
54
53
|
onUploadProgress: (progress: number) => any;
|
|
55
54
|
onUploadFinish: () => any;
|
|
@@ -87,7 +86,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
87
86
|
uploadedFile?: File;
|
|
88
87
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
89
88
|
}> & Readonly<{
|
|
90
|
-
onSetExternalLink?: ((attachment?:
|
|
89
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
91
90
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
92
91
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
93
92
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PluginKey } from '../../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../../types';
|
|
3
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
4
2
|
import { ImageOptions } from '@tiptap/extension-image';
|
|
5
3
|
import { AxiosRequestConfig } from 'axios';
|
|
4
|
+
import { PluginKey } from '../../tiptap';
|
|
5
|
+
import { ExtensionOptions } from '../../types';
|
|
6
6
|
export declare const IMAGE_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
7
7
|
export type ExtensionImageOptions = ExtensionOptions & Partial<ImageOptions> & {
|
|
8
8
|
uploadImage?: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
|
|
@@ -35,6 +35,7 @@ export * from './paragraph';
|
|
|
35
35
|
export * from './placeholder';
|
|
36
36
|
export * from './range-selection';
|
|
37
37
|
export * from './search-and-replace';
|
|
38
|
+
export * from './smart-scroll';
|
|
38
39
|
export * from './strike';
|
|
39
40
|
export * from './subscript';
|
|
40
41
|
export * from './superscript';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { ItalicOptions } from '@tiptap/extension-italic';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionItalicOptions = ExtensionOptions & Partial<ItalicOptions>;
|
|
4
4
|
export declare const ExtensionItalic: import('@tiptap/core').Mark<ExtensionItalicOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { LinkOptions } from '@tiptap/extension-link';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionLinkOptions = ExtensionOptions & Partial<LinkOptions>;
|
|
4
4
|
export declare const ExtensionLink: import('@tiptap/core').Mark<ExtensionLinkOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { OrderedListOptions } from '@tiptap/extension-list';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionOrderedListOptions = Partial<OrderedListOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionOrderedList: import('@tiptap/core').Node<ExtensionOrderedListOptions, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
1
2
|
import { EditorState, ResolvedPos, Dispatch } from '../../tiptap';
|
|
2
3
|
import { ExtensionOptions } from '../../types';
|
|
3
|
-
import { ParagraphOptions } from '@tiptap/extension-paragraph';
|
|
4
4
|
export type ExtensionParagraphOptions = ExtensionOptions & Partial<ParagraphOptions>;
|
|
5
5
|
export declare const ExtensionParagraph: import('@tiptap/core').Node<ExtensionParagraphOptions, any>;
|
|
6
6
|
export declare function deleteCurrentNodeAndSetSelection($from: ResolvedPos, beforePos: number, state: EditorState, dispatch: Dispatch): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { Editor } from '../../tiptap';
|
|
2
3
|
import { PluginKey } from '../../tiptap/pm';
|
|
3
|
-
import { PropType } from 'vue';
|
|
4
4
|
import { SearchAndReplacePluginState } from './SearchAndReplacePlugin';
|
|
5
5
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
6
|
editor: {
|
|
@@ -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';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionStrikeOptions = ExtensionOptions & Partial<StrikeOptions>;
|
|
4
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';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionSubscriptOptions = Partial<SubscriptExtensionOptions> & ExtensionOptions;
|
|
4
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';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionSuperscriptOptions = Partial<SuperscriptExtensionOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionSuperscript: import('@tiptap/core').Mark<ExtensionSuperscriptOptions, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { TableOptions } from '@tiptap/extension-table';
|
|
1
2
|
import { PluginKey } from '../../tiptap/pm';
|
|
2
3
|
import { ExtensionOptions } from '../../types';
|
|
3
|
-
import { TableOptions } from '@tiptap/extension-table';
|
|
4
4
|
export declare const TABLE_BUBBLE_MENU_KEY: PluginKey<any>;
|
|
5
5
|
export type ExtensionTableOptions = ExtensionOptions & Partial<TableOptions>;
|
|
6
6
|
export declare const ExtensionTable: import('@tiptap/core').Node<ExtensionTableOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { TaskListOptions } from '@tiptap/extension-list';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionTaskListOptions = Partial<TaskListOptions> & ExtensionOptions;
|
|
4
4
|
export declare const ExtensionTaskList: import('@tiptap/core').Node<ExtensionTaskListOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { TextAlignOptions } from '@tiptap/extension-text-align';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionTextAlignOptions = ExtensionOptions & Partial<TextAlignOptions>;
|
|
4
4
|
export declare const ExtensionTextAlign: import('@tiptap/core').Extension<ExtensionTextAlignOptions, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtensionOptions } from '../../types';
|
|
2
1
|
import { UnderlineOptions } from '@tiptap/extension-underline';
|
|
2
|
+
import { ExtensionOptions } from '../../types';
|
|
3
3
|
export type ExtensionUnderlineOptions = ExtensionOptions & Partial<UnderlineOptions>;
|
|
4
4
|
export declare const ExtensionUnderline: import('@tiptap/core').Mark<ExtensionUnderlineOptions, any>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NodeViewProps } from '../../tiptap';
|
|
2
|
-
import { AttachmentSimple } from '@halo-dev/ui-shared';
|
|
3
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, {
|
|
4
3
|
editorLinkObtain: ({
|
|
5
4
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -9,7 +8,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
9
8
|
readonly accept?: string | undefined;
|
|
10
9
|
readonly uploadedFile?: File | undefined;
|
|
11
10
|
readonly uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
12
|
-
readonly onSetExternalLink?: ((attachment?:
|
|
11
|
+
readonly onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
13
12
|
readonly onOnUploadReady?: ((file: File) => any) | undefined;
|
|
14
13
|
readonly onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
15
14
|
readonly onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -28,7 +27,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
28
27
|
$root: import('vue').ComponentPublicInstance | null;
|
|
29
28
|
$parent: import('vue').ComponentPublicInstance | null;
|
|
30
29
|
$host: Element | null;
|
|
31
|
-
$emit: ((event: "setExternalLink", attachment?:
|
|
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);
|
|
32
31
|
$el: any;
|
|
33
32
|
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
34
33
|
editor: import('@tiptap/core').Editor;
|
|
@@ -36,7 +35,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
36
35
|
uploadedFile?: File;
|
|
37
36
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
38
37
|
}> & Readonly<{
|
|
39
|
-
onSetExternalLink?: ((attachment?:
|
|
38
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
40
39
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
41
40
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
42
41
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -47,7 +46,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
47
46
|
retry: () => void;
|
|
48
47
|
reset: () => void;
|
|
49
48
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
50
|
-
setExternalLink: (attachment?:
|
|
49
|
+
setExternalLink: (attachment?: any) => any;
|
|
51
50
|
onUploadReady: (file: File) => any;
|
|
52
51
|
onUploadProgress: (progress: number) => any;
|
|
53
52
|
onUploadFinish: () => any;
|
|
@@ -85,7 +84,7 @@ declare const _default: import('vue').DefineComponent<NodeViewProps, {}, {}, {},
|
|
|
85
84
|
uploadedFile?: File;
|
|
86
85
|
uploadToAttachmentFile: (file: File, options?: import('axios').AxiosRequestConfig) => Promise<import('@halo-dev/api-client').Attachment>;
|
|
87
86
|
}> & Readonly<{
|
|
88
|
-
onSetExternalLink?: ((attachment?:
|
|
87
|
+
onSetExternalLink?: ((attachment?: any) => any) | undefined;
|
|
89
88
|
onOnUploadReady?: ((file: File) => any) | undefined;
|
|
90
89
|
onOnUploadProgress?: ((progress: number) => any) | undefined;
|
|
91
90
|
onOnUploadFinish?: (() => any) | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Editor, Node, PluginKey } from '../../tiptap';
|
|
2
|
-
import { ExtensionOptions } from '../../types';
|
|
3
1
|
import { Attachment } from '@halo-dev/api-client';
|
|
4
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Editor, Node, PluginKey } from '../../tiptap';
|
|
4
|
+
import { ExtensionOptions } from '../../types';
|
|
5
5
|
declare module '../../tiptap' {
|
|
6
6
|
interface Commands<ReturnType> {
|
|
7
7
|
video: {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export * from './components';
|
|
|
2
2
|
export * from './extensions';
|
|
3
3
|
export * from './tiptap';
|
|
4
4
|
export * from './types';
|
|
5
|
-
export { convertToMediaContents, deleteNode, deleteNodeByPos, filterDuplicateExtensions, generateAnchor, generateAnchorId, isAllowedUri, isBlockEmpty, isEmpty, isListActive, isNodeContentEmpty, } from './utils';
|
|
5
|
+
export { convertToMediaContents, deleteNode, deleteNodeByPos, filterDuplicateExtensions, generateAnchor, generateAnchorId, isAllowedUri, isBlockEmpty, isEmpty, isListActive, isNodeContentEmpty, getCursorCoords, } from './utils';
|