@remotion/studio 4.0.503 → 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 (125) 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 +2 -14
  4. package/dist/components/Canvas.js +12 -5
  5. package/dist/components/CheckboardToggle.js +3 -1
  6. package/dist/components/CompositionSelectorItem.js +2 -3
  7. package/dist/components/ControlButton.d.ts +4 -2
  8. package/dist/components/ControlButton.js +6 -20
  9. package/dist/components/EditorContent.js +1 -1
  10. package/dist/components/EffectPickerModal.js +68 -7
  11. package/dist/components/FullscreenToggle.js +1 -2
  12. package/dist/components/InitialCompositionLoader.js +1 -14
  13. package/dist/components/InlineAction.d.ts +3 -4
  14. package/dist/components/InlineAction.js +5 -3
  15. package/dist/components/InspectorPanel/CompositionMetadata.js +7 -6
  16. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
  17. package/dist/components/InspectorPanel/styles.js +4 -0
  18. package/dist/components/LoopToggle.js +1 -1
  19. package/dist/components/MenuBuildIndicator.d.ts +3 -1
  20. package/dist/components/MenuBuildIndicator.js +5 -3
  21. package/dist/components/MenuToolbar.js +1 -1
  22. package/dist/components/MobilePanel.d.ts +1 -2
  23. package/dist/components/MobilePanel.js +6 -10
  24. package/dist/components/MuteToggle.js +2 -1
  25. package/dist/components/NewComposition/ComboBox.d.ts +1 -0
  26. package/dist/components/NewComposition/ComboBox.js +2 -2
  27. package/dist/components/NewComposition/InputDragger.d.ts +4 -0
  28. package/dist/components/NewComposition/InputDragger.js +7 -3
  29. package/dist/components/Notifications/NotificationCenter.js +12 -2
  30. package/dist/components/OutlineToggle.js +10 -2
  31. package/dist/components/PlayPause.js +1 -5
  32. package/dist/components/PlaybackRateSelector.js +2 -1
  33. package/dist/components/PreviewToolbar.js +8 -7
  34. package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
  35. package/dist/components/PreviewToolbarOverflowButton.js +2 -75
  36. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
  37. package/dist/components/RenderButton.d.ts +0 -1
  38. package/dist/components/RenderButton.js +10 -9
  39. package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
  40. package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
  41. package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
  42. package/dist/components/RenderModal/RenderModalOutputName.js +11 -2
  43. package/dist/components/RenderModal/ServerRenderModal.js +2 -17
  44. package/dist/components/RenderModal/WebRenderModal.js +3 -17
  45. package/dist/components/RenderModal/layout.js +7 -5
  46. package/dist/components/RenderModal/render-modals.js +18 -15
  47. package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -14
  48. package/dist/components/SelectedOutlineElement.js +4 -12
  49. package/dist/components/SidebarRenderButton.js +1 -15
  50. package/dist/components/SizeSelector.js +2 -1
  51. package/dist/components/SnappingToggle.js +1 -2
  52. package/dist/components/Spinner.d.ts +1 -0
  53. package/dist/components/Spinner.js +2 -2
  54. package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
  55. package/dist/components/Splitter/SplitterContainer.js +4 -1
  56. package/dist/components/Splitter/SplitterContext.d.ts +4 -3
  57. package/dist/components/Splitter/SplitterContext.js +3 -2
  58. package/dist/components/Splitter/SplitterElement.js +6 -1
  59. package/dist/components/Splitter/SplitterHandle.js +1 -0
  60. package/dist/components/Tabs/vertical.d.ts +1 -0
  61. package/dist/components/Tabs/vertical.js +8 -10
  62. package/dist/components/TimeValue.js +26 -8
  63. package/dist/components/Timeline/Timeline.js +1 -1
  64. package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
  65. package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
  66. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +2 -1
  67. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +1 -1
  68. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -2
  69. package/dist/components/Timeline/TimelineSelection.js +2 -3
  70. package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
  71. package/dist/components/Timeline/TimelineZoomControls.js +24 -12
  72. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
  73. package/dist/components/Timeline/use-timeline-asset-drop.js +3 -3
  74. package/dist/components/TimelineInOutToggle.js +3 -3
  75. package/dist/components/TopPanel.js +3 -2
  76. package/dist/components/UndoRedoButtons.js +6 -5
  77. package/dist/components/UpdateCheck.js +18 -5
  78. package/dist/components/UpdateModal/UpdateModal.js +35 -12
  79. package/dist/components/composition-menu-items.d.ts +2 -4
  80. package/dist/components/composition-menu-items.js +31 -54
  81. package/dist/components/import-assets.d.ts +2 -1
  82. package/dist/components/import-assets.js +1 -1
  83. package/dist/esm/{chunk-bj1r1hh5.js → chunk-43m68z1k.js} +4824 -4457
  84. package/dist/esm/internals.mjs +4824 -4457
  85. package/dist/esm/previewEntry.mjs +4801 -4434
  86. package/dist/esm/renderEntry.mjs +1 -1
  87. package/dist/helpers/inject-css.js +40 -23
  88. package/dist/helpers/install-required-package.d.ts +3 -2
  89. package/dist/helpers/install-required-package.js +20 -15
  90. package/dist/helpers/use-menu-structure.js +85 -49
  91. package/dist/icons/audio.d.ts +1 -1
  92. package/dist/icons/audio.js +1 -1
  93. package/dist/icons/caret.js +1 -1
  94. package/dist/icons/certificate.d.ts +1 -1
  95. package/dist/icons/certificate.js +1 -1
  96. package/dist/icons/data.d.ts +1 -1
  97. package/dist/icons/data.js +2 -2
  98. package/dist/icons/effects.d.ts +5 -0
  99. package/dist/icons/effects.js +8 -0
  100. package/dist/icons/ellipsis.js +1 -1
  101. package/dist/icons/external-link.d.ts +5 -0
  102. package/dist/icons/external-link.js +10 -0
  103. package/dist/icons/fullscreen.js +1 -1
  104. package/dist/icons/gear.d.ts +1 -1
  105. package/dist/icons/gear.js +1 -1
  106. package/dist/icons/gif.d.ts +1 -1
  107. package/dist/icons/gif.js +1 -1
  108. package/dist/icons/input-props.d.ts +2 -0
  109. package/dist/icons/input-props.js +9 -0
  110. package/dist/icons/jump-to-start.js +2 -2
  111. package/dist/icons/magnet.d.ts +3 -1
  112. package/dist/icons/magnet.js +2 -2
  113. package/dist/icons/media-volume.d.ts +6 -2
  114. package/dist/icons/media-volume.js +8 -6
  115. package/dist/icons/minus.d.ts +3 -1
  116. package/dist/icons/minus.js +2 -2
  117. package/dist/icons/pause.js +1 -1
  118. package/dist/icons/play.js +1 -1
  119. package/dist/icons/plus.js +1 -1
  120. package/dist/icons/redo.js +2 -2
  121. package/dist/icons/step-back.js +2 -2
  122. package/dist/icons/step-forward.js +2 -2
  123. package/dist/icons/timelineInOutPointer.js +2 -2
  124. package/dist/icons/undo.js +2 -2
  125. package/package.json +12 -12
