@remotion/studio 4.0.502 → 4.0.504

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 (217) hide show
  1. package/dist/api/install-package.d.ts +2 -1
  2. package/dist/api/install-package.js +6 -2
  3. package/dist/components/AssetSelectorItem.js +4 -16
  4. package/dist/components/Canvas.js +41 -54
  5. package/dist/components/CheckboardToggle.js +3 -1
  6. package/dist/components/ColorPicker/AlphaSlider.js +14 -10
  7. package/dist/components/ColorPicker/HueSlider.js +14 -10
  8. package/dist/components/ColorPicker/SaturationValueArea.js +14 -12
  9. package/dist/components/CompositionContextButton.js +1 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -3
  11. package/dist/components/ConfigureDefaultEditorModal.d.ts +2 -0
  12. package/dist/components/ConfigureDefaultEditorModal.js +151 -0
  13. package/dist/components/ConfirmationDialog.js +6 -3
  14. package/dist/components/ContextMenu.js +0 -2
  15. package/dist/components/ControlButton.d.ts +4 -2
  16. package/dist/components/ControlButton.js +6 -20
  17. package/dist/components/Editor.js +1 -4
  18. package/dist/components/EditorContent.js +1 -1
  19. package/dist/components/EditorGuides/Guide.js +48 -74
  20. package/dist/components/EditorRuler/Ruler.d.ts +1 -0
  21. package/dist/components/EditorRuler/Ruler.js +3 -1
  22. package/dist/components/EditorRuler/index.js +26 -23
  23. package/dist/components/EffectPickerModal.js +68 -7
  24. package/dist/components/ElementInstallConfirmation.d.ts +12 -0
  25. package/dist/components/ElementInstallConfirmation.js +205 -0
  26. package/dist/components/ForceSpecificCursor.js +14 -0
  27. package/dist/components/FullscreenToggle.js +1 -2
  28. package/dist/components/InitialCompositionLoader.js +1 -14
  29. package/dist/components/InlineAction.d.ts +4 -4
  30. package/dist/components/InlineAction.js +6 -4
  31. package/dist/components/InspectorLocationCopy.d.ts +1 -0
  32. package/dist/components/InspectorLocationCopy.js +7 -3
  33. package/dist/components/InspectorOpenInEditor.d.ts +5 -0
  34. package/dist/components/InspectorOpenInEditor.js +135 -0
  35. package/dist/components/InspectorPanel/AlignmentControls.js +1 -1
  36. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +3 -3
  37. package/dist/components/InspectorPanel/CompositionMetadata.js +8 -7
  38. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +2 -2
  39. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
  40. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -2
  41. package/dist/components/InspectorPanel/styles.js +4 -0
  42. package/dist/components/InspectorSequenceSection.js +2 -2
  43. package/dist/components/LoopToggle.js +1 -1
  44. package/dist/components/Menu/MenuItem.js +13 -6
  45. package/dist/components/Menu/MenuSubItem.js +3 -1
  46. package/dist/components/MenuBuildIndicator.d.ts +3 -1
  47. package/dist/components/MenuBuildIndicator.js +6 -4
  48. package/dist/components/MenuCompositionName.js +1 -1
  49. package/dist/components/MenuToolbar.js +1 -1
  50. package/dist/components/MobilePanel.d.ts +1 -2
  51. package/dist/components/MobilePanel.js +6 -6
  52. package/dist/components/ModalContainer.js +1 -1
  53. package/dist/components/ModalFooter.d.ts +1 -0
  54. package/dist/components/ModalFooter.js +2 -2
  55. package/dist/components/Modals.js +11 -2
  56. package/dist/components/MuteToggle.js +2 -1
  57. package/dist/components/NewComposition/ComboBox.d.ts +1 -0
  58. package/dist/components/NewComposition/ComboBox.js +2 -2
  59. package/dist/components/NewComposition/InputDragger.d.ts +4 -0
  60. package/dist/components/NewComposition/InputDragger.js +26 -32
  61. package/dist/components/Notifications/NotificationCenter.js +12 -2
  62. package/dist/components/OutlineToggle.js +10 -2
  63. package/dist/components/PlayPause.js +1 -5
  64. package/dist/components/PlaybackRateSelector.js +2 -1
  65. package/dist/components/PreviewToolbar.js +8 -7
  66. package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
  67. package/dist/components/PreviewToolbarOverflowButton.js +2 -75
  68. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
  69. package/dist/components/RenderButton.d.ts +0 -1
  70. package/dist/components/RenderButton.js +10 -9
  71. package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
  72. package/dist/components/RenderModal/InlineEyeIcon.js +1 -1
  73. package/dist/components/RenderModal/InlineRemoveButton.js +1 -1
  74. package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
  75. package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
  76. package/dist/components/RenderModal/RenderModalOutputName.js +12 -3
  77. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +1 -1
  78. package/dist/components/RenderModal/ServerRenderModal.js +2 -17
  79. package/dist/components/RenderModal/WebRenderModal.js +3 -17
  80. package/dist/components/RenderModal/layout.js +7 -5
  81. package/dist/components/RenderModal/render-modals.js +18 -15
  82. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  83. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +1 -1
  84. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  85. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +1 -1
  86. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
  87. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -15
  88. package/dist/components/SelectedOutlineCropControls.js +7 -6
  89. package/dist/components/SelectedOutlineElement.js +32 -38
  90. package/dist/components/SelectedOutlineUvControls.js +25 -24
  91. package/dist/components/ShowGuidesProvider.js +2 -0
  92. package/dist/components/SidebarCollapserControls.js +2 -2
  93. package/dist/components/SidebarRenderButton.js +2 -16
  94. package/dist/components/SizeSelector.js +2 -1
  95. package/dist/components/SnappingToggle.js +1 -2
  96. package/dist/components/Spinner.d.ts +1 -0
  97. package/dist/components/Spinner.js +2 -2
  98. package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
  99. package/dist/components/Splitter/SplitterContainer.js +4 -1
  100. package/dist/components/Splitter/SplitterContext.d.ts +4 -3
  101. package/dist/components/Splitter/SplitterContext.js +3 -2
  102. package/dist/components/Splitter/SplitterElement.js +6 -1
  103. package/dist/components/Splitter/SplitterHandle.js +18 -68
  104. package/dist/components/Tabs/vertical.d.ts +1 -0
  105. package/dist/components/Tabs/vertical.js +8 -10
  106. package/dist/components/TimeValue.js +26 -8
  107. package/dist/components/Timeline/EasingEditorModal.js +27 -19
  108. package/dist/components/Timeline/Timeline.js +1 -1
  109. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
  111. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
  112. package/dist/components/Timeline/TimelineDragHandler.js +38 -7
  113. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -1
  114. package/dist/components/Timeline/TimelineInOutDragHandler.js +26 -11
  115. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +1 -1
  116. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -2
  117. package/dist/components/Timeline/TimelineLayerEye.js +36 -4
  118. package/dist/components/Timeline/TimelineSelection.js +16 -24
  119. package/dist/components/Timeline/TimelineSequence.js +7 -3
  120. package/dist/components/Timeline/TimelineSequenceItem.js +24 -18
  121. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +1 -1
  122. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +76 -43
  123. package/dist/components/Timeline/TimelineStack/get-stack.js +7 -2
  124. package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
  125. package/dist/components/Timeline/TimelineZoomControls.js +24 -12
  126. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +4 -2
  127. package/dist/components/Timeline/get-sequence-context-menu-items.js +38 -2
  128. package/dist/components/Timeline/should-subscribe-to-source-file.d.ts +1 -0
  129. package/dist/components/Timeline/should-subscribe-to-source-file.js +11 -0
  130. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
  131. package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +3 -1
  132. package/dist/components/Timeline/use-open-sequence-in-editor.js +5 -2
  133. package/dist/components/Timeline/use-sequence-props-subscription.js +2 -0
  134. package/dist/components/Timeline/use-timeline-asset-drop.js +3 -7
  135. package/dist/components/Timeline/use-timeline-keyframe-drag.js +31 -16
  136. package/dist/components/TimelineInOutToggle.js +3 -3
  137. package/dist/components/TopPanel.js +3 -2
  138. package/dist/components/UndoRedoButtons.js +6 -5
  139. package/dist/components/UpdateCheck.d.ts +2 -0
  140. package/dist/components/UpdateCheck.js +29 -11
  141. package/dist/components/UpdateModal/UpdateModal.js +58 -19
  142. package/dist/components/VisualControls/ClickableFileName.js +5 -2
  143. package/dist/components/composition-menu-items.d.ts +2 -4
  144. package/dist/components/composition-menu-items.js +32 -55
  145. package/dist/components/element-install-request.d.ts +3 -0
  146. package/dist/components/element-install-request.js +17 -0
  147. package/dist/components/folder-menu-items.js +1 -1
  148. package/dist/components/handle-drop.d.ts +2 -3
  149. package/dist/components/handle-drop.js +11 -4
  150. package/dist/components/import-assets.d.ts +7 -6
  151. package/dist/components/import-assets.js +5 -16
  152. package/dist/components/use-default-editor-info.d.ts +4 -0
  153. package/dist/components/use-default-editor-info.js +47 -0
  154. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
  155. package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
  156. package/dist/esm/{chunk-fjv75ty4.js → chunk-43m68z1k.js} +8689 -7374
  157. package/dist/esm/internals.mjs +8689 -7374
  158. package/dist/esm/previewEntry.mjs +8668 -7353
  159. package/dist/esm/renderEntry.mjs +1 -1
  160. package/dist/helpers/inject-css.js +58 -67
  161. package/dist/helpers/install-required-package.d.ts +3 -2
  162. package/dist/helpers/install-required-package.js +20 -15
  163. package/dist/helpers/open-in-editor.d.ts +3 -3
  164. package/dist/helpers/open-in-editor.js +10 -6
  165. package/dist/helpers/pointer-session.d.ts +9 -0
  166. package/dist/helpers/pointer-session.js +94 -0
  167. package/dist/helpers/use-menu-structure.js +109 -51
  168. package/dist/icons/audio.d.ts +1 -1
  169. package/dist/icons/audio.js +1 -1
  170. package/dist/icons/caret.js +1 -1
  171. package/dist/icons/certificate.d.ts +1 -1
  172. package/dist/icons/certificate.js +1 -1
  173. package/dist/icons/custom-editor.d.ts +4 -0
  174. package/dist/icons/custom-editor.js +11 -0
  175. package/dist/icons/data.d.ts +1 -1
  176. package/dist/icons/data.js +2 -2
  177. package/dist/icons/editor.d.ts +6 -0
  178. package/dist/icons/editor.js +52 -0
  179. package/dist/icons/effects.d.ts +5 -0
  180. package/dist/icons/effects.js +8 -0
  181. package/dist/icons/ellipsis.js +1 -1
  182. package/dist/icons/external-link.d.ts +5 -0
  183. package/dist/icons/external-link.js +10 -0
  184. package/dist/icons/fullscreen.js +1 -1
  185. package/dist/icons/gear.d.ts +1 -1
  186. package/dist/icons/gear.js +1 -1
  187. package/dist/icons/gif.d.ts +1 -1
  188. package/dist/icons/gif.js +1 -1
  189. package/dist/icons/input-props.d.ts +2 -0
  190. package/dist/icons/input-props.js +9 -0
  191. package/dist/icons/jump-to-start.js +2 -2
  192. package/dist/icons/magnet.d.ts +3 -1
  193. package/dist/icons/magnet.js +2 -2
  194. package/dist/icons/media-volume.d.ts +6 -2
  195. package/dist/icons/media-volume.js +8 -6
  196. package/dist/icons/minus.d.ts +3 -1
  197. package/dist/icons/minus.js +2 -2
  198. package/dist/icons/pause.js +1 -1
  199. package/dist/icons/play.js +1 -1
  200. package/dist/icons/plus.js +1 -1
  201. package/dist/icons/redo.js +2 -2
  202. package/dist/icons/step-back.js +2 -2
  203. package/dist/icons/step-forward.js +2 -2
  204. package/dist/icons/timelineInOutPointer.js +2 -2
  205. package/dist/icons/undo.js +2 -2
  206. package/dist/state/editor-guides.d.ts +1 -0
  207. package/dist/state/editor-guides.js +1 -0
  208. package/dist/state/modals.d.ts +2 -0
  209. package/dist/state/z-index.d.ts +1 -0
  210. package/dist/state/z-index.js +34 -18
  211. package/package.json +12 -13
  212. package/dist/components/StudioCanvasCapture.d.ts +0 -5
  213. package/dist/components/StudioCanvasCapture.js +0 -40
  214. package/dist/components/canvas-capture-enabled.d.ts +0 -1
  215. package/dist/components/canvas-capture-enabled.js +0 -4
  216. package/dist/components/use-element-overwrite-confirmation.d.ts +0 -2
  217. package/dist/components/use-element-overwrite-confirmation.js +0 -73
