@remotion/studio 4.0.505 → 4.0.507

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/api/copy-render-output-to-asset.d.ts +4 -0
  2. package/dist/api/copy-render-output-to-asset.js +11 -0
  3. package/dist/api/install-package.d.ts +2 -3
  4. package/dist/api/install-package.js +1 -3
  5. package/dist/api/visual-control.d.ts +3 -0
  6. package/dist/api/visual-control.js +3 -0
  7. package/dist/components/AssetSelector.js +19 -4
  8. package/dist/components/AssetSelectorItem.js +3 -3
  9. package/dist/components/Canvas.js +2 -0
  10. package/dist/components/CodingAgentIcon.d.ts +4 -0
  11. package/dist/components/CodingAgentIcon.js +17 -0
  12. package/dist/components/CompositionSelector.js +1 -1
  13. package/dist/components/CompositionSelectorItem.js +1 -1
  14. package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -1
  15. package/dist/components/ConfigureDefaultEditorModal.js +117 -69
  16. package/dist/components/ConfigureLicenseModal.d.ts +1 -3
  17. package/dist/components/ConfigureLicenseModal.js +105 -89
  18. package/dist/components/ConfirmationDialog.js +2 -2
  19. package/dist/components/ContextMenu.js +10 -8
  20. package/dist/components/Editor.js +2 -0
  21. package/dist/components/EditorContexts.js +6 -5
  22. package/dist/components/EffectPickerModal.js +1 -1
  23. package/dist/components/ExpandedTracksProvider.js +10 -53
  24. package/dist/components/GlobalKeybindings.js +3 -2
  25. package/dist/components/InlineCaptionInspector.d.ts +2 -2
  26. package/dist/components/InlineDropdown.d.ts +2 -1
  27. package/dist/components/InlineDropdown.js +10 -4
  28. package/dist/components/InspectorLocationCopy.js +8 -8
  29. package/dist/components/InspectorOpenInEditor.d.ts +2 -0
  30. package/dist/components/InspectorOpenInEditor.js +63 -49
  31. package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
  32. package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
  33. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
  34. package/dist/components/InspectorPanel/EasingInspector.js +7 -4
  35. package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
  36. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
  37. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
  38. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  39. package/dist/components/InspectorPanel/common.d.ts +1 -0
  40. package/dist/components/InspectorPanel/common.js +2 -2
  41. package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
  42. package/dist/components/InspectorSequenceSection.js +4 -4
  43. package/dist/components/InstallPackage.js +1 -1
  44. package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
  45. package/dist/components/Menu/MenuSectionHeader.js +20 -0
  46. package/dist/components/Menu/SubMenu.js +13 -2
  47. package/dist/components/Menu/menu-tree-context.d.ts +3 -0
  48. package/dist/components/Menu/menu-tree-context.js +13 -0
  49. package/dist/components/MenuBuildIndicator.js +1 -0
  50. package/dist/components/MenuToolbar.js +1 -1
  51. package/dist/components/ModalFooter.d.ts +1 -0
  52. package/dist/components/ModalFooter.js +6 -2
  53. package/dist/components/ModalHeader.js +1 -1
  54. package/dist/components/Modals.js +18 -7
  55. package/dist/components/ModalsProvider.js +5 -6
  56. package/dist/components/NewComposition/CodemodFooter.js +1 -1
  57. package/dist/components/NewComposition/ComboBox.d.ts +6 -1
  58. package/dist/components/NewComposition/DismissableModal.js +1 -1
  59. package/dist/components/NewComposition/MenuContent.js +27 -19
  60. package/dist/components/NewComposition/RenameStaticFile.js +1 -1
  61. package/dist/components/NewComposition/menu-typeahead.js +2 -2
  62. package/dist/components/OverrideInputProps.js +1 -1
  63. package/dist/components/PlayPause.js +2 -1
  64. package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
  65. package/dist/components/Preview.js +29 -4
  66. package/dist/components/PreviewToolbarOverflowButton.js +4 -2
  67. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
  68. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  69. package/dist/components/RenderButton.d.ts +3 -3
  70. package/dist/components/RenderButton.js +42 -7
  71. package/dist/components/RenderModal/RenderStatusModal.js +1 -1
  72. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
  73. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
  74. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +3 -3
  75. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
  76. package/dist/components/RenderModal/ServerRenderModal.js +5 -1
  77. package/dist/components/RenderModal/WebRenderModal.js +3 -2
  78. package/dist/components/RenderQueue/RenderQueueError.js +1 -1
  79. package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
  80. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
  81. package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
  82. package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
  83. package/dist/components/RenderQueue/actions.d.ts +4 -2
  84. package/dist/components/RenderQueue/actions.js +4 -2
  85. package/dist/components/RenderQueue/index.js +3 -4
  86. package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
  87. package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
  88. package/dist/components/SegmentedControl.js +0 -1
  89. package/dist/components/SelectedOutlineElement.d.ts +14 -17
  90. package/dist/components/SelectedOutlineElement.js +113 -931
  91. package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
  92. package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
  93. package/dist/components/SelectedOutlineOverlay.d.ts +6 -13
  94. package/dist/components/SelectedOutlineOverlay.js +360 -832
  95. package/dist/components/SelectedOutlinePolygon.d.ts +25 -0
  96. package/dist/components/SelectedOutlinePolygon.js +359 -0
  97. package/dist/components/SelectedOutlineRenderer.d.ts +18 -0
  98. package/dist/components/SelectedOutlineRenderer.js +208 -0
  99. package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +16 -0
  100. package/dist/components/SelectedOutlineRotationCornerHandle.js +269 -0
  101. package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +16 -0
  102. package/dist/components/SelectedOutlineScaleEdgeLine.js +211 -0
  103. package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
  104. package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
  105. package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
  106. package/dist/components/SelectedOutlineTransformOriginHandle.js +286 -0
  107. package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
  108. package/dist/components/SelectedOutlineUvControls.js +57 -12
  109. package/dist/components/SettingsContext.d.ts +15 -0
  110. package/dist/components/SettingsContext.js +116 -0
  111. package/dist/components/SettingsModal.d.ts +7 -0
  112. package/dist/components/SettingsModal.js +56 -0
  113. package/dist/components/SettingsModalFooter.d.ts +2 -0
  114. package/dist/components/SettingsModalFooter.js +44 -0
  115. package/dist/components/ShowOutlinesProvider.js +2 -3
  116. package/dist/components/SidebarRenderButton.js +1 -1
  117. package/dist/components/SvgImportDialog.js +2 -2
  118. package/dist/components/TimeValue.js +1 -1
  119. package/dist/components/Timeline/EasingEditorModal.js +66 -22
  120. package/dist/components/Timeline/Timeline.js +23 -5
  121. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  122. package/dist/components/Timeline/TimelineDragHandler.js +3 -3
  123. package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
  124. package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
  125. package/dist/components/Timeline/TimelineEffectPropItem.js +5 -3
  126. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
  127. package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
  128. package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
  129. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
  130. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
  131. package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
  132. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  133. package/dist/components/Timeline/TimelineSelection.js +1 -0
  134. package/dist/components/Timeline/TimelineSequence.js +28 -25
  135. package/dist/components/Timeline/TimelineSequenceItem.js +74 -58
  136. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +1 -1
  137. package/dist/components/Timeline/TimelineTrack.js +2 -1
  138. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
  139. package/dist/components/Timeline/get-sequence-context-menu-items.js +58 -53
  140. package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
  141. package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
  142. package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
  143. package/dist/components/Timeline/timeline-asset-link.js +2 -2
  144. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +38 -2
  145. package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
  146. package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +20 -4
  147. package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
  148. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +5 -0
  149. package/dist/components/Timeline/use-timeline-expanded-tree.js +50 -1
  150. package/dist/components/Timeline/use-timeline-height.js +20 -0
  151. package/dist/components/TimelineInOutToggle.js +5 -1
  152. package/dist/components/TopPanel.js +16 -0
  153. package/dist/components/UpdateCheck.js +1 -1
  154. package/dist/components/effect-drag-and-drop.js +1 -1
  155. package/dist/components/get-open-in-menu-items.d.ts +12 -0
  156. package/dist/components/get-open-in-menu-items.js +83 -0
  157. package/dist/components/handle-drop.d.ts +2 -1
  158. package/dist/components/handle-drop.js +12 -2
  159. package/dist/components/import-assets.d.ts +18 -6
  160. package/dist/components/import-assets.js +76 -32
  161. package/dist/components/selected-outline-measurement.d.ts +2 -2
  162. package/dist/components/selected-outline-order.d.ts +12 -0
  163. package/dist/components/selected-outline-order.js +251 -0
  164. package/dist/components/selected-outline-types.d.ts +9 -10
  165. package/dist/components/svg-point-to-client-point.d.ts +2 -0
  166. package/dist/components/svg-point-to-client-point.js +10 -0
  167. package/dist/components/use-auto-save-config.d.ts +8 -0
  168. package/dist/components/use-auto-save-config.js +74 -0
  169. package/dist/components/use-default-editor-info.d.ts +1 -0
  170. package/dist/components/use-default-editor-info.js +10 -30
  171. package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
  172. package/dist/esm/{chunk-7pgk8h5m.js → chunk-ptnd65a9.js} +14596 -12725
  173. package/dist/esm/internals.mjs +14595 -12724
  174. package/dist/esm/previewEntry.mjs +12726 -10855
  175. package/dist/esm/renderEntry.mjs +2 -2
  176. package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
  177. package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
  178. package/dist/helpers/calculate-timeline.js +3 -3
  179. package/dist/helpers/client-id.d.ts +3 -1
  180. package/dist/helpers/client-id.js +28 -4
  181. package/dist/helpers/format-file-location.d.ts +1 -1
  182. package/dist/helpers/format-file-location.js +3 -3
  183. package/dist/helpers/install-required-package.d.ts +3 -3
  184. package/dist/helpers/install-required-package.js +1 -6
  185. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
  186. package/dist/helpers/open-in-editor.d.ts +1 -0
  187. package/dist/helpers/open-in-editor.js +5 -1
  188. package/dist/helpers/studio-fit-padding.d.ts +1 -1
  189. package/dist/helpers/studio-fit-padding.js +1 -1
  190. package/dist/helpers/studio-runtime-config.js +3 -0
  191. package/dist/helpers/timeline-layout.d.ts +2 -1
  192. package/dist/helpers/timeline-layout.js +5 -2
  193. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  194. package/dist/helpers/timeline-node-path-key.js +3 -1
  195. package/dist/helpers/use-asset-drag-events.d.ts +2 -1
  196. package/dist/helpers/use-asset-drag-events.js +14 -6
  197. package/dist/helpers/use-menu-structure.js +25 -35
  198. package/dist/helpers/use-runtime-values.d.ts +9 -0
  199. package/dist/helpers/use-runtime-values.js +76 -0
  200. package/dist/icons/apps.d.ts +2 -0
  201. package/dist/icons/apps.js +7 -0
  202. package/dist/icons/browse-elements.d.ts +4 -0
  203. package/dist/icons/browse-elements.js +10 -0
  204. package/dist/state/modals.d.ts +5 -6
  205. package/dist/state/modals.js +5 -3
  206. package/dist/state/timeline-sequence-hover.d.ts +9 -3
  207. package/dist/state/timeline-sequence-hover.js +63 -12
  208. package/package.json +12 -12
