remotion 4.0.391 → 4.0.393

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.
@@ -1,9 +1,8 @@
1
- import type { MutableRefObject, RefObject } from 'react';
1
+ import type { MutableRefObject } from 'react';
2
2
  import React from 'react';
3
3
  import { type PlayableMediaTag } from './timeline-position-state';
4
4
  export type TimelineContextValue = {
5
5
  frame: Record<string, number>;
6
- frameRef: RefObject<number>;
7
6
  playing: boolean;
8
7
  rootId: string;
9
8
  playbackRate: number;
@@ -16,7 +16,6 @@ exports.SetTimelineContext = (0, react_1.createContext)({
16
16
  });
17
17
  exports.TimelineContext = (0, react_1.createContext)({
18
18
  frame: {},
19
- frameRef: { current: 0 },
20
19
  playing: false,
21
20
  playbackRate: 1,
22
21
  rootId: '',
@@ -36,7 +35,6 @@ const TimelineContextProvider = ({ children, frameState }) => {
36
35
  const [remotionRootId] = (0, react_1.useState)(() => String((0, random_1.random)(null)));
37
36
  const [_frame, setFrame] = (0, react_1.useState)(() => (0, timeline_position_state_1.getInitialFrameState)());
38
37
  const frame = frameState !== null && frameState !== void 0 ? frameState : _frame;
39
- const frameRef = (0, react_1.useRef)(0);
40
38
  const { delayRender, continueRender } = (0, use_delay_render_1.useDelayRender)();
41
39
  if (typeof window !== 'undefined') {
42
40
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -78,7 +76,6 @@ const TimelineContextProvider = ({ children, frameState }) => {
78
76
  playbackRate,
79
77
  setPlaybackRate,
80
78
  audioAndVideoTags,
81
- frameRef,
82
79
  };
83
80
  }, [frame, playbackRate, playing, remotionRootId]);
84
81
  const setTimelineContextValue = (0, react_1.useMemo)(() => {
@@ -1,4 +1,4 @@
1
- import type { MutableRefObject, RefObject } from 'react';
1
+ import type { MutableRefObject } from 'react';
2
2
  export type PlayableMediaTag = {
3
3
  play: (reason: string) => void;
4
4
  id: string;
@@ -8,7 +8,6 @@ export declare const persistCurrentFrame: (time: CurrentTimePerComposition) => v
8
8
  export declare const getInitialFrameState: () => CurrentTimePerComposition;
9
9
  export declare const getFrameForComposition: (composition: string) => number;
10
10
  export declare const useTimelinePosition: () => number;
11
- export declare const useTimelineFrameRef: () => RefObject<number>;
12
11
  export declare const useTimelineSetFrame: () => ((u: React.SetStateAction<Record<string, number>>) => void);
13
12
  type PlayingReturnType = readonly [
14
13
  boolean,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usePlayingState = exports.useTimelineSetFrame = exports.useTimelineFrameRef = exports.useTimelinePosition = exports.getFrameForComposition = exports.getInitialFrameState = exports.persistCurrentFrame = void 0;
3
+ exports.usePlayingState = exports.useTimelineSetFrame = exports.useTimelinePosition = exports.getFrameForComposition = exports.getInitialFrameState = exports.persistCurrentFrame = void 0;
4
4
  const react_1 = require("react");
5
5
  const TimelineContext_js_1 = require("./TimelineContext.js");
6
6
  const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
@@ -46,11 +46,6 @@ const useTimelinePosition = () => {
46
46
  return Math.min(videoConfig.durationInFrames - 1, unclamped);
47
47
  };
48
48
  exports.useTimelinePosition = useTimelinePosition;
49
- const useTimelineFrameRef = () => {
50
- const { frameRef } = (0, react_1.useContext)(TimelineContext_js_1.TimelineContext);
51
- return frameRef;
52
- };
53
- exports.useTimelineFrameRef = useTimelineFrameRef;
54
49
  const useTimelineSetFrame = () => {
55
50
  const { setFrame } = (0, react_1.useContext)(TimelineContext_js_1.SetTimelineContext);
56
51
  return setFrame;
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.391";
6
+ export declare const VERSION = "4.0.393";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.391';
10
+ exports.VERSION = '4.0.393';
@@ -110,7 +110,7 @@ function truthy(value) {
110
110
  }
111
111
 
112
112
  // src/version.ts
113
- var VERSION = "4.0.391";
113
+ var VERSION = "4.0.393";
114
114
 
115
115
  // src/multiple-versions-warning.ts
116
116
  var checkMultipleRemotionVersions = () => {
@@ -354,7 +354,6 @@ var exports_timeline_position_state = {};
354
354
  __export(exports_timeline_position_state, {
355
355
  useTimelineSetFrame: () => useTimelineSetFrame,
356
356
  useTimelinePosition: () => useTimelinePosition,
357
- useTimelineFrameRef: () => useTimelineFrameRef,
358
357
  usePlayingState: () => usePlayingState,
359
358
  persistCurrentFrame: () => persistCurrentFrame,
360
359
  getInitialFrameState: () => getInitialFrameState,
@@ -1244,10 +1243,6 @@ var useTimelinePosition = () => {
1244
1243
  const unclamped = state.frame[videoConfig.id] ?? (env.isPlayer ? 0 : getFrameForComposition(videoConfig.id));
1245
1244
  return Math.min(videoConfig.durationInFrames - 1, unclamped);
1246
1245
  };
1247
- var useTimelineFrameRef = () => {
1248
- const { frameRef } = useContext6(TimelineContext);
1249
- return frameRef;
1250
- };
1251
1246
  var useTimelineSetFrame = () => {
1252
1247
  const { setFrame } = useContext6(SetTimelineContext);
1253
1248
  return setFrame;
@@ -1535,7 +1530,6 @@ var SetTimelineContext = createContext10({
1535
1530
  });
1536
1531
  var TimelineContext = createContext10({
1537
1532
  frame: {},
1538
- frameRef: { current: 0 },
1539
1533
  playing: false,
1540
1534
  playbackRate: 1,
1541
1535
  rootId: "",
@@ -1555,7 +1549,6 @@ var TimelineContextProvider = ({ children, frameState }) => {
1555
1549
  const [remotionRootId] = useState5(() => String(random(null)));
1556
1550
  const [_frame, setFrame] = useState5(() => getInitialFrameState());
1557
1551
  const frame = frameState ?? _frame;
1558
- const frameRef = useRef2(0);
1559
1552
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
1560
1553
  if (typeof window !== "undefined") {
1561
1554
  useLayoutEffect(() => {
@@ -1591,8 +1584,7 @@ var TimelineContextProvider = ({ children, frameState }) => {
1591
1584
  rootId: remotionRootId,
1592
1585
  playbackRate,
1593
1586
  setPlaybackRate,
1594
- audioAndVideoTags,
1595
- frameRef
1587
+ audioAndVideoTags
1596
1588
  };
1597
1589
  }, [frame, playbackRate, playing, remotionRootId]);
1598
1590
  const setTimelineContextValue = useMemo7(() => {
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.391";
2
+ var VERSION = "4.0.393";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.391",
6
+ "version": "4.0.393",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "react-dom": "19.2.3",
35
35
  "webpack": "5.96.1",
36
36
  "zod": "3.22.3",
37
- "@remotion/eslint-config-internal": "4.0.391",
37
+ "@remotion/eslint-config-internal": "4.0.393",
38
38
  "eslint": "9.19.0"
39
39
  },
40
40
  "keywords": [