vdc-editor 0.1.39 → 0.1.40

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.
@@ -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,93 @@
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
+ }>>, {
23
+ editor: Editor;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ enter: () => void;
26
+ change: (value: import('../../type').SBSEditorOnChange) => void;
27
+ "update:modelValue": (value: string | object | undefined) => void;
28
+ updateCommentValue: (value: string | object | undefined) => void;
29
+ onFocusEditor: (value: CoreEditor) => void;
30
+ "changed:selection": (value: any) => void;
31
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<EditorProps>, {
32
+ modelValue: string;
33
+ commentValue: string;
34
+ output: string;
35
+ dark: undefined;
36
+ disabled: boolean;
37
+ hideToolbar: boolean;
38
+ disableBubble: boolean;
39
+ hideBubble: boolean;
40
+ superTextArea: any;
41
+ maxWidth: undefined;
42
+ minHeight: number;
43
+ maxHeight: undefined;
44
+ height: undefined;
45
+ extensions: () => never[];
46
+ editorClass: undefined;
47
+ contentClass: undefined;
48
+ }>>> & Readonly<{
49
+ onChange?: ((value: import('../../type').SBSEditorOnChange) => any) | undefined;
50
+ onEnter?: (() => any) | undefined;
51
+ "onUpdate:modelValue"?: ((value: string | object | undefined) => any) | undefined;
52
+ onUpdateCommentValue?: ((value: string | object | undefined) => any) | undefined;
53
+ onOnFocusEditor?: ((value: CoreEditor) => any) | undefined;
54
+ "onChanged:selection"?: ((value: any) => any) | undefined;
55
+ }>, {
56
+ height: string | number;
57
+ disabled: boolean;
58
+ extensions: import('@tiptap/core').AnyExtension[];
59
+ modelValue: string | object;
60
+ output: "html" | "json" | "text";
61
+ maxHeight: string | number;
62
+ maxWidth: string | number;
63
+ minHeight: string | number;
64
+ commentValue: string | object;
65
+ superTextArea: {
66
+ view: boolean;
67
+ button: boolean;
68
+ };
69
+ dark: boolean;
70
+ hideToolbar: boolean;
71
+ disableBubble: boolean;
72
+ hideBubble: boolean;
73
+ editorClass: string | string[] | Record<string, any>;
74
+ contentClass: string | string[] | Record<string, any>;
75
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
76
+ export default _default;
77
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
78
+ type __VLS_TypePropsToRuntimeProps<T> = {
79
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
80
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
81
+ } : {
82
+ type: import('vue').PropType<T[K]>;
83
+ required: true;
84
+ };
85
+ };
86
+ type __VLS_WithDefaults<P, D> = {
87
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
88
+ default: D[K];
89
+ }> : P[K];
90
+ };
91
+ type __VLS_Prettify<T> = {
92
+ [K in keyof T]: T[K];
93
+ } & {};
@@ -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
+ } & {};
@@ -26,6 +26,8 @@ export declare const COLORS_LIST: readonly ["#000000", "#262626", "#595959", "#8
26
26
  export declare const DEFAULT_FONT_SIZE_LIST: readonly ["10px", "11px", "12px", "14px", "16px", "18px", "20px", "22px", "24px", "26px", "28px", "36px", "48px", "72px"];
27
27
  /** Default font size value */
28
28
  export declare const DEFAULT_FONT_SIZE_VALUE: "defaut";
29
+ /** Default font size */
30
+ export declare const DEFAULT_FONT_SIZE: 16;
29
31
  /** Options for setting image size in the bubble menu */
30
32
  export declare enum IMAGE_SIZE {
31
33
  'size-small' = 200,
@@ -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
  *
@@ -1 +1,5 @@
1
- export * from './IDPlugin';
1
+ import { Extension } from '@tiptap/core';
2
+ import { IDPlugin } from './IDPlugin';
3
+
4
+ export declare const AutoIdExtension: Extension<any, any>;
5
+ export { IDPlugin };
@@ -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').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('@tiptap/extension-image').ImageOptions, 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>)[]>;
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
  };
@@ -0,0 +1,4 @@
1
+ export declare function useEditorLayout(editorWrapRef: any, mode: any): {
2
+ commentHeight: globalThis.Ref<number, number>;
3
+ contentHeight: globalThis.Ref<number, number>;
4
+ };
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from 'vue';
2
- import { default as CoreEditor } from './components/editor/CoreEditor.vue';
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 { type Editor as EditorInstance } from '@tiptap/core';
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,14 @@ 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
+ * super view of comment editor
201
+ */
202
+ isOpenSuperView?: boolean;
195
203
  /**
196
204
  * Editor output type
197
205
  *
@@ -241,6 +249,10 @@ export interface EditorProps {
241
249
  * Editor content maximum height
242
250
  */
243
251
  maxHeight?: string | number;
252
+ /**
253
+ * Editor content height
254
+ */
255
+ height?: string | number;
244
256
  /**
245
257
  * Tiptap extensions
246
258
  */
@@ -258,5 +270,7 @@ export interface EditorEmits {
258
270
  (event: 'enter'): void;
259
271
  (event: 'change', value: SBSEditorOnChange): void;
260
272
  (event: 'update:modelValue', value: EditorProps['modelValue']): void;
273
+ (event: 'updateCommentValue', value: EditorProps['commentValue']): void;
274
+ (event: 'onFocusEditor', value: SBSEditorOnChange['editor']): void;
261
275
  (event: 'changed:selection', value: any): void;
262
276
  }
@@ -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';