@omnimedia/omnitool 1.1.0-81 → 1.1.0-83

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.
Files changed (48) hide show
  1. package/README.md +59 -6
  2. package/package.json +1 -1
  3. package/s/timeline/index.ts +3 -2
  4. package/s/timeline/parts/animations/make.ts +34 -0
  5. package/s/timeline/parts/animations/presets.ts +138 -0
  6. package/s/timeline/parts/{animations.ts → animations/properties.ts} +2 -24
  7. package/s/timeline/parts/animations/registry.ts +13 -0
  8. package/s/timeline/parts/animations/types.ts +68 -0
  9. package/s/timeline/renderers/parts/handy.ts +2 -2
  10. package/s/timeline/sugar/helpers.ts +32 -18
  11. package/s/timeline/sugar/o.ts +25 -17
  12. package/s/timeline/utils/anim.ts +3 -3
  13. package/x/demo/demo.bundle.min.js +100 -100
  14. package/x/demo/demo.bundle.min.js.map +4 -4
  15. package/x/index.html +2 -2
  16. package/x/tests.bundle.min.js +102 -102
  17. package/x/tests.bundle.min.js.map +4 -4
  18. package/x/tests.html +1 -1
  19. package/x/timeline/index.d.ts +3 -2
  20. package/x/timeline/index.js +3 -2
  21. package/x/timeline/index.js.map +1 -1
  22. package/x/timeline/parts/animations/make.d.ts +3 -0
  23. package/x/timeline/parts/animations/make.js +23 -0
  24. package/x/timeline/parts/animations/make.js.map +1 -0
  25. package/x/timeline/parts/animations/presets.d.ts +170 -0
  26. package/x/timeline/parts/animations/presets.js +135 -0
  27. package/x/timeline/parts/animations/presets.js.map +1 -0
  28. package/x/timeline/parts/{animations.d.ts → animations/properties.d.ts} +1 -20
  29. package/x/timeline/parts/{animations.js → animations/properties.js} +2 -2
  30. package/x/timeline/parts/animations/properties.js.map +1 -0
  31. package/x/timeline/parts/animations/registry.d.ts +218 -0
  32. package/x/timeline/parts/animations/registry.js +11 -0
  33. package/x/timeline/parts/animations/registry.js.map +1 -0
  34. package/x/timeline/parts/animations/types.d.ts +50 -0
  35. package/x/timeline/parts/animations/types.js +2 -0
  36. package/x/timeline/parts/animations/types.js.map +1 -0
  37. package/x/timeline/renderers/parts/handy.js +2 -2
  38. package/x/timeline/renderers/parts/handy.js.map +1 -1
  39. package/x/timeline/sugar/helpers.d.ts +2 -1
  40. package/x/timeline/sugar/helpers.js +23 -16
  41. package/x/timeline/sugar/helpers.js.map +1 -1
  42. package/x/timeline/sugar/o.d.ts +1 -0
  43. package/x/timeline/sugar/o.js +18 -16
  44. package/x/timeline/sugar/o.js.map +1 -1
  45. package/x/timeline/utils/anim.d.ts +3 -3
  46. package/x/timeline/utils/anim.js +1 -1
  47. package/x/timeline/utils/anim.js.map +1 -1
  48. package/x/timeline/parts/animations.js.map +0 -1
package/x/tests.html CHANGED
@@ -295,7 +295,7 @@ canvas {
295
295
  }
296
296
  }
297
297
  </style>
298
- <script type=module src="tests.bundle.min.js?v=5e8fc4d85099"></script>
298
+ <script type=module src="tests.bundle.min.js?v=7da8aa60efec"></script>
299
299
 
300
300
 
301
301
  <meta name="theme-color" content="#3cff9c">
@@ -1,12 +1,12 @@
1
+ export * from "./types.js";
1
2
  export * from "./parts/basics.js";
2
- export * from "./parts/animations.js";
3
3
  export * from "./parts/filters.js";
