@fileverse-dev/ddoc 2.3.0 → 2.3.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.
Files changed (29) hide show
  1. package/README.md +53 -1
  2. package/dist/{ccip-Um-ci_OZ.mjs → ccip-OTZyMJ99.mjs} +1 -1
  3. package/dist/{index-CCdUy9ON.mjs → index-DK7CAo5N.mjs} +33373 -32325
  4. package/dist/index.es.js +1 -1
  5. package/dist/package/components/editor-bubble-menu/props.d.ts +5 -0
  6. package/dist/package/components/editor-bubble-menu/types.d.ts +6 -1
  7. package/dist/package/components/editor-toolbar.d.ts +7 -2
  8. package/dist/package/components/editor-utils.d.ts +7 -2
  9. package/dist/package/components/mobile-toolbar.d.ts +7 -2
  10. package/dist/package/components/presentation-mode/presentation-mode.d.ts +7 -1
  11. package/dist/package/components/presentation-mode/preview-panel.d.ts +4 -1
  12. package/dist/package/components/secure-image-v2.d.ts +21 -0
  13. package/dist/package/context/editor-context.d.ts +3 -0
  14. package/dist/package/extensions/d-block/dblock.d.ts +2 -1
  15. package/dist/package/extensions/default-extension.d.ts +11 -1
  16. package/dist/package/extensions/iframe/iframe.d.ts +5 -0
  17. package/dist/package/extensions/mardown-paste-handler/index.d.ts +10 -3
  18. package/dist/package/extensions/reminder-block/reminder-menu-renderer.d.ts +1 -1
  19. package/dist/package/extensions/resizable-media/media-paste-drop-plugin/media-paste-drop-plugin.d.ts +2 -1
  20. package/dist/package/extensions/resizable-media/resizable-media-node-view.d.ts +5 -1
  21. package/dist/package/extensions/resizable-media/resizable-media.d.ts +6 -3
  22. package/dist/package/extensions/slash-command/slash-comand.d.ts +2 -1
  23. package/dist/package/extensions/slash-command/slash-command-utils.d.ts +3 -2
  24. package/dist/package/types.d.ts +55 -1
  25. package/dist/package/use-ddoc-editor.d.ts +1 -1
  26. package/dist/package/utils/md-to-slides.d.ts +5 -1
  27. package/dist/package/utils/upload-images.d.ts +2 -1
  28. package/dist/style.css +1 -1
  29. package/package.json +2 -2
package/README.md CHANGED
@@ -74,6 +74,57 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
74
74
  | `isPresentationMode` | `boolean` | Controls presentation mode |
75
75
  | `setIsPresentationMode` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle presentation mode |
76
76
  | `sharedSlidesLink` | `string` | Link for shared presentation slides |
77
+ | `documentStyling` | `DocumentStyling` | Custom styling for document appearance |
78
+
79
+ ## Document Styling
80
+
81
+ The `documentStyling` prop allows you to customize the visual appearance of your document with three distinct styling areas:
82
+
83
+ ```typescript
84
+ interface DocumentStyling {
85
+ /**
86
+ * Background styling for the outer document area.
87
+ * Supports CSS background values including gradients.
88
+ * Example: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
89
+ */
90
+ background?: string;
91
+
92
+ /**
93
+ * Background color for the editor canvas/content area.
94
+ * Should be a solid color value.
95
+ * Example: "#ffffff" or "rgb(255, 255, 255)"
96
+ */
97
+ canvasBackground?: string;
98
+
99
+ /**
100
+ * Text color for the editor content.
101
+ * Example: "#333333" or "rgb(51, 51, 51)"
102
+ */
103
+ textColor?: string;
104
+
105
+ /**
106
+ * Font family for the editor content.
107
+ * Example: "Inter, sans-serif" or "'Times New Roman', serif"
108
+ */
109
+ fontFamily?: string;
110
+ }
111
+ ```
112
+
113
+ ### Usage Example
114
+
115
+ ```tsx
116
+ <DdocEditor
117
+ documentStyling={{
118
+ background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
119
+ canvasBackground: "#ffffff",
120
+ textColor: "#333333",
121
+ fontFamily: "Inter, sans-serif"
122
+ }}
123
+ // ... other props
124
+ />
125
+ ```
126
+
127
+ **Note:** Document styling works in both regular editor mode and presentation mode. In presentation mode, only `canvasBackground`, `textColor`, and `fontFamily` are applied to maintain clean slide appearance.
77
128
 
78
129
  ## Comments & Collaboration Props
79
130
 
@@ -107,7 +158,8 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
107
158
  | `setCharacterCount` | `React.Dispatch<SetStateAction<number>>` | Updates character count |
108
159
  | `setWordCount` | `React.Dispatch<SetStateAction<number>>` | Updates word count |
109
160
  | `ensResolutionUrl` | `string` | URL for ENS name resolution |
110
- | `secureImageUploadUrl` | `string` | URL for secure image uploads |
161
+ | `ipfsImageUploadFn` | ` (file: File) => Promise<IpfsImageUploadResponse>` | function for secure image uploads |
162
+ | `ipfsImageFetchFn` | ` (_data: IpfsImageFetchPayload) => Promise<{ url: string;file: File;}>` | function for fetch secure image from IPFS |
111
163
  | `onError` | `(error: string) => void` | General error handler |
112
164
  | `onInlineComment` | `() => void` | Callback for inline comments |
113
165
  | `onMarkdownExport` | `() => void` | Callback for markdown export |
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-CCdUy9ON.mjs";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-DK7CAo5N.mjs";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
4
4
  var o;