@@ -14,7 +14,7 @@ const SchemaLabel_1 = require("./SchemaLabel");
14
14
  const zod_schema_type_1 = require("./zod-schema-type");
15
15
  const ZodSwitch_1 = require("./ZodSwitch");
16
16
  const labelStyle = {
17
- fontFamily: 'sans-serif',
17
+ fontFamily: 'monospace',
18
18
  fontSize: 12,
19
19
  color: colors_1.LIGHT_TEXT,
20
20
  };
@@ -38,8 +38,8 @@ const ZodOrNullishEditor = ({ jsonPath, schema, setValue, value, onRemove, nulli
38
38
  : (0, create_zod_values_1.createZodValues)(innerSchema, z, zodTypes);
39
39
  setValue(() => val, { shouldSave: true });
40
40
  }, [innerSchema, nullishValue, setValue, z, zodTypes]);
41
- return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [value === nullishValue ? (jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null })) : (jsx_runtime_1.jsx(ZodSwitch_1.ZodSwitch, { value: value, setValue: setValue, jsonPath: jsonPath, schema: innerSchema, onRemove: onRemove, mayPad: false })), jsx_runtime_1.jsxs("div", { style: checkBoxWrapper, children: [
42
- jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: String(nullishValue) })
41
+ return (jsx_runtime_1.jsxs(Fieldset_1.Fieldset, { shouldPad: mayPad, children: [value === nullishValue ? (jsx_runtime_1.jsx(SchemaLabel_1.SchemaLabel, { handleClick: null, jsonPath: jsonPath, onRemove: onRemove, valid: zodValidation.success, suffix: null })) : (jsx_runtime_1.jsx(ZodSwitch_1.ZodSwitch, { value: value, setValue: setValue, jsonPath: jsonPath, schema: innerSchema, onRemove: onRemove, mayPad: false })), jsx_runtime_1.jsxs("label", { style: checkBoxWrapper, children: [
42
+ jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("code", { style: labelStyle, children: ["<", String(nullishValue), ">"] })
43
43
  ] })
44
44
  ] }));
45
45
  };
