@fileverse-dev/ddoc 3.0.86 → 3.0.87-page-count-2

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 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 | Version |
39
- | --- | --- |
40
- | `@dnd-kit/core` | `>=6.3.1` |
41
- | `@dnd-kit/sortable` | `>=10.0.0` |
42
- | `@dnd-kit/utilities` | `>=3.2.2` |
43
- | `@fileverse/ui` | `>=5.0.0` |
44
- | `@fileverse/crypto` | `>=0.0.21` |
45
- | `viem` | `>=2.13.8` |
46
- | `framer-motion` | `>=11.2.10` |
47
- | `frimousse` | `>=0.3.0` |
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: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
149
- dark: "linear-gradient(135deg, #2a3145 0%, #3a2f59 100%)",
147
+ light: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
148
+ dark: 'linear-gradient(135deg, #2a3145 0%, #3a2f59 100%)',
150
149
  },
151
- canvasBackground: { light: "#ffffff", dark: "#1e1f22" },
152
- textColor: { light: "#333333", dark: "#e8ebec" },
153
- fontFamily: "Inter, sans-serif"
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,29 @@ interface DocumentStyling {
185
184
 
186
185
  ## Utility Props
187
186
 
188
- | Property | Type | Description |
189
- | ---------------------- | ---------------------------------------- | ---------------------------- |
190
- | `setCharacterCount` | `React.Dispatch<SetStateAction<number>>` | Updates character count |
191
- | `setWordCount` | `React.Dispatch<SetStateAction<number>>` | Updates word count |
192
- | `ensResolutionUrl` | `string` | URL for ENS name resolution |
193
- | `ipfsImageUploadFn` | ` (file: File) => Promise<IpfsImageUploadResponse>` | function for secure image uploads |
194
- | `ipfsImageFetchFn` | ` (_data: IpfsImageFetchPayload) => Promise<{ url: string;file: File;}>` | function for fetch secure image from IPFS |
195
- | `onError` | `(error: string) => void` | General error handler |
196
- | `onInlineComment` | `() => void` | Callback for inline comments |
197
- | `onMarkdownExport` | `() => void` | Callback for markdown export |
198
- | `onMarkdownImport` | `() => void` | Callback for markdown import |
199
- | `onPdfExport` | `() => void` | Callback for pdf export |
200
- | `onSlidesShare` | `() => void` | Callback for slides sharing |
201
- | `onComment` | `() => void` | General comment callback |
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
+ | `setPageCount` | `React.Dispatch<SetStateAction<number>>` | Updates approx. export page count |
192
+ | `ensResolutionUrl` | `string` | URL for ENS name resolution |
193
+ | `ipfsImageUploadFn` | ` (file: File) => Promise<IpfsImageUploadResponse>` | function for secure image uploads |
194
+ | `ipfsImageFetchFn` | ` (_data: IpfsImageFetchPayload) => Promise<{ url: string;file: File;}>` | function for fetch secure image from IPFS |
195
+ | `onError` | `(error: string) => void` | General error handler |
196
+ | `onInlineComment` | `() => void` | Callback for inline comments |
197
+ | `onMarkdownExport` | `() => void` | Callback for markdown export |
198
+ | `onMarkdownImport` | `() => void` | Callback for markdown import |
199
+ | `onPdfExport` | `() => void` | Callback for pdf export |
200
+ | `onSlidesShare` | `() => void` | Callback for slides sharing |
201
+ | `onComment` | `() => void` | General comment callback |
203
202
 
204
203
  ## AI Writer Props
205
204
 
206
- | Property | Type | Description |
207
- | ------------------ | --------- | ---------------------------------------------- |
205
+ | Property | Type | Description |
206
+ | ------------------ | ------------- | ----------------------------------------------- |
208
207
  | `activeModel` | `CustomModel` | Currently selected AI model for text generation |
209
- | `maxTokens` | `number` | Maximum token limit for AI-generated content |
210
- | `isAIAgentEnabled` | `boolean` | Toggle for AI agent functionality |
208
+ | `maxTokens` | `number` | Maximum token limit for AI-generated content |
209
+ | `isAIAgentEnabled` | `boolean` | Toggle for AI agent functionality |
211
210
 
212
211
  ### Steps to run this example locally
213
212