@remotion/studio 4.0.526 → 4.0.527

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 (98) hide show
  1. package/dist/components/Canvas.js +88 -26
  2. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  3. package/dist/components/CanvasOrLoading.js +10 -2
  4. package/dist/components/CompositionSelectorItem.js +1 -0
  5. package/dist/components/CurrentAsset.js +2 -1
  6. package/dist/components/InitialCompositionLoader.js +1 -1
  7. package/dist/components/InlineDropdown.js +26 -2
  8. package/dist/components/InlineEditableTitle.js +1 -0
  9. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -0
  10. package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
  11. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  12. package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
  13. package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
  14. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +41 -1
  15. package/dist/components/InspectorPanel/common.js +1 -0
  16. package/dist/components/InspectorPanel/styles.js +2 -0
  17. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  18. package/dist/components/InspectorSourceLocation.js +3 -0
  19. package/dist/components/MenuBuildIndicator.js +1 -0
  20. package/dist/components/NewComposition/CancelButton.js +1 -1
  21. package/dist/components/Preview.js +3 -0
  22. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  23. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  24. package/dist/components/RadioButton.js +1 -0
  25. package/dist/components/RenderModal/DataEditor.js +4 -1
  26. package/dist/components/RenderQueue/CaptionQueueItem.js +5 -2
  27. package/dist/components/RenderQueue/CaptionQueueProcessor.js +35 -8
  28. package/dist/components/RenderQueue/VideoMattingQueueItem.js +1 -0
  29. package/dist/components/RenderQueue/caption-job-types.d.ts +6 -0
  30. package/dist/components/RenderQueue/index.js +1 -0
  31. package/dist/components/RendersTab.js +2 -0
  32. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  33. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  34. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  35. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  36. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  37. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  38. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  39. package/dist/components/Timeline/TimelineExpandedRow.js +1 -0
  40. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  41. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  42. package/dist/components/Timeline/TimelineSequence.js +26 -0
  43. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  44. package/dist/components/Timeline/TimelineSequenceItem.js +28 -0
  45. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  46. package/dist/components/Timeline/TimelineViewport.js +10 -1
  47. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  48. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  49. package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
  50. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  51. package/dist/components/Timeline/split-selected-timeline-item.js +58 -35
  52. package/dist/components/TimelineCombobox.js +1 -0
  53. package/dist/components/Transcription/TranscriptionModal.js +16 -11
  54. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  55. package/dist/components/WebMcp.js +1 -0
  56. package/dist/components/composition-drop-preview.d.ts +9 -2
  57. package/dist/components/composition-drop-preview.js +7 -4
  58. package/dist/components/composition-menu-items.js +4 -4
  59. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  60. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  61. package/dist/components/get-open-in-menu-items.js +7 -7
  62. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  63. package/dist/components/keyboard-shortcuts.js +3 -1
  64. package/dist/components/public-output-name.d.ts +1 -0
  65. package/dist/components/public-output-name.js +7 -3
  66. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-npa6szn1.mjs} +39 -8
  67. package/dist/esm/{LazyModels-nk7py0zt.mjs → LazyModels-nh3c8h9p.mjs} +4 -3
  68. package/dist/esm/{LazyModels-mtggyjye.mjs → LazyModels-rr5v8h5y.mjs} +4 -3
  69. package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-79m5wgcj.mjs} +25 -17
  70. package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-31pew0xj.mjs} +9 -6
  71. package/dist/esm/index-21hxsfaa.mjs +239 -0
  72. package/dist/esm/{index-0gewwxse.mjs → index-4zen9prq.mjs} +2293 -2203
  73. package/dist/esm/index-5t2dwxsk.mjs +530 -0
  74. package/dist/esm/{index-5gd8k9yv.mjs → index-614tdz2q.mjs} +1 -1
  75. package/dist/esm/{index-cdy8v54v.mjs → index-9xxg6218.mjs} +20 -541
  76. package/dist/esm/{index-5bfxbpca.mjs → index-ac5550e7.mjs} +1 -1
  77. package/dist/esm/{index-eb5txqp6.mjs → index-e855w59j.mjs} +8 -86
  78. package/dist/esm/{index-4dsz9035.mjs → index-n5gmcvhz.mjs} +1 -1
  79. package/dist/esm/{index-bs39wngg.mjs → index-ppspzgn9.mjs} +3134 -2994
  80. package/dist/esm/{index-g7k2dvar.mjs → index-r0ejh5sy.mjs} +1 -1
  81. package/dist/esm/index-r1gr3j3a.mjs +80 -0
  82. package/dist/esm/{index-x40wwfmt.mjs → index-s7qa3xbw.mjs} +6 -4
  83. package/dist/esm/{index-f97r9e2g.mjs → index-vxwg66ar.mjs} +5 -3
  84. package/dist/esm/index.mjs +3 -2
  85. package/dist/esm/internals.mjs +10 -7
  86. package/dist/esm/previewEntry.mjs +10 -7
  87. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-qrp05g62.mjs} +1 -1
  88. package/dist/helpers/copy-text.js +1 -16
  89. package/dist/helpers/hoverable.js +2 -1
  90. package/dist/helpers/open-in-editor.js +1 -1
  91. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  92. package/dist/helpers/use-keybinding.d.ts +1 -1
  93. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  94. package/dist/helpers/use-menu-structure.js +15 -9
  95. package/dist/state/modals.d.ts +5 -0
  96. package/dist/state/timeline-zoom.js +4 -0
  97. package/package.json +19 -19
  98. package/dist/components/delete-jsx-node-api.d.ts +0 -2