@@ -22,34 +22,46 @@ const buttonStyle = {
22
22
  fontSize: 24,
23
23
  };
24
24
  const iconStyle = {
25
- color: colors_1.WHITE,
26
25
  width: 14,
27
26
  };
28
- const TimelineZoomControls = () => {
27
+ const TimelineZoomSlider = ({ maxWidth }) => {
29
28
  var _a;
30
29
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
31
30
  const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
32
31
  const { tabIndex } = (0, z_index_1.useZIndex)();
33
- const onMinusClicked = (0, react_1.useCallback)(() => {
32
+ const isStill = (0, is_current_selected_still_1.useIsStill)();
33
+ const onChange = (0, react_1.useCallback)((e) => {
34
34
  if (canvasContent === null || canvasContent.type !== 'composition') {
35
35
  return;
36
36
  }
37
- setZoom(canvasContent.compositionId, (z) => Math.max(timeline_zoom_1.TIMELINE_MIN_ZOOM, z - 0.2), { anchorFrame: null, anchorContentX: null });
37
+ setZoom(canvasContent.compositionId, () => Number(e.target.value), {
38
+ anchorFrame: null,
39
+ anchorContentX: null,
40
+ });
38
41
  }, [canvasContent, setZoom]);
39
- const onPlusClicked = (0, react_1.useCallback)(() => {
42
+ if (isStill ||
43
+ canvasContent === null ||
44
+ canvasContent.type !== 'composition') {
45
+ return null;
46
+ }
47
+ const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
48
+ return (jsx_runtime_1.jsx("input", { style: maxWidth === undefined ? undefined : { maxWidth }, title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: "range", min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }));
49
+ };
50
+ const TimelineZoomControls = ({ sliderMaxWidth }) => {
51
+ var _a;
52
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
53
+ const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
54
+ const onMinusClicked = (0, react_1.useCallback)(() => {
40
55
  if (canvasContent === null || canvasContent.type !== 'composition') {
41
56
  return;
42
57
  }
43
- setZoom(canvasContent.compositionId, (z) => Math.min(timeline_zoom_1.TIMELINE_MAX_ZOOM, z + 0.2), { anchorFrame: null, anchorContentX: null });
58
+ setZoom(canvasContent.compositionId, (z) => Math.max(timeline_zoom_1.TIMELINE_MIN_ZOOM, z - 0.2), { anchorFrame: null, anchorContentX: null });
44
59
  }, [canvasContent, setZoom]);
45
- const onChange = (0, react_1.useCallback)((e) => {
60
+ const onPlusClicked = (0, react_1.useCallback)(() => {
46
61
  if (canvasContent === null || canvasContent.type !== 'composition') {
47
62
  return;
48
63
  }
49
- setZoom(canvasContent.compositionId, () => Number(e.target.value), {
50
- anchorFrame: null,
51
- anchorContentX: null,
52
- });
64
+ setZoom(canvasContent.compositionId, (z) => Math.min(timeline_zoom_1.TIMELINE_MAX_ZOOM, z + 0.2), { anchorFrame: null, anchorContentX: null });
53
65
  }, [canvasContent, setZoom]);
54
66
  const isStill = (0, is_current_selected_still_1.useIsStill)();
55
67
  if (isStill ||
@@ -59,7 +71,7 @@ const TimelineZoomControls = () => {
59
71
  }
60
72
  const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
61
73
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
62
- jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("input", { title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: 'range', min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: jsx_runtime_1.jsx(plus_1.Plus, { color: colors_1.CURRENT_COLOR_LOWERCASE, style: iconStyle }) })
74
+ jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: (color) => jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle, color: color }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineZoomSlider, { maxWidth: sliderMaxWidth }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: iconStyle }) })
63
75
  ] }));