4
4
  export * from "./parts/item.js";
5
5
  export * from "./parts/media.js";
6
6
  export * from "./parts/resource-pool.js";
7
7
  export * from "./parts/resource.js";
8
8
  export * from "./parts/filmstrip.js";
9
- export * from "./types.js";
9
+ export * from "./parts/animations/registry.js";
10
10
  export * from "./parts/waveform/waveform.js";
11
11
  export * from "./parts/waveform/parts/types.js";
12
12
  export * from "./renderers/player/player.js";
@@ -15,3 +15,4 @@ export * from "./sugar/helpers.js";
15
15
  export * from "./sugar/omni.js";
16
16
  export * from "./utils/checksum.js";
17
17
  export * from "./utils/datafile.js";
18
+ export * from "./utils/anim.js";
@@ -1,12 +1,12 @@
1
+ export * from "./types.js";
1
2
  export * from "./parts/basics.js";
2
- export * from "./parts/animations.js";
3
3
  export * from "./parts/filters.js";
4
4
  export * from "./parts/item.js";
5
5
  export * from "./parts/media.js";
6
6
  export * from "./parts/resource-pool.js";
7
7
  export * from "./parts/resource.js";
8
8
  export * from "./parts/filmstrip.js";
9
- export * from "./types.js";
9
+ export * from "./parts/animations/registry.js";
10
10
  export * from "./parts/waveform/waveform.js";
11
11
  export * from "./parts/waveform/parts/types.js";
12
12
  export * from "./renderers/player/player.js";
@@ -15,4 +15,5 @@ export * from "./sugar/helpers.js";
15
15
  export * from "./sugar/omni.js";
16
16
  export * from "./utils/checksum.js";
17
17
  export * from "./utils/datafile.js";
