@remotion/studio 4.0.454 → 4.0.455

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.
@@ -3,4 +3,5 @@ export declare const PlayPause: React.FC<{
3
3
  readonly playbackRate: number;
4
4
  readonly loop: boolean;
5
5
  readonly bufferStateDelayInMilliseconds: number;
6
+ readonly muted: boolean;
6
7
  }>;
@@ -29,7 +29,7 @@ const iconButton = {
29
29
  width: 14,
30
30
  color: 'white',
31
31
  };
32
- const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
32
+ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
33
33
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
34
34
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
35
35
  const [showBufferIndicator, setShowBufferState] = (0, react_1.useState)(false);
@@ -44,6 +44,7 @@ const PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
44
44
  browserMediaControlsBehavior: {
45
45
  mode: 'register-media-session',
46
46
  },
47
+ muted,
47
48
  });
48
49
  const isStill = (0, is_current_selected_still_1.useIsStill)();
49
50
  (0, react_1.useEffect)(() => {
@@ -140,7 +140,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
140
140
  jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
141
141
  jsx_runtime_1.jsx("div", { style: padding }), jsx_runtime_1.jsx(TimelineZoomControls_1.TimelineZoomControls, {})
142
142
  ] }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate })) : null] })), isVideoComposition ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
143
- jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PlayPause_1.PlayPause, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, loop: loop, playbackRate: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(LoopToggle_1.LoopToggle, { loop: loop, setLoop: setLoop }), jsx_runtime_1.jsx(MuteToggle_1.MuteToggle, { muted: mediaMuted, setMuted: setMediaMuted }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(TimelineInOutToggle_1.TimelineInOutPointToggle, {}), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 })
143
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PlayPause_1.PlayPause, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, loop: loop, playbackRate: playbackRate, muted: mediaMuted }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(LoopToggle_1.LoopToggle, { loop: loop, setLoop: setLoop }), jsx_runtime_1.jsx(MuteToggle_1.MuteToggle, { muted: mediaMuted, setMuted: setMediaMuted }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(TimelineInOutToggle_1.TimelineInOutPointToggle, {}), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 })
144
144
  ] })) : null, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canvasContent && isFullscreenSupported ? jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, {}) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
145
145
  jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate })) : null] })), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
146
146
  jsx_runtime_1.jsx(layout_1.Flex, {}), !isMobileLayout && jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
@@ -104,7 +104,7 @@ const TimelineInner = () => {
104
104
  (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type) +
105
105
  Number(timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM) +
106
106
  (isExpanded
107
- ? (0, timeline_layout_1.getExpandedTrackHeight)(track.sequence.controls) +
107
+ ? (0, timeline_layout_1.getExpandedTrackHeight)(track.sequence, expandedTracks) +
108
108
  timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM
109
109
  : 0));
