@remotion/studio 4.0.504 → 4.0.505

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.
Files changed (86) hide show
  1. package/dist/components/AssetSelectorItem.js +2 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -1
  3. package/dist/components/AudioWaveform.js +36 -3
  4. package/dist/components/CompositionContextButton.d.ts +1 -1
  5. package/dist/components/CompositionContextButton.js +2 -2
  6. package/dist/components/CompositionSelector.js +2 -2
  7. package/dist/components/CompositionSelectorItem.js +4 -4
  8. package/dist/components/ContextMenu.d.ts +5 -7
  9. package/dist/components/ContextMenu.js +54 -21
  10. package/dist/components/EditorGuides/Guide.js +2 -2
  11. package/dist/components/EffectPickerModal.js +2 -2
  12. package/dist/components/InlineAction.d.ts +1 -1
  13. package/dist/components/InlineAction.js +14 -13
  14. package/dist/components/InlineDropdown.d.ts +3 -2
  15. package/dist/components/InlineDropdown.js +16 -5
  16. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
  17. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  18. package/dist/components/InspectorPanel/common.js +24 -34
  19. package/dist/components/InspectorSequenceSection.js +1 -1
  20. package/dist/components/Menu/MenuItem.js +16 -12
  21. package/dist/components/MenuBuildIndicator.js +11 -58
  22. package/dist/components/MenuCompositionName.js +3 -63
  23. package/dist/components/MenuToolbar.js +22 -2
  24. package/dist/components/NewComposition/InputDragger.d.ts +1 -0
  25. package/dist/components/NewComposition/InputDragger.js +5 -4
  26. package/dist/components/NewComposition/MenuContent.d.ts +1 -1
  27. package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
  28. package/dist/components/PlayPause.js +2 -2
  29. package/dist/components/PlaybackRateSelector.js +3 -9
  30. package/dist/components/PreviewToolbar.js +7 -4
  31. package/dist/components/RenderButton.d.ts +1 -0
  32. package/dist/components/RenderButton.js +54 -37
  33. package/dist/components/SelectedOutlineElement.js +9 -10
  34. package/dist/components/SelectedOutlineOverlay.js +5 -1
  35. package/dist/components/SizeSelector.js +3 -9
  36. package/dist/components/Timeline/Timeline.js +4 -4
  37. package/dist/components/Timeline/TimelineDragHandler.js +3 -0
  38. package/dist/components/Timeline/TimelineEffectItem.js +6 -2
  39. package/dist/components/Timeline/TimelineEffectPropItem.js +6 -3
  40. package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
  41. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +32 -1
  42. package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
  43. package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
  44. package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
  45. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +4 -2
  46. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +30 -28
  47. package/dist/components/Timeline/TimelineList.d.ts +1 -0
  48. package/dist/components/Timeline/TimelineList.js +2 -3
  49. package/dist/components/Timeline/TimelineScaleField.js +1 -1
  50. package/dist/components/Timeline/TimelineSequence.js +34 -28
  51. package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
  52. package/dist/components/Timeline/TimelineSequenceItem.js +34 -23
  53. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
  54. package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
  55. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
  56. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +38 -5
  57. package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
  58. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
  59. package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
  60. package/dist/components/Timeline/TimelineZoomControls.d.ts +2 -2
  61. package/dist/components/Timeline/TimelineZoomControls.js +39 -12
  62. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
  63. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
  64. package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
  65. package/dist/components/Timeline/use-timeline-height.js +3 -2
  66. package/dist/components/TimelineCombobox.d.ts +11 -0
  67. package/dist/components/TimelineCombobox.js +181 -0
  68. package/dist/components/TopPanel.js +6 -7
  69. package/dist/components/selected-outline-types.d.ts +1 -1
  70. package/dist/esm/{chunk-43m68z1k.js → chunk-7pgk8h5m.js} +7731 -7410
  71. package/dist/esm/internals.mjs +7731 -7410
  72. package/dist/esm/previewEntry.mjs +7547 -7226
  73. package/dist/esm/renderEntry.mjs +1 -1
  74. package/dist/helpers/hoverable.d.ts +11 -0
  75. package/dist/helpers/hoverable.js +70 -0
  76. package/dist/helpers/inject-css.js +3 -0
  77. package/dist/helpers/use-is-fullscreen.d.ts +1 -0
  78. package/dist/helpers/use-is-fullscreen.js +25 -0
  79. package/dist/helpers/use-menu-structure.js +3 -10
  80. package/dist/icons/canvas-zoom.d.ts +10 -0
  81. package/dist/icons/canvas-zoom.js +21 -0
  82. package/dist/icons/playback-rate.d.ts +5 -0
  83. package/dist/icons/playback-rate.js +31 -0
  84. package/dist/icons/search.d.ts +5 -0
  85. package/dist/icons/search.js +10 -0
  86. package/package.json +12 -12
@@ -25,10 +25,9 @@ const MenuContent_1 = require("./NewComposition/MenuContent");
25
25
  const splitButtonContainer = {
26
26
  display: 'inline-flex',
27
27
  flexDirection: 'row',
28
- alignItems: 'stretch',
29
- borderRadius: 4,
30
- border: `1px solid ${colors_1.BLACK_ALPHA_60}`,
31
- backgroundColor: colors_1.INPUT_BACKGROUND,
28
+ alignItems: 'center',
29
+ borderRadius: 3,
30
+ gap: 1,
32
31
  overflow: 'hidden',
33
32
  };
