@remotion/studio 4.0.467 → 4.0.468

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.
@@ -4,4 +4,5 @@ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-s
4
4
  export declare const TimelineExpandedTrackKeyframes: React.NamedExoticComponent<{
5
5
  readonly sequence: TSequence;
6
6
  readonly nodePathInfo: SequenceNodePathInfo;
7
+ readonly keyframeDisplayOffset: number;
7
8
  }>;
@@ -62,13 +62,13 @@ const diamondBase = {
62
62
  boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.4)',
63
63
  pointerEvents: 'none',
64
64
  };
65
- const getNodeKeyframes = ({ node, nodePath, codeValues, }) => {
65
+ const getNodeKeyframes = ({ node, nodePath, codeValues, keyframeDisplayOffset, }) => {
66
66
  var _a, _b;
67
67
  if (node.kind !== 'field' || node.field === null) {
68
68
  return [];
69
69
  }
70
70
  if (node.field.kind === 'sequence-field') {
71
- return (0, get_timeline_keyframes_1.getTimelineKeyframes)((_a = remotion_1.Internals.getCodeValuesCtx(codeValues, nodePath)) === null || _a === void 0 ? void 0 : _a[node.field.key]);
71
+ return (0, get_timeline_keyframes_1.getTimelineKeyframes)((_a = remotion_1.Internals.getCodeValuesCtx(codeValues, nodePath)) === null || _a === void 0 ? void 0 : _a[node.field.key], keyframeDisplayOffset);
72
72
  }
73
73
  const effectStatus = remotion_1.Internals.getEffectCodeValuesCtx({
74
74
  codeValues,
@@ -77,9 +77,9 @@ const getNodeKeyframes = ({ node, nodePath, codeValues, }) => {
77
77
  });
78
78
  return (0, get_timeline_keyframes_1.getTimelineKeyframes)(effectStatus.type === 'can-update-effect'
79
79
  ? (_b = effectStatus.props) === null || _b === void 0 ? void 0 : _b[node.field.key]
80
- : null);
80
+ : null, keyframeDisplayOffset);
81
81
  };
82
- const TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
82
+ const TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence, keyframeDisplayOffset }) => {
83
83
  const videoConfig = (0, remotion_1.useVideoConfig)();
84
84
  const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
85
85
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
@@ -104,9 +104,15 @@ const TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
104
104
  node,
105
105
  nodePath: nodePathInfo.sequenceSubscriptionKey,
106
106
  codeValues,
107
+ keyframeDisplayOffset,
107
108
  }),
108
109
  key: JSON.stringify(node.nodePathInfo),
109
- })), [codeValues, flat, nodePathInfo.sequenceSubscriptionKey]);
110
+ })), [
111
+ codeValues,
112
+ flat,
113
+ keyframeDisplayOffset,
114
+ nodePathInfo.sequenceSubscriptionKey,
115
+ ]);
110
116
  return (jsx_runtime_1.jsx("div", { style: {
111
117
  height: expandedHeight + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
112
118
  }, children: jsx_runtime_1.jsx("div", { style: { ...section, height: expandedHeight }, children: rows.map(({ height, keyframes, key }, i) => {
@@ -69,7 +69,7 @@ const TimelineTracksInner = ({ timeline, hasBeenCut }) => {
69
69
  jsx_runtime_1.jsx("div", { style: {
70
70
  height: (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type),
71
71
  marginBottom: timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
72
- }, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), isExpanded && track.nodePathInfo && previewServerConnected ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo })) : null] }, track.sequence.id));
72
+ }, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), isExpanded && track.nodePathInfo && previewServerConnected ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset })) : null] }, track.sequence.id));
73
73
  })] }), hasBeenCut ? jsx_runtime_1.jsx(MaxTimelineTracks_1.MaxTimelineTracksReached, {}) : null] }));
74
74
  };
75
75
  exports.TimelineTracks = react_1.default.memo(TimelineTracksInner);
@@ -1,6 +1,6 @@
1
1
  import type { CanUpdateSequencePropStatus, CanUpdateSequencePropStatusFalse } from 'remotion';
2
2
  export declare const getComputedStatusLabel: (propStatus: CanUpdateSequencePropStatusFalse) => string;
