@remotion/studio 4.0.526 → 4.0.528

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 (309) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/Canvas.js +88 -26
  5. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  6. package/dist/components/CanvasOrLoading.js +10 -2
  7. package/dist/components/CodeFrame.js +1 -1
  8. package/dist/components/ColorPicker/checker.d.ts +1 -1
  9. package/dist/components/CompositionSelectorItem.js +1 -0
  10. package/dist/components/CurrentAsset.js +4 -2
  11. package/dist/components/EditorRuler/Ruler.js +6 -3
  12. package/dist/components/EffectPickerModal.js +69 -43
  13. package/dist/components/ElementInstallConfirmation.js +3 -3
  14. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  15. package/dist/components/ElementLibrariesSettings.js +200 -0
  16. package/dist/components/InitialCompositionLoader.js +4 -2
  17. package/dist/components/InlineDropdown.js +26 -2
  18. package/dist/components/InlineEditableTitle.js +1 -0
  19. package/dist/components/InspectorOpenInEditor.js +13 -0
  20. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  21. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
  22. package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
  23. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  24. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  25. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
  26. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  27. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  28. package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
  29. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  31. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
  32. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  33. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  34. package/dist/components/InspectorPanel/common.js +1 -0
  35. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  36. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  37. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  38. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  39. package/dist/components/InspectorPanel/styles.js +2 -0
  40. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  42. package/dist/components/InspectorSequenceSection.js +7 -5
  43. package/dist/components/InspectorSourceLocation.js +3 -0
  44. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  45. package/dist/components/Menu/styles.d.ts +2 -2
  46. package/dist/components/MenuBuildIndicator.js +1 -0
  47. package/dist/components/Modals.js +7 -6
  48. package/dist/components/ModelManager.js +10 -9
  49. package/dist/components/NewComposition/CancelButton.js +11 -5
  50. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  51. package/dist/components/NewComposition/InputDragger.js +28 -9
  52. package/dist/components/NewComposition/NewComposition.js +7 -6
  53. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  54. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  55. package/dist/components/Preview.js +4 -0
  56. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  57. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  58. package/dist/components/RadioButton.js +1 -0
  59. package/dist/components/RenderModal/DataEditor.js +4 -1
  60. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  61. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  62. package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
  64. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  65. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  66. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  67. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  68. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  69. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  70. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  71. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  72. package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
  73. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  74. package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
  75. package/dist/components/RenderQueue/context.d.ts +4 -0
  76. package/dist/components/RenderQueue/context.js +58 -8
  77. package/dist/components/RenderQueue/index.js +3 -3
  78. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  79. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  80. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  81. package/dist/components/RendersTab.js +2 -0
  82. package/dist/components/SelectedOutlineCropControls.js +2 -1
  83. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  84. package/dist/components/SelectedOutlineElement.js +9 -3
  85. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  86. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  87. package/dist/components/SelectedOutlineOverlay.js +152 -106
  88. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  89. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  90. package/dist/components/SelectedOutlinePolygon.js +21 -46
  91. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  92. package/dist/components/SelectedOutlineRenderer.js +32 -136
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  95. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  96. package/dist/components/SelectedOutlineUvControls.js +12 -7
  97. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  98. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  99. package/dist/components/SettingsModal.js +30 -3
  100. package/dist/components/SettingsModalFooter.d.ts +1 -0
  101. package/dist/components/SettingsModalFooter.js +7 -3
  102. package/dist/components/ShowOutlinesProvider.js +1 -1
  103. package/dist/components/SkillsSettings.d.ts +0 -1
  104. package/dist/components/SkillsSettings.js +13 -14
  105. package/dist/components/Splitter/SplitterElement.js +1 -2
  106. package/dist/components/TimeValue.js +1 -1
  107. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  108. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  109. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  111. package/dist/components/Timeline/TimelineColorField.js +1 -1
  112. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  113. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  114. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  115. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  116. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  117. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  118. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  119. package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
  120. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  122. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  124. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  125. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  126. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
  128. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  129. package/dist/components/Timeline/TimelineList.js +1 -1
  130. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  131. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  132. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  133. package/dist/components/Timeline/TimelineSelection.js +16 -9
  134. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  135. package/dist/components/Timeline/TimelineSequence.js +65 -21
  136. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
  139. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  140. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  141. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  142. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  143. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  144. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  145. package/dist/components/Timeline/TimelineTrack.js +1 -1
  146. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  147. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  148. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  149. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  150. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  151. package/dist/components/Timeline/TimelineViewport.js +10 -1
  152. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  153. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  154. package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
  155. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  156. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  157. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  158. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  159. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  160. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  161. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  162. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  163. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  164. package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
  165. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  166. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  167. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  168. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  169. package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
  170. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  171. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  172. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  173. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  174. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  175. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  176. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  177. package/dist/components/TimelineCombobox.js +1 -0
  178. package/dist/components/Transcription/Models.js +1 -1
  179. package/dist/components/Transcription/TranscriptionModal.js +18 -11
  180. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  181. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  182. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  183. package/dist/components/UpdatesSettings.js +2 -0
  184. package/dist/components/VideoMatting/Models.js +1 -1
  185. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  186. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  187. package/dist/components/WebMcp.js +23 -40
  188. package/dist/components/composition-drop-preview.d.ts +9 -2
  189. package/dist/components/composition-drop-preview.js +8 -4
  190. package/dist/components/composition-menu-items.js +4 -4
  191. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  192. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  193. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  194. package/dist/components/effect-drag-and-drop.js +19 -4
  195. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  196. package/dist/components/get-open-in-menu-items.js +24 -8
  197. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  198. package/dist/components/keyboard-shortcuts.js +3 -1
  199. package/dist/components/public-output-name.d.ts +1 -0
  200. package/dist/components/public-output-name.js +7 -3
  201. package/dist/components/selected-outline-drag.d.ts +1 -6
  202. package/dist/components/selected-outline-drag.js +22 -6
  203. package/dist/components/selected-outline-geometry.d.ts +2 -18
  204. package/dist/components/selected-outline-measurement.d.ts +23 -41
  205. package/dist/components/selected-outline-measurement.js +14 -252
  206. package/dist/components/selected-outline-order.d.ts +4 -11
  207. package/dist/components/selected-outline-order.js +2 -254
  208. package/dist/components/selected-outline-snap.d.ts +1 -1
  209. package/dist/components/selected-outline-snap.js +2 -1
  210. package/dist/components/selected-outline-types.d.ts +18 -28
  211. package/dist/components/selected-outline-uv.d.ts +4 -4
  212. package/dist/components/selected-outline-uv.js +6 -111
  213. package/dist/components/sequence-props-api.js +0 -10
  214. package/dist/components/use-selected-outline-control-target.js +12 -21
  215. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  216. package/dist/components/wrap-jsx-node-api.js +13 -0
  217. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  218. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  219. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
  220. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  221. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  222. package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
  223. package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
  224. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  225. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  226. package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
  227. package/dist/esm/index-890dd9b3.mjs +768 -0
  228. package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
  229. package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
  230. package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
  231. package/dist/esm/index-dfy1t576.mjs +129 -0
  232. package/dist/esm/index-dh3zk2hv.mjs +220 -0
  233. package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
  234. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  235. package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
  236. package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
  237. package/dist/esm/index-t7tbt980.mjs +103 -0
  238. package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
  239. package/dist/esm/index-wqc43mw0.mjs +158 -0
  240. package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
  241. package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
  242. package/dist/esm/index.mjs +4 -4
  243. package/dist/esm/internals.mjs +13 -10
  244. package/dist/esm/previewEntry.mjs +18 -12
  245. package/dist/esm/renderEntry.mjs +5 -1
  246. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
  247. package/dist/helpers/calculate-timeline.d.ts +5 -1
  248. package/dist/helpers/calculate-timeline.js +1 -1
  249. package/dist/helpers/checkerboard-background.d.ts +2 -2
  250. package/dist/helpers/colors.d.ts +132 -112
  251. package/dist/helpers/colors.js +117 -95
  252. package/dist/helpers/copy-text.js +1 -16
  253. package/dist/helpers/create-folder-tree.js +2 -1
  254. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  255. package/dist/helpers/editor-ruler.js +23 -12
  256. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  257. package/dist/helpers/get-connected-compositions.js +1 -1
  258. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  259. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  260. package/dist/helpers/get-sequence-visible-range.js +2 -5
  261. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  262. package/dist/helpers/get-timeline-nestedness.js +1 -1
  263. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  264. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  265. package/dist/helpers/hoverable.js +6 -5
  266. package/dist/helpers/inject-css.js +5 -7
  267. package/dist/helpers/open-in-editor.js +1 -1
  268. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  269. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  270. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  271. package/dist/helpers/resolve-studio-color.js +11 -0
  272. package/dist/helpers/studio-css-variables.d.ts +1 -0
  273. package/dist/helpers/studio-css-variables.js +105 -0
  274. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  275. package/dist/helpers/studio-pixel-ratio.js +7 -0
  276. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  277. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  278. package/dist/helpers/timeline-node-path-key.js +2 -2
  279. package/dist/helpers/use-keybinding.d.ts +1 -1
  280. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  281. package/dist/helpers/use-menu-structure.js +15 -9
  282. package/dist/helpers/use-runtime-values.js +2 -28
  283. package/dist/hot-middleware-client/client.js +5 -3
  284. package/dist/icons/align-center-horizontal.js +2 -1
  285. package/dist/icons/align-left.js +2 -1
  286. package/dist/icons/align-right.js +2 -1
  287. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  288. package/dist/icons/background-removal.js +9 -0
  289. package/dist/icons/wrap.d.ts +4 -0
  290. package/dist/icons/wrap.js +10 -0
  291. package/dist/previewEntry.js +2 -0
  292. package/dist/renderEntry.js +2 -0
  293. package/dist/state/modals.d.ts +20 -1
  294. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  295. package/dist/state/timeline-sequence-hover.js +6 -67
  296. package/dist/state/timeline-zoom.js +4 -0
  297. package/package.json +20 -19
  298. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  299. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  300. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  301. package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
  302. package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
  303. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  304. package/dist/esm/index-k426ye99.mjs +0 -139
  305. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  306. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  307. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  308. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  309. package/dist/icons/separation.js +0 -7
