@webstudio-is/sdk 0.189.0 → 0.191.4

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 (38) hide show
  1. package/package.json +13 -9
  2. package/lib/__generated__/normalize.css.js +0 -505
  3. package/lib/index.js +0 -1377
  4. package/lib/types/__generated__/normalize.css.d.ts +0 -57
  5. package/lib/types/expression.d.ts +0 -53
  6. package/lib/types/expression.test.d.ts +0 -1
  7. package/lib/types/form-fields.d.ts +0 -8
  8. package/lib/types/index.d.ts +0 -22
  9. package/lib/types/instances-utils.d.ts +0 -5
  10. package/lib/types/instances-utils.test.d.ts +0 -1
  11. package/lib/types/jsx.d.ts +0 -151
  12. package/lib/types/jsx.test.d.ts +0 -1
  13. package/lib/types/page-meta-generator.d.ts +0 -24
  14. package/lib/types/page-meta-generator.test.d.ts +0 -1
  15. package/lib/types/page-utils.d.ts +0 -24
  16. package/lib/types/page-utils.test.d.ts +0 -1
  17. package/lib/types/resource-loader.d.ts +0 -25
  18. package/lib/types/resource-loader.test.d.ts +0 -1
  19. package/lib/types/resources-generator.d.ts +0 -22
  20. package/lib/types/resources-generator.test.d.ts +0 -1
  21. package/lib/types/schema/assets.d.ts +0 -527
  22. package/lib/types/schema/breakpoints.d.ts +0 -56
  23. package/lib/types/schema/data-sources.d.ts +0 -303
  24. package/lib/types/schema/deployment.d.ts +0 -41
  25. package/lib/types/schema/instances.d.ts +0 -208
  26. package/lib/types/schema/pages.d.ts +0 -675
  27. package/lib/types/schema/props.d.ts +0 -549
  28. package/lib/types/schema/resources.d.ts +0 -126
  29. package/lib/types/schema/style-source-selections.d.ts +0 -23
  30. package/lib/types/schema/style-sources.d.ts +0 -62
  31. package/lib/types/schema/styles.d.ts +0 -2629
  32. package/lib/types/schema/webstudio.d.ts +0 -2374
  33. package/lib/types/scope.d.ts +0 -16
  34. package/lib/types/scope.test.d.ts +0 -1
  35. package/lib/types/testing.d.ts +0 -1
  36. package/lib/types/to-string.d.ts +0 -2
  37. package/lib/types/url-pattern.d.ts +0 -2
  38. package/lib/types/url-pattern.test.d.ts +0 -1