@@ -1,2 +1,3 @@
1
+ import type { ElementDependency } from '@remotion/studio-protocol';
1
2
  import type { InstallPackageResponse } from '@remotion/studio-shared';
2
- export declare const installPackages: (packageNames: string[]) => Promise<InstallPackageResponse>;
3
+ export declare const installPackages: (dependencies: (string | ElementDependency)[]) => Promise<InstallPackageResponse>;
@@ -3,13 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.installPackages = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const call_api_1 = require("../components/call-api");
6
- const installPackages = (packageNames) => {
6
+ const installPackages = (dependencies) => {
7
7
  if (!(0, remotion_1.getRemotionEnvironment)().isStudio) {
8
8
  throw new Error('installPackages() is only available in the Studio');
9
9
  }
10
10
  if (window.remotion_isReadOnlyStudio) {
11
11
  throw new Error('installPackages() is not available in Read-Only Studio');
12
12
  }
13
- return (0, call_api_1.callApi)('/api/install-package', { packageNames });
13
+ return (0, call_api_1.callApi)('/api/install-package', {
14
+ dependencies: dependencies.map((dependency) => typeof dependency === 'string'
15
+ ? { name: dependency, version: null }
16
+ : dependency),
17
+ });
14
18
  };
15
19
  exports.installPackages = installPackages;
@@ -46,7 +46,6 @@ const colors_1 = require("../helpers/colors");
46
46
  const copy_text_1 = require("../helpers/copy-text");
47
47
  const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
48
48
  const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
49
- const mobile_layout_1 = require("../helpers/mobile-layout");
50
49
  const sidebar_scroll_into_view_1 = require("../helpers/sidebar-scroll-into-view");
51
50
  const url_state_1 = require("../helpers/url-state");
52
51
  const use_asset_drag_events_1 = __importStar(require("../helpers/use-asset-drag-events"));
@@ -55,7 +54,6 @@ const use_media_metadata_1 = require("../helpers/use-media-metadata");
55
54
  const clipboard_1 = require("../icons/clipboard");
56
55
  const folder_1 = require("../icons/folder");
57
56
  const modals_1 = require("../state/modals");
58
- const sidebar_1 = require("../state/sidebar");
59
57
  const AssetFileIcon_1 = require("./AssetFileIcon");
60
58
  const ConfirmationDialog_1 = require("./ConfirmationDialog");
61
59
  const ContextMenu_1 = require("./ContextMenu");
@@ -260,10 +258,8 @@ const AssetFolderTree = ({ item, level, name, parentFolder, toggleFolder, tabInd
260
258
  exports.AssetFolderTree = AssetFolderTree;
261
259
  const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
262
260
  const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
263
- const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
264
261
  const [hovered, setHovered] = (0, react_1.useState)(false);
265
262
  const [isDragging, setIsDragging] = (0, react_1.useState)(false);
266
- const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
267
263
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
268
264
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
269
265
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
@@ -303,15 +299,7 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
303
299
  (0, sidebar_scroll_into_view_1.markAssetSidebarScrollFromRowClick)(relativePath);
304
300
  setCanvasContent({ type: 'asset', asset: relativePath });
305
301
  (0, url_state_1.pushUrl)(`/assets/${relativePath}`);
306
- if (isMobileLayout) {
307
- setSidebarCollapsedState({ left: 'collapsed', right: 'collapsed' });
308
- }
309
- }, [
310
- isMobileLayout,
311
- relativePath,
312
- setCanvasContent,
313
- setSidebarCollapsedState,
314
- ]);
302
+ }, [relativePath, setCanvasContent]);
315
303
  const onDragStart = (0, react_1.useCallback)((e) => {
316
304
  var _a, _b, _c, _d;
317
305
  if (!canDragAsset) {
@@ -468,7 +456,7 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
468
456
  copyStaticFilePath();
469
457
  }, [copyStaticFilePath]);
470
458
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenu, onOpen: null, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { ref: rowRef, style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, draggable: canDragAsset, onDragStart: onDragStart, onDragEnd: onDragEnd, tabIndex: tabIndex, title: item.name, children: [
471
- jsx_runtime_1.jsx(AssetFileIcon_1.AssetFileIcon, { fileType: previewFileType, style: iconStyle, color: colors_1.LIGHT_TEXT }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.name }), hovered && !isDragging ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
459
+ jsx_runtime_1.jsx(AssetFileIcon_1.AssetFileIcon, { fileType: previewFileType, style: iconStyle, color: hovered || selected ? colors_1.WHITE : colors_1.LIGHT_TEXT }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.name }), hovered && !isDragging ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
472
460
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, title: "Copy staticFile() path", renderAction: renderCopyAction, onClick: copyToClipboard }), fileExplorerDisabled ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
473
461
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, title: `Show in ${fileManagerName}`, renderAction: renderFileExplorerAction, onClick: revealInExplorer })
474
462
  ] }))] })) : null] }) }) }));
