@fileverse-dev/ddoc 3.0.85 → 3.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -53
- package/dist/index.es.js +3173 -3164
- package/dist/package/components/tabs/document-mobile-tab-panel.d.ts +2 -1
- package/dist/package/components/toc/document-outline.d.ts +1 -1
- package/dist/package/components/toc/types.d.ts +1 -0
- package/dist/package/extensions/mardown-paste-handler/index.d.ts +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@ dDocs enables secure, real-time and asynchronous collaboration without compromis
|
|
|
6
6
|
|
|
7
7
|
<img width="2308" height="1458" alt="image" src="https://github.com/user-attachments/assets/32875e2e-b30b-431b-bbb6-74ce96f21141" />
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
This repository contains:
|
|
11
10
|
|
|
12
11
|
- `/package` – The core package code.
|
|
@@ -35,16 +34,16 @@ This package requires the following peer dependencies to be installed in your pr
|
|
|
35
34
|
npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities @fileverse/ui @fileverse/crypto viem framer-motion frimousse
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
| Package
|
|
39
|
-
|
|
|
40
|
-
| `@dnd-kit/core`
|
|
41
|
-
| `@dnd-kit/sortable`
|
|
42
|
-
| `@dnd-kit/utilities` | `>=3.2.2`
|
|
43
|
-
| `@fileverse/ui`
|
|
44
|
-
| `@fileverse/crypto`
|
|
45
|
-
| `viem`
|
|
46
|
-
| `framer-motion`
|
|
47
|
-
| `frimousse`
|
|
37
|
+
| Package | Version |
|
|
38
|
+
| -------------------- | ----------- |
|
|
39
|
+
| `@dnd-kit/core` | `>=6.3.1` |
|
|
40
|
+
| `@dnd-kit/sortable` | `>=10.0.0` |
|
|
41
|
+
| `@dnd-kit/utilities` | `>=3.2.2` |
|
|
42
|
+
| `@fileverse/ui` | `>=5.0.0` |
|
|
43
|
+
| `@fileverse/crypto` | `>=0.0.21` |
|
|
44
|
+
| `viem` | `>=2.13.8` |
|
|
45
|
+
| `framer-motion` | `>=11.2.10` |
|
|
46
|
+
| `frimousse` | `>=0.3.0` |
|
|
48
47
|
|
|
49
48
|
These are externalized from the bundle to avoid duplication when your app already uses them. If you don't have them installed, npm (v7+) will auto-install them for you.
|
|
50
49
|
|
|
@@ -87,17 +86,17 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
|
|
|
87
86
|
|
|
88
87
|
## UI/UX Props
|
|
89
88
|
|
|
90
|
-
| Property | Type | Description
|
|
91
|
-
| ----------------------- | ----------------------------------------- |
|
|
92
|
-
| `zoomLevel` | `string` | Current zoom level of the editor
|
|
93
|
-
| `setZoomLevel` | `React.Dispatch<SetStateAction<string>>` | Function to update zoom level
|
|
94
|
-
| `isNavbarVisible` | `boolean` | Controls navbar visibility
|
|
95
|
-
| `setIsNavbarVisible` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle navbar visibility
|
|
96
|
-
| `renderNavbar` | `() => JSX.Element` | Custom navbar renderer
|
|
97
|
-
| `renderThemeToggle` | `() => JSX.Element` | Custom theme toggle renderer
|
|
98
|
-
| `isPresentationMode` | `boolean` | Controls presentation mode
|
|
99
|
-
| `setIsPresentationMode` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle presentation mode
|
|
100
|
-
| `sharedSlidesLink` | `string` | Link for shared presentation slides
|
|
89
|
+
| Property | Type | Description |
|
|
90
|
+
| ----------------------- | ----------------------------------------- | -------------------------------------- |
|
|
91
|
+
| `zoomLevel` | `string` | Current zoom level of the editor |
|
|
92
|
+
| `setZoomLevel` | `React.Dispatch<SetStateAction<string>>` | Function to update zoom level |
|
|
93
|
+
| `isNavbarVisible` | `boolean` | Controls navbar visibility |
|
|
94
|
+
| `setIsNavbarVisible` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle navbar visibility |
|
|
95
|
+
| `renderNavbar` | `() => JSX.Element` | Custom navbar renderer |
|
|
96
|
+
| `renderThemeToggle` | `() => JSX.Element` | Custom theme toggle renderer |
|
|
97
|
+
| `isPresentationMode` | `boolean` | Controls presentation mode |
|
|
98
|
+
| `setIsPresentationMode` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle presentation mode |
|
|
99
|
+
| `sharedSlidesLink` | `string` | Link for shared presentation slides |
|
|
101
100
|
| `documentStyling` | `DocumentStyling` | Custom styling for document appearance |
|
|
102
101
|
|
|
103
102
|
## Document Styling
|
|
@@ -111,27 +110,27 @@ interface ThemeVariantValue {
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
interface DocumentStyling {
|
|
114
|
-
/**
|
|
113
|
+
/**
|
|
115
114
|
* Background styling for the outer document area.
|
|
116
115
|
* Supports CSS background values including gradients.
|
|
117
116
|
* Example: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
118
117
|
*/
|
|
119
118
|
background?: string | ThemeVariantValue;
|
|
120
|
-
|
|
121
|
-
/**
|
|
119
|
+
|
|
120
|
+
/**
|
|
122
121
|
* Background color for the editor canvas/content area.
|
|
123
122
|
* Should be a solid color value.
|
|
124
123
|
* Example: "#ffffff" or "rgb(255, 255, 255)"
|
|
125
124
|
*/
|
|
126
125
|
canvasBackground?: string | ThemeVariantValue;
|
|
127
|
-
|
|
128
|
-
/**
|
|
126
|
+
|
|
127
|
+
/**
|
|
129
128
|
* Text color for the editor content.
|
|
130
129
|
* Example: "#333333" or "rgb(51, 51, 51)"
|
|
131
130
|
*/
|
|
132
131
|
textColor?: string | ThemeVariantValue;
|
|
133
|
-
|
|
134
|
-
/**
|
|
132
|
+
|
|
133
|
+
/**
|
|
135
134
|
* Font family for the editor content.
|
|
136
135
|
* Example: "Inter, sans-serif" or "'Times New Roman', serif"
|
|
137
136
|
*/
|
|
@@ -145,12 +144,12 @@ interface DocumentStyling {
|
|
|
145
144
|
<DdocEditor
|
|
146
145
|
documentStyling={{
|
|
147
146
|
background: {
|
|
148
|
-
light:
|
|
149
|
-
dark:
|
|
147
|
+
light: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
148
|
+
dark: 'linear-gradient(135deg, #2a3145 0%, #3a2f59 100%)',
|
|
150
149
|
},
|
|
151
|
-
canvasBackground: { light:
|
|
152
|
-
textColor: { light:
|
|
153
|
-
fontFamily:
|
|
150
|
+
canvasBackground: { light: '#ffffff', dark: '#1e1f22' },
|
|
151
|
+
textColor: { light: '#333333', dark: '#e8ebec' },
|
|
152
|
+
fontFamily: 'Inter, sans-serif',
|
|
154
153
|
}}
|
|
155
154
|
// ... other props
|
|
156
155
|
/>
|
|
@@ -185,29 +184,28 @@ interface DocumentStyling {
|
|
|
185
184
|
|
|
186
185
|
## Utility Props
|
|
187
186
|
|
|
188
|
-
| Property
|
|
189
|
-
|
|
|
190
|
-
| `setCharacterCount`
|
|
191
|
-
| `setWordCount`
|
|
192
|
-
| `ensResolutionUrl`
|
|
193
|
-
| `ipfsImageUploadFn` | ` (file: File) => Promise<IpfsImageUploadResponse>`
|
|
194
|
-
| `ipfsImageFetchFn`
|
|
195
|
-
| `onError`
|
|
196
|
-
| `onInlineComment`
|
|
197
|
-
| `onMarkdownExport`
|
|
198
|
-
| `onMarkdownImport`
|
|
199
|
-
| `onPdfExport`
|
|
200
|
-
| `onSlidesShare`
|
|
201
|
-
| `onComment`
|
|
202
|
-
|
|
187
|
+
| Property | Type | Description |
|
|
188
|
+
| ------------------- | ------------------------------------------------------------------------ | ----------------------------------------- |
|
|
189
|
+
| `setCharacterCount` | `React.Dispatch<SetStateAction<number>>` | Updates character count |
|
|
190
|
+
| `setWordCount` | `React.Dispatch<SetStateAction<number>>` | Updates word count |
|
|
191
|
+
| `ensResolutionUrl` | `string` | URL for ENS name resolution |
|
|
192
|
+
| `ipfsImageUploadFn` | ` (file: File) => Promise<IpfsImageUploadResponse>` | function for secure image uploads |
|
|
193
|
+
| `ipfsImageFetchFn` | ` (_data: IpfsImageFetchPayload) => Promise<{ url: string;file: File;}>` | function for fetch secure image from IPFS |
|
|
194
|
+
| `onError` | `(error: string) => void` | General error handler |
|
|
195
|
+
| `onInlineComment` | `() => void` | Callback for inline comments |
|
|
196
|
+
| `onMarkdownExport` | `() => void` | Callback for markdown export |
|
|
197
|
+
| `onMarkdownImport` | `() => void` | Callback for markdown import |
|
|
198
|
+
| `onPdfExport` | `() => void` | Callback for pdf export |
|
|
199
|
+
| `onSlidesShare` | `() => void` | Callback for slides sharing |
|
|
200
|
+
| `onComment` | `() => void` | General comment callback |
|
|
203
201
|
|
|
204
202
|
## AI Writer Props
|
|
205
203
|
|
|
206
|
-
| Property | Type
|
|
207
|
-
| ------------------ |
|
|
204
|
+
| Property | Type | Description |
|
|
205
|
+
| ------------------ | ------------- | ----------------------------------------------- |
|
|
208
206
|
| `activeModel` | `CustomModel` | Currently selected AI model for text generation |
|
|
209
|
-
| `maxTokens` | `number`
|
|
210
|
-
| `isAIAgentEnabled` | `boolean`
|
|
207
|
+
| `maxTokens` | `number` | Maximum token limit for AI-generated content |
|
|
208
|
+
| `isAIAgentEnabled` | `boolean` | Toggle for AI agent functionality |
|
|
211
209
|
|
|
212
210
|
### Steps to run this example locally
|
|
213
211
|
|