@wix/react-component-schema 1.4.0 → 1.6.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 CHANGED
@@ -259,6 +259,35 @@ 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
+
262
291
  /** Represents the information needed for code panels */
263
292
  declare interface CodePanel {
264
293
  /**
@@ -1298,6 +1327,30 @@ declare enum DataType {
1298
1327
  onSubmit = "onSubmit"
1299
1328
  }
1300
1329
 
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
+
1301
1354
  export declare interface Display {
1302
1355
  /**
1303
1356
  * list of display values in case we want to reduce the abilities exposed to the User
@@ -1516,6 +1569,27 @@ declare enum DisplayValueEnumDisplayValue {
1516
1569
  listItem = "listItem"
1517
1570
  }
1518
1571
 
1572
+ declare interface EditorDependencies {
1573
+ /**
1574
+ * A list of service dependencies required by the component, example: ['@wix/environment']
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
+ }
1592
+
1519
1593
  export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
1520
1594
  presets?: Record<string, PresetItem>;
1521
1595
  };
@@ -1606,6 +1680,41 @@ declare interface EditorFunction {
1606
1680
  /* Excluded from this release type: deprecated */
1607
1681
  }
1608
1682
 
1683
+ /** The full model for an imported component set in DEV Center */
1684
+ export declare interface EditorReactComponent {
1685
+ /**
1686
+ * The type of component to present in the Page tree, will be prefixed with AppSlug
1687
+ * @maxLength 100
1688
+ * @minLength 1
1689
+ */
1690
+ type?: string;
1691
+ /**
1692
+ * The public description of the component do display
1693
+ * @maxLength 300
1694
+ * @minLength 3
1695
+ */
1696
+ description?: string;
1697
+ /** List of component resources. This comprises any runtime code we need to load and execute for the component. */
1698
+ resources?: Resources;
1699
+ /** The configuration describing the component abilities and behaviors on the Editor stage */
1700
+ editorElement?: EditorElement_2;
1701
+ /** The installation settings of the component */
1702
+ installation?: InstallationInfo;
1703
+ /** Module configuration for NPM-based component */
1704
+ moduleConfiguration?: EditorReactComponentModuleConfiguration;
1705
+ }
1706
+
1707
+ declare interface EditorReactComponentModuleConfiguration {
1708
+ /** Public NPM package details */
1709
+ package?: NPMPackage;
1710
+ /** The component export details */
1711
+ component?: NPMPackageEntry;
1712
+ /** The component CSS File location */
1713
+ cssFile?: NPMPackageEntry;
1714
+ /** The component SSR version export details */
1715
+ server?: NPMPackageEntry;
1716
+ }
1717
+
1609
1718
  declare enum EffectGroup {
1610
1719
  UNKNOWN_EFFECT_GROUP = "UNKNOWN_EFFECT_GROUP",
1611
1720
  /** Effects that are applied to the background layer of the component */
@@ -1796,6 +1905,14 @@ declare enum FilterFunction {
1796
1905
  hueRotate = "hueRotate"
1797
1906
  }
1798
1907
 
1908
+ /** Fixed position builder for component installation */
1909
+ declare interface FixedPositionBuilder {
1910
+ /** Vertical position in the browser window */
1911
+ vertical?: Vertical;
1912
+ /** Horizontal position in the browser window */
1913
+ horizontal?: Horizontal;
1914
+ }
1915
+
1799
1916
  export declare interface Font {
1800
1917
  /**
1801
1918
  * Stores the font-style property of the font shorthand
@@ -2028,6 +2145,13 @@ declare interface HelpArticleArticleTypeOneOf {
2028
2145
  url?: string | null;
2029
2146
  }
2030
2147
 
2148
+ declare enum Horizontal {
2149
+ NONE = "NONE",
2150
+ LEFT = "LEFT",
2151
+ CENTER = "CENTER",
2152
+ RIGHT = "RIGHT"
2153
+ }
2154
+
2031
2155
  export declare interface Image {
2032
2156
  /** media manager categories to open media manager filtered by the component needs */
2033
2157
  category?: ImageCategoryTypes;
@@ -2124,6 +2248,23 @@ export declare interface InlineElement {
2124
2248
  helpArticle?: HelpArticle;
2125
2249
  }
2126
2250
 
2251
+ declare interface InstallationInfo extends InstallationInfoTargetContainerOneOf {
2252
+ /** Which static container should the component be installed at */
2253
+ staticContainer?: StaticContainer;
2254
+ /** Default presets per breakpoint with which the component should be installed */
2255
+ presets?: DefaultPresets;
2256
+ /** Initial size with which the component should be added to the stage */
2257
+ initialSize?: ComponentInitialSize;
2258
+ /** Fixed position options for the component. If set, the component will be pinned to the specified position, and can't be unpinned */
2259
+ fixedPosition?: FixedPositionBuilder;
2260
+ }
2261
+
2262
+ /** @oneof */
2263
+ declare interface InstallationInfoTargetContainerOneOf {
2264
+ /** Which static container should the component be installed at */
2265
+ staticContainer?: StaticContainer;
2266
+ }
2267
+
2127
2268
  export declare const INTERACTIONS: {
2128
2269
  TRIGGER_TYPE: typeof InteractionsTrigger;
2129
2270
  EFFECT_GROUP: typeof EffectGroup;
@@ -2270,6 +2411,34 @@ export declare enum NATIVE_STATE_TYPE {
2270
2411
  invalid = "invalid"
2271
2412
  }
2272
2413
 
2414
+ declare interface NPMPackage {
2415
+ /**
2416
+ * The npm package name
2417
+ * @minLength 1
2418
+ * @maxLength 214
2419
+ */
2420
+ name?: string;
2421
+ /**
2422
+ * the SEMVER package version
2423
+ * @minLength 1
2424
+ * @maxLength 214
2425
+ */
2426
+ version?: string;
2427
+ }
2428
+
2429
+ declare interface NPMPackageEntry {
2430
+ /**
2431
+ * optional path to file in package
2432
+ * @maxLength 200
2433
+ */
2434
+ path?: string | null;
2435
+ /**
2436
+ * The named export key to import. If empty, the default export is used.
2437
+ * @maxLength 200
2438
+ */
2439
+ exportKey?: string | null;
2440
+ }
2441
+
2273
2442
  export declare enum OverrideType {
2274
2443
  UNKNOWN = "UNKNOWN",
2275
2444
  DEV = "DEV",
@@ -2621,6 +2790,38 @@ declare enum ResizeDirection {
2621
2790
  none = "none"
2622
2791
  }
2623
2792
 
2793
+ declare interface Resource {
2794
+ /**
2795
+ * A URL to an ESM javascript bundle
2796
+ * @format WEB_URL
2797
+ */
2798
+ url?: string;
2799
+ }
2800
+
2801
+ declare interface Resources {
2802
+ /** The bundle we will load and render in the browser in the site */
2803
+ client?: ClientResources;
2804
+ /**
2805
+ * An optional client definition of the component we will load and render in the editor, *it replaces the client bundle.*
2806
+ * The main use case is to control the live site component and enable different experiences in the editor.
2807
+ * For example, supporting `states` manipulation:
2808
+ * Show calendar in the editor
2809
+ * Open drop down in the editor
2810
+ */
2811
+ editor?: ClientResources;
2812
+ /** The bundle for SSR, should not include any DOM API references */
2813
+ server?: Resource;
2814
+ /** The optional component SDK to expose to Velo Users to interact with the component */
2815
+ sdk?: Resource;
2816
+ /** Details for how to load translations for the component */
2817
+ translations?: TranslationResources;
2818
+ /** The optional interactions configuration JSON file */
2819
+ interactions?: Resource;
2820
+ /* Excluded from this release type: viewerReducedModel */
2821
+ /* Excluded from this release type: schemaRefsUrl */
2822
+ /* Excluded from this release type: viewerRuntimeCss */
2823
+ }
2824
+
2624
2825
  /** rich text data type allow manipulation of text with html & inline styles */
2625
2826
  declare interface RichText {
2626
2827
  /**
@@ -2758,6 +2959,14 @@ declare enum SizingType {
2758
2959
 
2759
2960
  export declare type States = NonNullable<EditorElement_2['states']>;
2760
2961
 
2962
+ declare enum StaticContainer {
2963
+ UNKNOWN_CONTAINER = "UNKNOWN_CONTAINER",
2964
+ /** Widget should be installed in the homepage */
2965
+ HOMEPAGE = "HOMEPAGE",
2966
+ /** Show widget on all pages */
2967
+ GLOBAL_PAGE = "GLOBAL_PAGE"
2968
+ }
2969
+
2761
2970
  /** DEPRECATED - use CssPropertyAction or CssCustomPropertyAction */
2762
2971
  declare interface StyleAction {
2763
2972
  /**
@@ -3185,6 +3394,20 @@ export declare interface TextGroup {
3185
3394
  a11y?: string | null;
3186
3395
  }
3187
3396
 
3397
+ declare interface TranslationResources {
3398
+ /**
3399
+ * The URL that we will add the language to for fetching translations, example: `https://somecdn.com/translations/`
3400
+ * @format WEB_URL
3401
+ */
3402
+ basePath?: string;
3403
+ /**
3404
+ * The list of supported languages according to the [ISO-639-1 specification](https://en.wikipedia.org/wiki/ISO_639-1)
3405
+ * @format LANGUAGE
3406
+ * @maxSize 37
3407
+ */
3408
+ languages?: string[];
3409
+ }
3410
+
3188
3411
  export declare interface VectorArt {
3189
3412
  /** media manager categories to open media manager filtered by the component needs */
3190
3413
  category?: VectorArtCategoryTypes;
@@ -3218,6 +3441,13 @@ declare interface VectorArtOverrides {
3218
3441
  category?: VectorArtCategoryTypes;
3219
3442
  }
3220
3443
 
3444
+ declare enum Vertical {
3445
+ NONE = "NONE",
3446
+ TOP = "TOP",
3447
+ CENTER = "CENTER",
3448
+ BOTTOM = "BOTTOM"
3449
+ }
3450
+
3221
3451
  export declare interface Video {
3222
3452
  /** media manager categories to open media manager filtered by the component needs */
3223
3453
  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.4.0",
7
+ "version": "1.6.0",
8
8
  "description": "Schema constants and types for EditorReactComponent extension",
9
9
  "type": "module",
10
10
  "main": "dist/index.js",
@@ -13,12 +13,16 @@
13
13
  ".": {
14
14
  "import": "./dist/index.js",
15
15
  "types": "./dist/index.d.ts"
16
+ },
17
+ "./editor-react-types": {
18
+ "types": "./dist/editor-react-types.d.ts"
16
19
  }
17
20
  },
18
21
  "scripts": {
19
22
  "build": "vite build",
20
23
  "pretest": "vite build",
21
24
  "test": "vitest run --passWithNoTests",
25
+ "typecheck": "tsc --noEmit",
22
26
  "lint": "biome check src/"
23
27
  },
24
28
  "keywords": [],
@@ -28,6 +32,7 @@
28
32
  "@types/node": "^20.0.0",
29
33
  "@wix/ambassador-devcenter-components-overrides-v1-components-override": "^1.0.408",
30
34
  "@wix/component-protocol": "1.223.0",
35
+ "@wix/editor-react-types": "^1.0.20",
31
36
  "vite": "^7.3.2",
32
37
  "vite-plugin-dts": "^4.5.4",
33
38
  "vitest": "^4.0.17"
@@ -48,5 +53,5 @@
48
53
  ]
49
54
  }
50
55
  },
51
- "falconPackageHash": "28ed952c41e0c6fa2de51819c75bdc76b38b3c50f267d8e37ebb5e03"
56
+ "falconPackageHash": "f3429a7c4873fb344e5987e3d7a9bbe48fb474d829d4b1d0d735eda3"
52
57
  }