remotion 4.0.536 → 4.0.538

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 (172) hide show
  1. package/dist/cjs/AbsoluteFill.d.ts +62 -62
  2. package/dist/cjs/AbsoluteFill.js +3 -3
  3. package/dist/cjs/AbsoluteFillElement.d.ts +1 -1
  4. package/dist/cjs/AbsoluteFillElement.js +36 -3
  5. package/dist/cjs/CanUseRemotionHooks.js +1 -1
  6. package/dist/cjs/Composition.js +5 -11
  7. package/dist/cjs/CompositionErrorBoundary.js +5 -2
  8. package/dist/cjs/CompositionManager.d.ts +1 -0
  9. package/dist/cjs/CompositionManagerContext.d.ts +3 -0
  10. package/dist/cjs/CompositionManagerContext.js +5 -3
  11. package/dist/cjs/CompositionManagerProvider.d.ts +1 -1
  12. package/dist/cjs/CompositionManagerProvider.js +3 -1
  13. package/dist/cjs/CompositionRegistryProvider.d.ts +1 -1
  14. package/dist/cjs/CompositionRegistryProvider.js +1 -1
  15. package/dist/cjs/EditorProps.d.ts +2 -2
  16. package/dist/cjs/EditorProps.js +1 -1
  17. package/dist/cjs/Folder.js +1 -1
  18. package/dist/cjs/HtmlInCanvas.d.ts +58 -67
  19. package/dist/cjs/HtmlInCanvas.js +84 -20
  20. package/dist/cjs/HtmlInCanvasFallback.d.ts +6 -0
  21. package/dist/cjs/HtmlInCanvasFallback.js +39 -0
  22. package/dist/cjs/IFrame.d.ts +2 -2
  23. package/dist/cjs/IFrame.js +1 -1
  24. package/dist/cjs/Img.d.ts +62 -62
  25. package/dist/cjs/Img.js +160 -132
  26. package/dist/cjs/Interactive.d.ts +147 -145
  27. package/dist/cjs/Interactive.js +2 -2
  28. package/dist/cjs/RemotionRoot.js +1 -1
  29. package/dist/cjs/RenderAssetManager.js +1 -1
  30. package/dist/cjs/Sequence.js +37 -27
  31. package/dist/cjs/SequenceActivityBoundary.js +1 -1
  32. package/dist/cjs/SequenceActivityBudget.js +1 -1
  33. package/dist/cjs/SequenceActivitySuspensionProvider.js +1 -1
  34. package/dist/cjs/SequenceManager.d.ts +6 -0
  35. package/dist/cjs/SequenceManager.js +71 -27
  36. package/dist/cjs/SequenceRegistryProvider.js +16 -3
  37. package/dist/cjs/TimelineContext.js +1 -1
  38. package/dist/cjs/Track.js +2 -2
  39. package/dist/cjs/animated-image/AnimatedImage.d.ts +69 -69
  40. package/dist/cjs/animated-image/AnimatedImage.js +17 -12
  41. package/dist/cjs/animated-image/canvas.d.ts +6 -5
  42. package/dist/cjs/animated-image/canvas.js +1 -1
  43. package/dist/cjs/animated-image/create-image-decoder.d.ts +1 -1
  44. package/dist/cjs/animated-image/decode-image.d.ts +1 -1
  45. package/dist/cjs/animated-image/get-duration-in-seconds.d.ts +1 -1
  46. package/dist/cjs/animated-image/index.js +1 -1
  47. package/dist/cjs/audio/AudioForPreview.js +5 -28
  48. package/dist/cjs/audio/AudioForRendering.d.ts +5 -20
  49. package/dist/cjs/audio/AudioForRendering.js +44 -5
  50. package/dist/cjs/audio/html5-audio.d.ts +36 -36
  51. package/dist/cjs/audio/html5-audio.js +8 -10
  52. package/dist/cjs/audio/index.js +1 -1
  53. package/dist/cjs/audio/shared-audio-tags.js +10 -16
  54. package/dist/cjs/audio/shared-element-source-node.d.ts +1 -1
  55. package/dist/cjs/audio/use-audio-context.d.ts +2 -1
  56. package/dist/cjs/audio/wait-until-actually-resumed.d.ts +2 -1
  57. package/dist/cjs/buffer-until-first-frame.d.ts +4 -3
  58. package/dist/cjs/buffering.js +1 -1
  59. package/dist/cjs/cancel-render.js +3 -0
  60. package/dist/cjs/canvas-image/CanvasImage.d.ts +71 -71
  61. package/dist/cjs/canvas-image/CanvasImage.js +27 -24
  62. package/dist/cjs/canvas-image/index.js +1 -1
  63. package/dist/cjs/codec.d.ts +1 -1
  64. package/dist/cjs/committed-metadata.d.ts +4 -2
  65. package/dist/cjs/composition-registry-fallback.d.ts +4 -2
  66. package/dist/cjs/composition-registry-fallback.js +12 -10
  67. package/dist/cjs/create-element-source-proxy.js +46 -6
  68. package/dist/cjs/default-css.d.ts +1 -1
  69. package/dist/cjs/delay-render.d.ts +2 -1
  70. package/dist/cjs/delay-render.js +4 -2
  71. package/dist/cjs/easing.js +3 -1
  72. package/dist/cjs/effects/Solid.d.ts +60 -60
  73. package/dist/cjs/effects/Solid.js +2 -2
  74. package/dist/cjs/effects/canvas-pool.js +6 -9
  75. package/dist/cjs/effects/index.js +1 -1
  76. package/dist/cjs/effects/use-memoized-effects.d.ts +2 -1
  77. package/dist/cjs/effects/use-memoized-effects.js +107 -54
  78. package/dist/cjs/freeze.js +2 -2
  79. package/dist/cjs/get-cross-origin-value.d.ts +1 -1
  80. package/dist/cjs/get-effective-visual-mode-value.d.ts +2 -2
  81. package/dist/cjs/index.d.ts +3 -1
  82. package/dist/cjs/index.js +32 -32
  83. package/dist/cjs/interactivity-schema.d.ts +286 -286
  84. package/dist/cjs/internals.d.ts +411 -595
  85. package/dist/cjs/internals.js +8 -0
  86. package/dist/cjs/interpolate-colors.d.ts +1 -1
  87. package/dist/cjs/interpolate-colors.js +17 -16
  88. package/dist/cjs/interpolate.d.ts +2 -9
  89. package/dist/cjs/is-player.js +1 -1
  90. package/dist/cjs/loading-indicator.js +2 -6
  91. package/dist/cjs/log-level-context.d.ts +1 -1
  92. package/dist/cjs/log.d.ts +12 -7
  93. package/dist/cjs/loop/index.js +1 -1
  94. package/dist/cjs/media-resource-manager.d.ts +1 -1
  95. package/dist/cjs/media-tag-current-time-timestamp.d.ts +1 -1
  96. package/dist/cjs/no-react.d.ts +85 -91
  97. package/dist/cjs/no-react.js +2 -2
  98. package/dist/cjs/play-and-handle-not-allowed-error.d.ts +5 -4
  99. package/dist/cjs/playback-logging.d.ts +2 -1
  100. package/dist/cjs/playback-pitch-context.d.ts +1 -0
  101. package/dist/cjs/playback-pitch-context.js +5 -0
  102. package/dist/cjs/prefetch-state.js +1 -1
  103. package/dist/cjs/prefetch.d.ts +7 -6
  104. package/dist/cjs/props-if-has-props.d.ts +2 -1
  105. package/dist/cjs/prores-profile.d.ts +1 -1
  106. package/dist/cjs/register-root.d.ts +2 -2
  107. package/dist/cjs/render-resource-manager.d.ts +1 -1
  108. package/dist/cjs/render-types.d.ts +2 -2
  109. package/dist/cjs/resolve-video-config.d.ts +8 -8
  110. package/dist/cjs/runtime-value-store.d.ts +1 -1
  111. package/dist/cjs/scale-value.d.ts +1 -1
  112. package/dist/cjs/seek.d.ts +3 -2
  113. package/dist/cjs/sequence-activity-context.js +1 -1
  114. package/dist/cjs/sequence-crop.js +1 -4
  115. package/dist/cjs/series/flatten-children.d.ts +3 -1
  116. package/dist/cjs/series/index.js +4 -5
  117. package/dist/cjs/series/is-inside-series.js +2 -2
  118. package/dist/cjs/spring/index.d.ts +1 -1
  119. package/dist/cjs/spring/index.js +1 -1
  120. package/dist/cjs/spring/measure-spring.d.ts +1 -1
  121. package/dist/cjs/spring/spring-utils.d.ts +1 -1
  122. package/dist/cjs/spring/spring-utils.js +11 -5
  123. package/dist/cjs/timeline-position-state.d.ts +2 -1
  124. package/dist/cjs/timeline-position-state.js +23 -3
  125. package/dist/cjs/use-amplification.d.ts +4 -7
  126. package/dist/cjs/use-current-frame.d.ts +1 -0
  127. package/dist/cjs/use-current-frame.js +14 -7
  128. package/dist/cjs/use-current-scale.d.ts +2 -2
  129. package/dist/cjs/use-delay-render.d.ts +2 -1
  130. package/dist/cjs/use-lazy-component.d.ts +1 -1
  131. package/dist/cjs/use-lazy-component.js +15 -5
  132. package/dist/cjs/use-media-buffering.d.ts +3 -2
  133. package/dist/cjs/use-media-duration.d.ts +4 -0
  134. package/dist/cjs/use-media-duration.js +36 -0
  135. package/dist/cjs/use-media-enabled.d.ts +1 -1
  136. package/dist/cjs/use-media-enabled.js +1 -1
  137. package/dist/cjs/use-media-in-timeline.d.ts +1 -1
  138. package/dist/cjs/use-media-playback.d.ts +3 -3
  139. package/dist/cjs/use-media-tag.d.ts +2 -2
  140. package/dist/cjs/use-pixel-density.d.ts +1 -1
  141. package/dist/cjs/use-premounting.d.ts +1 -1
  142. package/dist/cjs/use-premounting.js +6 -2
  143. package/dist/cjs/use-request-video-callback-time.d.ts +3 -3
  144. package/dist/cjs/use-schema.d.ts +4 -4
  145. package/dist/cjs/use-video.js +1 -1
  146. package/dist/cjs/validate-media-props.d.ts +1 -1
  147. package/dist/cjs/validation/validate-default-props.d.ts +1 -1
  148. package/dist/cjs/validation/validate-duration-in-frames.js +3 -3
  149. package/dist/cjs/version.d.ts +1 -1
  150. package/dist/cjs/version.js +1 -1
  151. package/dist/cjs/video/MediaPlaybackError.js +0 -1
  152. package/dist/cjs/video/OffthreadVideo.js +5 -5
  153. package/dist/cjs/video/OffthreadVideoForRendering.js +9 -7
  154. package/dist/cjs/video/VideoForPreview.js +6 -28
  155. package/dist/cjs/video/VideoForRendering.d.ts +5 -3
  156. package/dist/cjs/video/VideoForRendering.js +4 -2
  157. package/dist/cjs/video/duration-state.d.ts +1 -0
  158. package/dist/cjs/video/duration-state.js +8 -2
  159. package/dist/cjs/video/emit-video-frame.d.ts +1 -1
  160. package/dist/cjs/video/html5-video.d.ts +36 -36
  161. package/dist/cjs/video/html5-video.js +8 -10
  162. package/dist/cjs/video/index.js +2 -2
  163. package/dist/cjs/video/seek-until-right.d.ts +3 -2
  164. package/dist/cjs/warn-about-non-seekable-media.d.ts +1 -1
  165. package/dist/cjs/with-interactivity-schema.d.ts +1 -1
  166. package/dist/cjs/with-interactivity-schema.js +15 -18
  167. package/dist/cjs/wrap-remotion-context.d.ts +4 -4
  168. package/dist/cjs/wrap-remotion-context.js +2 -2
  169. package/dist/esm/index.mjs +1060 -728
  170. package/dist/esm/no-react.mjs +30 -25
  171. package/dist/esm/version.mjs +1 -1
  172. package/package.json +4 -4
