@remotion/promo-pages 4.0.494 → 4.0.496
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 +522 -381
- package/dist/design.js +289 -235
- package/dist/experts.js +286 -232
- package/dist/homepage/Pricing.js +296 -242
- package/dist/prompts/PromptsGallery.js +289 -235
- package/dist/prompts/PromptsShow.js +313 -259
- package/dist/prompts/PromptsSubmit.js +289 -235
- package/dist/team.js +289 -235
- package/dist/template-modal-content.js +291 -237
- package/dist/templates.js +289 -235
- 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";
|
|
@@ -2028,17 +2029,6 @@ var delayRenderInternal = ({
|
|
|
2028
2029
|
scope.remotion_renderReady = false;
|
|
2029
2030
|
return handle;
|
|
2030
2031
|
};
|
|
2031
|
-
var delayRender = (label2, options) => {
|
|
2032
|
-
if (typeof window === "undefined") {
|
|
2033
|
-
return Math.random();
|
|
2034
|
-
}
|
|
2035
|
-
return delayRenderInternal({
|
|
2036
|
-
scope: window,
|
|
2037
|
-
environment: getRemotionEnvironment(),
|
|
2038
|
-
label: label2 ?? null,
|
|
2039
|
-
options: options ?? {}
|
|
2040
|
-
});
|
|
2041
|
-
};
|
|
2042
2032
|
var continueRenderInternal = ({
|
|
2043
2033
|
scope,
|
|
2044
2034
|
handle,
|
|
@@ -2359,7 +2349,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2359
2349
|
}
|
|
2360
2350
|
return child.type;
|
|
2361
2351
|
};
|
|
2362
|
-
var VERSION = "4.0.
|
|
2352
|
+
var VERSION = "4.0.496";
|
|
2363
2353
|
var checkMultipleRemotionVersions = () => {
|
|
2364
2354
|
if (typeof globalThis === "undefined") {
|
|
2365
2355
|
return;
|
|
@@ -2852,15 +2842,19 @@ var premountSchema = {
|
|
|
2852
2842
|
description: "Premount For",
|
|
2853
2843
|
min: 0,
|
|
2854
2844
|
step: 1,
|
|
2855
|
-
hiddenFromList: false
|
|
2845
|
+
hiddenFromList: false,
|
|
2846
|
+
keyframable: false
|
|
2856
2847
|
},
|
|
2857
2848
|
postmountFor: {
|
|
2858
2849
|
type: "number",
|
|
2859
2850
|
default: 0,
|
|
2860
2851
|
min: 0,
|
|
2861
2852
|
step: 1,
|
|
2862
|
-
hiddenFromList: true
|
|
2863
|
-
|
|
2853
|
+
hiddenFromList: true,
|
|
2854
|
+
keyframable: false
|
|
2855
|
+
}
|
|
2856
|
+
};
|
|
2857
|
+
var premountStyleSchema = {
|
|
2864
2858
|
styleWhilePremounted: {
|
|
2865
2859
|
type: "hidden"
|
|
2866
2860
|
},
|
|
@@ -2868,10 +2862,13 @@ var premountSchema = {
|
|
|
2868
2862
|
type: "hidden"
|
|
2869
2863
|
}
|
|
2870
2864
|
};
|
|
2871
|
-
var sequencePremountSchema =
|
|
2865
|
+
var sequencePremountSchema = {
|
|
2866
|
+
...premountSchema,
|
|
2867
|
+
...premountStyleSchema
|
|
2868
|
+
};
|
|
2872
2869
|
var sequenceStyleSchema = {
|
|
2873
2870
|
...transformSchema,
|
|
2874
|
-
...
|
|
2871
|
+
...sequencePremountSchema
|
|
2875
2872
|
};
|
|
2876
2873
|
var hiddenField = {
|
|
2877
2874
|
type: "boolean",
|
|
@@ -2956,9 +2953,6 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2956
2953
|
default: "none"
|
|
2957
2954
|
}
|
|
2958
2955
|
};
|
|
2959
|
-
var PremountContext = createContext14({
|
|
2960
|
-
premountFramesRemaining: 0
|
|
2961
|
-
});
|
|
2962
2956
|
var SequenceManager = React12.createContext({
|
|
2963
2957
|
registerSequence: () => {
|
|
2964
2958
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -3138,7 +3132,7 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
3138
3132
|
})
|
|
3139
3133
|
});
|
|
3140
3134
|
};
|
|
3141
|
-
var IsInsideSeriesContext =
|
|
3135
|
+
var IsInsideSeriesContext = createContext14(false);
|
|
3142
3136
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
3143
3137
|
return /* @__PURE__ */ jsx11(IsInsideSeriesContext.Provider, {
|
|
3144
3138
|
value: true,
|
|
@@ -3157,7 +3151,61 @@ var useRequireToBeInsideSeries = () => {
|
|
|
3157
3151
|
throw new Error("This component must be inside a <Series /> component.");
|
|
3158
3152
|
}
|
|
3159
3153
|
};
|
|
3154
|
+
var PremountContext = createContext15({
|
|
3155
|
+
premountFramesRemaining: 0
|
|
3156
|
+
});
|
|
3160
3157
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
3158
|
+
var usePremounting = ({
|
|
3159
|
+
from,
|
|
3160
|
+
durationInFrames,
|
|
3161
|
+
premountFor,
|
|
3162
|
+
postmountFor,
|
|
3163
|
+
style,
|
|
3164
|
+
styleWhilePremounted,
|
|
3165
|
+
styleWhilePostmounted,
|
|
3166
|
+
hideWhilePremounted
|
|
3167
|
+
}) => {
|
|
3168
|
+
const parentPremountContext = useContext15(PremountContext);
|
|
3169
|
+
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
3170
|
+
const environment = useRemotionEnvironment();
|
|
3171
|
+
const { fps } = useVideoConfig();
|
|
3172
|
+
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? premountFor ?? fps : premountFor ?? 0;
|
|
3173
|
+
const effectivePostmountFor = postmountFor ?? 0;
|
|
3174
|
+
const endThreshold = Math.ceil(from + durationInFrames - 1);
|
|
3175
|
+
const premountingActive = !environment.isRendering && frame < from && frame >= from - effectivePremountFor;
|
|
3176
|
+
const postmountingActive = !environment.isRendering && frame > endThreshold && frame <= endThreshold + effectivePostmountFor;
|
|
3177
|
+
const isPremountingOrPostmounting = premountingActive || postmountingActive;
|
|
3178
|
+
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
3179
|
+
const premountingStyle = useMemo13(() => {
|
|
3180
|
+
if (!isPremountingOrPostmounting) {
|
|
3181
|
+
return style;
|
|
3182
|
+
}
|
|
3183
|
+
return {
|
|
3184
|
+
...style,
|
|
3185
|
+
...hideWhilePremounted === "opacity" ? { opacity: 0 } : { display: "none" },
|
|
3186
|
+
pointerEvents: "none",
|
|
3187
|
+
...premountingActive ? styleWhilePremounted : {},
|
|
3188
|
+
...postmountingActive ? styleWhilePostmounted : {}
|
|
3189
|
+
};
|
|
3190
|
+
}, [
|
|
3191
|
+
isPremountingOrPostmounting,
|
|
3192
|
+
hideWhilePremounted,
|
|
3193
|
+
postmountingActive,
|
|
3194
|
+
premountingActive,
|
|
3195
|
+
style,
|
|
3196
|
+
styleWhilePostmounted,
|
|
3197
|
+
styleWhilePremounted
|
|
3198
|
+
]);
|
|
3199
|
+
return {
|
|
3200
|
+
effectivePremountFor,
|
|
3201
|
+
effectivePostmountFor,
|
|
3202
|
+
premountingActive,
|
|
3203
|
+
postmountingActive,
|
|
3204
|
+
isPremountingOrPostmounting,
|
|
3205
|
+
freezeFrame,
|
|
3206
|
+
premountingStyle
|
|
3207
|
+
};
|
|
3208
|
+
};
|
|
3161
3209
|
var deleteNestedKey = (obj, keysToRemove) => {
|
|
3162
3210
|
for (const key of keysToRemove) {
|
|
3163
3211
|
const parts = key.split(".");
|
|
@@ -4981,10 +5029,10 @@ var useMemoizedEffects = ({
|
|
|
4981
5029
|
overrideId
|
|
4982
5030
|
}) => {
|
|
4983
5031
|
const previousRef = useRef5(null);
|
|
4984
|
-
const { propStatuses } =
|
|
4985
|
-
const { getEffectDragOverrides } =
|
|
5032
|
+
const { propStatuses } = useContext16(VisualModePropStatusesContext);
|
|
5033
|
+
const { getEffectDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
4986
5034
|
const frame = useCurrentFrame();
|
|
4987
|
-
const { overrideIdToNodePathMappings } =
|
|
5035
|
+
const { overrideIdToNodePathMappings } = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
4988
5036
|
const previous = previousRef.current;
|
|
4989
5037
|
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
4990
5038
|
const resolved = effects.map((descriptor, index) => {
|
|
@@ -5328,9 +5376,9 @@ var withInteractivitySchema = ({
|
|
|
5328
5376
|
ref
|
|
5329
5377
|
});
|
|
5330
5378
|
}
|
|
5331
|
-
const { propStatuses } =
|
|
5332
|
-
const { getDragOverrides } =
|
|
5333
|
-
const nodePathMapping =
|
|
5379
|
+
const { propStatuses } = useContext17(VisualModePropStatusesContext);
|
|
5380
|
+
const { getDragOverrides } = useContext17(VisualModeDragOverridesContext);
|
|
5381
|
+
const nodePathMapping = useContext17(OverrideIdsToNodePathsGettersContext);
|
|
5334
5382
|
const frame = useCurrentFrame();
|
|
5335
5383
|
if (props.controls) {
|
|
5336
5384
|
return React14.createElement(Component, {
|
|
@@ -5357,8 +5405,8 @@ var withInteractivitySchema = ({
|
|
|
5357
5405
|
key,
|
|
5358
5406
|
props
|
|
5359
5407
|
}));
|
|
5360
|
-
const currentRuntimeValueDotNotation =
|
|
5361
|
-
const controls =
|
|
5408
|
+
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
|
|
5409
|
+
const controls = useMemo14(() => {
|
|
5362
5410
|
return {
|
|
5363
5411
|
schema: schemaWithSequenceName,
|
|
5364
5412
|
currentRuntimeValueDotNotation,
|
|
@@ -5368,7 +5416,7 @@ var withInteractivitySchema = ({
|
|
|
5368
5416
|
componentName
|
|
5369
5417
|
};
|
|
5370
5418
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5371
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
5419
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
5372
5420
|
return computeEffectiveSchemaValuesDotNotation({
|
|
5373
5421
|
schema: schemaWithSequenceName,
|
|
5374
5422
|
currentValue: currentRuntimeValueDotNotation,
|
|
@@ -5426,7 +5474,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5426
5474
|
}, ref) => {
|
|
5427
5475
|
const { layout = "absolute-fill" } = other;
|
|
5428
5476
|
const [id] = useState5(() => String(Math.random()));
|
|
5429
|
-
const parentSequence =
|
|
5477
|
+
const parentSequence = useContext18(SequenceContext);
|
|
5430
5478
|
const { rootId } = useTimelineContext();
|
|
5431
5479
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
5432
5480
|
const nonce = useNonce();
|
|
@@ -5477,13 +5525,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5477
5525
|
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
|
|
5478
5526
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - effectiveRelativeFrom, durationInFrames) : durationInFrames;
|
|
5479
5527
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
5480
|
-
const { registerSequence, unregisterSequence } =
|
|
5528
|
+
const { registerSequence, unregisterSequence } = useContext18(SequenceManager);
|
|
5481
5529
|
const wrapperRefForOutline = useRef6(null);
|
|
5482
5530
|
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
5483
|
-
const premounting =
|
|
5531
|
+
const premounting = useMemo15(() => {
|
|
5484
5532
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
5485
5533
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
5486
|
-
const postmounting =
|
|
5534
|
+
const postmounting = useMemo15(() => {
|
|
5487
5535
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
5488
5536
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
5489
5537
|
const currentSequenceStart = cumulatedFrom + effectiveRelativeFrom;
|
|
@@ -5491,7 +5539,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5491
5539
|
const parentFirstFrame = parentSequence ? parentSequenceStart - parentSequence.cumulatedNegativeFrom : 0;
|
|
5492
5540
|
const firstFrame = Math.max(0, parentFirstFrame, currentSequenceStart);
|
|
5493
5541
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
5494
|
-
const contextValue =
|
|
5542
|
+
const contextValue = useMemo15(() => {
|
|
5495
5543
|
return {
|
|
5496
5544
|
absoluteFrom,
|
|
5497
5545
|
cumulatedFrom,
|
|
@@ -5522,12 +5570,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5522
5570
|
postmountDisplay,
|
|
5523
5571
|
cumulatedNegativeFrom
|
|
5524
5572
|
]);
|
|
5525
|
-
const timelineClipName =
|
|
5573
|
+
const timelineClipName = useMemo15(() => {
|
|
5526
5574
|
return name ?? "";
|
|
5527
5575
|
}, [name]);
|
|
5528
5576
|
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
5529
5577
|
const env = useRemotionEnvironment();
|
|
5530
|
-
const isInsideSeries =
|
|
5578
|
+
const isInsideSeries = useContext18(IsInsideSeriesContext);
|
|
5531
5579
|
const inheritedStack = other?.stack ?? null;
|
|
5532
5580
|
const stackRef = useRef6(null);
|
|
5533
5581
|
stackRef.current = stack ?? inheritedStack;
|
|
@@ -5675,7 +5723,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5675
5723
|
ref.current = node;
|
|
5676
5724
|
}
|
|
5677
5725
|
}, [ref]);
|
|
5678
|
-
const defaultStyle =
|
|
5726
|
+
const defaultStyle = useMemo15(() => {
|
|
5679
5727
|
return {
|
|
5680
5728
|
flexDirection: undefined,
|
|
5681
5729
|
...width ? { width } : {},
|
|
@@ -5701,8 +5749,6 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5701
5749
|
};
|
|
5702
5750
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
5703
5751
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
5704
|
-
const parentPremountContext = useContext17(PremountContext);
|
|
5705
|
-
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
5706
5752
|
if (props.layout === "none") {
|
|
5707
5753
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
5708
5754
|
}
|
|
@@ -5716,34 +5762,30 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
5716
5762
|
styleWhilePostmounted,
|
|
5717
5763
|
...otherProps
|
|
5718
5764
|
} = 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 : passedStyle?.opacity,
|
|
5728
|
-
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
5729
|
-
...premountingActive ? styleWhilePremounted : {},
|
|
5730
|
-
...postmountingActive ? styleWhilePostmounted : {}
|
|
5731
|
-
};
|
|
5732
|
-
}, [
|
|
5733
|
-
passedStyle,
|
|
5734
|
-
premountingActive,
|
|
5765
|
+
const {
|
|
5766
|
+
freezeFrame,
|
|
5767
|
+
isPremountingOrPostmounting,
|
|
5735
5768
|
postmountingActive,
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5769
|
+
premountingActive,
|
|
5770
|
+
premountingStyle
|
|
5771
|
+
} = usePremounting({
|
|
5772
|
+
from,
|
|
5773
|
+
durationInFrames,
|
|
5774
|
+
premountFor,
|
|
5775
|
+
postmountFor,
|
|
5776
|
+
style: passedStyle ?? null,
|
|
5777
|
+
styleWhilePremounted: styleWhilePremounted ?? null,
|
|
5778
|
+
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
5779
|
+
hideWhilePremounted: "opacity"
|
|
5780
|
+
});
|
|
5739
5781
|
return /* @__PURE__ */ jsx12(Freeze, {
|
|
5740
5782
|
frame: freezeFrame,
|
|
5741
|
-
active:
|
|
5783
|
+
active: isPremountingOrPostmounting,
|
|
5742
5784
|
children: /* @__PURE__ */ jsx12(SequenceInner, {
|
|
5743
5785
|
ref,
|
|
5744
5786
|
from,
|
|
5745
5787
|
durationInFrames,
|
|
5746
|
-
style,
|
|
5788
|
+
style: premountingStyle ?? undefined,
|
|
5747
5789
|
_remotionInternalPremountDisplay: premountFor,
|
|
5748
5790
|
_remotionInternalPostmountDisplay: postmountFor,
|
|
5749
5791
|
_remotionInternalIsPremounting: premountingActive,
|
|
@@ -6079,7 +6121,7 @@ var useEffectChainState = () => {
|
|
|
6079
6121
|
}
|
|
6080
6122
|
};
|
|
6081
6123
|
}, []);
|
|
6082
|
-
return
|
|
6124
|
+
return useMemo16(() => ({
|
|
6083
6125
|
get: (width, height) => {
|
|
6084
6126
|
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
6085
6127
|
if (chainStateRef.current) {
|
|
@@ -6095,7 +6137,7 @@ var useEffectChainState = () => {
|
|
|
6095
6137
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
6096
6138
|
const canvasRef = useRef8(null);
|
|
6097
6139
|
const chainState = useEffectChainState();
|
|
6098
|
-
const sourceCanvas =
|
|
6140
|
+
const sourceCanvas = useMemo17(() => {
|
|
6099
6141
|
if (typeof document === "undefined") {
|
|
6100
6142
|
return null;
|
|
6101
6143
|
}
|
|
@@ -6652,7 +6694,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6652
6694
|
};
|
|
6653
6695
|
}
|
|
6654
6696
|
}, []);
|
|
6655
|
-
const contextValue =
|
|
6697
|
+
const contextValue = useMemo18(() => {
|
|
6656
6698
|
return {
|
|
6657
6699
|
registerRenderAsset,
|
|
6658
6700
|
unregisterRenderAsset,
|
|
@@ -6666,7 +6708,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
6666
6708
|
};
|
|
6667
6709
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
6668
6710
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
6669
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
6711
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
6670
6712
|
const env = useRemotionEnvironment();
|
|
6671
6713
|
const frame = useCurrentFrame();
|
|
6672
6714
|
const [id] = useState8(() => {
|
|
@@ -6781,14 +6823,14 @@ var Loop = ({
|
|
|
6781
6823
|
const iteration = Math.floor(currentFrame / durationInFrames);
|
|
6782
6824
|
const start = iteration * durationInFrames;
|
|
6783
6825
|
const from = Math.min(start, maxFrame);
|
|
6784
|
-
const loopDisplay =
|
|
6826
|
+
const loopDisplay = useMemo19(() => {
|
|
6785
6827
|
return {
|
|
6786
6828
|
numberOfTimes: Math.min(compDuration / durationInFrames, times),
|
|
6787
6829
|
startOffset: -from,
|
|
6788
6830
|
durationInFrames
|
|
6789
6831
|
};
|
|
6790
6832
|
}, [compDuration, durationInFrames, from, times]);
|
|
6791
|
-
const loopContext =
|
|
6833
|
+
const loopContext = useMemo19(() => {
|
|
6792
6834
|
return {
|
|
6793
6835
|
iteration: Math.floor(currentFrame / durationInFrames),
|
|
6794
6836
|
durationInFrames
|
|
@@ -6857,7 +6899,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
6857
6899
|
return src.slice(0, hashIndex);
|
|
6858
6900
|
};
|
|
6859
6901
|
var usePreload = (src) => {
|
|
6860
|
-
const preloads2 =
|
|
6902
|
+
const preloads2 = useContext20(PreloadContext);
|
|
6861
6903
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
6862
6904
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
6863
6905
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -7160,7 +7202,7 @@ var DurationsContext = createContext20({
|
|
|
7160
7202
|
});
|
|
7161
7203
|
var DurationsContextProvider = ({ children }) => {
|
|
7162
7204
|
const [durations, setDurations] = useReducer(durationReducer, {});
|
|
7163
|
-
const value =
|
|
7205
|
+
const value = useMemo20(() => {
|
|
7164
7206
|
return {
|
|
7165
7207
|
durations,
|
|
7166
7208
|
setDurations
|
|
@@ -7299,7 +7341,7 @@ var useSingletonAudioContext = ({
|
|
|
7299
7341
|
if (sampleRate !== initialSampleRate.current) {
|
|
7300
7342
|
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.`);
|
|
7301
7343
|
}
|
|
7302
|
-
const context =
|
|
7344
|
+
const context = useMemo21(() => {
|
|
7303
7345
|
if (env.isRendering) {
|
|
7304
7346
|
return null;
|
|
7305
7347
|
}
|
|
@@ -7433,9 +7475,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7433
7475
|
});
|
|
7434
7476
|
const audioContextIsPlayingEventually = useRef12(false);
|
|
7435
7477
|
const isResuming = useRef12(null);
|
|
7436
|
-
const audioSyncAnchor =
|
|
7478
|
+
const audioSyncAnchor = useMemo22(() => ({ value: 0 }), []);
|
|
7437
7479
|
const audioSyncAnchorListeners = useRef12([]);
|
|
7438
|
-
const audioSyncAnchorEmitter =
|
|
7480
|
+
const audioSyncAnchorEmitter = useMemo22(() => {
|
|
7439
7481
|
return {
|
|
7440
7482
|
dispatch: (event) => {
|
|
7441
7483
|
audioSyncAnchorListeners.current.forEach((l) => l(event));
|
|
@@ -7455,7 +7497,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7455
7497
|
const unscheduleAudioNode = useCallback9((node) => {
|
|
7456
7498
|
nodesToResume.current.delete(node);
|
|
7457
7499
|
}, []);
|
|
7458
|
-
const scheduleAudioNode =
|
|
7500
|
+
const scheduleAudioNode = useMemo22(() => {
|
|
7459
7501
|
return ({
|
|
7460
7502
|
node,
|
|
7461
7503
|
mediaTimestamp,
|
|
@@ -7547,7 +7589,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
7547
7589
|
audioContextIsPlayingEventually.current = false;
|
|
7548
7590
|
return ctxAndGain.suspend();
|
|
7549
7591
|
}, [ctxAndGain]);
|
|
7550
|
-
const audioContextValue =
|
|
7592
|
+
const audioContextValue = useMemo22(() => {
|
|
7551
7593
|
return {
|
|
7552
7594
|
audioContext: ctxAndGain?.audioContext ?? null,
|
|
7553
7595
|
getAudioContextState: () => ctxAndGain?.getState() ?? null,
|
|
@@ -7584,10 +7626,10 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7584
7626
|
const logLevel = useLogLevel();
|
|
7585
7627
|
const mountTime = useMountTime();
|
|
7586
7628
|
const env = useRemotionEnvironment();
|
|
7587
|
-
const audioCtx =
|
|
7629
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7588
7630
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
7589
7631
|
const resume = audioCtx?.resume;
|
|
7590
|
-
const refs =
|
|
7632
|
+
const refs = useMemo22(() => {
|
|
7591
7633
|
return new Array(numberOfAudioTags).fill(true).map(() => {
|
|
7592
7634
|
const ref = createRef2();
|
|
7593
7635
|
return {
|
|
@@ -7726,7 +7768,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7726
7768
|
});
|
|
7727
7769
|
resume?.();
|
|
7728
7770
|
}, [logLevel, mountTime, refs, env.isPlayer, resume]);
|
|
7729
|
-
const audioTagsValue =
|
|
7771
|
+
const audioTagsValue = useMemo22(() => {
|
|
7730
7772
|
return {
|
|
7731
7773
|
registerAudio,
|
|
7732
7774
|
unregisterAudio,
|
|
@@ -7741,7 +7783,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7741
7783
|
unregisterAudio,
|
|
7742
7784
|
updateAudio
|
|
7743
7785
|
]);
|
|
7744
|
-
const sharedAudioTagElements =
|
|
7786
|
+
const sharedAudioTagElements = useMemo22(() => {
|
|
7745
7787
|
return refs.map(({ id, ref }) => {
|
|
7746
7788
|
return /* @__PURE__ */ jsx19("audio", {
|
|
7747
7789
|
ref,
|
|
@@ -7764,8 +7806,8 @@ var useSharedAudio = ({
|
|
|
7764
7806
|
premounting,
|
|
7765
7807
|
postmounting
|
|
7766
7808
|
}) => {
|
|
7767
|
-
const audioCtx =
|
|
7768
|
-
const tagsCtx =
|
|
7809
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
7810
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
7769
7811
|
const [elem] = useState10(() => {
|
|
7770
7812
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
7771
7813
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -7944,7 +7986,7 @@ var useVolume = ({
|
|
|
7944
7986
|
const audioStuffRef = useRef14(null);
|
|
7945
7987
|
const currentVolumeRef = useRef14(volume);
|
|
7946
7988
|
currentVolumeRef.current = volume;
|
|
7947
|
-
const sharedAudioContext =
|
|
7989
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
7948
7990
|
if (!sharedAudioContext) {
|
|
7949
7991
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
7950
7992
|
}
|
|
@@ -8009,7 +8051,7 @@ var useVolume = ({
|
|
|
8009
8051
|
return audioStuffRef;
|
|
8010
8052
|
};
|
|
8011
8053
|
var useMediaStartsAt = () => {
|
|
8012
|
-
const parentSequence =
|
|
8054
|
+
const parentSequence = useContext23(SequenceContext);
|
|
8013
8055
|
return parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
8014
8056
|
};
|
|
8015
8057
|
var useFrameForVolumeProp = (behavior) => {
|
|
@@ -8098,7 +8140,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8098
8140
|
if (!src) {
|
|
8099
8141
|
throw new Error("No src passed");
|
|
8100
8142
|
}
|
|
8101
|
-
const parentSequence =
|
|
8143
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8102
8144
|
const [initialVolume] = useState11(() => volume);
|
|
8103
8145
|
const duration = getTimelineDuration({
|
|
8104
8146
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -8108,7 +8150,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8108
8150
|
parentSequenceDurationInFrames: parentSequence?.durationInFrames ?? null,
|
|
8109
8151
|
loop
|
|
8110
8152
|
});
|
|
8111
|
-
const volumes =
|
|
8153
|
+
const volumes = useMemo23(() => {
|
|
8112
8154
|
if (typeof volume === "number") {
|
|
8113
8155
|
return volume;
|
|
8114
8156
|
}
|
|
@@ -8129,7 +8171,7 @@ var useBasicMediaInTimeline = ({
|
|
|
8129
8171
|
const nonce = useNonce();
|
|
8130
8172
|
const { rootId } = useTimelineContext();
|
|
8131
8173
|
const startMediaFrom = 0 - mediaStartsAt + (trimBefore ?? 0);
|
|
8132
|
-
const memoizedResult =
|
|
8174
|
+
const memoizedResult = useMemo23(() => {
|
|
8133
8175
|
return {
|
|
8134
8176
|
volumes,
|
|
8135
8177
|
duration,
|
|
@@ -8170,9 +8212,9 @@ var useMediaInTimeline = ({
|
|
|
8170
8212
|
documentationLink,
|
|
8171
8213
|
refForOutline
|
|
8172
8214
|
}) => {
|
|
8173
|
-
const parentSequence =
|
|
8215
|
+
const parentSequence = useContext24(SequenceContext);
|
|
8174
8216
|
const startsAt = useMediaStartsAt();
|
|
8175
|
-
const { registerSequence, unregisterSequence } =
|
|
8217
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
8176
8218
|
const { durationInFrames } = useVideoConfig();
|
|
8177
8219
|
const mediaStartsAt = useMediaStartsAt();
|
|
8178
8220
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -8337,13 +8379,13 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8337
8379
|
}
|
|
8338
8380
|
}, [blocks]);
|
|
8339
8381
|
}
|
|
8340
|
-
return
|
|
8382
|
+
return useMemo24(() => {
|
|
8341
8383
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
8342
8384
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
8343
8385
|
};
|
|
8344
8386
|
var BufferingContextReact = React21.createContext(null);
|
|
8345
8387
|
var BufferingProvider = ({ children }) => {
|
|
8346
|
-
const { logLevel, mountTime } =
|
|
8388
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
8347
8389
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
8348
8390
|
return /* @__PURE__ */ jsx20(BufferingContextReact.Provider, {
|
|
8349
8391
|
value: bufferManager,
|
|
@@ -8369,10 +8411,10 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
8369
8411
|
return isBuffering;
|
|
8370
8412
|
};
|
|
8371
8413
|
var useBufferState = () => {
|
|
8372
|
-
const buffer =
|
|
8414
|
+
const buffer = useContext26(BufferingContextReact);
|
|
8373
8415
|
const logLevel = useLogLevel();
|
|
8374
8416
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
8375
|
-
return
|
|
8417
|
+
return useMemo25(() => ({
|
|
8376
8418
|
delayPlayback: () => {
|
|
8377
8419
|
if (!addBlock) {
|
|
8378
8420
|
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");
|
|
@@ -8480,7 +8522,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
8480
8522
|
onVariableFpsVideoDetected,
|
|
8481
8523
|
pauseWhenBuffering
|
|
8482
8524
|
]);
|
|
8483
|
-
return
|
|
8525
|
+
return useMemo26(() => {
|
|
8484
8526
|
return {
|
|
8485
8527
|
isBuffering: () => bufferingRef.current,
|
|
8486
8528
|
bufferUntilFirstFrame
|
|
@@ -8854,7 +8896,7 @@ var useMediaPlayback = ({
|
|
|
8854
8896
|
const frame = useCurrentFrame();
|
|
8855
8897
|
const absoluteFrame = useTimelinePosition();
|
|
8856
8898
|
const [playing] = usePlayingState();
|
|
8857
|
-
const buffering =
|
|
8899
|
+
const buffering = useContext27(BufferingContextReact);
|
|
8858
8900
|
const { fps } = useVideoConfig();
|
|
8859
8901
|
const mediaStartsAt = useMediaStartsAt();
|
|
8860
8902
|
const lastSeekDueToShift = useRef18(null);
|
|
@@ -9149,16 +9191,16 @@ var SetMediaVolumeContext = createContext22({
|
|
|
9149
9191
|
}
|
|
9150
9192
|
});
|
|
9151
9193
|
var useMediaVolumeState = () => {
|
|
9152
|
-
const { mediaVolume } =
|
|
9153
|
-
const { setMediaVolume } =
|
|
9154
|
-
return
|
|
9194
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
9195
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
9196
|
+
return useMemo27(() => {
|
|
9155
9197
|
return [mediaVolume, setMediaVolume];
|
|
9156
9198
|
}, [mediaVolume, setMediaVolume]);
|
|
9157
9199
|
};
|
|
9158
9200
|
var usePlayerMutedState = () => {
|
|
9159
|
-
const { playerMuted } =
|
|
9160
|
-
const { setPlayerMuted } =
|
|
9161
|
-
return
|
|
9201
|
+
const { playerMuted } = useContext28(MediaVolumeContext);
|
|
9202
|
+
const { setPlayerMuted } = useContext28(SetMediaVolumeContext);
|
|
9203
|
+
return useMemo27(() => {
|
|
9162
9204
|
return [playerMuted, setPlayerMuted];
|
|
9163
9205
|
}, [playerMuted, setPlayerMuted]);
|
|
9164
9206
|
};
|
|
@@ -9212,7 +9254,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9212
9254
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
9213
9255
|
}
|
|
9214
9256
|
const preloadedSrc = usePreload(src);
|
|
9215
|
-
const sequenceContext =
|
|
9257
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
9216
9258
|
const [timelineId] = useState14(() => String(Math.random()));
|
|
9217
9259
|
const userPreferredVolume = evaluateVolume({
|
|
9218
9260
|
frame: volumePropFrame,
|
|
@@ -9225,7 +9267,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9225
9267
|
requestsVideoFrame: false,
|
|
9226
9268
|
isClientSideRendering: false
|
|
9227
9269
|
});
|
|
9228
|
-
const propsToPass =
|
|
9270
|
+
const propsToPass = useMemo28(() => {
|
|
9229
9271
|
return {
|
|
9230
9272
|
muted: muted || playerMuted || userPreferredVolume <= 0,
|
|
9231
9273
|
src: preloadedSrc,
|
|
@@ -9242,7 +9284,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9242
9284
|
userPreferredVolume,
|
|
9243
9285
|
crossOriginValue
|
|
9244
9286
|
]);
|
|
9245
|
-
const id =
|
|
9287
|
+
const id = useMemo28(() => `audio-${random(src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [
|
|
9246
9288
|
src,
|
|
9247
9289
|
sequenceContext?.relativeFrom,
|
|
9248
9290
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9372,10 +9414,10 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9372
9414
|
const absoluteFrame = useTimelinePosition();
|
|
9373
9415
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
9374
9416
|
const frame = useCurrentFrame();
|
|
9375
|
-
const sequenceContext =
|
|
9376
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
9417
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
9418
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
9377
9419
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
9378
|
-
const id =
|
|
9420
|
+
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
9379
9421
|
props.src,
|
|
9380
9422
|
sequenceContext?.relativeFrom,
|
|
9381
9423
|
sequenceContext?.cumulatedFrom,
|
|
@@ -9482,7 +9524,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9482
9524
|
};
|
|
9483
9525
|
var AudioForRendering = forwardRef6(AudioForRenderingRefForwardingFunction);
|
|
9484
9526
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
9485
|
-
const audioTagsContext =
|
|
9527
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
9486
9528
|
const propsWithFreeze = props;
|
|
9487
9529
|
const {
|
|
9488
9530
|
startFrom,
|
|
@@ -9506,7 +9548,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
9506
9548
|
if (typeof freeze !== "undefined") {
|
|
9507
9549
|
throw new TypeError('The "freeze" prop is not supported on <Html5Audio />. Use <Sequence freeze={...}> to freeze media playback.');
|
|
9508
9550
|
}
|
|
9509
|
-
const { durations, setDurations } =
|
|
9551
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
9510
9552
|
if (typeof props.src !== "string") {
|
|
9511
9553
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
9512
9554
|
}
|
|
@@ -9668,7 +9710,7 @@ var SolidInner = ({
|
|
|
9668
9710
|
effects,
|
|
9669
9711
|
overrideId: overrideId ?? null
|
|
9670
9712
|
});
|
|
9671
|
-
const sourceCanvas =
|
|
9713
|
+
const sourceCanvas = useMemo30(() => {
|
|
9672
9714
|
if (typeof document === "undefined") {
|
|
9673
9715
|
return null;
|
|
9674
9716
|
}
|
|
@@ -9736,7 +9778,7 @@ var SolidInner = ({
|
|
|
9736
9778
|
cancelRender2,
|
|
9737
9779
|
memoizedEffects
|
|
9738
9780
|
]);
|
|
9739
|
-
const canvasStyle =
|
|
9781
|
+
const canvasStyle = useMemo30(() => {
|
|
9740
9782
|
return {
|
|
9741
9783
|
width,
|
|
9742
9784
|
height,
|
|
@@ -9885,12 +9927,12 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9885
9927
|
controls,
|
|
9886
9928
|
style
|
|
9887
9929
|
}, ref) => {
|
|
9888
|
-
const ancestor =
|
|
9930
|
+
const ancestor = useContext32(HtmlInCanvasAncestorContext);
|
|
9889
9931
|
assertHtmlInCanvasDimensions(width, height);
|
|
9890
9932
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
9891
9933
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
9892
9934
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
9893
|
-
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9935
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
9894
9936
|
const { isClientSideRendering, isRendering } = useRemotionEnvironment();
|
|
9895
9937
|
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
9896
9938
|
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
@@ -9944,7 +9986,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
9944
9986
|
if (!placeholderCanvas) {
|
|
9945
9987
|
throw new Error("Canvas not found");
|
|
9946
9988
|
}
|
|
9947
|
-
const handle =
|
|
9989
|
+
const handle = delayRender2("onPaint");
|
|
9948
9990
|
if (!initializedRef.current) {
|
|
9949
9991
|
const currentOnInit = onInitRef.current;
|
|
9950
9992
|
if (!currentOnInit) {
|
|
@@ -10045,6 +10087,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10045
10087
|
chainState,
|
|
10046
10088
|
continueRender2,
|
|
10047
10089
|
cancelRender2,
|
|
10090
|
+
delayRender2,
|
|
10048
10091
|
resolvedPixelDensity,
|
|
10049
10092
|
canRetryMissingPaintRecord
|
|
10050
10093
|
]);
|
|
@@ -10096,28 +10139,28 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10096
10139
|
if (!canvas) {
|
|
10097
10140
|
return;
|
|
10098
10141
|
}
|
|
10099
|
-
const handle =
|
|
10142
|
+
const handle = delayRender2("waiting for first paint after canvas resize");
|
|
10100
10143
|
canvas.addEventListener("paint", () => {
|
|
10101
10144
|
continueRender2(handle);
|
|
10102
10145
|
}, { once: true });
|
|
10103
10146
|
return () => {
|
|
10104
10147
|
continueRender2(handle);
|
|
10105
10148
|
};
|
|
10106
|
-
}, [width, height, continueRender2, canvasSizeKey]);
|
|
10107
|
-
const innerStyle =
|
|
10149
|
+
}, [width, height, continueRender2, delayRender2, canvasSizeKey]);
|
|
10150
|
+
const innerStyle = useMemo31(() => {
|
|
10108
10151
|
return {
|
|
10109
10152
|
width,
|
|
10110
10153
|
height
|
|
10111
10154
|
};
|
|
10112
10155
|
}, [width, height]);
|
|
10113
|
-
const canvasStyle =
|
|
10156
|
+
const canvasStyle = useMemo31(() => {
|
|
10114
10157
|
return {
|
|
10115
10158
|
width,
|
|
10116
10159
|
height,
|
|
10117
10160
|
...style ?? {}
|
|
10118
10161
|
};
|
|
10119
10162
|
}, [height, style, width]);
|
|
10120
|
-
const ancestorValue =
|
|
10163
|
+
const ancestorValue = useMemo31(() => {
|
|
10121
10164
|
return {
|
|
10122
10165
|
requestParentPaint: () => {
|
|
10123
10166
|
canvas2dRef.current?.requestPaint?.();
|
|
@@ -10331,7 +10374,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10331
10374
|
effects,
|
|
10332
10375
|
overrideId: controls?.overrideId ?? null
|
|
10333
10376
|
});
|
|
10334
|
-
const sequenceContext =
|
|
10377
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
10335
10378
|
const pendingLoadDelayRef = useRef23(null);
|
|
10336
10379
|
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
10337
10380
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
@@ -10348,7 +10391,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10348
10391
|
continueRender2(pending.handle);
|
|
10349
10392
|
pendingLoadDelayRef.current = null;
|
|
10350
10393
|
}, [continueRender2]);
|
|
10351
|
-
const sourceCanvas =
|
|
10394
|
+
const sourceCanvas = useMemo32(() => {
|
|
10352
10395
|
if (typeof document === "undefined") {
|
|
10353
10396
|
return null;
|
|
10354
10397
|
}
|
|
@@ -10670,7 +10713,7 @@ var ImgContent = ({
|
|
|
10670
10713
|
const imageRef = useRef24(null);
|
|
10671
10714
|
const errors = useRef24({});
|
|
10672
10715
|
const { delayPlayback } = useBufferState();
|
|
10673
|
-
const sequenceContext =
|
|
10716
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
10674
10717
|
const [isLoading, setIsLoading] = useState18(false);
|
|
10675
10718
|
const _propsValid = true;
|
|
10676
10719
|
if (!_propsValid) {
|
|
@@ -11019,7 +11062,10 @@ var makeRemotionComponentIdentity = ({
|
|
|
11019
11062
|
};
|
|
11020
11063
|
var interactiveElementSchema = {
|
|
11021
11064
|
...baseSchema,
|
|
11022
|
-
...transformSchema
|
|
11065
|
+
...transformSchema
|
|
11066
|
+
};
|
|
11067
|
+
var interactiveTextElementSchema = {
|
|
11068
|
+
...interactiveElementSchema,
|
|
11023
11069
|
...textSchema,
|
|
11024
11070
|
...textContentSchema
|
|
11025
11071
|
};
|
|
@@ -11035,7 +11081,7 @@ var withSchema = (options) => {
|
|
|
11035
11081
|
addSequenceStackTraces(Wrapped);
|
|
11036
11082
|
return Wrapped;
|
|
11037
11083
|
};
|
|
11038
|
-
var makeInteractiveElement = (tag, displayName) => {
|
|
11084
|
+
var makeInteractiveElement = (tag, displayName, schema) => {
|
|
11039
11085
|
const Inner = forwardRef12((propsWithControls, ref) => {
|
|
11040
11086
|
const {
|
|
11041
11087
|
durationInFrames,
|
|
@@ -11081,12 +11127,18 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
11081
11127
|
packageName: "remotion",
|
|
11082
11128
|
componentName: displayName.slice(1, -1)
|
|
11083
11129
|
}),
|
|
11084
|
-
schema
|
|
11130
|
+
schema,
|
|
11085
11131
|
supportsEffects: false
|
|
11086
11132
|
});
|
|
11087
11133
|
Wrapped.displayName = displayName;
|
|
11088
11134
|
return Wrapped;
|
|
11089
11135
|
};
|
|
11136
|
+
var makeInteractiveTextElement = (tag, displayName) => {
|
|
11137
|
+
return makeInteractiveElement(tag, displayName, interactiveTextElementSchema);
|
|
11138
|
+
};
|
|
11139
|
+
var makeInteractiveNonTextElement = (tag, displayName) => {
|
|
11140
|
+
return makeInteractiveElement(tag, displayName, interactiveElementSchema);
|
|
11141
|
+
};
|
|
11090
11142
|
var Interactive = {
|
|
11091
11143
|
baseSchema,
|
|
11092
11144
|
transformSchema,
|
|
@@ -11095,41 +11147,41 @@ var Interactive = {
|
|
|
11095
11147
|
sequenceSchema,
|
|
11096
11148
|
withSchema,
|
|
11097
11149
|
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
|
|
11098
|
-
A:
|
|
11099
|
-
Article:
|
|
11100
|
-
Aside:
|
|
11101
|
-
Button:
|
|
11102
|
-
Circle:
|
|
11103
|
-
Code:
|
|
11104
|
-
Div:
|
|
11105
|
-
Ellipse:
|
|
11106
|
-
Em:
|
|
11107
|
-
Footer:
|
|
11108
|
-
G:
|
|
11109
|
-
H1:
|
|
11110
|
-
H2:
|
|
11111
|
-
H3:
|
|
11112
|
-
H4:
|
|
11113
|
-
H5:
|
|
11114
|
-
H6:
|
|
11115
|
-
Header:
|
|
11116
|
-
Label:
|
|
11117
|
-
Li:
|
|
11118
|
-
Line:
|
|
11119
|
-
Main:
|
|
11120
|
-
Nav:
|
|
11121
|
-
Ol:
|
|
11122
|
-
P:
|
|
11123
|
-
Path:
|
|
11124
|
-
Pre:
|
|
11125
|
-
Rect:
|
|
11126
|
-
Section:
|
|
11127
|
-
Small:
|
|
11128
|
-
Span:
|
|
11129
|
-
Strong:
|
|
11130
|
-
Svg:
|
|
11131
|
-
Text:
|
|
11132
|
-
Ul:
|
|
11150
|
+
A: makeInteractiveTextElement("a", "<Interactive.A>"),
|
|
11151
|
+
Article: makeInteractiveTextElement("article", "<Interactive.Article>"),
|
|
11152
|
+
Aside: makeInteractiveTextElement("aside", "<Interactive.Aside>"),
|
|
11153
|
+
Button: makeInteractiveTextElement("button", "<Interactive.Button>"),
|
|
11154
|
+
Circle: makeInteractiveNonTextElement("circle", "<Interactive.Circle>"),
|
|
11155
|
+
Code: makeInteractiveTextElement("code", "<Interactive.Code>"),
|
|
11156
|
+
Div: makeInteractiveTextElement("div", "<Interactive.Div>"),
|
|
11157
|
+
Ellipse: makeInteractiveNonTextElement("ellipse", "<Interactive.Ellipse>"),
|
|
11158
|
+
Em: makeInteractiveTextElement("em", "<Interactive.Em>"),
|
|
11159
|
+
Footer: makeInteractiveTextElement("footer", "<Interactive.Footer>"),
|
|
11160
|
+
G: makeInteractiveNonTextElement("g", "<Interactive.G>"),
|
|
11161
|
+
H1: makeInteractiveTextElement("h1", "<Interactive.H1>"),
|
|
11162
|
+
H2: makeInteractiveTextElement("h2", "<Interactive.H2>"),
|
|
11163
|
+
H3: makeInteractiveTextElement("h3", "<Interactive.H3>"),
|
|
11164
|
+
H4: makeInteractiveTextElement("h4", "<Interactive.H4>"),
|
|
11165
|
+
H5: makeInteractiveTextElement("h5", "<Interactive.H5>"),
|
|
11166
|
+
H6: makeInteractiveTextElement("h6", "<Interactive.H6>"),
|
|
11167
|
+
Header: makeInteractiveTextElement("header", "<Interactive.Header>"),
|
|
11168
|
+
Label: makeInteractiveTextElement("label", "<Interactive.Label>"),
|
|
11169
|
+
Li: makeInteractiveTextElement("li", "<Interactive.Li>"),
|
|
11170
|
+
Line: makeInteractiveNonTextElement("line", "<Interactive.Line>"),
|
|
11171
|
+
Main: makeInteractiveTextElement("main", "<Interactive.Main>"),
|
|
11172
|
+
Nav: makeInteractiveTextElement("nav", "<Interactive.Nav>"),
|
|
11173
|
+
Ol: makeInteractiveTextElement("ol", "<Interactive.Ol>"),
|
|
11174
|
+
P: makeInteractiveTextElement("p", "<Interactive.P>"),
|
|
11175
|
+
Path: makeInteractiveNonTextElement("path", "<Interactive.Path>"),
|
|
11176
|
+
Pre: makeInteractiveTextElement("pre", "<Interactive.Pre>"),
|
|
11177
|
+
Rect: makeInteractiveNonTextElement("rect", "<Interactive.Rect>"),
|
|
11178
|
+
Section: makeInteractiveTextElement("section", "<Interactive.Section>"),
|
|
11179
|
+
Small: makeInteractiveTextElement("small", "<Interactive.Small>"),
|
|
11180
|
+
Span: makeInteractiveTextElement("span", "<Interactive.Span>"),
|
|
11181
|
+
Strong: makeInteractiveTextElement("strong", "<Interactive.Strong>"),
|
|
11182
|
+
Svg: makeInteractiveNonTextElement("svg", "<Interactive.Svg>"),
|
|
11183
|
+
Text: makeInteractiveTextElement("text", "<Interactive.Text>"),
|
|
11184
|
+
Ul: makeInteractiveTextElement("ul", "<Interactive.Ul>")
|
|
11133
11185
|
};
|
|
11134
11186
|
var compositionsRef = React31.createRef();
|
|
11135
11187
|
var CompositionManagerProvider = ({
|
|
@@ -11186,7 +11238,7 @@ var CompositionManagerProvider = ({
|
|
|
11186
11238
|
getCompositions: () => currentcompositionsRef.current
|
|
11187
11239
|
};
|
|
11188
11240
|
}, []);
|
|
11189
|
-
const compositionManagerSetters =
|
|
11241
|
+
const compositionManagerSetters = useMemo33(() => {
|
|
11190
11242
|
return {
|
|
11191
11243
|
registerComposition,
|
|
11192
11244
|
unregisterComposition,
|
|
@@ -11202,7 +11254,7 @@ var CompositionManagerProvider = ({
|
|
|
11202
11254
|
unregisterFolder,
|
|
11203
11255
|
onlyRenderComposition
|
|
11204
11256
|
]);
|
|
11205
|
-
const compositionManagerContextValue =
|
|
11257
|
+
const compositionManagerContextValue = useMemo33(() => {
|
|
11206
11258
|
return {
|
|
11207
11259
|
compositions,
|
|
11208
11260
|
folders,
|
|
@@ -11300,7 +11352,7 @@ var waitForRoot = (fn) => {
|
|
|
11300
11352
|
};
|
|
11301
11353
|
var MediaEnabledContext = createContext24(null);
|
|
11302
11354
|
var useVideoEnabled = () => {
|
|
11303
|
-
const context =
|
|
11355
|
+
const context = useContext35(MediaEnabledContext);
|
|
11304
11356
|
if (!context) {
|
|
11305
11357
|
return window.remotion_videoEnabled;
|
|
11306
11358
|
}
|
|
@@ -11310,7 +11362,7 @@ var useVideoEnabled = () => {
|
|
|
11310
11362
|
return context.videoEnabled;
|
|
11311
11363
|
};
|
|
11312
11364
|
var useAudioEnabled = () => {
|
|
11313
|
-
const context =
|
|
11365
|
+
const context = useContext35(MediaEnabledContext);
|
|
11314
11366
|
if (!context) {
|
|
11315
11367
|
return window.remotion_audioEnabled;
|
|
11316
11368
|
}
|
|
@@ -11324,7 +11376,7 @@ var MediaEnabledProvider = ({
|
|
|
11324
11376
|
videoEnabled,
|
|
11325
11377
|
audioEnabled
|
|
11326
11378
|
}) => {
|
|
11327
|
-
const value =
|
|
11379
|
+
const value = useMemo34(() => ({ videoEnabled, audioEnabled }), [videoEnabled, audioEnabled]);
|
|
11328
11380
|
return /* @__PURE__ */ jsx31(MediaEnabledContext.Provider, {
|
|
11329
11381
|
value,
|
|
11330
11382
|
children
|
|
@@ -11340,13 +11392,13 @@ var RemotionRootContexts = ({
|
|
|
11340
11392
|
audioEnabled,
|
|
11341
11393
|
frameState
|
|
11342
11394
|
}) => {
|
|
11343
|
-
const nonceContext =
|
|
11395
|
+
const nonceContext = useMemo35(() => {
|
|
11344
11396
|
let counter = 0;
|
|
11345
11397
|
return {
|
|
11346
11398
|
getNonce: () => counter++
|
|
11347
11399
|
};
|
|
11348
11400
|
}, []);
|
|
11349
|
-
const logging =
|
|
11401
|
+
const logging = useMemo35(() => {
|
|
11350
11402
|
return { logLevel, mountTime: Date.now() };
|
|
11351
11403
|
}, [logLevel]);
|
|
11352
11404
|
return /* @__PURE__ */ jsx32(LogLevelContext.Provider, {
|
|
@@ -11647,13 +11699,13 @@ var OffthreadVideoForRendering = ({
|
|
|
11647
11699
|
const frame = useCurrentFrame();
|
|
11648
11700
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
11649
11701
|
const videoConfig = useUnsafeVideoConfig();
|
|
11650
|
-
const sequenceContext =
|
|
11702
|
+
const sequenceContext = useContext37(SequenceContext);
|
|
11651
11703
|
const mediaStartsAt = useMediaStartsAt();
|
|
11652
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
11704
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext37(RenderAssetManager);
|
|
11653
11705
|
if (!src) {
|
|
11654
11706
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
11655
11707
|
}
|
|
11656
|
-
const id =
|
|
11708
|
+
const id = useMemo36(() => `offthreadvideo-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
11657
11709
|
src,
|
|
11658
11710
|
sequenceContext?.cumulatedFrom,
|
|
11659
11711
|
sequenceContext?.relativeFrom,
|
|
@@ -11708,14 +11760,14 @@ var OffthreadVideoForRendering = ({
|
|
|
11708
11760
|
sequenceContext?.cumulatedNegativeFrom,
|
|
11709
11761
|
audioStreamIndex
|
|
11710
11762
|
]);
|
|
11711
|
-
const currentTime =
|
|
11763
|
+
const currentTime = useMemo36(() => {
|
|
11712
11764
|
return getExpectedMediaFrameUncorrected({
|
|
11713
11765
|
frame,
|
|
11714
11766
|
playbackRate: playbackRate || 1,
|
|
11715
11767
|
startFrom: -mediaStartsAt
|
|
11716
11768
|
}) / videoConfig.fps;
|
|
11717
11769
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
11718
|
-
const actualSrc =
|
|
11770
|
+
const actualSrc = useMemo36(() => {
|
|
11719
11771
|
return getOffthreadVideoSource({
|
|
11720
11772
|
src,
|
|
11721
11773
|
currentTime,
|
|
@@ -11803,7 +11855,7 @@ var OffthreadVideoForRendering = ({
|
|
|
11803
11855
|
cancelRender("Failed to load image with src " + imageSrc);
|
|
11804
11856
|
}
|
|
11805
11857
|
}, [imageSrc, onError]);
|
|
11806
|
-
const className =
|
|
11858
|
+
const className = useMemo36(() => {
|
|
11807
11859
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
11808
11860
|
}, [props2.className]);
|
|
11809
11861
|
const onImageFrame = useCallback22((img) => {
|
|
@@ -11867,12 +11919,12 @@ class MediaPlaybackError extends Error {
|
|
|
11867
11919
|
}
|
|
11868
11920
|
}
|
|
11869
11921
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
11870
|
-
const context =
|
|
11922
|
+
const context = useContext38(SharedAudioContext);
|
|
11871
11923
|
if (!context) {
|
|
11872
11924
|
throw new Error("SharedAudioContext not found");
|
|
11873
11925
|
}
|
|
11874
11926
|
const videoRef = useRef27(null);
|
|
11875
|
-
const sharedSource =
|
|
11927
|
+
const sharedSource = useMemo37(() => {
|
|
11876
11928
|
if (!context.audioContext) {
|
|
11877
11929
|
return null;
|
|
11878
11930
|
}
|
|
@@ -11924,7 +11976,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11924
11976
|
}
|
|
11925
11977
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
11926
11978
|
const { fps, durationInFrames } = useVideoConfig();
|
|
11927
|
-
const parentSequence =
|
|
11979
|
+
const parentSequence = useContext38(SequenceContext);
|
|
11928
11980
|
const logLevel = useLogLevel();
|
|
11929
11981
|
const mountTime = useMountTime();
|
|
11930
11982
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -12075,7 +12127,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
12075
12127
|
current.preload = "auto";
|
|
12076
12128
|
}
|
|
12077
12129
|
}, []);
|
|
12078
|
-
const actualStyle =
|
|
12130
|
+
const actualStyle = useMemo37(() => {
|
|
12079
12131
|
return {
|
|
12080
12132
|
...style
|
|
12081
12133
|
};
|
|
@@ -12271,7 +12323,7 @@ function useRemotionContexts() {
|
|
|
12271
12323
|
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
12272
12324
|
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
12273
12325
|
const logLevelContext = React40.useContext(LogLevelContext);
|
|
12274
|
-
return
|
|
12326
|
+
return useMemo38(() => ({
|
|
12275
12327
|
compositionManagerCtx,
|
|
12276
12328
|
timelineContext,
|
|
12277
12329
|
setTimelineContext,
|
|
@@ -12382,6 +12434,7 @@ var Internals = {
|
|
|
12382
12434
|
textSchema,
|
|
12383
12435
|
transformSchema,
|
|
12384
12436
|
premountSchema,
|
|
12437
|
+
premountStyleSchema,
|
|
12385
12438
|
flattenActiveSchema,
|
|
12386
12439
|
getFlatSchemaWithAllKeys,
|
|
12387
12440
|
RemotionRootContexts,
|
|
@@ -12395,6 +12448,7 @@ var Internals = {
|
|
|
12395
12448
|
truthy,
|
|
12396
12449
|
SequenceContext,
|
|
12397
12450
|
PremountContext,
|
|
12451
|
+
usePremounting,
|
|
12398
12452
|
useRemotionContexts,
|
|
12399
12453
|
RemotionContextProvider,
|
|
12400
12454
|
CSSUtils: exports_default_css,
|
|
@@ -12570,7 +12624,7 @@ var validateSeriesSequenceProps = ({
|
|
|
12570
12624
|
return offset;
|
|
12571
12625
|
};
|
|
12572
12626
|
var SeriesInner = (props2) => {
|
|
12573
|
-
const childrenValue =
|
|
12627
|
+
const childrenValue = useMemo39(() => {
|
|
12574
12628
|
const flattenedChildren = flattenChildren(props2.children);
|
|
12575
12629
|
const renderChildren = (i, startFrame) => {
|
|
12576
12630
|
if (i === flattenedChildren.length) {
|
|
@@ -12899,14 +12953,14 @@ var VideoForRenderingForwardFunction = ({
|
|
|
12899
12953
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
12900
12954
|
const videoConfig = useUnsafeVideoConfig();
|
|
12901
12955
|
const videoRef = useRef28(null);
|
|
12902
|
-
const sequenceContext =
|
|
12956
|
+
const sequenceContext = useContext39(SequenceContext);
|
|
12903
12957
|
const mediaStartsAt = useMediaStartsAt();
|
|
12904
12958
|
const environment = useRemotionEnvironment();
|
|
12905
12959
|
const logLevel = useLogLevel();
|
|
12906
12960
|
const mountTime = useMountTime();
|
|
12907
12961
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12908
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12909
|
-
const id =
|
|
12962
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext39(RenderAssetManager);
|
|
12963
|
+
const id = useMemo40(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
12910
12964
|
props2.src,
|
|
12911
12965
|
sequenceContext?.cumulatedFrom,
|
|
12912
12966
|
sequenceContext?.relativeFrom,
|
|
@@ -13117,7 +13171,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
13117
13171
|
if (environment.isClientSideRendering) {
|
|
13118
13172
|
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");
|
|
13119
13173
|
}
|
|
13120
|
-
const { durations, setDurations } =
|
|
13174
|
+
const { durations, setDurations } = useContext40(DurationsContext);
|
|
13121
13175
|
if (typeof ref === "string") {
|
|
13122
13176
|
throw new Error("string refs are not supported");
|
|
13123
13177
|
}
|
|
@@ -13573,7 +13627,7 @@ var ExpertCard = ({ expert, Link }) => {
|
|
|
13573
13627
|
});
|
|
13574
13628
|
};
|
|
13575
13629
|
var ExpertsPageContent = ({ Link }) => {
|
|
13576
|
-
const expertsInRandomOrder =
|
|
13630
|
+
const expertsInRandomOrder = useMemo41(() => {
|
|
13577
13631
|
if (typeof window === "undefined") {
|
|
13578
13632
|
return [];
|
|
13579
13633
|
}
|