@remotion/studio 4.0.505 → 4.0.507

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 (208) hide show
  1. package/dist/api/copy-render-output-to-asset.d.ts +4 -0
  2. package/dist/api/copy-render-output-to-asset.js +11 -0
  3. package/dist/api/install-package.d.ts +2 -3
  4. package/dist/api/install-package.js +1 -3
  5. package/dist/api/visual-control.d.ts +3 -0
  6. package/dist/api/visual-control.js +3 -0
  7. package/dist/components/AssetSelector.js +19 -4
  8. package/dist/components/AssetSelectorItem.js +3 -3
  9. package/dist/components/Canvas.js +2 -0
  10. package/dist/components/CodingAgentIcon.d.ts +4 -0
  11. package/dist/components/CodingAgentIcon.js +17 -0
  12. package/dist/components/CompositionSelector.js +1 -1
  13. package/dist/components/CompositionSelectorItem.js +1 -1
  14. package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -1
  15. package/dist/components/ConfigureDefaultEditorModal.js +117 -69
  16. package/dist/components/ConfigureLicenseModal.d.ts +1 -3
  17. package/dist/components/ConfigureLicenseModal.js +105 -89
  18. package/dist/components/ConfirmationDialog.js +2 -2
  19. package/dist/components/ContextMenu.js +10 -8
  20. package/dist/components/Editor.js +2 -0
  21. package/dist/components/EditorContexts.js +6 -5
  22. package/dist/components/EffectPickerModal.js +1 -1
  23. package/dist/components/ExpandedTracksProvider.js +10 -53
  24. package/dist/components/GlobalKeybindings.js +3 -2
  25. package/dist/components/InlineCaptionInspector.d.ts +2 -2
  26. package/dist/components/InlineDropdown.d.ts +2 -1
  27. package/dist/components/InlineDropdown.js +10 -4
  28. package/dist/components/InspectorLocationCopy.js +8 -8
  29. package/dist/components/InspectorOpenInEditor.d.ts +2 -0
  30. package/dist/components/InspectorOpenInEditor.js +63 -49
  31. package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
  32. package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
  33. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
  34. package/dist/components/InspectorPanel/EasingInspector.js +7 -4
  35. package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
  36. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
  37. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
  38. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  39. package/dist/components/InspectorPanel/common.d.ts +1 -0
  40. package/dist/components/InspectorPanel/common.js +2 -2
  41. package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
  42. package/dist/components/InspectorSequenceSection.js +4 -4
  43. package/dist/components/InstallPackage.js +1 -1
  44. package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
  45. package/dist/components/Menu/MenuSectionHeader.js +20 -0
  46. package/dist/components/Menu/SubMenu.js +13 -2
  47. package/dist/components/Menu/menu-tree-context.d.ts +3 -0
  48. package/dist/components/Menu/menu-tree-context.js +13 -0
  49. package/dist/components/MenuBuildIndicator.js +1 -0
  50. package/dist/components/MenuToolbar.js +1 -1
  51. package/dist/components/ModalFooter.d.ts +1 -0
  52. package/dist/components/ModalFooter.js +6 -2
  53. package/dist/components/ModalHeader.js +1 -1
  54. package/dist/components/Modals.js +18 -7
  55. package/dist/components/ModalsProvider.js +5 -6
  56. package/dist/components/NewComposition/CodemodFooter.js +1 -1
  57. package/dist/components/NewComposition/ComboBox.d.ts +6 -1
  58. package/dist/components/NewComposition/DismissableModal.js +1 -1
  59. package/dist/components/NewComposition/MenuContent.js +27 -19
  60. package/dist/components/NewComposition/RenameStaticFile.js +1 -1
  61. package/dist/components/NewComposition/menu-typeahead.js +2 -2
  62. package/dist/components/OverrideInputProps.js +1 -1
  63. package/dist/components/PlayPause.js +2 -1
  64. package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
  65. package/dist/components/Preview.js +29 -4
  66. package/dist/components/PreviewToolbarOverflowButton.js +4 -2
  67. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
  68. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  69. package/dist/components/RenderButton.d.ts +3 -3
  70. package/dist/components/RenderButton.js +42 -7
  71. package/dist/components/RenderModal/RenderStatusModal.js +1 -1
  72. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
  73. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
  74. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +3 -3
  75. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
  76. package/dist/components/RenderModal/ServerRenderModal.js +5 -1
  77. package/dist/components/RenderModal/WebRenderModal.js +3 -2
  78. package/dist/components/RenderQueue/RenderQueueError.js +1 -1
  79. package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
  80. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
  81. package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
  82. package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
  83. package/dist/components/RenderQueue/actions.d.ts +4 -2
  84. package/dist/components/RenderQueue/actions.js +4 -2
  85. package/dist/components/RenderQueue/index.js +3 -4
  86. package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
  87. package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
  88. package/dist/components/SegmentedControl.js +0 -1
  89. package/dist/components/SelectedOutlineElement.d.ts +14 -17
  90. package/dist/components/SelectedOutlineElement.js +113 -931
  91. package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
  92. package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
  93. package/dist/components/SelectedOutlineOverlay.d.ts +6 -13
  94. package/dist/components/SelectedOutlineOverlay.js +360 -832
  95. package/dist/components/SelectedOutlinePolygon.d.ts +25 -0
  96. package/dist/components/SelectedOutlinePolygon.js +359 -0
  97. package/dist/components/SelectedOutlineRenderer.d.ts +18 -0
  98. package/dist/components/SelectedOutlineRenderer.js +208 -0
  99. package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +16 -0
  100. package/dist/components/SelectedOutlineRotationCornerHandle.js +269 -0
  101. package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +16 -0
  102. package/dist/components/SelectedOutlineScaleEdgeLine.js +211 -0
  103. package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
  104. package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
  105. package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
  106. package/dist/components/SelectedOutlineTransformOriginHandle.js +286 -0
  107. package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
  108. package/dist/components/SelectedOutlineUvControls.js +57 -12
  109. package/dist/components/SettingsContext.d.ts +15 -0
  110. package/dist/components/SettingsContext.js +116 -0
  111. package/dist/components/SettingsModal.d.ts +7 -0
  112. package/dist/components/SettingsModal.js +56 -0
  113. package/dist/components/SettingsModalFooter.d.ts +2 -0
  114. package/dist/components/SettingsModalFooter.js +44 -0
  115. package/dist/components/ShowOutlinesProvider.js +2 -3
  116. package/dist/components/SidebarRenderButton.js +1 -1
  117. package/dist/components/SvgImportDialog.js +2 -2
  118. package/dist/components/TimeValue.js +1 -1
  119. package/dist/components/Timeline/EasingEditorModal.js +66 -22
  120. package/dist/components/Timeline/Timeline.js +23 -5
  121. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  122. package/dist/components/Timeline/TimelineDragHandler.js +3 -3
  123. package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
  124. package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
  125. package/dist/components/Timeline/TimelineEffectPropItem.js +5 -3
  126. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
  127. package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
  128. package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
  129. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
  130. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
  131. package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
  132. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  133. package/dist/components/Timeline/TimelineSelection.js +1 -0
  134. package/dist/components/Timeline/TimelineSequence.js +28 -25
  135. package/dist/components/Timeline/TimelineSequenceItem.js +74 -58
  136. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +1 -1
  137. package/dist/components/Timeline/TimelineTrack.js +2 -1
  138. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
  139. package/dist/components/Timeline/get-sequence-context-menu-items.js +58 -53
  140. package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
  141. package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
  142. package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
  143. package/dist/components/Timeline/timeline-asset-link.js +2 -2
  144. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +38 -2
  145. package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
  146. package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +20 -4
  147. package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
  148. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +5 -0
  149. package/dist/components/Timeline/use-timeline-expanded-tree.js +50 -1
  150. package/dist/components/Timeline/use-timeline-height.js +20 -0
  151. package/dist/components/TimelineInOutToggle.js +5 -1
  152. package/dist/components/TopPanel.js +16 -0
  153. package/dist/components/UpdateCheck.js +1 -1
  154. package/dist/components/effect-drag-and-drop.js +1 -1
  155. package/dist/components/get-open-in-menu-items.d.ts +12 -0
  156. package/dist/components/get-open-in-menu-items.js +83 -0
  157. package/dist/components/handle-drop.d.ts +2 -1
  158. package/dist/components/handle-drop.js +12 -2
  159. package/dist/components/import-assets.d.ts +18 -6
  160. package/dist/components/import-assets.js +76 -32
  161. package/dist/components/selected-outline-measurement.d.ts +2 -2
  162. package/dist/components/selected-outline-order.d.ts +12 -0
  163. package/dist/components/selected-outline-order.js +251 -0
  164. package/dist/components/selected-outline-types.d.ts +9 -10
  165. package/dist/components/svg-point-to-client-point.d.ts +2 -0
  166. package/dist/components/svg-point-to-client-point.js +10 -0
  167. package/dist/components/use-auto-save-config.d.ts +8 -0
  168. package/dist/components/use-auto-save-config.js +74 -0
  169. package/dist/components/use-default-editor-info.d.ts +1 -0
  170. package/dist/components/use-default-editor-info.js +10 -30
  171. package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
  172. package/dist/esm/{chunk-7pgk8h5m.js → chunk-ptnd65a9.js} +14596 -12725
  173. package/dist/esm/internals.mjs +14595 -12724
  174. package/dist/esm/previewEntry.mjs +12726 -10855
  175. package/dist/esm/renderEntry.mjs +2 -2
  176. package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
  177. package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
  178. package/dist/helpers/calculate-timeline.js +3 -3
  179. package/dist/helpers/client-id.d.ts +3 -1
  180. package/dist/helpers/client-id.js +28 -4
  181. package/dist/helpers/format-file-location.d.ts +1 -1
  182. package/dist/helpers/format-file-location.js +3 -3
  183. package/dist/helpers/install-required-package.d.ts +3 -3
  184. package/dist/helpers/install-required-package.js +1 -6
  185. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
  186. package/dist/helpers/open-in-editor.d.ts +1 -0
  187. package/dist/helpers/open-in-editor.js +5 -1
  188. package/dist/helpers/studio-fit-padding.d.ts +1 -1
  189. package/dist/helpers/studio-fit-padding.js +1 -1
  190. package/dist/helpers/studio-runtime-config.js +3 -0
  191. package/dist/helpers/timeline-layout.d.ts +2 -1
  192. package/dist/helpers/timeline-layout.js +5 -2
  193. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  194. package/dist/helpers/timeline-node-path-key.js +3 -1
  195. package/dist/helpers/use-asset-drag-events.d.ts +2 -1
  196. package/dist/helpers/use-asset-drag-events.js +14 -6
  197. package/dist/helpers/use-menu-structure.js +25 -35
  198. package/dist/helpers/use-runtime-values.d.ts +9 -0
  199. package/dist/helpers/use-runtime-values.js +76 -0
  200. package/dist/icons/apps.d.ts +2 -0
  201. package/dist/icons/apps.js +7 -0
  202. package/dist/icons/browse-elements.d.ts +4 -0
  203. package/dist/icons/browse-elements.js +10 -0
  204. package/dist/state/modals.d.ts +5 -6
  205. package/dist/state/modals.js +5 -3
  206. package/dist/state/timeline-sequence-hover.d.ts +9 -3
  207. package/dist/state/timeline-sequence-hover.js +63 -12
  208. package/package.json +12 -12