34
33
  const mainButtonStyle = {
@@ -38,18 +37,14 @@ const mainButtonStyle = {
38
37
  paddingBottom: 7,
39
38
  background: colors_1.TRANSPARENT,
40
39
  border: 'none',
40
+ borderRadius: '3px 0 0 3px',
41
41
  color: colors_1.WHITE,
42
- cursor: 'pointer',
42
+ cursor: 'default',
43
43
  display: 'flex',
44
44
  alignItems: 'center',
45
45
  fontSize: 14,
46
46
  fontFamily: 'inherit',
47
47
  };
48
- const dividerStyle = {
49
- width: 1,
50
- backgroundColor: colors_1.BLACK_ALPHA_60,
51
- alignSelf: 'stretch',
52
- };
53
48
  const dropdownTriggerStyle = {
54
49
  paddingLeft: 6,
55
50
  paddingRight: 6,
@@ -57,10 +52,12 @@ const dropdownTriggerStyle = {
57
52
  paddingBottom: 7,
58
53
  background: colors_1.TRANSPARENT,
59
54
  border: 'none',
55
+ borderRadius: '0 3px 3px 0',
60
56
  color: colors_1.WHITE,
61
- cursor: 'pointer',
57
+ cursor: 'default',
62
58
  display: 'flex',
63
59
  alignItems: 'center',
60
+ justifyContent: 'center',
64
61
  };
65
62
  const mainButtonContent = {
66
63
  paddingLeft: 4,
@@ -75,32 +72,29 @@ const label = {
75
72
  minWidth: 0,
76
73
  overflow: 'hidden',
77
74
  textOverflow: 'ellipsis',
75
+ userSelect: 'none',
76
+ WebkitUserSelect: 'none',
78
77
  whiteSpace: 'nowrap',
79
78
  };
80
- const compactSplitButtonSegmentHeight = layout_1.COMPACT_CONTROL_ROW_HEIGHT;
79
+ const compactSplitButtonSegmentHeight = 24;
81
80
  const compactMainButtonStyle = {
82
81
  ...mainButtonStyle,
83
82
  boxSizing: 'border-box',
84
83
  height: compactSplitButtonSegmentHeight,
85
- paddingLeft: 6,
86
- paddingRight: 6,
87
- paddingTop: 6,
88
- paddingBottom: 6,
84
+ padding: '0 4px',
89
85
  fontSize: 12,
90
86
  };
91
87
  const compactDropdownTriggerStyle = {
92
88
  ...dropdownTriggerStyle,
93
89
  boxSizing: 'border-box',
94
90
  height: compactSplitButtonSegmentHeight,
95
- paddingLeft: 5,
96
- paddingRight: 5,
97
- paddingTop: 6,
98
- paddingBottom: 6,
91
+ padding: 0,
92
+ width: 20,
99
93
  };
100
94
  const compactMainButtonContent = {
101
95
  ...mainButtonContent,
102
- paddingLeft: 2,
103
- paddingRight: 4,
96
+ paddingLeft: 0,
97
+ paddingRight: 0,
104
98
  };
105
99
  const compactLabel = {
106
100
  ...label,
@@ -123,13 +117,12 @@ const getInitialRenderType = (readOnlyStudio) => {
123
117
  }
124
118
  return 'server-render';
125
119
  };
126
- const RenderButton = ({ readOnlyStudio, size: controlSize = 'default' }) => {
120
+ const RenderButton = ({ readOnlyStudio, size: controlSize = 'default', narrow = false }) => {
127
121
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
128
122
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
129
123
  const [preferredRenderType, setPreferredRenderType] = (0, react_1.useState)(() => getInitialRenderType(readOnlyStudio));
130
124
  const [dropdownOpened, setDropdownOpened] = (0, react_1.useState)(false);
131
- const [mainButtonHovered, setMainButtonHovered] = (0, react_1.useState)(false);
132
- const [dropdownButtonHovered, setDropdownButtonHovered] = (0, react_1.useState)(false);
125
+ const [hovered, setHovered] = (0, react_1.useState)(false);
133
126
  const dropdownRef = (0, react_1.useRef)(null);
134
127
  const containerRef = (0, react_1.useRef)(null);
135
128
  const { currentZIndex } = (0, z_index_1.useZIndex)();
@@ -193,7 +186,8 @@ const RenderButton = ({ readOnlyStudio, size: controlSize = 'default' }) => {
193
186
  const iconStyle = (0, react_1.useMemo)(() => {
194
187
  return {
195
188
  style: {
196
- height: controlSize === 'compact' ? 14 : 16,
189
+ height: controlSize === 'compact' ? 18 : 16,
190
+ width: controlSize === 'compact' ? 18 : 16,
197
191
  flexShrink: 0,
198
192
  },
199
193
  };
@@ -423,10 +417,9 @@ const RenderButton = ({ readOnlyStudio, size: controlSize = 'default' }) => {
423
417
  const containerStyle = (0, react_1.useMemo)(() => {
424
418
  return {
425
419
  ...splitButtonContainer,
426
- borderColor: colors_1.BLACK_ALPHA_60,
427
- borderRadius: controlSize === 'compact' ? 0 : 4,
420
+ borderRadius: controlSize === 'compact' ? 3 : 4,
428
421
  opacity: 1,
429
- cursor: 'pointer',
422
+ cursor: 'default',
430
423
  };
431
424
  }, [controlSize]);
432
425
  const renderLabel = renderType === 'server-render'
@@ -434,20 +427,44 @@ const RenderButton = ({ readOnlyStudio, size: controlSize = 'default' }) => {
434
427
  : renderType === 'render-command'
435
428
  ? 'Render via CLI'
436
429
  : 'Render on web';
437
- const mainIconColor = mainButtonHovered ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
438
- const dropdownIconColor = dropdownOpened || dropdownButtonHovered ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
430
+ const showRenderLabel = !narrow || renderType !== 'server-render';
431
+ const mainHovered = hovered && !dropdownOpened;
432
+ const mainForegroundColor = mainHovered ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
433
+ const dropdownForegroundColor = hovered || dropdownOpened ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
434
+ const mainSegmentBackground = (0, colors_1.getBackgroundFromHoverState)({
435
+ hovered: mainHovered,
436
+ selected: false,
437
+ });
438
+ const dropdownSegmentBackground = (0, colors_1.getBackgroundFromHoverState)({
439
+ hovered,
440
+ selected: dropdownOpened,
441
+ });
439
442
  if (!video) {
440
443
  return null;
441
444
  }
442
445
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
443
- jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-command", onClick: () => openServerRenderModal(true), type: "button" }), jsx_runtime_1.jsxs("div", { ref: containerRef, style: containerStyle, title: tooltip, children: [
444
- jsx_runtime_1.jsx("button", { type: "button", style: controlSize === 'compact' ? compactMainButtonStyle : mainButtonStyle, onClick: onClick, onPointerEnter: () => setMainButtonHovered(true), onPointerLeave: () => setMainButtonHovered(false), id: "render-modal-button", children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: controlSize === 'compact'
446
+ jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-server", disabled: !canServerRender, onClick: () => openServerRenderModal(false), type: "button" }), ' ', jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-client", onClick: openClientRenderModal, type: "button" }), jsx_runtime_1.jsx("button", { style: { display: 'none' }, id: "render-modal-button-command", onClick: () => openServerRenderModal(true), type: "button" }), jsx_runtime_1.jsxs("div", { ref: containerRef, style: containerStyle, title: tooltip, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
447
+ jsx_runtime_1.jsx("button", { type: "button", "aria-label": renderLabel, style: {
448
+ ...(controlSize === 'compact'
449
+ ? compactMainButtonStyle
450
+ : mainButtonStyle),
451
+ backgroundColor: mainSegmentBackground,
452
+ color: mainForegroundColor,
453
+ }, onClick: onClick, id: "render-modal-button", children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", style: controlSize === 'compact'
445
454
  ? compactMainButtonContent
446
455
  : mainButtonContent, children: [
447
- jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: mainIconColor, svgProps: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'compact' ? 0.75 : 1 }), jsx_runtime_1.jsx("span", { style: controlSize === 'compact' ? compactLabel : label, children: renderLabel })
448
- ] }) }), jsx_runtime_1.jsx("div", { style: dividerStyle }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: controlSize === 'compact'
449
- ? compactDropdownTriggerStyle
450
- : dropdownTriggerStyle, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, onPointerEnter: () => setDropdownButtonHovered(true), onPointerLeave: () => setDropdownButtonHovered(false), children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: dropdownIconColor }) })
456
+ jsx_runtime_1.jsx(render_1.ThinRenderIcon, { fill: mainForegroundColor, svgProps: iconStyle }), showRenderLabel ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
457
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: controlSize === 'compact' ? 0.75 : 1 }), jsx_runtime_1.jsx("span", { style: {
458
+ ...(controlSize === 'compact' ? compactLabel : label),
459
+ color: mainForegroundColor,
460
+ }, children: renderLabel })
461
+ ] })) : null] }) }), jsx_runtime_1.jsx("button", { ref: dropdownRef, type: "button", style: {
462
+ ...(controlSize === 'compact'
463
+ ? compactDropdownTriggerStyle
464
+ : dropdownTriggerStyle),
465
+ backgroundColor: dropdownSegmentBackground,
466
+ color: dropdownForegroundColor,
467
+ }, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, onPointerDown: onPointerDown, onClick: onClickDropdown, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: dropdownForegroundColor }) })
451
468
  ] }), portalStyle
