@remotion/studio 4.0.520 → 4.0.522

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 (117) hide show
  1. package/dist/api/shut-down-studio.d.ts +6 -0
  2. package/dist/api/shut-down-studio.js +23 -0
  3. package/dist/components/AudioWaveform.js +10 -6
  4. package/dist/components/Canvas.js +84 -12
  5. package/dist/components/CanvasIfSizeIsAvailable.js +7 -0
  6. package/dist/components/CaptionInspector.d.ts +1 -0
  7. package/dist/components/CaptionInspector.js +43 -2
  8. package/dist/components/CaptionTextEditor.js +1 -1
  9. package/dist/components/CompositionSelector.js +41 -30
  10. package/dist/components/CompositionSelectorItem.d.ts +7 -0
  11. package/dist/components/CompositionSelectorItem.js +343 -67
  12. package/dist/components/CopyButton.js +7 -14
  13. package/dist/components/Editor.js +6 -5
  14. package/dist/components/EditorContent.js +1 -1
  15. package/dist/components/ElementInstallConfirmation.js +77 -65
  16. package/dist/components/ElementLibraryModal.js +3 -1
  17. package/dist/components/FixComputedValueModal.js +20 -10
  18. package/dist/components/InlineCaptionInspector.js +37 -1
  19. package/dist/components/InspectorLocationCopy.js +10 -5
  20. package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -18
  21. package/dist/components/InspectorSequenceSection.js +1 -4
  22. package/dist/components/Menu/MenuSubItem.js +1 -1
  23. package/dist/components/MenuBuildIndicator.js +7 -2
  24. package/dist/components/MenuCompositionName.js +62 -6
  25. package/dist/components/ModalContainer.d.ts +1 -0
  26. package/dist/components/ModalContainer.js +2 -2
  27. package/dist/components/ModalHeader.js +5 -1
  28. package/dist/components/QuickSwitcher/asset-search.d.ts +0 -1
  29. package/dist/components/QuickSwitcher/asset-search.js +1 -16
  30. package/dist/components/RenderButton.js +2 -2
  31. package/dist/components/RenderModal/CliCopyButton.js +13 -27
  32. package/dist/components/RenderModal/RenderStatusModal.js +7 -1
  33. package/dist/components/RenderModal/ServerRenderModal.js +1 -1
  34. package/dist/components/RenderModal/WebRenderModal.js +1 -1
  35. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -1
  36. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +7 -4
  37. package/dist/components/SettingsModal.js +8 -5
  38. package/dist/components/SidebarCollapserControls.js +11 -5
  39. package/dist/components/SkillsSettings.js +9 -5
  40. package/dist/components/Splitter/SplitterContainer.js +63 -10
  41. package/dist/components/Splitter/SplitterContext.d.ts +3 -0
  42. package/dist/components/Splitter/SplitterContext.js +5 -1
  43. package/dist/components/Splitter/SplitterElement.js +11 -2
  44. package/dist/components/Splitter/SplitterHandle.d.ts +1 -0
  45. package/dist/components/Splitter/SplitterHandle.js +55 -25
  46. package/dist/components/TimeValue.js +36 -7
  47. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -1
  48. package/dist/components/Timeline/SubscribeToNodePaths.js +2 -1
  49. package/dist/components/Timeline/Timeline.d.ts +1 -1
  50. package/dist/components/Timeline/Timeline.js +45 -22
  51. package/dist/components/Timeline/TimelineAssetField.d.ts +0 -1
  52. package/dist/components/Timeline/TimelineAssetField.js +16 -9
  53. package/dist/components/Timeline/TimelineCollapseToggle.js +1 -1
  54. package/dist/components/Timeline/TimelineDragHandler.js +9 -4
  55. package/dist/components/Timeline/TimelineFontWeightField.d.ts +11 -0
  56. package/dist/components/Timeline/TimelineFontWeightField.js +65 -0
  57. package/dist/components/Timeline/TimelineLayerChildren.d.ts +21 -0
  58. package/dist/components/Timeline/TimelineLayerChildren.js +129 -0
  59. package/dist/components/Timeline/TimelineNumberField.js +13 -5
  60. package/dist/components/Timeline/TimelinePinchZoom.js +6 -30
  61. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -7
  62. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  63. package/dist/components/Timeline/TimelineSequence.js +113 -42
  64. package/dist/components/Timeline/TimelineSequenceItem.js +14 -2
  65. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +13 -3
  66. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +185 -126
  67. package/dist/components/Timeline/TimelineSlider.js +1 -4
  68. package/dist/components/Timeline/TimelineTickFormatProvider.d.ts +8 -0
  69. package/dist/components/Timeline/TimelineTickFormatProvider.js +16 -0
  70. package/dist/components/Timeline/TimelineTimeIndicators.js +7 -3
  71. package/dist/components/Timeline/TimelineVideoInfo.js +7 -3
  72. package/dist/components/Timeline/TimelineWidthProvider.js +2 -5
  73. package/dist/components/Timeline/TimelineZoomControls.js +20 -20
  74. package/dist/components/Timeline/get-sequence-split-menu-item.d.ts +11 -0
  75. package/dist/components/Timeline/get-sequence-split-menu-item.js +55 -0
  76. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  77. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -2
  78. package/dist/components/Timeline/use-sequence-props-subscription.js +4 -10
  79. package/dist/components/TopPanel.js +3 -19
  80. package/dist/components/UpdateStatusContext.d.ts +5 -0
  81. package/dist/components/UpdateStatusContext.js +53 -2
  82. package/dist/components/UpdatesSettings.js +34 -9
  83. package/dist/components/WebMcp.js +26 -0
  84. package/dist/components/ZoomPersistor.js +6 -3
  85. package/dist/components/composition-menu-items.js +1 -1
  86. package/dist/components/composition-selector-drag-data.d.ts +27 -0
  87. package/dist/components/composition-selector-drag-data.js +80 -0
  88. package/dist/components/import-assets.d.ts +2 -1
  89. package/dist/components/import-assets.js +11 -1
  90. package/dist/components/parse-caption-file.d.ts +5 -0
  91. package/dist/components/parse-caption-file.js +63 -0
  92. package/dist/esm/{chunk-np6q13k5.js → chunk-3netyjd9.js} +7943 -6314
  93. package/dist/esm/index.mjs +23 -8
  94. package/dist/esm/internals.mjs +7965 -6336
  95. package/dist/esm/previewEntry.mjs +8007 -6378
  96. package/dist/esm/renderEntry.mjs +1 -1
  97. package/dist/helpers/copy-text.js +1 -2
  98. package/dist/helpers/get-preview-file-type.js +22 -3
  99. package/dist/helpers/inserted-element-selection.d.ts +2 -1
  100. package/dist/helpers/use-copy-feedback.d.ts +4 -0
  101. package/dist/helpers/use-copy-feedback.js +19 -0
  102. package/dist/helpers/use-menu-structure.js +2 -2
  103. package/dist/icons/copy.d.ts +5 -0
  104. package/dist/icons/copy.js +12 -0
  105. package/dist/index.d.ts +1 -0
  106. package/dist/index.js +3 -1
  107. package/dist/state/canvas-ref.d.ts +1 -0
  108. package/dist/state/canvas-ref.js +2 -1
  109. package/dist/state/modals.d.ts +0 -2
  110. package/dist/state/sidebar.d.ts +3 -0
  111. package/dist/state/sidebar.js +6 -1
  112. package/dist/state/timeline-zoom.d.ts +1 -1
  113. package/dist/state/timeline-zoom.js +3 -3
  114. package/dist/visual-controls/VisualControls.js +4 -0
  115. package/package.json +16 -16
  116. package/dist/helpers/use-max-media-duration.d.ts +0 -2
  117. package/dist/helpers/use-max-media-duration.js +0 -61
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CompositionSelectorItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
6
7
  const client_id_1 = require("../helpers/client-id");