@@ -31,6 +31,7 @@ const computedContainerStyle = {
31
31
  ...InputDragger_1.inputDraggerContainerStyle,
32
32
  textAlign: 'right',
33
33
  userSelect: 'none',
34
+ WebkitUserSelect: 'none',
34
35
  };
35
36
  const computedValueStyle = {
36
37
  color: colors_1.WHITE_ALPHA_40,
@@ -39,10 +40,12 @@ const computedValueStyle = {
39
40
  fontStyle: 'italic',
40
41
  lineHeight: '20px',
41
42
  userSelect: 'none',
43
+ WebkitUserSelect: 'none',
42
44
  };
43
45
  const metadataFormatterStyle = {
44
46
  fontSize: 13,
45
47
  userSelect: 'none',
48
+ WebkitUserSelect: 'none',
46
49
  };
47
50
  const metadataDraggerStyles = {
48
51
  durationInFrames: {
@@ -113,6 +116,7 @@ const metadataLabelText = {
113
116
  overflow: 'hidden',
114
117
  textOverflow: 'ellipsis',
115
118
  userSelect: 'none',
119
+ WebkitUserSelect: 'none',
116
120
  whiteSpace: 'nowrap',
117
121
  };
118
122
  const dimensionPresets = [
@@ -113,6 +113,7 @@ const EasingInspector = ({ selection }) => {
113
113
  }
114
114
  return (0, easing_inspector_selection_1.getEasingSelectionFromCurrentKeyframes)({
115
115
  keyframeDisplayOffset: track.keyframeDisplayOffset,
116
+ keyframePlaybackRate: track.keyframePlaybackRate,
116
117
  nodePathInfo: selection.nodePathInfo,
117
118
  propStatus: easingUpdate.propStatus,
118
119
  segmentIndex: easingUpdate.segmentIndex,
@@ -123,6 +124,7 @@ const EasingInspector = ({ selection }) => {
123
124
  : (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
124
125
  propStatus: easingUpdate.propStatus,
125
126
  keyframeDisplayOffset: track.keyframeDisplayOffset,
127
+ keyframePlaybackRate: track.keyframePlaybackRate,
126
128
  });
127
129
  const state = (0, react_1.useMemo)(() => {
128
130
  if (initialEasing === null || currentEasingSelection === null) {
@@ -154,7 +156,8 @@ const EasingInspector = ({ selection }) => {
154
156
  previewServerState.type !== 'connected') {
155
157
  return;
156
158
  }
157
- const sourceFrame = timelinePosition - easingKeyframeDisplayOffset;
159
+ const sourceFrame = (timelinePosition - easingKeyframeDisplayOffset) *
160
+ track.keyframePlaybackRate;
158
161
  const value = remotion_1.Internals.getEffectiveVisualModeValue({
159
162
  propStatus: easingUpdate.propStatus,
160
163
  dragOverrideValue: easingDetails.dragOverrideValue,
@@ -208,7 +211,8 @@ const EasingInspector = ({ selection }) => {
208
211
  const renderHeader = (0, react_1.useCallback)(() => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
209
212
  jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: fieldLabel }), easingUpdate === null || track === null ? null : (jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: currentEasingSelection !== null && currentEasingSelection !== void 0 ? currentEasingSelection : selection, includeEasings: true, keyframes: easingUpdate.propStatus.keyframes.map((keyframe) => ({
210
213
  ...keyframe,
211
- frame: keyframe.frame + easingKeyframeDisplayOffset,
214
+ frame: keyframe.frame / track.keyframePlaybackRate +
215
+ easingKeyframeDisplayOffset,
212
216
  })), nodePathInfo: selection.nodePathInfo }))] })), [
213
217
  currentEasingSelection,
214
218
  easingUpdate,
@@ -45,6 +45,7 @@ const elementLibraryDropdownLabelStyle = {
45
45
  textAlign: 'left',
46
46
  textOverflow: 'ellipsis',
47
47
  userSelect: 'none',
48
+ WebkitUserSelect: 'none',
48
49
  whiteSpace: 'nowrap',
49
50
  };
50
51
  const elementLibraryDropdownCaretStyle = {
@@ -81,7 +82,7 @@ const ElementLibraryButton = () => {
81
82
  segmentId: 'element-library',
82
83
  selectedId: null,
83
84
  style: elementLibraryDropdownSegmentStyle,
84
- title: 'Choose an Element library to browse inside Studio.',
85
+ title: 'Choose an Element Library to browse inside Studio.',
85
86
  tooltipLabel: null,
86
87
  type: 'menu',
87
88
  values: [
@@ -98,7 +98,7 @@ const TimelineNavigatorItem = ({ extendLineLeft, extendLineRight, item, onSelect
98
98
  };
99
99
  const KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, nodePathInfo }) => {
100
100
  const { isSelected, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
101
- const setFrame = remotion_1.Internals.useTimelineSetFrame();
101
+ const setFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
102
102
  const videoConfig = (0, remotion_1.useVideoConfig)();
103
103
  const items = (0, react_1.useMemo)(() => (0, keyframe_easing_navigator_items_1.getKeyframeEasingNavigatorItems)({
104
104
  includeEasings,
@@ -12,9 +12,7 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
12
12
  const InputDragger_1 = require("../NewComposition/InputDragger");
13
13
  const call_delete_keyframe_1 = require("../Timeline/call-delete-keyframe");
14
14
  const call_move_keyframe_1 = require("../Timeline/call-move-keyframe");
15
- const get_easing_selection_after_keyframe_delete_1 = require("../Timeline/get-easing-selection-after-keyframe-delete");
16
15
  const get_timeline_keyframes_1 = require("../Timeline/get-timeline-keyframes");
17
- const imperative_state_1 = require("../Timeline/imperative-state");
18
16
  const parse_keyframe_field_from_node_path_1 = require("../Timeline/parse-keyframe-field-from-node-path");
19
17
  const TimelineEffectPropItem_1 = require("../Timeline/TimelineEffectPropItem");
20
18
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
@@ -80,7 +78,7 @@ const KeyframeInspector = ({ selection }) => {
80
78
  return null;
81
79
  }
82
80
  const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
83
- const { keyframeDisplayOffset } = track;
81
+ const { keyframeDisplayOffset, keyframePlaybackRate } = track;
84
82
  if (keyframeField.type === 'sequence') {
85
83
  const sequenceFields = (0, timeline_layout_1.getFieldsToShow)({
86
84
  schema: track.sequence.controls.schema,
@@ -100,18 +98,25 @@ const KeyframeInspector = ({ selection }) => {
100
98
  field: sequenceField,
101
99
  fieldLabel: (_d = sequenceField.description) !== null && _d !== void 0 ? _d : sequenceField.key,
102
100
  fileName: nodePath.absolutePath,
101
+ keyframePlaybackRate,
103
102
  keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
104
103
  propStatus: sequencePropStatus,
105
104
  keyframeDisplayOffset,
105
+ keyframePlaybackRate,
106
106
  }),
107
107
  nodePath,
108
108
  propStatus: sequencePropStatus,
109
109
  schema: track.sequence.controls.schema,
110
- sourceFrame: selection.frame -
111
- (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
110
+ sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
111
+ displayFrame: selection.frame,
112
+ propStatus: sequencePropStatus,
113
+ keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
112
114
  propStatus: sequencePropStatus,
113
115
  keyframeDisplayOffset,
116
+ keyframePlaybackRate,
114
117
  }),
118
+ keyframePlaybackRate,
119
+ }),
115
120
  };
116
121
  }
117
122
  const effect = track.sequence.effects[keyframeField.effectIndex];
@@ -143,18 +148,25 @@ const KeyframeInspector = ({ selection }) => {
143
148
  field: effectField,
144
149
  fieldLabel: (_g = effectField.description) !== null && _g !== void 0 ? _g : effectField.key,
145
150
  fileName: nodePath.absolutePath,
151
+ keyframePlaybackRate,
146
152
  keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
147
153
  propStatus: effectPropStatus,
148
154
  keyframeDisplayOffset,
155
+ keyframePlaybackRate,
149
156
  }),
150
157
  nodePath,
151
158
  propStatus: effectPropStatus,
152
159
  schema: effect.schema,
153
- sourceFrame: selection.frame -
154
- (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
160
+ sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
161
+ displayFrame: selection.frame,
162
+ propStatus: effectPropStatus,
163
+ keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
155
164
  propStatus: effectPropStatus,
156
165
  keyframeDisplayOffset,
166
+ keyframePlaybackRate,
157
167
  }),
168
+ keyframePlaybackRate,
169
+ }),
158
170
  validatedLocation: {
159
171
  source: nodePath.absolutePath,
160
172
  line: 1,
@@ -188,9 +200,11 @@ const KeyframeInspector = ({ selection }) => {
188
200
  if (details === null) {
189
201
  return;
190
202
  }
191
- const toFrame = (0, keyframe_inspector_frame_1.getInspectorKeyframeSourceFrame)({
203
+ const toFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
192
204
  displayFrame,
193
205
  keyframeDisplayOffset: details.keyframeDisplayOffset,
206
+ keyframePlaybackRate: details.keyframePlaybackRate,
207
+ propStatus: details.propStatus,
194
208
  });
195
209
  if (displayFrame === selection.frame || toFrame === details.sourceFrame) {
196
210
  clearFrameDragOverride(details);
@@ -227,9 +241,11 @@ const KeyframeInspector = ({ selection }) => {
227
241
  durationInFrames: videoConfig.durationInFrames,
228
242
  frame: value,
229
243
  });
230
- const toFrame = (0, keyframe_inspector_frame_1.getInspectorKeyframeSourceFrame)({
244
+ const toFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
231
245
  displayFrame,
232
246
  keyframeDisplayOffset: details.keyframeDisplayOffset,
247
+ keyframePlaybackRate: details.keyframePlaybackRate,
248
+ propStatus: details.propStatus,
233
249
  });
234
250
  setDraftFrame(displayFrame);
235
251
  clearFrameDragOverride(details);
@@ -289,19 +305,7 @@ const KeyframeInspector = ({ selection }) => {
289
305
  if (details === null || previewServerState.type !== 'connected') {
290
306
  return;
291
307
  }
292
- const easingSelection = (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction)
293
- ? (0, get_easing_selection_after_keyframe_delete_1.getEasingSelectionAfterKeyframeDelete)({
294
- deletedSourceFrames: [details.sourceFrame],
295
- keyframeDisplayOffset: details.keyframeDisplayOffset,
296
- nodePathInfo: selection.nodePathInfo,
297
- propStatus: details.propStatus,
298
- timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
299
- })
300
- : null;
301
- if (easingSelection !== null) {
302
- selectItems([easingSelection], { reveal: true });
303
- }
304
- else if (parentSelection !== null) {
308
+ if (parentSelection !== null) {
305
309
  selectItems([parentSelection], { reveal: true });
306
310
  }
307
311
  if (details.type === 'sequence') {
@@ -331,7 +335,6 @@ const KeyframeInspector = ({ selection }) => {
331
335
  parentSelection,
332
336
  previewServerState,
333
337
  selectItems,
334
- selection.nodePathInfo,
335
338
  setPropStatuses,
336
339
  ]);
337
340
  if (details === null || track === null) {
@@ -340,7 +343,8 @@ const KeyframeInspector = ({ selection }) => {
340
343
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
341
344
  jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: details.fieldLabel }), jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: selection, includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction), keyframes: details.propStatus.keyframes.map((keyframe) => ({
342
345
  ...keyframe,
343
- frame: keyframe.frame + details.keyframeDisplayOffset,
346
+ frame: keyframe.frame / details.keyframePlaybackRate +
347
+ details.keyframeDisplayOffset,
344
348
  })), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
345
349
  jsx_runtime_1.jsxs("div", { style: styles_1.detailsBeforeInlineAction, children: [
346
350
  jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorRow, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: details.fieldLabel, children: jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame, runtimeValueStore: null })) }) }) })
@@ -7,11 +7,14 @@ const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
8
  const calculate_timeline_1 = require("../../helpers/calculate-timeline");
9
9
  const colors_1 = require("../../helpers/colors");
10
+ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
10
11
  const timeline_layout_1 = require("../../helpers/timeline-layout");
12
+ const scissors_1 = require("../../icons/scissors");
11
13
  const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
12
14
  const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
13
15
  const layout_1 = require("../layout");
14
16
  const is_menu_item_1 = require("../Menu/is-menu-item");
17
+ const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
15
18
  const TimelineRowLayoutContext_1 = require("../Timeline/TimelineRowLayoutContext");
16
19
  const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
17
20
  const common_1 = require("./common");
@@ -28,8 +31,14 @@ const selectionCountStyle = {
28
31
  textOverflow: 'ellipsis',
29
32
  whiteSpace: 'nowrap',
30
33
  };
34
+ const actionIconStyle = {
35
+ display: 'block',
36
+ height: 16,
37
+ width: 16,
38
+ };
31
39
  const MultiSequenceInspector = ({ selections, readOnlyStudio }) => {
32
40
  const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
41
+ const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
33
42
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
34
43
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
35
44
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
@@ -93,11 +102,33 @@ const MultiSequenceInspector = ({ selections, readOnlyStudio }) => {
93
102
  });
94
103
  return ((_a = allFields[0]) !== null && _a !== void 0 ? _a : []).filter((field) => allFields.every((candidate) => candidate.some((other) => other.key === field.key && other.fieldSchema === field.fieldSchema)));
95
104
  }, [getDragOverrides, propStatuses, runtimeValues, targets]);
105
+ const canSplit = !readOnlyStudio && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
106
+ const onSplit = (0, react_1.useCallback)(() => {
107
+ var _a;
108
+ if (!canSplit) {
109
+ return;
110
+ }
111
+ (_a = (0, split_selected_timeline_item_1.splitSelectedTimelineItems)({
112
+ selections,
113
+ sequences,
114
+ overrideIdsToNodePaths: overrideIdToNodePathMappings,
115
+ propStatuses,
116
+ splitFrame: timelinePosition,
117
+ })) === null || _a === void 0 ? void 0 : _a.catch(() => undefined);
118
+ }, [
119
+ canSplit,
120
+ overrideIdToNodePathMappings,
121
+ propStatuses,
122
+ selections,
123
+ sequences,
124
+ timelinePosition,
125
+ ]);
96
126
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
97
127
  jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { padding: "4px 0", children: jsx_runtime_1.jsxs("div", { style: selectionCountStyle, children: [selections.length, " sequences selected"] }) }), jsx_runtime_1.jsx("div", { role: "separator", style: styles_1.sequenceHeaderDivider }), targets === null ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence controls unavailable" })) : fields.length === 0 ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "No shared controls" })) : (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: timeline_layout_1.SCHEMA_FIELD_GROUPS.map((group) => {
