@fileverse-dev/ddoc 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,13 @@ export interface DdocProps {
24
24
  onChange?: (changes: Data['editorJSONData']) => void;
25
25
  handleImageUploadToIpfs: (file: File) => Promise<string>;
26
26
  onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
27
+ onTextSelection?: (data: IEditorSelectionData) => void;
28
+ onCommentInteraction?: (data: IEditorSelectionData) => void;
29
+ }
30
+ export interface IEditorSelectionData {
31
+ from: number;
32
+ to: number;
33
+ text: string;
27
34
  }
28
35
  export interface Data {
29
36
  editorJSONData: JSONContent;
@@ -1,7 +1,7 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
3
  import * as Y from 'yjs';
4
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onAutoSave, onChange, onCollaboratorChange, }: Partial<DdocProps>) => {
4
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onAutoSave, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/react').Editor | null;
6
6
  ref: import('react').RefObject<HTMLDivElement>;
7
7
  loading: boolean;
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.5.1",
5
+ "version": "1.5.2",
6
6
  "main": "dist/index.umd.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -64,7 +64,6 @@
64
64
  "react-uuid": "^2.0.0",
65
65
  "tailwindcss-animate": "^1.0.7",
66
66
  "tippy.js": "^6.3.7",
67
- "ucans": "^0.10.0",
68
67
  "usehooks-ts": "^3.1.0",
69
68
  "vaul": "^0.9.1",
70
69
  "vite-plugin-dts": "^3.6.3",
@@ -1,2 +0,0 @@
1
- import * as ucans from 'ucans';
2
- export declare const buildUCANToken: (tempAuth: ucans.EdKeypair) => Promise<string>;