7
8
  const colors_1 = require("../helpers/colors");
8
9
  const hoverable_1 = require("../helpers/hoverable");
@@ -12,6 +13,7 @@ const folder_1 = require("../icons/folder");
12
13
  const modals_1 = require("../state/modals");
13
14
  const composition_drag_data_1 = require("./composition-drag-data");
14
15
  const composition_menu_items_1 = require("./composition-menu-items");
16
+ const composition_selector_drag_data_1 = require("./composition-selector-drag-data");
15
17
  const CompositionContextButton_1 = require("./CompositionContextButton");
16
18
  const CompositionOrStillIcon_1 = require("./CompositionOrStillIcon");
17
19
  const ContextMenu_1 = require("./ContextMenu");
@@ -56,7 +58,56 @@ const iconStyle = {
56
58
  height: 18,
57
59
  flexShrink: 0,
58
60
  };
59
- const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, selectComposition, toggleFolder, clearRootDragHover, }) => {
61
+ const reorderWrapper = {
62
+ position: 'relative',
63
+ };
64
+ const reorderLineBase = {
65
+ backgroundColor: colors_1.TIMELINE_BLUE,
66
+ height: 2,
67
+ left: 0,
68
+ pointerEvents: 'none',
69
+ position: 'absolute',
70
+ right: 0,
71
+ zIndex: 1,
72
+ };
73
+ const folderAutoExpansionDelay = 700;
74
+ const itemToDescriptor = (item) => {
75
+ return item.type === 'composition'
76
+ ? { type: 'composition', compositionId: item.composition.id }
77
+ : {
78
+ type: 'folder',
79
+ folderName: item.folderName,
80
+ parentName: item.parentName,
81
+ };
82
+ };
83
+ const itemsAreEqual = (left, right) => {
84
+ if (left.type === 'composition') {
85
+ return (right.type === 'composition' && left.compositionId === right.compositionId);
86
+ }
87
+ return (right.type === 'folder' &&
88
+ left.folderName === right.folderName &&
89
+ left.parentName === right.parentName);
90
+ };
91
+ const getFolderPath = ({ folderName, parentName, }) => {
92
+ return [parentName, folderName].filter(Boolean).join('/');
93
+ };
94
+ const wouldMoveFolderIntoItself = ({ activeDrag, destinationParentFolderPath, }) => {
95
+ if (activeDrag.item.type !== 'folder' ||
96
+ destinationParentFolderPath === null) {
97
+ return false;
98
+ }
99
+ const sourceFolderPath = getFolderPath(activeDrag.item);
100
+ return (destinationParentFolderPath === sourceFolderPath ||
101
+ destinationParentFolderPath.startsWith(`${sourceFolderPath}/`));
102
+ };
103
+ const canMoveIntoFolder = ({ activeDrag, destinationFolderPath, }) => {
104
+ return (activeDrag.parentFolderPath !== destinationFolderPath &&
105
+ !wouldMoveFolderIntoItself({
106
+ activeDrag,
107
+ destinationParentFolderPath: destinationFolderPath,
108
+ }));
109
+ };
110
+ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, selectComposition, toggleFolder, clearRootDragHover, canReorder, activeDragRef, parentFolderPath, previousSibling, nextSibling, }) => {
60
111
  const selected = (0, react_1.useMemo)(() => {
61
112
  if (item.type === 'composition') {
62
113
  return currentComposition === item.composition.id;
@@ -64,7 +115,30 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
64
115
  return false;
65
116
  }, [item, currentComposition]);
66
117
  const [isDragging, setIsDragging] = (0, react_1.useState)(false);
67
- const [dragHovered, setDragHovered] = (0, react_1.useState)(false);
118
+ const [dropPosition, setDropPosition] = (0, react_1.useState)(null);
119
+ const dropPositionRef = (0, react_1.useRef)(null);
120
+ const folderExpansionTimer = (0, react_1.useRef)(null);
121
+ const folderExpansionRequested = (0, react_1.useRef)(false);
122
+ const cancelFolderExpansion = (0, react_1.useCallback)(() => {
123
+ if (folderExpansionTimer.current !== null) {
124
+ window.clearTimeout(folderExpansionTimer.current);
125
+ folderExpansionTimer.current = null;
126
+ }
127
+ }, []);
128
+ const updateDropPosition = (0, react_1.useCallback)((position) => {
129
+ dropPositionRef.current = position;
130
+ setDropPosition(position);
131
+ }, []);
132
+ (0, react_1.useEffect)(() => {
133
+ return cancelFolderExpansion;
134
+ }, [cancelFolderExpansion]);
135
+ const folderIsExpanded = item.type === 'folder' && item.expanded;
136
+ (0, react_1.useEffect)(() => {
137
+ if (folderIsExpanded) {
138
+ folderExpansionRequested.current = false;
139
+ cancelFolderExpansion();
140
+ }
141
+ }, [cancelFolderExpansion, folderIsExpanded]);
68
142
  const compositionRowRef = (0, react_1.useRef)(null);
69
143
  const compositionId = item.type === 'composition' ? item.composition.id : null;
70
144
  (0, react_1.useLayoutEffect)(() => {
@@ -78,7 +152,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
78
152
  });
79
153
  }, [compositionId, selected]);