@@ -39,21 +39,19 @@ const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
40
  const client_id_1 = require("../../helpers/client-id");
41
41
  const colors_1 = require("../../helpers/colors");
42
- const format_file_location_1 = require("../../helpers/format-file-location");
43
42
  const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
44
43
  const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-sequence-layout");
45
44
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
46
45
  const is_video_with_last_frame_hold_1 = require("../../helpers/is-video-with-last-frame-hold");
47
- const open_in_editor_1 = require("../../helpers/open-in-editor");
48
46
  const timeline_layout_1 = require("../../helpers/timeline-layout");
49
47
  const use_max_media_duration_1 = require("../../helpers/use-max-media-duration");
48
+ const modals_1 = require("../../state/modals");
50
49
  const AudioWaveform_1 = require("../AudioWaveform");
51
50
  const call_api_1 = require("../call-api");
52
51
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
53
52
  const ContextMenu_1 = require("../ContextMenu");
54
53
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
55
54
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
56
- const use_default_editor_info_1 = require("../use-default-editor-info");
57
55
  const use_select_asset_1 = require("../use-select-asset");
58
56
  const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
59
57
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
@@ -68,7 +66,7 @@ const TimelineSequenceFrame_1 = require("./TimelineSequenceFrame");
68
66
  const TimelineSequenceRightEdgeDragHandle_1 = require("./TimelineSequenceRightEdgeDragHandle");