@@ -646,11 +646,18 @@ const Canvas = ({ canvasContent, size }) => {
646
646
  if (canceled) {
647
647
  return;
648
648
  }
649
- const declaredDependencies = Array.from(new Set(activeElementInstallRequest.element.dependencies));
650
- const missingPackages = (0, install_required_package_1.getMissingPackages)(declaredDependencies);
651
- const ignoredDependencies = declaredDependencies.filter((packageName) => elementInstallDependencyIgnoreList.includes(packageName) &&
652
- !missingPackages.includes(packageName));
653
- const dependenciesToReview = declaredDependencies.filter((packageName) => !ignoredDependencies.includes(packageName));
649
+ const declaredDependencies = Array.from(new Map(activeElementInstallRequest.element.dependencies.map((dependency) => [
650
+ dependency.name,
651
+ dependency,
652
+ ])).values());
653
+ const missingPackages = (0, install_required_package_1.getMissingPackages)(declaredDependencies).map((dependency) => dependency.name);
654
+ const ignoredDependencies = declaredDependencies.filter((dependency) => elementInstallDependencyIgnoreList.includes(dependency.name) &&
655
+ !missingPackages.includes(dependency.name));
656
+ const dependenciesToReview = declaredDependencies
657
+ .filter((dependency) => !ignoredDependencies.includes(dependency))
658
+ .map((dependency) => dependency.version === null
659
+ ? dependency.name
660
+ : `${dependency.name}@${dependency.version}`);
654
661
  const sourceLabel = activeElementInstallRequest.source.type === 'studio-protocol'
655
662
  ? activeElementInstallRequest.source.origin
656
663
  : 'Unverified drag-and-drop payload';
@@ -21,6 +21,8 @@ const CheckboardToggle = () => {
21
21
  return !c;
22
22
  });
23
23
  }, [setCheckerboard]);
24
- return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "game-board-alt", className: "svg-inline--fa fa-game-board-alt fa-w-16", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: { width: 16, height: 16 }, children: jsx_runtime_1.jsx("path", { fill: checkerboard ? colors_1.BLUE : colors_1.WHITE, d: "M480 0H32A32 32 0 0 0 0 32v448a32 32 0 0 0 32 32h448a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zm-32 256H256v192H64V256h192V64h192z" }) }) }));
24
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", focusable: "false", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: { width: 18, height: 18 }, fill: "none", children: [
25
+ jsx_runtime_1.jsx("path", { fill: checkerboard ? colors_1.BLUE : color, d: "M256 48h184c13.3 0 24 10.7 24 24v184H256V48zM48 256h208v208H72c-13.3 0-24-10.7-24-24V256z" }), jsx_runtime_1.jsx("rect", { x: "48", y: "48", width: "416", height: "416", rx: "24", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" }), jsx_runtime_1.jsx("path", { d: "M256 48v416M48 256h416", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" })
26
+ ] })) }));
25
27
  };
26
28
  exports.CheckboardToggle = CheckboardToggle;
@@ -23,7 +23,7 @@ const actions_1 = require("./RenderQueue/actions");
23
23
  const SidebarRenderButton_1 = require("./SidebarRenderButton");
24
24
  const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
