@polotno/schema 0.11.0 → 0.13.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/README.md +4 -0
- package/lib/defaults.d.ts +32 -16
- package/lib/defaults.js +26 -7
- package/lib/design.schema.json +1 -1
- package/lib/errors.d.ts +2 -2
- package/lib/errors.js +2 -2
- package/lib/migrate.js +1 -1
- package/lib/normalize.js +39 -5
- package/lib/schema.d.ts +246 -166
- package/lib/schema.js +47 -12
- package/lib/types.d.ts +6 -3
- package/package.json +4 -5
package/lib/schema.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const CURRENT_SCHEMA_VERSION = 5;
|
|
3
|
-
export declare const ELEMENT_TYPES: readonly [
|
|
3
|
+
export declare const ELEMENT_TYPES: readonly ['text', 'image', 'svg', 'line', 'figure', 'gif', 'lottie', 'video', 'table', 'group'];
|
|
4
4
|
/** Non-strict: strips unknown keys, fills defaults. `normalizeDesign` uses this. */
|
|
5
5
|
export declare const designSchemaLenient: z.ZodObject<{
|
|
6
6
|
schemaVersion: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
width: z.ZodDefault<z.ZodNumber>;
|
|
8
8
|
height: z.ZodDefault<z.ZodNumber>;
|
|
9
9
|
unit: z.ZodDefault<z.ZodEnum<{
|
|
10
|
+
cm: "cm";
|
|
10
11
|
in: "in";
|
|
11
|
-
px: "px";
|
|
12
|
-
pt: "pt";
|
|
13
12
|
mm: "mm";
|
|
14
|
-
|
|
13
|
+
pt: "pt";
|
|
14
|
+
px: "px";
|
|
15
15
|
}>>;
|
|
16
16
|
dpi: z.ZodDefault<z.ZodNumber>;
|
|
17
17
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -67,11 +67,11 @@ export declare const designSchemaCanonical: z.ZodObject<{
|
|
|
67
67
|
width: z.ZodDefault<z.ZodNumber>;
|
|
68
68
|
height: z.ZodDefault<z.ZodNumber>;
|
|
69
69
|
unit: z.ZodDefault<z.ZodEnum<{
|
|
70
|
+
cm: "cm";
|
|
70
71
|
in: "in";
|
|
71
|
-
px: "px";
|
|
72
|
-
pt: "pt";
|
|
73
72
|
mm: "mm";
|
|
74
|
-
|
|
73
|
+
pt: "pt";
|
|
74
|
+
px: "px";
|
|
75
75
|
}>>;
|
|
76
76
|
dpi: z.ZodDefault<z.ZodNumber>;
|
|
77
77
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -118,6 +118,68 @@ export declare const designSchemaCanonical: z.ZodObject<{
|
|
|
118
118
|
*/
|
|
119
119
|
export declare const leafSchemas: {
|
|
120
120
|
text: z.ZodObject<{
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
name: z.ZodDefault<z.ZodString>;
|
|
123
|
+
custom: z.ZodOptional<z.ZodUnknown>;
|
|
124
|
+
x: z.ZodDefault<z.ZodNumber>;
|
|
125
|
+
y: z.ZodDefault<z.ZodNumber>;
|
|
126
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
128
|
+
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
color: "color";
|
|
130
|
+
"color-burn": "color-burn";
|
|
131
|
+
"color-dodge": "color-dodge";
|
|
132
|
+
darken: "darken";
|
|
133
|
+
difference: "difference";
|
|
134
|
+
exclusion: "exclusion";
|
|
135
|
+
"hard-light": "hard-light";
|
|
136
|
+
hue: "hue";
|
|
137
|
+
lighten: "lighten";
|
|
138
|
+
luminosity: "luminosity";
|
|
139
|
+
multiply: "multiply";
|
|
140
|
+
normal: "normal";
|
|
141
|
+
overlay: "overlay";
|
|
142
|
+
saturation: "saturation";
|
|
143
|
+
screen: "screen";
|
|
144
|
+
"soft-light": "soft-light";
|
|
145
|
+
}>>;
|
|
146
|
+
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
147
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
148
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
149
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
150
|
+
type: z.ZodEnum<{
|
|
151
|
+
enter: "enter";
|
|
152
|
+
exit: "exit";
|
|
153
|
+
loop: "loop";
|
|
154
|
+
}>;
|
|
155
|
+
name: z.ZodDefault<z.ZodString>;
|
|
156
|
+
data: z.ZodDefault<z.ZodUnknown>;
|
|
157
|
+
easing: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>>>;
|
|
159
|
+
blurEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
160
|
+
blurRadius: z.ZodDefault<z.ZodNumber>;
|
|
161
|
+
brightnessEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
162
|
+
brightness: z.ZodDefault<z.ZodNumber>;
|
|
163
|
+
sepiaEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
164
|
+
grayscaleEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
165
|
+
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
166
|
+
intensity: z.ZodDefault<z.ZodNumber>;
|
|
167
|
+
}, z.core.$strip>>>;
|
|
168
|
+
shadowEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
169
|
+
shadowBlur: z.ZodDefault<z.ZodNumber>;
|
|
170
|
+
shadowOffsetX: z.ZodDefault<z.ZodNumber>;
|
|
171
|
+
shadowOffsetY: z.ZodDefault<z.ZodNumber>;
|
|
172
|
+
shadowColor: z.ZodDefault<z.ZodString>;
|
|
173
|
+
shadowOpacity: z.ZodDefault<z.ZodNumber>;
|
|
174
|
+
visible: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
+
draggable: z.ZodDefault<z.ZodBoolean>;
|
|
176
|
+
resizable: z.ZodDefault<z.ZodBoolean>;
|
|
177
|
+
selectable: z.ZodDefault<z.ZodBoolean>;
|
|
178
|
+
removable: z.ZodDefault<z.ZodBoolean>;
|
|
179
|
+
contentEditable: z.ZodDefault<z.ZodBoolean>;
|
|
180
|
+
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
181
|
+
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
182
|
+
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
121
183
|
type: z.ZodLiteral<"text">;
|
|
122
184
|
text: z.ZodDefault<z.ZodString>;
|
|
123
185
|
placeholder: z.ZodDefault<z.ZodString>;
|
|
@@ -151,30 +213,34 @@ export declare const leafSchemas: {
|
|
|
151
213
|
maxLines: z.ZodOptional<z.ZodNumber>;
|
|
152
214
|
minFontSize: z.ZodOptional<z.ZodNumber>;
|
|
153
215
|
maxFontSize: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
image: z.ZodObject<{
|
|
154
218
|
id: z.ZodString;
|
|
155
219
|
name: z.ZodDefault<z.ZodString>;
|
|
156
220
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
157
221
|
x: z.ZodDefault<z.ZodNumber>;
|
|
158
222
|
y: z.ZodDefault<z.ZodNumber>;
|
|
223
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
224
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
159
225
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
160
226
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
161
227
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
|
|
163
|
-
multiply: "multiply";
|
|
164
|
-
screen: "screen";
|
|
165
|
-
overlay: "overlay";
|
|
166
|
-
darken: "darken";
|
|
167
|
-
lighten: "lighten";
|
|
168
|
-
"color-dodge": "color-dodge";
|
|
228
|
+
color: "color";
|
|
169
229
|
"color-burn": "color-burn";
|
|
170
|
-
"
|
|
171
|
-
|
|
230
|
+
"color-dodge": "color-dodge";
|
|
231
|
+
darken: "darken";
|
|
172
232
|
difference: "difference";
|
|
173
233
|
exclusion: "exclusion";
|
|
234
|
+
"hard-light": "hard-light";
|
|
174
235
|
hue: "hue";
|
|
175
|
-
|
|
176
|
-
color: "color";
|
|
236
|
+
lighten: "lighten";
|
|
177
237
|
luminosity: "luminosity";
|
|
238
|
+
multiply: "multiply";
|
|
239
|
+
normal: "normal";
|
|
240
|
+
overlay: "overlay";
|
|
241
|
+
saturation: "saturation";
|
|
242
|
+
screen: "screen";
|
|
243
|
+
"soft-light": "soft-light";
|
|
178
244
|
}>>;
|
|
179
245
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
180
246
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -213,9 +279,6 @@ export declare const leafSchemas: {
|
|
|
213
279
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
214
280
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
215
281
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
216
|
-
}, z.core.$strip>;
|
|
217
|
-
image: z.ZodObject<{
|
|
218
|
-
type: z.ZodLiteral<"image">;
|
|
219
282
|
src: z.ZodDefault<z.ZodString>;
|
|
220
283
|
cropX: z.ZodDefault<z.ZodNumber>;
|
|
221
284
|
cropY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -229,6 +292,9 @@ export declare const leafSchemas: {
|
|
|
229
292
|
borderSize: z.ZodDefault<z.ZodNumber>;
|
|
230
293
|
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
231
294
|
stretchEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
295
|
+
type: z.ZodLiteral<"image">;
|
|
296
|
+
}, z.core.$strip>;
|
|
297
|
+
svg: z.ZodObject<{
|
|
232
298
|
id: z.ZodString;
|
|
233
299
|
name: z.ZodDefault<z.ZodString>;
|
|
234
300
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -239,22 +305,22 @@ export declare const leafSchemas: {
|
|
|
239
305
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
240
306
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
241
307
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
242
|
-
|
|
243
|
-
multiply: "multiply";
|
|
244
|
-
screen: "screen";
|
|
245
|
-
overlay: "overlay";
|
|
246
|
-
darken: "darken";
|
|
247
|
-
lighten: "lighten";
|
|
248
|
-
"color-dodge": "color-dodge";
|
|
308
|
+
color: "color";
|
|
249
309
|
"color-burn": "color-burn";
|
|
250
|
-
"
|
|
251
|
-
|
|
310
|
+
"color-dodge": "color-dodge";
|
|
311
|
+
darken: "darken";
|
|
252
312
|
difference: "difference";
|
|
253
313
|
exclusion: "exclusion";
|
|
314
|
+
"hard-light": "hard-light";
|
|
254
315
|
hue: "hue";
|
|
255
|
-
|
|
256
|
-
color: "color";
|
|
316
|
+
lighten: "lighten";
|
|
257
317
|
luminosity: "luminosity";
|
|
318
|
+
multiply: "multiply";
|
|
319
|
+
normal: "normal";
|
|
320
|
+
overlay: "overlay";
|
|
321
|
+
saturation: "saturation";
|
|
322
|
+
screen: "screen";
|
|
323
|
+
"soft-light": "soft-light";
|
|
258
324
|
}>>;
|
|
259
325
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
260
326
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -293,8 +359,6 @@ export declare const leafSchemas: {
|
|
|
293
359
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
294
360
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
295
361
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
296
|
-
}, z.core.$strip>;
|
|
297
|
-
svg: z.ZodObject<{
|
|
298
362
|
type: z.ZodLiteral<"svg">;
|
|
299
363
|
src: z.ZodDefault<z.ZodString>;
|
|
300
364
|
maskSrc: z.ZodDefault<z.ZodString>;
|
|
@@ -310,32 +374,32 @@ export declare const leafSchemas: {
|
|
|
310
374
|
borderSize: z.ZodDefault<z.ZodNumber>;
|
|
311
375
|
cornerRadius: z.ZodDefault<z.ZodNumber>;
|
|
312
376
|
colorsReplace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
377
|
+
}, z.core.$strip>;
|
|
378
|
+
line: z.ZodObject<{
|
|
313
379
|
id: z.ZodString;
|
|
314
380
|
name: z.ZodDefault<z.ZodString>;
|
|
315
381
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
316
382
|
x: z.ZodDefault<z.ZodNumber>;
|
|
317
383
|
y: z.ZodDefault<z.ZodNumber>;
|
|
318
|
-
width: z.ZodDefault<z.ZodNumber>;
|
|
319
|
-
height: z.ZodDefault<z.ZodNumber>;
|
|
320
384
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
321
385
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
322
386
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
323
|
-
|
|
324
|
-
multiply: "multiply";
|
|
325
|
-
screen: "screen";
|
|
326
|
-
overlay: "overlay";
|
|
327
|
-
darken: "darken";
|
|
328
|
-
lighten: "lighten";
|
|
329
|
-
"color-dodge": "color-dodge";
|
|
387
|
+
color: "color";
|
|
330
388
|
"color-burn": "color-burn";
|
|
331
|
-
"
|
|
332
|
-
|
|
389
|
+
"color-dodge": "color-dodge";
|
|
390
|
+
darken: "darken";
|
|
333
391
|
difference: "difference";
|
|
334
392
|
exclusion: "exclusion";
|
|
393
|
+
"hard-light": "hard-light";
|
|
335
394
|
hue: "hue";
|
|
336
|
-
|
|
337
|
-
color: "color";
|
|
395
|
+
lighten: "lighten";
|
|
338
396
|
luminosity: "luminosity";
|
|
397
|
+
multiply: "multiply";
|
|
398
|
+
normal: "normal";
|
|
399
|
+
overlay: "overlay";
|
|
400
|
+
saturation: "saturation";
|
|
401
|
+
screen: "screen";
|
|
402
|
+
"soft-light": "soft-light";
|
|
339
403
|
}>>;
|
|
340
404
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
341
405
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -374,8 +438,6 @@ export declare const leafSchemas: {
|
|
|
374
438
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
375
439
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
376
440
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
377
|
-
}, z.core.$strip>;
|
|
378
|
-
line: z.ZodObject<{
|
|
379
441
|
type: z.ZodLiteral<"line">;
|
|
380
442
|
width: z.ZodDefault<z.ZodNumber>;
|
|
381
443
|
height: z.ZodDefault<z.ZodNumber>;
|
|
@@ -383,30 +445,34 @@ export declare const leafSchemas: {
|
|
|
383
445
|
dash: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
384
446
|
startHead: z.ZodDefault<z.ZodString>;
|
|
385
447
|
endHead: z.ZodDefault<z.ZodString>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
figure: z.ZodObject<{
|
|
386
450
|
id: z.ZodString;
|
|
387
451
|
name: z.ZodDefault<z.ZodString>;
|
|
388
452
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
389
453
|
x: z.ZodDefault<z.ZodNumber>;
|
|
390
454
|
y: z.ZodDefault<z.ZodNumber>;
|
|
455
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
456
|
+
height: z.ZodDefault<z.ZodNumber>;
|
|
391
457
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
392
458
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
393
459
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
394
|
-
|
|
395
|
-
multiply: "multiply";
|
|
396
|
-
screen: "screen";
|
|
397
|
-
overlay: "overlay";
|
|
398
|
-
darken: "darken";
|
|
399
|
-
lighten: "lighten";
|
|
400
|
-
"color-dodge": "color-dodge";
|
|
460
|
+
color: "color";
|
|
401
461
|
"color-burn": "color-burn";
|
|
402
|
-
"
|
|
403
|
-
|
|
462
|
+
"color-dodge": "color-dodge";
|
|
463
|
+
darken: "darken";
|
|
404
464
|
difference: "difference";
|
|
405
465
|
exclusion: "exclusion";
|
|
466
|
+
"hard-light": "hard-light";
|
|
406
467
|
hue: "hue";
|
|
407
|
-
|
|
408
|
-
color: "color";
|
|
468
|
+
lighten: "lighten";
|
|
409
469
|
luminosity: "luminosity";
|
|
470
|
+
multiply: "multiply";
|
|
471
|
+
normal: "normal";
|
|
472
|
+
overlay: "overlay";
|
|
473
|
+
saturation: "saturation";
|
|
474
|
+
screen: "screen";
|
|
475
|
+
"soft-light": "soft-light";
|
|
410
476
|
}>>;
|
|
411
477
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
412
478
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -445,8 +511,6 @@ export declare const leafSchemas: {
|
|
|
445
511
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
446
512
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
447
513
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
448
|
-
}, z.core.$strip>;
|
|
449
|
-
figure: z.ZodObject<{
|
|
450
514
|
type: z.ZodLiteral<"figure">;
|
|
451
515
|
subType: z.ZodDefault<z.ZodString>;
|
|
452
516
|
fill: z.ZodDefault<z.ZodString>;
|
|
@@ -454,6 +518,8 @@ export declare const leafSchemas: {
|
|
|
454
518
|
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
455
519
|
stroke: z.ZodDefault<z.ZodString>;
|
|
456
520
|
cornerRadius: z.ZodDefault<z.ZodNumber>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
gif: z.ZodObject<{
|
|
457
523
|
id: z.ZodString;
|
|
458
524
|
name: z.ZodDefault<z.ZodString>;
|
|
459
525
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -464,22 +530,22 @@ export declare const leafSchemas: {
|
|
|
464
530
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
465
531
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
466
532
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
467
|
-
|
|
468
|
-
multiply: "multiply";
|
|
469
|
-
screen: "screen";
|
|
470
|
-
overlay: "overlay";
|
|
471
|
-
darken: "darken";
|
|
472
|
-
lighten: "lighten";
|
|
473
|
-
"color-dodge": "color-dodge";
|
|
533
|
+
color: "color";
|
|
474
534
|
"color-burn": "color-burn";
|
|
475
|
-
"
|
|
476
|
-
|
|
535
|
+
"color-dodge": "color-dodge";
|
|
536
|
+
darken: "darken";
|
|
477
537
|
difference: "difference";
|
|
478
538
|
exclusion: "exclusion";
|
|
539
|
+
"hard-light": "hard-light";
|
|
479
540
|
hue: "hue";
|
|
480
|
-
|
|
481
|
-
color: "color";
|
|
541
|
+
lighten: "lighten";
|
|
482
542
|
luminosity: "luminosity";
|
|
543
|
+
multiply: "multiply";
|
|
544
|
+
normal: "normal";
|
|
545
|
+
overlay: "overlay";
|
|
546
|
+
saturation: "saturation";
|
|
547
|
+
screen: "screen";
|
|
548
|
+
"soft-light": "soft-light";
|
|
483
549
|
}>>;
|
|
484
550
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
485
551
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -518,11 +584,6 @@ export declare const leafSchemas: {
|
|
|
518
584
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
519
585
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
520
586
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
521
|
-
}, z.core.$strip>;
|
|
522
|
-
gif: z.ZodObject<{
|
|
523
|
-
type: z.ZodLiteral<"gif">;
|
|
524
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
525
|
-
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
526
587
|
src: z.ZodDefault<z.ZodString>;
|
|
527
588
|
cropX: z.ZodDefault<z.ZodNumber>;
|
|
528
589
|
cropY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -535,6 +596,11 @@ export declare const leafSchemas: {
|
|
|
535
596
|
borderColor: z.ZodDefault<z.ZodString>;
|
|
536
597
|
borderSize: z.ZodDefault<z.ZodNumber>;
|
|
537
598
|
stretchEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
599
|
+
type: z.ZodLiteral<"gif">;
|
|
600
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
601
|
+
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
lottie: z.ZodObject<{
|
|
538
604
|
id: z.ZodString;
|
|
539
605
|
name: z.ZodDefault<z.ZodString>;
|
|
540
606
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -545,22 +611,22 @@ export declare const leafSchemas: {
|
|
|
545
611
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
546
612
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
547
613
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
548
|
-
|
|
549
|
-
multiply: "multiply";
|
|
550
|
-
screen: "screen";
|
|
551
|
-
overlay: "overlay";
|
|
552
|
-
darken: "darken";
|
|
553
|
-
lighten: "lighten";
|
|
554
|
-
"color-dodge": "color-dodge";
|
|
614
|
+
color: "color";
|
|
555
615
|
"color-burn": "color-burn";
|
|
556
|
-
"
|
|
557
|
-
|
|
616
|
+
"color-dodge": "color-dodge";
|
|
617
|
+
darken: "darken";
|
|
558
618
|
difference: "difference";
|
|
559
619
|
exclusion: "exclusion";
|
|
620
|
+
"hard-light": "hard-light";
|
|
560
621
|
hue: "hue";
|
|
561
|
-
|
|
562
|
-
color: "color";
|
|
622
|
+
lighten: "lighten";
|
|
563
623
|
luminosity: "luminosity";
|
|
624
|
+
multiply: "multiply";
|
|
625
|
+
normal: "normal";
|
|
626
|
+
overlay: "overlay";
|
|
627
|
+
saturation: "saturation";
|
|
628
|
+
screen: "screen";
|
|
629
|
+
"soft-light": "soft-light";
|
|
564
630
|
}>>;
|
|
565
631
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
566
632
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -599,14 +665,6 @@ export declare const leafSchemas: {
|
|
|
599
665
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
600
666
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
601
667
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
602
|
-
}, z.core.$strip>;
|
|
603
|
-
video: z.ZodObject<{
|
|
604
|
-
type: z.ZodLiteral<"video">;
|
|
605
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
606
|
-
startTime: z.ZodDefault<z.ZodNumber>;
|
|
607
|
-
endTime: z.ZodDefault<z.ZodNumber>;
|
|
608
|
-
volume: z.ZodDefault<z.ZodNumber>;
|
|
609
|
-
speed: z.ZodDefault<z.ZodNumber>;
|
|
610
668
|
src: z.ZodDefault<z.ZodString>;
|
|
611
669
|
cropX: z.ZodDefault<z.ZodNumber>;
|
|
612
670
|
cropY: z.ZodDefault<z.ZodNumber>;
|
|
@@ -618,8 +676,11 @@ export declare const leafSchemas: {
|
|
|
618
676
|
clipSrc: z.ZodDefault<z.ZodString>;
|
|
619
677
|
borderColor: z.ZodDefault<z.ZodString>;
|
|
620
678
|
borderSize: z.ZodDefault<z.ZodNumber>;
|
|
621
|
-
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
622
679
|
stretchEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
680
|
+
type: z.ZodLiteral<"lottie">;
|
|
681
|
+
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
682
|
+
}, z.core.$strip>;
|
|
683
|
+
video: z.ZodObject<{
|
|
623
684
|
id: z.ZodString;
|
|
624
685
|
name: z.ZodDefault<z.ZodString>;
|
|
625
686
|
custom: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -630,22 +691,22 @@ export declare const leafSchemas: {
|
|
|
630
691
|
rotation: z.ZodDefault<z.ZodNumber>;
|
|
631
692
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
632
693
|
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
633
|
-
|
|
634
|
-
multiply: "multiply";
|
|
635
|
-
screen: "screen";
|
|
636
|
-
overlay: "overlay";
|
|
637
|
-
darken: "darken";
|
|
638
|
-
lighten: "lighten";
|
|
639
|
-
"color-dodge": "color-dodge";
|
|
694
|
+
color: "color";
|
|
640
695
|
"color-burn": "color-burn";
|
|
641
|
-
"
|
|
642
|
-
|
|
696
|
+
"color-dodge": "color-dodge";
|
|
697
|
+
darken: "darken";
|
|
643
698
|
difference: "difference";
|
|
644
699
|
exclusion: "exclusion";
|
|
700
|
+
"hard-light": "hard-light";
|
|
645
701
|
hue: "hue";
|
|
646
|
-
|
|
647
|
-
color: "color";
|
|
702
|
+
lighten: "lighten";
|
|
648
703
|
luminosity: "luminosity";
|
|
704
|
+
multiply: "multiply";
|
|
705
|
+
normal: "normal";
|
|
706
|
+
overlay: "overlay";
|
|
707
|
+
saturation: "saturation";
|
|
708
|
+
screen: "screen";
|
|
709
|
+
"soft-light": "soft-light";
|
|
649
710
|
}>>;
|
|
650
711
|
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
651
712
|
delay: z.ZodDefault<z.ZodNumber>;
|
|
@@ -684,8 +745,74 @@ export declare const leafSchemas: {
|
|
|
684
745
|
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
685
746
|
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
686
747
|
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
748
|
+
src: z.ZodDefault<z.ZodString>;
|
|
749
|
+
cropX: z.ZodDefault<z.ZodNumber>;
|
|
750
|
+
cropY: z.ZodDefault<z.ZodNumber>;
|
|
751
|
+
cropWidth: z.ZodDefault<z.ZodNumber>;
|
|
752
|
+
cropHeight: z.ZodDefault<z.ZodNumber>;
|
|
753
|
+
cornerRadius: z.ZodDefault<z.ZodNumber>;
|
|
754
|
+
flipX: z.ZodDefault<z.ZodBoolean>;
|
|
755
|
+
flipY: z.ZodDefault<z.ZodBoolean>;
|
|
756
|
+
clipSrc: z.ZodDefault<z.ZodString>;
|
|
757
|
+
borderColor: z.ZodDefault<z.ZodString>;
|
|
758
|
+
borderSize: z.ZodDefault<z.ZodNumber>;
|
|
759
|
+
keepRatio: z.ZodDefault<z.ZodBoolean>;
|
|
760
|
+
stretchEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
761
|
+
type: z.ZodLiteral<"video">;
|
|
762
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
763
|
+
startTime: z.ZodDefault<z.ZodNumber>;
|
|
764
|
+
endTime: z.ZodDefault<z.ZodNumber>;
|
|
765
|
+
volume: z.ZodDefault<z.ZodNumber>;
|
|
766
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
687
767
|
}, z.core.$strip>;
|
|
688
768
|
table: z.ZodObject<{
|
|
769
|
+
id: z.ZodString;
|
|
770
|
+
name: z.ZodDefault<z.ZodString>;
|
|
771
|
+
custom: z.ZodOptional<z.ZodUnknown>;
|
|
772
|
+
x: z.ZodDefault<z.ZodNumber>;
|
|
773
|
+
y: z.ZodDefault<z.ZodNumber>;
|
|
774
|
+
rotation: z.ZodDefault<z.ZodNumber>;
|
|
775
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
776
|
+
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
777
|
+
color: "color";
|
|
778
|
+
"color-burn": "color-burn";
|
|
779
|
+
"color-dodge": "color-dodge";
|
|
780
|
+
darken: "darken";
|
|
781
|
+
difference: "difference";
|
|
782
|
+
exclusion: "exclusion";
|
|
783
|
+
"hard-light": "hard-light";
|
|
784
|
+
hue: "hue";
|
|
785
|
+
lighten: "lighten";
|
|
786
|
+
luminosity: "luminosity";
|
|
787
|
+
multiply: "multiply";
|
|
788
|
+
normal: "normal";
|
|
789
|
+
overlay: "overlay";
|
|
790
|
+
saturation: "saturation";
|
|
791
|
+
screen: "screen";
|
|
792
|
+
"soft-light": "soft-light";
|
|
793
|
+
}>>;
|
|
794
|
+
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
795
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
796
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
797
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
798
|
+
type: z.ZodEnum<{
|
|
799
|
+
enter: "enter";
|
|
800
|
+
exit: "exit";
|
|
801
|
+
loop: "loop";
|
|
802
|
+
}>;
|
|
803
|
+
name: z.ZodDefault<z.ZodString>;
|
|
804
|
+
data: z.ZodDefault<z.ZodUnknown>;
|
|
805
|
+
easing: z.ZodOptional<z.ZodString>;
|
|
806
|
+
}, z.core.$strip>>>;
|
|
807
|
+
visible: z.ZodDefault<z.ZodBoolean>;
|
|
808
|
+
draggable: z.ZodDefault<z.ZodBoolean>;
|
|
809
|
+
resizable: z.ZodDefault<z.ZodBoolean>;
|
|
810
|
+
selectable: z.ZodDefault<z.ZodBoolean>;
|
|
811
|
+
removable: z.ZodDefault<z.ZodBoolean>;
|
|
812
|
+
contentEditable: z.ZodDefault<z.ZodBoolean>;
|
|
813
|
+
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
814
|
+
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
815
|
+
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
689
816
|
type: z.ZodLiteral<"table">;
|
|
690
817
|
width: z.ZodDefault<z.ZodNumber>;
|
|
691
818
|
height: z.ZodDefault<z.ZodNumber>;
|
|
@@ -708,40 +835,40 @@ export declare const leafSchemas: {
|
|
|
708
835
|
color: z.ZodOptional<z.ZodString>;
|
|
709
836
|
width: z.ZodOptional<z.ZodNumber>;
|
|
710
837
|
style: z.ZodOptional<z.ZodEnum<{
|
|
711
|
-
none: "none";
|
|
712
|
-
solid: "solid";
|
|
713
838
|
dashed: "dashed";
|
|
714
839
|
dotted: "dotted";
|
|
840
|
+
none: "none";
|
|
841
|
+
solid: "solid";
|
|
715
842
|
}>>;
|
|
716
843
|
}, z.core.$strip>>;
|
|
717
844
|
right: z.ZodOptional<z.ZodObject<{
|
|
718
845
|
color: z.ZodOptional<z.ZodString>;
|
|
719
846
|
width: z.ZodOptional<z.ZodNumber>;
|
|
720
847
|
style: z.ZodOptional<z.ZodEnum<{
|
|
721
|
-
none: "none";
|
|
722
|
-
solid: "solid";
|
|
723
848
|
dashed: "dashed";
|
|
724
849
|
dotted: "dotted";
|
|
850
|
+
none: "none";
|
|
851
|
+
solid: "solid";
|
|
725
852
|
}>>;
|
|
726
853
|
}, z.core.$strip>>;
|
|
727
854
|
bottom: z.ZodOptional<z.ZodObject<{
|
|
728
855
|
color: z.ZodOptional<z.ZodString>;
|
|
729
856
|
width: z.ZodOptional<z.ZodNumber>;
|
|
730
857
|
style: z.ZodOptional<z.ZodEnum<{
|
|
731
|
-
none: "none";
|
|
732
|
-
solid: "solid";
|
|
733
858
|
dashed: "dashed";
|
|
734
859
|
dotted: "dotted";
|
|
860
|
+
none: "none";
|
|
861
|
+
solid: "solid";
|
|
735
862
|
}>>;
|
|
736
863
|
}, z.core.$strip>>;
|
|
737
864
|
left: z.ZodOptional<z.ZodObject<{
|
|
738
865
|
color: z.ZodOptional<z.ZodString>;
|
|
739
866
|
width: z.ZodOptional<z.ZodNumber>;
|
|
740
867
|
style: z.ZodOptional<z.ZodEnum<{
|
|
741
|
-
none: "none";
|
|
742
|
-
solid: "solid";
|
|
743
868
|
dashed: "dashed";
|
|
744
869
|
dotted: "dotted";
|
|
870
|
+
none: "none";
|
|
871
|
+
solid: "solid";
|
|
745
872
|
}>>;
|
|
746
873
|
}, z.core.$strip>>;
|
|
747
874
|
}, z.core.$strip>>;
|
|
@@ -764,10 +891,10 @@ export declare const leafSchemas: {
|
|
|
764
891
|
borderColor: z.ZodDefault<z.ZodString>;
|
|
765
892
|
borderWidth: z.ZodDefault<z.ZodNumber>;
|
|
766
893
|
borderStyle: z.ZodDefault<z.ZodEnum<{
|
|
767
|
-
none: "none";
|
|
768
|
-
solid: "solid";
|
|
769
894
|
dashed: "dashed";
|
|
770
895
|
dotted: "dotted";
|
|
896
|
+
none: "none";
|
|
897
|
+
solid: "solid";
|
|
771
898
|
}>>;
|
|
772
899
|
fontSize: z.ZodDefault<z.ZodNumber>;
|
|
773
900
|
fontFamily: z.ZodDefault<z.ZodString>;
|
|
@@ -784,53 +911,6 @@ export declare const leafSchemas: {
|
|
|
784
911
|
stroke: z.ZodDefault<z.ZodString>;
|
|
785
912
|
cellBackground: z.ZodDefault<z.ZodString>;
|
|
786
913
|
cellPadding: z.ZodDefault<z.ZodNumber>;
|
|
787
|
-
id: z.ZodString;
|
|
788
|
-
name: z.ZodDefault<z.ZodString>;
|
|
789
|
-
custom: z.ZodOptional<z.ZodUnknown>;
|
|
790
|
-
x: z.ZodDefault<z.ZodNumber>;
|
|
791
|
-
y: z.ZodDefault<z.ZodNumber>;
|
|
792
|
-
rotation: z.ZodDefault<z.ZodNumber>;
|
|
793
|
-
opacity: z.ZodDefault<z.ZodNumber>;
|
|
794
|
-
blendMode: z.ZodOptional<z.ZodEnum<{
|
|
795
|
-
normal: "normal";
|
|
796
|
-
multiply: "multiply";
|
|
797
|
-
screen: "screen";
|
|
798
|
-
overlay: "overlay";
|
|
799
|
-
darken: "darken";
|
|
800
|
-
lighten: "lighten";
|
|
801
|
-
"color-dodge": "color-dodge";
|
|
802
|
-
"color-burn": "color-burn";
|
|
803
|
-
"hard-light": "hard-light";
|
|
804
|
-
"soft-light": "soft-light";
|
|
805
|
-
difference: "difference";
|
|
806
|
-
exclusion: "exclusion";
|
|
807
|
-
hue: "hue";
|
|
808
|
-
saturation: "saturation";
|
|
809
|
-
color: "color";
|
|
810
|
-
luminosity: "luminosity";
|
|
811
|
-
}>>;
|
|
812
|
-
animations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
813
|
-
delay: z.ZodDefault<z.ZodNumber>;
|
|
814
|
-
duration: z.ZodDefault<z.ZodNumber>;
|
|
815
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
816
|
-
type: z.ZodEnum<{
|
|
817
|
-
enter: "enter";
|
|
818
|
-
exit: "exit";
|
|
819
|
-
loop: "loop";
|
|
820
|
-
}>;
|
|
821
|
-
name: z.ZodDefault<z.ZodString>;
|
|
822
|
-
data: z.ZodDefault<z.ZodUnknown>;
|
|
823
|
-
easing: z.ZodOptional<z.ZodString>;
|
|
824
|
-
}, z.core.$strip>>>;
|
|
825
|
-
visible: z.ZodDefault<z.ZodBoolean>;
|
|
826
|
-
draggable: z.ZodDefault<z.ZodBoolean>;
|
|
827
|
-
resizable: z.ZodDefault<z.ZodBoolean>;
|
|
828
|
-
selectable: z.ZodDefault<z.ZodBoolean>;
|
|
829
|
-
removable: z.ZodDefault<z.ZodBoolean>;
|
|
830
|
-
contentEditable: z.ZodDefault<z.ZodBoolean>;
|
|
831
|
-
styleEditable: z.ZodDefault<z.ZodBoolean>;
|
|
832
|
-
alwaysOnTop: z.ZodDefault<z.ZodBoolean>;
|
|
833
|
-
showInExport: z.ZodDefault<z.ZodBoolean>;
|
|
834
914
|
}, z.core.$strip>;
|
|
835
915
|
font: z.ZodObject<{
|
|
836
916
|
fontFamily: z.ZodString;
|