3
- export declare const getTimelineKeyframes: (propStatus: CanUpdateSequencePropStatus | null | undefined) => {
3
+ export declare const getTimelineKeyframes: (propStatus: CanUpdateSequencePropStatus | null | undefined, keyframeDisplayOffset?: number) => {
4
4
  frame: number;
5
5
  value: unknown;
6
6
  }[];
@@ -9,7 +9,7 @@ const getComputedStatusLabel = (propStatus) => {
9
9
  return ((_a = propStatus.keyframes) === null || _a === void 0 ? void 0 : _a.length) ? 'keyframed' : 'computed';
10
10
  };
11
11
  exports.getComputedStatusLabel = getComputedStatusLabel;
12
- const getTimelineKeyframes = (propStatus) => {
12
+ const getTimelineKeyframes = (propStatus, keyframeDisplayOffset = 0) => {
13
13
  var _a;
14
14
  if (!propStatus || propStatus.canUpdate) {
15
15
  return [];
@@ -17,6 +17,13 @@ const getTimelineKeyframes = (propStatus) => {
17
17
  if (propStatus.reason !== 'computed') {
18
18
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
19
19
  }
20
- return (_a = propStatus.keyframes) !== null && _a !== void 0 ? _a : [];
20
+ const keyframes = (_a = propStatus.keyframes) !== null && _a !== void 0 ? _a : [];
21
+ if (keyframeDisplayOffset === 0) {
22
+ return keyframes;
23
+ }
24
+ return keyframes.map((keyframe) => ({
25
+ ...keyframe,
26
+ frame: keyframe.frame + keyframeDisplayOffset,
27
+ }));
21
28
  };
22
29
  exports.getTimelineKeyframes = getTimelineKeyframes;
@@ -0,0 +1,25 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
17
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
18
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
19
+ }) : x)(function(x) {
20
+ if (typeof require !== "undefined")
21
+ return require.apply(this, arguments);
22
+ throw Error('Dynamic require of "' + x + '" is not supported');
23
+ });
24
+
25
+ export { __toESM, __require };
@@ -1,6 +1,7 @@
1
1
  import {
2
- __require
3
- } from "./chunk-5gtx3pza.js";
2
+ __require,
3
+ __toESM
4
+ } from "./chunk-6jf1natv.js";
4
5
 
5
6
  // src/Studio.tsx
6
7
  import { useLayoutEffect as useLayoutEffect5 } from "react";