25
25
  const itemStyle = {
26
- paddingRight: 10,
26
+ paddingRight: 2,
27
27
  paddingTop: 5,
28
28
  paddingBottom: 5,
29
29
  fontSize: 13,
@@ -33,11 +33,10 @@ const itemStyle = {
33
33
  alignItems: 'center',
34
34
  marginBottom: 1,
35
35
  marginLeft: 4,
36
- marginRight: 4,
37
36
  appearance: 'none',
38
37
  border: 'none',
39
38
  borderRadius: 4,
40
- width: 'calc(100% - 8px)',
39
+ width: 'calc(100% - 4px)',
41
40
  textAlign: 'left',
42
41
  backgroundColor: colors_1.BACKGROUND,
43
42
  height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
+ import type { RenderInlineAction } from './InlineAction';
2
3
  export declare const CONTROL_BUTTON_PADDING = 6;
3
- export declare const CONTROL_BUTTON_SIZE = 30;
4
- export declare const ControlButton: (props: React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
4
+ export declare const ControlButton: (props: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "title"> & {
5
5
  readonly title: string;
6
+ readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
7
+ readonly children: RenderInlineAction | React.ReactNode;
6
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ControlButton = exports.CONTROL_BUTTON_SIZE = exports.CONTROL_BUTTON_PADDING = void 0;
3
+ exports.ControlButton = exports.CONTROL_BUTTON_PADDING = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const z_index_1 = require("../state/z-index");
5
+ const colors_1 = require("../helpers/colors");
6
+ const InlineAction_1 = require("./InlineAction");
7
7
  exports.CONTROL_BUTTON_PADDING = 6;
8
- exports.CONTROL_BUTTON_SIZE = 30;
9
8
  const ControlButton = (props) => {
10
- const style = (0, react_1.useMemo)(() => {
11
- return {
12
- opacity: props.disabled ? 0.5 : 1,
13
- display: 'inline-flex',
14
- alignItems: 'center',
15
- justifyContent: 'center',
16
- width: exports.CONTROL_BUTTON_SIZE,
17
- height: exports.CONTROL_BUTTON_SIZE,
18
- flexShrink: 0,
19
- background: 'none',
20
- border: 'none',
21
- padding: 0,
22
- };
23
- }, [props.disabled]);
24
- const { tabIndex } = (0, z_index_1.useZIndex)();
25
- return (jsx_runtime_1.jsx("button", { type: 'button', tabIndex: tabIndex, ...props, style: style }));
9
+ const { children, onClick, title, ...buttonProps } = props;
10
+ const renderAction = typeof children === 'function' ? children : () => children;
11
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { ...buttonProps, title: title, onClick: onClick, renderAction: renderAction, variant: null, unhoveredColor: colors_1.WHITE_ALPHA_80 }));
26
12
  };
27
13
  exports.ControlButton = ControlButton;
@@ -35,7 +35,7 @@ const StudioClearSelectionArea = ({ children }) => {
35
35
  const EditorContent = ({ readOnlyStudio, children }) => {
36
36
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
37
37
  const showTimeline = canvasContent !== null && canvasContent.type === 'composition';
38
- const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, children: [
38
+ const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
39
39
  jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
40
40
  ] }));
41
41
  return (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionProvider, { children: jsx_runtime_1.jsxs(StudioClearSelectionArea, { children: [
@@ -6,6 +6,8 @@ const studio_shared_1 = require("@remotion/studio-shared");
6
6
  const react_1 = require("react");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
+ const effects_1 = require("../icons/effects");
10
+ const external_link_1 = require("../icons/external-link");
9
11
  const modals_1 = require("../state/modals");
10
12
  const ContextMenu_1 = require("./ContextMenu");
11
13
  const effect_drag_and_drop_1 = require("./effect-drag-and-drop");
@@ -16,13 +18,54 @@ const DismissableModal_1 = require("./NewComposition/DismissableModal");
16
18
  const RemInput_1 = require("./NewComposition/RemInput");
17
19
  const shared_1 = require("./QuickSwitcher/shared");
18
20
  const container = {
19
- width: 500,
21
+ width: 400,
22
+ };
23
+ const panelStyle = {
24
+ borderRadius: 6,
25
+ overflow: 'hidden',
20
26
  };
21
27
  const content = {
22
28
  padding: '12px 16px 10px',
23
29
  };
24
30
  const inputStyle = {
25
31
  width: '100%',
32
+ borderRadius: 4,
33
+ };
34
+ const aboutEffectsRow = {
35
+ display: 'flex',
36
+ justifyContent: 'flex-end',
37
+ marginBottom: 8,
38
+ };
39
+ const aboutEffectsLink = {
40
+ alignItems: 'center',
41
+ color: colors_1.LIGHT_TEXT,
42
+ cursor: 'default',
43
+ display: 'inline-flex',
44
+ fontFamily: 'sans-serif',
45
+ fontSize: 12,
46
+ gap: 4,
47
+ lineHeight: '14px',
48
+ minWidth: 0,
49
+ textDecoration: 'none',
50
+ };
51
+ const aboutEffectsLinkHovered = {
52
+ ...aboutEffectsLink,
53
+ color: colors_1.WHITE,
54
+ };
55
+ const aboutEffectsLabel = {
56
+ color: 'inherit',
57
+ fontFamily: 'sans-serif',
58
+ fontSize: 12,
59
+ lineHeight: '14px',
60
+ minWidth: 0,
61
+ overflow: 'hidden',
62
+ textOverflow: 'ellipsis',
63
+ whiteSpace: 'nowrap',
64
+ };
65
+ const aboutEffectsIcon = {
66
+ flexShrink: 0,
67
+ height: 12,
68
+ width: 12,
26
69
  };
27
70
  const resultList = {
28
71
  height: 320,
@@ -35,15 +78,28 @@ const noResults = {
35
78
  padding: '12px 16px',
36
79
  };
37
80
  const resultContainer = {
38
- cursor: 'pointer',
81
+ cursor: 'default',
39
82
  display: 'flex',
40
83
  flexDirection: 'row',
41
84
  alignItems: 'center',
42
- padding: '7px 16px',
85
+ paddingLeft: 16,
86
+ paddingRight: 16,
87
+ marginBottom: 1,
88
+ marginLeft: 4,
89
+ marginRight: 4,
90
+ borderRadius: 4,
91
+ };
92
+ const iconStyle = {
93
+ width: 18,
94
+ height: 18,
95
+ flexShrink: 0,
43
96
  };
44
97
  const labelContainer = {
45
98
  flex: 1,
46
99
  minWidth: 0,
100
+ overflow: 'hidden',
101
+ paddingTop: 5,
102
+ paddingBottom: 5,
47
103
  };
48
104
  const label = {
49
105
  fontSize: shared_1.QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE,
@@ -63,7 +119,7 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
63
119
  const style = (0, react_1.useMemo)(() => {
64
120
  return {
65
121
  ...resultContainer,
66
- backgroundColor: (0, colors_1.getBackgroundFromHoverState)({ hovered, selected }),
122
+ backgroundColor: hovered || selected ? colors_1.WHITE_ALPHA_06 : colors_1.TRANSPARENT,
67
123
  };
68
124
  }, [hovered, selected]);
69
125
  const labelStyle = (0, react_1.useMemo)(() => {
@@ -95,11 +151,12 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
95
151
  ];
96
152
  }, [item]);
97
153
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: null, children: jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [
98
- jsx_runtime_1.jsx("div", { style: labelContainer, children: jsx_runtime_1.jsx("div", { style: labelStyle, children: item.label }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: category, children: item.category })
154
+ jsx_runtime_1.jsx(effects_1.EffectsIcon, { color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelContainer, children: jsx_runtime_1.jsx("div", { style: labelStyle, children: item.label }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: category, children: item.category })
99
155
  ] }) }));
100
156
  };
101
157
  const EffectPickerContent = ({ state }) => {
102
158
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
159
+ const [aboutEffectsHovered, setAboutEffectsHovered] = (0, react_1.useState)(false);
103
160
  const [query, setQuery] = (0, react_1.useState)('');
104
161
  const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(0);
105
162
  const inputRef = (0, react_1.useRef)(null);
@@ -168,12 +225,16 @@ const EffectPickerContent = ({ state }) => {
168
225
  setSelectedIndex(0);
169
226
  }, []);
170
227
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
171
- jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, type: "text", style: inputStyle, autoFocus: true, status: "ok", value: query, onChange: onTextChange, placeholder: "Search effects...", rightAlign: false }) }), jsx_runtime_1.jsx("div", { style: resultList, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: results.length === 0 ? (jsx_runtime_1.jsx("div", { style: noResults, children: "No effects found" })) : (results.map((item, i) => {
228
+ jsx_runtime_1.jsxs("div", { style: content, children: [
229
+ jsx_runtime_1.jsx("div", { style: aboutEffectsRow, children: jsx_runtime_1.jsxs("a", { href: "https://remotion.dev/effects", target: "_blank", rel: "noopener noreferrer", style: aboutEffectsHovered ? aboutEffectsLinkHovered : aboutEffectsLink, onMouseEnter: () => setAboutEffectsHovered(true), onMouseLeave: () => setAboutEffectsHovered(false), children: [
230
+ jsx_runtime_1.jsx("span", { style: aboutEffectsLabel, children: "About effects" }), jsx_runtime_1.jsx(external_link_1.ExternalLinkIcon, { "aria-hidden": "true", color: aboutEffectsHovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: aboutEffectsIcon })
231
+ ] }) }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, type: "text", style: inputStyle, autoFocus: true, status: "ok", value: query, onChange: onTextChange, placeholder: "Search effects...", rightAlign: false })
232
+ ] }), jsx_runtime_1.jsx("div", { style: resultList, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: results.length === 0 ? (jsx_runtime_1.jsx("div", { style: noResults, children: "No effects found" })) : (results.map((item, i) => {
172
233
  return (jsx_runtime_1.jsx(EffectPickerResult, { item: item, selected: selectedIndexRounded === i, onSelected: selectItem }, item.id));
173
234
  })) })
174
235
  ] }));