64
76
  };
65
77
  exports.TimelineZoomControls = TimelineZoomControls;
@@ -1,7 +1,8 @@
1
+ import type { EditorPickerId, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
1
2
  import type { ResolvedStackLocation, TSequence } from 'remotion';
2
3
  import type { ComboboxValue } from '../NewComposition/ComboBox';
3
4
  import type { TimelineAssetLinkInfo } from './timeline-asset-link';
4
- export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
5
+ export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions, }: {
5
6
  readonly assetLinkInfo: TimelineAssetLinkInfo | null;
6
7
  readonly canOpenInEditor: boolean;
7
8
  readonly deleteDisabled: boolean;
@@ -9,10 +10,11 @@ export declare const getSequenceContextMenuItems: ({ assetLinkInfo, canOpenInEdi
9
10
  readonly duplicateDisabled: boolean;
10
11
  readonly fileLocation: string | null;
11
12
  readonly includeSourceEditItems: boolean;
13
+ readonly editorInfo: GetDefaultEditorInfoResponse | null;
12
14
  readonly onDeleteSequenceFromSource: () => void;
13
15
  readonly onDisableSequenceInteractivity: () => void;
14
16
  readonly onDuplicateSequenceFromSource: () => void;
15
- readonly openInEditor: () => void;
17
+ readonly openInEditor: (editorId: EditorPickerId | null) => void;
16
18
  readonly originalLocation: ResolvedStackLocation | null;
17
19
  readonly selectAsset: (src: string) => void;
18
20
  readonly sequence: TSequence;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSequenceContextMenuItems = void 0;
4
+ const react_1 = require("react");
4
5
  const no_react_1 = require("remotion/no-react");
6
+ const editor_1 = require("../../icons/editor");
5
7
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
6
8
  const timeline_asset_link_1 = require("./timeline-asset-link");
7
9
  const normalizeMenuDividers = (items) => {
@@ -22,11 +24,13 @@ const normalizeMenuDividers = (items) => {
22
24
  return normalized;
23
25
  };
24
26
  const interactiveSvgComponentIdentity = 'dev.remotion.remotion.Interactive.Svg';
25
- const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
27
+ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, editorInfo, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
26
28
  var _a, _b;
29
+ var _c;
27
30
  const editorName = window.remotion_editorName;
28
31
  const { documentationLink } = sequence;
29
32
  const isInteractiveSvg = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) === interactiveSvgComponentIdentity;
33
+ const installedEditors = (_c = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _c !== void 0 ? _c : [];
30
34
  const items = [
31
35
  editorName
32
36
  ? {
@@ -36,12 +40,44 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
36
40
  label: `Open in ${editorName}`,
37
41
  leftItem: null,
38
42
  disabled: !canOpenInEditor || !originalLocation,
39
- onClick: openInEditor,
43
+ onClick: () => openInEditor(null),
40
44
  quickSwitcherLabel: null,
41
45
  subMenu: null,
42
46
  value: 'open-in-editor',
43
47
  }
44
48
  : null,
49
+ editorName && installedEditors.length > 0
50
+ ? {
51
+ type: 'item',
52
+ id: 'open-in-another-editor',
53
+ keyHint: null,
54
+ label: 'Open in...',
55
+ leftItem: null,
56
+ disabled: !canOpenInEditor || !originalLocation,
57
+ onClick: () => undefined,
58
+ quickSwitcherLabel: null,
59
+ subMenu: {
60
+ items: installedEditors.map((editor) => ({
61
+ type: 'item',
62
+ id: `open-in-${editor.id}`,
63
+ keyHint: null,
64
+ label: editor.name,
65
+ leftItem: (0, react_1.createElement)(editor_1.EditorIcon, {
66
+ editorId: editor.id,
67
+ size: 18,
68
+ }),
69
+ disabled: false,
70
+ onClick: () => openInEditor(editor.id),
71
+ quickSwitcherLabel: null,
72
+ subMenu: null,
73
+ value: editor.id,
74
+ })),
75
+ leaveLeftSpace: true,
76
+ preselectIndex: false,
77
+ },
78
+ value: 'open-in-another-editor',
79
+ }
80
+ : null,
45
81
  {
46
82
  type: 'item',
47
83
  id: 'copy-file-location',
@@ -0,0 +1 @@
1
+ export declare const shouldSubscribeToSourceFile: (source: string) => boolean;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shouldSubscribeToSourceFile = void 0;
4
+ const shouldSubscribeToSourceFile = (source) => {
5
+ const normalized = source.replaceAll('\\', '/');
6
+ if (normalized === '..' || normalized.startsWith('../')) {
7
+ return false;
8
+ }
9
+ return !normalized.split('/').includes('node_modules');
10
+ };
11
+ exports.shouldSubscribeToSourceFile = shouldSubscribeToSourceFile;
@@ -8,6 +8,7 @@ const timeline_layout_1 = require("../../helpers/timeline-layout");
8
8
  const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
9
9
  const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
10
10
  const get_node_keyframes_1 = require("./get-node-keyframes");
11
+ const imperative_state_1 = require("./imperative-state");
11
12
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
12
13
  const TimelineSelection_1 = require("./TimelineSelection");
13
14
  const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
@@ -36,7 +37,6 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
36
37
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
37
38
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
38
39
  const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
39
- const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
40
40
  const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
41
41
  sequence,
42
42
  nodePathInfo,
@@ -89,7 +89,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
89
89
  keyframeDisplayOffset,
90
90
  getDragOverrides,
91
91
  getEffectDragOverrides,
92
- timelinePosition,
92
+ timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
93
93
  }),
94
94
  ])), [
95
95
  flat,
@@ -98,7 +98,6 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
98
98
  keyframeDisplayOffset,
99
99
  nodePathInfo.sequenceSubscriptionKey,
100
100
  propStatuses,
101
- timelinePosition,
102
101
  ]);