@@ -78,7 +78,7 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, onRemove, mayPad }) => {
78
78
  return (jsx_runtime_1.jsx(ZodArrayEditor_1.ZodArrayEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
79
79
  }
80
80
  if (typeName === 'enum') {
81
- return (jsx_runtime_1.jsx(ZodEnumEditor_1.ZodEnumEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove }));
81
+ return (jsx_runtime_1.jsx(ZodEnumEditor_1.ZodEnumEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, onRemove: onRemove, mayPad: mayPad }));
82
82
  }
83
83
  // In v3, effects wrap schemas (e.g. .refine(), .transform()).
84
84
  // In v4, refine/transform are embedded as checks, so this only applies to v3.
@@ -67,7 +67,7 @@ const reducer = (state, action) => {
67
67
  return state;
68
68
  };
69
69
  const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialLogLevel, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialx264Preset, initialGopSize, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialOffthreadVideoCacheSizeInBytes, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, initialEncodingBufferSize, initialEncodingMaxRate, initialOffthreadVideoThreads, initialMediaCacheSizeInBytes, initialDarkMode, initialUserAgent, defaultProps, inFrameMark, outFrameMark, initialColorSpace, initialMultiProcessOnLinux, defaultConfigurationAudioCodec, defaultConfigurationVideoCodec, initialBeep, initialRepro, initialForSeamlessAacConcatenation, renderTypeOfLastRender, initialHardwareAcceleration, initialSampleRate, defaultMetadata, initialChromeMode, renderDefaults, }) => {
70
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
70
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
71
71
  const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
72
72
  if (!context) {
73
73
  throw new Error('Should not be able to render without resolving comp first');
@@ -388,6 +388,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
388
388
  chromeMode,
389
389
  offthreadVideoThreads,
390
390
  mediaCacheSizeInBytes,
391
+ licenseKey: renderDefaults.publicLicenseKey,
391
392
  })
