@fileverse-dev/ddoc 3.0.59 → 3.0.60-theme-fix-1
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 +14 -6
- package/dist/index.es.js +17502 -17439
- package/dist/package/components/presentation-mode/presentation-mode.d.ts +2 -1
- package/dist/package/components/presentation-mode/preview-panel.d.ts +2 -1
- package/dist/package/context/editor-context.d.ts +2 -0
- package/dist/package/types.d.ts +11 -6
- package/dist/package/utils/document-styling.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,26 +105,31 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
|
|
|
105
105
|
The `documentStyling` prop allows you to customize the visual appearance of your document with three distinct styling areas:
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
|
+
interface ThemeVariantValue {
|
|
109
|
+
light: string;
|
|
110
|
+
dark: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
108
113
|
interface DocumentStyling {
|
|
109
114
|
/**
|
|
110
115
|
* Background styling for the outer document area.
|
|
111
116
|
* Supports CSS background values including gradients.
|
|
112
117
|
* Example: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
113
118
|
*/
|
|
114
|
-
background?: string;
|
|
119
|
+
background?: string | ThemeVariantValue;
|
|
115
120
|
|
|
116
121
|
/**
|
|
117
122
|
* Background color for the editor canvas/content area.
|
|
118
123
|
* Should be a solid color value.
|
|
119
124
|
* Example: "#ffffff" or "rgb(255, 255, 255)"
|
|
120
125
|
*/
|
|
121
|
-
canvasBackground?: string;
|
|
126
|
+
canvasBackground?: string | ThemeVariantValue;
|
|
122
127
|
|
|
123
128
|
/**
|
|
124
129
|
* Text color for the editor content.
|
|
125
130
|
* Example: "#333333" or "rgb(51, 51, 51)"
|
|
126
131
|
*/
|
|
127
|
-
textColor?: string;
|
|
132
|
+
textColor?: string | ThemeVariantValue;
|
|
128
133
|
|
|
129
134
|
/**
|
|
130
135
|
* Font family for the editor content.
|
|
@@ -139,9 +144,12 @@ interface DocumentStyling {
|
|
|
139
144
|
```tsx
|
|
140
145
|
<DdocEditor
|
|
141
146
|
documentStyling={{
|
|
142
|
-
background:
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
background: {
|
|
148
|
+
light: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
149
|
+
dark: "linear-gradient(135deg, #2a3145 0%, #3a2f59 100%)",
|
|
150
|
+
},
|
|
151
|
+
canvasBackground: { light: "#ffffff", dark: "#1e1f22" },
|
|
152
|
+
textColor: { light: "#333333", dark: "#e8ebec" },
|
|
145
153
|
fontFamily: "Inter, sans-serif"
|
|
146
154
|
}}
|
|
147
155
|
// ... other props
|