@remotion/studio 4.0.506 → 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 (119) 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/components/AssetSelector.js +19 -4
  4. package/dist/components/AssetSelectorItem.js +2 -2
  5. package/dist/components/CodingAgentIcon.d.ts +4 -0
  6. package/dist/components/CodingAgentIcon.js +17 -0
  7. package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -3
  8. package/dist/components/ConfigureDefaultEditorModal.js +67 -77
  9. package/dist/components/ConfigureLicenseModal.d.ts +1 -4
  10. package/dist/components/ConfigureLicenseModal.js +89 -81
  11. package/dist/components/ContextMenu.js +10 -8
  12. package/dist/components/EditorContexts.js +6 -5
  13. package/dist/components/ExpandedTracksProvider.js +10 -53
  14. package/dist/components/InspectorLocationCopy.js +8 -8
  15. package/dist/components/InspectorOpenInEditor.d.ts +1 -0
  16. package/dist/components/InspectorOpenInEditor.js +39 -49
  17. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
  18. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
  19. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  20. package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
  21. package/dist/components/Menu/MenuSectionHeader.js +20 -0
  22. package/dist/components/Menu/SubMenu.js +13 -2
  23. package/dist/components/Menu/menu-tree-context.d.ts +3 -0
  24. package/dist/components/Menu/menu-tree-context.js +13 -0
  25. package/dist/components/NewComposition/ComboBox.d.ts +6 -1
  26. package/dist/components/NewComposition/MenuContent.js +27 -19
  27. package/dist/components/NewComposition/menu-typeahead.js +2 -2
  28. package/dist/components/Preview.js +29 -4
  29. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
  30. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
  31. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +3 -3
  32. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
  33. package/dist/components/RenderModal/ServerRenderModal.js +4 -0
  34. package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
  35. package/dist/components/RenderQueue/actions.d.ts +4 -2
  36. package/dist/components/RenderQueue/actions.js +4 -2
  37. package/dist/components/RenderQueue/index.js +3 -4
  38. package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
  39. package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
  40. package/dist/components/SegmentedControl.js +0 -1
  41. package/dist/components/SelectedOutlineElement.d.ts +14 -17
  42. package/dist/components/SelectedOutlineElement.js +112 -930
  43. package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
  44. package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
  45. package/dist/components/SelectedOutlineOverlay.d.ts +6 -13
  46. package/dist/components/SelectedOutlineOverlay.js +349 -864
  47. package/dist/components/SelectedOutlinePolygon.d.ts +25 -0
  48. package/dist/components/SelectedOutlinePolygon.js +359 -0
  49. package/dist/components/SelectedOutlineRenderer.d.ts +18 -0
  50. package/dist/components/SelectedOutlineRenderer.js +208 -0
  51. package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +16 -0
  52. package/dist/components/SelectedOutlineRotationCornerHandle.js +269 -0
  53. package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +16 -0
  54. package/dist/components/SelectedOutlineScaleEdgeLine.js +211 -0
  55. package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
  56. package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
  57. package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
  58. package/dist/components/SelectedOutlineTransformOriginHandle.js +286 -0
  59. package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
  60. package/dist/components/SelectedOutlineUvControls.js +57 -12
  61. package/dist/components/SettingsContext.d.ts +15 -0
  62. package/dist/components/SettingsContext.js +116 -0
  63. package/dist/components/SettingsModal.js +10 -4
  64. package/dist/components/SettingsModalFooter.d.ts +1 -3
  65. package/dist/components/SettingsModalFooter.js +4 -6
  66. package/dist/components/ShowOutlinesProvider.js +2 -3
  67. package/dist/components/Timeline/EasingEditorModal.js +66 -22
  68. package/dist/components/Timeline/Timeline.js +22 -5
  69. package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
  70. package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
  71. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
  72. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
  73. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
  74. package/dist/components/Timeline/TimelineSequence.js +28 -25
  75. package/dist/components/Timeline/TimelineSequenceItem.js +49 -27
  76. package/dist/components/Timeline/TimelineTrack.js +2 -1
  77. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
  78. package/dist/components/Timeline/get-sequence-context-menu-items.js +58 -53
  79. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +36 -4
  80. package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
  81. package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +20 -4
  82. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +4 -0
  83. package/dist/components/Timeline/use-timeline-expanded-tree.js +45 -1
  84. package/dist/components/get-open-in-menu-items.d.ts +12 -0
  85. package/dist/components/get-open-in-menu-items.js +83 -0
  86. package/dist/components/selected-outline-measurement.d.ts +2 -2
  87. package/dist/components/selected-outline-order.d.ts +12 -0
  88. package/dist/components/selected-outline-order.js +251 -0
  89. package/dist/components/selected-outline-types.d.ts +9 -10
  90. package/dist/components/svg-point-to-client-point.d.ts +2 -0
  91. package/dist/components/svg-point-to-client-point.js +10 -0
  92. package/dist/components/use-auto-save-config.d.ts +8 -0
  93. package/dist/components/use-auto-save-config.js +74 -0
  94. package/dist/components/use-default-editor-info.d.ts +1 -0
  95. package/dist/components/use-default-editor-info.js +10 -30
  96. package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
  97. package/dist/esm/{chunk-b49ec3nz.js → chunk-ptnd65a9.js} +10602 -9364
  98. package/dist/esm/internals.mjs +10601 -9363
  99. package/dist/esm/previewEntry.mjs +10462 -9224
  100. package/dist/esm/renderEntry.mjs +2 -2
  101. package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
  102. package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
  103. package/dist/helpers/calculate-timeline.js +3 -3
  104. package/dist/helpers/client-id.js +8 -1
  105. package/dist/helpers/format-file-location.d.ts +1 -1
  106. package/dist/helpers/format-file-location.js +3 -3
  107. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
  108. package/dist/helpers/open-in-editor.d.ts +1 -0
  109. package/dist/helpers/open-in-editor.js +5 -1
  110. package/dist/helpers/studio-runtime-config.js +3 -0
  111. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  112. package/dist/helpers/timeline-node-path-key.js +3 -1
  113. package/dist/helpers/use-asset-drag-events.d.ts +2 -1
  114. package/dist/helpers/use-asset-drag-events.js +14 -6
  115. package/dist/helpers/use-menu-structure.js +2 -2
  116. package/dist/helpers/use-runtime-values.d.ts +1 -3
  117. package/dist/state/timeline-sequence-hover.d.ts +9 -3
  118. package/dist/state/timeline-sequence-hover.js +63 -12
  119. package/package.json +12 -12