175
236
  };
176
237
  const EffectPickerModal = ({ state }) => {
177
- return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { children: jsx_runtime_1.jsx(EffectPickerContent, { state: state }) }));
238
+ return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: jsx_runtime_1.jsx(EffectPickerContent, { state: state }) }));
178
239
  };
179
240
  exports.EffectPickerModal = EffectPickerModal;
@@ -5,7 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const no_react_1 = require("remotion/no-react");
8
- const colors_1 = require("../helpers/colors");
9
8
  const use_keybinding_1 = require("../helpers/use-keybinding");
10
9
  const fullscreen_1 = require("../icons/fullscreen");
11
10
  const canvas_ref_1 = require("../state/canvas-ref");
@@ -45,6 +44,6 @@ const FullScreenToggle = ({ hidden }) => {
45
44
  f.unregister();
46
45
  };
47
46
  }, [keybindings, onClick]);
48
- return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: colors_1.WHITE_HEX, style: { width: 18, height: 18 } }) }));
47
+ return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }));
49
48
  };
50
49
  exports.FullScreenToggle = FullScreenToggle;
@@ -4,11 +4,9 @@ exports.InitialCompositionLoader = exports.useSelectComposition = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const create_folder_tree_1 = require("../helpers/create-folder-tree");
7
- const mobile_layout_1 = require("../helpers/mobile-layout");
8
7
  const persist_open_folders_1 = require("../helpers/persist-open-folders");
9
8
  const url_state_1 = require("../helpers/url-state");
10
9
  const folders_1 = require("../state/folders");
11
- const sidebar_1 = require("../state/sidebar");
12
10
  const ExplorerPanelRef_1 = require("./ExplorerPanelRef");
13
11
  const load_canvas_content_from_url_1 = require("./load-canvas-content-from-url");
14
12
  const use_select_asset_1 = require("./use-select-asset");
@@ -17,8 +15,6 @@ const useSelectComposition = () => {
17
15
  const { setCompositionFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
18
16
  const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
19
17
  const setFrame = remotion_1.Internals.useTimelineSetFrame();
20
- const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
21
- const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
22
18
  return (0, react_1.useCallback)((c, push, frame = null) => {
23
19
  var _a;
24
20
  if (push) {
@@ -42,17 +38,8 @@ const useSelectComposition = () => {
42
38
  (0, persist_open_folders_1.persistExpandedFolders)('compositions', newState);
43
39
  return newState;
44
40
  });
45
- if (isMobileLayout) {
46
- setSidebarCollapsedState({ left: 'collapsed', right: 'collapsed' });
47
- }
48
41
  }
49
- }, [
50
- isMobileLayout,
51
- setCanvasContent,
52
- setCompositionFoldersExpanded,
53
- setFrame,
54
- setSidebarCollapsedState,
55
- ]);
42
+ }, [setCanvasContent, setCompositionFoldersExpanded, setFrame]);
56
43
  };
57
44
  exports.useSelectComposition = useSelectComposition;
