cms-block-editor 1.0.14 → 1.0.16
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 +1 -0
- package/dist/index.css +792 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +195 -1
- package/dist/index.mjs +1015 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -134,75 +134,213 @@ interface ThemeColors {
|
|
|
134
134
|
primaryHover: string;
|
|
135
135
|
primaryLight: string;
|
|
136
136
|
primaryDark: string;
|
|
137
|
+
primaryContrast: string;
|
|
137
138
|
secondary: string;
|
|
138
139
|
secondaryHover: string;
|
|
140
|
+
secondaryLight: string;
|
|
141
|
+
secondaryDark: string;
|
|
142
|
+
secondaryContrast: string;
|
|
143
|
+
accent: string;
|
|
144
|
+
accentHover: string;
|
|
145
|
+
accentLight: string;
|
|
146
|
+
accentDark: string;
|
|
139
147
|
background: string;
|
|
148
|
+
backgroundAlt: string;
|
|
140
149
|
surface: string;
|
|
150
|
+
surfaceHover: string;
|
|
151
|
+
surfaceActive: string;
|
|
141
152
|
border: string;
|
|
153
|
+
borderHover: string;
|
|
142
154
|
divider: string;
|
|
155
|
+
overlay: string;
|
|
143
156
|
textPrimary: string;
|
|
144
157
|
textSecondary: string;
|
|
158
|
+
textTertiary: string;
|
|
145
159
|
textDisabled: string;
|
|
160
|
+
textInverse: string;
|
|
146
161
|
success: string;
|
|
162
|
+
successLight: string;
|
|
163
|
+
successDark: string;
|
|
147
164
|
warning: string;
|
|
165
|
+
warningLight: string;
|
|
166
|
+
warningDark: string;
|
|
148
167
|
error: string;
|
|
168
|
+
errorLight: string;
|
|
169
|
+
errorDark: string;
|
|
149
170
|
info: string;
|
|
171
|
+
infoLight: string;
|
|
172
|
+
infoDark: string;
|
|
150
173
|
editorBackground: string;
|
|
151
174
|
editorText: string;
|
|
152
175
|
editorPlaceholder: string;
|
|
176
|
+
editorCursor: string;
|
|
153
177
|
toolbarBackground: string;
|
|
154
178
|
toolbarText: string;
|
|
155
179
|
toolbarBorder: string;
|
|
180
|
+
toolbarIconHover: string;
|
|
156
181
|
selection: string;
|
|
182
|
+
selectionText: string;
|
|
157
183
|
highlight: string;
|
|
184
|
+
highlightText: string;
|
|
158
185
|
focus: string;
|
|
186
|
+
focusRing: string;
|
|
187
|
+
codeBackground: string;
|
|
188
|
+
codeText: string;
|
|
189
|
+
codeComment: string;
|
|
190
|
+
codeKeyword: string;
|
|
191
|
+
codeString: string;
|
|
192
|
+
codeNumber: string;
|
|
193
|
+
codeFunction: string;
|
|
194
|
+
codeOperator: string;
|
|
159
195
|
}
|
|
160
196
|
interface ThemeTypography {
|
|
161
197
|
fontFamily: string;
|
|
198
|
+
fontFamilyHeading: string;
|
|
162
199
|
fontFamilyMono: string;
|
|
200
|
+
fontSizeXxs: string;
|
|
163
201
|
fontSizeXs: string;
|
|
164
202
|
fontSizeSm: string;
|
|
165
203
|
fontSizeMd: string;
|
|
166
204
|
fontSizeLg: string;
|
|
167
205
|
fontSizeXl: string;
|
|
206
|
+
fontSizeXxl: string;
|
|
207
|
+
fontSize3xl: string;
|
|
208
|
+
fontSize4xl: string;
|
|
209
|
+
fontWeightLight: number;
|
|
168
210
|
fontWeightNormal: number;
|
|
169
211
|
fontWeightMedium: number;
|
|
212
|
+
fontWeightSemibold: number;
|
|
170
213
|
fontWeightBold: number;
|
|
214
|
+
fontWeightExtrabold: number;
|
|
171
215
|
lineHeightTight: number;
|
|
216
|
+
lineHeightSnug: number;
|
|
172
217
|
lineHeightNormal: number;
|
|
173
218
|
lineHeightRelaxed: number;
|
|
219
|
+
lineHeightLoose: number;
|
|
220
|
+
letterSpacingTight: string;
|
|
221
|
+
letterSpacingNormal: string;
|
|
222
|
+
letterSpacingWide: string;
|
|
223
|
+
letterSpacingWider: string;
|
|
174
224
|
}
|
|
175
225
|
interface ThemeSpacing {
|
|
226
|
+
xxs: string;
|
|
176
227
|
xs: string;
|
|
177
228
|
sm: string;
|
|
178
229
|
md: string;
|
|
179
230
|
lg: string;
|
|
180
231
|
xl: string;
|
|
181
232
|
xxl: string;
|
|
233
|
+
xxxl: string;
|
|
182
234
|
}
|
|
183
235
|
interface ThemeBorderRadius {
|
|
184
236
|
none: string;
|
|
237
|
+
xs: string;
|
|
185
238
|
sm: string;
|
|
186
239
|
md: string;
|
|
187
240
|
lg: string;
|
|
241
|
+
xl: string;
|
|
242
|
+
xxl: string;
|
|
188
243
|
full: string;
|
|
189
244
|
}
|
|
190
245
|
interface ThemeShadows {
|
|
191
246
|
none: string;
|
|
247
|
+
xs: string;
|
|
192
248
|
sm: string;
|
|
193
249
|
md: string;
|
|
194
250
|
lg: string;
|
|
195
251
|
xl: string;
|
|
252
|
+
xxl: string;
|
|
253
|
+
inner: string;
|
|
254
|
+
outline: string;
|
|
255
|
+
}
|
|
256
|
+
interface ThemeTransitions {
|
|
257
|
+
fast: string;
|
|
258
|
+
normal: string;
|
|
259
|
+
slow: string;
|
|
260
|
+
verySlow: string;
|
|
261
|
+
}
|
|
262
|
+
interface ThemeBreakpoints {
|
|
263
|
+
xs: string;
|
|
264
|
+
sm: string;
|
|
265
|
+
md: string;
|
|
266
|
+
lg: string;
|
|
267
|
+
xl: string;
|
|
268
|
+
xxl: string;
|
|
269
|
+
}
|
|
270
|
+
interface ThemeZIndex {
|
|
271
|
+
dropdown: number;
|
|
272
|
+
sticky: number;
|
|
273
|
+
fixed: number;
|
|
274
|
+
modalBackdrop: number;
|
|
275
|
+
modal: number;
|
|
276
|
+
popover: number;
|
|
277
|
+
tooltip: number;
|
|
278
|
+
}
|
|
279
|
+
interface ThemeAnimations {
|
|
280
|
+
fadeIn: string;
|
|
281
|
+
fadeOut: string;
|
|
282
|
+
slideUp: string;
|
|
283
|
+
slideDown: string;
|
|
284
|
+
slideLeft: string;
|
|
285
|
+
slideRight: string;
|
|
286
|
+
scaleUp: string;
|
|
287
|
+
scaleDown: string;
|
|
288
|
+
spin: string;
|
|
289
|
+
pulse: string;
|
|
290
|
+
bounce: string;
|
|
291
|
+
}
|
|
292
|
+
interface ThemeGradients {
|
|
293
|
+
primary: string;
|
|
294
|
+
secondary: string;
|
|
295
|
+
accent: string;
|
|
296
|
+
sunset: string;
|
|
297
|
+
ocean: string;
|
|
298
|
+
forest: string;
|
|
299
|
+
fire: string;
|
|
300
|
+
ice: string;
|
|
301
|
+
purple: string;
|
|
302
|
+
rainbow: string;
|
|
303
|
+
}
|
|
304
|
+
interface ThemeCustom {
|
|
305
|
+
[key: string]: any;
|
|
196
306
|
}
|
|
197
307
|
interface Theme {
|
|
198
308
|
name: string;
|
|
309
|
+
mode: 'light' | 'dark';
|
|
199
310
|
colors: ThemeColors;
|
|
200
311
|
typography: ThemeTypography;
|
|
201
312
|
spacing: ThemeSpacing;
|
|
202
313
|
borderRadius: ThemeBorderRadius;
|
|
203
314
|
shadows: ThemeShadows;
|
|
315
|
+
transitions: ThemeTransitions;
|
|
316
|
+
breakpoints: ThemeBreakpoints;
|
|
317
|
+
zIndex: ThemeZIndex;
|
|
318
|
+
animations: ThemeAnimations;
|
|
319
|
+
gradients: ThemeGradients;
|
|
320
|
+
custom?: ThemeCustom;
|
|
204
321
|
}
|
|
205
322
|
type ThemeMode = 'light' | 'dark' | 'auto';
|
|
323
|
+
interface ThemeOverride {
|
|
324
|
+
colors?: Partial<ThemeColors>;
|
|
325
|
+
typography?: Partial<ThemeTypography>;
|
|
326
|
+
spacing?: Partial<ThemeSpacing>;
|
|
327
|
+
borderRadius?: Partial<ThemeBorderRadius>;
|
|
328
|
+
shadows?: Partial<ThemeShadows>;
|
|
329
|
+
transitions?: Partial<ThemeTransitions>;
|
|
330
|
+
breakpoints?: Partial<ThemeBreakpoints>;
|
|
331
|
+
zIndex?: Partial<ThemeZIndex>;
|
|
332
|
+
animations?: Partial<ThemeAnimations>;
|
|
333
|
+
gradients?: Partial<ThemeGradients>;
|
|
334
|
+
custom?: ThemeCustom;
|
|
335
|
+
}
|
|
336
|
+
interface ThemeConfig {
|
|
337
|
+
theme: Theme;
|
|
338
|
+
override?: ThemeOverride;
|
|
339
|
+
cssVariablePrefix?: string;
|
|
340
|
+
enableAnimations?: boolean;
|
|
341
|
+
enableTransitions?: boolean;
|
|
342
|
+
enableGradients?: boolean;
|
|
343
|
+
}
|
|
206
344
|
|
|
207
345
|
declare const oceanTheme: Theme;
|
|
208
346
|
declare const forestTheme: Theme;
|
|
@@ -249,8 +387,64 @@ interface ThemeSwitcherProps {
|
|
|
249
387
|
}
|
|
250
388
|
declare function ThemeSwitcher({ className, showModeToggle, showPresets }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
|
|
251
389
|
|
|
390
|
+
interface ThemeCustomizerProps {
|
|
391
|
+
onClose?: () => void;
|
|
392
|
+
}
|
|
393
|
+
declare function ThemeCustomizer({ onClose }: ThemeCustomizerProps): react_jsx_runtime.JSX.Element;
|
|
394
|
+
|
|
252
395
|
declare const lightTheme: Theme;
|
|
253
396
|
|
|
254
397
|
declare const darkTheme: Theme;
|
|
255
398
|
|
|
256
|
-
|
|
399
|
+
/**
|
|
400
|
+
* Create a custom theme by extending a base theme
|
|
401
|
+
*/
|
|
402
|
+
declare function createTheme(baseTheme: Theme, override: ThemeOverride): Theme;
|
|
403
|
+
/**
|
|
404
|
+
* Generate color variations from a base color
|
|
405
|
+
*/
|
|
406
|
+
declare function generateColorVariations(baseColor: string): {
|
|
407
|
+
base: string;
|
|
408
|
+
light: string;
|
|
409
|
+
lighter: string;
|
|
410
|
+
dark: string;
|
|
411
|
+
darker: string;
|
|
412
|
+
contrast: string;
|
|
413
|
+
};
|
|
414
|
+
/**
|
|
415
|
+
* Create a gradient from two colors
|
|
416
|
+
*/
|
|
417
|
+
declare function createGradient(color1: string, color2: string, angle?: number): string;
|
|
418
|
+
/**
|
|
419
|
+
* Generate a complete color palette from a primary color
|
|
420
|
+
*/
|
|
421
|
+
declare function generatePalette(primaryColor: string): {
|
|
422
|
+
primary: ReturnType<typeof generateColorVariations>;
|
|
423
|
+
secondary: ReturnType<typeof generateColorVariations>;
|
|
424
|
+
accent: ReturnType<typeof generateColorVariations>;
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* Validate theme structure
|
|
428
|
+
*/
|
|
429
|
+
declare function validateTheme(theme: Theme): {
|
|
430
|
+
valid: boolean;
|
|
431
|
+
errors: string[];
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Export theme as JSON
|
|
435
|
+
*/
|
|
436
|
+
declare function exportTheme(theme: Theme): string;
|
|
437
|
+
/**
|
|
438
|
+
* Import theme from JSON
|
|
439
|
+
*/
|
|
440
|
+
declare function importTheme(json: string): Theme;
|
|
441
|
+
/**
|
|
442
|
+
* Convert theme to CSS variables
|
|
443
|
+
*/
|
|
444
|
+
declare function themeToCSSVariables(theme: Theme, prefix?: string): Record<string, string>;
|
|
445
|
+
/**
|
|
446
|
+
* Generate theme from brand colors
|
|
447
|
+
*/
|
|
448
|
+
declare function generateThemeFromBrand(brandColor: string, themeName: string, mode?: 'light' | 'dark'): Partial<Theme>;
|
|
449
|
+
|
|
450
|
+
export { CMSBlockEditor, CMSRenderer, ImageNode, OPEN_IMAGE_EDITOR_COMMAND, type PresetThemeName, type Theme, type ThemeAnimations, type ThemeBorderRadius, type ThemeBreakpoints, type ThemeColors, type ThemeConfig, ThemeCustomizer, type ThemeGradients, type ThemeMode, type ThemeOverride, ThemeProvider, type ThemeShadows, type ThemeSpacing, ThemeSwitcher, type ThemeTransitions, type ThemeTypography, type ThemeZIndex, VideoNode, appendHTML, copyMarkdownToClipboard, createGradient, createTheme, darkTheme, downloadHTML, downloadMarkdown, draculaTheme, exportTheme, exportToHTML, exportToHTMLWithWrapper, exportToMarkdown, forestTheme, generateColorVariations, generatePalette, generateThemeFromBrand, importFromHTML, importFromMarkdown, importTheme, lightTheme, loadHTMLFromFile, loadMarkdownFromFile, midnightTheme, minimalTheme, monokaiTheme, oceanTheme, pasteMarkdownFromClipboard, presetThemes, roseTheme, sunsetTheme, themeToCSSVariables, useTheme, validateTheme };
|