@@ -37,9 +37,9 @@ 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");
@@ -65,6 +65,7 @@ const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-i
65
65
  const imperative_state_1 = require("./imperative-state");
66
66
  const save_sequence_prop_1 = require("./save-sequence-prop");
67
67
  const timeline_asset_link_1 = require("./timeline-asset-link");
68
+ const TimelineDuplicateCount_1 = require("./TimelineDuplicateCount");
68
69
  const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
69
70
  const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
70
71
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
@@ -72,7 +73,7 @@ const TimelineMediaInfo_1 = require("./TimelineMediaInfo");
72
73
  const TimelineRowChrome_1 = require("./TimelineRowChrome");
73
74
  const TimelineSelection_1 = require("./TimelineSelection");
74
75
  const TimelineSequenceName_1 = require("./TimelineSequenceName");
75
- 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");
76
77
  const use_rename_sequence_1 = require("./use-rename-sequence");
77
78
  const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
78
79
  const use_timeline_expanded_tree_1 = require("./use-timeline-expanded-tree");
@@ -95,18 +96,29 @@ const effectDropHighlight = {
95
96
  };
96
97
  const SEQUENCE_REORDER_MIME_TYPE = 'application/remotion-sequence-reorder';
97
98
  let currentSequenceDrag = null;
98
- const TimelineSequenceExpandArrow = ({ disabled, isExpanded, nodePathInfo, onToggleExpand, sequence }) => {
99
- 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)({
100
102
  sequence,
101
103
  nodePathInfo,
102
- includeTextContent: false,
103
- includeSourceControls: false,
104
104
  });