98
128
  const groupedFields = fields.filter((field) => field.group === group.id);
99
129
  return groupedFields.length === 0 ? null : (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: group.label, sectionId: `multi-sequence-${group.id}`, children: groupedFields.map((field) => (jsx_runtime_1.jsx(MultiSequenceField_1.MultiSequenceField, { field: field, targets: targets, readOnlyStudio: readOnlyStudio }, JSON.stringify(targets.map((target) => target.nodePath)) +
100
130
  field.key))) }, group.id));
101
- }) }))] }));
131
+ }) })), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "multi-sequence-actions", children: jsx_runtime_1.jsx(common_1.InspectorQuickActionsSection, { children: jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canSplit, onClick: onSplit, title: canSplit ? undefined : 'Studio is read-only', renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split selected" }) }) })
132
+ ] }));
102
133
  };
103
134
  exports.MultiSequenceInspector = MultiSequenceInspector;
@@ -63,7 +63,7 @@ const NumericAxis = ({ field, values, axis, onPreview, onSave, onClear }) => {
63
63
  }
64
64
  }, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : coordinates[0], "aria-label": axis === null
65
65
  ? ((_d = field.description) !== null && _d !== void 0 ? _d : field.key)
66
- : `Offset ${['X', 'Y', 'Z'][axis]}`, title: "Type to set all values; drag to adjust each value", status: "ok", small: true, rightAlign: false, min: min, max: max, step: step, snapToStep: axis === null, dragDecimalPlaces: decimalPlaces, dragSensitivity: axis === null ? 1 : 3, buttonStyle: { paddingLeft: 0 }, style: { width: 70 }, formatter: (value) => mixed && dragValue === null
66
+ : `Offset ${['X', 'Y', 'Z'][axis]}`, title: "Type to set all values; drag to adjust each value", status: "ok", small: true, rightAlign: false, min: min, max: max, step: step, allowStepMismatch: true, integerOnly: schema.type === 'number' && schema.integer === true, snapToStep: axis === null, dragDecimalPlaces: decimalPlaces, dragSensitivity: axis === null ? 1 : 3, buttonStyle: { paddingLeft: 0 }, style: { width: 70 }, formatter: (value) => mixed && dragValue === null
67
67
  ? 'Mixed'
