@webstudio-is/sdk 0.91.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/assets.js ADDED
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { FontFormat, FontMeta } from "@webstudio-is/fonts";
3
+ const AssetId = z.string();
4
+ const baseAsset = {
5
+ id: AssetId,
6
+ projectId: z.string(),
7
+ size: z.number(),
8
+ name: z.string(),
9
+ description: z.union([z.string(), z.null()]),
10
+ createdAt: z.string()
11
+ };
12
+ const FontAsset = z.object({
13
+ ...baseAsset,
14
+ format: FontFormat,
15
+ meta: FontMeta,
16
+ type: z.literal("font")
17
+ });
18
+ const ImageMeta = z.object({
19
+ width: z.number(),
20
+ height: z.number()
21
+ });
22
+ const ImageAsset = z.object({
23
+ ...baseAsset,
24
+ format: z.string(),
25
+ meta: ImageMeta,
26
+ type: z.literal("image")
27
+ });
28
+ const Asset = z.union([FontAsset, ImageAsset]);
29
+ const Assets = z.map(AssetId, Asset);
30
+ export {
31
+ Asset,
32
+ Assets,
33
+ FontAsset,
34
+ ImageAsset,
35
+ ImageMeta
36
+ };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var assets_exports = {};
20
+ __export(assets_exports, {
21
+ Asset: () => Asset,
22
+ Assets: () => Assets,
23
+ FontAsset: () => FontAsset,
24
+ ImageAsset: () => ImageAsset,
25
+ ImageMeta: () => ImageMeta
26
+ });
27
+ module.exports = __toCommonJS(assets_exports);
28
+ var import_zod = require("zod");
29
+ var import_fonts = require("@webstudio-is/fonts");
30
+ const AssetId = import_zod.z.string();
31
+ const baseAsset = {
32
+ id: AssetId,
33
+ projectId: import_zod.z.string(),
34
+ size: import_zod.z.number(),
35
+ name: import_zod.z.string(),
36
+ description: import_zod.z.union([import_zod.z.string(), import_zod.z.null()]),
37
+ createdAt: import_zod.z.string()
38
+ };
39
+ const FontAsset = import_zod.z.object({
40
+ ...baseAsset,
41
+ format: import_fonts.FontFormat,
42
+ meta: import_fonts.FontMeta,
43
+ type: import_zod.z.literal("font")
44
+ });
45
+ const ImageMeta = import_zod.z.object({
46
+ width: import_zod.z.number(),
47
+ height: import_zod.z.number()
48
+ });
49
+ const ImageAsset = import_zod.z.object({
50
+ ...baseAsset,
51
+ format: import_zod.z.string(),
52
+ meta: ImageMeta,
53
+ type: import_zod.z.literal("image")
54
+ });
55
+ const Asset = import_zod.z.union([FontAsset, ImageAsset]);
56
+ const Assets = import_zod.z.map(AssetId, Asset);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var src_exports = {};
17
+ module.exports = __toCommonJS(src_exports);
18
+ __reExport(src_exports, require("./assets"), module.exports);
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./assets";
@@ -0,0 +1,527 @@
1
+ import { z } from "zod";
2
+ export declare const FontAsset: z.ZodObject<{
3
+ format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">, z.ZodLiteral<"otf">]>;
4
+ meta: z.ZodUnion<[z.ZodObject<{
5
+ family: z.ZodString;
6
+ style: z.ZodEnum<["normal", "italic", "oblique"]>;
7
+ weight: z.ZodNumber;
8
+ }, "strip", z.ZodTypeAny, {
9
+ style: "normal" | "italic" | "oblique";
10
+ weight: number;
11
+ family: string;
12
+ }, {
13
+ style: "normal" | "italic" | "oblique";
14
+ weight: number;
15
+ family: string;
16
+ }>, z.ZodObject<{
17
+ family: z.ZodString;
18
+ variationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
19
+ name: z.ZodString;
20
+ min: z.ZodNumber;
21
+ default: z.ZodNumber;
22
+ max: z.ZodNumber;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ min: number;
26
+ default: number;
27
+ max: number;
28
+ }, {
29
+ name: string;
30
+ min: number;
31
+ default: number;
32
+ max: number;
33
+ }>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
36
+ name: string;
37
+ min: number;
38
+ default: number;
39
+ max: number;
40
+ }>>;
41
+ family: string;
42
+ }, {
43
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
44
+ name: string;
45
+ min: number;
46
+ default: number;
47
+ max: number;
48
+ }>>;
49
+ family: string;
50
+ }>]>;
51
+ type: z.ZodLiteral<"font">;
52
+ id: z.ZodString;
53
+ projectId: z.ZodString;
54
+ size: z.ZodNumber;
55
+ name: z.ZodString;
56
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
57
+ createdAt: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ type: "font";
60
+ name: string;
61
+ format: "ttf" | "woff" | "woff2" | "otf";
62
+ meta: ({
63
+ style: "normal" | "italic" | "oblique";
64
+ weight: number;
65
+ family: string;
66
+ } | {
67
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
68
+ name: string;
69
+ min: number;
70
+ default: number;
71
+ max: number;
72
+ }>>;
73
+ family: string;
74
+ }) & ({
75
+ style: "normal" | "italic" | "oblique";
76
+ weight: number;
77
+ family: string;
78
+ } | {
79
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
80
+ name: string;
81
+ min: number;
82
+ default: number;
83
+ max: number;
84
+ }>>;
85
+ family: string;
86
+ } | undefined);
87
+ id: string;
88
+ projectId: string;
89
+ size: number;
90
+ description: string | null;
91
+ createdAt: string;
92
+ }, {
93
+ type: "font";
94
+ name: string;
95
+ format: "ttf" | "woff" | "woff2" | "otf";
96
+ meta: ({
97
+ style: "normal" | "italic" | "oblique";
98
+ weight: number;
99
+ family: string;
100
+ } | {
101
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
102
+ name: string;
103
+ min: number;
104
+ default: number;
105
+ max: number;
106
+ }>>;
107
+ family: string;
108
+ }) & ({
109
+ style: "normal" | "italic" | "oblique";
110
+ weight: number;
111
+ family: string;
112
+ } | {
113
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
114
+ name: string;
115
+ min: number;
116
+ default: number;
117
+ max: number;
118
+ }>>;
119
+ family: string;
120
+ } | undefined);
121
+ id: string;
122
+ projectId: string;
123
+ size: number;
124
+ description: string | null;
125
+ createdAt: string;
126
+ }>;
127
+ export type FontAsset = z.infer<typeof FontAsset>;
128
+ export declare const ImageMeta: z.ZodObject<{
129
+ width: z.ZodNumber;
130
+ height: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ width: number;
133
+ height: number;
134
+ }, {
135
+ width: number;
136
+ height: number;
137
+ }>;
138
+ export type ImageMeta = z.infer<typeof ImageMeta>;
139
+ export declare const ImageAsset: z.ZodObject<{
140
+ format: z.ZodString;
141
+ meta: z.ZodObject<{
142
+ width: z.ZodNumber;
143
+ height: z.ZodNumber;
144
+ }, "strip", z.ZodTypeAny, {
145
+ width: number;
146
+ height: number;
147
+ }, {
148
+ width: number;
149
+ height: number;
150
+ }>;
151
+ type: z.ZodLiteral<"image">;
152
+ id: z.ZodString;
153
+ projectId: z.ZodString;
154
+ size: z.ZodNumber;
155
+ name: z.ZodString;
156
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
157
+ createdAt: z.ZodString;
158
+ }, "strip", z.ZodTypeAny, {
159
+ type: "image";
160
+ name: string;
161
+ format: string;
162
+ meta: {
163
+ width: number;
164
+ height: number;
165
+ };
166
+ id: string;
167
+ projectId: string;
168
+ size: number;
169
+ description: string | null;
170
+ createdAt: string;
171
+ }, {
172
+ type: "image";
173
+ name: string;
174
+ format: string;
175
+ meta: {
176
+ width: number;
177
+ height: number;
178
+ };
179
+ id: string;
180
+ projectId: string;
181
+ size: number;
182
+ description: string | null;
183
+ createdAt: string;
184
+ }>;
185
+ export type ImageAsset = z.infer<typeof ImageAsset>;
186
+ export declare const Asset: z.ZodUnion<[z.ZodObject<{
187
+ format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">, z.ZodLiteral<"otf">]>;
188
+ meta: z.ZodUnion<[z.ZodObject<{
189
+ family: z.ZodString;
190
+ style: z.ZodEnum<["normal", "italic", "oblique"]>;
191
+ weight: z.ZodNumber;
192
+ }, "strip", z.ZodTypeAny, {
193
+ style: "normal" | "italic" | "oblique";
194
+ weight: number;
195
+ family: string;
196
+ }, {
197
+ style: "normal" | "italic" | "oblique";
198
+ weight: number;
199
+ family: string;
200
+ }>, z.ZodObject<{
201
+ family: z.ZodString;
202
+ variationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
203
+ name: z.ZodString;
204
+ min: z.ZodNumber;
205
+ default: z.ZodNumber;
206
+ max: z.ZodNumber;
207
+ }, "strip", z.ZodTypeAny, {
208
+ name: string;
209
+ min: number;
210
+ default: number;
211
+ max: number;
212
+ }, {
213
+ name: string;
214
+ min: number;
215
+ default: number;
216
+ max: number;
217
+ }>>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
220
+ name: string;
221
+ min: number;
222
+ default: number;
223
+ max: number;
224
+ }>>;
225
+ family: string;
226
+ }, {
227
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
228
+ name: string;
229
+ min: number;
230
+ default: number;
231
+ max: number;
232
+ }>>;
233
+ family: string;
234
+ }>]>;
235
+ type: z.ZodLiteral<"font">;
236
+ id: z.ZodString;
237
+ projectId: z.ZodString;
238
+ size: z.ZodNumber;
239
+ name: z.ZodString;
240
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
241
+ createdAt: z.ZodString;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "font";
244
+ name: string;
245
+ format: "ttf" | "woff" | "woff2" | "otf";
246
+ meta: ({
247
+ style: "normal" | "italic" | "oblique";
248
+ weight: number;
249
+ family: string;
250
+ } | {
251
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
252
+ name: string;
253
+ min: number;
254
+ default: number;
255
+ max: number;
256
+ }>>;
257
+ family: string;
258
+ }) & ({
259
+ style: "normal" | "italic" | "oblique";
260
+ weight: number;
261
+ family: string;
262
+ } | {
263
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
264
+ name: string;
265
+ min: number;
266
+ default: number;
267
+ max: number;
268
+ }>>;
269
+ family: string;
270
+ } | undefined);
271
+ id: string;
272
+ projectId: string;
273
+ size: number;
274
+ description: string | null;
275
+ createdAt: string;
276
+ }, {
277
+ type: "font";
278
+ name: string;
279
+ format: "ttf" | "woff" | "woff2" | "otf";
280
+ meta: ({
281
+ style: "normal" | "italic" | "oblique";
282
+ weight: number;
283
+ family: string;
284
+ } | {
285
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
286
+ name: string;
287
+ min: number;
288
+ default: number;
289
+ max: number;
290
+ }>>;
291
+ family: string;
292
+ }) & ({
293
+ style: "normal" | "italic" | "oblique";
294
+ weight: number;
295
+ family: string;
296
+ } | {
297
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
298
+ name: string;
299
+ min: number;
300
+ default: number;
301
+ max: number;
302
+ }>>;
303
+ family: string;
304
+ } | undefined);
305
+ id: string;
306
+ projectId: string;
307
+ size: number;
308
+ description: string | null;
309
+ createdAt: string;
310
+ }>, z.ZodObject<{
311
+ format: z.ZodString;
312
+ meta: z.ZodObject<{
313
+ width: z.ZodNumber;
314
+ height: z.ZodNumber;
315
+ }, "strip", z.ZodTypeAny, {
316
+ width: number;
317
+ height: number;
318
+ }, {
319
+ width: number;
320
+ height: number;
321
+ }>;
322
+ type: z.ZodLiteral<"image">;
323
+ id: z.ZodString;
324
+ projectId: z.ZodString;
325
+ size: z.ZodNumber;
326
+ name: z.ZodString;
327
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
328
+ createdAt: z.ZodString;
329
+ }, "strip", z.ZodTypeAny, {
330
+ type: "image";
331
+ name: string;
332
+ format: string;
333
+ meta: {
334
+ width: number;
335
+ height: number;
336
+ };
337
+ id: string;
338
+ projectId: string;
339
+ size: number;
340
+ description: string | null;
341
+ createdAt: string;
342
+ }, {
343
+ type: "image";
344
+ name: string;
345
+ format: string;
346
+ meta: {
347
+ width: number;
348
+ height: number;
349
+ };
350
+ id: string;
351
+ projectId: string;
352
+ size: number;
353
+ description: string | null;
354
+ createdAt: string;
355
+ }>]>;
356
+ export type Asset = z.infer<typeof Asset>;
357
+ export declare const Assets: z.ZodMap<z.ZodString, z.ZodUnion<[z.ZodObject<{
358
+ format: z.ZodUnion<[z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">, z.ZodLiteral<"otf">]>;
359
+ meta: z.ZodUnion<[z.ZodObject<{
360
+ family: z.ZodString;
361
+ style: z.ZodEnum<["normal", "italic", "oblique"]>;
362
+ weight: z.ZodNumber;
363
+ }, "strip", z.ZodTypeAny, {
364
+ style: "normal" | "italic" | "oblique";
365
+ weight: number;
366
+ family: string;
367
+ }, {
368
+ style: "normal" | "italic" | "oblique";
369
+ weight: number;
370
+ family: string;
371
+ }>, z.ZodObject<{
372
+ family: z.ZodString;
373
+ variationAxes: z.ZodRecord<z.ZodEnum<["wght", "wdth", "slnt", "opsz", "ital", "GRAD", "XTRA", "XOPQ", "YOPQ", "YTLC", "YTUC", "YTAS", "YTDE", "YTFI"]>, z.ZodObject<{
374
+ name: z.ZodString;
375
+ min: z.ZodNumber;
376
+ default: z.ZodNumber;
377
+ max: z.ZodNumber;
378
+ }, "strip", z.ZodTypeAny, {
379
+ name: string;
380
+ min: number;
381
+ default: number;
382
+ max: number;
383
+ }, {
384
+ name: string;
385
+ min: number;
386
+ default: number;
387
+ max: number;
388
+ }>>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
391
+ name: string;
392
+ min: number;
393
+ default: number;
394
+ max: number;
395
+ }>>;
396
+ family: string;
397
+ }, {
398
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
399
+ name: string;
400
+ min: number;
401
+ default: number;
402
+ max: number;
403
+ }>>;
404
+ family: string;
405
+ }>]>;
406
+ type: z.ZodLiteral<"font">;
407
+ id: z.ZodString;
408
+ projectId: z.ZodString;
409
+ size: z.ZodNumber;
410
+ name: z.ZodString;
411
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
412
+ createdAt: z.ZodString;
413
+ }, "strip", z.ZodTypeAny, {
414
+ type: "font";
415
+ name: string;
416
+ format: "ttf" | "woff" | "woff2" | "otf";
417
+ meta: ({
418
+ style: "normal" | "italic" | "oblique";
419
+ weight: number;
420
+ family: string;
421
+ } | {
422
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
423
+ name: string;
424
+ min: number;
425
+ default: number;
426
+ max: number;
427
+ }>>;
428
+ family: string;
429
+ }) & ({
430
+ style: "normal" | "italic" | "oblique";
431
+ weight: number;
432
+ family: string;
433
+ } | {
434
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
435
+ name: string;
436
+ min: number;
437
+ default: number;
438
+ max: number;
439
+ }>>;
440
+ family: string;
441
+ } | undefined);
442
+ id: string;
443
+ projectId: string;
444
+ size: number;
445
+ description: string | null;
446
+ createdAt: string;
447
+ }, {
448
+ type: "font";
449
+ name: string;
450
+ format: "ttf" | "woff" | "woff2" | "otf";
451
+ meta: ({
452
+ style: "normal" | "italic" | "oblique";
453
+ weight: number;
454
+ family: string;
455
+ } | {
456
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
457
+ name: string;
458
+ min: number;
459
+ default: number;
460
+ max: number;
461
+ }>>;
462
+ family: string;
463
+ }) & ({
464
+ style: "normal" | "italic" | "oblique";
465
+ weight: number;
466
+ family: string;
467
+ } | {
468
+ variationAxes: Partial<Record<"wght" | "wdth" | "slnt" | "opsz" | "ital" | "GRAD" | "XTRA" | "XOPQ" | "YOPQ" | "YTLC" | "YTUC" | "YTAS" | "YTDE" | "YTFI", {
469
+ name: string;
470
+ min: number;
471
+ default: number;
472
+ max: number;
473
+ }>>;
474
+ family: string;
475
+ } | undefined);
476
+ id: string;
477
+ projectId: string;
478
+ size: number;
479
+ description: string | null;
480
+ createdAt: string;
481
+ }>, z.ZodObject<{
482
+ format: z.ZodString;
483
+ meta: z.ZodObject<{
484
+ width: z.ZodNumber;
485
+ height: z.ZodNumber;
486
+ }, "strip", z.ZodTypeAny, {
487
+ width: number;
488
+ height: number;
489
+ }, {
490
+ width: number;
491
+ height: number;
492
+ }>;
493
+ type: z.ZodLiteral<"image">;
494
+ id: z.ZodString;
495
+ projectId: z.ZodString;
496
+ size: z.ZodNumber;
497
+ name: z.ZodString;
498
+ description: z.ZodUnion<[z.ZodString, z.ZodNull]>;
499
+ createdAt: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ type: "image";
502
+ name: string;
503
+ format: string;
504
+ meta: {
505
+ width: number;
506
+ height: number;
507
+ };
508
+ id: string;
509
+ projectId: string;
510
+ size: number;
511
+ description: string | null;
512
+ createdAt: string;
513
+ }, {
514
+ type: "image";
515
+ name: string;
516
+ format: string;
517
+ meta: {
518
+ width: number;
519
+ height: number;
520
+ };
521
+ id: string;
522
+ projectId: string;
523
+ size: number;
524
+ description: string | null;
525
+ createdAt: string;
526
+ }>]>>;
527
+ export type Assets = z.infer<typeof Assets>;
@@ -0,0 +1 @@
1
+ export * from "./assets";
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@webstudio-is/sdk",
3
+ "version": "0.91.0",
4
+ "description": "Webstudio site data schema",
5
+ "author": "Webstudio <github@webstudio.is>",
6
+ "homepage": "https://webstudio.is",
7
+ "license": "AGPL-3.0-or-later",
8
+ "type": "module",
9
+ "exports": {
10
+ "source": "./src/index.ts",
11
+ "types": "./lib/types/index.d.ts",
12
+ "import": "./lib/index.js",
13
+ "require": "./lib/cjs/index.js"
14
+ },
15
+ "files": [
16
+ "lib/*",
17
+ "src/*",
18
+ "!*.test.*"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "zod": "^3.21.4",
23
+ "@webstudio-is/fonts": "^0.91.0"
24
+ },
25
+ "devDependencies": {
26
+ "@webstudio-is/scripts": "^0.0.0",
27
+ "@webstudio-is/tsconfig": "^1.0.7"
28
+ },
29
+ "scripts": {
30
+ "typecheck": "tsc",
31
+ "checks": "pnpm typecheck",
32
+ "dev": "build-package --watch",
33
+ "build": "build-package",
34
+ "dts": "tsc --project tsconfig.dts.json"
35
+ }
36
+ }