18
+ export * from "./utils/anim.js";
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../s/timeline/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAE1B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAE5C,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../s/timeline/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA;AAE9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAE5C,cAAc,cAAc,CAAA;AAC5B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { AnimationPresetActions } from "./types.js";
2
+ import { Anim, Interpolation, Keyframes, TrackTransform, Transform, TransformOptions } from "../../types.js";
3
+ export declare function makeAnimationPresets(scalar: (terp: Interpolation, track: Keyframes) => Anim<Keyframes>, transform: (terp: Interpolation, source: Keyframes<Transform>) => Anim<TrackTransform>, transformFrom: (options: TransformOptions) => Transform): AnimationPresetActions;
@@ -0,0 +1,23 @@
1
+ import { animationPresets } from "./presets.js";
2
+ export function makeAnimationPresets(scalar, transform, transformFrom) {
3
+ const entries = Object.entries(animationPresets).map(([name, preset]) => {
4
+ const action = preset.type === "motion"
5
+ ? (options) => transform(options?.terp ?? preset.defaults.terp, [
6
+ [0, transformFrom({
7
+ ...preset.transform.from,
8
+ ...(options?.from === undefined ? {} : { position: options.from }),
9
+ })],
10
+ [options?.duration ?? preset.defaults.duration, transformFrom({
11
+ ...preset.transform.to,
12
+ ...(options?.to === undefined ? {} : { position: options.to }),
13
+ })],
14
+ ])
15
+ : (options) => scalar(options?.terp ?? preset.defaults.terp, [
16
+ [0, options?.from ?? preset.defaults.from],
17
+ [options?.duration ?? preset.defaults.duration, options?.to ?? preset.defaults.to],
18
+ ]);
19
+ return [name, action];
20
+ });
21
+ return Object.fromEntries(entries);
22
+ }
23
+ //# sourceMappingURL=make.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"make.js","sourceRoot":"","sources":["../../../../s/timeline/parts/animations/make.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAA;AAI7C,MAAM,UAAU,oBAAoB,CACnC,MAAkE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;aAClF,CAAC,CAAA;QAEJ,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAA2B,CAAA;AAC7D,CAAC"}
@@ -0,0 +1,170 @@
1
+ export declare const animationPresets: {
2
+ readonly slideIn: {
3
+ readonly type: "motion";
4
+ readonly label: "Slide in";
5
+ readonly defaults: {
6
+ readonly duration: 700;
7
+ readonly from: [-400, 0];
8
+ readonly to: [0, 0];
9
+ readonly terp: "easeOut";
10
+ };
11
+ readonly transform: {
12
+ readonly from: {
13
+ readonly position: [-400, 0];
14
+ };
15
+ readonly to: {
16
+ readonly position: [0, 0];
17
+ };
18
+ };
19
+ };
20
+ readonly slideOut: {
21
+ readonly type: "motion";
22
+ readonly label: "Slide out";
23
+ readonly defaults: {
24
+ readonly duration: 700;
25
+ readonly from: [0, 0];
26
+ readonly to: [400, 0];
27
+ readonly terp: "easeIn";
28
+ };
29
+ readonly transform: {
30
+ readonly from: {
31
+ readonly position: [0, 0];
32
+ };
33
+ readonly to: {
34
+ readonly position: [400, 0];
35
+ };
36
+ };
37
+ };
38
+ readonly spinIn: {
39
+ readonly type: "motion";
40
+ readonly label: "Spin in";
41
+ readonly defaults: {
42
+ readonly duration: 700;
43
+ readonly from: [0, 0];
44
+ readonly to: [0, 0];
45
+ readonly terp: "easeOut";
46
+ };
47
+ readonly transform: {
48
+ readonly from: {
49
+ readonly scale: [0, 0];
50
+ readonly rotation: number;
51
+ };
52
+ readonly to: {
53
+ readonly scale: [1, 1];
54
+ readonly rotation: 0;
55
+ };
56
+ };
57
+ };
58
+ readonly spinOut: {
59
+ readonly type: "motion";
60
+ readonly label: "Spin out";
61
+ readonly defaults: {
62
+ readonly duration: 700;
63
+ readonly from: [0, 0];
64
+ readonly to: [0, 0];
65
+ readonly terp: "easeIn";
66
+ };
67
+ readonly transform: {
68
+ readonly from: {
69
+ readonly scale: [1, 1];
70
+ readonly rotation: 0;
71
+ };
72
+ readonly to: {
73
+ readonly scale: [0, 0];
74
+ readonly rotation: number;
75
+ };
76
+ };
77
+ };
78
+ readonly zoomIn: {
79
+ readonly type: "motion";
80
+ readonly label: "Zoom in";
81
+ readonly defaults: {
82
+ readonly duration: 700;
83
+ readonly from: [0, 0];
84
+ readonly to: [0, 0];
85
+ readonly terp: "easeOut";
86
+ };
87
+ readonly transform: {
88
+ readonly from: {
89
+ readonly scale: [0, 0];
90
+ };
91
+ readonly to: {
92
+ readonly scale: [1, 1];
93
+ };
94
+ };
95
+ };
96
+ readonly zoomOut: {
97
+ readonly type: "motion";
98
+ readonly label: "Zoom out";
99
+ readonly defaults: {
100
+ readonly duration: 700;
101
+ readonly from: [0, 0];
102
+ readonly to: [0, 0];
103
+ readonly terp: "easeIn";
104
+ };
105
+ readonly transform: {
106
+ readonly from: {
107
+ readonly scale: [1, 1];
108
+ };
109
+ readonly to: {
110
+ readonly scale: [0, 0];
111
+ };
112
+ };
113
+ };
114
+ readonly bounceIn: {
115
+ readonly type: "motion";
116
+ readonly label: "Bounce in";
117
+ readonly defaults: {
118
+ readonly duration: 700;
119
+ readonly from: [0, 0];
120
+ readonly to: [0, 0];
121
+ readonly terp: "bounce";
122
+ };
123
+ readonly transform: {
124
+ readonly from: {
125
+ readonly scale: [0, 0];
126
+ };
127
+ readonly to: {
128
+ readonly scale: [1, 1];
129
+ };
130
+ };
131
+ };
132
+ readonly bounceOut: {
133
+ readonly type: "motion";
134
+ readonly label: "Bounce out";
135
+ readonly defaults: {
136
+ readonly duration: 700;
137
+ readonly from: [0, 0];
138
+ readonly to: [0, 0];
139
+ readonly terp: "bounce";
140
+ };
141
+ readonly transform: {
142
+ readonly from: {
143
+ readonly scale: [1, 1];
144
+ };
145
+ readonly to: {
146
+ readonly scale: [0, 0];
147
+ };
148
+ };
149
+ };
150
+ readonly fadeIn: {
151
+ readonly type: "scalar";
152
+ readonly label: "Fade in";
153
+ readonly defaults: {
154
+ readonly duration: 700;
155
+ readonly from: 0;
156
+ readonly to: 1;
157
+ readonly terp: "easeIn";
158
+ };
159
+ };
160
+ readonly fadeOut: {
161
+ readonly type: "scalar";
162
+ readonly label: "Fade out";
163
+ readonly defaults: {
164
+ readonly duration: 700;
165
+ readonly from: 1;
166
+ readonly to: 0;
167
+ readonly terp: "easeOut";
168
+ };
169
+ };
170
+ };
@@ -0,0 +1,135 @@
1
+ export const animationPresets = {
2
+ slideIn: {
3
+ type: "motion",
4
+ label: "Slide in",
5
+ defaults: {
6
+ duration: 700,
7
+ from: [-400, 0],
8
+ to: [0, 0],
9
+ terp: "easeOut",
10
+ },
11
+ transform: {
12
+ from: { position: [-400, 0] },
13
+ to: { position: [0, 0] },
14
+ },
15
+ },
16
+ slideOut: {
17
+ type: "motion",
18
+ label: "Slide out",
19
+ defaults: {
20
+ duration: 700,
21
+ from: [0, 0],
22
+ to: [400, 0],
23
+ terp: "easeIn",
24
+ },
25
+ transform: {
26
+ from: { position: [0, 0] },
27
+ to: { position: [400, 0] },
28
+ },
29
+ },
30
+ spinIn: {
31
+ type: "motion",
32
+ label: "Spin in",
33
+ defaults: {
34
+ duration: 700,
35
+ from: [0, 0],
36
+ to: [0, 0],
37
+ terp: "easeOut",
38
+ },
39
+ transform: {
40
+ from: { scale: [0, 0], rotation: -Math.PI },
41
+ to: { scale: [1, 1], rotation: 0 },
42
+ },
43
+ },
44
+ spinOut: {
45
+ type: "motion",
46
+ label: "Spin out",
47
+ defaults: {
48
+ duration: 700,
49
+ from: [0, 0],
50
+ to: [0, 0],
51
+ terp: "easeIn",
52
+ },
53
+ transform: {
54
+ from: { scale: [1, 1], rotation: 0 },
55
+ to: { scale: [0, 0], rotation: Math.PI },
56
+ },
57
+ },
58
+ zoomIn: {
59
+ type: "motion",
60
+ label: "Zoom in",
61
+ defaults: {
62
+ duration: 700,
63
+ from: [0, 0],
64
+ to: [0, 0],
65
+ terp: "easeOut",
66
+ },
67
+ transform: {
68
+ from: { scale: [0, 0] },
69
+ to: { scale: [1, 1] },
70
+ },
71
+ },
72
+ zoomOut: {
73
+ type: "motion",
74
+ label: "Zoom out",
75
+ defaults: {
76
+ duration: 700,
77
+ from: [0, 0],
78
+ to: [0, 0],
79
+ terp: "easeIn",
80
+ },
81
+ transform: {
82
+ from: { scale: [1, 1] },
83
+ to: { scale: [0, 0] },
84
+ },
85
+ },
86
+ bounceIn: {
87
+ type: "motion",
88
+ label: "Bounce in",
89
+ defaults: {
90
+ duration: 700,
91
+ from: [0, 0],
92
+ to: [0, 0],
93
+ terp: "bounce",
94
+ },
95
+ transform: {
96
+ from: { scale: [0, 0] },
97
+ to: { scale: [1, 1] },
98
+ },
99
+ },
100
+ bounceOut: {
101
+ type: "motion",
102
+ label: "Bounce out",
103
+ defaults: {
104
+ duration: 700,
105
+ from: [0, 0],
106
+ to: [0, 0],
107
+ terp: "bounce",
108
+ },
109
+ transform: {
110
+ from: { scale: [1, 1] },
111
+ to: { scale: [0, 0] },
112
+ },
113
+ },
114
+ fadeIn: {
115
+ type: "scalar",
116
+ label: "Fade in",
117
+ defaults: {
118
+ duration: 700,
119
+ from: 0,
120
+ to: 1,
121
+ terp: "easeIn",
122
+ },
123
+ },
124
+ fadeOut: {
125
+ type: "scalar",
126
+ label: "Fade out",
127
+ defaults: {
128
+ duration: 700,
129
+ from: 1,
130
+ to: 0,
131
+ terp: "easeOut",
132
+ },
133
+ },
134
+ };
135
+ //# sourceMappingURL=presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../../s/timeline/parts/animations/presets.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE;YACT,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;YACf,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC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,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACZ,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACV,IAAI,EAAE,QAAQ;SACd;QACD,SAAS,EAAE;YACV,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;YACrB,EAAE,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SACnB;KACD;IACD,SAAS,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE;YACT,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACZ,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACV,IAAI,EAAE,QAAQ;SACd;QACD,SAAS,EAAE;YACV,IAAI,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;YACrB,EAAE,EAAE,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SACnB;KACD;IACD,MAAM,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE;YACT,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,CAAC;YACP,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,QAAQ;SACd;KACD;IACD,OAAO,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,UAAU;QACjB,QAAQ,EAAE;YACT,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,CAAC;YACP,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,SAAS;SACf;KACD;CAC4D,CAAA"}
@@ -1,19 +1,3 @@
1
- import type { Interpolation } from "../types.js";
2
- export type AnimationType = "scalar" | "transform";
3
- export type AnimationChannelType = "number";
4
- export type AnimationUnit = "pixel" | "scale" | "radian" | "ratio";
5
- export type AnimationChannel = {
6
- path?: string;
7
- type: AnimationChannelType;
8
- default: number;
9
- unit?: AnimationUnit;
10
- range?: readonly [min: number, max: number];
11
- };
12
- export type AnimationDefinition = {
13
- type: AnimationType;
14
- defaultTerp: Interpolation;
15
- channels: readonly AnimationChannel[];
16
- };
17
1
  export declare const spatialAnimations: {
18
2
  readonly transform: {
19
3
  readonly type: "transform";
@@ -58,7 +42,7 @@ export declare const visualAnimations: {
58
42
  }];
59
43
  };
