@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.
- package/lib/__generated__/normalize.css.js +505 -0
- package/lib/index.js +1300 -0
- package/lib/runtime.js +101 -0
- package/lib/types/__generated__/normalize.css.d.ts +57 -0
- package/lib/types/expression.d.ts +53 -0
- package/lib/types/expression.test.d.ts +1 -0
- package/lib/types/form-fields.d.ts +8 -0
- package/lib/types/index.d.ts +19 -0
- package/lib/types/instances-utils.d.ts +5 -0
- package/lib/types/instances-utils.test.d.ts +1 -0
- package/lib/types/jsx.d.ts +151 -0
- package/lib/types/jsx.test.d.ts +1 -0
- package/lib/types/page-meta-generator.d.ts +24 -0
- package/lib/types/page-meta-generator.test.d.ts +1 -0
- package/lib/types/page-utils.d.ts +24 -0
- package/lib/types/page-utils.test.d.ts +1 -0
- package/lib/types/resource-loader.d.ts +30 -0
- package/lib/types/resource-loader.test.d.ts +1 -0
- package/lib/types/resources-generator.d.ts +22 -0
- package/lib/types/resources-generator.test.d.ts +1 -0
- package/lib/types/runtime.d.ts +3 -0
- package/lib/types/schema/assets.d.ts +527 -0
- package/lib/types/schema/breakpoints.d.ts +56 -0
- package/lib/types/schema/data-sources.d.ts +303 -0
- package/lib/types/schema/deployment.d.ts +41 -0
- package/lib/types/schema/instances.d.ts +417 -0
- package/lib/types/schema/pages.d.ts +675 -0
- package/lib/types/schema/props.d.ts +549 -0
- package/lib/types/schema/resources.d.ts +121 -0
- package/lib/types/schema/style-source-selections.d.ts +23 -0
- package/lib/types/schema/style-sources.d.ts +62 -0
- package/lib/types/schema/styles.d.ts +2629 -0
- package/lib/types/schema/webstudio.d.ts +2374 -0
- package/lib/types/scope.d.ts +16 -0
- package/lib/types/scope.test.d.ts +1 -0
- package/lib/types/testing.d.ts +1 -0
- package/lib/types/to-string.d.ts +2 -0
- package/lib/types/url-pattern.d.ts +2 -0
- package/lib/types/url-pattern.test.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,303 @@
|
|
|
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>;
|
|
@@ -0,0 +1,41 @@
|
|
|
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>;
|