@remotion/studio 4.0.339 → 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.
@@ -18816,7 +18816,8 @@ var calculateTimeline = ({
18816
18816
  nonce: 0,
18817
18817
  loopDisplay: undefined,
18818
18818
  stack: null,
18819
- premountDisplay: null
18819
+ premountDisplay: null,
18820
+ postmountDisplay: null
18820
18821
  },
18821
18822
  depth: 0,
18822
18823
  hash: "-"
@@ -20153,7 +20154,8 @@ var getTimelineSequenceLayout = ({
20153
20154
  startFromMedia,
20154
20155
  video,
20155
20156
  windowWidth,
20156
- premountDisplay
20157
+ premountDisplay,
20158
+ postmountDisplay
20157
20159
  }) => {
20158
20160
  const maxMediaSequenceDuration = (maxMediaDuration ?? Infinity) - startFromMedia;
20159
20161
  const lastFrame = (video.durationInFrames ?? 1) - 1;
@@ -20183,10 +20185,18 @@ var getTimelineSequenceLayout = ({
20183
20185
  spatialDuration: premountDisplay,
20184
20186
  windowWidth
20185
20187
  }) : null;
20188
+ const postmountWidth = postmountDisplay ? getWidthOfTrack({
20189
+ durationInFrames: postmountDisplay,
20190
+ lastFrame,
20191
+ nonNegativeMarginLeft,
20192
+ spatialDuration: postmountDisplay,
20193
+ windowWidth
20194
+ }) : null;
20186
20195
  return {
20187
20196
  marginLeft: Math.max(marginLeft, 0) - (premountWidth ?? 0),
20188
- width: width + (premountWidth ?? 0),
20189
- premountWidth
20197
+ width: width + (premountWidth ?? 0) + (postmountWidth ?? 0),
20198
+ premountWidth,
20199
+ postmountWidth
20190
20200
  };
20191
20201
  };
20192
20202
 
@@ -33164,7 +33174,7 @@ var innerParseMp3PacketHeader = (iterator) => {
33164
33174
  }
33165
33175
  }
33166
33176
  const audioVersionId = iterator.getBits(2);
