@wix/react-component-schema 1.0.0 → 1.2.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 +15 -239
- package/package.json +3 -3
- package/src/__snapshots__/index.test.ts.snap +15 -239
- package/src/index.ts +10 -2
package/dist/index.d.ts
CHANGED
|
@@ -259,35 +259,6 @@ declare interface BreakpointPresetStyleOverrides {
|
|
|
259
259
|
small?: PresetStyleOverrides;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
declare interface ClientResources {
|
|
263
|
-
/**
|
|
264
|
-
* A URL to an ESM javascript bundle. It's default export should be the component
|
|
265
|
-
* @format WEB_URL
|
|
266
|
-
*/
|
|
267
|
-
componentUrl?: string;
|
|
268
|
-
/**
|
|
269
|
-
* A URL to the CSS file that is the default layout and style for the component
|
|
270
|
-
* @format WEB_URL
|
|
271
|
-
*/
|
|
272
|
-
cssUrl?: string | null;
|
|
273
|
-
/**
|
|
274
|
-
* A list of service dependencies required by the component, example: ['@wix/environment']
|
|
275
|
-
* @maxLength 80
|
|
276
|
-
* @maxSize 20
|
|
277
|
-
* @deprecated A list of service dependencies required by the component, example: ['@wix/environment']
|
|
278
|
-
* @replacedBy dependencies
|
|
279
|
-
* @targetRemovalDate 2025-12-30
|
|
280
|
-
*/
|
|
281
|
-
serviceDependencies?: string[];
|
|
282
|
-
/**
|
|
283
|
-
* A module specifier for the component’s react code.
|
|
284
|
-
* @maxLength 100
|
|
285
|
-
*/
|
|
286
|
-
moduleSpecifier?: string | null;
|
|
287
|
-
/** Dependencies on services and contexts */
|
|
288
|
-
dependencies?: EditorDependencies;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
262
|
/** Represents the information needed for code panels */
|
|
292
263
|
declare interface CodePanel {
|
|
293
264
|
/**
|
|
@@ -474,7 +445,7 @@ export declare const CSS_PROPERTIES: {
|
|
|
474
445
|
IMAGE_TYPE: typeof ImageType;
|
|
475
446
|
};
|
|
476
447
|
|
|
477
|
-
export declare type CssCustomProperties = NonNullable<
|
|
448
|
+
export declare type CssCustomProperties = NonNullable<EditorElement_2['cssCustomProperties']>;
|
|
478
449
|
|
|
479
450
|
/**
|
|
480
451
|
* Represents an action that points into a single css-custom-property,
|
|
@@ -613,7 +584,7 @@ export declare interface CssNumber {
|
|
|
613
584
|
multiplier?: string | null;
|
|
614
585
|
}
|
|
615
586
|
|
|
616
|
-
export declare type CssProperties = NonNullable<
|
|
587
|
+
export declare type CssProperties = NonNullable<EditorElement_2['cssProperties']>;
|
|
617
588
|
|
|
618
589
|
export declare type CssPropertiesOverrides = NonNullable<RefElement['cssCustomProperties']>;
|
|
619
590
|
|
|
@@ -966,7 +937,7 @@ declare enum CssPropertyType {
|
|
|
966
937
|
strokeOpacity = "strokeOpacity"
|
|
967
938
|
}
|
|
968
939
|
|
|
969
|
-
export declare type CustomActions = NonNullable<
|
|
940
|
+
export declare type CustomActions = NonNullable<EditorElement_2['customActions']>;
|
|
970
941
|
|
|
971
942
|
/** DEPRECATED: This message is deprecated and will be removed in the future */
|
|
972
943
|
declare interface CustomEnum {
|
|
@@ -1080,7 +1051,7 @@ export declare const DATA: {
|
|
|
1080
1051
|
LINK_TYPE: typeof LinkType;
|
|
1081
1052
|
};
|
|
1082
1053
|
|
|
1083
|
-
export declare type Data = NonNullable<
|
|
1054
|
+
export declare type Data = NonNullable<EditorElement_2['data']>;
|
|
1084
1055
|
|
|
1085
1056
|
/**
|
|
1086
1057
|
* Represents an action that points into a specific data-item-key,
|
|
@@ -1327,30 +1298,6 @@ declare enum DataType {
|
|
|
1327
1298
|
onSubmit = "onSubmit"
|
|
1328
1299
|
}
|
|
1329
1300
|
|
|
1330
|
-
declare interface DefaultPresets {
|
|
1331
|
-
/**
|
|
1332
|
-
* Default preset ID in small (mobile) breakpoint
|
|
1333
|
-
* @minLength 1
|
|
1334
|
-
* @maxLength 50
|
|
1335
|
-
*/
|
|
1336
|
-
small?: string | null;
|
|
1337
|
-
/**
|
|
1338
|
-
* Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1339
|
-
* @minLength 1
|
|
1340
|
-
* @maxLength 50
|
|
1341
|
-
* @deprecated Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1342
|
-
* @replacedBy default
|
|
1343
|
-
* @targetRemovalDate 2025-12-02
|
|
1344
|
-
*/
|
|
1345
|
-
large?: string | null;
|
|
1346
|
-
/**
|
|
1347
|
-
* Default preset ID
|
|
1348
|
-
* @minLength 1
|
|
1349
|
-
* @maxLength 50
|
|
1350
|
-
*/
|
|
1351
|
-
default?: string | null;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
1301
|
export declare interface Display {
|
|
1355
1302
|
/**
|
|
1356
1303
|
* list of display values in case we want to reduce the abilities exposed to the User
|
|
@@ -1384,7 +1331,7 @@ export declare interface DisplayFilter {
|
|
|
1384
1331
|
show?: string[];
|
|
1385
1332
|
}
|
|
1386
1333
|
|
|
1387
|
-
export declare type DisplayFilters = NonNullable<
|
|
1334
|
+
export declare type DisplayFilters = NonNullable<EditorElement_2['displayFilters']>;
|
|
1388
1335
|
|
|
1389
1336
|
/**
|
|
1390
1337
|
* DisplayFilters is a collection of display filters that can be used to hide or show elements in the editor.
|
|
@@ -1539,7 +1486,7 @@ declare interface DisplayGroupItemSelectedGroupTypeOneOf {
|
|
|
1539
1486
|
listItem?: ListItem;
|
|
1540
1487
|
}
|
|
1541
1488
|
|
|
1542
|
-
export declare type DisplayGroups = NonNullable<
|
|
1489
|
+
export declare type DisplayGroups = NonNullable<EditorElement_2['displayGroups']>;
|
|
1543
1490
|
|
|
1544
1491
|
declare enum DisplayValueEnumDisplayValue {
|
|
1545
1492
|
UNKNOWN_DisplayValue = "UNKNOWN_DisplayValue",
|
|
@@ -1569,28 +1516,11 @@ declare enum DisplayValueEnumDisplayValue {
|
|
|
1569
1516
|
listItem = "listItem"
|
|
1570
1517
|
}
|
|
1571
1518
|
|
|
1572
|
-
declare
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
* @maxLength 80
|
|
1576
|
-
* @maxSize 20
|
|
1577
|
-
*/
|
|
1578
|
-
serviceDependencies?: string[];
|
|
1579
|
-
/**
|
|
1580
|
-
* Dependencies on context providers in order to work
|
|
1581
|
-
* @maxLength 80
|
|
1582
|
-
* @maxSize 20
|
|
1583
|
-
*/
|
|
1584
|
-
contextDependencies?: string[];
|
|
1585
|
-
/**
|
|
1586
|
-
* Dependencies on components that we want as externals in our bundle, example: wixEditorElements.AppWidget
|
|
1587
|
-
* @maxLength 80
|
|
1588
|
-
* @maxSize 20
|
|
1589
|
-
*/
|
|
1590
|
-
componentDependencies?: string[];
|
|
1591
|
-
}
|
|
1519
|
+
export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
|
|
1520
|
+
presets: Record<string, PresetItem & RequiredFields<PresetItem, 'displayName'>>;
|
|
1521
|
+
};
|
|
1592
1522
|
|
|
1593
|
-
|
|
1523
|
+
declare interface EditorElement_2 {
|
|
1594
1524
|
/**
|
|
1595
1525
|
* DOM Query selector for this element that we can use to find it when rendering it (preferably a className)
|
|
1596
1526
|
* @minLength 4
|
|
@@ -1676,41 +1606,6 @@ declare interface EditorFunction {
|
|
|
1676
1606
|
/* Excluded from this release type: deprecated */
|
|
1677
1607
|
}
|
|
1678
1608
|
|
|
1679
|
-
/** The full model for an imported component set in DEV Center */
|
|
1680
|
-
export declare interface EditorReactComponent {
|
|
1681
|
-
/**
|
|
1682
|
-
* The type of component to present in the Page tree, will be prefixed with AppSlug
|
|
1683
|
-
* @maxLength 100
|
|
1684
|
-
* @minLength 1
|
|
1685
|
-
*/
|
|
1686
|
-
type?: string;
|
|
1687
|
-
/**
|
|
1688
|
-
* The public description of the component do display
|
|
1689
|
-
* @maxLength 300
|
|
1690
|
-
* @minLength 3
|
|
1691
|
-
*/
|
|
1692
|
-
description?: string;
|
|
1693
|
-
/** List of component resources. This comprises any runtime code we need to load and execute for the component. */
|
|
1694
|
-
resources?: Resources;
|
|
1695
|
-
/** The configuration describing the component abilities and behaviors on the Editor stage */
|
|
1696
|
-
editorElement?: EditorElement;
|
|
1697
|
-
/** The installation settings of the component */
|
|
1698
|
-
installation?: InstallationInfo;
|
|
1699
|
-
/** Module configuration for NPM-based component */
|
|
1700
|
-
moduleConfiguration?: EditorReactComponentModuleConfiguration;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
declare interface EditorReactComponentModuleConfiguration {
|
|
1704
|
-
/** Public NPM package details */
|
|
1705
|
-
package?: NPMPackage;
|
|
1706
|
-
/** The component export details */
|
|
1707
|
-
component?: NPMPackageEntry;
|
|
1708
|
-
/** The component CSS File location */
|
|
1709
|
-
cssFile?: NPMPackageEntry;
|
|
1710
|
-
/** The component SSR version export details */
|
|
1711
|
-
server?: NPMPackageEntry;
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
1609
|
declare enum EffectGroup {
|
|
1715
1610
|
UNKNOWN_EFFECT_GROUP = "UNKNOWN_EFFECT_GROUP",
|
|
1716
1611
|
/** Effects that are applied to the background layer of the component */
|
|
@@ -1739,7 +1634,7 @@ export declare const ELEMENTS: {
|
|
|
1739
1634
|
ELEMENT_TYPE: typeof ElementTypeEnumElementType;
|
|
1740
1635
|
};
|
|
1741
1636
|
|
|
1742
|
-
export declare type Elements = NonNullable<
|
|
1637
|
+
export declare type Elements = NonNullable<EditorElement_2['elements']>;
|
|
1743
1638
|
|
|
1744
1639
|
export declare type ElementsDefaults = NonNullable<RefElement['elements']>;
|
|
1745
1640
|
|
|
@@ -1901,14 +1796,6 @@ declare enum FilterFunction {
|
|
|
1901
1796
|
hueRotate = "hueRotate"
|
|
1902
1797
|
}
|
|
1903
1798
|
|
|
1904
|
-
/** Fixed position builder for component installation */
|
|
1905
|
-
declare interface FixedPositionBuilder {
|
|
1906
|
-
/** Vertical position in the browser window */
|
|
1907
|
-
vertical?: Vertical;
|
|
1908
|
-
/** Horizontal position in the browser window */
|
|
1909
|
-
horizontal?: Horizontal;
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
1799
|
export declare interface Font {
|
|
1913
1800
|
/**
|
|
1914
1801
|
* Stores the font-style property of the font shorthand
|
|
@@ -2141,13 +2028,6 @@ declare interface HelpArticleArticleTypeOneOf {
|
|
|
2141
2028
|
url?: string | null;
|
|
2142
2029
|
}
|
|
2143
2030
|
|
|
2144
|
-
declare enum Horizontal {
|
|
2145
|
-
NONE = "NONE",
|
|
2146
|
-
LEFT = "LEFT",
|
|
2147
|
-
CENTER = "CENTER",
|
|
2148
|
-
RIGHT = "RIGHT"
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
2031
|
export declare interface Image {
|
|
2152
2032
|
/** media manager categories to open media manager filtered by the component needs */
|
|
2153
2033
|
category?: ImageCategoryTypes;
|
|
@@ -2244,23 +2124,6 @@ export declare interface InlineElement {
|
|
|
2244
2124
|
helpArticle?: HelpArticle;
|
|
2245
2125
|
}
|
|
2246
2126
|
|
|
2247
|
-
declare interface InstallationInfo extends InstallationInfoTargetContainerOneOf {
|
|
2248
|
-
/** Which static container should the component be installed at */
|
|
2249
|
-
staticContainer?: StaticContainer;
|
|
2250
|
-
/** Default presets per breakpoint with which the component should be installed */
|
|
2251
|
-
presets?: DefaultPresets;
|
|
2252
|
-
/** Initial size with which the component should be added to the stage */
|
|
2253
|
-
initialSize?: ComponentInitialSize;
|
|
2254
|
-
/** Fixed position options for the component. If set, the component will be pinned to the specified position, and can't be unpinned */
|
|
2255
|
-
fixedPosition?: FixedPositionBuilder;
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
/** @oneof */
|
|
2259
|
-
declare interface InstallationInfoTargetContainerOneOf {
|
|
2260
|
-
/** Which static container should the component be installed at */
|
|
2261
|
-
staticContainer?: StaticContainer;
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
2127
|
export declare const INTERACTIONS: {
|
|
2265
2128
|
TRIGGER_TYPE: typeof InteractionsTrigger;
|
|
2266
2129
|
EFFECT_GROUP: typeof EffectGroup;
|
|
@@ -2407,34 +2270,6 @@ export declare enum NATIVE_STATE_TYPE {
|
|
|
2407
2270
|
invalid = "invalid"
|
|
2408
2271
|
}
|
|
2409
2272
|
|
|
2410
|
-
declare interface NPMPackage {
|
|
2411
|
-
/**
|
|
2412
|
-
* The npm package name
|
|
2413
|
-
* @minLength 1
|
|
2414
|
-
* @maxLength 214
|
|
2415
|
-
*/
|
|
2416
|
-
name?: string;
|
|
2417
|
-
/**
|
|
2418
|
-
* the SEMVER package version
|
|
2419
|
-
* @minLength 1
|
|
2420
|
-
* @maxLength 214
|
|
2421
|
-
*/
|
|
2422
|
-
version?: string;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
declare interface NPMPackageEntry {
|
|
2426
|
-
/**
|
|
2427
|
-
* optional path to file in package
|
|
2428
|
-
* @maxLength 200
|
|
2429
|
-
*/
|
|
2430
|
-
path?: string | null;
|
|
2431
|
-
/**
|
|
2432
|
-
* The named export key to import. If empty, the default export is used.
|
|
2433
|
-
* @maxLength 200
|
|
2434
|
-
*/
|
|
2435
|
-
exportKey?: string | null;
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
2273
|
export declare enum OverrideType {
|
|
2439
2274
|
UNKNOWN = "UNKNOWN",
|
|
2440
2275
|
DEV = "DEV",
|
|
@@ -2641,7 +2476,7 @@ export declare interface PresetItem {
|
|
|
2641
2476
|
presetDefaults?: PresetElementDefaults;
|
|
2642
2477
|
}
|
|
2643
2478
|
|
|
2644
|
-
export declare type Presets = NonNullable<
|
|
2479
|
+
export declare type Presets = NonNullable<EditorElement_2['presets']>;
|
|
2645
2480
|
|
|
2646
2481
|
/** DEPRECATED: This message is deprecated and will be removed in the future */
|
|
2647
2482
|
declare interface PresetStyleDefaults {
|
|
@@ -2767,6 +2602,8 @@ declare interface RefInnerElementDefaults {
|
|
|
2767
2602
|
cssCustomProperties?: Record<string, CssPropertyItemDefaults>;
|
|
2768
2603
|
}
|
|
2769
2604
|
|
|
2605
|
+
declare type RequiredFields<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
2606
|
+
|
|
2770
2607
|
declare enum ResizeDirection {
|
|
2771
2608
|
/** Default value when direction is not specified */
|
|
2772
2609
|
UNKNOWN_ResizeDirection = "UNKNOWN_ResizeDirection",
|
|
@@ -2782,38 +2619,6 @@ declare enum ResizeDirection {
|
|
|
2782
2619
|
none = "none"
|
|
2783
2620
|
}
|
|
2784
2621
|
|
|
2785
|
-
declare interface Resource {
|
|
2786
|
-
/**
|
|
2787
|
-
* A URL to an ESM javascript bundle
|
|
2788
|
-
* @format WEB_URL
|
|
2789
|
-
*/
|
|
2790
|
-
url?: string;
|
|
2791
|
-
}
|
|
2792
|
-
|
|
2793
|
-
declare interface Resources {
|
|
2794
|
-
/** The bundle we will load and render in the browser in the site */
|
|
2795
|
-
client?: ClientResources;
|
|
2796
|
-
/**
|
|
2797
|
-
* An optional client definition of the component we will load and render in the editor, *it replaces the client bundle.*
|
|
2798
|
-
* The main use case is to control the live site component and enable different experiences in the editor.
|
|
2799
|
-
* For example, supporting `states` manipulation:
|
|
2800
|
-
* Show calendar in the editor
|
|
2801
|
-
* Open drop down in the editor
|
|
2802
|
-
*/
|
|
2803
|
-
editor?: ClientResources;
|
|
2804
|
-
/** The bundle for SSR, should not include any DOM API references */
|
|
2805
|
-
server?: Resource;
|
|
2806
|
-
/** The optional component SDK to expose to Velo Users to interact with the component */
|
|
2807
|
-
sdk?: Resource;
|
|
2808
|
-
/** Details for how to load translations for the component */
|
|
2809
|
-
translations?: TranslationResources;
|
|
2810
|
-
/** The optional interactions configuration JSON file */
|
|
2811
|
-
interactions?: Resource;
|
|
2812
|
-
/* Excluded from this release type: viewerReducedModel */
|
|
2813
|
-
/* Excluded from this release type: schemaRefsUrl */
|
|
2814
|
-
/* Excluded from this release type: viewerRuntimeCss */
|
|
2815
|
-
}
|
|
2816
|
-
|
|
2817
2622
|
/** rich text data type allow manipulation of text with html & inline styles */
|
|
2818
2623
|
declare interface RichText {
|
|
2819
2624
|
/**
|
|
@@ -2949,15 +2754,7 @@ declare enum SizingType {
|
|
|
2949
2754
|
pixels = "pixels"
|
|
2950
2755
|
}
|
|
2951
2756
|
|
|
2952
|
-
export declare type States = NonNullable<
|
|
2953
|
-
|
|
2954
|
-
declare enum StaticContainer {
|
|
2955
|
-
UNKNOWN_CONTAINER = "UNKNOWN_CONTAINER",
|
|
2956
|
-
/** Widget should be installed in the homepage */
|
|
2957
|
-
HOMEPAGE = "HOMEPAGE",
|
|
2958
|
-
/** Show widget on all pages */
|
|
2959
|
-
GLOBAL_PAGE = "GLOBAL_PAGE"
|
|
2960
|
-
}
|
|
2757
|
+
export declare type States = NonNullable<EditorElement_2['states']>;
|
|
2961
2758
|
|
|
2962
2759
|
/** DEPRECATED - use CssPropertyAction or CssCustomPropertyAction */
|
|
2963
2760
|
declare interface StyleAction {
|
|
@@ -3386,20 +3183,6 @@ export declare interface TextGroup {
|
|
|
3386
3183
|
a11y?: string | null;
|
|
3387
3184
|
}
|
|
3388
3185
|
|
|
3389
|
-
declare interface TranslationResources {
|
|
3390
|
-
/**
|
|
3391
|
-
* The URL that we will add the language to for fetching translations, example: `https://somecdn.com/translations/`
|
|
3392
|
-
* @format WEB_URL
|
|
3393
|
-
*/
|
|
3394
|
-
basePath?: string;
|
|
3395
|
-
/**
|
|
3396
|
-
* The list of supported languages according to the [ISO-639-1 specification](https://en.wikipedia.org/wiki/ISO_639-1)
|
|
3397
|
-
* @format LANGUAGE
|
|
3398
|
-
* @maxSize 37
|
|
3399
|
-
*/
|
|
3400
|
-
languages?: string[];
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
3186
|
export declare interface VectorArt {
|
|
3404
3187
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3405
3188
|
category?: VectorArtCategoryTypes;
|
|
@@ -3433,13 +3216,6 @@ declare interface VectorArtOverrides {
|
|
|
3433
3216
|
category?: VectorArtCategoryTypes;
|
|
3434
3217
|
}
|
|
3435
3218
|
|
|
3436
|
-
declare enum Vertical {
|
|
3437
|
-
NONE = "NONE",
|
|
3438
|
-
TOP = "TOP",
|
|
3439
|
-
CENTER = "CENTER",
|
|
3440
|
-
BOTTOM = "BOTTOM"
|
|
3441
|
-
}
|
|
3442
|
-
|
|
3443
3219
|
export declare interface Video {
|
|
3444
3220
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3445
3221
|
category?: VideoCategoryTypes;
|
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.2.0",
|
|
8
8
|
"description": "Schema constants and types for EditorReactComponent extension",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/node": "^20.0.0",
|
|
29
29
|
"@wix/ambassador-devcenter-components-overrides-v1-components-override": "^1.0.408",
|
|
30
30
|
"@wix/component-protocol": "1.223.0",
|
|
31
|
-
"vite": "^7.3.
|
|
31
|
+
"vite": "^7.3.2",
|
|
32
32
|
"vite-plugin-dts": "^4.5.4",
|
|
33
33
|
"vitest": "^4.0.17"
|
|
34
34
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "a02cedbcd193d7307a0fe5f9e71bf46bcad0d7f8520a23bffe6b321b"
|
|
52
52
|
}
|
|
@@ -262,35 +262,6 @@ declare interface BreakpointPresetStyleOverrides {
|
|
|
262
262
|
small?: PresetStyleOverrides;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
declare interface ClientResources {
|
|
266
|
-
/**
|
|
267
|
-
* A URL to an ESM javascript bundle. It's default export should be the component
|
|
268
|
-
* @format WEB_URL
|
|
269
|
-
*/
|
|
270
|
-
componentUrl?: string;
|
|
271
|
-
/**
|
|
272
|
-
* A URL to the CSS file that is the default layout and style for the component
|
|
273
|
-
* @format WEB_URL
|
|
274
|
-
*/
|
|
275
|
-
cssUrl?: string | null;
|
|
276
|
-
/**
|
|
277
|
-
* A list of service dependencies required by the component, example: ['@wix/environment']
|
|
278
|
-
* @maxLength 80
|
|
279
|
-
* @maxSize 20
|
|
280
|
-
* @deprecated A list of service dependencies required by the component, example: ['@wix/environment']
|
|
281
|
-
* @replacedBy dependencies
|
|
282
|
-
* @targetRemovalDate 2025-12-30
|
|
283
|
-
*/
|
|
284
|
-
serviceDependencies?: string[];
|
|
285
|
-
/**
|
|
286
|
-
* A module specifier for the component’s react code.
|
|
287
|
-
* @maxLength 100
|
|
288
|
-
*/
|
|
289
|
-
moduleSpecifier?: string | null;
|
|
290
|
-
/** Dependencies on services and contexts */
|
|
291
|
-
dependencies?: EditorDependencies;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
265
|
/** Represents the information needed for code panels */
|
|
295
266
|
declare interface CodePanel {
|
|
296
267
|
/**
|
|
@@ -477,7 +448,7 @@ export declare const CSS_PROPERTIES: {
|
|
|
477
448
|
IMAGE_TYPE: typeof ImageType;
|
|
478
449
|
};
|
|
479
450
|
|
|
480
|
-
export declare type CssCustomProperties = NonNullable<
|
|
451
|
+
export declare type CssCustomProperties = NonNullable<EditorElement_2['cssCustomProperties']>;
|
|
481
452
|
|
|
482
453
|
/**
|
|
483
454
|
* Represents an action that points into a single css-custom-property,
|
|
@@ -616,7 +587,7 @@ export declare interface CssNumber {
|
|
|
616
587
|
multiplier?: string | null;
|
|
617
588
|
}
|
|
618
589
|
|
|
619
|
-
export declare type CssProperties = NonNullable<
|
|
590
|
+
export declare type CssProperties = NonNullable<EditorElement_2['cssProperties']>;
|
|
620
591
|
|
|
621
592
|
export declare type CssPropertiesOverrides = NonNullable<RefElement['cssCustomProperties']>;
|
|
622
593
|
|
|
@@ -969,7 +940,7 @@ declare enum CssPropertyType {
|
|
|
969
940
|
strokeOpacity = "strokeOpacity"
|
|
970
941
|
}
|
|
971
942
|
|
|
972
|
-
export declare type CustomActions = NonNullable<
|
|
943
|
+
export declare type CustomActions = NonNullable<EditorElement_2['customActions']>;
|
|
973
944
|
|
|
974
945
|
/** DEPRECATED: This message is deprecated and will be removed in the future */
|
|
975
946
|
declare interface CustomEnum {
|
|
@@ -1083,7 +1054,7 @@ export declare const DATA: {
|
|
|
1083
1054
|
LINK_TYPE: typeof LinkType;
|
|
1084
1055
|
};
|
|
1085
1056
|
|
|
1086
|
-
export declare type Data = NonNullable<
|
|
1057
|
+
export declare type Data = NonNullable<EditorElement_2['data']>;
|
|
1087
1058
|
|
|
1088
1059
|
/**
|
|
1089
1060
|
* Represents an action that points into a specific data-item-key,
|
|
@@ -1330,30 +1301,6 @@ declare enum DataType {
|
|
|
1330
1301
|
onSubmit = "onSubmit"
|
|
1331
1302
|
}
|
|
1332
1303
|
|
|
1333
|
-
declare interface DefaultPresets {
|
|
1334
|
-
/**
|
|
1335
|
-
* Default preset ID in small (mobile) breakpoint
|
|
1336
|
-
* @minLength 1
|
|
1337
|
-
* @maxLength 50
|
|
1338
|
-
*/
|
|
1339
|
-
small?: string | null;
|
|
1340
|
-
/**
|
|
1341
|
-
* Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1342
|
-
* @minLength 1
|
|
1343
|
-
* @maxLength 50
|
|
1344
|
-
* @deprecated Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1345
|
-
* @replacedBy default
|
|
1346
|
-
* @targetRemovalDate 2025-12-02
|
|
1347
|
-
*/
|
|
1348
|
-
large?: string | null;
|
|
1349
|
-
/**
|
|
1350
|
-
* Default preset ID
|
|
1351
|
-
* @minLength 1
|
|
1352
|
-
* @maxLength 50
|
|
1353
|
-
*/
|
|
1354
|
-
default?: string | null;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
1304
|
export declare interface Display {
|
|
1358
1305
|
/**
|
|
1359
1306
|
* list of display values in case we want to reduce the abilities exposed to the User
|
|
@@ -1387,7 +1334,7 @@ export declare interface DisplayFilter {
|
|
|
1387
1334
|
show?: string[];
|
|
1388
1335
|
}
|
|
1389
1336
|
|
|
1390
|
-
export declare type DisplayFilters = NonNullable<
|
|
1337
|
+
export declare type DisplayFilters = NonNullable<EditorElement_2['displayFilters']>;
|
|
1391
1338
|
|
|
1392
1339
|
/**
|
|
1393
1340
|
* DisplayFilters is a collection of display filters that can be used to hide or show elements in the editor.
|
|
@@ -1542,7 +1489,7 @@ declare interface DisplayGroupItemSelectedGroupTypeOneOf {
|
|
|
1542
1489
|
listItem?: ListItem;
|
|
1543
1490
|
}
|
|
1544
1491
|
|
|
1545
|
-
export declare type DisplayGroups = NonNullable<
|
|
1492
|
+
export declare type DisplayGroups = NonNullable<EditorElement_2['displayGroups']>;
|
|
1546
1493
|
|
|
1547
1494
|
declare enum DisplayValueEnumDisplayValue {
|
|
1548
1495
|
UNKNOWN_DisplayValue = "UNKNOWN_DisplayValue",
|
|
@@ -1572,28 +1519,11 @@ declare enum DisplayValueEnumDisplayValue {
|
|
|
1572
1519
|
listItem = "listItem"
|
|
1573
1520
|
}
|
|
1574
1521
|
|
|
1575
|
-
declare
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
* @maxLength 80
|
|
1579
|
-
* @maxSize 20
|
|
1580
|
-
*/
|
|
1581
|
-
serviceDependencies?: string[];
|
|
1582
|
-
/**
|
|
1583
|
-
* Dependencies on context providers in order to work
|
|
1584
|
-
* @maxLength 80
|
|
1585
|
-
* @maxSize 20
|
|
1586
|
-
*/
|
|
1587
|
-
contextDependencies?: string[];
|
|
1588
|
-
/**
|
|
1589
|
-
* Dependencies on components that we want as externals in our bundle, example: wixEditorElements.AppWidget
|
|
1590
|
-
* @maxLength 80
|
|
1591
|
-
* @maxSize 20
|
|
1592
|
-
*/
|
|
1593
|
-
componentDependencies?: string[];
|
|
1594
|
-
}
|
|
1522
|
+
export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
|
|
1523
|
+
presets: Record<string, PresetItem & RequiredFields<PresetItem, 'displayName'>>;
|
|
1524
|
+
};
|
|
1595
1525
|
|
|
1596
|
-
|
|
1526
|
+
declare interface EditorElement_2 {
|
|
1597
1527
|
/**
|
|
1598
1528
|
* DOM Query selector for this element that we can use to find it when rendering it (preferably a className)
|
|
1599
1529
|
* @minLength 4
|
|
@@ -1679,41 +1609,6 @@ declare interface EditorFunction {
|
|
|
1679
1609
|
/* Excluded from this release type: deprecated */
|
|
1680
1610
|
}
|
|
1681
1611
|
|
|
1682
|
-
/** The full model for an imported component set in DEV Center */
|
|
1683
|
-
export declare interface EditorReactComponent {
|
|
1684
|
-
/**
|
|
1685
|
-
* The type of component to present in the Page tree, will be prefixed with AppSlug
|
|
1686
|
-
* @maxLength 100
|
|
1687
|
-
* @minLength 1
|
|
1688
|
-
*/
|
|
1689
|
-
type?: string;
|
|
1690
|
-
/**
|
|
1691
|
-
* The public description of the component do display
|
|
1692
|
-
* @maxLength 300
|
|
1693
|
-
* @minLength 3
|
|
1694
|
-
*/
|
|
1695
|
-
description?: string;
|
|
1696
|
-
/** List of component resources. This comprises any runtime code we need to load and execute for the component. */
|
|
1697
|
-
resources?: Resources;
|
|
1698
|
-
/** The configuration describing the component abilities and behaviors on the Editor stage */
|
|
1699
|
-
editorElement?: EditorElement;
|
|
1700
|
-
/** The installation settings of the component */
|
|
1701
|
-
installation?: InstallationInfo;
|
|
1702
|
-
/** Module configuration for NPM-based component */
|
|
1703
|
-
moduleConfiguration?: EditorReactComponentModuleConfiguration;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
declare interface EditorReactComponentModuleConfiguration {
|
|
1707
|
-
/** Public NPM package details */
|
|
1708
|
-
package?: NPMPackage;
|
|
1709
|
-
/** The component export details */
|
|
1710
|
-
component?: NPMPackageEntry;
|
|
1711
|
-
/** The component CSS File location */
|
|
1712
|
-
cssFile?: NPMPackageEntry;
|
|
1713
|
-
/** The component SSR version export details */
|
|
1714
|
-
server?: NPMPackageEntry;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
1612
|
declare enum EffectGroup {
|
|
1718
1613
|
UNKNOWN_EFFECT_GROUP = "UNKNOWN_EFFECT_GROUP",
|
|
1719
1614
|
/** Effects that are applied to the background layer of the component */
|
|
@@ -1742,7 +1637,7 @@ export declare const ELEMENTS: {
|
|
|
1742
1637
|
ELEMENT_TYPE: typeof ElementTypeEnumElementType;
|
|
1743
1638
|
};
|
|
1744
1639
|
|
|
1745
|
-
export declare type Elements = NonNullable<
|
|
1640
|
+
export declare type Elements = NonNullable<EditorElement_2['elements']>;
|
|
1746
1641
|
|
|
1747
1642
|
export declare type ElementsDefaults = NonNullable<RefElement['elements']>;
|
|
1748
1643
|
|
|
@@ -1904,14 +1799,6 @@ declare enum FilterFunction {
|
|
|
1904
1799
|
hueRotate = "hueRotate"
|
|
1905
1800
|
}
|
|
1906
1801
|
|
|
1907
|
-
/** Fixed position builder for component installation */
|
|
1908
|
-
declare interface FixedPositionBuilder {
|
|
1909
|
-
/** Vertical position in the browser window */
|
|
1910
|
-
vertical?: Vertical;
|
|
1911
|
-
/** Horizontal position in the browser window */
|
|
1912
|
-
horizontal?: Horizontal;
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
1802
|
export declare interface Font {
|
|
1916
1803
|
/**
|
|
1917
1804
|
* Stores the font-style property of the font shorthand
|
|
@@ -2144,13 +2031,6 @@ declare interface HelpArticleArticleTypeOneOf {
|
|
|
2144
2031
|
url?: string | null;
|
|
2145
2032
|
}
|
|
2146
2033
|
|
|
2147
|
-
declare enum Horizontal {
|
|
2148
|
-
NONE = "NONE",
|
|
2149
|
-
LEFT = "LEFT",
|
|
2150
|
-
CENTER = "CENTER",
|
|
2151
|
-
RIGHT = "RIGHT"
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
2034
|
export declare interface Image {
|
|
2155
2035
|
/** media manager categories to open media manager filtered by the component needs */
|
|
2156
2036
|
category?: ImageCategoryTypes;
|
|
@@ -2247,23 +2127,6 @@ export declare interface InlineElement {
|
|
|
2247
2127
|
helpArticle?: HelpArticle;
|
|
2248
2128
|
}
|
|
2249
2129
|
|
|
2250
|
-
declare interface InstallationInfo extends InstallationInfoTargetContainerOneOf {
|
|
2251
|
-
/** Which static container should the component be installed at */
|
|
2252
|
-
staticContainer?: StaticContainer;
|
|
2253
|
-
/** Default presets per breakpoint with which the component should be installed */
|
|
2254
|
-
presets?: DefaultPresets;
|
|
2255
|
-
/** Initial size with which the component should be added to the stage */
|
|
2256
|
-
initialSize?: ComponentInitialSize;
|
|
2257
|
-
/** Fixed position options for the component. If set, the component will be pinned to the specified position, and can't be unpinned */
|
|
2258
|
-
fixedPosition?: FixedPositionBuilder;
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
/** @oneof */
|
|
2262
|
-
declare interface InstallationInfoTargetContainerOneOf {
|
|
2263
|
-
/** Which static container should the component be installed at */
|
|
2264
|
-
staticContainer?: StaticContainer;
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2267
2130
|
export declare const INTERACTIONS: {
|
|
2268
2131
|
TRIGGER_TYPE: typeof InteractionsTrigger;
|
|
2269
2132
|
EFFECT_GROUP: typeof EffectGroup;
|
|
@@ -2410,34 +2273,6 @@ export declare enum NATIVE_STATE_TYPE {
|
|
|
2410
2273
|
invalid = "invalid"
|
|
2411
2274
|
}
|
|
2412
2275
|
|
|
2413
|
-
declare interface NPMPackage {
|
|
2414
|
-
/**
|
|
2415
|
-
* The npm package name
|
|
2416
|
-
* @minLength 1
|
|
2417
|
-
* @maxLength 214
|
|
2418
|
-
*/
|
|
2419
|
-
name?: string;
|
|
2420
|
-
/**
|
|
2421
|
-
* the SEMVER package version
|
|
2422
|
-
* @minLength 1
|
|
2423
|
-
* @maxLength 214
|
|
2424
|
-
*/
|
|
2425
|
-
version?: string;
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
declare interface NPMPackageEntry {
|
|
2429
|
-
/**
|
|
2430
|
-
* optional path to file in package
|
|
2431
|
-
* @maxLength 200
|
|
2432
|
-
*/
|
|
2433
|
-
path?: string | null;
|
|
2434
|
-
/**
|
|
2435
|
-
* The named export key to import. If empty, the default export is used.
|
|
2436
|
-
* @maxLength 200
|
|
2437
|
-
*/
|
|
2438
|
-
exportKey?: string | null;
|
|
2439
|
-
}
|
|
2440
|
-
|
|
2441
2276
|
export declare enum OverrideType {
|
|
2442
2277
|
UNKNOWN = "UNKNOWN",
|
|
2443
2278
|
DEV = "DEV",
|
|
@@ -2644,7 +2479,7 @@ export declare interface PresetItem {
|
|
|
2644
2479
|
presetDefaults?: PresetElementDefaults;
|
|
2645
2480
|
}
|
|
2646
2481
|
|
|
2647
|
-
export declare type Presets = NonNullable<
|
|
2482
|
+
export declare type Presets = NonNullable<EditorElement_2['presets']>;
|
|
2648
2483
|
|
|
2649
2484
|
/** DEPRECATED: This message is deprecated and will be removed in the future */
|
|
2650
2485
|
declare interface PresetStyleDefaults {
|
|
@@ -2770,6 +2605,8 @@ declare interface RefInnerElementDefaults {
|
|
|
2770
2605
|
cssCustomProperties?: Record<string, CssPropertyItemDefaults>;
|
|
2771
2606
|
}
|
|
2772
2607
|
|
|
2608
|
+
declare type RequiredFields<T, K extends keyof T> = Required<Pick<T, K>>;
|
|
2609
|
+
|
|
2773
2610
|
declare enum ResizeDirection {
|
|
2774
2611
|
/** Default value when direction is not specified */
|
|
2775
2612
|
UNKNOWN_ResizeDirection = "UNKNOWN_ResizeDirection",
|
|
@@ -2785,38 +2622,6 @@ declare enum ResizeDirection {
|
|
|
2785
2622
|
none = "none"
|
|
2786
2623
|
}
|
|
2787
2624
|
|
|
2788
|
-
declare interface Resource {
|
|
2789
|
-
/**
|
|
2790
|
-
* A URL to an ESM javascript bundle
|
|
2791
|
-
* @format WEB_URL
|
|
2792
|
-
*/
|
|
2793
|
-
url?: string;
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
declare interface Resources {
|
|
2797
|
-
/** The bundle we will load and render in the browser in the site */
|
|
2798
|
-
client?: ClientResources;
|
|
2799
|
-
/**
|
|
2800
|
-
* An optional client definition of the component we will load and render in the editor, *it replaces the client bundle.*
|
|
2801
|
-
* The main use case is to control the live site component and enable different experiences in the editor.
|
|
2802
|
-
* For example, supporting \`states\` manipulation:
|
|
2803
|
-
* Show calendar in the editor
|
|
2804
|
-
* Open drop down in the editor
|
|
2805
|
-
*/
|
|
2806
|
-
editor?: ClientResources;
|
|
2807
|
-
/** The bundle for SSR, should not include any DOM API references */
|
|
2808
|
-
server?: Resource;
|
|
2809
|
-
/** The optional component SDK to expose to Velo Users to interact with the component */
|
|
2810
|
-
sdk?: Resource;
|
|
2811
|
-
/** Details for how to load translations for the component */
|
|
2812
|
-
translations?: TranslationResources;
|
|
2813
|
-
/** The optional interactions configuration JSON file */
|
|
2814
|
-
interactions?: Resource;
|
|
2815
|
-
/* Excluded from this release type: viewerReducedModel */
|
|
2816
|
-
/* Excluded from this release type: schemaRefsUrl */
|
|
2817
|
-
/* Excluded from this release type: viewerRuntimeCss */
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
2625
|
/** rich text data type allow manipulation of text with html & inline styles */
|
|
2821
2626
|
declare interface RichText {
|
|
2822
2627
|
/**
|
|
@@ -2952,15 +2757,7 @@ declare enum SizingType {
|
|
|
2952
2757
|
pixels = "pixels"
|
|
2953
2758
|
}
|
|
2954
2759
|
|
|
2955
|
-
export declare type States = NonNullable<
|
|
2956
|
-
|
|
2957
|
-
declare enum StaticContainer {
|
|
2958
|
-
UNKNOWN_CONTAINER = "UNKNOWN_CONTAINER",
|
|
2959
|
-
/** Widget should be installed in the homepage */
|
|
2960
|
-
HOMEPAGE = "HOMEPAGE",
|
|
2961
|
-
/** Show widget on all pages */
|
|
2962
|
-
GLOBAL_PAGE = "GLOBAL_PAGE"
|
|
2963
|
-
}
|
|
2760
|
+
export declare type States = NonNullable<EditorElement_2['states']>;
|
|
2964
2761
|
|
|
2965
2762
|
/** DEPRECATED - use CssPropertyAction or CssCustomPropertyAction */
|
|
2966
2763
|
declare interface StyleAction {
|
|
@@ -3389,20 +3186,6 @@ export declare interface TextGroup {
|
|
|
3389
3186
|
a11y?: string | null;
|
|
3390
3187
|
}
|
|
3391
3188
|
|
|
3392
|
-
declare interface TranslationResources {
|
|
3393
|
-
/**
|
|
3394
|
-
* The URL that we will add the language to for fetching translations, example: \`https://somecdn.com/translations/\`
|
|
3395
|
-
* @format WEB_URL
|
|
3396
|
-
*/
|
|
3397
|
-
basePath?: string;
|
|
3398
|
-
/**
|
|
3399
|
-
* The list of supported languages according to the [ISO-639-1 specification](https://en.wikipedia.org/wiki/ISO_639-1)
|
|
3400
|
-
* @format LANGUAGE
|
|
3401
|
-
* @maxSize 37
|
|
3402
|
-
*/
|
|
3403
|
-
languages?: string[];
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
3189
|
export declare interface VectorArt {
|
|
3407
3190
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3408
3191
|
category?: VectorArtCategoryTypes;
|
|
@@ -3436,13 +3219,6 @@ declare interface VectorArtOverrides {
|
|
|
3436
3219
|
category?: VectorArtCategoryTypes;
|
|
3437
3220
|
}
|
|
3438
3221
|
|
|
3439
|
-
declare enum Vertical {
|
|
3440
|
-
NONE = "NONE",
|
|
3441
|
-
TOP = "TOP",
|
|
3442
|
-
CENTER = "CENTER",
|
|
3443
|
-
BOTTOM = "BOTTOM"
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
3222
|
export declare interface Video {
|
|
3447
3223
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3448
3224
|
category?: VideoCategoryTypes;
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,6 @@ export {
|
|
|
15
15
|
} from '@wix/component-protocol/schema'
|
|
16
16
|
|
|
17
17
|
export type {
|
|
18
|
-
EditorReactComponent,
|
|
19
18
|
Behaviors,
|
|
20
19
|
StyleItem,
|
|
21
20
|
CssProperties,
|
|
@@ -33,7 +32,6 @@ export type {
|
|
|
33
32
|
Elements,
|
|
34
33
|
ElementsDefaults,
|
|
35
34
|
ElementItem,
|
|
36
|
-
EditorElement,
|
|
37
35
|
EditorElementLayout,
|
|
38
36
|
InlineElement,
|
|
39
37
|
RefElement,
|
|
@@ -84,3 +82,13 @@ export type {
|
|
|
84
82
|
DataGroupsArrayItems,
|
|
85
83
|
ListItem,
|
|
86
84
|
} from '@wix/component-protocol/schema'
|
|
85
|
+
|
|
86
|
+
import type { PresetItem, EditorElement as RawEditorElement } from '@wix/component-protocol/schema'
|
|
87
|
+
|
|
88
|
+
type RequiredFields<T, K extends keyof T> = Required<Pick<T, K>>
|
|
89
|
+
|
|
90
|
+
// make selector and displayName required to be consistant with headless-integration repo
|
|
91
|
+
export type EditorElement = RawEditorElement &
|
|
92
|
+
RequiredFields<RawEditorElement, 'selector' | 'displayName'> & {
|
|
93
|
+
presets: Record<string, PresetItem & RequiredFields<PresetItem, 'displayName'>>
|
|
94
|
+
}
|