452
469
  ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHideDropdown, onEscape: onHideDropdown, children: jsx_runtime_1.jsx("div", { style: portalStyle, onPointerDown: onMenuPointerDown, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: () => { }, onPreviousMenu: () => { }, values: dropdownValues, onHide: onHideDropdown, leaveLeftSpace: false, preselectIndex: dropdownValues.findIndex((v) => v.id === renderType), topItemCanBeUnselected: false, fixedHeight: derivedMaxHeight }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
453
470
  : null] }));
@@ -73,7 +73,6 @@ const timeline_translate_utils_1 = require("./Timeline/timeline-translate-utils"
73
73
  const get_stack_1 = require("./Timeline/TimelineStack/get-stack");
74
74
  const transform_origin_utils_1 = require("./Timeline/transform-origin-utils");
75
75
  const use_select_asset_1 = require("./use-select-asset");
76
- const emptyContextMenuValues = [];
77
76
  const SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target }) => {
78
77
  var _a, _b;
79
78
  const { setDragOverrides, clearDragOverrides, setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -305,7 +304,7 @@ const SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, targe
305
304
  ] }));
306
305
  };
307
306
  exports.SelectedOutlineTransformOriginHandle = SelectedOutlineTransformOriginHandle;
308
- const SelectedOutlinePolygon = ({ allDragTargets, allDragOutlines, contextMenuValues, dragging, hovered, onContextMenuOpen, outline, onDraggingChange, onHoverChange, onSnapPointsChange, onSelect, onDoubleClickTarget, scale, snapTargets, target, }) => {
307
+ const SelectedOutlinePolygon = ({ allDragTargets, allDragOutlines, dragging, hovered, onContextMenuOpen, outline, onDraggingChange, onHoverChange, onSnapPointsChange, onSelect, onDoubleClickTarget, scale, snapTargets, target, }) => {
309
308
  var _a, _b, _c, _d;
310
309
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
311
310
  const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -566,10 +565,10 @@ const SelectedOutlinePolygon = ({ allDragTargets, allDragOutlines, contextMenuVa
566
565
  if (!dragging) {
567
566
  onHoverChange(null);
568
567
  }
569
- }, onPointerDown: onPointerDown, onDoubleClick: onDoubleClick, onDragOver: effectDrop === null ? undefined : onEffectDragOver, onDragLeave: effectDrop === null ? undefined : onEffectDragLeave, onDrop: effectDrop === null ? undefined : onEffectDrop }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: polygonRef, values: [...contextMenuValues], onOpen: onContextMenuOpen })
568
+ }, onPointerDown: onPointerDown, onDoubleClick: onDoubleClick, onDragOver: effectDrop === null ? undefined : onEffectDragOver, onDragLeave: effectDrop === null ? undefined : onEffectDragLeave, onDrop: effectDrop === null ? undefined : onEffectDrop }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: polygonRef, getItems: onContextMenuOpen })
570
569
  ] }));
