@remotion/studio 4.0.519 → 4.0.521

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 (130) hide show
  1. package/dist/api/shut-down-studio.d.ts +6 -0
  2. package/dist/api/shut-down-studio.js +23 -0
  3. package/dist/api/visual-control.js +2 -2
  4. package/dist/components/AudioWaveform.js +16 -7
  5. package/dist/components/Canvas.js +114 -48
  6. package/dist/components/CaptionInspector.d.ts +1 -0
  7. package/dist/components/CaptionInspector.js +43 -2
  8. package/dist/components/CaptionTextEditor.js +1 -1
  9. package/dist/components/CompositionSelector.js +41 -34
  10. package/dist/components/CompositionSelectorItem.d.ts +7 -0
  11. package/dist/components/CompositionSelectorItem.js +344 -73
  12. package/dist/components/CurrentCompositionSideEffects.js +5 -0
  13. package/dist/components/ElementInstallConfirmation.d.ts +2 -23
  14. package/dist/components/ElementInstallConfirmation.js +89 -65
  15. package/dist/components/ElementLibraryModal.js +3 -1
  16. package/dist/components/FpsCounter.js +1 -1
  17. package/dist/components/FramePersistor.js +1 -1
  18. package/dist/components/InlineCaptionInspector.js +37 -1
  19. package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -18
  20. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
  21. package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
  22. package/dist/components/InspectorSequenceSection.js +1 -4
  23. package/dist/components/Menu/MenuSubItem.js +1 -1
  24. package/dist/components/ModalContainer.d.ts +1 -0
  25. package/dist/components/ModalContainer.js +2 -2
  26. package/dist/components/ModalHeader.js +5 -1
  27. package/dist/components/Modals.js +1 -1
  28. package/dist/components/NewComposition/NewComposition.js +2 -2
  29. package/dist/components/PlayPause.js +2 -13
  30. package/dist/components/PreviewToolbar.js +1 -1
  31. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +29 -15
  32. package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
  33. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
  34. package/dist/components/QuickSwitcher/asset-search.d.ts +0 -1
  35. package/dist/components/QuickSwitcher/asset-search.js +1 -16
  36. package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
  37. package/dist/components/QuickSwitcher/composition-search.js +136 -0
  38. package/dist/components/RenderButton.js +2 -2
  39. package/dist/components/RenderModal/RenderStatusModal.js +7 -1
  40. package/dist/components/RenderModal/ServerRenderModal.js +1 -1
  41. package/dist/components/RenderModal/WebRenderModal.js +1 -1
  42. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -1
  43. package/dist/components/ResetZoomButton.js +17 -2
  44. package/dist/components/SelectedOutlineElement.js +10 -30
  45. package/dist/components/SettingsModal.js +8 -5
  46. package/dist/components/TimeValue.js +36 -7
  47. package/dist/components/Timeline/Timeline.d.ts +1 -1
  48. package/dist/components/Timeline/Timeline.js +33 -20
  49. package/dist/components/Timeline/TimelineAssetField.d.ts +0 -1
  50. package/dist/components/Timeline/TimelineAssetField.js +17 -9
  51. package/dist/components/Timeline/TimelineCollapseToggle.js +1 -1
  52. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
  53. package/dist/components/Timeline/TimelineDragHandler.js +18 -8
  54. package/dist/components/Timeline/TimelineFontWeightField.d.ts +11 -0
  55. package/dist/components/Timeline/TimelineFontWeightField.js +65 -0
  56. package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
  57. package/dist/components/Timeline/TimelineLayerChildren.d.ts +21 -0
  58. package/dist/components/Timeline/TimelineLayerChildren.js +129 -0
  59. package/dist/components/Timeline/TimelineNumberField.js +13 -5
  60. package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
  61. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
  62. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  63. package/dist/components/Timeline/TimelineSequence.js +54 -73
  64. package/dist/components/Timeline/TimelineSequenceItem.js +16 -36
  65. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +22 -10
  66. package/dist/components/Timeline/TimelineSlider.js +2 -2
  67. package/dist/components/Timeline/TimelineTickFormatProvider.d.ts +8 -0
  68. package/dist/components/Timeline/TimelineTickFormatProvider.js +16 -0
  69. package/dist/components/Timeline/TimelineTimeIndicators.js +7 -3
  70. package/dist/components/Timeline/TimelineVideoInfo.js +7 -3
  71. package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
  72. package/dist/components/Timeline/TimelineZoomControls.js +25 -8
  73. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  74. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  75. package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
  76. package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
  77. package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
  78. package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
  79. package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
  80. package/dist/components/UpdateStatusContext.d.ts +5 -0
  81. package/dist/components/UpdateStatusContext.js +53 -2
  82. package/dist/components/UpdatesSettings.js +25 -4
  83. package/dist/components/WebMcp.js +87 -8
  84. package/dist/components/ZoomPersistor.js +2 -2
  85. package/dist/components/composition-drag-data.d.ts +36 -0
  86. package/dist/components/composition-drag-data.js +232 -0
  87. package/dist/components/composition-selector-drag-data.d.ts +27 -0
  88. package/dist/components/composition-selector-drag-data.js +80 -0
  89. package/dist/components/drop-handler-data.d.ts +2 -1
  90. package/dist/components/drop-handler-data.js +6 -4
  91. package/dist/components/effect-drag-and-drop.d.ts +2 -5
  92. package/dist/components/handle-drop.js +6 -2
  93. package/dist/components/import-assets.d.ts +7 -14
  94. package/dist/components/import-assets.js +11 -1
  95. package/dist/components/parse-caption-file.d.ts +5 -0
  96. package/dist/components/parse-caption-file.js +63 -0
  97. package/dist/error-overlay/current-error.d.ts +13 -0
  98. package/dist/error-overlay/current-error.js +21 -0
  99. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +5 -1
  100. package/dist/esm/chunk-emw4k5b0.js +99527 -0
  101. package/dist/esm/{chunk-1fkq5bfq.js → chunk-vkrvnx2h.js} +20116 -16283
  102. package/dist/esm/index.mjs +27 -9
  103. package/dist/esm/internals.mjs +17408 -13426
  104. package/dist/esm/previewEntry.mjs +17285 -13216
  105. package/dist/esm/renderEntry.mjs +1 -1
  106. package/dist/helpers/create-folder-tree.js +2 -5
  107. package/dist/helpers/document-title.d.ts +2 -0
  108. package/dist/helpers/document-title.js +14 -3
  109. package/dist/helpers/get-preview-file-type.js +22 -3
  110. package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
  111. package/dist/helpers/get-timeline-max-zoom.js +46 -29
  112. package/dist/helpers/inserted-element-selection.d.ts +2 -1
  113. package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
  114. package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
  115. package/dist/helpers/open-in-editor.js +2 -1
  116. package/dist/helpers/use-menu-structure.js +2 -2
  117. package/dist/helpers/use-runtime-values.d.ts +1 -1
  118. package/dist/helpers/use-runtime-values.js +5 -4
  119. package/dist/helpers/use-sync-external-store.d.ts +3 -0
  120. package/dist/helpers/use-sync-external-store.js +5 -0
  121. package/dist/index.d.ts +1 -0
  122. package/dist/index.js +3 -1
  123. package/dist/previewEntry.js +2 -0
  124. package/dist/state/modals.d.ts +16 -2
  125. package/dist/state/timeline-sequence-hover.js +3 -2
  126. package/dist/state/timeline-zoom.d.ts +0 -1
  127. package/dist/state/timeline-zoom.js +13 -6
  128. package/package.json +17 -17
  129. package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
  130. package/dist/helpers/sort-by-nonce-history.js +0 -6
