@webstudio-is/sdk 0.197.0 → 0.199.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.
- package/lib/core-templates.js +224 -0
- package/lib/index.js +156 -0
- package/lib/types/core-metas.d.ts +748 -0
- package/lib/types/core-templates.d.ts +6 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/schema/assets.d.ts +50 -50
- package/lib/types/schema/breakpoints.d.ts +8 -8
- package/lib/types/schema/component-meta.d.ts +46 -46
- package/lib/types/schema/data-sources.d.ts +12 -12
- package/lib/types/schema/embed-template.d.ts +56 -56
- package/lib/types/schema/instances.d.ts +4 -4
- package/lib/types/schema/pages.d.ts +48 -48
- package/lib/types/schema/prop-meta.d.ts +2 -2
- package/lib/types/schema/props.d.ts +44 -44
- package/lib/types/schema/resources.d.ts +12 -12
- package/lib/types/schema/style-sources.d.ts +6 -6
- package/lib/types/schema/styles.d.ts +74 -74
- package/lib/types/schema/webstudio.d.ts +336 -336
- package/package.json +13 -7
package/lib/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./schema/webstudio";
|
|
|
13
13
|
export * from "./schema/prop-meta";
|
|
14
14
|
export * from "./schema/embed-template";
|
|
15
15
|
export * from "./schema/component-meta";
|
|
16
|
+
export * from "./core-metas";
|
|
16
17
|
export * from "./instances-utils";
|
|
17
18
|
export * from "./page-utils";
|
|
18
19
|
export * from "./scope";
|
|
@@ -57,9 +57,7 @@ export declare const FontAsset: z.ZodObject<{
|
|
|
57
57
|
createdAt: z.ZodString;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
59
|
type: "font";
|
|
60
|
-
id: string;
|
|
61
60
|
name: string;
|
|
62
|
-
format: "ttf" | "woff" | "woff2";
|
|
63
61
|
meta: ({
|
|
64
62
|
family: string;
|
|
65
63
|
style: "normal" | "italic" | "oblique";
|
|
@@ -85,15 +83,15 @@ export declare const FontAsset: z.ZodObject<{
|
|
|
85
83
|
max: number;
|
|
86
84
|
}>>;
|
|
87
85
|
} | undefined);
|
|
86
|
+
description: string | null;
|
|
87
|
+
id: string;
|
|
88
|
+
format: "ttf" | "woff" | "woff2";
|
|
88
89
|
projectId: string;
|
|
89
90
|
size: number;
|
|
90
|
-
description: string | null;
|
|
91
91
|
createdAt: string;
|
|
92
92
|
}, {
|
|
93
93
|
type: "font";
|
|
94
|
-
id: string;
|
|
95
94
|
name: string;
|
|
96
|
-
format: "ttf" | "woff" | "woff2";
|
|
97
95
|
meta: ({
|
|
98
96
|
family: string;
|
|
99
97
|
style: "normal" | "italic" | "oblique";
|
|
@@ -119,9 +117,11 @@ export declare const FontAsset: z.ZodObject<{
|
|
|
119
117
|
max: number;
|
|
120
118
|
}>>;
|
|
121
119
|
} | undefined);
|
|
120
|
+
description: string | null;
|
|
121
|
+
id: string;
|
|
122
|
+
format: "ttf" | "woff" | "woff2";
|
|
122
123
|
projectId: string;
|
|
123
124
|
size: number;
|
|
124
|
-
description: string | null;
|
|
125
125
|
createdAt: string;
|
|
126
126
|
}>;
|
|
127
127
|
export type FontAsset = z.infer<typeof FontAsset>;
|
|
@@ -129,11 +129,11 @@ export declare const ImageMeta: z.ZodObject<{
|
|
|
129
129
|
width: z.ZodNumber;
|
|
130
130
|
height: z.ZodNumber;
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
width: number;
|
|
133
132
|
height: number;
|
|
134
|
-
}, {
|
|
135
133
|
width: number;
|
|
134
|
+
}, {
|
|
136
135
|
height: number;
|
|
136
|
+
width: number;
|
|
137
137
|
}>;
|
|
138
138
|
export type ImageMeta = z.infer<typeof ImageMeta>;
|
|
139
139
|
export declare const ImageAsset: z.ZodObject<{
|
|
@@ -142,11 +142,11 @@ export declare const ImageAsset: z.ZodObject<{
|
|
|
142
142
|
width: z.ZodNumber;
|
|
143
143
|
height: z.ZodNumber;
|
|
144
144
|
}, "strip", z.ZodTypeAny, {
|
|
145
|
-
width: number;
|
|
146
145
|
height: number;
|
|
147
|
-
}, {
|
|
148
146
|
width: number;
|
|
147
|
+
}, {
|
|
149
148
|
height: number;
|
|
149
|
+
width: number;
|
|
150
150
|
}>;
|
|
151
151
|
type: z.ZodLiteral<"image">;
|
|
152
152
|
id: z.ZodString;
|
|
@@ -157,29 +157,29 @@ export declare const ImageAsset: z.ZodObject<{
|
|
|
157
157
|
createdAt: z.ZodString;
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
159
|
type: "image";
|
|
160
|
-
id: string;
|
|
161
160
|
name: string;
|
|
162
|
-
format: string;
|
|
163
161
|
meta: {
|
|
164
|
-
width: number;
|
|
165
162
|
height: number;
|
|
163
|
+
width: number;
|
|
166
164
|
};
|
|
165
|
+
description: string | null;
|
|
166
|
+
id: string;
|
|
167
|
+
format: string;
|
|
167
168
|
projectId: string;
|
|
168
169
|
size: number;
|
|
169
|
-
description: string | null;
|
|
170
170
|
createdAt: string;
|
|
171
171
|
}, {
|
|
172
172
|
type: "image";
|
|
173
|
-
id: string;
|
|
174
173
|
name: string;
|
|
175
|
-
format: string;
|
|
176
174
|
meta: {
|
|
177
|
-
width: number;
|
|
178
175
|
height: number;
|
|
176
|
+
width: number;
|
|
179
177
|
};
|
|
178
|
+
description: string | null;
|
|
179
|
+
id: string;
|
|
180
|
+
format: string;
|
|
180
181
|
projectId: string;
|
|
181
182
|
size: number;
|
|
182
|
-
description: string | null;
|
|
183
183
|
createdAt: string;
|
|
184
184
|
}>;
|
|
185
185
|
export type ImageAsset = z.infer<typeof ImageAsset>;
|
|
@@ -241,9 +241,7 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
241
241
|
createdAt: z.ZodString;
|
|
242
242
|
}, "strip", z.ZodTypeAny, {
|
|
243
243
|
type: "font";
|
|
244
|
-
id: string;
|
|
245
244
|
name: string;
|
|
246
|
-
format: "ttf" | "woff" | "woff2";
|
|
247
245
|
meta: ({
|
|
248
246
|
family: string;
|
|
249
247
|
style: "normal" | "italic" | "oblique";
|
|
@@ -269,15 +267,15 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
269
267
|
max: number;
|
|
270
268
|
}>>;
|
|
271
269
|
} | undefined);
|
|
270
|
+
description: string | null;
|
|
271
|
+
id: string;
|
|
272
|
+
format: "ttf" | "woff" | "woff2";
|
|
272
273
|
projectId: string;
|
|
273
274
|
size: number;
|
|
274
|
-
description: string | null;
|
|
275
275
|
createdAt: string;
|
|
276
276
|
}, {
|
|
277
277
|
type: "font";
|
|
278
|
-
id: string;
|
|
279
278
|
name: string;
|
|
280
|
-
format: "ttf" | "woff" | "woff2";
|
|
281
279
|
meta: ({
|
|
282
280
|
family: string;
|
|
283
281
|
style: "normal" | "italic" | "oblique";
|
|
@@ -303,9 +301,11 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
303
301
|
max: number;
|
|
304
302
|
}>>;
|
|
305
303
|
} | undefined);
|
|
304
|
+
description: string | null;
|
|
305
|
+
id: string;
|
|
306
|
+
format: "ttf" | "woff" | "woff2";
|
|
306
307
|
projectId: string;
|
|
307
308
|
size: number;
|
|
308
|
-
description: string | null;
|
|
309
309
|
createdAt: string;
|
|
310
310
|
}>, z.ZodObject<{
|
|
311
311
|
format: z.ZodString;
|
|
@@ -313,11 +313,11 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
313
313
|
width: z.ZodNumber;
|
|
314
314
|
height: z.ZodNumber;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
width: number;
|
|
317
316
|
height: number;
|
|
318
|
-
}, {
|
|
319
317
|
width: number;
|
|
318
|
+
}, {
|
|
320
319
|
height: number;
|
|
320
|
+
width: number;
|
|
321
321
|
}>;
|
|
322
322
|
type: z.ZodLiteral<"image">;
|
|
323
323
|
id: z.ZodString;
|
|
@@ -328,29 +328,29 @@ export declare const Asset: z.ZodUnion<[z.ZodObject<{
|
|
|
328
328
|
createdAt: z.ZodString;
|
|
329
329
|
}, "strip", z.ZodTypeAny, {
|
|
330
330
|
type: "image";
|
|
331
|
-
id: string;
|
|
332
331
|
name: string;
|
|
333
|
-
format: string;
|
|
334
332
|
meta: {
|
|
335
|
-
width: number;
|
|
336
333
|
height: number;
|
|
334
|
+
width: number;
|
|
337
335
|
};
|
|
336
|
+
description: string | null;
|
|
337
|
+
id: string;
|
|
338
|
+
format: string;
|
|
338
339
|
projectId: string;
|
|
339
340
|
size: number;
|
|
340
|
-
description: string | null;
|
|
341
341
|
createdAt: string;
|
|
342
342
|
}, {
|
|
343
343
|
type: "image";
|
|
344
|
-
id: string;
|
|
345
344
|
name: string;
|
|
346
|
-
format: string;
|
|
347
345
|
meta: {
|
|
348
|
-
width: number;
|
|
349
346
|
height: number;
|
|
347
|
+
width: number;
|
|
350
348
|
};
|
|
349
|
+
description: string | null;
|
|
350
|
+
id: string;
|
|
351
|
+
format: string;
|
|
351
352
|
projectId: string;
|
|
352
353
|
size: number;
|
|
353
|
-
description: string | null;
|
|
354
354
|
createdAt: string;
|
|
355
355
|
}>]>;
|
|
356
356
|
export type Asset = z.infer<typeof Asset>;
|
|
@@ -412,9 +412,7 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
412
412
|
createdAt: z.ZodString;
|
|
413
413
|
}, "strip", z.ZodTypeAny, {
|
|
414
414
|
type: "font";
|
|
415
|
-
id: string;
|
|
416
415
|
name: string;
|
|
417
|
-
format: "ttf" | "woff" | "woff2";
|
|
418
416
|
meta: ({
|
|
419
417
|
family: string;
|
|
420
418
|
style: "normal" | "italic" | "oblique";
|
|
@@ -440,15 +438,15 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
440
438
|
max: number;
|
|
441
439
|
}>>;
|
|
442
440
|
} | undefined);
|
|
441
|
+
description: string | null;
|
|
442
|
+
id: string;
|
|
443
|
+
format: "ttf" | "woff" | "woff2";
|
|
443
444
|
projectId: string;
|
|
444
445
|
size: number;
|
|
445
|
-
description: string | null;
|
|
446
446
|
createdAt: string;
|
|
447
447
|
}, {
|
|
448
448
|
type: "font";
|
|
449
|
-
id: string;
|
|
450
449
|
name: string;
|
|
451
|
-
format: "ttf" | "woff" | "woff2";
|
|
452
450
|
meta: ({
|
|
453
451
|
family: string;
|
|
454
452
|
style: "normal" | "italic" | "oblique";
|
|
@@ -474,9 +472,11 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
474
472
|
max: number;
|
|
475
473
|
}>>;
|
|
476
474
|
} | undefined);
|
|
475
|
+
description: string | null;
|
|
476
|
+
id: string;
|
|
477
|
+
format: "ttf" | "woff" | "woff2";
|
|
477
478
|
projectId: string;
|
|
478
479
|
size: number;
|
|
479
|
-
description: string | null;
|
|
480
480
|
createdAt: string;
|
|
481
481
|
}>, z.ZodObject<{
|
|
482
482
|
format: z.ZodString;
|
|
@@ -484,11 +484,11 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
484
484
|
width: z.ZodNumber;
|
|
485
485
|
height: z.ZodNumber;
|
|
486
486
|
}, "strip", z.ZodTypeAny, {
|
|
487
|
-
width: number;
|
|
488
487
|
height: number;
|
|
489
|
-
}, {
|
|
490
488
|
width: number;
|
|
489
|
+
}, {
|
|
491
490
|
height: number;
|
|
491
|
+
width: number;
|
|
492
492
|
}>;
|
|
493
493
|
type: z.ZodLiteral<"image">;
|
|
494
494
|
id: z.ZodString;
|
|
@@ -499,29 +499,29 @@ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
|
499
499
|
createdAt: z.ZodString;
|
|
500
500
|
}, "strip", z.ZodTypeAny, {
|
|
501
501
|
type: "image";
|
|
502
|
-
id: string;
|
|
503
502
|
name: string;
|
|
504
|
-
format: string;
|
|
505
503
|
meta: {
|
|
506
|
-
width: number;
|
|
507
504
|
height: number;
|
|
505
|
+
width: number;
|
|
508
506
|
};
|
|
507
|
+
description: string | null;
|
|
508
|
+
id: string;
|
|
509
|
+
format: string;
|
|
509
510
|
projectId: string;
|
|
510
511
|
size: number;
|
|
511
|
-
description: string | null;
|
|
512
512
|
createdAt: string;
|
|
513
513
|
}, {
|
|
514
514
|
type: "image";
|
|
515
|
-
id: string;
|
|
516
515
|
name: string;
|
|
517
|
-
format: string;
|
|
518
516
|
meta: {
|
|
519
|
-
width: number;
|
|
520
517
|
height: number;
|
|
518
|
+
width: number;
|
|
521
519
|
};
|
|
520
|
+
description: string | null;
|
|
521
|
+
id: string;
|
|
522
|
+
format: string;
|
|
522
523
|
projectId: string;
|
|
523
524
|
size: number;
|
|
524
|
-
description: string | null;
|
|
525
525
|
createdAt: string;
|
|
526
526
|
}>]>>;
|
|
527
527
|
export type Assets = z.infer<typeof Assets>;
|
|
@@ -5,23 +5,23 @@ export declare const Breakpoint: z.ZodEffects<z.ZodObject<{
|
|
|
5
5
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
id: string;
|
|
9
8
|
label: string;
|
|
9
|
+
id: string;
|
|
10
10
|
minWidth?: number | undefined;
|
|
11
11
|
maxWidth?: number | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
id: string;
|
|
14
13
|
label: string;
|
|
14
|
+
id: string;
|
|
15
15
|
minWidth?: number | undefined;
|
|
16
16
|
maxWidth?: number | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
id: string;
|
|
19
18
|
label: string;
|
|
19
|
+
id: string;
|
|
20
20
|
minWidth?: number | undefined;
|
|
21
21
|
maxWidth?: number | undefined;
|
|
22
22
|
}, {
|
|
23
|
-
id: string;
|
|
24
23
|
label: string;
|
|
24
|
+
id: string;
|
|
25
25
|
minWidth?: number | undefined;
|
|
26
26
|
maxWidth?: number | undefined;
|
|
27
27
|
}>;
|
|
@@ -32,23 +32,23 @@ export declare const Breakpoints: z.ZodMap<z.ZodString, z.ZodEffects<z.ZodObject
|
|
|
32
32
|
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
id: string;
|
|
36
35
|
label: string;
|
|
36
|
+
id: string;
|
|
37
37
|
minWidth?: number | undefined;
|
|
38
38
|
maxWidth?: number | undefined;
|
|
39
39
|
}, {
|
|
40
|
-
id: string;
|
|
41
40
|
label: string;
|
|
41
|
+
id: string;
|
|
42
42
|
minWidth?: number | undefined;
|
|
43
43
|
maxWidth?: number | undefined;
|
|
44
44
|
}>, {
|
|
45
|
-
id: string;
|
|
46
45
|
label: string;
|
|
46
|
+
id: string;
|
|
47
47
|
minWidth?: number | undefined;
|
|
48
48
|
maxWidth?: number | undefined;
|
|
49
49
|
}, {
|
|
50
|
-
id: string;
|
|
51
50
|
label: string;
|
|
51
|
+
id: string;
|
|
52
52
|
minWidth?: number | undefined;
|
|
53
53
|
maxWidth?: number | undefined;
|
|
54
54
|
}>>;
|