@codellyson/framely 0.1.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.
Files changed (209) hide show
  1. package/dist/AbsoluteFill.d.ts +18 -0
  2. package/dist/AbsoluteFill.d.ts.map +1 -0
  3. package/dist/AbsoluteFill.js +25 -0
  4. package/dist/AbsoluteFill.js.map +1 -0
  5. package/dist/Audio.d.ts +80 -0
  6. package/dist/Audio.d.ts.map +1 -0
  7. package/dist/Audio.js +221 -0
  8. package/dist/Audio.js.map +1 -0
  9. package/dist/Composition.d.ts +208 -0
  10. package/dist/Composition.d.ts.map +1 -0
  11. package/dist/Composition.js +210 -0
  12. package/dist/Composition.js.map +1 -0
  13. package/dist/Easing.d.ts +88 -0
  14. package/dist/Easing.d.ts.map +1 -0
  15. package/dist/Easing.js +266 -0
  16. package/dist/Easing.js.map +1 -0
  17. package/dist/ErrorBoundary.d.ts +35 -0
  18. package/dist/ErrorBoundary.d.ts.map +1 -0
  19. package/dist/ErrorBoundary.js +74 -0
  20. package/dist/ErrorBoundary.js.map +1 -0
  21. package/dist/Folder.d.ts +46 -0
  22. package/dist/Folder.d.ts.map +1 -0
  23. package/dist/Folder.js +44 -0
  24. package/dist/Folder.js.map +1 -0
  25. package/dist/Freeze.d.ts +35 -0
  26. package/dist/Freeze.d.ts.map +1 -0
  27. package/dist/Freeze.js +40 -0
  28. package/dist/Freeze.js.map +1 -0
  29. package/dist/IFrame.d.ts +28 -0
  30. package/dist/IFrame.d.ts.map +1 -0
  31. package/dist/IFrame.js +57 -0
  32. package/dist/IFrame.js.map +1 -0
  33. package/dist/Img.d.ts +36 -0
  34. package/dist/Img.d.ts.map +1 -0
  35. package/dist/Img.js +91 -0
  36. package/dist/Img.js.map +1 -0
  37. package/dist/Loop.d.ts +66 -0
  38. package/dist/Loop.d.ts.map +1 -0
  39. package/dist/Loop.js +79 -0
  40. package/dist/Loop.js.map +1 -0
  41. package/dist/Player.d.ts +118 -0
  42. package/dist/Player.d.ts.map +1 -0
  43. package/dist/Player.js +311 -0
  44. package/dist/Player.js.map +1 -0
  45. package/dist/Sequence.d.ts +25 -0
  46. package/dist/Sequence.d.ts.map +1 -0
  47. package/dist/Sequence.js +37 -0
  48. package/dist/Sequence.js.map +1 -0
  49. package/dist/Series.d.ts +52 -0
  50. package/dist/Series.d.ts.map +1 -0
  51. package/dist/Series.js +86 -0
  52. package/dist/Series.js.map +1 -0
  53. package/dist/Text.d.ts +129 -0
  54. package/dist/Text.d.ts.map +1 -0
  55. package/dist/Text.js +211 -0
  56. package/dist/Text.js.map +1 -0
  57. package/dist/Video.d.ts +75 -0
  58. package/dist/Video.d.ts.map +1 -0
  59. package/dist/Video.js +136 -0
  60. package/dist/Video.js.map +1 -0
  61. package/dist/config.d.ts +128 -0
  62. package/dist/config.d.ts.map +1 -0
  63. package/dist/config.js +243 -0
  64. package/dist/config.js.map +1 -0
  65. package/dist/context.d.ts +84 -0
  66. package/dist/context.d.ts.map +1 -0
  67. package/dist/context.js +131 -0
  68. package/dist/context.js.map +1 -0
  69. package/dist/delayRender.d.ts +130 -0
  70. package/dist/delayRender.d.ts.map +1 -0
  71. package/dist/delayRender.js +197 -0
  72. package/dist/delayRender.js.map +1 -0
  73. package/dist/getInputProps.d.ts +118 -0
  74. package/dist/getInputProps.d.ts.map +1 -0
  75. package/dist/getInputProps.js +181 -0
  76. package/dist/getInputProps.js.map +1 -0
  77. package/dist/hooks/useDelayRender.d.ts +52 -0
  78. package/dist/hooks/useDelayRender.d.ts.map +1 -0
  79. package/dist/hooks/useDelayRender.js +92 -0
  80. package/dist/hooks/useDelayRender.js.map +1 -0
  81. package/dist/hooks.d.ts +19 -0
  82. package/dist/hooks.d.ts.map +1 -0
  83. package/dist/hooks.js +17 -0
  84. package/dist/hooks.js.map +1 -0
  85. package/dist/index.d.ts +71 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +65 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/interpolate.d.ts +80 -0
  90. package/dist/interpolate.d.ts.map +1 -0
  91. package/dist/interpolate.js +108 -0
  92. package/dist/interpolate.js.map +1 -0
  93. package/dist/interpolateColors.d.ts +50 -0
  94. package/dist/interpolateColors.d.ts.map +1 -0
  95. package/dist/interpolateColors.js +300 -0
  96. package/dist/interpolateColors.js.map +1 -0
  97. package/dist/makeTransform.d.ts +98 -0
  98. package/dist/makeTransform.d.ts.map +1 -0
  99. package/dist/makeTransform.js +287 -0
  100. package/dist/makeTransform.js.map +1 -0
  101. package/dist/measureSpring.d.ts +75 -0
  102. package/dist/measureSpring.d.ts.map +1 -0
  103. package/dist/measureSpring.js +108 -0
  104. package/dist/measureSpring.js.map +1 -0
  105. package/dist/noise.d.ts +110 -0
  106. package/dist/noise.d.ts.map +1 -0
  107. package/dist/noise.js +228 -0
  108. package/dist/noise.js.map +1 -0
  109. package/dist/preload.d.ts +145 -0
  110. package/dist/preload.d.ts.map +1 -0
  111. package/dist/preload.js +225 -0
  112. package/dist/preload.js.map +1 -0
  113. package/dist/registerRoot.d.ts +140 -0
  114. package/dist/registerRoot.d.ts.map +1 -0
  115. package/dist/registerRoot.js +238 -0
  116. package/dist/registerRoot.js.map +1 -0
  117. package/dist/shapes/Circle.d.ts +15 -0
  118. package/dist/shapes/Circle.d.ts.map +1 -0
  119. package/dist/shapes/Circle.js +11 -0
  120. package/dist/shapes/Circle.js.map +1 -0
  121. package/dist/shapes/Ellipse.d.ts +16 -0
  122. package/dist/shapes/Ellipse.d.ts.map +1 -0
  123. package/dist/shapes/Ellipse.js +11 -0
  124. package/dist/shapes/Ellipse.js.map +1 -0
  125. package/dist/shapes/Line.d.ts +15 -0
  126. package/dist/shapes/Line.d.ts.map +1 -0
  127. package/dist/shapes/Line.js +11 -0
  128. package/dist/shapes/Line.js.map +1 -0
  129. package/dist/shapes/Path.d.ts +20 -0
  130. package/dist/shapes/Path.d.ts.map +1 -0
  131. package/dist/shapes/Path.js +14 -0
  132. package/dist/shapes/Path.js.map +1 -0
  133. package/dist/shapes/Polygon.d.ts +15 -0
  134. package/dist/shapes/Polygon.d.ts.map +1 -0
  135. package/dist/shapes/Polygon.js +16 -0
  136. package/dist/shapes/Polygon.js.map +1 -0
  137. package/dist/shapes/Rect.d.ts +18 -0
  138. package/dist/shapes/Rect.d.ts.map +1 -0
  139. package/dist/shapes/Rect.js +11 -0
  140. package/dist/shapes/Rect.js.map +1 -0
  141. package/dist/shapes/Svg.d.ts +16 -0
  142. package/dist/shapes/Svg.d.ts.map +1 -0
  143. package/dist/shapes/Svg.js +15 -0
  144. package/dist/shapes/Svg.js.map +1 -0
  145. package/dist/shapes/index.d.ts +16 -0
  146. package/dist/shapes/index.d.ts.map +1 -0
  147. package/dist/shapes/index.js +9 -0
  148. package/dist/shapes/index.js.map +1 -0
  149. package/dist/shapes/usePathLength.d.ts +24 -0
  150. package/dist/shapes/usePathLength.d.ts.map +1 -0
  151. package/dist/shapes/usePathLength.js +32 -0
  152. package/dist/shapes/usePathLength.js.map +1 -0
  153. package/dist/staticFile.d.ts +47 -0
  154. package/dist/staticFile.d.ts.map +1 -0
  155. package/dist/staticFile.js +105 -0
  156. package/dist/staticFile.js.map +1 -0
  157. package/dist/templates/api.d.ts +26 -0
  158. package/dist/templates/api.d.ts.map +1 -0
  159. package/dist/templates/api.js +142 -0
  160. package/dist/templates/api.js.map +1 -0
  161. package/dist/templates/index.d.ts +7 -0
  162. package/dist/templates/index.d.ts.map +1 -0
  163. package/dist/templates/index.js +7 -0
  164. package/dist/templates/index.js.map +1 -0
  165. package/dist/templates/mockData.d.ts +7 -0
  166. package/dist/templates/mockData.d.ts.map +1 -0
  167. package/dist/templates/mockData.js +262 -0
  168. package/dist/templates/mockData.js.map +1 -0
  169. package/dist/templates/types.d.ts +104 -0
  170. package/dist/templates/types.d.ts.map +1 -0
  171. package/dist/templates/types.js +16 -0
  172. package/dist/templates/types.js.map +1 -0
  173. package/dist/transitions/TransitionSeries.d.ts +127 -0
  174. package/dist/transitions/TransitionSeries.d.ts.map +1 -0
  175. package/dist/transitions/TransitionSeries.js +190 -0
  176. package/dist/transitions/TransitionSeries.js.map +1 -0
  177. package/dist/transitions/index.d.ts +52 -0
  178. package/dist/transitions/index.d.ts.map +1 -0
  179. package/dist/transitions/index.js +31 -0
  180. package/dist/transitions/index.js.map +1 -0
  181. package/dist/transitions/presets/fade.d.ts +45 -0
  182. package/dist/transitions/presets/fade.d.ts.map +1 -0
  183. package/dist/transitions/presets/fade.js +56 -0
  184. package/dist/transitions/presets/fade.js.map +1 -0
  185. package/dist/transitions/presets/flip.d.ts +99 -0
  186. package/dist/transitions/presets/flip.d.ts.map +1 -0
  187. package/dist/transitions/presets/flip.js +153 -0
  188. package/dist/transitions/presets/flip.js.map +1 -0
  189. package/dist/transitions/presets/slide.d.ts +61 -0
  190. package/dist/transitions/presets/slide.d.ts.map +1 -0
  191. package/dist/transitions/presets/slide.js +116 -0
  192. package/dist/transitions/presets/slide.js.map +1 -0
  193. package/dist/transitions/presets/wipe.d.ts +69 -0
  194. package/dist/transitions/presets/wipe.d.ts.map +1 -0
  195. package/dist/transitions/presets/wipe.js +136 -0
  196. package/dist/transitions/presets/wipe.js.map +1 -0
  197. package/dist/transitions/presets/zoom.d.ts +76 -0
  198. package/dist/transitions/presets/zoom.d.ts.map +1 -0
  199. package/dist/transitions/presets/zoom.js +110 -0
  200. package/dist/transitions/presets/zoom.js.map +1 -0
  201. package/dist/useAudioData.d.ts +112 -0
  202. package/dist/useAudioData.d.ts.map +1 -0
  203. package/dist/useAudioData.js +183 -0
  204. package/dist/useAudioData.js.map +1 -0
  205. package/dist/useSpring.d.ts +79 -0
  206. package/dist/useSpring.d.ts.map +1 -0
  207. package/dist/useSpring.js +140 -0
  208. package/dist/useSpring.js.map +1 -0
  209. package/package.json +51 -0