110
110
  }, 0) +
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const TimelineExpandArrowButton: React.FC<{
3
+ readonly isExpanded: boolean;
4
+ readonly onClick: () => void;
5
+ readonly label: string;
6
+ }>;
7
+ export declare const TimelineExpandArrowSpacer: React.FC;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineExpandArrowSpacer = exports.TimelineExpandArrowButton = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const arrowButton = {
7
+ background: 'none',
8
+ border: 'none',
9
+ color: 'white',
10
+ cursor: 'pointer',
11
+ padding: 0,
12
+ display: 'flex',
13
+ alignItems: 'center',
14
+ justifyContent: 'center',
15
+ width: 12,
16
+ height: 12,
17
+ flexShrink: 0,
18
+ fontSize: 8,
19
+ marginRight: 4,
20
+ userSelect: 'none',
21
+ outline: 'none',
22
+ lineHeight: 1,
23
+ };
24
+ const svgStyle = { display: 'block' };
25
+ const TimelineExpandArrowButton = ({ isExpanded, onClick, label }) => {
26
+ const style = (0, react_1.useMemo)(() => {
27
+ return {
28
+ ...arrowButton,
29
+ transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
30
+ };
31
+ }, [isExpanded]);
32
+ return (jsx_runtime_1.jsx("button", { type: "button", style: style, onClick: onClick, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} ${label}`, children: jsx_runtime_1.jsx("svg", { width: "12", height: "12", viewBox: "0 0 8 8", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M2 1L6 4L2 7Z", fill: "white" }) }) }));
33
+ };
34
+ exports.TimelineExpandArrowButton = TimelineExpandArrowButton;
35
+ const TimelineExpandArrowSpacer = () => {
36
+ return jsx_runtime_1.jsx("div", { style: arrowButton });
37
+ };
38
+ exports.TimelineExpandArrowSpacer = TimelineExpandArrowSpacer;
@@ -2,8 +2,6 @@ import type { SequenceNodePath } from '@remotion/studio-shared';
2
2
  import React from 'react';
3
3
  import type { TSequence } from 'remotion';
4
4
  import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
5
- export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
6
- export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
7
5
  export declare const TimelineExpandedSection: React.FC<{
8
6
  readonly sequence: TSequence;
9
7
  readonly originalLocation: OriginalPosition | null;
@@ -33,14 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.TimelineExpandedSection = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = void 0;
36
+ exports.TimelineExpandedSection = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const colors_1 = require("../../helpers/colors");
40
40
  const timeline_layout_1 = require("../../helpers/timeline-layout");
41
+ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
42
+ const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
41
43
  const TimelineFieldRow_1 = require("./TimelineFieldRow");
42
- exports.EXPANDED_SECTION_PADDING_LEFT = 28;
43
- exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
44
+ const TimelineListItem_1 = require("./TimelineListItem");
44
45
  const expandedSectionBase = {
45
46
  color: 'white',
46
47
  fontFamily: 'Arial, Helvetica, sans-serif',
@@ -53,11 +54,27 @@ const separator = {
53
54
  height: 1,
54
55
  backgroundColor: colors_1.TIMELINE_TRACK_SEPARATOR,
55
56
  };
57
+ const groupRowBase = {
58
+ height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
59
+ display: 'flex',
60
+ alignItems: 'center',
61
+ paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
62
+ };
63
+ const rowLabel = {
64
+ fontSize: 12,
65
+ color: 'rgba(255, 255, 255, 0.8)',
66
+ userSelect: 'none',
67
+ };
68
+ const labelOnlyRowBase = {
69
+ display: 'flex',
70
+ alignItems: 'center',
71
+ paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
72
+ };
56
73
  const TimelineExpandedSection = ({ sequence, originalLocation, nestedDepth, nodePath }) => {
57
74
  var _a;
58
75
  var _b;
76
+ const { expandedTracks, toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksContext);
59
77
  const overrideId = (_b = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _b !== void 0 ? _b : sequence.id;
60
- const schemaFields = (0, react_1.useMemo)(() => (0, timeline_layout_1.getSchemaFields)(sequence.controls), [sequence.controls]);
61
78
  const validatedLocation = (0, react_1.useMemo)(() => {
62
79
  var _a;
63
80
  if (!originalLocation ||
@@ -71,24 +88,56 @@ const TimelineExpandedSection = ({ sequence, originalLocation, nestedDepth, node
71
88
  column: (_a = originalLocation.column) !== null && _a !== void 0 ? _a : 0,
72
89
  };
73
90
  }, [originalLocation]);
74
- const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)(sequence.controls), [sequence.controls]);
91
+ const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)(sequence), [sequence]);
92
+ const flat = (0, react_1.useMemo)(() => (0, timeline_layout_1.flattenVisibleTreeNodes)(tree, expandedTracks), [tree, expandedTracks]);
93
+ const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)(sequence, expandedTracks), [sequence, expandedTracks]);
94
+ const sequenceOffsetPx = TimelineListItem_1.SPACING * 3 * nestedDepth;
95
+ const keysToObserve = (0, react_1.useMemo)(() => {
96
+ const fields = (0, timeline_layout_1.getSchemaFields)(sequence.controls);
97
+ if (!fields) {
98
+ return [];
99
+ }
100
+ return fields.map((f) => f.key);
101
+ }, [sequence.controls]);
75
102
  const style = (0, react_1.useMemo)(() => {
76
103
  return {
77
104
  ...expandedSectionBase,
78
105
  height: expandedHeight,
79
106
  };
80
107
  }, [expandedHeight]);
81
- const keysToObserve = (0, react_1.useMemo)(() => {
82
- if (!schemaFields) {
83
- return [];
108
+ const renderRow = (0, react_1.useCallback)((node, depth) => {
109
+ var _a;
110
+ const paddingLeft = timeline_layout_1.EXPANDED_SECTION_PADDING_LEFT +
111
+ depth * timeline_layout_1.TREE_INDENT_PER_LEVEL +
112
+ sequenceOffsetPx;
113
+ if (node.kind === 'group') {
114
+ const isExpanded = (_a = expandedTracks[node.id]) !== null && _a !== void 0 ? _a : false;
115
+ return (jsx_runtime_1.jsxs("div", { style: { ...groupRowBase, paddingLeft }, children: [
116
+ jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(node.id), label: `${node.label} section` }), jsx_runtime_1.jsx("span", { style: rowLabel, children: node.label })
117
+ ] }));
118
+ }
119
+ if (node.field) {
120
+ return (jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: node.field, overrideId: overrideId, validatedLocation: validatedLocation, paddingLeft: paddingLeft, nodePath: nodePath, keysToObserve: keysToObserve }));
84
121
  }
85
- return schemaFields.map((f) => f.key);
86
- }, [schemaFields]);
87
- return (jsx_runtime_1.jsx("div", { style: style, children: schemaFields
88
- ? schemaFields.map((field, i) => {
89
- return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: field, overrideId: overrideId, validatedLocation: validatedLocation, nestedDepth: nestedDepth, nodePath: nodePath, keysToObserve: keysToObserve })
90
- ] }, field.key));
91
- })
92
- : 'No schema' }));
122
+ return (jsx_runtime_1.jsx("div", { style: {
123
+ ...labelOnlyRowBase,
124
+ height: (0, timeline_layout_1.getTreeRowHeight)(node),
125
+ paddingLeft,
126
+ }, children: jsx_runtime_1.jsx("span", { style: rowLabel, children: node.label }) }));
127
+ }, [
128
+ expandedTracks,
129
+ keysToObserve,
130
+ nodePath,
131
+ overrideId,
132
+ sequenceOffsetPx,
133
+ toggleTrack,
134
+ validatedLocation,
135
+ ]);
136
+ if (flat.length === 0) {
137
+ return jsx_runtime_1.jsx("div", { style: style, children: "No schema" });
138
+ }
139
+ return (jsx_runtime_1.jsx("div", { style: style, children: flat.map(({ node, depth }, i) => {
140
+ return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, renderRow(node, depth)] }, node.id));
141
+ }) }));
93
142
  };
94
143
  exports.TimelineExpandedSection = TimelineExpandedSection;
@@ -6,7 +6,7 @@ export declare const TimelineFieldRow: React.FC<{
6
6
  readonly field: SchemaFieldInfo;
7
7
  readonly overrideId: string;
8
8
  readonly validatedLocation: CodePosition | null;
9
- readonly nestedDepth: number;
9
+ readonly paddingLeft: number;
10
10
  readonly nodePath: SequenceNodePath | null;
11
11
  readonly keysToObserve: string[];
12
12
  }>;
@@ -4,16 +4,14 @@ exports.TimelineFieldRow = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const timeline_layout_1 = require("../../helpers/timeline-layout");
7
8
  const call_api_1 = require("../call-api");
8
- const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
9
- const TimelineListItem_1 = require("./TimelineListItem");
10
9
  const TimelineSchemaField_1 = require("./TimelineSchemaField");
11
- const FIELD_ROW_PADDING_LEFT = 24;
12
10
  const fieldRowBase = {
13
11
  display: 'flex',
14
12
  alignItems: 'center',
15
13
  gap: 8,
16
- paddingRight: TimelineExpandedSection_1.EXPANDED_SECTION_PADDING_RIGHT,
14
+ paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
17
15
  };
18
16
  const fieldName = {
19
17
  fontSize: 12,
@@ -27,7 +25,7 @@ const fieldLabelRow = {
27
25
  alignItems: 'center',
28
26
  gap: 6,
29
27
  };
30
- const TimelineFieldRow = ({ field, overrideId, validatedLocation, nestedDepth, nodePath, keysToObserve, }) => {
28
+ const TimelineFieldRow = ({ field, overrideId, validatedLocation, paddingLeft, nodePath, keysToObserve, }) => {
31
29
  var _a, _b, _c, _d;
32
30
  const { setDragOverrides, clearDragOverrides, dragOverrides, codeValues: allPropStatuses, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeOverridesContext);
33
31
  const propStatuses = ((_a = allPropStatuses[overrideId]) !== null && _a !== void 0 ? _a : null);
@@ -93,11 +91,9 @@ const TimelineFieldRow = ({ field, overrideId, validatedLocation, nestedDepth, n
93
91
  return {
94
92
  ...fieldRowBase,
95
93
  height: field.rowHeight,
96
- paddingLeft: TimelineExpandedSection_1.EXPANDED_SECTION_PADDING_LEFT +
97
- FIELD_ROW_PADDING_LEFT +
98
- TimelineListItem_1.SPACING * 3 * nestedDepth,
94
+ paddingLeft,
99
95
  };
100
- }, [field.rowHeight, nestedDepth]);
96
+ }, [field.rowHeight, paddingLeft]);
101
97
  return (jsx_runtime_1.jsxs("div", { style: style, children: [
102
98
  jsx_runtime_1.jsx("div", { style: fieldLabelRow, children: jsx_runtime_1.jsx("span", { style: fieldName, children: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }) }), jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, canUpdate: (_d = propStatus === null || propStatus === void 0 ? void 0 : propStatus.canUpdate) !== null && _d !== void 0 ? _d : false, effectiveValue: effectiveValue, codeValue: propStatus })
103
99
  ] }));
@@ -11,6 +11,7 @@ const call_api_1 = require("../call-api");
11
11
  const ContextMenu_1 = require("../ContextMenu");
12
12
  const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
13
13
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
14
+ const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
14
15
  const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
15
16
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
16
17
  const TimelineStack_1 = require("./TimelineStack");
@@ -21,24 +22,6 @@ const space = {
21
22
  width: exports.SPACING,
22
23
  flexShrink: 0,
23
24
  };
24
- const arrowButton = {
25
- background: 'none',
26
- border: 'none',
27
- color: 'white',
28
- cursor: 'pointer',
29
- padding: 0,
30
- display: 'flex',
31
- alignItems: 'center',
32
- justifyContent: 'center',
33
- width: 12,
34
- height: 12,
35
- flexShrink: 0,
36
- fontSize: 8,
37
- marginRight: 4,
38
- userSelect: 'none',
39
- outline: 'none',
40
- lineHeight: 1,
41
- };
42
25
  const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
43
26
  var _a, _b;
44
27
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
@@ -165,7 +148,7 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
165
148
  }, [sequence.id, toggleTrack]);
166
149
  const padder = (0, react_1.useMemo)(() => {
167
150
  return {
168
- width: Number(exports.SPACING * 3) * nestedDepth,
151
+ width: Number(exports.SPACING) * nestedDepth,
169
152
  flexShrink: 0,
170
153
  };
171
154
  }, [nestedDepth]);
@@ -195,15 +178,10 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
195
178
  borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
196
179
  };
197
180
  }, [sequence.type]);
198
- const arrowStyle = (0, react_1.useMemo)(() => {
199
- return {
200
- ...arrowButton,
201
- transform: isExpanded ? 'rotate(90deg)' : 'rotate(0deg)',
202
- };
203
- }, [isExpanded]);
181
+ const hasExpandableContent = Boolean(sequence.controls) || sequence.effects.length > 0;
204
182
  const trackRow = (jsx_runtime_1.jsxs("div", { style: outer, children: [
205
- jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility }), jsx_runtime_1.jsx("div", { style: padder }), sequence.parent && nestedDepth > 0 ? jsx_runtime_1.jsx("div", { style: space }) : null, visualModeActive ? (sequence.controls ? (jsx_runtime_1.jsx("button", { type: "button", style: arrowStyle, onClick: onToggleExpand, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} track`, children: jsx_runtime_1.jsx("svg", { width: "12", height: "12", viewBox: "0 0 8 8", style: { display: 'block' }, children: jsx_runtime_1.jsx("path", { d: "M2 1L6 4L2 7Z", fill: "white" }) }) })) : (jsx_runtime_1.jsx("div", { style: arrowButton }))) : null, jsx_runtime_1.jsx(TimelineStack_1.TimelineStack, { sequence: sequence, isCompact: isCompact, originalLocation: originalLocation })
183
+ jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility }), jsx_runtime_1.jsx("div", { style: padder }), sequence.parent && nestedDepth > 0 ? jsx_runtime_1.jsx("div", { style: space }) : null, visualModeActive ? (hasExpandableContent ? (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: onToggleExpand, label: "track properties" })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}))) : null, jsx_runtime_1.jsx(TimelineStack_1.TimelineStack, { sequence: sequence, isCompact: isCompact, originalLocation: originalLocation })
206
184
  ] }));