571
570
  };
572
- const SelectedOutlineScaleEdgeLine = ({ allScaleDragTargets, contextMenuValues, dragging, edge, outline, onDraggingChange, onContextMenuOpen, onHoverChange, onSelect, target, }) => {
571
+ const SelectedOutlineScaleEdgeLine = ({ allScaleDragTargets, dragging, edge, outline, onDraggingChange, onContextMenuOpen, onHoverChange, onSelect, target, }) => {
573
572
  var _a, _b;
574
573
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
575
574
  const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -725,7 +724,7 @@ const SelectedOutlineScaleEdgeLine = ({ allScaleDragTargets, contextMenuValues,
725
724
  if (!dragging) {
726
725
  onHoverChange(null);
727
726
  }
728
- }, onPointerDown: onPointerDown }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: lineRef, values: [...contextMenuValues], onOpen: onContextMenuOpen })
727
+ }, onPointerDown: onPointerDown }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: lineRef, getItems: onContextMenuOpen })
729
728
  ] }));
730
729
  };
731
730
  const svgPointToClientPoint = (point, rect) => {
@@ -734,7 +733,7 @@ const svgPointToClientPoint = (point, rect) => {
734
733
  y: point.y + rect.top,
735
734
  };
736
735
  };
737
- const SelectedOutlineRotationCornerHandle = ({ allRotationDragTargets, contextMenuValues, corner, dragging, outline, onDraggingChange, onContextMenuOpen, onHoverChange, onSelect, target, }) => {
736
+ const SelectedOutlineRotationCornerHandle = ({ allRotationDragTargets, corner, dragging, outline, onDraggingChange, onContextMenuOpen, onHoverChange, onSelect, target, }) => {
738
737
  var _a, _b;
739
738
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
740
739
  const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -946,7 +945,7 @@ const SelectedOutlineRotationCornerHandle = ({ allRotationDragTargets, contextMe
946
945
  if (!dragging) {
947
946
  onHoverChange(null);
948
947
  }
949
- }, onPointerDown: onPointerDown }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: circleRef, values: [...contextMenuValues], onOpen: onContextMenuOpen })
948
+ }, onPointerDown: onPointerDown }), jsx_runtime_1.jsx(ContextMenu_1.ContextMenuForTarget, { triggerRef: circleRef, getItems: onContextMenuOpen })
950
949
  ] }));
951
950
  };
