@webstudio-is/sdk 0.0.0-017f1bd

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.
Files changed (47) hide show
  1. package/LICENSE +661 -0
  2. package/lib/__generated__/normalize.css.js +593 -0
  3. package/lib/core-templates.js +1267 -0
  4. package/lib/index.js +2918 -0
  5. package/lib/runtime.js +117 -0
  6. package/lib/types/__generated__/normalize.css.d.ts +57 -0
  7. package/lib/types/__generated__/tags.d.ts +1 -0
  8. package/lib/types/core-metas.d.ts +20 -0
  9. package/lib/types/core-templates.d.ts +9 -0
  10. package/lib/types/css.d.ts +31 -0
  11. package/lib/types/css.test.d.ts +1 -0
  12. package/lib/types/expression.d.ts +60 -0
  13. package/lib/types/expression.test.d.ts +1 -0
  14. package/lib/types/form-fields.d.ts +8 -0
  15. package/lib/types/index.d.ts +26 -0
  16. package/lib/types/instances-utils.d.ts +8 -0
  17. package/lib/types/instances-utils.test.d.ts +1 -0
  18. package/lib/types/page-meta-generator.d.ts +24 -0
  19. package/lib/types/page-meta-generator.test.d.ts +1 -0
  20. package/lib/types/page-utils.d.ts +24 -0
  21. package/lib/types/page-utils.test.d.ts +1 -0
  22. package/lib/types/resource-loader.d.ts +30 -0
  23. package/lib/types/resource-loader.test.d.ts +1 -0
  24. package/lib/types/resources-generator.d.ts +22 -0
  25. package/lib/types/resources-generator.test.d.ts +1 -0
  26. package/lib/types/runtime.d.ts +8 -0
  27. package/lib/types/schema/animation-schema.d.ts +53844 -0
  28. package/lib/types/schema/assets.d.ts +455 -0
  29. package/lib/types/schema/breakpoints.d.ts +56 -0
  30. package/lib/types/schema/component-meta.d.ts +12262 -0
  31. package/lib/types/schema/data-sources.d.ts +303 -0
  32. package/lib/types/schema/deployment.d.ts +41 -0
  33. package/lib/types/schema/instances.d.ts +214 -0
  34. package/lib/types/schema/pages.d.ts +676 -0
  35. package/lib/types/schema/prop-meta.d.ts +500 -0
  36. package/lib/types/schema/props.d.ts +37387 -0
  37. package/lib/types/schema/resources.d.ts +121 -0
  38. package/lib/types/schema/style-source-selections.d.ts +23 -0
  39. package/lib/types/schema/style-sources.d.ts +62 -0
  40. package/lib/types/schema/styles.d.ts +6293 -0
  41. package/lib/types/schema/webstudio.d.ts +24734 -0
  42. package/lib/types/scope.d.ts +16 -0
  43. package/lib/types/scope.test.d.ts +1 -0
  44. package/lib/types/to-string.d.ts +2 -0
  45. package/lib/types/url-pattern.d.ts +2 -0
  46. package/lib/types/url-pattern.test.d.ts +1 -0
  47. package/package.json +61 -0
