visualfries 0.1.1 → 0.1.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.
- package/dist/schemas/scene/animations.d.ts +44 -44
- package/dist/schemas/scene/animations.js +7 -6
- package/dist/schemas/scene/components.d.ts +1701 -1701
- package/dist/schemas/scene/components.js +109 -66
- package/dist/schemas/scene/core.d.ts +1555 -1555
- package/dist/schemas/scene/properties.d.ts +35 -35
- package/dist/schemas/scene/properties.js +32 -31
- package/dist/schemas/scene/subtitles.d.ts +60 -60
- package/dist/schemas/scene/subtitles.js +21 -12
- package/dist/schemas/scene/utils.d.ts +38 -0
- package/dist/schemas/scene/utils.js +137 -0
- package/package.json +6 -2
|
@@ -3,15 +3,15 @@ declare const StaggerShape: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
|
3
3
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
4
4
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
5
5
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
6
|
-
each: z.ZodOptional<z.
|
|
7
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
8
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
6
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
7
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
8
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
9
9
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
10
10
|
x: "x";
|
|
11
11
|
y: "y";
|
|
12
12
|
}>>;
|
|
13
13
|
ease: z.ZodOptional<z.ZodString>;
|
|
14
|
-
amount: z.ZodOptional<z.
|
|
14
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
15
15
|
}, z.core.$strip>]>;
|
|
16
16
|
declare const BaseAnimatableProperties: z.ZodObject<{
|
|
17
17
|
opacity: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
@@ -333,18 +333,18 @@ declare const FinalTweenVarsShape: z.ZodObject<{
|
|
|
333
333
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
334
334
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
335
335
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
336
|
-
each: z.ZodOptional<z.
|
|
337
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
338
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
336
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
337
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
338
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
339
339
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
340
340
|
x: "x";
|
|
341
341
|
y: "y";
|
|
342
342
|
}>>;
|
|
343
343
|
ease: z.ZodOptional<z.ZodString>;
|
|
344
|
-
amount: z.ZodOptional<z.
|
|
344
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
345
345
|
}, z.core.$strip>]>>;
|
|
346
346
|
}, z.core.$catchall<z.ZodAny>>;
|
|
347
|
-
declare const AnimationTimelinePositionShape: z.ZodUnion<readonly [z.ZodString, z.
|
|
347
|
+
declare const AnimationTimelinePositionShape: z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
348
348
|
anchor: z.ZodString;
|
|
349
349
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
350
350
|
start: "start";
|
|
@@ -364,7 +364,7 @@ declare const TweenDefinitionShape: z.ZodObject<{
|
|
|
364
364
|
from: "from";
|
|
365
365
|
fromTo: "fromTo";
|
|
366
366
|
}>;
|
|
367
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
367
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
368
368
|
anchor: z.ZodString;
|
|
369
369
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
370
370
|
start: "start";
|
|
@@ -553,15 +553,15 @@ declare const TweenDefinitionShape: z.ZodObject<{
|
|
|
553
553
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
554
554
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
555
555
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
556
|
-
each: z.ZodOptional<z.
|
|
557
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
558
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
556
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
557
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
558
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
559
559
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
560
560
|
x: "x";
|
|
561
561
|
y: "y";
|
|
562
562
|
}>>;
|
|
563
563
|
ease: z.ZodOptional<z.ZodString>;
|
|
564
|
-
amount: z.ZodOptional<z.
|
|
564
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
565
565
|
}, z.core.$strip>]>>;
|
|
566
566
|
}, z.core.$catchall<z.ZodAny>>;
|
|
567
567
|
}, z.core.$strip>;
|
|
@@ -574,7 +574,7 @@ export declare const KeyframeAnimationShape: z.ZodObject<{
|
|
|
574
574
|
from: "from";
|
|
575
575
|
fromTo: "fromTo";
|
|
576
576
|
}>;
|
|
577
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
577
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
578
578
|
anchor: z.ZodString;
|
|
579
579
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
580
580
|
start: "start";
|
|
@@ -763,15 +763,15 @@ export declare const KeyframeAnimationShape: z.ZodObject<{
|
|
|
763
763
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
764
764
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
765
765
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
766
|
-
each: z.ZodOptional<z.
|
|
767
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
768
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
766
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
767
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
768
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
769
769
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
770
770
|
x: "x";
|
|
771
771
|
y: "y";
|
|
772
772
|
}>>;
|
|
773
773
|
ease: z.ZodOptional<z.ZodString>;
|
|
774
|
-
amount: z.ZodOptional<z.
|
|
774
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
775
775
|
}, z.core.$strip>]>>;
|
|
776
776
|
}, z.core.$catchall<z.ZodAny>>;
|
|
777
777
|
}, z.core.$strip>;
|
|
@@ -780,7 +780,7 @@ export declare const KeyframeAnimationShape: z.ZodObject<{
|
|
|
780
780
|
declare const AnimationSequenceItemShape: z.ZodObject<{
|
|
781
781
|
id: z.ZodOptional<z.ZodString>;
|
|
782
782
|
target: z.ZodOptional<z.ZodString>;
|
|
783
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
783
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
784
784
|
anchor: z.ZodString;
|
|
785
785
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
786
786
|
start: "start";
|
|
@@ -800,7 +800,7 @@ declare const AnimationSequenceItemShape: z.ZodObject<{
|
|
|
800
800
|
from: "from";
|
|
801
801
|
fromTo: "fromTo";
|
|
802
802
|
}>;
|
|
803
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
803
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
804
804
|
anchor: z.ZodString;
|
|
805
805
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
806
806
|
start: "start";
|
|
@@ -989,15 +989,15 @@ declare const AnimationSequenceItemShape: z.ZodObject<{
|
|
|
989
989
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
990
990
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
991
991
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
992
|
-
each: z.ZodOptional<z.
|
|
993
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
994
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
992
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
993
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
994
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
995
995
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
996
996
|
x: "x";
|
|
997
997
|
y: "y";
|
|
998
998
|
}>>;
|
|
999
999
|
ease: z.ZodOptional<z.ZodString>;
|
|
1000
|
-
amount: z.ZodOptional<z.
|
|
1000
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1001
1001
|
}, z.core.$strip>]>>;
|
|
1002
1002
|
}, z.core.$catchall<z.ZodAny>>;
|
|
1003
1003
|
}, z.core.$strip>>;
|
|
@@ -1030,7 +1030,7 @@ export declare const AnimationPresetShape: z.ZodObject<{
|
|
|
1030
1030
|
presetId: z.ZodOptional<z.ZodString>;
|
|
1031
1031
|
version: z.ZodOptional<z.ZodString>;
|
|
1032
1032
|
description: z.ZodOptional<z.ZodString>;
|
|
1033
|
-
duration: z.ZodOptional<z.
|
|
1033
|
+
duration: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1034
1034
|
data: z.ZodOptional<z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
1035
1035
|
setup: z.ZodOptional<z.ZodPrefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1036
1036
|
type: z.ZodLiteral<"style">;
|
|
@@ -1059,7 +1059,7 @@ export declare const AnimationPresetShape: z.ZodObject<{
|
|
|
1059
1059
|
timeline: z.ZodArray<z.ZodObject<{
|
|
1060
1060
|
id: z.ZodOptional<z.ZodString>;
|
|
1061
1061
|
target: z.ZodOptional<z.ZodString>;
|
|
1062
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1062
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
1063
1063
|
anchor: z.ZodString;
|
|
1064
1064
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
1065
1065
|
start: "start";
|
|
@@ -1079,7 +1079,7 @@ export declare const AnimationPresetShape: z.ZodObject<{
|
|
|
1079
1079
|
from: "from";
|
|
1080
1080
|
fromTo: "fromTo";
|
|
1081
1081
|
}>;
|
|
1082
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1082
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
1083
1083
|
anchor: z.ZodString;
|
|
1084
1084
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
1085
1085
|
start: "start";
|
|
@@ -1268,15 +1268,15 @@ export declare const AnimationPresetShape: z.ZodObject<{
|
|
|
1268
1268
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
1269
1269
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
1270
1270
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
1271
|
-
each: z.ZodOptional<z.
|
|
1272
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1273
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
1271
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1272
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
1273
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
1274
1274
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
1275
1275
|
x: "x";
|
|
1276
1276
|
y: "y";
|
|
1277
1277
|
}>>;
|
|
1278
1278
|
ease: z.ZodOptional<z.ZodString>;
|
|
1279
|
-
amount: z.ZodOptional<z.
|
|
1279
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1280
1280
|
}, z.core.$strip>]>>;
|
|
1281
1281
|
}, z.core.$catchall<z.ZodAny>>;
|
|
1282
1282
|
}, z.core.$strip>>;
|
|
@@ -1287,7 +1287,7 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1287
1287
|
presetId: z.ZodOptional<z.ZodString>;
|
|
1288
1288
|
version: z.ZodOptional<z.ZodString>;
|
|
1289
1289
|
description: z.ZodOptional<z.ZodString>;
|
|
1290
|
-
duration: z.ZodOptional<z.
|
|
1290
|
+
duration: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1291
1291
|
data: z.ZodOptional<z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
1292
1292
|
setup: z.ZodOptional<z.ZodPrefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1293
1293
|
type: z.ZodLiteral<"style">;
|
|
@@ -1316,7 +1316,7 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1316
1316
|
timeline: z.ZodArray<z.ZodObject<{
|
|
1317
1317
|
id: z.ZodOptional<z.ZodString>;
|
|
1318
1318
|
target: z.ZodOptional<z.ZodString>;
|
|
1319
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1319
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
1320
1320
|
anchor: z.ZodString;
|
|
1321
1321
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
1322
1322
|
start: "start";
|
|
@@ -1336,7 +1336,7 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1336
1336
|
from: "from";
|
|
1337
1337
|
fromTo: "fromTo";
|
|
1338
1338
|
}>;
|
|
1339
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1339
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
1340
1340
|
anchor: z.ZodString;
|
|
1341
1341
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
1342
1342
|
start: "start";
|
|
@@ -1525,15 +1525,15 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1525
1525
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
1526
1526
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
1527
1527
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
1528
|
-
each: z.ZodOptional<z.
|
|
1529
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1530
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
1528
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1529
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
1530
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
1531
1531
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
1532
1532
|
x: "x";
|
|
1533
1533
|
y: "y";
|
|
1534
1534
|
}>>;
|
|
1535
1535
|
ease: z.ZodOptional<z.ZodString>;
|
|
1536
|
-
amount: z.ZodOptional<z.
|
|
1536
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1537
1537
|
}, z.core.$strip>]>>;
|
|
1538
1538
|
}, z.core.$catchall<z.ZodAny>>;
|
|
1539
1539
|
}, z.core.$strip>>;
|
|
@@ -1547,7 +1547,7 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1547
1547
|
from: "from";
|
|
1548
1548
|
fromTo: "fromTo";
|
|
1549
1549
|
}>;
|
|
1550
|
-
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1550
|
+
position: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>, z.ZodObject<{
|
|
1551
1551
|
anchor: z.ZodString;
|
|
1552
1552
|
anchorPoint: z.ZodOptional<z.ZodEnum<{
|
|
1553
1553
|
start: "start";
|
|
@@ -1736,15 +1736,15 @@ export declare const AnimationReferenceShape: z.ZodUnion<readonly [z.ZodString,
|
|
|
1736
1736
|
type: z.ZodOptional<z.ZodLiteral<"fromData">>;
|
|
1737
1737
|
dataKey: z.ZodOptional<z.ZodString>;
|
|
1738
1738
|
referencePoint: z.ZodOptional<z.ZodLiteral<"tweenStart">>;
|
|
1739
|
-
each: z.ZodOptional<z.
|
|
1740
|
-
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.
|
|
1741
|
-
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.
|
|
1739
|
+
each: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1740
|
+
from: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>>;
|
|
1741
|
+
grid: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>, z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>]>], null>>;
|
|
1742
1742
|
axis: z.ZodOptional<z.ZodEnum<{
|
|
1743
1743
|
x: "x";
|
|
1744
1744
|
y: "y";
|
|
1745
1745
|
}>>;
|
|
1746
1746
|
ease: z.ZodOptional<z.ZodString>;
|
|
1747
|
-
amount: z.ZodOptional<z.
|
|
1747
|
+
amount: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedNumber<unknown>>>;
|
|
1748
1748
|
}, z.core.$strip>]>>;
|
|
1749
1749
|
}, z.core.$catchall<z.ZodAny>>;
|
|
1750
1750
|
}, z.core.$strip>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { coerceValidNumber, coerceNumber, coercePositiveNumber, coerceNormalizedNumber, coerceNonNegativeNumber, coerceInteger } from './utils.js';
|
|
2
3
|
// Utility for numbers that might be strings (e.g., "50%") or actual numbers
|
|
3
4
|
const numberOrStringPercentage = z.union([z.number(), z.string().regex(/^(\d+(\.\d+)?%?)$/)]);
|
|
4
5
|
const PropertyFromDataShape = z.object({
|
|
@@ -39,14 +40,14 @@ const StaggerObjectShape = z
|
|
|
39
40
|
type: z.literal('fromData').optional(), // Only "fromData" has a special type currently
|
|
40
41
|
dataKey: z.string().optional(), // Required if type is "fromData"
|
|
41
42
|
referencePoint: z.literal('tweenStart').optional(), // Mostly for "fromData"
|
|
42
|
-
each:
|
|
43
|
-
from: z.union([z.string(),
|
|
43
|
+
each: coerceValidNumber().optional(),
|
|
44
|
+
from: z.union([z.string(), coerceValidNumber()]).optional(), // "start", "center", "end", "edges", "random", index
|
|
44
45
|
grid: z
|
|
45
|
-
.tuple([z.union([z.literal('auto'),
|
|
46
|
+
.tuple([z.union([z.literal('auto'), coerceValidNumber()]), z.union([z.literal('auto'), coerceValidNumber()])])
|
|
46
47
|
.optional(),
|
|
47
48
|
axis: z.enum(['x', 'y']).optional(),
|
|
48
49
|
ease: z.string().optional(), // Easing function string
|
|
49
|
-
amount:
|
|
50
|
+
amount: coerceValidNumber().optional()
|
|
50
51
|
})
|
|
51
52
|
.refine((data) => !(data.type === 'fromData' && !data.dataKey), {
|
|
52
53
|
path: ['dataKey'],
|
|
@@ -131,7 +132,7 @@ const PositionObjectShape = z.object({
|
|
|
131
132
|
});
|
|
132
133
|
const AnimationTimelinePositionShape = z.union([
|
|
133
134
|
z.string(), // Time value, label, relative position, "in", "out"
|
|
134
|
-
|
|
135
|
+
coerceValidNumber(), // Time value, label, relative position, "in", "out"
|
|
135
136
|
PositionObjectShape
|
|
136
137
|
]);
|
|
137
138
|
const TweenDefinitionShape = z
|
|
@@ -198,7 +199,7 @@ export const AnimationPresetShape = z.object({
|
|
|
198
199
|
presetId: z.string().optional(),
|
|
199
200
|
version: z.string().optional(),
|
|
200
201
|
description: z.string().optional(),
|
|
201
|
-
duration:
|
|
202
|
+
duration: coercePositiveNumber().optional(),
|
|
202
203
|
data: z.record(z.string(), z.any()).prefault({}).optional(),
|
|
203
204
|
setup: z.array(SetupStepShape).prefault([]).optional(),
|
|
204
205
|
revertAfterComplete: z.boolean().prefault(false).optional(),
|