207
- return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [visualModeEnvEnabled ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, children: trackRow })) : (trackRow), visualModeActive && isExpanded && sequence.controls ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, originalLocation: originalLocation, nestedDepth: nestedDepth, nodePath: nodePath })) : null] }));
185
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [visualModeEnvEnabled ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, children: trackRow })) : (trackRow), visualModeActive && isExpanded && hasExpandableContent ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, originalLocation: originalLocation, nestedDepth: nestedDepth, nodePath: nodePath })) : null] }));
208
186
  };
209
187
  exports.TimelineListItem = TimelineListItem;
@@ -18,8 +18,9 @@ const content = {
18
18
  const timelineContent = {
19
19
  minHeight: '100%',
20
20
  };
21
- const getExpandedPlaceholderStyle = (controls) => ({
22
- height: (0, timeline_layout_1.getExpandedTrackHeight)(controls) + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
21
+ const getExpandedPlaceholderStyle = (sequence, expandedTracks) => ({
22
+ height: (0, timeline_layout_1.getExpandedTrackHeight)(sequence, expandedTracks) +
23
+ timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
23
24
  });
24
25
  const TimelineTracks = ({ timeline, hasBeenCut }) => {
25
26
  const { expandedTracks } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksContext);
@@ -44,7 +45,7 @@ const TimelineTracks = ({ timeline, hasBeenCut }) => {
44
45
  jsx_runtime_1.jsx("div", { style: {
45
46
  height: (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type),
46
47
  marginBottom: timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
47
- }, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), visualModeEnabled && isExpanded ? (jsx_runtime_1.jsx("div", { style: getExpandedPlaceholderStyle(track.sequence.controls) })) : null] }, track.sequence.id));
48
+ }, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), visualModeEnabled && isExpanded ? (jsx_runtime_1.jsx("div", { style: getExpandedPlaceholderStyle(track.sequence, expandedTracks) })) : null] }, track.sequence.id));
48
49
  })] }), hasBeenCut ? jsx_runtime_1.jsx(MaxTimelineTracks_1.MaxTimelineTracksReached, {}) : null] }));
49
50
  };
50
51
  exports.TimelineTracks = TimelineTracks;