69
67
  const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
70
68
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
71
- const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
69
+ const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
72
70
  const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
73
71
  const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
74
72
  const windowWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
@@ -159,12 +157,12 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
159
157
  // Some compositions may not be longer than their media duration,
160
158
  // if that is the case, it needs to be asynchronously determined
161
159
  var _a, _b, _c;
162
- var _d, _e, _f, _g, _h;
160
+ var _d, _e, _f, _g, _h, _j;
163
161
  const video = remotion_1.Internals.useVideo();
164
162
  const maxMediaDuration = (0, use_max_media_duration_1.useMaxMediaDuration)(s, (_d = video === null || video === void 0 ? void 0 : video.fps) !== null && _d !== void 0 ? _d : 30);
165
163
  const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
166
164
  const extendVideoLastFrame = (0, is_video_with_last_frame_hold_1.isVideoWithLastFrameHold)(s);
167
- const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(s.getStack);
165
+ const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(s);
168
166
  const validatedLocation = (0, react_1.useMemo)(() => {
169
167
  var _a;
170
168
  if (!originalLocation ||
@@ -199,25 +197,12 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
199
197
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
200
198
  const previewConnected = previewServerState.type === 'connected';
201
199
  const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
202
- const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
203
200
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
201
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
204
202
  const selectAsset = (0, use_select_asset_1.useSelectAsset)();
205
203
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
206
204
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
207
205
  const { onSelect, selectable } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
208
- const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
209
- location: originalLocation,
210
- root: window.remotion_cwd,
211
- }), [originalLocation]);
212
- const canOpenInEditor = Boolean(window.remotion_editorName && previewConnected && originalLocation);
213
- const openInEditor = (0, react_1.useCallback)((editorId) => {
214
- if (!canOpenInEditor || !originalLocation) {
215
- return;
216
- }
217
- (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, editorId).catch((err) => {
218
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
219
- });
220
- }, [canOpenInEditor, originalLocation]);
221
206
  const onSequenceDoubleClick = (0, react_1.useCallback)((e) => {
222
207
  if ((0, TimelineSelection_1.isTimelineSelectionModifierEvent)(e)) {
223
208
  e.stopPropagation();
@@ -253,7 +238,8 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
253
238
  const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
254
239
  const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
255
240
  const deleteDisabled = !previewInteractive || !s.controls || !canDeleteFromSource;
256
- const duplicateDisabled = deleteDisabled;
241
+ const isProgrammaticallyDuplicated = ((_f = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) !== null && _f !== void 0 ? _f : 1) > 1;
242
+ const duplicateDisabled = deleteDisabled || isProgrammaticallyDuplicated;
257
243
  const disableInteractivityDisabled = !previewInteractive ||
258
244
  !s.showInTimeline ||
259
245
  !nodePath ||
@@ -346,15 +332,28 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
346
332
  return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
347
333
  assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
348
334
  canOpenInEditor,
335
+ codingAgentInfo,
349
336
  deleteDisabled,
350
337
  disableInteractivityDisabled,
351
338
  duplicateDisabled,
352
339
  editorInfo,
353
- fileLocation,
354
340
  includeSourceEditItems: (0, interactivity_enabled_1.isStudioInteractivityEnabled)(),
341
+ isProgrammaticallyDuplicated,
342
+ onConfigureApps: canConfigureApps
343
+ ? () => {
344
+ var _a;
345
+ var _b;
346
+ setSelectedModal({
347
+ type: 'settings',
348
+ initialTab: 'apps',
349
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
350
+ });
351
+ }
352
+ : null,
355
353
  onDeleteSequenceFromSource,
356
354
  onDisableSequenceInteractivity,
357
355
  onDuplicateSequenceFromSource,
356
+ openInCodingAgent,
358
357
  openInEditor,
359
358
  originalLocation,
360
359
  selectAsset,
@@ -365,17 +364,20 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
365
364
  });
366
365
  }, [
367
366
  canOpenInEditor,
367
+ canConfigureApps,
368
+ codingAgentInfo,
368
369
  deleteDisabled,
369
370
  disableInteractivityDisabled,
370
371
  duplicateDisabled,
371
372
  editorInfo,
372
- fileLocation,
373
+ isProgrammaticallyDuplicated,
373
374
  mediaSrc,
374
375
  nodePath,
375
376
  onSelect,
376
377
  onDeleteSequenceFromSource,
377
378
  onDisableSequenceInteractivity,
378
379
  onDuplicateSequenceFromSource,
380
+ openInCodingAgent,
379
381
  openInEditor,
380
382
  originalLocation,
381
383
  previewInteractive,
@@ -386,13 +388,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
386
388
  selectable,
387
389
  sequenceFrameOffset,
388
390
  setPropStatuses,
391
+ setSelectedModal,
389
392
  validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
390
393
  ]);