952
951
  const SelectedOutlineElement = ({ allDragTargets, allDragOutlines, allRotationDragTargets, allScaleDragTargets, dragging, hovered, outline, onDraggingChange, onHoverChange, onSnapPointsChange, onSelect, scale, snapTargets, target, }) => {
@@ -1179,10 +1178,10 @@ const SelectedOutlineElement = ({ allDragTargets, allDragOutlines, allRotationDr
1179
1178
  target,
1180
1179
  ]);
1181
1180
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
1182
- jsx_runtime_1.jsx(SelectedOutlinePolygon, { allDragTargets: allDragTargets, allDragOutlines: allDragOutlines, contextMenuValues: emptyContextMenuValues, dragging: dragging, hovered: hovered, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSnapPointsChange: onSnapPointsChange, onSelect: onSelect, onDoubleClickTarget: onDoubleClickTarget, scale: scale, snapTargets: snapTargets, target: target }), jsx_runtime_1.jsx(SelectedOutlineCropControls_1.SelectedOutlineCropControls, { outline: outline, onDraggingChange: onDraggingChange, target: target }), (target === null || target === void 0 ? void 0 : target.cropDrag) === null && (target.containsSelection || hovered)
1183
- ? ['top', 'right', 'bottom', 'left'].map((edge) => (jsx_runtime_1.jsx(SelectedOutlineScaleEdgeLine, { allScaleDragTargets: allScaleDragTargets, contextMenuValues: emptyContextMenuValues, dragging: dragging, edge: edge, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, target: target }, edge)))
1181
+ jsx_runtime_1.jsx(SelectedOutlinePolygon, { allDragTargets: allDragTargets, allDragOutlines: allDragOutlines, dragging: dragging, hovered: hovered, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSnapPointsChange: onSnapPointsChange, onSelect: onSelect, onDoubleClickTarget: onDoubleClickTarget, scale: scale, snapTargets: snapTargets, target: target }), jsx_runtime_1.jsx(SelectedOutlineCropControls_1.SelectedOutlineCropControls, { outline: outline, onDraggingChange: onDraggingChange, target: target }), (target === null || target === void 0 ? void 0 : target.cropDrag) === null && (target.containsSelection || hovered)
1182
+ ? ['top', 'right', 'bottom', 'left'].map((edge) => (jsx_runtime_1.jsx(SelectedOutlineScaleEdgeLine, { allScaleDragTargets: allScaleDragTargets, dragging: dragging, edge: edge, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, target: target }, edge)))
1184
1183
  : null, (target === null || target === void 0 ? void 0 : target.cropDrag) === null && (target.containsSelection || hovered)
1185
- ? ['top-left', 'top-right', 'bottom-right', 'bottom-left'].map((corner) => (jsx_runtime_1.jsx(SelectedOutlineRotationCornerHandle, { allRotationDragTargets: allRotationDragTargets, contextMenuValues: emptyContextMenuValues, corner: corner, dragging: dragging, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, target: target }, corner)))
1184
+ ? ['top-left', 'top-right', 'bottom-right', 'bottom-left'].map((corner) => (jsx_runtime_1.jsx(SelectedOutlineRotationCornerHandle, { allRotationDragTargets: allRotationDragTargets, corner: corner, dragging: dragging, outline: outline, onContextMenuOpen: onContextMenuOpen, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSelect: onSelect, target: target }, corner)))
1186
1185
  : null] }));
1187
1186
  };
1188
1187
  exports.SelectedOutlineElement = SelectedOutlineElement;
@@ -41,6 +41,7 @@ const remotion_1 = require("remotion");
41
41
  const no_react_1 = require("remotion/no-react");
42
42
  const client_id_1 = require("../helpers/client-id");
43
43
  const interactivity_enabled_1 = require("../helpers/interactivity-enabled");
44
+ const use_is_fullscreen_1 = require("../helpers/use-is-fullscreen");
44
45
  const use_keybinding_1 = require("../helpers/use-keybinding");
45
46
  const editor_guides_1 = require("../state/editor-guides");
46
47
  const editor_outlines_1 = require("../state/editor-outlines");
@@ -422,6 +423,7 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
422
423
  const { editorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
423
424
  const { hoveredSequence, setHoveredSequence } = (0, react_1.useContext)(timeline_sequence_hover_1.TimelineSequenceHoverContext);
424
425
  const { editorShowGuides, guidesList } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
426
+ const isFullscreen = (0, use_is_fullscreen_1.useIsFullscreen)();
425
427
  const { frameBack, frameForward, getCurrentFrame, seek } = player_1.PlayerInternals.usePlayer();
426
428
  const keybindings = (0, use_keybinding_1.useKeybinding)();
427
429
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
@@ -457,7 +459,8 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
457
459
  selectItem(item, interaction, undefined, { reveal: true });
458
460
  }, [selectItem]);