60
44
  };
61
- export declare const animations: {
45
+ export declare const animatableProperties: {
62
46
  readonly opacity: {
63
47
  readonly type: "scalar";
64
48
  readonly defaultTerp: "linear";
@@ -100,6 +84,3 @@ export declare const animations: {
100
84
  }];
101
85
  };
102
86
  };
103
- export type SpatialAnimationProperty = keyof typeof spatialAnimations;
104
- export type VisualAnimationProperty = keyof typeof visualAnimations;
105
- export type AnimationProperty = keyof typeof animations;
@@ -21,8 +21,8 @@ export const visualAnimations = {
21
21
  },
22
22
  };
23
23
  // const audioAnimations = {}
24
- export const animations = {
24
+ export const animatableProperties = {
25
25
  ...spatialAnimations,
26
26
  ...visualAnimations,
27
27
  };
28
- //# sourceMappingURL=animations.js.map
28
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../s/timeline/parts/animations/properties.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,SAAS,EAAE;QACV,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE;YACT,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC/D,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC/D,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC5D,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC5D,EAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAC;SAC9D;KACD;CACsD,CAAA;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO,EAAE;QACR,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE;YACT,EAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAC;SAC1D;KACD;CACsD,CAAA;AAExD,6BAA6B;AAE7B,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;CACV,CAAA"}
@@ -0,0 +1,218 @@
1
+ export declare const animationRegistry: {
2
+ readonly presets: {
3
+ readonly slideIn: {
4
+ readonly type: "motion";
5
+ readonly label: "Slide in";
6
+ readonly defaults: {
7
+ readonly duration: 700;
8
+ readonly from: [-400, 0];
9
+ readonly to: [0, 0];
10
+ readonly terp: "easeOut";
11
+ };
12
+ readonly transform: {
13
+ readonly from: {
14
+ readonly position: [-400, 0];
15
+ };
16
+ readonly to: {
17
+ readonly position: [0, 0];
18
+ };
19
+ };
20
+ };
21
+ readonly slideOut: {
22
+ readonly type: "motion";
23
+ readonly label: "Slide out";
24
+ readonly defaults: {
25
+ readonly duration: 700;
26
+ readonly from: [0, 0];
27
+ readonly to: [400, 0];
28
+ readonly terp: "easeIn";
29
+ };
30
+ readonly transform: {
31
+ readonly from: {
32
+ readonly position: [0, 0];
33
+ };
34
+ readonly to: {
35
+ readonly position: [400, 0];
36
+ };
37
+ };
38
+ };
39
+ readonly spinIn: {
40
+ readonly type: "motion";
41
+ readonly label: "Spin in";
42
+ readonly defaults: {
43
+ readonly duration: 700;
44
+ readonly from: [0, 0];
45
+ readonly to: [0, 0];
46
+ readonly terp: "easeOut";
47
+ };
48
+ readonly transform: {
49
+ readonly from: {
50
+ readonly scale: [0, 0];
51
+ readonly rotation: number;
52
+ };
53
+ readonly to: {
54
+ readonly scale: [1, 1];
55
+ readonly rotation: 0;
56
+ };
57
+ };
58
+ };
59
+ readonly spinOut: {
60
+ readonly type: "motion";
61
+ readonly label: "Spin out";
62
+ readonly defaults: {
63
+ readonly duration: 700;
64
+ readonly from: [0, 0];
65
+ readonly to: [0, 0];
66
+ readonly terp: "easeIn";
67
+ };
68
+ readonly transform: {
69
+ readonly from: {
70
+ readonly scale: [1, 1];
71
+ readonly rotation: 0;
72
+ };
73
+ readonly to: {
74
+ readonly scale: [0, 0];
75
+ readonly rotation: number;
76
+ };
77
+ };
78
+ };
79
+ readonly zoomIn: {
80
+ readonly type: "motion";
81
+ readonly label: "Zoom in";
82
+ readonly defaults: {
83
+ readonly duration: 700;
84
+ readonly from: [0, 0];
85
+ readonly to: [0, 0];
86
+ readonly terp: "easeOut";
87
+ };
88
+ readonly transform: {
89
+ readonly from: {
90
+ readonly scale: [0, 0];
91
+ };
92
+ readonly to: {
93
+ readonly scale: [1, 1];
94
+ };
95
+ };
96
+ };
97
+ readonly zoomOut: {
98
+ readonly type: "motion";
99
+ readonly label: "Zoom out";
100
+ readonly defaults: {
101
+ readonly duration: 700;
102
+ readonly from: [0, 0];
103
+ readonly to: [0, 0];
104
+ readonly terp: "easeIn";
105
+ };
106
+ readonly transform: {
107
+ readonly from: {
108
+ readonly scale: [1, 1];
109
+ };
110
+ readonly to: {
111
+ readonly scale: [0, 0];
112
+ };
113
+ };
114
+ };
115
+ readonly bounceIn: {
116
+ readonly type: "motion";
117
+ readonly label: "Bounce in";
118
+ readonly defaults: {
119
+ readonly duration: 700;
120
+ readonly from: [0, 0];
121
+ readonly to: [0, 0];
122
+ readonly terp: "bounce";
123
+ };
124
+ readonly transform: {
125
+ readonly from: {
126
+ readonly scale: [0, 0];
127
+ };
128
+ readonly to: {
129
+ readonly scale: [1, 1];
130
+ };
131
+ };
132
+ };
133
+ readonly bounceOut: {
134
+ readonly type: "motion";
135
+ readonly label: "Bounce out";
136
+ readonly defaults: {
137
+ readonly duration: 700;
138
+ readonly from: [0, 0];
139
+ readonly to: [0, 0];
140
+ readonly terp: "bounce";
141
+ };
142
+ readonly transform: {
143
+ readonly from: {
144
+ readonly scale: [1, 1];
145
+ };
146
+ readonly to: {
147
+ readonly scale: [0, 0];
148
+ };
149
+ };
150
+ };
151
+ readonly fadeIn: {
152
+ readonly type: "scalar";
153
+ readonly label: "Fade in";
154
+ readonly defaults: {
155
+ readonly duration: 700;
156
+ readonly from: 0;
157
+ readonly to: 1;
158
+ readonly terp: "easeIn";
159
+ };
160
+ };
161
+ readonly fadeOut: {
162
+ readonly type: "scalar";
163
+ readonly label: "Fade out";
164
+ readonly defaults: {
165
+ readonly duration: 700;
166
+ readonly from: 1;
167
+ readonly to: 0;
168
+ readonly terp: "easeOut";
169
+ };
170
+ };
171
+ };
172
+ readonly properties: {
173
+ readonly opacity: {
174
+ readonly type: "scalar";
175
+ readonly defaultTerp: "linear";
176
+ readonly channels: readonly [{
177
+ readonly type: "number";
178
+ readonly default: 1;
179
+ readonly unit: "ratio";
180
+ readonly range: readonly [0, 1];
181
+ }];
182
+ };
183
+ readonly transform: {
184
+ readonly type: "transform";
185
+ readonly defaultTerp: "linear";
186
+ readonly channels: readonly [{
187
+ readonly path: "position.x";
188
+ readonly type: "number";
189
+ readonly default: 0;
190
+ readonly unit: "pixel";
191
+ }, {
192
+ readonly path: "position.y";
193
+ readonly type: "number";
194
+ readonly default: 0;
195
+ readonly unit: "pixel";
196
+ }, {
197
+ readonly path: "scale.x";
198
+ readonly type: "number";
199
+ readonly default: 1;
200
+ readonly unit: "scale";
201
+ }, {
202
+ readonly path: "scale.y";
203
+ readonly type: "number";
204
+ readonly default: 1;
205
+ readonly unit: "scale";
206
+ }, {
207
+ readonly path: "rotation";
208
+ readonly type: "number";
209
+ readonly default: 0;
210
+ readonly unit: "radian";
211
+ }];
212
+ };
213
+ };
214
+ };
215
+ export * from "./make.js";
216
+ export * from "./presets.js";
217
+ export * from "./properties.js";
218
+ export * from "./types.js";
@@ -0,0 +1,11 @@
1
+ import { animationPresets } from "./presets.js";
2
+ import { animatableProperties } from "./properties.js";
3
+ export const animationRegistry = {
4
+ presets: animationPresets,
5
+ properties: animatableProperties,
6
+ };
7
+ export * from "./make.js";
8
+ export * from "./presets.js";
9
+ export * from "./properties.js";
10
+ export * from "./types.js";
11
+ //# sourceMappingURL=registry.js.map