@webstudio-is/sdk 0.196.0 → 0.197.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.
@@ -0,0 +1,434 @@
1
+ import { z } from "zod";
2
+ export declare const PropMeta: z.ZodUnion<[z.ZodObject<{
3
+ control: z.ZodLiteral<"number">;
4
+ type: z.ZodLiteral<"number">;
5
+ defaultValue: z.ZodOptional<z.ZodNumber>;
6
+ label: z.ZodOptional<z.ZodString>;
7
+ description: z.ZodOptional<z.ZodString>;
8
+ required: z.ZodBoolean;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: "number";
11
+ required: boolean;
12
+ control: "number";
13
+ defaultValue?: number | undefined;
14
+ label?: string | undefined;
15
+ description?: string | undefined;
16
+ }, {
17
+ type: "number";
18
+ required: boolean;
19
+ control: "number";
20
+ defaultValue?: number | undefined;
21
+ label?: string | undefined;
22
+ description?: string | undefined;
23
+ }>, z.ZodObject<{
24
+ control: z.ZodLiteral<"range">;
25
+ type: z.ZodLiteral<"number">;
26
+ defaultValue: z.ZodOptional<z.ZodNumber>;
27
+ label: z.ZodOptional<z.ZodString>;
28
+ description: z.ZodOptional<z.ZodString>;
29
+ required: z.ZodBoolean;
30
+ }, "strip", z.ZodTypeAny, {
31
+ type: "number";
32
+ required: boolean;
33
+ control: "range";
34
+ defaultValue?: number | undefined;
35
+ label?: string | undefined;
36
+ description?: string | undefined;
37
+ }, {
38
+ type: "number";
39
+ required: boolean;
40
+ control: "range";
41
+ defaultValue?: number | undefined;
42
+ label?: string | undefined;
43
+ description?: string | undefined;
44
+ }>, z.ZodObject<{
45
+ control: z.ZodLiteral<"text">;
46
+ type: z.ZodLiteral<"string">;
47
+ defaultValue: z.ZodOptional<z.ZodString>;
48
+ /**
49
+ * The number of rows in <textarea>. If set to 0 an <input> will be used instead.
50
+ * In line with Storybook team's plan: https://github.com/storybookjs/storybook/issues/21100
51
+ */
52
+ rows: z.ZodOptional<z.ZodNumber>;
53
+ label: z.ZodOptional<z.ZodString>;
54
+ description: z.ZodOptional<z.ZodString>;
55
+ required: z.ZodBoolean;
56
+ }, "strip", z.ZodTypeAny, {
57
+ type: "string";
58
+ required: boolean;
59
+ control: "text";
60
+ defaultValue?: string | undefined;
61
+ rows?: number | undefined;
62
+ label?: string | undefined;
63
+ description?: string | undefined;
64
+ }, {
65
+ type: "string";
66
+ required: boolean;
67
+ control: "text";
68
+ defaultValue?: string | undefined;
69
+ rows?: number | undefined;
70
+ label?: string | undefined;
71
+ description?: string | undefined;
72
+ }>, z.ZodObject<{
73
+ control: z.ZodLiteral<"code">;
74
+ type: z.ZodLiteral<"string">;
75
+ language: z.ZodUnion<[z.ZodLiteral<"html">, z.ZodLiteral<"markdown">]>;
76
+ defaultValue: z.ZodOptional<z.ZodString>;
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
+ language: "html" | "markdown";
84
+ control: "code";
85
+ defaultValue?: string | undefined;
86
+ label?: string | undefined;
87
+ description?: string | undefined;
88
+ }, {
89
+ type: "string";
90
+ required: boolean;
91
+ language: "html" | "markdown";
92
+ control: "code";
93
+ defaultValue?: string | undefined;
94
+ label?: string | undefined;
95
+ description?: string | undefined;
96
+ }>, z.ZodObject<{
97
+ control: z.ZodLiteral<"codetext">;
98
+ type: z.ZodLiteral<"string">;
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: "string";
105
+ required: boolean;
106
+ control: "codetext";
107
+ defaultValue?: string | undefined;
108
+ label?: string | undefined;
109
+ description?: string | undefined;
110
+ }, {
111
+ type: "string";
112
+ required: boolean;
113
+ control: "codetext";
114
+ defaultValue?: string | undefined;
115
+ label?: string | undefined;
116
+ description?: string | undefined;
117
+ }>, z.ZodObject<{
118
+ control: z.ZodLiteral<"color">;
119
+ type: z.ZodLiteral<"string">;
120
+ defaultValue: z.ZodOptional<z.ZodString>;
121
+ label: z.ZodOptional<z.ZodString>;
122
+ description: z.ZodOptional<z.ZodString>;
123
+ required: z.ZodBoolean;
124
+ }, "strip", z.ZodTypeAny, {
125
+ type: "string";
126
+ required: boolean;
127
+ control: "color";
128
+ defaultValue?: string | undefined;
129
+ label?: string | undefined;
130
+ description?: string | undefined;
131
+ }, {
132
+ type: "string";
133
+ required: boolean;
134
+ control: "color";
135
+ defaultValue?: string | undefined;
136
+ label?: string | undefined;
137
+ description?: string | undefined;
138
+ }>, z.ZodObject<{
139
+ control: z.ZodLiteral<"boolean">;
140
+ type: z.ZodLiteral<"boolean">;
141
+ defaultValue: z.ZodOptional<z.ZodBoolean>;
142
+ label: z.ZodOptional<z.ZodString>;
143
+ description: z.ZodOptional<z.ZodString>;
144
+ required: z.ZodBoolean;
145
+ }, "strip", z.ZodTypeAny, {
146
+ type: "boolean";
147
+ required: boolean;
148
+ control: "boolean";
149
+ defaultValue?: boolean | undefined;
150
+ label?: string | undefined;
151
+ description?: string | undefined;
152
+ }, {
153
+ type: "boolean";
154
+ required: boolean;
155
+ control: "boolean";
156
+ defaultValue?: boolean | undefined;
157
+ label?: string | undefined;
158
+ description?: string | undefined;
159
+ }>, z.ZodObject<{
160
+ control: z.ZodLiteral<"radio">;
161
+ type: z.ZodLiteral<"string">;
162
+ defaultValue: z.ZodOptional<z.ZodString>;
163
+ options: z.ZodArray<z.ZodString, "many">;
164
+ label: z.ZodOptional<z.ZodString>;
165
+ description: z.ZodOptional<z.ZodString>;
166
+ required: z.ZodBoolean;
167
+ }, "strip", z.ZodTypeAny, {
168
+ options: string[];
169
+ type: "string";
170
+ required: boolean;
171
+ control: "radio";
172
+ defaultValue?: string | undefined;
173
+ label?: string | undefined;
174
+ description?: string | undefined;
175
+ }, {
176
+ options: string[];
177
+ type: "string";
178
+ required: boolean;
179
+ control: "radio";
180
+ defaultValue?: string | undefined;
181
+ label?: string | undefined;
182
+ description?: string | undefined;
183
+ }>, z.ZodObject<{
184
+ control: z.ZodLiteral<"inline-radio">;
185
+ type: z.ZodLiteral<"string">;
186
+ defaultValue: z.ZodOptional<z.ZodString>;
187
+ options: z.ZodArray<z.ZodString, "many">;
188
+ label: z.ZodOptional<z.ZodString>;
189
+ description: z.ZodOptional<z.ZodString>;
190
+ required: z.ZodBoolean;
191
+ }, "strip", z.ZodTypeAny, {
192
+ options: string[];
193
+ type: "string";
194
+ required: boolean;
195
+ control: "inline-radio";
196
+ defaultValue?: string | undefined;
197
+ label?: string | undefined;
198
+ description?: string | undefined;
199
+ }, {
200
+ options: string[];
201
+ type: "string";
202
+ required: boolean;
203
+ control: "inline-radio";
204
+ defaultValue?: string | undefined;
205
+ label?: string | undefined;
206
+ description?: string | undefined;
207
+ }>, z.ZodObject<{
208
+ control: z.ZodLiteral<"select">;
209
+ type: z.ZodLiteral<"string">;
210
+ defaultValue: z.ZodOptional<z.ZodString>;
211
+ options: z.ZodArray<z.ZodString, "many">;
212
+ label: z.ZodOptional<z.ZodString>;
213
+ description: z.ZodOptional<z.ZodString>;
214
+ required: z.ZodBoolean;
215
+ }, "strip", z.ZodTypeAny, {
216
+ options: string[];
217
+ type: "string";
218
+ required: boolean;
219
+ control: "select";
220
+ defaultValue?: string | undefined;
221
+ label?: string | undefined;
222
+ description?: string | undefined;
223
+ }, {
224
+ options: string[];
225
+ type: "string";
226
+ required: boolean;
227
+ control: "select";
228
+ defaultValue?: string | undefined;
229
+ label?: string | undefined;
230
+ description?: string | undefined;
231
+ }>, z.ZodObject<{
232
+ control: z.ZodLiteral<"multi-select">;
233
+ type: z.ZodLiteral<"string[]">;
234
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
235
+ options: z.ZodArray<z.ZodString, "many">;
236
+ label: z.ZodOptional<z.ZodString>;
237
+ description: z.ZodOptional<z.ZodString>;
238
+ required: z.ZodBoolean;
239
+ }, "strip", z.ZodTypeAny, {
240
+ options: string[];
241
+ type: "string[]";
242
+ required: boolean;
243
+ control: "multi-select";
244
+ defaultValue?: string[] | undefined;
245
+ label?: string | undefined;
246
+ description?: string | undefined;
247
+ }, {
248
+ options: string[];
249
+ type: "string[]";
250
+ required: boolean;
251
+ control: "multi-select";
252
+ defaultValue?: string[] | undefined;
253
+ label?: string | undefined;
254
+ description?: string | undefined;
255
+ }>, z.ZodObject<{
256
+ control: z.ZodLiteral<"check">;
257
+ type: z.ZodLiteral<"string[]">;
258
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
259
+ options: z.ZodArray<z.ZodString, "many">;
260
+ label: z.ZodOptional<z.ZodString>;
261
+ description: z.ZodOptional<z.ZodString>;
262
+ required: z.ZodBoolean;
263
+ }, "strip", z.ZodTypeAny, {
264
+ options: string[];
265
+ type: "string[]";
266
+ required: boolean;
267
+ control: "check";
268
+ defaultValue?: string[] | undefined;
269
+ label?: string | undefined;
270
+ description?: string | undefined;
271
+ }, {
272
+ options: string[];
273
+ type: "string[]";
274
+ required: boolean;
275
+ control: "check";
276
+ defaultValue?: string[] | undefined;
277
+ label?: string | undefined;
278
+ description?: string | undefined;
279
+ }>, z.ZodObject<{
280
+ control: z.ZodLiteral<"inline-check">;
281
+ type: z.ZodLiteral<"string[]">;
282
+ defaultValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
283
+ options: z.ZodArray<z.ZodString, "many">;
284
+ label: z.ZodOptional<z.ZodString>;
285
+ description: z.ZodOptional<z.ZodString>;
286
+ required: z.ZodBoolean;
287
+ }, "strip", z.ZodTypeAny, {
288
+ options: string[];
289
+ type: "string[]";
290
+ required: boolean;
291
+ control: "inline-check";
292
+ defaultValue?: string[] | undefined;
293
+ label?: string | undefined;
294
+ description?: string | undefined;
295
+ }, {
296
+ options: string[];
297
+ type: "string[]";
298
+ required: boolean;
299
+ control: "inline-check";
300
+ defaultValue?: string[] | undefined;
301
+ label?: string | undefined;
302
+ description?: string | undefined;
303
+ }>, z.ZodObject<{
304
+ control: z.ZodLiteral<"file">;
305
+ type: z.ZodLiteral<"string">;
306
+ defaultValue: z.ZodOptional<z.ZodString>;
307
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept */
308
+ accept: z.ZodOptional<z.ZodString>;
309
+ label: z.ZodOptional<z.ZodString>;
310
+ description: z.ZodOptional<z.ZodString>;
311
+ required: z.ZodBoolean;
312
+ }, "strip", z.ZodTypeAny, {
313
+ type: "string";
314
+ required: boolean;
315
+ control: "file";
316
+ defaultValue?: string | undefined;
317
+ accept?: string | undefined;
318
+ label?: string | undefined;
319
+ description?: string | undefined;
320
+ }, {
321
+ type: "string";
322
+ required: boolean;
323
+ control: "file";
324
+ defaultValue?: string | undefined;
325
+ accept?: string | undefined;
326
+ label?: string | undefined;
327
+ description?: string | undefined;
328
+ }>, z.ZodObject<{
329
+ control: z.ZodLiteral<"url">;
330
+ type: z.ZodLiteral<"string">;
331
+ defaultValue: z.ZodOptional<z.ZodString>;
332
+ label: z.ZodOptional<z.ZodString>;
333
+ description: z.ZodOptional<z.ZodString>;
334
+ required: z.ZodBoolean;
335
+ }, "strip", z.ZodTypeAny, {
336
+ type: "string";
337
+ required: boolean;
338
+ control: "url";
339
+ defaultValue?: string | undefined;
340
+ label?: string | undefined;
341
+ description?: string | undefined;
342
+ }, {
343
+ type: "string";
344
+ required: boolean;
345
+ control: "url";
346
+ defaultValue?: string | undefined;
347
+ label?: string | undefined;
348
+ description?: string | undefined;
349
+ }>, z.ZodObject<{
350
+ control: z.ZodLiteral<"json">;
351
+ type: z.ZodLiteral<"json">;
352
+ defaultValue: z.ZodOptional<z.ZodUnknown>;
353
+ label: z.ZodOptional<z.ZodString>;
354
+ description: z.ZodOptional<z.ZodString>;
355
+ required: z.ZodBoolean;
356
+ }, "strip", z.ZodTypeAny, {
357
+ type: "json";
358
+ required: boolean;
359
+ control: "json";
360
+ defaultValue?: unknown;
361
+ label?: string | undefined;
362
+ description?: string | undefined;
363
+ }, {
364
+ type: "json";
365
+ required: boolean;
366
+ control: "json";
367
+ defaultValue?: unknown;
368
+ label?: string | undefined;
369
+ description?: string | undefined;
370
+ }>, z.ZodObject<{
371
+ control: z.ZodLiteral<"date">;
372
+ type: z.ZodLiteral<"string">;
373
+ defaultValue: z.ZodOptional<z.ZodString>;
374
+ label: z.ZodOptional<z.ZodString>;
375
+ description: z.ZodOptional<z.ZodString>;
376
+ required: z.ZodBoolean;
377
+ }, "strip", z.ZodTypeAny, {
378
+ type: "string";
379
+ required: boolean;
380
+ control: "date";
381
+ defaultValue?: string | undefined;
382
+ label?: string | undefined;
383
+ description?: string | undefined;
384
+ }, {
385
+ type: "string";
386
+ required: boolean;
387
+ control: "date";
388
+ defaultValue?: string | undefined;
389
+ label?: string | undefined;
390
+ description?: string | undefined;
391
+ }>, z.ZodObject<{
392
+ control: z.ZodLiteral<"action">;
393
+ type: z.ZodLiteral<"action">;
394
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
395
+ label: z.ZodOptional<z.ZodString>;
396
+ description: z.ZodOptional<z.ZodString>;
397
+ required: z.ZodBoolean;
398
+ }, "strip", z.ZodTypeAny, {
399
+ type: "action";
400
+ required: boolean;
401
+ control: "action";
402
+ defaultValue?: undefined;
403
+ label?: string | undefined;
404
+ description?: string | undefined;
405
+ }, {
406
+ type: "action";
407
+ required: boolean;
408
+ control: "action";
409
+ defaultValue?: undefined;
410
+ label?: string | undefined;
411
+ description?: string | undefined;
412
+ }>, z.ZodObject<{
413
+ control: z.ZodLiteral<"textContent">;
414
+ type: z.ZodLiteral<"string">;
415
+ defaultValue: z.ZodOptional<z.ZodString>;
416
+ label: z.ZodOptional<z.ZodString>;
417
+ description: z.ZodOptional<z.ZodString>;
418
+ required: z.ZodBoolean;
419
+ }, "strip", z.ZodTypeAny, {
420
+ type: "string";
421
+ required: boolean;
422
+ control: "textContent";
423
+ defaultValue?: string | undefined;
424
+ label?: string | undefined;
425
+ description?: string | undefined;
426
+ }, {
427
+ type: "string";
428
+ required: boolean;
429
+ control: "textContent";
430
+ defaultValue?: string | undefined;
431
+ label?: string | undefined;
432
+ description?: string | undefined;
433
+ }>]>;
434
+ export type PropMeta = z.infer<typeof PropMeta>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.196.0",
3
+ "version": "0.197.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -29,20 +29,19 @@
29
29
  ],
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "acorn": "^8.12.1",
32
+ "acorn": "^8.14.0",
33
33
  "acorn-walk": "^8.3.4",
34
34
  "reserved-identifiers": "^1.0.0",
35
- "type-fest": "^4.28.0",
35
+ "type-fest": "^4.31.0",
36
36
  "zod": "^3.22.4",
37
- "@webstudio-is/css-engine": "0.196.0",
38
- "@webstudio-is/fonts": "0.196.0"
37
+ "@webstudio-is/css-engine": "0.197.0",
38
+ "@webstudio-is/fonts": "0.197.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "html-tags": "^4.0.0",
42
- "strip-indent": "^4.0.0",
43
42
  "vitest": "^2.1.8",
44
- "@webstudio-is/template": "0.196.0",
45
43
  "@webstudio-is/css-data": "0.0.0",
44
+ "@webstudio-is/template": "0.197.0",
46
45
  "@webstudio-is/tsconfig": "1.0.7"
47
46
  },
48
47
  "scripts": {