459
461
  const outlineTargets = (0, react_1.useMemo)(() => {
460
- if (!(0, interactivity_enabled_1.isStudioSelectionEnabled)() ||
462
+ if (isFullscreen ||
463
+ !(0, interactivity_enabled_1.isStudioSelectionEnabled)() ||
461
464
  !previewSelectionAvailable ||
462
465
  !editorShowOutlines) {
463
466
  return [];
@@ -756,6 +759,7 @@ const SelectedOutlineOverlay = ({ compositionHeight, compositionWidth, scale, tr
756
759
  getEffectDragOverrides,
757
760
  getScaleLockState,
758
761
  editorShowOutlines,
762
+ isFullscreen,
759
763
  overrideIdToNodePathMappings,
760
764
  previewInteractive,
761
765
  previewSelectionAvailable,
@@ -6,9 +6,9 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
9
+ const canvas_zoom_1 = require("../icons/canvas-zoom");
9
10
  const Checkmark_1 = require("../icons/Checkmark");
10
- const ControlButton_1 = require("./ControlButton");
11
- const ComboBox_1 = require("./NewComposition/ComboBox");
11
+ const TimelineCombobox_1 = require("./TimelineCombobox");
12
12
  const commonPreviewSizes = [
13
13
  {
14
14
  size: 'auto',
@@ -47,7 +47,6 @@ const getPreviewSizeLabel = (previewSize) => {
47
47
  };
48
48
  exports.getPreviewSizeLabel = getPreviewSizeLabel;
49
49
  const accessibilityLabel = 'Preview Size';
50
- const comboStyle = { width: 64 };
51
50
  const getUniqueSizes = (size) => {
52
51
  const customPreviewSizes = [size, ...commonPreviewSizes];
53
52
  const uniqueSizes = [];
@@ -116,14 +115,9 @@ const usePreviewSizeMenuItems = () => {
116
115
  exports.usePreviewSizeMenuItems = usePreviewSizeMenuItems;
117
116
  const SizeSelector = () => {
118
117
  const { items, selectedId, zoomable } = (0, exports.usePreviewSizeMenuItems)();
119
- const style = (0, react_1.useMemo)(() => {
120
- return {
121
- padding: ControlButton_1.CONTROL_BUTTON_PADDING - 2,
122
- };
123
- }, []);
124
118
  if (!zoomable) {
125
119
  return null;
126
120
  }
127
- return (jsx_runtime_1.jsx("div", { style: style, "aria-label": accessibilityLabel, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { size: "compact", title: accessibilityLabel, style: comboStyle, selectedId: selectedId, values: items, unhoveredIconColor: colors_1.WHITE_ALPHA_80 }) }));
121
+ return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, selectedId: selectedId, values: items, renderLeftItem: (color) => selectedId === 'auto' ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasFitIcon, { color: color })) : Number(selectedId) < 1 ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomOutIcon, { color: color })) : (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomIcon, { color: color })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
128
122
  };
129
123
  exports.SizeSelector = SizeSelector;
@@ -195,7 +195,7 @@ const TimelineContextMenuArea = ({ children }) => {
195
195
  setIsAddingAsset(false);
196
196
  }
197
197
  }, [canInsertAsset, compositionFile, currentCompositionId, videoConfig]);
198
- const contextMenuItems = (0, react_1.useMemo)(() => {
198
+ const getContextMenuItems = (0, react_1.useCallback)(() => {
199
199
  return [
200
200
  {
201
201
  type: 'item',
@@ -223,7 +223,7 @@ const TimelineContextMenuArea = ({ children }) => {
223
223
  },
224
224
  ];
225
225
  }, [insertSolid, canInsertSolid, insertAsset, canInsertAsset]);
226
- return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll, values: contextMenuItems, onOpen: null, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(timeline_asset_drop_context_1.TimelineAssetDropFrameContext.Provider, { value: assetDropFrame, children: children }) }));
226
+ return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { ref: timeline_refs_1.timelineVerticalScroll, getItems: getContextMenuItems, style: container, className: 'css-reset ' + is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(timeline_asset_drop_context_1.TimelineAssetDropFrameContext.Provider, { value: assetDropFrame, children: children }) }));
227
227
  };
228
228
  const TimelineInner = () => {
229
229
  var _a;
@@ -267,9 +267,9 @@ const TimelineInner = () => {
267
267
  return null;
268
268
  }
269
269
  return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, componentIdentity: sequence.controls.componentIdentity, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
270
- }), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [(0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown })) : null, jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
270
+ }), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [(0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown })) : null, jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, isStill: isStill, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown, showTimePadding: false })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
271
271
  jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, maxFlexerSize: null, minFlexerSize: MIN_TIMELINE_LABELS_WIDTH, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
272
- jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
272
+ jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown, showTimePadding: true }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
273
273
  jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {})) : null, jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
274
274
  ] }) })
275
275
  ] })
@@ -247,6 +247,9 @@ const TimelineDragHandlerInner = () => {
247
247
  extrapolate: 'clamp',
248
248
  });
249
249
  setFrame((c) => {
250
+ if (c[videoConfig.id] === frame) {
251
+ return c;
252
+ }
250
253
  const newObj = { ...c, [videoConfig.id]: frame };
251
254
  remotion_1.Internals.persistCurrentFrame(newObj);
252
255
  return newObj;
@@ -120,10 +120,13 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
120
120
  (0, NotificationCenter_1.showNotification)(err.message, 4000);
121
121
  }
122
122
  }, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
123
- const contextMenuValues = (0, react_1.useMemo)(() => {
123
+ const getContextMenuItems = (0, react_1.useCallback)(() => {
124
124
  if (!previewConnected) {
125
125
  return [];
126
126
  }
127
+ if (selection.selectable) {
128
+ selection.onSelect({ shiftKey: false, toggleKey: false });
129
+ }
127
130
  const items = [];
128
131
  if (documentationLink) {
129
132
  items.push({
@@ -168,6 +171,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
168
171
  documentationLink,
169
172
  onDeleteEffectFromSource,
170
173
  previewConnected,
174
+ selection,
171
175
  ]);
172
176
  const onToggle = (0, react_1.useCallback)((type) => {
173
177
  if (!canToggle || previewServerState.type !== 'connected') {
@@ -322,6 +326,6 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
322
326
  }, [dropIndicator]);
323
327
  const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }) }));
324
328
  const draggableRow = canReorder ? (jsx_runtime_1.jsxs("div", { draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, style: reorderWrapper, children: [reorderLineStyle ? jsx_runtime_1.jsx("div", { style: reorderLineStyle }) : null, row] })) : (row);
325
- return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: draggableRow })) : (draggableRow);
329
+ return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableRow })) : (draggableRow);
326
330
  };
