@fileverse-dev/ddoc 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
- declare const DdocEditor: ({ isPreviewMode, onPublish, data, togglePreviewMode, enableCollaboration, collaborationId, username, onAutoSave }: DdocProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const DdocEditor: ({ isPreviewMode, data, enableCollaboration, collaborationId, username, onAutoSave, renderToolRightSection }: DdocProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default DdocEditor;
@@ -1,17 +1,20 @@
1
1
  import { JSONContent } from '@tiptap/core';
2
2
  import { EditorProps } from '@tiptap/pm/view';
3
+ import { Editor } from '@tiptap/react';
3
4
 
4
5
  export declare const DdocEditorProps: EditorProps;
5
6
  export interface DdocProps {
6
7
  enableCollaboration?: boolean;
7
8
  collaborationId?: string;
8
9
  isPreviewMode: boolean;
9
- togglePreviewMode: (flag: boolean) => void;
10
10
  toggleCollaboration?: (flag: boolean) => void;
11
- onPublish: (data: Data) => void;
12
- data?: Data;
11
+ data?: Data | null;
13
12
  onAutoSave?: (data: Data) => void;
14
13
  username?: string;
14
+ renderToolRightSection?: ({ editor, pluginMetaData }: {
15
+ editor: Editor;
16
+ pluginMetaData: PluginMetaData;
17
+ }) => JSX.Element;
15
18
  }
16
19
  export interface Data {
17
20
  metaData: PluginMetaData;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "1.2.4",
5
+ "version": "1.2.5",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {