@remotion/promo-pages 4.0.458 → 4.0.460
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 +362 -257
- package/dist/design.js +204 -143
- package/dist/experts.js +201 -140
- package/dist/homepage/Pricing.js +204 -143
- package/dist/prompts/PromptsGallery.js +208 -147
- package/dist/prompts/PromptsShow.js +240 -179
- package/dist/prompts/PromptsSubmit.js +240 -179
- package/dist/team.js +204 -143
- package/dist/template-modal-content.js +213 -152
- package/dist/templates.js +205 -143
- package/package.json +13 -13
package/dist/team.js
CHANGED
|
@@ -1559,7 +1559,7 @@ var getDefaultConfig = () => {
|
|
|
1559
1559
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1560
1560
|
|
|
1561
1561
|
// ../design/dist/esm/index.mjs
|
|
1562
|
-
import React33, { useEffect as
|
|
1562
|
+
import React33, { useEffect as useEffect20, useMemo as useMemo38, useState as useState23 } from "react";
|
|
1563
1563
|
|
|
1564
1564
|
// ../paths/dist/esm/index.mjs
|
|
1565
1565
|
var cutLInstruction = ({
|
|
@@ -5954,6 +5954,7 @@ import { createContext as createContext14 } from "react";
|
|
|
5954
5954
|
import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
|
|
5955
5955
|
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
5956
5956
|
import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
|
|
5957
|
+
import { createContext as createContext15 } from "react";
|
|
5957
5958
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
5958
5959
|
import {
|
|
5959
5960
|
forwardRef as forwardRef4,
|
|
@@ -5967,7 +5968,7 @@ import React15, { useCallback as useCallback6, useImperativeHandle, useRef as us
|
|
|
5967
5968
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
5968
5969
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
5969
5970
|
import {
|
|
5970
|
-
createContext as
|
|
5971
|
+
createContext as createContext16,
|
|
5971
5972
|
forwardRef as forwardRef5,
|
|
5972
5973
|
useCallback as useCallback7,
|
|
5973
5974
|
useContext as useContext17,
|
|
@@ -5979,7 +5980,7 @@ import {
|
|
|
5979
5980
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
5980
5981
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
5981
5982
|
import {
|
|
5982
|
-
createContext as
|
|
5983
|
+
createContext as createContext17,
|
|
5983
5984
|
useCallback as useCallback8,
|
|
5984
5985
|
useImperativeHandle as useImperativeHandle3,
|
|
5985
5986
|
useLayoutEffect as useLayoutEffect4,
|
|
@@ -5989,17 +5990,17 @@ import {
|
|
|
5989
5990
|
} from "react";
|
|
5990
5991
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5991
5992
|
import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
|
|
5992
|
-
import React17, { createContext as
|
|
5993
|
+
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
5993
5994
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
5994
5995
|
import { useContext as useContext19 } from "react";
|
|
5995
|
-
import { createContext as
|
|
5996
|
+
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
5996
5997
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5997
|
-
import { createContext as
|
|
5998
|
+
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
5998
5999
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
5999
6000
|
import React23, {
|
|
6000
6001
|
forwardRef as forwardRef6,
|
|
6001
6002
|
useContext as useContext28,
|
|
6002
|
-
useEffect as
|
|
6003
|
+
useEffect as useEffect14,
|
|
6003
6004
|
useImperativeHandle as useImperativeHandle4,
|
|
6004
6005
|
useMemo as useMemo28,
|
|
6005
6006
|
useRef as useRef18,
|
|
@@ -6007,7 +6008,7 @@ import React23, {
|
|
|
6007
6008
|
} from "react";
|
|
6008
6009
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
6009
6010
|
import React20, {
|
|
6010
|
-
createContext as
|
|
6011
|
+
createContext as createContext21,
|
|
6011
6012
|
createRef as createRef2,
|
|
6012
6013
|
useCallback as useCallback9,
|
|
6013
6014
|
useContext as useContext20,
|
|
@@ -6015,15 +6016,15 @@ import React20, {
|
|
|
6015
6016
|
useRef as useRef11,
|
|
6016
6017
|
useState as useState12
|
|
6017
6018
|
} from "react";
|
|
6018
|
-
import {
|
|
6019
|
+
import { useMemo as useMemo21 } from "react";
|
|
6019
6020
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6020
6021
|
import { useRef as useRef12 } from "react";
|
|
6021
|
-
import { useContext as useContext23, useEffect as
|
|
6022
|
+
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
|
|
6022
6023
|
import { useContext as useContext22 } from "react";
|
|
6023
6024
|
import {
|
|
6024
6025
|
useCallback as useCallback12,
|
|
6025
6026
|
useContext as useContext26,
|
|
6026
|
-
useEffect as
|
|
6027
|
+
useEffect as useEffect12,
|
|
6027
6028
|
useLayoutEffect as useLayoutEffect8,
|
|
6028
6029
|
useRef as useRef17
|
|
6029
6030
|
} from "react";
|
|
@@ -6032,7 +6033,7 @@ import { useContext as useContext25, useMemo as useMemo25 } from "react";
|
|
|
6032
6033
|
import React21, {
|
|
6033
6034
|
useCallback as useCallback10,
|
|
6034
6035
|
useContext as useContext24,
|
|
6035
|
-
useEffect as
|
|
6036
|
+
useEffect as useEffect9,
|
|
6036
6037
|
useLayoutEffect as useLayoutEffect7,
|
|
6037
6038
|
useMemo as useMemo24,
|
|
6038
6039
|
useRef as useRef14,
|
|
@@ -6040,15 +6041,15 @@ import React21, {
|
|
|
6040
6041
|
} from "react";
|
|
6041
6042
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
6042
6043
|
import React22 from "react";
|
|
6043
|
-
import { useEffect as
|
|
6044
|
-
import { useEffect as
|
|
6045
|
-
import { useEffect as
|
|
6046
|
-
import { createContext as
|
|
6044
|
+
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
6045
|
+
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
6046
|
+
import { useEffect as useEffect13 } from "react";
|
|
6047
|
+
import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
|
|
6047
6048
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
6048
6049
|
import {
|
|
6049
6050
|
forwardRef as forwardRef7,
|
|
6050
6051
|
useContext as useContext29,
|
|
6051
|
-
useEffect as
|
|
6052
|
+
useEffect as useEffect15,
|
|
6052
6053
|
useImperativeHandle as useImperativeHandle5,
|
|
6053
6054
|
useLayoutEffect as useLayoutEffect9,
|
|
6054
6055
|
useMemo as useMemo29,
|
|
@@ -6079,17 +6080,16 @@ import {
|
|
|
6079
6080
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6080
6081
|
import React29 from "react";
|
|
6081
6082
|
import { useMemo as useMemo322 } from "react";
|
|
6082
|
-
import { createContext as
|
|
6083
|
+
import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
|
|
6083
6084
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
6084
6085
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
6085
6086
|
import React31 from "react";
|
|
6086
|
-
import React32, { createContext as
|
|
6087
|
-
import { useContext as useContext33 } from "react";
|
|
6087
|
+
import React32, { createContext as createContext24 } from "react";
|
|
6088
6088
|
import { useCallback as useCallback18 } from "react";
|
|
6089
6089
|
import {
|
|
6090
6090
|
useCallback as useCallback17,
|
|
6091
|
-
useContext as
|
|
6092
|
-
useEffect as
|
|
6091
|
+
useContext as useContext33,
|
|
6092
|
+
useEffect as useEffect16,
|
|
6093
6093
|
useLayoutEffect as useLayoutEffect11,
|
|
6094
6094
|
useMemo as useMemo33,
|
|
6095
6095
|
useState as useState20
|
|
@@ -6097,29 +6097,29 @@ import {
|
|
|
6097
6097
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
6098
6098
|
import React34, {
|
|
6099
6099
|
forwardRef as forwardRef10,
|
|
6100
|
-
useContext as
|
|
6101
|
-
useEffect as
|
|
6100
|
+
useContext as useContext34,
|
|
6101
|
+
useEffect as useEffect18,
|
|
6102
6102
|
useImperativeHandle as useImperativeHandle8,
|
|
6103
6103
|
useMemo as useMemo34,
|
|
6104
6104
|
useRef as useRef22,
|
|
6105
6105
|
useState as useState21
|
|
6106
6106
|
} from "react";
|
|
6107
|
-
import { useEffect as
|
|
6107
|
+
import { useEffect as useEffect17 } from "react";
|
|
6108
6108
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
6109
6109
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
6110
6110
|
import React36, { useMemo as useMemo35 } from "react";
|
|
6111
6111
|
import { jsx as jsx332 } from "react/jsx-runtime";
|
|
6112
6112
|
import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
|
|
6113
6113
|
import React37 from "react";
|
|
6114
|
-
import React38, { createContext as
|
|
6114
|
+
import React38, { createContext as createContext25 } from "react";
|
|
6115
6115
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
6116
6116
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
6117
6117
|
import React40 from "react";
|
|
6118
|
-
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as
|
|
6118
|
+
import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
|
|
6119
6119
|
import {
|
|
6120
6120
|
forwardRef as forwardRef12,
|
|
6121
|
-
useContext as
|
|
6122
|
-
useEffect as
|
|
6121
|
+
useContext as useContext35,
|
|
6122
|
+
useEffect as useEffect19,
|
|
6123
6123
|
useImperativeHandle as useImperativeHandle9,
|
|
6124
6124
|
useLayoutEffect as useLayoutEffect12,
|
|
6125
6125
|
useMemo as useMemo37,
|
|
@@ -7656,7 +7656,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
7656
7656
|
var addSequenceStackTraces = (component) => {
|
|
7657
7657
|
componentsToAddStacksTo.push(component);
|
|
7658
7658
|
};
|
|
7659
|
-
var VERSION = "4.0.
|
|
7659
|
+
var VERSION = "4.0.460";
|
|
7660
7660
|
var checkMultipleRemotionVersions = () => {
|
|
7661
7661
|
if (typeof globalThis === "undefined") {
|
|
7662
7662
|
return;
|
|
@@ -7875,6 +7875,9 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
7875
7875
|
default: "none"
|
|
7876
7876
|
}
|
|
7877
7877
|
};
|
|
7878
|
+
var nodePathToString = (nodePath) => {
|
|
7879
|
+
return nodePath.join(".");
|
|
7880
|
+
};
|
|
7878
7881
|
var SequenceManager = React12.createContext({
|
|
7879
7882
|
registerSequence: () => {
|
|
7880
7883
|
throw new Error("SequenceManagerContext not initialized");
|
|
@@ -7890,19 +7893,48 @@ var SequenceVisibilityToggleContext = React12.createContext({
|
|
|
7890
7893
|
throw new Error("SequenceVisibilityToggle not initialized");
|
|
7891
7894
|
}
|
|
7892
7895
|
});
|
|
7893
|
-
var
|
|
7894
|
-
|
|
7896
|
+
var getCodeValues = (codeValues, nodePath) => {
|
|
7897
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
7898
|
+
if (!status) {
|
|
7899
|
+
return;
|
|
7900
|
+
}
|
|
7901
|
+
if (!status.canUpdate) {
|
|
7902
|
+
return;
|
|
7903
|
+
}
|
|
7904
|
+
return status.props;
|
|
7905
|
+
};
|
|
7906
|
+
var getIsJsxInMapCallback = (codeValues, nodePath) => {
|
|
7907
|
+
const status = codeValues[nodePathToString(nodePath)];
|
|
7908
|
+
if (!status) {
|
|
7909
|
+
return false;
|
|
7910
|
+
}
|
|
7911
|
+
if (!status.canUpdate) {
|
|
7912
|
+
return false;
|
|
7913
|
+
}
|
|
7914
|
+
return status.jsxInMapCallback;
|
|
7915
|
+
};
|
|
7916
|
+
var VisualModeGettersContext = React12.createContext({
|
|
7917
|
+
getDragOverrides: () => {
|
|
7918
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
7919
|
+
},
|
|
7920
|
+
getCodeValues: () => {
|
|
7921
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
7922
|
+
},
|
|
7923
|
+
getIsJsxInMapCallback: () => {
|
|
7924
|
+
throw new Error("VisualModeGettersContext not initialized");
|
|
7925
|
+
},
|
|
7926
|
+
visualModeEnabled: false
|
|
7927
|
+
});
|
|
7928
|
+
var VisualModeSettersContext = React12.createContext({
|
|
7895
7929
|
setDragOverrides: () => {
|
|
7896
|
-
throw new Error("
|
|
7930
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
7897
7931
|
},
|
|
7898
7932
|
clearDragOverrides: () => {
|
|
7899
|
-
throw new Error("
|
|
7933
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
7900
7934
|
},
|
|
7901
|
-
codeValues: {},
|
|
7902
7935
|
setCodeValues: () => {
|
|
7903
|
-
throw new Error("
|
|
7904
|
-
}
|
|
7905
|
-
visualModeEnabled: false
|
|
7936
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
7937
|
+
}
|
|
7906
7938
|
});
|
|
7907
7939
|
var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
7908
7940
|
const [sequences, setSequences] = useState4([]);
|
|
@@ -7911,39 +7943,33 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
7911
7943
|
const controlOverridesRef = useRef6(dragOverrides);
|
|
7912
7944
|
controlOverridesRef.current = dragOverrides;
|
|
7913
7945
|
const [codeValues, setCodeValuesMapState] = useState4({});
|
|
7914
|
-
const setDragOverrides = useCallback5((
|
|
7946
|
+
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
7915
7947
|
setControlOverrides((prev) => ({
|
|
7916
7948
|
...prev,
|
|
7917
|
-
[
|
|
7918
|
-
...prev[
|
|
7949
|
+
[nodePathToString(nodePath)]: {
|
|
7950
|
+
...prev[nodePathToString(nodePath)],
|
|
7919
7951
|
[key]: value
|
|
7920
7952
|
}
|
|
7921
7953
|
}));
|
|
7922
7954
|
}, []);
|
|
7923
|
-
const clearDragOverrides = useCallback5((
|
|
7955
|
+
const clearDragOverrides = useCallback5((nodePath) => {
|
|
7924
7956
|
setControlOverrides((prev) => {
|
|
7925
|
-
|
|
7957
|
+
const key = nodePathToString(nodePath);
|
|
7958
|
+
if (!prev[key]) {
|
|
7926
7959
|
return prev;
|
|
7927
7960
|
}
|
|
7928
7961
|
const next = { ...prev };
|
|
7929
|
-
delete next[
|
|
7962
|
+
delete next[key];
|
|
7930
7963
|
return next;
|
|
7931
7964
|
});
|
|
7932
7965
|
}, []);
|
|
7933
|
-
const setCodeValues = useCallback5((
|
|
7966
|
+
const setCodeValues = useCallback5((nodePath, values) => {
|
|
7934
7967
|
setCodeValuesMapState((prev) => {
|
|
7935
|
-
|
|
7968
|
+
const key = nodePathToString(nodePath);
|
|
7969
|
+
if (prev[key] === values) {
|
|
7936
7970
|
return prev;
|
|
7937
7971
|
}
|
|
7938
|
-
|
|
7939
|
-
if (!(sequenceId in prev)) {
|
|
7940
|
-
return prev;
|
|
7941
|
-
}
|
|
7942
|
-
const next = { ...prev };
|
|
7943
|
-
delete next[sequenceId];
|
|
7944
|
-
return next;
|
|
7945
|
-
}
|
|
7946
|
-
return { ...prev, [sequenceId]: values };
|
|
7972
|
+
return { ...prev, [key]: values };
|
|
7947
7973
|
});
|
|
7948
7974
|
}, []);
|
|
7949
7975
|
const registerSequence = useCallback5((seq) => {
|
|
@@ -7967,30 +7993,31 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
|
|
|
7967
7993
|
setHidden
|
|
7968
7994
|
};
|
|
7969
7995
|
}, [hidden]);
|
|
7970
|
-
const
|
|
7996
|
+
const gettersContext = useMemo14(() => {
|
|
7971
7997
|
return {
|
|
7972
7998
|
visualModeEnabled,
|
|
7973
|
-
dragOverrides,
|
|
7999
|
+
getDragOverrides: (nodePath) => dragOverrides[nodePathToString(nodePath)] ?? {},
|
|
8000
|
+
getCodeValues: (nodePath) => getCodeValues(codeValues, nodePath),
|
|
8001
|
+
getIsJsxInMapCallback: (nodePath) => getIsJsxInMapCallback(codeValues, nodePath)
|
|
8002
|
+
};
|
|
8003
|
+
}, [visualModeEnabled, dragOverrides, codeValues]);
|
|
8004
|
+
const settersContext = useMemo14(() => {
|
|
8005
|
+
return {
|
|
7974
8006
|
setDragOverrides,
|
|
7975
8007
|
clearDragOverrides,
|
|
7976
|
-
codeValues,
|
|
7977
8008
|
setCodeValues
|
|
7978
8009
|
};
|
|
7979
|
-
}, [
|
|
7980
|
-
visualModeEnabled,
|
|
7981
|
-
dragOverrides,
|
|
7982
|
-
setDragOverrides,
|
|
7983
|
-
clearDragOverrides,
|
|
7984
|
-
codeValues,
|
|
7985
|
-
setCodeValues
|
|
7986
|
-
]);
|
|
8010
|
+
}, [setDragOverrides, clearDragOverrides, setCodeValues]);
|
|
7987
8011
|
return /* @__PURE__ */ jsx112(SequenceManager.Provider, {
|
|
7988
8012
|
value: sequenceContext,
|
|
7989
8013
|
children: /* @__PURE__ */ jsx112(SequenceVisibilityToggleContext.Provider, {
|
|
7990
8014
|
value: hiddenContext,
|
|
7991
|
-
children: /* @__PURE__ */ jsx112(
|
|
7992
|
-
value:
|
|
7993
|
-
children
|
|
8015
|
+
children: /* @__PURE__ */ jsx112(VisualModeGettersContext.Provider, {
|
|
8016
|
+
value: gettersContext,
|
|
8017
|
+
children: /* @__PURE__ */ jsx112(VisualModeSettersContext.Provider, {
|
|
8018
|
+
value: settersContext,
|
|
8019
|
+
children
|
|
8020
|
+
})
|
|
7994
8021
|
})
|
|
7995
8022
|
})
|
|
7996
8023
|
});
|
|
@@ -8035,6 +8062,14 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
8035
8062
|
}
|
|
8036
8063
|
return out;
|
|
8037
8064
|
};
|
|
8065
|
+
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
8066
|
+
overrideIdToNodePathMappings: {}
|
|
8067
|
+
});
|
|
8068
|
+
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
8069
|
+
setOverrideIdToNodePath: () => {
|
|
8070
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
8071
|
+
}
|
|
8072
|
+
});
|
|
8038
8073
|
var getEffectiveVisualModeValue = ({
|
|
8039
8074
|
codeValue,
|
|
8040
8075
|
runtimeValue,
|
|
@@ -8139,6 +8174,7 @@ var mergeValues = ({
|
|
|
8139
8174
|
}
|
|
8140
8175
|
return merged;
|
|
8141
8176
|
};
|
|
8177
|
+
var stackToOverrideMap = {};
|
|
8142
8178
|
var wrapInSchema = (Component, schema) => {
|
|
8143
8179
|
if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
|
|
8144
8180
|
return Component;
|
|
@@ -8147,7 +8183,8 @@ var wrapInSchema = (Component, schema) => {
|
|
|
8147
8183
|
const flatKeys = Object.keys(flatSchema);
|
|
8148
8184
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8149
8185
|
const env = useRemotionEnvironment();
|
|
8150
|
-
const { visualModeEnabled,
|
|
8186
|
+
const { visualModeEnabled, getDragOverrides, getCodeValues: getCodeValues2 } = useContext15(VisualModeGettersContext);
|
|
8187
|
+
const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
8151
8188
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
|
|
8152
8189
|
return React13.createElement(Component, {
|
|
8153
8190
|
...props,
|
|
@@ -8161,7 +8198,20 @@ var wrapInSchema = (Component, schema) => {
|
|
|
8161
8198
|
ref
|
|
8162
8199
|
});
|
|
8163
8200
|
}
|
|
8164
|
-
const [overrideId] = useState5(() =>
|
|
8201
|
+
const [overrideId] = useState5(() => {
|
|
8202
|
+
const { stack } = props;
|
|
8203
|
+
if (!stack) {
|
|
8204
|
+
return String(Math.random());
|
|
8205
|
+
}
|
|
8206
|
+
const existingOverrideId = stackToOverrideMap[stack];
|
|
8207
|
+
if (existingOverrideId) {
|
|
8208
|
+
return existingOverrideId;
|
|
8209
|
+
}
|
|
8210
|
+
const newOverrideId = String(Math.random());
|
|
8211
|
+
stackToOverrideMap[stack] = newOverrideId;
|
|
8212
|
+
return newOverrideId;
|
|
8213
|
+
});
|
|
8214
|
+
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
8165
8215
|
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
8166
8216
|
const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
8167
8217
|
const controls = useMemo15(() => {
|
|
@@ -8175,10 +8225,15 @@ var wrapInSchema = (Component, schema) => {
|
|
|
8175
8225
|
return computeEffectiveSchemaValuesDotNotation({
|
|
8176
8226
|
schema,
|
|
8177
8227
|
currentValue: currentRuntimeValueDotNotation,
|
|
8178
|
-
overrideValues:
|
|
8179
|
-
propStatus:
|
|
8228
|
+
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
8229
|
+
propStatus: nodePath === null ? undefined : getCodeValues2(nodePath)
|
|
8180
8230
|
});
|
|
8181
|
-
}, [
|
|
8231
|
+
}, [
|
|
8232
|
+
currentRuntimeValueDotNotation,
|
|
8233
|
+
getDragOverrides,
|
|
8234
|
+
nodePath,
|
|
8235
|
+
getCodeValues2
|
|
8236
|
+
]);
|
|
8182
8237
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
8183
8238
|
const mergedProps = mergeValues({
|
|
8184
8239
|
props,
|
|
@@ -8842,7 +8897,7 @@ var defaultOnPaint = ({
|
|
|
8842
8897
|
const transform = ctx.drawElementImage(elementImage, 0, 0);
|
|
8843
8898
|
element.style.transform = transform.toString();
|
|
8844
8899
|
};
|
|
8845
|
-
var HtmlInCanvasAncestorContext =
|
|
8900
|
+
var HtmlInCanvasAncestorContext = createContext16(false);
|
|
8846
8901
|
var HtmlInCanvasInner = forwardRef5(({
|
|
8847
8902
|
width,
|
|
8848
8903
|
height,
|
|
@@ -9059,7 +9114,7 @@ var validateRenderAsset = (artifact) => {
|
|
|
9059
9114
|
}
|
|
9060
9115
|
validateContent(artifact.content);
|
|
9061
9116
|
};
|
|
9062
|
-
var RenderAssetManager =
|
|
9117
|
+
var RenderAssetManager = createContext17({
|
|
9063
9118
|
registerRenderAsset: () => {
|
|
9064
9119
|
return;
|
|
9065
9120
|
},
|
|
@@ -9197,7 +9252,7 @@ var calculateMediaDuration = ({
|
|
|
9197
9252
|
const actualDuration = duration / playbackRate;
|
|
9198
9253
|
return Math.floor(actualDuration);
|
|
9199
9254
|
};
|
|
9200
|
-
var LoopContext =
|
|
9255
|
+
var LoopContext = createContext18(null);
|
|
9201
9256
|
var useLoop = () => {
|
|
9202
9257
|
return React17.useContext(LoopContext);
|
|
9203
9258
|
};
|
|
@@ -9268,7 +9323,7 @@ var playbackLogging = ({
|
|
|
9268
9323
|
const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
|
|
9269
9324
|
Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
|
|
9270
9325
|
};
|
|
9271
|
-
var PreloadContext =
|
|
9326
|
+
var PreloadContext = createContext19({});
|
|
9272
9327
|
var preloads = {};
|
|
9273
9328
|
var updaters = [];
|
|
9274
9329
|
var setPreloads = (updater) => {
|
|
@@ -9589,7 +9644,7 @@ var durationReducer = (state, action) => {
|
|
|
9589
9644
|
return state;
|
|
9590
9645
|
}
|
|
9591
9646
|
};
|
|
9592
|
-
var DurationsContext =
|
|
9647
|
+
var DurationsContext = createContext20({
|
|
9593
9648
|
durations: {},
|
|
9594
9649
|
setDurations: () => {
|
|
9595
9650
|
throw new Error("context missing");
|
|
@@ -9755,11 +9810,6 @@ var useSingletonAudioContext = ({
|
|
|
9755
9810
|
gainNode
|
|
9756
9811
|
};
|
|
9757
9812
|
}, [logLevel, latencyHint, env.isRendering, audioEnabled]);
|
|
9758
|
-
useEffect8(() => {
|
|
9759
|
-
return () => {
|
|
9760
|
-
context?.audioContext?.close();
|
|
9761
|
-
};
|
|
9762
|
-
}, [context]);
|
|
9763
9813
|
return context;
|
|
9764
9814
|
};
|
|
9765
9815
|
var waitUntilActuallyResumed = (audioContext, logLevel) => {
|
|
@@ -9808,8 +9858,8 @@ var didPropChange = (key, newProp, prevProp) => {
|
|
|
9808
9858
|
}
|
|
9809
9859
|
return true;
|
|
9810
9860
|
};
|
|
9811
|
-
var SharedAudioContext =
|
|
9812
|
-
var SharedAudioTagsContext =
|
|
9861
|
+
var SharedAudioContext = createContext21(null);
|
|
9862
|
+
var SharedAudioTagsContext = createContext21(null);
|
|
9813
9863
|
var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
|
|
9814
9864
|
const logLevel = useLogLevel();
|
|
9815
9865
|
const ctxAndGain = useSingletonAudioContext({
|
|
@@ -9854,8 +9904,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9854
9904
|
if (!ctxAndGain) {
|
|
9855
9905
|
throw new Error("Audio context not found");
|
|
9856
9906
|
}
|
|
9907
|
+
const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
|
|
9857
9908
|
if (duration > 0) {
|
|
9858
|
-
if (
|
|
9909
|
+
if (saveForLater) {
|
|
9859
9910
|
nodesToResume.current.set(node, {
|
|
9860
9911
|
scheduledTime,
|
|
9861
9912
|
offset,
|
|
@@ -9873,7 +9924,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9873
9924
|
const prev = prevEndTimes.current;
|
|
9874
9925
|
const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
|
|
9875
9926
|
const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
|
|
9876
|
-
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "");
|
|
9927
|
+
Log.verbose({ logLevel, tag: "audio-scheduling" }, "scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s %s %s", scheduledMismatch ? "color: red; font-weight: bold" : "", scheduledTime.toFixed(4), "", scheduledEndTime.toFixed(4), mediaMismatch ? "color: red; font-weight: bold" : "", mediaTime.toFixed(4), "", mediaEndTime.toFixed(4), duration < 0 ? "color: red; font-weight: bold" : timeDiff < 0 ? "color: red; font-weight: bold" : "color: blue; font-weight: bold", duration < 0 ? "missed " + Math.abs(offset).toFixed(2) + "s" : Math.abs(timeDiff).toFixed(2) + (timeDiff < 0 ? " delay" : " ahead"), "", "current=" + currentTime.toFixed(4), "actualcurrent=" + ctxAndGain.audioContext.currentTime.toFixed(4), "offset=" + offset.toFixed(4), "latency=" + latency.toFixed(4), "state=" + ctxAndGain.audioContext.state, originalUnloopedMediaTimestamp !== mediaTime ? "original_ts=" + originalUnloopedMediaTimestamp.toFixed(4) : "", "action=" + (saveForLater ? "schedule" : "start"), "");
|
|
9877
9928
|
prev.scheduledEndTime = scheduledEndTime;
|
|
9878
9929
|
prev.mediaEndTime = mediaEndTime;
|
|
9879
9930
|
return duration > 0 ? {
|
|
@@ -9893,6 +9944,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9893
9944
|
return Promise.resolve();
|
|
9894
9945
|
}
|
|
9895
9946
|
audioContextIsPlayingEventually.current = true;
|
|
9947
|
+
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
9948
|
+
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
9949
|
+
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
9950
|
+
nodesToResume.current.forEach((r2, node) => {
|
|
9951
|
+
node.start(r2.scheduledTime, r2.offset, r2.duration);
|
|
9952
|
+
});
|
|
9953
|
+
nodesToResume.current.clear();
|
|
9896
9954
|
const resumePromise = ctxAndGain.audioContext.resume();
|
|
9897
9955
|
isResuming.current = new Promise((resolve) => {
|
|
9898
9956
|
waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
|
|
@@ -9903,11 +9961,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
9903
9961
|
}).finally(() => {
|
|
9904
9962
|
isResuming.current = null;
|
|
9905
9963
|
});
|
|
9906
|
-
ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
|
|
9907
|
-
ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
|
|
9908
|
-
ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
|
|
9909
|
-
nodesToResume.current.forEach((r2, node) => node.start(r2.scheduledTime, r2.offset, r2.duration));
|
|
9910
|
-
nodesToResume.current.clear();
|
|
9911
9964
|
return resumePromise.catch(() => {});
|
|
9912
9965
|
}, [ctxAndGain, logLevel]);
|
|
9913
9966
|
const getIsResumingAudioContext = useCallback9(() => {
|
|
@@ -10490,7 +10543,7 @@ var useBasicMediaInTimeline = ({
|
|
|
10490
10543
|
});
|
|
10491
10544
|
}).join(",");
|
|
10492
10545
|
}, [duration, mediaStartsAt, volume, mediaVolume]);
|
|
10493
|
-
|
|
10546
|
+
useEffect8(() => {
|
|
10494
10547
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
10495
10548
|
warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
|
|
10496
10549
|
}
|
|
@@ -10553,7 +10606,7 @@ var useImageInTimeline = ({
|
|
|
10553
10606
|
loop: false
|
|
10554
10607
|
});
|
|
10555
10608
|
const { isStudio } = useRemotionEnvironment();
|
|
10556
|
-
|
|
10609
|
+
useEffect8(() => {
|
|
10557
10610
|
if (!src) {
|
|
10558
10611
|
throw new Error("No src passed");
|
|
10559
10612
|
}
|
|
@@ -10636,7 +10689,7 @@ var useMediaInTimeline = ({
|
|
|
10636
10689
|
loop: false
|
|
10637
10690
|
});
|
|
10638
10691
|
const { isStudio } = useRemotionEnvironment();
|
|
10639
|
-
|
|
10692
|
+
useEffect8(() => {
|
|
10640
10693
|
if (!src) {
|
|
10641
10694
|
throw new Error("No src passed");
|
|
10642
10695
|
}
|
|
@@ -10709,9 +10762,14 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10709
10762
|
}
|
|
10710
10763
|
};
|
|
10711
10764
|
}
|
|
10765
|
+
let unblocked = false;
|
|
10712
10766
|
setBlocks((b) => [...b, block]);
|
|
10713
10767
|
return {
|
|
10714
10768
|
unblock: () => {
|
|
10769
|
+
if (unblocked) {
|
|
10770
|
+
return;
|
|
10771
|
+
}
|
|
10772
|
+
unblocked = true;
|
|
10715
10773
|
setBlocks((b) => {
|
|
10716
10774
|
const newArr = b.filter((bx) => bx !== block);
|
|
10717
10775
|
if (newArr.length === b.length) {
|
|
@@ -10738,7 +10796,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
10738
10796
|
}
|
|
10739
10797
|
};
|
|
10740
10798
|
}, []);
|
|
10741
|
-
|
|
10799
|
+
useEffect9(() => {
|
|
10742
10800
|
if (rendering) {
|
|
10743
10801
|
return;
|
|
10744
10802
|
}
|
|
@@ -10783,7 +10841,7 @@ var BufferingProvider = ({ children }) => {
|
|
|
10783
10841
|
};
|
|
10784
10842
|
var useIsPlayerBuffering = (bufferManager) => {
|
|
10785
10843
|
const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
|
|
10786
|
-
|
|
10844
|
+
useEffect9(() => {
|
|
10787
10845
|
const onBuffer = () => {
|
|
10788
10846
|
setIsBuffering(true);
|
|
10789
10847
|
};
|
|
@@ -10805,18 +10863,30 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
10805
10863
|
};
|
|
10806
10864
|
var useBufferState = () => {
|
|
10807
10865
|
const buffer = useContext25(BufferingContextReact);
|
|
10866
|
+
const logLevel = useLogLevel();
|
|
10808
10867
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
10809
10868
|
return useMemo25(() => ({
|
|
10810
10869
|
delayPlayback: () => {
|
|
10811
10870
|
if (!addBlock) {
|
|
10812
10871
|
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");
|
|
10813
10872
|
}
|
|
10873
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
|
|
10814
10874
|
const { unblock } = addBlock({
|
|
10815
10875
|
id: String(Math.random())
|
|
10816
10876
|
});
|
|
10817
|
-
|
|
10877
|
+
let unblocked = false;
|
|
10878
|
+
return {
|
|
10879
|
+
unblock: () => {
|
|
10880
|
+
if (unblocked) {
|
|
10881
|
+
return;
|
|
10882
|
+
}
|
|
10883
|
+
unblocked = true;
|
|
10884
|
+
Log.trace({ logLevel, tag: "[buffer-state]" }, "Removing buffer handle");
|
|
10885
|
+
unblock();
|
|
10886
|
+
}
|
|
10887
|
+
};
|
|
10818
10888
|
}
|
|
10819
|
-
}), [addBlock]);
|
|
10889
|
+
}), [addBlock, logLevel]);
|
|
10820
10890
|
};
|
|
10821
10891
|
var isSafariWebkit = () => {
|
|
10822
10892
|
const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
|
|
@@ -10952,7 +11022,7 @@ var useMediaBuffering = ({
|
|
|
10952
11022
|
}) => {
|
|
10953
11023
|
const buffer = useBufferState();
|
|
10954
11024
|
const [isBuffering, setIsBuffering] = useState15(false);
|
|
10955
|
-
|
|
11025
|
+
useEffect10(() => {
|
|
10956
11026
|
let cleanupFns = [];
|
|
10957
11027
|
const { current } = element;
|
|
10958
11028
|
if (!current) {
|
|
@@ -11085,7 +11155,7 @@ var useRequestVideoCallbackTime = ({
|
|
|
11085
11155
|
onVariableFpsVideoDetected
|
|
11086
11156
|
}) => {
|
|
11087
11157
|
const currentTime = useRef16(null);
|
|
11088
|
-
|
|
11158
|
+
useEffect11(() => {
|
|
11089
11159
|
const { current } = mediaRef;
|
|
11090
11160
|
if (current) {
|
|
11091
11161
|
currentTime.current = {
|
|
@@ -11371,7 +11441,7 @@ var useMediaPlayback = ({
|
|
|
11371
11441
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
11372
11442
|
})();
|
|
11373
11443
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
11374
|
-
|
|
11444
|
+
useEffect12(() => {
|
|
11375
11445
|
if (mediaRef.current?.paused) {
|
|
11376
11446
|
return;
|
|
11377
11447
|
}
|
|
@@ -11416,7 +11486,7 @@ var useMediaPlayback = ({
|
|
|
11416
11486
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
11417
11487
|
}
|
|
11418
11488
|
}, [mediaRef, playbackRate]);
|
|
11419
|
-
|
|
11489
|
+
useEffect12(() => {
|
|
11420
11490
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
11421
11491
|
if (!mediaRef.current) {
|
|
11422
11492
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -11545,7 +11615,7 @@ var useMediaTag = ({
|
|
|
11545
11615
|
const logLevel = useLogLevel();
|
|
11546
11616
|
const mountTime = useMountTime();
|
|
11547
11617
|
const env = useRemotionEnvironment();
|
|
11548
|
-
|
|
11618
|
+
useEffect13(() => {
|
|
11549
11619
|
const tag = {
|
|
11550
11620
|
id,
|
|
11551
11621
|
play: (reason) => {
|
|
@@ -11584,11 +11654,11 @@ var useMediaTag = ({
|
|
|
11584
11654
|
env.isPlayer
|
|
11585
11655
|
]);
|
|
11586
11656
|
};
|
|
11587
|
-
var MediaVolumeContext =
|
|
11657
|
+
var MediaVolumeContext = createContext22({
|
|
11588
11658
|
mediaMuted: false,
|
|
11589
11659
|
mediaVolume: 1
|
|
11590
11660
|
});
|
|
11591
|
-
var SetMediaVolumeContext =
|
|
11661
|
+
var SetMediaVolumeContext = createContext22({
|
|
11592
11662
|
setMediaMuted: () => {
|
|
11593
11663
|
throw new Error("default");
|
|
11594
11664
|
},
|
|
@@ -11764,7 +11834,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
11764
11834
|
}, [audioRef]);
|
|
11765
11835
|
const currentOnDurationCallback = useRef18(onDuration);
|
|
11766
11836
|
currentOnDurationCallback.current = onDuration;
|
|
11767
|
-
|
|
11837
|
+
useEffect14(() => {
|
|
11768
11838
|
const { current } = audioRef;
|
|
11769
11839
|
if (!current) {
|
|
11770
11840
|
return;
|
|
@@ -11833,7 +11903,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
11833
11903
|
useImperativeHandle5(ref, () => {
|
|
11834
11904
|
return audioRef.current;
|
|
11835
11905
|
}, []);
|
|
11836
|
-
|
|
11906
|
+
useEffect15(() => {
|
|
11837
11907
|
if (!props.src) {
|
|
11838
11908
|
throw new Error("No src passed");
|
|
11839
11909
|
}
|
|
@@ -12422,7 +12492,7 @@ var waitForRoot = (fn) => {
|
|
|
12422
12492
|
listeners = listeners.filter((l) => l !== fn);
|
|
12423
12493
|
};
|
|
12424
12494
|
};
|
|
12425
|
-
var MediaEnabledContext =
|
|
12495
|
+
var MediaEnabledContext = createContext23(null);
|
|
12426
12496
|
var useVideoEnabled = () => {
|
|
12427
12497
|
const context = useContext32(MediaEnabledContext);
|
|
12428
12498
|
if (!context) {
|
|
@@ -12704,7 +12774,7 @@ var setupEnvVariables = () => {
|
|
|
12704
12774
|
});
|
|
12705
12775
|
};
|
|
12706
12776
|
var CurrentScaleContext = React32.createContext(null);
|
|
12707
|
-
var PreviewSizeContext =
|
|
12777
|
+
var PreviewSizeContext = createContext24({
|
|
12708
12778
|
setSize: () => {
|
|
12709
12779
|
return;
|
|
12710
12780
|
},
|
|
@@ -12727,14 +12797,6 @@ var calculateScale = ({
|
|
|
12727
12797
|
}
|
|
12728
12798
|
return Number(previewSize);
|
|
12729
12799
|
};
|
|
12730
|
-
var useSequenceControlOverride = (key) => {
|
|
12731
|
-
const seqContext = useContext33(SequenceContext);
|
|
12732
|
-
const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
|
|
12733
|
-
if (!seqContext) {
|
|
12734
|
-
return;
|
|
12735
|
-
}
|
|
12736
|
-
return overrides[seqContext.id]?.[key];
|
|
12737
|
-
};
|
|
12738
12800
|
var getOffthreadVideoSource = ({
|
|
12739
12801
|
src,
|
|
12740
12802
|
transparent,
|
|
@@ -12766,9 +12828,9 @@ var OffthreadVideoForRendering = ({
|
|
|
12766
12828
|
const frame = useCurrentFrame();
|
|
12767
12829
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
12768
12830
|
const videoConfig = useUnsafeVideoConfig();
|
|
12769
|
-
const sequenceContext =
|
|
12831
|
+
const sequenceContext = useContext33(SequenceContext);
|
|
12770
12832
|
const mediaStartsAt = useMediaStartsAt();
|
|
12771
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
12833
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
|
|
12772
12834
|
if (!src) {
|
|
12773
12835
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
12774
12836
|
}
|
|
@@ -12787,7 +12849,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12787
12849
|
mediaVolume: 1
|
|
12788
12850
|
});
|
|
12789
12851
|
warnAboutTooHighVolume(volume);
|
|
12790
|
-
|
|
12852
|
+
useEffect16(() => {
|
|
12791
12853
|
if (!src) {
|
|
12792
12854
|
throw new Error("No src passed");
|
|
12793
12855
|
}
|
|
@@ -12948,7 +13010,7 @@ var useEmitVideoFrame = ({
|
|
|
12948
13010
|
ref,
|
|
12949
13011
|
onVideoFrame
|
|
12950
13012
|
}) => {
|
|
12951
|
-
|
|
13013
|
+
useEffect17(() => {
|
|
12952
13014
|
const { current } = ref;
|
|
12953
13015
|
if (!current) {
|
|
12954
13016
|
return;
|
|
@@ -12980,7 +13042,7 @@ class MediaPlaybackError extends Error {
|
|
|
12980
13042
|
}
|
|
12981
13043
|
}
|
|
12982
13044
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
12983
|
-
const context =
|
|
13045
|
+
const context = useContext34(SharedAudioContext);
|
|
12984
13046
|
if (!context) {
|
|
12985
13047
|
throw new Error("SharedAudioContext not found");
|
|
12986
13048
|
}
|
|
@@ -13036,8 +13098,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13036
13098
|
}
|
|
13037
13099
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
13038
13100
|
const { fps, durationInFrames } = useVideoConfig();
|
|
13039
|
-
const parentSequence =
|
|
13040
|
-
const { hidden } =
|
|
13101
|
+
const parentSequence = useContext34(SequenceContext);
|
|
13102
|
+
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
13041
13103
|
const logLevel = useLogLevel();
|
|
13042
13104
|
const mountTime = useMountTime();
|
|
13043
13105
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
@@ -13112,7 +13174,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13112
13174
|
tag: "video",
|
|
13113
13175
|
mountTime
|
|
13114
13176
|
}));
|
|
13115
|
-
|
|
13177
|
+
useEffect18(() => {
|
|
13116
13178
|
const { current } = videoRef;
|
|
13117
13179
|
if (!current) {
|
|
13118
13180
|
return;
|
|
@@ -13155,7 +13217,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13155
13217
|
const currentOnDurationCallback = useRef22(onDuration);
|
|
13156
13218
|
currentOnDurationCallback.current = onDuration;
|
|
13157
13219
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
13158
|
-
|
|
13220
|
+
useEffect18(() => {
|
|
13159
13221
|
const { current } = videoRef;
|
|
13160
13222
|
if (!current) {
|
|
13161
13223
|
return;
|
|
@@ -13172,7 +13234,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
13172
13234
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
13173
13235
|
};
|
|
13174
13236
|
}, [src]);
|
|
13175
|
-
|
|
13237
|
+
useEffect18(() => {
|
|
13176
13238
|
const { current } = videoRef;
|
|
13177
13239
|
if (!current) {
|
|
13178
13240
|
return;
|
|
@@ -13461,7 +13523,8 @@ var Internals = {
|
|
|
13461
13523
|
VideoForPreview,
|
|
13462
13524
|
CompositionManager,
|
|
13463
13525
|
CompositionSetters,
|
|
13464
|
-
|
|
13526
|
+
VisualModeGettersContext,
|
|
13527
|
+
VisualModeSettersContext,
|
|
13465
13528
|
SequenceManager,
|
|
13466
13529
|
SequenceStackTracesUpdateContext,
|
|
13467
13530
|
SequenceVisibilityToggleContext,
|
|
@@ -13470,7 +13533,6 @@ var Internals = {
|
|
|
13470
13533
|
sequenceStyleSchema,
|
|
13471
13534
|
flattenActiveSchema,
|
|
13472
13535
|
getFlatSchemaWithAllKeys,
|
|
13473
|
-
useSequenceControlOverride,
|
|
13474
13536
|
RemotionRootContexts,
|
|
13475
13537
|
CompositionManagerProvider,
|
|
13476
13538
|
useVideo,
|
|
@@ -13563,7 +13625,9 @@ var Internals = {
|
|
|
13563
13625
|
useMemoizedEffects,
|
|
13564
13626
|
defineEffect,
|
|
13565
13627
|
createDescriptor,
|
|
13566
|
-
computeEffectiveSchemaValuesDotNotation
|
|
13628
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
13629
|
+
OverrideIdsToNodePathsGettersContext,
|
|
13630
|
+
OverrideIdsToNodePathsSettersContext
|
|
13567
13631
|
};
|
|
13568
13632
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
13569
13633
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -13601,7 +13665,7 @@ var flattenChildren = (children) => {
|
|
|
13601
13665
|
return flatChildren;
|
|
13602
13666
|
}, []);
|
|
13603
13667
|
};
|
|
13604
|
-
var IsInsideSeriesContext =
|
|
13668
|
+
var IsInsideSeriesContext = createContext25(false);
|
|
13605
13669
|
var IsInsideSeriesContainer = ({ children }) => {
|
|
13606
13670
|
return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
|
|
13607
13671
|
value: true,
|
|
@@ -13643,9 +13707,6 @@ var SeriesInner = (props2) => {
|
|
|
13643
13707
|
throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
|
|
13644
13708
|
}
|
|
13645
13709
|
const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
|
|
13646
|
-
if (!castedChild?.props.children) {
|
|
13647
|
-
throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
|
|
13648
|
-
}
|
|
13649
13710
|
const durationInFramesProp = castedChild.props.durationInFrames;
|
|
13650
13711
|
const {
|
|
13651
13712
|
durationInFrames,
|
|
@@ -14161,13 +14222,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14161
14222
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
14162
14223
|
const videoConfig = useUnsafeVideoConfig();
|
|
14163
14224
|
const videoRef = useRef23(null);
|
|
14164
|
-
const sequenceContext =
|
|
14225
|
+
const sequenceContext = useContext35(SequenceContext);
|
|
14165
14226
|
const mediaStartsAt = useMediaStartsAt();
|
|
14166
14227
|
const environment = useRemotionEnvironment();
|
|
14167
14228
|
const logLevel = useLogLevel();
|
|
14168
14229
|
const mountTime = useMountTime();
|
|
14169
14230
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
14170
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
14231
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
|
|
14171
14232
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
14172
14233
|
props2.src,
|
|
14173
14234
|
sequenceContext?.cumulatedFrom,
|
|
@@ -14183,7 +14244,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14183
14244
|
mediaVolume: 1
|
|
14184
14245
|
});
|
|
14185
14246
|
warnAboutTooHighVolume(volume);
|
|
14186
|
-
|
|
14247
|
+
useEffect19(() => {
|
|
14187
14248
|
if (!props2.src) {
|
|
14188
14249
|
throw new Error("No src passed");
|
|
14189
14250
|
}
|
|
@@ -14226,7 +14287,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
14226
14287
|
useImperativeHandle9(ref, () => {
|
|
14227
14288
|
return videoRef.current;
|
|
14228
14289
|
}, []);
|
|
14229
|
-
|
|
14290
|
+
useEffect19(() => {
|
|
14230
14291
|
if (!window.remotion_videoEnabled) {
|
|
14231
14292
|
return;
|
|
14232
14293
|
}
|
|
@@ -14377,7 +14438,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
14377
14438
|
if (environment.isClientSideRendering) {
|
|
14378
14439
|
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");
|
|
14379
14440
|
}
|
|
14380
|
-
const { durations, setDurations } =
|
|
14441
|
+
const { durations, setDurations } = useContext36(DurationsContext);
|
|
14381
14442
|
if (typeof ref === "string") {
|
|
14382
14443
|
throw new Error("string refs are not supported");
|
|
14383
14444
|
}
|
|
@@ -14747,7 +14808,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
14747
14808
|
isActive: false
|
|
14748
14809
|
});
|
|
14749
14810
|
const eventTarget = useMemo38(() => new EventTarget, []);
|
|
14750
|
-
|
|
14811
|
+
useEffect20(() => {
|
|
14751
14812
|
if (disabled) {
|
|
14752
14813
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
14753
14814
|
} else {
|
|
@@ -14894,7 +14955,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
14894
14955
|
var lastCoordinates = null;
|
|
14895
14956
|
var useMousePosition = (ref) => {
|
|
14896
14957
|
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
14897
|
-
|
|
14958
|
+
useEffect20(() => {
|
|
14898
14959
|
const element = ref.current;
|
|
14899
14960
|
if (!element) {
|
|
14900
14961
|
return;
|