@remotion/studio 4.0.336 → 4.0.340

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,6 +1,6 @@
1
1
 
2
2
  
3
- > @remotion/studio@4.0.336 make /Users/jonathanburger/remotion/packages/studio
3
+ > @remotion/studio@4.0.340 make /Users/jonathanburger/remotion/packages/studio
4
4
  > tsc -d && bun --env-file=../.env.bundle bundle.ts
5
5
 
6
- [77.02ms] Generated.
6
+ [81.53ms] Generated.
@@ -27,7 +27,7 @@ const Inner = ({ s, windowWidth }) => {
27
27
  // If a duration is 1, it is essentially a still and it should have width 0
28
28
  // Some compositions may not be longer than their media duration,
29
29
  // if that is the case, it needs to be asynchronously determined
30
- var _a, _b;
30
+ var _a, _b, _c;
31
31
  const video = remotion_1.Internals.useVideo();
32
32
  const maxMediaDuration = (0, use_max_media_duration_1.useMaxMediaDuration)(s, (_a = video === null || video === void 0 ? void 0 : video.fps) !== null && _a !== void 0 ? _a : 30);
33
33
  if (!video) {
@@ -36,12 +36,16 @@ const Inner = ({ s, windowWidth }) => {
36
36
  const frame = (0, remotion_1.useCurrentFrame)();
37
37
  const relativeFrame = frame - s.from;
38
38
  const relativeFrameWithPremount = relativeFrame + ((_b = s.premountDisplay) !== null && _b !== void 0 ? _b : 0);
39
+ const relativeFrameWithPostmount = relativeFrame - s.duration;
39
40
  const roundedFrame = Math.round(relativeFrame * 100) / 100;
40
41
  const isInRange = relativeFrame >= 0 && relativeFrame < s.duration;
41
42
  const isPremounting = relativeFrameWithPremount >= 0 &&
42
43
  relativeFrameWithPremount < s.duration &&
43
44
  !isInRange;
44
- const { marginLeft, width, premountWidth } = (0, react_1.useMemo)(() => {
45
+ const isPostmounting = relativeFrameWithPostmount >= 0 &&
46
+ relativeFrameWithPostmount < ((_c = s.postmountDisplay) !== null && _c !== void 0 ? _c : 0) &&
47
+ !isInRange;
48
+ const { marginLeft, width, premountWidth, postmountWidth } = (0, react_1.useMemo)(() => {
45
49
  return (0, get_timeline_sequence_layout_1.getTimelineSequenceLayout)({
46
50
  durationInFrames: s.loopDisplay
47
51
  ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes
@@ -52,6 +56,7 @@ const Inner = ({ s, windowWidth }) => {
52
56
  video,
53
57
  windowWidth,
54
58
  premountDisplay: s.premountDisplay,
59
+ postmountDisplay: s.postmountDisplay,
55
60
  });
56
61
  }, [maxMediaDuration, s, video, windowWidth]);
57
62
  const style = (0, react_1.useMemo)(() => {
@@ -86,13 +91,25 @@ const Inner = ({ s, windowWidth }) => {
86
91
  rgba(255, 255, 255, ${isPremounting ? 0.5 : 0.2}) 4px
87
92
  )`,
88
93
  position: 'absolute',
94
+ } })) : null, postmountWidth ? ((0, jsx_runtime_1.jsx)("div", { style: {
95
+ width: postmountWidth,
96
+ height: '100%',
97
+ background: `repeating-linear-gradient(
98
+ -45deg,
99
+ transparent,
100
+ transparent 2px,
101
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 2px,
102
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 4px
103
+ )`,
104
+ position: 'absolute',
105
+ right: 0,
89
106
  } })) : null, s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate })) : null, s.type === 'video' ? ((0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration })) : null, s.loopDisplay === undefined ? null : ((0, jsx_runtime_1.jsx)(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), s.type !== 'audio' &&
90
107
  s.type !== 'video' &&
91
108
  s.loopDisplay === undefined &&
92
- (isInRange || isPremounting) ? ((0, jsx_runtime_1.jsx)("div", { style: {
109
+ (isInRange || isPremounting || isPostmounting) ? ((0, jsx_runtime_1.jsx)("div", { style: {
93
110
  paddingLeft: 5 + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0),
94
111
  height: '100%',
95
112
  display: 'flex',
96
113
  alignItems: 'center',
97
- }, children: (0, jsx_runtime_1.jsx)(TimelineSequenceFrame_1.TimelineSequenceFrame, { premounted: isPremounting, roundedFrame: roundedFrame }) })) : null] }, s.id));
114
+ }, children: (0, jsx_runtime_1.jsx)(TimelineSequenceFrame_1.TimelineSequenceFrame, { premounted: isPremounting, postmounted: isPostmounting ? s.duration - 1 : null, roundedFrame: roundedFrame }) })) : null] }, s.id));
98
115
  };
@@ -2,4 +2,5 @@ import React from 'react';
2
2
  export declare const TimelineSequenceFrame: React.FC<{
3
3
  readonly roundedFrame: number;
4
4
  readonly premounted: boolean;
5
+ readonly postmounted: number | null;
5
6
  }>;
@@ -8,7 +8,11 @@ const relativeFrameStyle = {
8
8
  color: 'white',
9
9
  opacity: 0.5,
10
10
  };
11
- const TimelineSequenceFrame = ({ roundedFrame, premounted }) => {
12
- return ((0, jsx_runtime_1.jsx)("div", { style: relativeFrameStyle, children: premounted ? '0 (Premounted)' : roundedFrame }));
11
+ const TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
12
+ return ((0, jsx_runtime_1.jsx)("div", { style: relativeFrameStyle, children: premounted
13
+ ? '0 (Premounted)'
14
+ : postmounted !== null
15
+ ? `${postmounted} (Postmounted)`
16
+ : roundedFrame }));
13
17
  };
14
18
  exports.TimelineSequenceFrame = TimelineSequenceFrame;