@remotion/promo-pages 4.0.476 → 4.0.478
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/Homepage.js +1012 -599
- package/dist/components/homepage/CommunityStatsItems.js +4 -4
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +611 -220
- package/dist/experts.js +150 -72
- package/dist/homepage/Pricing.js +605 -214
- package/dist/prompts/PromptsGallery.js +607 -216
- package/dist/prompts/PromptsShow.js +611 -220
- package/dist/prompts/PromptsSubmit.js +613 -222
- package/dist/team.js +608 -217
- package/dist/template-modal-content.js +610 -219
- package/dist/templates.js +603 -212
- package/package.json +13 -13
package/dist/experts.js
CHANGED
|
@@ -943,6 +943,7 @@ import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
|
943
943
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
944
944
|
import {
|
|
945
945
|
forwardRef as forwardRef3,
|
|
946
|
+
useCallback as useCallback6,
|
|
946
947
|
useContext as useContext17,
|
|
947
948
|
useEffect as useEffect3,
|
|
948
949
|
useMemo as useMemo14,
|
|
@@ -981,14 +982,14 @@ import {
|
|
|
981
982
|
useRef as useRef9,
|
|
982
983
|
useState as useState6
|
|
983
984
|
} from "react";
|
|
984
|
-
import React15, { useCallback as
|
|
985
|
+
import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
985
986
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
986
987
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
987
988
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
988
989
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
989
990
|
import {
|
|
990
991
|
createContext as createContext17,
|
|
991
|
-
useCallback as
|
|
992
|
+
useCallback as useCallback8,
|
|
992
993
|
useImperativeHandle as useImperativeHandle3,
|
|
993
994
|
useLayoutEffect as useLayoutEffect3,
|
|
994
995
|
useMemo as useMemo17,
|
|
@@ -996,7 +997,7 @@ import {
|
|
|
996
997
|
useState as useState7
|
|
997
998
|
} from "react";
|
|
998
999
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
999
|
-
import { forwardRef as forwardRef7, useCallback as
|
|
1000
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
1000
1001
|
import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
1001
1002
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1002
1003
|
import { useContext as useContext19 } from "react";
|
|
@@ -1004,7 +1005,7 @@ import { createContext as createContext19, useEffect as useEffect6, useState as
|
|
|
1004
1005
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1005
1006
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
1006
1007
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1007
|
-
import { useCallback as
|
|
1008
|
+
import { useCallback as useCallback13 } from "react";
|
|
1008
1009
|
import React22, {
|
|
1009
1010
|
forwardRef as forwardRef5,
|
|
1010
1011
|
useContext as useContext28,
|
|
@@ -1018,7 +1019,7 @@ import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef
|
|
|
1018
1019
|
import React19, {
|
|
1019
1020
|
createContext as createContext21,
|
|
1020
1021
|
createRef as createRef2,
|
|
1021
|
-
useCallback as
|
|
1022
|
+
useCallback as useCallback9,
|
|
1022
1023
|
useContext as useContext20,
|
|
1023
1024
|
useEffect as useEffect7,
|
|
1024
1025
|
useMemo as useMemo21,
|
|
@@ -1031,16 +1032,16 @@ import { useRef as useRef13 } from "react";
|
|
|
1031
1032
|
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo22, useState as useState11 } from "react";
|
|
1032
1033
|
import { useContext as useContext22 } from "react";
|
|
1033
1034
|
import {
|
|
1034
|
-
useCallback as
|
|
1035
|
+
useCallback as useCallback12,
|
|
1035
1036
|
useContext as useContext26,
|
|
1036
1037
|
useEffect as useEffect12,
|
|
1037
1038
|
useLayoutEffect as useLayoutEffect7,
|
|
1038
1039
|
useRef as useRef18
|
|
1039
1040
|
} from "react";
|
|
1040
|
-
import { useCallback as
|
|
1041
|
+
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
1041
1042
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
1042
1043
|
import React20, {
|
|
1043
|
-
useCallback as
|
|
1044
|
+
useCallback as useCallback10,
|
|
1044
1045
|
useContext as useContext24,
|
|
1045
1046
|
useEffect as useEffect9,
|
|
1046
1047
|
useLayoutEffect as useLayoutEffect6,
|
|
@@ -1068,7 +1069,7 @@ import { jsx as jsx222 } from "react/jsx-runtime";
|
|
|
1068
1069
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1069
1070
|
import {
|
|
1070
1071
|
forwardRef as forwardRef8,
|
|
1071
|
-
useCallback as
|
|
1072
|
+
useCallback as useCallback15,
|
|
1072
1073
|
useEffect as useEffect16,
|
|
1073
1074
|
useImperativeHandle as useImperativeHandle6,
|
|
1074
1075
|
useMemo as useMemo29,
|
|
@@ -1079,7 +1080,7 @@ import { jsx as jsx24 } from "react/jsx-runtime";
|
|
|
1079
1080
|
import {
|
|
1080
1081
|
createContext as createContext23,
|
|
1081
1082
|
forwardRef as forwardRef9,
|
|
1082
|
-
useCallback as
|
|
1083
|
+
useCallback as useCallback16,
|
|
1083
1084
|
useContext as useContext31,
|
|
1084
1085
|
useLayoutEffect as useLayoutEffect9,
|
|
1085
1086
|
useMemo as useMemo30,
|
|
@@ -1088,7 +1089,7 @@ import {
|
|
|
1088
1089
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1089
1090
|
import {
|
|
1090
1091
|
forwardRef as forwardRef10,
|
|
1091
|
-
useCallback as
|
|
1092
|
+
useCallback as useCallback17,
|
|
1092
1093
|
useContext as useContext32,
|
|
1093
1094
|
useEffect as useEffect17,
|
|
1094
1095
|
useImperativeHandle as useImperativeHandle7,
|
|
@@ -1097,16 +1098,16 @@ import {
|
|
|
1097
1098
|
useState as useState16
|
|
1098
1099
|
} from "react";
|
|
1099
1100
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1100
|
-
import { forwardRef as forwardRef11, useCallback as
|
|
1101
|
+
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
1101
1102
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1102
|
-
import { useCallback as
|
|
1103
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
|
|
1103
1104
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1104
|
-
import React29, { forwardRef as forwardRef12, useCallback as
|
|
1105
|
+
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1105
1106
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1106
1107
|
import { createRef as createRef3 } from "react";
|
|
1107
1108
|
import React30 from "react";
|
|
1108
1109
|
import {
|
|
1109
|
-
useCallback as
|
|
1110
|
+
useCallback as useCallback21,
|
|
1110
1111
|
useImperativeHandle as useImperativeHandle8,
|
|
1111
1112
|
useMemo as useMemo32,
|
|
1112
1113
|
useRef as useRef26,
|
|
@@ -1121,9 +1122,9 @@ import { jsx as jsx32 } from "react/jsx-runtime";
|
|
|
1121
1122
|
import React33 from "react";
|
|
1122
1123
|
import React34, { createContext as createContext25 } from "react";
|
|
1123
1124
|
import React35, { useContext as useContext35 } from "react";
|
|
1124
|
-
import { useCallback as
|
|
1125
|
+
import { useCallback as useCallback24 } from "react";
|
|
1125
1126
|
import {
|
|
1126
|
-
useCallback as
|
|
1127
|
+
useCallback as useCallback22,
|
|
1127
1128
|
useContext as useContext36,
|
|
1128
1129
|
useEffect as useEffect18,
|
|
1129
1130
|
useLayoutEffect as useLayoutEffect11,
|
|
@@ -1133,7 +1134,7 @@ import {
|
|
|
1133
1134
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1134
1135
|
import React37, {
|
|
1135
1136
|
forwardRef as forwardRef13,
|
|
1136
|
-
useCallback as
|
|
1137
|
+
useCallback as useCallback23,
|
|
1137
1138
|
useContext as useContext37,
|
|
1138
1139
|
useEffect as useEffect20,
|
|
1139
1140
|
useImperativeHandle as useImperativeHandle9,
|
|
@@ -1154,7 +1155,7 @@ import {
|
|
|
1154
1155
|
import React40 from "react";
|
|
1155
1156
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1156
1157
|
import React42 from "react";
|
|
1157
|
-
import { forwardRef as forwardRef16, useCallback as
|
|
1158
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
1158
1159
|
import {
|
|
1159
1160
|
forwardRef as forwardRef15,
|
|
1160
1161
|
useContext as useContext38,
|
|
@@ -2334,7 +2335,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
2334
2335
|
var addSequenceStackTraces = (component) => {
|
|
2335
2336
|
componentsToAddStacksTo.push(component);
|
|
2336
2337
|
};
|
|
2337
|
-
var VERSION = "4.0.
|
|
2338
|
+
var VERSION = "4.0.478";
|
|
2338
2339
|
var checkMultipleRemotionVersions = () => {
|
|
2339
2340
|
if (typeof globalThis === "undefined") {
|
|
2340
2341
|
return;
|
|
@@ -2793,10 +2794,17 @@ var fromField = {
|
|
|
2793
2794
|
step: 1,
|
|
2794
2795
|
hiddenFromList: true
|
|
2795
2796
|
};
|
|
2797
|
+
var freezeField = {
|
|
2798
|
+
type: "number",
|
|
2799
|
+
default: null,
|
|
2800
|
+
step: 1,
|
|
2801
|
+
hiddenFromList: true
|
|
2802
|
+
};
|
|
2796
2803
|
var sequenceSchema = extendSchemaWithSequenceName({
|
|
2797
2804
|
hidden: hiddenField,
|
|
2798
2805
|
showInTimeline: showInTimelineField,
|
|
2799
2806
|
from: fromField,
|
|
2807
|
+
freeze: freezeField,
|
|
2800
2808
|
durationInFrames: durationInFramesField,
|
|
2801
2809
|
layout: {
|
|
2802
2810
|
type: "enum",
|
|
@@ -2811,6 +2819,7 @@ var sequenceSchema = extendSchemaWithSequenceName({
|
|
|
2811
2819
|
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
2812
2820
|
hidden: hiddenField,
|
|
2813
2821
|
showInTimeline: showInTimelineField,
|
|
2822
|
+
freeze: freezeField,
|
|
2814
2823
|
durationInFrames: durationInFramesField,
|
|
2815
2824
|
layout: sequenceSchema.layout
|
|
2816
2825
|
});
|
|
@@ -5002,6 +5011,7 @@ var mergeValues = ({
|
|
|
5002
5011
|
var stackToOverrideMap = {};
|
|
5003
5012
|
var wrapInSchema = ({
|
|
5004
5013
|
Component,
|
|
5014
|
+
componentIdentity,
|
|
5005
5015
|
schema,
|
|
5006
5016
|
supportsEffects
|
|
5007
5017
|
}) => {
|
|
@@ -5048,7 +5058,8 @@ var wrapInSchema = ({
|
|
|
5048
5058
|
schema: schemaWithSequenceName,
|
|
5049
5059
|
currentRuntimeValueDotNotation,
|
|
5050
5060
|
overrideId,
|
|
5051
|
-
supportsEffects
|
|
5061
|
+
supportsEffects,
|
|
5062
|
+
componentIdentity
|
|
5052
5063
|
};
|
|
5053
5064
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5054
5065
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
@@ -5085,6 +5096,7 @@ var wrapInSchema = ({
|
|
|
5085
5096
|
var EMPTY_EFFECTS = [];
|
|
5086
5097
|
var RegularSequenceRefForwardingFunction = ({
|
|
5087
5098
|
from = 0,
|
|
5099
|
+
freeze,
|
|
5088
5100
|
durationInFrames = Infinity,
|
|
5089
5101
|
children,
|
|
5090
5102
|
name,
|
|
@@ -5100,7 +5112,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5100
5112
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
5101
5113
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
5102
5114
|
_remotionInternalIsMedia: isMedia,
|
|
5103
|
-
_remotionInternalRefForOutline:
|
|
5115
|
+
_remotionInternalRefForOutline: passedRefForOutline,
|
|
5104
5116
|
...other
|
|
5105
5117
|
}, ref) => {
|
|
5106
5118
|
const { layout = "absolute-fill" } = other;
|
|
@@ -5128,11 +5140,24 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5128
5140
|
if (!Number.isFinite(from)) {
|
|
5129
5141
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
5130
5142
|
}
|
|
5143
|
+
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
5144
|
+
if (typeof freeze !== "number") {
|
|
5145
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
5146
|
+
}
|
|
5147
|
+
if (Number.isNaN(freeze)) {
|
|
5148
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
|
|
5149
|
+
}
|
|
5150
|
+
if (!Number.isFinite(freeze)) {
|
|
5151
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5131
5154
|
const absoluteFrame = useTimelinePosition();
|
|
5132
5155
|
const videoConfig = useVideoConfig();
|
|
5133
5156
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
5134
5157
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5135
5158
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
5159
|
+
const wrapperRefForOutline = useRef6(null);
|
|
5160
|
+
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
5136
5161
|
const premounting = useMemo14(() => {
|
|
5137
5162
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
5138
5163
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -5184,6 +5209,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5184
5209
|
const inheritedStack = other?.stack ?? null;
|
|
5185
5210
|
const stackRef = useRef6(null);
|
|
5186
5211
|
stackRef.current = stack ?? inheritedStack;
|
|
5212
|
+
const registeredFrozenFrame = typeof freeze === "number" ? freeze : null;
|
|
5213
|
+
const parentCumulatedNegativeFrom = parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
5214
|
+
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
5215
|
+
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
5216
|
+
const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
|
|
5187
5217
|
useEffect3(() => {
|
|
5188
5218
|
if (!env.isStudio) {
|
|
5189
5219
|
return;
|
|
@@ -5209,7 +5239,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5209
5239
|
src: isMedia.src,
|
|
5210
5240
|
getStack: () => stackRef.current,
|
|
5211
5241
|
refForOutline: refForOutline ?? null,
|
|
5212
|
-
isInsideSeries
|
|
5242
|
+
isInsideSeries,
|
|
5243
|
+
frozenFrame: registeredFrozenFrame
|
|
5213
5244
|
});
|
|
5214
5245
|
} else {
|
|
5215
5246
|
registerSequence({
|
|
@@ -5232,10 +5263,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5232
5263
|
showInTimeline,
|
|
5233
5264
|
src: isMedia.data.src,
|
|
5234
5265
|
getStack: () => stackRef.current,
|
|
5235
|
-
startMediaFrom: isMedia.data.startMediaFrom,
|
|
5266
|
+
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
5236
5267
|
volume: isMedia.data.volumes,
|
|
5237
5268
|
refForOutline: refForOutline ?? null,
|
|
5238
|
-
isInsideSeries
|
|
5269
|
+
isInsideSeries,
|
|
5270
|
+
frozenFrame: registeredFrozenFrame,
|
|
5271
|
+
frozenMediaFrame
|
|
5239
5272
|
});
|
|
5240
5273
|
}
|
|
5241
5274
|
return () => {
|
|
@@ -5260,7 +5293,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5260
5293
|
controls: controls ?? null,
|
|
5261
5294
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
5262
5295
|
refForOutline: refForOutline ?? null,
|
|
5263
|
-
isInsideSeries
|
|
5296
|
+
isInsideSeries,
|
|
5297
|
+
frozenFrame: registeredFrozenFrame
|
|
5264
5298
|
});
|
|
5265
5299
|
return () => {
|
|
5266
5300
|
unregisterSequence(id);
|
|
@@ -5287,11 +5321,26 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5287
5321
|
isMedia,
|
|
5288
5322
|
resolvedDocumentationLink,
|
|
5289
5323
|
refForOutline,
|
|
5290
|
-
isInsideSeries
|
|
5324
|
+
isInsideSeries,
|
|
5325
|
+
registeredFrozenFrame,
|
|
5326
|
+
startMediaFrom,
|
|
5327
|
+
frozenMediaFrame
|
|
5291
5328
|
]);
|
|
5292
5329
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
5293
5330
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
5331
|
+
const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
|
|
5332
|
+
frame: freeze,
|
|
5333
|
+
children: content
|
|
5334
|
+
});
|
|
5294
5335
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
5336
|
+
const sequenceRef = useCallback6((node) => {
|
|
5337
|
+
wrapperRefForOutline.current = node;
|
|
5338
|
+
if (typeof ref === "function") {
|
|
5339
|
+
ref(node);
|
|
5340
|
+
} else if (ref) {
|
|
5341
|
+
ref.current = node;
|
|
5342
|
+
}
|
|
5343
|
+
}, [ref]);
|
|
5295
5344
|
const defaultStyle = useMemo14(() => {
|
|
5296
5345
|
return {
|
|
5297
5346
|
flexDirection: undefined,
|
|
@@ -5308,11 +5357,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5308
5357
|
}
|
|
5309
5358
|
return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
5310
5359
|
value: contextValue,
|
|
5311
|
-
children:
|
|
5312
|
-
ref,
|
|
5360
|
+
children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
|
|
5361
|
+
ref: sequenceRef,
|
|
5313
5362
|
style: defaultStyle,
|
|
5314
5363
|
className: other.className,
|
|
5315
|
-
children:
|
|
5364
|
+
children: frozenContent
|
|
5316
5365
|
})
|
|
5317
5366
|
});
|
|
5318
5367
|
};
|
|
@@ -5392,11 +5441,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
5392
5441
|
var SequenceWithoutSchema = SequenceInner;
|
|
5393
5442
|
var Sequence = wrapInSchema({
|
|
5394
5443
|
Component: SequenceInner,
|
|
5444
|
+
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
5395
5445
|
schema: sequenceSchema,
|
|
5396
5446
|
supportsEffects: false
|
|
5397
5447
|
});
|
|
5398
5448
|
var SequenceWithoutFrom = wrapInSchema({
|
|
5399
5449
|
Component: SequenceInner,
|
|
5450
|
+
componentIdentity: null,
|
|
5400
5451
|
schema: sequenceSchemaWithoutFrom,
|
|
5401
5452
|
supportsEffects: false
|
|
5402
5453
|
});
|
|
@@ -5714,7 +5765,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
5714
5765
|
}
|
|
5715
5766
|
return document.createElement("canvas");
|
|
5716
5767
|
}, []);
|
|
5717
|
-
const draw =
|
|
5768
|
+
const draw = useCallback7((imageData) => {
|
|
5718
5769
|
const canvas = canvasRef.current;
|
|
5719
5770
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
5720
5771
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -5935,6 +5986,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
5935
5986
|
var animatedImageSchema = {
|
|
5936
5987
|
durationInFrames: durationInFramesField,
|
|
5937
5988
|
from: fromField,
|
|
5989
|
+
freeze: freezeField,
|
|
5938
5990
|
playbackRate: {
|
|
5939
5991
|
type: "number",
|
|
5940
5992
|
min: 0,
|
|
@@ -6134,6 +6186,7 @@ var AnimatedImageInner = ({
|
|
|
6134
6186
|
};
|
|
6135
6187
|
var AnimatedImage = wrapInSchema({
|
|
6136
6188
|
Component: AnimatedImageInner,
|
|
6189
|
+
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
6137
6190
|
schema: animatedImageSchema,
|
|
6138
6191
|
supportsEffects: true
|
|
6139
6192
|
});
|
|
@@ -6180,7 +6233,7 @@ var RenderAssetManager = createContext17({
|
|
|
6180
6233
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
6181
6234
|
const [renderAssets, setRenderAssets] = useState7([]);
|
|
6182
6235
|
const renderAssetsRef = useRef10([]);
|
|
6183
|
-
const registerRenderAsset =
|
|
6236
|
+
const registerRenderAsset = useCallback8((renderAsset) => {
|
|
6184
6237
|
validateRenderAsset(renderAsset);
|
|
6185
6238
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
6186
6239
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -6197,7 +6250,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6197
6250
|
};
|
|
6198
6251
|
}, []);
|
|
6199
6252
|
}
|
|
6200
|
-
const unregisterRenderAsset =
|
|
6253
|
+
const unregisterRenderAsset = useCallback8((id) => {
|
|
6201
6254
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
6202
6255
|
setRenderAssets(renderAssetsRef.current);
|
|
6203
6256
|
}, []);
|
|
@@ -7002,7 +7055,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7002
7055
|
}, []);
|
|
7003
7056
|
const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
|
|
7004
7057
|
const nodesToResume = useRef12(new Map);
|
|
7005
|
-
const unscheduleAudioNode =
|
|
7058
|
+
const unscheduleAudioNode = useCallback9((node) => {
|
|
7006
7059
|
nodesToResume.current.delete(node);
|
|
7007
7060
|
}, []);
|
|
7008
7061
|
const scheduleAudioNode = useMemo21(() => {
|
|
@@ -7056,7 +7109,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7056
7109
|
};
|
|
7057
7110
|
};
|
|
7058
7111
|
}, [ctxAndGain, logLevel]);
|
|
7059
|
-
const resume =
|
|
7112
|
+
const resume = useCallback9(() => {
|
|
7060
7113
|
if (!ctxAndGain) {
|
|
7061
7114
|
return Promise.resolve();
|
|
7062
7115
|
}
|
|
@@ -7083,10 +7136,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7083
7136
|
});
|
|
7084
7137
|
return resumePromise.catch(() => {});
|
|
7085
7138
|
}, [ctxAndGain, logLevel]);
|
|
7086
|
-
const getIsResumingAudioContext =
|
|
7139
|
+
const getIsResumingAudioContext = useCallback9(() => {
|
|
7087
7140
|
return isResuming.current;
|
|
7088
7141
|
}, []);
|
|
7089
|
-
const suspend =
|
|
7142
|
+
const suspend = useCallback9(() => {
|
|
7090
7143
|
if (!ctxAndGain) {
|
|
7091
7144
|
return Promise.resolve();
|
|
7092
7145
|
}
|
|
@@ -7160,7 +7213,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7160
7213
|
};
|
|
7161
7214
|
}, [refs]);
|
|
7162
7215
|
const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
|
|
7163
|
-
const rerenderAudios =
|
|
7216
|
+
const rerenderAudios = useCallback9(() => {
|
|
7164
7217
|
refs.forEach(({ ref, id }) => {
|
|
7165
7218
|
const data = audios.current?.find((a2) => a2.id === id);
|
|
7166
7219
|
const { current } = ref;
|
|
@@ -7181,7 +7234,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7181
7234
|
});
|
|
7182
7235
|
});
|
|
7183
7236
|
}, [refs]);
|
|
7184
|
-
const registerAudio =
|
|
7237
|
+
const registerAudio = useCallback9((options) => {
|
|
7185
7238
|
const { aud, audioId, premounting, postmounting } = options;
|
|
7186
7239
|
const found = audios.current?.find((a2) => a2.audioId === audioId);
|
|
7187
7240
|
if (found) {
|
|
@@ -7210,7 +7263,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7210
7263
|
rerenderAudios();
|
|
7211
7264
|
return newElem;
|
|
7212
7265
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
7213
|
-
const unregisterAudio =
|
|
7266
|
+
const unregisterAudio = useCallback9((id) => {
|
|
7214
7267
|
const cloned = [...takenAudios.current];
|
|
7215
7268
|
const index = refs.findIndex((r) => r.id === id);
|
|
7216
7269
|
if (index === -1) {
|
|
@@ -7221,7 +7274,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7221
7274
|
audios.current = audios.current?.filter((a2) => a2.id !== id);
|
|
7222
7275
|
rerenderAudios();
|
|
7223
7276
|
}, [refs, rerenderAudios]);
|
|
7224
|
-
const updateAudio =
|
|
7277
|
+
const updateAudio = useCallback9(({
|
|
7225
7278
|
aud,
|
|
7226
7279
|
audioId,
|
|
7227
7280
|
id,
|
|
@@ -7255,7 +7308,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7255
7308
|
rerenderAudios();
|
|
7256
7309
|
}
|
|
7257
7310
|
}, [rerenderAudios]);
|
|
7258
|
-
const playAllAudios =
|
|
7311
|
+
const playAllAudios = useCallback9(() => {
|
|
7259
7312
|
refs.forEach((ref) => {
|
|
7260
7313
|
const audio = audios.current.find((a2) => a2.el === ref.ref);
|
|
7261
7314
|
if (audio?.premounting) {
|
|
@@ -7766,7 +7819,9 @@ var useMediaInTimeline = ({
|
|
|
7766
7819
|
controls: null,
|
|
7767
7820
|
effects: [],
|
|
7768
7821
|
refForOutline,
|
|
7769
|
-
isInsideSeries: false
|
|
7822
|
+
isInsideSeries: false,
|
|
7823
|
+
frozenFrame: null,
|
|
7824
|
+
frozenMediaFrame: null
|
|
7770
7825
|
});
|
|
7771
7826
|
return () => {
|
|
7772
7827
|
unregisterSequence(id);
|
|
@@ -7803,7 +7858,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7803
7858
|
const env = useRemotionEnvironment();
|
|
7804
7859
|
const rendering = env.isRendering;
|
|
7805
7860
|
const buffering = useRef15(false);
|
|
7806
|
-
const addBlock =
|
|
7861
|
+
const addBlock = useCallback10((block) => {
|
|
7807
7862
|
if (rendering) {
|
|
7808
7863
|
return {
|
|
7809
7864
|
unblock: () => {
|
|
@@ -7829,7 +7884,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7829
7884
|
}
|
|
7830
7885
|
};
|
|
7831
7886
|
}, [rendering]);
|
|
7832
|
-
const listenForBuffering =
|
|
7887
|
+
const listenForBuffering = useCallback10((callback) => {
|
|
7833
7888
|
setOnBufferingCallbacks((c2) => [...c2, callback]);
|
|
7834
7889
|
return {
|
|
7835
7890
|
remove: () => {
|
|
@@ -7837,7 +7892,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
7837
7892
|
}
|
|
7838
7893
|
};
|
|
7839
7894
|
}, []);
|
|
7840
|
-
const listenForResume =
|
|
7895
|
+
const listenForResume = useCallback10((callback) => {
|
|
7841
7896
|
setOnResumeCallbacks((c2) => [...c2, callback]);
|
|
7842
7897
|
return {
|
|
7843
7898
|
remove: () => {
|
|
@@ -7951,7 +8006,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
7951
8006
|
}) => {
|
|
7952
8007
|
const bufferingRef = useRef16(false);
|
|
7953
8008
|
const { delayPlayback } = useBufferState();
|
|
7954
|
-
const bufferUntilFirstFrame =
|
|
8009
|
+
const bufferUntilFirstFrame = useCallback11((requestedTime) => {
|
|
7955
8010
|
if (mediaType !== "video") {
|
|
7956
8011
|
return;
|
|
7957
8012
|
}
|
|
@@ -8341,7 +8396,7 @@ var useMediaPlayback = ({
|
|
|
8341
8396
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
8342
8397
|
}
|
|
8343
8398
|
const isVariableFpsVideoMap = useRef18({});
|
|
8344
|
-
const onVariableFpsVideoDetected =
|
|
8399
|
+
const onVariableFpsVideoDetected = useCallback12(() => {
|
|
8345
8400
|
if (!src) {
|
|
8346
8401
|
return;
|
|
8347
8402
|
}
|
|
@@ -8732,7 +8787,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
8732
8787
|
premounting: Boolean(sequenceContext?.premounting),
|
|
8733
8788
|
postmounting: Boolean(sequenceContext?.postmounting)
|
|
8734
8789
|
});
|
|
8735
|
-
const getStack =
|
|
8790
|
+
const getStack = useCallback13(() => {
|
|
8736
8791
|
return _remotionInternalStack ?? null;
|
|
8737
8792
|
}, [_remotionInternalStack]);
|
|
8738
8793
|
useMediaInTimeline({
|
|
@@ -8978,7 +9033,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8978
9033
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
8979
9034
|
}
|
|
8980
9035
|
const preloadedSrc = usePreload(props.src);
|
|
8981
|
-
const onError =
|
|
9036
|
+
const onError = useCallback14((e) => {
|
|
8982
9037
|
console.log(e.currentTarget.error);
|
|
8983
9038
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
8984
9039
|
if (loop) {
|
|
@@ -8992,7 +9047,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
8992
9047
|
console.warn(errMessage);
|
|
8993
9048
|
}
|
|
8994
9049
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
8995
|
-
const onDuration =
|
|
9050
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
8996
9051
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
8997
9052
|
}, [setDurations]);
|
|
8998
9053
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -9084,6 +9139,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
9084
9139
|
var solidSchema = {
|
|
9085
9140
|
durationInFrames: durationInFramesField,
|
|
9086
9141
|
from: fromField,
|
|
9142
|
+
freeze: freezeField,
|
|
9087
9143
|
color: {
|
|
9088
9144
|
type: "color",
|
|
9089
9145
|
default: "transparent",
|
|
@@ -9138,7 +9194,7 @@ var SolidInner = ({
|
|
|
9138
9194
|
return canvas;
|
|
9139
9195
|
}, []);
|
|
9140
9196
|
const chainState = useEffectChainState();
|
|
9141
|
-
const canvasRef =
|
|
9197
|
+
const canvasRef = useCallback15((canvas) => {
|
|
9142
9198
|
setOutputCanvas(canvas);
|
|
9143
9199
|
if (typeof reference === "function") {
|
|
9144
9200
|
reference(canvas);
|
|
@@ -9222,6 +9278,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9222
9278
|
style,
|
|
9223
9279
|
name,
|
|
9224
9280
|
from,
|
|
9281
|
+
freeze,
|
|
9225
9282
|
hidden,
|
|
9226
9283
|
showInTimeline,
|
|
9227
9284
|
pixelDensity,
|
|
@@ -9235,6 +9292,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9235
9292
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
9236
9293
|
layout: "none",
|
|
9237
9294
|
from,
|
|
9295
|
+
freeze,
|
|
9238
9296
|
hidden,
|
|
9239
9297
|
showInTimeline,
|
|
9240
9298
|
_experimentalControls: controls,
|
|
@@ -9259,6 +9317,7 @@ var SolidOuter = forwardRef8(({
|
|
|
9259
9317
|
});
|
|
9260
9318
|
var Solid = wrapInSchema({
|
|
9261
9319
|
Component: SolidOuter,
|
|
9320
|
+
componentIdentity: "dev.remotion.remotion.Solid",
|
|
9262
9321
|
schema: solidSchema,
|
|
9263
9322
|
supportsEffects: true
|
|
9264
9323
|
});
|
|
@@ -9348,7 +9407,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9348
9407
|
const offscreenRef = useRef22(null);
|
|
9349
9408
|
const divRef = useRef22(null);
|
|
9350
9409
|
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
9351
|
-
const setLayoutCanvasRef =
|
|
9410
|
+
const setLayoutCanvasRef = useCallback16((node) => {
|
|
9352
9411
|
canvas2dRef.current = node;
|
|
9353
9412
|
if (typeof ref === "function") {
|
|
9354
9413
|
ref(node);
|
|
@@ -9370,7 +9429,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9370
9429
|
const initializedRef = useRef22(false);
|
|
9371
9430
|
const onInitCleanupRef = useRef22(null);
|
|
9372
9431
|
const unmountedRef = useRef22(false);
|
|
9373
|
-
const onPaintCb =
|
|
9432
|
+
const onPaintCb = useCallback16(async () => {
|
|
9374
9433
|
const element = divRef.current;
|
|
9375
9434
|
if (!element) {
|
|
9376
9435
|
throw new Error("Canvas or scene element not found");
|
|
@@ -9543,7 +9602,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9543
9602
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9544
9603
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9545
9604
|
const actualRef = useRef22(null);
|
|
9546
|
-
const setCanvasRef =
|
|
9605
|
+
const setCanvasRef = useCallback16((node) => {
|
|
9547
9606
|
actualRef.current = node;
|
|
9548
9607
|
if (typeof ref === "function") {
|
|
9549
9608
|
ref(node);
|
|
@@ -9578,11 +9637,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
|
9578
9637
|
var htmlInCanvasSchema = {
|
|
9579
9638
|
durationInFrames: durationInFramesField,
|
|
9580
9639
|
from: fromField,
|
|
9640
|
+
freeze: freezeField,
|
|
9581
9641
|
...sequenceVisualStyleSchema,
|
|
9582
9642
|
hidden: hiddenField
|
|
9583
9643
|
};
|
|
9584
9644
|
var HtmlInCanvasWrapped = wrapInSchema({
|
|
9585
9645
|
Component: HtmlInCanvasInner,
|
|
9646
|
+
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
9586
9647
|
schema: htmlInCanvasSchema,
|
|
9587
9648
|
supportsEffects: true
|
|
9588
9649
|
});
|
|
@@ -9600,6 +9661,7 @@ function truncateSrcForLabel(src) {
|
|
|
9600
9661
|
var canvasImageSchema = {
|
|
9601
9662
|
durationInFrames: durationInFramesField,
|
|
9602
9663
|
from: fromField,
|
|
9664
|
+
freeze: freezeField,
|
|
9603
9665
|
fit: {
|
|
9604
9666
|
type: "enum",
|
|
9605
9667
|
default: "fill",
|
|
@@ -9705,7 +9767,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
9705
9767
|
}
|
|
9706
9768
|
return document.createElement("canvas");
|
|
9707
9769
|
}, []);
|
|
9708
|
-
const canvasRef =
|
|
9770
|
+
const canvasRef = useCallback17((canvas) => {
|
|
9709
9771
|
setOutputCanvas(canvas);
|
|
9710
9772
|
if (refForOutline) {
|
|
9711
9773
|
refForOutline.current = canvas;
|
|
@@ -9852,6 +9914,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9852
9914
|
delayRenderTimeoutInMilliseconds,
|
|
9853
9915
|
durationInFrames,
|
|
9854
9916
|
from,
|
|
9917
|
+
freeze,
|
|
9855
9918
|
hidden,
|
|
9856
9919
|
name,
|
|
9857
9920
|
showInTimeline,
|
|
@@ -9873,6 +9936,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9873
9936
|
layout: "none",
|
|
9874
9937
|
from: from ?? 0,
|
|
9875
9938
|
durationInFrames: durationInFrames ?? Infinity,
|
|
9939
|
+
freeze,
|
|
9876
9940
|
hidden,
|
|
9877
9941
|
showInTimeline: showInTimeline ?? true,
|
|
9878
9942
|
name: name ?? "<CanvasImage>",
|
|
@@ -9905,6 +9969,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
9905
9969
|
});
|
|
9906
9970
|
var CanvasImage = wrapInSchema({
|
|
9907
9971
|
Component: CanvasImageInner,
|
|
9972
|
+
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
9908
9973
|
schema: canvasImageSchema,
|
|
9909
9974
|
supportsEffects: true
|
|
9910
9975
|
});
|
|
@@ -9922,11 +9987,11 @@ var IFrameRefForwarding = ({
|
|
|
9922
9987
|
retries: delayRenderRetries ?? undefined,
|
|
9923
9988
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
9924
9989
|
}));
|
|
9925
|
-
const didLoad =
|
|
9990
|
+
const didLoad = useCallback18((e) => {
|
|
9926
9991
|
continueRender2(handle);
|
|
9927
9992
|
onLoad?.(e);
|
|
9928
9993
|
}, [handle, onLoad, continueRender2]);
|
|
9929
|
-
const didGetError =
|
|
9994
|
+
const didGetError = useCallback18((e) => {
|
|
9930
9995
|
continueRender2(handle);
|
|
9931
9996
|
if (onError) {
|
|
9932
9997
|
onError(e);
|
|
@@ -9968,7 +10033,7 @@ var ImgContent = ({
|
|
|
9968
10033
|
if (!_propsValid) {
|
|
9969
10034
|
throw new Error("typecheck error");
|
|
9970
10035
|
}
|
|
9971
|
-
const imageCallbackRef =
|
|
10036
|
+
const imageCallbackRef = useCallback19((img) => {
|
|
9972
10037
|
imageRef.current = img;
|
|
9973
10038
|
refForOutline.current = img;
|
|
9974
10039
|
if (typeof ref === "function") {
|
|
@@ -9978,7 +10043,7 @@ var ImgContent = ({
|
|
|
9978
10043
|
}
|
|
9979
10044
|
}, [ref, refForOutline]);
|
|
9980
10045
|
const actualSrc = usePreload(src);
|
|
9981
|
-
const retryIn =
|
|
10046
|
+
const retryIn = useCallback19((timeout) => {
|
|
9982
10047
|
if (!imageRef.current) {
|
|
9983
10048
|
return;
|
|
9984
10049
|
}
|
|
@@ -9996,7 +10061,7 @@ var ImgContent = ({
|
|
|
9996
10061
|
}, timeout);
|
|
9997
10062
|
}, []);
|
|
9998
10063
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9999
|
-
const didGetError =
|
|
10064
|
+
const didGetError = useCallback19((e) => {
|
|
10000
10065
|
if (!errors.current) {
|
|
10001
10066
|
return;
|
|
10002
10067
|
}
|
|
@@ -10106,6 +10171,7 @@ var NativeImgInner = ({
|
|
|
10106
10171
|
src,
|
|
10107
10172
|
from,
|
|
10108
10173
|
durationInFrames,
|
|
10174
|
+
freeze,
|
|
10109
10175
|
_experimentalControls: controls,
|
|
10110
10176
|
_remotionInternalRefForOutline: refForOutline,
|
|
10111
10177
|
...props2
|
|
@@ -10117,6 +10183,7 @@ var NativeImgInner = ({
|
|
|
10117
10183
|
layout: "none",
|
|
10118
10184
|
from: from ?? 0,
|
|
10119
10185
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10186
|
+
freeze,
|
|
10120
10187
|
_remotionInternalStack: stack,
|
|
10121
10188
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
10122
10189
|
_remotionInternalIsMedia: { type: "image", src },
|
|
@@ -10136,6 +10203,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
|
|
|
10136
10203
|
var imgSchema = {
|
|
10137
10204
|
durationInFrames: durationInFramesField,
|
|
10138
10205
|
from: fromField,
|
|
10206
|
+
freeze: freezeField,
|
|
10139
10207
|
...sequenceVisualStyleSchema,
|
|
10140
10208
|
hidden: hiddenField
|
|
10141
10209
|
};
|
|
@@ -10191,6 +10259,7 @@ var ImgInner = ({
|
|
|
10191
10259
|
src,
|
|
10192
10260
|
from,
|
|
10193
10261
|
durationInFrames,
|
|
10262
|
+
freeze,
|
|
10194
10263
|
_experimentalControls: controls,
|
|
10195
10264
|
width,
|
|
10196
10265
|
height,
|
|
@@ -10215,6 +10284,7 @@ var ImgInner = ({
|
|
|
10215
10284
|
src,
|
|
10216
10285
|
from,
|
|
10217
10286
|
durationInFrames,
|
|
10287
|
+
freeze,
|
|
10218
10288
|
_experimentalControls: controls,
|
|
10219
10289
|
width,
|
|
10220
10290
|
height,
|
|
@@ -10256,6 +10326,7 @@ var ImgInner = ({
|
|
|
10256
10326
|
delayRenderTimeoutInMilliseconds,
|
|
10257
10327
|
from,
|
|
10258
10328
|
durationInFrames,
|
|
10329
|
+
freeze,
|
|
10259
10330
|
hidden,
|
|
10260
10331
|
name: name ?? "<Img>",
|
|
10261
10332
|
showInTimeline,
|
|
@@ -10268,6 +10339,7 @@ var ImgInner = ({
|
|
|
10268
10339
|
};
|
|
10269
10340
|
var Img = wrapInSchema({
|
|
10270
10341
|
Component: ImgInner,
|
|
10342
|
+
componentIdentity: "dev.remotion.remotion.Img",
|
|
10271
10343
|
schema: imgSchema,
|
|
10272
10344
|
supportsEffects: true
|
|
10273
10345
|
});
|
|
@@ -10275,6 +10347,7 @@ addSequenceStackTraces(Img);
|
|
|
10275
10347
|
var interactiveElementSchema = {
|
|
10276
10348
|
durationInFrames: durationInFramesField,
|
|
10277
10349
|
from: fromField,
|
|
10350
|
+
freeze: freezeField,
|
|
10278
10351
|
...sequenceVisualStyleSchema,
|
|
10279
10352
|
hidden: hiddenField
|
|
10280
10353
|
};
|
|
@@ -10290,6 +10363,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10290
10363
|
const {
|
|
10291
10364
|
durationInFrames,
|
|
10292
10365
|
from,
|
|
10366
|
+
freeze,
|
|
10293
10367
|
hidden,
|
|
10294
10368
|
name,
|
|
10295
10369
|
showInTimeline,
|
|
@@ -10298,7 +10372,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10298
10372
|
...props2
|
|
10299
10373
|
} = propsWithControls;
|
|
10300
10374
|
const refForOutline = useRef25(null);
|
|
10301
|
-
const callbackRef =
|
|
10375
|
+
const callbackRef = useCallback20((element) => {
|
|
10302
10376
|
refForOutline.current = element;
|
|
10303
10377
|
setRef(ref, element);
|
|
10304
10378
|
}, [ref]);
|
|
@@ -10306,6 +10380,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10306
10380
|
layout: "none",
|
|
10307
10381
|
from: from ?? 0,
|
|
10308
10382
|
durationInFrames: durationInFrames ?? Infinity,
|
|
10383
|
+
freeze,
|
|
10309
10384
|
hidden,
|
|
10310
10385
|
name: name ?? displayName,
|
|
10311
10386
|
showInTimeline: showInTimeline ?? true,
|
|
@@ -10322,6 +10397,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
10322
10397
|
Inner.displayName = displayName;
|
|
10323
10398
|
const Wrapped = wrapInSchema({
|
|
10324
10399
|
Component: Inner,
|
|
10400
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
10325
10401
|
schema: interactiveElementSchema,
|
|
10326
10402
|
supportsEffects: false
|
|
10327
10403
|
});
|
|
@@ -10378,14 +10454,14 @@ var CompositionManagerProvider = ({
|
|
|
10378
10454
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
10379
10455
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
10380
10456
|
const currentcompositionsRef = useRef26(compositions);
|
|
10381
|
-
const updateCompositions =
|
|
10457
|
+
const updateCompositions = useCallback21((updateComps) => {
|
|
10382
10458
|
setCompositions((comps) => {
|
|
10383
10459
|
const updated = updateComps(comps);
|
|
10384
10460
|
currentcompositionsRef.current = updated;
|
|
10385
10461
|
return updated;
|
|
10386
10462
|
});
|
|
10387
10463
|
}, []);
|
|
10388
|
-
const registerComposition =
|
|
10464
|
+
const registerComposition = useCallback21((comp) => {
|
|
10389
10465
|
updateCompositions((comps) => {
|
|
10390
10466
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
10391
10467
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -10393,12 +10469,12 @@ var CompositionManagerProvider = ({
|
|
|
10393
10469
|
return [...comps, comp];
|
|
10394
10470
|
});
|
|
10395
10471
|
}, [updateCompositions]);
|
|
10396
|
-
const unregisterComposition =
|
|
10472
|
+
const unregisterComposition = useCallback21((id) => {
|
|
10397
10473
|
setCompositions((comps) => {
|
|
10398
10474
|
return comps.filter((c2) => c2.id !== id);
|
|
10399
10475
|
});
|
|
10400
10476
|
}, []);
|
|
10401
|
-
const registerFolder =
|
|
10477
|
+
const registerFolder = useCallback21((name, parent, nonce, stack) => {
|
|
10402
10478
|
setFolders((prevFolders) => {
|
|
10403
10479
|
return [
|
|
10404
10480
|
...prevFolders,
|
|
@@ -10411,7 +10487,7 @@ var CompositionManagerProvider = ({
|
|
|
10411
10487
|
];
|
|
10412
10488
|
});
|
|
10413
10489
|
}, []);
|
|
10414
|
-
const unregisterFolder =
|
|
10490
|
+
const unregisterFolder = useCallback21((name, parent) => {
|
|
10415
10491
|
setFolders((prevFolders) => {
|
|
10416
10492
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
10417
10493
|
});
|
|
@@ -11050,7 +11126,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11050
11126
|
continueRender2,
|
|
11051
11127
|
delayRender2
|
|
11052
11128
|
]);
|
|
11053
|
-
const onErr =
|
|
11129
|
+
const onErr = useCallback22(() => {
|
|
11054
11130
|
if (onError) {
|
|
11055
11131
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
11056
11132
|
} else {
|
|
@@ -11060,7 +11136,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11060
11136
|
const className = useMemo35(() => {
|
|
11061
11137
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
11062
11138
|
}, [props2.className]);
|
|
11063
|
-
const onImageFrame =
|
|
11139
|
+
const onImageFrame = useCallback22((img) => {
|
|
11064
11140
|
if (onVideoFrame) {
|
|
11065
11141
|
onVideoFrame(img);
|
|
11066
11142
|
}
|
|
@@ -11193,7 +11269,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11193
11269
|
mediaVolume
|
|
11194
11270
|
});
|
|
11195
11271
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
11196
|
-
const getStack =
|
|
11272
|
+
const getStack = useCallback23(() => {
|
|
11197
11273
|
return _remotionInternalStack ?? null;
|
|
11198
11274
|
}, [_remotionInternalStack]);
|
|
11199
11275
|
useMediaInTimeline({
|
|
@@ -11369,7 +11445,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
11369
11445
|
if (environment.isClientSideRendering) {
|
|
11370
11446
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
11371
11447
|
}
|
|
11372
|
-
const onDuration =
|
|
11448
|
+
const onDuration = useCallback24(() => {
|
|
11373
11449
|
return;
|
|
11374
11450
|
}, []);
|
|
11375
11451
|
if (typeof props2.src !== "string") {
|
|
@@ -11748,6 +11824,7 @@ var Internals = {
|
|
|
11748
11824
|
getEffectPropStatusesCtx,
|
|
11749
11825
|
hiddenField,
|
|
11750
11826
|
durationInFramesField,
|
|
11827
|
+
freezeField,
|
|
11751
11828
|
fromField
|
|
11752
11829
|
};
|
|
11753
11830
|
var flattenChildren = (children) => {
|
|
@@ -11833,6 +11910,7 @@ var SeriesInner = (props2) => {
|
|
|
11833
11910
|
};
|
|
11834
11911
|
var Series = Object.assign(wrapInSchema({
|
|
11835
11912
|
Component: SeriesInner,
|
|
11913
|
+
componentIdentity: "dev.remotion.remotion.Series",
|
|
11836
11914
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
11837
11915
|
supportsEffects: false
|
|
11838
11916
|
}), {
|
|
@@ -12297,7 +12375,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
12297
12375
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
12298
12376
|
}
|
|
12299
12377
|
const preloadedSrc = usePreload(props2.src);
|
|
12300
|
-
const onDuration =
|
|
12378
|
+
const onDuration = useCallback25((src, durationInSeconds) => {
|
|
12301
12379
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
12302
12380
|
}, [setDurations]);
|
|
12303
12381
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|