@@ -52,6 +52,7 @@ const AudioWaveform_1 = require("../AudioWaveform");
52
52
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
53
53
  const ContextMenu_1 = require("../ContextMenu");
54
54
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
55
+ const SequencePropsSubscriptionProvider_1 = require("../SequencePropsSubscriptionProvider");
55
56
  const use_select_asset_1 = require("../use-select-asset");
56
57
  const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
57
58
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
@@ -61,6 +62,7 @@ const get_timeline_media_start_frame_1 = require("./get-timeline-media-start-fra
61
62
  const get_timeline_sequence_visible_layout_1 = require("./get-timeline-sequence-visible-layout");
62
63
  const imperative_state_1 = require("./imperative-state");
63
64
  const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
65
+ const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
64
66
  const timeline_asset_link_1 = require("./timeline-asset-link");
65
67
  const TimelineImageInfo_1 = require("./TimelineImageInfo");
66
68
  const TimelineSelection_1 = require("./TimelineSelection");
@@ -242,6 +244,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
242
244
  var _f, _g, _h, _j, _k, _l, _m;
243
245
  const video = remotion_1.Internals.useVideo();
244
246
  const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
247
+ const overrideIdToNodePathMappingsRef = (0, react_1.useContext)(SequencePropsSubscriptionProvider_1.OverrideIdToNodePathMappingsRefContext);
245
248
  const renderWindow = (0, react_1.useContext)(TimelineViewport_1.TimelineViewportContext);
246
249
  const mediaDurationDragLimitsRegistry = (0, react_1.useContext)(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceMediaDurationDragLimitsContext);
247
250
  const dragAwareDoubleClick = (0, react_1.useMemo)(() => (0, drag_aware_double_click_1.createDragAwareDoubleClickTracker)(), []);
@@ -377,6 +380,26 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
377
380
  }
378
381
  (0, duplicate_selected_timeline_item_1.duplicateSequencesFromSource)(selectedSequenceNodePathInfos, confirm).catch(() => undefined);
379
382
  }, [confirm, previewInteractive, selectedSequenceNodePathInfos]);