@@ -21951,6 +21952,7 @@ var calculateTimeline = ({
21951
21952
  const visibleDuration = getTimelineVisibleDuration(sequence, sortedSequences);
21952
21953
  const overrideId = sequence.controls?.overrideId ?? null;
21953
21954
  const nodePath = overrideId ? overrideIdsToNodePaths[overrideId] : null;
21955
+ const hasKeyframeRows = sequence.controls !== null || sequence.effects.length > 0;
21954
21956
  tracks.push({
21955
21957
  sequence: {
21956
21958
  ...sequence,
@@ -21962,6 +21964,7 @@ var calculateTimeline = ({
21962
21964
  hash: actualHash,
21963
21965
  cascadedStart,
21964
21966
  cascadedDuration: sequence.duration,
21967
+ keyframeDisplayOffset: hasKeyframeRows ? cascadedStart - sequence.from : 0,
21965
21968
  nodePathInfo: nodePath ? {
21966
21969
  sequenceSubscriptionKey: nodePath,
21967
21970
  auxiliaryKeys: [],
@@ -23462,14 +23465,21 @@ var getComputedStatusLabel = (propStatus) => {
23462
23465
  }
23463
23466
  return propStatus.keyframes?.length ? "keyframed" : "computed";
23464
23467
  };
23465
- var getTimelineKeyframes = (propStatus) => {
23468
+ var getTimelineKeyframes = (propStatus, keyframeDisplayOffset = 0) => {
23466
23469
  if (!propStatus || propStatus.canUpdate) {
23467
23470
  return [];
23468
23471
  }
23469
23472
  if (propStatus.reason !== "computed") {
23470
23473
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
23471
23474
  }
23472
- return propStatus.keyframes ?? [];
23475
+ const keyframes = propStatus.keyframes ?? [];
23476
+ if (keyframeDisplayOffset === 0) {
23477
+ return keyframes;
23478
+ }
23479
+ return keyframes.map((keyframe) => ({
23480
+ ...keyframe,
23481
+ frame: keyframe.frame + keyframeDisplayOffset
23482
+ }));
23473
23483
  };
23474
23484
 
23475
23485
  // src/components/Timeline/timeline-field-row-layout.ts
@@ -25720,22 +25730,23 @@ var diamondBase = {
25720
25730
  var getNodeKeyframes = ({
25721
25731
  node,
25722
25732
  nodePath,
25723
- codeValues
25733
+ codeValues,
25734
+ keyframeDisplayOffset
25724
25735
  }) => {
25725
25736
  if (node.kind !== "field" || node.field === null) {
25726
25737
  return [];
25727
25738
  }
25728
25739
  if (node.field.kind === "sequence-field") {
25729
- return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key]);
25740
+ return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key], keyframeDisplayOffset);
25730
25741
  }
25731
25742
  const effectStatus = Internals63.getEffectCodeValuesCtx({
25732
25743
  codeValues,
25733
25744
  nodePath,
25734
25745
  effectIndex: node.field.effectIndex
25735
25746
  });
25736
- return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null);
25747
+ return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null, keyframeDisplayOffset);
25737
25748
  };
25738
- var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
25749
+ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence, keyframeDisplayOffset }) => {
25739
25750
  const videoConfig = useVideoConfig5();
25740
25751
  const timelineWidth = useContext83(TimelineWidthContext);
25741
25752
  const { getIsExpanded } = useContext83(ExpandedTracksGetterContext);
@@ -25759,10 +25770,16 @@ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
25759
25770
  keyframes: getNodeKeyframes({
25760
25771
  node,
25761
25772
  nodePath: nodePathInfo.sequenceSubscriptionKey,
25762
- codeValues
25773
+ codeValues,
25774
+ keyframeDisplayOffset
25763
25775
  }),
25764
25776
  key: JSON.stringify(node.nodePathInfo)
25765
- })), [codeValues, flat, nodePathInfo.sequenceSubscriptionKey]);
25777
+ })), [
25778
+ codeValues,
25779
+ flat,
25780
+ keyframeDisplayOffset,
25781
+ nodePathInfo.sequenceSubscriptionKey
25782
+ ]);
25766
25783
  return /* @__PURE__ */ jsx225("div", {
25767
25784
  style: {
25768
25785
  height: expandedHeight + TIMELINE_ITEM_BORDER_BOTTOM
@@ -26867,7 +26884,8 @@ var TimelineTracksInner = ({ timeline, hasBeenCut }) => {
26867
26884
  }),
26868
26885
  isExpanded && track.nodePathInfo && previewServerConnected ? /* @__PURE__ */ jsx233(TimelineExpandedTrackKeyframes, {
26869
26886
  sequence: track.sequence,
26870
- nodePathInfo: track.nodePathInfo
26887
+ nodePathInfo: track.nodePathInfo,
26888
+ keyframeDisplayOffset: track.keyframeDisplayOffset
26871
26889
  }) : null
26872
26890
  ]
26873
26891
  }, track.sequence.id);