103
102
  const rows = (0, react_1.useMemo)(() => flat.map(({ node }) => {
104
103
  var _a;
@@ -1,6 +1,8 @@
1
+ import type { EditorPickerId } from '@remotion/studio-shared';
1
2
  import type { TSequence } from 'remotion';
2
3
  export declare const useOpenSequenceInEditor: (sequence: TSequence) => {
3
4
  canOpenInEditor: boolean;
4
- openInEditor: () => Promise<void>;
5
+ editorInfo: import("@remotion/studio-shared").GetDefaultEditorInfoResponse | null;
6
+ openInEditor: (editorId: EditorPickerId | null) => Promise<void>;
5
7
  originalLocation: import("remotion").ResolvedStackLocation | null;
6
8
  };
@@ -5,18 +5,20 @@ const react_1 = require("react");
5
5
  const client_id_1 = require("../../helpers/client-id");
6
6
  const open_in_editor_1 = require("../../helpers/open-in-editor");
7
7
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
+ const use_default_editor_info_1 = require("../use-default-editor-info");
8
9
  const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
9
10
  const useOpenSequenceInEditor = (sequence) => {
10
11
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
11
12
  const previewConnected = previewServerState.type === 'connected';
12
13
  const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
14
+ const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
13
15
  const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
14
- const openInEditor = (0, react_1.useCallback)(async () => {
16
+ const openInEditor = (0, react_1.useCallback)(async (editorId) => {
15
17
  if (!canOpenInEditor || !originalLocation) {
16
18
  return;
17
19
  }
18
20
  try {
19
- await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation);
21
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, editorId);
20
22
  }
21
23
  catch (err) {
22
24
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
@@ -24,6 +26,7 @@ const useOpenSequenceInEditor = (sequence) => {
24
26
  }, [canOpenInEditor, originalLocation]);
25
27
  return {
26
28
  canOpenInEditor,
29
+ editorInfo,
27
30
  openInEditor,
28
31
  originalLocation,
29
32
  };
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
8
  const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
9
9
  const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
10
+ const should_subscribe_to_source_file_1 = require("./should-subscribe-to-source-file");
10
11
  const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, }) => {
11
12
  var _a, _b, _c;
12
13
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -40,6 +41,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
40
41
  var _a, _b;
41
42
  if (!clientId ||
42
43
  !locationSource ||
44
+ !(0, should_subscribe_to_source_file_1.shouldSubscribeToSourceFile)(locationSource) ||
43
45
  !locationLine ||
44
46
  locationColumn === null ||
45
47
  !schema ||
@@ -11,7 +11,7 @@ const effect_drag_and_drop_1 = require("../effect-drag-and-drop");
11
11
  const handle_drop_1 = require("../handle-drop");
12
12
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
13
13
  const SvgImportDialog_1 = require("../SvgImportDialog");
14
- const use_element_overwrite_confirmation_1 = require("../use-element-overwrite-confirmation");
14
+ const imperative_state_1 = require("./imperative-state");
15
15
  const timeline_refs_1 = require("./timeline-refs");
16
16
  const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
17
17
  const use_resolved_stack_1 = require("./use-resolved-stack");
@@ -29,9 +29,7 @@ const useTimelineAssetDrop = () => {
29
29
  var _a, _b;
30
30
  const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
31
31
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
32
- const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
33
32
  const chooseSvgImportMode = (0, SvgImportDialog_1.useSvgImportDialog)();
34
- const confirmElementOverwrite = (0, use_element_overwrite_confirmation_1.useElementOverwriteConfirmation)();
35
33
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
36
34
  const [isAddingAsset, setIsAddingAsset] = (0, react_1.useState)(false);
37
35
  const [assetDropFrame, setAssetDropFrame] = (0, react_1.useState)(null);
@@ -67,8 +65,8 @@ const useTimelineAssetDrop = () => {
67
65
  timelineLeft: scrollable.getBoundingClientRect().left,
68
66
  timelineWidth: scrollable.scrollWidth,
69
67
  })
70
- : timelinePosition;
71
- }, [timelinePosition, videoConfig]);
68
+ : (0, imperative_state_1.getCurrentFrame)();
69
+ }, [videoConfig]);
72
70
  const onAssetDragOver = (0, react_1.useCallback)((event) => {
73
71
  const timeline = timeline_refs_1.timelineVerticalScroll.current;
74
72
  const { dataTransfer } = event;
@@ -122,7 +120,6 @@ const useTimelineAssetDrop = () => {
122
120
  await (0, handle_drop_1.handleDrop)({
123
121
  chooseSvgImportMode,
124
122
  compositionFile,
125
- confirmElementOverwrite,
126
123
  compositionId: currentCompositionId,
127
124
  destinationDimensions: {
128
125
  height: videoConfig.height,
@@ -145,7 +142,6 @@ const useTimelineAssetDrop = () => {
145
142
  chooseSvgImportMode,
146
143
  compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence,
147
144
  compositionFile,
148
- confirmElementOverwrite,
149
145
  currentCompositionId,
150
146
  getDropFrame,
151
147
  videoConfig,
@@ -5,6 +5,7 @@ const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const pointer_session_1 = require("../../helpers/pointer-session");
8
9
  const timeline_layout_1 = require("../../helpers/timeline-layout");
9
10
  const call_move_keyframe_1 = require("./call-move-keyframe");
10
11
  const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
@@ -319,11 +320,8 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
319
320
  .filter((target) => target !== null);
320
321
  return dragTargets;
321
322
  };
322
- const cleanup = () => {
323
- window.removeEventListener('pointermove', onPointerMove);
324
- window.removeEventListener('pointerup', onPointerUp);
325
- window.removeEventListener('pointercancel', onPointerCancel);
326
- };
323
+ let stopPointerSession = null;
324
+ const cleanup = () => stopPointerSession === null || stopPointerSession === void 0 ? void 0 : stopPointerSession();
327
325
  const clearActiveOverrides = () => {
328
326
  const targets = dragTargets;
329
327
  if (targets === null) {
@@ -438,9 +436,19 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
438
436
  clearActiveOverrides();
439
437
  clearDraggedKeyframes();
440
438
  };
441
- window.addEventListener('pointermove', onPointerMove);
442
- window.addEventListener('pointerup', onPointerUp);
443
- window.addEventListener('pointercancel', onPointerCancel);
439
+ stopPointerSession = (0, pointer_session_1.startPointerSession)({
440
+ event: e,
441
+ target: e.currentTarget,
442
+ onMove: onPointerMove,
443
+ onEnd: (reason) => {
444
+ if (reason === 'pointerup' || reason === 'buttons-released') {
445
+ onPointerUp();
446
+ }
447
+ else {
448
+ onPointerCancel();
449
+ }
450
+ },
451
+ });
444
452
  }, [
445
453
  clearDragOverrides,
446
454
  clearEffectDragOverrides,
@@ -519,11 +527,8 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
519
527
  .filter((target) => target !== null);
520
528
  return dragTargets;
521
529
  };
522
- const cleanup = () => {
523
- window.removeEventListener('pointermove', onPointerMove);
524
- window.removeEventListener('pointerup', onPointerUp);
525
- window.removeEventListener('pointercancel', onPointerCancel);
526
- };
530
+ let stopPointerSession = null;
531
+ const cleanup = () => stopPointerSession === null || stopPointerSession === void 0 ? void 0 : stopPointerSession();
527
532
  const clearActiveOverrides = () => {
528
533
  const targets = dragTargets;
529
534
  if (targets === null) {
@@ -638,9 +643,19 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
638
643
  clearActiveOverrides();
639
644
  clearDraggedKeyframes();
640
645
  };
641
- window.addEventListener('pointermove', onPointerMove);
642
- window.addEventListener('pointerup', onPointerUp);
643
- window.addEventListener('pointercancel', onPointerCancel);
646
+ stopPointerSession = (0, pointer_session_1.startPointerSession)({
647
+ event: e,
648
+ target: e.currentTarget,
649
+ onMove: onPointerMove,
650
+ onEnd: (reason) => {
651
+ if (reason === 'pointerup' || reason === 'buttons-released') {
652
+ onPointerUp();
653
+ }
654
+ else {
655
+ onPointerCancel();
656
+ }
657
+ },
658
+ });
644
659
  }, [
645
660
  clearDragOverrides,
646
661
  clearEffectDragOverrides,
@@ -19,8 +19,8 @@ const getTooltipText = (pointType, key) => [
19
19
  .filter(no_react_1.NoReactInternals.truthy)
20
20
  .join(' ');
21
21
  const style = {
22
- width: 16,
23
- height: 16,
22
+ width: 17,
23
+ height: 17,
24
24
  };
25
25
  exports.inOutHandles = (0, react_1.createRef)();
26
26
  exports.defaultInOutValue = { inFrame: null, outFrame: null };
@@ -239,7 +239,7 @@ const TimelineInOutPointToggle = () => {
239
239
  };
240
240
  }, [confId, onInMark, onInOutClear, onOutMark]);
241
241
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
242
- jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? colors_1.WHITE : colors_1.BLUE, style: style }) }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? colors_1.WHITE : colors_1.BLUE, style: style }) })
242
+ jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? color : colors_1.BLUE, style: style })) }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? color : colors_1.BLUE, style: style })) })
243
243
  ] }));