58
45
  const InitialCompositionLoader = () => {
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
2
  export type RenderInlineAction = (color: string) => React.ReactNode;
3
- export type InlineActionProps = {
3
+ export type InlineActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick' | 'style'> & {
4
4
  readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
5
- readonly disabled?: boolean;
6
5
  readonly renderAction: RenderInlineAction;
7
- readonly title?: string;
8
6
  readonly unhoveredColor?: string;
9
7
  readonly variant: 'compact' | null;
8
+ readonly style?: React.CSSProperties;
10
9
  };
11
- export declare const InlineAction: ({ renderAction, onClick, disabled, title, unhoveredColor, variant, }: InlineActionProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const InlineAction: ({ renderAction, onClick, disabled, title, unhoveredColor, variant, style: customStyle, ...buttonProps }: InlineActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../helpers/colors");
7
7
  const z_index_1 = require("../state/z-index");
8
- const InlineAction = ({ renderAction, onClick, disabled, title, unhoveredColor = colors_1.LIGHT_TEXT, variant, }) => {
8
+ const InlineAction = ({ renderAction, onClick, disabled, title, unhoveredColor = colors_1.LIGHT_TEXT, variant, style: customStyle, ...buttonProps }) => {
9
+ var _a;
9
10
  const { tabIndex } = (0, z_index_1.useZIndex)();
10
11
  const [hovered, setHovered] = (0, react_1.useState)(false);
11
12
  const onPointerEnter = (0, react_1.useCallback)(() => {
@@ -29,8 +30,9 @@ const InlineAction = ({ renderAction, onClick, disabled, title, unhoveredColor =
29
30
  borderRadius: 3,
30
31
  opacity: disabled ? 0.5 : 1,
31
32
  pointerEvents: disabled ? 'none' : 'auto',
33
+ ...customStyle,
32
34
  };
33
- }, [disabled, hovered, variant]);
34
- return (jsx_runtime_1.jsx("button", { type: "button", disabled: disabled, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, "aria-label": title, children: renderAction(hovered ? colors_1.WHITE : unhoveredColor) }));
35
+ }, [customStyle, disabled, hovered, variant]);
36
+ return (jsx_runtime_1.jsx("button", { ...buttonProps, type: "button", disabled: disabled, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, "aria-label": (_a = buttonProps['aria-label']) !== null && _a !== void 0 ? _a : title, children: renderAction(hovered ? colors_1.WHITE : unhoveredColor) }));
35
37
  };
36
38
  exports.InlineAction = InlineAction;
@@ -37,16 +37,17 @@ const computedValueStyle = {
37
37
  fontFamily: 'sans-serif',
38
38
  fontSize: 12,
39
39
  fontStyle: 'italic',
40
- lineHeight: 1.5,
40
+ lineHeight: '20px',
41
41
  };
42
42
  const dimensionsControls = {
43
43
  alignItems: 'center',
44
+ color: 'inherit',
44
45
  display: 'flex',
45
46
  fontFamily: 'sans-serif',
46
- fontSize: 12,
47
+ fontSize: 13,
47
48
  gap: 4,
48
49
  justifyContent: 'flex-end',
49
- lineHeight: '16px',
50
+ lineHeight: '20px',
50
51
  minWidth: 0,
51
52
  };
52
53
  const presetButtonIcon = {
@@ -69,14 +70,14 @@ const metadataLabelControls = {
69
70
  fontFamily: 'sans-serif',
70
71
  fontSize: 13,
71
72
  gap: 2,
72
- lineHeight: '18px',
73
+ lineHeight: '20px',
73
74
  minWidth: 0,
74
75
  };
75
76
  const metadataLabelText = {
76
77
  color: 'inherit',
77
78
  fontFamily: 'sans-serif',
78
79
  fontSize: 13,
79
- lineHeight: '18px',
80
+ lineHeight: '20px',
80
81
  minWidth: 0,
81
82
  overflow: 'hidden',
82
83
  textOverflow: 'ellipsis',
@@ -287,7 +288,7 @@ const CompositionMetadata = ({ compositionId, disabled, stack }) => {
287
288
  return (jsx_runtime_1.jsxs("div", { style: compositionMetadataContainer, children: [jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: (hovered) => (jsx_runtime_1.jsxs("div", { style: metadataLabelControls, children: [
288
289
  jsx_runtime_1.jsx("span", { style: metadataLabelText, children: "Dimensions" }), disabled || widthIsComputed || heightIsComputed ? null : (jsx_runtime_1.jsx(PresetDropdown, { disabled: pendingValues.width !== undefined ||
289
290
  pendingValues.height !== undefined, title: "Choose dimension preset", values: dimensionPresetValues, visible: hovered }))] })), children: jsx_runtime_1.jsxs("div", { style: dimensionsControls, children: [
290
- jsx_runtime_1.jsx(CompositionMetadataValue, { computed: widthIsComputed, disabled: disabled, field: "width", onSave: saveMetadata, pendingValue: (_a = pendingValues.width) !== null && _a !== void 0 ? _a : null, value: video.width }), jsx_runtime_1.jsx(CompositionMetadataValue, { computed: heightIsComputed, disabled: disabled, field: "height", onSave: saveMetadata, pendingValue: (_b = pendingValues.height) !== null && _b !== void 0 ? _b : null, value: video.height })
291
+ jsx_runtime_1.jsx(CompositionMetadataValue, { computed: widthIsComputed, disabled: disabled, field: "width", onSave: saveMetadata, pendingValue: (_a = pendingValues.width) !== null && _a !== void 0 ? _a : null, value: video.width }), disabled ? '\u00A0' : null, jsx_runtime_1.jsx(CompositionMetadataValue, { computed: heightIsComputed, disabled: disabled, field: "height", onSave: saveMetadata, pendingValue: (_b = pendingValues.height) !== null && _b !== void 0 ? _b : null, value: video.height })
291
292
  ] }) }), isStill ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: (hovered) => (jsx_runtime_1.jsxs("div", { style: metadataLabelControls, children: [
292
293
  jsx_runtime_1.jsx("span", { style: metadataLabelText, children: "Frame rate" }), disabled || fpsIsComputed ? null : (jsx_runtime_1.jsx(PresetDropdown, { disabled: pendingValues.fps !== undefined, title: "Choose frame rate preset", values: frameRatePresetValues, visible: hovered }))] })), children: jsx_runtime_1.jsx("div", { style: dimensionsControls, children: jsx_runtime_1.jsx(CompositionMetadataValue, { computed: fpsIsComputed, disabled: disabled, field: "fps", onSave: saveMetadata, pendingValue: (_c = pendingValues.fps) !== null && _c !== void 0 ? _c : null, value: video.fps }) }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Duration", children: jsx_runtime_1.jsx(CompositionMetadataValue, { computed: durationIsComputed, disabled: disabled, field: "durationInFrames", onSave: saveMetadata, pendingValue: (_d = pendingValues.durationInFrames) !== null && _d !== void 0 ? _d : null, value: video.durationInFrames }) })
293
294
  ] }))] }));
@@ -12,6 +12,7 @@ const InputDragger_1 = require("../NewComposition/InputDragger");
12
12
  const call_delete_keyframe_1 = require("../Timeline/call-delete-keyframe");
13
13
  const call_move_keyframe_1 = require("../Timeline/call-move-keyframe");
14
14
  const get_easing_selection_after_keyframe_delete_1 = require("../Timeline/get-easing-selection-after-keyframe-delete");
15
+ const imperative_state_1 = require("../Timeline/imperative-state");
15
16
  const parse_keyframe_field_from_node_path_1 = require("../Timeline/parse-keyframe-field-from-node-path");
16
17
  const TimelineEffectPropItem_1 = require("../Timeline/TimelineEffectPropItem");
17
18
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
@@ -54,7 +55,6 @@ const TrashIcon = ({ color }) => {
54
55
  const KeyframeInspector = ({ selection }) => {
55
56
  const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
56
57
  const videoConfig = (0, remotion_1.useVideoConfig)();
57
- const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
58
58
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
59
59
  const { clearDragOverrides, clearEffectDragOverrides, setDragOverrides, setEffectDragOverrides, setPropStatuses, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
60
60
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
@@ -277,7 +277,7 @@ const KeyframeInspector = ({ selection }) => {
277
277
  keyframeDisplayOffset: details.keyframeDisplayOffset,
278
278
  nodePathInfo: selection.nodePathInfo,
279
279
  propStatus: details.propStatus,
280
- timelinePosition,
280
+ timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
281
281
  })
282
282
  : null;
283
283
  if (easingSelection !== null) {
@@ -315,7 +315,6 @@ const KeyframeInspector = ({ selection }) => {
315
315
  selectItems,
316
316
  selection.nodePathInfo,
317
317
  setPropStatuses,
318
- timelinePosition,
319
318
  ]);
320
319
  if (details === null || track === null) {
321
320
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
@@ -162,7 +162,9 @@ exports.detailRow = {
162
162
  };
163
163
  exports.detailLabel = {
164
164
  color: colors_1.LIGHT_TEXT,
165
+ fontFamily: 'sans-serif',
165
166
  fontSize: 13,
167
+ lineHeight: '20px',
166
168
  minWidth: 0,
167
169
  overflow: 'hidden',
168
170
  textOverflow: 'ellipsis',
@@ -170,8 +172,10 @@ exports.detailLabel = {
170
172
  };
171
173
  exports.detailValue = {
172
174
  color: colors_1.WHITE,
175
+ fontFamily: 'sans-serif',
173
176
  fontSize: 13,
174
177
  fontVariantNumeric: 'tabular-nums',
178
+ lineHeight: '20px',
175
179
  minWidth: 0,
176
180
  textAlign: 'right',
177
181
  wordBreak: 'break-word',
@@ -18,6 +18,6 @@ const LoopToggle = ({ loop, setLoop }) => {
18
18
  const onClick = (0, react_1.useCallback)(() => {
19
19
  (0, exports.toggleLoop)(setLoop);
20
20
  }, [setLoop]);
21
- return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE : colors_1.WHITE, d: "M493.544 181.463c11.956 22.605 18.655 48.4 18.452 75.75C511.339 345.365 438.56 416 350.404 416H192v47.495c0 22.475-26.177 32.268-40.971 17.475l-80-80c-9.372-9.373-9.372-24.569 0-33.941l80-80C166.138 271.92 192 282.686 192 304v48h158.875c52.812 0 96.575-42.182 97.12-94.992.155-15.045-3.17-29.312-9.218-42.046-4.362-9.185-2.421-20.124 4.8-27.284 4.745-4.706 8.641-8.555 11.876-11.786 11.368-11.352 30.579-8.631 38.091 5.571zM64.005 254.992c.545-52.81 44.308-94.992 97.12-94.992H320v47.505c0 22.374 26.121 32.312 40.971 17.465l80-80c9.372-9.373 9.372-24.569 0-33.941l-80-80C346.014 16.077 320 26.256 320 48.545V96H161.596C73.44 96 .661 166.635.005 254.788c-.204 27.35 6.495 53.145 18.452 75.75 7.512 14.202 26.723 16.923 38.091 5.57 3.235-3.231 7.13-7.08 11.876-11.786 7.22-7.16 9.162-18.098 4.8-27.284-6.049-12.735-9.374-27.001-9.219-42.046z" }) }) }));
21
+ return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE : color, d: "M384 150.3V41.6l64 53.3v2l-64 53.3zM352 23.5V80H192C86 80 0 166 0 272c0 8.8 7.2 16 16 16s16-7.2 16-16c0-88.4 71.6-160 160-160h160v56.5c0 13 10.5 23.5 23.5 23.5 5.5 0 10.8-1.9 15-5.4l78-65c7.3-6.1 11.5-15.1 11.5-24.6v-2c0-9.5-4.2-18.5-11.5-24.6l-78-65c-4.2-3.5-9.5-5.4-15-5.4-13 0-23.5 10.5-23.5 23.5zM128 415.9v54.5l-64-53.3v-2l64-53.3v54.1zM160 400v-56.5c0-13-10.5-23.5-23.5-23.5-5.5 0-10.8 1.9-15 5.4l-78 65C36.2 396.5 32 405.5 32 415v2c0 9.5 4.2 18.5 11.5 24.6l78 65c4.2 3.5 9.5 5.4 15 5.4 13 0 23.5-10.5 23.5-23.5V432h160c106 0 192-86 192-192 0-8.8-7.2-16-16-16s-16 7.2-16 16c0 88.4-71.6 160-160 160H160z" }) })) }));
22
22
  };