105
- if (filteredTree.length === 0) {
105
+ const onToggleExpand = (0, react_1.useCallback)(() => toggleTrack(nodePathInfo), [nodePathInfo, toggleTrack]);
106
+ if (!hasExpandableContent) {
106
107
  return jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {});
107
108
  }
108
109
  return (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: onToggleExpand, label: "track properties", disabled: disabled }));
109
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);
110
122
  const sequenceReorderWrapper = {
111
123
  position: 'relative',
112
124
  };
@@ -177,14 +189,13 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
177
189
  };
178
190
  const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
179
191
  var _a, _b;
180
- var _c, _d;
192
+ var _c, _d, _e, _f;
181
193
  const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
182
194
  const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
183
195
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
184
196
  const previewConnected = previewServerState.type === 'connected';
185
197
  const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
186
198
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
187
- const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
188
199
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
189
200
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
190
201
  const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
@@ -197,11 +208,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
197
208
  const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
198
209
  const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
199
210
  const [sequenceDropRejection, setSequenceDropRejection] = (0, react_1.useState)(null);
200
- const { canOpenInEditor, editorInfo, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
201
- const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
202
- location: originalLocation,
203
- root: window.remotion_cwd,
204
- }), [originalLocation]);
211
+ const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
205
212
  const validatedLocation = (0, react_1.useMemo)(() => {
206
213
  var _a;
207
214
  if (!originalLocation ||
@@ -226,16 +233,18 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
226
233
  const timelineDisplayName = sequence.displayName === '' && connectedCompositions.length === 1
227
234
  ? connectedCompositions[0].id
228
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);
229
237
  const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
230
238
  const nodePathKey = (0, react_1.useMemo)(() => nodePath ? remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
231
- const parentId = (_d = sequence.parent) !== null && _d !== void 0 ? _d : null;
239
+ const parentId = (_e = sequence.parent) !== null && _e !== void 0 ? _e : null;
232
240
  const canReorderSequence = previewInteractive &&
233
241
  Boolean(nodePath && nodePathKey && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) &&
234
242
  (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) === 1;
235
243
  const canHandleSequenceDrag = previewInteractive;
236
244
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
237
245
  const deleteDisabled = (0, react_1.useMemo)(() => !previewInteractive || !sequence.controls || !canDeleteFromSource, [previewInteractive, sequence.controls, canDeleteFromSource]);
238
- 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;
239
248
  const disableInteractivityDisabled = !previewInteractive ||
240
249
  !sequence.showInTimeline ||
241
250
  !nodePath ||
@@ -471,12 +480,6 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
471
480
  ? sequence.src
472
481
  : null;
473
482
  const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
474
- const onToggleExpand = (0, react_1.useCallback)(() => {
475
- if (nodePathInfo === null) {
476
- return;
477
- }
478
- toggleTrack(nodePathInfo);
479
- }, [nodePathInfo, toggleTrack]);
480
483
  const codeHiddenStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.hidden;
481
484
  const runtimeHidden = (0, use_runtime_values_1.useRuntimeValue)(sequence.controls, 'hidden');
482
485
  const isItemHidden = (0, react_1.useMemo)(() => {
@@ -708,15 +711,28 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
708
711
  return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
709
712
  assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
710
713
  canOpenInEditor,
714
+ codingAgentInfo,
711
715
  deleteDisabled,
712
716
  disableInteractivityDisabled,
713
717
  duplicateDisabled,
714
718
  editorInfo,
715
- fileLocation,
716
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,
717
732
  onDeleteSequenceFromSource,
718
733
  onDisableSequenceInteractivity,
719
734
  onDuplicateSequenceFromSource,
735
+ openInCodingAgent,
720
736
  openInEditor,
721
737
  originalLocation,
722
738
  selectAsset,
@@ -745,7 +761,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
745
761
  type: 'item',
746
762
  id: 'crop',
747
763
  keyHint: null,
748
- label: 'Crop',
764
+ label: isProgrammaticallyDuplicated ? 'Crop all' : 'Crop',
749
765
  leftItem: null,
750
766
  disabled: false,
751
767
  onClick: onCrop,
@@ -780,13 +796,15 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
780
796
  }, [
781
797
  canAddEffect,
782
798
  canCrop,
799
+ canConfigureApps,
783
800
  canOpenInEditor,
784
801
  canRenameThisSequence,
802
+ codingAgentInfo,
785
803
  deleteDisabled,
786
804
  disableInteractivityDisabled,
787
805
  duplicateDisabled,
788
806
  editorInfo,
789
- fileLocation,
807
+ isProgrammaticallyDuplicated,
790
808
  mediaSrc,
791
809
  nodePath,
792
810
  nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
@@ -797,6 +815,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
797
815
  onDuplicateSequenceFromSource,
798
816
  onRenameSequence,
799
817
  onSelect,
818
+ openInCodingAgent,
800
819
  openInEditor,
801
820
  originalLocation,
802
821
  previewInteractive,
@@ -806,6 +825,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
806
825
  selectable,
807
826
  sequence,
808
827
  sequenceFrameOffset,
828
+ setSelectedModal,
809
829
  setPropStatuses,
810
830
  validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
811
831
  ]);
@@ -867,9 +887,11 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
867
887
  clientId: previewServerState.clientId,
868
888
  });
869
889
  }, [canDropEffect, nodePath, previewServerState, validatedLocation]);