68
68
  : (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({ fieldSchema: schema, value }), onTextChange: noop_1.noop, onValueChange: (value, source) => {
69
69
  var _a;
@@ -6,7 +6,9 @@ type SequenceInspectorSourceLocation = {
6
6
  readonly openFileLocation: () => void;
7
7
  readonly validatedLocation: CodePosition | null;
8
8
  };
9
- export declare const useSequenceInspectorSourceLocation: (sequence: import("remotion").TSequence) => SequenceInspectorSourceLocation;
9
+ export declare const useSequenceInspectorSourceLocation: (sequence: import("remotion").TSequence & {
10
+ loopDisplay: import("@remotion/canvas").TimelineLoopDisplay | undefined;
11
+ }) => SequenceInspectorSourceLocation;
10
12
  export declare const SequenceInspectorHeader: React.FC<{
11
13
  readonly sourceLocation: SequenceInspectorSourceLocation;
12
14
  readonly track: TimelineTrackData;
@@ -6,15 +6,20 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
8
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
9
+ const use_media_metadata_1 = require("../../helpers/use-media-metadata");
9
10
  const audio_1 = require("../../icons/audio");
11
+ const background_removal_1 = require("../../icons/background-removal");
10
12
  const duplicate_1 = require("../../icons/duplicate");
11
13
  const scissors_1 = require("../../icons/scissors");
12
14
  const snowflake_1 = require("../../icons/snowflake");
15
+ const transcription_1 = require("../../icons/transcription");
13
16
  const trash_1 = require("../../icons/trash");
17
+ const modals_1 = require("../../state/modals");
14
18
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
15
19
  const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
16
20
  const is_menu_item_1 = require("../Menu/is-menu-item");
17
21
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
22
+ const public_output_name_1 = require("../public-output-name");
18
23
  const split_video_from_audio_api_1 = require("../split-video-from-audio-api");
19
24
  const duplicate_selected_timeline_item_1 = require("../Timeline/duplicate-selected-timeline-item");
20
25
  const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
@@ -26,6 +31,7 @@ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
26
31
  const common_1 = require("./common");
27
32
  const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
28
33
  const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
34
+ const SequenceWrapAction_1 = require("./SequenceWrapAction");
29
35
  const styles_1 = require("./styles");
30
36
  const use_track_for_selection_1 = require("./use-track-for-selection");
31
37
  const actionIconStyle = {
@@ -70,8 +76,10 @@ const SplitSequenceQuickAction = ({ selection, track }) => {
70
76
  return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canSplit, onClick: onSplit, title: disabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split clip" }));
71
77
  };
72
78
  const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
79
+ var _a;
73
80
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
74
81
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
82
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
75
83
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
76
84
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
77
85
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
@@ -90,6 +98,66 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
90
98
  validatedSource,
91
99
  });
92
100
  const sourceActionsDisabled = previewServerState.type !== 'connected' || !(0, interactivity_enabled_1.isStudioInteractivityEnabled)();
101
+ const mediaSequence = track.sequence.type === 'video' || track.sequence.type === 'audio'
102
+ ? track.sequence
103
+ : null;
104
+ const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)((_a = mediaSequence === null || mediaSequence === void 0 ? void 0 : mediaSequence.src) !== null && _a !== void 0 ? _a : null);
105
+ const transcriptionDisabledReason = sourceActionsDisabled
106
+ ? 'Studio is read-only'
107
+ : selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
108
+ ? 'Programmatically duplicated media cannot be transcribed from source'
109
+ : undefined;
110
+ const videoMattingDisabledReason = sourceActionsDisabled
111
+ ? 'Studio is read-only'
112
+ : selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
113
+ ? 'Programmatically duplicated videos cannot have their background removed from source'
114
+ : undefined;
115
+ const onGenerateCaptions = (0, react_1.useCallback)(() => {
116
+ if (transcriptionDisabledReason !== undefined || mediaSequence === null) {
117
+ return;
118
+ }
119
+ const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
120
+ setSelectedModal({
121
+ type: 'transcribe',
122
+ src: mediaSequence.src,
123
+ displayName: (0, public_output_name_1.getMediaFileName)(mediaSequence.src, mediaSequence.displayName),
124
+ audioStreamIndex: null,
125
+ requestInit: null,
126
+ target: {
127
+ fileName: nodePath.absolutePath,
128
+ nodePath,
129
+ durationInFrames: Number.isFinite(mediaSequence.duration)
130
+ ? mediaSequence.duration
131
+ : null,
132
+ },
133
+ });
134
+ }, [
135
+ selection.nodePathInfo,
136
+ setSelectedModal,
137
+ mediaSequence,
138
+ transcriptionDisabledReason,
139
+ ]);
140
+ const onRemoveBackground = (0, react_1.useCallback)(() => {
141
+ if (videoMattingDisabledReason !== undefined ||
142
+ track.sequence.type !== 'video') {
143
+ return;
144
+ }
145
+ const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
146
+ setSelectedModal({
147
+ type: 'video-matting',
148
+ src: track.sequence.src,
149
+ displayName: (0, public_output_name_1.getMediaFileName)(track.sequence.src, track.sequence.displayName),
150
+ target: {
151
+ fileName: nodePath.absolutePath,
152
+ nodePath,
153
+ },
154
+ });
155
+ }, [
156
+ selection.nodePathInfo,
157
+ setSelectedModal,
158
+ track.sequence,
159
+ videoMattingDisabledReason,
160
+ ]);
93
161
  const onDuplicate = (0, react_1.useCallback)(() => {
94
162
  if (sourceActionsDisabled) {
95
163
  return;
@@ -125,7 +193,7 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
125
193
  (0, NotificationCenter_1.showNotification)(err.message, 4000);
126
194
  });
127
195
  }, [selection.nodePathInfo, splitVideoFromAudioDisabledReason]);
