@wix/react-component-schema 1.2.0 → 1.3.0
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/dist/index.d.ts +6 -4
- package/package.json +2 -2
- package/src/__snapshots__/index.test.ts.snap +6 -4
- package/src/index.ts +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -1517,7 +1517,7 @@ declare enum DisplayValueEnumDisplayValue {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
|
|
1519
1519
|
export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
|
|
1520
|
-
presets: Record<string, PresetItem
|
|
1520
|
+
presets: Record<string, PresetItem>;
|
|
1521
1521
|
};
|
|
1522
1522
|
|
|
1523
1523
|
declare interface EditorElement_2 {
|
|
@@ -1541,7 +1541,7 @@ declare interface EditorElement_2 {
|
|
|
1541
1541
|
/** Custom actions specified for the component, allowing for flexibility beyond native actions */
|
|
1542
1542
|
customActions?: Record<string, ApiAction>;
|
|
1543
1543
|
/** Component presets definition. Canonically useful for different layout or theming */
|
|
1544
|
-
presets?: Record<string,
|
|
1544
|
+
presets?: Record<string, PresetItem_2>;
|
|
1545
1545
|
/** Layout capabilities of the component */
|
|
1546
1546
|
layout?: EditorElementLayout;
|
|
1547
1547
|
/** The Archetype this component adheres to, to be used for classification by AI models */
|
|
@@ -2102,7 +2102,7 @@ export declare interface InlineElement {
|
|
|
2102
2102
|
/** Custom actions specified for the component, allowing for flexibility beyond native actions */
|
|
2103
2103
|
customActions?: Record<string, ApiAction>;
|
|
2104
2104
|
/** Component presets definition. Canonically useful for different layout or theming */
|
|
2105
|
-
presets?: Record<string,
|
|
2105
|
+
presets?: Record<string, PresetItem_2>;
|
|
2106
2106
|
/** The Archetype this component adheres to, to be used for classification by AI models */
|
|
2107
2107
|
archetype?: ARCHETYPE;
|
|
2108
2108
|
/** A map with definitions of states that this element can be edited in */
|
|
@@ -2410,7 +2410,9 @@ declare interface PresetInnerElementDefaults {
|
|
|
2410
2410
|
elements?: Record<string, PresetInnerElementDefaults>;
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
2413
|
-
export declare
|
|
2413
|
+
export declare type PresetItem = PresetItem_2 & RequiredFields<PresetItem_2, 'displayName'>;
|
|
2414
|
+
|
|
2415
|
+
declare interface PresetItem_2 {
|
|
2414
2416
|
/**
|
|
2415
2417
|
* DEPRECATED - use preset_css_url instead
|
|
2416
2418
|
* @format WEB_URL
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"registry": "https://registry.npmjs.org/",
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.3.0",
|
|
8
8
|
"description": "Schema constants and types for EditorReactComponent extension",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.js",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "3479c3715d9982e330afa6498c29b4e8a838b947dfe262bfd8df67da"
|
|
52
52
|
}
|
|
@@ -1520,7 +1520,7 @@ declare enum DisplayValueEnumDisplayValue {
|
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
1522
|
export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
|
|
1523
|
-
presets: Record<string, PresetItem
|
|
1523
|
+
presets: Record<string, PresetItem>;
|
|
1524
1524
|
};
|
|
1525
1525
|
|
|
1526
1526
|
declare interface EditorElement_2 {
|
|
@@ -1544,7 +1544,7 @@ declare interface EditorElement_2 {
|
|
|
1544
1544
|
/** Custom actions specified for the component, allowing for flexibility beyond native actions */
|
|
1545
1545
|
customActions?: Record<string, ApiAction>;
|
|
1546
1546
|
/** Component presets definition. Canonically useful for different layout or theming */
|
|
1547
|
-
presets?: Record<string,
|
|
1547
|
+
presets?: Record<string, PresetItem_2>;
|
|
1548
1548
|
/** Layout capabilities of the component */
|
|
1549
1549
|
layout?: EditorElementLayout;
|
|
1550
1550
|
/** The Archetype this component adheres to, to be used for classification by AI models */
|
|
@@ -2105,7 +2105,7 @@ export declare interface InlineElement {
|
|
|
2105
2105
|
/** Custom actions specified for the component, allowing for flexibility beyond native actions */
|
|
2106
2106
|
customActions?: Record<string, ApiAction>;
|
|
2107
2107
|
/** Component presets definition. Canonically useful for different layout or theming */
|
|
2108
|
-
presets?: Record<string,
|
|
2108
|
+
presets?: Record<string, PresetItem_2>;
|
|
2109
2109
|
/** The Archetype this component adheres to, to be used for classification by AI models */
|
|
2110
2110
|
archetype?: ARCHETYPE;
|
|
2111
2111
|
/** A map with definitions of states that this element can be edited in */
|
|
@@ -2413,7 +2413,9 @@ declare interface PresetInnerElementDefaults {
|
|
|
2413
2413
|
elements?: Record<string, PresetInnerElementDefaults>;
|
|
2414
2414
|
}
|
|
2415
2415
|
|
|
2416
|
-
export declare
|
|
2416
|
+
export declare type PresetItem = PresetItem_2 & RequiredFields<PresetItem_2, 'displayName'>;
|
|
2417
|
+
|
|
2418
|
+
declare interface PresetItem_2 {
|
|
2417
2419
|
/**
|
|
2418
2420
|
* DEPRECATED - use preset_css_url instead
|
|
2419
2421
|
* @format WEB_URL
|
package/src/index.ts
CHANGED
|
@@ -28,7 +28,6 @@ export type {
|
|
|
28
28
|
DataItem,
|
|
29
29
|
DataItemsMap,
|
|
30
30
|
Presets,
|
|
31
|
-
PresetItem,
|
|
32
31
|
Elements,
|
|
33
32
|
ElementsDefaults,
|
|
34
33
|
ElementItem,
|
|
@@ -83,12 +82,15 @@ export type {
|
|
|
83
82
|
ListItem,
|
|
84
83
|
} from '@wix/component-protocol/schema'
|
|
85
84
|
|
|
86
|
-
import type {
|
|
85
|
+
import type { EditorElement as RawEditorElement, PresetItem as RawPresetItem } from '@wix/component-protocol/schema'
|
|
87
86
|
|
|
88
87
|
type RequiredFields<T, K extends keyof T> = Required<Pick<T, K>>
|
|
89
88
|
|
|
89
|
+
// make displayName required to be consistant with headless-integration repo
|
|
90
|
+
export type PresetItem = RawPresetItem & RequiredFields<RawPresetItem, 'displayName'>
|
|
91
|
+
|
|
90
92
|
// make selector and displayName required to be consistant with headless-integration repo
|
|
91
93
|
export type EditorElement = RawEditorElement &
|
|
92
94
|
RequiredFields<RawEditorElement, 'selector' | 'displayName'> & {
|
|
93
|
-
presets: Record<string, PresetItem
|
|
95
|
+
presets: Record<string, PresetItem>
|
|
94
96
|
}
|