@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/design.js CHANGED
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
1378
1378
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1379
1379
 
1380
1380
  // ../design/dist/esm/index.mjs
1381
- import React33, { useEffect as useEffect21, useMemo as useMemo38, useState as useState23 } from "react";
1381
+ import React33, { useEffect as useEffect20, useMemo as useMemo38, useState as useState23 } from "react";
1382
1382
 
1383
1383
  // ../paths/dist/esm/index.mjs
1384
1384
  var cutLInstruction = ({
@@ -5773,6 +5773,7 @@ import { createContext as createContext14 } from "react";
5773
5773
  import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
5774
5774
  import { jsx as jsx112 } from "react/jsx-runtime";
5775
5775
  import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
5776
+ import { createContext as createContext15 } from "react";
5776
5777
  import { jsx as jsx12 } from "react/jsx-runtime";
5777
5778
  import {
5778
5779
  forwardRef as forwardRef4,
@@ -5786,7 +5787,7 @@ import React15, { useCallback as useCallback6, useImperativeHandle, useRef as us
5786
5787
  import { jsx as jsx13 } from "react/jsx-runtime";
5787
5788
  import { jsx as jsx14 } from "react/jsx-runtime";
5788
5789
  import {
5789
- createContext as createContext15,
5790
+ createContext as createContext16,
5790
5791
  forwardRef as forwardRef5,
5791
5792
  useCallback as useCallback7,
5792
5793
  useContext as useContext17,
@@ -5798,7 +5799,7 @@ import {
5798
5799
  import { jsx as jsx15 } from "react/jsx-runtime";
5799
5800
  import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
5800
5801
  import {
5801
- createContext as createContext16,
5802
+ createContext as createContext17,
5802
5803
  useCallback as useCallback8,
5803
5804
  useImperativeHandle as useImperativeHandle3,
5804
5805
  useLayoutEffect as useLayoutEffect4,
@@ -5808,17 +5809,17 @@ import {
5808
5809
  } from "react";
5809
5810
  import { jsx as jsx16 } from "react/jsx-runtime";
5810
5811
  import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
5811
- import React17, { createContext as createContext17, useMemo as useMemo19 } from "react";
5812
+ import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
5812
5813
  import { jsx as jsx17 } from "react/jsx-runtime";
5813
5814
  import { useContext as useContext19 } from "react";
5814
- import { createContext as createContext18, useEffect as useEffect7, useState as useState11 } from "react";
5815
+ import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
5815
5816
  import { jsx as jsx18 } from "react/jsx-runtime";
5816
- import { createContext as createContext19, useMemo as useMemo20, useReducer } from "react";
5817
+ import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
5817
5818
  import { jsx as jsx19 } from "react/jsx-runtime";
5818
5819
  import React23, {
5819
5820
  forwardRef as forwardRef6,
5820
5821
  useContext as useContext28,
5821
- useEffect as useEffect15,
5822
+ useEffect as useEffect14,
5822
5823
  useImperativeHandle as useImperativeHandle4,
5823
5824
  useMemo as useMemo28,
5824
5825
  useRef as useRef18,
@@ -5826,7 +5827,7 @@ import React23, {
5826
5827
  } from "react";
5827
5828
  import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
5828
5829
  import React20, {
5829
- createContext as createContext20,
5830
+ createContext as createContext21,
5830
5831
  createRef as createRef2,
5831
5832
  useCallback as useCallback9,
5832
5833
  useContext as useContext20,
@@ -5834,15 +5835,15 @@ import React20, {
5834
5835
  useRef as useRef11,
5835
5836
  useState as useState12
5836
5837
  } from "react";
5837
- import { useEffect as useEffect8, useMemo as useMemo21 } from "react";
5838
+ import { useMemo as useMemo21 } from "react";
5838
5839
  import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
5839
5840
  import { useRef as useRef12 } from "react";
5840
- import { useContext as useContext23, useEffect as useEffect9, useMemo as useMemo23, useState as useState13 } from "react";
5841
+ import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
5841
5842
  import { useContext as useContext22 } from "react";
5842
5843
  import {
5843
5844
  useCallback as useCallback12,
5844
5845
  useContext as useContext26,
5845
- useEffect as useEffect13,
5846
+ useEffect as useEffect12,
5846
5847
  useLayoutEffect as useLayoutEffect8,
5847
5848
  useRef as useRef17
5848
5849
  } from "react";
@@ -5851,7 +5852,7 @@ import { useContext as useContext25, useMemo as useMemo25 } from "react";
5851
5852
  import React21, {
5852
5853
  useCallback as useCallback10,
5853
5854
  useContext as useContext24,
5854
- useEffect as useEffect10,
5855
+ useEffect as useEffect9,
5855
5856
  useLayoutEffect as useLayoutEffect7,
5856
5857
  useMemo as useMemo24,
5857
5858
  useRef as useRef14,
@@ -5859,15 +5860,15 @@ import React21, {
5859
5860
  } from "react";
5860
5861
  import { jsx as jsx21 } from "react/jsx-runtime";
5861
5862
  import React22 from "react";
5862
- import { useEffect as useEffect11, useState as useState15 } from "react";
5863
- import { useEffect as useEffect12, useRef as useRef16 } from "react";
5864
- import { useEffect as useEffect14 } from "react";
5865
- import { createContext as createContext21, useContext as useContext27, useMemo as useMemo27 } from "react";
5863
+ import { useEffect as useEffect10, useState as useState15 } from "react";
5864
+ import { useEffect as useEffect11, useRef as useRef16 } from "react";
5865
+ import { useEffect as useEffect13 } from "react";
5866
+ import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
5866
5867
  import { jsx as jsx222 } from "react/jsx-runtime";
5867
5868
  import {
5868
5869
  forwardRef as forwardRef7,
5869
5870
  useContext as useContext29,
5870
- useEffect as useEffect16,
5871
+ useEffect as useEffect15,
5871
5872
  useImperativeHandle as useImperativeHandle5,
5872
5873
  useLayoutEffect as useLayoutEffect9,
5873
5874
  useMemo as useMemo29,
@@ -5898,17 +5899,16 @@ import {
5898
5899
  import { jsx as jsx27 } from "react/jsx-runtime";
5899
5900
  import React29 from "react";
5900
5901
  import { useMemo as useMemo322 } from "react";
5901
- import { createContext as createContext22, useContext as useContext32, useMemo as useMemo31 } from "react";
5902
+ import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
5902
5903
  import { jsx as jsx28 } from "react/jsx-runtime";
5903
5904
  import { jsx as jsx29 } from "react/jsx-runtime";
5904
5905
  import React31 from "react";
5905
- import React32, { createContext as createContext23 } from "react";
5906
- import { useContext as useContext33 } from "react";
5906
+ import React32, { createContext as createContext24 } from "react";
5907
5907
  import { useCallback as useCallback18 } from "react";
5908
5908
  import {
5909
5909
  useCallback as useCallback17,
5910
- useContext as useContext34,
5911
- useEffect as useEffect17,
5910
+ useContext as useContext33,
5911
+ useEffect as useEffect16,
5912
5912
  useLayoutEffect as useLayoutEffect11,
5913
5913
  useMemo as useMemo33,
5914
5914
  useState as useState20
@@ -5916,29 +5916,29 @@ import {
5916
5916
  import { jsx as jsx30 } from "react/jsx-runtime";
5917
5917
  import React34, {
5918
5918
  forwardRef as forwardRef10,
5919
- useContext as useContext35,
5920
- useEffect as useEffect19,
5919
+ useContext as useContext34,
5920
+ useEffect as useEffect18,
5921
5921
  useImperativeHandle as useImperativeHandle8,
5922
5922
  useMemo as useMemo34,
5923
5923
  useRef as useRef22,
5924
5924
  useState as useState21
5925
5925
  } from "react";
5926
- import { useEffect as useEffect18 } from "react";
5926
+ import { useEffect as useEffect17 } from "react";
5927
5927
  import { jsx as jsx31 } from "react/jsx-runtime";
5928
5928
  import { jsx as jsx322 } from "react/jsx-runtime";
5929
5929
  import React36, { useMemo as useMemo35 } from "react";
5930
5930
  import { jsx as jsx33 } from "react/jsx-runtime";
5931
5931
  import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
5932
5932
  import React37 from "react";
5933
- import React38, { createContext as createContext24 } from "react";
5933
+ import React38, { createContext as createContext25 } from "react";
5934
5934
  import { jsx as jsx34 } from "react/jsx-runtime";
5935
5935
  import { jsx as jsx35 } from "react/jsx-runtime";
5936
5936
  import React40 from "react";
5937
- import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext37 } from "react";
5937
+ import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
5938
5938
  import {
5939
5939
  forwardRef as forwardRef12,
5940
- useContext as useContext36,
5941
- useEffect as useEffect20,
5940
+ useContext as useContext35,
5941
+ useEffect as useEffect19,
5942
5942
  useImperativeHandle as useImperativeHandle9,
5943
5943
  useLayoutEffect as useLayoutEffect12,
5944
5944
  useMemo as useMemo37,
@@ -7475,7 +7475,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
7475
7475
  var addSequenceStackTraces = (component) => {
7476
7476
  componentsToAddStacksTo.push(component);
7477
7477
  };
7478
- var VERSION = "4.0.458";
7478
+ var VERSION = "4.0.460";
7479
7479
  var checkMultipleRemotionVersions = () => {
7480
7480
  if (typeof globalThis === "undefined") {
7481
7481
  return;
@@ -7694,6 +7694,9 @@ var sequenceSchemaDefaultLayoutNone = {
7694
7694
  default: "none"
7695
7695
  }
7696
7696
  };
7697
+ var nodePathToString = (nodePath) => {
7698
+ return nodePath.join(".");
7699
+ };
7697
7700
  var SequenceManager = React12.createContext({
7698
7701
  registerSequence: () => {
7699
7702
  throw new Error("SequenceManagerContext not initialized");
@@ -7709,19 +7712,48 @@ var SequenceVisibilityToggleContext = React12.createContext({
7709
7712
  throw new Error("SequenceVisibilityToggle not initialized");
7710
7713
  }
7711
7714
  });
7712
- var VisualModeOverridesContext = React12.createContext({
7713
- dragOverrides: {},
7715
+ var getCodeValues = (codeValues, nodePath) => {
7716
+ const status = codeValues[nodePathToString(nodePath)];
7717
+ if (!status) {
7718
+ return;
7719
+ }
7720
+ if (!status.canUpdate) {
7721
+ return;
7722
+ }
7723
+ return status.props;
7724
+ };
7725
+ var getIsJsxInMapCallback = (codeValues, nodePath) => {
7726
+ const status = codeValues[nodePathToString(nodePath)];
7727
+ if (!status) {
7728
+ return false;
7729
+ }
7730
+ if (!status.canUpdate) {
7731
+ return false;
7732
+ }
7733
+ return status.jsxInMapCallback;
7734
+ };
7735
+ var VisualModeGettersContext = React12.createContext({
7736
+ getDragOverrides: () => {
7737
+ throw new Error("VisualModeGettersContext not initialized");
7738
+ },
7739
+ getCodeValues: () => {
7740
+ throw new Error("VisualModeGettersContext not initialized");
7741
+ },
7742
+ getIsJsxInMapCallback: () => {
7743
+ throw new Error("VisualModeGettersContext not initialized");
7744
+ },
7745
+ visualModeEnabled: false
7746
+ });
7747
+ var VisualModeSettersContext = React12.createContext({
7714
7748
  setDragOverrides: () => {
7715
- throw new Error("VisualModeOverridesContext not initialized");
7749
+ throw new Error("VisualModeSettersContext not initialized");
7716
7750
  },
7717
7751
  clearDragOverrides: () => {
7718
- throw new Error("VisualModeOverridesContext not initialized");
7752
+ throw new Error("VisualModeSettersContext not initialized");
7719
7753
  },
7720
- codeValues: {},
7721
7754
  setCodeValues: () => {
7722
- throw new Error("VisualModeOverridesContext not initialized");
7723
- },
7724
- visualModeEnabled: false
7755
+ throw new Error("VisualModeSettersContext not initialized");
7756
+ }
7725
7757
  });
7726
7758
  var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
7727
7759
  const [sequences, setSequences] = useState4([]);
@@ -7730,39 +7762,33 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
7730
7762
  const controlOverridesRef = useRef6(dragOverrides);
7731
7763
  controlOverridesRef.current = dragOverrides;
7732
7764
  const [codeValues, setCodeValuesMapState] = useState4({});
7733
- const setDragOverrides = useCallback5((sequenceId, key, value) => {
7765
+ const setDragOverrides = useCallback5((nodePath, key, value) => {
7734
7766
  setControlOverrides((prev) => ({
7735
7767
  ...prev,
7736
- [sequenceId]: {
7737
- ...prev[sequenceId],
7768
+ [nodePathToString(nodePath)]: {
7769
+ ...prev[nodePathToString(nodePath)],
7738
7770
  [key]: value
7739
7771
  }
7740
7772
  }));
7741
7773
  }, []);
7742
- const clearDragOverrides = useCallback5((sequenceId) => {
7774
+ const clearDragOverrides = useCallback5((nodePath) => {
7743
7775
  setControlOverrides((prev) => {
7744
- if (!prev[sequenceId]) {
7776
+ const key = nodePathToString(nodePath);
7777
+ if (!prev[key]) {
7745
7778
  return prev;
7746
7779
  }
7747
7780
  const next = { ...prev };
7748
- delete next[sequenceId];
7781
+ delete next[key];
7749
7782
  return next;
7750
7783
  });
7751
7784
  }, []);
7752
- const setCodeValues = useCallback5((sequenceId, values) => {
7785
+ const setCodeValues = useCallback5((nodePath, values) => {
7753
7786
  setCodeValuesMapState((prev) => {
7754
- if (prev[sequenceId] === values) {
7787
+ const key = nodePathToString(nodePath);
7788
+ if (prev[key] === values) {
7755
7789
  return prev;
7756
7790
  }
7757
- if (values === null) {
7758
- if (!(sequenceId in prev)) {
7759
- return prev;
7760
- }
7761
- const next = { ...prev };
7762
- delete next[sequenceId];
7763
- return next;
7764
- }
7765
- return { ...prev, [sequenceId]: values };
7791
+ return { ...prev, [key]: values };
7766
7792
  });
7767
7793
  }, []);
7768
7794
  const registerSequence = useCallback5((seq) => {
@@ -7786,30 +7812,31 @@ var SequenceManagerProvider = ({ children, visualModeEnabled }) => {
7786
7812
  setHidden
7787
7813
  };
7788
7814
  }, [hidden]);
7789
- const overrideContext = useMemo14(() => {
7815
+ const gettersContext = useMemo14(() => {
7790
7816
  return {
7791
7817
  visualModeEnabled,
7792
- dragOverrides,
7818
+ getDragOverrides: (nodePath) => dragOverrides[nodePathToString(nodePath)] ?? {},
7819
+ getCodeValues: (nodePath) => getCodeValues(codeValues, nodePath),
7820
+ getIsJsxInMapCallback: (nodePath) => getIsJsxInMapCallback(codeValues, nodePath)
7821
+ };
7822
+ }, [visualModeEnabled, dragOverrides, codeValues]);
7823
+ const settersContext = useMemo14(() => {
7824
+ return {
7793
7825
  setDragOverrides,
7794
7826
  clearDragOverrides,
7795
- codeValues,
7796
7827
  setCodeValues
7797
7828
  };
7798
- }, [
7799
- visualModeEnabled,
7800
- dragOverrides,
7801
- setDragOverrides,
7802
- clearDragOverrides,
7803
- codeValues,
7804
- setCodeValues
7805
- ]);
7829
+ }, [setDragOverrides, clearDragOverrides, setCodeValues]);
7806
7830
  return /* @__PURE__ */ jsx112(SequenceManager.Provider, {
7807
7831
  value: sequenceContext,
7808
7832
  children: /* @__PURE__ */ jsx112(SequenceVisibilityToggleContext.Provider, {
7809
7833
  value: hiddenContext,
7810
- children: /* @__PURE__ */ jsx112(VisualModeOverridesContext.Provider, {
7811
- value: overrideContext,
7812
- children
7834
+ children: /* @__PURE__ */ jsx112(VisualModeGettersContext.Provider, {
7835
+ value: gettersContext,
7836
+ children: /* @__PURE__ */ jsx112(VisualModeSettersContext.Provider, {
7837
+ value: settersContext,
7838
+ children
7839
+ })
7813
7840
  })
7814
7841
  })
7815
7842
  });
@@ -7854,6 +7881,14 @@ var getFlatSchemaWithAllKeys = (schema) => {
7854
7881
  }
7855
7882
  return out;
7856
7883
  };
7884
+ var OverrideIdsToNodePathsGettersContext = createContext15({
7885
+ overrideIdToNodePathMappings: {}
7886
+ });
7887
+ var OverrideIdsToNodePathsSettersContext = createContext15({
7888
+ setOverrideIdToNodePath: () => {
7889
+ throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
7890
+ }
7891
+ });
7857
7892
  var getEffectiveVisualModeValue = ({
7858
7893
  codeValue,
7859
7894
  runtimeValue,
@@ -7958,6 +7993,7 @@ var mergeValues = ({
7958
7993
  }
7959
7994
  return merged;
7960
7995
  };
7996
+ var stackToOverrideMap = {};
7961
7997
  var wrapInSchema = (Component, schema) => {
7962
7998
  if (typeof process === "undefined" || !process.env?.EXPERIMENTAL_VISUAL_MODE_ENABLED) {
7963
7999
  return Component;
@@ -7966,7 +8002,8 @@ var wrapInSchema = (Component, schema) => {
7966
8002
  const flatKeys = Object.keys(flatSchema);
7967
8003
  const Wrapped = forwardRef2((props, ref) => {
7968
8004
  const env = useRemotionEnvironment();
7969
- const { visualModeEnabled, dragOverrides, codeValues } = useContext15(VisualModeOverridesContext);
8005
+ const { visualModeEnabled, getDragOverrides, getCodeValues: getCodeValues2 } = useContext15(VisualModeGettersContext);
8006
+ const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
7970
8007
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering || !visualModeEnabled) {
7971
8008
  return React13.createElement(Component, {
7972
8009
  ...props,
@@ -7980,7 +8017,20 @@ var wrapInSchema = (Component, schema) => {
7980
8017
  ref
7981
8018
  });
7982
8019
  }
7983
- const [overrideId] = useState5(() => String(Math.random()));
8020
+ const [overrideId] = useState5(() => {
8021
+ const { stack } = props;
8022
+ if (!stack) {
8023
+ return String(Math.random());
8024
+ }
8025
+ const existingOverrideId = stackToOverrideMap[stack];
8026
+ if (existingOverrideId) {
8027
+ return existingOverrideId;
8028
+ }
8029
+ const newOverrideId = String(Math.random());
8030
+ stackToOverrideMap[stack] = newOverrideId;
8031
+ return newOverrideId;
8032
+ });
8033
+ const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
7984
8034
  const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
7985
8035
  const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
7986
8036
  const controls = useMemo15(() => {
@@ -7994,10 +8044,15 @@ var wrapInSchema = (Component, schema) => {
7994
8044
  return computeEffectiveSchemaValuesDotNotation({
7995
8045
  schema,
7996
8046
  currentValue: currentRuntimeValueDotNotation,
7997
- overrideValues: dragOverrides[overrideId] ?? {},
7998
- propStatus: codeValues[overrideId]
8047
+ overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
8048
+ propStatus: nodePath === null ? undefined : getCodeValues2(nodePath)
7999
8049
  });
8000
- }, [currentRuntimeValueDotNotation, dragOverrides, overrideId, codeValues]);
8050
+ }, [
8051
+ currentRuntimeValueDotNotation,
8052
+ getDragOverrides,
8053
+ nodePath,
8054
+ getCodeValues2
8055
+ ]);
8001
8056
  const activeKeys = selectActiveKeys(schema, valuesDotNotation);
8002
8057
  const mergedProps = mergeValues({
8003
8058
  props,
@@ -8661,7 +8716,7 @@ var defaultOnPaint = ({
8661
8716
  const transform = ctx.drawElementImage(elementImage, 0, 0);
8662
8717
  element.style.transform = transform.toString();
8663
8718
  };
8664
- var HtmlInCanvasAncestorContext = createContext15(false);
8719
+ var HtmlInCanvasAncestorContext = createContext16(false);
8665
8720
  var HtmlInCanvasInner = forwardRef5(({
8666
8721
  width,
8667
8722
  height,
@@ -8878,7 +8933,7 @@ var validateRenderAsset = (artifact) => {
8878
8933
  }
8879
8934
  validateContent(artifact.content);
8880
8935
  };
8881
- var RenderAssetManager = createContext16({
8936
+ var RenderAssetManager = createContext17({
8882
8937
  registerRenderAsset: () => {
8883
8938
  return;
8884
8939
  },
@@ -9016,7 +9071,7 @@ var calculateMediaDuration = ({
9016
9071
  const actualDuration = duration / playbackRate;
9017
9072
  return Math.floor(actualDuration);
9018
9073
  };
9019
- var LoopContext = createContext17(null);
9074
+ var LoopContext = createContext18(null);
9020
9075
  var useLoop = () => {
9021
9076
  return React17.useContext(LoopContext);
9022
9077
  };
@@ -9087,7 +9142,7 @@ var playbackLogging = ({
9087
9142
  const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
9088
9143
  Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
9089
9144
  };
9090
- var PreloadContext = createContext18({});
9145
+ var PreloadContext = createContext19({});
9091
9146
  var preloads = {};
9092
9147
  var updaters = [];
9093
9148
  var setPreloads = (updater) => {
@@ -9408,7 +9463,7 @@ var durationReducer = (state, action) => {
9408
9463
  return state;
9409
9464
  }
9410
9465
  };
9411
- var DurationsContext = createContext19({
9466
+ var DurationsContext = createContext20({
9412
9467
  durations: {},
9413
9468
  setDurations: () => {
9414
9469
  throw new Error("context missing");
@@ -9574,11 +9629,6 @@ var useSingletonAudioContext = ({
9574
9629
  gainNode
9575
9630
  };
9576
9631
  }, [logLevel, latencyHint, env.isRendering, audioEnabled]);
9577
- useEffect8(() => {
9578
- return () => {
9579
- context?.audioContext?.close();
9580
- };
9581
- }, [context]);
9582
9632
  return context;
9583
9633
  };
9584
9634
  var waitUntilActuallyResumed = (audioContext, logLevel) => {
@@ -9627,8 +9677,8 @@ var didPropChange = (key, newProp, prevProp) => {
9627
9677
  }
9628
9678
  return true;
9629
9679
  };
9630
- var SharedAudioContext = createContext20(null);
9631
- var SharedAudioTagsContext = createContext20(null);
9680
+ var SharedAudioContext = createContext21(null);
9681
+ var SharedAudioTagsContext = createContext21(null);
9632
9682
  var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled }) => {
9633
9683
  const logLevel = useLogLevel();
9634
9684
  const ctxAndGain = useSingletonAudioContext({
@@ -9673,8 +9723,9 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9673
9723
  if (!ctxAndGain) {
9674
9724
  throw new Error("Audio context not found");
9675
9725
  }
9726
+ const saveForLater = ctxAndGain.audioContext.state === "suspended" && !isResuming.current;
9676
9727
  if (duration > 0) {
9677
- if (ctxAndGain.audioContext.state === "suspended") {
9728
+ if (saveForLater) {
9678
9729
  nodesToResume.current.set(node, {
9679
9730
  scheduledTime,
9680
9731
  offset,
@@ -9692,7 +9743,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9692
9743
  const prev = prevEndTimes.current;
9693
9744
  const scheduledMismatch = prev.scheduledEndTime !== null && Math.abs(scheduledTime - prev.scheduledEndTime) > 0.001;
9694
9745
  const mediaMismatch = prev.mediaEndTime !== null && Math.abs(mediaTime - prev.mediaEndTime) > 0.001;
9695
- 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) : "");
9746
+ 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"), "");
9696
9747
  prev.scheduledEndTime = scheduledEndTime;
9697
9748
  prev.mediaEndTime = mediaEndTime;
9698
9749
  return duration > 0 ? {
@@ -9712,6 +9763,13 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9712
9763
  return Promise.resolve();
9713
9764
  }
9714
9765
  audioContextIsPlayingEventually.current = true;
9766
+ ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
9767
+ ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
9768
+ ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
9769
+ nodesToResume.current.forEach((r2, node) => {
9770
+ node.start(r2.scheduledTime, r2.offset, r2.duration);
9771
+ });
9772
+ nodesToResume.current.clear();
9715
9773
  const resumePromise = ctxAndGain.audioContext.resume();
9716
9774
  isResuming.current = new Promise((resolve) => {
9717
9775
  waitUntilActuallyResumed(ctxAndGain.audioContext, logLevel).then(resolve);
@@ -9722,11 +9780,6 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
9722
9780
  }).finally(() => {
9723
9781
  isResuming.current = null;
9724
9782
  });
9725
- ctxAndGain.gainNode.gain.cancelScheduledValues(ctxAndGain.audioContext.currentTime);
9726
- ctxAndGain.gainNode.gain.setValueAtTime(0, ctxAndGain.audioContext.currentTime);
9727
- ctxAndGain.gainNode.gain.linearRampToValueAtTime(1, ctxAndGain.audioContext.currentTime + 0.03);
9728
- nodesToResume.current.forEach((r2, node) => node.start(r2.scheduledTime, r2.offset, r2.duration));
9729
- nodesToResume.current.clear();
9730
9783
  return resumePromise.catch(() => {});
9731
9784
  }, [ctxAndGain, logLevel]);
9732
9785
  const getIsResumingAudioContext = useCallback9(() => {
@@ -10309,7 +10362,7 @@ var useBasicMediaInTimeline = ({
10309
10362
  });
10310
10363
  }).join(",");
10311
10364
  }, [duration, mediaStartsAt, volume, mediaVolume]);
10312
- useEffect9(() => {
10365
+ useEffect8(() => {
10313
10366
  if (typeof volume === "number" && volume !== initialVolume) {
10314
10367
  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`);
10315
10368
  }
@@ -10372,7 +10425,7 @@ var useImageInTimeline = ({
10372
10425
  loop: false
10373
10426
  });
10374
10427
  const { isStudio } = useRemotionEnvironment();
10375
- useEffect9(() => {
10428
+ useEffect8(() => {
10376
10429
  if (!src) {
10377
10430
  throw new Error("No src passed");
10378
10431
  }
@@ -10455,7 +10508,7 @@ var useMediaInTimeline = ({
10455
10508
  loop: false
10456
10509
  });
10457
10510
  const { isStudio } = useRemotionEnvironment();
10458
- useEffect9(() => {
10511
+ useEffect8(() => {
10459
10512
  if (!src) {
10460
10513
  throw new Error("No src passed");
10461
10514
  }
@@ -10528,9 +10581,14 @@ var useBufferManager = (logLevel, mountTime) => {
10528
10581
  }
10529
10582
  };
10530
10583
  }
10584
+ let unblocked = false;
10531
10585
  setBlocks((b) => [...b, block]);
10532
10586
  return {
10533
10587
  unblock: () => {
10588
+ if (unblocked) {
10589
+ return;
10590
+ }
10591
+ unblocked = true;
10534
10592
  setBlocks((b) => {
10535
10593
  const newArr = b.filter((bx) => bx !== block);
10536
10594
  if (newArr.length === b.length) {
@@ -10557,7 +10615,7 @@ var useBufferManager = (logLevel, mountTime) => {
10557
10615
  }
10558
10616
  };
10559
10617
  }, []);
10560
- useEffect10(() => {
10618
+ useEffect9(() => {
10561
10619
  if (rendering) {
10562
10620
  return;
10563
10621
  }
@@ -10602,7 +10660,7 @@ var BufferingProvider = ({ children }) => {
10602
10660
  };
10603
10661
  var useIsPlayerBuffering = (bufferManager) => {
10604
10662
  const [isBuffering, setIsBuffering] = useState14(bufferManager.buffering.current);
10605
- useEffect10(() => {
10663
+ useEffect9(() => {
10606
10664
  const onBuffer = () => {
10607
10665
  setIsBuffering(true);
10608
10666
  };
@@ -10624,18 +10682,30 @@ var useIsPlayerBuffering = (bufferManager) => {
10624
10682
  };
10625
10683
  var useBufferState = () => {
10626
10684
  const buffer = useContext25(BufferingContextReact);
10685
+ const logLevel = useLogLevel();
10627
10686
  const addBlock = buffer ? buffer.addBlock : null;
10628
10687
  return useMemo25(() => ({
10629
10688
  delayPlayback: () => {
10630
10689
  if (!addBlock) {
10631
10690
  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");
10632
10691
  }
10692
+ Log.trace({ logLevel, tag: "[buffer-state]" }, "Adding buffer handle", new Error().stack);
10633
10693
  const { unblock } = addBlock({
10634
10694
  id: String(Math.random())
10635
10695
  });
10636
- return { unblock };
10696
+ let unblocked = false;
10697
+ return {
10698
+ unblock: () => {
10699
+ if (unblocked) {
10700
+ return;
10701
+ }
10702
+ unblocked = true;
10703
+ Log.trace({ logLevel, tag: "[buffer-state]" }, "Removing buffer handle");
10704
+ unblock();
10705
+ }
10706
+ };
10637
10707
  }
10638
- }), [addBlock]);
10708
+ }), [addBlock, logLevel]);
10639
10709
  };
10640
10710
  var isSafariWebkit = () => {
10641
10711
  const isSafari2 = /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);
@@ -10771,7 +10841,7 @@ var useMediaBuffering = ({
10771
10841
  }) => {
10772
10842
  const buffer = useBufferState();
10773
10843
  const [isBuffering, setIsBuffering] = useState15(false);
10774
- useEffect11(() => {
10844
+ useEffect10(() => {
10775
10845
  let cleanupFns = [];
10776
10846
  const { current } = element;
10777
10847
  if (!current) {
@@ -10904,7 +10974,7 @@ var useRequestVideoCallbackTime = ({
10904
10974
  onVariableFpsVideoDetected
10905
10975
  }) => {
10906
10976
  const currentTime = useRef16(null);
10907
- useEffect12(() => {
10977
+ useEffect11(() => {
10908
10978
  const { current } = mediaRef;
10909
10979
  if (current) {
10910
10980
  currentTime.current = {
@@ -11190,7 +11260,7 @@ var useMediaPlayback = ({
11190
11260
  return acceptableTimeshift ?? defaultAcceptableTimeshift;
11191
11261
  })();
11192
11262
  const isPlayerBuffering = useIsPlayerBuffering(buffering);
11193
- useEffect13(() => {
11263
+ useEffect12(() => {
11194
11264
  if (mediaRef.current?.paused) {
11195
11265
  return;
11196
11266
  }
@@ -11235,7 +11305,7 @@ var useMediaPlayback = ({
11235
11305
  mediaRef.current.playbackRate = playbackRateToSet;
11236
11306
  }
11237
11307
  }, [mediaRef, playbackRate]);
11238
- useEffect13(() => {
11308
+ useEffect12(() => {
11239
11309
  const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
11240
11310
  if (!mediaRef.current) {
11241
11311
  throw new Error(`No ${mediaType} ref found`);
@@ -11364,7 +11434,7 @@ var useMediaTag = ({
11364
11434
  const logLevel = useLogLevel();
11365
11435
  const mountTime = useMountTime();
11366
11436
  const env = useRemotionEnvironment();
11367
- useEffect14(() => {
11437
+ useEffect13(() => {
11368
11438
  const tag = {
11369
11439
  id,
11370
11440
  play: (reason) => {
@@ -11403,11 +11473,11 @@ var useMediaTag = ({
11403
11473
  env.isPlayer
11404
11474
  ]);
11405
11475
  };
11406
- var MediaVolumeContext = createContext21({
11476
+ var MediaVolumeContext = createContext22({
11407
11477
  mediaMuted: false,
11408
11478
  mediaVolume: 1
11409
11479
  });
11410
- var SetMediaVolumeContext = createContext21({
11480
+ var SetMediaVolumeContext = createContext22({
11411
11481
  setMediaMuted: () => {
11412
11482
  throw new Error("default");
11413
11483
  },
@@ -11583,7 +11653,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11583
11653
  }, [audioRef]);
11584
11654
  const currentOnDurationCallback = useRef18(onDuration);
11585
11655
  currentOnDurationCallback.current = onDuration;
11586
- useEffect15(() => {
11656
+ useEffect14(() => {
11587
11657
  const { current } = audioRef;
11588
11658
  if (!current) {
11589
11659
  return;
@@ -11652,7 +11722,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
11652
11722
  useImperativeHandle5(ref, () => {
11653
11723
  return audioRef.current;
11654
11724
  }, []);
11655
- useEffect16(() => {
11725
+ useEffect15(() => {
11656
11726
  if (!props.src) {
11657
11727
  throw new Error("No src passed");
11658
11728
  }
@@ -12241,7 +12311,7 @@ var waitForRoot = (fn) => {
12241
12311
  listeners = listeners.filter((l) => l !== fn);
12242
12312
  };
12243
12313
  };
12244
- var MediaEnabledContext = createContext22(null);
12314
+ var MediaEnabledContext = createContext23(null);
12245
12315
  var useVideoEnabled = () => {
12246
12316
  const context = useContext32(MediaEnabledContext);
12247
12317
  if (!context) {
@@ -12523,7 +12593,7 @@ var setupEnvVariables = () => {
12523
12593
  });
12524
12594
  };
12525
12595
  var CurrentScaleContext = React32.createContext(null);
12526
- var PreviewSizeContext = createContext23({
12596
+ var PreviewSizeContext = createContext24({
12527
12597
  setSize: () => {
12528
12598
  return;
12529
12599
  },
@@ -12546,14 +12616,6 @@ var calculateScale = ({
12546
12616
  }
12547
12617
  return Number(previewSize);
12548
12618
  };
12549
- var useSequenceControlOverride = (key) => {
12550
- const seqContext = useContext33(SequenceContext);
12551
- const { dragOverrides: overrides } = useContext33(VisualModeOverridesContext);
12552
- if (!seqContext) {
12553
- return;
12554
- }
12555
- return overrides[seqContext.id]?.[key];
12556
- };
12557
12619
  var getOffthreadVideoSource = ({
12558
12620
  src,
12559
12621
  transparent,
@@ -12585,9 +12647,9 @@ var OffthreadVideoForRendering = ({
12585
12647
  const frame = useCurrentFrame();
12586
12648
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
12587
12649
  const videoConfig = useUnsafeVideoConfig();
12588
- const sequenceContext = useContext34(SequenceContext);
12650
+ const sequenceContext = useContext33(SequenceContext);
12589
12651
  const mediaStartsAt = useMediaStartsAt();
12590
- const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
12652
+ const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
12591
12653
  if (!src) {
12592
12654
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
12593
12655
  }
@@ -12606,7 +12668,7 @@ var OffthreadVideoForRendering = ({
12606
12668
  mediaVolume: 1
12607
12669
  });
12608
12670
  warnAboutTooHighVolume(volume);
12609
- useEffect17(() => {
12671
+ useEffect16(() => {
12610
12672
  if (!src) {
12611
12673
  throw new Error("No src passed");
12612
12674
  }
@@ -12767,7 +12829,7 @@ var useEmitVideoFrame = ({
12767
12829
  ref,
12768
12830
  onVideoFrame
12769
12831
  }) => {
12770
- useEffect18(() => {
12832
+ useEffect17(() => {
12771
12833
  const { current } = ref;
12772
12834
  if (!current) {
12773
12835
  return;
@@ -12799,7 +12861,7 @@ class MediaPlaybackError extends Error {
12799
12861
  }
12800
12862
  }
12801
12863
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
12802
- const context = useContext35(SharedAudioContext);
12864
+ const context = useContext34(SharedAudioContext);
12803
12865
  if (!context) {
12804
12866
  throw new Error("SharedAudioContext not found");
12805
12867
  }
@@ -12855,8 +12917,8 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
12855
12917
  }
12856
12918
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
12857
12919
  const { fps, durationInFrames } = useVideoConfig();
12858
- const parentSequence = useContext35(SequenceContext);
12859
- const { hidden } = useContext35(SequenceVisibilityToggleContext);
12920
+ const parentSequence = useContext34(SequenceContext);
12921
+ const { hidden } = useContext34(SequenceVisibilityToggleContext);
12860
12922
  const logLevel = useLogLevel();
12861
12923
  const mountTime = useMountTime();
12862
12924
  const [timelineId] = useState21(() => String(Math.random()));
@@ -12931,7 +12993,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
12931
12993
  tag: "video",
12932
12994
  mountTime
12933
12995
  }));
12934
- useEffect19(() => {
12996
+ useEffect18(() => {
12935
12997
  const { current } = videoRef;
12936
12998
  if (!current) {
12937
12999
  return;
@@ -12974,7 +13036,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
12974
13036
  const currentOnDurationCallback = useRef22(onDuration);
12975
13037
  currentOnDurationCallback.current = onDuration;
12976
13038
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
12977
- useEffect19(() => {
13039
+ useEffect18(() => {
12978
13040
  const { current } = videoRef;
12979
13041
  if (!current) {
12980
13042
  return;
@@ -12991,7 +13053,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
12991
13053
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
12992
13054
  };
12993
13055
  }, [src]);
12994
- useEffect19(() => {
13056
+ useEffect18(() => {
12995
13057
  const { current } = videoRef;
12996
13058
  if (!current) {
12997
13059
  return;
@@ -13280,7 +13342,8 @@ var Internals = {
13280
13342
  VideoForPreview,
13281
13343
  CompositionManager,
13282
13344
  CompositionSetters,
13283
- VisualModeOverridesContext,
13345
+ VisualModeGettersContext,
13346
+ VisualModeSettersContext,
13284
13347
  SequenceManager,
13285
13348
  SequenceStackTracesUpdateContext,
13286
13349
  SequenceVisibilityToggleContext,
@@ -13289,7 +13352,6 @@ var Internals = {
13289
13352
  sequenceStyleSchema,
13290
13353
  flattenActiveSchema,
13291
13354
  getFlatSchemaWithAllKeys,
13292
- useSequenceControlOverride,
13293
13355
  RemotionRootContexts,
13294
13356
  CompositionManagerProvider,
13295
13357
  useVideo,
@@ -13382,7 +13444,9 @@ var Internals = {
13382
13444
  useMemoizedEffects,
13383
13445
  defineEffect,
13384
13446
  createDescriptor,
13385
- computeEffectiveSchemaValuesDotNotation
13447
+ computeEffectiveSchemaValuesDotNotation,
13448
+ OverrideIdsToNodePathsGettersContext,
13449
+ OverrideIdsToNodePathsSettersContext
13386
13450
  };
13387
13451
  var NUMBER = "[-+]?\\d*\\.?\\d+";
13388
13452
  var PERCENTAGE = NUMBER + "%";
@@ -13420,7 +13484,7 @@ var flattenChildren = (children) => {
13420
13484
  return flatChildren;
13421
13485
  }, []);
13422
13486
  };
13423
- var IsInsideSeriesContext = createContext24(false);
13487
+ var IsInsideSeriesContext = createContext25(false);
13424
13488
  var IsInsideSeriesContainer = ({ children }) => {
13425
13489
  return /* @__PURE__ */ jsx34(IsInsideSeriesContext.Provider, {
13426
13490
  value: true,
@@ -13462,9 +13526,6 @@ var SeriesInner = (props2) => {
13462
13526
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
13463
13527
  }
13464
13528
  const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
13465
- if (!castedChild?.props.children) {
13466
- throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);
13467
- }
13468
13529
  const durationInFramesProp = castedChild.props.durationInFrames;
13469
13530
  const {
13470
13531
  durationInFrames,
@@ -13980,13 +14041,13 @@ var VideoForRenderingForwardFunction = ({
13980
14041
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
13981
14042
  const videoConfig = useUnsafeVideoConfig();
13982
14043
  const videoRef = useRef23(null);
13983
- const sequenceContext = useContext36(SequenceContext);
14044
+ const sequenceContext = useContext35(SequenceContext);
13984
14045
  const mediaStartsAt = useMediaStartsAt();
13985
14046
  const environment = useRemotionEnvironment();
13986
14047
  const logLevel = useLogLevel();
13987
14048
  const mountTime = useMountTime();
13988
14049
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
13989
- const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
14050
+ const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
13990
14051
  const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
13991
14052
  props2.src,
13992
14053
  sequenceContext?.cumulatedFrom,
@@ -14002,7 +14063,7 @@ var VideoForRenderingForwardFunction = ({
14002
14063
  mediaVolume: 1
14003
14064
  });
14004
14065
  warnAboutTooHighVolume(volume);
14005
- useEffect20(() => {
14066
+ useEffect19(() => {
14006
14067
  if (!props2.src) {
14007
14068
  throw new Error("No src passed");
14008
14069
  }
@@ -14045,7 +14106,7 @@ var VideoForRenderingForwardFunction = ({
14045
14106
  useImperativeHandle9(ref, () => {
14046
14107
  return videoRef.current;
14047
14108
  }, []);
14048
- useEffect20(() => {
14109
+ useEffect19(() => {
14049
14110
  if (!window.remotion_videoEnabled) {
14050
14111
  return;
14051
14112
  }
@@ -14196,7 +14257,7 @@ var VideoForwardingFunction = (props2, ref) => {
14196
14257
  if (environment.isClientSideRendering) {
14197
14258
  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");
14198
14259
  }
14199
- const { durations, setDurations } = useContext37(DurationsContext);
14260
+ const { durations, setDurations } = useContext36(DurationsContext);
14200
14261
  if (typeof ref === "string") {
14201
14262
  throw new Error("string refs are not supported");
14202
14263
  }
@@ -14566,7 +14627,7 @@ var useHoverTransforms = (ref, disabled) => {
14566
14627
  isActive: false
14567
14628
  });
14568
14629
  const eventTarget = useMemo38(() => new EventTarget, []);
14569
- useEffect21(() => {
14630
+ useEffect20(() => {
14570
14631
  if (disabled) {
14571
14632
  eventTarget.dispatchEvent(new Event("disabled"));
14572
14633
  } else {
@@ -14713,7 +14774,7 @@ var getAngle = (ref, coordinates) => {
14713
14774
  var lastCoordinates = null;
14714
14775
  var useMousePosition = (ref) => {
14715
14776
  const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
14716
- useEffect21(() => {
14777
+ useEffect20(() => {
14717
14778
  const element = ref.current;
14718
14779
  if (!element) {
14719
14780
  return;