@@ -9,76 +9,76 @@ export type AbsoluteFillProps = Omit<AbsoluteFillElementProps, keyof Interactive
9
9
  };
10
10
  export declare const absoluteFillSchema: {
11
11
  readonly 'style.transformOrigin': {
12
- readonly type: "transform-origin";
12
+ readonly type: 'transform-origin';
13
13
  readonly step: 1;
14
- readonly default: "50% 50%";
15
- readonly description: "Transform origin";
14
+ readonly default: '50% 50%';
15
+ readonly description: 'Transform origin';
16
16
  };
17
17
  readonly 'style.translate': {
18
- readonly type: "translate";
18
+ readonly type: 'translate';
19
19
  readonly step: 1;
20
- readonly default: "0px 0px";
21
- readonly description: "Offset";
20
+ readonly default: '0px 0px';
21
+ readonly description: 'Offset';
22
22
  };
23
23
  readonly 'style.scale': {
24
- readonly type: "scale";
24
+ readonly type: 'scale';
25
25
  readonly max: 100;
26
26
  readonly step: 0.01;
27
27
  readonly default: 1;
28
- readonly description: "Scale";
29
- readonly defaultKeyframeOutput: "perceptual-scale";
28
+ readonly description: 'Scale';
29
+ readonly defaultKeyframeOutput: 'perceptual-scale';
30
30
  };
31
31
  readonly 'style.rotate': {
32
- readonly type: "rotation-css";
32
+ readonly type: 'rotation-css';
33
33
  readonly step: 1;
34
- readonly default: "0deg";
35
- readonly description: "Rotation";
34
+ readonly default: '0deg';
35
+ readonly description: 'Rotation';
36
36
  };
37
37
  readonly 'style.opacity': {
38
- readonly type: "number";
38
+ readonly type: 'number';
39
39
  readonly min: 0;
40
40
  readonly max: 1;
41
41
  readonly step: 0.01;
42
42
  readonly default: 1;
43
- readonly description: "Opacity";
43
+ readonly description: 'Opacity';
44
44
  readonly hiddenFromList: false;
45
45
  };
46
46
  readonly 'style.color': {
47
- readonly type: "color";
47
+ readonly type: 'color';
48
48
  readonly default: undefined;
49
- readonly description: "Color";
49
+ readonly description: 'Color';
50
50
  };
51
51
  readonly 'style.fontFamily': {
52
- readonly type: "font-family";
52
+ readonly type: 'font-family';
53
53
  readonly default: undefined;
54
- readonly description: "Font family";
54
+ readonly description: 'Font family';
55
55
  readonly keyframable: false;
56
56
  };
57
57
  readonly 'style.fontSize': {
58
- readonly type: "number";
58
+ readonly type: 'number';
59
59
  readonly default: undefined;
60
60
  readonly min: 0;
61
61
  readonly step: 1;
62
- readonly description: "Font size";
62
+ readonly description: 'Font size';
63
63
  readonly hiddenFromList: false;
64
64
  };
65
65
  readonly 'style.lineHeight': {
66
- readonly type: "number";
66
+ readonly type: 'number';
67
67
  readonly default: undefined;
68
68
  readonly min: 0;
69
69
  readonly step: 0.05;
70
- readonly description: "Line height";
70
+ readonly description: 'Line height';
71
71
  readonly hiddenFromList: false;
72
72
  };
73
73
  readonly 'style.fontWeight': {
74
- readonly type: "font-weight";
74
+ readonly type: 'font-weight';
75
75
  readonly default: 400;
76
- readonly description: "Font weight";
76
+ readonly description: 'Font weight';
77
77
  };
78
78
  readonly 'style.fontStyle': {
79
- readonly type: "enum";
80
- readonly default: "normal";
81
- readonly description: "Font style";
79
+ readonly type: 'enum';
80
+ readonly default: 'normal';
81
+ readonly description: 'Font style';
82
82
  readonly variants: {
83
83
  readonly normal: {};
84
84
  readonly italic: {};
@@ -86,9 +86,9 @@ export declare const absoluteFillSchema: {
86
86
  };
87
87
  };
88
88
  readonly 'style.textAlign': {
89
- readonly type: "enum";
90
- readonly default: "left";
91
- readonly description: "Text align";
89
+ readonly type: 'enum';
90
+ readonly default: 'left';
91
+ readonly description: 'Text align';
92
92
  readonly variants: {
93
93
  readonly left: {};
94
94
  readonly center: {};
@@ -99,24 +99,24 @@ export declare const absoluteFillSchema: {
99
99
  };
100
100
  };
101
101
  readonly 'style.letterSpacing': {
102
- readonly type: "number";
102
+ readonly type: 'number';
103
103
  readonly default: undefined;
104
104
  readonly step: 0.1;
105
- readonly description: "Letter spacing";
105
+ readonly description: 'Letter spacing';
106
106
  readonly hiddenFromList: false;
107
107
  };
108
108
  readonly 'style.borderWidth': {
109
- readonly type: "number";
109
+ readonly type: 'number';
110
110
  readonly default: undefined;
111
111
  readonly min: 0;
112
112
  readonly step: 1;
113
- readonly description: "Border width";
113
+ readonly description: 'Border width';
114
114
  readonly hiddenFromList: false;
115
115
  };
116
116
  readonly 'style.borderStyle': {
117
- readonly type: "enum";
118
- readonly default: "none";
119
- readonly description: "Border style";
117
+ readonly type: 'enum';
118
+ readonly default: 'none';
119
+ readonly description: 'Border style';
120
120
  readonly variants: {
121
121
  readonly none: {};
122
122
  readonly hidden: {};
@@ -131,68 +131,68 @@ export declare const absoluteFillSchema: {
131
131
  };
132
132
  };
133
133
  readonly 'style.borderColor': {
134
- readonly type: "color";
134
+ readonly type: 'color';
135
135
  readonly default: undefined;
136
- readonly description: "Border color";
136
+ readonly description: 'Border color';
137
137
  };
138
138
  readonly 'style.borderRadius': {
139
- readonly type: "number";
139
+ readonly type: 'number';
140
140
  readonly default: 0;
141
141
  readonly min: 0;
142
142
  readonly step: 1;
143
- readonly description: "Border radius";
143
+ readonly description: 'Border radius';
144
144
  readonly hiddenFromList: false;
145
145
  readonly keyframable: true;
146
146
  };
147
147
  readonly 'style.borderTopLeftRadius': {
148
- readonly type: "number";
148
+ readonly type: 'number';
149
149
  readonly default: 0;
150
150
  readonly min: 0;
151
151
  readonly step: 1;
152
- readonly description: "Top left radius";
152
+ readonly description: 'Top left radius';
153
153
  readonly hiddenFromList: false;
154
154
  };
155
155
  readonly 'style.borderTopRightRadius': {
156
- readonly type: "number";
156
+ readonly type: 'number';
157
157
  readonly default: 0;
158
158
  readonly min: 0;
159
159
  readonly step: 1;
160
- readonly description: "Top right radius";
160
+ readonly description: 'Top right radius';
161
161
  readonly hiddenFromList: false;
162
162
  };
163
163
  readonly 'style.borderBottomRightRadius': {
164
- readonly type: "number";
164
+ readonly type: 'number';
165
165
  readonly default: 0;
166
166
  readonly min: 0;
167
167
  readonly step: 1;
168
- readonly description: "Bottom right radius";
168
+ readonly description: 'Bottom right radius';
169
169
  readonly hiddenFromList: false;
170
170
  };
171
171
  readonly 'style.borderBottomLeftRadius': {
172
- readonly type: "number";
172
+ readonly type: 'number';
173
173
  readonly default: 0;
174
174
  readonly min: 0;
175
175
  readonly step: 1;
176
- readonly description: "Bottom left radius";
176
+ readonly description: 'Bottom left radius';
177
177
  readonly hiddenFromList: false;
178
178
  };
179
179
  readonly 'style.backgroundColor': {
180
- readonly type: "color";
181
- readonly default: "transparent";
182
- readonly description: "Color";
180
+ readonly type: 'color';
181
+ readonly default: 'transparent';
182
+ readonly description: 'Color';
183
183
  };
184
184
  readonly children: import("./interactivity-schema.js").InteractivitySchemaField;
185
185
  readonly premountFor: {
186
- readonly type: "number";
186
+ readonly type: 'number';
187
187
  readonly default: undefined;
188
- readonly description: "Premount For";
188
+ readonly description: 'Premount For';
189
189
  readonly min: 0;
190
190
  readonly step: 1;
191
191
  readonly hiddenFromList: false;
192
192
  readonly keyframable: false;
193
193
  };
194
194
  readonly postmountFor: {
195
- readonly type: "number";
195
+ readonly type: 'number';
196
196
  readonly default: 0;
197
197
  readonly min: 0;
198
198
  readonly step: 1;
@@ -200,36 +200,36 @@ export declare const absoluteFillSchema: {
200
200
  readonly keyframable: false;
201
201
  };
202
202
  readonly durationInFrames: {
203
- readonly type: "number";
203
+ readonly type: 'number';
204
204
  readonly default: undefined;
205
205
  readonly min: 1;
206
206
  readonly step: 1;
207
207
  readonly hiddenFromList: true;
208
208
  };
209
209
  readonly from: {
210
- readonly type: "number";
210
+ readonly type: 'number';
211
211
  readonly default: 0;
212
212
  readonly step: 1;
213
213
  readonly hiddenFromList: true;
214
214
  };
215
215
  readonly trimBefore: {
216
- readonly type: "number";
216
+ readonly type: 'number';
217
217
  readonly default: 0;
218
218
  readonly min: 0;
219
219
  readonly step: 1;
220
220
  readonly hiddenFromList: true;
221
221
  };
222
222
  readonly playbackRate: {
223
- readonly type: "number";
223
+ readonly type: 'number';
224
224
  readonly default: 1;
225
225
  readonly min: 0.01;
226
226
  readonly step: 0.1;
227
- readonly description: "Playback rate";
227
+ readonly description: 'Playback rate';
228
228
  readonly hiddenFromList: false;
229
229
  readonly keyframable: false;
230
230
  };
231
231
  readonly freeze: {
232
- readonly type: "number";
232
+ readonly type: 'number';
233
233
  readonly default: null;
234
234
  readonly step: 1;
235
235
  readonly hiddenFromList: true;
@@ -242,5 +242,5 @@ export declare const AbsoluteFill: React.ComponentType<Omit<AbsoluteFillElementP
242
242
  /**
243
243
  * @deprecated For internal use only
244
244
  */
245
- readonly stack?: string | undefined;
245
+ readonly stack?: string;
246
246
  }>;
@@ -46,7 +46,7 @@ const AbsoluteFillWithTiming = ({ ref: callbackRef, from, premountFor, postmount
46
46
  styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
47
47
  hideWhilePremounted: 'opacity',
48
48
  });
49
- return (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freezeFrame, active: isPremountingOrPostmounting, _remotionInternalIsPremounting: premountingActive, children: jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, durationInFrames: durationInFrames, hidden: hidden, name: name !== null && name !== void 0 ? name : '<AbsoluteFill>', showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, controls: controls, _remotionInternalStack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/absolute-fill", _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: jsx_runtime_1.jsx(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, style: premountingStyle !== null && premountingStyle !== void 0 ? premountingStyle : undefined, children: children }) }) }));
49
+ return ((0, jsx_runtime_1.jsx)(freeze_js_1.Freeze, { frame: freezeFrame, active: isPremountingOrPostmounting, _remotionInternalIsPremounting: premountingActive, children: (0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, durationInFrames: durationInFrames, hidden: hidden, name: name !== null && name !== void 0 ? name : '<AbsoluteFill>', showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, controls: controls, _remotionInternalStack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/absolute-fill", _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: (0, jsx_runtime_1.jsx)(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, style: premountingStyle !== null && premountingStyle !== void 0 ? premountingStyle : undefined, children: children }) }) }));
50
50
  };
51
51
  const AbsoluteFillInner = ({ ref, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, trimBefore, playbackRate, loop, freeze, durationInFrames, hidden, name, showInTimeline, stack, controls, children, ...divProps }) => {
52
52
  const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)();
@@ -54,9 +54,9 @@ const AbsoluteFillInner = ({ ref, from, premountFor, postmountFor, styleWhilePre
54
54
  setRef(ref, element);
55
55
  }, [ref]);
56
56
  if (videoConfig === null) {
57
- return hidden ? null : (jsx_runtime_1.jsx(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, children: children }));
57
+ return hidden ? null : ((0, jsx_runtime_1.jsx)(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, children: children }));
58
58
  }
59
- return (jsx_runtime_1.jsx(AbsoluteFillWithTiming, { ...divProps, ref: callbackRef, from: from, premountFor: premountFor, postmountFor: postmountFor, styleWhilePremounted: styleWhilePremounted, styleWhilePostmounted: styleWhilePostmounted, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, durationInFrames: durationInFrames, hidden: hidden, name: name, showInTimeline: showInTimeline, stack: stack, controls: controls, children: children }));
59
+ return ((0, jsx_runtime_1.jsx)(AbsoluteFillWithTiming, { ...divProps, ref: callbackRef, from: from, premountFor: premountFor, postmountFor: postmountFor, styleWhilePremounted: styleWhilePremounted, styleWhilePostmounted: styleWhilePostmounted, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, durationInFrames: durationInFrames, hidden: hidden, name: name, showInTimeline: showInTimeline, stack: stack, controls: controls, children: children }));
60
60
  };
61
61
  /*
62
62
  * @description A helper component which renders an absolutely positioned <div> element with full width, height, and flex display suited for content layering.
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  export type AbsoluteFillElementProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3
- export declare const AbsoluteFillElement: React.ForwardRefExoticComponent<Omit<AbsoluteFillElementProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ export declare const AbsoluteFillElement: React.NamedExoticComponent<Omit<AbsoluteFillElementProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,8 +1,41 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.AbsoluteFillElement = void 0;
4
37
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
38
+ const react_1 = __importStar(require("react"));
6
39
  const hasTailwindClassName = ({ className, classPrefix, type, }) => {
7
40
  if (!className) {
8
41
  return false;
@@ -106,6 +139,6 @@ const AbsoluteFillElementRefForwarding = (props, ref) => {
106
139
  ...style,
107
140
  };
108
141
  }, [other.className, style]);
109
- return jsx_runtime_1.jsx("div", { ref: ref, style: actualStyle, ...other });
142
+ return (0, jsx_runtime_1.jsx)("div", { ref: ref, style: actualStyle, ...other });
110
143
  };
111
- exports.AbsoluteFillElement = (0, react_1.forwardRef)(AbsoluteFillElementRefForwarding);
144
+ exports.AbsoluteFillElement = react_1.default.memo((0, react_1.forwardRef)(AbsoluteFillElementRefForwarding));
@@ -5,6 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  exports.CanUseRemotionHooks = (0, react_1.createContext)(false);
7
7
  const CanUseRemotionHooksProvider = ({ children }) => {
8
- return (jsx_runtime_1.jsx(exports.CanUseRemotionHooks.Provider, { value: true, children: children }));
8
+ return ((0, jsx_runtime_1.jsx)(exports.CanUseRemotionHooks.Provider, { value: true, children: children }));
9
9
  };
10
10
  exports.CanUseRemotionHooksProvider = CanUseRemotionHooksProvider;
@@ -100,14 +100,8 @@ const InnerComposition = ({ width, height, fps, durationInFrames, id, defaultPro
100
100
  const metadata = (0, react_1.useMemo)(() => ({ type: 'composition', id, value: registration }), [id, registration]);
101
101
  (0, composition_registry_fallback_js_1.useCommittedCompositionEntry)(metadata);
102
102
  const resolved = (0, ResolveCompositionConfig_js_1.useResolvedVideoConfig)(id);
103
- const { setError, clearError } = (0, react_1.useContext)(composition_render_error_context_js_1.CompositionRenderErrorContext);
104
- const onError = (0, react_1.useCallback)((error) => {
105
- setError(error);
106
- }, [setError]);
107
- const onClear = (0, react_1.useCallback)(() => {
108
- clearError();
109
- }, [clearError]);
110
- const wrapRegistration = (content) => (jsx_runtime_1.jsx(committed_metadata_js_1.CommittedMetadataProvider, { value: null, _remotionCommitMetadata: metadata, children: content }));
103
+ const { setError: onError, clearError: onClear } = (0, react_1.useContext)(composition_render_error_context_js_1.CompositionRenderErrorContext);
104
+ const wrapRegistration = (content) => ((0, jsx_runtime_1.jsx)(committed_metadata_js_1.CommittedMetadataProvider, { value: null, _remotionCommitMetadata: metadata, children: content }));
111
105
  if (environment.isStudio &&
112
106
  video &&
113
107
  video.component === lazy &&
@@ -118,7 +112,7 @@ const InnerComposition = ({ width, height, fps, durationInFrames, id, defaultPro
118
112
  resolved.type !== 'success-and-refreshing')) {
119
113
  return wrapRegistration(null);
120
114
  }
121
- return wrapRegistration((0, react_dom_1.createPortal)(jsx_runtime_1.jsx(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(CompositionErrorBoundary_js_1.CompositionErrorBoundary, { onError: onError, onClear: onClear, children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: jsx_runtime_1.jsx(loading_indicator_js_1.Loading, {}), children: jsx_runtime_1.jsx(Comp, { ...((_c = resolved.result.props) !== null && _c !== void 0 ? _c : {}) }) }) }) }), (0, portal_node_js_1.portalNode)()));
115
+ return wrapRegistration((0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(CompositionErrorBoundary_js_1.CompositionErrorBoundary, { onError: onError, onClear: onClear, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_js_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...((_c = resolved.result.props) !== null && _c !== void 0 ? _c : {}) }) }) }) }), (0, portal_node_js_1.portalNode)()));
122
116
  }
123
117
  if (environment.isRendering &&
124
118
  video &&
@@ -130,7 +124,7 @@ const InnerComposition = ({ width, height, fps, durationInFrames, id, defaultPro
130
124
  resolved.type !== 'success-and-refreshing')) {
131
125
  return wrapRegistration(null);
132
126
  }
133
- return wrapRegistration((0, react_dom_1.createPortal)(jsx_runtime_1.jsx(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: jsx_runtime_1.jsx(Fallback, {}), children: jsx_runtime_1.jsx(Comp, { ...((_d = resolved.result.props) !== null && _d !== void 0 ? _d : {}) }) }) }), (0, portal_node_js_1.portalNode)()));
127
+ return wrapRegistration((0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...((_d = resolved.result.props) !== null && _d !== void 0 ? _d : {}) }) }) }), (0, portal_node_js_1.portalNode)()));
134
128
  }
135
129
  return wrapRegistration(null);
136
130
  };
@@ -144,6 +138,6 @@ const Composition = (props) => {
144
138
  return null;
145
139
  }
146
140
  // @ts-expect-error
147
- return jsx_runtime_1.jsx(InnerComposition, { ...props });
141
+ return (0, jsx_runtime_1.jsx)(InnerComposition, { ...props });
148
142
  };
149
143
  exports.Composition = Composition;
@@ -18,8 +18,11 @@ const getHot = () => {
18
18
  }
19
19
  };
20
20
  class CompositionErrorBoundary extends react_1.default.Component {
21
- state = { hasError: false };
22
- hmrStatusHandler = null;
21
+ constructor() {
22
+ super(...arguments);
23
+ this.state = { hasError: false };
24
+ this.hmrStatusHandler = null;
25
+ }
23
26
  static getDerivedStateFromError() {
24
27
  return { hasError: true };
25
28
  }
@@ -112,6 +112,7 @@ export type AudioOrVideoAsset = {
112
112
  toneFrequency: number;
113
113
  audioStartFrame: number;
114
114
  audioStreamIndex: number;
115
+ preservePitch: boolean | null;
115
116
  };
116
117
  export type InlineAudioAsset = {
117
118
  type: 'inline-audio';
@@ -38,4 +38,7 @@ export type CompositionManagerContext = {
38
38
  canvasContent: CanvasContent | null;
39
39
  };
40
40
  export declare const CompositionManager: React.Context<CompositionManagerContext>;
41
+ export declare const CompositionManagerRefContext: React.Context<{
42
+ readonly current: CompositionManagerContext;
43
+ }>;
41
44
  export declare const CompositionSetters: React.Context<CompositionManagerSetters>;
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompositionSetters = exports.CompositionManager = exports.getAssetPreviewCompositionId = void 0;
3
+ exports.CompositionSetters = exports.CompositionManagerRefContext = exports.CompositionManager = exports.getAssetPreviewCompositionId = void 0;
4
4
  const react_1 = require("react");
5
5
  const getAssetPreviewCompositionId = (asset) => `asset:${asset}`;
6
6
  exports.getAssetPreviewCompositionId = getAssetPreviewCompositionId;
7
- exports.CompositionManager = (0, react_1.createContext)({
7
+ const defaultCompositionManagerContext = {
8
8
  compositions: [],
9
9
  folders: [],
10
10
  currentCompositionMetadata: null,
11
11
  currentAssetMetadata: null,
12
12
  canvasContent: null,
13
- });
13
+ };
14
+ exports.CompositionManager = (0, react_1.createContext)(defaultCompositionManagerContext);
15
+ exports.CompositionManagerRefContext = (0, react_1.createContext)({ current: defaultCompositionManagerContext });
14
16
  exports.CompositionSetters = (0, react_1.createContext)({
15
17
  setCanvasContent: () => undefined,
16
18
  setCurrentAssetMetadata: () => undefined,
@@ -2,7 +2,7 @@ import { type AnyComposition } from './CompositionManager';
2
2
  import type { CanvasContent } from './CompositionManagerContext';
3
3
  import type { BaseMetadata } from './CompositionManagerContext.js';
4
4
  export declare const CompositionManagerProvider: ({ children, onlyRenderComposition, currentCompositionMetadata, initialCompositions, initialCanvasContent, }: {
5
- readonly children: import("react").ReactNode;
5
+ readonly children: React.ReactNode;
6
6
  readonly onlyRenderComposition: string | null;
7
7
  readonly currentCompositionMetadata: BaseMetadata | null;
8
8
  readonly initialCompositions: AnyComposition[];
@@ -103,9 +103,11 @@ const CompositionManagerProvider = ({ children, onlyRenderComposition, currentCo
103
103
  currentAssetMetadata,
104
104
  canvasContent,
105
105
  ]);
106
+ const compositionManagerRef = (0, react_1.useRef)(compositionManagerContextValue);
107
+ compositionManagerRef.current = compositionManagerContextValue;
106
108
  if (registrationError !== null) {
107
109
  throw registrationError;
108
110
  }
109
- return (jsx_runtime_1.jsx(CompositionRegistryProvider_js_1.CompositionRegistryProvider, { ref: flushSnapshotRef, onSnapshot: onCommitRegistrations, children: jsx_runtime_1.jsx(CompositionManagerContext_1.CompositionManager.Provider, { value: compositionManagerContextValue, children: jsx_runtime_1.jsx(CompositionManagerContext_1.CompositionSetters.Provider, { value: compositionManagerSetters, children: children }) }) }));
111
+ return ((0, jsx_runtime_1.jsx)(CompositionRegistryProvider_js_1.CompositionRegistryProvider, { ref: flushSnapshotRef, onSnapshot: onCommitRegistrations, children: (0, jsx_runtime_1.jsx)(CompositionManagerContext_1.CompositionManager.Provider, { value: compositionManagerContextValue, children: (0, jsx_runtime_1.jsx)(CompositionManagerContext_1.CompositionManagerRefContext.Provider, { value: compositionManagerRef, children: (0, jsx_runtime_1.jsx)(CompositionManagerContext_1.CompositionSetters.Provider, { value: compositionManagerSetters, children: children }) }) }) }));
110
112
  };
111
113
  exports.CompositionManagerProvider = CompositionManagerProvider;
@@ -1,5 +1,5 @@
1
1
  import { type CommittedCompositionSnapshot } from './committed-metadata.js';
2
2
  export declare const CompositionRegistryProvider: import("react").ForwardRefExoticComponent<{
3
- readonly children: import("react").ReactNode;
3
+ readonly children: React.ReactNode;
4
4
  readonly onSnapshot: (snapshot: CommittedCompositionSnapshot) => void;
5
5
  } & import("react").RefAttributes<() => void>>;
@@ -138,5 +138,5 @@ exports.CompositionRegistryProvider = (0, react_1.forwardRef)(({ children, onSna
138
138
  onCommit: useCommitObserver ? onObservedSnapshot : null,
139
139
  }
140
140
  : null, [isStudio, managerId, onObservedSnapshot, useCommitObserver]);
141
- return (jsx_runtime_1.jsx(CompositionRegistryFallbackProvider, { value: useCommitObserver ? null : fallbackRegistry, _remotionCommitMetadata: metadata, children: children }));
141
+ return ((0, jsx_runtime_1.jsx)(CompositionRegistryFallbackProvider, { value: useCommitObserver ? null : fallbackRegistry, _remotionCommitMetadata: metadata, children: children }));
142
142
  });
@@ -13,9 +13,9 @@ export declare const EditorPropsContext: React.Context<EditorPropsContextType>;
13
13
  export declare const timeValueRef: React.RefObject<{
14
14
  goToFrame: () => void;
15
15
  seek: (newFrame: number) => void;
16
- play: (e?: PointerEvent | SyntheticEvent<Element, Event> | undefined) => void;
16
+ play: (e?: SyntheticEvent | PointerEvent) => void;
17
17
  pause: () => void;
18
- toggle: (e?: PointerEvent | SyntheticEvent<Element, Event> | undefined) => void;
18
+ toggle: (e?: SyntheticEvent | PointerEvent) => void;
19
19
  } | null>;
20
20
  export declare const EditorPropsProvider: React.FC<{
21
21
  readonly children: React.ReactNode;
@@ -59,6 +59,6 @@ const EditorPropsProvider = ({ children }) => {
59
59
  const ctx = (0, react_1.useMemo)(() => {
60
60
  return { props, updateProps };
61
61
  }, [props, updateProps]);
62
- return (jsx_runtime_1.jsx(exports.EditorPropsContext.Provider, { value: ctx, children: children }));
62
+ return ((0, jsx_runtime_1.jsx)(exports.EditorPropsContext.Provider, { value: ctx, children: children }));
63
63
  };
64
64
  exports.EditorPropsProvider = EditorPropsProvider;
@@ -38,6 +38,6 @@ const Folder = (props) => {
38
38
  value: registration,
39
39
  }), [name, parentName, registration]);
40
40
  (0, composition_registry_fallback_js_1.useCommittedCompositionEntry)(metadata);
41
- return (jsx_runtime_1.jsx(FolderContextProvider, { value: value, _remotionCommitMetadata: metadata, children: children }));
41
+ return ((0, jsx_runtime_1.jsx)(FolderContextProvider, { value: value, _remotionCommitMetadata: metadata, children: children }));
42
42
  };
43
43
  exports.Folder = Folder;