@dotcms/types 1.5.1-next.1964 → 1.5.1-next.1965

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/types",
3
- "version": "1.5.1-next.1964",
3
+ "version": "1.5.1-next.1965",
4
4
  "keywords": [
5
5
  "dotCMS",
6
6
  "CMS",
package/src/internal.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './lib/events/internal';
3
3
  export * from './lib/editor/internal';
4
4
  export * from './lib/ai/internal';
5
5
  export * from './lib/client/internal';
6
+ export * from './lib/style-editor/internal';
@@ -1,4 +1,5 @@
1
1
  import { DotHttpError } from '../client/public';
2
+ import { StyleEditorFormSchema } from '../style-editor/internal';
2
3
  /**
3
4
  * Represents a map of style property keys and their corresponding values
4
5
  * for use in the style editor.
@@ -1162,6 +1163,7 @@ export interface DotCMSPageResponse {
1162
1163
  query: string;
1163
1164
  variables: Record<string, unknown>;
1164
1165
  };
1166
+ styleEditorSchemas?: StyleEditorFormSchema[];
1165
1167
  }
1166
1168
  export type DotCMSExtendedPageResponse = Partial<Pick<DotCMSPageResponse, 'pageAsset' | 'content'>>;
1167
1169
  export type DotCMSComposedPageAsset<T extends DotCMSExtendedPageResponse> = T['pageAsset'] extends DotCMSPageResponse['pageAsset'] ? DotCMSPageResponse['pageAsset'] & T['pageAsset'] : DotCMSPageResponse['pageAsset'];
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Available field types for the style editor.
3
+ */
4
+ export type StyleEditorFieldType = 'input' | 'dropdown' | 'radio' | 'checkboxGroup';
5
+ /**
6
+ * Available input types for input fields in the style editor.
7
+ */
8
+ export type StyleEditorFieldInputType = 'text' | 'number';
9
+ /**
10
+ * Base option object with label and value properties.
11
+ */
12
+ export interface StyleEditorOptionObject {
13
+ label: string;
14
+ value: string;
15
+ }
16
+ /**
17
+ * Extended option object for radio fields with optional image support.
18
+ */
19
+ export interface StyleEditorRadioOptionObject extends StyleEditorOptionObject {
20
+ imageURL?: string;
21
+ }
22
+ /**
23
+ * Option type for dropdown fields.
24
+ */
25
+ export type StyleEditorOption = StyleEditorOptionObject;
26
+ /**
27
+ * Option type for radio fields (supports optional image).
28
+ */
29
+ export type StyleEditorRadioOption = StyleEditorRadioOptionObject;
30
+ /**
31
+ * Checkbox option with a key identifier instead of value.
32
+ */
33
+ export interface StyleEditorCheckboxOption {
34
+ label: string;
35
+ key: string;
36
+ }
37
+ /**
38
+ * Configuration object for normalized field schemas sent to UVE.
39
+ */
40
+ export interface StyleEditorFieldSchemaConfig {
41
+ inputType?: StyleEditorFieldInputType;
42
+ placeholder?: string;
43
+ options?: StyleEditorRadioOptionObject[];
44
+ columns?: 1 | 2;
45
+ }
46
+ /**
47
+ * Normalized field schema sent to UVE.
48
+ */
49
+ export interface StyleEditorFieldSchema {
50
+ id: string;
51
+ type: StyleEditorFieldType;
52
+ label: string;
53
+ config: StyleEditorFieldSchemaConfig;
54
+ }
55
+ /**
56
+ * Normalized section schema sent to UVE.
57
+ */
58
+ export interface StyleEditorSectionSchema {
59
+ title: string;
60
+ fields: StyleEditorFieldSchema[];
61
+ }
62
+ /**
63
+ * Complete normalized form schema sent to UVE.
64
+ * This is the output format after processing a style editor form definition.
65
+ */
66
+ export interface StyleEditorFormSchema {
67
+ contentType: string;
68
+ sections: StyleEditorSectionSchema[];
69
+ }