392
393
  .then(() => {
393
394
  dispatchIfMounted({ type: 'succeed' });
@@ -418,6 +419,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
418
419
  chromeMode,
419
420
  offthreadVideoThreads,
420
421
  mediaCacheSizeInBytes,
422
+ renderDefaults.publicLicenseKey,
421
423
  ]);
422
424
  const [everyNthFrameSetting, setEveryNthFrameSetting] = (0, react_1.useState)(() => initialEveryNthFrame);
423
425
  const everyNthFrame = (0, react_1.useMemo)(() => {
@@ -489,6 +491,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
489
491
  offthreadVideoThreads,
490
492
  mediaCacheSizeInBytes,
491
493
  sampleRate,
494
+ licenseKey: renderDefaults.publicLicenseKey,
492
495
  })
493
496
  .then(() => {
494
497
  dispatchIfMounted({ type: 'succeed' });
@@ -545,6 +548,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
545
548
  offthreadVideoThreads,
546
549
  mediaCacheSizeInBytes,
547
550
  sampleRate,
551
+ renderDefaults.publicLicenseKey,
548
552
  ]);
549
553
  const onClickSequence = (0, react_1.useCallback)(() => {
550
554
  var _a;
@@ -82,7 +82,7 @@ const validateOutnameForStill = ({ outName, stillImageFormat, }) => {
82
82
  const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialPageResponsiveness, }) => {
83
83
  var _a;
84
84
  const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
85
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
85
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
86
86
  const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
87
87
  const { addClientStillJob, addClientVideoJob } = (0, react_1.useContext)(context_1.RenderQueueContext);
88
88
  if (!context) {
@@ -415,7 +415,8 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
415
415
  ] })
416
416
  ] }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
417
417
  jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(file_1.FileIcon, { color: color, style: render_modals_1.icon }) })), children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(input_props_1.InputPropsIcon, { color: color, style: render_modals_1.icon }) })), children: "Input Props" }), renderMode !== 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: render_modals_1.icon }) })), children: "Picture" })) : null, renderMode === 'video' || renderMode === 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(audio_1.AudioIcon, { color: color, style: render_modals_1.icon }) })), children: "Audio" })) : null, jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Other" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: false, onClick: () => setSelectedModal({
418
- type: 'configure-license',
418
+ type: 'settings',
419
+ initialTab: 'license',
419
420
  initialPublicLicenseKey: publicLicenseKey,
420
421
  }), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, setCodec: setCodecWithContainer, encodableVideoCodecs: encodableVideoCodecs, effectiveVideoCodec: effectiveVideoCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
421
422
  canUpdate: false,
@@ -10,7 +10,7 @@ const outputLocation = {
10
10
  ...item_style_1.renderQueueItemSubtitleStyle,
11
11
  };