391
394
  const { frozenFrame } = s;
392
395
  const { onPointerDown: onMoveDragPointerDown } = (0, TimelineSequenceRightEdgeDragHandle_1.useTimelineSequenceFromDrag)({
393
396
  nodePathInfo,
394
397
  windowWidth,
395
- timelineDurationInFrames: (_f = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _f !== void 0 ? _f : 1,
398
+ timelineDurationInFrames: (_g = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _g !== void 0 ? _g : 1,
396
399
  });
397
400
  if (!video) {
398
401
  throw new TypeError('Expected video config');
@@ -464,7 +467,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
464
467
  if (maxMediaDuration === null && !s.loopDisplay) {
465
468
  return null;
466
469
  }
467
- const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_g = video.durationInFrames) !== null && _g !== void 0 ? _g : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null] }));
470
+ const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
468
471
  return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
469
472
  };
470
473
  exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
@@ -37,14 +37,15 @@ exports.TimelineSequenceItem = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
+ const are_sequence_node_path_infos_equal_1 = require("../../helpers/are-sequence-node-path-infos-equal");
40
41
  const client_id_1 = require("../../helpers/client-id");
41
42
  const colors_1 = require("../../helpers/colors");
42
- const format_file_location_1 = require("../../helpers/format-file-location");
43
43
  const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
