@webstudio-is/sdk 0.191.4 → 0.191.5

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 (40) hide show
  1. package/lib/__generated__/normalize.css.js +505 -0
  2. package/lib/index.js +1300 -0
  3. package/lib/runtime.js +101 -0
  4. package/lib/types/__generated__/normalize.css.d.ts +57 -0
  5. package/lib/types/expression.d.ts +53 -0
  6. package/lib/types/expression.test.d.ts +1 -0
  7. package/lib/types/form-fields.d.ts +8 -0
  8. package/lib/types/index.d.ts +19 -0
  9. package/lib/types/instances-utils.d.ts +5 -0
  10. package/lib/types/instances-utils.test.d.ts +1 -0
  11. package/lib/types/jsx.d.ts +151 -0
  12. package/lib/types/jsx.test.d.ts +1 -0
  13. package/lib/types/page-meta-generator.d.ts +24 -0
  14. package/lib/types/page-meta-generator.test.d.ts +1 -0
  15. package/lib/types/page-utils.d.ts +24 -0
  16. package/lib/types/page-utils.test.d.ts +1 -0
  17. package/lib/types/resource-loader.d.ts +30 -0
  18. package/lib/types/resource-loader.test.d.ts +1 -0
  19. package/lib/types/resources-generator.d.ts +22 -0
  20. package/lib/types/resources-generator.test.d.ts +1 -0
  21. package/lib/types/runtime.d.ts +3 -0
  22. package/lib/types/schema/assets.d.ts +527 -0
  23. package/lib/types/schema/breakpoints.d.ts +56 -0
  24. package/lib/types/schema/data-sources.d.ts +303 -0
  25. package/lib/types/schema/deployment.d.ts +41 -0
  26. package/lib/types/schema/instances.d.ts +417 -0
  27. package/lib/types/schema/pages.d.ts +675 -0
  28. package/lib/types/schema/props.d.ts +549 -0
  29. package/lib/types/schema/resources.d.ts +121 -0
  30. package/lib/types/schema/style-source-selections.d.ts +23 -0
  31. package/lib/types/schema/style-sources.d.ts +62 -0
  32. package/lib/types/schema/styles.d.ts +2629 -0
  33. package/lib/types/schema/webstudio.d.ts +2374 -0
  34. package/lib/types/scope.d.ts +16 -0
  35. package/lib/types/scope.test.d.ts +1 -0
  36. package/lib/types/testing.d.ts +1 -0
  37. package/lib/types/to-string.d.ts +2 -0
  38. package/lib/types/url-pattern.d.ts +2 -0
  39. package/lib/types/url-pattern.test.d.ts +1 -0
  40. package/package.json +3 -3