12
12
  const RenderQueueError = ({ job }) => {
13
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
13
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
14
14
  const { tabIndex } = (0, z_index_1.useZIndex)();
15
15
  const onClick = (0, react_1.useCallback)(() => {
16
16
  setSelectedModal({
@@ -21,12 +21,17 @@ const RenderQueueProgressMessage_1 = require("./RenderQueueProgressMessage");
21
21
  const RenderQueueRemoveItem_1 = require("./RenderQueueRemoveItem");
22
22
  const RenderQueueRepeat_1 = require("./RenderQueueRepeat");
23
23
  const RenderQueueSavingMessage_1 = require("./RenderQueueSavingMessage");
24
+ const use_render_output_file_drag_1 = require("./use-render-output-file-drag");
24
25
  const container = {
25
26
  padding: 12,
26
27
  display: 'flex',
27
28
  flexDirection: 'row',
28
29
  paddingBottom: 10,
29
30
  paddingRight: 4,
31
+ marginBottom: 1,
32
+ marginLeft: 4,
33
+ borderRadius: 4,
34
+ width: 'calc(100% - 4px)',
30
35
  };
31
36
  const title = {
32
37
  fontSize: 13,
@@ -49,6 +54,7 @@ const RenderQueueItem = ({ job, selected }) => {
49
54
  const [hovered, setHovered] = (0, react_1.useState)(false);
50
55
  const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
51
56
  const isClientJob = (0, context_1.isClientRenderJob)(job);
57
+ const { canDrag, isDragging, onDragEnd, onDragStart } = (0, use_render_output_file_drag_1.useRenderOutputFileDrag)(job);
52
58
  const onPointerEnter = (0, react_1.useCallback)(() => {
53
59
  setHovered(true);
54
60
  }, []);
@@ -138,9 +144,9 @@ const RenderQueueItem = ({ job, selected }) => {
138
144
  job.status === 'failed' ||
139
145
  job.status === 'cancelled') &&
140
146
  !((0, context_1.isClientRenderJob)(job) && (0, client_side_render_types_1.isRestoredClientJob)(job));
141
- return (jsx_runtime_1.jsxs(layout_1.Row, { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, className: selected ? SELECTED_CLASSNAME : undefined, children: [
147
+ return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, draggable: canDrag, onDragStart: onDragStart, onDragEnd: onDragEnd, className: selected ? SELECTED_CLASSNAME : undefined, children: [
142
148
  jsx_runtime_1.jsx(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
143
149
  jsx_runtime_1.jsx("div", { style: title, children: job.compositionId }), jsx_runtime_1.jsx("div", { style: subtitle, children: job.status === 'done' ? (jsx_runtime_1.jsx(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? (jsx_runtime_1.jsx(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : job.status === 'saving' ? (jsx_runtime_1.jsx(RenderQueueSavingMessage_1.RenderQueueSavingMessage, {})) : job.status === 'cancelled' ? (jsx_runtime_1.jsx(RenderQueueCancelledMessage_1.RenderQueueCancelledMessage, {})) : null })
144
- ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canCopyToClipboard ? (jsx_runtime_1.jsx(RenderQueueCopyToClipboard_1.RenderQueueCopyToClipboard, { job: job })) : null, canRepeat ? jsx_runtime_1.jsx(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job }) : null, job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : (jsx_runtime_1.jsx(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' ? (clientBlobInfo ? (jsx_runtime_1.jsx(RenderQueueDownloadItem_1.RenderQueueDownloadItem, { job: job })) : (jsx_runtime_1.jsx(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job }))) : null] }));
150
+ ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), !isDragging ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [canCopyToClipboard ? (jsx_runtime_1.jsx(RenderQueueCopyToClipboard_1.RenderQueueCopyToClipboard, { job: job })) : null, canRepeat ? jsx_runtime_1.jsx(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job }) : null, job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : (jsx_runtime_1.jsx(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' ? (clientBlobInfo ? (jsx_runtime_1.jsx(RenderQueueDownloadItem_1.RenderQueueDownloadItem, { job: job })) : (jsx_runtime_1.jsx(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job }))) : null] })) : null] }));
145
151
  };
146
152
  exports.RenderQueueItem = RenderQueueItem;
@@ -52,7 +52,7 @@ const invisibleStyle = {
52
52
  display: 'flex',
53
53
  };
54
54
  const RenderQueueItemStatus = ({ job }) => {
55
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
55
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
56
56
  const [hovered, setHovered] = react_1.default.useState(false);
57
57
  const isClientJob = (0, context_1.isClientRenderJob)(job);
58
58
  const onPointerEnter = (0, react_1.useCallback)(() => {
@@ -15,7 +15,7 @@ const RenderQueueProgressMessage = ({ job }) => {
15
15
  if (job.status !== 'running') {
16
16
  throw new Error('should not have rendered this component');
17
17
  }
18
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
18
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
19
19
  const { tabIndex } = (0, z_index_1.useZIndex)();
20
20
  const isClientJob = (0, context_1.isClientRenderJob)(job);
21
21
  const onClick = (0, react_1.useCallback)(() => {
@@ -9,7 +9,7 @@ const modals_1 = require("../../state/modals");
9
9
  const InlineAction_1 = require("../InlineAction");
10
10
  const context_1 = require("./context");
11
11
  const RenderQueueRepeatItem = ({ job }) => {
12
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
12
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
13
13
  const isClientJob = (0, context_1.isClientRenderJob)(job);
14
14
  const onClick = (0, react_1.useCallback)((e) => {
15
15
  e.stopPropagation();
@@ -1,5 +1,5 @@
1
1
  import type { EnumPath, RecastCodemod, RenderJob, VisualControlChange } from '@remotion/studio-shared';
2
- export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, }: {
2
+ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, licenseKey, }: {
3
3
  compositionId: string;
4
4
  outName: string;
5
5
  imageFormat: "jpeg" | "pdf" | "png" | "webp";
@@ -18,6 +18,7 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
18
18
  metadata: Record<string, string> | null;
19
19
  chromeMode: "chrome-for-testing" | "headless-shell";
20
20
  mediaCacheSizeInBytes: number | null;
21
+ licenseKey: string | null;
21
22
  }) => Promise<undefined>;
22
23
  export declare const addSequenceRenderJob: ({ compositionId, outName, imageFormat, startFrame, endFrame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, concurrency, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, jpegQuality, disallowParallelEncoding, multiProcessOnLinux, beepOnFinish, repro, metadata, chromeMode, mediaCacheSizeInBytes, }: {
23
24
  compositionId: string;
@@ -43,7 +44,7 @@ export declare const addSequenceRenderJob: ({ compositionId, outName, imageForma
43
44
  chromeMode: "chrome-for-testing" | "headless-shell";
44
45
  mediaCacheSizeInBytes: number | null;
45
46
  }) => Promise<undefined>;
46
- export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }: {
47
+ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, licenseKey, }: {
47
48
  compositionId: string;
48
49
  outName: string;
49
50
  imageFormat: "jpeg" | "none" | "png";
@@ -86,6 +87,7 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
86
87
  chromeMode: "chrome-for-testing" | "headless-shell";
87
88
  mediaCacheSizeInBytes: number | null;
88
89
  sampleRate: number;
90
+ licenseKey: string | null;
89
91
  }) => Promise<undefined>;
90
92
  export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
91
93
  file: string;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.applyVisualControlChange = exports.callUpdateDefaultPropsApi = exports.getProjectInfo = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.applyCodemod = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
4
4
  const no_react_1 = require("remotion/no-react");
5
5
  const call_api_1 = require("../call-api");
6
- const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, }) => {
6
+ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, licenseKey, }) => {
7
7
  return (0, call_api_1.callApi)('/api/render', {
8
8
  compositionId,
9
9
  type: 'still',
@@ -28,6 +28,7 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
28
28
  metadata,
29
29
  chromeMode,
30
30
  mediaCacheSizeInBytes,
31
+ licenseKey,
31
32
  });
32
33
  };
33
34
  exports.addStillRenderJob = addStillRenderJob;
@@ -63,7 +64,7 @@ const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame,
63
64
  });
64
65
  };
65
66
  exports.addSequenceRenderJob = addSequenceRenderJob;
66
- const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, }) => {
67
+ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, scale, logLevel, codec, concurrency, crf, gopSize, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, colorSpace, multiProcessOnLinux, encodingMaxRate, encodingBufferSize, beepOnFinish, repro, forSeamlessAacConcatenation, separateAudioTo, metadata, hardwareAcceleration, chromeMode, mediaCacheSizeInBytes, sampleRate, licenseKey, }) => {
67
68
  return (0, call_api_1.callApi)('/api/render', {
68
69
  compositionId,
69
70
  type: 'video',
@@ -112,6 +113,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
112
113
  chromeMode,
113
114
  mediaCacheSizeInBytes,
114
115
  sampleRate,
116
+ licenseKey,
115
117
  });
116
118
  };
117
119
  exports.addVideoRenderJob = addVideoRenderJob;
@@ -42,9 +42,6 @@ const layout_1 = require("../layout");
42
42
  const is_menu_item_1 = require("../Menu/is-menu-item");
43
43
  const context_1 = require("./context");
44
44
  const RenderQueueItem_1 = require("./RenderQueueItem");
45
- const separatorStyle = {
46
- borderBottom: `1px solid ${colors_1.BLACK_HEX}`,
47
- };
48
45
  const errorExplanation = {
49
46
  fontSize: 14,
50
47
  color: colors_1.LIGHT_TEXT,
@@ -65,6 +62,8 @@ const renderQueue = {
65
62
  background: colors_1.BACKGROUND,
66
63
  flex: 1,
67
64
  overflowY: 'auto',
65
+ paddingTop: 4,
66
+ paddingBottom: 4,
68
67
  };
69
68
  const RenderQueue = () => {
70
69
  const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
@@ -105,7 +104,7 @@ const RenderQueue = () => {
105
104
  ] }));
106
105
  }
107
106
  return (jsx_runtime_1.jsx("div", { ref: divRef, style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: jobs.map((j, index) => {
108
- return (jsx_runtime_1.jsx("div", { style: index === jobs.length - 1 ? undefined : separatorStyle, children: jsx_runtime_1.jsx(RenderQueueItem_1.RenderQueueItem, { selected: selectedJob === index, job: j }) }, j.id));
107
+ return (jsx_runtime_1.jsx(RenderQueueItem_1.RenderQueueItem, { selected: selectedJob === index, job: j }, j.id));
109
108
  }) }));
110
109
  };
111
110
  exports.RenderQueue = RenderQueue;
@@ -0,0 +1,8 @@
1
+ import type { DragEventHandler } from 'react';
2
+ import type { AnyRenderJob } from './context';
3
+ export declare const useRenderOutputFileDrag: (job: AnyRenderJob) => {
4
+ canDrag: boolean;
5
+ isDragging: boolean;
6
+ onDragEnd: () => void;
7
+ onDragStart: DragEventHandler<HTMLDivElement>;
8
+ };
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useRenderOutputFileDrag = void 0;
4
+ const studio_protocol_1 = require("@remotion/studio-protocol");
5
+ const react_1 = require("react");
6
+ const get_asset_metadata_1 = require("../../helpers/get-asset-metadata");
7
+ const context_1 = require("./context");
8
+ const MAXIMUM_SAFE_FILE_DRAG_SIZE = 500 * 1024 * 1024;
9
+ const getFilename = (outName) => {
10
+ var _a;
11
+ return (_a = outName.split(/[/\\]/).at(-1)) !== null && _a !== void 0 ? _a : outName;
12
+ };
13
+ const isChrome = () => {
14
+ return (/Chrome\/\d/.test(navigator.userAgent) &&
15
+ !/(Edg|OPR|SamsungBrowser|YaBrowser)\//.test(navigator.userAgent));
16
+ };
17
+ const useRenderOutputFileDrag = (job) => {
18
+ const deletedOutputLocation = 'deletedOutputLocation' in job && job.deletedOutputLocation;
19
+ const [isDragging, setIsDragging] = (0, react_1.useState)(false);
20
+ const [clientFile, setClientFile] = (0, react_1.useState)(null);
21
+ const clientBlobInfo = (0, react_1.useMemo)(() => {
22
+ if (!(0, context_1.isClientRenderJob)(job) ||
23
+ job.status !== 'done' ||
24
+ job.getBlob === undefined) {
25
+ return null;
26
+ }
27
+ return {
28
+ getBlob: job.getBlob,
29
+ sizeInBytes: job.metadata.sizeInBytes,
30
+ };
31
+ }, [job]);
32
+ const clientJobWithBlob = clientBlobInfo !== null;
33
+ (0, react_1.useEffect)(() => {
34
+ if (!clientBlobInfo ||
35
+ clientBlobInfo.sizeInBytes <= 0 ||
36
+ clientBlobInfo.sizeInBytes > MAXIMUM_SAFE_FILE_DRAG_SIZE ||
37
+ typeof File === 'undefined' ||
38
+ typeof URL.createObjectURL !== 'function') {
39
+ setClientFile(null);
40
+ return;
41
+ }
42
+ let cancelled = false;
43
+ let objectUrl = null;
44
+ const filename = getFilename(job.outName);
45
+ clientBlobInfo
46
+ .getBlob()
47
+ .then((blob) => {
48
+ if (cancelled) {
49
+ return;
50
+ }
51
+ const file = new File([blob], filename, {
52
+ lastModified: blob instanceof File ? blob.lastModified : Date.now(),
53
+ type: blob.type,
54
+ });
55
+ objectUrl = URL.createObjectURL(file);
56
+ setClientFile({ file, objectUrl });
57
+ })
58
+ .catch(() => {
59
+ if (!cancelled) {
60
+ setClientFile(null);
61
+ }
62
+ });
63
+ return () => {
64
+ cancelled = true;
65
+ if (objectUrl) {
66
+ URL.revokeObjectURL(objectUrl);
67
+ }
68
+ };
69
+ }, [clientBlobInfo, job.outName]);
70
+ const canUseFileDrag = typeof DataTransfer !== 'undefined' &&
71
+ typeof window !== 'undefined' &&
72
+ typeof window.matchMedia === 'function' &&
73
+ window.matchMedia('(any-pointer: fine)').matches &&
74
+ navigator.maxTouchPoints === 0 &&
75
+ isChrome();
76
+ const canDrag = canUseFileDrag &&
77
+ job.status === 'done' &&
78
+ job.type !== 'sequence' &&
79
+ !deletedOutputLocation &&
80
+ (clientJobWithBlob ? clientFile !== null : true);
81
+ const onDragStart = (0, react_1.useCallback)((event) => {
82
+ if (!canDrag) {
83
+ event.preventDefault();
84
+ return;
85
+ }
86
+ try {
87
+ const filename = getFilename(job.outName);
88
+ const source = clientFile
89
+ ? clientFile.objectUrl
90
+ : new URL(`${get_asset_metadata_1.remotion_outputsBase}/${job.outName}`, window.location.href).href;
91
+ const mimeType = (clientFile === null || clientFile === void 0 ? void 0 : clientFile.file.type) || 'application/octet-stream';
92
+ event.dataTransfer.clearData();
93
+ event.dataTransfer.effectAllowed = 'copy';
94
+ if (clientFile) {
95
+ const item = event.dataTransfer.items.add(clientFile.file);
96
+ if (item === null) {
97
+ event.preventDefault();
98
+ return;
99
+ }
100
+ }
101
+ else {
102
+ const dragData = studio_protocol_1.StudioProtocolInternals.makeDragData({
103
+ type: 'render-output',
104
+ outputPath: job.outName,
105
+ fileName: filename,
106
+ });
107
+ event.dataTransfer.setData(dragData.mimeType, dragData.payload);
108
+ }
109
+ event.dataTransfer.setData('DownloadURL', `${mimeType}:${filename}:${source}`);
110
+ setIsDragging(true);
111
+ }
112
+ catch (_a) {
113
+ event.preventDefault();
114
+ }
115
+ }, [canDrag, clientFile, job.outName]);
116
+ const onDragEnd = (0, react_1.useCallback)(() => {
117
+ setIsDragging(false);
118
+ }, []);
119
+ return { canDrag, isDragging, onDragEnd, onDragStart };
120
+ };
121
+ exports.useRenderOutputFileDrag = useRenderOutputFileDrag;
@@ -18,7 +18,6 @@ const item = {
18
18
  display: 'flex',
19
19
  fontSize: 15,
20
20
  padding: '4px 12px',
21
- cursor: 'pointer',
22
21
  appearance: 'none',
23
22
  border: 'none',
24
23
  flex: 1,
@@ -1,26 +1,23 @@
1
1
  import React from 'react';
2
2
  import type { SelectedOutline } from './selected-outline-geometry';
3
- import { type SelectedOutlineSnapPoint, type SelectedOutlineSnapTarget } from './selected-outline-snap';
4
- import { type SelectedOutlineDragTarget, type SelectedOutlineRotationDragTarget, type SelectedOutlineScaleDragTarget, type SelectedOutlineTarget } from './selected-outline-types';
3
+ import { type SelectedOutlineSnapPoint } from './selected-outline-snap';
4
+ import { type SelectedOutlineDragTarget, type SelectedOutlineLayoutTarget, type SelectedOutlineRotationDragTarget, type SelectedOutlineScaleDragTarget, type SelectedOutlineTarget } from './selected-outline-types';
5
5
  import type { TimelineSelection, TimelineSelectionInteraction } from './Timeline/TimelineSelection';
6
- export declare const SelectedOutlineTransformOriginHandle: React.FC<{
7
- readonly outline: SelectedOutline;
8
- readonly onDraggingChange: (dragging: boolean) => void;
9
- readonly target: SelectedOutlineTarget | undefined;
10
- }>;
11
- export declare const SelectedOutlineElement: React.FC<{
12
- readonly allDragTargets: readonly SelectedOutlineDragTarget[];
13
- readonly allDragOutlines: readonly SelectedOutline[];
14
- readonly allRotationDragTargets: readonly SelectedOutlineRotationDragTarget[];
15
- readonly allScaleDragTargets: readonly SelectedOutlineScaleDragTarget[];
6
+ type SelectedOutlineElementProps = {
7
+ readonly compositionHeight: number;
8
+ readonly compositionWidth: number;
16
9
  readonly dragging: boolean;
17
- readonly hovered: boolean;
10
+ readonly getAllDragOutlines: () => readonly SelectedOutline[];
11
+ readonly getAllDragTargets: () => readonly SelectedOutlineDragTarget[];
12
+ readonly getAllRotationDragTargets: () => readonly SelectedOutlineRotationDragTarget[];
13
+ readonly getAllScaleDragTargets: () => readonly SelectedOutlineScaleDragTarget[];
14
+ readonly getLatestTargetByKey: (key: string) => SelectedOutlineTarget | undefined;
15
+ readonly layoutTarget: SelectedOutlineLayoutTarget | undefined;
18
16
  readonly outline: SelectedOutline;
19
17
  readonly onDraggingChange: (dragging: boolean) => void;
20
- readonly onHoverChange: (key: string | null) => void;
21
18
  readonly onSnapPointsChange: (snapPoints: readonly SelectedOutlineSnapPoint[]) => void;
22
19
  readonly onSelect: (item: TimelineSelection, interaction: TimelineSelectionInteraction) => void;
23
20
  readonly scale: number;
24
- readonly snapTargets: readonly SelectedOutlineSnapTarget[];
25
- readonly target: SelectedOutlineTarget | undefined;
26
- }>;
21
+ };
22
+ export declare const SelectedOutlineElement: React.NamedExoticComponent<SelectedOutlineElementProps>;
23
+ export {};