80
154
  const style = (0, react_1.useMemo)(() => {
81
- const idleBackground = dragHovered
155
+ const idleBackground = dropPosition === 'inside'
82
156
  ? colors_1.WHITE_ALPHA_12
83
157
  : selected
84
158
  ? colors_1.WHITE_ALPHA_06
@@ -87,13 +161,22 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
87
161
  ...itemStyle,
88
162
  ...(0, hoverable_1.hoverableStyle)({
89
163
  idleBackground,
90
- hoverBackground: dragHovered ? colors_1.WHITE_ALPHA_12 : colors_1.WHITE_ALPHA_06,
164
+ hoverBackground: dropPosition === 'inside' ? colors_1.WHITE_ALPHA_12 : colors_1.WHITE_ALPHA_06,
91
165
  idleColor: selected ? colors_1.WHITE : colors_1.LIGHT_TEXT,
92
166
  hoverColor: colors_1.WHITE,
93
167
  }),
94
168
  paddingLeft: 12 + level * 8,
95
169
  };
96
- }, [dragHovered, level, selected]);
170
+ }, [dropPosition, level, selected]);
171
+ const reorderLineStyle = (0, react_1.useMemo)(() => {
172
+ if (dropPosition !== 'before' && dropPosition !== 'after') {
173
+ return null;
174
+ }
175
+ return {
176
+ ...reorderLineBase,
177
+ ...(dropPosition === 'before' ? { top: -1 } : { bottom: -1 }),
178
+ };
179
+ }, [dropPosition]);
97
180
  const onClick = (0, react_1.useCallback)((evt) => {
98
181
  evt.preventDefault();
99
182
  if (item.type === 'composition') {
@@ -146,84 +229,185 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
146
229
  resolvedLocation,
147
230
  setSelectedModal,
148
231
  ]);
149
- const onCompositionDragStart = (0, react_1.useCallback)((event) => {
150
- var _a, _b, _c, _d;
151
- if (item.type !== 'composition' || window.remotion_isReadOnlyStudio) {
232
+ const onItemDragStart = (0, react_1.useCallback)((event) => {
233
+ var _a, _b, _c, _d, _e;
234
+ if (window.remotion_isReadOnlyStudio) {
152
235
  event.preventDefault();
153
236
  return;
154
237
  }
238
+ const itemDescriptor = itemToDescriptor(item);
239
+ activeDragRef.current = {
240
+ item: itemDescriptor,
241
+ parentFolderPath,
242
+ };
155
243
  setIsDragging(true);
156
244
  event.dataTransfer.effectAllowed = 'copyMove';
157
- const dragData = (0, composition_drag_data_1.makeCompositionDragData)({
158
- compositionFile: (_a = resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) !== null && _a !== void 0 ? _a : null,
159
- compositionId: item.composition.id,
160
- width: (_b = item.composition.width) !== null && _b !== void 0 ? _b : null,
161
- height: (_c = item.composition.height) !== null && _c !== void 0 ? _c : null,
162
- durationInFrames: (_d = item.composition.durationInFrames) !== null && _d !== void 0 ? _d : null,
245
+ const selectorDragData = (0, composition_selector_drag_data_1.makeCompositionSelectorDragData)({
246
+ item: itemDescriptor,
247
+ sourceFile: (_a = resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) !== null && _a !== void 0 ? _a : null,
163
248
  });
164
- event.dataTransfer.setData(dragData.mimeType, dragData.payload);
165
- }, [item, resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source]);
166
- const onCompositionDragEnd = (0, react_1.useCallback)(() => {
249
+ event.dataTransfer.setData(selectorDragData.mimeType, selectorDragData.payload);
250
+ if (item.type === 'composition') {
251
+ const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
252
+ const compositionDragData = (0, composition_drag_data_1.makeCompositionDragData)({
253
+ compositionFile: browserStudioOperations === null
254
+ ? ((_b = resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) !== null && _b !== void 0 ? _b : null)
255
+ : browserStudioOperations.getCompositionFile(item.composition.id),
256
+ compositionId: item.composition.id,
257
+ width: (_c = item.composition.width) !== null && _c !== void 0 ? _c : null,
258
+ height: (_d = item.composition.height) !== null && _d !== void 0 ? _d : null,
259
+ durationInFrames: (_e = item.composition.durationInFrames) !== null && _e !== void 0 ? _e : null,
260
+ });
261
+ event.dataTransfer.setData(compositionDragData.mimeType, compositionDragData.payload);
262
+ }
263
+ }, [activeDragRef, item, parentFolderPath, resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source]);
264
+ const onItemDragEnd = (0, react_1.useCallback)(() => {
265
+ activeDragRef.current = null;
266
+ cancelFolderExpansion();
167
267
  setIsDragging(false);
168
- }, []);
169
- const onFolderDragOver = (0, react_1.useCallback)((event) => {
268
+ updateDropPosition(null);
269
+ }, [activeDragRef, cancelFolderExpansion, updateDropPosition]);
270
+ const getDropPosition = (0, react_1.useCallback)((event) => {
271
+ const activeDrag = activeDragRef.current;
272
+ if (activeDrag === null) {
273
+ return null;
274
+ }
275
+ if (!canReorder) {
276
+ if (item.type !== 'folder') {
277
+ return null;
278
+ }
279
+ return canMoveIntoFolder({
280
+ activeDrag,
281
+ destinationFolderPath: getFolderPath(item),
282
+ })
283
+ ? 'inside'
284
+ : null;
285
+ }
286
+ const { top, height } = event.currentTarget.getBoundingClientRect();
287
+ const progress = height === 0 ? 0.5 : (event.clientY - top) / height;
288
+ const position = item.type === 'composition'
289
+ ? progress < 0.5
290
+ ? 'before'
291
+ : 'after'
292
+ : progress < 0.25
293
+ ? 'before'
294
+ : progress > 0.75
295
+ ? 'after'
296
+ : 'inside';
297
+ const target = itemToDescriptor(item);
298
+ if (itemsAreEqual(activeDrag.item, target)) {
299
+ return null;
300
+ }
301
+ if (position === 'before' &&
302
+ previousSibling !== null &&
303
+ itemsAreEqual(activeDrag.item, itemToDescriptor(previousSibling))) {
304
+ return null;
305
+ }
306
+ if (position === 'after' &&
307
+ nextSibling !== null &&
308
+ itemsAreEqual(activeDrag.item, itemToDescriptor(nextSibling))) {
309
+ return null;
310
+ }
311
+ if (position === 'inside' && item.type === 'folder') {
312
+ return canMoveIntoFolder({
313
+ activeDrag,
314
+ destinationFolderPath: getFolderPath(item),
315
+ })
316
+ ? position
317
+ : null;
318
+ }
319
+ return wouldMoveFolderIntoItself({
320
+ activeDrag,
321
+ destinationParentFolderPath: parentFolderPath,
322
+ })
323
+ ? null
324
+ : position;
325
+ }, [
326
+ activeDragRef,
327
+ canReorder,
328
+ item,
329
+ nextSibling,
330
+ parentFolderPath,
331
+ previousSibling,
332
+ ]);
333
+ const scheduleFolderExpansion = (0, react_1.useCallback)(() => {
170
334
  if (item.type !== 'folder' ||
171
- window.remotion_isReadOnlyStudio ||
172
- (0, composition_drag_data_1.getCompositionDragPreviewMetadata)(event.dataTransfer.types) === null) {
335
+ item.expanded ||
336
+ folderExpansionTimer.current !== null ||
337
+ folderExpansionRequested.current) {
173
338
  return;
174
339
  }
175
- event.preventDefault();
176
- event.stopPropagation();
177
- event.dataTransfer.dropEffect = 'move';
178
- clearRootDragHover();
179
- setDragHovered(true);
180
- }, [clearRootDragHover, item]);
181
- const onFolderDragLeave = (0, react_1.useCallback)(() => {
182
- setDragHovered(false);
183
- }, []);
184
- const onFolderChildListDragOver = (0, react_1.useCallback)((event) => {
185
- if (item.type !== 'folder' ||
186
- window.remotion_isReadOnlyStudio ||
187
- (0, composition_drag_data_1.getCompositionDragPreviewMetadata)(event.dataTransfer.types) === null) {
340
+ const activeDrag = activeDragRef.current;
341
+ if (activeDrag === null ||
342
+ !canMoveIntoFolder({
343
+ activeDrag,
344
+ destinationFolderPath: getFolderPath(item),
345
+ })) {
188
346
  return;
189
347
  }
190
- event.preventDefault();
191
- event.stopPropagation();
192
- event.dataTransfer.dropEffect = 'move';
193
- clearRootDragHover();
194
- }, [clearRootDragHover, item]);
195
- const onFolderDrop = (0, react_1.useCallback)(async (event) => {
196
- if (item.type !== 'folder' || window.remotion_isReadOnlyStudio) {
348
+ folderExpansionTimer.current = window.setTimeout(() => {
349
+ folderExpansionTimer.current = null;
350
+ const currentActiveDrag = activeDragRef.current;
351
+ if (currentActiveDrag === null ||
352
+ !canMoveIntoFolder({
353
+ activeDrag: currentActiveDrag,
354
+ destinationFolderPath: getFolderPath(item),
355
+ })) {
356
+ return;
357
+ }
358
+ folderExpansionRequested.current = true;
359
+ toggleFolder(item.folderName, item.parentName);
360
+ }, folderAutoExpansionDelay);
361
+ }, [activeDragRef, item, toggleFolder]);
362
+ const onRowDragOver = (0, react_1.useCallback)((event) => {
363
+ if (window.remotion_isReadOnlyStudio ||
364
+ !(0, composition_selector_drag_data_1.hasCompositionSelectorDragData)(event.dataTransfer.types)) {
197
365
  return;
198
366
  }
199
- const compositionDragData = (0, composition_drag_data_1.parseCompositionDragData)(event.dataTransfer);
200
- if (compositionDragData === null) {
367
+ const position = getDropPosition(event);
368
+ if (position === null) {
369
+ cancelFolderExpansion();
370
+ updateDropPosition(null);
371
+ event.stopPropagation();
201
372
  return;
202
373
  }
374
+ if (position === 'inside') {
375
+ scheduleFolderExpansion();
376
+ }
377
+ else {
378
+ cancelFolderExpansion();
379
+ }
203
380
  event.preventDefault();
204
381
  event.stopPropagation();
382
+ event.dataTransfer.dropEffect = 'move';
205
383
  clearRootDragHover();
206
- setDragHovered(false);
207
- const isAlreadyDirectChild = item.items.some((child) => {
208
- return (child.type === 'composition' &&
209
- child.composition.id === compositionDragData.compositionId);
210
- });
211
- if (isAlreadyDirectChild) {
212
- return;
213
- }
214
- const notification = (0, NotificationCenter_1.showNotification)(`Moving ${compositionDragData.compositionId}...`, null);
215
- const controller = new AbortController();
384
+ updateDropPosition(position);
385
+ }, [
386
+ cancelFolderExpansion,
387
+ clearRootDragHover,
388
+ getDropPosition,
389
+ scheduleFolderExpansion,
390
+ updateDropPosition,
391
+ ]);
392
+ const onRowDragLeave = (0, react_1.useCallback)(() => {
393
+ cancelFolderExpansion();
394
+ updateDropPosition(null);
395
+ }, [cancelFolderExpansion, updateDropPosition]);
396
+ const moveItem = (0, react_1.useCallback)(async ({ destination, dragData, }) => {
397
+ const label = dragData.item.type === 'composition'
398
+ ? dragData.item.compositionId
399
+ : dragData.item.folderName;
400
+ const notification = (0, NotificationCenter_1.showNotification)(`Moving ${label}...`, null);
216
401
  try {
217
402
  const result = await (0, actions_1.applyCodemod)({
218
403
  codemod: {
219
- type: 'move-composition-to-folder',
220
- idToMove: compositionDragData.compositionId,
221
- folderName: item.folderName,
222
- parentName: item.parentName,
404
+ type: 'move-composition-or-folder',
405
+ source: dragData.item,
406
+ destination,
223
407
  },
224
408
  dryRun: false,
225
- signal: controller.signal,
226
- symbolicatedStack: (0, composition_drag_data_1.compositionDragDataToSymbolicatedStack)(compositionDragData),
409
+ signal: new AbortController().signal,
410
+ symbolicatedStack: (0, composition_selector_drag_data_1.compositionSelectorDragDataToSymbolicatedStack)(dragData),
227
411
  });
228
412
  if (result.success) {
229
413
  notification.dismiss();
@@ -231,23 +415,115 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
231
415
  else {
232
416
  notification.replaceContent(result.reason, 4000);
233
417
  }
234
- if (result.success && !item.expanded) {
418
+ if (result.success &&
419
+ destination.type === 'folder' &&
420
+ item.type === 'folder' &&
421
+ !item.expanded) {
235
422
  toggleFolder(item.folderName, item.parentName);
236
423
  }
237
424
  }
238
425
  catch (err) {
239
426
  notification.replaceContent(err instanceof Error ? err.message : String(err), 4000);
240
427
  }
241
- }, [clearRootDragHover, item, toggleFolder]);
428
+ }, [item, toggleFolder]);
429
+ const onRowDrop = (0, react_1.useCallback)(async (event) => {
430
+ cancelFolderExpansion();
431
+ const dragData = (0, composition_selector_drag_data_1.parseCompositionSelectorDragData)(event.dataTransfer);
432
+ const position = dropPositionRef.current;
433
+ if (dragData === null) {
434
+ return;
435
+ }
436
+ if (position === null) {
437
+ event.stopPropagation();
438
+ return;
439
+ }
440
+ event.preventDefault();
441
+ event.stopPropagation();
442
+ clearRootDragHover();
443
+ updateDropPosition(null);
444
+ await moveItem({
445
+ dragData,
446
+ destination: position === 'inside' && item.type === 'folder'
447
+ ? {
448
+ type: 'folder',
449
+ folderName: item.folderName,
450
+ parentName: item.parentName,
451
+ }
452
+ : {
453
+ type: position === 'before' ? 'before' : 'after',
454
+ target: itemToDescriptor(item),
455
+ },
456
+ });
457
+ }, [
458
+ cancelFolderExpansion,
459
+ clearRootDragHover,
460
+ item,
461
+ moveItem,
462
+ updateDropPosition,
463
+ ]);
464
+ const onFolderChildListDragOver = (0, react_1.useCallback)((event) => {
465
+ if (item.type !== 'folder' ||
466
+ window.remotion_isReadOnlyStudio ||
467
+ !(0, composition_selector_drag_data_1.hasCompositionSelectorDragData)(event.dataTransfer.types)) {
468
+ return;
469
+ }
470
+ const activeDrag = activeDragRef.current;
471
+ if (activeDrag === null ||
472
+ !canMoveIntoFolder({
473
+ activeDrag,
474
+ destinationFolderPath: getFolderPath(item),
475
+ })) {
476
+ event.stopPropagation();
477
+ return;
478
+ }
479
+ event.preventDefault();
480
+ event.stopPropagation();
481
+ event.dataTransfer.dropEffect = 'move';
482
+ clearRootDragHover();
483
+ }, [activeDragRef, clearRootDragHover, item]);
484
+ const onFolderChildListDrop = (0, react_1.useCallback)(async (event) => {
485
+ if (item.type !== 'folder' || window.remotion_isReadOnlyStudio) {
486
+ return;
487
+ }
488
+ const dragData = (0, composition_selector_drag_data_1.parseCompositionSelectorDragData)(event.dataTransfer);
489
+ if (dragData === null) {
490
+ return;
491
+ }
492
+ const activeDrag = activeDragRef.current;
493
+ if (activeDrag === null ||
494
+ !canMoveIntoFolder({
495
+ activeDrag,
496
+ destinationFolderPath: getFolderPath(item),
497
+ })) {
498
+ event.stopPropagation();
499
+ return;
500
+ }
501
+ event.preventDefault();
502
+ event.stopPropagation();
503
+ clearRootDragHover();
504
+ await moveItem({
505
+ dragData,
506
+ destination: {
507
+ type: 'folder',
508
+ folderName: item.folderName,
509
+ parentName: item.parentName,
510
+ },
511
+ });
512
+ }, [activeDragRef, clearRootDragHover, item, moveItem]);
242
513
  if (item.type === 'folder') {
514
+ const folderPath = getFolderPath(item);
243
515
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
244
- jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, onDragOver: onFolderDragOver, onDragLeave: onFolderDragLeave, onDrop: onFolderDrop, title: item.folderName, role: "button", children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
245
- ] }) }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderDrop, children: item.items.map((childItem) => {
246
- return (jsx_runtime_1.jsx(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder, clearRootDragHover: clearRootDragHover }, childItem.key + childItem.type));
516
+ jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
517
+ ] }) })
518
+ ] }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderChildListDrop, children: item.items.map((childItem, index) => {
519
+ return (jsx_runtime_1.jsx(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder, clearRootDragHover: clearRootDragHover, canReorder: canReorder, activeDragRef: activeDragRef, parentFolderPath: folderPath, previousSibling: index === 0 ? null : item.items[index - 1], nextSibling: index === item.items.length - 1
520
+ ? null
521
+ : item.items[index + 1] }, childItem.key + childItem.type));
247
522
  }) })) : null] }));