@@ -45,7 +45,6 @@ const open_in_editor_1 = require("../helpers/open-in-editor");
45
45
  const modals_1 = require("../state/modals");
46
46
  const transform_3d_mode_1 = require("../state/transform-3d-mode");
47
47
  const ConfirmationDialog_1 = require("./ConfirmationDialog");
48
- const delete_jsx_node_api_1 = require("./delete-jsx-node-api");
49
48
  const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
50
49
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
51
50
  const selected_outline_types_1 = require("./selected-outline-types");
@@ -57,6 +56,7 @@ const get_sequence_context_menu_items_1 = require("./Timeline/get-sequence-conte
57
56
  const timeline_asset_link_1 = require("./Timeline/timeline-asset-link");
58
57
  const TimelineSelection_1 = require("./Timeline/TimelineSelection");
59
58
  const get_stack_1 = require("./Timeline/TimelineStack/get-stack");
59
+ const use_delete_timeline_items_1 = require("./Timeline/use-delete-timeline-items");
60
60
  const use_default_editor_info_1 = require("./use-default-editor-info");
61
61
  const use_select_asset_1 = require("./use-select-asset");
62
62
  const use_selected_outline_control_target_1 = require("./use-selected-outline-control-target");
@@ -68,6 +68,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
68
68
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
69
69
  const updateResolvedStackTrace = (0, react_1.useContext)(remotion_1.Internals.SequenceStackTracesUpdateContext);
70
70
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
71
+ const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
71
72
  const selectAsset = (0, use_select_asset_1.useSelectAsset)();
72
73
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
73
74
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
@@ -180,38 +181,16 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
180
181
  });
181
182
  }
182
183
  : null,
