@norio-office/rich-text 0.3.0 → 0.7.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 +1368 -200
- package/dist/components/BlockColorPanel.vue.d.ts +21 -0
- package/dist/components/ColorPalettePanel.vue.d.ts +13 -0
- package/dist/components/FormulaEditorDialog.vue.d.ts +2 -2
- package/dist/components/ImageBlockView.vue.d.ts +3 -0
- package/dist/components/RichTextEditor.vue.d.ts +50 -10
- package/dist/components/RichTextOutline.vue.d.ts +2 -2
- package/dist/components/TableThemePanel.vue.d.ts +25 -0
- package/dist/components/TextSelectionMenu.vue.d.ts +28 -0
- package/dist/composables/useNodeViewEditable.d.ts +2 -0
- package/dist/composables/useRichTextEditor.d.ts +2 -1
- package/dist/extensions/comment-mark.d.ts +2 -0
- package/dist/extensions/styled-horizontal-rule.d.ts +1 -0
- package/dist/extensions/themed-table.d.ts +1 -0
- package/dist/feature-codes.d.ts +45 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10119 -7059
- package/dist/index.umd.cjs +2669 -1711
- package/dist/style.css +1 -1
- package/dist/types.d.ts +133 -4
- package/dist/utils/color-palette.d.ts +2 -0
- package/dist/utils/divider.d.ts +13 -0
- package/dist/utils/table-theme.d.ts +44 -0
- package/docs/usage.md +32 -1
- package/package.json +9 -2
- package/yjs/README.md +63 -0
- package/yjs/index.js +224 -0
- package/yjs/package.json +14 -0
- package/dist/index.es-D5dDjrL4.js +0 -5751
- package/dist/jspdf.es.min-B2a2-__Q.js +0 -18214
- package/dist/purify.es-jA1o6Tcu.js +0 -597
- package/dist/typeof-Dz1Ap89p.js +0 -11
- /package/dist/{html2canvas-CmV4ppBE.js → html2canvas-4hiP1s1t.js} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type BlockColorKind = 'text' | 'background' | 'border' | 'fill';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
textColor?: string | null;
|
|
4
|
+
backgroundColor?: string | null;
|
|
5
|
+
color?: string | null;
|
|
6
|
+
kind?: 'border' | 'fill';
|
|
7
|
+
label?: string;
|
|
8
|
+
presetColors?: readonly string[];
|
|
9
|
+
customKind: BlockColorKind | null;
|
|
10
|
+
hoverEnabled: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
change: (kind: BlockColorKind, color: string | null) => any;
|
|
14
|
+
reset: () => any;
|
|
15
|
+
custom: (kind: BlockColorKind, anchor: HTMLElement) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onChange?: ((kind: BlockColorKind, color: string | null) => any) | undefined;
|
|
18
|
+
onReset?: (() => any) | undefined;
|
|
19
|
+
onCustom?: ((kind: BlockColorKind, anchor: HTMLElement) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
color: string;
|
|
3
|
+
defaultColor: string;
|
|
4
|
+
recentColors: string[];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (color: string) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onChange?: ((color: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
pickerRef: HTMLInputElement;
|
|
12
|
+
}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -5,11 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
submitLabel?: string;
|
|
6
6
|
};
|
|
7
7
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
-
close: () => any;
|
|
9
8
|
submit: (value: string) => any;
|
|
9
|
+
close: () => any;
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
-
onClose?: (() => any) | undefined;
|
|
12
11
|
onSubmit?: ((value: string) => any) | undefined;
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
14
|
title: string;
|
|
15
15
|
value: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { NodeViewProps } from '@tiptap/vue-3';
|
|
2
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
3
|
alignDropdownRef: HTMLDivElement;
|
|
4
|
+
linkTriggerRef: HTMLButtonElement;
|
|
4
5
|
inputRef: HTMLInputElement;
|
|
6
|
+
linkPopoverRef: HTMLFormElement;
|
|
7
|
+
linkInputRef: HTMLInputElement;
|
|
5
8
|
}, any>;
|
|
6
9
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSONContent } from '@tiptap/core';
|
|
2
|
-
import { RichTextEditorFilePayload, RichTextEditorCollectedFilePayload, RichTextEditorImageExportOptions, RichTextEditorImagePayload, RichTextEditorLocalFilePayload, RichTextEditorMentionItem, RichTextEditorOutlineChangeHandler, RichTextEditorOutlineItem, RichTextEditorOutlineState, RichTextEditorProps, RichTextEditorUploadErrorPayload, RichTextEditorWatermarkOptions, RichTextEditorVideoPayload } from '../types';
|
|
2
|
+
import { RichTextEditorFilePayload, RichTextEditorCollectedFilePayload, RichTextEditorCommentCreatePayload, RichTextEditorCommentDeletePayload, RichTextEditorCommentMentionProviderPayload, RichTextEditorCommentReplyPayload, RichTextEditorCommentResolvePayload, RichTextEditorCommentSubmitPayload, RichTextEditorCommentThread, RichTextEditorCommentUpdatePayload, RichTextEditorCommentUser, RichTextEditorImageExportOptions, RichTextEditorImagePayload, RichTextEditorLocalFilePayload, RichTextEditorMentionItem, RichTextEditorOutlineChangeHandler, RichTextEditorOutlineItem, RichTextEditorOutlineState, RichTextEditorProps, RichTextEditorUploadErrorPayload, RichTextEditorWatermarkOptions, RichTextEditorVideoPayload } from '../types';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
4
4
|
exportPdf: () => Promise<Blob | null>;
|
|
5
5
|
exportImage: (options?: RichTextEditorImageExportOptions) => Promise<Blob | null>;
|
|
@@ -20,6 +20,7 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
|
20
20
|
getActiveOutlinePos: () => number | null;
|
|
21
21
|
focusOutlineItem: (pos: number) => boolean;
|
|
22
22
|
onOutlineChange: (handler: RichTextEditorOutlineChangeHandler) => () => void;
|
|
23
|
+
focusCommentThread: (threadId: string) => boolean;
|
|
23
24
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
25
|
change: (value: JSONContent) => any;
|
|
25
26
|
"update:modelValue": (value: JSONContent) => any;
|
|
@@ -30,6 +31,16 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
|
30
31
|
"mention-item-click": (value: RichTextEditorMentionItem) => any;
|
|
31
32
|
"mention-submit": (value: RichTextEditorMentionItem) => any;
|
|
32
33
|
"outline-change": (value: RichTextEditorOutlineState) => any;
|
|
34
|
+
"comment-create": (value: RichTextEditorCommentCreatePayload) => any;
|
|
35
|
+
"comment-reply": (value: RichTextEditorCommentReplyPayload) => any;
|
|
36
|
+
"comment-update": (value: RichTextEditorCommentUpdatePayload) => any;
|
|
37
|
+
"comment-delete": (value: RichTextEditorCommentDeletePayload) => any;
|
|
38
|
+
"comment-resolve": (value: RichTextEditorCommentResolvePayload) => any;
|
|
39
|
+
"comment-select": (value: RichTextEditorCommentThread) => any;
|
|
40
|
+
"comment-submit": (value: RichTextEditorCommentSubmitPayload) => any;
|
|
41
|
+
"comment-mention-search": (value: RichTextEditorCommentMentionProviderPayload) => any;
|
|
42
|
+
"comment-mention-item-click": (value: RichTextEditorMentionItem) => any;
|
|
43
|
+
"comment-mention-submit": (value: RichTextEditorMentionItem) => any;
|
|
33
44
|
}, string, import('vue').PublicProps, Readonly<RichTextEditorProps> & Readonly<{
|
|
34
45
|
onChange?: ((value: JSONContent) => any) | undefined;
|
|
35
46
|
"onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
|
|
@@ -40,9 +51,21 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
|
40
51
|
"onMention-item-click"?: ((value: RichTextEditorMentionItem) => any) | undefined;
|
|
41
52
|
"onMention-submit"?: ((value: RichTextEditorMentionItem) => any) | undefined;
|
|
42
53
|
"onOutline-change"?: ((value: RichTextEditorOutlineState) => any) | undefined;
|
|
54
|
+
"onComment-create"?: ((value: RichTextEditorCommentCreatePayload) => any) | undefined;
|
|
55
|
+
"onComment-reply"?: ((value: RichTextEditorCommentReplyPayload) => any) | undefined;
|
|
56
|
+
"onComment-update"?: ((value: RichTextEditorCommentUpdatePayload) => any) | undefined;
|
|
57
|
+
"onComment-delete"?: ((value: RichTextEditorCommentDeletePayload) => any) | undefined;
|
|
58
|
+
"onComment-resolve"?: ((value: RichTextEditorCommentResolvePayload) => any) | undefined;
|
|
59
|
+
"onComment-select"?: ((value: RichTextEditorCommentThread) => any) | undefined;
|
|
60
|
+
"onComment-submit"?: ((value: RichTextEditorCommentSubmitPayload) => any) | undefined;
|
|
61
|
+
"onComment-mention-search"?: ((value: RichTextEditorCommentMentionProviderPayload) => any) | undefined;
|
|
62
|
+
"onComment-mention-item-click"?: ((value: RichTextEditorMentionItem) => any) | undefined;
|
|
63
|
+
"onComment-mention-submit"?: ((value: RichTextEditorMentionItem) => any) | undefined;
|
|
43
64
|
}>, {
|
|
44
|
-
placeholder: string;
|
|
45
65
|
mode: "edit" | "preview";
|
|
66
|
+
placeholder: string;
|
|
67
|
+
comments: RichTextEditorCommentThread[] | null;
|
|
68
|
+
watermark: RichTextEditorWatermarkOptions | null;
|
|
46
69
|
mention: boolean;
|
|
47
70
|
editable: boolean;
|
|
48
71
|
uploadImage: import('..').RichTextEditorUploadHook | null;
|
|
@@ -50,11 +73,19 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
|
50
73
|
uploadVideo: import('..').RichTextEditorUploadHook | null;
|
|
51
74
|
modelValue: JSONContent | null;
|
|
52
75
|
documentName: string;
|
|
53
|
-
|
|
76
|
+
showToolbar: boolean;
|
|
54
77
|
showOutline: boolean;
|
|
55
|
-
outlinePlacement:
|
|
78
|
+
outlinePlacement: import('../feature-codes').RichTextEditorOutlinePlacement;
|
|
56
79
|
messages: import('..').RichTextEditorMessages | null;
|
|
80
|
+
featureCodes: import('..').RichTextEditorCode[] | null;
|
|
81
|
+
enabledFeatureItems: import('..').RichTextEditorFeatureItemKey[] | null;
|
|
82
|
+
commentUser: RichTextEditorCommentUser | null;
|
|
83
|
+
showComments: boolean;
|
|
84
|
+
commentMention: boolean;
|
|
57
85
|
uploadFile: import('..').RichTextEditorUploadHook | null;
|
|
86
|
+
uploadCommentImage: import('..').RichTextEditorUploadHook | null;
|
|
87
|
+
commentMentionProvider: import('..').RichTextEditorCommentMentionProvider | null;
|
|
88
|
+
onCommentMentionSearch: import('..').RichTextEditorCommentMentionProvider | null;
|
|
58
89
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
59
90
|
rootRef: HTMLDivElement;
|
|
60
91
|
insertMenuRef: HTMLDivElement;
|
|
@@ -65,29 +96,38 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
|
|
|
65
96
|
fontFamilyMenuRef: HTMLDivElement;
|
|
66
97
|
fontSizeMenuRef: HTMLDivElement;
|
|
67
98
|
colorMenuRef: HTMLDivElement;
|
|
68
|
-
colorPickerRef: HTMLInputElement;
|
|
69
99
|
highlightMenuRef: HTMLDivElement;
|
|
70
|
-
highlightPickerRef: HTMLInputElement;
|
|
71
100
|
scriptMenuRef: HTMLDivElement;
|
|
72
101
|
alignMenuRef: HTMLDivElement;
|
|
73
102
|
quoteMenuRef: HTMLDivElement;
|
|
74
103
|
emojiToolbarMenuRef: HTMLDivElement;
|
|
75
|
-
|
|
104
|
+
outlineTriggerRef: HTMLButtonElement;
|
|
76
105
|
pageRef: HTMLDivElement;
|
|
77
106
|
tableHeadingMenuRef: HTMLDivElement;
|
|
78
107
|
tableListMenuRef: HTMLDivElement;
|
|
79
108
|
tableColorMenuRef: HTMLDivElement;
|
|
80
109
|
tableHighlightMenuRef: HTMLDivElement;
|
|
81
110
|
tableActionColorMenuRef: HTMLDivElement;
|
|
82
|
-
|
|
83
|
-
highlightBlockSettingsMenuRef: HTMLDivElement;
|
|
111
|
+
tableThemeMenuRef: HTMLDivElement;
|
|
84
112
|
countdownBubbleMenuRef: HTMLDivElement;
|
|
85
113
|
countdownBubbleEditButtonRef: HTMLButtonElement;
|
|
86
114
|
mentionPanelRef: HTMLDivElement;
|
|
87
|
-
|
|
115
|
+
blockSideMenuRef: HTMLDivElement;
|
|
116
|
+
blockSidePropertiesTriggerRef: HTMLButtonElement;
|
|
117
|
+
blockSideColorTriggerRef: HTMLButtonElement;
|
|
118
|
+
blockSideTableThemeTriggerRef: HTMLButtonElement;
|
|
119
|
+
blockSideSurfaceBorderTriggerRef: HTMLButtonElement;
|
|
120
|
+
blockSideSurfaceFillTriggerRef: HTMLButtonElement;
|
|
121
|
+
blockSideHighlightSettingsTriggerRef: HTMLButtonElement;
|
|
122
|
+
blockSideDividerStyleTriggerRef: HTMLButtonElement;
|
|
123
|
+
blockSideDividerColorTriggerRef: HTMLButtonElement;
|
|
124
|
+
commentPanelRef: HTMLElement;
|
|
125
|
+
commentMentionPanelRef: HTMLDivElement;
|
|
88
126
|
markdownImportInputRef: HTMLInputElement;
|
|
89
127
|
localFileInputRef: HTMLInputElement;
|
|
90
128
|
imageUploadInputRef: HTMLInputElement;
|
|
91
129
|
videoUploadInputRef: HTMLInputElement;
|
|
130
|
+
commentImageInputRef: HTMLInputElement;
|
|
131
|
+
statusbarExportMenuRef: HTMLDivElement;
|
|
92
132
|
}, HTMLDivElement>;
|
|
93
133
|
export default _default;
|
|
@@ -12,12 +12,12 @@ type __VLS_Props = {
|
|
|
12
12
|
};
|
|
13
13
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
14
|
select: (pos: number) => any;
|
|
15
|
-
toggle: () => any;
|
|
16
15
|
change: (state: RichTextEditorOutlineState) => any;
|
|
16
|
+
toggle: () => any;
|
|
17
17
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
18
|
onSelect?: ((pos: number) => any) | undefined;
|
|
19
|
-
onToggle?: (() => any) | undefined;
|
|
20
19
|
onChange?: ((state: RichTextEditorOutlineState) => any) | undefined;
|
|
20
|
+
onToggle?: (() => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
title: string;
|
|
23
23
|
open: boolean;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TableThemeColors } from '../utils/table-theme';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
theme: TableThemeColors | null;
|
|
4
|
+
recentColors: string[];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
change: (theme: TableThemeColors) => any;
|
|
8
|
+
clear: () => any;
|
|
9
|
+
resize: (height: number) => any;
|
|
10
|
+
close: () => any;
|
|
11
|
+
colorUsed: (color: string) => any;
|
|
12
|
+
reposition: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onChange?: ((theme: TableThemeColors) => any) | undefined;
|
|
15
|
+
onClear?: (() => any) | undefined;
|
|
16
|
+
onResize?: ((height: number) => any) | undefined;
|
|
17
|
+
onClose?: (() => any) | undefined;
|
|
18
|
+
onColorUsed?: ((color: string) => any) | undefined;
|
|
19
|
+
onReposition?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
21
|
+
panelRef: HTMLDivElement;
|
|
22
|
+
surfaceRef: HTMLDivElement;
|
|
23
|
+
paletteRef: HTMLDivElement;
|
|
24
|
+
}, HTMLDivElement>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Editor } from '@tiptap/core';
|
|
2
|
+
export type TextSelectionAction = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
run?: () => void;
|
|
10
|
+
options?: TextSelectionAction[];
|
|
11
|
+
color?: string;
|
|
12
|
+
defaultColor?: string;
|
|
13
|
+
recentColors?: string[];
|
|
14
|
+
setColor?: (color: string) => void;
|
|
15
|
+
divider?: boolean;
|
|
16
|
+
fontFamily?: string;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Props = {
|
|
19
|
+
editor: Editor;
|
|
20
|
+
actions: TextSelectionAction[];
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
menuRef: HTMLDivElement;
|
|
25
|
+
panelRef: HTMLDivElement;
|
|
26
|
+
nestedPanelRef: HTMLDivElement;
|
|
27
|
+
}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { JSONContent } from '@tiptap/core';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
|
-
import { RichTextEditorLocalFilePayload, RichTextEditorMentionItem, RichTextEditorUploadErrorHandler, RichTextEditorUploadHook } from '../types';
|
|
3
|
+
import { RichTextEditorCollaborationOptions, RichTextEditorLocalFilePayload, RichTextEditorMentionItem, RichTextEditorUploadErrorHandler, RichTextEditorUploadHook } from '../types';
|
|
4
4
|
type UseRichTextEditorOptions = {
|
|
5
5
|
content: JSONContent;
|
|
6
6
|
editable: boolean;
|
|
7
7
|
placeholder: string;
|
|
8
|
+
collaboration?: RichTextEditorCollaborationOptions | null;
|
|
8
9
|
uploadImage?: RichTextEditorUploadHook | Ref<RichTextEditorUploadHook | null | undefined> | null;
|
|
9
10
|
uploadVideo?: RichTextEditorUploadHook | Ref<RichTextEditorUploadHook | null | undefined> | null;
|
|
10
11
|
onUploadError?: RichTextEditorUploadErrorHandler | Ref<RichTextEditorUploadErrorHandler | null | undefined> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledHorizontalRule: import('@tiptap/core').Node<import('@tiptap/extension-horizontal-rule').HorizontalRuleOptions, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ThemedTable: import('@tiptap/core').Node<import('@tiptap/extension-table').TableOptions, any>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const RICH_TEXT_EDITOR_FEATURE_CODES: {
|
|
2
|
+
readonly comments: "comments";
|
|
3
|
+
readonly outlineLeft: "outlineLeft";
|
|
4
|
+
readonly outlineRight: "outlineRight";
|
|
5
|
+
readonly watermark: "watermark";
|
|
6
|
+
readonly collaboration: "collaboration";
|
|
7
|
+
readonly mention: "mention";
|
|
8
|
+
};
|
|
9
|
+
export type RichTextEditorFeatureCode = (typeof RICH_TEXT_EDITOR_FEATURE_CODES)[keyof typeof RICH_TEXT_EDITOR_FEATURE_CODES];
|
|
10
|
+
export type RichTextEditorLegacyFeatureItemKey = 'comments' | 'outline' | 'watermark' | 'collaboration' | 'mention';
|
|
11
|
+
export type RichTextEditorFeatureItemKey = RichTextEditorFeatureCode | RichTextEditorLegacyFeatureItemKey;
|
|
12
|
+
export type RichTextEditorOutlinePlacement = 'left' | 'right';
|
|
13
|
+
export declare const RICH_TEXT_EDITOR_EXPORT_CODES: {
|
|
14
|
+
readonly pdf: "pdf";
|
|
15
|
+
readonly html: "html";
|
|
16
|
+
readonly image: "image";
|
|
17
|
+
readonly print: "print";
|
|
18
|
+
};
|
|
19
|
+
export type RichTextEditorExportItemKey = (typeof RICH_TEXT_EDITOR_EXPORT_CODES)[keyof typeof RICH_TEXT_EDITOR_EXPORT_CODES];
|
|
20
|
+
export declare const RICH_TEXT_EDITOR_INSERT_MENU_CODES: {
|
|
21
|
+
readonly image: "image";
|
|
22
|
+
readonly video: "video";
|
|
23
|
+
readonly table: "table";
|
|
24
|
+
readonly localFile: "local-file";
|
|
25
|
+
readonly columns: "columns";
|
|
26
|
+
readonly highlightBlock: "highlight-block";
|
|
27
|
+
readonly date: "date";
|
|
28
|
+
readonly codeBlock: "code-block";
|
|
29
|
+
readonly formula: "formula";
|
|
30
|
+
readonly blockquote: "blockquote";
|
|
31
|
+
readonly emoji: "emoji";
|
|
32
|
+
readonly link: "link";
|
|
33
|
+
readonly divider: "divider";
|
|
34
|
+
readonly countdown: "countdown";
|
|
35
|
+
readonly markdownImport: "markdown-import";
|
|
36
|
+
};
|
|
37
|
+
export type RichTextEditorInsertMenuItemKey = (typeof RICH_TEXT_EDITOR_INSERT_MENU_CODES)[keyof typeof RICH_TEXT_EDITOR_INSERT_MENU_CODES];
|
|
38
|
+
export declare const RICH_TEXT_EDITOR_TOOLBAR_ACTION_CODES: {
|
|
39
|
+
readonly blockquote: "blockquote";
|
|
40
|
+
};
|
|
41
|
+
export type RichTextEditorToolbarActionKey = (typeof RICH_TEXT_EDITOR_TOOLBAR_ACTION_CODES)[keyof typeof RICH_TEXT_EDITOR_TOOLBAR_ACTION_CODES];
|
|
42
|
+
export type RichTextEditorCode = RichTextEditorFeatureItemKey | RichTextEditorExportItemKey | RichTextEditorInsertMenuItemKey | RichTextEditorToolbarActionKey;
|
|
43
|
+
export declare function isRichTextCodeEnabled(code: string, codes?: readonly string[] | null): boolean;
|
|
44
|
+
export declare function isRichTextFeatureCodeEnabled(code: RichTextEditorFeatureItemKey, featureCodes?: readonly RichTextEditorCode[] | null): boolean;
|
|
45
|
+
export declare function resolveRichTextOutlinePlacement(preferredPlacement: RichTextEditorOutlinePlacement, featureCodes?: readonly RichTextEditorCode[] | null): RichTextEditorOutlinePlacement | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,7 @@ import { default as RichTextOutline } from './components/RichTextOutline.vue';
|
|
|
5
5
|
import { default as ScrollArea } from './components/ScrollArea.vue';
|
|
6
6
|
export { OfficeColorIcon, OfficeIcon, RichTextEditor, RichTextOutline, ScrollArea };
|
|
7
7
|
export { colorIconNames, monoIconNames } from './icons';
|
|
8
|
-
export
|
|
8
|
+
export { isRichTextCodeEnabled, isRichTextFeatureCodeEnabled, RICH_TEXT_EDITOR_EXPORT_CODES, RICH_TEXT_EDITOR_FEATURE_CODES, RICH_TEXT_EDITOR_INSERT_MENU_CODES, RICH_TEXT_EDITOR_TOOLBAR_ACTION_CODES, resolveRichTextOutlinePlacement, } from './feature-codes';
|
|
9
|
+
export type { RichTextEditorCode, RichTextEditorExportItemKey, RichTextEditorFeatureCode, RichTextEditorFeatureItemKey, RichTextEditorInsertMenuItemKey, RichTextEditorToolbarActionKey, } from './feature-codes';
|
|
10
|
+
export type { OfficeColorIconProps, OfficeIconProps, RichTextEditorAlign, RichTextEditorCollaborationAwareness, RichTextEditorCollaborationDocument, RichTextEditorCollaborationOptions, RichTextEditorCollaborationProvider, RichTextEditorCollaborationUser, RichTextEditorCommentCreatePayload, RichTextEditorCommentDeletePayload, RichTextEditorCommentImage, RichTextEditorCommentItem, RichTextEditorCommentMentionItem, RichTextEditorCommentMentionProvider, RichTextEditorCommentMentionProviderPayload, RichTextEditorCommentReplyPayload, RichTextEditorCommentResolvePayload, RichTextEditorCommentSubmitPayload, RichTextEditorCommentThread, RichTextEditorCommentUpdatePayload, RichTextEditorCommentUser, RichTextEditorCollectedFilePayload, RichTextEditorFilePayload, RichTextEditorImageExportOptions, RichTextEditorImagePayload, RichTextEditorInstance, RichTextEditorLocalFilePayload, RichTextEditorMessages, RichTextEditorMentionItem, RichTextEditorMentionProvider, RichTextEditorMentionProviderPayload, RichTextEditorMentionType, RichTextEditorOutlineChangeHandler, RichTextEditorOutlineItem, RichTextEditorOutlineState, RichTextEditorProps, RichTextEditorUploadHook, RichTextEditorUploadErrorHandler, RichTextEditorUploadErrorPayload, RichTextEditorUploadInput, RichTextEditorUploadKind, RichTextEditorUploadResult, RichTextEditorWatermarkOptions, RichTextEditorVideoPayload, } from './types';
|
|
9
11
|
export default RichTextEditor;
|