@fileverse-dev/ddoc 1.3.0 → 1.3.2

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, data, enableCollaboration, collaborationId, username, onAutoSave, renderToolRightSection, ensProviderUrl, }: DdocProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const DdocEditor: ({ isPreviewMode, data, enableCollaboration, collaborationId, username, onAutoSave, renderToolRightSection, renderToolLeftSection, ensProviderUrl, }: DdocProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default DdocEditor;
@@ -1,6 +1,5 @@
1
1
  import { JSONContent } from '@tiptap/core';
2
2
  import { EditorProps } from '@tiptap/pm/view';
3
- import { Editor } from '@tiptap/react';
4
3
 
5
4
  export declare const DdocEditorProps: EditorProps;
6
5
  export interface DdocProps {
@@ -12,21 +11,16 @@ export interface DdocProps {
12
11
  onAutoSave?: (data: Data) => void;
13
12
  ensProviderUrl?: string;
14
13
  username?: string | null;
15
- renderToolRightSection?: ({ editor, pluginMetaData }: {
16
- editor: Editor;
17
- pluginMetaData: PluginMetaData;
14
+ renderToolLeftSection?: ({ editor }: {
15
+ editor: JSONContent;
16
+ }) => JSX.Element;
17
+ renderToolRightSection?: ({ editor }: {
18
+ editor: JSONContent;
18
19
  }) => JSX.Element;
19
20
  }
20
21
  export interface Data {
21
- metaData: PluginMetaData;
22
22
  editorJSONData: JSONContent;
23
23
  }
24
- export interface Plugin {
25
- title: string | null;
26
- }
27
- export interface PluginMetaData {
28
- plugin: Plugin;
29
- }
30
24
  export interface IUser {
31
25
  name: string;
32
26
  color: string;
@@ -1,9 +1,7 @@
1
- import { PluginMetaData, DdocProps } from './types';
1
+ import { DdocProps } from './types';
2
2
 
3
3
  export declare const useDdocEditor: ({ isPreviewMode, data, enableCollaboration, collaborationId, ensProviderUrl, username, onAutoSave, }: DdocProps) => {
4
4
  editor: import('@tiptap/react').Editor | null;
5
- pluginMetaData: PluginMetaData;
6
- setPluginMetaData: import('react').Dispatch<import('react').SetStateAction<PluginMetaData>>;
7
5
  focusEditor: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
8
6
  ref: import('react').RefObject<HTMLDivElement>;
9
7
  loading: boolean;
@@ -1 +1 @@
1
- export declare function debounce<T extends Function>(func: T, wait: number): T;
1
+ export declare function debounce<T extends (...args: any) => any>(func: T, wait: number): T;
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.3.0",
5
+ "version": "1.3.2",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -1,7 +0,0 @@
1
- import { PluginMetaData } from '../types';
2
-
3
- export declare const PluginNavbarLeftSection: ({ metaData, setMetaData, isPreviewMode, }: {
4
- metaData: PluginMetaData;
5
- setMetaData: React.Dispatch<React.SetStateAction<PluginMetaData>>;
6
- isPreviewMode: boolean;
7
- }) => import("react/jsx-runtime").JSX.Element;