23
23
  exports.LoopToggle = LoopToggle;
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const MenuBuildIndicator: React.FC;
2
+ export declare const MenuBuildIndicator: React.FC<{
3
+ readonly mobileLayout: boolean;
4
+ }>;
@@ -4,6 +4,7 @@ exports.MenuBuildIndicator = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../helpers/client-id");
7
+ const colors_1 = require("../helpers/colors");
7
8
  const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
8
9
  const open_in_editor_1 = require("../helpers/open-in-editor");
9
10
  const layout_1 = require("./layout");
@@ -41,7 +42,7 @@ const projectNameLinkHovered = {
41
42
  ...projectNameLinkBase,
42
43
  textDecoration: 'underline',
43
44
  };
44
- const MenuBuildIndicator = () => {
45
+ const MenuBuildIndicator = ({ mobileLayout }) => {
45
46
  const [isBuilding, setIsBuilding] = (0, react_1.useState)(false);
46
47
  const [projectNameHovered, setProjectNameHovered] = (0, react_1.useState)(false);
47
48
  const ctx = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
@@ -93,7 +94,8 @@ const MenuBuildIndicator = () => {
93
94
  window.remotion_finishedBuilding = undefined;
94
95
  };
95
96
  }, []);
96
- return (jsx_runtime_1.jsxs("div", { style: cwd, title: window.remotion_cwd, children: [isClickable ? jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }) : null, isBuilding ? (jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize }) })) : (jsx_runtime_1.jsx("div", { style: noSpinner })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), isClickable ? (jsx_runtime_1.jsx("a", { style: projectNameHovered ? projectNameLinkHovered : projectNameLink, title: projectNameTitle, onClick: handleProjectNameClick, onPointerEnter: () => setProjectNameHovered(true), onPointerLeave: () => setProjectNameHovered(false), children: window.remotion_projectName })) : (window.remotion_projectName), jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {})
97
- ] }));
97
+ return (jsx_runtime_1.jsxs("div", { style: cwd, title: window.remotion_cwd, children: [isClickable ? jsx_runtime_1.jsx(layout_1.Spacing, { x: mobileLayout ? 0.5 : 2 }) : null, mobileLayout ? null : isBuilding ? (jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })) : (jsx_runtime_1.jsx("div", { style: noSpinner })), mobileLayout ? null : jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), isClickable ? (jsx_runtime_1.jsx("a", { style: projectNameHovered ? projectNameLinkHovered : projectNameLink, title: projectNameTitle, onClick: handleProjectNameClick, onPointerEnter: () => setProjectNameHovered(true), onPointerLeave: () => setProjectNameHovered(false), children: window.remotion_projectName })) : (window.remotion_projectName), jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {}), mobileLayout && isBuilding ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
98
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })
99
+ ] })) : null] }));
98
100
  };