183
- onDeleteSequenceFromSource: async () => {
184
+ onDeleteSequenceFromSource: () => {
184
185
  if (sourceEditDisabled || previewServerState.type !== 'connected') {
185
186
  return;
186
187
  }
187
- if (contextMenuTarget.nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
188
- const shouldDelete = await confirm({
189
- title: 'Delete sequence?',
190
- message: 'This sequence is programmatically duplicated ' +
191
- contextMenuTarget.nodePathInfo.numberOfSequencesWithThisNodePath +
192
- ' times in the code. Deleting removes all instances. Continue?',
193
- confirmLabel: 'Delete',
194
- });
195
- if (!shouldDelete) {
196
- return;
197
- }
198
- }
199
- try {
200
- const result = await (0, delete_jsx_node_api_1.deleteJsxNode)({
201
- nodes: [
202
- {
203
- fileName: nodePath.absolutePath,
204
- nodePath: nodePath.nodePath,
205
- },
206
- ],
207
- });
208
- if (!result.success) {
209
- (0, NotificationCenter_1.showNotification)(result.reason, 4000);
210
- }
211
- }
212
- catch (err) {
213
- (0, NotificationCenter_1.showNotification)(err.message, 4000);
214
- }
188
+ deleteTimelineItems([
189
+ {
190
+ type: 'sequence',
191
+ nodePathInfo: contextMenuTarget.nodePathInfo,
192
+ },
193
+ ]);
215
194
  },
216
195
  onDisableSequenceInteractivity: () => {
217
196
  if (disableInteractivityDisabled ||
@@ -343,6 +322,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
343
322
  canConfigureApps,
344
323
  codingAgentInfo,
345
324
  confirm,
325
+ deleteTimelineItems,
346
326
  editorInfo,
347
327
  getTarget,
348
328
  onSelect,
@@ -30,6 +30,7 @@ const SkillsSettings_1 = require("./SkillsSettings");
30
30
  const StudioSettings_1 = require("./StudioSettings");
31
31
  const vertical_1 = require("./Tabs/vertical");
32
32
  const UpdatesSettings_1 = require("./UpdatesSettings");
33
+ const UpdateStatusContext_1 = require("./UpdateStatusContext");
33
34
  const hiddenPanel = {
34
35
  display: 'none',
35
36
  };
@@ -64,11 +65,13 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
64
65
  const { setPublicLicenseKey } = (0, SettingsContext_1.useSettings)();
65
66
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
66
67
  const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
67
- const showUpdates = (0, can_show_updates_1.canShowUpdates)({
68
- connectionStatus: previewServerState.type,
69
- isBrowserStudio,
70
- readOnlyStudio: window.remotion_isReadOnlyStudio,
71
- });
68
+ const { upgradeState } = (0, UpdateStatusContext_1.useUpdateStatus)();
69
+ const showUpdates = upgradeState !== 'idle' ||
70
+ (0, can_show_updates_1.canShowUpdates)({
71
+ connectionStatus: previewServerState.type,
72
+ isBrowserStudio,
73
+ readOnlyStudio: window.remotion_isReadOnlyStudio,
74
+ });
72
75
  const packageManager = window.remotion_packageManager === 'unknown'
73
76
  ? null
74
77
  : window.remotion_packageManager;
@@ -6,11 +6,13 @@ const player_1 = require("@remotion/player");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
8
  const colors_1 = require("../helpers/colors");
9
+ const hoverable_1 = require("../helpers/hoverable");
9
10
  const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
10
11
  const use_keybinding_1 = require("../helpers/use-keybinding");
11
12
  const render_frame_1 = require("../state/render-frame");
12
13
  const layout_1 = require("./layout");
13
14
  const InputDragger_1 = require("./NewComposition/InputDragger");
15
+ const TimelineTickFormatProvider_1 = require("./Timeline/TimelineTickFormatProvider");
14
16
  const TimelineZoomControls_1 = require("./Timeline/TimelineZoomControls");
15
17
  const text = {
16
18
  color: colors_1.WHITE,
@@ -22,7 +24,7 @@ const text = {
22
24
  width: '100%',
23
25
  };
24
26
  const currentTimeTypography = {
25
- color: colors_1.WHITE,
27
+ color: colors_1.LIGHT_TEXT,
26
28
  display: 'inline-block',
27
29
  fontSize: 14,
28
30
  fontVariantNumeric: 'tabular-nums',
@@ -32,14 +34,34 @@ const currentTimeTypography = {
32
34
  };
33
35
  const currentTimeInputStyle = {
34
36
  ...currentTimeTypography,
35
- padding: '4px 6px 4px 0',
37
+ padding: 0,
36
38
  };
37
- const currentTimeButtonStyle = {
38
- paddingLeft: 0,
39
+ const currentTimeStack = {
40
+ display: 'flex',
41
+ flexDirection: 'column',
42
+ alignItems: 'flex-start',
43
+ lineHeight: 1,
44
+ padding: '5px 7px 5px 1px',
39
45
  transform: 'translateY(-1px)',
40
46
  };
47
+ const currentTimeButtonStyle = {
48
+ display: 'block',
49
+ padding: 0,
50
+ border: 'none',
51
+ lineHeight: '21px',
52
+ '--remotion-cli-internals-blue-hovered': colors_1.WHITE,
53
+ };
41
54
  const currentTimeSubtitle = {
42
- color: colors_1.LIGHT_TEXT,
55
+ ...(0, hoverable_1.hoverableStyle)({
56
+ idleBackground: colors_1.TRANSPARENT,
57
+ hoverBackground: colors_1.TRANSPARENT,
58
+ idleColor: colors_1.LIGHT_TEXT,
59
+ hoverColor: colors_1.WHITE,
60
+ }),
61
+ background: colors_1.TRANSPARENT,
62
+ border: 'none',
63
+ padding: 0,
64
+ cursor: 'default',
43
65
  display: 'block',
44
66
  fontFamily: 'monospace',
45
67
  fontSize: 10,
@@ -50,6 +72,10 @@ const currentTimeSubtitle = {
50
72
  };
51
73
  const TimeValue = () => {
52
74
  const frame = (0, remotion_1.useCurrentFrame)();
75
+ const { showFrames, setShowFrames } = (0, react_1.useContext)(TimelineTickFormatProvider_1.TimelineTickFormatContext);
76
+ const toggleTickFormat = (0, react_1.useCallback)(() => {
77
+ setShowFrames((previous) => !previous);
78
+ }, [setShowFrames]);
53
79
  const config = remotion_1.Internals.useUnsafeVideoConfig();
54
80
  const isStill = (0, is_current_selected_still_1.useIsStill)();
55
81
  const { seek, play, pause, toggle } = player_1.PlayerInternals.usePlayerMethods();
@@ -64,7 +90,6 @@ const TimeValue = () => {
64
90
  const formatter = (0, react_1.useCallback)((value) => {
65
91
  return config ? (0, render_frame_1.renderFrame)(Number(value), config.fps) : String(value);
66
92
  }, [config]);
67
- const formatterSubtitle = (0, react_1.useCallback)((value) => String(value), []);
68
93
  (0, react_1.useImperativeHandle)(remotion_1.Internals.timeValueRef, () => ({
69
94
  goToFrame: () => {
70
95
  var _a;
@@ -99,7 +124,11 @@ const TimeValue = () => {
99
124
  return null;
100
125
  }
101
126
  return (jsx_runtime_1.jsxs("div", { style: text, children: [
102
- jsx_runtime_1.jsx(InputDragger_1.InputDragger, { ref: ref, "aria-label": String(frame), value: frame, onTextChange: onTextChange, onValueChange: onValueChange, formatter: formatter, formatterStyle: currentTimeTypography, formatterSubtitle: formatterSubtitle, formatterSubtitleStyle: currentTimeSubtitle, buttonStyle: currentTimeButtonStyle, rightAlign: false, status: "ok", style: currentTimeInputStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(TimelineZoomControls_1.TimelineZoomControls, { sliderMaxWidth: 80 }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
127
+ jsx_runtime_1.jsxs("div", { style: currentTimeStack, children: [
128
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { ref: ref, "aria-label": String(frame), value: frame, onTextChange: onTextChange, onValueChange: onValueChange, formatter: formatter, formatterStyle: currentTimeTypography, buttonStyle: currentTimeButtonStyle, rightAlign: false, status: "ok", style: currentTimeInputStyle }), jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: currentTimeSubtitle, onClick: toggleTickFormat, "aria-label": "Show timeline ticks as frames", "aria-pressed": showFrames, title: showFrames
129
+ ? 'Show timeline ticks as timecode'
130
+ : 'Show timeline ticks as frames', children: frame })
131
+ ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(TimelineZoomControls_1.TimelineZoomControls, { sliderMaxWidth: 80 }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
103
132
  ] }));
104
133
  };
105
134
  exports.TimeValue = TimeValue;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const Timeline: React.NamedExoticComponent<{}>;
2
+ export declare const Timeline: React.FC;
@@ -48,6 +48,7 @@ const is_current_selected_still_1 = require("../../helpers/is-current-selected-s
48
48
  const open_in_editor_1 = require("../../helpers/open-in-editor");
49
49
  const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
50
50
  const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
51
+ const use_sync_external_store_1 = require("../../helpers/use-sync-external-store");
51
52
  const call_api_1 = require("../call-api");
52
53
  const ContextMenu_1 = require("../ContextMenu");
53
54
  const import_assets_1 = require("../import-assets");
@@ -68,6 +69,7 @@ const TimelineHeightContainer_1 = require("./TimelineHeightContainer");
68
69
  const TimelineInOutDragHandler_1 = require("./TimelineInOutDragHandler");
69
70
  const TimelineInOutPointer_1 = require("./TimelineInOutPointer");
70
71
  const TimelineKeyframeTracksContext_1 = require("./TimelineKeyframeTracksContext");
72
+ const TimelineLayerChildren_1 = require("./TimelineLayerChildren");
71
73
  const TimelineList_1 = require("./TimelineList");
72
74
  const TimelinePinchZoom_1 = require("./TimelinePinchZoom");
73
75
  const TimelinePlayCursorSyncer_1 = require("./TimelinePlayCursorSyncer");
@@ -75,6 +77,7 @@ const TimelineScrollable_1 = require("./TimelineScrollable");
75
77
  const TimelineSelection_1 = require("./TimelineSelection");
76
78
  const TimelineSequenceItem_1 = require("./TimelineSequenceItem");
77
79
  const TimelineSlider_1 = require("./TimelineSlider");
80
+ const TimelineTickFormatProvider_1 = require("./TimelineTickFormatProvider");
78
81
  const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
79
82
  const TimelineTracks_1 = require("./TimelineTracks");
80
83
  const TimelineVirtualization_1 = require("./TimelineVirtualization");
@@ -296,7 +299,7 @@ const TimelineInner = () => {
296
299
  overrideIdToNodePathMappings,
297
300
  compositions,
298
301
  ]);
299
- const pendingInsertedElementSelection = (0, react_1.useSyncExternalStore)(inserted_element_selection_1.subscribeToInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection);
302
+ const pendingInsertedElementSelection = (0, use_sync_external_store_1.useSyncExternalStore)(inserted_element_selection_1.subscribeToInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection);
300
303
  const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
301
304
  const pendingSelectionStart = (0, react_1.useRef)(null);
302
305
  const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
@@ -307,10 +310,11 @@ const TimelineInner = () => {
307
310
  return;
308
311
  }
309
312
  const matchesInsertedNodePath = (track) => track.nodePathInfo !== null &&
310
- track.nodePathInfo.sequenceSubscriptionKey.absolutePath ===
311
- pendingInsertedElementSelection.nodePath.absolutePath &&
312
- JSON.stringify(track.nodePathInfo.sequenceSubscriptionKey.nodePath) ===
313
- JSON.stringify(pendingInsertedElementSelection.nodePath.nodePath);
313
+ (pendingInsertedElementSelection.nodePath === null ||
314
+ (track.nodePathInfo.sequenceSubscriptionKey.absolutePath ===
315
+ pendingInsertedElementSelection.nodePath.absolutePath &&
316
+ JSON.stringify(track.nodePathInfo.sequenceSubscriptionKey.nodePath) ===
317
+ JSON.stringify(pendingInsertedElementSelection.nodePath.nodePath)));
314
318
  if (((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.selection) !==
315
319
  pendingInsertedElementSelection) {
316
320
  pendingSelectionStart.current = {
@@ -341,6 +345,9 @@ const TimelineInner = () => {
341
345
  }
342
346
  selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
343
347
  (0, inserted_element_selection_1.clearInsertedElementSelection)(pendingInsertedElementSelection);
348
+ if (pendingInsertedElementSelection.notification !== null) {
349
+ (0, NotificationCenter_1.showNotification)(pendingInsertedElementSelection.notification, 3000);
350
+ }
344
351
  }, [
345
352
  canvasContent,
346
353
  fastRefreshes,
@@ -368,27 +375,33 @@ const TimelineInner = () => {
368
375
  return true;
369
376
  });
370
377
  }, [filtered]);
378
+ const { visibleTracks, value: layerChildrenValue } = (0, TimelineLayerChildren_1.useTimelineLayerChildren)(collapsed, sequences, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null);
371
379
  const maxTimelineTracks = (0, studio_runtime_config_1.getStudioMaxTimelineTracks)();
372
380
  const shown = (0, react_1.useMemo)(() => {
373
- return maxTimelineTracks !== null && collapsed.length > maxTimelineTracks
374
- ? collapsed.slice(0, maxTimelineTracks)
375
- : collapsed;
376
- }, [collapsed, maxTimelineTracks]);
377
- const hasBeenCut = collapsed.length > shown.length;
381
+ return maxTimelineTracks !== null &&
382
+ visibleTracks.length > maxTimelineTracks
383
+ ? visibleTracks.slice(0, maxTimelineTracks)
384
+ : visibleTracks;
385
+ }, [visibleTracks, maxTimelineTracks]);
386
+ const hasBeenCut = visibleTracks.length > shown.length;
378
387
  return (jsx_runtime_1.jsxs(TimelineContextMenuArea, { children: [sequences.map((sequence) => {
379
388
  if (!(0, should_subscribe_to_sequence_props_1.shouldSubscribeToSequenceProps)(sequence, previewInteractive)) {
380
389
  return null;
381
390
  }
382
391
  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));
383
- }), (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.jsx(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: jsx_runtime_1.jsxs(TimelineVirtualization_1.TimelineVirtualizationProvider, { hasBeenCut: hasBeenCut, isStill: isStill, 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, { children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, {})) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
384
- 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: [
385
- 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, {}) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
386
- jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
387
- ] }), children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
388
- jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {})) : null] }) })
389
- ] })
390
- ] })) })
391
- ] }) }) })
392
+ }), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}) : null, jsx_runtime_1.jsx(TimelineLayerChildren_1.TimelineLayerChildrenProvider, { value: layerChildrenValue, children: jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: jsx_runtime_1.jsxs(TimelineVirtualization_1.TimelineVirtualizationProvider, { hasBeenCut: hasBeenCut, isStill: isStill, 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, { children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, {})) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
393
+ 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: [
394
+ 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, {}) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
395
+ jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
396
+ ] }), children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
397
+ jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {})) : null] }) })
398
+ ] })
399
+ ] })) })
400
+ ] }) }) }) })
392
401
  ] }));