870
- 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: [
871
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 })
872
- ] })) : 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: [
873
895
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }),
874
896
  " ",
875
897
  jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
@@ -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;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSequenceContextMenuItems = void 0;
4
- const react_1 = require("react");
5
4
  const no_react_1 = require("remotion/no-react");
6
- const editor_1 = require("../../icons/editor");
5
+ const format_file_location_1 = require("../../helpers/format-file-location");
6
+ const get_open_in_menu_items_1 = require("../get-open-in-menu-items");
7
7
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
8
  const timeline_asset_link_1 = require("./timeline-asset-link");
9
9
  const normalizeMenuDividers = (items) => {
@@ -24,13 +24,34 @@ const normalizeMenuDividers = (items) => {
24
24
  return normalized;
25
25
  };
26
26
  const interactiveSvgComponentIdentity = 'dev.remotion.remotion.Interactive.Svg';
27
- const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
28
- var _a, _b;
29
- var _c;
27
+ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, isProgrammaticallyDuplicated, includeSourceEditItems, codingAgentInfo, editorInfo, onConfigureApps, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInCodingAgent, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
28
+ var _a, _b, _c, _d;
29
+ var _e, _f, _g;
30
30
  const editorName = window.remotion_editorName;
31
- const { documentationLink } = sequence;
32
31
  const isInteractiveSvg = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) === interactiveSvgComponentIdentity;