99
101
  exports.MenuBuildIndicator = MenuBuildIndicator;
@@ -108,7 +108,7 @@ const MenuToolbar = ({ readOnlyStudio }) => {
108
108
  jsx_runtime_1.jsxs("div", { style: fixedWidthLeft, children: [
109
109
  jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "left" }), structure.map((s) => {
110
110
  return (jsx_runtime_1.jsx(MenuItem_1.MenuItem, { selected: selected === s.id, onItemSelected: itemClicked, onItemHovered: itemHovered, id: s.id, label: s.label, onItemQuit: onItemQuit, menu: s, onPreviousMenu: onPreviousMenu, onNextMenu: onNextMenu, leaveLeftPadding: s.leaveLeftPadding }, s.id));
111
- }), readOnlyStudio ? null : jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {})] }), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsx(MenuBuildIndicator_1.MenuBuildIndicator, {}), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsxs("div", { style: fixedWidthRight, children: [canUndoAndRedo ? jsx_runtime_1.jsx(UndoRedoButtons_1.UndoRedoButtons, {}) : null, jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "right" })
111
+ }), readOnlyStudio || browserStudioOperations ? null : jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {})] }), mobileLayout ? null : jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsx(MenuBuildIndicator_1.MenuBuildIndicator, { mobileLayout: mobileLayout }), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsxs("div", { style: fixedWidthRight, children: [canUndoAndRedo ? jsx_runtime_1.jsx(UndoRedoButtons_1.UndoRedoButtons, {}) : null, jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "right" })
112
112
  ] })
113
113
  ] }));
114
114
  };
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- export default function MobilePanel({ children, onClose, side }: {
2
+ export default function MobilePanel({ children, onClose }: {
3
3
  children: React.ReactNode;
4
4
  onClose: () => void;
5
- side: 'left' | 'right';
6
5
  }): React.ReactPortal;