44
44
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
45
45
  const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
46
46
  const timeline_layout_1 = require("../../helpers/timeline-layout");
47
47
  const use_keybinding_1 = require("../../helpers/use-keybinding");
48
+ const use_runtime_values_1 = require("../../helpers/use-runtime-values");
48
49
  const modals_1 = require("../../state/modals");
49
50
  const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
50
51
  const call_api_1 = require("../call-api");
@@ -64,6 +65,7 @@ const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-i
64
65
  const imperative_state_1 = require("./imperative-state");
65
66
  const save_sequence_prop_1 = require("./save-sequence-prop");
66
67
  const timeline_asset_link_1 = require("./timeline-asset-link");
68
+ const TimelineDuplicateCount_1 = require("./TimelineDuplicateCount");
67
69
  const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
68
70
  const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
69
71
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
@@ -71,7 +73,7 @@ const TimelineMediaInfo_1 = require("./TimelineMediaInfo");
71
73
  const TimelineRowChrome_1 = require("./TimelineRowChrome");
72
74
  const TimelineSelection_1 = require("./TimelineSelection");
73
75
  const TimelineSequenceName_1 = require("./TimelineSequenceName");
74
- const use_open_sequence_in_editor_1 = require("./use-open-sequence-in-editor");
76
+ const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
75
77
  const use_rename_sequence_1 = require("./use-rename-sequence");
76
78
  const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
77
79
  const use_timeline_expanded_tree_1 = require("./use-timeline-expanded-tree");
@@ -94,18 +96,29 @@ const effectDropHighlight = {
94
96
  };
95
97
  const SEQUENCE_REORDER_MIME_TYPE = 'application/remotion-sequence-reorder';
96
98
  let currentSequenceDrag = null;
97
- const TimelineSequenceExpandArrow = ({ disabled, isExpanded, nodePathInfo, onToggleExpand, sequence }) => {
98
- const { filteredTree } = (0, use_timeline_expanded_tree_1.useTimelineExpandedTree)({
99
+ const TimelineSequenceExpandArrowInner = ({ disabled, isExpanded, nodePathInfo, sequence }) => {
100
+ const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
101
+ const hasExpandableContent = (0, use_timeline_expanded_tree_1.useTimelineSequenceHasExpandableContent)({
99
102
  sequence,
100
103
  nodePathInfo,
101
- includeTextContent: false,
102
- includeSourceControls: false,
103
104
  });
104
- if (filteredTree.length === 0) {
105
+ const onToggleExpand = (0, react_1.useCallback)(() => toggleTrack(nodePathInfo), [nodePathInfo, toggleTrack]);
106
+ if (!hasExpandableContent) {
105
107
  return jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {});
106
108
  }
107
109
  return (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: onToggleExpand, label: "track properties", disabled: disabled }));
108
110
  };
111
+ const areTimelineSequenceExpandArrowPropsEqual = (first, second) => {
112
+ var _a, _b, _c, _d;
113
+ return (first.disabled === second.disabled &&
114
+ first.isExpanded === second.isExpanded &&
115
+ ((_a = first.sequence.controls) === null || _a === void 0 ? void 0 : _a.schema) === ((_b = second.sequence.controls) === null || _b === void 0 ? void 0 : _b.schema) &&
116
+ ((_c = first.sequence.controls) === null || _c === void 0 ? void 0 : _c.runtimeValues) ===
117
+ ((_d = second.sequence.controls) === null || _d === void 0 ? void 0 : _d.runtimeValues) &&
118
+ first.sequence.effects === second.sequence.effects &&
119
+ (0, are_sequence_node_path_infos_equal_1.areSequenceNodePathInfosEqual)(first.nodePathInfo, second.nodePathInfo));
120
+ };
121
+ const TimelineSequenceExpandArrow = react_1.default.memo(TimelineSequenceExpandArrowInner, areTimelineSequenceExpandArrowPropsEqual);
109
122
  const sequenceReorderWrapper = {
110
123
  position: 'relative',
111
124
  };
@@ -175,17 +188,16 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
175
188
  return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
176
189
  };