327
331
  exports.TimelineEffectItem = TimelineEffectItem;
@@ -294,7 +294,10 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
294
294
  setPropStatuses,
295
295
  validatedLocation.source,
296
296
  ]);
297
- const contextMenuValues = (0, react_1.useMemo)(() => {
297
+ const getContextMenuItems = (0, react_1.useCallback)(() => {
298
+ if (selection.selectable) {
299
+ selection.onSelect({ shiftKey: false, toggleKey: false });
300
+ }
298
301
  return [
299
302
  {
300
303
  type: 'item',
@@ -309,7 +312,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
309
312
  value: 'reset-effect-field',
310
313
  },
311
314
  ];
312
- }, [canShowReset, onReset]);
315
+ }, [canShowReset, onReset, selection]);
313
316
  const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
314
317
  if (!window.remotion_editorName ||
315
318
  previewServerState.type !== 'connected') {
@@ -322,6 +325,6 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
322
325
  }).catch(() => undefined);
323
326
  }, [field.key, previewServerState.type, validatedLocation]);
324
327
  const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: sourceFrame }) }) }));
325
- return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
328
+ return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
326
329
  };
327
330
  exports.TimelineEffectPropItem = TimelineEffectPropItem;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
- export declare const TimelineExpandedKeyframeRow: React.NamedExoticComponent<{
3
+ import type { getTimelineKeyframes } from './get-timeline-keyframes';
4
+ type TimelineExpandedKeyframeRowProps = {
4
5
  readonly height: number;
5
- readonly keyframes: {
6
- frame: number;
7
- value: unknown;
8
- }[];
6
+ readonly keyframes: ReturnType<typeof getTimelineKeyframes>;
9
7
  readonly canEditEasing: boolean;
10
8
  readonly nodePathInfo: SequenceNodePathInfo;
11
9
  readonly showSeparator: boolean;
12
- }>;
10
+ };
11
+ export declare const TimelineExpandedKeyframeRow: React.NamedExoticComponent<TimelineExpandedKeyframeRowProps>;
12
+ export {};
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.TimelineExpandedKeyframeRow = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const studio_shared_1 = require("@remotion/studio-shared");
38
39
  const react_1 = __importStar(require("react"));
39
40
  const timeline_layout_1 = require("../../helpers/timeline-layout");
40
41
  const get_timeline_easing_segments_1 = require("./get-timeline-easing-segments");
@@ -65,4 +66,34 @@ const TimelineExpandedKeyframeRowUnmemoized = ({ height, keyframes, canEditEasin
65
66
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [showSeparator ? jsx_runtime_1.jsx("div", { style: rowSeparator }) : null, jsx_runtime_1.jsx("div", { style: { ...rowClipper, height, width: timelineWidth !== null && timelineWidth !== void 0 ? timelineWidth : undefined }, children: jsx_runtime_1.jsxs("div", { style: { ...row, height }, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, easingSegments.map((segment) => (jsx_runtime_1.jsx(TimelineKeyframeEasingLine_1.TimelineKeyframeEasingLine, { fromFrame: segment.fromFrame, toFrame: segment.toFrame, rowHeight: height, nodePathInfo: nodePathInfo, segmentIndex: segment.segmentIndex }, `${segment.segmentIndex}-${segment.fromFrame}-${segment.toFrame}`))), keyframes.map((keyframe) => (jsx_runtime_1.jsx(TimelineKeyframeDiamond_1.TimelineKeyframeDiamond, { frame: keyframe.frame, rowHeight: height, nodePathInfo: nodePathInfo }, keyframe.frame)))] }) })
66
67
  ] }));
67
68
  };
