documint 0.0.5 → 0.0.6
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/index.d.ts +9 -4
- package/dist/index.js +36 -44
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,11 @@ export type Anchor = {
|
|
|
106
106
|
prefix?: string;
|
|
107
107
|
suffix?: string;
|
|
108
108
|
};
|
|
109
|
-
type
|
|
109
|
+
export type DocumintStorage = {
|
|
110
|
+
readFile(path: string): Promise<Blob | null>;
|
|
111
|
+
writeFile(file: File): Promise<string>;
|
|
112
|
+
};
|
|
113
|
+
type EditorCommand = "dedent" | "deleteBackward" | "indent" | "insertLineBreak" | "moveListItemDown" | "moveListItemUp" | "moveToDocumentEnd" | "moveToDocumentStart" | "moveToLineEnd" | "moveToLineStart" | "redo" | "selectAll" | "toggleBold" | "toggleCode" | "toggleItalic" | "toggleStrikethrough" | "toggleUnderline" | "undo";
|
|
110
114
|
export type EditorTheme = {
|
|
111
115
|
activeBlockBackground: string;
|
|
112
116
|
activeBlockFlash: string;
|
|
@@ -199,12 +203,13 @@ export type DocumintProps = {
|
|
|
199
203
|
theme?: DocumintTheme;
|
|
200
204
|
keybindings?: EditorKeybinding[];
|
|
201
205
|
presence?: DocumentPresence[];
|
|
206
|
+
storage?: DocumintStorage;
|
|
202
207
|
users?: DocumentUser[];
|
|
203
208
|
onContentChanged?: (content: string, document: Document$1) => void;
|
|
204
209
|
onStateChanged?: (state: DocumintState) => void;
|
|
205
|
-
onCommentChanged?: (
|
|
210
|
+
onCommentChanged?: (change: CommentChange) => void;
|
|
206
211
|
};
|
|
207
|
-
export type
|
|
212
|
+
export type CommentChange = {
|
|
208
213
|
kind: "added";
|
|
209
214
|
comment: Comment$1;
|
|
210
215
|
mentionedUserIds: string[];
|
|
@@ -239,7 +244,7 @@ export type DocumintState = {
|
|
|
239
244
|
selectionFrom: number;
|
|
240
245
|
selectionTo: number;
|
|
241
246
|
};
|
|
242
|
-
export declare function Documint({ className, content, keybindings, onCommentChanged, onContentChanged, onStateChanged, presence, theme, users, }: DocumintProps): import("react/jsx-runtime").JSX.Element;
|
|
247
|
+
export declare function Documint({ className, content, keybindings, onCommentChanged, onContentChanged, onStateChanged, presence, storage, theme, users, }: DocumintProps): import("react/jsx-runtime").JSX.Element;
|
|
243
248
|
export declare const lightTheme: EditorTheme;
|
|
244
249
|
export declare const darkTheme: EditorTheme;
|
|
245
250
|
export declare const mintTheme: EditorTheme;
|