244
244
  };
245
245
  exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
@@ -69,6 +69,7 @@ const row = {
69
69
  minHeight: 0,
70
70
  };
71
71
  const MAX_SIDEBAR_WIDTH = 350;
72
+ const MIN_SIDEBAR_WIDTH = 250;
72
73
  const useResponsiveSidebarStatus = () => {
73
74
  const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
74
75
  const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
@@ -114,8 +115,8 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
114
115
  return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
115
116
  ? canvasContent.compositionId
116
117
  : null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
117
- jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, side: "left", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
118
- jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseRight, side: "right", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) }))) : null] }) })
118
+ jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (isMobileLayout ? (jsx_runtime_1.jsx(MobilePanel_1.default, { onClose: onCollapseLeft, children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) }))) : null, actualStateLeft === 'expanded' && !isMobileLayout ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, minAntiFlexerSize: MIN_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
119
+ jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })
119
120
  ] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
120
121
  ] }) }));
121
122
  };
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
7
7
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
8
8
  const client_id_1 = require("../helpers/client-id");
9
+ const colors_1 = require("../helpers/colors");
9
10
  const is_mac_1 = require("../helpers/is-mac");
10
11
  const use_keybinding_1 = require("../helpers/use-keybinding");
11
12
  const redo_1 = require("../icons/redo");