@@ -0,0 +1,210 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { lazy, Suspense } from 'react';
3
+ /**
4
+ * Composition defines a video's dimensions, frame rate, and duration.
5
+ * It doesn't render anything itself — it's a declarative config
6
+ * that the Player and Renderer use to know how to handle the video.
7
+ *
8
+ * Usage:
9
+ * <Composition
10
+ * id="my-video"
11
+ * component={MyVideoComponent}
12
+ * width={1920}
13
+ * height={1080}
14
+ * fps={30}
15
+ * durationInFrames={300}
16
+ * defaultProps={{ title: "Hello" }}
17
+ * />
18
+ *
19
+ * // With lazy loading
20
+ * <Composition
21
+ * id="heavy-video"
22
+ * lazyComponent={() => import('./HeavyVideo')}
23
+ * ...
24
+ * />
25
+ *
26
+ * // With dynamic metadata
27
+ * <Composition
28
+ * id="data-video"
29
+ * component={DataVideo}
30
+ * calculateMetadata={async ({ props }) => {
31
+ * const data = await fetchData();
32
+ * return {
33
+ * props: { ...props, data },
34
+ * durationInFrames: data.length * 30,
35
+ * };
36
+ * }}
37
+ * ...
38
+ * />
39
+ */
40
+ export function Composition(_props) {
41
+ // Composition is a config object — it doesn't render content directly.
42
+ // The Player reads these props and wraps the component in a TimelineProvider.
43
+ // Registration happens via registerRoot() which traverses the component tree.
44
+ return null;
45
+ }
46
+ // Set display name for traversal detection
47
+ Composition.displayName = 'Composition';
48
+ /**
49
+ * Helper to define compositions as plain objects (for registry/routing).
50
+ *
51
+ * @template T - The shape of props passed to the rendered component.
52
+ * @param config - Composition configuration
53
+ * @returns Normalized composition config
54
+ */
55
+ export function defineComposition(config) {
56
+ const { id, component, lazyComponent, width = 1920, height = 1080, fps = 30, durationInFrames = 300, defaultProps = {}, calculateMetadata, schema, defaultCodec, } = config;
57
+ if (!id) {
58
+ throw new Error('Composition requires an id');
59
+ }
60
+ if (!component && !lazyComponent) {
61
+ throw new Error('Composition requires either component or lazyComponent');
62
+ }
63
+ return {
64
+ id,
65
+ component,
66
+ lazyComponent,
67
+ width,
68
+ height,
69
+ fps,
70
+ durationInFrames,
71
+ defaultProps,
72
+ calculateMetadata,
73
+ schema,
74
+ defaultCodec,
75
+ };
76
+ }
77
+ /**
78
+ * Resolve a composition's component (handles lazy loading).
79
+ *
80
+ * @template T - The shape of props for the component.
81
+ * @param composition - Composition config from registry
82
+ * @returns The resolved component (possibly lazy-wrapped)
83
+ */
84
+ export function resolveComponent(composition) {
85
+ if (composition.component) {
86
+ return composition.component;
87
+ }
88
+ if (composition.lazyComponent) {
89
+ const lazyLoader = composition.lazyComponent;
90
+ return lazy(async () => {
91
+ const module = await lazyLoader();
92
+ if ('default' in module) {
93
+ return module;
94
+ }
95
+ return { default: module };
96
+ });
97
+ }
98
+ throw new Error(`Composition ${composition.id} has no component`);
99
+ }
100
+ /**
101
+ * Resolve a composition's metadata (handles calculateMetadata).
102
+ *
103
+ * @template T - The shape of props for the component.
104
+ * @param composition - Composition config from registry
105
+ * @param inputProps - Props passed via CLI or API
106
+ * @returns Resolved metadata
107
+ */
108
+ export async function resolveMetadata(composition, inputProps = {}) {
109
+ const baseMetadata = {
110
+ width: composition.width,
111
+ height: composition.height,
112
+ fps: composition.fps,
113
+ durationInFrames: composition.durationInFrames,
114
+ props: { ...composition.defaultProps, ...inputProps },
115
+ defaultCodec: composition.defaultCodec,
116
+ };
117
+ if (!composition.calculateMetadata) {
118
+ return baseMetadata;
119
+ }
120
+ try {
121
+ const calculated = await composition.calculateMetadata({
122
+ defaultProps: composition.defaultProps,
123
+ props: baseMetadata.props,
124
+ abortSignal: new AbortController().signal,
125
+ });
126
+ return {
127
+ ...baseMetadata,
128
+ ...calculated,
129
+ props: {
130
+ ...baseMetadata.props,
131
+ ...(calculated.props || {}),
132
+ },
133
+ };
134
+ }
135
+ catch (err) {
136
+ console.error(`calculateMetadata failed for ${composition.id}:`, err);
137
+ throw err;
138
+ }
139
+ }
140
+ /**
141
+ * Validate props against a composition's schema.
142
+ *
143
+ * @template T - The shape of props for the component.
144
+ * @param composition - Composition config from registry
145
+ * @param props - Props to validate
146
+ * @returns Validation result with success status and parsed data or error
147
+ */
148
+ export function validateProps(composition, props) {
149
+ if (!composition.schema) {
150
+ return { success: true, data: props };
151
+ }
152
+ try {
153
+ const schema = composition.schema;
154
+ // Assumes Zod schema with parse/safeParse methods
155
+ if (typeof schema.safeParse === 'function') {
156
+ const result = schema.safeParse(props);
157
+ if (result.success) {
158
+ return { success: true, data: result.data };
159
+ }
160
+ return { success: false, error: result.error };
161
+ }
162
+ // Fallback for other schema types
163
+ if (typeof schema.validate === 'function') {
164
+ const data = schema.validate(props);
165
+ return { success: true, data: data };
166
+ }
167
+ return { success: true, data: props };
168
+ }
169
+ catch (err) {
170
+ return { success: false, error: err };
171
+ }
172
+ }
173
+ /**
174
+ * Get the default props for a composition, considering schema defaults.
175
+ *
176
+ * @template T - The shape of props for the component.
177
+ * @param composition - Composition config from registry
178
+ * @returns Default props merged with schema defaults
179
+ */
180
+ export function getDefaultProps(composition) {
181
+ const defaults = { ...composition.defaultProps };
182
+ // If schema has defaults, merge them
183
+ const schema = composition.schema;
184
+ if (schema && typeof schema.parse === 'function') {
185
+ try {
186
+ // Parse empty object to get schema defaults
187
+ const schemaDefaults = schema.parse({});
188
+ return { ...schemaDefaults, ...defaults };
189
+ }
190
+ catch {
191
+ // Schema requires values, use composition defaults
192
+ }
193
+ }
194
+ return defaults;
195
+ }
196
+ /**
197
+ * Create a composition wrapper component that handles lazy loading.
198
+ *
199
+ * @template T - The shape of props for the component.
200
+ * @param composition - Composition config
201
+ * @returns Wrapped component with Suspense boundary
202
+ */
203
+ export function createCompositionWrapper(composition) {
204
+ const Component = resolveComponent(composition);
205
+ return function CompositionWrapper(props) {
206
+ return (_jsx(Suspense, { fallback: null, children: _jsx(Component, { ...props }) }));
207
+ };
208
+ }
209
+ export default Composition;
210
+ //# sourceMappingURL=Composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Composition.js","sourceRoot":"","sources":["../src/Composition.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmE,MAAM,OAAO,CAAC;AAwHxG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,WAAW,CAC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AAM,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QACjD,IAAI,CAAC;YACH,4CAA4C;YAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxC,OAAO,EAAE,GAAG,cAAc,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,mDAAmD;QACrD,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACtC,WAAiC;IAEjC,MAAM,SAAS,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAEhD,OAAO,SAAS,kBAAkB,CAAC,KAAQ;QACzC,OAAO,CACL,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACtB,KAAC,SAAS,OAAM,KAAa,GAAI,GACxB,CACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Easing functions for smooth animations.
3
+ *
4
+ * All functions take a value 0→1 and return a transformed 0→1.
5
+ * Some functions (like back, elastic) may temporarily exceed this range.
6
+ *
7
+ * Remotion-compatible easing library with additional utilities.
8
+ */
9
+ export type EasingFunction = (t: number) => number;
10
+ /**
11
+ * Creates a cubic bezier easing function.
12
+ *
13
+ * @param {number} x1 - First control point X (0-1)
14
+ * @param {number} y1 - First control point Y
15
+ * @param {number} x2 - Second control point X (0-1)
16
+ * @param {number} y2 - Second control point Y
17
+ * @returns {function} Easing function
18
+ *
19
+ * Usage:
20
+ * const ease = Easing.bezier(0.25, 0.1, 0.25, 1); // CSS ease
21
+ * const value = ease(0.5);
22
+ */
23
+ declare function bezier(x1: number, y1: number, x2: number, y2: number): EasingFunction;
24
+ declare function poly(n?: number): EasingFunction;
25
+ declare function back(overshoot?: number): EasingFunction;
26
+ /**
27
+ * Elastic easing - spring-like oscillation
28
+ *
29
+ * @param {number} bounciness - Oscillation amplitude (default: 1)
30
+ * @returns {function} Easing function
31
+ */
32
+ declare function elastic(bounciness?: number): EasingFunction;
33
+ declare function inFn(easing: EasingFunction): EasingFunction;
34
+ declare function out(easing: EasingFunction): EasingFunction;
35
+ declare function inOut(easing: EasingFunction): EasingFunction;
36
+ /**
37
+ * Complete Easing object with all functions
38
+ */
39
+ export declare const Easing: {
40
+ linear: (t: number) => number;
41
+ ease: EasingFunction;
42
+ easeIn: (t: number) => number;
43
+ easeOut: (t: number) => number;
44
+ easeInOut: (t: number) => number;
45
+ cubic: (t: number) => number;
46
+ easeInCubic: (t: number) => number;
47
+ easeOutCubic: (t: number) => number;
48
+ easeInOutCubic: (t: number) => number;
49
+ easeInQuart: (t: number) => number;
50
+ easeOutQuart: (t: number) => number;
51
+ easeInOutQuart: (t: number) => number;
52
+ easeInQuint: (t: number) => number;
53
+ easeOutQuint: (t: number) => number;
54
+ easeInOutQuint: (t: number) => number;
55
+ easeInSine: (t: number) => number;
56
+ easeOutSine: (t: number) => number;
57
+ easeInOutSine: (t: number) => number;
58
+ exp: (t: number) => number;
59
+ easeInExpo: (t: number) => number;
60
+ easeOutExpo: (t: number) => number;
61
+ easeInOutExpo: (t: number) => number;
62
+ circle: (t: number) => number;
63
+ easeInCirc: (t: number) => number;
64
+ easeOutCirc: (t: number) => number;
65
+ easeInOutCirc: (t: number) => number;
66
+ easeInBack: (t: number) => number;
67
+ easeOutBack: (t: number) => number;
68
+ easeInOutBack: (t: number) => number;
69
+ easeInElastic: (t: number) => number;
70
+ easeOutElastic: (t: number) => number;
71
+ easeInOutElastic: (t: number) => number;
72
+ bounce: (t: number) => number;
73
+ easeInBounce: (t: number) => number;
74
+ easeOutBounce: (t: number) => number;
75
+ easeInOutBounce: (t: number) => number;
76
+ spring: (t: number) => number;
77
+ step0: (t: number) => number;
78
+ step1: (t: number) => number;
79
+ poly: typeof poly;
80
+ back: typeof back;
81
+ elastic: typeof elastic;
82
+ bezier: typeof bezier;
83
+ in: typeof inFn;
84
+ out: typeof out;
85
+ inOut: typeof inOut;
86
+ };
87
+ export default Easing;
88
+ //# sourceMappingURL=Easing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Easing.d.ts","sourceRoot":"","sources":["../src/Easing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,iBAAS,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc,CA2E9E;AAED,iBAAS,IAAI,CAAC,CAAC,SAAI,GAAG,cAAc,CAEnC;AAED,iBAAS,IAAI,CAAC,SAAS,SAAU,GAAG,cAAc,CAKjD;AAED;;;;;GAKG;AACH,iBAAS,OAAO,CAAC,UAAU,SAAI,GAAG,cAAc,CAM/C;AAED,iBAAS,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAEpD;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAEnD;AAED,iBAAS,KAAK,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAOrD;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;gBAEL,MAAM,KAAG,MAAM;;gBAIf,MAAM,KAAG,MAAM;iBACd,MAAM,KAAG,MAAM;mBACb,MAAM,KAAG,MAAM;eAGnB,MAAM,KAAG,MAAM;qBACT,MAAM,KAAG,MAAM;sBACd,MAAM,KAAG,MAAM;wBACb,MAAM,KAAG,MAAM;qBAIlB,MAAM,KAAG,MAAM;sBACd,MAAM,KAAG,MAAM;wBACb,MAAM,KAAG,MAAM;qBAIlB,MAAM,KAAG,MAAM;sBACd,MAAM,KAAG,MAAM;wBACb,MAAM,KAAG,MAAM;oBAInB,MAAM,KAAG,MAAM;qBACd,MAAM,KAAG,MAAM;uBACb,MAAM,KAAG,MAAM;aAGzB,MAAM,KAAG,MAAM;oBACR,MAAM,KAAG,MAAM;qBACd,MAAM,KAAG,MAAM;uBACb,MAAM,KAAG,MAAM;gBAStB,MAAM,KAAG,MAAM;oBACX,MAAM,KAAG,MAAM;qBACd,MAAM,KAAG,MAAM;uBACb,MAAM,KAAG,MAAM;oBAMlB,MAAM,KAAG,MAAM;qBAKd,MAAM,KAAG,MAAM;uBAKb,MAAM,KAAG,MAAM;uBASf,MAAM,KAAG,MAAM;wBAQd,MAAM,KAAG,MAAM;0BAQb,MAAM,KAAG,MAAM;gBAUzB,MAAM,KAAG,MAAM;sBAQT,MAAM,KAAG,MAAM;uBAId,MAAM,KAAG,MAAM;yBACb,MAAM,KAAG,MAAM;gBAQxB,MAAM,KAAG,MAAM;eAUhB,MAAM,KAAG,MAAM;eACf,MAAM,KAAG,MAAM;;;;;;;;CAY3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/dist/Easing.js ADDED
@@ -0,0 +1,266 @@
1
+ /**
2
+ * Easing functions for smooth animations.
3
+ *
4
+ * All functions take a value 0→1 and return a transformed 0→1.
5
+ * Some functions (like back, elastic) may temporarily exceed this range.
6
+ *
7
+ * Remotion-compatible easing library with additional utilities.
8
+ */
9
+ /**
10
+ * Creates a cubic bezier easing function.
11
+ *
12
+ * @param {number} x1 - First control point X (0-1)
13
+ * @param {number} y1 - First control point Y
14
+ * @param {number} x2 - Second control point X (0-1)
15
+ * @param {number} y2 - Second control point Y
16
+ * @returns {function} Easing function
17
+ *
18
+ * Usage:
19
+ * const ease = Easing.bezier(0.25, 0.1, 0.25, 1); // CSS ease
20
+ * const value = ease(0.5);
21
+ */
22
+ function bezier(x1, y1, x2, y2) {
23
+ // Newton-Raphson iteration to find t for given x
24
+ const NEWTON_ITERATIONS = 4;
25
+ const NEWTON_MIN_SLOPE = 0.001;
26
+ const SUBDIVISION_PRECISION = 0.0000001;
27
+ const SUBDIVISION_MAX_ITERATIONS = 10;
28
+ const kSplineTableSize = 11;
29
+ const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
30
+ const calcBezier = (t, a1, a2) => ((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t * t + 3 * a1 * t;
31
+ const getSlope = (t, a1, a2) => 3 * (1 - 3 * a2 + 3 * a1) * t * t + 2 * (3 * a2 - 6 * a1) * t + 3 * a1;
32
+ // Precompute samples
33
+ const sampleValues = new Float32Array(kSplineTableSize);
34
+ for (let i = 0; i < kSplineTableSize; ++i) {
35
+ sampleValues[i] = calcBezier(i * kSampleStepSize, x1, x2);
36
+ }
37
+ const binarySubdivide = (x, a, b) => {
38
+ let currentX, currentT;
39
+ let i = 0;
40
+ do {
41
+ currentT = a + (b - a) / 2;
42
+ currentX = calcBezier(currentT, x1, x2) - x;
43
+ if (currentX > 0) {
44
+ b = currentT;
45
+ }
46
+ else {
47
+ a = currentT;
48
+ }
49
+ } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
50
+ return currentT;
51
+ };
52
+ const newtonRaphsonIterate = (x, guessT) => {
53
+ for (let i = 0; i < NEWTON_ITERATIONS; ++i) {
54
+ const currentSlope = getSlope(guessT, x1, x2);
55
+ if (currentSlope === 0)
56
+ return guessT;
57
+ const currentX = calcBezier(guessT, x1, x2) - x;
58
+ guessT -= currentX / currentSlope;
59
+ }
60
+ return guessT;
61
+ };
62
+ const getTForX = (x) => {
63
+ let intervalStart = 0;
64
+ let currentSample = 1;
65
+ const lastSample = kSplineTableSize - 1;
66
+ for (; currentSample !== lastSample && sampleValues[currentSample] <= x; ++currentSample) {
67
+ intervalStart += kSampleStepSize;
68
+ }
69
+ --currentSample;
70
+ const dist = (x - sampleValues[currentSample]) /
71
+ (sampleValues[currentSample + 1] - sampleValues[currentSample]);
72
+ const guessForT = intervalStart + dist * kSampleStepSize;
73
+ const initialSlope = getSlope(guessForT, x1, x2);
74
+ if (initialSlope >= NEWTON_MIN_SLOPE) {
75
+ return newtonRaphsonIterate(x, guessForT);
76
+ }
77
+ else if (initialSlope === 0) {
78
+ return guessForT;
79
+ }
80
+ else {
81
+ return binarySubdivide(x, intervalStart, intervalStart + kSampleStepSize);
82
+ }
83
+ };
84
+ return (t) => {
85
+ if (t === 0 || t === 1)
86
+ return t;
87
+ return calcBezier(getTForX(t), y1, y2);
88
+ };
89
+ }
90
+ function poly(n = 4) {
91
+ return (t) => Math.pow(t, n);
92
+ }
93
+ function back(overshoot = 1.70158) {
94
+ return (t) => {
95
+ const c3 = overshoot + 1;
96
+ return c3 * t * t * t - overshoot * t * t;
97
+ };
98
+ }
99
+ /**
100
+ * Elastic easing - spring-like oscillation
101
+ *
102
+ * @param {number} bounciness - Oscillation amplitude (default: 1)
103
+ * @returns {function} Easing function
104
+ */
105
+ function elastic(bounciness = 1) {
106
+ const p = 0.3 / bounciness;
107
+ return (t) => {
108
+ if (t === 0 || t === 1)
109
+ return t;
110
+ return Math.pow(2, -10 * t) * Math.sin(((t - p / 4) * (2 * Math.PI)) / p) + 1;
111
+ };
112
+ }
113
+ function inFn(easing) {
114
+ return easing;
115
+ }
116
+ function out(easing) {
117
+ return (t) => 1 - easing(1 - t);
118
+ }
119
+ function inOut(easing) {
120
+ return (t) => {
121
+ if (t < 0.5) {
122
+ return easing(t * 2) / 2;
123
+ }
124
+ return 1 - easing((1 - t) * 2) / 2;
125
+ };
126
+ }
127
+ /**
128
+ * Complete Easing object with all functions
129
+ */
130
+ export const Easing = {
131
+ // Basic
132
+ linear: (t) => t,
133
+ // Quadratic
134
+ ease: bezier(0.25, 0.1, 0.25, 1), // CSS ease
135
+ easeIn: (t) => t * t,
136
+ easeOut: (t) => 1 - (1 - t) * (1 - t),
137
+ easeInOut: (t) => (t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2),
138
+ // Cubic
139
+ cubic: (t) => t * t * t,
140
+ easeInCubic: (t) => t * t * t,
141
+ easeOutCubic: (t) => 1 - Math.pow(1 - t, 3),
142
+ easeInOutCubic: (t) => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2,
143
+ // Quartic
144
+ easeInQuart: (t) => t * t * t * t,
145
+ easeOutQuart: (t) => 1 - Math.pow(1 - t, 4),
146
+ easeInOutQuart: (t) => t < 0.5 ? 8 * t * t * t * t : 1 - Math.pow(-2 * t + 2, 4) / 2,
147
+ // Quintic
148
+ easeInQuint: (t) => t * t * t * t * t,
149
+ easeOutQuint: (t) => 1 - Math.pow(1 - t, 5),
150
+ easeInOutQuint: (t) => t < 0.5 ? 16 * t * t * t * t * t : 1 - Math.pow(-2 * t + 2, 5) / 2,
151
+ // Sine
152
+ easeInSine: (t) => 1 - Math.cos((t * Math.PI) / 2),
153
+ easeOutSine: (t) => Math.sin((t * Math.PI) / 2),
154
+ easeInOutSine: (t) => -(Math.cos(Math.PI * t) - 1) / 2,
155
+ // Exponential
156
+ exp: (t) => (t === 0 ? 0 : Math.pow(2, 10 * t - 10)),
157
+ easeInExpo: (t) => (t === 0 ? 0 : Math.pow(2, 10 * t - 10)),
158
+ easeOutExpo: (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t)),
159
+ easeInOutExpo: (t) => {
160
+ if (t === 0)
161
+ return 0;
162
+ if (t === 1)
163
+ return 1;
164
+ return t < 0.5
165
+ ? Math.pow(2, 20 * t - 10) / 2
166
+ : (2 - Math.pow(2, -20 * t + 10)) / 2;
167
+ },
168
+ // Circular
169
+ circle: (t) => 1 - Math.sqrt(1 - t * t),
170
+ easeInCirc: (t) => 1 - Math.sqrt(1 - t * t),
171
+ easeOutCirc: (t) => Math.sqrt(1 - Math.pow(t - 1, 2)),
172
+ easeInOutCirc: (t) => t < 0.5
173
+ ? (1 - Math.sqrt(1 - Math.pow(2 * t, 2))) / 2
174
+ : (Math.sqrt(1 - Math.pow(-2 * t + 2, 2)) + 1) / 2,
175
+ // Back (overshoot)
176
+ easeInBack: (t) => {
177
+ const c1 = 1.70158;
178
+ const c3 = c1 + 1;
179
+ return c3 * t * t * t - c1 * t * t;
180
+ },
181
+ easeOutBack: (t) => {
182
+ const c1 = 1.70158;
183
+ const c3 = c1 + 1;
184
+ return 1 + c3 * Math.pow(t - 1, 3) + c1 * Math.pow(t - 1, 2);
185
+ },
186
+ easeInOutBack: (t) => {
187
+ const c1 = 1.70158;
188
+ const c2 = c1 * 1.525;
189
+ return t < 0.5
190
+ ? (Math.pow(2 * t, 2) * ((c2 + 1) * 2 * t - c2)) / 2
191
+ : (Math.pow(2 * t - 2, 2) * ((c2 + 1) * (t * 2 - 2) + c2) + 2) / 2;
192
+ },
193
+ // Elastic (spring-like)
194
+ easeInElastic: (t) => {
195
+ const c4 = (2 * Math.PI) / 3;
196
+ return t === 0
197
+ ? 0
198
+ : t === 1
199
+ ? 1
200
+ : -Math.pow(2, 10 * t - 10) * Math.sin((t * 10 - 10.75) * c4);
201
+ },
202
+ easeOutElastic: (t) => {
203
+ const c4 = (2 * Math.PI) / 3;
204
+ return t === 0
205
+ ? 0
206
+ : t === 1
207
+ ? 1
208
+ : Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c4) + 1;
209
+ },
210
+ easeInOutElastic: (t) => {
211
+ const c5 = (2 * Math.PI) / 4.5;
212
+ if (t === 0)
213
+ return 0;
214
+ if (t === 1)
215
+ return 1;
216
+ return t < 0.5
217
+ ? -(Math.pow(2, 20 * t - 10) * Math.sin((20 * t - 11.125) * c5)) / 2
218
+ : (Math.pow(2, -20 * t + 10) * Math.sin((20 * t - 11.125) * c5)) / 2 + 1;
219
+ },
220
+ // Bounce
221
+ bounce: (t) => {
222
+ const n1 = 7.5625;
223
+ const d1 = 2.75;
224
+ if (t < 1 / d1)
225
+ return n1 * t * t;
226
+ if (t < 2 / d1)
227
+ return n1 * (t -= 1.5 / d1) * t + 0.75;
228
+ if (t < 2.5 / d1)
229
+ return n1 * (t -= 2.25 / d1) * t + 0.9375;
230
+ return n1 * (t -= 2.625 / d1) * t + 0.984375;
231
+ },
232
+ easeInBounce: (t) => {
233
+ const bounceOut = Easing.bounce;
234
+ return 1 - bounceOut(1 - t);
235
+ },
236
+ easeOutBounce: (t) => Easing.bounce(t),
237
+ easeInOutBounce: (t) => {
238
+ const bounceOut = Easing.bounce;
239
+ return t < 0.5
240
+ ? (1 - bounceOut(1 - 2 * t)) / 2
241
+ : (1 + bounceOut(2 * t - 1)) / 2;
242
+ },
243
+ // Spring (damped oscillation)
244
+ spring: (t) => {
245
+ const c4 = (2 * Math.PI) / 3;
246
+ return t === 0
247
+ ? 0
248
+ : t === 1
249
+ ? 1
250
+ : Math.pow(2, -10 * t) * Math.sin((t * 10 - 0.75) * c4) + 1;
251
+ },
252
+ // Step functions
253
+ step0: (t) => (t > 0 ? 1 : 0),
254
+ step1: (t) => (t >= 1 ? 1 : 0),
255
+ // Factory functions for customizable easings
256
+ poly,
257
+ back,
258
+ elastic,
259
+ bezier,
260
+ // Modifiers
261
+ in: inFn,
262
+ out,
263
+ inOut,
264
+ };
265
+ export default Easing;
266
+ //# sourceMappingURL=Easing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Easing.js","sourceRoot":"","sources":["../src/Easing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;GAYG;AACH,SAAS,MAAM,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;IAC5D,iDAAiD;IACjD,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,gBAAgB,GAAG,KAAK,CAAC;IAC/B,MAAM,qBAAqB,GAAG,SAAS,CAAC;IACxC,MAAM,0BAA0B,GAAG,EAAE,CAAC;IAEtC,MAAM,gBAAgB,GAAG,EAAE,CAAC;IAC5B,MAAM,eAAe,GAAG,GAAG,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,CAAC;IAEvD,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,EAAU,EAAE,EAAU,EAAU,E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AAC,CAAC,CAAC,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C,6CAA6C;IAC7C,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,MAAM;IAEN,YAAY;IACZ,EAAE,EAAE,IAAI;IACR,GAAG;IACH,KAAK;CACN,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Component, ReactNode, ErrorInfo } from 'react';
2
+ /**
3
+ * Error boundary for catching render errors in compositions.
4
+ *
5
+ * In render mode, sets window.__FRAMELY_RENDER_ERROR so the CLI
6
+ * can detect and report the error.
7
+ *
8
+ * In dev/studio mode, displays the error with a stack trace.
9
+ */
10
+ declare global {
11
+ interface Window {
12
+ __FRAMELY_RENDER_ERROR?: {
13
+ message: string;
14
+ stack?: string;
15
+ componentStack?: string | null;
16
+ };
17
+ }
18
+ }
19
+ export interface ErrorBoundaryProps {
20
+ children: ReactNode;
21
+ fallback?: ReactNode;
22
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
23
+ }
24
+ export interface ErrorBoundaryState {
25
+ hasError: boolean;
26
+ error: Error | null;
27
+ }
28
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
29
+ constructor(props: ErrorBoundaryProps);
30
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
31
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
32
+ render(): ReactNode;
33
+ }
34
+ export default ErrorBoundary;
35
+ //# sourceMappingURL=ErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../src/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD;;;;;;;GAOG;AAEH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,sBAAsB,CAAC,EAAE;YACvB,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAChC,CAAC;KACH;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CACxD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACtE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAsB3D,MAAM,IAAI,SAAS;CAqEpB;AAED,eAAe,aAAa,CAAC"}