@@ -1,3 +1,19 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
1
17
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
18
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
19
  }) : x)(function(x) {
@@ -1,3 +1,19 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
1
17
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
18
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
19
  }) : x)(function(x) {
@@ -21955,6 +21971,7 @@ var calculateTimeline = ({
21955
21971
  const visibleDuration = getTimelineVisibleDuration(sequence, sortedSequences);
21956
21972
  const overrideId = sequence.controls?.overrideId ?? null;
21957
21973
  const nodePath = overrideId ? overrideIdsToNodePaths[overrideId] : null;
21974
+ const hasKeyframeRows = sequence.controls !== null || sequence.effects.length > 0;
21958
21975
  tracks.push({
21959
21976
  sequence: {
21960
21977
  ...sequence,
@@ -21966,6 +21983,7 @@ var calculateTimeline = ({
21966
21983
  hash: actualHash,
21967
21984
  cascadedStart,
21968
21985
  cascadedDuration: sequence.duration,
21986
+ keyframeDisplayOffset: hasKeyframeRows ? cascadedStart - sequence.from : 0,
21969
21987
  nodePathInfo: nodePath ? {
21970
21988
  sequenceSubscriptionKey: nodePath,
21971
21989
  auxiliaryKeys: [],
@@ -23466,14 +23484,21 @@ var getComputedStatusLabel = (propStatus) => {
23466
23484
  }
23467
23485
  return propStatus.keyframes?.length ? "keyframed" : "computed";
23468
23486
  };
23469
- var getTimelineKeyframes = (propStatus) => {
23487
+ var getTimelineKeyframes = (propStatus, keyframeDisplayOffset = 0) => {
23470
23488
  if (!propStatus || propStatus.canUpdate) {
23471
23489
  return [];
23472
23490
  }
23473
23491
  if (propStatus.reason !== "computed") {
23474
23492
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
23475
23493
  }
23476
- return propStatus.keyframes ?? [];
23494
+ const keyframes = propStatus.keyframes ?? [];
23495
+ if (keyframeDisplayOffset === 0) {
23496
+ return keyframes;
23497
+ }
23498
+ return keyframes.map((keyframe) => ({
23499
+ ...keyframe,
23500
+ frame: keyframe.frame + keyframeDisplayOffset
23501
+ }));
23477
23502
  };
23478
23503
 
23479
23504
  // src/components/Timeline/timeline-field-row-layout.ts
@@ -25724,22 +25749,23 @@ var diamondBase = {
25724
25749
  var getNodeKeyframes = ({
25725
25750
  node,
25726
25751
  nodePath,
25727
- codeValues
25752
+ codeValues,
25753
+ keyframeDisplayOffset
25728
25754
  }) => {
25729
25755
  if (node.kind !== "field" || node.field === null) {
25730
25756
  return [];
25731
25757
  }
25732
25758
  if (node.field.kind === "sequence-field") {
25733
- return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key]);
25759
+ return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key], keyframeDisplayOffset);
25734
25760
  }
25735
25761
  const effectStatus = Internals63.getEffectCodeValuesCtx({
25736
25762
  codeValues,
25737
25763
  nodePath,
25738
25764
  effectIndex: node.field.effectIndex
25739
25765
  });
25740
- return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null);
25766
+ return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null, keyframeDisplayOffset);
25741
25767
  };
25742
- var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
25768
+ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence, keyframeDisplayOffset }) => {
25743
25769
  const videoConfig = useVideoConfig5();
25744
25770
  const timelineWidth = useContext83(TimelineWidthContext);
25745
25771
  const { getIsExpanded } = useContext83(ExpandedTracksGetterContext);
@@ -25763,10 +25789,16 @@ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
25763
25789
  keyframes: getNodeKeyframes({
25764
25790
  node,
25765
25791
  nodePath: nodePathInfo.sequenceSubscriptionKey,
25766
- codeValues
25792
+ codeValues,
25793
+ keyframeDisplayOffset
25767
25794
  }),
25768
25795
  key: JSON.stringify(node.nodePathInfo)
25769
- })), [codeValues, flat, nodePathInfo.sequenceSubscriptionKey]);
25796
+ })), [
25797
+ codeValues,
25798
+ flat,
25799
+ keyframeDisplayOffset,
25800
+ nodePathInfo.sequenceSubscriptionKey
25801
+ ]);
25770
25802
  return /* @__PURE__ */ jsx225("div", {
25771
25803
  style: {
25772
25804
  height: expandedHeight + TIMELINE_ITEM_BORDER_BOTTOM
@@ -26871,7 +26903,8 @@ var TimelineTracksInner = ({ timeline, hasBeenCut }) => {
26871
26903
  }),
26872
26904
  isExpanded && track.nodePathInfo && previewServerConnected ? /* @__PURE__ */ jsx233(TimelineExpandedTrackKeyframes, {
26873
26905
  sequence: track.sequence,
26874
- nodePathInfo: track.nodePathInfo
26906
+ nodePathInfo: track.nodePathInfo,
26907
+ keyframeDisplayOffset: track.keyframeDisplayOffset
26875
26908
  }) : null
26876
26909
  ]
26877
26910
  }, track.sequence.id);