@@ -13,8 +14,8 @@ const undo_1 = require("../icons/undo");
13
14
  const call_api_1 = require("./call-api");
14
15
  const InlineAction_1 = require("./InlineAction");
15
16
  const iconStyle = {
16
- width: 16,
17
- height: 16,
17
+ width: 14,
18
+ height: 14,
18
19
  };
19
20
  const UndoRedoButtons = () => {
20
21
  const [undoFile, setUndoFile] = (0, react_1.useState)(null);
@@ -130,10 +131,10 @@ const UndoRedoButtons = () => {
130
131
  ? `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Shift+Z)`
131
132
  : `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Y)`;
132
133
  const renderUndo = (0, react_1.useCallback)((color) => {
133
- return jsx_runtime_1.jsx(undo_1.UndoIcon, { style: { ...iconStyle, color } });
134
+ return jsx_runtime_1.jsx(undo_1.UndoIcon, { style: iconStyle, color: color });
134
135
  }, []);
135
136
  const renderRedo = (0, react_1.useCallback)((color) => {
136
- return jsx_runtime_1.jsx(redo_1.RedoIcon, { style: { ...iconStyle, color } });
137
+ return jsx_runtime_1.jsx(redo_1.RedoIcon, { style: iconStyle, color: color });
137
138
  }, []);
138
139
  const canUndo = undoFile !== null;
139
140
  const canRedo = redoFile !== null;
@@ -141,7 +142,7 @@ const UndoRedoButtons = () => {
141
142
  return null;
142
143
  }
143
144
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
144
- jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo })
145
+ jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo, title: undoTooltip, disabled: !canUndo, unhoveredColor: colors_1.WHITE_ALPHA_80 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onRedo, renderAction: renderRedo, title: redoTooltip, disabled: !canRedo, unhoveredColor: colors_1.WHITE_ALPHA_80 })
145
146
  ] }));