177
190
  const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
178
- var _a, _b, _c;
179
- var _d, _e;
180
- const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
191
+ var _a, _b;
192
+ var _c, _d, _e, _f;
193
+ const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
181
194
  const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
182
195
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
183
196
  const previewConnected = previewServerState.type === 'connected';
184
197
  const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
185
198
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
186
- const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
187
199
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
188
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
200
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
189
201
  const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
190
202
  const selectAsset = (0, use_select_asset_1.useSelectAsset)();
191
203
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
@@ -196,11 +208,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
196
208
  const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
197
209
  const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
198
210
  const [sequenceDropRejection, setSequenceDropRejection] = (0, react_1.useState)(null);
199
- const { canOpenInEditor, editorInfo, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
200
- const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
201
- location: originalLocation,
202
- root: window.remotion_cwd,
203
- }), [originalLocation]);
211
+ const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
204
212
  const validatedLocation = (0, react_1.useMemo)(() => {
205
213
  var _a;
206
214
  if (!originalLocation ||
@@ -225,6 +233,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
225
233
  const timelineDisplayName = sequence.displayName === '' && connectedCompositions.length === 1
226
234
  ? connectedCompositions[0].id
227
235
  : displayName;
236
+ const numberOfHiddenDuplicates = Math.max(0, ((_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) !== null && _d !== void 0 ? _d : 1) - 1);
228
237
  const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
229
238
  const nodePathKey = (0, react_1.useMemo)(() => nodePath ? remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
230
239
  const parentId = (_e = sequence.parent) !== null && _e !== void 0 ? _e : null;
@@ -234,7 +243,8 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
234
243
  const canHandleSequenceDrag = previewInteractive;
235
244
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
236
245
  const deleteDisabled = (0, react_1.useMemo)(() => !previewInteractive || !sequence.controls || !canDeleteFromSource, [previewInteractive, sequence.controls, canDeleteFromSource]);
237
- const duplicateDisabled = deleteDisabled;
246
+ const isProgrammaticallyDuplicated = ((_f = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) !== null && _f !== void 0 ? _f : 1) > 1;
247
+ const duplicateDisabled = deleteDisabled || isProgrammaticallyDuplicated;
238
248
  const disableInteractivityDisabled = !previewInteractive ||
239
249
  !sequence.showInTimeline ||
240
250
  !nodePath ||
@@ -470,22 +480,15 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
470
480
  ? sequence.src
471
481
  : null;
472
482
  const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
473
- const onToggleExpand = (0, react_1.useCallback)(() => {
474
- if (nodePathInfo === null) {
475
- return;
476
- }
477
- toggleTrack(nodePathInfo);
478
- }, [nodePathInfo, toggleTrack]);
479
483
  const codeHiddenStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.hidden;
484
+ const runtimeHidden = (0, use_runtime_values_1.useRuntimeValue)(sequence.controls, 'hidden');
480
485
  const isItemHidden = (0, react_1.useMemo)(() => {
481
- var _a;
482
486
  const propStatus = codeHiddenStatus && codeHiddenStatus.status === 'static'
483
487
  ? codeHiddenStatus.codeValue
484
488
  : undefined;
485
- const runtimeValue = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.currentRuntimeValueDotNotation.hidden;
486
- const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeValue);
489
+ const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeHidden);
487
490
  return effective !== null && effective !== void 0 ? effective : false;
488
- }, [codeHiddenStatus, (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.currentRuntimeValueDotNotation]);
491
+ }, [codeHiddenStatus, runtimeHidden]);
489
492
  const onToggleVisibility = (0, react_1.useCallback)((type) => {
490
493
  if (!sequence.controls ||
491
494
  !nodePath ||
@@ -593,7 +596,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
593
596
  const canRenameSelectedSequence = canRenameThisSequence &&
594
597
  selected &&
595
598
  selectedItems.length === 1 &&
596
- ((_b = selectedItems[0]) === null || _b === void 0 ? void 0 : _b.type) === 'sequence';
599
+ ((_a = selectedItems[0]) === null || _a === void 0 ? void 0 : _a.type) === 'sequence';
597
600
  const onCancelRenaming = (0, react_1.useCallback)(() => {
598
601
  setIsRenaming(false);
599
602
  }, []);
@@ -638,29 +641,23 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
638
641
  const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
639
642
  previewInteractive &&
640
643
  Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
641
- const canCrop = (0, react_1.useMemo)(() => {
642
- if (!previewInteractive ||
643
- !sequence.controls ||
644
- !nodePathInfo ||
645
- !propStatusesForOverride ||
646
- !(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
647
- return false;
648
- }
649
- const activeSchema = remotion_1.Internals.flattenActiveSchema(sequence.controls.schema, (key) => {
650
- var _a;
651
- return (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.currentRuntimeValueDotNotation[key];
652
- });
653
- return (0, selected_outline_types_1.canEditSelectedOutlineCrop)({
654
- schema: activeSchema,
655
- propStatuses: propStatusesForOverride,
656
- });
657
- }, [
658
- nodePathInfo,
659
- previewInteractive,
660
- propStatusesForOverride,
661
- sequence.controls,
662
- validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
663
- ]);
644
+ const canCrop = (0, use_runtime_values_1.useRuntimeValueSelector)({
645
+ controls: sequence.controls,
646
+ selector: (runtimeValues) => {
647
+ if (!previewInteractive ||
648
+ !sequence.controls ||
649
+ !nodePathInfo ||
650
+ !propStatusesForOverride ||
651
+ !(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
652
+ return false;
653
+ }
654
+ const activeSchema = remotion_1.Internals.flattenActiveSchema(sequence.controls.schema, (key) => runtimeValues[key]);
655
+ return (0, selected_outline_types_1.canEditSelectedOutlineCrop)({
656
+ schema: activeSchema,
657
+ propStatuses: propStatusesForOverride,
658
+ });
659
+ },
660
+ });
664
661
  const onAddEffect = (0, react_1.useCallback)(() => {
665
662
  if (!canAddEffect ||
666
663
  previewServerState.type !== 'connected' ||
@@ -714,15 +711,28 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
714
711
  return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
715
712
  assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
716
713
  canOpenInEditor,
714
+ codingAgentInfo,
717
715
  deleteDisabled,
718
716
  disableInteractivityDisabled,
719
717
  duplicateDisabled,
720
718
  editorInfo,
721
- fileLocation,
722
719
  includeSourceEditItems: (0, interactivity_enabled_1.isStudioInteractivityEnabled)(),
720
+ isProgrammaticallyDuplicated,
721
+ onConfigureApps: canConfigureApps
722
+ ? () => {
723
+ var _a;
724
+ var _b;
725
+ setSelectedModal({
726
+ type: 'settings',
727
+ initialTab: 'apps',
728
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
729
+ });
730
+ }
731
+ : null,
723
732
  onDeleteSequenceFromSource,
724
733
  onDisableSequenceInteractivity,
725
734
  onDuplicateSequenceFromSource,
735
+ openInCodingAgent,
726
736
  openInEditor,
727
737
  originalLocation,
728
738
  selectAsset,
@@ -751,7 +761,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
751
761
  type: 'item',
752
762
  id: 'crop',
753
763
  keyHint: null,
754
- label: 'Crop',
764
+ label: isProgrammaticallyDuplicated ? 'Crop all' : 'Crop',
755
765
  leftItem: null,
756
766
  disabled: false,
757
767
  onClick: onCrop,
@@ -786,13 +796,15 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
786
796
  }, [
787
797
  canAddEffect,
788
798
  canCrop,
799
+ canConfigureApps,
789
800
  canOpenInEditor,
790
801
  canRenameThisSequence,
802
+ codingAgentInfo,
791
803
  deleteDisabled,
792
804
  disableInteractivityDisabled,
793
805
  duplicateDisabled,
794
806
  editorInfo,
795
- fileLocation,
807
+ isProgrammaticallyDuplicated,
796
808
  mediaSrc,
797
809
  nodePath,
798
810
  nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
@@ -803,6 +815,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
803
815
  onDuplicateSequenceFromSource,
804
816
  onRenameSequence,
805
817
  onSelect,
818
+ openInCodingAgent,
806
819
  openInEditor,
807
820
  originalLocation,
808
821
  previewInteractive,
@@ -812,13 +825,14 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
812
825
  selectable,
813
826
  sequence,
814
827
  sequenceFrameOffset,
828
+ setSelectedModal,
815
829
  setPropStatuses,
816
830
  validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
817
831
  ]);
818
832
  const canDropEffect = previewInteractive &&
819
833
  nodePath !== null &&
820
834
  validatedLocation !== null &&
821
- ((_c = sequence.controls) === null || _c === void 0 ? void 0 : _c.supportsEffects) === true;
835
+ ((_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.supportsEffects) === true;
822
836
  const sequenceReorderLineStyle = (0, react_1.useMemo)(() => {
823
837
  if (sequenceDropIndicator !== 'before') {
824
838
  return null;
@@ -873,9 +887,11 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
873
887
  clientId: previewServerState.clientId,
874
888
  });
875
889
  }, [canDropEffect, nodePath, previewServerState, validatedLocation]);
876
- const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, onToggleExpand: onToggleExpand, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, hovered: hovered, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
890
+ const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, hovered: hovered, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
877
891
  jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: (0, TimelineSelection_1.getTimelineColor)(false, false), composition: connectedCompositions[0], style: connectedCompositionIconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
878
- ] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), mediaSrc ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
892
+ ] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), numberOfHiddenDuplicates > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
893
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineDuplicateCount_1.TimelineDuplicateCount, { count: numberOfHiddenDuplicates })
894
+ ] })) : null, mediaSrc ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
879
895
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }),
880
896
  " ",
