@norio-office/rich-text 0.3.0 → 0.6.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.
@@ -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,6 +51,16 @@ 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
65
  placeholder: string;
45
66
  mode: "edit" | "preview";
@@ -54,7 +75,14 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
54
75
  showOutline: boolean;
55
76
  outlinePlacement: "left" | "right";
56
77
  messages: import('..').RichTextEditorMessages | null;
78
+ comments: RichTextEditorCommentThread[] | null;
79
+ commentUser: RichTextEditorCommentUser | null;
80
+ showComments: boolean;
81
+ commentMention: boolean;
57
82
  uploadFile: import('..').RichTextEditorUploadHook | null;
83
+ uploadCommentImage: import('..').RichTextEditorUploadHook | null;
84
+ commentMentionProvider: import('..').RichTextEditorCommentMentionProvider | null;
85
+ onCommentMentionSearch: import('..').RichTextEditorCommentMentionProvider | null;
58
86
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
59
87
  rootRef: HTMLDivElement;
60
88
  insertMenuRef: HTMLDivElement;
@@ -85,9 +113,12 @@ declare const _default: import('vue').DefineComponent<RichTextEditorProps, {
85
113
  countdownBubbleEditButtonRef: HTMLButtonElement;
86
114
  mentionPanelRef: HTMLDivElement;
87
115
  blockSideColorPickerRef: HTMLInputElement;
116
+ commentPanelRef: HTMLElement;
117
+ commentMentionPanelRef: HTMLDivElement;
88
118
  markdownImportInputRef: HTMLInputElement;
89
119
  localFileInputRef: HTMLInputElement;
90
120
  imageUploadInputRef: HTMLInputElement;
91
121
  videoUploadInputRef: HTMLInputElement;
122
+ commentImageInputRef: HTMLInputElement;
92
123
  }, HTMLDivElement>;
93
124
  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,2 @@
1
+ import { Mark } from '@tiptap/core';
2
+ export declare const CommentMark: Mark<any, any>;
package/dist/index.d.ts CHANGED
@@ -5,5 +5,5 @@ 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 type { OfficeColorIconProps, OfficeIconProps, RichTextEditorAlign, RichTextEditorCollectedFilePayload, RichTextEditorFilePayload, RichTextEditorExportItemKey, RichTextEditorImageExportOptions, RichTextEditorImagePayload, RichTextEditorInstance, RichTextEditorInsertMenuItemKey, RichTextEditorLocalFilePayload, RichTextEditorMessages, RichTextEditorMentionItem, RichTextEditorMentionProvider, RichTextEditorMentionProviderPayload, RichTextEditorMentionType, RichTextEditorOutlineChangeHandler, RichTextEditorOutlineItem, RichTextEditorOutlineState, RichTextEditorProps, RichTextEditorToolbarActionKey, RichTextEditorUploadHook, RichTextEditorUploadErrorHandler, RichTextEditorUploadErrorPayload, RichTextEditorUploadInput, RichTextEditorUploadKind, RichTextEditorUploadResult, RichTextEditorWatermarkOptions, RichTextEditorVideoPayload, } from './types';
8
+ 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, RichTextEditorExportItemKey, RichTextEditorImageExportOptions, RichTextEditorImagePayload, RichTextEditorInstance, RichTextEditorInsertMenuItemKey, RichTextEditorLocalFilePayload, RichTextEditorMessages, RichTextEditorMentionItem, RichTextEditorMentionProvider, RichTextEditorMentionProviderPayload, RichTextEditorMentionType, RichTextEditorOutlineChangeHandler, RichTextEditorOutlineItem, RichTextEditorOutlineState, RichTextEditorProps, RichTextEditorToolbarActionKey, RichTextEditorUploadHook, RichTextEditorUploadErrorHandler, RichTextEditorUploadErrorPayload, RichTextEditorUploadInput, RichTextEditorUploadKind, RichTextEditorUploadResult, RichTextEditorWatermarkOptions, RichTextEditorVideoPayload, } from './types';
9
9
  export default RichTextEditor;