248
523
  }
249
- return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onCompositionDragStart, onDragEnd: onCompositionDragEnd, type: "button", title: item.composition.id, className: `__remotion-composition __remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, "data-compname": item.composition.id, children: [
250
- jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
251
- ] }) }) }));
524
+ return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, type: "button", title: item.composition.id, className: `__remotion-composition __remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, "data-compname": item.composition.id, children: [
525
+ jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
526
+ ] }) })
527
+ ] }) }));
252
528
  };
253
529
  exports.CompositionSelectorItem = CompositionSelectorItem;
@@ -5,6 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../helpers/colors");
7
7
  const copy_text_1 = require("../helpers/copy-text");
8
+ const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
9
+ const copy_1 = require("../icons/copy");
8
10
  const Button_1 = require("./Button");
9
11
  const layout_1 = require("./layout");
10
12
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
@@ -17,29 +19,20 @@ const buttonContainerStyle = {
17
19
  display: 'flex',
18
20
  minWidth: '114px',
19
21
  };
20
- const copyIcon = (jsx_runtime_1.jsx("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "far", "data-icon": "clipboard", className: "svg-inline--fa fa-clipboard fa-w-12", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", style: iconStyle, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
21
22
  const labelStyle = {
22
23
  fontSize: 14,
23
24
  };
24
25
  const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
25
- const [copied, setCopied] = (0, react_1.useState)(false);
26
+ const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
26
27
  const onClick = (0, react_1.useCallback)(() => {
27
28
  (0, copy_text_1.copyText)(textToCopy)
28
- .then(() => {
29
- setCopied(Date.now());
30
- })
29
+ .then(markCopied)
31
30
  .catch((err) => {
32
31
  (0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
33
32
  });
34
- }, [textToCopy]);
35
- (0, react_1.useEffect)(() => {
36
- if (!copied) {
37
- return;
38
- }
39
- const to = setTimeout(() => setCopied(false), 2000);
40
- return () => clearTimeout(to);
41
- }, [copied]);
42
- return (jsx_runtime_1.jsxs(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [copyIcon, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), ' ', jsx_runtime_1.jsx("span", { style: labelStyle, children: copied ? labelWhenCopied : label })
33
+ }, [markCopied, textToCopy]);
34
+ return (jsx_runtime_1.jsxs(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [
35
+ jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), ' ', jsx_runtime_1.jsx("span", { style: labelStyle, children: copied ? labelWhenCopied : label })
43
36
  ] }));
44
37
  };
