@remotion/promo-pages 4.0.493 → 4.0.495
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 +505 -362
- package/dist/design.js +294 -227
- package/dist/experts.js +291 -224
- package/dist/homepage/Pricing.js +301 -234
- package/dist/prompts/PromptsGallery.js +294 -227
- package/dist/prompts/PromptsShow.js +318 -251
- package/dist/prompts/PromptsSubmit.js +294 -227
- package/dist/team.js +294 -227
- package/dist/template-modal-content.js +296 -229
- package/dist/templates.js +294 -227
- package/package.json +13 -13
package/dist/experts.js
CHANGED
|
@@ -911,7 +911,7 @@ var experts = [
|
|
|
911
911
|
}
|
|
912
912
|
];
|
|
913
913
|
// src/components/experts/ExpertsPage.tsx
|
|
914
|
-
import { useMemo as
|
|
914
|
+
import { useMemo as useMemo41 } from "react";
|
|
915
915
|
|
|
916
916
|
// ../core/dist/esm/index.mjs
|
|
917
917
|
import { createContext } from "react";
|
|
@@ -945,9 +945,9 @@ import React9 from "react";
|
|
|
945
945
|
import {
|
|
946
946
|
forwardRef as forwardRef3,
|
|
947
947
|
useCallback as useCallback6,
|
|
948
|
-
useContext as
|
|
948
|
+
useContext as useContext18,
|
|
949
949
|
useEffect as useEffect3,
|
|
950
|
-
useMemo as
|
|
950
|
+
useMemo as useMemo15,
|
|
951
951
|
useRef as useRef6,
|
|
952
952
|
useState as useState5
|
|
953
953
|
} from "react";
|
|
@@ -966,13 +966,14 @@ import { useContext as useContext11 } from "react";
|
|
|
966
966
|
import { useContext as useContext13 } from "react";
|
|
967
967
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
968
968
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
969
|
-
import { createContext as createContext14 } from "react";
|
|
970
969
|
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
971
970
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
972
|
-
import React13, { createContext as
|
|
971
|
+
import React13, { createContext as createContext14 } from "react";
|
|
973
972
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
974
|
-
import
|
|
975
|
-
import {
|
|
973
|
+
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
974
|
+
import { createContext as createContext15 } from "react";
|
|
975
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
|
|
976
|
+
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
976
977
|
import { createContext as createContext16 } from "react";
|
|
977
978
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
978
979
|
import {
|
|
@@ -983,70 +984,70 @@ import {
|
|
|
983
984
|
useRef as useRef9,
|
|
984
985
|
useState as useState6
|
|
985
986
|
} from "react";
|
|
986
|
-
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as
|
|
987
|
-
import { useEffect as useEffect4, useMemo as
|
|
987
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
988
|
+
import { useEffect as useEffect4, useMemo as useMemo16, useRef as useRef7 } from "react";
|
|
988
989
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
989
990
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
990
|
-
import { useContext as
|
|
991
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
991
992
|
import {
|
|
992
993
|
createContext as createContext17,
|
|
993
994
|
useCallback as useCallback8,
|
|
994
995
|
useImperativeHandle as useImperativeHandle3,
|
|
995
996
|
useLayoutEffect as useLayoutEffect3,
|
|
996
|
-
useMemo as
|
|
997
|
+
useMemo as useMemo18,
|
|
997
998
|
useRef as useRef10,
|
|
998
999
|
useState as useState7
|
|
999
1000
|
} from "react";
|
|
1000
1001
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1001
|
-
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as
|
|
1002
|
-
import React17, { createContext as createContext18, useMemo as
|
|
1002
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
1003
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
1003
1004
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1004
|
-
import { useContext as
|
|
1005
|
+
import { useContext as useContext20 } from "react";
|
|
1005
1006
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
1006
1007
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1007
|
-
import { createContext as createContext20, useMemo as
|
|
1008
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
1008
1009
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1009
1010
|
import { useCallback as useCallback13 } from "react";
|
|
1010
1011
|
import React23, {
|
|
1011
1012
|
forwardRef as forwardRef5,
|
|
1012
|
-
useContext as
|
|
1013
|
+
useContext as useContext29,
|
|
1013
1014
|
useEffect as useEffect14,
|
|
1014
1015
|
useImperativeHandle as useImperativeHandle4,
|
|
1015
|
-
useMemo as
|
|
1016
|
+
useMemo as useMemo28,
|
|
1016
1017
|
useRef as useRef19,
|
|
1017
1018
|
useState as useState14
|
|
1018
1019
|
} from "react";
|
|
1019
|
-
import { useContext as
|
|
1020
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
1020
1021
|
import React20, {
|
|
1021
1022
|
createContext as createContext21,
|
|
1022
1023
|
createRef as createRef2,
|
|
1023
1024
|
useCallback as useCallback9,
|
|
1024
|
-
useContext as
|
|
1025
|
+
useContext as useContext21,
|
|
1025
1026
|
useEffect as useEffect7,
|
|
1026
|
-
useMemo as
|
|
1027
|
+
useMemo as useMemo22,
|
|
1027
1028
|
useRef as useRef12,
|
|
1028
1029
|
useState as useState10
|
|
1029
1030
|
} from "react";
|
|
1030
|
-
import { useMemo as
|
|
1031
|
+
import { useMemo as useMemo21, useRef as useRef11 } from "react";
|
|
1031
1032
|
import { jsx as jsx19, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1032
1033
|
import { useRef as useRef13 } from "react";
|
|
1033
|
-
import { useContext as
|
|
1034
|
-
import { useContext as
|
|
1034
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState11 } from "react";
|
|
1035
|
+
import { useContext as useContext23 } from "react";
|
|
1035
1036
|
import {
|
|
1036
1037
|
useCallback as useCallback12,
|
|
1037
|
-
useContext as
|
|
1038
|
+
useContext as useContext27,
|
|
1038
1039
|
useEffect as useEffect12,
|
|
1039
1040
|
useLayoutEffect as useLayoutEffect7,
|
|
1040
1041
|
useRef as useRef18
|
|
1041
1042
|
} from "react";
|
|
1042
|
-
import { useCallback as useCallback11, useMemo as
|
|
1043
|
-
import { useContext as
|
|
1043
|
+
import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef16 } from "react";
|
|
1044
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
1044
1045
|
import React21, {
|
|
1045
1046
|
useCallback as useCallback10,
|
|
1046
|
-
useContext as
|
|
1047
|
+
useContext as useContext25,
|
|
1047
1048
|
useEffect as useEffect9,
|
|
1048
1049
|
useLayoutEffect as useLayoutEffect6,
|
|
1049
|
-
useMemo as
|
|
1050
|
+
useMemo as useMemo24,
|
|
1050
1051
|
useRef as useRef15,
|
|
1051
1052
|
useState as useState12
|
|
1052
1053
|
} from "react";
|
|
@@ -1055,15 +1056,15 @@ import React22 from "react";
|
|
|
1055
1056
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
1056
1057
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
1057
1058
|
import { useEffect as useEffect13 } from "react";
|
|
1058
|
-
import { createContext as createContext22, useContext as
|
|
1059
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
1059
1060
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1060
1061
|
import {
|
|
1061
1062
|
forwardRef as forwardRef6,
|
|
1062
|
-
useContext as
|
|
1063
|
+
useContext as useContext30,
|
|
1063
1064
|
useEffect as useEffect15,
|
|
1064
1065
|
useImperativeHandle as useImperativeHandle5,
|
|
1065
1066
|
useLayoutEffect as useLayoutEffect8,
|
|
1066
|
-
useMemo as
|
|
1067
|
+
useMemo as useMemo29,
|
|
1067
1068
|
useRef as useRef20
|
|
1068
1069
|
} from "react";
|
|
1069
1070
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
@@ -1073,7 +1074,7 @@ import {
|
|
|
1073
1074
|
useCallback as useCallback15,
|
|
1074
1075
|
useEffect as useEffect16,
|
|
1075
1076
|
useImperativeHandle as useImperativeHandle6,
|
|
1076
|
-
useMemo as
|
|
1077
|
+
useMemo as useMemo30,
|
|
1077
1078
|
useRef as useRef21,
|
|
1078
1079
|
useState as useState15
|
|
1079
1080
|
} from "react";
|
|
@@ -1082,19 +1083,19 @@ import {
|
|
|
1082
1083
|
createContext as createContext23,
|
|
1083
1084
|
forwardRef as forwardRef9,
|
|
1084
1085
|
useCallback as useCallback16,
|
|
1085
|
-
useContext as
|
|
1086
|
+
useContext as useContext32,
|
|
1086
1087
|
useLayoutEffect as useLayoutEffect9,
|
|
1087
|
-
useMemo as
|
|
1088
|
+
useMemo as useMemo31,
|
|
1088
1089
|
useRef as useRef22
|
|
1089
1090
|
} from "react";
|
|
1090
1091
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1091
1092
|
import {
|
|
1092
1093
|
forwardRef as forwardRef10,
|
|
1093
1094
|
useCallback as useCallback17,
|
|
1094
|
-
useContext as
|
|
1095
|
+
useContext as useContext33,
|
|
1095
1096
|
useImperativeHandle as useImperativeHandle7,
|
|
1096
1097
|
useLayoutEffect as useLayoutEffect10,
|
|
1097
|
-
useMemo as
|
|
1098
|
+
useMemo as useMemo32,
|
|
1098
1099
|
useRef as useRef23,
|
|
1099
1100
|
useState as useState16
|
|
1100
1101
|
} from "react";
|
|
@@ -1103,7 +1104,7 @@ import { forwardRef as forwardRef11, useCallback as useCallback18, useState as u
|
|
|
1103
1104
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1104
1105
|
import {
|
|
1105
1106
|
useCallback as useCallback19,
|
|
1106
|
-
useContext as
|
|
1107
|
+
useContext as useContext34,
|
|
1107
1108
|
useLayoutEffect as useLayoutEffect11,
|
|
1108
1109
|
useRef as useRef24,
|
|
1109
1110
|
useState as useState18
|
|
@@ -1116,59 +1117,59 @@ import React31 from "react";
|
|
|
1116
1117
|
import {
|
|
1117
1118
|
useCallback as useCallback21,
|
|
1118
1119
|
useImperativeHandle as useImperativeHandle8,
|
|
1119
|
-
useMemo as
|
|
1120
|
+
useMemo as useMemo33,
|
|
1120
1121
|
useRef as useRef26,
|
|
1121
1122
|
useState as useState19
|
|
1122
1123
|
} from "react";
|
|
1123
1124
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1124
1125
|
import React32 from "react";
|
|
1125
|
-
import { useMemo as
|
|
1126
|
-
import { createContext as createContext24, useContext as
|
|
1126
|
+
import { useMemo as useMemo35 } from "react";
|
|
1127
|
+
import { createContext as createContext24, useContext as useContext35, useMemo as useMemo34 } from "react";
|
|
1127
1128
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1128
1129
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1129
1130
|
import React34 from "react";
|
|
1130
1131
|
import React35, { createContext as createContext25 } from "react";
|
|
1131
|
-
import React36, { useContext as
|
|
1132
|
+
import React36, { useContext as useContext36 } from "react";
|
|
1132
1133
|
import { useCallback as useCallback24 } from "react";
|
|
1133
1134
|
import {
|
|
1134
1135
|
useCallback as useCallback22,
|
|
1135
|
-
useContext as
|
|
1136
|
+
useContext as useContext37,
|
|
1136
1137
|
useEffect as useEffect17,
|
|
1137
1138
|
useLayoutEffect as useLayoutEffect12,
|
|
1138
|
-
useMemo as
|
|
1139
|
+
useMemo as useMemo36,
|
|
1139
1140
|
useState as useState20
|
|
1140
1141
|
} from "react";
|
|
1141
1142
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1142
1143
|
import React38, {
|
|
1143
1144
|
forwardRef as forwardRef13,
|
|
1144
1145
|
useCallback as useCallback23,
|
|
1145
|
-
useContext as
|
|
1146
|
+
useContext as useContext38,
|
|
1146
1147
|
useEffect as useEffect19,
|
|
1147
1148
|
useImperativeHandle as useImperativeHandle9,
|
|
1148
|
-
useMemo as
|
|
1149
|
+
useMemo as useMemo37,
|
|
1149
1150
|
useRef as useRef27,
|
|
1150
1151
|
useState as useState21
|
|
1151
1152
|
} from "react";
|
|
1152
1153
|
import { useEffect as useEffect18 } from "react";
|
|
1153
1154
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1154
1155
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1155
|
-
import React40, { useMemo as
|
|
1156
|
+
import React40, { useMemo as useMemo38 } from "react";
|
|
1156
1157
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1157
1158
|
import React42, {
|
|
1158
1159
|
forwardRef as forwardRef14,
|
|
1159
|
-
useMemo as
|
|
1160
|
+
useMemo as useMemo39
|
|
1160
1161
|
} from "react";
|
|
1161
1162
|
import React41 from "react";
|
|
1162
1163
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
1163
1164
|
import React43 from "react";
|
|
1164
|
-
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
1165
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext40 } from "react";
|
|
1165
1166
|
import {
|
|
1166
1167
|
forwardRef as forwardRef15,
|
|
1167
|
-
useContext as
|
|
1168
|
+
useContext as useContext39,
|
|
1168
1169
|
useEffect as useEffect20,
|
|
1169
1170
|
useImperativeHandle as useImperativeHandle10,
|
|
1170
1171
|
useLayoutEffect as useLayoutEffect13,
|
|
1171
|
-
useMemo as
|
|
1172
|
+
useMemo as useMemo40,
|
|
1172
1173
|
useRef as useRef28
|
|
1173
1174
|
} from "react";
|
|
1174
1175
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
@@ -2359,7 +2360,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2359
2360
|
}
|
|
2360
2361
|
return child.type;
|
|
2361
2362
|
};
|
|
2362
|
-
var VERSION = "4.0.
|
|
2363
|
+
var VERSION = "4.0.495";
|
|
2363
2364
|
var checkMultipleRemotionVersions = () => {
|
|
2364
2365
|
if (typeof globalThis === "undefined") {
|
|
2365
2366
|
return;
|
|
@@ -2852,15 +2853,19 @@ var premountSchema = {
|
|
|
2852
2853
|
description: "Premount For",
|
|
2853
2854
|
min: 0,
|
|
2854
2855
|
step: 1,
|
|
2855
|
-
hiddenFromList: false
|
|
2856
|
+
hiddenFromList: false,
|
|
2857
|
+
keyframable: false
|
|
2856
2858
|
},
|
|
2857
2859
|
postmountFor: {
|
|
2858
2860
|
type: "number",
|
|
2859
2861
|
default: 0,
|
|
2860
2862
|
min: 0,
|
|
2861
2863
|
step: 1,
|
|
2862
|
-
hiddenFromList: true
|
|
2863
|
-
|
|
2864
|
+
hiddenFromList: true,
|
|
2865
|
+
keyframable: false
|
|
2866
|
+
}
|
|
2867
|
+
};
|
|
2868
|
+
var premountStyleSchema = {
|
|
2864
2869
|
styleWhilePremounted: {
|
|
2865
2870
|
type: "hidden"
|
|
2866
2871
|
},
|
|
@@ -2868,10 +2873,13 @@ var premountSchema = {
|
|
|
2868
2873
|
type: "hidden"
|
|
2869
2874
|
}
|
|
2870
2875
|
};
|
|
2871
|
-
var sequencePremountSchema =
|
|
2876
|
+
var sequencePremountSchema = {
|
|
2877
|
+
...premountSchema,
|
|
2878
|
+
...premountStyleSchema
|
|
2879
|
+
};
|
|
2872
2880
|
var sequenceStyleSchema = {
|
|
2873
2881
|
...transformSchema,
|
|
2874
|
-
...
|
|
2882
|
+
...sequencePremountSchema
|
|
2875
2883
|
};
|
|
2876
2884
|
var hiddenField = {
|
|
2877
2885
|
type: "boolean",
|
|
@@ -2956,9 +2964,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2956
2964
|
default: "none"
|
|
2957
2965
|
}
|
|
2958
2966
|
};
|
|
2959
|
-
var PremountContext = createContext14({
|
|
2960
|
-
premountFramesRemaining: 0
|
|
2961
|
-
});
|
|
2962
2967
|
var SequenceManager = React12.createContext({
|
|
2963
2968
|
registerSequence: () => {
|
|
2964
2969
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -3138,7 +3143,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
3138
3143
|
})
|
|
3139
3144
|
});
|
|
3140
3145
|
};
|
|
3141
|
-
var IsInsideSeriesContext =
|
|
3146
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
3142
3147
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
3143
3148
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
3144
3149
|
value: true,
|
|
@@ -3157,7 +3162,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
3157
3162
|
throw new Error("This component must be inside a <Series /> component.");
|
|
3158
3163
|
}
|
|
3159
3164
|
};
|
|
3165
|
+
var PremountContext = createContext15({
|
|
3166
|
+
premountFramesRemaining: 0
|
|
3167
|
+
});
|
|
3160
3168
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
3169
|
+
var usePremounting = ({
|
|
3170
|
+
from,
|
|
3171
|
+
durationInFrames,
|
|
3172
|
+
premountFor,
|
|
3173
|
+
postmountFor,
|
|
3174
|
+
style,
|
|
3175
|
+
styleWhilePremounted,
|
|
3176
|
+
styleWhilePostmounted,
|
|
3177
|
+
hideWhilePremounted
|
|
3178
|
+
}) => {
|
|
3179
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
3180
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
3181
|
+
const environment = useRemotionEnvironment();
|
|
3182
|
+
const { fps } = useVideoConfig();
|
|
3183
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
3184
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
3185
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
3186
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
3187
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
3188
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
3189
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
3190
|
+
const premountingStyle = useMemo13(() => {
|
|
3191
|
+
if (!isPremountingOrPostmounting) {
|
|
3192
|
+
return style;
|
|
3193
|
+
}
|
|
3194
|
+
return {
|
|
3195
|
+
...style,
|
|
3196
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
3197
|
+
pointerEvents: "none",
|
|
3198
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
3199
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
3200
|
+
};
|
|
3201
|
+
}, [
|
|
3202
|
+
isPremountingOrPostmounting,
|
|
3203
|
+
hideWhilePremounted,
|
|
3204
|
+
postmountingActive,
|
|
3205
|
+
premountingActive,
|
|
3206
|
+
style,
|
|
3207
|
+
styleWhilePostmounted,
|
|
3208
|
+
styleWhilePremounted
|
|
3209
|
+
]);
|
|
3210
|
+
return {
|
|
3211
|
+
effectivePremountFor,
|
|
3212
|
+
effectivePostmountFor,
|
|
3213
|
+
premountingActive,
|
|
3214
|
+
postmountingActive,
|
|
3215
|
+
isPremountingOrPostmounting,
|
|
3216
|
+
freezeFrame,
|
|
3217
|
+
premountingStyle
|
|
3218
|
+
};
|
|
3219
|
+
};
|
|
3161
3220
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
3162
3221
|
for (const key of keysToRemove) {
|
|
3163
3222
|
const parts = key.split(".");
|
|
@@ -4981,10 +5040,10 @@ var useMemoizedEffects = ({
|
|
|
4981
5040
|
overrideId
|
|
4982
5041
|
}) => {
|
|
4983
5042
|
const previousRef = useRef5(null);
|
|
4984
|
-
const { propStatuses } =
|
|
4985
|
-
const { getEffectDragOverrides } =
|
|
5043
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
5044
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
4986
5045
|
const frame = useCurrentFrame();
|
|
4987
|
-
const { overrideIdToNodePathMappings } =
|
|
5046
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4988
5047
|
const previous = previousRef.current;
|
|
4989
5048
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
4990
5049
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -5328,9 +5387,9 @@ var withInteractivitySchema = ({
|
|
|
5328
5387
|
ref
|
|
5329
5388
|
});
|
|
5330
5389
|
}
|
|
5331
|
-
const { propStatuses } =
|
|
5332
|
-
const { getDragOverrides } =
|
|
5333
|
-
const nodePathMapping =
|
|
5390
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
5391
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
5392
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
5334
5393
|
const frame = useCurrentFrame();
|
|
5335
5394
|
if (props.controls) {
|
|
5336
5395
|
return React14.createElement(Component, {
|
|
@@ -5357,8 +5416,8 @@ var withInteractivitySchema = ({
|
|
|
5357
5416
|
key,
|
|
5358
5417
|
props
|
|
5359
5418
|
}));
|
|
5360
|
-
const currentRuntimeValueDotNotation =
|
|
5361
|
-
const controls =
|
|
5419
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
5420
|
+
const controls = useMemo14(() => {
|
|
5362
5421
|
return {
|
|
5363
5422
|
schema: schemaWithSequenceName,
|
|
5364
5423
|
currentRuntimeValueDotNotation,
|
|
@@ -5368,7 +5427,7 @@ var withInteractivitySchema = ({
|
|
|
5368
5427
|
componentName
|
|
5369
5428
|
};
|
|
5370
5429
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5371
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
5430
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
5372
5431
|
return computeEffectiveSchemaValuesDotNotation({
|
|
5373
5432
|
schema: schemaWithSequenceName,
|
|
5374
5433
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -5426,7 +5485,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5426
5485
|
}, ref) => {
|
|
5427
5486
|
const { layout = "absolute-fill" } = other;
|
|
5428
5487
|
const [id] = useState5(() => String(Math.random()));
|
|
5429
|
-
const parentSequence =
|
|
5488
|
+
const parentSequence = useContext18(SequenceContext);
|
|
5430
5489
|
const { rootId } = useTimelineContext();
|
|
5431
5490
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5432
5491
|
const nonce = useNonce();
|
|
@@ -5477,13 +5536,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5477
5536
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
5478
5537
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
5479
5538
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5480
|
-
const { registerSequence, unregisterSequence } =
|
|
5539
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
5481
5540
|
const wrapperRefForOutline = useRef6(null);
|
|
5482
5541
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
5483
|
-
const premounting =
|
|
5542
|
+
const premounting = useMemo15(() => {
|
|
5484
5543
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
5485
5544
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
5486
|
-
const postmounting =
|
|
5545
|
+
const postmounting = useMemo15(() => {
|
|
5487
5546
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
5488
5547
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
5489
5548
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -5491,7 +5550,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5491
5550
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
5492
5551
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
5493
5552
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
5494
|
-
const contextValue =
|
|
5553
|
+
const contextValue = useMemo15(() => {
|
|
5495
5554
|
return {
|
|
5496
5555
|
absoluteFrom,
|
|
5497
5556
|
cumulatedFrom,
|
|
@@ -5522,12 +5581,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5522
5581
|
postmountDisplay,
|
|
5523
5582
|
cumulatedNegativeFrom
|
|
5524
5583
|
]);
|
|
5525
|
-
const timelineClipName =
|
|
5584
|
+
const timelineClipName = useMemo15(() => {
|
|
5526
5585
|
return name ?? "";
|
|
5527
5586
|
}, [name]);
|
|
5528
5587
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
5529
5588
|
const env = useRemotionEnvironment();
|
|
5530
|
-
const isInsideSeries =
|
|
5589
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
5531
5590
|
const inheritedStack = other?.stack ?? null;
|
|
5532
5591
|
const stackRef = useRef6(null);
|
|
5533
5592
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -5675,7 +5734,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5675
5734
|
ref.current = node;
|
|
5676
5735
|
}
|
|
5677
5736
|
}, [ref]);
|
|
5678
|
-
const defaultStyle =
|
|
5737
|
+
const defaultStyle = useMemo15(() => {
|
|
5679
5738
|
return {
|
|
5680
5739
|
flexDirection: undefined,
|
|
5681
5740
|
...width ? { width } : {},
|
|
@@ -5701,8 +5760,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5701
5760
|
};
|
|
5702
5761
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
5703
5762
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
5704
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
5705
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
5706
5763
|
if (props.layout === "none") {
|
|
5707
5764
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
5708
5765
|
}
|
|
@@ -5716,34 +5773,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
5716
5773
|
styleWhilePostmounted,
|
|
5717
5774
|
...otherProps
|
|
5718
5775
|
} = props;
|
|
5719
|
-
const
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
5723
|
-
const isFreezingActive = premountingActive || postmountingActive;
|
|
5724
|
-
const style = useMemo14(() => {
|
|
5725
|
-
return {
|
|
5726
|
-
...passedStyle,
|
|
5727
|
-
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
5728
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
5729
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
5730
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
5731
|
-
};
|
|
5732
|
-
}, [
|
|
5733
|
-
passedStyle,
|
|
5734
|
-
premountingActive,
|
|
5776
|
+
const {
|
|
5777
|
+
freezeFrame,
|
|
5778
|
+
isPremountingOrPostmounting,
|
|
5735
5779
|
postmountingActive,
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5780
|
+
premountingActive,
|
|
5781
|
+
premountingStyle
|
|
5782
|
+
} = usePremounting({
|
|
5783
|
+
from,
|
|
5784
|
+
durationInFrames,
|
|
5785
|
+
premountFor,
|
|
5786
|
+
postmountFor,
|
|
5787
|
+
style: passedStyle ?? null,
|
|
5788
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
5789
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
5790
|
+
hideWhilePremounted: "opacity"
|
|
5791
|
+
});
|
|
5739
5792
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
5740
5793
|
frame: freezeFrame,
|
|
5741
|
-
active:
|
|
5794
|
+
active: isPremountingOrPostmounting,
|
|
5742
5795
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
5743
5796
|
ref,
|
|
5744
5797
|
from,
|
|
5745
5798
|
durationInFrames,
|
|
5746
|
-
style,
|
|
5799
|
+
style: premountingStyle ?? undefined,
|
|
5747
5800
|
_remotionInternalPremountDisplay: premountFor,
|
|
5748
5801
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
5749
5802
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -6079,7 +6132,7 @@ var useEffectChainState = () => {
|
|
|
6079
6132
|
}
|
|
6080
6133
|
};
|
|
6081
6134
|
}, []);
|
|
6082
|
-
return
|
|
6135
|
+
return useMemo16(() => ({
|
|
6083
6136
|
get: (width, height) => {
|
|
6084
6137
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
6085
6138
|
if (chainStateRef.current) {
|
|
@@ -6095,7 +6148,7 @@ var useEffectChainState = () => {
|
|
|
6095
6148
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
6096
6149
|
const canvasRef = useRef8(null);
|
|
6097
6150
|
const chainState = useEffectChainState();
|
|
6098
|
-
const sourceCanvas =
|
|
6151
|
+
const sourceCanvas = useMemo17(() => {
|
|
6099
6152
|
if (typeof document === "undefined") {
|
|
6100
6153
|
return null;
|
|
6101
6154
|
}
|
|
@@ -6302,6 +6355,13 @@ var decodeImage = async ({
|
|
|
6302
6355
|
frameCount: selectedTrack.frameCount
|
|
6303
6356
|
};
|
|
6304
6357
|
};
|
|
6358
|
+
var getCurrentTime = ({
|
|
6359
|
+
frame,
|
|
6360
|
+
playbackRate,
|
|
6361
|
+
fps
|
|
6362
|
+
}) => {
|
|
6363
|
+
return frame * playbackRate / fps;
|
|
6364
|
+
};
|
|
6305
6365
|
var serializeRequestInit = (requestInit) => {
|
|
6306
6366
|
if (!requestInit) {
|
|
6307
6367
|
return null;
|
|
@@ -6369,7 +6429,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6369
6429
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
6370
6430
|
const frame = useCurrentFrame();
|
|
6371
6431
|
const { fps } = useVideoConfig();
|
|
6372
|
-
const currentTime = frame
|
|
6432
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
6373
6433
|
const currentTimeRef = useRef9(currentTime);
|
|
6374
6434
|
currentTimeRef.current = currentTime;
|
|
6375
6435
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -6497,8 +6557,6 @@ var AnimatedImageInner = ({
|
|
|
6497
6557
|
ref,
|
|
6498
6558
|
...sequenceProps
|
|
6499
6559
|
}) => {
|
|
6500
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
6501
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
6502
6560
|
const actualRef = useRef9(null);
|
|
6503
6561
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
6504
6562
|
useImperativeHandle2(ref, () => {
|
|
@@ -6521,7 +6579,7 @@ var AnimatedImageInner = ({
|
|
|
6521
6579
|
};
|
|
6522
6580
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
6523
6581
|
layout: "none",
|
|
6524
|
-
durationInFrames
|
|
6582
|
+
durationInFrames,
|
|
6525
6583
|
name: "<AnimatedImage>",
|
|
6526
6584
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
6527
6585
|
controls,
|
|
@@ -6647,7 +6705,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6647
6705
|
};
|
|
6648
6706
|
}
|
|
6649
6707
|
}, []);
|
|
6650
|
-
const contextValue =
|
|
6708
|
+
const contextValue = useMemo18(() => {
|
|
6651
6709
|
return {
|
|
6652
6710
|
registerRenderAsset,
|
|
6653
6711
|
unregisterRenderAsset,
|
|
@@ -6661,7 +6719,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6661
6719
|
};
|
|
6662
6720
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
6663
6721
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
6664
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
6722
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
6665
6723
|
const env = useRemotionEnvironment();
|
|
6666
6724
|
const frame = useCurrentFrame();
|
|
6667
6725
|
const [id] = useState8(() => {
|
|
@@ -6776,14 +6834,14 @@ var Loop = ({
|
|
|
6776
6834
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
6777
6835
|
const start = iteration * durationInFrames;
|
|
6778
6836
|
const from = Math.min(start, maxFrame);
|
|
6779
|
-
const loopDisplay =
|
|
6837
|
+
const loopDisplay = useMemo19(() => {
|
|
6780
6838
|
return {
|
|
6781
6839
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
6782
6840
|
startOffset: -from,
|
|
6783
6841
|
durationInFrames
|
|
6784
6842
|
};
|
|
6785
6843
|
}, [compDuration, durationInFrames, from, times]);
|
|
6786
|
-
const loopContext =
|
|
6844
|
+
const loopContext = useMemo19(() => {
|
|
6787
6845
|
return {
|
|
6788
6846
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
6789
6847
|
durationInFrames
|
|
@@ -6852,7 +6910,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
6852
6910
|
return src.slice(0, hashIndex);
|
|
6853
6911
|
};
|
|
6854
6912
|
var usePreload = (src) => {
|
|
6855
|
-
const preloads2 =
|
|
6913
|
+
const preloads2 = useContext20(PreloadContext);
|
|
6856
6914
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
6857
6915
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
6858
6916
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -7155,7 +7213,7 @@ var DurationsContext = createContext20({
|
|
|
7155
7213
|
});
|
|
7156
7214
|
var DurationsContextProvider = ({ children }) => {
|
|
7157
7215
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
7158
|
-
const value =
|
|
7216
|
+
const value = useMemo20(() => {
|
|
7159
7217
|
return {
|
|
7160
7218
|
durations,
|
|
7161
7219
|
setDurations
|
|
@@ -7294,7 +7352,7 @@ var useSingletonAudioContext = ({
|
|
|
7294
7352
|
if (sampleRate !== initialSampleRate.current) {
|
|
7295
7353
|
throw new Error(`Changing the AudioContext sample rate dynamically is not supported. The sample rate was initialized with ${initialSampleRate.current} Hz, but ${sampleRate} Hz was passed later.`);
|
|
7296
7354
|
}
|
|
7297
|
-
const context =
|
|
7355
|
+
const context = useMemo21(() => {
|
|
7298
7356
|
if (env.isRendering) {
|
|
7299
7357
|
return null;
|
|
7300
7358
|
}
|
|
@@ -7428,9 +7486,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7428
7486
|
});
|
|
7429
7487
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
7430
7488
|
const isResuming = useRef12(null);
|
|
7431
|
-
const audioSyncAnchor =
|
|
7489
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
7432
7490
|
const audioSyncAnchorListeners = useRef12([]);
|
|
7433
|
-
const audioSyncAnchorEmitter =
|
|
7491
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
7434
7492
|
return {
|
|
7435
7493
|
dispatch: (event) => {
|
|
7436
7494
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -7450,7 +7508,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7450
7508
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
7451
7509
|
nodesToResume.current.delete(node);
|
|
7452
7510
|
}, []);
|
|
7453
|
-
const scheduleAudioNode =
|
|
7511
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
7454
7512
|
return ({
|
|
7455
7513
|
node,
|
|
7456
7514
|
mediaTimestamp,
|
|
@@ -7542,7 +7600,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7542
7600
|
audioContextIsPlayingEventually.current = false;
|
|
7543
7601
|
return ctxAndGain.suspend();
|
|
7544
7602
|
}, [ctxAndGain]);
|
|
7545
|
-
const audioContextValue =
|
|
7603
|
+
const audioContextValue = useMemo22(() => {
|
|
7546
7604
|
return {
|
|
7547
7605
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
7548
7606
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -7579,10 +7637,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7579
7637
|
const logLevel = useLogLevel();
|
|
7580
7638
|
const mountTime = useMountTime();
|
|
7581
7639
|
const env = useRemotionEnvironment();
|
|
7582
|
-
const audioCtx =
|
|
7640
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7583
7641
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
7584
7642
|
const resume = audioCtx?.resume;
|
|
7585
|
-
const refs =
|
|
7643
|
+
const refs = useMemo22(() => {
|
|
7586
7644
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
7587
7645
|
const ref = createRef2();
|
|
7588
7646
|
return {
|
|
@@ -7721,7 +7779,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7721
7779
|
});
|
|
7722
7780
|
resume?.();
|
|
7723
7781
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
7724
|
-
const audioTagsValue =
|
|
7782
|
+
const audioTagsValue = useMemo22(() => {
|
|
7725
7783
|
return {
|
|
7726
7784
|
registerAudio,
|
|
7727
7785
|
unregisterAudio,
|
|
@@ -7736,7 +7794,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7736
7794
|
unregisterAudio,
|
|
7737
7795
|
updateAudio
|
|
7738
7796
|
]);
|
|
7739
|
-
const sharedAudioTagElements =
|
|
7797
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
7740
7798
|
return refs.map(({ id, ref }) => {
|
|
7741
7799
|
return /* @__PURE__ */ jsx19("audio", {
|
|
7742
7800
|
ref,
|
|
@@ -7759,8 +7817,8 @@ var useSharedAudio = ({
|
|
|
7759
7817
|
premounting,
|
|
7760
7818
|
postmounting
|
|
7761
7819
|
}) => {
|
|
7762
|
-
const audioCtx =
|
|
7763
|
-
const tagsCtx =
|
|
7820
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7821
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
7764
7822
|
const [elem] = useState10(() => {
|
|
7765
7823
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
7766
7824
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -7939,7 +7997,7 @@ var useVolume = ({
|
|
|
7939
7997
|
const audioStuffRef = useRef14(null);
|
|
7940
7998
|
const currentVolumeRef = useRef14(volume);
|
|
7941
7999
|
currentVolumeRef.current = volume;
|
|
7942
|
-
const sharedAudioContext =
|
|
8000
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
7943
8001
|
if (!sharedAudioContext) {
|
|
7944
8002
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
7945
8003
|
}
|
|
@@ -8004,7 +8062,7 @@ var useVolume = ({
|
|
|
8004
8062
|
return audioStuffRef;
|
|
8005
8063
|
};
|
|
8006
8064
|
var useMediaStartsAt = () => {
|
|
8007
|
-
const parentSequence =
|
|
8065
|
+
const parentSequence = useContext23(SequenceContext);
|
|
8008
8066
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
8009
8067
|
};
|
|
8010
8068
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -8093,7 +8151,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8093
8151
|
if (!src) {
|
|
8094
8152
|
throw new Error("No src passed");
|
|
8095
8153
|
}
|
|
8096
|
-
const parentSequence =
|
|
8154
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8097
8155
|
const [initialVolume] = useState11(() => volume);
|
|
8098
8156
|
const duration = getTimelineDuration({
|
|
8099
8157
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -8103,7 +8161,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8103
8161
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
8104
8162
|
loop
|
|
8105
8163
|
});
|
|
8106
|
-
const volumes =
|
|
8164
|
+
const volumes = useMemo23(() => {
|
|
8107
8165
|
if (typeof volume === "number") {
|
|
8108
8166
|
return volume;
|
|
8109
8167
|
}
|
|
@@ -8124,7 +8182,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8124
8182
|
const nonce = useNonce();
|
|
8125
8183
|
const { rootId } = useTimelineContext();
|
|
8126
8184
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
8127
|
-
const memoizedResult =
|
|
8185
|
+
const memoizedResult = useMemo23(() => {
|
|
8128
8186
|
return {
|
|
8129
8187
|
volumes,
|
|
8130
8188
|
duration,
|
|
@@ -8165,9 +8223,9 @@ var useMediaInTimeline = ({
|
|
|
8165
8223
|
documentationLink,
|
|
8166
8224
|
refForOutline
|
|
8167
8225
|
}) => {
|
|
8168
|
-
const parentSequence =
|
|
8226
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8169
8227
|
const startsAt = useMediaStartsAt();
|
|
8170
|
-
const { registerSequence, unregisterSequence } =
|
|
8228
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
8171
8229
|
const { durationInFrames } = useVideoConfig();
|
|
8172
8230
|
const mediaStartsAt = useMediaStartsAt();
|
|
8173
8231
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -8332,13 +8390,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8332
8390
|
}
|
|
8333
8391
|
}, [blocks]);
|
|
8334
8392
|
}
|
|
8335
|
-
return
|
|
8393
|
+
return useMemo24(() => {
|
|
8336
8394
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
8337
8395
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
8338
8396
|
};
|
|
8339
8397
|
var BufferingContextReact = React21.createContext(null);
|
|
8340
8398
|
var BufferingProvider = ({ children }) => {
|
|
8341
|
-
const { logLevel, mountTime } =
|
|
8399
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
8342
8400
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
8343
8401
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
8344
8402
|
value: bufferManager,
|
|
@@ -8364,10 +8422,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
8364
8422
|
return isBuffering;
|
|
8365
8423
|
};
|
|
8366
8424
|
var useBufferState = () => {
|
|
8367
|
-
const buffer =
|
|
8425
|
+
const buffer = useContext26(BufferingContextReact);
|
|
8368
8426
|
const logLevel = useLogLevel();
|
|
8369
8427
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
8370
|
-
return
|
|
8428
|
+
return useMemo25(() => ({
|
|
8371
8429
|
delayPlayback: () => {
|
|
8372
8430
|
if (!addBlock) {
|
|
8373
8431
|
throw new Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");
|
|
@@ -8475,7 +8533,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
8475
8533
|
onVariableFpsVideoDetected,
|
|
8476
8534
|
pauseWhenBuffering
|
|
8477
8535
|
]);
|
|
8478
|
-
return
|
|
8536
|
+
return useMemo26(() => {
|
|
8479
8537
|
return {
|
|
8480
8538
|
isBuffering: () => bufferingRef.current,
|
|
8481
8539
|
bufferUntilFirstFrame
|
|
@@ -8849,7 +8907,7 @@ var useMediaPlayback = ({
|
|
|
8849
8907
|
const frame = useCurrentFrame();
|
|
8850
8908
|
const absoluteFrame = useTimelinePosition();
|
|
8851
8909
|
const [playing] = usePlayingState();
|
|
8852
|
-
const buffering =
|
|
8910
|
+
const buffering = useContext27(BufferingContextReact);
|
|
8853
8911
|
const { fps } = useVideoConfig();
|
|
8854
8912
|
const mediaStartsAt = useMediaStartsAt();
|
|
8855
8913
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -9144,16 +9202,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
9144
9202
|
}
|
|
9145
9203
|
});
|
|
9146
9204
|
var useMediaVolumeState = () => {
|
|
9147
|
-
const { mediaVolume } =
|
|
9148
|
-
const { setMediaVolume } =
|
|
9149
|
-
return
|
|
9205
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
9206
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
9207
|
+
return useMemo27(() => {
|
|
9150
9208
|
return [mediaVolume, setMediaVolume];
|
|
9151
9209
|
}, [mediaVolume, setMediaVolume]);
|
|
9152
9210
|
};
|
|
9153
9211
|
var usePlayerMutedState = () => {
|
|
9154
|
-
const { playerMuted } =
|
|
9155
|
-
const { setPlayerMuted } =
|
|
9156
|
-
return
|
|
9212
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
9213
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
9214
|
+
return useMemo27(() => {
|
|
9157
9215
|
return [playerMuted, setPlayerMuted];
|
|
9158
9216
|
}, [playerMuted, setPlayerMuted]);
|
|
9159
9217
|
};
|
|
@@ -9207,7 +9265,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9207
9265
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
9208
9266
|
}
|
|
9209
9267
|
const preloadedSrc = usePreload(src);
|
|
9210
|
-
const sequenceContext =
|
|
9268
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
9211
9269
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
9212
9270
|
const userPreferredVolume = evaluateVolume({
|
|
9213
9271
|
frame: volumePropFrame,
|
|
@@ -9220,7 +9278,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9220
9278
|
requestsVideoFrame: false,
|
|
9221
9279
|
isClientSideRendering: false
|
|
9222
9280
|
});
|
|
9223
|
-
const propsToPass =
|
|
9281
|
+
const propsToPass = useMemo28(() => {
|
|
9224
9282
|
return {
|
|
9225
9283
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
9226
9284
|
src: preloadedSrc,
|
|
@@ -9237,7 +9295,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9237
9295
|
userPreferredVolume,
|
|
9238
9296
|
crossOriginValue
|
|
9239
9297
|
]);
|
|
9240
|
-
const id =
|
|
9298
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
9241
9299
|
src,
|
|
9242
9300
|
sequenceContext?.relativeFrom,
|
|
9243
9301
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9367,10 +9425,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9367
9425
|
const absoluteFrame = useTimelinePosition();
|
|
9368
9426
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9369
9427
|
const frame = useCurrentFrame();
|
|
9370
|
-
const sequenceContext =
|
|
9371
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9428
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
9429
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
9372
9430
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9373
|
-
const id =
|
|
9431
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9374
9432
|
props.src,
|
|
9375
9433
|
sequenceContext?.relativeFrom,
|
|
9376
9434
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9477,7 +9535,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9477
9535
|
};
|
|
9478
9536
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
9479
9537
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
9480
|
-
const audioTagsContext =
|
|
9538
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
9481
9539
|
const propsWithFreeze = props;
|
|
9482
9540
|
const {
|
|
9483
9541
|
startFrom,
|
|
@@ -9501,7 +9559,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
9501
9559
|
if (typeof freeze !== "undefined") {
|
|
9502
9560
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
9503
9561
|
}
|
|
9504
|
-
const { durations, setDurations } =
|
|
9562
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
9505
9563
|
if (typeof props.src !== "string") {
|
|
9506
9564
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
9507
9565
|
}
|
|
@@ -9663,7 +9721,7 @@ var SolidInner = ({
|
|
|
9663
9721
|
effects,
|
|
9664
9722
|
overrideId: overrideId ?? null
|
|
9665
9723
|
});
|
|
9666
|
-
const sourceCanvas =
|
|
9724
|
+
const sourceCanvas = useMemo30(() => {
|
|
9667
9725
|
if (typeof document === "undefined") {
|
|
9668
9726
|
return null;
|
|
9669
9727
|
}
|
|
@@ -9731,7 +9789,7 @@ var SolidInner = ({
|
|
|
9731
9789
|
cancelRender2,
|
|
9732
9790
|
memoizedEffects
|
|
9733
9791
|
]);
|
|
9734
|
-
const canvasStyle =
|
|
9792
|
+
const canvasStyle = useMemo30(() => {
|
|
9735
9793
|
return {
|
|
9736
9794
|
width,
|
|
9737
9795
|
height,
|
|
@@ -9880,7 +9938,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9880
9938
|
controls,
|
|
9881
9939
|
style
|
|
9882
9940
|
}, ref) => {
|
|
9883
|
-
const ancestor =
|
|
9941
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
9884
9942
|
assertHtmlInCanvasDimensions(width, height);
|
|
9885
9943
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
9886
9944
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
@@ -10099,20 +10157,20 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10099
10157
|
continueRender2(handle);
|
|
10100
10158
|
};
|
|
10101
10159
|
}, [width, height, continueRender2, canvasSizeKey]);
|
|
10102
|
-
const innerStyle =
|
|
10160
|
+
const innerStyle = useMemo31(() => {
|
|
10103
10161
|
return {
|
|
10104
10162
|
width,
|
|
10105
10163
|
height
|
|
10106
10164
|
};
|
|
10107
10165
|
}, [width, height]);
|
|
10108
|
-
const canvasStyle =
|
|
10166
|
+
const canvasStyle = useMemo31(() => {
|
|
10109
10167
|
return {
|
|
10110
10168
|
width,
|
|
10111
10169
|
height,
|
|
10112
10170
|
...style ?? {}
|
|
10113
10171
|
};
|
|
10114
10172
|
}, [height, style, width]);
|
|
10115
|
-
const ancestorValue =
|
|
10173
|
+
const ancestorValue = useMemo31(() => {
|
|
10116
10174
|
return {
|
|
10117
10175
|
requestParentPaint: () => {
|
|
10118
10176
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -10149,8 +10207,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10149
10207
|
name,
|
|
10150
10208
|
...sequenceProps
|
|
10151
10209
|
}, ref) => {
|
|
10152
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
10153
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
10154
10210
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
10155
10211
|
const actualRef = useRef22(null);
|
|
10156
10212
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -10162,7 +10218,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
10162
10218
|
}
|
|
10163
10219
|
}, [ref]);
|
|
10164
10220
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
10165
|
-
durationInFrames
|
|
10221
|
+
durationInFrames,
|
|
10166
10222
|
name: name ?? "<HtmlInCanvas>",
|
|
10167
10223
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
10168
10224
|
controls,
|
|
@@ -10328,7 +10384,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10328
10384
|
effects,
|
|
10329
10385
|
overrideId: controls?.overrideId ?? null
|
|
10330
10386
|
});
|
|
10331
|
-
const sequenceContext =
|
|
10387
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
10332
10388
|
const pendingLoadDelayRef = useRef23(null);
|
|
10333
10389
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
10334
10390
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -10345,7 +10401,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10345
10401
|
continueRender2(pending.handle);
|
|
10346
10402
|
pendingLoadDelayRef.current = null;
|
|
10347
10403
|
}, [continueRender2]);
|
|
10348
|
-
const sourceCanvas =
|
|
10404
|
+
const sourceCanvas = useMemo32(() => {
|
|
10349
10405
|
if (typeof document === "undefined") {
|
|
10350
10406
|
return null;
|
|
10351
10407
|
}
|
|
@@ -10667,7 +10723,7 @@ var ImgContent = ({
|
|
|
10667
10723
|
const imageRef = useRef24(null);
|
|
10668
10724
|
const errors = useRef24({});
|
|
10669
10725
|
const { delayPlayback } = useBufferState();
|
|
10670
|
-
const sequenceContext =
|
|
10726
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
10671
10727
|
const [isLoading, setIsLoading] = useState18(false);
|
|
10672
10728
|
const _propsValid = true;
|
|
10673
10729
|
if (!_propsValid) {
|
|
@@ -11016,7 +11072,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
11016
11072
|
};
|
|
11017
11073
|
var interactiveElementSchema = {
|
|
11018
11074
|
...baseSchema,
|
|
11019
|
-
...transformSchema
|
|
11075
|
+
...transformSchema
|
|
11076
|
+
};
|
|
11077
|
+
var interactiveTextElementSchema = {
|
|
11078
|
+
...interactiveElementSchema,
|
|
11020
11079
|
...textSchema,
|
|
11021
11080
|
...textContentSchema
|
|
11022
11081
|
};
|
|
@@ -11032,7 +11091,7 @@ var withSchema = (options) => {
|
|
|
11032
11091
|
addSequenceStackTraces(Wrapped);
|
|
11033
11092
|
return Wrapped;
|
|
11034
11093
|
};
|
|
11035
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
11094
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
11036
11095
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
11037
11096
|
const {
|
|
11038
11097
|
durationInFrames,
|
|
@@ -11078,12 +11137,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
11078
11137
|
packageName: "remotion",
|
|
11079
11138
|
componentName: displayName.slice(1, -1)
|
|
11080
11139
|
}),
|
|
11081
|
-
schema
|
|
11140
|
+
schema,
|
|
11082
11141
|
supportsEffects: false
|
|
11083
11142
|
});
|
|
11084
11143
|
Wrapped.displayName = displayName;
|
|
11085
11144
|
return Wrapped;
|
|
11086
11145
|
};
|
|
11146
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
11147
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
11148
|
+
};
|
|
11149
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
11150
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
11151
|
+
};
|
|
11087
11152
|
var Interactive = {
|
|
11088
11153
|
baseSchema,
|
|
11089
11154
|
transformSchema,
|
|
@@ -11092,41 +11157,41 @@ var Interactive = {
|
|
|
11092
11157
|
sequenceSchema,
|
|
11093
11158
|
withSchema,
|
|
11094
11159
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
11095
|
-
A:
|
|
11096
|
-
Article:
|
|
11097
|
-
Aside:
|
|
11098
|
-
Button:
|
|
11099
|
-
Circle:
|
|
11100
|
-
Code:
|
|
11101
|
-
Div:
|
|
11102
|
-
Ellipse:
|
|
11103
|
-
Em:
|
|
11104
|
-
Footer:
|
|
11105
|
-
G:
|
|
11106
|
-
H1:
|
|
11107
|
-
H2:
|
|
11108
|
-
H3:
|
|
11109
|
-
H4:
|
|
11110
|
-
H5:
|
|
11111
|
-
H6:
|
|
11112
|
-
Header:
|
|
11113
|
-
Label:
|
|
11114
|
-
Li:
|
|
11115
|
-
Line:
|
|
11116
|
-
Main:
|
|
11117
|
-
Nav:
|
|
11118
|
-
Ol:
|
|
11119
|
-
P:
|
|
11120
|
-
Path:
|
|
11121
|
-
Pre:
|
|
11122
|
-
Rect:
|
|
11123
|
-
Section:
|
|
11124
|
-
Small:
|
|
11125
|
-
Span:
|
|
11126
|
-
Strong:
|
|
11127
|
-
Svg:
|
|
11128
|
-
Text:
|
|
11129
|
-
Ul:
|
|
11160
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
11161
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
11162
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
11163
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
11164
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
11165
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
11166
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
11167
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
11168
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
11169
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
11170
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
11171
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
11172
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
11173
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
11174
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
11175
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
11176
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
11177
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
11178
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
11179
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
11180
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
11181
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
11182
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
11183
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
11184
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
11185
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
11186
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
11187
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
11188
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
11189
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
11190
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
11191
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
11192
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
11193
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
11194
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
11130
11195
|
};
|
|
11131
11196
|
var compositionsRef = React31.createRef();
|
|
11132
11197
|
var CompositionManagerProvider = ({
|
|
@@ -11183,7 +11248,7 @@ var CompositionManagerProvider = ({
|
|
|
11183
11248
|
getCompositions: () => currentcompositionsRef.current
|
|
11184
11249
|
};
|
|
11185
11250
|
}, []);
|
|
11186
|
-
const compositionManagerSetters =
|
|
11251
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
11187
11252
|
return {
|
|
11188
11253
|
registerComposition,
|
|
11189
11254
|
unregisterComposition,
|
|
@@ -11199,7 +11264,7 @@ var CompositionManagerProvider = ({
|
|
|
11199
11264
|
unregisterFolder,
|
|
11200
11265
|
onlyRenderComposition
|
|
11201
11266
|
]);
|
|
11202
|
-
const compositionManagerContextValue =
|
|
11267
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
11203
11268
|
return {
|
|
11204
11269
|
compositions,
|
|
11205
11270
|
folders,
|
|
@@ -11297,7 +11362,7 @@ var waitForRoot = (fn) => {
|
|
|
11297
11362
|
};
|
|
11298
11363
|
var MediaEnabledContext = createContext24(null);
|
|
11299
11364
|
var useVideoEnabled = () => {
|
|
11300
|
-
const context =
|
|
11365
|
+
const context = useContext35(MediaEnabledContext);
|
|
11301
11366
|
if (!context) {
|
|
11302
11367
|
return window.remotion_videoEnabled;
|
|
11303
11368
|
}
|
|
@@ -11307,7 +11372,7 @@ var useVideoEnabled = () => {
|
|
|
11307
11372
|
return context.videoEnabled;
|
|
11308
11373
|
};
|
|
11309
11374
|
var useAudioEnabled = () => {
|
|
11310
|
-
const context =
|
|
11375
|
+
const context = useContext35(MediaEnabledContext);
|
|
11311
11376
|
if (!context) {
|
|
11312
11377
|
return window.remotion_audioEnabled;
|
|
11313
11378
|
}
|
|
@@ -11321,7 +11386,7 @@ var MediaEnabledProvider = ({
|
|
|
11321
11386
|
videoEnabled,
|
|
11322
11387
|
audioEnabled
|
|
11323
11388
|
}) => {
|
|
11324
|
-
const value =
|
|
11389
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
11325
11390
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
11326
11391
|
value,
|
|
11327
11392
|
children
|
|
@@ -11337,13 +11402,13 @@ var RemotionRootContexts = ({
|
|
|
11337
11402
|
audioEnabled,
|
|
11338
11403
|
frameState
|
|
11339
11404
|
}) => {
|
|
11340
|
-
const nonceContext =
|
|
11405
|
+
const nonceContext = useMemo35(() => {
|
|
11341
11406
|
let counter = 0;
|
|
11342
11407
|
return {
|
|
11343
11408
|
getNonce: () => counter++
|
|
11344
11409
|
};
|
|
11345
11410
|
}, []);
|
|
11346
|
-
const logging =
|
|
11411
|
+
const logging = useMemo35(() => {
|
|
11347
11412
|
return { logLevel, mountTime: Date.now() };
|
|
11348
11413
|
}, [logLevel]);
|
|
11349
11414
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -11644,13 +11709,13 @@ var OffthreadVideoForRendering = ({
|
|
|
11644
11709
|
const frame = useCurrentFrame();
|
|
11645
11710
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
11646
11711
|
const videoConfig = useUnsafeVideoConfig();
|
|
11647
|
-
const sequenceContext =
|
|
11712
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
11648
11713
|
const mediaStartsAt = useMediaStartsAt();
|
|
11649
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
11714
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
11650
11715
|
if (!src) {
|
|
11651
11716
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
11652
11717
|
}
|
|
11653
|
-
const id =
|
|
11718
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11654
11719
|
src,
|
|
11655
11720
|
sequenceContext?.cumulatedFrom,
|
|
11656
11721
|
sequenceContext?.relativeFrom,
|
|
@@ -11705,14 +11770,14 @@ var OffthreadVideoForRendering = ({
|
|
|
11705
11770
|
sequenceContext?.cumulatedNegativeFrom,
|
|
11706
11771
|
audioStreamIndex
|
|
11707
11772
|
]);
|
|
11708
|
-
const currentTime =
|
|
11773
|
+
const currentTime = useMemo36(() => {
|
|
11709
11774
|
return getExpectedMediaFrameUncorrected({
|
|
11710
11775
|
frame,
|
|
11711
11776
|
playbackRate: playbackRate || 1,
|
|
11712
11777
|
startFrom: -mediaStartsAt
|
|
11713
11778
|
}) / videoConfig.fps;
|
|
11714
11779
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
11715
|
-
const actualSrc =
|
|
11780
|
+
const actualSrc = useMemo36(() => {
|
|
11716
11781
|
return getOffthreadVideoSource({
|
|
11717
11782
|
src,
|
|
11718
11783
|
currentTime,
|
|
@@ -11800,7 +11865,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11800
11865
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
11801
11866
|
}
|
|
11802
11867
|
}, [imageSrc, onError]);
|
|
11803
|
-
const className =
|
|
11868
|
+
const className = useMemo36(() => {
|
|
11804
11869
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
11805
11870
|
}, [props2.className]);
|
|
11806
11871
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -11864,12 +11929,12 @@ class MediaPlaybackError extends Error {
|
|
|
11864
11929
|
}
|
|
11865
11930
|
}
|
|
11866
11931
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
11867
|
-
const context =
|
|
11932
|
+
const context = useContext38(SharedAudioContext);
|
|
11868
11933
|
if (!context) {
|
|
11869
11934
|
throw new Error("SharedAudioContext not found");
|
|
11870
11935
|
}
|
|
11871
11936
|
const videoRef = useRef27(null);
|
|
11872
|
-
const sharedSource =
|
|
11937
|
+
const sharedSource = useMemo37(() => {
|
|
11873
11938
|
if (!context.audioContext) {
|
|
11874
11939
|
return null;
|
|
11875
11940
|
}
|
|
@@ -11921,7 +11986,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11921
11986
|
}
|
|
11922
11987
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
11923
11988
|
const { fps, durationInFrames } = useVideoConfig();
|
|
11924
|
-
const parentSequence =
|
|
11989
|
+
const parentSequence = useContext38(SequenceContext);
|
|
11925
11990
|
const logLevel = useLogLevel();
|
|
11926
11991
|
const mountTime = useMountTime();
|
|
11927
11992
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -12072,7 +12137,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12072
12137
|
current.preload = "auto";
|
|
12073
12138
|
}
|
|
12074
12139
|
}, []);
|
|
12075
|
-
const actualStyle =
|
|
12140
|
+
const actualStyle = useMemo37(() => {
|
|
12076
12141
|
return {
|
|
12077
12142
|
...style
|
|
12078
12143
|
};
|
|
@@ -12268,7 +12333,7 @@ function useRemotionContexts() {
|
|
|
12268
12333
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
12269
12334
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
12270
12335
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
12271
|
-
return
|
|
12336
|
+
return useMemo38(() => ({
|
|
12272
12337
|
compositionManagerCtx,
|
|
12273
12338
|
timelineContext,
|
|
12274
12339
|
setTimelineContext,
|
|
@@ -12379,6 +12444,7 @@ var Internals = {
|
|
|
12379
12444
|
textSchema,
|
|
12380
12445
|
transformSchema,
|
|
12381
12446
|
premountSchema,
|
|
12447
|
+
premountStyleSchema,
|
|
12382
12448
|
flattenActiveSchema,
|
|
12383
12449
|
getFlatSchemaWithAllKeys,
|
|
12384
12450
|
RemotionRootContexts,
|
|
@@ -12392,6 +12458,7 @@ var Internals = {
|
|
|
12392
12458
|
truthy,
|
|
12393
12459
|
SequenceContext,
|
|
12394
12460
|
PremountContext,
|
|
12461
|
+
usePremounting,
|
|
12395
12462
|
useRemotionContexts,
|
|
12396
12463
|
RemotionContextProvider,
|
|
12397
12464
|
CSSUtils: exports_default_css,
|
|
@@ -12567,7 +12634,7 @@ var validateSeriesSequenceProps = ({
|
|
|
12567
12634
|
return offset;
|
|
12568
12635
|
};
|
|
12569
12636
|
var SeriesInner = (props2) => {
|
|
12570
|
-
const childrenValue =
|
|
12637
|
+
const childrenValue = useMemo39(() => {
|
|
12571
12638
|
const flattenedChildren = flattenChildren(props2.children);
|
|
12572
12639
|
const renderChildren = (i, startFrame) => {
|
|
12573
12640
|
if (i === flattenedChildren.length) {
|
|
@@ -12896,14 +12963,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12896
12963
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12897
12964
|
const videoConfig = useUnsafeVideoConfig();
|
|
12898
12965
|
const videoRef = useRef28(null);
|
|
12899
|
-
const sequenceContext =
|
|
12966
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
12900
12967
|
const mediaStartsAt = useMediaStartsAt();
|
|
12901
12968
|
const environment = useRemotionEnvironment();
|
|
12902
12969
|
const logLevel = useLogLevel();
|
|
12903
12970
|
const mountTime = useMountTime();
|
|
12904
12971
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12905
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12906
|
-
const id =
|
|
12972
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
12973
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12907
12974
|
props2.src,
|
|
12908
12975
|
sequenceContext?.cumulatedFrom,
|
|
12909
12976
|
sequenceContext?.relativeFrom,
|
|
@@ -13114,7 +13181,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
13114
13181
|
if (environment.isClientSideRendering) {
|
|
13115
13182
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
13116
13183
|
}
|
|
13117
|
-
const { durations, setDurations } =
|
|
13184
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
13118
13185
|
if (typeof ref === "string") {
|
|
13119
13186
|
throw new Error("string refs are not supported");
|
|
13120
13187
|
}
|
|
@@ -13570,7 +13637,7 @@ var ExpertCard = ({ expert, Link }) => {
|
|
|
13570
13637
|
});
|
|
13571
13638
|
};
|
|
13572
13639
|
var ExpertsPageContent = ({ Link }) => {
|
|
13573
|
-
const expertsInRandomOrder =
|
|
13640
|
+
const expertsInRandomOrder = useMemo41(() => {
|
|
13574
13641
|
if (typeof window === "undefined") {
|
|
13575
13642
|
return [];
|
|
13576
13643
|
}
|