128
- return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: splitVideoFromAudioDisabledReason !== undefined, onClick: onSplitVideoFromAudio, title: splitVideoFromAudioDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(audio_1.AudioIcon, { style: actionIconStyle, color: color })), children: "Split video from audio" })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
196
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: videoMattingDisabledReason !== undefined, onClick: onRemoveBackground, title: videoMattingDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(background_removal_1.BackgroundRemovalIcon, { style: actionIconStyle, color: color })), children: "Remove background" })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: splitVideoFromAudioDisabledReason !== undefined, onClick: onSplitVideoFromAudio, title: splitVideoFromAudioDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(audio_1.AudioIcon, { style: actionIconStyle, color: color })), children: "Split video from audio" })) : null, mediaSequence !== null && (mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.hasAudioTrack) !== false ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: transcriptionDisabledReason !== undefined, onClick: onGenerateCaptions, title: transcriptionDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { style: actionIconStyle, color: color })), children: "Generate captions" })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(SequenceWrapAction_1.SequenceWrapAction, { nodePathInfo: selection.nodePathInfo, sequence: track.sequence, sourceActionsDisabled: sourceActionsDisabled }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
129
197
  };
130
198
  const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
131
199
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
@@ -170,7 +238,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
170
238
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
171
239
  }
172
240
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
173
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "sequence-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
241
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, keyframePlaybackRate: track.keyframePlaybackRate, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "sequence-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
174
242
  jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
