remotion 4.0.491 → 4.0.493
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/Composition.js +3 -0
- package/dist/cjs/CompositionManager.d.ts +2 -0
- package/dist/cjs/Img.d.ts +6 -0
- package/dist/cjs/Img.js +6 -0
- package/dist/cjs/ResolveCompositionConfig.d.ts +3 -0
- package/dist/cjs/ResolveCompositionConfig.js +2 -0
- package/dist/cjs/Sequence.d.ts +4 -0
- package/dist/cjs/Sequence.js +5 -1
- package/dist/cjs/animated-image/AnimatedImage.js +6 -0
- package/dist/cjs/enable-sequence-stack-traces.d.ts +4 -0
- package/dist/cjs/enable-sequence-stack-traces.js +27 -1
- package/dist/cjs/index.d.ts +3 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/interactivity-schema.d.ts +7 -1
- package/dist/cjs/internals.d.ts +26 -3
- package/dist/cjs/internals.js +3 -0
- package/dist/cjs/resolve-video-config.d.ts +19 -1
- package/dist/cjs/resolve-video-config.js +61 -44
- package/dist/cjs/use-schema.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrap-remotion-context.d.ts +2 -0
- package/dist/esm/index.mjs +184 -124
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -729,6 +729,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
729
729
|
if (currentCompositionMetadata) {
|
|
730
730
|
return {
|
|
731
731
|
type: "success",
|
|
732
|
+
metadataSource: null,
|
|
732
733
|
result: {
|
|
733
734
|
...currentCompositionMetadata,
|
|
734
735
|
id: composition.id,
|
|
@@ -746,6 +747,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
746
747
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
747
748
|
return {
|
|
748
749
|
type: "success",
|
|
750
|
+
metadataSource: null,
|
|
749
751
|
result: {
|
|
750
752
|
width: composition.width,
|
|
751
753
|
height: composition.height,
|
|
@@ -1184,6 +1186,7 @@ var InnerComposition = ({
|
|
|
1184
1186
|
}
|
|
1185
1187
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
1186
1188
|
const stack = compProps.stack ?? null;
|
|
1189
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
1187
1190
|
useEffect2(() => {
|
|
1188
1191
|
if (!id) {
|
|
1189
1192
|
throw new Error("No id for composition passed.");
|
|
@@ -1201,6 +1204,7 @@ var InnerComposition = ({
|
|
|
1201
1204
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
1202
1205
|
nonce: nonce.get(),
|
|
1203
1206
|
parentFolderName: parentName,
|
|
1207
|
+
componentFromProps,
|
|
1204
1208
|
schema: schema ?? null,
|
|
1205
1209
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
1206
1210
|
stack
|
|
@@ -1219,6 +1223,7 @@ var InnerComposition = ({
|
|
|
1219
1223
|
width,
|
|
1220
1224
|
nonce,
|
|
1221
1225
|
parentName,
|
|
1226
|
+
componentFromProps,
|
|
1222
1227
|
schema,
|
|
1223
1228
|
compProps.calculateMetadata,
|
|
1224
1229
|
stack,
|
|
@@ -1278,14 +1283,34 @@ var Composition = (props) => {
|
|
|
1278
1283
|
};
|
|
1279
1284
|
|
|
1280
1285
|
// src/enable-sequence-stack-traces.ts
|
|
1286
|
+
import React9 from "react";
|
|
1281
1287
|
var componentsToAddStacksTo = [];
|
|
1288
|
+
var sequenceComponent = null;
|
|
1282
1289
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
1283
1290
|
var addSequenceStackTraces = (component) => {
|
|
1284
1291
|
componentsToAddStacksTo.push(component);
|
|
1285
1292
|
};
|
|
1293
|
+
var setSequenceComponent = (component) => {
|
|
1294
|
+
sequenceComponent = component;
|
|
1295
|
+
};
|
|
1296
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
1297
|
+
var getSingleChildComponent = (children) => {
|
|
1298
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
1299
|
+
if (mountedChildren.length !== 1) {
|
|
1300
|
+
return null;
|
|
1301
|
+
}
|
|
1302
|
+
const child = mountedChildren[0];
|
|
1303
|
+
if (!React9.isValidElement(child)) {
|
|
1304
|
+
return null;
|
|
1305
|
+
}
|
|
1306
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
1307
|
+
return null;
|
|
1308
|
+
}
|
|
1309
|
+
return child.type;
|
|
1310
|
+
};
|
|
1286
1311
|
|
|
1287
1312
|
// src/version.ts
|
|
1288
|
-
var VERSION = "4.0.
|
|
1313
|
+
var VERSION = "4.0.493";
|
|
1289
1314
|
|
|
1290
1315
|
// src/multiple-versions-warning.ts
|
|
1291
1316
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1949,9 +1974,9 @@ var PremountContext = createContext14({
|
|
|
1949
1974
|
});
|
|
1950
1975
|
|
|
1951
1976
|
// src/SequenceManager.tsx
|
|
1952
|
-
import
|
|
1977
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
1953
1978
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1954
|
-
var SequenceManager =
|
|
1979
|
+
var SequenceManager = React12.createContext({
|
|
1955
1980
|
registerSequence: () => {
|
|
1956
1981
|
throw new Error("SequenceManagerContext not initialized");
|
|
1957
1982
|
},
|
|
@@ -1960,19 +1985,19 @@ var SequenceManager = React11.createContext({
|
|
|
1960
1985
|
},
|
|
1961
1986
|
sequences: []
|
|
1962
1987
|
});
|
|
1963
|
-
var SequenceManagerRefContext =
|
|
1988
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
1964
1989
|
current: []
|
|
1965
1990
|
});
|
|
1966
1991
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
1967
1992
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
1968
1993
|
};
|
|
1969
|
-
var VisualModePropStatusesContext =
|
|
1994
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
1970
1995
|
propStatuses: {}
|
|
1971
1996
|
});
|
|
1972
|
-
var VisualModePropStatusesRefContext =
|
|
1997
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
1973
1998
|
current: {}
|
|
1974
1999
|
});
|
|
1975
|
-
var VisualModeDragOverridesContext =
|
|
2000
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
1976
2001
|
getDragOverrides: () => {
|
|
1977
2002
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
1978
2003
|
},
|
|
@@ -1980,7 +2005,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
1980
2005
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
1981
2006
|
}
|
|
1982
2007
|
});
|
|
1983
|
-
var VisualModeSettersContext =
|
|
2008
|
+
var VisualModeSettersContext = React12.createContext({
|
|
1984
2009
|
setDragOverrides: () => {
|
|
1985
2010
|
throw new Error("VisualModeSettersContext not initialized");
|
|
1986
2011
|
},
|
|
@@ -2132,7 +2157,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
2132
2157
|
};
|
|
2133
2158
|
|
|
2134
2159
|
// src/series/is-inside-series.tsx
|
|
2135
|
-
import
|
|
2160
|
+
import React13, { createContext as createContext15 } from "react";
|
|
2136
2161
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2137
2162
|
var IsInsideSeriesContext = createContext15(false);
|
|
2138
2163
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
@@ -2148,7 +2173,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
2148
2173
|
});
|
|
2149
2174
|
};
|
|
2150
2175
|
var useRequireToBeInsideSeries = () => {
|
|
2151
|
-
const isInsideSeries =
|
|
2176
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
2152
2177
|
if (!isInsideSeries) {
|
|
2153
2178
|
throw new Error("This component must be inside a <Series /> component.");
|
|
2154
2179
|
}
|
|
@@ -2158,7 +2183,7 @@ var useRequireToBeInsideSeries = () => {
|
|
|
2158
2183
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
2159
2184
|
|
|
2160
2185
|
// src/with-interactivity-schema.ts
|
|
2161
|
-
import
|
|
2186
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
2162
2187
|
|
|
2163
2188
|
// src/delete-nested-key.ts
|
|
2164
2189
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
@@ -4262,6 +4287,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
4262
4287
|
shouldResortToDefaultValueIfUndefined: false
|
|
4263
4288
|
});
|
|
4264
4289
|
}
|
|
4290
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
4291
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
4292
|
+
}
|
|
4265
4293
|
if (value === undefined) {
|
|
4266
4294
|
propsToDelete.add(key);
|
|
4267
4295
|
}
|
|
@@ -4362,7 +4390,7 @@ var withInteractivitySchema = ({
|
|
|
4362
4390
|
const Wrapped = forwardRef2((props, ref) => {
|
|
4363
4391
|
const env = useRemotionEnvironment();
|
|
4364
4392
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
4365
|
-
return
|
|
4393
|
+
return React14.createElement(Component, {
|
|
4366
4394
|
...props,
|
|
4367
4395
|
controls: null,
|
|
4368
4396
|
ref
|
|
@@ -4373,7 +4401,7 @@ var withInteractivitySchema = ({
|
|
|
4373
4401
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4374
4402
|
const frame = useCurrentFrame();
|
|
4375
4403
|
if (props.controls) {
|
|
4376
|
-
return
|
|
4404
|
+
return React14.createElement(Component, {
|
|
4377
4405
|
...props,
|
|
4378
4406
|
ref
|
|
4379
4407
|
});
|
|
@@ -4431,7 +4459,7 @@ var withInteractivitySchema = ({
|
|
|
4431
4459
|
schemaKeys: activeKeys,
|
|
4432
4460
|
propsToDelete
|
|
4433
4461
|
});
|
|
4434
|
-
return
|
|
4462
|
+
return React14.createElement(Component, {
|
|
4435
4463
|
...mergedProps,
|
|
4436
4464
|
controls,
|
|
4437
4465
|
ref
|
|
@@ -4460,6 +4488,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4460
4488
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
4461
4489
|
_remotionInternalStack: stack,
|
|
4462
4490
|
_remotionInternalDocumentationLink: documentationLink,
|
|
4491
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
4463
4492
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
4464
4493
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
4465
4494
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -4606,7 +4635,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4606
4635
|
getStack: () => stackRef.current,
|
|
4607
4636
|
refForOutline: refForOutline ?? null,
|
|
4608
4637
|
isInsideSeries,
|
|
4609
|
-
frozenFrame: registeredFrozenFrame
|
|
4638
|
+
frozenFrame: registeredFrozenFrame,
|
|
4639
|
+
singleChildComponent: singleChildComponent ?? null
|
|
4610
4640
|
});
|
|
4611
4641
|
} else {
|
|
4612
4642
|
registerSequence({
|
|
@@ -4636,7 +4666,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4636
4666
|
refForOutline: refForOutline ?? null,
|
|
4637
4667
|
isInsideSeries,
|
|
4638
4668
|
frozenFrame: registeredFrozenFrame,
|
|
4639
|
-
frozenMediaFrame
|
|
4669
|
+
frozenMediaFrame,
|
|
4670
|
+
singleChildComponent: singleChildComponent ?? null
|
|
4640
4671
|
});
|
|
4641
4672
|
}
|
|
4642
4673
|
return () => {
|
|
@@ -4663,7 +4694,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4663
4694
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
4664
4695
|
refForOutline: refForOutline ?? null,
|
|
4665
4696
|
isInsideSeries,
|
|
4666
|
-
frozenFrame: registeredFrozenFrame
|
|
4697
|
+
frozenFrame: registeredFrozenFrame,
|
|
4698
|
+
singleChildComponent: singleChildComponent ?? null
|
|
4667
4699
|
});
|
|
4668
4700
|
return () => {
|
|
4669
4701
|
unregisterSequence(id);
|
|
@@ -4696,7 +4728,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
4696
4728
|
registeredFrozenFrame,
|
|
4697
4729
|
startMediaFrom,
|
|
4698
4730
|
mediaFrameAtSequenceZero,
|
|
4699
|
-
frozenMediaFrame
|
|
4731
|
+
frozenMediaFrame,
|
|
4732
|
+
singleChildComponent
|
|
4700
4733
|
]);
|
|
4701
4734
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
4702
4735
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -4836,7 +4869,7 @@ import {
|
|
|
4836
4869
|
} from "react";
|
|
4837
4870
|
|
|
4838
4871
|
// src/animated-image/canvas.tsx
|
|
4839
|
-
import
|
|
4872
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4840
4873
|
|
|
4841
4874
|
// src/calculate-image-fit.ts
|
|
4842
4875
|
var calculateImageFit = (fit, imageSize, canvasSize) => {
|
|
@@ -5227,7 +5260,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
5227
5260
|
...props
|
|
5228
5261
|
});
|
|
5229
5262
|
};
|
|
5230
|
-
var Canvas =
|
|
5263
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
5231
5264
|
|
|
5232
5265
|
// src/animated-image/decode-image.ts
|
|
5233
5266
|
var CACHE_SIZE = 5;
|
|
@@ -5397,6 +5430,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
5397
5430
|
// src/animated-image/AnimatedImage.tsx
|
|
5398
5431
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
5399
5432
|
var animatedImageSchema = {
|
|
5433
|
+
src: {
|
|
5434
|
+
type: "asset",
|
|
5435
|
+
default: undefined,
|
|
5436
|
+
description: "Source",
|
|
5437
|
+
keyframable: false
|
|
5438
|
+
},
|
|
5400
5439
|
...baseSchema,
|
|
5401
5440
|
playbackRate: {
|
|
5402
5441
|
type: "number",
|
|
@@ -5841,11 +5880,11 @@ var calculateMediaDuration = ({
|
|
|
5841
5880
|
};
|
|
5842
5881
|
|
|
5843
5882
|
// src/loop/index.tsx
|
|
5844
|
-
import
|
|
5883
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
5845
5884
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5846
5885
|
var LoopContext = createContext18(null);
|
|
5847
5886
|
var useLoop = () => {
|
|
5848
|
-
return
|
|
5887
|
+
return React17.useContext(LoopContext);
|
|
5849
5888
|
};
|
|
5850
5889
|
var Loop = ({
|
|
5851
5890
|
durationInFrames,
|
|
@@ -6289,7 +6328,7 @@ var DurationsContextProvider = ({ children }) => {
|
|
|
6289
6328
|
|
|
6290
6329
|
// src/audio/AudioForPreview.tsx
|
|
6291
6330
|
import { useCallback as useCallback13 } from "react";
|
|
6292
|
-
import
|
|
6331
|
+
import React23, {
|
|
6293
6332
|
forwardRef as forwardRef5,
|
|
6294
6333
|
useContext as useContext28,
|
|
6295
6334
|
useEffect as useEffect14,
|
|
@@ -6321,7 +6360,7 @@ var getCrossOriginValue = ({
|
|
|
6321
6360
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
6322
6361
|
|
|
6323
6362
|
// src/audio/shared-audio-tags.tsx
|
|
6324
|
-
import
|
|
6363
|
+
import React20, {
|
|
6325
6364
|
createContext as createContext21,
|
|
6326
6365
|
createRef as createRef2,
|
|
6327
6366
|
useCallback as useCallback9,
|
|
@@ -6756,7 +6795,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
6756
6795
|
};
|
|
6757
6796
|
});
|
|
6758
6797
|
}, [audioContext, numberOfAudioTags]);
|
|
6759
|
-
const effectToUse =
|
|
6798
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
6760
6799
|
effectToUse(() => {
|
|
6761
6800
|
return () => {
|
|
6762
6801
|
requestAnimationFrame(() => {
|
|
@@ -6926,7 +6965,7 @@ var useSharedAudio = ({
|
|
|
6926
6965
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
6927
6966
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
6928
6967
|
}
|
|
6929
|
-
const el =
|
|
6968
|
+
const el = React20.createRef();
|
|
6930
6969
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
6931
6970
|
audioContext: audioCtx.audioContext,
|
|
6932
6971
|
ref: el
|
|
@@ -6945,7 +6984,7 @@ var useSharedAudio = ({
|
|
|
6945
6984
|
}
|
|
6946
6985
|
};
|
|
6947
6986
|
});
|
|
6948
|
-
const effectToUse =
|
|
6987
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
6949
6988
|
if (typeof document !== "undefined") {
|
|
6950
6989
|
effectToUse(() => {
|
|
6951
6990
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -7450,7 +7489,7 @@ import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16
|
|
|
7450
7489
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
7451
7490
|
|
|
7452
7491
|
// src/buffering.tsx
|
|
7453
|
-
import
|
|
7492
|
+
import React21, {
|
|
7454
7493
|
useCallback as useCallback10,
|
|
7455
7494
|
useContext as useContext24,
|
|
7456
7495
|
useEffect as useEffect9,
|
|
@@ -7545,7 +7584,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7545
7584
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
7546
7585
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
7547
7586
|
};
|
|
7548
|
-
var BufferingContextReact =
|
|
7587
|
+
var BufferingContextReact = React21.createContext(null);
|
|
7549
7588
|
var BufferingProvider = ({ children }) => {
|
|
7550
7589
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
7551
7590
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -7765,9 +7804,9 @@ var getMediaSyncAction = (input) => {
|
|
|
7765
7804
|
};
|
|
7766
7805
|
|
|
7767
7806
|
// src/media-tag-current-time-timestamp.ts
|
|
7768
|
-
import
|
|
7807
|
+
import React22 from "react";
|
|
7769
7808
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
7770
|
-
const lastUpdate =
|
|
7809
|
+
const lastUpdate = React22.useRef({
|
|
7771
7810
|
time: mediaRef.current?.currentTime ?? 0,
|
|
7772
7811
|
lastUpdate: performance.now()
|
|
7773
7812
|
});
|
|
@@ -8545,7 +8584,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8545
8584
|
volume: userPreferredVolume,
|
|
8546
8585
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
8547
8586
|
});
|
|
8548
|
-
const effectToUse =
|
|
8587
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
8549
8588
|
effectToUse(() => {
|
|
8550
8589
|
return () => {
|
|
8551
8590
|
requestAnimationFrame(() => {
|
|
@@ -10187,6 +10226,12 @@ var NativeImgInner = ({
|
|
|
10187
10226
|
};
|
|
10188
10227
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
10189
10228
|
var imgSchema = {
|
|
10229
|
+
src: {
|
|
10230
|
+
type: "asset",
|
|
10231
|
+
default: undefined,
|
|
10232
|
+
description: "Source",
|
|
10233
|
+
keyframable: false
|
|
10234
|
+
},
|
|
10190
10235
|
...baseSchema,
|
|
10191
10236
|
...transformSchema
|
|
10192
10237
|
};
|
|
@@ -10332,7 +10377,7 @@ var Img = withInteractivitySchema({
|
|
|
10332
10377
|
});
|
|
10333
10378
|
addSequenceStackTraces(Img);
|
|
10334
10379
|
// src/Interactive.tsx
|
|
10335
|
-
import
|
|
10380
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
10336
10381
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
10337
10382
|
var sourcePathToIdentityPrefix = (packageName) => {
|
|
10338
10383
|
if (packageName === "remotion") {
|
|
@@ -10400,7 +10445,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10400
10445
|
_remotionInternalStack: stack,
|
|
10401
10446
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
10402
10447
|
outlineRef: refForOutline,
|
|
10403
|
-
children:
|
|
10448
|
+
children: React30.createElement(tag, {
|
|
10404
10449
|
...props2,
|
|
10405
10450
|
ref: callbackRef
|
|
10406
10451
|
})
|
|
@@ -10468,8 +10513,8 @@ var Interactive = {
|
|
|
10468
10513
|
import { createRef as createRef3 } from "react";
|
|
10469
10514
|
|
|
10470
10515
|
// src/CompositionManager.tsx
|
|
10471
|
-
import
|
|
10472
|
-
var compositionsRef =
|
|
10516
|
+
import React31 from "react";
|
|
10517
|
+
var compositionsRef = React31.createRef();
|
|
10473
10518
|
|
|
10474
10519
|
// src/CompositionManagerProvider.tsx
|
|
10475
10520
|
import {
|
|
@@ -10634,8 +10679,8 @@ var getPreviewDomElement = () => {
|
|
|
10634
10679
|
};
|
|
10635
10680
|
|
|
10636
10681
|
// src/max-video-cache-size.ts
|
|
10637
|
-
import
|
|
10638
|
-
var MaxMediaCacheSizeContext =
|
|
10682
|
+
import React32 from "react";
|
|
10683
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
10639
10684
|
|
|
10640
10685
|
// src/register-root.ts
|
|
10641
10686
|
var Root = null;
|
|
@@ -10833,7 +10878,46 @@ var validateCalculated = ({
|
|
|
10833
10878
|
defaultSampleRate
|
|
10834
10879
|
};
|
|
10835
10880
|
};
|
|
10836
|
-
var
|
|
10881
|
+
var makeVideoConfigWithMetadata = ({
|
|
10882
|
+
calculated,
|
|
10883
|
+
compositionDurationInFrames,
|
|
10884
|
+
compositionFps,
|
|
10885
|
+
compositionHeight,
|
|
10886
|
+
compositionId,
|
|
10887
|
+
compositionWidth,
|
|
10888
|
+
defaultProps,
|
|
10889
|
+
originalProps
|
|
10890
|
+
}) => {
|
|
10891
|
+
const data = validateCalculated({
|
|
10892
|
+
calculated,
|
|
10893
|
+
compositionDurationInFrames,
|
|
10894
|
+
compositionFps,
|
|
10895
|
+
compositionHeight,
|
|
10896
|
+
compositionWidth,
|
|
10897
|
+
compositionId
|
|
10898
|
+
});
|
|
10899
|
+
return {
|
|
10900
|
+
metadataSource: {
|
|
10901
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
10902
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
10903
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
10904
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
10905
|
+
},
|
|
10906
|
+
videoConfig: {
|
|
10907
|
+
...data,
|
|
10908
|
+
id: compositionId,
|
|
10909
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
10910
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
10911
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
10912
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
10913
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
10914
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
10915
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
10916
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
10917
|
+
}
|
|
10918
|
+
};
|
|
10919
|
+
};
|
|
10920
|
+
var resolveVideoConfigWithMetadata = ({
|
|
10837
10921
|
calculateMetadata,
|
|
10838
10922
|
signal,
|
|
10839
10923
|
defaultProps,
|
|
@@ -10853,76 +10937,48 @@ var resolveVideoConfig = ({
|
|
|
10853
10937
|
}) : null;
|
|
10854
10938
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
10855
10939
|
return calculatedProm.then((c2) => {
|
|
10856
|
-
|
|
10857
|
-
height,
|
|
10858
|
-
width,
|
|
10859
|
-
durationInFrames,
|
|
10860
|
-
fps,
|
|
10861
|
-
defaultCodec,
|
|
10862
|
-
defaultOutName,
|
|
10863
|
-
defaultVideoImageFormat,
|
|
10864
|
-
defaultPixelFormat,
|
|
10865
|
-
defaultProResProfile,
|
|
10866
|
-
defaultSampleRate
|
|
10867
|
-
} = validateCalculated({
|
|
10940
|
+
return makeVideoConfigWithMetadata({
|
|
10868
10941
|
calculated: c2,
|
|
10869
10942
|
compositionDurationInFrames,
|
|
10870
10943
|
compositionFps,
|
|
10871
10944
|
compositionHeight,
|
|
10872
10945
|
compositionWidth,
|
|
10873
|
-
compositionId
|
|
10946
|
+
compositionId,
|
|
10947
|
+
defaultProps,
|
|
10948
|
+
originalProps
|
|
10874
10949
|
});
|
|
10875
|
-
return {
|
|
10876
|
-
width,
|
|
10877
|
-
height,
|
|
10878
|
-
fps,
|
|
10879
|
-
durationInFrames,
|
|
10880
|
-
id: compositionId,
|
|
10881
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
10882
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
10883
|
-
defaultCodec: defaultCodec ?? null,
|
|
10884
|
-
defaultOutName: defaultOutName ?? null,
|
|
10885
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
10886
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
10887
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
10888
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
10889
|
-
};
|
|
10890
10950
|
});
|
|
10891
10951
|
}
|
|
10892
|
-
|
|
10952
|
+
return makeVideoConfigWithMetadata({
|
|
10893
10953
|
calculated: calculatedProm,
|
|
10894
10954
|
compositionDurationInFrames,
|
|
10895
10955
|
compositionFps,
|
|
10896
10956
|
compositionHeight,
|
|
10897
10957
|
compositionWidth,
|
|
10898
|
-
compositionId
|
|
10958
|
+
compositionId,
|
|
10959
|
+
defaultProps,
|
|
10960
|
+
originalProps
|
|
10899
10961
|
});
|
|
10900
|
-
|
|
10962
|
+
};
|
|
10963
|
+
var resolveVideoConfig = (params) => {
|
|
10964
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
10965
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
10966
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
10967
|
+
}
|
|
10968
|
+
return resolved.videoConfig;
|
|
10969
|
+
};
|
|
10970
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
10971
|
+
try {
|
|
10901
10972
|
return {
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
defaultPixelFormat: null,
|
|
10910
|
-
defaultProResProfile: null,
|
|
10911
|
-
defaultSampleRate: null
|
|
10973
|
+
type: "success",
|
|
10974
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
10975
|
+
};
|
|
10976
|
+
} catch (err) {
|
|
10977
|
+
return {
|
|
10978
|
+
type: "error",
|
|
10979
|
+
error: err
|
|
10912
10980
|
};
|
|
10913
10981
|
}
|
|
10914
|
-
return {
|
|
10915
|
-
...data,
|
|
10916
|
-
id: compositionId,
|
|
10917
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
10918
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
10919
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
10920
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
10921
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
10922
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
10923
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
10924
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
10925
|
-
};
|
|
10926
10982
|
};
|
|
10927
10983
|
var resolveVideoConfigOrCatch = (params) => {
|
|
10928
10984
|
try {
|
|
@@ -10940,8 +10996,8 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
10940
10996
|
};
|
|
10941
10997
|
|
|
10942
10998
|
// src/sequence-stack-traces.ts
|
|
10943
|
-
import
|
|
10944
|
-
var SequenceStackTracesUpdateContext =
|
|
10999
|
+
import React34 from "react";
|
|
11000
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
10945
11001
|
|
|
10946
11002
|
// src/setup-env-variables.ts
|
|
10947
11003
|
var getEnvVariables = () => {
|
|
@@ -10971,8 +11027,8 @@ var setupEnvVariables = () => {
|
|
|
10971
11027
|
};
|
|
10972
11028
|
|
|
10973
11029
|
// src/use-current-scale.ts
|
|
10974
|
-
import
|
|
10975
|
-
var CurrentScaleContext =
|
|
11030
|
+
import React35, { createContext as createContext25 } from "react";
|
|
11031
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
10976
11032
|
var PreviewSizeContext = createContext25({
|
|
10977
11033
|
setSize: () => {
|
|
10978
11034
|
return;
|
|
@@ -10997,8 +11053,8 @@ var calculateScale = ({
|
|
|
10997
11053
|
return Number(previewSize);
|
|
10998
11054
|
};
|
|
10999
11055
|
var useCurrentScale = (options) => {
|
|
11000
|
-
const hasContext =
|
|
11001
|
-
const zoomContext =
|
|
11056
|
+
const hasContext = React35.useContext(CurrentScaleContext);
|
|
11057
|
+
const zoomContext = React35.useContext(PreviewSizeContext);
|
|
11002
11058
|
const config = useUnsafeVideoConfig();
|
|
11003
11059
|
const env = useRemotionEnvironment();
|
|
11004
11060
|
if (hasContext === null || config === null || zoomContext === null) {
|
|
@@ -11028,8 +11084,8 @@ var useCurrentScale = (options) => {
|
|
|
11028
11084
|
};
|
|
11029
11085
|
|
|
11030
11086
|
// src/use-pixel-density.ts
|
|
11031
|
-
import
|
|
11032
|
-
var PixelDensityContext =
|
|
11087
|
+
import React36, { useContext as useContext35 } from "react";
|
|
11088
|
+
var PixelDensityContext = React36.createContext(null);
|
|
11033
11089
|
var getBrowserPixelDensity = () => {
|
|
11034
11090
|
if (typeof window === "undefined") {
|
|
11035
11091
|
return 1;
|
|
@@ -11283,7 +11339,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11283
11339
|
};
|
|
11284
11340
|
|
|
11285
11341
|
// src/video/VideoForPreview.tsx
|
|
11286
|
-
import
|
|
11342
|
+
import React38, {
|
|
11287
11343
|
forwardRef as forwardRef13,
|
|
11288
11344
|
useCallback as useCallback23,
|
|
11289
11345
|
useContext as useContext37,
|
|
@@ -11356,7 +11412,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11356
11412
|
ref: videoRef
|
|
11357
11413
|
});
|
|
11358
11414
|
}, [context.audioContext]);
|
|
11359
|
-
const effectToUse =
|
|
11415
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
11360
11416
|
effectToUse(() => {
|
|
11361
11417
|
return () => {
|
|
11362
11418
|
requestAnimationFrame(() => {
|
|
@@ -11772,23 +11828,23 @@ var watchStaticFile = (fileName, callback) => {
|
|
|
11772
11828
|
};
|
|
11773
11829
|
|
|
11774
11830
|
// src/wrap-remotion-context.tsx
|
|
11775
|
-
import
|
|
11831
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
11776
11832
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
11777
11833
|
function useRemotionContexts() {
|
|
11778
|
-
const compositionManagerCtx =
|
|
11779
|
-
const timelineContext =
|
|
11780
|
-
const setTimelineContext =
|
|
11781
|
-
const sequenceContext =
|
|
11782
|
-
const nonceContext =
|
|
11783
|
-
const canUseRemotionHooksContext =
|
|
11784
|
-
const preloadContext =
|
|
11785
|
-
const resolveCompositionContext =
|
|
11786
|
-
const renderAssetManagerContext =
|
|
11787
|
-
const sequenceManagerContext =
|
|
11788
|
-
const sequenceManagerRefContext =
|
|
11789
|
-
const visualModePropStatusesRefContext =
|
|
11790
|
-
const bufferManagerContext =
|
|
11791
|
-
const logLevelContext =
|
|
11834
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
11835
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
11836
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
11837
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
11838
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
11839
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
11840
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
11841
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
11842
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
11843
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
11844
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
11845
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
11846
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
11847
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
11792
11848
|
return useMemo37(() => ({
|
|
11793
11849
|
compositionManagerCtx,
|
|
11794
11850
|
timelineContext,
|
|
@@ -11948,6 +12004,7 @@ var Internals = {
|
|
|
11948
12004
|
NonceContext,
|
|
11949
12005
|
resolveVideoConfig,
|
|
11950
12006
|
resolveVideoConfigOrCatch,
|
|
12007
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
11951
12008
|
ResolveCompositionContext,
|
|
11952
12009
|
useResolvedVideoConfig,
|
|
11953
12010
|
resolveCompositionsRef,
|
|
@@ -11964,6 +12021,8 @@ var Internals = {
|
|
|
11964
12021
|
BufferingProvider,
|
|
11965
12022
|
BufferingContextReact,
|
|
11966
12023
|
getComponentsToAddStacksTo,
|
|
12024
|
+
getSequenceComponent,
|
|
12025
|
+
getSingleChildComponent,
|
|
11967
12026
|
CurrentScaleContext,
|
|
11968
12027
|
PixelDensityContext,
|
|
11969
12028
|
PreviewSizeContext,
|
|
@@ -12021,17 +12080,17 @@ var Internals = {
|
|
|
12021
12080
|
fromField
|
|
12022
12081
|
};
|
|
12023
12082
|
// src/series/index.tsx
|
|
12024
|
-
import
|
|
12083
|
+
import React42, {
|
|
12025
12084
|
forwardRef as forwardRef14,
|
|
12026
12085
|
useMemo as useMemo38
|
|
12027
12086
|
} from "react";
|
|
12028
12087
|
|
|
12029
12088
|
// src/series/flatten-children.tsx
|
|
12030
|
-
import
|
|
12089
|
+
import React41 from "react";
|
|
12031
12090
|
var flattenChildren = (children) => {
|
|
12032
|
-
const childrenArray =
|
|
12091
|
+
const childrenArray = React41.Children.toArray(children);
|
|
12033
12092
|
return childrenArray.reduce((flatChildren, child) => {
|
|
12034
|
-
if (child.type ===
|
|
12093
|
+
if (child.type === React41.Fragment) {
|
|
12035
12094
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
12036
12095
|
}
|
|
12037
12096
|
flatChildren.push(child);
|
|
@@ -12122,7 +12181,7 @@ var SeriesInner = (props2) => {
|
|
|
12122
12181
|
index: i,
|
|
12123
12182
|
childrenLength: flattenedChildren.length
|
|
12124
12183
|
});
|
|
12125
|
-
return
|
|
12184
|
+
return React42.cloneElement(castedElement, {
|
|
12126
12185
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
12127
12186
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
12128
12187
|
const {
|
|
@@ -12276,14 +12335,14 @@ var staticFile = (path) => {
|
|
|
12276
12335
|
return preparsed;
|
|
12277
12336
|
};
|
|
12278
12337
|
// src/Still.tsx
|
|
12279
|
-
import
|
|
12338
|
+
import React43 from "react";
|
|
12280
12339
|
var Still = (props2) => {
|
|
12281
12340
|
const newProps = {
|
|
12282
12341
|
...props2,
|
|
12283
12342
|
durationInFrames: 1,
|
|
12284
12343
|
fps: 1
|
|
12285
12344
|
};
|
|
12286
|
-
return
|
|
12345
|
+
return React43.createElement(Composition, newProps);
|
|
12287
12346
|
};
|
|
12288
12347
|
addSequenceStackTraces(Still);
|
|
12289
12348
|
// src/video/html5-video.tsx
|
|
@@ -12790,6 +12849,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
12790
12849
|
});
|
|
12791
12850
|
Sequence.displayName = "Sequence";
|
|
12792
12851
|
addSequenceStackTraces(Sequence);
|
|
12852
|
+
setSequenceComponent(Sequence);
|
|
12793
12853
|
addSequenceStackTraces(Composition);
|
|
12794
12854
|
addSequenceStackTraces(Folder);
|
|
12795
12855
|
export {
|