393
402
  };
394
- exports.Timeline = react_1.default.memo(TimelineInner);
403
+ const MemoizedTimelineInner = react_1.default.memo(TimelineInner);
404
+ const Timeline = () => {
405
+ return (jsx_runtime_1.jsx(TimelineTickFormatProvider_1.TimelineTickFormatProvider, { children: jsx_runtime_1.jsx(MemoizedTimelineInner, {}) }));
406
+ };
407
+ exports.Timeline = Timeline;
@@ -4,7 +4,6 @@ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSa
4
4
  import { type InspectorQuickActionProps } from '../InspectorPanel/common';
5
5
  export type InspectorSourceAction = InspectorQuickActionProps;
6
6
  type AssetSelectionContextValue = {
7
- readonly initialQuery: string;
8
7
  readonly getSourceAction: (src: string) => InspectorSourceAction | null;
9
8
  readonly sourceAction: InspectorSourceAction | null;
10
9
  };
@@ -23,6 +23,7 @@ const sourceActions = {
23
23
  display: 'flex',
24
24
  flex: 1,
25
25
  gap: 4,
26
+ margin: '0 4px',
26
27
  minWidth: 0,
27
28
  };
28
29
  const standaloneSourceActionStyle = {
@@ -31,9 +32,13 @@ const standaloneSourceActionStyle = {
31
32
  minWidth: 0,
32
33
  width: 'auto',
33
34
  };
35
+ const assetTypeToAccept = {
36
+ audio: 'audio/*',
37
+ video: 'video/*',
38
+ image: 'image/*',
39
+ };
34
40
  exports.AssetSelectionContext = (0, react_1.createContext)({
35
41
  getSourceAction: () => null,
36
- initialQuery: '',
37
42
  sourceAction: null,
38
43
  });
39
44
  const toFileToken = (name) => {
@@ -49,14 +54,14 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
49
54
  }
50
55
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
51
56
  const staticFiles = (0, use_static_files_1.useStaticFiles)();
52
- const { getSourceAction, initialQuery, sourceAction } = (0, react_1.useContext)(exports.AssetSelectionContext);
57
+ const { getSourceAction, sourceAction } = (0, react_1.useContext)(exports.AssetSelectionContext);
58
+ const { assetType } = field.fieldSchema;
59
+ const initialQuery = assetType ? `type:${assetType} ` : '';
53
60
  const inlineSourceAction = (0, react_1.useMemo)(() => {
54
- if (field.key !== 'src') {
55
- return null;
61
+ if (typeof effectiveValue === 'string') {
62
+ return getSourceAction(effectiveValue);
56
63
  }
57
- return typeof effectiveValue === 'string'
58
- ? getSourceAction(effectiveValue)
59
- : sourceAction;
64
+ return field.key === 'src' ? sourceAction : null;
60
65
  }, [effectiveValue, field.key, getSourceAction, sourceAction]);
61
66
  const onSelect = (0, react_1.useCallback)((assetName, previewValue) => {
62
67
  const sourceValue = (0, exports.toFileToken)(assetName);
@@ -69,7 +74,10 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
69
74
  });
70
75
  }, [propStatus.codeValue, onDragValueChange, onSave, onDragEnd]);