33
- const installedEditors = (_c = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _c !== void 0 ? _c : [];
32
+ const installedEditors = (_e = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _e !== void 0 ? _e : [];
33
+ const defaultEditorId = (_f = (_b = installedEditors.find((editor) => editor.nameWithType === editorName)) === null || _b === void 0 ? void 0 : _b.id) !== null && _f !== void 0 ? _f : null;
34
+ const defaultCodingAgent = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.find((codingAgent) => codingAgent.id === codingAgentInfo.defaultCodingAgent);
35
+ const contextForAgents = (0, format_file_location_1.formatContextForAgents)({
36
+ location: originalLocation,
37
+ name: sequence.displayName || ((_c = sequence.controls) === null || _c === void 0 ? void 0 : _c.componentName) || null,
38
+ root: window.remotion_cwd,
39
+ });
40
+ const openInCodingAgentWithContext = (codingAgentId, codingAgentName) => {
41
+ openInCodingAgent(codingAgentId, codingAgentName, codingAgentId === 'copilot' ? null : contextForAgents);
42
+ };
43
+ const openInMenuItems = onConfigureApps
44
+ ? (0, get_open_in_menu_items_1.getOpenInMenuItems)({
45
+ codingAgentInfo,
46
+ editorDisabled: !canOpenInEditor || !originalLocation,
47
+ editorInfo,
48
+ excludeCodingAgentId: (_g = defaultCodingAgent === null || defaultCodingAgent === void 0 ? void 0 : defaultCodingAgent.id) !== null && _g !== void 0 ? _g : null,
49
+ excludeEditorId: defaultEditorId,
50
+ onConfigureApps,
51
+ onOpenInCodingAgent: openInCodingAgentWithContext,
52
+ onOpenInEditor: openInEditor,
53
+ })
54
+ : [];
34
55
  const items = [
35
56
  editorName
36
57
  ? {
@@ -46,53 +67,53 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
46
67
  value: 'open-in-editor',
47
68
  }
48
69
  : null,
49
- editorName && installedEditors.length > 0
70
+ defaultCodingAgent
50
71
  ? {
51
72
  type: 'item',
52
- id: 'open-in-another-editor',
73
+ id: 'open-in-default-coding-agent',
74
+ keyHint: null,
75
+ label: `Open in ${defaultCodingAgent.nameWithType}`,
76
+ leftItem: null,
77
+ disabled: false,
78
+ onClick: () => openInCodingAgentWithContext(defaultCodingAgent.id, defaultCodingAgent.nameWithType),
79
+ quickSwitcherLabel: null,
80
+ subMenu: null,
81
+ value: 'open-in-default-coding-agent',
82
+ }
83
+ : null,
84
+ onConfigureApps
85
+ ? {
86
+ type: 'item',
87
+ id: 'open-in-another-app',
53
88
  keyHint: null,
54
89
  label: 'Open in...',
55
90
  leftItem: null,
56
- disabled: !canOpenInEditor || !originalLocation,
91
+ disabled: false,
57
92
  onClick: () => undefined,
58
93
  quickSwitcherLabel: null,
59
94
  subMenu: {
60
- items: installedEditors.map((editor) => ({
61
- type: 'item',
62
- id: `open-in-${editor.id}`,
63
- keyHint: null,
64
- label: editor.name,
65
- leftItem: (0, react_1.createElement)(editor_1.EditorIcon, {
66
- editorId: editor.id,
67
- size: 18,
68
- }),
69
- disabled: false,
70
- onClick: () => openInEditor(editor.id),
71
- quickSwitcherLabel: null,
72
- subMenu: null,
73
- value: editor.id,
74
- })),
95
+ items: openInMenuItems,
75
96
  leaveLeftSpace: true,
76
97
  preselectIndex: false,
77
98
  },
78
- value: 'open-in-another-editor',
99
+ value: 'open-in-another-app',
79
100
  }
80
101
  : null,
81
102
  {
82
103
  type: 'item',
83
- id: 'copy-file-location',
104
+ id: 'copy-context-for-agents',
84
105
  keyHint: null,
85
- label: 'Copy file location',
106
+ label: 'Copy context for agents',
86
107
  leftItem: null,
87
- disabled: !fileLocation,
108
+ disabled: !contextForAgents,
88
109
  onClick: () => {
89
- if (!fileLocation) {
110
+ if (!contextForAgents) {
90
111
  return;
91
112
  }
92
113
  navigator.clipboard
93
- .writeText(fileLocation)
114
+ .writeText(contextForAgents)
94
115
  .then(() => {
95
- (0, NotificationCenter_1.showNotification)('Copied file location to clipboard', 1000);
116
+ (0, NotificationCenter_1.showNotification)('Copied context for agents', 1000);
96
117
  })
97
118
  .catch((err) => {
98
119
  (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
@@ -100,24 +121,8 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
100
121
  },
101
122
  quickSwitcherLabel: null,
102
123
  subMenu: null,
103
- value: 'copy-file-location',
124
+ value: 'copy-context-for-agents',
104
125
  },
105
- documentationLink
106
- ? {
107
- type: 'item',
108
- id: 'open-component-docs',
109
- keyHint: null,
110
- label: 'Open component docs',
111
- leftItem: null,
112
- disabled: false,
113
- onClick: () => {
114
- window.open(documentationLink, '_blank', 'noopener,noreferrer');
115
- },
116
- quickSwitcherLabel: null,
117
- subMenu: null,
118
- value: 'open-component-docs',
119
- }
120
- : null,
121
126
  assetLinkInfo
122
127
  ? {
123
128
  type: 'item',
@@ -134,7 +139,7 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
134
139
  value: 'show-asset',
135
140
  }
136
141
  : null,
137
- documentationLink || assetLinkInfo
142
+ assetLinkInfo
138
143
  ? {
139
144
  type: 'divider',
140
145
  id: 'sequence-link-divider',
@@ -147,7 +152,7 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
147
152
  keyHint: null,
148
153
  label: 'Copy SVG',
149
154
  leftItem: null,
150
- disabled: !((_b = sequence.refForOutline) === null || _b === void 0 ? void 0 : _b.current),
155
+ disabled: !((_d = sequence.refForOutline) === null || _d === void 0 ? void 0 : _d.current),
151
156
  onClick: () => {
152
157
  var _a;
153
158
  const svg = (_a = sequence.refForOutline) === null || _a === void 0 ? void 0 : _a.current;
@@ -202,7 +207,7 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
202
207
  keyHint: null,
203
208
  label: 'Duplicate',
204
209
  leftItem: null,
205
- disabled: duplicateDisabled,
210
+ disabled: duplicateDisabled || isProgrammaticallyDuplicated,
206
211
  onClick: onDuplicateSequenceFromSource,
207
212
  quickSwitcherLabel: null,
208
213
  subMenu: null,
@@ -220,7 +225,7 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
220
225
  type: 'item',
221
226
  id: 'delete-sequence',
222
227
  keyHint: null,
223
- label: 'Delete',
228
+ label: isProgrammaticallyDuplicated ? 'Delete all' : 'Delete',
224
229
  leftItem: null,
225
230
  disabled: deleteDisabled,
226
231
  onClick: onDeleteSequenceFromSource,
@@ -12,6 +12,35 @@ const get_node_keyframes_1 = require("./get-node-keyframes");
12
12
  const imperative_state_1 = require("./imperative-state");
13
13
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
14
14
  const TimelineSelection_1 = require("./TimelineSelection");
15
+ const areTimelineTreeLayoutsEqual = (first, second) => {
16
+ if (first.length !== second.length) {
17
+ return false;
18
+ }
19
+ return first.every((firstNode, index) => {
20
+ const secondNode = second[index];
21
+ if (firstNode.kind !== secondNode.kind ||
22
+ (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(firstNode.nodePathInfo) !==
23
+ (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(secondNode.nodePathInfo)) {
24
+ return false;
25
+ }
26
+ if (firstNode.kind === 'group' && secondNode.kind === 'group') {
27
+ return areTimelineTreeLayoutsEqual(firstNode.children, secondNode.children);
28
+ }
29
+ if (firstNode.kind !== 'field' || secondNode.kind !== 'field') {
30
+ return false;
31
+ }
32
+ if (firstNode.field === null || secondNode.field === null) {
33
+ return firstNode.field === secondNode.field;
34
+ }
35
+ return (firstNode.field.kind === secondNode.field.kind &&
36
+ firstNode.field.key === secondNode.field.key &&
37
+ firstNode.field.typeName === secondNode.field.typeName &&
38
+ firstNode.field.rowHeight === secondNode.field.rowHeight &&
39
+ (firstNode.field.kind !== 'effect-field' ||
40
+ (secondNode.field.kind === 'effect-field' &&
41
+ firstNode.field.effectIndex === secondNode.field.effectIndex)));
42
+ });
43
+ };
15
44
  const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
16
45
  var _a;
17
46
  if (node.kind !== 'field' || node.field === null) {
@@ -38,8 +67,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
38
67
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
39
68
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
40
69
  const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
41
- const runtimeValues = (0, use_runtime_values_1.useRuntimeValues)(sequence.controls);
42
- const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
70
+ const selectTree = (0, react_1.useCallback)((runtimeValues) => (0, timeline_layout_1.buildTimelineTree)({
43
71
  sequence,
44
72
  nodePathInfo,
45
73
  getDragOverrides,
@@ -49,13 +77,17 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
49
77
  includeSourceControls: false,
50
78
  runtimeValues,
51
79
  }), [
80
+ sequence,
52
81
  propStatuses,
53
82
  getDragOverrides,
54
83
  getEffectDragOverrides,
55
84
  nodePathInfo,
56
- sequence,
57
- runtimeValues,
58
85
  ]);
86
+ const tree = (0, use_runtime_values_1.useRuntimeValueSelector)({
87
+ controls: sequence.controls,
88
+ selector: selectTree,
89
+ isEqual: areTimelineTreeLayoutsEqual,
90
+ });
59
91
  const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
60
92
  const filteredTree = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
61
93
  nodes: tree,
@@ -1,8 +1,11 @@
1
1
  import type { EditorPickerId } from '@remotion/studio-shared';
2
2
  import type { TSequence } from 'remotion';
3
- export declare const useOpenSequenceInEditor: (sequence: TSequence) => {
3
+ export declare const useOpenSequenceInApps: (sequence: TSequence) => {
4
4
  canOpenInEditor: boolean;
5
+ canConfigureApps: boolean;
6
+ codingAgentInfo: import("@remotion/studio-shared").GetDefaultCodingAgentInfoResponse | null;
5
7
  editorInfo: import("@remotion/studio-shared").GetDefaultEditorInfoResponse | null;
8
+ openInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string, contextForAgents: string | null) => Promise<void>;
6
9
  openInEditor: (editorId: EditorPickerId | null) => Promise<void>;
7
10
  originalLocation: import("remotion").ResolvedStackLocation | null;
8
11
  };
@@ -1,17 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOpenSequenceInEditor = void 0;
3
+ exports.useOpenSequenceInApps = void 0;
4
4
  const react_1 = require("react");
5
5
  const client_id_1 = require("../../helpers/client-id");
6
6
  const open_in_editor_1 = require("../../helpers/open-in-editor");
7
7
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
8
  const use_default_editor_info_1 = require("../use-default-editor-info");
9
9
  const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
10
- const useOpenSequenceInEditor = (sequence) => {
10
+ const useOpenSequenceInApps = (sequence) => {
11
11
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
12
12
  const previewConnected = previewServerState.type === 'connected';
13
13
  const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
14
- const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
14
+ const editorPickerAvailable = (0, use_default_editor_info_1.canUseEditorPicker)(previewConnected);
15
+ const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)(editorPickerAvailable);
16
+ const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(editorPickerAvailable);
15
17
  const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
16
18
  const openInEditor = (0, react_1.useCallback)(async (editorId) => {
17
19
  if (!canOpenInEditor || !originalLocation) {
@@ -24,11 +26,25 @@ const useOpenSequenceInEditor = (sequence) => {
24
26
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
25
27
  }
26
28
  }, [canOpenInEditor, originalLocation]);
29
+ const openInCodingAgent = (0, react_1.useCallback)(async (codingAgentId, codingAgentName, contextForAgents) => {
30
+ try {
31
+ const response = await (0, open_in_editor_1.openInCodingAgent)(codingAgentId, contextForAgents);
32
+ if (!response.success) {
33
+ (0, NotificationCenter_1.showNotification)(`Could not open ${codingAgentName}`, 2000);
34
+ }
35
+ }
36
+ catch (err) {
37
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
38
+ }
39
+ }, []);
27
40
  return {
28
41
  canOpenInEditor,
42
+ canConfigureApps: editorPickerAvailable,
43
+ codingAgentInfo,
29
44
  editorInfo,
45
+ openInCodingAgent,
30
46
  openInEditor,
31
47
  originalLocation,
32
48
  };
33
49
  };
34
- exports.useOpenSequenceInEditor = useOpenSequenceInEditor;
50
+ exports.useOpenSequenceInApps = useOpenSequenceInApps;
@@ -1,5 +1,9 @@
1
1
  import { type TSequence } from 'remotion';
2
2
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
+ export declare const useTimelineSequenceHasExpandableContent: ({ sequence, nodePathInfo, }: {
4
+ readonly sequence: TSequence;
5
+ readonly nodePathInfo: SequenceNodePathInfo;
6
+ }) => boolean;
3
7
  export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }: {
4
8
  readonly sequence: TSequence;
5
9
  readonly nodePathInfo: SequenceNodePathInfo;