@@ -1,3 +1,19 @@
1
+ var __create = Object.create;
2
+ var __getProtoOf = Object.getPrototypeOf;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __toESM = (mod, isNodeMode, target) => {
7
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
8
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
+ for (let key of __getOwnPropNames(mod))
10
+ if (!__hasOwnProp.call(to, key))
11
+ __defProp(to, key, {
12
+ get: () => mod[key],
13
+ enumerable: true
14
+ });
15
+ return to;
16
+ };
1
17
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
18
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
19
  }) : x)(function(x) {
@@ -22535,6 +22551,7 @@ var calculateTimeline = ({
22535
22551
  const visibleDuration = getTimelineVisibleDuration(sequence, sortedSequences);
22536
22552
  const overrideId = sequence.controls?.overrideId ?? null;
22537
22553
  const nodePath = overrideId ? overrideIdsToNodePaths[overrideId] : null;
22554
+ const hasKeyframeRows = sequence.controls !== null || sequence.effects.length > 0;
22538
22555
  tracks.push({
22539
22556
  sequence: {
22540
22557
  ...sequence,
@@ -22546,6 +22563,7 @@ var calculateTimeline = ({
22546
22563
  hash: actualHash,
22547
22564
  cascadedStart,
22548
22565
  cascadedDuration: sequence.duration,
22566
+ keyframeDisplayOffset: hasKeyframeRows ? cascadedStart - sequence.from : 0,
22549
22567
  nodePathInfo: nodePath ? {
22550
22568
  sequenceSubscriptionKey: nodePath,
22551
22569
  auxiliaryKeys: [],
@@ -24046,14 +24064,21 @@ var getComputedStatusLabel = (propStatus) => {
24046
24064
  }
24047
24065
  return propStatus.keyframes?.length ? "keyframed" : "computed";
24048
24066
  };
24049
- var getTimelineKeyframes = (propStatus) => {
24067
+ var getTimelineKeyframes = (propStatus, keyframeDisplayOffset = 0) => {
24050
24068
  if (!propStatus || propStatus.canUpdate) {
24051
24069
  return [];
24052
24070
  }
24053
24071
  if (propStatus.reason !== "computed") {
24054
24072
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
24055
24073
  }
24056
- return propStatus.keyframes ?? [];
24074
+ const keyframes = propStatus.keyframes ?? [];
24075
+ if (keyframeDisplayOffset === 0) {
24076
+ return keyframes;
24077
+ }
24078
+ return keyframes.map((keyframe) => ({
24079
+ ...keyframe,
24080
+ frame: keyframe.frame + keyframeDisplayOffset
24081
+ }));
24057
24082
  };
24058
24083
 
24059
24084
  // src/components/Timeline/timeline-field-row-layout.ts
@@ -26304,22 +26329,23 @@ var diamondBase = {
26304
26329
  var getNodeKeyframes = ({
26305
26330
  node,
26306
26331
  nodePath,
26307
- codeValues
26332
+ codeValues,
26333
+ keyframeDisplayOffset
26308
26334
  }) => {
26309
26335
  if (node.kind !== "field" || node.field === null) {
26310
26336
  return [];
26311
26337
  }
26312
26338
  if (node.field.kind === "sequence-field") {
26313
- return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key]);
26339
+ return getTimelineKeyframes(Internals63.getCodeValuesCtx(codeValues, nodePath)?.[node.field.key], keyframeDisplayOffset);
26314
26340
  }
26315
26341
  const effectStatus = Internals63.getEffectCodeValuesCtx({
26316
26342
  codeValues,
26317
26343
  nodePath,
26318
26344
  effectIndex: node.field.effectIndex
26319
26345
  });
26320
- return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null);
26346
+ return getTimelineKeyframes(effectStatus.type === "can-update-effect" ? effectStatus.props?.[node.field.key] : null, keyframeDisplayOffset);
26321
26347
  };
26322
- var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
26348
+ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence, keyframeDisplayOffset }) => {
26323
26349
  const videoConfig = useVideoConfig5();
26324
26350
  const timelineWidth = useContext83(TimelineWidthContext);
26325
26351
  const { getIsExpanded } = useContext83(ExpandedTracksGetterContext);
@@ -26343,10 +26369,16 @@ var TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
26343
26369
  keyframes: getNodeKeyframes({
26344
26370
  node,
26345
26371
  nodePath: nodePathInfo.sequenceSubscriptionKey,
26346
- codeValues
26372
+ codeValues,
26373
+ keyframeDisplayOffset
26347
26374
  }),
26348
26375
  key: JSON.stringify(node.nodePathInfo)
26349
- })), [codeValues, flat, nodePathInfo.sequenceSubscriptionKey]);
26376
+ })), [
26377
+ codeValues,
26378
+ flat,
26379
+ keyframeDisplayOffset,
26380
+ nodePathInfo.sequenceSubscriptionKey
26381
+ ]);
26350
26382
  return /* @__PURE__ */ jsx227("div", {
26351
26383
  style: {
26352
26384
  height: expandedHeight + TIMELINE_ITEM_BORDER_BOTTOM
@@ -27451,7 +27483,8 @@ var TimelineTracksInner = ({ timeline, hasBeenCut }) => {
27451
27483
  }),
27452
27484
  isExpanded && track.nodePathInfo && previewServerConnected ? /* @__PURE__ */ jsx235(TimelineExpandedTrackKeyframes, {
27453
27485
  sequence: track.sequence,
27454
- nodePathInfo: track.nodePathInfo
27486
+ nodePathInfo: track.nodePathInfo,
27487
+ keyframeDisplayOffset: track.keyframeDisplayOffset
27455
27488
  }) : null
27456
27489
  ]
27457
27490
  }, track.sequence.id);
