@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/editor-react-types.d.ts +408 -0
- package/dist/index.d.ts +230 -0
- package/package.json +7 -2
- package/src/__snapshots__/index.test.ts.snap +642 -0
- package/src/editor-react-types.ts +20 -0
- package/src/index.test.ts +5 -0
- package/src/index.ts +1 -0
- package/vite.config.ts +38 -2
|
@@ -1,5 +1,417 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
+
exports[`react-component-schema dist > dist/editor-react-types.d.ts matches snapshot 1`] = `
|
|
4
|
+
"declare module '@wix/editor-react-types' {
|
|
5
|
+
import type { ReactElement } from 'react';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Accessibility attributes.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* \`\`\`tsx
|
|
12
|
+
* import type { A11y } from '@wix/editor-react-types';
|
|
13
|
+
*
|
|
14
|
+
* interface MyComponentProps {
|
|
15
|
+
* a11y?: A11y;
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* const MyComponent = ({ a11y }: MyComponentProps) => (
|
|
19
|
+
* <div
|
|
20
|
+
* tabIndex={a11y?.tabIndex}
|
|
21
|
+
* role={a11y?.role}
|
|
22
|
+
* aria-label={a11y?.ariaLabel}
|
|
23
|
+
* />
|
|
24
|
+
* );
|
|
25
|
+
* \`\`\`
|
|
26
|
+
*/
|
|
27
|
+
export interface A11y {
|
|
28
|
+
/** The \`tabindex\` attribute. Controls the component's position in keyboard focus order. */
|
|
29
|
+
tabIndex?: number;
|
|
30
|
+
/** The \`aria-level\` attribute. Defines the hierarchical level of a component within a structure. */
|
|
31
|
+
ariaLevel?: number;
|
|
32
|
+
/** The \`aria-expanded\` attribute. Indicates whether a collapsible component is expanded or collapsed. */
|
|
33
|
+
ariaExpanded?: boolean | 'false' | 'true';
|
|
34
|
+
/** The \`aria-disabled\` attribute. Indicates that the component is perceivable but disabled. */
|
|
35
|
+
ariaDisabled?: boolean | 'false' | 'true';
|
|
36
|
+
/** The \`aria-atomic\` attribute. Indicates whether assistive technologies should present the entire region as a whole. */
|
|
37
|
+
ariaAtomic?: boolean | 'false' | 'true';
|
|
38
|
+
/** The \`aria-hidden\` attribute. Hides the component from assistive technologies. */
|
|
39
|
+
ariaHidden?: boolean | 'false' | 'true';
|
|
40
|
+
/** The \`aria-busy\` attribute. Indicates the component is being modified and assistive technologies should wait. */
|
|
41
|
+
ariaBusy?: boolean | 'false' | 'true';
|
|
42
|
+
/** Whether the component supports multiline input. */
|
|
43
|
+
multiline?: boolean;
|
|
44
|
+
/** The \`aria-autocomplete\` attribute. Indicates the type of autocomplete behavior for an input. */
|
|
45
|
+
ariaAutocomplete?: 'none' | 'inline' | 'list' | 'both';
|
|
46
|
+
/** The \`aria-pressed\` attribute. Indicates the current "pressed" state of a toggle button. */
|
|
47
|
+
ariaPressed?: boolean | 'false' | 'mixed' | 'true';
|
|
48
|
+
/** The \`aria-haspopup\` attribute. Indicates the availability and type of an interactive popup component. */
|
|
49
|
+
ariaHaspopup?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
50
|
+
/** The \`aria-relevant\` attribute. Indicates what notifications the user agent will trigger when the accessibility tree is modified. */
|
|
51
|
+
ariaRelevant?: 'additions' | 'additions text' | 'all' | 'removals' | 'text';
|
|
52
|
+
/** The \`role\` attribute. Defines the semantic role of the component. */
|
|
53
|
+
role?: string;
|
|
54
|
+
/** The \`aria-live\` attribute. Indicates that the component will be updated and describes the types of updates. */
|
|
55
|
+
ariaLive?: 'off' | 'assertive' | 'polite';
|
|
56
|
+
/** The \`aria-current\` attribute. Indicates the component that represents the current item within a container or set. */
|
|
57
|
+
ariaCurrent?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
58
|
+
/** The \`aria-label\` attribute. Defines a string value that labels the component. */
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
/** The \`aria-roledescription\` attribute. Defines a human-readable description for the role of the component. */
|
|
61
|
+
ariaRoledescription?: string;
|
|
62
|
+
/** The \`aria-describedby\` attribute. Identifies the element that describes this component. */
|
|
63
|
+
ariaDescribedby?: string;
|
|
64
|
+
/** The \`aria-labelledby\` attribute. Identifies the element that labels this component. */
|
|
65
|
+
ariaLabelledby?: string;
|
|
66
|
+
/** The \`aria-errormessage\` attribute. Identifies the element that provides an error message for this component. */
|
|
67
|
+
ariaErrormessage?: string;
|
|
68
|
+
/** The \`aria-owns\` attribute. Identifies a component to define a visual, functional, or contextual parent/child relationship. */
|
|
69
|
+
ariaOwns?: string;
|
|
70
|
+
/** The \`aria-controls\` attribute. Identifies the element whose contents or presence are controlled by this component. */
|
|
71
|
+
ariaControls?: string;
|
|
72
|
+
/** The HTML tag to render the component as (e.g. \`'h1'\`, \`'button'\`). */
|
|
73
|
+
tag?: string;
|
|
74
|
+
/** The \`aria-multiline\` attribute. Indicates whether a text box accepts multiple lines of input. */
|
|
75
|
+
ariaMultiline?: boolean | 'false' | 'true';
|
|
76
|
+
/** The \`aria-invalid\` attribute. Indicates the entered value does not conform to the expected format. */
|
|
77
|
+
ariaInvalid?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** An adaptive streaming video source (HLS or DASH). */
|
|
81
|
+
type AdaptiveVideoSource = {
|
|
82
|
+
/** The adaptive streaming format. */
|
|
83
|
+
format: 'hls' | 'dash';
|
|
84
|
+
/** The video URI. */
|
|
85
|
+
uri: string;
|
|
86
|
+
/** The fully resolved video URL. */
|
|
87
|
+
url: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* An audio track from Wix Media.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* \`\`\`tsx
|
|
95
|
+
* import type { Audio } from '@wix/editor-react-types';
|
|
96
|
+
*
|
|
97
|
+
* interface MyComponentProps {
|
|
98
|
+
* audio?: Audio;
|
|
99
|
+
* }
|
|
100
|
+
* \`\`\`
|
|
101
|
+
*/
|
|
102
|
+
export type Audio = {
|
|
103
|
+
/** The fully resolved audio URL. */
|
|
104
|
+
url: string;
|
|
105
|
+
/** The audio artist name. */
|
|
106
|
+
artist?: string;
|
|
107
|
+
/** The audio track title. */
|
|
108
|
+
title?: string;
|
|
109
|
+
/** The audio duration in seconds. */
|
|
110
|
+
duration?: number;
|
|
111
|
+
/** The audio file name. */
|
|
112
|
+
name?: string;
|
|
113
|
+
/** All available audio sources at different quality levels and formats. */
|
|
114
|
+
audio?: Array<AudioSource>;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** A single audio source file at a specific quality and format. */
|
|
118
|
+
type AudioSource = {
|
|
119
|
+
/** The audio bitrate in kbps. */
|
|
120
|
+
audioBitrate: number;
|
|
121
|
+
/** The audio format (e.g. \`'mp3'\`, \`'ogg'\`). */
|
|
122
|
+
format: string;
|
|
123
|
+
/** The audio quality label. */
|
|
124
|
+
quality: string;
|
|
125
|
+
/** The fully resolved audio URL. */
|
|
126
|
+
url: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
type Crop = Point & {
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The text direction of the component.
|
|
136
|
+
* Maps to the HTML \`dir\` attribute.
|
|
137
|
+
* - \`'ltr'\` — left to right.
|
|
138
|
+
* - \`'rtl'\` — right to left.
|
|
139
|
+
* - \`'auto'\` — determined by content.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* \`\`\`tsx
|
|
143
|
+
* import type { Direction } from '@wix/editor-react-types';
|
|
144
|
+
*
|
|
145
|
+
* interface MyComponentProps {
|
|
146
|
+
* direction?: Direction;
|
|
147
|
+
* }
|
|
148
|
+
*
|
|
149
|
+
* const MyComponent = ({ direction = 'ltr' }: MyComponentProps) => (
|
|
150
|
+
* <div dir={direction}>...</div>
|
|
151
|
+
* );
|
|
152
|
+
* \`\`\`
|
|
153
|
+
*/
|
|
154
|
+
export type Direction = 'rtl' | 'ltr' | 'auto';
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* An image from Wix Media.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* \`\`\`tsx
|
|
161
|
+
* import type { Image } from '@wix/editor-react-types';
|
|
162
|
+
*
|
|
163
|
+
* interface MyComponentProps {
|
|
164
|
+
* image?: Image;
|
|
165
|
+
* }
|
|
166
|
+
*
|
|
167
|
+
* const MyComponent = ({ image }: MyComponentProps) => (
|
|
168
|
+
* <img src={image?.url} alt={image?.alt} />
|
|
169
|
+
* );
|
|
170
|
+
* \`\`\`
|
|
171
|
+
*/
|
|
172
|
+
export type Image = {
|
|
173
|
+
/** The image URI. */
|
|
174
|
+
uri?: string;
|
|
175
|
+
/** The image URL. */
|
|
176
|
+
url: string;
|
|
177
|
+
/** The image file name. */
|
|
178
|
+
name?: string;
|
|
179
|
+
/** The image height in pixels. */
|
|
180
|
+
height?: number;
|
|
181
|
+
/** The image width in pixels. */
|
|
182
|
+
width?: number;
|
|
183
|
+
/** Whether the image is animated (e.g. GIF). */
|
|
184
|
+
animated?: boolean;
|
|
185
|
+
/** The crop region applied to the image. */
|
|
186
|
+
crop?: Crop;
|
|
187
|
+
/** The image quality, as a percentage from 0 to 100. */
|
|
188
|
+
quality?: number;
|
|
189
|
+
/** The image alt text for accessibility. */
|
|
190
|
+
alt?: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* A link to a URL, used for navigation within components.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* \`\`\`tsx
|
|
198
|
+
* import type { Link } from '@wix/editor-react-types';
|
|
199
|
+
*
|
|
200
|
+
* interface MyComponentProps {
|
|
201
|
+
* link?: Link;
|
|
202
|
+
* }
|
|
203
|
+
* \`\`\`
|
|
204
|
+
*/
|
|
205
|
+
export type Link = {
|
|
206
|
+
/** The link URL. */
|
|
207
|
+
href?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Where this link should open.
|
|
210
|
+
* - \`'_self'\` — opens in the same page.
|
|
211
|
+
* - \`'_blank'\` — opens in a new tab.
|
|
212
|
+
*/
|
|
213
|
+
target?: LinkTarget;
|
|
214
|
+
/** The \`rel\` attribute of the link. Accepts LinkRel values separated by a space. */
|
|
215
|
+
rel?: string;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
type LinkTarget = '_self' | '_blank';
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* A local date string in ISO-8601 extended format (\`YYYY-MM-DD\`).
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* \`\`\`tsx
|
|
225
|
+
* import type { LocalDate } from '@wix/editor-react-types';
|
|
226
|
+
*
|
|
227
|
+
* interface MyComponentProps {
|
|
228
|
+
* startDate?: LocalDate; // e.g. '2024-03-15'
|
|
229
|
+
* }
|
|
230
|
+
* \`\`\`
|
|
231
|
+
*/
|
|
232
|
+
export type LocalDate = string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* A local time string in ISO-8601 extended format (\`hh:mm[:ss][.sss]\`).
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* \`\`\`tsx
|
|
239
|
+
* import type { LocalTime } from '@wix/editor-react-types';
|
|
240
|
+
*
|
|
241
|
+
* interface MyComponentProps {
|
|
242
|
+
* openingTime?: LocalTime; // e.g. '09:00'
|
|
243
|
+
* }
|
|
244
|
+
* \`\`\`
|
|
245
|
+
*/
|
|
246
|
+
export type LocalTime = string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* A single item in a menu, optionally containing nested sub-items.
|
|
250
|
+
*/
|
|
251
|
+
type MenuItem = {
|
|
252
|
+
/** A unique identifier for the menu item. */
|
|
253
|
+
id: string;
|
|
254
|
+
/** The display label shown to the user. */
|
|
255
|
+
label: string;
|
|
256
|
+
/** The navigation link for this menu item. */
|
|
257
|
+
link?: Link;
|
|
258
|
+
/** An optional container element rendered alongside the menu item. */
|
|
259
|
+
container?: ReactElement;
|
|
260
|
+
/** Nested child menu items, for building multi-level menus. */
|
|
261
|
+
items?: Array<MenuItem>;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* A list of menu items.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* \`\`\`tsx
|
|
269
|
+
* import type { MenuItems } from '@wix/editor-react-types';
|
|
270
|
+
*
|
|
271
|
+
* interface MyComponentProps {
|
|
272
|
+
* items?: MenuItems;
|
|
273
|
+
* }
|
|
274
|
+
* \`\`\`
|
|
275
|
+
*/
|
|
276
|
+
export type MenuItems = Array<MenuItem>;
|
|
277
|
+
|
|
278
|
+
type Point = {
|
|
279
|
+
x: number;
|
|
280
|
+
y: number;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Rich text content with resolved links.
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* \`\`\`tsx
|
|
288
|
+
* import type { RichText } from '@wix/editor-react-types';
|
|
289
|
+
*
|
|
290
|
+
* interface MyComponentProps {
|
|
291
|
+
* description?: RichText;
|
|
292
|
+
* }
|
|
293
|
+
*
|
|
294
|
+
* const MyComponent = ({ description }: MyComponentProps) => (
|
|
295
|
+
* <div>
|
|
296
|
+
* {description?.html}
|
|
297
|
+
* {description?.linkList.map((link) => (
|
|
298
|
+
* <a key={link.href} href={link.href}>{link.href}</a>
|
|
299
|
+
* ))}
|
|
300
|
+
* </div>
|
|
301
|
+
* );
|
|
302
|
+
* \`\`\`
|
|
303
|
+
*/
|
|
304
|
+
export type RichText = {
|
|
305
|
+
/** The original rich text content. */
|
|
306
|
+
text: string;
|
|
307
|
+
/** The HTML content with all links resolved. */
|
|
308
|
+
html: string;
|
|
309
|
+
/** All links present in the rich text content. */
|
|
310
|
+
linkList: Array<Link>;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* A vector art (SVG) asset from Wix Media.
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* \`\`\`tsx
|
|
318
|
+
* import type { VectorArt } from '@wix/editor-react-types';
|
|
319
|
+
*
|
|
320
|
+
* interface MyComponentProps {
|
|
321
|
+
* icon?: VectorArt;
|
|
322
|
+
* }
|
|
323
|
+
* \`\`\`
|
|
324
|
+
*/
|
|
325
|
+
export type VectorArt = {
|
|
326
|
+
/** The SVG URI. */
|
|
327
|
+
uri: string;
|
|
328
|
+
/** The SVG \`viewBox\` attribute value. */
|
|
329
|
+
viewBox: string;
|
|
330
|
+
/** The SVG content box dimensions. */
|
|
331
|
+
contentBox: string;
|
|
332
|
+
/** A map of color IDs to their resolved color values, for themeable SVGs. */
|
|
333
|
+
colors: Record<string, string>;
|
|
334
|
+
/**
|
|
335
|
+
* The SVG content type, which determines how colors and theming are applied.
|
|
336
|
+
* - \`'shape'\` — a simple monochromatic shape.
|
|
337
|
+
* - \`'color'\` — a multi-color SVG.
|
|
338
|
+
* - \`'tint'\` — a single-color tintable SVG.
|
|
339
|
+
* - \`'ugc'\` — user-generated content.
|
|
340
|
+
* - \`'textpath'\` — text along a path.
|
|
341
|
+
*/
|
|
342
|
+
contentType: 'shape' | 'color' | 'tint' | 'ugc' | 'textpath';
|
|
343
|
+
/** The raw SVG markup. */
|
|
344
|
+
svgContent: string;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* A video from Wix Media, including all available sources and quality levels.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* \`\`\`tsx
|
|
352
|
+
* import type { Video } from '@wix/editor-react-types';
|
|
353
|
+
*
|
|
354
|
+
* interface MyComponentProps {
|
|
355
|
+
* video?: Video;
|
|
356
|
+
* }
|
|
357
|
+
* \`\`\`
|
|
358
|
+
*/
|
|
359
|
+
export type Video = {
|
|
360
|
+
/** The original video URI. */
|
|
361
|
+
uri: string;
|
|
362
|
+
/** All available quality-level sources for progressive playback. */
|
|
363
|
+
sources: Array<VideoSource>;
|
|
364
|
+
/** Adaptive streaming sources (HLS/DASH) for streaming playback. */
|
|
365
|
+
adaptiveSources: Array<AdaptiveVideoSource>;
|
|
366
|
+
/** Whether the video contains an audio track. */
|
|
367
|
+
hasAudio: boolean;
|
|
368
|
+
/** The video frame rate in frames per second. */
|
|
369
|
+
fps: number;
|
|
370
|
+
/** A poster image to display before the video plays. */
|
|
371
|
+
poster?: Image;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
/** A set of video files for a specific quality level. */
|
|
375
|
+
type VideoSource = {
|
|
376
|
+
/** The video quality level. */
|
|
377
|
+
quality: '1080p' | '720p' | '480p' | '360p';
|
|
378
|
+
/** The video width in pixels at this quality level. */
|
|
379
|
+
width: number;
|
|
380
|
+
/** The video height in pixels at this quality level. */
|
|
381
|
+
height: number;
|
|
382
|
+
/** The available file types for this quality level. */
|
|
383
|
+
types: Array<VideoSourceType>;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
/** A single video file format for a given quality level. */
|
|
387
|
+
type VideoSourceType = {
|
|
388
|
+
/** The video format. */
|
|
389
|
+
format: 'mp4' | 'mp4-luminance';
|
|
390
|
+
/** The video URI. */
|
|
391
|
+
uri: string;
|
|
392
|
+
/** The fully resolved video URL. */
|
|
393
|
+
url: string;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* A URL with an \`http\` or \`https\` scheme.
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* \`\`\`tsx
|
|
401
|
+
* import type { WebUrl } from '@wix/editor-react-types';
|
|
402
|
+
*
|
|
403
|
+
* interface MyComponentProps {
|
|
404
|
+
* website?: WebUrl;
|
|
405
|
+
* }
|
|
406
|
+
* \`\`\`
|
|
407
|
+
*/
|
|
408
|
+
export type WebUrl = string;
|
|
409
|
+
|
|
410
|
+
export { }
|
|
411
|
+
}
|
|
412
|
+
"
|
|
413
|
+
`;
|
|
414
|
+
|
|
3
415
|
exports[`react-component-schema dist > dist/index.d.ts matches snapshot 1`] = `
|
|
4
416
|
"export declare interface A11y {
|
|
5
417
|
/**
|
|
@@ -262,6 +674,35 @@ declare interface BreakpointPresetStyleOverrides {
|
|
|
262
674
|
small?: PresetStyleOverrides;
|
|
263
675
|
}
|
|
264
676
|
|
|
677
|
+
declare interface ClientResources {
|
|
678
|
+
/**
|
|
679
|
+
* A URL to an ESM javascript bundle. It's default export should be the component
|
|
680
|
+
* @format WEB_URL
|
|
681
|
+
*/
|
|
682
|
+
componentUrl?: string;
|
|
683
|
+
/**
|
|
684
|
+
* A URL to the CSS file that is the default layout and style for the component
|
|
685
|
+
* @format WEB_URL
|
|
686
|
+
*/
|
|
687
|
+
cssUrl?: string | null;
|
|
688
|
+
/**
|
|
689
|
+
* A list of service dependencies required by the component, example: ['@wix/environment']
|
|
690
|
+
* @maxLength 80
|
|
691
|
+
* @maxSize 20
|
|
692
|
+
* @deprecated A list of service dependencies required by the component, example: ['@wix/environment']
|
|
693
|
+
* @replacedBy dependencies
|
|
694
|
+
* @targetRemovalDate 2025-12-30
|
|
695
|
+
*/
|
|
696
|
+
serviceDependencies?: string[];
|
|
697
|
+
/**
|
|
698
|
+
* A module specifier for the component’s react code.
|
|
699
|
+
* @maxLength 100
|
|
700
|
+
*/
|
|
701
|
+
moduleSpecifier?: string | null;
|
|
702
|
+
/** Dependencies on services and contexts */
|
|
703
|
+
dependencies?: EditorDependencies;
|
|
704
|
+
}
|
|
705
|
+
|
|
265
706
|
/** Represents the information needed for code panels */
|
|
266
707
|
declare interface CodePanel {
|
|
267
708
|
/**
|
|
@@ -1301,6 +1742,30 @@ declare enum DataType {
|
|
|
1301
1742
|
onSubmit = "onSubmit"
|
|
1302
1743
|
}
|
|
1303
1744
|
|
|
1745
|
+
declare interface DefaultPresets {
|
|
1746
|
+
/**
|
|
1747
|
+
* Default preset ID in small (mobile) breakpoint
|
|
1748
|
+
* @minLength 1
|
|
1749
|
+
* @maxLength 50
|
|
1750
|
+
*/
|
|
1751
|
+
small?: string | null;
|
|
1752
|
+
/**
|
|
1753
|
+
* Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1754
|
+
* @minLength 1
|
|
1755
|
+
* @maxLength 50
|
|
1756
|
+
* @deprecated Deprecated, use default - Default preset ID in large (desktop) breakpoint
|
|
1757
|
+
* @replacedBy default
|
|
1758
|
+
* @targetRemovalDate 2025-12-02
|
|
1759
|
+
*/
|
|
1760
|
+
large?: string | null;
|
|
1761
|
+
/**
|
|
1762
|
+
* Default preset ID
|
|
1763
|
+
* @minLength 1
|
|
1764
|
+
* @maxLength 50
|
|
1765
|
+
*/
|
|
1766
|
+
default?: string | null;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1304
1769
|
export declare interface Display {
|
|
1305
1770
|
/**
|
|
1306
1771
|
* list of display values in case we want to reduce the abilities exposed to the User
|
|
@@ -1519,6 +1984,27 @@ declare enum DisplayValueEnumDisplayValue {
|
|
|
1519
1984
|
listItem = "listItem"
|
|
1520
1985
|
}
|
|
1521
1986
|
|
|
1987
|
+
declare interface EditorDependencies {
|
|
1988
|
+
/**
|
|
1989
|
+
* A list of service dependencies required by the component, example: ['@wix/environment']
|
|
1990
|
+
* @maxLength 80
|
|
1991
|
+
* @maxSize 20
|
|
1992
|
+
*/
|
|
1993
|
+
serviceDependencies?: string[];
|
|
1994
|
+
/**
|
|
1995
|
+
* Dependencies on context providers in order to work
|
|
1996
|
+
* @maxLength 80
|
|
1997
|
+
* @maxSize 20
|
|
1998
|
+
*/
|
|
1999
|
+
contextDependencies?: string[];
|
|
2000
|
+
/**
|
|
2001
|
+
* Dependencies on components that we want as externals in our bundle, example: wixEditorElements.AppWidget
|
|
2002
|
+
* @maxLength 80
|
|
2003
|
+
* @maxSize 20
|
|
2004
|
+
*/
|
|
2005
|
+
componentDependencies?: string[];
|
|
2006
|
+
}
|
|
2007
|
+
|
|
1522
2008
|
export declare type EditorElement = EditorElement_2 & RequiredFields<EditorElement_2, 'selector' | 'displayName'> & {
|
|
1523
2009
|
presets?: Record<string, PresetItem>;
|
|
1524
2010
|
};
|
|
@@ -1609,6 +2095,41 @@ declare interface EditorFunction {
|
|
|
1609
2095
|
/* Excluded from this release type: deprecated */
|
|
1610
2096
|
}
|
|
1611
2097
|
|
|
2098
|
+
/** The full model for an imported component set in DEV Center */
|
|
2099
|
+
export declare interface EditorReactComponent {
|
|
2100
|
+
/**
|
|
2101
|
+
* The type of component to present in the Page tree, will be prefixed with AppSlug
|
|
2102
|
+
* @maxLength 100
|
|
2103
|
+
* @minLength 1
|
|
2104
|
+
*/
|
|
2105
|
+
type?: string;
|
|
2106
|
+
/**
|
|
2107
|
+
* The public description of the component do display
|
|
2108
|
+
* @maxLength 300
|
|
2109
|
+
* @minLength 3
|
|
2110
|
+
*/
|
|
2111
|
+
description?: string;
|
|
2112
|
+
/** List of component resources. This comprises any runtime code we need to load and execute for the component. */
|
|
2113
|
+
resources?: Resources;
|
|
2114
|
+
/** The configuration describing the component abilities and behaviors on the Editor stage */
|
|
2115
|
+
editorElement?: EditorElement_2;
|
|
2116
|
+
/** The installation settings of the component */
|
|
2117
|
+
installation?: InstallationInfo;
|
|
2118
|
+
/** Module configuration for NPM-based component */
|
|
2119
|
+
moduleConfiguration?: EditorReactComponentModuleConfiguration;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
declare interface EditorReactComponentModuleConfiguration {
|
|
2123
|
+
/** Public NPM package details */
|
|
2124
|
+
package?: NPMPackage;
|
|
2125
|
+
/** The component export details */
|
|
2126
|
+
component?: NPMPackageEntry;
|
|
2127
|
+
/** The component CSS File location */
|
|
2128
|
+
cssFile?: NPMPackageEntry;
|
|
2129
|
+
/** The component SSR version export details */
|
|
2130
|
+
server?: NPMPackageEntry;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
1612
2133
|
declare enum EffectGroup {
|
|
1613
2134
|
UNKNOWN_EFFECT_GROUP = "UNKNOWN_EFFECT_GROUP",
|
|
1614
2135
|
/** Effects that are applied to the background layer of the component */
|
|
@@ -1799,6 +2320,14 @@ declare enum FilterFunction {
|
|
|
1799
2320
|
hueRotate = "hueRotate"
|
|
1800
2321
|
}
|
|
1801
2322
|
|
|
2323
|
+
/** Fixed position builder for component installation */
|
|
2324
|
+
declare interface FixedPositionBuilder {
|
|
2325
|
+
/** Vertical position in the browser window */
|
|
2326
|
+
vertical?: Vertical;
|
|
2327
|
+
/** Horizontal position in the browser window */
|
|
2328
|
+
horizontal?: Horizontal;
|
|
2329
|
+
}
|
|
2330
|
+
|
|
1802
2331
|
export declare interface Font {
|
|
1803
2332
|
/**
|
|
1804
2333
|
* Stores the font-style property of the font shorthand
|
|
@@ -2031,6 +2560,13 @@ declare interface HelpArticleArticleTypeOneOf {
|
|
|
2031
2560
|
url?: string | null;
|
|
2032
2561
|
}
|
|
2033
2562
|
|
|
2563
|
+
declare enum Horizontal {
|
|
2564
|
+
NONE = "NONE",
|
|
2565
|
+
LEFT = "LEFT",
|
|
2566
|
+
CENTER = "CENTER",
|
|
2567
|
+
RIGHT = "RIGHT"
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2034
2570
|
export declare interface Image {
|
|
2035
2571
|
/** media manager categories to open media manager filtered by the component needs */
|
|
2036
2572
|
category?: ImageCategoryTypes;
|
|
@@ -2127,6 +2663,23 @@ export declare interface InlineElement {
|
|
|
2127
2663
|
helpArticle?: HelpArticle;
|
|
2128
2664
|
}
|
|
2129
2665
|
|
|
2666
|
+
declare interface InstallationInfo extends InstallationInfoTargetContainerOneOf {
|
|
2667
|
+
/** Which static container should the component be installed at */
|
|
2668
|
+
staticContainer?: StaticContainer;
|
|
2669
|
+
/** Default presets per breakpoint with which the component should be installed */
|
|
2670
|
+
presets?: DefaultPresets;
|
|
2671
|
+
/** Initial size with which the component should be added to the stage */
|
|
2672
|
+
initialSize?: ComponentInitialSize;
|
|
2673
|
+
/** Fixed position options for the component. If set, the component will be pinned to the specified position, and can't be unpinned */
|
|
2674
|
+
fixedPosition?: FixedPositionBuilder;
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
/** @oneof */
|
|
2678
|
+
declare interface InstallationInfoTargetContainerOneOf {
|
|
2679
|
+
/** Which static container should the component be installed at */
|
|
2680
|
+
staticContainer?: StaticContainer;
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2130
2683
|
export declare const INTERACTIONS: {
|
|
2131
2684
|
TRIGGER_TYPE: typeof InteractionsTrigger;
|
|
2132
2685
|
EFFECT_GROUP: typeof EffectGroup;
|
|
@@ -2273,6 +2826,34 @@ export declare enum NATIVE_STATE_TYPE {
|
|
|
2273
2826
|
invalid = "invalid"
|
|
2274
2827
|
}
|
|
2275
2828
|
|
|
2829
|
+
declare interface NPMPackage {
|
|
2830
|
+
/**
|
|
2831
|
+
* The npm package name
|
|
2832
|
+
* @minLength 1
|
|
2833
|
+
* @maxLength 214
|
|
2834
|
+
*/
|
|
2835
|
+
name?: string;
|
|
2836
|
+
/**
|
|
2837
|
+
* the SEMVER package version
|
|
2838
|
+
* @minLength 1
|
|
2839
|
+
* @maxLength 214
|
|
2840
|
+
*/
|
|
2841
|
+
version?: string;
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
declare interface NPMPackageEntry {
|
|
2845
|
+
/**
|
|
2846
|
+
* optional path to file in package
|
|
2847
|
+
* @maxLength 200
|
|
2848
|
+
*/
|
|
2849
|
+
path?: string | null;
|
|
2850
|
+
/**
|
|
2851
|
+
* The named export key to import. If empty, the default export is used.
|
|
2852
|
+
* @maxLength 200
|
|
2853
|
+
*/
|
|
2854
|
+
exportKey?: string | null;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2276
2857
|
export declare enum OverrideType {
|
|
2277
2858
|
UNKNOWN = "UNKNOWN",
|
|
2278
2859
|
DEV = "DEV",
|
|
@@ -2624,6 +3205,38 @@ declare enum ResizeDirection {
|
|
|
2624
3205
|
none = "none"
|
|
2625
3206
|
}
|
|
2626
3207
|
|
|
3208
|
+
declare interface Resource {
|
|
3209
|
+
/**
|
|
3210
|
+
* A URL to an ESM javascript bundle
|
|
3211
|
+
* @format WEB_URL
|
|
3212
|
+
*/
|
|
3213
|
+
url?: string;
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
declare interface Resources {
|
|
3217
|
+
/** The bundle we will load and render in the browser in the site */
|
|
3218
|
+
client?: ClientResources;
|
|
3219
|
+
/**
|
|
3220
|
+
* An optional client definition of the component we will load and render in the editor, *it replaces the client bundle.*
|
|
3221
|
+
* The main use case is to control the live site component and enable different experiences in the editor.
|
|
3222
|
+
* For example, supporting \`states\` manipulation:
|
|
3223
|
+
* Show calendar in the editor
|
|
3224
|
+
* Open drop down in the editor
|
|
3225
|
+
*/
|
|
3226
|
+
editor?: ClientResources;
|
|
3227
|
+
/** The bundle for SSR, should not include any DOM API references */
|
|
3228
|
+
server?: Resource;
|
|
3229
|
+
/** The optional component SDK to expose to Velo Users to interact with the component */
|
|
3230
|
+
sdk?: Resource;
|
|
3231
|
+
/** Details for how to load translations for the component */
|
|
3232
|
+
translations?: TranslationResources;
|
|
3233
|
+
/** The optional interactions configuration JSON file */
|
|
3234
|
+
interactions?: Resource;
|
|
3235
|
+
/* Excluded from this release type: viewerReducedModel */
|
|
3236
|
+
/* Excluded from this release type: schemaRefsUrl */
|
|
3237
|
+
/* Excluded from this release type: viewerRuntimeCss */
|
|
3238
|
+
}
|
|
3239
|
+
|
|
2627
3240
|
/** rich text data type allow manipulation of text with html & inline styles */
|
|
2628
3241
|
declare interface RichText {
|
|
2629
3242
|
/**
|
|
@@ -2761,6 +3374,14 @@ declare enum SizingType {
|
|
|
2761
3374
|
|
|
2762
3375
|
export declare type States = NonNullable<EditorElement_2['states']>;
|
|
2763
3376
|
|
|
3377
|
+
declare enum StaticContainer {
|
|
3378
|
+
UNKNOWN_CONTAINER = "UNKNOWN_CONTAINER",
|
|
3379
|
+
/** Widget should be installed in the homepage */
|
|
3380
|
+
HOMEPAGE = "HOMEPAGE",
|
|
3381
|
+
/** Show widget on all pages */
|
|
3382
|
+
GLOBAL_PAGE = "GLOBAL_PAGE"
|
|
3383
|
+
}
|
|
3384
|
+
|
|
2764
3385
|
/** DEPRECATED - use CssPropertyAction or CssCustomPropertyAction */
|
|
2765
3386
|
declare interface StyleAction {
|
|
2766
3387
|
/**
|
|
@@ -3188,6 +3809,20 @@ export declare interface TextGroup {
|
|
|
3188
3809
|
a11y?: string | null;
|
|
3189
3810
|
}
|
|
3190
3811
|
|
|
3812
|
+
declare interface TranslationResources {
|
|
3813
|
+
/**
|
|
3814
|
+
* The URL that we will add the language to for fetching translations, example: \`https://somecdn.com/translations/\`
|
|
3815
|
+
* @format WEB_URL
|
|
3816
|
+
*/
|
|
3817
|
+
basePath?: string;
|
|
3818
|
+
/**
|
|
3819
|
+
* The list of supported languages according to the [ISO-639-1 specification](https://en.wikipedia.org/wiki/ISO_639-1)
|
|
3820
|
+
* @format LANGUAGE
|
|
3821
|
+
* @maxSize 37
|
|
3822
|
+
*/
|
|
3823
|
+
languages?: string[];
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3191
3826
|
export declare interface VectorArt {
|
|
3192
3827
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3193
3828
|
category?: VectorArtCategoryTypes;
|
|
@@ -3221,6 +3856,13 @@ declare interface VectorArtOverrides {
|
|
|
3221
3856
|
category?: VectorArtCategoryTypes;
|
|
3222
3857
|
}
|
|
3223
3858
|
|
|
3859
|
+
declare enum Vertical {
|
|
3860
|
+
NONE = "NONE",
|
|
3861
|
+
TOP = "TOP",
|
|
3862
|
+
CENTER = "CENTER",
|
|
3863
|
+
BOTTOM = "BOTTOM"
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3224
3866
|
export declare interface Video {
|
|
3225
3867
|
/** media manager categories to open media manager filtered by the component needs */
|
|
3226
3868
|
category?: VideoCategoryTypes;
|