@@ -0,0 +1,500 @@
1
+ import { z } from "zod";
2
+ export declare const PropMeta: z.ZodUnion<[z.ZodObject<{
3
+ control: z.ZodLiteral<"tag">;
4
+ type: z.ZodLiteral<"string">;
5
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
6
+ options: z.ZodArray<z.ZodString, "many">;
7
+ label: z.ZodOptional<z.ZodString>;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ required: z.ZodBoolean;
10
+ }, "strip", z.ZodTypeAny, {
11
+ options: string[];
12
+ type: "string";
13
+ required: boolean;
14
+ control: "tag";
15
+ label?: string | undefined;
16
+ defaultValue?: undefined;
17
+ description?: string | undefined;
18
+ }, {
19
+ options: string[];
20
+ type: "string";
21
+ required: boolean;
22
+ control: "tag";
23
+ label?: string | undefined;
24
+ defaultValue?: undefined;
25
+ description?: string | undefined;
26
+ }>, z.ZodObject<{
27
+ control: z.ZodLiteral<"number">;
28
+ type: z.ZodLiteral<"number">;
29
+ defaultValue: z.ZodOptional<z.ZodNumber>;
30
+ label: z.ZodOptional<z.ZodString>;
31
+ description: z.ZodOptional<z.ZodString>;
32
+ required: z.ZodBoolean;
33
+ }, "strip", z.ZodTypeAny, {
34
+ type: "number";
35
+ required: boolean;
36
+ control: "number";
37
+ label?: string | undefined;
38
+ defaultValue?: number | undefined;
39
+ description?: string | undefined;
40
+ }, {
41
+ type: "number";
42
+ required: boolean;
43
+ control: "number";
44
+ label?: string | undefined;
45
+ defaultValue?: number | undefined;
46
+ description?: string | undefined;
47
+ }>, z.ZodObject<{
48
+ control: z.ZodLiteral<"range">;
49
+ type: z.ZodLiteral<"number">;
50
+ defaultValue: z.ZodOptional<z.ZodNumber>;
51
+ label: z.ZodOptional<z.ZodString>;
52
+ description: z.ZodOptional<z.ZodString>;
53
+ required: z.ZodBoolean;
54
+ }, "strip", z.ZodTypeAny, {
55
+ type: "number";
56
+ required: boolean;
57
+ control: "range";
58
+ label?: string | undefined;
59
+ defaultValue?: number | undefined;
60
+ description?: string | undefined;
61
+ }, {
62
+ type: "number";
63
+ required: boolean;
64
+ control: "range";
65
+ label?: string | undefined;
66
+ defaultValue?: number | undefined;
67
+ description?: string | undefined;
68
+ }>, z.ZodObject<{
69
+ control: z.ZodLiteral<"text">;
70
+ type: z.ZodLiteral<"string">;
71
+ defaultValue: z.ZodOptional<z.ZodString>;
72
+ /**
73
+ * The number of rows in <textarea>. If set to 0 an <input> will be used instead.
74
+ * In line with Storybook team's plan: https://github.com/storybookjs/storybook/issues/21100
75
+ */
76
+ rows: z.ZodOptional<z.ZodNumber>;
77
+ label: z.ZodOptional<z.ZodString>;
78
+ description: z.ZodOptional<z.ZodString>;
79
+ required: z.ZodBoolean;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: "string";
82
+ required: boolean;
83
+ control: "text";
84
+ label?: string | undefined;
85
+ defaultValue?: string | undefined;
86
+ description?: string | undefined;
87
+ rows?: number | undefined;
88
+ }, {
89
+ type: "string";
90
+ required: boolean;
91
+ control: "text";
92
+ label?: string | undefined;
93
+ defaultValue?: string | undefined;
94
+ description?: string | undefined;
95
+ rows?: number | undefined;
96
+ }>, z.ZodObject<{
97
+ control: z.ZodLiteral<"resource">;
98
+ type: z.ZodLiteral<"resource">;
99
+ defaultValue: z.ZodOptional<z.ZodString>;
100
+ label: z.ZodOptional<z.ZodString>;
101
+ description: z.ZodOptional<z.ZodString>;
102
+ required: z.ZodBoolean;
103
+ }, "strip", z.ZodTypeAny, {
104
+ type: "resource";
105
+ required: boolean;
106
+ control: "resource";
107
+ label?: string | undefined;
108
+ defaultValue?: string | undefined;
109
+ description?: string | undefined;
110
+ }, {
111
+ type: "resource";
112
+ required: boolean;
113
+ control: "resource";
114
+ label?: string | undefined;
115
+ defaultValue?: string | undefined;
116
+ description?: string | undefined;
117
+ }>, z.ZodObject<{
118
+ control: z.ZodLiteral<"code">;
119
+ type: z.ZodLiteral<"string">;
120
+ language: z.ZodUnion<[z.ZodLiteral<"html">, z.ZodLiteral<"markdown">]>;
121
+ defaultValue: z.ZodOptional<z.ZodString>;
122
+ label: z.ZodOptional<z.ZodString>;
123
+ description: z.ZodOptional<z.ZodString>;
124
+ required: z.ZodBoolean;
125
+ }, "strip", z.ZodTypeAny, {
126
+ type: "string";
127
+ required: boolean;
128
+ control: "code";
129
+ language: "html" | "markdown";
130
+ label?: string | undefined;
131
+ defaultValue?: string | undefined;
132
+ description?: string | undefined;
133
+ }, {
134
+ type: "string";
135
+ required: boolean;
136
+ control: "code";
137
+ language: "html" | "markdown";
138
+ label?: string | undefined;
139
+ defaultValue?: string | undefined;
140
+ description?: string | undefined;
141
+ }>, z.ZodObject<{
142
+ control: z.ZodLiteral<"codetext">;
143
+ type: z.ZodLiteral<"string">;
144
+ defaultValue: z.ZodOptional<z.ZodString>;
145
+ label: z.ZodOptional<z.ZodString>;
146
+ description: z.ZodOptional<z.ZodString>;
147
+ required: z.ZodBoolean;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type: "string";
150
+ required: boolean;
151
+ control: "codetext";
152
+ label?: string | undefined;
153
+ defaultValue?: string | undefined;
154
+ description?: string | undefined;
155
+ }, {
156
+ type: "string";
157
+ required: boolean;
158
+ control: "codetext";
159
+ label?: string | undefined;
160
+ defaultValue?: string | undefined;
161
+ description?: string | undefined;
162
+ }>, z.ZodObject<{
163
+ control: z.ZodLiteral<"color">;
164
+ type: z.ZodLiteral<"string">;
165
+ defaultValue: z.ZodOptional<z.ZodString>;
166
+ label: z.ZodOptional<z.ZodString>;
167
+ description: z.ZodOptional<z.ZodString>;
168
+ required: z.ZodBoolean;
169
+ }, "strip", z.ZodTypeAny, {
170
+ type: "string";
171
+ required: boolean;
172
+ control: "color";
173
+ label?: string | undefined;
174
+ defaultValue?: string | undefined;
175
+ description?: string | undefined;
176
+ }, {
177
+ type: "string";
178
+ required: boolean;
179
+ control: "color";
180
+ label?: string | undefined;
181
+ defaultValue?: string | undefined;
182
+ description?: string | undefined;
183
+ }>, z.ZodObject<{
184
+ control: z.ZodLiteral<"boolean">;
185
+ type: z.ZodLiteral<"boolean">;
186
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
187
+ label: z.ZodOptional<z.ZodString>;
188
+ description: z.ZodOptional<z.ZodString>;
189
+ required: z.ZodBoolean;
190
+ }, "strip", z.ZodTypeAny, {
191
+ type: "boolean";
192
+ required: boolean;
193
+ control: "boolean";
194
+ label?: string | undefined;
195
+ defaultValue?: boolean | undefined;
196
+ description?: string | undefined;
197
+ }, {
198
+ type: "boolean";
199
+ required: boolean;
200
+ control: "boolean";
201
+ label?: string | undefined;
202
+ defaultValue?: boolean | undefined;
203
+ description?: string | undefined;
204
+ }>, z.ZodObject<{
205
+ control: z.ZodLiteral<"radio">;
206
+ type: z.ZodLiteral<"string">;
207
+ defaultValue: z.ZodOptional<z.ZodString>;
208
+ options: z.ZodArray<z.ZodString, "many">;
209
+ label: z.ZodOptional<z.ZodString>;
210
+ description: z.ZodOptional<z.ZodString>;
211
+ required: z.ZodBoolean;
212
+ }, "strip", z.ZodTypeAny, {
213
+ options: string[];
214
+ type: "string";
215
+ required: boolean;
216
+ control: "radio";
217
+ label?: string | undefined;
218
+ defaultValue?: string | undefined;
219
+ description?: string | undefined;
220
+ }, {
221
+ options: string[];
222
+ type: "string";
223
+ required: boolean;
224
+ control: "radio";
225
+ label?: string | undefined;
226
+ defaultValue?: string | undefined;
227
+ description?: string | undefined;
228
+ }>, z.ZodObject<{
229
+ control: z.ZodLiteral<"inline-radio">;
230
+ type: z.ZodLiteral<"string">;
231
+ defaultValue: z.ZodOptional<z.ZodString>;
232
+ options: z.ZodArray<z.ZodString, "many">;
233
+ label: z.ZodOptional<z.ZodString>;
234
+ description: z.ZodOptional<z.ZodString>;
235
+ required: z.ZodBoolean;
236
+ }, "strip", z.ZodTypeAny, {
237
+ options: string[];
238
+ type: "string";
239
+ required: boolean;
240
+ control: "inline-radio";
241
+ label?: string | undefined;
242
+ defaultValue?: string | undefined;
243
+ description?: string | undefined;
244
+ }, {
245
+ options: string[];
246
+ type: "string";
247
+ required: boolean;
248
+ control: "inline-radio";
249
+ label?: string | undefined;
250
+ defaultValue?: string | undefined;
251
+ description?: string | undefined;
252
+ }>, z.ZodObject<{
253
+ control: z.ZodLiteral<"select">;
254
+ type: z.ZodLiteral<"string">;
255
+ defaultValue: z.ZodOptional<z.ZodString>;
256
+ options: z.ZodArray<z.ZodString, "many">;
257
+ label: z.ZodOptional<z.ZodString>;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ required: z.ZodBoolean;
260
+ }, "strip", z.ZodTypeAny, {
261
+ options: string[];
262
+ type: "string";
263
+ required: boolean;
264
+ control: "select";
265
+ label?: string | undefined;
266
+ defaultValue?: string | undefined;
267
+ description?: string | undefined;
268
+ }, {
269
+ options: string[];
270
+ type: "string";
271
+ required: boolean;
272
+ control: "select";
273
+ label?: string | undefined;
274
+ defaultValue?: string | undefined;
275
+ description?: string | undefined;
276
+ }>, z.ZodObject<{
277
+ control: z.ZodLiteral<"multi-select">;
278
+ type: z.ZodLiteral<"string[]">;
279
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
280
+ options: z.ZodArray<z.ZodString, "many">;
281
+ label: z.ZodOptional<z.ZodString>;
282
+ description: z.ZodOptional<z.ZodString>;
283
+ required: z.ZodBoolean;
284
+ }, "strip", z.ZodTypeAny, {
285
+ options: string[];
286
+ type: "string[]";
287
+ required: boolean;
288
+ control: "multi-select";
289
+ label?: string | undefined;
290
+ defaultValue?: string[] | undefined;
291
+ description?: string | undefined;
292
+ }, {
293
+ options: string[];
294
+ type: "string[]";
295
+ required: boolean;
296
+ control: "multi-select";
297
+ label?: string | undefined;
298
+ defaultValue?: string[] | undefined;
299
+ description?: string | undefined;
300
+ }>, z.ZodObject<{
301
+ control: z.ZodLiteral<"check">;
302
+ type: z.ZodLiteral<"string[]">;
303
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
304
+ options: z.ZodArray<z.ZodString, "many">;
305
+ label: z.ZodOptional<z.ZodString>;
306
+ description: z.ZodOptional<z.ZodString>;
307
+ required: z.ZodBoolean;
308
+ }, "strip", z.ZodTypeAny, {
309
+ options: string[];
310
+ type: "string[]";
311
+ required: boolean;
312
+ control: "check";
313
+ label?: string | undefined;
314
+ defaultValue?: string[] | undefined;
315
+ description?: string | undefined;
316
+ }, {
317
+ options: string[];
318
+ type: "string[]";
319
+ required: boolean;
320
+ control: "check";
321
+ label?: string | undefined;
322
+ defaultValue?: string[] | undefined;
323
+ description?: string | undefined;
324
+ }>, z.ZodObject<{
325
+ control: z.ZodLiteral<"inline-check">;
326
+ type: z.ZodLiteral<"string[]">;
327
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
328
+ options: z.ZodArray<z.ZodString, "many">;
329
+ label: z.ZodOptional<z.ZodString>;
330
+ description: z.ZodOptional<z.ZodString>;
331
+ required: z.ZodBoolean;
332
+ }, "strip", z.ZodTypeAny, {
333
+ options: string[];
334
+ type: "string[]";
335
+ required: boolean;
336
+ control: "inline-check";
337
+ label?: string | undefined;
338
+ defaultValue?: string[] | undefined;
339
+ description?: string | undefined;
340
+ }, {
341
+ options: string[];
342
+ type: "string[]";
343
+ required: boolean;
344
+ control: "inline-check";
345
+ label?: string | undefined;
346
+ defaultValue?: string[] | undefined;
347
+ description?: string | undefined;
348
+ }>, z.ZodObject<{
349
+ control: z.ZodLiteral<"file">;
350
+ type: z.ZodLiteral<"string">;
351
+ defaultValue: z.ZodOptional<z.ZodString>;
352
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept */
353
+ accept: z.ZodOptional<z.ZodString>;
354
+ label: z.ZodOptional<z.ZodString>;
355
+ description: z.ZodOptional<z.ZodString>;
356
+ required: z.ZodBoolean;
357
+ }, "strip", z.ZodTypeAny, {
358
+ type: "string";
359
+ required: boolean;
360
+ control: "file";
361
+ label?: string | undefined;
362
+ defaultValue?: string | undefined;
363
+ description?: string | undefined;
364
+ accept?: string | undefined;
365
+ }, {
366
+ type: "string";
367
+ required: boolean;
368
+ control: "file";
369
+ label?: string | undefined;
370
+ defaultValue?: string | undefined;
371
+ description?: string | undefined;
372
+ accept?: string | undefined;
373
+ }>, z.ZodObject<{
374
+ control: z.ZodLiteral<"url">;
375
+ type: z.ZodLiteral<"string">;
376
+ defaultValue: z.ZodOptional<z.ZodString>;
377
+ label: z.ZodOptional<z.ZodString>;
378
+ description: z.ZodOptional<z.ZodString>;
379
+ required: z.ZodBoolean;
380
+ }, "strip", z.ZodTypeAny, {
381
+ type: "string";
382
+ required: boolean;
383
+ control: "url";
384
+ label?: string | undefined;
385
+ defaultValue?: string | undefined;
386
+ description?: string | undefined;
387
+ }, {
388
+ type: "string";
389
+ required: boolean;
390
+ control: "url";
391
+ label?: string | undefined;
392
+ defaultValue?: string | undefined;
393
+ description?: string | undefined;
394
+ }>, z.ZodObject<{
395
+ control: z.ZodLiteral<"json">;
396
+ type: z.ZodLiteral<"json">;
397
+ defaultValue: z.ZodOptional<z.ZodUnknown>;
398
+ label: z.ZodOptional<z.ZodString>;
399
+ description: z.ZodOptional<z.ZodString>;
400
+ required: z.ZodBoolean;
401
+ }, "strip", z.ZodTypeAny, {
402
+ type: "json";
403
+ required: boolean;
404
+ control: "json";
405
+ label?: string | undefined;
406
+ defaultValue?: unknown;
407
+ description?: string | undefined;
408
+ }, {
409
+ type: "json";
410
+ required: boolean;
411
+ control: "json";
412
+ label?: string | undefined;
413
+ defaultValue?: unknown;
414
+ description?: string | undefined;
415
+ }>, z.ZodObject<{
416
+ control: z.ZodLiteral<"date">;
417
+ type: z.ZodLiteral<"string">;
418
+ defaultValue: z.ZodOptional<z.ZodString>;
419
+ label: z.ZodOptional<z.ZodString>;
420
+ description: z.ZodOptional<z.ZodString>;
421
+ required: z.ZodBoolean;
422
+ }, "strip", z.ZodTypeAny, {
423
+ type: "string";
424
+ required: boolean;
425
+ control: "date";
426
+ label?: string | undefined;
427
+ defaultValue?: string | undefined;
428
+ description?: string | undefined;
429
+ }, {
430
+ type: "string";
431
+ required: boolean;
432
+ control: "date";
433
+ label?: string | undefined;
434
+ defaultValue?: string | undefined;
435
+ description?: string | undefined;
436
+ }>, z.ZodObject<{
437
+ control: z.ZodLiteral<"action">;
438
+ type: z.ZodLiteral<"action">;
439
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
440
+ label: z.ZodOptional<z.ZodString>;
441
+ description: z.ZodOptional<z.ZodString>;
442
+ required: z.ZodBoolean;
443
+ }, "strip", z.ZodTypeAny, {
444
+ type: "action";
445
+ required: boolean;
446
+ control: "action";
447
+ label?: string | undefined;
448
+ defaultValue?: undefined;
449
+ description?: string | undefined;
450
+ }, {
451
+ type: "action";
452
+ required: boolean;
453
+ control: "action";
454
+ label?: string | undefined;
455
+ defaultValue?: undefined;
456
+ description?: string | undefined;
457
+ }>, z.ZodObject<{
458
+ control: z.ZodLiteral<"textContent">;
459
+ type: z.ZodLiteral<"string">;
460
+ defaultValue: z.ZodOptional<z.ZodString>;
461
+ label: z.ZodOptional<z.ZodString>;
462
+ description: z.ZodOptional<z.ZodString>;
463
+ required: z.ZodBoolean;
464
+ }, "strip", z.ZodTypeAny, {
465
+ type: "string";
466
+ required: boolean;
467
+ control: "textContent";
468
+ label?: string | undefined;
469
+ defaultValue?: string | undefined;
470
+ description?: string | undefined;
471
+ }, {
472
+ type: "string";
473
+ required: boolean;
474
+ control: "textContent";
475
+ label?: string | undefined;
476
+ defaultValue?: string | undefined;
477
+ description?: string | undefined;
478
+ }>, z.ZodObject<{
479
+ control: z.ZodLiteral<"animationAction">;
480
+ type: z.ZodLiteral<"animationAction">;
481
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
482
+ label: z.ZodOptional<z.ZodString>;
483
+ description: z.ZodOptional<z.ZodString>;
484
+ required: z.ZodBoolean;
485
+ }, "strip", z.ZodTypeAny, {
486
+ type: "animationAction";
487
+ required: boolean;
488
+ control: "animationAction";
489
+ label?: string | undefined;
490
+ defaultValue?: undefined;
491
+ description?: string | undefined;
492
+ }, {
493
+ type: "animationAction";
494
+ required: boolean;
495
+ control: "animationAction";
496
+ label?: string | undefined;
497
+ defaultValue?: undefined;
498
+ description?: string | undefined;
499
+ }>]>;
500
+ export type PropMeta = z.infer<typeof PropMeta>;