68
- exports.TimelineExpandedKeyframeRow = react_1.default.memo(TimelineExpandedKeyframeRowUnmemoized);
69
+ const areTimelineExpandedKeyframeRowPropsEqual = (prevProps, nextProps) => {
70
+ if (prevProps.height !== nextProps.height ||
71
+ prevProps.canEditEasing !== nextProps.canEditEasing ||
72
+ prevProps.showSeparator !== nextProps.showSeparator ||
73
+ prevProps.keyframes.length !== nextProps.keyframes.length ||
74
+ prevProps.nodePathInfo.index !== nextProps.nodePathInfo.index ||
75
+ prevProps.nodePathInfo.numberOfSequencesWithThisNodePath !==
76
+ nextProps.nodePathInfo.numberOfSequencesWithThisNodePath ||
77
+ prevProps.nodePathInfo.supportsEffects !==
78
+ nextProps.nodePathInfo.supportsEffects ||
79
+ (0, studio_shared_1.stringifySequenceSubscriptionKey)(prevProps.nodePathInfo.sequenceSubscriptionKey) !==
80
+ (0, studio_shared_1.stringifySequenceSubscriptionKey)(nextProps.nodePathInfo.sequenceSubscriptionKey) ||
81
+ prevProps.nodePathInfo.auxiliaryKeys.length !==
82
+ nextProps.nodePathInfo.auxiliaryKeys.length) {
83
+ return false;
84
+ }
85
+ const prevVideoConfig = prevProps.nodePathInfo.sequenceSubscriptionKey.videoConfigValues;
86
+ const nextVideoConfig = nextProps.nodePathInfo.sequenceSubscriptionKey.videoConfigValues;
87
+ if (prevVideoConfig !== nextVideoConfig &&
88
+ (prevVideoConfig === null ||
89
+ nextVideoConfig === null ||
90
+ prevVideoConfig.durationInFrames !== nextVideoConfig.durationInFrames ||
91
+ prevVideoConfig.fps !== nextVideoConfig.fps ||
92
+ prevVideoConfig.height !== nextVideoConfig.height ||
93
+ prevVideoConfig.width !== nextVideoConfig.width)) {
94
+ return false;
95
+ }
96
+ return (prevProps.keyframes.every((keyframe, index) => keyframe.frame === nextProps.keyframes[index].frame) &&
97
+ prevProps.nodePathInfo.auxiliaryKeys.every((key, index) => key === nextProps.nodePathInfo.auxiliaryKeys[index]));
98
+ };
99
+ exports.TimelineExpandedKeyframeRow = react_1.default.memo(TimelineExpandedKeyframeRowUnmemoized, areTimelineExpandedKeyframeRowPropsEqual);
@@ -3,5 +3,6 @@ import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort
3
3
  export declare const TimelineHeightContainer: React.NamedExoticComponent<{
4
4
  readonly shown: TimelineTrackData[];
5
5
  readonly hasBeenCut: boolean;
6
+ readonly isStill: boolean;
6
7
  readonly children: React.ReactNode;
7
8
  }>;
@@ -45,8 +45,8 @@ const baseStyle = {
45
45
  overflowX: 'hidden',
46
46
  backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
47
47
  };
48
- const TimelineHeightContainerInner = ({ shown, hasBeenCut, children }) => {
49
- const height = (0, use_timeline_height_1.useTimelineHeight)({ shown, hasBeenCut });
48
+ const TimelineHeightContainerInner = ({ shown, hasBeenCut, isStill, children }) => {
49
+ const height = (0, use_timeline_height_1.useTimelineHeight)({ shown, hasBeenCut, isStill });
50
50
  const style = (0, react_1.useMemo)(() => ({ ...baseStyle, height }), [height]);
51
51
  return jsx_runtime_1.jsx("div", { style: style, children: children });
52
52
  };
@@ -302,7 +302,7 @@ const TimelineInOutDragHandlerInner = () => {
302
302
  (0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
303
303
  };
304
304
  }, []);
305
- const inContextMenu = (0, react_1.useMemo)(() => {
305
+ const getInContextMenuItems = (0, react_1.useCallback)(() => {
306
306
  return [
307
307
  {
308
308
  id: 'hide-in',
@@ -330,7 +330,7 @@ const TimelineInOutDragHandlerInner = () => {
330
330
  },
331
331
  ];
332
332
  }, [setInAndOutFrames, videoConfig.id]);
333
- const outContextMenu = (0, react_1.useMemo)(() => {
333
+ const getOutContextMenuItems = (0, react_1.useCallback)(() => {
334
334
  return [
335
335
  {
336
336
  id: 'hide-out',
@@ -358,6 +358,6 @@ const TimelineInOutDragHandlerInner = () => {
358
358
  },
359
359
  ];
360
360
  }, [setInAndOutFrames, videoConfig.id]);
361
- return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [inFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: inContextMenu, onOpen: null, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in', onPointerDown: onInPointerDown }) })), outFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: outContextMenu, onOpen: null, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame, onPointerDown: onOutPointerDown }) }))] }));
361
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [inFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getInContextMenuItems, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in', onPointerDown: onInPointerDown }) })), outFrame !== null && (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getOutContextMenuItems, children: jsx_runtime_1.jsx(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame, onPointerDown: onOutPointerDown }) }))] }));
362
362
  };
363
363
  const TimelineInOutDragHandlerInnerMemo = react_1.default.memo(TimelineInOutDragHandlerInner);
@@ -4,10 +4,12 @@ export declare const getTimelineKeyframeEasingLineStyle: (selected: boolean) =>
4
4
  export declare const TimelineKeyframeEasingLineVisual: React.NamedExoticComponent<{
5
5
  readonly selected: boolean;
6
6
  }>;
7
- export declare const TimelineKeyframeEasingLine: React.NamedExoticComponent<{
7
+ type TimelineKeyframeEasingLineProps = {
8
8
  readonly fromFrame: number;
9
9
  readonly toFrame: number;
10
10
  readonly rowHeight: number;
11
11
  readonly nodePathInfo: SequenceNodePathInfo;
12
12
  readonly segmentIndex: number;
13
- }>;
13
+ };
14
+ export declare const TimelineKeyframeEasingLine: React.NamedExoticComponent<TimelineKeyframeEasingLineProps>;
15
+ export {};