881
897
  jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
@@ -195,7 +195,7 @@ const getTrimBeforePlaybackRate = (sequence) => {
195
195
  !playbackRateComponentIdentities.has(componentIdentity)) {
196
196
  return 1;
197
197
  }
198
- const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.currentRuntimeValueDotNotation.playbackRate;
198
+ const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.runtimeValues.getSnapshot().playbackRate;
199
199
  return typeof runtimePlaybackRate === 'number' ? runtimePlaybackRate : 1;
200
200
  };
201
201
  const isFromDraggableSequence = (sequence) => {
@@ -44,6 +44,7 @@ const TimelineExpandedTrackKeyframes_1 = require("./TimelineExpandedTrackKeyfram
44
44
  const TimelineSelection_1 = require("./TimelineSelection");
45
45
  const TimelineSequence_1 = require("./TimelineSequence");
46
46
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
47
+ const emptyConnectedCompositions = [];
47
48
  const TimelineTrackUnmemoized = ({ track }) => {
48
49
  var _a;
49
50
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
@@ -61,7 +62,7 @@ const TimelineTrackUnmemoized = ({ track }) => {
61
62
  previewServerConnected &&
62
63
  getIsExpanded(track.nodePathInfo);
63
64
  return (jsx_runtime_1.jsxs("div", { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: [
64
- jsx_runtime_1.jsxs("div", { style: layerStyle, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence, connectedCompositions: (_a = track.connectedCompositions) !== null && _a !== void 0 ? _a : [], nodePathInfo: track.nodePathInfo, sequenceFrameOffset: track.sequenceFrameOffset })
65
+ jsx_runtime_1.jsxs("div", { style: layerStyle, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence, connectedCompositions: (_a = track.connectedCompositions) !== null && _a !== void 0 ? _a : emptyConnectedCompositions, nodePathInfo: track.nodePathInfo, sequenceFrameOffset: track.sequenceFrameOffset })
65
66
  ] }), showExpandedKeyframes && track.nodePathInfo ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset })) : null] }));