175
243
  ] }) })
176
244
  ] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
+ import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
4
+ export declare const SequenceWrapAction: React.FC<{
5
+ readonly nodePathInfo: SequenceNodePathInfo;
6
+ readonly sequence: TimelineTrackData['sequence'];
7
+ readonly sourceActionsDisabled: boolean;
8
+ }>;
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SequenceWrapAction = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const colors_1 = require("../../helpers/colors");
8
+ const caret_1 = require("../../icons/caret");
9
+ const wrap_1 = require("../../icons/wrap");
10
+ const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
11
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
12
+ const SegmentedButton_1 = require("../SegmentedButton");
13
+ const wrap_jsx_node_api_1 = require("../wrap-jsx-node-api");
14
+ const wrapperNames = ['AbsoluteFill', 'Sequence', 'HtmlInCanvas'];
15
+ const buttonStyle = {
16
+ borderRadius: 4,
17
+ height: 28,
18
+ margin: '0 4px',
19
+ width: 'calc(100% - 8px)',
20
+ };
21
+ const segmentStyle = {
22
+ fontSize: 13,
23
+ gap: 8,
24
+ justifyContent: 'flex-start',
25
+ padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
26
+ width: '100%',
27
+ };
28
+ const iconStyle = { height: 22, width: 22 };
29
+ const iconContainerStyle = {
30
+ flexShrink: 0,
31
+ height: 22,
32
+ marginLeft: -2,
33
+ marginRight: -2,
34
+ width: 22,
35
+ };
36
+ const labelStyle = {
37
+ flex: 1,
38
+ fontFamily: 'sans-serif',
39
+ fontSize: 13,
40
+ lineHeight: '18px',
41
+ minWidth: 0,
42
+ overflow: 'hidden',
43
+ textAlign: 'left',
44
+ textOverflow: 'ellipsis',
45
+ userSelect: 'none',
46
+ WebkitUserSelect: 'none',
47
+ whiteSpace: 'nowrap',
48
+ };
49
+ const caretStyle = {
50
+ display: 'flex',
51
+ flexShrink: 0,
52
+ height: 12,
53
+ width: 12,
54
+ };
55
+ const SequenceWrapAction = ({ nodePathInfo, sequence, sourceActionsDisabled }) => {
56
+ const { width, height } = (0, remotion_1.useVideoConfig)();
57
+ const nodePathKey = JSON.stringify(nodePathInfo.sequenceSubscriptionKey);
58
+ const [eligibility, setEligibility] = (0, react_1.useState)(null);
59
+ const [busy, setBusy] = (0, react_1.useState)(false);
60
+ (0, react_1.useEffect)(() => {
61
+ setEligibility(null);
62
+ if (sourceActionsDisabled) {
63
+ return;
64
+ }
65
+ let cancelled = false;
66
+ const nodePath = JSON.parse(nodePathKey);
67
+ (0, wrap_jsx_node_api_1.wrapJsxNode)({
68
+ fileName: nodePath.absolutePath,
69
+ nodePath: nodePath.nodePath,
70
+ wrapper: null,
71
+ width: null,
72
+ height: null,
73
+ })
74
+ .then((result) => {
75
+ if (!cancelled && result.success) {
76
+ setEligibility({
77
+ canWrap: result.canWrap,
78
+ canWrapHtmlInCanvas: result.canWrapHtmlInCanvas,
79
+ });
80
+ }
81
+ })
82
+ .catch(() => undefined);
83
+ return () => {
84
+ cancelled = true;
85
+ };
86
+ }, [nodePathKey, sequence, sourceActionsDisabled]);
87
+ const onWrap = (0, react_1.useCallback)((wrapper) => {
88
+ if (busy || sourceActionsDisabled || !(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrap)) {
89
+ return;
90
+ }
91
+ setBusy(true);
92
+ const nodePath = JSON.parse(nodePathKey);
93
+ (0, wrap_jsx_node_api_1.wrapJsxNode)({
94
+ fileName: nodePath.absolutePath,
95
+ nodePath: nodePath.nodePath,
96
+ wrapper,
97
+ width,
98
+ height,
99
+ })
100
+ .then((result) => {
101
+ if (!result.success) {
102
+ (0, NotificationCenter_1.showNotification)(result.reason, 4000);
103
+ }
104
+ })
105
+ .catch((error) => {
106
+ (0, NotificationCenter_1.showNotification)(error.message, 4000);
107
+ })
108
+ .finally(() => setBusy(false));
109
+ }, [busy, eligibility, height, nodePathKey, sourceActionsDisabled, width]);
110
+ const values = (0, react_1.useMemo)(() => wrapperNames.map((wrapper) => ({
111
+ type: 'item',
112
+ id: wrapper,
113
+ label: `<${wrapper}>`,
114
+ value: wrapper,
115
+ onClick: () => onWrap(wrapper),
116
+ keyHint: null,
117
+ leftItem: null,
118
+ subMenu: null,
119
+ quickSwitcherLabel: null,
120
+ disabled: busy ||
121
+ (wrapper === 'HtmlInCanvas' &&
122
+ (!(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrapHtmlInCanvas) || !(0, remotion_1.isHtmlInCanvasSupported)())),
123
+ })), [busy, eligibility, onWrap]);
124
+ const segments = (0, react_1.useMemo)(() => [
125
+ {
126
+ ariaLabel: 'Wrap',
127
+ buttonId: null,
128
+ disabled: busy,
129
+ idleColor: colors_1.LIGHT_TEXT,
130
+ leaveLeftSpace: false,
131
+ onOpenChange: null,
132
+ renderContent: (color) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
133
+ jsx_runtime_1.jsx("span", { style: iconContainerStyle, children: jsx_runtime_1.jsx(wrap_1.WrapIcon, { color: color, style: iconStyle }) }), jsx_runtime_1.jsx("span", { style: labelStyle, children: "Wrap" }), jsx_runtime_1.jsx("span", { style: caretStyle, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }) })
134
+ ] })),
135
+ segmentId: 'wrap',
136
+ selectedId: null,
137
+ style: segmentStyle,
138
+ title: nodePathInfo.numberOfSequencesWithThisNodePath > 1
139
+ ? `Wrap all ${nodePathInfo.numberOfSequencesWithThisNodePath} instances of this JSX element`
140
+ : 'Wrap this JSX element',
141
+ tooltipLabel: null,
142
+ type: 'menu',
143
+ values,
144
+ },
145
+ ], [busy, nodePathInfo.numberOfSequencesWithThisNodePath, values]);
146
+ if (!(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrap) || sourceActionsDisabled) {
147
+ return null;
148
+ }
149
+ return (jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: buttonStyle, title: null }));
150
+ };
151
+ exports.SequenceWrapAction = SequenceWrapAction;
@@ -89,6 +89,7 @@ const inlineLabelText = {
89
89
  overflow: 'hidden',
90
90
  textOverflow: 'ellipsis',
91
91
  userSelect: 'none',
92
+ WebkitUserSelect: 'none',
92
93
  whiteSpace: 'nowrap',
93
94
  };
94
95
  const inlineLabelIcon = {
@@ -1,7 +1,8 @@
1
1
  import type { CanUpdateSequencePropStatusKeyframed } from 'remotion';
2
2
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
- export declare const getEasingSelectionFromCurrentKeyframes: ({ keyframeDisplayOffset, nodePathInfo, propStatus, segmentIndex, }: {
3
+ export declare const getEasingSelectionFromCurrentKeyframes: ({ keyframeDisplayOffset, keyframePlaybackRate, nodePathInfo, propStatus, segmentIndex, }: {
4
4
  readonly keyframeDisplayOffset: number;
5
+ readonly keyframePlaybackRate: number;
5
6
  readonly nodePathInfo: SequenceNodePathInfo;
6
7
  readonly propStatus: CanUpdateSequencePropStatusKeyframed;
7
8
  readonly segmentIndex: number;