71
76
  const selectFile = (0, react_1.useCallback)(async () => {
72
- const [file] = await (0, import_assets_1.pickFilesToImport)({ multiple: false });
77
+ const [file] = await (0, import_assets_1.pickFilesToImport)({
78
+ multiple: false,
79
+ accept: assetType ? assetTypeToAccept[assetType] : null,
80
+ });
73
81
  if (!file) {
74
82
  return;
75
83
  }
@@ -93,7 +101,7 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
93
101
  catch (error) {
94
102
  (0, NotificationCenter_1.showNotification)(`Could not upload asset: ${error instanceof Error ? error.message : String(error)}`, 4000);
95
103
  }
96
- }, [onSelect, staticFiles]);
104
+ }, [assetType, onSelect, staticFiles]);
97
105
  const openAssetSelection = (0, react_1.useCallback)(() => {
98
106
  setSelectedModal({
99
107
  type: 'quick-switcher',
@@ -10,7 +10,7 @@ const container = {
10
10
  alignItems: 'center',
11
11
  };
12
12
  const Icon = ({ color, ...props }) => {
13
- return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 8 10", ...props, style: { height: 10, width: 8 }, children: jsx_runtime_1.jsx("path", { d: "M 0 0 L 8 5 L 0 10 z", fill: color }) }));
13
+ return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 8 10", ...props, style: { height: 8, width: 6.4 }, children: jsx_runtime_1.jsx("path", { d: "M 0 0 L 8 5 L 0 10 z", fill: color }) }));
14
14
  };
15
15
  const TimelineCollapseToggle = ({ collapsed, color }) => {
16
16
  return (jsx_runtime_1.jsx("div", { style: collapsed ? container : { ...container, transform: 'rotate(90deg)' }, children: jsx_runtime_1.jsx(Icon, { color: color }) }));
@@ -1,118 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelineDeleteKeybindings = void 0;
4
- const studio_shared_1 = require("@remotion/studio-shared");
5
4
  const react_1 = require("react");
6
5
  const remotion_1 = require("remotion");
7
6
  const client_id_1 = require("../../helpers/client-id");
8
7
  const use_keybinding_1 = require("../../helpers/use-keybinding");
9
- const editor_guides_1 = require("../../state/editor-guides");
10
8
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
11
- const delete_selected_timeline_item_1 = require("./delete-selected-timeline-item");
12
9
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
13
10
  const imperative_state_1 = require("./imperative-state");
14
- const reset_selected_timeline_props_1 = require("./reset-selected-timeline-props");
15
11
  const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
16
12
  const TimelineSelection_1 = require("./TimelineSelection");
17
- const update_selected_easing_1 = require("./update-selected-easing");
13
+ const use_delete_timeline_items_1 = require("./use-delete-timeline-items");
18
14
  const TimelineDeleteKeybindings = () => {
19
15
  const keybindings = (0, use_keybinding_1.useKeybinding)();
20
16
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
21
17
  const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
22
18
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
23
19
  const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
24
- const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
25
- const { setGuidesList } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
26
20
  const { canSelect } = (0, TimelineSelection_1.useTimelineSelection)();
27
21
  const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
28
22
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
23
+ const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
29
24
  (0, react_1.useEffect)(() => {
30
25
  if (!canSelect || previewServerState.type !== 'connected') {
31
26
  return;
32
27
  }
33
- const { clientId } = previewServerState;
34
- const handleDelete = () => {
35
- const timelinePosition = (0, imperative_state_1.getCurrentFrame)();
36
- const { selectedItems, clearSelection, selectItems } = currentSelection.current;
37
- const sequences = sequencesRef.current;
38
- const propStatuses = propStatusesRef.current;
39
- if (selectedItems.length === 0) {
40
- return;
41
- }
42
- const selectedGuide = selectedItems.find((item) => item.type === 'guide');
43
- if (selectedGuide) {
44
- setGuidesList((prevGuides) => {
45
- const newGuides = prevGuides.filter((guide) => guide.id !== selectedGuide.guideId);
46
- (0, editor_guides_1.persistGuidesList)(newGuides);
47
- return newGuides;
48
- });
49
- clearSelection();
50
- return;
51
- }
52
- const deletePromise = (0, delete_selected_timeline_item_1.deleteSelectedTimelineItems)({
53
- selections: selectedItems,
54
- sequences,
55
- overrideIdsToNodePaths: overrideIdToNodePathMappings,
56
- setPropStatuses,
57
- clientId,
58
- confirm,
59
- propStatuses,
60
- timelinePosition,
61
- });
62
- if (deletePromise !== null) {
63
- deletePromise
64
- .then((deleted) => {
65
- if (deleted) {
66
- const nextSelection = (0, delete_selected_timeline_item_1.getTimelineSelectionAfterDeletingItems)({
67
- selections: selectedItems,
68
- sequences,
69
- overrideIdsToNodePaths: overrideIdToNodePathMappings,
70
- propStatuses,
71
- timelinePosition,
72
- });
73
- if (nextSelection.length === 0) {
74
- clearSelection();
75
- }
76
- else {
77
- selectItems(nextSelection);
78
- }
79
- }
80
- })
81
- .catch(() => undefined);
82
- return;
83
- }
84
- const easingSelections = (0, update_selected_easing_1.getEasingSelections)(selectedItems);
85
- if (easingSelections.length === selectedItems.length) {
86
- const resetEasingPromise = (0, update_selected_easing_1.updateSelectedTimelineEasings)({
87
- selections: easingSelections,
88
- sequences,
89
- overrideIdsToNodePaths: overrideIdToNodePathMappings,
90
- propStatuses,
91
- setPropStatuses,
92
- clientId,
93
- easing: studio_shared_1.LINEAR_KEYFRAME_EASING,
94
- });
95
- if (resetEasingPromise !== null) {
96
- resetEasingPromise.catch(() => undefined);
97
- return;
98
- }
99
- }
100
- const resetPromise = (0, reset_selected_timeline_props_1.resetSelectedTimelineProps)({
101
- selections: selectedItems,
102
- sequences,
103
- overrideIdsToNodePaths: overrideIdToNodePathMappings,
104
- propStatuses,
105
- setPropStatuses,
106
- clientId,
107
- });
108
- if (resetPromise !== null) {
109
- resetPromise.catch(() => undefined);
110
- }
111
- };
112
28
  const backspace = keybindings.registerKeybinding({
113
29
  event: 'keydown',
114
30
  key: 'Backspace',
115
- callback: handleDelete,
31
+ callback: () => deleteTimelineItems(null),
116
32
  commandCtrlKey: false,
117
33
  preventDefault: true,
118
34
  triggerIfInputFieldFocused: false,
@@ -121,7 +37,7 @@ const TimelineDeleteKeybindings = () => {
121
37
  const deleteKey = keybindings.registerKeybinding({
122
38
  event: 'keydown',
123
39
  key: 'Delete',
124
- callback: handleDelete,
40
+ callback: () => deleteTimelineItems(null),
125
41
  commandCtrlKey: false,
126
42
  preventDefault: true,
127
43
  triggerIfInputFieldFocused: false,
@@ -190,13 +106,12 @@ const TimelineDeleteKeybindings = () => {
190
106
  canSelect,
191
107
  confirm,
192
108
  currentSelection,
109
+ deleteTimelineItems,
193
110
  keybindings,
194
111
  overrideIdToNodePathMappings,
195
112
  propStatusesRef,
196
113
  previewServerState,
197
114
  sequencesRef,
198
- setGuidesList,
199
- setPropStatuses,
200
115
  ]);
201
116
  return null;
202
117
  };
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const player_1 = require("@remotion/player");
39
39
  const react_1 = __importStar(require("react"));
40
40
  const remotion_1 = require("remotion");
41
+ const get_timeline_max_zoom_1 = require("../../helpers/get-timeline-max-zoom");
41
42
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
42
43
  const pointer_session_1 = require("../../helpers/pointer-session");
43
44
  const timeline_zoom_1 = require("../../state/timeline-zoom");
@@ -73,22 +74,32 @@ const getClientXWithScroll = (x) => {
73
74
  };
74
75
  const TimelineDragHandler = () => {
75
76
  const video = remotion_1.Internals.useUnsafeVideoConfig();
77
+ const timelineSize = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
78
+ triggerOnWindowResize: true,
79
+ shouldApplyCssTransforms: true,
80
+ });
76
81
  const { zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
77
82
  const { canvasContent, currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
78
83
  const containerStyle = (0, react_1.useMemo)(() => {
79
84
  var _a;
85
+ var _b, _c, _d, _e;
80
86
  if (!canvasContent) {
81
87
  return {};
82
88
  }
83
- const zoom = canvasContent.type === 'composition'
84
- ? ((_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM)
85
- : timeline_zoom_1.TIMELINE_MIN_ZOOM;
89
+ const durationInFrames = (_b = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _b !== void 0 ? _b : 1;
90
+ const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
91
+ durationInFrames,
92
+ timelineViewportWidth: (_d = (_c = timelineSize === null || timelineSize === void 0 ? void 0 : timelineSize.width) !== null && _c !== void 0 ? _c : (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _d !== void 0 ? _d : 0,
93
+ zoom: canvasContent.type === 'composition'
94
+ ? ((_e = zoomMap[canvasContent.compositionId]) !== null && _e !== void 0 ? _e : null)
95
+ : null,
96
+ });
86
97
  return {
87
98
  ...container,
88
- width: 100 * zoom + '%',
99
+ width: (0, get_timeline_max_zoom_1.getTimelineWidth)({ durationInFrames, zoom }),
89
100
  height: TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT,
90
101
  };
91
- }, [canvasContent, zoomMap]);
102
+ }, [canvasContent, timelineSize === null || timelineSize === void 0 ? void 0 : timelineSize.width, video === null || video === void 0 ? void 0 : video.durationInFrames, zoomMap]);
92
103
  const hasPlayableContent = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ||
93
104
  ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' &&
94
105
  (currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset);
@@ -100,7 +111,6 @@ const TimelineDragHandler = () => {
100
111
  exports.TimelineDragHandler = TimelineDragHandler;
101
112
  const TimelineDragHandlerInner = () => {
102
113
  var _a;
103
- var _b, _c;
104
114
  const videoConfig = (0, remotion_1.useVideoConfig)();
105
115
  const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
106
116
  triggerOnWindowResize: true,
@@ -108,8 +118,8 @@ const TimelineDragHandlerInner = () => {
108
118
  });
109
119
  const { isHighestContext } = (0, z_index_1.useZIndex)();
110
120
  const setFrame = remotion_1.Internals.useTimelineSetFrame();
111
- const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
112
- const left = (_c = size === null || size === void 0 ? void 0 : size.left) !== null && _c !== void 0 ? _c : 0;
121
+ const width = (0, timeline_scroll_logic_1.getTimelineContentWidth)();
122
+ const left = (_a = size === null || size === void 0 ? void 0 : size.left) !== null && _a !== void 0 ? _a : 0;
113
123
  const [dragging, setDragging] = (0, react_1.useState)({
114
124
  dragging: false,
115
125
  });
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { CanUpdateSequencePropStatusStatic } from 'remotion';
3
+ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
+ export declare const TimelineFontWeightField: React.FC<{
5
+ readonly field: SchemaFieldInfo;
6
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
7
+ readonly effectiveValue: unknown;
8
+ readonly onSave: TimelineFieldOnSave;
9
+ readonly onDragValueChange: TimelineFieldOnDragValueChange;
10
+ readonly onDragEnd: () => void;
11
+ }>;