383
+ const onSplitSelectedSequences = (0, react_1.useCallback)(() => {
384
+ var _a;
385
+ if (!previewInteractive || selectedSequenceNodePathInfos === null) {
386
+ return;
387
+ }
388
+ (_a = (0, split_selected_timeline_item_1.splitSelectedTimelineItems)({
389
+ selections: selectedItems,
390
+ sequences,
391
+ overrideIdsToNodePaths: overrideIdToNodePathMappingsRef.current,
392
+ propStatuses,
393
+ splitFrame: (0, imperative_state_1.getCurrentFrame)(),
394
+ })) === null || _a === void 0 ? void 0 : _a.catch(() => undefined);
395
+ }, [
396
+ overrideIdToNodePathMappingsRef,
397
+ previewInteractive,
398
+ propStatuses,
399
+ selectedItems,
400
+ selectedSequenceNodePathInfos,
401
+ sequences,
402
+ ]);
380
403
  const onDeleteSequenceFromSource = (0, react_1.useCallback)(() => {
381
404
  if (!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) ||
382
405
  !nodePath ||
@@ -433,8 +456,10 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
433
456
  return (0, get_sequence_context_menu_items_1.getMultiSequenceContextMenuItems)({
434
457
  deleteDisabled: !previewInteractive,
435
458
  duplicateDisabled: !previewInteractive,
459
+ splitDisabled: !previewInteractive,
436
460
  onDeleteSelectedSequences,
437
461
  onDuplicateSelectedSequences,
462
+ onSplitSelectedSequences,
438
463
  });
439
464
  }
440
465
  const splitMenuItem = (0, get_sequence_split_menu_item_1.getSequenceSplitMenuItem)({
@@ -513,6 +538,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
513
538
  onDisableSequenceInteractivity,
514
539
  onDuplicateSequenceFromSource,
515
540
  onDuplicateSelectedSequences,
541
+ onSplitSelectedSequences,
516
542
  openInCodingAgent,
517
543
  openInEditor,
518
544
  originalLocation,
@@ -15,6 +15,7 @@ const relativeFrameStyle = {
15
15
  whiteSpace: 'nowrap',
16
16
  pointerEvents: 'none',
17
17
  userSelect: 'none',
18
+ WebkitUserSelect: 'none',
18
19
  };
19
20
  const snowflakeStyle = {
20
21
  flexShrink: 0,
@@ -62,6 +62,7 @@ const layout_1 = require("../layout");
62
62
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
63
63
  const reorder_sequence_api_1 = require("../reorder-sequence-api");
64
64
  const selected_outline_types_1 = require("../selected-outline-types");
65
+ const SequencePropsSubscriptionProvider_1 = require("../SequencePropsSubscriptionProvider");
65
66
  const use_select_asset_1 = require("../use-select-asset");
66
67
  const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
67
68
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
@@ -69,6 +70,7 @@ const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-i
69
70
  const get_sequence_split_menu_item_1 = require("./get-sequence-split-menu-item");
70
71
  const imperative_state_1 = require("./imperative-state");
71
72
  const save_sequence_prop_1 = require("./save-sequence-prop");
73
+ const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
72
74
  const timeline_asset_link_1 = require("./timeline-asset-link");
73
75
  const timeline_refs_1 = require("./timeline-refs");
74
76
  const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
@@ -175,6 +177,9 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
175
177
  var _a, _b;
176
178
  var _c, _d, _e;
177
179
  const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
180
+ const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
181
+ const overrideIdToNodePathMappingsRef = (0, react_1.useContext)(SequencePropsSubscriptionProvider_1.OverrideIdToNodePathMappingsRefContext);
182
+ const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
178
183
  const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
179
184
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
180
185
  const previewConnected = previewServerState.type === 'connected';
@@ -257,6 +262,26 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
257
262
  }
258
263
  (0, duplicate_selected_timeline_item_1.duplicateSequencesFromSource)(selectedSequenceNodePathInfos, confirm).catch(() => undefined);
259
264
  }, [confirm, previewInteractive, selectedSequenceNodePathInfos]);
265
+ const onSplitSelectedSequences = (0, react_1.useCallback)(() => {
266
+ var _a;
267
+ if (!previewInteractive || selectedSequenceNodePathInfos === null) {
268
+ return;
269
+ }
270
+ (_a = (0, split_selected_timeline_item_1.splitSelectedTimelineItems)({
271
+ selections: selectedItems,
272
+ sequences: sequencesRef.current,
273
+ overrideIdsToNodePaths: overrideIdToNodePathMappingsRef.current,
274
+ propStatuses: propStatusesRef.current,
275
+ splitFrame: (0, imperative_state_1.getCurrentFrame)(),
276
+ })) === null || _a === void 0 ? void 0 : _a.catch(() => undefined);
277
+ }, [
278
+ overrideIdToNodePathMappingsRef,
279
+ previewInteractive,
280
+ propStatusesRef,
281
+ selectedItems,
282
+ selectedSequenceNodePathInfos,
283
+ sequencesRef,
284
+ ]);
260
285
  const onDeleteSequenceFromSource = (0, react_1.useCallback)(() => {
261
286
  if (deleteDisabled ||
262
287
  !(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) ||
@@ -806,8 +831,10 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
806
831
  return (0, get_sequence_context_menu_items_1.getMultiSequenceContextMenuItems)({
807
832
  deleteDisabled: !previewInteractive,
808
833
  duplicateDisabled: !previewInteractive,
834
+ splitDisabled: !previewInteractive,
809
835
  onDeleteSelectedSequences,
810
836
  onDuplicateSelectedSequences,
837
+ onSplitSelectedSequences,
811
838
  });
812
839
  }
813
840
  const splitMenuItem = (0, get_sequence_split_menu_item_1.getSequenceSplitMenuItem)({
@@ -964,6 +991,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
964
991
  onDisableSequenceInteractivity,
965
992
  onDuplicateSequenceFromSource,
966
993
  onDuplicateSelectedSequences,
994
+ onSplitSelectedSequences,
967
995
  onRenameSequence,
968
996
  onSelect,
969
997
  openInCodingAgent,
@@ -4,6 +4,7 @@ type TimelineRenderWindow = {
4
4
  readonly width: number;
5
5
  };
6
6
  export declare const TimelineViewportContext: React.Context<TimelineRenderWindow | null>;
7
+ export declare const syncTimelineViewport: () => void;
7
8
  export declare const getTimelineRenderWindow: (scrollable: HTMLDivElement) => TimelineRenderWindow;
8
9
  export declare const TimelineViewportProvider: React.FC<{
9
10
  readonly children: React.ReactNode;
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimelineViewportProvider = exports.getTimelineRenderWindow = exports.TimelineViewportContext = void 0;
3
+ exports.TimelineViewportProvider = exports.getTimelineRenderWindow = exports.syncTimelineViewport = exports.TimelineViewportContext = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  exports.TimelineViewportContext = (0, react_1.createContext)(null);
7
+ let updateTimelineViewport = null;
8
+ const syncTimelineViewport = () => {
9
+ updateTimelineViewport === null || updateTimelineViewport === void 0 ? void 0 : updateTimelineViewport();
10
+ };
11
+ exports.syncTimelineViewport = syncTimelineViewport;
7
12
  const getTimelineRenderWindow = (scrollable) => {
8
13
  const viewportWidth = scrollable.clientWidth;
9
14
  if (viewportWidth === 0) {
@@ -41,6 +46,7 @@ const TimelineViewportProvider = ({ children, scrollable }) => {
41
46
  (0, react_1.useLayoutEffect)(() => {
42
47
  let element = null;
43
48
  let resizeObserver = null;
49
+ updateTimelineViewport = update;
44
50
  const animationFrame = requestAnimationFrame(() => {
45
51
  element = scrollable.current;
46
52
  if (!element) {
@@ -52,6 +58,9 @@ const TimelineViewportProvider = ({ children, scrollable }) => {
52
58
  element.addEventListener('scroll', update);
53
59
  });
54
60
  return () => {
61
+ if (updateTimelineViewport === update) {
62
+ updateTimelineViewport = null;
63
+ }
55
64
  cancelAnimationFrame(animationFrame);
56
65
  resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
57
66
  element === null || element === void 0 ? void 0 : element.removeEventListener('scroll', update);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteSelectedTimelineItems = exports.getTimelineSelectionAfterDeletingItems = exports.deleteSequencesFromSource = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
6
- const delete_jsx_node_api_1 = require("../delete-jsx-node-api");
6
+ const delete_jsx_nodes_api_1 = require("../delete-jsx-nodes-api");
7
7
  const effect_operations_api_1 = require("../effect-operations-api");
8
8
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
9
9
  const delete_selected_keyframe_1 = require("./delete-selected-keyframe");
@@ -39,7 +39,7 @@ const deleteSequencesFromSource = async (nodePathInfos, confirm) => {
39
39
  if (!(await confirmDeletingDuplicatedSequences(nodePathInfos, confirm))) {
40
40
  return false;
41
41
  }
42
- return (0, delete_jsx_node_api_1.deleteJsxNode)({
42
+ return (0, delete_jsx_nodes_api_1.deleteJsxNodes)({
43
43
  nodes: nodePathInfos.map((nodePathInfo) => {
44
44
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
45
45
  return {
@@ -3,11 +3,13 @@ import type { ResolvedStackLocation, TSequence } from 'remotion';
3
3
  import type { ComboboxValue } from '../NewComposition/ComboBox';
4
4
  import type { TimelineAssetLinkInfo } from './timeline-asset-link';
5
5
  export declare const findCopyableFrameElement: (element: Element | null) => Element | null;
6
- export declare const getMultiSequenceContextMenuItems: ({ deleteDisabled, duplicateDisabled, onDeleteSelectedSequences, onDuplicateSelectedSequences, }: {
6
+ export declare const getMultiSequenceContextMenuItems: ({ deleteDisabled, duplicateDisabled, splitDisabled, onDeleteSelectedSequences, onDuplicateSelectedSequences, onSplitSelectedSequences, }: {
7
7
  readonly deleteDisabled: boolean;
8
8
  readonly duplicateDisabled: boolean;
9
+ readonly splitDisabled: boolean;
9
10
  readonly onDeleteSelectedSequences: () => void;
10
11
  readonly onDuplicateSelectedSequences: () => void;
12
+ readonly onSplitSelectedSequences: () => void;
11
13
  }) => ComboboxValue[];
12
14
  export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, copyImageElement, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, isProgrammaticallyDuplicated, includeSourceEditItems, codingAgentInfo, editorInfo, onConfigureApps, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInCodingAgent, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
13
15
  readonly assetLinkInfo: TimelineAssetLinkInfo | null;
@@ -96,7 +96,7 @@ const copyImageToClipboard = async (element) => {
96
96
  }),
97
97
  ]);
98
98
  };
99
- const getMultiSequenceContextMenuItems = ({ deleteDisabled, duplicateDisabled, onDeleteSelectedSequences, onDuplicateSelectedSequences, }) => {
99
+ const getMultiSequenceContextMenuItems = ({ deleteDisabled, duplicateDisabled, splitDisabled, onDeleteSelectedSequences, onDuplicateSelectedSequences, onSplitSelectedSequences, }) => {
100
100
  return [
101
101
  {
102
102
  type: 'item',
@@ -110,6 +110,18 @@ const getMultiSequenceContextMenuItems = ({ deleteDisabled, duplicateDisabled, o
110
110
  subMenu: null,
111
111
  value: 'duplicate-selected-sequences',
112
112
  },
113
+ {
114
+ type: 'item',
115
+ id: 'split-selected-sequences',
116
+ keyHint: null,
117
+ label: 'Split selected at playhead',
118
+ leftItem: null,
119
+ disabled: splitDisabled,
120
+ onClick: onSplitSelectedSequences,
121
+ quickSwitcherLabel: null,
122
+ subMenu: null,
123
+ value: 'split-selected-sequences',
124
+ },
113
125
  {
114
126
  type: 'divider',
115
127
  id: 'duplicate-delete-selected-sequences-divider',
@@ -17,20 +17,23 @@ export declare const splitTimelineSequenceFromSource: ({ nodePathInfo, splitFram
17
17
  nodePathInfo: SequenceNodePathInfo;
18
18
  splitFrame: number;
19
19
  }) => Promise<boolean>;
20
- export declare const shouldHandleTimelineDuplicateShortcut: ({ shiftKey, }: {
21
- readonly shiftKey: boolean;
22
- }) => boolean;
23
- export declare const shouldHandleTimelineSplitShortcut: ({ shiftKey, }: {
24
- readonly shiftKey: boolean;
25
- }) => boolean;
26
- export declare const splitSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequence, }: {
20
+ export declare const splitTimelineSequencesFromSource: ({ sequences, }: {
21
+ sequences: {
22
+ nodePathInfo: SequenceNodePathInfo;
23
+ splitFrame: number;
24
+ }[];
25
+ }) => Promise<boolean>;
26
+ export declare const splitSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequences, notify, }: {
27
27
  selections: readonly import("@remotion/canvas").CanvasSelectionItem[];
28
28
  sequences: TSequence[];
29
29
  overrideIdsToNodePaths: OverrideIdToNodePaths;
30
30
  propStatuses: PropStatuses | undefined;
31
31
  splitFrame: number;
32
- splitSequence?: ((options: {
33
- nodePathInfo: SequenceNodePathInfo;
34
- splitFrame: number;
32
+ splitSequences?: ((options: {
33
+ sequences: {
34
+ nodePathInfo: SequenceNodePathInfo;
35
+ splitFrame: number;
36
+ }[];
35
37
  }) => Promise<boolean>) | undefined;
38
+ notify?: ((message: string, durationInMs: number) => void) | undefined;
36
39
  }) => Promise<boolean> | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splitSelectedTimelineItems = exports.shouldHandleTimelineSplitShortcut = exports.shouldHandleTimelineDuplicateShortcut = exports.splitTimelineSequenceFromSource = exports.getTimelineSequenceSplitEligibility = void 0;
3
+ exports.splitSelectedTimelineItems = exports.splitTimelineSequencesFromSource = exports.splitTimelineSequenceFromSource = exports.getTimelineSequenceSplitEligibility = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const remotion_1 = require("remotion");
6
6
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
@@ -88,12 +88,22 @@ const getTimelineSequenceSplitEligibility = ({ selection, sequence, splitFrame,
88
88
  };
89
89
  exports.getTimelineSequenceSplitEligibility = getTimelineSequenceSplitEligibility;
90
90
  const splitTimelineSequenceFromSource = ({ nodePathInfo, splitFrame, }) => {
91
- const nodePath = nodePathInfo.sequenceSubscriptionKey;
91
+ return (0, exports.splitTimelineSequencesFromSource)({
92
+ sequences: [{ nodePathInfo, splitFrame }],
93
+ });
94
+ };
95
+ exports.splitTimelineSequenceFromSource = splitTimelineSequenceFromSource;
96
+ const splitTimelineSequencesFromSource = ({ sequences, }) => {
92
97
  return (0, split_jsx_sequence_api_1.splitJsxSequence)({
93
- fileName: nodePath.absolutePath,
94
- nodePath: nodePath.nodePath,
95
- sequenceKeys: nodePath.sequenceKeys,
96
- splitFrame,
98
+ sequences: sequences.map(({ nodePathInfo, splitFrame }) => {
99
+ const nodePath = nodePathInfo.sequenceSubscriptionKey;
100
+ return {
101
+ fileName: nodePath.absolutePath,
102
+ nodePath: nodePath.nodePath,
103
+ sequenceKeys: nodePath.sequenceKeys,
104
+ splitFrame,
105
+ };
106
+ }),
97
107
  })
98
108
  .then((result) => {
99
109
  if (result.success) {
@@ -107,41 +117,54 @@ const splitTimelineSequenceFromSource = ({ nodePathInfo, splitFrame, }) => {
107
117
  return false;
108
118
  });
109
119
  };
110
- exports.splitTimelineSequenceFromSource = splitTimelineSequenceFromSource;
111
- const shouldHandleTimelineDuplicateShortcut = ({ shiftKey, }) => !shiftKey;
112
- exports.shouldHandleTimelineDuplicateShortcut = shouldHandleTimelineDuplicateShortcut;
113
- const shouldHandleTimelineSplitShortcut = ({ shiftKey, }) => shiftKey;
114
- exports.shouldHandleTimelineSplitShortcut = shouldHandleTimelineSplitShortcut;
115
- const splitSelectedTimelineItems = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequence = exports.splitTimelineSequenceFromSource, }) => {
120
+ exports.splitTimelineSequencesFromSource = splitTimelineSequencesFromSource;
121
+ const splitSelectedTimelineItems = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequences = exports.splitTimelineSequencesFromSource, notify = NotificationCenter_1.showNotification, }) => {
116
122
  var _a;
117
- if (selections.length !== 1) {
123
+ if (selections.length === 0 ||
124
+ selections.some((selection) => selection.type !== 'sequence')) {
118
125
  return null;
119
126
  }
120
- const [selection] = selections;
121
- if (selection.type !== 'sequence') {
122
- return null;
127
+ const eligible = [];
128
+ const skippedReasons = [];
129
+ for (const selection of selections) {
130
+ if (selection.type !== 'sequence') {
131
+ continue;
132
+ }
133
+ const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
134
+ sequences,
135
+ overrideIdsToNodePaths,
136
+ nodePathInfo: selection.nodePathInfo,
137
+ });
138
+ const sequencePropStatuses = propStatuses
139
+ ? remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey)
140
+ : undefined;
141
+ const eligibility = (0, exports.getTimelineSequenceSplitEligibility)({
142
+ selection,
143
+ sequence: (_a = track === null || track === void 0 ? void 0 : track.sequence) !== null && _a !== void 0 ? _a : null,
144
+ splitFrame,
145
+ propStatuses: sequencePropStatuses,
146
+ });
147
+ if (eligibility.canSplit) {
148
+ eligible.push({
149
+ nodePathInfo: eligibility.nodePathInfo,
150
+ splitFrame,
151
+ });
152
+ }
153
+ else {
154
+ skippedReasons.push(eligibility.reason);
155
+ }
123
156
  }
124
- const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
125
- sequences,
126
- overrideIdsToNodePaths,
127
- nodePathInfo: selection.nodePathInfo,
128
- });
129
- const sequencePropStatuses = propStatuses
130
- ? remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey)
131
- : undefined;
132
- const eligibility = (0, exports.getTimelineSequenceSplitEligibility)({
133
- selection,
134
- sequence: (_a = track === null || track === void 0 ? void 0 : track.sequence) !== null && _a !== void 0 ? _a : null,
135
- splitFrame,
136
- propStatuses: sequencePropStatuses,
137
- });
138
- if (!eligibility.canSplit) {
139
- (0, NotificationCenter_1.showNotification)(eligibility.reason, 4000);
157
+ if (eligible.length === 0) {
158
+ notify(selections.length === 1
159
+ ? skippedReasons[0]
160
+ : `None of the ${selections.length} selected clips can be split at the playhead`, 4000);
140
161
  return Promise.resolve(false);
141
162
  }
142
- return splitSequence({
143
- nodePathInfo: eligibility.nodePathInfo,
144
- splitFrame,
163
+ return splitSequences({ sequences: eligible }).then((success) => {
164
+ if (success && skippedReasons.length > 0) {
165
+ notify(`Split ${eligible.length} ${eligible.length === 1 ? 'clip' : 'clips'}. Skipped ${skippedReasons.length} ${skippedReasons.length === 1 ? 'clip' : 'clips'} that could not be split.`, 4000);
166
+ }
167
+ return success;
145
168
  });
146
169
  };
147
170
  exports.splitSelectedTimelineItems = splitSelectedTimelineItems;
@@ -20,6 +20,7 @@ const label = {
20
20
  textAlign: 'left',
21
21
  textOverflow: 'ellipsis',
22
22
  userSelect: 'none',
23
+ WebkitUserSelect: 'none',
23
24
  whiteSpace: 'nowrap',
24
25
  };
25
26
  const TimelineCombobox = ({ values, selectedId, title, tooltipDelay, labelWidth = 32, renderLeftItem, unhoveredIconColor = colors_1.LIGHT_TEXT, }) => {
@@ -280,7 +280,7 @@ const AdvancedSettings = ({ chunkLengthInSeconds, doSample, forceFullSequences,
280
280
  title: 'Learn more about No-repeat n-gram size',
281
281
  }, min: 0, name: "No-repeat n-gram size", onValueChanged: setNoRepeatNgramSize, step: 1, value: noRepeatNgramSize })] }), decodingValidationMessage ? (jsx_runtime_1.jsx("div", { id: TRANSCRIPTION_DECODING_MESSAGE_ID, "aria-live": "polite", style: { padding: '0 16px' }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: decodingValidationMessage, type: "error" }) })) : null] }));
282
282
  };
283
- const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }) => {
283
+ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, target, }) => {
284
284
  var _a, _b, _c;
285
285
  const [tab, setTab] = (0, react_1.useState)('transcribe');
286
286
  const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
@@ -323,11 +323,14 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
323
323
  };
324
324
  }, []);
325
325
  const normalizedOutName = outName.normalize('NFC').toLowerCase();
326
- const queuedOutputExists = captionJobs.some((job) => (job.status === 'idle' || job.status === 'running') &&
326
+ const queuedOutputExists = captionJobs.some((job) => job.target === null &&
327
+ (job.status === 'idle' || job.status === 'running') &&
327
328
  job.outName.normalize('NFC').toLowerCase() === normalizedOutName);
328
- const outputValidationMessage = (_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
329
- ? 'Another caption job is already using this output file'
330
- : null);
329
+ const outputValidationMessage = target === null
330
+ ? ((_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
331
+ ? 'Another caption job is already using this output file'
332
+ : null))
333
+ : null;
331
334
  const exists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutName);
332
335
  const chunkValidationMessage = strideLengthInSeconds * 2 >= chunkLengthInSeconds
333
336
  ? 'Stride length must be less than half of chunk length'
@@ -371,7 +374,8 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
371
374
  displayName,
372
375
  audioStreamIndex,
373
376
  requestInit,
374
- outName,
377
+ outName: target === null ? outName : 'Basic captions',
378
+ target,
375
379
  model: selectedModel,
376
380
  language: modelInfo.multilingual ? selectedLanguage : null,
377
381
  task: modelInfo.supportsTranslation ? selectedTask : 'transcribe',
@@ -398,6 +402,7 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
398
402
  forceFullSequences,
399
403
  noRepeatNgramSize,
400
404
  outName,
405
+ target,
401
406
  repetitionPenalty,
402
407
  requestInit,
403
408
  src,
@@ -410,17 +415,17 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
410
415
  temperature,
411
416
  topK,
412
417
  ]);
413
- return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: `Transcribe ${displayName}`, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
414
- jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Transcribe ${displayName}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
418
+ const title = target === null ? `Transcribe ${displayName}` : 'Generate captions';
419
+ return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
420
+ jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
415
421
  jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onAddToQueue, disabled: !canTranscribe, title: transcribeDisabledReason, style: {
416
422
  ...render_modals_1.buttonStyle,
417
423
  backgroundColor: canTranscribe
418
424
  ? render_modals_1.buttonStyle.backgroundColor
419
425
  : colors_1.BLUE_DISABLED,
420
- }, children: "Transcribe" })
426
+ }, children: target === null ? 'Transcribe' : 'Generate captions' })
421
427
  ] }), jsx_runtime_1.jsxs("div", { style: transcriptionLayout, children: [
422
- jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
423
- jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
428
+ jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [target === null ? (jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage })) : null, target === null ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
424
429
  ] }), jsx_runtime_1.jsx("div", { style: tab === 'advanced' ? advancedPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(AdvancedSettings, { chunkLengthInSeconds: chunkLengthInSeconds, decodingValidationMessage: decodingValidationMessage, doSample: doSample, forceFullSequences: forceFullSequences, noRepeatNgramSize: noRepeatNgramSize, repetitionPenalty: repetitionPenalty, setChunkLengthInSeconds: setChunkLengthInSeconds, setDoSample: setDoSample, setForceFullSequences: setForceFullSequences, setNoRepeatNgramSize: setNoRepeatNgramSize, setRepetitionPenalty: setRepetitionPenalty, setStrideLengthInSeconds: setStrideLengthInSeconds, setTemperature: setTemperature, setTopK: setTopK, strideLengthInSeconds: strideLengthInSeconds, temperature: temperature, topK: topK, validationMessage: chunkValidationMessage }) }), jsx_runtime_1.jsx(Models_1.Models, { description: 'Models are downloaded automatically when needed.\nYou can also manage the browser cache here.', indent: true, visible: tab === 'models' })