@@ -0,0 +1,417 @@
1
+ import { z } from "zod";
2
+ export declare const TextChild: z.ZodObject<{
3
+ type: z.ZodLiteral<"text">;
4
+ value: z.ZodString;
5
+ placeholder: z.ZodOptional<z.ZodBoolean>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ value: string;
8
+ type: "text";
9
+ placeholder?: boolean | undefined;
10
+ }, {
11
+ value: string;
12
+ type: "text";
13
+ placeholder?: boolean | undefined;
14
+ }>;
15
+ export type TextChild = z.infer<typeof TextChild>;
16
+ export declare const IdChild: z.ZodObject<{
17
+ type: z.ZodLiteral<"id">;
18
+ value: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ value: string;
21
+ type: "id";
22
+ }, {
23
+ value: string;
24
+ type: "id";
25
+ }>;
26
+ export type IdChild = z.infer<typeof IdChild>;
27
+ export declare const ExpressionChild: z.ZodObject<{
28
+ type: z.ZodLiteral<"expression">;
29
+ value: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ value: string;
32
+ type: "expression";
33
+ }, {
34
+ value: string;
35
+ type: "expression";
36
+ }>;
37
+ export type ExpressionChild = z.infer<typeof ExpressionChild>;
38
+ export declare const InstanceChild: z.ZodUnion<[z.ZodObject<{
39
+ type: z.ZodLiteral<"id">;
40
+ value: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ value: string;
43
+ type: "id";
44
+ }, {
45
+ value: string;
46
+ type: "id";
47
+ }>, z.ZodObject<{
48
+ type: z.ZodLiteral<"text">;
49
+ value: z.ZodString;
50
+ placeholder: z.ZodOptional<z.ZodBoolean>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ value: string;
53
+ type: "text";
54
+ placeholder?: boolean | undefined;
55
+ }, {
56
+ value: string;
57
+ type: "text";
58
+ placeholder?: boolean | undefined;
59
+ }>, z.ZodObject<{
60
+ type: z.ZodLiteral<"expression">;
61
+ value: z.ZodString;
62
+ }, "strip", z.ZodTypeAny, {
63
+ value: string;
64
+ type: "expression";
65
+ }, {
66
+ value: string;
67
+ type: "expression";
68
+ }>]>;
69
+ export declare const Instance: z.ZodObject<{
70
+ type: z.ZodLiteral<"instance">;
71
+ id: z.ZodString;
72
+ component: z.ZodString;
73
+ label: z.ZodOptional<z.ZodString>;
74
+ children: z.ZodArray<z.ZodUnion<[z.ZodObject<{
75
+ type: z.ZodLiteral<"id">;
76
+ value: z.ZodString;
77
+ }, "strip", z.ZodTypeAny, {
78
+ value: string;
79
+ type: "id";
80
+ }, {
81
+ value: string;
82
+ type: "id";
83
+ }>, z.ZodObject<{
84
+ type: z.ZodLiteral<"text">;
85
+ value: z.ZodString;
86
+ placeholder: z.ZodOptional<z.ZodBoolean>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ value: string;
89
+ type: "text";
90
+ placeholder?: boolean | undefined;
91
+ }, {
92
+ value: string;
93
+ type: "text";
94
+ placeholder?: boolean | undefined;
95
+ }>, z.ZodObject<{
96
+ type: z.ZodLiteral<"expression">;
97
+ value: z.ZodString;
98
+ }, "strip", z.ZodTypeAny, {
99
+ value: string;
100
+ type: "expression";
101
+ }, {
102
+ value: string;
103
+ type: "expression";
104
+ }>]>, "many">;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: "instance";
107
+ id: string;
108
+ children: ({
109
+ value: string;
110
+ type: "text";
111
+ placeholder?: boolean | undefined;
112
+ } | {
113
+ value: string;
114
+ type: "id";
115
+ } | {
116
+ value: string;
117
+ type: "expression";
118
+ })[];
119
+ component: string;
120
+ label?: string | undefined;
121
+ }, {
122
+ type: "instance";
123
+ id: string;
124
+ children: ({
125
+ value: string;
126
+ type: "text";
127
+ placeholder?: boolean | undefined;
128
+ } | {
129
+ value: string;
130
+ type: "id";
131
+ } | {
132
+ value: string;
133
+ type: "expression";
134
+ })[];
135
+ component: string;
136
+ label?: string | undefined;
137
+ }>;
138
+ export type Instance = z.infer<typeof Instance>;
139
+ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
140
+ type: z.ZodLiteral<"instance">;
141
+ id: z.ZodString;
142
+ component: z.ZodString;
143
+ label: z.ZodOptional<z.ZodString>;
144
+ children: z.ZodArray<z.ZodUnion<[z.ZodObject<{
145
+ type: z.ZodLiteral<"id">;
146
+ value: z.ZodString;
147
+ }, "strip", z.ZodTypeAny, {
148
+ value: string;
149
+ type: "id";
150
+ }, {
151
+ value: string;
152
+ type: "id";
153
+ }>, z.ZodObject<{
154
+ type: z.ZodLiteral<"text">;
155
+ value: z.ZodString;
156
+ placeholder: z.ZodOptional<z.ZodBoolean>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ value: string;
159
+ type: "text";
160
+ placeholder?: boolean | undefined;
161
+ }, {
162
+ value: string;
163
+ type: "text";
164
+ placeholder?: boolean | undefined;
165
+ }>, z.ZodObject<{
166
+ type: z.ZodLiteral<"expression">;
167
+ value: z.ZodString;
168
+ }, "strip", z.ZodTypeAny, {
169
+ value: string;
170
+ type: "expression";
171
+ }, {
172
+ value: string;
173
+ type: "expression";
174
+ }>]>, "many">;
175
+ }, "strip", z.ZodTypeAny, {
176
+ type: "instance";
177
+ id: string;
178
+ children: ({
179
+ value: string;
180
+ type: "text";
181
+ placeholder?: boolean | undefined;
182
+ } | {
183
+ value: string;
184
+ type: "id";
185
+ } | {
186
+ value: string;
187
+ type: "expression";
188
+ })[];
189
+ component: string;
190
+ label?: string | undefined;
191
+ }, {
192
+ type: "instance";
193
+ id: string;
194
+ children: ({
195
+ value: string;
196
+ type: "text";
197
+ placeholder?: boolean | undefined;
198
+ } | {
199
+ value: string;
200
+ type: "id";
201
+ } | {
202
+ value: string;
203
+ type: "expression";
204
+ })[];
205
+ component: string;
206
+ label?: string | undefined;
207
+ }>>;
208
+ export type Instances = z.infer<typeof Instances>;
209
+ export declare const MatcherRelation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
210
+ export type MatcherRelation = z.infer<typeof MatcherRelation>;
211
+ export declare const MatcherOperation: z.ZodObject<{
212
+ $eq: z.ZodOptional<z.ZodString>;
213
+ $neq: z.ZodOptional<z.ZodString>;
214
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
215
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ $eq?: string | undefined;
218
+ $neq?: string | undefined;
219
+ $in?: string[] | undefined;
220
+ $nin?: string[] | undefined;
221
+ }, {
222
+ $eq?: string | undefined;
223
+ $neq?: string | undefined;
224
+ $in?: string[] | undefined;
225
+ $nin?: string[] | undefined;
226
+ }>;
227
+ export type MatcherOperation = z.infer<typeof MatcherOperation>;
228
+ export declare const Matcher: z.ZodObject<{
229
+ relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
230
+ component: z.ZodOptional<z.ZodObject<{
231
+ $eq: z.ZodOptional<z.ZodString>;
232
+ $neq: z.ZodOptional<z.ZodString>;
233
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
234
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ $eq?: string | undefined;
237
+ $neq?: string | undefined;
238
+ $in?: string[] | undefined;
239
+ $nin?: string[] | undefined;
240
+ }, {
241
+ $eq?: string | undefined;
242
+ $neq?: string | undefined;
243
+ $in?: string[] | undefined;
244
+ $nin?: string[] | undefined;
245
+ }>>;
246
+ tag: z.ZodOptional<z.ZodObject<{
247
+ $eq: z.ZodOptional<z.ZodString>;
248
+ $neq: z.ZodOptional<z.ZodString>;
249
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
250
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ $eq?: string | undefined;
253
+ $neq?: string | undefined;
254
+ $in?: string[] | undefined;
255
+ $nin?: string[] | undefined;
256
+ }, {
257
+ $eq?: string | undefined;
258
+ $neq?: string | undefined;
259
+ $in?: string[] | undefined;
260
+ $nin?: string[] | undefined;
261
+ }>>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
264
+ component?: {
265
+ $eq?: string | undefined;
266
+ $neq?: string | undefined;
267
+ $in?: string[] | undefined;
268
+ $nin?: string[] | undefined;
269
+ } | undefined;
270
+ tag?: {
271
+ $eq?: string | undefined;
272
+ $neq?: string | undefined;
273
+ $in?: string[] | undefined;
274
+ $nin?: string[] | undefined;
275
+ } | undefined;
276
+ }, {
277
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
278
+ component?: {
279
+ $eq?: string | undefined;
280
+ $neq?: string | undefined;
281
+ $in?: string[] | undefined;
282
+ $nin?: string[] | undefined;
283
+ } | undefined;
284
+ tag?: {
285
+ $eq?: string | undefined;
286
+ $neq?: string | undefined;
287
+ $in?: string[] | undefined;
288
+ $nin?: string[] | undefined;
289
+ } | undefined;
290
+ }>;
291
+ export type Matcher = z.infer<typeof Matcher>;
292
+ export declare const Matchers: z.ZodUnion<[z.ZodObject<{
293
+ relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
294
+ component: z.ZodOptional<z.ZodObject<{
295
+ $eq: z.ZodOptional<z.ZodString>;
296
+ $neq: z.ZodOptional<z.ZodString>;
297
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
298
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ $eq?: string | undefined;
301
+ $neq?: string | undefined;
302
+ $in?: string[] | undefined;
303
+ $nin?: string[] | undefined;
304
+ }, {
305
+ $eq?: string | undefined;
306
+ $neq?: string | undefined;
307
+ $in?: string[] | undefined;
308
+ $nin?: string[] | undefined;
309
+ }>>;
310
+ tag: z.ZodOptional<z.ZodObject<{
311
+ $eq: z.ZodOptional<z.ZodString>;
312
+ $neq: z.ZodOptional<z.ZodString>;
313
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
314
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ $eq?: string | undefined;
317
+ $neq?: string | undefined;
318
+ $in?: string[] | undefined;
319
+ $nin?: string[] | undefined;
320
+ }, {
321
+ $eq?: string | undefined;
322
+ $neq?: string | undefined;
323
+ $in?: string[] | undefined;
324
+ $nin?: string[] | undefined;
325
+ }>>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
328
+ component?: {
329
+ $eq?: string | undefined;
330
+ $neq?: string | undefined;
331
+ $in?: string[] | undefined;
332
+ $nin?: string[] | undefined;
333
+ } | undefined;
334
+ tag?: {
335
+ $eq?: string | undefined;
336
+ $neq?: string | undefined;
337
+ $in?: string[] | undefined;
338
+ $nin?: string[] | undefined;
339
+ } | undefined;
340
+ }, {
341
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
342
+ component?: {
343
+ $eq?: string | undefined;
344
+ $neq?: string | undefined;
345
+ $in?: string[] | undefined;
346
+ $nin?: string[] | undefined;
347
+ } | undefined;
348
+ tag?: {
349
+ $eq?: string | undefined;
350
+ $neq?: string | undefined;
351
+ $in?: string[] | undefined;
352
+ $nin?: string[] | undefined;
353
+ } | undefined;
354
+ }>, z.ZodArray<z.ZodObject<{
355
+ relation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
356
+ component: z.ZodOptional<z.ZodObject<{
357
+ $eq: z.ZodOptional<z.ZodString>;
358
+ $neq: z.ZodOptional<z.ZodString>;
359
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
360
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ $eq?: string | undefined;
363
+ $neq?: string | undefined;
364
+ $in?: string[] | undefined;
365
+ $nin?: string[] | undefined;
366
+ }, {
367
+ $eq?: string | undefined;
368
+ $neq?: string | undefined;
369
+ $in?: string[] | undefined;
370
+ $nin?: string[] | undefined;
371
+ }>>;
372
+ tag: z.ZodOptional<z.ZodObject<{
373
+ $eq: z.ZodOptional<z.ZodString>;
374
+ $neq: z.ZodOptional<z.ZodString>;
375
+ $in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
376
+ $nin: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ $eq?: string | undefined;
379
+ $neq?: string | undefined;
380
+ $in?: string[] | undefined;
381
+ $nin?: string[] | undefined;
382
+ }, {
383
+ $eq?: string | undefined;
384
+ $neq?: string | undefined;
385
+ $in?: string[] | undefined;
386
+ $nin?: string[] | undefined;
387
+ }>>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
390
+ component?: {
391
+ $eq?: string | undefined;
392
+ $neq?: string | undefined;
393
+ $in?: string[] | undefined;
394
+ $nin?: string[] | undefined;
395
+ } | undefined;
396
+ tag?: {
397
+ $eq?: string | undefined;
398
+ $neq?: string | undefined;
399
+ $in?: string[] | undefined;
400
+ $nin?: string[] | undefined;
401
+ } | undefined;
402
+ }, {
403
+ relation: "ancestor" | "parent" | "self" | "child" | "descendant";
404
+ component?: {
405
+ $eq?: string | undefined;
406
+ $neq?: string | undefined;
407
+ $in?: string[] | undefined;
408
+ $nin?: string[] | undefined;
409
+ } | undefined;
410
+ tag?: {
411
+ $eq?: string | undefined;
412
+ $neq?: string | undefined;
413
+ $in?: string[] | undefined;
414
+ $nin?: string[] | undefined;
415
+ } | undefined;
416
+ }>, "many">]>;
417
+ export type Matchers = z.infer<typeof Matchers>;