146
147
  };
147
148
  exports.UndoRedoButtons = UndoRedoButtons;
@@ -3,6 +3,8 @@ export type UpdateInfo = {
3
3
  currentVersion: string;
4
4
  latestVersion: string;
5
5
  updateAvailable: boolean;
6
+ skillsUpdateAvailable: boolean;
7
+ remotionUpgradeSkillAvailable: boolean;
6
8
  timedOut: boolean;
7
9
  packageManager: PackageManager | 'unknown';
8
10
  };
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const modals_1 = require("../state/modals");
9
9
  const z_index_1 = require("../state/z-index");
10
+ const InlineAction_1 = require("./InlineAction");
10
11
  const actions_1 = require("./RenderQueue/actions");
11
12
  const buttonStyle = {
12
13
  appearance: 'none',
@@ -17,6 +18,12 @@ const buttonStyle = {
17
18
  fontSize: 14,
18
19
  display: 'inline-flex',
19
20
  justifyContent: 'center',
21
+ marginLeft: 8,
22
+ };
23
+ const updateIconContainer = {
24
+ alignItems: 'center',
25
+ display: 'flex',
26
+ flexShrink: 0,
20
27
  };
21
28
  const UpdateCheck = () => {
22
29
  const [info, setInfo] = (0, react_1.useState)(null);
@@ -24,9 +31,9 @@ const UpdateCheck = () => {
24
31
  const { tabIndex } = (0, z_index_1.useZIndex)();
25
32
  const [knownBugs, setKnownBugs] = (0, react_1.useState)(null);
26
33
  const [hovered, setHovered] = (0, react_1.useState)(false);
27
- const hasKnownBugs = (0, react_1.useMemo)(() => {
28
- return knownBugs && knownBugs.length > 0;
29
- }, [knownBugs]);
34
+ const hasBugfixesAvailable = (0, react_1.useMemo)(() => {
35
+ return Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) && knownBugs && knownBugs.length > 0);
36
+ }, [info === null || info === void 0 ? void 0 : info.updateAvailable, knownBugs]);
30
37
  const checkForUpdates = (0, react_1.useCallback)(() => {
31
38
  const controller = new AbortController();
32
39
  (0, actions_1.updateAvailable)(controller.signal)
@@ -78,25 +85,36 @@ const UpdateCheck = () => {
78
85
  const dynButtonStyle = (0, react_1.useMemo)(() => {
79
86
  return {
80
87
  ...buttonStyle,
81
- color: hovered ? colors_1.WHITE : hasKnownBugs ? colors_1.WARNING_COLOR : colors_1.WHITE_ALPHA_80,
88
+ color: hovered
89
+ ? colors_1.WHITE
90
+ : hasBugfixesAvailable
91
+ ? colors_1.WARNING_COLOR
92
+ : colors_1.WHITE_ALPHA_80,
82
93
  };
83
- }, [hasKnownBugs, hovered]);
94
+ }, [hasBugfixesAvailable, hovered]);
84
95
  const onPointerEnter = (0, react_1.useCallback)(() => {
85
96
  setHovered(true);
86
97
  }, []);
87
98
  const onPointerLeave = (0, react_1.useCallback)(() => {
88
99
  setHovered(false);
89
100
  }, []);
101
+ const renderUpdateIcon = (0, react_1.useCallback)((color) => {
102
+ return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
103
+ height: 16,
104
+ width: 16,
105
+ color,
106
+ flexShrink: 0,
107
+ }, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) }));
108
+ }, []);
90
109
  if (!info) {
91
110
  return null;
92
111
  }
93
- if (!info.updateAvailable) {
112
+ if (!info.updateAvailable && !info.skillsUpdateAvailable) {
94
113
  return null;
95
114
  }
96
- return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", title: hasKnownBugs ? 'Bugfixes available' : 'Update available', children: hasKnownBugs ? ('Bugfixes available') : (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
97
- height: 16,
98
- width: 16,
99
- color: 'inherit',
100
- }, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR_LOWERCASE, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) })) }));
115
+ if (!hasBugfixesAvailable) {
116
+ return (jsx_runtime_1.jsx("div", { style: updateIconContainer, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openModal, renderAction: renderUpdateIcon, unhoveredColor: colors_1.WHITE_ALPHA_80, title: "Update available" }) }));
117
+ }
118
+ return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", title: "Bugfixes available", children: "Bugfixes available" }));
101
119
  };
102
120
  exports.UpdateCheck = UpdateCheck;