@@ -1,303 +0,0 @@
1
- import { z } from "zod";
2
- export declare const DataSourceVariableValue: z.ZodUnion<[z.ZodObject<{
3
- type: z.ZodLiteral<"number">;
4
- value: z.ZodNumber;
5
- }, "strip", z.ZodTypeAny, {
6
- value: number;
7
- type: "number";
8
- }, {
9
- value: number;
10
- type: "number";
11
- }>, z.ZodObject<{
12
- type: z.ZodLiteral<"string">;
13
- value: z.ZodString;
14
- }, "strip", z.ZodTypeAny, {
15
- value: string;
16
- type: "string";
17
- }, {
18
- value: string;
19
- type: "string";
20
- }>, z.ZodObject<{
21
- type: z.ZodLiteral<"boolean">;
22
- value: z.ZodBoolean;
23
- }, "strip", z.ZodTypeAny, {
24
- value: boolean;
25
- type: "boolean";
26
- }, {
27
- value: boolean;
28
- type: "boolean";
29
- }>, z.ZodObject<{
30
- type: z.ZodLiteral<"string[]">;
31
- value: z.ZodArray<z.ZodString, "many">;
32
- }, "strip", z.ZodTypeAny, {
33
- value: string[];
34
- type: "string[]";
35
- }, {
36
- value: string[];
37
- type: "string[]";
38
- }>, z.ZodObject<{
39
- type: z.ZodLiteral<"json">;
40
- value: z.ZodUnknown;
41
- }, "strip", z.ZodTypeAny, {
42
- type: "json";
43
- value?: unknown;
44
- }, {
45
- type: "json";
46
- value?: unknown;
47
- }>]>;
48
- export declare const DataSource: z.ZodUnion<[z.ZodObject<{
49
- type: z.ZodLiteral<"variable">;
50
- id: z.ZodString;
51
- scopeInstanceId: z.ZodOptional<z.ZodString>;
52
- name: z.ZodString;
53
- value: z.ZodUnion<[z.ZodObject<{
54
- type: z.ZodLiteral<"number">;
55
- value: z.ZodNumber;
56
- }, "strip", z.ZodTypeAny, {
57
- value: number;
58
- type: "number";
59
- }, {
60
- value: number;
61
- type: "number";
62
- }>, z.ZodObject<{
63
- type: z.ZodLiteral<"string">;
64
- value: z.ZodString;
65
- }, "strip", z.ZodTypeAny, {
66
- value: string;
67
- type: "string";
68
- }, {
69
- value: string;
70
- type: "string";
71
- }>, z.ZodObject<{
72
- type: z.ZodLiteral<"boolean">;
73
- value: z.ZodBoolean;
74
- }, "strip", z.ZodTypeAny, {
75
- value: boolean;
76
- type: "boolean";
77
- }, {
78
- value: boolean;
79
- type: "boolean";
80
- }>, z.ZodObject<{
81
- type: z.ZodLiteral<"string[]">;
82
- value: z.ZodArray<z.ZodString, "many">;
83
- }, "strip", z.ZodTypeAny, {
84
- value: string[];
85
- type: "string[]";
86
- }, {
87
- value: string[];
88
- type: "string[]";
89
- }>, z.ZodObject<{
90
- type: z.ZodLiteral<"json">;
91
- value: z.ZodUnknown;
92
- }, "strip", z.ZodTypeAny, {
93
- type: "json";
94
- value?: unknown;
95
- }, {
96
- type: "json";
97
- value?: unknown;
98
- }>]>;
99
- }, "strip", z.ZodTypeAny, {
100
- value: {
101
- value: number;
102
- type: "number";
103
- } | {
104
- value: string;
105
- type: "string";
106
- } | {
107
- value: boolean;
108
- type: "boolean";
109
- } | {
110
- value: string[];
111
- type: "string[]";
112
- } | {
113
- type: "json";
114
- value?: unknown;
115
- };
116
- type: "variable";
117
- id: string;
118
- name: string;
119
- scopeInstanceId?: string | undefined;
120
- }, {
121
- value: {
122
- value: number;
123
- type: "number";
124
- } | {
125
- value: string;
126
- type: "string";
127
- } | {
128
- value: boolean;
129
- type: "boolean";
130
- } | {
131
- value: string[];
132
- type: "string[]";
133
- } | {
134
- type: "json";
135
- value?: unknown;
136
- };
137
- type: "variable";
138
- id: string;
139
- name: string;
140
- scopeInstanceId?: string | undefined;
141
- }>, z.ZodObject<{
142
- type: z.ZodLiteral<"parameter">;
143
- id: z.ZodString;
144
- scopeInstanceId: z.ZodOptional<z.ZodString>;
145
- name: z.ZodString;
146
- }, "strip", z.ZodTypeAny, {
147
- type: "parameter";
148
- id: string;
149
- name: string;
150
- scopeInstanceId?: string | undefined;
151
- }, {
152
- type: "parameter";
153
- id: string;
154
- name: string;
155
- scopeInstanceId?: string | undefined;
156
- }>, z.ZodObject<{
157
- type: z.ZodLiteral<"resource">;
158
- id: z.ZodString;
159
- scopeInstanceId: z.ZodOptional<z.ZodString>;
160
- name: z.ZodString;
161
- resourceId: z.ZodString;
162
- }, "strip", z.ZodTypeAny, {
163
- type: "resource";
164
- id: string;
165
- name: string;
166
- resourceId: string;
167
- scopeInstanceId?: string | undefined;
168
- }, {
169
- type: "resource";
170
- id: string;
171
- name: string;
172
- resourceId: string;
173
- scopeInstanceId?: string | undefined;
174
- }>]>;
175
- export type DataSource = z.infer<typeof DataSource>;
176
- export declare const DataSources: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
177
- type: z.ZodLiteral<"variable">;
178
- id: z.ZodString;
179
- scopeInstanceId: z.ZodOptional<z.ZodString>;
180
- name: z.ZodString;
181
- value: z.ZodUnion<[z.ZodObject<{
182
- type: z.ZodLiteral<"number">;
183
- value: z.ZodNumber;
184
- }, "strip", z.ZodTypeAny, {
185
- value: number;
186
- type: "number";
187
- }, {
188
- value: number;
189
- type: "number";
190
- }>, z.ZodObject<{
191
- type: z.ZodLiteral<"string">;
192
- value: z.ZodString;
193
- }, "strip", z.ZodTypeAny, {
194
- value: string;
195
- type: "string";
196
- }, {
197
- value: string;
198
- type: "string";
199
- }>, z.ZodObject<{
200
- type: z.ZodLiteral<"boolean">;
201
- value: z.ZodBoolean;
202
- }, "strip", z.ZodTypeAny, {
203
- value: boolean;
204
- type: "boolean";
205
- }, {
206
- value: boolean;
207
- type: "boolean";
208
- }>, z.ZodObject<{
209
- type: z.ZodLiteral<"string[]">;
210
- value: z.ZodArray<z.ZodString, "many">;
211
- }, "strip", z.ZodTypeAny, {
212
- value: string[];
213
- type: "string[]";
214
- }, {
215
- value: string[];
216
- type: "string[]";
217
- }>, z.ZodObject<{
218
- type: z.ZodLiteral<"json">;
219
- value: z.ZodUnknown;
220
- }, "strip", z.ZodTypeAny, {
221
- type: "json";
222
- value?: unknown;
223
- }, {
224
- type: "json";
225
- value?: unknown;
226
- }>]>;
227
- }, "strip", z.ZodTypeAny, {
228
- value: {
229
- value: number;
230
- type: "number";
231
- } | {
232
- value: string;
233
- type: "string";
234
- } | {
235
- value: boolean;
236
- type: "boolean";
237
- } | {
238
- value: string[];
239
- type: "string[]";
240
- } | {
241
- type: "json";
242
- value?: unknown;
243
- };
244
- type: "variable";
245
- id: string;
246
- name: string;
247
- scopeInstanceId?: string | undefined;
248
- }, {
249
- value: {
250
- value: number;
251
- type: "number";
252
- } | {
253
- value: string;
254
- type: "string";
255
- } | {
256
- value: boolean;
257
- type: "boolean";
258
- } | {
259
- value: string[];
260
- type: "string[]";
261
- } | {
262
- type: "json";
263
- value?: unknown;
264
- };
265
- type: "variable";
266
- id: string;
267
- name: string;
268
- scopeInstanceId?: string | undefined;
269
- }>, z.ZodObject<{
270
- type: z.ZodLiteral<"parameter">;
271
- id: z.ZodString;
272
- scopeInstanceId: z.ZodOptional<z.ZodString>;
273
- name: z.ZodString;
274
- }, "strip", z.ZodTypeAny, {
275
- type: "parameter";
276
- id: string;
277
- name: string;
278
- scopeInstanceId?: string | undefined;
279
- }, {
280
- type: "parameter";
281
- id: string;
282
- name: string;
283
- scopeInstanceId?: string | undefined;
284
- }>, z.ZodObject<{
285
- type: z.ZodLiteral<"resource">;
286
- id: z.ZodString;
287
- scopeInstanceId: z.ZodOptional<z.ZodString>;
288
- name: z.ZodString;
289
- resourceId: z.ZodString;
290
- }, "strip", z.ZodTypeAny, {
291
- type: "resource";
292
- id: string;
293
- name: string;
294
- resourceId: string;
295
- scopeInstanceId?: string | undefined;
296
- }, {
297
- type: "resource";
298
- id: string;
299
- name: string;
300
- resourceId: string;
301
- scopeInstanceId?: string | undefined;
302
- }>]>>;
303
- export type DataSources = z.infer<typeof DataSources>;
@@ -1,41 +0,0 @@
1
- import { z } from "zod";
2
- export declare const Templates: z.ZodEnum<["vanilla", "vercel", "netlify-functions", "netlify-edge-functions", "ssg", "ssg-netlify", "ssg-vercel"]>;
3
- export type Templates = z.infer<typeof Templates>;
4
- export declare const Deployment: z.ZodUnion<[z.ZodObject<{
5
- destination: z.ZodLiteral<"static">;
6
- name: z.ZodString;
7
- assetsDomain: z.ZodString;
8
- templates: z.ZodArray<z.ZodEnum<["vanilla", "vercel", "netlify-functions", "netlify-edge-functions", "ssg", "ssg-netlify", "ssg-vercel"]>, "many">;
9
- }, "strip", z.ZodTypeAny, {
10
- name: string;
11
- destination: "static";
12
- assetsDomain: string;
13
- templates: ("vanilla" | "vercel" | "netlify-functions" | "netlify-edge-functions" | "ssg" | "ssg-netlify" | "ssg-vercel")[];
14
- }, {
15
- name: string;
16
- destination: "static";
17
- assetsDomain: string;
18
- templates: ("vanilla" | "vercel" | "netlify-functions" | "netlify-edge-functions" | "ssg" | "ssg-netlify" | "ssg-vercel")[];
19
- }>, z.ZodObject<{
20
- destination: z.ZodOptional<z.ZodLiteral<"saas">>;
21
- domains: z.ZodArray<z.ZodString, "many">;
22
- assetsDomain: z.ZodOptional<z.ZodString>;
23
- /**
24
- * @deprecated This field is deprecated, use `domains` instead.
25
- */
26
- projectDomain: z.ZodOptional<z.ZodString>;
27
- excludeWstdDomainFromSearch: z.ZodOptional<z.ZodBoolean>;
28
- }, "strip", z.ZodTypeAny, {
29
- domains: string[];
30
- destination?: "saas" | undefined;
31
- assetsDomain?: string | undefined;
32
- projectDomain?: string | undefined;
33
- excludeWstdDomainFromSearch?: boolean | undefined;
34
- }, {
35
- domains: string[];
36
- destination?: "saas" | undefined;
37
- assetsDomain?: string | undefined;
38
- projectDomain?: string | undefined;
39
- excludeWstdDomainFromSearch?: boolean | undefined;
40
- }>]>;
41
- export type Deployment = z.infer<typeof Deployment>;
@@ -1,208 +0,0 @@
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>;