425
430
  ] })
426
431
  ] }) }));
@@ -43,6 +43,6 @@ const LazyTranscriptionModal = react_1.default.lazy(async () => {
43
43
  return { default: TranscriptionModal };
44
44
  });
45
45
  const TranscriptionModalWithOptionalWhisper = ({ state }) => {
46
- return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title: "Transcribe", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyTranscriptionModal, { ...state }) }) }));
46
+ return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title: state.target === null ? 'Transcribe' : 'Generate captions', children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyTranscriptionModal, { ...state }) }) }));
47
47
  };
48
48
  exports.TranscriptionModalWithOptionalWhisper = TranscriptionModalWithOptionalWhisper;
@@ -476,6 +476,7 @@ const WebMcp = () => {
476
476
  model: model.name,
477
477
  noRepeatNgramSize,
478
478
  outName: outputPath,
479
+ target: null,
479
480
  repetitionPenalty,
480
481
  requestInit: null,
481
482
  src,
@@ -1,5 +1,7 @@
1
1
  import type { PreviewSize } from 'remotion';
2
+ import type { Guide } from '../state/editor-guides';
2
3
  import { type InsertElementDropPosition } from './import-assets';
4
+ import { type SelectedOutlineSnapPoint } from './selected-outline-snap';
3
5
  type Dimensions = {
4
6
  readonly width: number;
5
7
  readonly height: number;
@@ -11,6 +13,7 @@ type CanvasSize = {
11
13
  export type CompositionDropPreview = {
12
14
  readonly compositionDimensions: Dimensions;
13
15
  readonly dropPosition: InsertElementDropPosition;
16
+ readonly snapPoints: readonly SelectedOutlineSnapPoint[];
14
17
  };
15
18
  export type CompositionDropPreviewBox = {
16
19
  readonly left: number;
@@ -18,12 +21,16 @@ export type CompositionDropPreviewBox = {
18
21
  readonly width: number;
19
22
  readonly height: number;
20
23
  };
21
- export declare const snapCompositionDropPosition: ({ compositionDimensions, destinationDimensions, dropPosition, scale, }: {
24
+ export declare const snapCompositionDropPosition: ({ compositionDimensions, destinationDimensions, dropPosition, guides, scale, }: {
22
25
  readonly compositionDimensions: Dimensions;
23
26
  readonly destinationDimensions: Dimensions;
24
27
  readonly dropPosition: InsertElementDropPosition;
28
+ readonly guides: readonly Guide[];
25
29
  readonly scale: number;
26
- }) => InsertElementDropPosition;
30
+ }) => {
31
+ readonly dropPosition: InsertElementDropPosition;
32
+ readonly snapPoints: readonly SelectedOutlineSnapPoint[];
33
+ };
27
34
  export declare const getCompositionDropPreviewBox: ({ canvasSize, destinationDimensions, preview, previewSize, }: {
28
35
  readonly canvasSize: CanvasSize;
29
36
  readonly destinationDimensions: Dimensions;
@@ -4,7 +4,7 @@ exports.getCompositionDropPreviewBox = exports.snapCompositionDropPosition = voi
4
4
  const studio_fit_padding_1 = require("../helpers/studio-fit-padding");
5
5
  const import_assets_1 = require("./import-assets");
6
6
  const selected_outline_snap_1 = require("./selected-outline-snap");
7
- const snapCompositionDropPosition = ({ compositionDimensions, destinationDimensions, dropPosition, scale, }) => {
7
+ const snapCompositionDropPosition = ({ compositionDimensions, destinationDimensions, dropPosition, guides, scale, }) => {
8
8
  var _a, _b;
9
9
  const left = dropPosition.centerX - compositionDimensions.width / 2;
10
10
  const top = dropPosition.centerY - compositionDimensions.height / 2;
@@ -31,12 +31,15 @@ const snapCompositionDropPosition = ({ compositionDimensions, destinationDimensi
31
31
  targets: (0, selected_outline_snap_1.getSelectedOutlineSnapTargets)({
32
32
  compositionHeight: destinationDimensions.height,
33
33
  compositionWidth: destinationDimensions.width,
34
- guides: [],
34
+ guides,
35
35
  }),
36
36
  });
37
37
  return {
38
- centerX: dropPosition.centerX + ((_a = snap.snapOffsetX) !== null && _a !== void 0 ? _a : 0),
39
- centerY: dropPosition.centerY + ((_b = snap.snapOffsetY) !== null && _b !== void 0 ? _b : 0),
38
+ dropPosition: {
39
+ centerX: dropPosition.centerX + ((_a = snap.snapOffsetX) !== null && _a !== void 0 ? _a : 0),
40
+ centerY: dropPosition.centerY + ((_b = snap.snapOffsetY) !== null && _b !== void 0 ? _b : 0),
41
+ },
42
+ snapPoints: snap.activeSnapPoints,
40
43
  };
41
44
  };
42
45
  exports.snapCompositionDropPosition = snapCompositionDropPosition;
@@ -176,7 +176,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
176
176
  (0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
177
177
  }
178
178
  },
179
- quickSwitcherLabel: `Open composition in ${defaultOpenInName}`,
179
+ quickSwitcherLabel: `Composition: Open in ${defaultOpenInName}`,
180
180
  subMenu: null,
181
181
  type: 'item',
182
182
  value: defaultOpenInTarget === 'editor'
@@ -194,7 +194,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
194
194
  label: 'Open composition in...',
195
195
  leftItem: null,
196
196
  onClick: () => undefined,
197
- quickSwitcherLabel: null,
197
+ quickSwitcherLabel: 'Composition',
198
198
  subMenu: {
199
199
  items: compositionOpenInMenuItems,
200
200
  leaveLeftSpace: true,
@@ -220,7 +220,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
220
220
  openComponentInGitSource().catch(() => undefined);
221
221
  }
222
222
  },
223
- quickSwitcherLabel: `Open composition component in ${defaultOpenInName}`,
223
+ quickSwitcherLabel: `Component: Open in ${defaultOpenInName}`,
224
224
  subMenu: null,
225
225
  type: 'item',
226
226
  value: defaultOpenInTarget === 'editor'
@@ -238,7 +238,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
238
238
  label: 'Open component in...',
239
239
  leftItem: null,
240
240
  onClick: () => undefined,
241
- quickSwitcherLabel: null,
241
+ quickSwitcherLabel: 'Component',
242
242
  subMenu: {
243
243
  items: componentOpenInMenuItems,
244
244
  leaveLeftSpace: true,
@@ -0,0 +1,2 @@
1
+ import type { DeleteJsxNodesRequest, DeleteJsxNodesResponse } from '@remotion/studio-shared';
2
+ export declare const deleteJsxNodes: (request: DeleteJsxNodesRequest) => Promise<DeleteJsxNodesResponse>;