66
67
  };
67
68
  exports.TimelineTrack = react_1.default.memo(TimelineTrackUnmemoized);
@@ -1,19 +1,22 @@
1
- import type { EditorPickerId, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
1
+ import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
2
2
  import type { ResolvedStackLocation, TSequence } from 'remotion';
3
3
  import type { ComboboxValue } from '../NewComposition/ComboBox';
4
4
  import type { TimelineAssetLinkInfo } from './timeline-asset-link';
5
- export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
5
+ export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, isProgrammaticallyDuplicated, includeSourceEditItems, codingAgentInfo, editorInfo, onConfigureApps, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInCodingAgent, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
6
6
  readonly assetLinkInfo: TimelineAssetLinkInfo | null;
7
7
  readonly canOpenInEditor: boolean;
8
8
  readonly deleteDisabled: boolean;
9
9
  readonly disableInteractivityDisabled: boolean;
10
10
  readonly duplicateDisabled: boolean;
11
- readonly fileLocation: string | null;
11
+ readonly isProgrammaticallyDuplicated: boolean;
12
12
  readonly includeSourceEditItems: boolean;
13
+ readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
13
14
  readonly editorInfo: GetDefaultEditorInfoResponse | null;
15
+ readonly onConfigureApps: (() => void) | null;
14
16
  readonly onDeleteSequenceFromSource: () => void;
15
17
  readonly onDisableSequenceInteractivity: () => void;
16
18
  readonly onDuplicateSequenceFromSource: () => void;
19
+ readonly openInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string, contextForAgents: string | null) => void;
17
20
  readonly openInEditor: (editorId: EditorPickerId | null) => void;
18
21
  readonly originalLocation: ResolvedStackLocation | null;
19
22
  readonly selectAsset: (src: string) => void;