vdc-editor 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/components/SuperTextViewComment.vue.d.ts +8 -0
- package/lib/src/components/editor/CoreEditor.vue.d.ts +5 -0
- package/lib/src/components/editor/CoreEditorV2.vue.d.ts +96 -0
- package/lib/src/components/editor/EditorComment.vue.d.ts +90 -0
- package/lib/src/components/editor/SimpleEditor.vue.d.ts +33 -0
- package/lib/src/extensions/BaseKit.d.ts +6 -0
- package/lib/src/extensions/IDAttr/index.d.ts +5 -1
- package/lib/src/hooks/useConfigTiptap.d.ts +1 -1
- package/lib/src/hooks/useEditorLayout.d.ts +4 -0
- package/lib/src/index.d.ts +2 -2
- package/lib/src/type.d.ts +18 -0
- package/lib/src/utils/eventBus.d.ts +2 -1
- package/lib/style.css +1 -1
- package/lib/vdc-editor.mjs +15537 -15870
- package/lib/vdc-editor.mjs.map +1 -1
- package/lib/vdc-editor.umd.js +69 -69
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
editor: typeof Editor;
|
|
5
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
6
|
+
editor: typeof Editor;
|
|
7
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorProps } from '../../type';
|
|
2
|
+
import { Editor as CoreEditor } from '@tiptap/core';
|
|
2
3
|
import { Editor } from '@tiptap/vue-3';
|
|
3
4
|
|
|
4
5
|
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
@@ -22,6 +23,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
22
23
|
enter: () => void;
|
|
23
24
|
change: (value: import('../../type').SBSEditorOnChange) => void;
|
|
24
25
|
"update:modelValue": (value: string | object | undefined) => void;
|
|
26
|
+
updateCommentValue: (value: string | object | undefined) => void;
|
|
27
|
+
onFocusEditor: (value: CoreEditor) => void;
|
|
25
28
|
"changed:selection": (value: any) => void;
|
|
26
29
|
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
27
30
|
modelValue: string;
|
|
@@ -42,6 +45,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
|
|
|
42
45
|
onChange?: ((value: import('../../type').SBSEditorOnChange) => any) | undefined;
|
|
43
46
|
onEnter?: (() => any) | undefined;
|
|
44
47
|
"onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined;
|
|
48
|
+
onUpdateCommentValue?: ((value: string | object | undefined) => any) | undefined;
|
|
49
|
+
onOnFocusEditor?: ((value: CoreEditor) => any) | undefined;
|
|
45
50
|
"onChanged:selection"?: ((value: any) => any) | undefined;
|
|
46
51
|
}>, {
|
|
47
52
|
disabled: boolean;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { EditorProps } from '../../type';
|
|
2
|
+
import { Editor as CoreEditor } from '@tiptap/core';
|
|
3
|
+
import { Editor } from '@tiptap/vue-3';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
6
|
+
modelValue: string;
|
|
7
|
+
commentValue: string;
|
|
8
|
+
output: string;
|
|
9
|
+
dark: undefined;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
hideToolbar: boolean;
|
|
12
|
+
disableBubble: boolean;
|
|
13
|
+
hideBubble: boolean;
|
|
14
|
+
superTextArea: any;
|
|
15
|
+
maxWidth: undefined;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
maxHeight: undefined;
|
|
18
|
+
height: undefined;
|
|
19
|
+
extensions: () => never[];
|
|
20
|
+
editorClass: undefined;
|
|
21
|
+
contentClass: undefined;
|
|
22
|
+
fontSizeDefault: number;
|
|
23
|
+
}>>, {
|
|
24
|
+
editor: Editor;
|
|
25
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
enter: () => void;
|
|
27
|
+
change: (value: import('../../type').SBSEditorOnChange) => void;
|
|
28
|
+
"update:modelValue": (value: string | object | undefined) => void;
|
|
29
|
+
updateCommentValue: (value: string | object | undefined) => void;
|
|
30
|
+
onFocusEditor: (value: CoreEditor) => void;
|
|
31
|
+
"changed:selection": (value: any) => void;
|
|
32
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
33
|
+
modelValue: string;
|
|
34
|
+
commentValue: string;
|
|
35
|
+
output: string;
|
|
36
|
+
dark: undefined;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
hideToolbar: boolean;
|
|
39
|
+
disableBubble: boolean;
|
|
40
|
+
hideBubble: boolean;
|
|
41
|
+
superTextArea: any;
|
|
42
|
+
maxWidth: undefined;
|
|
43
|
+
minHeight: number;
|
|
44
|
+
maxHeight: undefined;
|
|
45
|
+
height: undefined;
|
|
46
|
+
extensions: () => never[];
|
|
47
|
+
editorClass: undefined;
|
|
48
|
+
contentClass: undefined;
|
|
49
|
+
fontSizeDefault: number;
|
|
50
|
+
}>>> & Readonly<{
|
|
51
|
+
onChange?: ((value: import('../../type').SBSEditorOnChange) => any) | undefined;
|
|
52
|
+
onEnter?: (() => any) | undefined;
|
|
53
|
+
"onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined;
|
|
54
|
+
onUpdateCommentValue?: ((value: string | object | undefined) => any) | undefined;
|
|
55
|
+
onOnFocusEditor?: ((value: CoreEditor) => any) | undefined;
|
|
56
|
+
"onChanged:selection"?: ((value: any) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
height: string | number;
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
extensions: import('@tiptap/core').AnyExtension[];
|
|
61
|
+
modelValue: string | object;
|
|
62
|
+
output: "html" | "json" | "text";
|
|
63
|
+
maxHeight: string | number;
|
|
64
|
+
maxWidth: string | number;
|
|
65
|
+
minHeight: string | number;
|
|
66
|
+
commentValue: string | object;
|
|
67
|
+
superTextArea: {
|
|
68
|
+
view: boolean;
|
|
69
|
+
button: boolean;
|
|
70
|
+
};
|
|
71
|
+
fontSizeDefault: number;
|
|
72
|
+
dark: boolean;
|
|
73
|
+
hideToolbar: boolean;
|
|
74
|
+
disableBubble: boolean;
|
|
75
|
+
hideBubble: boolean;
|
|
76
|
+
editorClass: string | string[] | Record<string, any>;
|
|
77
|
+
contentClass: string | string[] | Record<string, any>;
|
|
78
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
79
|
+
export default _default;
|
|
80
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
81
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
82
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
83
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
84
|
+
} : {
|
|
85
|
+
type: import('vue').PropType<T[K]>;
|
|
86
|
+
required: true;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
type __VLS_WithDefaults<P, D> = {
|
|
90
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
91
|
+
default: D[K];
|
|
92
|
+
}> : P[K];
|
|
93
|
+
};
|
|
94
|
+
type __VLS_Prettify<T> = {
|
|
95
|
+
[K in keyof T]: T[K];
|
|
96
|
+
} & {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { EditorProps } from '../../type';
|
|
2
|
+
import { Editor as CoreEditor } from '@tiptap/core';
|
|
3
|
+
import { Editor } from '@tiptap/vue-3';
|
|
4
|
+
|
|
5
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
6
|
+
modelValue: string;
|
|
7
|
+
output: string;
|
|
8
|
+
dark: undefined;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
hideToolbar: boolean;
|
|
11
|
+
disableBubble: boolean;
|
|
12
|
+
hideBubble: boolean;
|
|
13
|
+
superTextArea: any;
|
|
14
|
+
maxWidth: undefined;
|
|
15
|
+
minHeight: number;
|
|
16
|
+
maxHeight: undefined;
|
|
17
|
+
extensions: () => never[];
|
|
18
|
+
editorClass: undefined;
|
|
19
|
+
contentClass: undefined;
|
|
20
|
+
isOpenSuperView: boolean;
|
|
21
|
+
}>>, {
|
|
22
|
+
editor: Editor;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
enter: () => void;
|
|
25
|
+
change: (value: import('../../type').SBSEditorOnChange) => void;
|
|
26
|
+
"update:modelValue": (value: string | object | undefined) => void;
|
|
27
|
+
updateCommentValue: (value: string | object | undefined) => void;
|
|
28
|
+
onFocusEditor: (value: CoreEditor) => void;
|
|
29
|
+
"changed:selection": (value: any) => void;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
|
|
31
|
+
modelValue: string;
|
|
32
|
+
output: string;
|
|
33
|
+
dark: undefined;
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
hideToolbar: boolean;
|
|
36
|
+
disableBubble: boolean;
|
|
37
|
+
hideBubble: boolean;
|
|
38
|
+
superTextArea: any;
|
|
39
|
+
maxWidth: undefined;
|
|
40
|
+
minHeight: number;
|
|
41
|
+
maxHeight: undefined;
|
|
42
|
+
extensions: () => never[];
|
|
43
|
+
editorClass: undefined;
|
|
44
|
+
contentClass: undefined;
|
|
45
|
+
isOpenSuperView: boolean;
|
|
46
|
+
}>>> & Readonly<{
|
|
47
|
+
onChange?: ((value: import('../../type').SBSEditorOnChange) => any) | undefined;
|
|
48
|
+
onEnter?: (() => any) | undefined;
|
|
49
|
+
"onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined;
|
|
50
|
+
onUpdateCommentValue?: ((value: string | object | undefined) => any) | undefined;
|
|
51
|
+
onOnFocusEditor?: ((value: CoreEditor) => any) | undefined;
|
|
52
|
+
"onChanged:selection"?: ((value: any) => any) | undefined;
|
|
53
|
+
}>, {
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
extensions: import('@tiptap/core').AnyExtension[];
|
|
56
|
+
modelValue: string | object;
|
|
57
|
+
output: "html" | "json" | "text";
|
|
58
|
+
maxHeight: string | number;
|
|
59
|
+
maxWidth: string | number;
|
|
60
|
+
minHeight: string | number;
|
|
61
|
+
superTextArea: {
|
|
62
|
+
view: boolean;
|
|
63
|
+
button: boolean;
|
|
64
|
+
};
|
|
65
|
+
isOpenSuperView: boolean;
|
|
66
|
+
dark: boolean;
|
|
67
|
+
hideToolbar: boolean;
|
|
68
|
+
disableBubble: boolean;
|
|
69
|
+
hideBubble: boolean;
|
|
70
|
+
editorClass: string | string[] | Record<string, any>;
|
|
71
|
+
contentClass: string | string[] | Record<string, any>;
|
|
72
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
75
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
76
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
77
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
78
|
+
} : {
|
|
79
|
+
type: import('vue').PropType<T[K]>;
|
|
80
|
+
required: true;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
type __VLS_WithDefaults<P, D> = {
|
|
84
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
85
|
+
default: D[K];
|
|
86
|
+
}> : P[K];
|
|
87
|
+
};
|
|
88
|
+
type __VLS_Prettify<T> = {
|
|
89
|
+
[K in keyof T]: T[K];
|
|
90
|
+
} & {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
modelValue: string;
|
|
3
|
+
}>, {
|
|
4
|
+
modelValue: string;
|
|
5
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: string) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
modelValue: string;
|
|
9
|
+
}>, {
|
|
10
|
+
modelValue: string;
|
|
11
|
+
}>>> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
modelValue: string;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_WithDefaults<P, D> = {
|
|
27
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
+
default: D[K];
|
|
29
|
+
}> : P[K];
|
|
30
|
+
};
|
|
31
|
+
type __VLS_Prettify<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|
|
@@ -88,6 +88,12 @@ export interface BaseKitOptions {
|
|
|
88
88
|
* @default undefined
|
|
89
89
|
*/
|
|
90
90
|
page?: PageOption;
|
|
91
|
+
/**
|
|
92
|
+
* Image options or false, indicating whether to enable the image
|
|
93
|
+
*
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
image?: boolean;
|
|
91
97
|
/**
|
|
92
98
|
* Disable feature or extension
|
|
93
99
|
*
|
|
@@ -3,7 +3,7 @@ export declare enum SuperTextStatus {
|
|
|
3
3
|
NOT_RENDERED = 0
|
|
4
4
|
}
|
|
5
5
|
export declare function useConfigTiptap(): {
|
|
6
|
-
defaultExtensions: globalThis.ComputedRef<(import('@tiptap/core').
|
|
6
|
+
defaultExtensions: globalThis.ComputedRef<(import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any> | import('@tiptap/core').Extension<import('../extensions').BaseKitOptions, any> | import('@tiptap/core').Node<import('../extensions').ClearOptions, any> | import('@tiptap/core').Mark<import('../extensions').LinkOptions, any> | import('@tiptap/core').Extension<import('../extensions').HistoryOptions, any> | import('@tiptap/core').Node<import('../extensions').TableOptions, any> | import('@tiptap/core').Extension<import('../extensions').FormatPainterOptions, any> | import('@tiptap/core').Node<import('../extensions').ColumnsOptions, any>)[]>;
|
|
7
7
|
content: globalThis.Ref<string, string>;
|
|
8
8
|
dispatchUpdateStatusSuperText: (nodeId: string, status: SuperTextStatus) => void;
|
|
9
9
|
};
|
package/lib/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
|
-
import { default as CoreEditor } from './components/editor/
|
|
2
|
+
import { default as CoreEditor } from './components/editor/CoreEditorV2.vue';
|
|
3
3
|
import { default as ArticleEditor } from './components/editor/ArticleEditor.vue';
|
|
4
4
|
import { default as DigitalNewsEditor } from './components/editor/DigitalNewsEditor.vue';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ export { useConfigTiptap, useTiptapStore } from './hooks';
|
|
|
9
9
|
export * as nodeNames from './utils/node-names';
|
|
10
10
|
export type * from './type';
|
|
11
11
|
export { useEditor } from '@tiptap/vue-3';
|
|
12
|
-
export {
|
|
12
|
+
export type { Editor as EditorInstance } from '@tiptap/core';
|
|
13
13
|
export { enUS, koKR } from './locales';
|
|
14
14
|
export { SBSEditorPlugin, CoreEditor, ArticleEditor, DigitalNewsEditor };
|
|
15
15
|
export default SBSEditorPlugin;
|
package/lib/src/type.d.ts
CHANGED
|
@@ -192,6 +192,18 @@ export interface EditorProps {
|
|
|
192
192
|
* input value
|
|
193
193
|
*/
|
|
194
194
|
modelValue?: string | object;
|
|
195
|
+
/**
|
|
196
|
+
* input value
|
|
197
|
+
*/
|
|
198
|
+
commentValue?: string | object;
|
|
199
|
+
/**
|
|
200
|
+
* font size default editor
|
|
201
|
+
*/
|
|
202
|
+
fontSizeDefault?: number;
|
|
203
|
+
/**
|
|
204
|
+
* super view of comment editor
|
|
205
|
+
*/
|
|
206
|
+
isOpenSuperView?: boolean;
|
|
195
207
|
/**
|
|
196
208
|
* Editor output type
|
|
197
209
|
*
|
|
@@ -241,6 +253,10 @@ export interface EditorProps {
|
|
|
241
253
|
* Editor content maximum height
|
|
242
254
|
*/
|
|
243
255
|
maxHeight?: string | number;
|
|
256
|
+
/**
|
|
257
|
+
* Editor content height
|
|
258
|
+
*/
|
|
259
|
+
height?: string | number;
|
|
244
260
|
/**
|
|
245
261
|
* Tiptap extensions
|
|
246
262
|
*/
|
|
@@ -258,5 +274,7 @@ export interface EditorEmits {
|
|
|
258
274
|
(event: 'enter'): void;
|
|
259
275
|
(event: 'change', value: SBSEditorOnChange): void;
|
|
260
276
|
(event: 'update:modelValue', value: EditorProps['modelValue']): void;
|
|
277
|
+
(event: 'updateCommentValue', value: EditorProps['commentValue']): void;
|
|
278
|
+
(event: 'onFocusEditor', value: SBSEditorOnChange['editor']): void;
|
|
261
279
|
(event: 'changed:selection', value: any): void;
|
|
262
280
|
}
|
|
@@ -2,7 +2,8 @@ export declare enum EventKey {
|
|
|
2
2
|
TOGGLE_SUPER_TEXT = "toggle-super-text",
|
|
3
3
|
SUPER_TEXT_UPDATE_POSITION = "SUPER_TEXT_UPDATE_POSITION",
|
|
4
4
|
RENDER_SUPER_TEXT = "RENDER_SUPER_TEXT",
|
|
5
|
-
SUPER_VIEW_PAGE = "SUPER_VIEW_PAGE"
|
|
5
|
+
SUPER_VIEW_PAGE = "SUPER_VIEW_PAGE",
|
|
6
|
+
INCREASE_DECREASE_FONTSIZE = "increase-decrease-fontsize"
|
|
6
7
|
}
|
|
7
8
|
export type EventBusAction<T> = {
|
|
8
9
|
action: 'render' | 'hover' | 'remove' | 'status';
|