@fileverse-dev/ddoc 2.0.3-sync-patch-11 → 2.0.3-sync-patch-12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/README.md +22 -20
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.es.js +40378 -39390
  4. package/dist/package/components/editor-bubble-menu.d.ts +3 -1
  5. package/dist/package/components/editor-toolbar.d.ts +2 -1
  6. package/dist/package/components/editor-utils.d.ts +12 -2
  7. package/dist/package/components/mobile-toolbar.d.ts +2 -1
  8. package/dist/package/components/secure-image.d.ts +13 -0
  9. package/dist/package/components/slash-comand.d.ts +1 -1
  10. package/dist/package/components/tag-input.d.ts +12 -0
  11. package/dist/package/extensions/customTextInputRules.d.ts +4 -0
  12. package/dist/package/extensions/d-block/dblock-node-view.d.ts +3 -1
  13. package/dist/package/extensions/d-block/dblock.d.ts +1 -0
  14. package/dist/package/extensions/default-extension.d.ts +1 -1
  15. package/dist/package/extensions/page-break/index.d.ts +1 -0
  16. package/dist/package/extensions/page-break/page-break-node-view.d.ts +4 -0
  17. package/dist/package/extensions/page-break/page-break.d.ts +20 -0
  18. package/dist/package/extensions/resizable-media/media-paste-drop-plugin/media-paste-drop-plugin.d.ts +1 -1
  19. package/dist/package/extensions/resizable-media/resizable-media.d.ts +2 -0
  20. package/dist/package/preview-ddoc-editor.d.ts +4 -0
  21. package/dist/package/types.d.ts +11 -22
  22. package/dist/package/use-ddoc-editor.d.ts +4 -8
  23. package/dist/package/utils/security.d.ts +17 -0
  24. package/dist/package/utils/upload-images.d.ts +3 -1
  25. package/dist/style.css +1 -1
  26. package/package.json +5 -4
  27. package/dist/package/extensions/sync-cursor.d.ts +0 -12
package/README.md CHANGED
@@ -12,7 +12,7 @@ This repo contains example - demo source code and package code
12
12
 
13
13
  `import { DdocEditor } from '@fileverse-dev/ddoc'`
14
14
 
15
- `import '@fileverse-dev/ddoc/dist/style.css'` in App.jsx/App.tsx
15
+ `import '@fileverse-dev/ddoc/styles'` in App.jsx/App.tsx
16
16
 
17
17
  In your tailwind config, add this line to content array
18
18
 
@@ -28,26 +28,28 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
28
28
 
29
29
  ## Properties
30
30
 
31
- | Property | Type | Description |
32
- | ---------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
33
- | `isPreviewMode` | `boolean` | Indicates whether the page is in preview mode or not. |
34
- | `data` (optional) | `Data` | Optional property holding data related to the page. |
35
- | `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration |
36
- | `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment |
37
- | `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
38
- | `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor |
39
- | `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance |
40
- | `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
41
- | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
42
- | `walletAddress` (optional) | `string ` | Takes a wallet address |
43
- | `ref` (optional) | `any` | Gets editor instance |
44
- | `ensResolutionUrl` (optional) | `string` | Api Url for resolving ens names |
45
- | `initialContent` (optional) | `JSONContent` | Initial content of the editor |
31
+ | Property | Type | Description |
32
+ | ---------------------------------------------- | ---------------------------------------------- |--------------------------------------------------------------------------------------------------------|
33
+ | `isPreviewMode` | `boolean` | Indicates whether the page is in preview mode or not. |
34
+ | `data` (optional) | `Data` | Optional property holding data related to the page. |
35
+ | `enableCollaboration` (optional) | `boolean` | Optional property to enable collaboration |
36
+ | `onCommentInteraction` (optional) | `(commentInfo: IEditSelectionData) => void` | Optional function that get's called whenever there is a mouse-over and click interaction on a comment |
37
+ | `collaborationId` (optional) | `string` | When using enableCollaboration, you need to provide collaborationId, it can be uuid of doc |
38
+ | `onTextSelection` (optional) | `(data: IEditorSelectionData) => void` | Function called when a text is selected on the editor |
39
+ | `renderToolRightSection` (optional) | `({editor}) => JSX.Element` | Function that render the right section of the toolbar. it calls the function with the editor instance |
40
+ | `renderToolLeftSection` (optional) | `({editor}) => JSX.Element` | Accept a react component |
41
+ | `username` (required when using collaboration) | `boolean` | Takes a username which can be used by collaboration cursor |
42
+ | `walletAddress` (optional) | `string ` | Takes a wallet address |
43
+ | `ref` (optional) | `any` | Gets editor instance |
44
+ | `ensResolutionUrl` (optional) | `string` | Api Url for resolving ens names |
45
+ | `secureImageUploadUrl` (optional) | `string` | Api Url for secure image upload |
46
+ | `initialContent` (optional) | `JSONContent` | Initial content of the editor |
46
47
  | `onChange` (optional) | `(changes: JSONContent) => void` | Optional function that gets triggered with the latest content of the editor on every change in the editor |
47
- | `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration |
48
- | `onError` (optional) | `(errorString: string) => void` | Function to call on error |
49
- | `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count |
50
- | `setWordCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Word Count |
48
+ | `onCollaboratorChange` (optional) | `(collaborators?: IDocCollabUsers[] ) => void` | Optional function that gets triggered when a user join or leave the doc during collaboration |
49
+ | `onError` (optional) | `(errorString: string) => void` | Function to call on error |
50
+ | `setCharacterCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Character Count |
51
+ | `setWordCount` (optional) | `React.Dispatch<SetStateAction<number>>` | Optional. React Set State function to update Word Count |
52
+ | `scrollPosition`(optional | `number` | User cursor position to scroll to on intitalising the content of the editor |
51
53
 
52
54
  ## Data Interface
53
55
 
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { default as DdocEditor } from './package/ddoc-editor';
2
+ export { PreviewDdocEditor } from './package/preview-ddoc-editor';