33167
- if (audioVersionId !== 3 && audioVersionId !== 2) {
33177
+ if (audioVersionId !== 3 && audioVersionId !== 2 && audioVersionId !== 0) {
33168
33178
  throw new Error("Expected MPEG Version 1 or 2");
33169
33179
  }
33170
33180
  const mpegVersion = audioVersionId === 3 ? 1 : 2;
@@ -37978,10 +37988,10 @@ var relativeFrameStyle = {
37978
37988
  color: "white",
37979
37989
  opacity: 0.5
37980
37990
  };
37981
- var TimelineSequenceFrame = ({ roundedFrame, premounted }) => {
37991
+ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
37982
37992
  return /* @__PURE__ */ jsx196("div", {
37983
37993
  style: relativeFrameStyle,
37984
- children: premounted ? "0 (Premounted)" : roundedFrame
37994
+ children: premounted ? "0 (Premounted)" : postmounted !== null ? `${postmounted} (Postmounted)` : roundedFrame
37985
37995
  });
37986
37996
  };
37987
37997
 
@@ -38338,10 +38348,12 @@ var Inner4 = ({ s, windowWidth }) => {
38338
38348
  const frame2 = useCurrentFrame2();
38339
38349
  const relativeFrame = frame2 - s.from;
38340
38350
  const relativeFrameWithPremount = relativeFrame + (s.premountDisplay ?? 0);
38351
+ const relativeFrameWithPostmount = relativeFrame - s.duration;
38341
38352
  const roundedFrame = Math.round(relativeFrame * 100) / 100;
38342
38353
  const isInRange = relativeFrame >= 0 && relativeFrame < s.duration;
38343
38354
  const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < s.duration && !isInRange;
38344
- const { marginLeft, width: width2, premountWidth } = useMemo106(() => {
38355
+ const isPostmounting = relativeFrameWithPostmount >= 0 && relativeFrameWithPostmount < (s.postmountDisplay ?? 0) && !isInRange;
38356
+ const { marginLeft, width: width2, premountWidth, postmountWidth } = useMemo106(() => {
38345
38357
  return getTimelineSequenceLayout({
38346
38358
  durationInFrames: s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration,
38347
38359
  startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
@@ -38349,7 +38361,8 @@ var Inner4 = ({ s, windowWidth }) => {
38349
38361
  maxMediaDuration,
38350
38362
  video,
38351
38363
  windowWidth,
38352
- premountDisplay: s.premountDisplay
38364
+ premountDisplay: s.premountDisplay,
38365
+ postmountDisplay: s.postmountDisplay
38353
38366
  });
38354
38367
  }, [maxMediaDuration, s, video, windowWidth]);
38355
38368
  const style11 = useMemo106(() => {
@@ -38387,6 +38400,21 @@ var Inner4 = ({ s, windowWidth }) => {
38387
38400
  position: "absolute"
38388
38401
  }
38389
38402
  }) : null,
38403
+ postmountWidth ? /* @__PURE__ */ jsx198("div", {
38404
+ style: {
38405
+ width: postmountWidth,
38406
+ height: "100%",
38407
+ background: `repeating-linear-gradient(
38408
+ -45deg,
38409
+ transparent,
38410
+ transparent 2px,
38411
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 2px,
38412
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 4px
38413
+ )`,
38414
+ position: "absolute",
38415
+ right: 0
38416
+ }
38417
+ }) : null,
38390
38418
  s.type === "audio" ? /* @__PURE__ */ jsx198(AudioWaveform, {
38391
38419
  src: s.src,
38392
38420
  doesVolumeChange: s.doesVolumeChange,
@@ -38405,7 +38433,7 @@ var Inner4 = ({ s, windowWidth }) => {
38405
38433
  s.loopDisplay === undefined ? null : /* @__PURE__ */ jsx198(LoopedTimelineIndicator, {
38406
38434
  loops: s.loopDisplay.numberOfTimes
38407
38435
  }),
38408
- s.type !== "audio" && s.type !== "video" && s.loopDisplay === undefined && (isInRange || isPremounting) ? /* @__PURE__ */ jsx198("div", {
38436
+ s.type !== "audio" && s.type !== "video" && s.loopDisplay === undefined && (isInRange || isPremounting || isPostmounting) ? /* @__PURE__ */ jsx198("div", {
38409
38437
  style: {
38410
38438
  paddingLeft: 5 + (premountWidth ?? 0),
38411
38439
  height: "100%",
@@ -38414,6 +38442,7 @@ var Inner4 = ({ s, windowWidth }) => {
38414
38442
  },
38415
38443
  children: /* @__PURE__ */ jsx198(TimelineSequenceFrame, {
38416
38444
  premounted: isPremounting,
38445
+ postmounted: isPostmounting ? s.duration - 1 : null,
38417
38446
  roundedFrame
38418
38447
  })
38419
38448
  }) : null
@@ -19096,7 +19096,8 @@ var calculateTimeline = ({
19096
19096
  nonce: 0,
19097
19097
  loopDisplay: undefined,
19098
19098
  stack: null,
19099
- premountDisplay: null
19099
+ premountDisplay: null,
19100
+ postmountDisplay: null
19100
19101
  },
19101
19102
  depth: 0,
19102
19103
  hash: "-"
@@ -20433,7 +20434,8 @@ var getTimelineSequenceLayout = ({
20433
20434
  startFromMedia,
20434
20435
  video,
20435
20436
  windowWidth,
20436
- premountDisplay
20437
+ premountDisplay,
20438
+ postmountDisplay
20437
20439
  }) => {
20438
20440
  const maxMediaSequenceDuration = (maxMediaDuration ?? Infinity) - startFromMedia;
20439
20441
  const lastFrame = (video.durationInFrames ?? 1) - 1;
@@ -20463,10 +20465,18 @@ var getTimelineSequenceLayout = ({
20463
20465
  spatialDuration: premountDisplay,
20464
20466
  windowWidth
20465
20467
  }) : null;
20468
+ const postmountWidth = postmountDisplay ? getWidthOfTrack({
20469
+ durationInFrames: postmountDisplay,
20470
+ lastFrame,
20471
+ nonNegativeMarginLeft,
20472
+ spatialDuration: postmountDisplay,
20473
+ windowWidth
20474
+ }) : null;
20466
20475
  return {
20467
20476
  marginLeft: Math.max(marginLeft, 0) - (premountWidth ?? 0),
20468
- width: width + (premountWidth ?? 0),
20469
- premountWidth
20477
+ width: width + (premountWidth ?? 0) + (postmountWidth ?? 0),
20478
+ premountWidth,
20479
+ postmountWidth
20470
20480
  };
20471
20481
  };
20472
20482
 
@@ -33444,7 +33454,7 @@ var innerParseMp3PacketHeader = (iterator) => {
33444
33454
  }
33445
33455
  }
33446
33456
  const audioVersionId = iterator.getBits(2);
33447
- if (audioVersionId !== 3 && audioVersionId !== 2) {
33457
+ if (audioVersionId !== 3 && audioVersionId !== 2 && audioVersionId !== 0) {
33448
33458
  throw new Error("Expected MPEG Version 1 or 2");
33449
33459
  }
33450
33460
  const mpegVersion = audioVersionId === 3 ? 1 : 2;
@@ -38258,10 +38268,10 @@ var relativeFrameStyle = {
38258
38268
  color: "white",
38259
38269
  opacity: 0.5
38260
38270
  };
38261
- var TimelineSequenceFrame = ({ roundedFrame, premounted }) => {
38271
+ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
38262
38272
  return /* @__PURE__ */ jsx197("div", {
38263
38273
  style: relativeFrameStyle,
38264
- children: premounted ? "0 (Premounted)" : roundedFrame
38274
+ children: premounted ? "0 (Premounted)" : postmounted !== null ? `${postmounted} (Postmounted)` : roundedFrame
38265
38275
  });
38266
38276
  };
38267
38277
 
@@ -38618,10 +38628,12 @@ var Inner4 = ({ s, windowWidth }) => {
38618
38628
  const frame2 = useCurrentFrame2();
38619
38629
  const relativeFrame = frame2 - s.from;
38620
38630
  const relativeFrameWithPremount = relativeFrame + (s.premountDisplay ?? 0);
38631
+ const relativeFrameWithPostmount = relativeFrame - s.duration;
38621
38632
  const roundedFrame = Math.round(relativeFrame * 100) / 100;
38622
38633
  const isInRange = relativeFrame >= 0 && relativeFrame < s.duration;
38623
38634
  const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < s.duration && !isInRange;
38624
- const { marginLeft, width: width2, premountWidth } = useMemo106(() => {
38635
+ const isPostmounting = relativeFrameWithPostmount >= 0 && relativeFrameWithPostmount < (s.postmountDisplay ?? 0) && !isInRange;
38636
+ const { marginLeft, width: width2, premountWidth, postmountWidth } = useMemo106(() => {
38625
38637
  return getTimelineSequenceLayout({
38626
38638
  durationInFrames: s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration,
38627
38639
  startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
@@ -38629,7 +38641,8 @@ var Inner4 = ({ s, windowWidth }) => {
38629
38641
  maxMediaDuration,
38630
38642
  video,
38631
38643
  windowWidth,
38632
- premountDisplay: s.premountDisplay
38644
+ premountDisplay: s.premountDisplay,
38645
+ postmountDisplay: s.postmountDisplay
38633
38646
  });
38634
38647
  }, [maxMediaDuration, s, video, windowWidth]);
38635
38648
  const style11 = useMemo106(() => {
@@ -38667,6 +38680,21 @@ var Inner4 = ({ s, windowWidth }) => {
38667
38680
  position: "absolute"
38668
38681
  }
38669
38682
  }) : null,
38683
+ postmountWidth ? /* @__PURE__ */ jsx199("div", {
38684
+ style: {
38685
+ width: postmountWidth,
38686
+ height: "100%",
38687
+ background: `repeating-linear-gradient(
38688
+ -45deg,
38689
+ transparent,
38690
+ transparent 2px,
38691
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 2px,
38692
+ rgba(255, 255, 255, ${isPostmounting ? 0.5 : 0.2}) 4px
38693
+ )`,
38694
+ position: "absolute",
38695
+ right: 0
38696
+ }
38697
+ }) : null,
38670
38698
  s.type === "audio" ? /* @__PURE__ */ jsx199(AudioWaveform, {
38671
38699
  src: s.src,
38672
38700
  doesVolumeChange: s.doesVolumeChange,
@@ -38685,7 +38713,7 @@ var Inner4 = ({ s, windowWidth }) => {
38685
38713
  s.loopDisplay === undefined ? null : /* @__PURE__ */ jsx199(LoopedTimelineIndicator, {
38686
38714
  loops: s.loopDisplay.numberOfTimes
38687
38715
  }),
38688
- s.type !== "audio" && s.type !== "video" && s.loopDisplay === undefined && (isInRange || isPremounting) ? /* @__PURE__ */ jsx199("div", {
38716
+ s.type !== "audio" && s.type !== "video" && s.loopDisplay === undefined && (isInRange || isPremounting || isPostmounting) ? /* @__PURE__ */ jsx199("div", {
38689
38717
  style: {
38690
38718
  paddingLeft: 5 + (premountWidth ?? 0),
38691
38719
  height: "100%",
@@ -38694,6 +38722,7 @@ var Inner4 = ({ s, windowWidth }) => {
38694
38722
  },
38695
38723
  children: /* @__PURE__ */ jsx199(TimelineSequenceFrame, {
38696
38724
  premounted: isPremounting,
38725
+ postmounted: isPostmounting ? s.duration - 1 : null,
38697
38726
  roundedFrame
38698
38727
  })
38699
38728
  }) : null
@@ -183,7 +183,7 @@ var renderContent = (Root) => {
183
183
  renderToDOM(/* @__PURE__ */ jsx("div", {
184
184
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
185
185
  }));
186
- import("./chunk-f6a78x4r.js").then(({ StudioInternals }) => {
186
+ import("./chunk-v6g6sx6z.js").then(({ StudioInternals }) => {
187
187
  renderToDOM(/* @__PURE__ */ jsx(StudioInternals.Studio, {
188
188
  readOnly: true,
189
189
  rootComponent: Root
@@ -23,6 +23,7 @@ const calculateTimeline = ({ sequences, sequenceDuration, }) => {
23
23
  loopDisplay: undefined,
24
24
  stack: null,
25
25
  premountDisplay: null,
26
+ postmountDisplay: null,
26
27
  },
27
28
  depth: 0,
28
29
  hash: '-',
@@ -1,6 +1,6 @@
1
1
  import type { VideoConfig } from 'remotion';
2
2
  export declare const SEQUENCE_BORDER_WIDTH = 1;
3
- export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, }: {
3
+ export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }: {
4
4
  durationInFrames: number;
5
5
  startFrom: number;
6
6
  startFromMedia: number;
@@ -8,8 +8,10 @@ export declare const getTimelineSequenceLayout: ({ durationInFrames, startFrom,
8
8
  video: VideoConfig;
9
9
  windowWidth: number;
10
10
  premountDisplay: number | null;
11
+ postmountDisplay: number | null;
11
12
  }) => {
12
13
  marginLeft: number;
13
14
  width: number;
14
15
  premountWidth: number | null;
16
+ postmountWidth: number | null;
15
17
  };
@@ -10,7 +10,7 @@ const getWidthOfTrack = ({ durationInFrames, lastFrame, windowWidth, spatialDura
10
10
  : (spatialDuration / lastFrame) * fullWidth;
11
11
  return base - exports.SEQUENCE_BORDER_WIDTH + nonNegativeMarginLeft;
12
12
  };
13
- const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, }) => {
13
+ const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }) => {
14
14
  var _a;
15
15
  const maxMediaSequenceDuration = (maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity) - startFromMedia;
16
16
  const lastFrame = ((_a = video.durationInFrames) !== null && _a !== void 0 ? _a : 1) - 1;
@@ -47,10 +47,20 @@ const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDurati
47
47
  windowWidth,
48
48
  })
49
49
  : null;
50
+ const postmountWidth = postmountDisplay
51
+ ? getWidthOfTrack({
52
+ durationInFrames: postmountDisplay,
53
+ lastFrame,
54
+ nonNegativeMarginLeft,
55
+ spatialDuration: postmountDisplay,
56
+ windowWidth,
57
+ })
58
+ : null;
50
59
  return {
51
60
  marginLeft: Math.max(marginLeft, 0) - (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0),
52
- width: width + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0),
61
+ width: width + (premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0) + (postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0),
53
62
  premountWidth,
63
+ postmountWidth,
54
64
  };
55
65
  };
56
66
  exports.getTimelineSequenceLayout = getTimelineSequenceLayout;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
4
  },
5
5
  "name": "@remotion/studio",
6
- "version": "4.0.339",
6
+ "version": "4.0.340",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "sideEffects": false,
@@ -23,21 +23,21 @@
23
23
  "source-map": "0.7.3",
24
24
  "open": "^8.4.2",
25
25
  "zod": "3.22.3",
26
- "@remotion/renderer": "4.0.339",
27
- "remotion": "4.0.339",
28
- "@remotion/zod-types": "4.0.339",
29
- "@remotion/webcodecs": "4.0.339",
30
- "@remotion/player": "4.0.339",
31
- "@remotion/media-utils": "4.0.339",
32
- "@remotion/media-parser": "4.0.339",
33
- "@remotion/studio-shared": "4.0.339"
26
+ "@remotion/media-utils": "4.0.340",
27
+ "@remotion/studio-shared": "4.0.340",
28
+ "@remotion/webcodecs": "4.0.340",
29
+ "@remotion/zod-types": "4.0.340",
30
+ "@remotion/player": "4.0.340",
31
+ "remotion": "4.0.340",
32
+ "@remotion/media-parser": "4.0.340",
33
+ "@remotion/renderer": "4.0.340"
34
34
  },
35
35
  "devDependencies": {
36
36
  "react": "19.0.0",
37
37
  "react-dom": "19.0.0",
38
38
  "@types/semver": "^7.3.4",
39
39
  "eslint": "9.19.0",
40
- "@remotion/eslint-config-internal": "4.0.339"
40
+ "@remotion/eslint-config-internal": "4.0.340"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"