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.
- package/dist/cjs/AbsoluteFill.d.ts +62 -62
- package/dist/cjs/AbsoluteFill.js +3 -3
- package/dist/cjs/AbsoluteFillElement.d.ts +1 -1
- package/dist/cjs/AbsoluteFillElement.js +36 -3
- package/dist/cjs/CanUseRemotionHooks.js +1 -1
- package/dist/cjs/Composition.js +5 -11
- package/dist/cjs/CompositionErrorBoundary.js +5 -2
- package/dist/cjs/CompositionManager.d.ts +1 -0
- package/dist/cjs/CompositionManagerContext.d.ts +3 -0
- package/dist/cjs/CompositionManagerContext.js +5 -3
- package/dist/cjs/CompositionManagerProvider.d.ts +1 -1
- package/dist/cjs/CompositionManagerProvider.js +3 -1
- package/dist/cjs/CompositionRegistryProvider.d.ts +1 -1
- package/dist/cjs/CompositionRegistryProvider.js +1 -1
- package/dist/cjs/EditorProps.d.ts +2 -2
- package/dist/cjs/EditorProps.js +1 -1
- package/dist/cjs/Folder.js +1 -1
- package/dist/cjs/HtmlInCanvas.d.ts +58 -67
- package/dist/cjs/HtmlInCanvas.js +84 -20
- package/dist/cjs/HtmlInCanvasFallback.d.ts +6 -0
- package/dist/cjs/HtmlInCanvasFallback.js +39 -0
- package/dist/cjs/IFrame.d.ts +2 -2
- package/dist/cjs/IFrame.js +1 -1
- package/dist/cjs/Img.d.ts +62 -62
- package/dist/cjs/Img.js +160 -132
- package/dist/cjs/Interactive.d.ts +147 -145
- package/dist/cjs/Interactive.js +2 -2
- package/dist/cjs/RemotionRoot.js +1 -1
- package/dist/cjs/RenderAssetManager.js +1 -1
- package/dist/cjs/Sequence.js +37 -27
- package/dist/cjs/SequenceActivityBoundary.js +1 -1
- package/dist/cjs/SequenceActivityBudget.js +1 -1
- package/dist/cjs/SequenceActivitySuspensionProvider.js +1 -1
- package/dist/cjs/SequenceManager.d.ts +6 -0
- package/dist/cjs/SequenceManager.js +71 -27
- package/dist/cjs/SequenceRegistryProvider.js +16 -3
- package/dist/cjs/TimelineContext.js +1 -1
- package/dist/cjs/Track.js +2 -2
- package/dist/cjs/animated-image/AnimatedImage.d.ts +69 -69
- package/dist/cjs/animated-image/AnimatedImage.js +17 -12
- package/dist/cjs/animated-image/canvas.d.ts +6 -5
- package/dist/cjs/animated-image/canvas.js +1 -1
- package/dist/cjs/animated-image/create-image-decoder.d.ts +1 -1
- package/dist/cjs/animated-image/decode-image.d.ts +1 -1
- package/dist/cjs/animated-image/get-duration-in-seconds.d.ts +1 -1
- package/dist/cjs/animated-image/index.js +1 -1
- package/dist/cjs/audio/AudioForPreview.js +5 -28
- package/dist/cjs/audio/AudioForRendering.d.ts +5 -20
- package/dist/cjs/audio/AudioForRendering.js +44 -5
- package/dist/cjs/audio/html5-audio.d.ts +36 -36
- package/dist/cjs/audio/html5-audio.js +8 -10
- package/dist/cjs/audio/index.js +1 -1
- package/dist/cjs/audio/shared-audio-tags.js +10 -16
- package/dist/cjs/audio/shared-element-source-node.d.ts +1 -1
- package/dist/cjs/audio/use-audio-context.d.ts +2 -1
- package/dist/cjs/audio/wait-until-actually-resumed.d.ts +2 -1
- package/dist/cjs/buffer-until-first-frame.d.ts +4 -3
- package/dist/cjs/buffering.js +1 -1
- package/dist/cjs/cancel-render.js +3 -0
- package/dist/cjs/canvas-image/CanvasImage.d.ts +71 -71
- package/dist/cjs/canvas-image/CanvasImage.js +27 -24
- package/dist/cjs/canvas-image/index.js +1 -1
- package/dist/cjs/codec.d.ts +1 -1
- package/dist/cjs/committed-metadata.d.ts +4 -2
- package/dist/cjs/composition-registry-fallback.d.ts +4 -2
- package/dist/cjs/composition-registry-fallback.js +12 -10
- package/dist/cjs/create-element-source-proxy.js +46 -6
- package/dist/cjs/default-css.d.ts +1 -1
- package/dist/cjs/delay-render.d.ts +2 -1
- package/dist/cjs/delay-render.js +4 -2
- package/dist/cjs/easing.js +3 -1
- package/dist/cjs/effects/Solid.d.ts +60 -60
- package/dist/cjs/effects/Solid.js +2 -2
- package/dist/cjs/effects/canvas-pool.js +6 -9
- package/dist/cjs/effects/index.js +1 -1
- package/dist/cjs/effects/use-memoized-effects.d.ts +2 -1
- package/dist/cjs/effects/use-memoized-effects.js +107 -54
- package/dist/cjs/freeze.js +2 -2
- package/dist/cjs/get-cross-origin-value.d.ts +1 -1
- package/dist/cjs/get-effective-visual-mode-value.d.ts +2 -2
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +32 -32
- package/dist/cjs/interactivity-schema.d.ts +286 -286
- package/dist/cjs/internals.d.ts +411 -595
- package/dist/cjs/internals.js +8 -0
- package/dist/cjs/interpolate-colors.d.ts +1 -1
- package/dist/cjs/interpolate-colors.js +17 -16
- package/dist/cjs/interpolate.d.ts +2 -9
- package/dist/cjs/is-player.js +1 -1
- package/dist/cjs/loading-indicator.js +2 -6
- package/dist/cjs/log-level-context.d.ts +1 -1
- package/dist/cjs/log.d.ts +12 -7
- package/dist/cjs/loop/index.js +1 -1
- package/dist/cjs/media-resource-manager.d.ts +1 -1
- package/dist/cjs/media-tag-current-time-timestamp.d.ts +1 -1
- package/dist/cjs/no-react.d.ts +85 -91
- package/dist/cjs/no-react.js +2 -2
- package/dist/cjs/play-and-handle-not-allowed-error.d.ts +5 -4
- package/dist/cjs/playback-logging.d.ts +2 -1
- package/dist/cjs/playback-pitch-context.d.ts +1 -0
- package/dist/cjs/playback-pitch-context.js +5 -0
- package/dist/cjs/prefetch-state.js +1 -1
- package/dist/cjs/prefetch.d.ts +7 -6
- package/dist/cjs/props-if-has-props.d.ts +2 -1
- package/dist/cjs/prores-profile.d.ts +1 -1
- package/dist/cjs/register-root.d.ts +2 -2
- package/dist/cjs/render-resource-manager.d.ts +1 -1
- package/dist/cjs/render-types.d.ts +2 -2
- package/dist/cjs/resolve-video-config.d.ts +8 -8
- package/dist/cjs/runtime-value-store.d.ts +1 -1
- package/dist/cjs/scale-value.d.ts +1 -1
- package/dist/cjs/seek.d.ts +3 -2
- package/dist/cjs/sequence-activity-context.js +1 -1
- package/dist/cjs/sequence-crop.js +1 -4
- package/dist/cjs/series/flatten-children.d.ts +3 -1
- package/dist/cjs/series/index.js +4 -5
- package/dist/cjs/series/is-inside-series.js +2 -2
- package/dist/cjs/spring/index.d.ts +1 -1
- package/dist/cjs/spring/index.js +1 -1
- package/dist/cjs/spring/measure-spring.d.ts +1 -1
- package/dist/cjs/spring/spring-utils.d.ts +1 -1
- package/dist/cjs/spring/spring-utils.js +11 -5
- package/dist/cjs/timeline-position-state.d.ts +2 -1
- package/dist/cjs/timeline-position-state.js +23 -3
- package/dist/cjs/use-amplification.d.ts +4 -7
- package/dist/cjs/use-current-frame.d.ts +1 -0
- package/dist/cjs/use-current-frame.js +14 -7
- package/dist/cjs/use-current-scale.d.ts +2 -2
- package/dist/cjs/use-delay-render.d.ts +2 -1
- package/dist/cjs/use-lazy-component.d.ts +1 -1
- package/dist/cjs/use-lazy-component.js +15 -5
- package/dist/cjs/use-media-buffering.d.ts +3 -2
- package/dist/cjs/use-media-duration.d.ts +4 -0
- package/dist/cjs/use-media-duration.js +36 -0
- package/dist/cjs/use-media-enabled.d.ts +1 -1
- package/dist/cjs/use-media-enabled.js +1 -1
- package/dist/cjs/use-media-in-timeline.d.ts +1 -1
- package/dist/cjs/use-media-playback.d.ts +3 -3
- package/dist/cjs/use-media-tag.d.ts +2 -2
- package/dist/cjs/use-pixel-density.d.ts +1 -1
- package/dist/cjs/use-premounting.d.ts +1 -1
- package/dist/cjs/use-premounting.js +6 -2
- package/dist/cjs/use-request-video-callback-time.d.ts +3 -3
- package/dist/cjs/use-schema.d.ts +4 -4
- package/dist/cjs/use-video.js +1 -1
- package/dist/cjs/validate-media-props.d.ts +1 -1
- package/dist/cjs/validation/validate-default-props.d.ts +1 -1
- package/dist/cjs/validation/validate-duration-in-frames.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/MediaPlaybackError.js +0 -1
- package/dist/cjs/video/OffthreadVideo.js +5 -5
- package/dist/cjs/video/OffthreadVideoForRendering.js +9 -7
- package/dist/cjs/video/VideoForPreview.js +6 -28
- package/dist/cjs/video/VideoForRendering.d.ts +5 -3
- package/dist/cjs/video/VideoForRendering.js +4 -2
- package/dist/cjs/video/duration-state.d.ts +1 -0
- package/dist/cjs/video/duration-state.js +8 -2
- package/dist/cjs/video/emit-video-frame.d.ts +1 -1
- package/dist/cjs/video/html5-video.d.ts +36 -36
- package/dist/cjs/video/html5-video.js +8 -10
- package/dist/cjs/video/index.js +2 -2
- package/dist/cjs/video/seek-until-right.d.ts +3 -2
- package/dist/cjs/warn-about-non-seekable-media.d.ts +1 -1
- package/dist/cjs/with-interactivity-schema.d.ts +1 -1
- package/dist/cjs/with-interactivity-schema.js +15 -18
- package/dist/cjs/wrap-remotion-context.d.ts +4 -4
- package/dist/cjs/wrap-remotion-context.js +2 -2
- package/dist/esm/index.mjs +1060 -728
- package/dist/esm/no-react.mjs +30 -25
- package/dist/esm/version.mjs +1 -1
- package/package.json +4 -4
|
@@ -16,52 +16,52 @@ type OptionalProps = {
|
|
|
16
16
|
export type SolidProps = MandatoryProps & Partial<OptionalProps> & InteractiveCropProps;
|
|
17
17
|
export declare const solidSchema: {
|
|
18
18
|
readonly 'style.transformOrigin': {
|
|
19
|
-
readonly type:
|
|
19
|
+
readonly type: 'transform-origin';
|
|
20
20
|
readonly step: 1;
|
|
21
|
-
readonly default:
|
|
22
|
-
readonly description:
|
|
21
|
+
readonly default: '50% 50%';
|
|
22
|
+
readonly description: 'Transform origin';
|
|
23
23
|
};
|
|
24
24
|
readonly 'style.translate': {
|
|
25
|
-
readonly type:
|
|
25
|
+
readonly type: 'translate';
|
|
26
26
|
readonly step: 1;
|
|
27
|
-
readonly default:
|
|
28
|
-
readonly description:
|
|
27
|
+
readonly default: '0px 0px';
|
|
28
|
+
readonly description: 'Offset';
|
|
29
29
|
};
|
|
30
30
|
readonly 'style.scale': {
|
|
31
|
-
readonly type:
|
|
31
|
+
readonly type: 'scale';
|
|
32
32
|
readonly max: 100;
|
|
33
33
|
readonly step: 0.01;
|
|
34
34
|
readonly default: 1;
|
|
35
|
-
readonly description:
|
|
36
|
-
readonly defaultKeyframeOutput:
|
|
35
|
+
readonly description: 'Scale';
|
|
36
|
+
readonly defaultKeyframeOutput: 'perceptual-scale';
|
|
37
37
|
};
|
|
38
38
|
readonly 'style.rotate': {
|
|
39
|
-
readonly type:
|
|
39
|
+
readonly type: 'rotation-css';
|
|
40
40
|
readonly step: 1;
|
|
41
|
-
readonly default:
|
|
42
|
-
readonly description:
|
|
41
|
+
readonly default: '0deg';
|
|
42
|
+
readonly description: 'Rotation';
|
|
43
43
|
};
|
|
44
44
|
readonly 'style.opacity': {
|
|
45
|
-
readonly type:
|
|
45
|
+
readonly type: 'number';
|
|
46
46
|
readonly min: 0;
|
|
47
47
|
readonly max: 1;
|
|
48
48
|
readonly step: 0.01;
|
|
49
49
|
readonly default: 1;
|
|
50
|
-
readonly description:
|
|
50
|
+
readonly description: 'Opacity';
|
|
51
51
|
readonly hiddenFromList: false;
|
|
52
52
|
};
|
|
53
53
|
readonly 'style.borderWidth': {
|
|
54
|
-
readonly type:
|
|
54
|
+
readonly type: 'number';
|
|
55
55
|
readonly default: undefined;
|
|
56
56
|
readonly min: 0;
|
|
57
57
|
readonly step: 1;
|
|
58
|
-
readonly description:
|
|
58
|
+
readonly description: 'Border width';
|
|
59
59
|
readonly hiddenFromList: false;
|
|
60
60
|
};
|
|
61
61
|
readonly 'style.borderStyle': {
|
|
62
|
-
readonly type:
|
|
63
|
-
readonly default:
|
|
64
|
-
readonly description:
|
|
62
|
+
readonly type: 'enum';
|
|
63
|
+
readonly default: 'none';
|
|
64
|
+
readonly description: 'Border style';
|
|
65
65
|
readonly variants: {
|
|
66
66
|
readonly none: {};
|
|
67
67
|
readonly hidden: {};
|
|
@@ -76,67 +76,67 @@ export declare const solidSchema: {
|
|
|
76
76
|
};
|
|
77
77
|
};
|
|
78
78
|
readonly 'style.borderColor': {
|
|
79
|
-
readonly type:
|
|
79
|
+
readonly type: 'color';
|
|
80
80
|
readonly default: undefined;
|
|
81
|
-
readonly description:
|
|
81
|
+
readonly description: 'Border color';
|
|
82
82
|
};
|
|
83
83
|
readonly 'style.borderRadius': {
|
|
84
|
-
readonly type:
|
|
84
|
+
readonly type: 'number';
|
|
85
85
|
readonly default: 0;
|
|
86
86
|
readonly min: 0;
|
|
87
87
|
readonly step: 1;
|
|
88
|
-
readonly description:
|
|
88
|
+
readonly description: 'Border radius';
|
|
89
89
|
readonly hiddenFromList: false;
|
|
90
90
|
readonly keyframable: true;
|
|
91
91
|
};
|
|
92
92
|
readonly 'style.borderTopLeftRadius': {
|
|
93
|
-
readonly type:
|
|
93
|
+
readonly type: 'number';
|
|
94
94
|
readonly default: 0;
|
|
95
95
|
readonly min: 0;
|
|
96
96
|
readonly step: 1;
|
|
97
|
-
readonly description:
|
|
97
|
+
readonly description: 'Top left radius';
|
|
98
98
|
readonly hiddenFromList: false;
|
|
99
99
|
};
|
|
100
100
|
readonly 'style.borderTopRightRadius': {
|
|
101
|
-
readonly type:
|
|
101
|
+
readonly type: 'number';
|
|
102
102
|
readonly default: 0;
|
|
103
103
|
readonly min: 0;
|
|
104
104
|
readonly step: 1;
|
|
105
|
-
readonly description:
|
|
105
|
+
readonly description: 'Top right radius';
|
|
106
106
|
readonly hiddenFromList: false;
|
|
107
107
|
};
|
|
108
108
|
readonly 'style.borderBottomRightRadius': {
|
|
109
|
-
readonly type:
|
|
109
|
+
readonly type: 'number';
|
|
110
110
|
readonly default: 0;
|
|
111
111
|
readonly min: 0;
|
|
112
112
|
readonly step: 1;
|
|
113
|
-
readonly description:
|
|
113
|
+
readonly description: 'Bottom right radius';
|
|
114
114
|
readonly hiddenFromList: false;
|
|
115
115
|
};
|
|
116
116
|
readonly 'style.borderBottomLeftRadius': {
|
|
117
|
-
readonly type:
|
|
117
|
+
readonly type: 'number';
|
|
118
118
|
readonly default: 0;
|
|
119
119
|
readonly min: 0;
|
|
120
120
|
readonly step: 1;
|
|
121
|
-
readonly description:
|
|
121
|
+
readonly description: 'Bottom left radius';
|
|
122
122
|
readonly hiddenFromList: false;
|
|
123
123
|
};
|
|
124
124
|
readonly 'style.backgroundColor': {
|
|
125
|
-
readonly type:
|
|
126
|
-
readonly default:
|
|
127
|
-
readonly description:
|
|
125
|
+
readonly type: 'color';
|
|
126
|
+
readonly default: 'transparent';
|
|
127
|
+
readonly description: 'Color';
|
|
128
128
|
};
|
|
129
129
|
readonly premountFor: {
|
|
130
|
-
readonly type:
|
|
130
|
+
readonly type: 'number';
|
|
131
131
|
readonly default: undefined;
|
|
132
|
-
readonly description:
|
|
132
|
+
readonly description: 'Premount For';
|
|
133
133
|
readonly min: 0;
|
|
134
134
|
readonly step: 1;
|
|
135
135
|
readonly hiddenFromList: false;
|
|
136
136
|
readonly keyframable: false;
|
|
137
137
|
};
|
|
138
138
|
readonly postmountFor: {
|
|
139
|
-
readonly type:
|
|
139
|
+
readonly type: 'number';
|
|
140
140
|
readonly default: 0;
|
|
141
141
|
readonly min: 0;
|
|
142
142
|
readonly step: 1;
|
|
@@ -144,9 +144,9 @@ export declare const solidSchema: {
|
|
|
144
144
|
readonly keyframable: false;
|
|
145
145
|
};
|
|
146
146
|
readonly cropLeft: {
|
|
147
|
-
readonly type:
|
|
147
|
+
readonly type: 'number';
|
|
148
148
|
readonly default: 0;
|
|
149
|
-
readonly description:
|
|
149
|
+
readonly description: 'Crop left';
|
|
150
150
|
readonly min: 0;
|
|
151
151
|
readonly max: 1;
|
|
152
152
|
readonly step: 0.01;
|
|
@@ -154,9 +154,9 @@ export declare const solidSchema: {
|
|
|
154
154
|
readonly keyframable: true;
|
|
155
155
|
};
|
|
156
156
|
readonly cropRight: {
|
|
157
|
-
readonly type:
|
|
157
|
+
readonly type: 'number';
|
|
158
158
|
readonly default: 0;
|
|
159
|
-
readonly description:
|
|
159
|
+
readonly description: 'Crop right';
|
|
160
160
|
readonly min: 0;
|
|
161
161
|
readonly max: 1;
|
|
162
162
|
readonly step: 0.01;
|
|
@@ -164,9 +164,9 @@ export declare const solidSchema: {
|
|
|
164
164
|
readonly keyframable: true;
|
|
165
165
|
};
|
|
166
166
|
readonly cropTop: {
|
|
167
|
-
readonly type:
|
|
167
|
+
readonly type: 'number';
|
|
168
168
|
readonly default: 0;
|
|
169
|
-
readonly description:
|
|
169
|
+
readonly description: 'Crop top';
|
|
170
170
|
readonly min: 0;
|
|
171
171
|
readonly max: 1;
|
|
172
172
|
readonly step: 0.01;
|
|
@@ -174,9 +174,9 @@ export declare const solidSchema: {
|
|
|
174
174
|
readonly keyframable: true;
|
|
175
175
|
};
|
|
176
176
|
readonly cropBottom: {
|
|
177
|
-
readonly type:
|
|
177
|
+
readonly type: 'number';
|
|
178
178
|
readonly default: 0;
|
|
179
|
-
readonly description:
|
|
179
|
+
readonly description: 'Crop bottom';
|
|
180
180
|
readonly min: 0;
|
|
181
181
|
readonly max: 1;
|
|
182
182
|
readonly step: 0.01;
|
|
@@ -184,36 +184,36 @@ export declare const solidSchema: {
|
|
|
184
184
|
readonly keyframable: true;
|
|
185
185
|
};
|
|
186
186
|
readonly durationInFrames: {
|
|
187
|
-
readonly type:
|
|
187
|
+
readonly type: 'number';
|
|
188
188
|
readonly default: undefined;
|
|
189
189
|
readonly min: 1;
|
|
190
190
|
readonly step: 1;
|
|
191
191
|
readonly hiddenFromList: true;
|
|
192
192
|
};
|
|
193
193
|
readonly from: {
|
|
194
|
-
readonly type:
|
|
194
|
+
readonly type: 'number';
|
|
195
195
|
readonly default: 0;
|
|
196
196
|
readonly step: 1;
|
|
197
197
|
readonly hiddenFromList: true;
|
|
198
198
|
};
|
|
199
199
|
readonly trimBefore: {
|
|
200
|
-
readonly type:
|
|
200
|
+
readonly type: 'number';
|
|
201
201
|
readonly default: 0;
|
|
202
202
|
readonly min: 0;
|
|
203
203
|
readonly step: 1;
|
|
204
204
|
readonly hiddenFromList: true;
|
|
205
205
|
};
|
|
206
206
|
readonly playbackRate: {
|
|
207
|
-
readonly type:
|
|
207
|
+
readonly type: 'number';
|
|
208
208
|
readonly default: 1;
|
|
209
209
|
readonly min: 0.01;
|
|
210
210
|
readonly step: 0.1;
|
|
211
|
-
readonly description:
|
|
211
|
+
readonly description: 'Playback rate';
|
|
212
212
|
readonly hiddenFromList: false;
|
|
213
213
|
readonly keyframable: false;
|
|
214
214
|
};
|
|
215
215
|
readonly freeze: {
|
|
216
|
-
readonly type:
|
|
216
|
+
readonly type: 'number';
|
|
217
217
|
readonly default: null;
|
|
218
218
|
readonly step: 1;
|
|
219
219
|
readonly hiddenFromList: true;
|
|
@@ -222,33 +222,33 @@ export declare const solidSchema: {
|
|
|
222
222
|
readonly name: import("../interactivity-schema.js").HiddenFieldSchema;
|
|
223
223
|
readonly showInTimeline: import("../interactivity-schema.js").HiddenFieldSchema;
|
|
224
224
|
readonly color: {
|
|
225
|
-
readonly type:
|
|
226
|
-
readonly default:
|
|
227
|
-
readonly description:
|
|
225
|
+
readonly type: 'color';
|
|
226
|
+
readonly default: 'transparent';
|
|
227
|
+
readonly description: 'Color';
|
|
228
228
|
};
|
|
229
229
|
readonly width: {
|
|
230
|
-
readonly type:
|
|
230
|
+
readonly type: 'number';
|
|
231
231
|
readonly min: 1;
|
|
232
232
|
readonly step: 1;
|
|
233
233
|
readonly default: 1920;
|
|
234
|
-
readonly description:
|
|
234
|
+
readonly description: 'Width';
|
|
235
235
|
readonly hiddenFromList: false;
|
|
236
236
|
};
|
|
237
237
|
readonly height: {
|
|
238
|
-
readonly type:
|
|
238
|
+
readonly type: 'number';
|
|
239
239
|
readonly min: 1;
|
|
240
240
|
readonly step: 1;
|
|
241
241
|
readonly default: 1080;
|
|
242
|
-
readonly description:
|
|
242
|
+
readonly description: 'Height';
|
|
243
243
|
readonly hiddenFromList: false;
|
|
244
244
|
};
|
|
245
245
|
readonly pixelDensity: {
|
|
246
|
-
readonly type:
|
|
246
|
+
readonly type: 'number';
|
|
247
247
|
readonly min: 1;
|
|
248
248
|
readonly max: 3;
|
|
249
249
|
readonly step: 0.1;
|
|
250
250
|
readonly default: 1;
|
|
251
|
-
readonly description:
|
|
251
|
+
readonly description: 'Pixel density';
|
|
252
252
|
readonly hiddenFromList: false;
|
|
253
253
|
};
|
|
254
254
|
};
|
|
@@ -156,7 +156,7 @@ const SolidInner = ({ color, width, height, effects = [], effectsOutputSize = nu
|
|
|
156
156
|
...(style !== null && style !== void 0 ? style : {}),
|
|
157
157
|
};
|
|
158
158
|
}, [height, style, width]);
|
|
159
|
-
return (jsx_runtime_1.jsx("canvas", { ref: canvasRef, width: canvasWidth, height: canvasHeight, className: className, style: canvasStyle }));
|
|
159
|
+
return ((0, jsx_runtime_1.jsx)("canvas", { ref: canvasRef, width: canvasWidth, height: canvasHeight, className: className, style: canvasStyle }));
|
|
160
160
|
};
|
|
161
161
|
const SolidOuter = (0, react_1.forwardRef)(({ effects = [], effectsOutputSize = null, controls, color, height, width, className, durationInFrames, style, name, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, trimBefore, playbackRate, loop, freeze, hidden, showInTimeline, pixelDensity, cropLeft, cropRight, cropTop, cropBottom, ...props }, ref) => {
|
|
162
162
|
var _a, _b;
|
|
@@ -188,7 +188,7 @@ const SolidOuter = (0, react_1.forwardRef)(({ effects = [], effectsOutputSize =
|
|
|
188
188
|
style: premountingStyle,
|
|
189
189
|
componentName: '<Solid />',
|
|
190
190
|
});
|
|
191
|
-
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, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline, controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid", ...props, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: jsx_runtime_1.jsx(sequence_activity_context_js_1.SequenceContent, { children: jsx_runtime_1.jsx(SolidInner, { reference: actualRef, videoConfigValues: (_a = controls === null || controls === void 0 ? void 0 : controls.videoConfigValues) !== null && _a !== void 0 ? _a : null, overrideId: (_b = controls === null || controls === void 0 ? void 0 : controls.overrideId) !== null && _b !== void 0 ? _b : null, color: color, height: height, width: width, className: className, style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined, effects: effects, effectsOutputSize: effectsOutputSize, pixelDensity: pixelDensity }) }) }) }));
|
|
191
|
+
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, trimBefore: trimBefore, playbackRate: playbackRate, loop: loop, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline, controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid", ...props, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, children: (0, jsx_runtime_1.jsx)(sequence_activity_context_js_1.SequenceContent, { children: (0, jsx_runtime_1.jsx)(SolidInner, { reference: actualRef, videoConfigValues: (_a = controls === null || controls === void 0 ? void 0 : controls.videoConfigValues) !== null && _a !== void 0 ? _a : null, overrideId: (_b = controls === null || controls === void 0 ? void 0 : controls.overrideId) !== null && _b !== void 0 ? _b : null, color: color, height: height, width: width, className: className, style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined, effects: effects, effectsOutputSize: effectsOutputSize, pixelDensity: pixelDensity }) }) }) }));
|
|
192
192
|
});
|
|
193
193
|
exports.Solid = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
|
|
194
194
|
Component: SolidOuter,
|
|
@@ -16,16 +16,13 @@ const webgl2_context_error_js_1 = require("./webgl2-context-error.js");
|
|
|
16
16
|
// contexts and backing stores as soon as the chain is torn down instead of
|
|
17
17
|
// leaving that to the garbage collector.
|
|
18
18
|
class CanvasPool {
|
|
19
|
-
width;
|
|
20
|
-
height;
|
|
21
|
-
pairs = new Map();
|
|
22
|
-
// Tracked individually rather than through `pairs` so that a canvas whose
|
|
23
|
-
// sibling failed to allocate still gets released.
|
|
24
|
-
allocated = [];
|
|
25
|
-
lostContexts = new Set();
|
|
26
|
-
onContextLost;
|
|
27
|
-
disposed = false;
|
|
28
19
|
constructor(width, height, onContextLost) {
|
|
20
|
+
this.pairs = new Map();
|
|
21
|
+
// Tracked individually rather than through `pairs` so that a canvas whose
|
|
22
|
+
// sibling failed to allocate still gets released.
|
|
23
|
+
this.allocated = [];
|
|
24
|
+
this.lostContexts = new Set();
|
|
25
|
+
this.disposed = false;
|
|
29
26
|
this.width = width;
|
|
30
27
|
this.height = height;
|
|
31
28
|
this.onContextLost = onContextLost;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createEffect = void 0;
|
|
4
|
-
|
|
4
|
+
var create_effect_js_1 = require("./create-effect.js");
|
|
5
5
|
Object.defineProperty(exports, "createEffect", { enumerable: true, get: function () { return create_effect_js_1.createEffect; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RuntimeValueStore } from '../runtime-value-store.js';
|
|
2
|
-
import type { CannotUpdateEffectReason, CannotUpdateSequenceReason } from '../SequenceManager.js';
|
|
2
|
+
import type { CannotUpdateEffectReason, CannotUpdateSequenceReason, CanUpdateSequencePropsResponse } from '../SequenceManager.js';
|
|
3
3
|
import { type SequencePropsSubscriptionKey } from '../SequenceManager.js';
|
|
4
4
|
import { type CanUpdateSequencePropStatus, type PropStatuses } from '../use-schema.js';
|
|
5
5
|
import type { VideoConfigValues } from '../video-config.js';
|
|
@@ -22,6 +22,7 @@ export declare const getEffectPropStatusesCtx: ({ propStatuses, nodePath, effect
|
|
|
22
22
|
nodePath: SequencePropsSubscriptionKey;
|
|
23
23
|
effectIndex: number;
|
|
24
24
|
}) => EffectStatus;
|
|
25
|
+
export declare const getPropStatusesForSequenceStatus: (status: CanUpdateSequencePropsResponse | null, videoConfigValues: VideoConfigValues | null) => Record<string, CanUpdateSequencePropStatus> | undefined;
|
|
25
26
|
export declare const getPropStatusesCtx: (propStatuses: PropStatuses, nodePath: SequencePropsSubscriptionKey) => Record<string, CanUpdateSequencePropStatus> | undefined;
|
|
26
27
|
export type GetPropStatusesType = typeof getPropStatusesCtx;
|
|
27
28
|
export declare const useMemoizedEffects: ({ effects, overrideId, videoConfigValues, }: {
|
|
@@ -34,11 +34,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
var _a;
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.useMemoizedEffects = exports.getPropStatusesCtx = exports.getEffectPropStatusesCtx = exports.useMemoizedEffectDefinitions = void 0;
|
|
37
|
+
exports.useMemoizedEffects = exports.getPropStatusesCtx = exports.getPropStatusesForSequenceStatus = exports.getEffectPropStatusesCtx = exports.useMemoizedEffectDefinitions = void 0;
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const evaluate_source_expressions_js_1 = require("../evaluate-source-expressions.js");
|
|
40
40
|
const get_effective_visual_mode_value_js_1 = require("../get-effective-visual-mode-value.js");
|
|
41
41
|
const interpolate_keyframed_status_js_1 = require("../interpolate-keyframed-status.js");
|
|
42
|
+
const registry_store_js_1 = require("../registry-store.js");
|
|
42
43
|
const runtime_value_store_js_1 = require("../runtime-value-store.js");
|
|
43
44
|
const sequence_activity_context_js_1 = require("../sequence-activity-context.js");
|
|
44
45
|
const sequence_node_path_js_1 = require("../sequence-node-path.js");
|
|
@@ -46,6 +47,20 @@ const SequenceManager_js_1 = require("../SequenceManager.js");
|
|
|
46
47
|
const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
47
48
|
const emptyDragOverrides = {};
|
|
48
49
|
const useCacheCommitEffect = (_a = react_1.default.useInsertionEffect) !== null && _a !== void 0 ? _a : react_1.useLayoutEffect;
|
|
50
|
+
const areEffectParamsEqual = (previous, next) => {
|
|
51
|
+
if (Object.is(previous, next)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (previous === null ||
|
|
55
|
+
next === null ||
|
|
56
|
+
typeof previous !== 'object' ||
|
|
57
|
+
typeof next !== 'object' ||
|
|
58
|
+
Object.getPrototypeOf(previous) !== Object.prototype ||
|
|
59
|
+
Object.getPrototypeOf(next) !== Object.prototype) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return (0, registry_store_js_1.areRegistryEntriesEqual)(previous, next);
|
|
63
|
+
};
|
|
49
64
|
const mergeOverrides = ({ descriptor, propStatusOverrides, dragOverrides, frame, }) => {
|
|
50
65
|
if (!propStatusOverrides && !dragOverrides) {
|
|
51
66
|
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
@@ -105,17 +120,16 @@ const resolvePropStatusOverrides = (propStatus, frame) => {
|
|
|
105
120
|
const useMemoizedEffectDefinitions = (effects) => {
|
|
106
121
|
const activityDormant = (0, react_1.useContext)(sequence_activity_context_js_1.SequenceActivityDormantContext);
|
|
107
122
|
const previousRef = (0, react_1.useRef)(null);
|
|
108
|
-
const definitions = effects.map((descriptor) => descriptor.definition);
|
|
109
123
|
const previous = previousRef.current;
|
|
110
124
|
const isSame = previous !== null &&
|
|
111
|
-
previous.definitions.length ===
|
|
112
|
-
previous.definitions.every((definition, i) => definition ===
|
|
125
|
+
previous.definitions.length === effects.length &&
|
|
126
|
+
previous.definitions.every((definition, i) => definition === effects[i].definition);
|
|
113
127
|
const controllers = isSame
|
|
114
128
|
? previous.controllers
|
|
115
129
|
: effects.map((effect) => (0, runtime_value_store_js_1.createRuntimeValueStore)(effect.params));
|
|
116
130
|
const stableDefinitions = isSame
|
|
117
131
|
? previous.definitions
|
|
118
|
-
: Object.assign(
|
|
132
|
+
: Object.assign(effects.map((descriptor) => descriptor.definition), {
|
|
119
133
|
runtimeValues: controllers.map((controller) => controller.store),
|
|
120
134
|
});
|
|
121
135
|
useCacheCommitEffect(() => {
|
|
@@ -125,6 +139,12 @@ const useMemoizedEffectDefinitions = (effects) => {
|
|
|
125
139
|
if (!activityDormant || controllers.length === 0) {
|
|
126
140
|
return;
|
|
127
141
|
}
|
|
142
|
+
if (controllers.every((controller, index) => {
|
|
143
|
+
var _a;
|
|
144
|
+
return areEffectParamsEqual(controller.store.getSnapshot(), (_a = effects[index]) === null || _a === void 0 ? void 0 : _a.params);
|
|
145
|
+
})) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
128
148
|
let cancelled = false;
|
|
129
149
|
queueMicrotask(() => {
|
|
130
150
|
if (cancelled) {
|
|
@@ -134,21 +154,10 @@ const useMemoizedEffectDefinitions = (effects) => {
|
|
|
134
154
|
var _a;
|
|
135
155
|
const snapshot = (_a = effects[index]) === null || _a === void 0 ? void 0 : _a.params;
|
|
136
156
|
const currentSnapshot = controller.store.getSnapshot();
|
|
137
|
-
if (Object.is(snapshot, currentSnapshot)) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
157
|
// Equivalent inline params should not notify inspector subscribers on
|
|
141
158
|
// every dormant render. Preserve changes to keys and leaf references.
|
|
142
|
-
if (snapshot
|
|
143
|
-
|
|
144
|
-
typeof snapshot === 'object' &&
|
|
145
|
-
typeof currentSnapshot === 'object') {
|
|
146
|
-
const keys = Object.keys(snapshot);
|
|
147
|
-
if (keys.length === Object.keys(currentSnapshot).length &&
|
|
148
|
-
keys.every((key) => Object.prototype.hasOwnProperty.call(currentSnapshot, key) &&
|
|
149
|
-
Object.is(snapshot[key], currentSnapshot[key]))) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
159
|
+
if (areEffectParamsEqual(snapshot, currentSnapshot)) {
|
|
160
|
+
return;
|
|
152
161
|
}
|
|
153
162
|
controller.setSnapshot(snapshot);
|
|
154
163
|
});
|
|
@@ -164,14 +173,15 @@ const useMemoizedEffectDefinitions = (effects) => {
|
|
|
164
173
|
stableDefinitions.forEach((_definition, index) => {
|
|
165
174
|
var _a;
|
|
166
175
|
const snapshot = (_a = effects[index]) === null || _a === void 0 ? void 0 : _a.params;
|
|
167
|
-
controllers[index].
|
|
176
|
+
if (!areEffectParamsEqual(controllers[index].store.getSnapshot(), snapshot)) {
|
|
177
|
+
controllers[index].setSnapshot(snapshot);
|
|
178
|
+
}
|
|
168
179
|
});
|
|
169
180
|
}, [controllers, effects, stableDefinitions]);
|
|
170
181
|
return stableDefinitions;
|
|
171
182
|
};
|
|
172
183
|
exports.useMemoizedEffectDefinitions = useMemoizedEffectDefinitions;
|
|
173
|
-
const
|
|
174
|
-
const status = propStatuses[(0, SequenceManager_js_1.makeSequencePropsSubscriptionKey)(nodePath)];
|
|
184
|
+
const getEffectStatusForSequenceStatus = ({ status, effectIndex, videoConfigValues, }) => {
|
|
175
185
|
if (!status) {
|
|
176
186
|
return { type: 'cannot-update-sequence', reason: 'not-found' };
|
|
177
187
|
}
|
|
@@ -187,74 +197,117 @@ const getEffectPropStatusesCtx = ({ propStatuses, nodePath, effectIndex, }) => {
|
|
|
187
197
|
}
|
|
188
198
|
return {
|
|
189
199
|
type: 'can-update-effect',
|
|
190
|
-
props: (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(effect.props,
|
|
200
|
+
props: (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(effect.props, videoConfigValues),
|
|
191
201
|
};
|
|
192
202
|
};
|
|
203
|
+
const getEffectPropStatusesCtx = ({ propStatuses, nodePath, effectIndex, }) => {
|
|
204
|
+
var _a;
|
|
205
|
+
return getEffectStatusForSequenceStatus({
|
|
206
|
+
status: (_a = propStatuses[(0, SequenceManager_js_1.makeSequencePropsSubscriptionKey)(nodePath)]) !== null && _a !== void 0 ? _a : null,
|
|
207
|
+
effectIndex,
|
|
208
|
+
videoConfigValues: nodePath.videoConfigValues,
|
|
209
|
+
});
|
|
210
|
+
};
|
|
193
211
|
exports.getEffectPropStatusesCtx = getEffectPropStatusesCtx;
|
|
194
|
-
const
|
|
195
|
-
const status = propStatuses[(0, SequenceManager_js_1.makeSequencePropsSubscriptionKey)(nodePath)];
|
|
212
|
+
const getPropStatusesForSequenceStatus = (status, videoConfigValues) => {
|
|
196
213
|
if (!status) {
|
|
197
214
|
return undefined;
|
|
198
215
|
}
|
|
199
216
|
if (!status.canUpdate) {
|
|
200
217
|
return undefined;
|
|
201
218
|
}
|
|
202
|
-
return (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(status.props,
|
|
219
|
+
return (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(status.props, videoConfigValues);
|
|
220
|
+
};
|
|
221
|
+
exports.getPropStatusesForSequenceStatus = getPropStatusesForSequenceStatus;
|
|
222
|
+
const getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
223
|
+
var _a;
|
|
224
|
+
return (0, exports.getPropStatusesForSequenceStatus)((_a = propStatuses[(0, SequenceManager_js_1.makeSequencePropsSubscriptionKey)(nodePath)]) !== null && _a !== void 0 ? _a : null, nodePath.videoConfigValues);
|
|
203
225
|
};
|
|
204
226
|
exports.getPropStatusesCtx = getPropStatusesCtx;
|
|
205
227
|
const useMemoizedEffects = ({ effects, overrideId, videoConfigValues, }) => {
|
|
206
228
|
var _a;
|
|
207
229
|
const previousRef = (0, react_1.useRef)(null);
|
|
208
|
-
const { propStatuses } = (0, react_1.useContext)(SequenceManager_js_1.VisualModePropStatusesContext);
|
|
209
|
-
const frame = (0, use_current_frame_js_1.useCurrentFrame)();
|
|
210
230
|
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(sequence_node_path_js_1.OverrideIdsToNodePathsGettersContext);
|
|
211
231
|
const previous = previousRef.current;
|
|
212
232
|
const nodePath = overrideId
|
|
213
233
|
? ((_a = overrideIdToNodePathMappings[overrideId]) !== null && _a !== void 0 ? _a : null)
|
|
214
234
|
: null;
|
|
215
235
|
const effectDragOverrides = (0, SequenceManager_js_1.useEffectDragOverridesForNodePath)(nodePath);
|
|
216
|
-
const
|
|
217
|
-
|
|
236
|
+
const sequenceStatus = (0, SequenceManager_js_1.usePropStatusForNodePath)(nodePath);
|
|
237
|
+
const effectPropStatuses = (0, react_1.useMemo)(() => Array.from({ length: effects.length }, (_, effectIndex) => {
|
|
218
238
|
if (nodePath === null) {
|
|
219
|
-
return
|
|
220
|
-
descriptor,
|
|
221
|
-
params: descriptor.params,
|
|
222
|
-
effectKey: descriptor.effectKey,
|
|
223
|
-
};
|
|
239
|
+
return null;
|
|
224
240
|
}
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
241
|
+
const status = getEffectStatusForSequenceStatus({
|
|
242
|
+
status: sequenceStatus,
|
|
243
|
+
effectIndex,
|
|
244
|
+
videoConfigValues,
|
|
229
245
|
});
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
246
|
+
return status.type === 'can-update-effect' ? status.props : null;
|
|
247
|
+
}), [effects.length, nodePath, sequenceStatus, videoConfigValues]);
|
|
248
|
+
const animatedEffects = (0, react_1.useMemo)(() => effectPropStatuses.map((status, index) => {
|
|
249
|
+
var _a;
|
|
250
|
+
return Object.values(status !== null && status !== void 0 ? status : {}).some((prop) => prop.status === 'keyframed') ||
|
|
251
|
+
Object.values((_a = effectDragOverrides[index]) !== null && _a !== void 0 ? _a : emptyDragOverrides).some((override) => override.type === 'keyframed');
|
|
252
|
+
}), [effectDragOverrides, effectPropStatuses]);
|
|
253
|
+
// Runtime animations arrive through props. Only source/drag keyframes need
|
|
254
|
+
// their own clock, and an animated effect must not invalidate static siblings.
|
|
255
|
+
const frame = (0, use_current_frame_js_1.useCurrentFrameWithOptionalSubscription)(animatedEffects.some(Boolean));
|
|
256
|
+
const prepared = effects.map((descriptor, index) => {
|
|
257
|
+
var _a;
|
|
258
|
+
const propStatus = effectPropStatuses[index];
|
|
233
259
|
const dragOverridesMap = (_a = effectDragOverrides[index]) !== null && _a !== void 0 ? _a : emptyDragOverrides;
|
|
234
260
|
const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
|
|
261
|
+
const effectFrame = animatedEffects[index] ? frame : null;
|
|
262
|
+
const cached = previous === null || previous === void 0 ? void 0 : previous.prepared[index];
|
|
263
|
+
if (cached &&
|
|
264
|
+
cached.definition === descriptor.definition &&
|
|
265
|
+
cached.sourceKey === descriptor.effectKey &&
|
|
266
|
+
areEffectParamsEqual(cached.params, descriptor.params) &&
|
|
267
|
+
cached.propStatus === propStatus &&
|
|
268
|
+
cached.dragOverrides === dragOverrides &&
|
|
269
|
+
cached.frame === effectFrame) {
|
|
270
|
+
return cached;
|
|
271
|
+
}
|
|
272
|
+
const propStatusOverrides = resolvePropStatusOverrides(propStatus !== null && propStatus !== void 0 ? propStatus : undefined, frame);
|
|
235
273
|
const { params, effectKey } = mergeOverrides({
|
|
236
274
|
descriptor,
|
|
237
275
|
propStatusOverrides,
|
|
238
276
|
dragOverrides,
|
|
239
277
|
frame,
|
|
240
278
|
});
|
|
241
|
-
return {
|
|
279
|
+
return {
|
|
280
|
+
definition: descriptor.definition,
|
|
281
|
+
sourceKey: descriptor.effectKey,
|
|
282
|
+
// Snapshot plain params so shallow comparisons see in-place field edits.
|
|
283
|
+
params: descriptor.params !== null &&
|
|
284
|
+
typeof descriptor.params === 'object' &&
|
|
285
|
+
Object.getPrototypeOf(descriptor.params) === Object.prototype
|
|
286
|
+
? { ...descriptor.params }
|
|
287
|
+
: descriptor.params,
|
|
288
|
+
propStatus,
|
|
289
|
+
dragOverrides,
|
|
290
|
+
frame: effectFrame,
|
|
291
|
+
value: (cached === null || cached === void 0 ? void 0 : cached.value.definition) === descriptor.definition &&
|
|
292
|
+
cached.value.effectKey === effectKey
|
|
293
|
+
? cached.value
|
|
294
|
+
: {
|
|
295
|
+
definition: descriptor.definition,
|
|
296
|
+
effectKey,
|
|
297
|
+
params,
|
|
298
|
+
memoized: true,
|
|
299
|
+
},
|
|
300
|
+
};
|
|
242
301
|
});
|
|
243
302
|
const isSame = previous !== null &&
|
|
244
|
-
previous.length ===
|
|
245
|
-
previous.every((
|
|
246
|
-
p.effectKey === resolved[i].effectKey);
|
|
303
|
+
previous.effects.length === prepared.length &&
|
|
304
|
+
previous.effects.every((effect, i) => effect === prepared[i].value);
|
|
247
305
|
const next = isSame
|
|
248
|
-
? previous
|
|
249
|
-
:
|
|
250
|
-
definition: descriptor.definition,
|
|
251
|
-
effectKey,
|
|
252
|
-
params,
|
|
253
|
-
memoized: true,
|
|
254
|
-
}));
|
|
306
|
+
? previous.effects
|
|
307
|
+
: prepared.map((effect) => effect.value);
|
|
255
308
|
useCacheCommitEffect(() => {
|
|
256
|
-
previousRef.current = next;
|
|
257
|
-
}, [next]);
|
|
309
|
+
previousRef.current = { prepared, effects: next };
|
|
310
|
+
}, [next, prepared]);
|
|
258
311
|
return next;
|
|
259
312
|
};
|
|
260
313
|
exports.useMemoizedEffects = useMemoizedEffects;
|
package/dist/cjs/freeze.js
CHANGED
|
@@ -77,7 +77,7 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, _remotionIntern
|
|
|
77
77
|
};
|
|
78
78
|
}, [sequenceContext, isActive]);
|
|
79
79
|
const providedTimeline = isActive ? frozenTimelineValue : timelineContext;
|
|
80
|
-
return (jsx_runtime_1.jsx(NonPremountFreezeContext.Provider, { value: isInsideNonPremountFreeze ||
|
|
81
|
-
(Boolean(isActive) && !_remotionInternalIsPremounting), children: jsx_runtime_1.jsx(TimelineContext_js_1.TimelineContext.Provider, { value: providedTimeline, children: jsx_runtime_1.jsx(sequence_activity_context_js_1.SequenceActivityTimelineContext.Provider, { value: activityDormant ? providedTimeline : null, children: jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: newSequenceContext, children: children }) }) }) }));
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(NonPremountFreezeContext.Provider, { value: isInsideNonPremountFreeze ||
|
|
81
|
+
(Boolean(isActive) && !_remotionInternalIsPremounting), children: (0, jsx_runtime_1.jsx)(TimelineContext_js_1.TimelineContext.Provider, { value: providedTimeline, children: (0, jsx_runtime_1.jsx)(sequence_activity_context_js_1.SequenceActivityTimelineContext.Provider, { value: activityDormant ? providedTimeline : null, children: (0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: newSequenceContext, children: children }) }) }) }));
|
|
82
82
|
};
|
|
83
83
|
exports.Freeze = Freeze;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getCrossOriginValue: ({ crossOrigin, requestsVideoFrame, isClientSideRendering, }: {
|
|
2
|
-
crossOrigin:
|
|
2
|
+
crossOrigin: '' | 'anonymous' | 'use-credentials' | undefined;
|
|
3
3
|
requestsVideoFrame: boolean;
|
|
4
4
|
isClientSideRendering: boolean;
|
|
5
5
|
}) => "" | "anonymous" | "use-credentials" | undefined;
|