@@ -1,6 +1,7 @@
1
1
  import {
2
- __require
3
- } from "./chunk-5gtx3pza.js";
2
+ __require,
3
+ __toESM
4
+ } from "./chunk-6jf1natv.js";
4
5
 
5
6
  // src/renderEntry.tsx
6
7
  import { useContext, useEffect, useRef, useState } from "react";
@@ -206,7 +207,7 @@ var renderContent = (Root) => {
206
207
  renderToDOM(/* @__PURE__ */ jsx("div", {
207
208
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
208
209
  }));
209
- import("./chunk-vwnse6c9.js").then(({ StudioInternals }) => {
210
+ import("./chunk-8q828zk7.js").then(({ StudioInternals }) => {
210
211
  window.remotion_isStudio = true;
211
212
  window.remotion_isReadOnlyStudio = true;
212
213
  window.remotion_inputProps = "{}";
@@ -46,6 +46,7 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, }) => {
46
46
  const visibleDuration = (0, get_sequence_visible_range_1.getTimelineVisibleDuration)(sequence, sortedSequences);
47
47
  const overrideId = (_b = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _b !== void 0 ? _b : null;
48
48
  const nodePath = overrideId ? overrideIdsToNodePaths[overrideId] : null;
49
+ const hasKeyframeRows = sequence.controls !== null || sequence.effects.length > 0;
49
50
  tracks.push({
50
51
  sequence: {
51
52
  ...sequence,
@@ -59,6 +60,9 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, }) => {
59
60
  hash: actualHash,
60
61
  cascadedStart,
61
62
  cascadedDuration: sequence.duration,
63
+ keyframeDisplayOffset: hasKeyframeRows
64
+ ? cascadedStart - sequence.from
65
+ : 0,
62
66
  nodePathInfo: nodePath
63
67
  ? {
64
68
  sequenceSubscriptionKey: nodePath,
@@ -9,6 +9,7 @@ type Track = {
9
9
  sequence: TSequence;
10
10
  depth: number;
11
11
  nodePathInfo: SequenceNodePathInfo | null;
12
+ keyframeDisplayOffset: number;
12
13
  };
13
14
  export type TrackWithHash = Track & {
14
15
  hash: string;
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.467",
6
+ "version": "4.0.468",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "scripts": {
@@ -25,14 +25,14 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "semver": "7.5.3",
28
- "remotion": "4.0.467",
29
- "@remotion/player": "4.0.467",
30
- "@remotion/media-utils": "4.0.467",
31
- "@remotion/renderer": "4.0.467",
32
- "@remotion/web-renderer": "4.0.467",
33
- "@remotion/studio-shared": "4.0.467",
34
- "@remotion/timeline-utils": "4.0.467",
35
- "@remotion/zod-types": "4.0.467",
28
+ "remotion": "4.0.468",
29
+ "@remotion/player": "4.0.468",
30
+ "@remotion/media-utils": "4.0.468",
31
+ "@remotion/renderer": "4.0.468",
32
+ "@remotion/web-renderer": "4.0.468",
33
+ "@remotion/studio-shared": "4.0.468",
34
+ "@remotion/timeline-utils": "4.0.468",
35
+ "@remotion/zod-types": "4.0.468",
36
36
  "@jridgewell/trace-mapping": "0.3.31",
37
37
  "mediabunny": "1.45.0",
38
38
  "memfs": "3.4.3",
@@ -43,7 +43,7 @@
43
43
  "react": "19.2.3",
44
44
  "react-dom": "19.2.3",
45
45
  "@types/semver": "7.5.3",
46
- "@remotion/eslint-config-internal": "4.0.467",
46
+ "@remotion/eslint-config-internal": "4.0.468",
47
47
  "eslint": "9.19.0",
48
48
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
49
49
  },
@@ -1,9 +0,0 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined")
5
- return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
-
9
- export { __require };