@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
@@ -0,0 +1,768 @@
1
+ import {
2
+ HigherZIndex,
3
+ getPortal,
4
+ useZIndex
5
+ } from "./index-qve7mdfp.mjs";
6
+ import {
7
+ BACKGROUND,
8
+ BLUE,
9
+ BORDER_BLACK,
10
+ CURRENT_COLOR,
11
+ CURRENT_COLOR_LOWERCASE,
12
+ FAIL_COLOR,
13
+ LIGHT_TEXT,
14
+ SHADOW_BLACK,
15
+ SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM,
16
+ SHADOW_BLACK_ALPHA_50_TOWARDS_TOP,
17
+ TIMELINE_BACKGROUND_COLOR,
18
+ TRANSPARENT,
19
+ WARNING_COLOR,
20
+ WHITE,
21
+ WHITE_ALPHA_10,
22
+ WHITE_ALPHA_20,
23
+ WHITE_ALPHA_90,
24
+ getBackgroundFromHoverState
25
+ } from "./index-wqc43mw0.mjs";
26
+
27
+ // src/components/layout.tsx
28
+ import { useMemo } from "react";
29
+ import { jsx } from "react/jsx-runtime";
30
+ var SPACING_UNIT = 8;
31
+ var COMPACT_CONTROL_ROW_HEIGHT = 28;
32
+ var COMPACT_INLINE_ROW_HEIGHT = 22;
33
+ var Spacing = ({ x = 0, y = 0, block = false }) => {
34
+ const style = useMemo(() => {
35
+ return {
36
+ display: block ? "block" : "inline-block",
37
+ width: x * SPACING_UNIT,
38
+ height: y * SPACING_UNIT,
39
+ flexShrink: 0
40
+ };
41
+ }, [block, x, y]);
42
+ return /* @__PURE__ */ jsx("div", {
43
+ style
44
+ });
45
+ };
46
+ var flexCss = { flex: 1 };
47
+ var Flex = ({ children }) => /* @__PURE__ */ jsx("div", {
48
+ style: flexCss,
49
+ children
50
+ });
51
+ var Row = ({ children, justify, className, align, flex, style = {}, ...other }) => {
52
+ const finalStyle = useMemo(() => {
53
+ return {
54
+ ...style,
55
+ display: "flex",
56
+ flexDirection: "row",
57
+ justifyContent: justify ?? "flex-start",
58
+ alignItems: align ?? "flex-start",
59
+ flex: flex ?? undefined
60
+ };
61
+ }, [align, flex, justify, style]);
62
+ return /* @__PURE__ */ jsx("div", {
63
+ className,
64
+ style: finalStyle,
65
+ ...other,
66
+ children
67
+ });
68
+ };
69
+ var Column = ({ children, justify, className, align, style = {} }) => {
70
+ const finalStyle = useMemo(() => {
71
+ return {
72
+ ...style,
73
+ display: "flex",
74
+ flexDirection: "column",
75
+ justifyContent: justify ?? "flex-start",
76
+ alignItems: align ?? "flex-start"
77
+ };
78
+ }, [align, justify, style]);
79
+ return /* @__PURE__ */ jsx("div", {
80
+ className,
81
+ style: finalStyle,
82
+ children
83
+ });
84
+ };
85
+
86
+ // src/components/InlineAction.tsx
87
+ import { useCallback, useMemo as useMemo2 } from "react";
88
+
89
+ // src/helpers/hoverable.ts
90
+ var HOVERABLE_CLASS_NAME = "__remotion-hoverable";
91
+ var HOVER_GROUP_CLASS_NAME = "__remotion-hover-group";
92
+ var HOVER_GROUP_REVEAL_CLASS_NAME = "__remotion-hover-group-reveal";
93
+ var FOCUS_VISIBLE_ONLY_CLASS_NAME = "__remotion-focus-visible-only";
94
+ var BG_VARIABLE = "--remotion-studio-hoverable-bg";
95
+ var HOVER_BG_VARIABLE = "--remotion-studio-hoverable-hover-bg";
96
+ var COLOR_VARIABLE = "--remotion-studio-hoverable-color";
97
+ var HOVER_COLOR_VARIABLE = "--remotion-studio-hoverable-hover-color";
98
+ var NO_HOVER_BACKGROUND_STYLE = {
99
+ [HOVER_BG_VARIABLE]: TRANSPARENT
100
+ };
101
+ var hoverableStyle = ({
102
+ idleBackground,
103
+ hoverBackground,
104
+ idleColor,
105
+ hoverColor
106
+ }) => {
107
+ return {
108
+ [BG_VARIABLE]: idleBackground,
109
+ [HOVER_BG_VARIABLE]: hoverBackground,
110
+ [COLOR_VARIABLE]: idleColor,
111
+ [HOVER_COLOR_VARIABLE]: hoverColor
112
+ };
113
+ };
114
+ var hoverable = `.${HOVERABLE_CLASS_NAME}.${HOVERABLE_CLASS_NAME}`;
115
+ var hoverGroup = `.${HOVER_GROUP_CLASS_NAME}`;
116
+ var reveal = `.${HOVER_GROUP_REVEAL_CLASS_NAME}.${HOVER_GROUP_REVEAL_CLASS_NAME}`;
117
+ var makeHoverableCSS = () => `
118
+ ${hoverable} {
119
+ background-color: var(${BG_VARIABLE}, ${TRANSPARENT});
120
+ }
121
+
122
+ ${hoverable},
123
+ ${hoverable} * {
124
+ color: var(${COLOR_VARIABLE}, inherit);
125
+ }
126
+
127
+ ${hoverGroup} ${reveal} {
128
+ flex-shrink: 0;
129
+ }
130
+
131
+ @media (hover: hover) {
132
+ ${hoverable}:hover {
133
+ background-color: var(${HOVER_BG_VARIABLE}, var(${BG_VARIABLE}, ${TRANSPARENT}));
134
+ }
135
+
136
+ ${hoverable}:hover,
137
+ ${hoverable}:hover * {
138
+ color: var(${HOVER_COLOR_VARIABLE}, var(${COLOR_VARIABLE}, inherit));
139
+ }
140
+
141
+ /* An outer hoverable must not put a nested inline action into its hover
142
+ state. The nested action should only use its hover color when the
143
+ pointer is over the action itself. */
144
+ ${hoverable}:hover ${hoverable}:not(:hover),
145
+ ${hoverable}:hover ${hoverable}:not(:hover) * {
146
+ color: var(${COLOR_VARIABLE}, inherit);
147
+ }
148
+
149
+ ${hoverGroup} ${reveal} {
150
+ opacity: 0;
151
+ width: 0;
152
+ overflow: hidden;
153
+ }
154
+
155
+ ${hoverGroup}:hover ${reveal},
156
+ ${hoverGroup}:has([aria-expanded="true"]) ${reveal} {
157
+ opacity: 1;
158
+ width: auto;
159
+ overflow: visible;
160
+ }
161
+ }
162
+ `;
163
+
164
+ // src/components/InlineAction.tsx
165
+ import { jsx as jsx2 } from "react/jsx-runtime";
166
+ var InlineAction = ({
167
+ renderAction,
168
+ onClick,
169
+ disabled,
170
+ title,
171
+ hoveredColor = WHITE,
172
+ unhoveredColor = LIGHT_TEXT,
173
+ variant,
174
+ style: customStyle,
175
+ className,
176
+ onPointerDown: onPointerDownProp,
177
+ ...buttonProps
178
+ }) => {
179
+ const { tabIndex } = useZIndex();
180
+ const onPointerDown = useCallback((event) => {
181
+ onPointerDownProp?.(event);
182
+ if (event.button !== 0) {
183
+ return;
184
+ }
185
+ if (document.activeElement instanceof HTMLElement) {
186
+ document.activeElement.blur();
187
+ }
188
+ event.preventDefault();
189
+ }, [onPointerDownProp]);
190
+ const style = useMemo2(() => {
191
+ return {
192
+ border: "none",
193
+ height: 24,
194
+ width: variant === "compact" ? 14 : 24,
195
+ padding: 0,
196
+ display: "inline-flex",
197
+ justifyContent: "center",
198
+ alignItems: "center",
199
+ borderRadius: 3,
200
+ opacity: disabled ? 0.5 : 1,
201
+ pointerEvents: disabled ? "none" : "auto",
202
+ ...hoverableStyle({
203
+ idleBackground: TRANSPARENT,
204
+ hoverBackground: disabled ? TRANSPARENT : getBackgroundFromHoverState({ hovered: true, selected: false }),
205
+ idleColor: unhoveredColor,
206
+ hoverColor: disabled ? unhoveredColor : hoveredColor
207
+ }),
208
+ ...customStyle
209
+ };
210
+ }, [customStyle, disabled, hoveredColor, unhoveredColor, variant]);
211
+ return /* @__PURE__ */ jsx2("button", {
212
+ ...buttonProps,
213
+ type: "button",
214
+ className: className ? `${HOVERABLE_CLASS_NAME} ${className}` : HOVERABLE_CLASS_NAME,
215
+ disabled,
216
+ onClick,
217
+ onPointerDown,
218
+ style,
219
+ tabIndex,
220
+ title,
221
+ "aria-label": buttonProps["aria-label"] ?? title,
222
+ children: renderAction(CURRENT_COLOR)
223
+ });
224
+ };
225
+
226
+ // src/components/Menu/is-menu-item.tsx
227
+ var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
228
+ var MENU_ITEM_CLASSNAME = "__remotion-studio-menu-item";
229
+ var HORIZONTAL_SCROLLBAR_CLASSNAME = "__remotion-horizontal-scrollbar";
230
+ var VERTICAL_SCROLLBAR_CLASSNAME = "__remotion-vertical-scrollbar";
231
+ var isMenuItem = (el) => {
232
+ return Boolean(el.classList.contains(MENU_ITEM_CLASSNAME) || el.closest(`.${MENU_ITEM_CLASSNAME}`) || el.classList.contains(MENU_INITIATOR_CLASSNAME) || el.closest(`.${MENU_INITIATOR_CLASSNAME}`));
233
+ };
234
+
235
+ // src/components/NewComposition/ValidationMessage.tsx
236
+ import { useMemo as useMemo3 } from "react";
237
+ import { jsx as jsx3, jsxs, Fragment } from "react/jsx-runtime";
238
+ var WarningTriangle = (props) => {
239
+ return /* @__PURE__ */ jsx3("svg", {
240
+ viewBox: "0 0 576 512",
241
+ ...props,
242
+ children: /* @__PURE__ */ jsx3("path", {
243
+ d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z"
244
+ })
245
+ });
246
+ };
247
+ var style = {
248
+ width: 12,
249
+ height: 12,
250
+ flexShrink: 0
251
+ };
252
+ var compactStyle = {
253
+ ...style,
254
+ width: 10,
255
+ height: 10
256
+ };
257
+ var container = {
258
+ width: "100%",
259
+ maxWidth: 500,
260
+ minWidth: 0
261
+ };
262
+ var row = {
263
+ minWidth: 0
264
+ };
265
+ var label = {
266
+ fontSize: 13,
267
+ color: WHITE,
268
+ fontFamily: "sans-serif",
269
+ minWidth: 0,
270
+ whiteSpace: "normal",
271
+ overflowWrap: "anywhere"
272
+ };
273
+ var compactLabel = {
274
+ ...label,
275
+ fontSize: 12
276
+ };
277
+ var ValidationMessage = ({ message, align, type, action, size = "default" }) => {
278
+ const iconStyle = size === "compact" ? compactStyle : style;
279
+ const labelStyle = size === "compact" ? compactLabel : label;
280
+ const finalStyle = useMemo3(() => {
281
+ return {
282
+ ...iconStyle,
283
+ fill: type === "warning" ? WARNING_COLOR : FAIL_COLOR
284
+ };
285
+ }, [iconStyle, type]);
286
+ return /* @__PURE__ */ jsx3("div", {
287
+ style: container,
288
+ children: /* @__PURE__ */ jsxs(Row, {
289
+ align: "center",
290
+ justify: align,
291
+ style: row,
292
+ children: [
293
+ /* @__PURE__ */ jsx3(WarningTriangle, {
294
+ style: finalStyle
295
+ }),
296
+ /* @__PURE__ */ jsx3(Spacing, {
297
+ x: size === "compact" ? 0.75 : 1
298
+ }),
299
+ /* @__PURE__ */ jsx3("div", {
300
+ style: labelStyle,
301
+ children: message
302
+ }),
303
+ action ? /* @__PURE__ */ jsxs(Fragment, {
304
+ children: [
305
+ /* @__PURE__ */ jsx3(Spacing, {
306
+ x: size === "compact" ? 0.75 : 1
307
+ }),
308
+ action
309
+ ]
310
+ }) : null
311
+ ]
312
+ })
313
+ });
314
+ };
315
+
316
+ // src/components/ModalContainer.tsx
317
+ import { useCallback as useCallback2 } from "react";
318
+ import { jsx as jsx4 } from "react/jsx-runtime";
319
+ var padding = 20;
320
+ var getMaxModalWidth = (width) => {
321
+ return `min(calc(100vw - ${padding * 2}px), calc(${width}px - ${padding * 2}px))`;
322
+ };
323
+ var getMaxModalHeight = (height) => {
324
+ return `min(calc(100vh - ${padding * 2}px), calc(${height}px - ${padding * 2}px))`;
325
+ };
326
+ var backgroundOverlay = {
327
+ backgroundColor: WHITE_ALPHA_20,
328
+ backdropFilter: `blur(1px)`,
329
+ position: "fixed",
330
+ height: "100%",
331
+ width: "100%",
332
+ display: "flex",
333
+ padding
334
+ };
335
+ var panel = {
336
+ backgroundColor: BACKGROUND,
337
+ boxShadow: SHADOW_BLACK,
338
+ color: WHITE,
339
+ margin: "auto"
340
+ };
341
+ var ModalContainer = ({
342
+ ariaLabel,
343
+ ariaLabelledBy,
344
+ children,
345
+ onEscape,
346
+ onOutsideClick,
347
+ noZIndex,
348
+ panelStyle
349
+ }) => {
350
+ const onPointerDown = useCallback2((e) => {
351
+ e.stopPropagation();
352
+ }, []);
353
+ return /* @__PURE__ */ jsx4("div", {
354
+ "aria-label": ariaLabel,
355
+ "aria-labelledby": ariaLabelledBy ?? undefined,
356
+ "aria-modal": "true",
357
+ className: "css-reset",
358
+ role: "dialog",
359
+ style: backgroundOverlay,
360
+ onPointerDown,
361
+ children: /* @__PURE__ */ jsx4(HigherZIndex, {
362
+ disabled: noZIndex,
363
+ onOutsideClick,
364
+ onEscape,
365
+ children: /* @__PURE__ */ jsx4("div", {
366
+ style: { ...panel, ...panelStyle },
367
+ children
368
+ })
369
+ })
370
+ });
371
+ };
372
+
373
+ // src/components/RenderModal/render-modals.ts
374
+ var outerModalStyle = {
375
+ width: getMaxModalWidth(800),
376
+ height: getMaxModalHeight(490),
377
+ overflow: "hidden",
378
+ display: "flex",
379
+ flexDirection: "column"
380
+ };
381
+ var container2 = {
382
+ display: "flex",
383
+ flexDirection: "row",
384
+ alignItems: "center",
385
+ padding: "12px 16px",
386
+ borderBottom: BORDER_BLACK
387
+ };
388
+ var optionsPanel = {
389
+ display: "flex",
390
+ flex: 1,
391
+ minHeight: 0,
392
+ minWidth: 0,
393
+ overflowY: "auto"
394
+ };
395
+ var horizontalLayout = {
396
+ display: "flex",
397
+ flexDirection: "row",
398
+ flex: 1,
399
+ minHeight: 0,
400
+ overflow: "hidden"
401
+ };
402
+ var leftSidebar = {
403
+ flexShrink: 0,
404
+ display: "flex",
405
+ flexDirection: "column",
406
+ padding: 6
407
+ };
408
+ var horizontalTab = {
409
+ flex: "none",
410
+ width: 150,
411
+ display: "flex",
412
+ flexDirection: "row",
413
+ alignItems: "center",
414
+ textAlign: "left",
415
+ fontSize: 14,
416
+ fontWeight: "normal",
417
+ paddingLeft: 8,
418
+ paddingTop: 6,
419
+ paddingBottom: 6,
420
+ borderRadius: 4
421
+ };
422
+ var iconContainer = {
423
+ width: 18,
424
+ height: 18,
425
+ marginRight: 8,
426
+ color: "inherit",
427
+ display: "inline-flex",
428
+ justifyContent: "center",
429
+ alignItems: "center"
430
+ };
431
+ var icon = {
432
+ color: "inherit",
433
+ height: 18
434
+ };
435
+ var buttonStyle = {
436
+ backgroundColor: BLUE,
437
+ color: WHITE
438
+ };
439
+ var flexer = {
440
+ flex: 1
441
+ };
442
+
443
+ // src/icons/models.tsx
444
+ import { jsx as jsx5 } from "react/jsx-runtime";
445
+ var ModelsIcon = ({
446
+ color,
447
+ ...props
448
+ }) => /* @__PURE__ */ jsx5("svg", {
449
+ xmlns: "http://www.w3.org/2000/svg",
450
+ viewBox: "0 0 512 512",
451
+ ...props,
452
+ children: /* @__PURE__ */ jsx5("path", {
453
+ d: "M176 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-16c-35.3 0-64 28.7-64 64v16H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v16c0 35.3 28.7 64 64 64h16v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h16c35.3 0 64-28.7 64-64v-16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-16c0-35.3-28.7-64-64-64h-16V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16ZM416 128v256c0 17.7-14.3 32-32 32H128c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32h256c17.7 0 32 14.3 32 32ZM192 160c-17.7 0-32 14.3-32 32v128c0 17.7 14.3 32 32 32h128c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32H192Zm128 32v128H192V192h128Z",
454
+ fill: color ?? CURRENT_COLOR_LOWERCASE
455
+ })
456
+ });
457
+
458
+ // src/components/Menu/styles.ts
459
+ var MENU_VERTICAL_PADDING = 4;
460
+ var SUBMENU_LEFT_INSET = -8;
461
+ var MAX_MENU_WIDTH = 400;
462
+ var MAX_MOBILE_MENU_WIDTH = 300;
463
+ var menuContainer = {
464
+ backgroundColor: BACKGROUND,
465
+ position: "fixed",
466
+ color: WHITE,
467
+ userSelect: "none",
468
+ WebkitUserSelect: "none"
469
+ };
470
+ var SHADOW_TOWARDS_BOTTOM = SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM;
471
+ var SHADOW_TOWARDS_TOP = SHADOW_BLACK_ALPHA_50_TOWARDS_TOP;
472
+ var menuContainerTowardsBottom = {
473
+ ...menuContainer,
474
+ boxShadow: SHADOW_TOWARDS_BOTTOM
475
+ };
476
+ var menuContainerTowardsTop = {
477
+ ...menuContainer,
478
+ boxShadow: SHADOW_TOWARDS_TOP
479
+ };
480
+ var fullScreenOverlay = {
481
+ position: "fixed",
482
+ top: 0,
483
+ left: 0,
484
+ right: 0,
485
+ bottom: 0
486
+ };
487
+ var outerPortal = {
488
+ position: "fixed"
489
+ };
490
+ var inlineCodeSnippet = {
491
+ fontSize: 14,
492
+ color: BLUE,
493
+ fontFamily: "monospace"
494
+ };
495
+
496
+ // src/components/ActionTooltip.tsx
497
+ import {
498
+ useCallback as useCallback3,
499
+ useEffect,
500
+ useLayoutEffect,
501
+ useRef,
502
+ useState
503
+ } from "react";
504
+ import { createPortal } from "react-dom";
505
+ import { jsx as jsx6, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
506
+ var defaultTriggerStyle = { display: "inline-flex" };
507
+ var tooltipStyle = {
508
+ position: "fixed",
509
+ display: "flex",
510
+ alignItems: "center",
511
+ gap: 6,
512
+ backgroundColor: TIMELINE_BACKGROUND_COLOR,
513
+ color: WHITE_ALPHA_90,
514
+ borderRadius: 6,
515
+ padding: "6px 8px",
516
+ fontSize: 12,
517
+ lineHeight: "16px",
518
+ whiteSpace: "pre-wrap",
519
+ overflowWrap: "anywhere",
520
+ maxWidth: "calc(100vw - 16px)",
521
+ boxShadow: SHADOW_TOWARDS_TOP,
522
+ pointerEvents: "none"
523
+ };
524
+ var labelStyle = {
525
+ font: "inherit",
526
+ color: "inherit",
527
+ minWidth: 0
528
+ };
529
+ var shortcutStyle = {
530
+ ...labelStyle,
531
+ backgroundColor: WHITE_ALPHA_10,
532
+ borderRadius: 3,
533
+ padding: "0 4px",
534
+ minWidth: 16,
535
+ textAlign: "center",
536
+ whiteSpace: "nowrap",
537
+ flexShrink: 0
538
+ };
539
+ var visibleTooltipCount = 0;
540
+ var lastTooltipHiddenAt = null;
541
+ var TOOLTIP_SKIP_DELAY_WINDOW = 300;
542
+ var ActionTooltip = ({
543
+ label: label2,
544
+ shortcut,
545
+ delay,
546
+ dismissOnClick,
547
+ side = "top",
548
+ triggerStyle,
549
+ children
550
+ }) => {
551
+ const triggerRef = useRef(null);
552
+ const tooltipRef = useRef(null);
553
+ const timer = useRef(null);
554
+ const [visible, setVisible] = useState(false);
555
+ const [position, setPosition] = useState(null);
556
+ const { currentZIndex } = useZIndex();
557
+ useLayoutEffect(() => {
558
+ if (!visible) {
559
+ return;
560
+ }
561
+ visibleTooltipCount++;
562
+ return () => {
563
+ visibleTooltipCount--;
564
+ lastTooltipHiddenAt = Date.now();
565
+ };
566
+ }, [visible]);
567
+ const hide = useCallback3(() => {
568
+ if (timer.current !== null) {
569
+ clearTimeout(timer.current);
570
+ timer.current = null;
571
+ }
572
+ setVisible(false);
573
+ setPosition(null);
574
+ }, []);
575
+ const show = useCallback3(() => {
576
+ if (timer.current !== null) {
577
+ clearTimeout(timer.current);
578
+ timer.current = null;
579
+ }
580
+ setVisible(true);
581
+ }, []);
582
+ const onPointerEnter = useCallback3((event) => {
583
+ if (event.pointerType === "touch" || timer.current !== null || !event.currentTarget.contains(event.target)) {
584
+ return;
585
+ }
586
+ if (!delay || visibleTooltipCount > 0 || lastTooltipHiddenAt !== null && Date.now() - lastTooltipHiddenAt < TOOLTIP_SKIP_DELAY_WINDOW) {
587
+ show();
588
+ return;
589
+ }
590
+ timer.current = setTimeout(show, delay);
591
+ }, [delay, show]);
592
+ useEffect(() => {
593
+ const onKeyDown = (event) => {
594
+ if (event.key === "Escape") {
595
+ hide();
596
+ }
597
+ };
598
+ window.addEventListener("keydown", onKeyDown);
599
+ window.addEventListener("blur", hide);
600
+ window.addEventListener("resize", hide);
601
+ window.addEventListener("scroll", hide, true);
602
+ return () => {
603
+ if (timer.current !== null) {
604
+ clearTimeout(timer.current);
605
+ }
606
+ window.removeEventListener("keydown", onKeyDown);
607
+ window.removeEventListener("blur", hide);
608
+ window.removeEventListener("resize", hide);
609
+ window.removeEventListener("scroll", hide, true);
610
+ };
611
+ }, [hide]);
612
+ useLayoutEffect(() => {
613
+ if (!visible || !triggerRef.current || !tooltipRef.current) {
614
+ return;
615
+ }
616
+ const trigger = triggerRef.current.getBoundingClientRect();
617
+ const tooltip = tooltipRef.current.getBoundingClientRect();
618
+ if (side === "right") {
619
+ const right = trigger.right + 4;
620
+ setPosition({
621
+ left: right + tooltip.width <= window.innerWidth - 8 ? right : Math.max(8, trigger.left - tooltip.width - 4),
622
+ top: Math.max(8, Math.min(trigger.top + (trigger.height - tooltip.height) / 2, window.innerHeight - tooltip.height - 8))
623
+ });
624
+ return;
625
+ }
626
+ const above = trigger.top - tooltip.height - 4;
627
+ setPosition({
628
+ left: Math.max(8, Math.min(trigger.left + (trigger.width - tooltip.width) / 2, window.innerWidth - tooltip.width - 8)),
629
+ top: Math.max(8, Math.min(above >= 8 ? above : trigger.bottom + 4, window.innerHeight - tooltip.height - 8))
630
+ });
631
+ }, [label2, shortcut, side, visible]);
632
+ return /* @__PURE__ */ jsxs2(Fragment2, {
633
+ children: [
634
+ /* @__PURE__ */ jsx6("span", {
635
+ ref: triggerRef,
636
+ style: { ...defaultTriggerStyle, ...triggerStyle },
637
+ onPointerEnter,
638
+ onPointerLeave: hide,
639
+ onPointerDownCapture: dismissOnClick ? hide : undefined,
640
+ onClickCapture: dismissOnClick ? hide : undefined,
641
+ onFocus: (event) => {
642
+ if (event.currentTarget.contains(event.target)) {
643
+ show();
644
+ }
645
+ },
646
+ onBlur: hide,
647
+ children
648
+ }),
649
+ visible ? createPortal(/* @__PURE__ */ jsxs2("div", {
650
+ ref: tooltipRef,
651
+ role: "tooltip",
652
+ className: "css-reset",
653
+ style: {
654
+ ...tooltipStyle,
655
+ left: position?.left ?? 0,
656
+ top: position?.top ?? 0,
657
+ visibility: position ? "visible" : "hidden"
658
+ },
659
+ children: [
660
+ /* @__PURE__ */ jsx6("span", {
661
+ style: labelStyle,
662
+ children: label2
663
+ }),
664
+ shortcut ? /* @__PURE__ */ jsx6("kbd", {
665
+ style: shortcutStyle,
666
+ children: shortcut
667
+ }) : null
668
+ ]
669
+ }), getPortal(currentZIndex)) : null
670
+ ]
671
+ });
672
+ };
673
+
674
+ // src/components/Spinner.tsx
675
+ import { useMemo as useMemo4 } from "react";
676
+ import { jsx as jsx7, jsxs as jsxs3, Fragment as Fragment3 } from "react/jsx-runtime";
677
+ var viewBox = 100;
678
+ var lines = 8;
679
+ var className = "__remotion_spinner_line";
680
+ var remotionSpinnerAnimation = "__remotion_spinner_animation";
681
+ var translated = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
682
+ var Spinner = ({ size, duration, color = LIGHT_TEXT }) => {
683
+ const style2 = useMemo4(() => {
684
+ return {
685
+ width: size,
686
+ height: size
687
+ };
688
+ }, [size]);
689
+ return /* @__PURE__ */ jsxs3(Fragment3, {
690
+ children: [
691
+ /* @__PURE__ */ jsx7("style", {
692
+ type: "text/css",
693
+ children: `
694
+ @keyframes ${remotionSpinnerAnimation} {
695
+ 0% {
696
+ opacity: 1;
697
+ }
698
+ 100% {
699
+ opacity: 0.15;
700
+ }
701
+ }
702
+
703
+ .${className} {
704
+ animation: ${remotionSpinnerAnimation} ${duration}s linear infinite;
705
+ }
706
+ `
707
+ }),
708
+ /* @__PURE__ */ jsx7("svg", {
709
+ style: style2,
710
+ viewBox: `0 0 ${viewBox} ${viewBox}`,
711
+ children: new Array(lines).fill(true).map((_, index) => {
712
+ return /* @__PURE__ */ jsx7("path", {
713
+ className,
714
+ style: {
715
+ rotate: `${index * Math.PI * 2 / lines}rad`,
716
+ transformOrigin: "center center",
717
+ animationDelay: `${index * (duration / lines) - duration}s`
718
+ },
719
+ d: translated,
720
+ fill: color
721
+ }, index);
722
+ })
723
+ })
724
+ ]
725
+ });
726
+ };
727
+
728
+ // src/icons/trash.tsx
729
+ import { jsx as jsx8 } from "react/jsx-runtime";
730
+ var TrashIcon = ({ color, ...props }) => {
731
+ return /* @__PURE__ */ jsx8("svg", {
732
+ xmlns: "http://www.w3.org/2000/svg",
733
+ viewBox: "0 0 448 512",
734
+ ...props,
735
+ children: /* @__PURE__ */ jsx8("path", {
736
+ fill: color,
737
+ d: "M160.5 27.4C162.5 20.6 168.8 16 175.8 16h96.4c7.1 0 13.3 4.6 15.3 11.4l11 36.6h-149l11-36.6zM116.1 64H16C7.2 64 0 71.2 0 80s7.2 16 16 16h416c8.8 0 16-7.2 16-16s-7.2-16-16-16H331.9l-13.7-45.8C312.1-2.1 293.4-16 272.2-16h-96.4c-21.2 0-39.9 13.9-46 34.2L116.1 64zM28.7 144l22.9 308.7c2.5 33.4 30.3 59.3 63.8 59.3h217.1c33.5 0 61.3-25.9 63.8-59.3L419.2 144h-32.1l-22.7 306.4c-1.2 16.7-15.2 29.6-31.9 29.6H115.4c-16.8 0-30.7-12.9-31.9-29.6L60.8 144H28.7z"
738
+ })
739
+ });
740
+ };
741
+
742
+ // src/icons/cloud-download.tsx
743
+ import { jsx as jsx9 } from "react/jsx-runtime";
744
+ var CloudDownloadIcon = ({ color, ...props }) => {
745
+ return /* @__PURE__ */ jsx9("svg", {
746
+ ...props,
747
+ xmlns: "http://www.w3.org/2000/svg",
748
+ viewBox: "0 0 576 512",
749
+ children: /* @__PURE__ */ jsx9("path", {
750
+ fill: color,
751
+ d: "M128 176c0-61.9 50.1-112 112-112 39.3 0 73.8 20.2 93.8 50.8 4.4 6.7 13.1 9.1 20.3 5.7 11.4-5.5 24.3-8.5 37.9-8.5 48.6 0 88 39.4 88 88 0 14.1-3.3 27.4-9.2 39.2-2 4.1-2.2 8.9-.5 13.1s5.2 7.6 9.5 9.1c37.4 13.1 64.2 48.8 64.2 90.6 0 53-43 96-96 96l-304 0c-61.9 0-112-50.1-112-112 0-53.7 37.8-98.6 88.2-109.5 4.3-.9 8.1-3.6 10.3-7.4s2.9-8.3 1.7-12.6c-2.7-9.7-4.2-19.9-4.2-30.5zM240 32c-79.5 0-144 64.5-144 144 0 8 .7 15.9 1.9 23.5-56.9 19.2-97.9 73-97.9 136.5 0 79.5 64.5 144 144 144l304 0c70.7 0 128-57.3 128-128 0-49.9-28.5-93-70.1-114.2 3.9-11.9 6.1-24.6 6.1-37.8 0-66.3-53.7-120-120-120-13.7 0-26.9 2.3-39.2 6.5-26.4-33.2-67.1-54.5-112.8-54.5zM371.3 307.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L304 329.4 304 208c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 121.4-44.7-44.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l72 72c6.2 6.2 16.4 6.2 22.6 0l72-72z"
752
+ })
753
+ });
754
+ };
755
+
756
+ // src/icons/check-circle-filled.tsx
757
+ import { jsx as jsx10 } from "react/jsx-runtime";
758
+ var CheckCircleFilled = (props) => /* @__PURE__ */ jsx10("svg", {
759
+ xmlns: "http://www.w3.org/2000/svg",
760
+ style: { width: 14, height: 14 },
761
+ viewBox: "0 0 512 512",
762
+ ...props,
763
+ children: /* @__PURE__ */ jsx10("path", {
764
+ d: "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z"
765
+ })
766
+ });
767
+
768
+ export { SPACING_UNIT, COMPACT_CONTROL_ROW_HEIGHT, COMPACT_INLINE_ROW_HEIGHT, Spacing, Flex, Row, Column, getMaxModalWidth, getMaxModalHeight, ModalContainer, HOVERABLE_CLASS_NAME, HOVER_GROUP_CLASS_NAME, HOVER_GROUP_REVEAL_CLASS_NAME, FOCUS_VISIBLE_ONLY_CLASS_NAME, NO_HOVER_BACKGROUND_STYLE, hoverableStyle, makeHoverableCSS, InlineAction, MENU_VERTICAL_PADDING, SUBMENU_LEFT_INSET, MAX_MENU_WIDTH, MAX_MOBILE_MENU_WIDTH, SHADOW_TOWARDS_BOTTOM, SHADOW_TOWARDS_TOP, menuContainerTowardsBottom, menuContainerTowardsTop, fullScreenOverlay, outerPortal, inlineCodeSnippet, MENU_INITIATOR_CLASSNAME, MENU_ITEM_CLASSNAME, HORIZONTAL_SCROLLBAR_CLASSNAME, VERTICAL_SCROLLBAR_CLASSNAME, isMenuItem, ActionTooltip, Spinner, TrashIcon, WarningTriangle, ValidationMessage, CloudDownloadIcon, CheckCircleFilled, outerModalStyle, container2 as container, optionsPanel, horizontalLayout, leftSidebar, horizontalTab, iconContainer, icon, buttonStyle, flexer, ModelsIcon };