45
38
  exports.CopyButton = CopyButton;
@@ -79,6 +79,7 @@ const CompositionListRenderMarker = () => {
79
79
  return null;
80
80
  };
81
81
  const Editor = ({ Root, readOnlyStudio }) => {
82
+ var _a;
82
83
  (0, client_id_1.useStudioConfigRevision)();
83
84
  const [drawElement, setDrawElement] = (0, react_1.useState)(null);
84
85
  const size = player_1.PlayerInternals.useElementSize(drawElement, {
@@ -111,11 +112,11 @@ const Editor = ({ Root, readOnlyStudio }) => {
111
112
  const compositionRenderErrorContextValue = (0, react_1.useMemo)(() => ({ setError: setRenderError, clearError }), [clearError]);
112
113
  const renderErrorContextValue = (0, react_1.useMemo)(() => ({ error: renderError }), [renderError]);
113
114
  return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(timeline_zoom_1.TimelineZoomContext, { children: jsx_runtime_1.jsxs(SequencePropsSubscriptionProvider_1.SequencePropsSubscriptionProvider, { children: [
114
- jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
115
- jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(CanvasCaptureDropHandler_1.CanvasCaptureDropHandler, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
116
- jsx_runtime_1.jsx(remotion_1.Internals.CompositionRenderErrorContext.Provider, { value: compositionRenderErrorContextValue, children: canvasMounted ? (jsx_runtime_1.jsx(RootCompositionLoader, { Root: MemoRoot })) : null }), jsx_runtime_1.jsx(remotion_1.Internals.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(RenderErrorContext_1.RenderErrorContext.Provider, { value: renderErrorContextValue, children: jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: setDrawRef, bufferStateDelayInMilliseconds: (0, studio_runtime_config_1.getStudioBufferStateDelayInMilliseconds)(), onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }) }) })
117
- ] }) })
118
- ] }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
115
+ jsx_runtime_1.jsx(canvas_ref_1.RefreshCanvasSizeContext.Provider, { value: (_a = size === null || size === void 0 ? void 0 : size.refresh) !== null && _a !== void 0 ? _a : null, children: jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
116
+ jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(CanvasCaptureDropHandler_1.CanvasCaptureDropHandler, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
117
+ jsx_runtime_1.jsx(remotion_1.Internals.CompositionRenderErrorContext.Provider, { value: compositionRenderErrorContextValue, children: canvasMounted ? (jsx_runtime_1.jsx(RootCompositionLoader, { Root: MemoRoot })) : null }), jsx_runtime_1.jsx(remotion_1.Internals.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(RenderErrorContext_1.RenderErrorContext.Provider, { value: renderErrorContextValue, children: jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: setDrawRef, bufferStateDelayInMilliseconds: (0, studio_runtime_config_1.getStudioBufferStateDelayInMilliseconds)(), onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }) }) })
118
+ ] }) })
119
+ ] }) }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
119
120
  ] }) }) }));
120
121
  };
121
122
  exports.Editor = Editor;
@@ -41,7 +41,7 @@ const EditorContent = ({ readOnlyStudio, children }) => {
41
41
  (canvasContent.type === 'asset' &&
42
42
  (currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset));
43
43
  const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
44
- jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
44
+ jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop, onCollapseDuringDrag: null }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
45
45
  ] }));
46
46
  return (jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectionProvider, { children: [
47
47
  jsx_runtime_1.jsx(WebMcp_1.WebMcp, {}), jsx_runtime_1.jsx(transform_3d_mode_1.Transform3DModeStateProvider, { children: jsx_runtime_1.jsxs(StudioClearSelectionArea, { children: [