@dotcms/uve 1.2.1 → 1.2.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/index.esm.js CHANGED
@@ -1,3 +1,625 @@
1
- export { c as createUVESubscription, e as editContentlet, b as enableBlockEditorInline, g as getUVEState, a as initInlineEditing, d as initUVE, i as isAnalyticsActive, r as reorderMenu, s as sendMessageToUVE, u as updateNavigation } from './public.esm.js';
2
- import '@dotcms/types';
1
+ import { g as getUVEState, s as sendMessageToUVE } from './public.esm.js';
2
+ export { c as createUVESubscription, e as editContentlet, a as enableBlockEditorInline, i as initInlineEditing, b as initUVE, r as reorderMenu, u as updateNavigation } from './public.esm.js';
3
+ import { UVE_MODE, DotCMSUVEAction } from '@dotcms/types';
3
4
  import '@dotcms/types/internal';
5
+
6
+ /**
7
+ * Normalizes a field definition into the schema format expected by UVE.
8
+ *
9
+ * Converts developer-friendly field definitions into a normalized structure where
10
+ * all type-specific configuration properties are moved into a `config` object.
11
+ * This transformation ensures consistency in the schema format sent to UVE.
12
+ *
13
+ * **Field Type Handling:**
14
+ * - **Input fields**: Extracts `inputType` and `placeholder` into config
15
+ * - **Dropdown fields**: Normalizes options (strings become `{ label, value }` objects)
16
+ * - **Radio fields**: Normalizes options (preserves image properties like `imageURL`, `width`, `height`),
17
+ * extracts `columns` into config
18
+ * - **Checkbox group fields**: Normalizes options (converts to format expected by UVE)
19
+ *
20
+ * @experimental This method is experimental and may be subject to change.
21
+ *
22
+ * @param field - The field definition to normalize. Must be one of: input, dropdown, radio, or checkboxGroup
23
+ * @returns The normalized field schema with type, label, and config properties ready to be sent to UVE
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * // Input field normalization
28
+ * normalizeField({
29
+ * type: 'input',
30
+ * id: 'font-size',
31
+ * label: 'Font Size',
32
+ * inputType: 'number',
33
+ * placeholder: 'Enter size'
34
+ * })
35
+ * // Returns: {
36
+ * // type: 'input',
37
+ * // id: 'font-size',
38
+ * // label: 'Font Size',
39
+ * // config: { inputType: 'number', placeholder: 'Enter size' }
40
+ * // }
41
+ *
42
+ * // Dropdown field with string options normalization
43
+ * normalizeField({
44
+ * type: 'dropdown',
45
+ * label: 'Font Family',
46
+ * options: ['Arial', 'Helvetica']
47
+ * })
48
+ * // Returns: {
49
+ * // type: 'dropdown',
50
+ * // label: 'Font Family',
51
+ * // config: { options: [{ label: 'Arial', value: 'Arial' }, { label: 'Helvetica', value: 'Helvetica' }] }
52
+ * // }
53
+ * ```
54
+ */
55
+ function normalizeField(field) {
56
+ const base = {
57
+ type: field.type,
58
+ label: field.label,
59
+ id: field.id
60
+ };
61
+ const config = {};
62
+ // Handle type-specific properties
63
+ if (field.type === 'input') {
64
+ config.inputType = field.inputType;
65
+ config.placeholder = field.placeholder;
66
+ }
67
+ if (field.type === 'dropdown' || field.type === 'radio') {
68
+ // Normalize options to consistent format
69
+ config.options = field.options.map(opt => typeof opt === 'string' ? {
70
+ label: opt,
71
+ value: opt
72
+ } : opt);
73
+ // Handle radio-specific properties
74
+ if (field.type === 'radio') {
75
+ config.columns = field.columns;
76
+ }
77
+ }
78
+ if (field.type === 'checkboxGroup') {
79
+ // Normalize checkbox options - convert to format expected by UVE
80
+ // Options have label and key - convert key to 'value' for UVE format
81
+ config.options = field.options.map(opt => ({
82
+ label: opt.label,
83
+ value: opt.key // UVE expects 'value' to be the key identifier
84
+ }));
85
+ }
86
+ return {
87
+ ...base,
88
+ config
89
+ };
90
+ }
91
+ /**
92
+ * Normalizes a section definition into the schema format expected by UVE.
93
+ *
94
+ * Converts a section with a flat array of fields into the normalized schema format
95
+ * where fields are organized as a multi-dimensional array (array of column arrays).
96
+ * Currently, all sections are normalized to a single-column layout structure.
97
+ *
98
+ * **Normalization Process:**
99
+ * 1. Normalizes each field in the section using `normalizeField`
100
+ * 2. Wraps the normalized fields array in an outer array to create the column structure
101
+ * 3. Preserves the section title
102
+ *
103
+ * The output format always uses a multi-dimensional array structure (`fields: StyleEditorFieldSchema[][]`),
104
+ * even for single-column layouts, ensuring consistency in the UVE schema format.
105
+ *
106
+ * @experimental This method is experimental and may be subject to change.
107
+ *
108
+ * @param section - The section definition to normalize, containing a title and array of fields
109
+ * @param section.title - The section title displayed to users
110
+ * @param section.fields - Array of field definitions to normalize
111
+ * @returns The normalized section schema with fields organized as a single-column array structure
112
+ *
113
+ * @example
114
+ * ```typescript
115
+ * normalizeSection({
116
+ * title: 'Typography',
117
+ * fields: [
118
+ * { type: 'input', label: 'Font Size', inputType: 'number' },
119
+ * { type: 'dropdown', label: 'Font Family', options: ['Arial'] }
120
+ * ]
121
+ * })
122
+ * // Returns: {
123
+ * // title: 'Typography',
124
+ * // fields: [
125
+ * // [
126
+ * // { type: 'input', label: 'Font Size', config: { inputType: 'number' } },
127
+ * // { type: 'dropdown', label: 'Font Family', config: { options: [...] } }
128
+ * // ]
129
+ * // ]
130
+ * // }
131
+ * ```
132
+ */
133
+ function normalizeSection(section) {
134
+ // Determine if fields is multi-column or single column
135
+ const normalizedFields = section.fields.map(normalizeField);
136
+ return {
137
+ title: section.title,
138
+ fields: normalizedFields
139
+ };
140
+ }
141
+ /**
142
+ * Normalizes a complete form definition into the schema format expected by UVE.
143
+ *
144
+ * This is the main entry point for converting a developer-friendly form definition
145
+ * into the normalized schema structure that UVE (Universal Visual Editor) can consume.
146
+ * The normalization process transforms the entire form hierarchy:
147
+ *
148
+ * **Normalization Process:**
149
+ * 1. Preserves the `contentType` identifier
150
+ * 2. Processes each section using `normalizeSection`, which:
151
+ * - Normalizes all fields in the section using `normalizeField`
152
+ * - Organizes fields into the required multi-dimensional array structure
153
+ * 3. Returns a fully normalized schema with consistent structure across all sections
154
+ *
155
+ * The resulting schema has all field-specific properties moved into `config` objects
156
+ * and all sections using the consistent single-column array structure, regardless
157
+ * of the input format.
158
+ *
159
+ * @experimental This method is experimental and may be subject to change.
160
+ *
161
+ * @param form - The complete form definition to normalize
162
+ * @param form.contentType - The content type identifier this form is associated with
163
+ * @param form.sections - Array of section definitions, each containing a title and fields
164
+ * @returns The normalized form schema ready to be sent to UVE, with all fields and sections normalized
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * const schema = normalizeForm({
169
+ * contentType: 'my-content-type',
170
+ * sections: [
171
+ * {
172
+ * title: 'Typography',
173
+ * fields: [
174
+ * { type: 'input', id: 'font-size', label: 'Font Size', inputType: 'number' },
175
+ * { type: 'dropdown', id: 'font-family', label: 'Font Family', options: ['Arial', 'Helvetica'] }
176
+ * ]
177
+ * },
178
+ * {
179
+ * title: 'Colors',
180
+ * fields: [
181
+ * { type: 'input', id: 'primary-color', label: 'Primary Color', inputType: 'text' }
182
+ * ]
183
+ * }
184
+ * ]
185
+ * });
186
+ * // Returns: {
187
+ * // contentType: 'my-content-type',
188
+ * // sections: [
189
+ * // {
190
+ * // title: 'Typography',
191
+ * // fields: [
192
+ * // [
193
+ * // { type: 'input', id: 'font-size', label: 'Font Size', config: { inputType: 'number' } },
194
+ * // { type: 'dropdown', id: 'font-family', label: 'Font Family', config: { options: [...] } }
195
+ * // ]
196
+ * // ]
197
+ * // },
198
+ * // {
199
+ * // title: 'Colors',
200
+ * // fields: [
201
+ * // [
202
+ * // { type: 'input', id: 'primary-color', label: 'Primary Color', config: { inputType: 'text' } }
203
+ * // ]
204
+ * // ]
205
+ * // }
206
+ * // ]
207
+ * // }
208
+ * ```
209
+ */
210
+ function normalizeForm(form) {
211
+ return {
212
+ contentType: form.contentType,
213
+ sections: form.sections.map(normalizeSection)
214
+ };
215
+ }
216
+
217
+ /**
218
+ * Helper functions for creating style editor field definitions.
219
+ *
220
+ * Provides type-safe factory functions for creating different types of form fields
221
+ * used in the style editor. Each function creates a field definition with the
222
+ * appropriate `type` property automatically set, eliminating the need to manually
223
+ * specify the type discriminator.
224
+ *
225
+ * **Available Field Types:**
226
+ * - `input`: Text or number input fields
227
+ * - `dropdown`: Single-value selection from a dropdown list
228
+ * - `radio`: Single-value selection from radio button options (supports visual options with images)
229
+ * - `checkboxGroup`: Multiple-value selection from checkbox options
230
+ *
231
+ * These factory functions ensure type safety by inferring the correct field type
232
+ * based on the configuration provided, and they automatically set the `type` property
233
+ * to match the factory function used.
234
+ *
235
+ * @experimental This API is experimental and may be subject to change.
236
+ *
237
+ * @example
238
+ * ```typescript
239
+ * const form = defineStyleEditorSchema({
240
+ * contentType: 'my-content-type',
241
+ * sections: [
242
+ * {
243
+ * title: 'Typography',
244
+ * fields: [
245
+ * styleEditorField.input({
246
+ * id: 'font-size',
247
+ * label: 'Font Size',
248
+ * inputType: 'number'
249
+ * }),
250
+ * styleEditorField.dropdown({
251
+ * id: 'font-family',
252
+ * label: 'Font Family',
253
+ * options: ['Arial', 'Helvetica']
254
+ * }),
255
+ * styleEditorField.radio({
256
+ * id: 'alignment',
257
+ * label: 'Alignment',
258
+ * options: ['Left', 'Center', 'Right']
259
+ * })
260
+ * ]
261
+ * }
262
+ * ]
263
+ * });
264
+ * ```
265
+ */
266
+ const styleEditorField = {
267
+ /**
268
+ * Creates an input field definition.
269
+ *
270
+ * Supports both text and number input types for different value types.
271
+ *
272
+ * @experimental This method is experimental and may be subject to change.
273
+ *
274
+ * @typeParam T - The input type ('text' or 'number'), inferred from `config.inputType`
275
+ * @param config - Input field configuration
276
+ * @param config.id - The unique identifier for this field
277
+ * @param config.label - The label displayed for this input field
278
+ * @param config.inputType - The type of input ('text' or 'number')
279
+ * @param config.placeholder - Optional placeholder text for the input
280
+ * @returns A complete input field definition with type 'input'
281
+ *
282
+ * @example
283
+ * ```typescript
284
+ * // Number input
285
+ * styleEditorField.input({
286
+ * id: 'font-size',
287
+ * label: 'Font Size',
288
+ * inputType: 'number',
289
+ * placeholder: 'Enter font size'
290
+ * })
291
+ *
292
+ * // Text input
293
+ * styleEditorField.input({
294
+ * id: 'font-name',
295
+ * label: 'Font Name',
296
+ * inputType: 'text',
297
+ * placeholder: 'Enter font name'
298
+ * })
299
+ * ```
300
+ */
301
+ input: config => ({
302
+ type: 'input',
303
+ ...config
304
+ }),
305
+ /**
306
+ * Creates a dropdown field definition.
307
+ *
308
+ * Allows users to select a single value from a list of options.
309
+ * Options can be provided as simple strings or as objects with label and value.
310
+ *
311
+ * **Best Practice:** Use `as const` when defining options for better type safety:
312
+ * ```typescript
313
+ * const OPTIONS = [
314
+ * { label: '18', value: '18px' },
315
+ * { label: '24', value: '24px' }
316
+ * ] as const;
317
+ *
318
+ * styleEditorField.dropdown({
319
+ * id: 'size',
320
+ * label: 'Size',
321
+ * options: OPTIONS
322
+ * });
323
+ * ```
324
+ *
325
+ * @experimental This method is experimental and may be subject to change.
326
+ *
327
+ * @param config - Dropdown field configuration (without the 'type' property)
328
+ * @param config.id - The unique identifier for this field
329
+ * @param config.label - The label displayed for this dropdown field
330
+ * @param config.options - Array of options. Can be strings or objects with label and value. Use `as const` for best type safety.
331
+ * @returns A complete dropdown field definition with type 'dropdown'
332
+ *
333
+ * @example
334
+ * ```typescript
335
+ * // Simple string options
336
+ * styleEditorField.dropdown({
337
+ * id: 'font-family',
338
+ * label: 'Font Family',
339
+ * options: ['Arial', 'Helvetica', 'Times New Roman']
340
+ * })
341
+ *
342
+ * // Object options with custom labels (recommended: use 'as const')
343
+ * const OPTIONS = [
344
+ * { label: 'Light Theme', value: 'light' },
345
+ * { label: 'Dark Theme', value: 'dark' }
346
+ * ] as const;
347
+ *
348
+ * styleEditorField.dropdown({
349
+ * id: 'theme',
350
+ * label: 'Theme',
351
+ * options: OPTIONS
352
+ * })
353
+ * ```
354
+ */
355
+ dropdown: config => ({
356
+ type: 'dropdown',
357
+ ...config,
358
+ options: config.options
359
+ }),
360
+ /**
361
+ * Creates a radio button field definition.
362
+ *
363
+ * Allows users to select a single option from a list. Supports visual
364
+ * options with background images for enhanced UI. Options can be provided
365
+ * as simple strings or as objects with label, value, and optional image properties.
366
+ *
367
+ * **Layout Options:**
368
+ * - `columns: 1` (default): Single column list layout
369
+ * - `columns: 2`: Two-column grid layout, ideal for visual options with images
370
+ *
371
+ * **Best Practice:** Use `as const` when defining options for better type safety:
372
+ * ```typescript
373
+ * const RADIO_OPTIONS = [
374
+ * { label: 'Left', value: 'left' },
375
+ * { label: 'Right', value: 'right' }
376
+ * ] as const;
377
+ *
378
+ * styleEditorField.radio({
379
+ * id: 'layout',
380
+ * label: 'Layout',
381
+ * options: RADIO_OPTIONS
382
+ * });
383
+ * ```
384
+ *
385
+ * @experimental This method is experimental and may be subject to change.
386
+ *
387
+ * @param config - Radio field configuration (without the 'type' property)
388
+ * @param config.id - The unique identifier for this field
389
+ * @param config.label - The label displayed for this radio group
390
+ * @param config.options - Array of options. Can be strings or objects with label, value, and optional image properties. Use `as const` for best type safety.
391
+ * @param config.columns - Optional number of columns (1 or 2). Defaults to 1 (single column)
392
+ * @returns A complete radio field definition with type 'radio'
393
+ *
394
+ * @example
395
+ * ```typescript
396
+ * // Simple string options (single column)
397
+ * styleEditorField.radio({
398
+ * id: 'alignment',
399
+ * label: 'Alignment',
400
+ * options: ['Left', 'Center', 'Right']
401
+ * })
402
+ *
403
+ * // Two-column grid layout with images (recommended: use 'as const')
404
+ * const LAYOUT_OPTIONS = [
405
+ * {
406
+ * label: 'Left',
407
+ * value: 'left',
408
+ * imageURL: 'https://example.com/layout-left.png',
409
+ * },
410
+ * {
411
+ * label: 'Right',
412
+ * value: 'right',
413
+ * imageURL: 'https://example.com/layout-right.png',
414
+ * },
415
+ * { label: 'Center', value: 'center' },
416
+ * { label: 'Overlap', value: 'overlap' }
417
+ * ] as const;
418
+ *
419
+ * styleEditorField.radio({
420
+ * id: 'layout',
421
+ * label: 'Layout',
422
+ * columns: 2,
423
+ * options: LAYOUT_OPTIONS
424
+ * })
425
+ * ```
426
+ */
427
+ radio: config => ({
428
+ type: 'radio',
429
+ ...config,
430
+ options: config.options
431
+ }),
432
+ /**
433
+ * Creates a checkbox group field definition.
434
+ *
435
+ * Allows users to select multiple options simultaneously. Each option
436
+ * can be independently checked or unchecked. The default checked state
437
+ * is defined directly in each option's `value` property (boolean).
438
+ *
439
+ * **Key Differences from Other Field Types:**
440
+ * - Uses `key` instead of `value` for the identifier (to avoid confusion)
441
+ * - Checked state is managed by the form system, not stored in the option definition
442
+ *
443
+ * **Why `key` instead of `value`?**
444
+ * In dropdown and radio fields, `value` represents the actual selected value (string).
445
+ * In checkbox groups, the actual value is boolean (checked/unchecked), so we use
446
+ * `key` for the identifier to avoid confusion. This makes it clear that `value`
447
+ * is the boolean state, not just an identifier.
448
+ *
449
+ * @experimental This method is experimental and may be subject to change.
450
+ *
451
+ * @param config - Checkbox group field configuration (without the 'type' property)
452
+ * @param config.id - The unique identifier for this field
453
+ * @param config.label - The label displayed for this checkbox group
454
+ * @param config.options - Array of checkbox options with label and key
455
+ * @returns A complete checkbox group field definition with type 'checkboxGroup'
456
+ *
457
+ * @example
458
+ * ```typescript
459
+ * styleEditorField.checkboxGroup({
460
+ * id: 'text-decoration',
461
+ * label: 'Text Decoration',
462
+ * options: [
463
+ * { label: 'Underline', key: 'underline' },
464
+ * { label: 'Overline', key: 'overline' },
465
+ * { label: 'Line Through', key: 'line-through' }
466
+ * ]
467
+ * })
468
+ *
469
+ * // Example with type settings
470
+ * styleEditorField.checkboxGroup({
471
+ * id: 'type-settings',
472
+ * label: 'Type settings',
473
+ * options: [
474
+ * { label: 'Bold', key: 'bold' },
475
+ * { label: 'Italic', key: 'italic' },
476
+ * { label: 'Underline', key: 'underline' },
477
+ * { label: 'Strikethrough', key: 'strikethrough' }
478
+ * ]
479
+ * })
480
+ * ```
481
+ */
482
+ checkboxGroup: config => ({
483
+ type: 'checkboxGroup',
484
+ ...config
485
+ })
486
+ };
487
+ /**
488
+ * Normalizes and validates a style editor form definition.
489
+ *
490
+ * Converts the developer-friendly form structure into the schema format
491
+ * expected by UVE (Universal Visual Editor). This function processes the
492
+ * form definition and transforms it into the normalized schema format where:
493
+ *
494
+ * - All field-specific properties are moved into `config` objects
495
+ * - String options are normalized to `{ label, value }` objects
496
+ * - Sections are organized into the multi-dimensional array structure required by UVE
497
+ *
498
+ * The normalization process ensures consistency and type safety in the schema
499
+ * format sent to UVE. After normalization, use `registerStyleEditorSchemas`
500
+ * to register the schema with the UVE editor.
501
+ *
502
+ * @experimental This method is experimental and may be subject to change.
503
+ *
504
+ * @param form - The style editor form definition containing contentType and sections
505
+ * @param form.contentType - The content type identifier for this form
506
+ * @param form.sections - Array of sections, each containing a title and fields array
507
+ * @returns The normalized form schema ready to be sent to UVE
508
+ *
509
+ * @example
510
+ * ```typescript
511
+ * const formSchema = defineStyleEditorSchema({
512
+ * contentType: 'my-content-type',
513
+ * sections: [
514
+ * {
515
+ * title: 'Typography',
516
+ * fields: [
517
+ * styleEditorField.input({
518
+ * id: 'font-size',
519
+ * label: 'Font Size',
520
+ * inputType: 'number'
521
+ * }),
522
+ * styleEditorField.dropdown({
523
+ * id: 'font-family',
524
+ * label: 'Font Family',
525
+ * options: ['Arial', 'Helvetica']
526
+ * })
527
+ * ]
528
+ * },
529
+ * {
530
+ * title: 'Colors',
531
+ * fields: [
532
+ * styleEditorField.input({
533
+ * id: 'primary-color',
534
+ * label: 'Primary Color',
535
+ * inputType: 'text'
536
+ * }),
537
+ * styleEditorField.input({
538
+ * id: 'secondary-color',
539
+ * label: 'Secondary Color',
540
+ * inputType: 'text'
541
+ * })
542
+ * ]
543
+ * }
544
+ * ]
545
+ * });
546
+ *
547
+ * // Register the schema with UVE
548
+ * registerStyleEditorSchemas([formSchema]);
549
+ * ```
550
+ */
551
+ function defineStyleEditorSchema(form) {
552
+ return normalizeForm(form);
553
+ }
554
+ /**
555
+ * Registers style editor form schemas with the UVE editor.
556
+ *
557
+ * Sends normalized style editor schemas to the UVE (Universal Visual Editor)
558
+ * for registration. The schemas must be normalized using `defineStyleEditorSchema`
559
+ * before being passed to this function.
560
+ *
561
+ * **Behavior:**
562
+ * - Only registers schemas when UVE is in EDIT mode
563
+ * - Validates that each schema has a `contentType` property
564
+ * - Skips schemas without `contentType` and logs a warning
565
+ * - Sends the validated schemas to UVE via the `REGISTER_STYLE_SCHEMAS` action
566
+ *
567
+ * **Note:** This function will silently return early if UVE is not in EDIT mode,
568
+ * so it's safe to call even when the editor is not active.
569
+ *
570
+ * @experimental This method is experimental and may be subject to change.
571
+ *
572
+ * @param schemas - Array of normalized style editor form schemas to register with UVE
573
+ * @returns void - This function does not return a value
574
+ *
575
+ * @example
576
+ * ```typescript
577
+ * // Create and normalize a form schema
578
+ * const formSchema = defineStyleEditorSchema({
579
+ * contentType: 'my-content-type',
580
+ * sections: [
581
+ * {
582
+ * title: 'Typography',
583
+ * fields: [
584
+ * styleEditorField.input({
585
+ * id: 'font-size',
586
+ * label: 'Font Size',
587
+ * inputType: 'number'
588
+ * })
589
+ * ]
590
+ * }
591
+ * ]
592
+ * });
593
+ *
594
+ * // Register the schema with UVE
595
+ * registerStyleEditorSchemas([formSchema]);
596
+ *
597
+ * // Register multiple schemas at once
598
+ * const schema1 = defineStyleEditorSchema({ ... });
599
+ * const schema2 = defineStyleEditorSchema({ ... });
600
+ * registerStyleEditorSchemas([schema1, schema2]);
601
+ * ```
602
+ */
603
+ function registerStyleEditorSchemas(schemas) {
604
+ const {
605
+ mode
606
+ } = getUVEState() || {};
607
+ if (!mode || mode !== UVE_MODE.EDIT) {
608
+ return;
609
+ }
610
+ const validatedSchemas = schemas.filter((schema, index) => {
611
+ if (!schema.contentType) {
612
+ console.warn(`[registerStyleEditorSchemas] Skipping schema with index [${index}] for not having a contentType`);
613
+ return false;
614
+ }
615
+ return true;
616
+ });
617
+ sendMessageToUVE({
618
+ action: DotCMSUVEAction.REGISTER_STYLE_SCHEMAS,
619
+ payload: {
620
+ schemas: validatedSchemas
621
+ }
622
+ });
623
+ }
624
+
625
+ export { defineStyleEditorSchema, getUVEState, registerStyleEditorSchemas, sendMessageToUVE, styleEditorField };
package/internal.cjs.js CHANGED
@@ -74,8 +74,6 @@ const __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__ = {
74
74
  */
75
75
  const __TINYMCE_PATH_ON_DOTCMS__ = '/ext/tinymcev7/tinymce.min.js';
76
76
 
77
- exports.ANALYTICS_WINDOWS_ACTIVE_KEY = _public.ANALYTICS_WINDOWS_ACTIVE_KEY;
78
- exports.ANALYTICS_WINDOWS_CLEANUP_KEY = _public.ANALYTICS_WINDOWS_CLEANUP_KEY;
79
77
  exports.CUSTOM_NO_COMPONENT = _public.CUSTOM_NO_COMPONENT;
80
78
  exports.DEVELOPMENT_MODE = _public.DEVELOPMENT_MODE;
81
79
  exports.EMPTY_CONTAINER_STYLE_ANGULAR = _public.EMPTY_CONTAINER_STYLE_ANGULAR;
@@ -94,14 +92,12 @@ exports.getClosestDotCMSContainerData = _public.getClosestDotCMSContainerData;
94
92
  exports.getColumnPositionClasses = _public.getColumnPositionClasses;
95
93
  exports.getContainersData = _public.getContainersData;
96
94
  exports.getContentletsInContainer = _public.getContentletsInContainer;
97
- exports.getDotAnalyticsAttributes = _public.getDotAnalyticsAttributes;
98
95
  exports.getDotCMSContainerData = _public.getDotCMSContainerData;
99
96
  exports.getDotCMSContentletsBound = _public.getDotCMSContentletsBound;
100
97
  exports.getDotCMSPageBounds = _public.getDotCMSPageBounds;
101
98
  exports.getDotContainerAttributes = _public.getDotContainerAttributes;
102
99
  exports.getDotContentletAttributes = _public.getDotContentletAttributes;
103
100
  exports.getUVEState = _public.getUVEState;
104
- exports.isAnalyticsActive = _public.isAnalyticsActive;
105
101
  exports.isValidBlocks = _public.isValidBlocks;
106
102
  exports.setBounds = _public.setBounds;
107
103
  exports.__BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__ = __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__;
package/internal.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ANALYTICS_WINDOWS_ACTIVE_KEY, k as ANALYTICS_WINDOWS_CLEANUP_KEY, C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, j as EMPTY_CONTAINER_STYLE_ANGULAR, h as EMPTY_CONTAINER_STYLE_REACT, E as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, _ as __UVE_EVENTS__, f as __UVE_EVENT_ERROR_FALLBACK__, v as combineClasses, t as computeScrollIsInBottom, c as createUVESubscription, p as findDotCMSElement, q as findDotCMSVTLData, o as getClosestDotCMSContainerData, w as getColumnPositionClasses, z as getContainersData, B as getContentletsInContainer, y as getDotAnalyticsAttributes, n as getDotCMSContainerData, m as getDotCMSContentletsBound, l as getDotCMSPageBounds, F as getDotContainerAttributes, x as getDotContentletAttributes, g as getUVEState, i as isAnalyticsActive, H as isValidBlocks, G as setBounds } from './public.esm.js';
1
+ export { C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, h as EMPTY_CONTAINER_STYLE_ANGULAR, f as EMPTY_CONTAINER_STYLE_REACT, E as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, _ as __UVE_EVENTS__, d as __UVE_EVENT_ERROR_FALLBACK__, q as combineClasses, p as computeScrollIsInBottom, c as createUVESubscription, n as findDotCMSElement, o as findDotCMSVTLData, m as getClosestDotCMSContainerData, t as getColumnPositionClasses, w as getContainersData, x as getContentletsInContainer, l as getDotCMSContainerData, k as getDotCMSContentletsBound, j as getDotCMSPageBounds, y as getDotContainerAttributes, v as getDotContentletAttributes, g as getUVEState, A as isValidBlocks, z as setBounds } from './public.esm.js';
2
2
  import '@dotcms/types';
3
3
  import '@dotcms/types/internal';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/uve",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
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"
52
+ "types": "./index.d.ts"
53
53
  }