@dotcms/uve 1.2.0 → 1.2.1-next.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/uve",
3
- "version": "1.2.0",
3
+ "version": "1.2.1-next.10",
4
4
  "description": "Official JavaScript library for interacting with Universal Visual Editor (UVE)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,13 +20,13 @@
20
20
  "./package.json": "./package.json",
21
21
  ".": {
22
22
  "module": "./index.esm.js",
23
- "types": "./index.esm.d.ts",
23
+ "types": "./index.d.ts",
24
24
  "import": "./index.cjs.mjs",
25
25
  "default": "./index.cjs.js"
26
26
  },
27
27
  "./internal": {
28
28
  "module": "./internal.esm.js",
29
- "types": "./internal.esm.d.ts",
29
+ "types": "./internal.d.ts",
30
30
  "import": "./internal.cjs.mjs",
31
31
  "default": "./internal.cjs.js"
32
32
  }
@@ -49,5 +49,5 @@
49
49
  "homepage": "https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/uve/README.md",
50
50
  "module": "./index.esm.js",
51
51
  "main": "./index.cjs.js",
52
- "types": "./index.esm.d.ts"
53
- }
52
+ "types": "./index.d.ts"
53
+ }
package/public.cjs.js CHANGED
@@ -970,14 +970,18 @@ function listenBlockEditorInlineEvent() {
970
970
  listenBlockEditorClick();
971
971
  return {
972
972
  destroyListenBlockEditorInlineEvent: () => {
973
- window.removeEventListener('load', () => listenBlockEditorClick());
973
+ // No need to remove listener if page was already loaded
974
974
  }
975
975
  };
976
976
  }
977
- window.addEventListener('load', () => listenBlockEditorClick());
977
+ // If the page is not fully loaded, listen for the DOMContentLoaded event
978
+ const handleDOMContentLoaded = () => {
979
+ listenBlockEditorClick();
980
+ };
981
+ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded);
978
982
  return {
979
983
  destroyListenBlockEditorInlineEvent: () => {
980
- window.removeEventListener('load', () => listenBlockEditorClick());
984
+ document.removeEventListener('DOMContentLoaded', handleDOMContentLoaded);
981
985
  }
982
986
  };
983
987
  }
package/public.esm.js CHANGED
@@ -968,14 +968,18 @@ function listenBlockEditorInlineEvent() {
968
968
  listenBlockEditorClick();
969
969
  return {
970
970
  destroyListenBlockEditorInlineEvent: () => {
971
- window.removeEventListener('load', () => listenBlockEditorClick());
971
+ // No need to remove listener if page was already loaded
972
972
  }
973
973
  };
974
974
  }
975
- window.addEventListener('load', () => listenBlockEditorClick());
975
+ // If the page is not fully loaded, listen for the DOMContentLoaded event
976
+ const handleDOMContentLoaded = () => {
977
+ listenBlockEditorClick();
978
+ };
979
+ document.addEventListener('DOMContentLoaded', handleDOMContentLoaded);
976
980
  return {
977
981
  destroyListenBlockEditorInlineEvent: () => {
978
- window.removeEventListener('load', () => listenBlockEditorClick());
982
+ document.removeEventListener('DOMContentLoaded', handleDOMContentLoaded);
979
983
  }
980
984
  };
981
985
  }
package/src/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from './lib/core/core.utils';
2
2
  export * from './lib/editor/public';
