@fileverse-dev/ddoc 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -22
- package/dist/index.es.js +5122 -5160
- package/dist/index.umd.js +53 -53
- package/dist/packages/ddoc/ddoc-editor.d.ts +1 -1
- package/dist/packages/ddoc/types.d.ts +4 -9
- package/dist/packages/ddoc/use-ddoc-editor.d.ts +1 -3
- package/dist/packages/ddoc/utils/debounce.d.ts +1 -1
- package/package.json +1 -1
- package/dist/packages/ddoc/navbar/navbar.d.ts +0 -7
@@ -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;
|
@@ -12,21 +12,16 @@ export interface DdocProps {
|
|
12
12
|
onAutoSave?: (data: Data) => void;
|
13
13
|
ensProviderUrl?: string;
|
14
14
|
username?: string | null;
|
15
|
-
|
15
|
+
renderToolLeftSection?: ({ editor }: {
|
16
|
+
editor: Editor;
|
17
|
+
}) => JSX.Element;
|
18
|
+
renderToolRightSection?: ({ editor }: {
|
16
19
|
editor: Editor;
|
17
|
-
pluginMetaData: PluginMetaData;
|
18
20
|
}) => JSX.Element;
|
19
21
|
}
|
20
22
|
export interface Data {
|
21
|
-
metaData: PluginMetaData;
|
22
23
|
editorJSONData: JSONContent;
|
23
24
|
}
|
24
|
-
export interface Plugin {
|
25
|
-
title: string | null;
|
26
|
-
}
|
27
|
-
export interface PluginMetaData {
|
28
|
-
plugin: Plugin;
|
29
|
-
}
|
30
25
|
export interface IUser {
|
31
26
|
name: string;
|
32
27
|
color: string;
|
@@ -1,9 +1,7 @@
|
|
1
|
-
import {
|
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
|
1
|
+
export declare function debounce<T extends (...args: any) => any>(func: T, wait: number): T;
|
package/package.json
CHANGED
@@ -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;
|