3
+ export * from './lib/style-editor/types';
4
+ export * from './lib/style-editor/public';
@@ -0,0 +1,71 @@
1
+ import { StyleEditorFormSchema, StyleEditorForm } from './types';
2
+ /**
3
+ * Normalizes a complete form definition into the schema format expected by UVE.
4
+ *
5
+ * This is the main entry point for converting a developer-friendly form definition
6
+ * into the normalized schema structure that UVE (Universal Visual Editor) can consume.
7
+ * The normalization process transforms the entire form hierarchy:
8
+ *
9
+ * **Normalization Process:**
10
+ * 1. Preserves the `contentType` identifier
11
+ * 2. Processes each section using `normalizeSection`, which:
12
+ * - Normalizes all fields in the section using `normalizeField`
13
+ * - Organizes fields into the required multi-dimensional array structure
14
+ * 3. Returns a fully normalized schema with consistent structure across all sections
15
+ *
16
+ * The resulting schema has all field-specific properties moved into `config` objects
17
+ * and all sections using the consistent single-column array structure, regardless
18
+ * of the input format.
19
+ *
20
+ * @experimental This method is experimental and may be subject to change.
21
+ *
22
+ * @param form - The complete form definition to normalize
23
+ * @param form.contentType - The content type identifier this form is associated with
24
+ * @param form.sections - Array of section definitions, each containing a title and fields
25
+ * @returns The normalized form schema ready to be sent to UVE, with all fields and sections normalized
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * const schema = normalizeForm({
30
+ * contentType: 'my-content-type',
31
+ * sections: [
32
+ * {
33
+ * title: 'Typography',
34
+ * fields: [
35
+ * { type: 'input', label: 'Font Size', inputType: 'number', defaultValue: 16 },
36
+ * { type: 'dropdown', label: 'Font Family', options: ['Arial', 'Helvetica'] }
37
+ * ]
38
+ * },
39
+ * {
40
+ * title: 'Colors',
41
+ * fields: [
42
+ * { type: 'input', label: 'Primary Color', inputType: 'text', defaultValue: '#000000' }
43
+ * ]
44
+ * }
45
+ * ]
46
+ * });
47
+ * // Returns: {
48
+ * // contentType: 'my-content-type',
49
+ * // sections: [
50
+ * // {
51
+ * // title: 'Typography',
52
+ * // fields: [
53
+ * // [
54
+ * // { type: 'input', label: 'Font Size', config: { inputType: 'number', defaultValue: 16 } },
55
+ * // { type: 'dropdown', label: 'Font Family', config: { options: [...] } }
56
+ * // ]
57
+ * // ]
58
+ * // },
59
+ * // {
60
+ * // title: 'Colors',
61
+ * // fields: [
62
+ * // [
63
+ * // { type: 'input', label: 'Primary Color', config: { inputType: 'text', defaultValue: '#000000' } }
64
+ * // ]
65
+ * // ]
66
+ * // }
67
+ * // ]
68
+ * // }
69
+ * ```
70
+ */
71
+ export declare function normalizeForm(form: StyleEditorForm): StyleEditorFormSchema;
@@ -0,0 +1,454 @@
1
+ import { StyleEditorFormSchema, StyleEditorForm, StyleEditorInputField, StyleEditorDropdownField, StyleEditorRadioField, StyleEditorCheckboxGroupField, StyleEditorFieldInputType, StyleEditorInputFieldConfig, StyleEditorOption, StyleEditorRadioOption, StyleEditorOptionValues, StyleEditorRadioOptionValues } from './types';
2
+ /**
3
+ * Helper functions for creating style editor field definitions.
4
+ *
5
+ * Provides type-safe factory functions for creating different types of form fields
6
+ * used in the style editor. Each function creates a field definition with the
7
+ * appropriate `type` property automatically set, eliminating the need to manually
8
+ * specify the type discriminator.
9
+ *
10
+ * **Available Field Types:**
11
+ * - `input`: Text or number input fields
12
+ * - `dropdown`: Single-value selection from a dropdown list
13
+ * - `radio`: Single-value selection from radio button options (supports visual options with images)
14
+ * - `checkboxGroup`: Multiple-value selection from checkbox options
15
+ *
16
+ * These factory functions ensure type safety by inferring the correct field type
17
+ * based on the configuration provided, and they automatically set the `type` property
18
+ * to match the factory function used.
19
+ *
20
+ * @experimental This API is experimental and may be subject to change.
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const form = defineStyleEditorSchema({
25
+ * contentType: 'my-content-type',
26
+ * sections: [
27
+ * {
28
+ * title: 'Typography',
29
+ * fields: [
30
+ * styleEditorField.input({
31
+ * label: 'Font Size',
32
+ * inputType: 'number',
33
+ * defaultValue: 16
34
+ * }),
35
+ * styleEditorField.dropdown({
36
+ * label: 'Font Family',
37
+ * options: ['Arial', 'Helvetica'],
38
+ * defaultValue: 'Arial'
39
+ * }),
40
+ * styleEditorField.radio({
41
+ * label: 'Alignment',
42
+ * options: ['Left', 'Center', 'Right'],
43
+ * defaultValue: 'Left'
44
+ * })
45
+ * ]
46
+ * }
47
+ * ]
48
+ * });
49
+ * ```
50
+ */
51
+ export declare const styleEditorField: {
52
+ /**
53
+ * Creates an input field definition with type-safe default values.
54
+ *
55
+ * Supports both text and number input types. The `defaultValue` type is
56
+ * enforced based on the `inputType` using TypeScript generics:
57
+ * - When `inputType` is `'number'`, `defaultValue` must be a `number`
58
+ * - When `inputType` is `'text'`, `defaultValue` must be a `string`
59
+ *
60
+ * This provides compile-time type checking to prevent mismatched types,
61
+ * such as passing a string when a number is expected.
62
+ *
63
+ * @experimental This method is experimental and may be subject to change.
64
+ *
65
+ * @typeParam T - The input type ('text' or 'number'), inferred from `config.inputType`
66
+ * @param config - Input field configuration
67
+ * @param config.label - The label displayed for this input field
68
+ * @param config.inputType - The type of input ('text' or 'number')
69
+ * @param config.placeholder - Optional placeholder text for the input
70
+ * @param config.defaultValue - Optional default value (type enforced based on inputType)
71
+ * @returns A complete input field definition with type 'input'
72
+ *
73
+ * @example
74
+ * ```typescript
75
+ * // Number input - defaultValue must be a number
76
+ * styleEditorField.input({
77
+ * label: 'Font Size',
78
+ * inputType: 'number',
79
+ * placeholder: 'Enter font size',
80
+ * defaultValue: 16 // ✓ Correct: number
81
+ * })
82
+ *
83
+ * // Text input - defaultValue must be a string
84
+ * styleEditorField.input({
85
+ * label: 'Font Name',
86
+ * inputType: 'text',
87
+ * placeholder: 'Enter font name',
88
+ * defaultValue: 'Arial' // ✓ Correct: string
89
+ * })
90
+ *
91
+ * // TypeScript error - type mismatch
92
+ * styleEditorField.input({
93
+ * label: 'Font Size',
94
+ * inputType: 'number',
95
+ * defaultValue: '16' // ✗ Error: Type 'string' is not assignable to type 'number'
96
+ * })
97
+ * ```
98
+ */
99
+ input: <T extends StyleEditorFieldInputType>(config: StyleEditorInputFieldConfig<T>) => StyleEditorInputField;
100
+ /**
101
+ * Creates a dropdown field definition with type-safe default values.
102
+ *
103
+ * Allows users to select a single value from a list of options.
104
+ * Options can be provided as simple strings or as objects with label and value.
105
+ *
106
+ * **Type Safety Tip:** For autocomplete on `defaultValue`, use `as const` when defining options:
107
+ * ```typescript
108
+ * const options = [
109
+ * { label: 'The one', value: 'one' },
110
+ * { label: 'The two', value: 'two' }
111
+ * ] as const;
112
+ *
113
+ * styleEditorField.dropdown({
114
+ * id: 'my-field',
115
+ * label: 'Select option',
116
+ * options,
117
+ * defaultValue: 'one' // ✓ Autocomplete works! TypeScript knows 'one' | 'two'
118
+ * // defaultValue: 'three' // ✗ TypeScript error: not assignable
119
+ * })
120
+ * ```
121
+ *
122
+ * Without `as const`, the function still works but won't provide autocomplete:
123
+ * ```typescript
124
+ * styleEditorField.dropdown({
125
+ * id: 'my-field',
126
+ * label: 'Select option',
127
+ * options: [
128
+ * { label: 'The one', value: 'one' },
129
+ * { label: 'The two', value: 'two' }
130
+ * ],
131
+ * defaultValue: 'one' // Works, but no autocomplete
132
+ * })
133
+ * ```
134
+ *
135
+ * @experimental This method is experimental and may be subject to change.
136
+ *
137
+ * @typeParam TOptions - The options array type (inferred from config, use `as const` for type safety)
138
+ * @param config - Dropdown field configuration (without the 'type' property)
139
+ * @param config.id - The unique identifier for this field
140
+ * @param config.label - The label displayed for this dropdown field
141
+ * @param config.options - Array of options. Use `as const` for type safety and autocomplete
142
+ * @param config.defaultValue - Optional default selected value (type-safe when options are `as const`)
143
+ * @returns A complete dropdown field definition with type 'dropdown'
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * // With type safety - use 'as const' for autocomplete
148
+ * const options = [
149
+ * { label: 'The one', value: 'one' },
150
+ * { label: 'The two', value: 'two' }
151
+ * ] as const;
152
+ *
153
+ * styleEditorField.dropdown({
154
+ * id: 'my-field',
155
+ * label: 'Select option',
156
+ * options,
157
+ * defaultValue: 'one' // ✓ Autocomplete works!
158
+ * })
159
+ *
160
+ * // Simple string options
161
+ * styleEditorField.dropdown({
162
+ * id: 'font-family',
163
+ * label: 'Font Family',
164
+ * options: ['Arial', 'Helvetica', 'Times New Roman'],
165
+ * defaultValue: 'Arial',
166
+ * placeholder: 'Select a font'
167
+ * })
168
+ *
169
+ * // Object options with custom labels
170
+ * styleEditorField.dropdown({
171
+ * id: 'theme',
172
+ * label: 'Theme',
173
+ * options: [
174
+ * { label: 'Light Theme', value: 'light' },
175
+ * { label: 'Dark Theme', value: 'dark' }
176
+ * ],
177
+ * defaultValue: 'light'
178
+ * })
179
+ * ```
180
+ */
181
+ dropdown: <TOptions extends readonly StyleEditorOption[]>(config: Omit<StyleEditorDropdownField, "type" | "options" | "defaultValue"> & {
182
+ options: TOptions;
183
+ defaultValue?: StyleEditorOptionValues<TOptions>;
184
+ }) => StyleEditorDropdownField;
185
+ /**
186
+ * Creates a radio button field definition with type-safe default values.
187
+ *
188
+ * Allows users to select a single option from a list. Supports visual
189
+ * options with background images for enhanced UI. Options can be provided
190
+ * as simple strings or as objects with label, value, and optional image properties.
191
+ *
192
+ * **Layout Options:**
193
+ * - `columns: 1` (default): Single column list layout
194
+ * - `columns: 2`: Two-column grid layout, ideal for visual options with images
195
+ *
196
+ * **Type Safety Tip:** For autocomplete on `defaultValue`, use `as const` when defining options:
197
+ * ```typescript
198
+ * const options = [
199
+ * { label: 'The one', value: 'one' },
200
+ * { label: 'The two', value: 'two' }
201
+ * ] as const;
202
+ *
203
+ * styleEditorField.radio({
204
+ * id: 'my-field',
205
+ * label: 'Select option',
206
+ * options,
207
+ * defaultValue: 'one' // ✓ Autocomplete works! TypeScript knows 'one' | 'two'
208
+ * // defaultValue: 'three' // ✗ TypeScript error: not assignable
209
+ * })
210
+ * ```
211
+ *
212
+ * Without `as const`, the function still works but won't provide autocomplete:
213
+ * ```typescript
214
+ * styleEditorField.radio({
215
+ * id: 'my-field',
216
+ * label: 'Select option',
217
+ * options: [
218
+ * { label: 'The one', value: 'one' },
219
+ * { label: 'The two', value: 'two' }
220
+ * ],
221
+ * defaultValue: 'one' // Works, but no autocomplete
222
+ * })
223
+ * ```
224
+ *
225
+ * @experimental This method is experimental and may be subject to change.
226
+ *
227
+ * @typeParam TOptions - The options array type (inferred from config, use `as const` for type safety)
228
+ * @param config - Radio field configuration (without the 'type' property)
229
+ * @param config.id - The unique identifier for this field
230
+ * @param config.label - The label displayed for this radio group
231
+ * @param config.options - Array of options. Use `as const` for type safety and autocomplete
232
+ * @param config.defaultValue - Optional default selected value (type-safe when options are `as const`)
233
+ * @param config.columns - Optional number of columns (1 or 2). Defaults to 1 (single column)
234
+ * @returns A complete radio field definition with type 'radio'
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * // With type safety - use 'as const' for autocomplete
239
+ * const options = [
240
+ * { label: 'The one', value: 'one' },
241
+ * { label: 'The two', value: 'two' }
242
+ * ] as const;
243
+ *
244
+ * styleEditorField.radio({
245
+ * id: 'my-field',
246
+ * label: 'Select option',
247
+ * options,
248
+ * defaultValue: 'one' // ✓ Autocomplete works!
249
+ * })
250
+ *
251
+ * // Simple string options (single column)
252
+ * styleEditorField.radio({
253
+ * id: 'alignment',
254
+ * label: 'Alignment',
255
+ * options: ['Left', 'Center', 'Right'],
256
+ * defaultValue: 'Left'
257
+ * })
258
+ *
259
+ * // Two-column grid layout with images
260
+ * styleEditorField.radio({
261
+ * id: 'layout',
262
+ * label: 'Layout',
263
+ * columns: 2,
264
+ * options: [
265
+ * {
266
+ * label: 'Left',
267
+ * value: 'left',
268
+ * imageURL: 'https://example.com/layout-left.png',
269
+ * },
270
+ * {
271
+ * label: 'Right',
272
+ * value: 'right',
273
+ * imageURL: 'https://example.com/layout-right.png',
274
+ * },
275
+ * { label: 'Center', value: 'center' },
276
+ * { label: 'Overlap', value: 'overlap' }
277
+ * ],
278
+ * defaultValue: 'right'
279
+ * })
280
+ * ```
281
+ */
282
+ radio: <TOptions extends readonly StyleEditorRadioOption[]>(config: Omit<StyleEditorRadioField, "type" | "options" | "defaultValue"> & {
283
+ options: TOptions;
284
+ defaultValue?: StyleEditorRadioOptionValues<TOptions>;
285
+ }) => StyleEditorRadioField;
286
+ /**
287
+ * Creates a checkbox group field definition.
288
+ *
289
+ * Allows users to select multiple options simultaneously. Each option
290
+ * can be independently checked or unchecked. The default checked state
291
+ * is defined directly in each option's `value` property (boolean).
292
+ *
293
+ * **Key Differences from Other Field Types:**
294
+ * - Uses `key` instead of `value` for the identifier (to avoid confusion)
295
+ * - Uses `value` for the default boolean checked state (the actual value)
296
+ * - No separate `defaultValue` property - defaults are embedded in options
297
+ *
298
+ * **Why `key` instead of `value`?**
299
+ * In dropdown and radio fields, `value` represents the actual selected value (string).
300
+ * In checkbox groups, the actual value is boolean (checked/unchecked), so we use
301
+ * `key` for the identifier to avoid confusion. This makes it clear that `value`
302
+ * is the boolean state, not just an identifier.
303
+ *
304
+ * @experimental This method is experimental and may be subject to change.
305
+ *
306
+ * @param config - Checkbox group field configuration (without the 'type' property)
307
+ * @param config.id - The unique identifier for this field
308
+ * @param config.label - The label displayed for this checkbox group
309
+ * @param config.options - Array of checkbox options with label, key, and value (boolean)
310
+ * @returns A complete checkbox group field definition with type 'checkboxGroup'
311
+ *
312
+ * @example
313
+ * ```typescript
314
+ * styleEditorField.checkboxGroup({
315
+ * id: 'text-decoration',
316
+ * label: 'Text Decoration',
317
+ * options: [
318
+ * { label: 'Underline', key: 'underline', value: true },
319
+ * { label: 'Overline', key: 'overline', value: false },
320
+ * { label: 'Line Through', key: 'line-through', value: false }
321
+ * ]
322
+ * // No defaultValue needed - it's automatically derived from options
323
+ * })
324
+ *
325
+ * // Example with type settings
326
+ * styleEditorField.checkboxGroup({
327
+ * id: 'type-settings',
328
+ * label: 'Type settings',
329
+ * options: [
330
+ * { label: 'Bold', key: 'bold', value: true },
331
+ * { label: 'Italic', key: 'italic', value: false },
332
+ * { label: 'Underline', key: 'underline', value: false },
333
+ * { label: 'Strikethrough', key: 'strikethrough', value: false }
334
+ * ]
335
+ * })
336
+ * ```
337
+ */
338
+ checkboxGroup: (config: Omit<StyleEditorCheckboxGroupField, "type">) => StyleEditorCheckboxGroupField;
339
+ };
340
+ /**
341
+ * Normalizes and validates a style editor form definition.
342
+ *
343
+ * Converts the developer-friendly form structure into the schema format
344
+ * expected by UVE (Universal Visual Editor). This function processes the
345
+ * form definition and transforms it into the normalized schema format where:
346
+ *
347
+ * - All field-specific properties are moved into `config` objects
348
+ * - String options are normalized to `{ label, value }` objects
349
+ * - Sections are organized into the multi-dimensional array structure required by UVE
350
+ *
351
+ * The normalization process ensures consistency and type safety in the schema
352
+ * format sent to UVE. After normalization, use `registerStyleEditorSchemas`
353
+ * to register the schema with the UVE editor.
354
+ *
355
+ * @experimental This method is experimental and may be subject to change.
356
+ *
357
+ * @param form - The style editor form definition containing contentType and sections
358
+ * @param form.contentType - The content type identifier for this form
359
+ * @param form.sections - Array of sections, each containing a title and fields array
360
+ * @returns The normalized form schema ready to be sent to UVE
361
+ *
362
+ * @example
363
+ * ```typescript
364
+ * const formSchema = defineStyleEditorSchema({
365
+ * contentType: 'my-content-type',
366
+ * sections: [
367
+ * {
368
+ * title: 'Typography',
369
+ * fields: [
370
+ * styleEditorField.input({
371
+ * label: 'Font Size',
372
+ * inputType: 'number',
373
+ * defaultValue: 16
374
+ * }),
375
+ * styleEditorField.dropdown({
376
+ * label: 'Font Family',
377
+ * options: ['Arial', 'Helvetica'],
378
+ * defaultValue: 'Arial'
379
+ * })
380
+ * ]
381
+ * },
382
+ * {
383
+ * title: 'Colors',
384
+ * fields: [
385
+ * styleEditorField.input({
386
+ * label: 'Primary Color',
387
+ * inputType: 'text',
388
+ * defaultValue: '#000000'
389
+ * }),
390
+ * styleEditorField.input({
391
+ * label: 'Secondary Color',
392
+ * inputType: 'text',
393
+ * defaultValue: '#FFFFFF'
394
+ * })
395
+ * ]
396
+ * }
397
+ * ]
398
+ * });
399
+ *
400
+ * // Register the schema with UVE
401
+ * registerStyleEditorSchemas([formSchema]);
402
+ * ```
403
+ */
404
+ export declare function defineStyleEditorSchema(form: StyleEditorForm): StyleEditorFormSchema;
405
+ /**
406
+ * Registers style editor form schemas with the UVE editor.
407
+ *
408
+ * Sends normalized style editor schemas to the UVE (Universal Visual Editor)
409
+ * for registration. The schemas must be normalized using `defineStyleEditorSchema`
410
+ * before being passed to this function.
411
+ *
412
+ * **Behavior:**
413
+ * - Only registers schemas when UVE is in EDIT mode
414
+ * - Validates that each schema has a `contentType` property
415
+ * - Skips schemas without `contentType` and logs a warning
416
+ * - Sends the validated schemas to UVE via the `REGISTER_STYLE_SCHEMAS` action
417
+ *
418
+ * **Note:** This function will silently return early if UVE is not in EDIT mode,
419
+ * so it's safe to call even when the editor is not active.
420
+ *
421
+ * @experimental This method is experimental and may be subject to change.
422
+ *
423
+ * @param schemas - Array of normalized style editor form schemas to register with UVE
424
+ * @returns void - This function does not return a value
425
+ *
426
+ * @example
427
+ * ```typescript
428
+ * // Create and normalize a form schema
429
+ * const formSchema = defineStyleEditorSchema({
430
+ * contentType: 'my-content-type',
431
+ * sections: [
432
+ * {
433
+ * title: 'Typography',
434
+ * fields: [
435
+ * styleEditorField.input({
436
+ * label: 'Font Size',
437
+ * inputType: 'number',
438
+ * defaultValue: 16
439
+ * })
440
+ * ]
441
+ * }
442
+ * ]
443
+ * });
444
+ *
445
+ * // Register the schema with UVE
446
+ * registerStyleEditorSchemas([formSchema]);
447
+ *
448
+ * // Register multiple schemas at once
449
+ * const schema1 = defineStyleEditorSchema({ ... });
450
+ * const schema2 = defineStyleEditorSchema({ ... });
451
+ * registerStyleEditorSchemas([schema1, schema2]);
452
+ * ```
453
+ */
454
+ export declare function registerStyleEditorSchemas(schemas: StyleEditorFormSchema[]): void;