@remotion/cli 4.0.0-preload.17 → 4.0.0-spawn.14

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 (107) hide show
  1. package/dist/compositions.js +2 -2
  2. package/dist/editor/components/AudioWaveform.js +2 -2
  3. package/dist/editor/components/AudioWaveformBar.js +1 -1
  4. package/dist/editor/components/Canvas.js +1 -1
  5. package/dist/editor/components/CheckboardToggle.js +1 -1
  6. package/dist/editor/components/ClipboardIcon.js +1 -1
  7. package/dist/editor/components/CollapsedCompositionSelector.d.ts +4 -0
  8. package/dist/editor/components/CollapsedCompositionSelector.js +39 -0
  9. package/dist/editor/components/CompositionManager.d.ts +4 -0
  10. package/dist/editor/components/CompositionManager.js +60 -0
  11. package/dist/editor/components/CompositionSelector.js +5 -45
  12. package/dist/editor/components/CompositionSelectorItem.js +3 -3
  13. package/dist/editor/components/ControlButton.js +1 -1
  14. package/dist/editor/components/CopyButton.js +2 -2
  15. package/dist/editor/components/CurrentComposition.js +2 -2
  16. package/dist/editor/components/Editor.js +6 -4
  17. package/dist/editor/components/EditorContent.js +3 -2
  18. package/dist/editor/components/FpsCounter.js +1 -1
  19. package/dist/editor/components/InitialCompositionLoader.d.ts +4 -0
  20. package/dist/editor/components/InitialCompositionLoader.js +60 -0
  21. package/dist/editor/components/KeyboardShortcutsModal.js +1 -1
  22. package/dist/editor/components/LoadingIndicator.js +1 -1
  23. package/dist/editor/components/LoopToggle.js +1 -1
  24. package/dist/editor/components/Menu/MenuDivider.js +1 -1
  25. package/dist/editor/components/Menu/MenuItem.js +3 -3
  26. package/dist/editor/components/Menu/MenuSubItem.js +3 -3
  27. package/dist/editor/components/Menu/SubMenu.js +1 -1
  28. package/dist/editor/components/MenuToolbar.js +68 -5
  29. package/dist/editor/components/ModalContainer.js +1 -1
  30. package/dist/editor/components/ModalHeader.js +1 -1
  31. package/dist/editor/components/MuteToggle.js +1 -1
  32. package/dist/editor/components/NewComposition/CancelButton.js +1 -1
  33. package/dist/editor/components/NewComposition/ComboBox.js +3 -3
  34. package/dist/editor/components/NewComposition/CopyHint.js +1 -1
  35. package/dist/editor/components/NewComposition/InputDragger.js +2 -2
  36. package/dist/editor/components/NewComposition/MenuContent.js +1 -1
  37. package/dist/editor/components/NewComposition/NewCompAspectRatio.js +1 -1
  38. package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
  39. package/dist/editor/components/NewComposition/NewComposition.js +4 -4
  40. package/dist/editor/components/NewComposition/RemInput.js +1 -1
  41. package/dist/editor/components/NewComposition/ToggleAspectRatio.js +1 -1
  42. package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
  43. package/dist/editor/components/PlayPause.js +40 -11
  44. package/dist/editor/components/PlaybackRateSelector.js +2 -2
  45. package/dist/editor/components/Preview.js +2 -2
  46. package/dist/editor/components/PreviewToolbar.js +1 -1
  47. package/dist/editor/components/RichTimelineToggle.js +1 -1
  48. package/dist/editor/components/SizeSelector.js +2 -2
  49. package/dist/editor/components/Splitter/SplitterContainer.js +1 -1
  50. package/dist/editor/components/Splitter/SplitterElement.js +4 -2
  51. package/dist/editor/components/Splitter/SplitterHandle.d.ts +4 -1
  52. package/dist/editor/components/Splitter/SplitterHandle.js +28 -7
  53. package/dist/editor/components/Thumbnail.js +1 -1
  54. package/dist/editor/components/TimeValue.js +1 -1
  55. package/dist/editor/components/Timeline/LoopedIndicator.js +2 -2
  56. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +3 -3
  57. package/dist/editor/components/Timeline/MaxTimelineTracks.js +1 -1
  58. package/dist/editor/components/Timeline/Timeline.js +2 -1
  59. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +2 -2
  60. package/dist/editor/components/Timeline/TimelineDragHandler.js +1 -1
  61. package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -2
  62. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +1 -1
  63. package/dist/editor/components/Timeline/TimelineList.js +1 -1
  64. package/dist/editor/components/Timeline/TimelineListItem.js +1 -1
  65. package/dist/editor/components/Timeline/TimelineSequence.js +1 -1
  66. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +1 -1
  67. package/dist/editor/components/Timeline/TimelineSlider.js +1 -1
  68. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -1
  69. package/dist/editor/components/Timeline/TimelineTracks.js +2 -2
  70. package/dist/editor/components/Timeline/TimelineVideoInfo.js +1 -1
  71. package/dist/editor/components/TimelineInOutToggle.js +1 -1
  72. package/dist/editor/components/TopPanel.js +23 -1
  73. package/dist/editor/components/UpdateCheck.js +1 -1
  74. package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
  75. package/dist/editor/components/layout.js +4 -4
  76. package/dist/editor/helpers/use-compact-ui.d.ts +1 -0
  77. package/dist/editor/helpers/use-compact-ui.js +18 -0
  78. package/dist/editor/icons/Checkmark.js +1 -1
  79. package/dist/editor/icons/caret.d.ts +1 -1
  80. package/dist/editor/icons/caret.js +4 -4
  81. package/dist/editor/icons/film.js +1 -1
  82. package/dist/editor/icons/folder.js +2 -2
  83. package/dist/editor/icons/jump-to-start.d.ts +2 -0
  84. package/dist/editor/icons/jump-to-start.js +8 -0
  85. package/dist/editor/icons/keys.js +3 -3
  86. package/dist/editor/icons/lock.js +2 -2
  87. package/dist/editor/icons/media-volume.js +2 -2
  88. package/dist/editor/icons/pause.js +1 -1
  89. package/dist/editor/icons/play.js +1 -1
  90. package/dist/editor/icons/step-back.js +1 -1
  91. package/dist/editor/icons/step-forward.js +1 -1
  92. package/dist/editor/icons/still.js +1 -1
  93. package/dist/editor/icons/timeline.js +1 -1
  94. package/dist/editor/icons/timelineInOutPointer.js +2 -2
  95. package/dist/editor/state/folders.d.ts +11 -0
  96. package/dist/editor/state/folders.js +23 -0
  97. package/dist/editor/state/highest-z-index.js +2 -2
  98. package/dist/editor/state/keybindings.js +1 -1
  99. package/dist/editor/state/sidebar.d.ts +12 -0
  100. package/dist/editor/state/sidebar.js +40 -0
  101. package/dist/editor/state/z-index.js +1 -1
  102. package/dist/get-cli-options.js +3 -1
  103. package/dist/index.js +5 -1
  104. package/dist/previewEntry.js +2 -2
  105. package/dist/print-error.js +1 -0
  106. package/dist/upgrade.js +1 -0
  107. package/package.json +8 -8
@@ -27,13 +27,13 @@ const max = (arr) => {
27
27
  const listCompositionsCommand = async () => {
28
28
  const file = parse_command_line_1.parsedCli._[1];
29
29
  if (!file) {
30
- log_1.Log.error('The compositions command requires you to specify a root file. For example');
30
+ log_1.Log.error('The `compositions` command requires you to specify a root file. For example');
31
31
  log_1.Log.error(' npx remotion compositions src/index.tsx');
32
32
  log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
33
33
  process.exit(1);
34
34
  }
35
35
  const fullPath = path_1.default.join(process.cwd(), file);
36
- (0, get_config_file_name_1.loadConfig)();
36
+ await (0, get_config_file_name_1.loadConfig)();
37
37
  const { browserExecutable, ffmpegExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, } = await (0, get_cli_options_1.getCliOptions)({ isLambda: false, type: 'get-compositions' });
38
38
  const bundled = await (0, setup_cache_1.bundleOnCli)(fullPath, ['bundling']);
39
39
  const compositions = await (0, renderer_1.getCompositions)(bundled, {
@@ -98,13 +98,13 @@ const AudioWaveform = ({ src, fps, startFrom, durationInFrames, visualizationWid
98
98
  });
99
99
  }, [durationInFrames, fps, metadata, startFrom, visualizationWidth]);
100
100
  if (error) {
101
- return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)("div", { style: errorMessage, children: "No waveform available. Audio might not support CORS." }, void 0) }, void 0));
101
+ return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)("div", { style: errorMessage, children: "No waveform available. Audio might not support CORS." }) }));
102
102
  }
103
103
  if (!metadata) {
104
104
  return null;
105
105
  }
106
106
  return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [normalized.map((w) => {
107
107
  return (0, jsx_runtime_1.jsx)(AudioWaveformBar_1.AudioWaveformBar, { amplitude: w.amplitude }, w.index);
108
- }), (0, jsx_runtime_1.jsx)("canvas", { ref: canvas, style: canvasStyle, width: visualizationWidth, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT }, void 0)] }, void 0));
108
+ }), (0, jsx_runtime_1.jsx)("canvas", { ref: canvas, style: canvasStyle, width: visualizationWidth, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT })] }));
109
109
  };
110
110
  exports.AudioWaveform = AudioWaveform;
@@ -19,6 +19,6 @@ const AudioWaveformBar = ({ amplitude }) => {
19
19
  height: (timeline_layout_1.TIMELINE_LAYER_HEIGHT / 2) * amplitude,
20
20
  };
21
21
  }, [amplitude]);
22
- return (0, jsx_runtime_1.jsx)("div", { style: style }, void 0);
22
+ return (0, jsx_runtime_1.jsx)("div", { style: style });
23
23
  };
24
24
  exports.AudioWaveformBar = AudioWaveformBar;
@@ -17,6 +17,6 @@ const Canvas = () => {
17
17
  triggerOnWindowResize: false,
18
18
  shouldApplyCssTransforms: true,
19
19
  });
20
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: container, children: size ? (0, jsx_runtime_1.jsx)(Preview_1.VideoPreview, { canvasSize: size }, void 0) : null }, void 0));
20
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: container, children: size ? (0, jsx_runtime_1.jsx)(Preview_1.VideoPreview, { canvasSize: size }) : null }));
21
21
  };
22
22
  exports.Canvas = Canvas;
@@ -13,6 +13,6 @@ const CheckboardToggle = () => {
13
13
  return !c;
14
14
  });
15
15
  }, [setCheckerboard]);
16
- return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (0, 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: (0, jsx_runtime_1.jsx)("path", { fill: checkerboard ? 'var(--blue)' : '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" }, void 0) }, void 0) }, void 0));
16
+ return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (0, 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: (0, jsx_runtime_1.jsx)("path", { fill: checkerboard ? 'var(--blue)' : '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" }) }) }));
17
17
  };
18
18
  exports.CheckboardToggle = CheckboardToggle;
@@ -7,6 +7,6 @@ const ClipboardIcon = () => {
7
7
  height: 16,
8
8
  verticalAlign: 'middle',
9
9
  marginTop: -3,
10
- }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }, void 0) }, void 0));
10
+ }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
11
11
  };
12
12
  exports.ClipboardIcon = ClipboardIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const CollapsedCompositionSelector: React.FC<{
3
+ onExpand: () => void;
4
+ }>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollapsedCompositionSelector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../helpers/colors");
7
+ const caret_1 = require("../icons/caret");
8
+ const z_index_1 = require("../state/z-index");
9
+ const CollapsedCompositionSelector = ({ onExpand }) => {
10
+ const [hovered, setHovered] = (0, react_1.useState)(false);
11
+ const { tabIndex } = (0, z_index_1.useZIndex)();
12
+ const onPointerEnter = (0, react_1.useCallback)(() => {
13
+ setHovered(true);
14
+ }, []);
15
+ const onPointerLeave = (0, react_1.useCallback)(() => {
16
+ setHovered(false);
17
+ }, []);
18
+ const style = (0, react_1.useMemo)(() => {
19
+ return {
20
+ border: 'none',
21
+ borderRight: '2px solid black',
22
+ cursor: 'pointer',
23
+ color: 'white',
24
+ display: 'flex',
25
+ justifyContent: 'center',
26
+ alignItems: 'center',
27
+ paddingLeft: 7,
28
+ paddingRight: 4,
29
+ backgroundColor: (0, colors_1.getBackgroundFromHoverState)({
30
+ hovered,
31
+ selected: false,
32
+ }),
33
+ appearance: 'none',
34
+ WebkitAppearance: 'none',
35
+ };
36
+ }, [hovered]);
37
+ return ((0, jsx_runtime_1.jsx)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", role: "button", tabIndex: tabIndex, onClick: onExpand, children: (0, jsx_runtime_1.jsx)(caret_1.CaretRight, {}) }));
38
+ };
39
+ exports.CollapsedCompositionSelector = CollapsedCompositionSelector;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TComposition } from 'remotion';
3
+ export declare const useSelectComposition: () => (c: TComposition) => void;
4
+ export declare const InitialCompositionLoader: React.FC;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitialCompositionLoader = exports.useSelectComposition = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const folders_1 = require("../state/folders");
7
+ const marks_1 = require("../state/marks");
8
+ const CompositionSelector_1 = require("./CompositionSelector");
9
+ const FramePersistor_1 = require("./FramePersistor");
10
+ const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
11
+ const useSelectComposition = () => {
12
+ const setCurrentFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
13
+ const { setCurrentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
14
+ const { setFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
15
+ return (c) => {
16
+ var _a;
17
+ (_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.setMarks((0, marks_1.loadMarks)(c.id, c.durationInFrames));
18
+ window.history.pushState({}, 'Preview', `/${c.id}`);
19
+ const frame = (0, FramePersistor_1.getFrameForComposition)(c.id);
20
+ const frameInBounds = Math.min(c.durationInFrames - 1, frame);
21
+ setCurrentFrame(frameInBounds);
22
+ setCurrentComposition(c.id);
23
+ const { folderName, parentFolderName } = c;
24
+ if (folderName !== null) {
25
+ setFoldersExpanded((ex) => {
26
+ const keysToExpand = (0, CompositionSelector_1.getKeysToExpand)(folderName, parentFolderName);
27
+ const newState = {
28
+ ...ex,
29
+ };
30
+ for (const key of keysToExpand) {
31
+ newState[key] = true;
32
+ }
33
+ return newState;
34
+ });
35
+ }
36
+ };
37
+ };
38
+ exports.useSelectComposition = useSelectComposition;
39
+ const InitialCompositionLoader = () => {
40
+ const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
41
+ const selectComposition = (0, exports.useSelectComposition)();
42
+ (0, react_1.useEffect)(() => {
43
+ if (currentComposition) {
44
+ return;
45
+ }
46
+ const compositionFromUrl = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
47
+ if (compositionFromUrl) {
48
+ const exists = compositions.find((c) => c.id === compositionFromUrl);
49
+ if (exists) {
50
+ selectComposition(exists);
51
+ return;
52
+ }
53
+ }
54
+ if (compositions.length > 0) {
55
+ selectComposition(compositions[0]);
56
+ }
57
+ }, [compositions, currentComposition, selectComposition]);
58
+ return null;
59
+ };
60
+ exports.InitialCompositionLoader = InitialCompositionLoader;
@@ -6,12 +6,10 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const create_folder_tree_1 = require("../helpers/create-folder-tree");
8
8
  const persist_open_folders_1 = require("../helpers/persist-open-folders");
9
- const marks_1 = require("../state/marks");
10
9
  const z_index_1 = require("../state/z-index");
11
10
  const CompositionSelectorItem_1 = require("./CompositionSelectorItem");
12
11
  const CurrentComposition_1 = require("./CurrentComposition");
13
- const FramePersistor_1 = require("./FramePersistor");
14
- const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
12
+ const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
15
13
  const container = {
16
14
  borderRight: '1px solid black',
17
15
  position: 'absolute',
@@ -34,32 +32,10 @@ const getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
34
32
  };
35
33
  exports.getKeysToExpand = getKeysToExpand;
36
34
  const CompositionSelector = () => {
37
- const { compositions, setCurrentComposition, currentComposition, folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
35
+ const { compositions, currentComposition, folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
38
36
  const [foldersExpanded, setFoldersExpanded] = (0, react_1.useState)((0, persist_open_folders_1.loadExpandedFolders)());
39
37
  const { tabIndex } = (0, z_index_1.useZIndex)();
40
- const setCurrentFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
41
- const selectComposition = (0, react_1.useCallback)((c) => {
42
- var _a;
43
- (_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.setMarks((0, marks_1.loadMarks)(c.id, c.durationInFrames));
44
- window.history.pushState({}, 'Preview', `/${c.id}`);
45
- const frame = (0, FramePersistor_1.getFrameForComposition)(c.id);
46
- const frameInBounds = Math.min(c.durationInFrames - 1, frame);
47
- setCurrentFrame(frameInBounds);
48
- setCurrentComposition(c.id);
49
- const { folderName, parentFolderName } = c;
50
- if (folderName !== null) {
51
- setFoldersExpanded((ex) => {
52
- const keysToExpand = (0, exports.getKeysToExpand)(folderName, parentFolderName);
53
- const newState = {
54
- ...ex,
55
- };
56
- for (const key of keysToExpand) {
57
- newState[key] = true;
58
- }
59
- return newState;
60
- });
61
- }
62
- }, [setCurrentComposition, setCurrentFrame]);
38
+ const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
63
39
  const toggleFolder = (0, react_1.useCallback)((folderName, parentName) => {
64
40
  setFoldersExpanded((p) => {
65
41
  var _a;
@@ -73,27 +49,11 @@ const CompositionSelector = () => {
73
49
  return foldersExpandedState;
74
50
  });
75
51
  }, []);
76
- (0, react_1.useEffect)(() => {
77
- if (currentComposition) {
78
- return;
79
- }
80
- const compositionFromUrl = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
81
- if (compositionFromUrl) {
82
- const exists = compositions.find((c) => c.id === compositionFromUrl);
83
- if (exists) {
84
- selectComposition(exists);
85
- return;
86
- }
87
- }
88
- if (compositions.length > 0) {
89
- selectComposition(compositions[0]);
90
- }
91
- }, [compositions, currentComposition, selectComposition]);
92
52
  const items = (0, react_1.useMemo)(() => {
93
53
  return (0, create_folder_tree_1.createFolderTree)(compositions, folders, foldersExpanded);
94
54
  }, [compositions, folders, foldersExpanded]);
95
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(CurrentComposition_1.CurrentComposition, {}, void 0), (0, jsx_runtime_1.jsx)("div", { style: list, children: items.map((c) => {
55
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(CurrentComposition_1.CurrentComposition, {}), (0, jsx_runtime_1.jsx)("div", { style: list, children: items.map((c) => {
96
56
  return ((0, jsx_runtime_1.jsx)(CompositionSelectorItem_1.CompositionSelectorItem, { level: 0, currentComposition: currentComposition, selectComposition: selectComposition, toggleFolder: toggleFolder, tabIndex: tabIndex, item: c }, c.key + c.type));
97
- }) }, void 0)] }, void 0));
57
+ }) })] }));
98
58
  };
99
59
  exports.CompositionSelector = CompositionSelector;
@@ -65,12 +65,12 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
65
65
  }
66
66
  }, [item, selectComposition, toggleFolder]);
67
67
  if (item.type === 'folder') {
68
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", children: [item.expanded ? ((0, jsx_runtime_1.jsx)(folder_1.ExpandedFolderIcon, { style: iconStyle }, void 0)) : ((0, jsx_runtime_1.jsx)(folder_1.CollapsedFolderIcon, { style: iconStyle }, void 0)), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }, void 0), item.folderName] }, void 0), item.expanded
68
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", children: [item.expanded ? ((0, jsx_runtime_1.jsx)(folder_1.ExpandedFolderIcon, { style: iconStyle })) : ((0, jsx_runtime_1.jsx)(folder_1.CollapsedFolderIcon, { style: iconStyle })), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), item.folderName] }), item.expanded
69
69
  ? item.items.map((childItem) => {
70
70
  return ((0, jsx_runtime_1.jsx)(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder }, childItem.key + childItem.type));
71
71
  })
72
- : null] }, void 0));
72
+ : null] }));
73
73
  }
74
- return ((0, jsx_runtime_1.jsxs)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", children: [(0, is_composition_still_1.isCompositionStill)(item.composition) ? ((0, jsx_runtime_1.jsx)(still_1.StillIcon, { style: iconStyle }, void 0)) : ((0, jsx_runtime_1.jsx)(film_1.FilmIcon, { style: iconStyle }, void 0)), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }, void 0), item.composition.id] }, void 0));
74
+ return ((0, jsx_runtime_1.jsxs)("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", children: [(0, is_composition_still_1.isCompositionStill)(item.composition) ? ((0, jsx_runtime_1.jsx)(still_1.StillIcon, { style: iconStyle })) : ((0, jsx_runtime_1.jsx)(film_1.FilmIcon, { style: iconStyle })), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), item.composition.id] }));
75
75
  };
76
76
  exports.CompositionSelectorItem = CompositionSelectorItem;
@@ -16,6 +16,6 @@ const ControlButton = (props) => {
16
16
  };
17
17
  }, [props.disabled]);
18
18
  const { tabIndex } = (0, z_index_1.useZIndex)();
19
- return ((0, jsx_runtime_1.jsx)("button", { type: 'button', tabIndex: tabIndex, ...props, style: style }, void 0));
19
+ return ((0, jsx_runtime_1.jsx)("button", { type: 'button', tabIndex: tabIndex, ...props, style: style }));
20
20
  };
21
21
  exports.ControlButton = ControlButton;
@@ -11,7 +11,7 @@ const iconStyle = {
11
11
  height: 16,
12
12
  color: 'white',
13
13
  };
14
- const copyIcon = ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "far", "data-icon": "clipboard", className: "svg-inline--fa fa-clipboard fa-w-12", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", style: iconStyle, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }, void 0) }, void 0));
14
+ const copyIcon = ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "far", "data-icon": "clipboard", className: "svg-inline--fa fa-clipboard fa-w-12", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", style: iconStyle, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
15
15
  const container = {
16
16
  padding: 10,
17
17
  cursor: 'pointer',
@@ -42,6 +42,6 @@ const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
42
42
  const to = setTimeout(() => setCopied(false), 2000);
43
43
  return () => clearTimeout(to);
44
44
  }, [copied]);
45
- return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, style: button, type: "button", children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [copyIcon, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }, void 0), ' ', (0, jsx_runtime_1.jsx)("span", { style: labelStyle, children: copied ? labelWhenCopied : label }, void 0)] }, void 0) }, void 0));
45
+ return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, style: button, type: "button", children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [copyIcon, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), ' ', (0, jsx_runtime_1.jsx)("span", { style: labelStyle, children: copied ? labelWhenCopied : label })] }) }));
46
46
  };
47
47
  exports.CopyButton = CopyButton;
@@ -46,9 +46,9 @@ const CurrentComposition = () => {
46
46
  document.title = `${video.id} / ${window.remotion_projectName} - Remotion Preview`;
47
47
  }, [video]);
48
48
  if (!video) {
49
- return (0, jsx_runtime_1.jsx)("div", { style: container }, void 0);
49
+ return (0, jsx_runtime_1.jsx)("div", { style: container });
50
50
  }
51
51
  const frameToDisplay = Math.floor(video.durationInFrames / 2);
52
- return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsxs)("div", { style: row, children: [richTimelineContext.richTimeline ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Thumbnail_1.Thumbnail, { composition: video, targetHeight: targetHeight, targetWidth: targetWidth, frameToDisplay: frameToDisplay }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }, void 0)] }, void 0)) : null, (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: video.id }, void 0), (0, jsx_runtime_1.jsxs)("div", { style: subtitle, children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }, void 0), (0, is_composition_still_1.isCompositionStill)(video) ? ((0, jsx_runtime_1.jsx)("div", { style: subtitle, children: "Still" }, void 0)) : ((0, jsx_runtime_1.jsxs)("div", { style: subtitle, children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }, void 0))] }, void 0)] }, void 0) }, void 0));
52
+ return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsxs)("div", { style: row, children: [richTimelineContext.richTimeline ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Thumbnail_1.Thumbnail, { composition: video, targetHeight: targetHeight, targetWidth: targetWidth, frameToDisplay: frameToDisplay }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 })] })) : null, (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: video.id }), (0, jsx_runtime_1.jsxs)("div", { style: subtitle, children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? ((0, jsx_runtime_1.jsx)("div", { style: subtitle, children: "Still" })) : ((0, jsx_runtime_1.jsxs)("div", { style: subtitle, children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] })] }) }));
53
53
  };
54
54
  exports.CurrentComposition = CurrentComposition;
@@ -11,12 +11,14 @@ const remotion_1 = require("remotion");
11
11
  const colors_1 = require("../helpers/colors");
12
12
  const noop_1 = require("../helpers/noop");
13
13
  const checkerboard_1 = require("../state/checkerboard");
14
+ const folders_1 = require("../state/folders");
14
15
  const highest_z_index_1 = require("../state/highest-z-index");
15
16
  const keybindings_1 = require("../state/keybindings");
16
17
  const modals_1 = require("../state/modals");
17
18
  const mute_1 = require("../state/mute");
18
19
  const preview_size_1 = require("../state/preview-size");
19
20
  const rich_timeline_1 = require("../state/rich-timeline");
21
+ const sidebar_1 = require("../state/sidebar");
20
22
  const z_index_1 = require("../state/z-index");
21
23
  const EditorContent_1 = require("./EditorContent");
22
24
  const FramePersistor_1 = require("./FramePersistor");
@@ -113,9 +115,9 @@ const Editor = () => {
113
115
  if (!Root) {
114
116
  throw new Error('Root has not been registered. ');
115
117
  }
116
- return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(rich_timeline_1.RichTimelineContext.Provider, { value: richTimelineCtx, children: (0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeContext.Provider, { value: previewSizeCtx, children: (0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineInOutContext.Provider, { value: timelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsxs)("div", { style: background, children: [(0, jsx_runtime_1.jsx)(Root, {}, void 0), (0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}, void 0), (0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {}, void 0), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {}, void 0)] }, void 0), modalContextType &&
117
- modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType }, void 0)), modalContextType &&
118
- modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info }, void 0)), modalContextType &&
119
- modalContextType.type === 'shortcuts' && ((0, jsx_runtime_1.jsx)(KeyboardShortcutsModal_1.KeyboardShortcuts, {}, void 0))] }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0) }, void 0));
118
+ return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(rich_timeline_1.RichTimelineContext.Provider, { value: richTimelineCtx, children: (0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeContext.Provider, { value: previewSizeCtx, children: (0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineInOutContext.Provider, { value: timelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsxs)("div", { style: background, children: [(0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}), (0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {}), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] }), modalContextType &&
119
+ modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType &&
120
+ modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType &&
121
+ modalContextType.type === 'shortcuts' && ((0, jsx_runtime_1.jsx)(KeyboardShortcutsModal_1.KeyboardShortcuts, {}))] }) }) }) }) }) }) }) }) }) }) }) }) }) }));
120
122
  };
121
123
  exports.Editor = Editor;
@@ -8,11 +8,12 @@ const SplitterElement_1 = require("./Splitter/SplitterElement");
8
8
  const SplitterHandle_1 = require("./Splitter/SplitterHandle");
9
9
  const Timeline_1 = require("./Timeline/Timeline");
10
10
  const TopPanel_1 = require("./TopPanel");
11
+ const noop = () => undefined;
11
12
  const EditorContent = () => {
12
13
  const isStill = (0, is_current_selected_still_1.useIsStill)();
13
14
  if (isStill) {
14
- return (0, jsx_runtime_1.jsx)(TopPanel_1.TopPanel, {}, void 0);
15
+ return (0, jsx_runtime_1.jsx)(TopPanel_1.TopPanel, {});
15
16
  }
16
- return ((0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TopPanel_1.TopPanel, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, {}, void 0), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(Timeline_1.Timeline, {}, void 0) }, void 0)] }, void 0));
17
+ return ((0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TopPanel_1.TopPanel, {}) }), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: false, onCollapse: noop }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(Timeline_1.Timeline, {}) })] }));
17
18
  };
18
19
  exports.EditorContent = EditorContent;
@@ -69,6 +69,6 @@ const FpsCounter = ({ playbackSpeed }) => {
69
69
  if (videoConfig === null) {
70
70
  return null;
71
71
  }
72
- return (0, jsx_runtime_1.jsxs)("div", { style: style, children: [fps.toFixed(1), " FPS"] }, void 0);
72
+ return (0, jsx_runtime_1.jsxs)("div", { style: style, children: [fps.toFixed(1), " FPS"] });
73
73
  };
74
74
  exports.FpsCounter = FpsCounter;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TComposition } from 'remotion';
3
+ export declare const useSelectComposition: () => (c: TComposition) => void;
4
+ export declare const InitialCompositionLoader: React.FC;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitialCompositionLoader = exports.useSelectComposition = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const folders_1 = require("../state/folders");
7
+ const marks_1 = require("../state/marks");
8
+ const CompositionSelector_1 = require("./CompositionSelector");
9
+ const FramePersistor_1 = require("./FramePersistor");
10
+ const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
11
+ const useSelectComposition = () => {
12
+ const setCurrentFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
13
+ const { setCurrentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
14
+ const { setFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
15
+ return (c) => {
16
+ var _a;
17
+ (_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.setMarks((0, marks_1.loadMarks)(c.id, c.durationInFrames));
18
+ window.history.pushState({}, 'Preview', `/${c.id}`);
19
+ const frame = (0, FramePersistor_1.getFrameForComposition)(c.id);
20
+ const frameInBounds = Math.min(c.durationInFrames - 1, frame);
21
+ setCurrentFrame(frameInBounds);
22
+ setCurrentComposition(c.id);
23
+ const { folderName, parentFolderName } = c;
24
+ if (folderName !== null) {
25
+ setFoldersExpanded((ex) => {
26
+ const keysToExpand = (0, CompositionSelector_1.getKeysToExpand)(folderName, parentFolderName);
27
+ const newState = {
28
+ ...ex,
29
+ };
30
+ for (const key of keysToExpand) {
31
+ newState[key] = true;
32
+ }
33
+ return newState;
34
+ });
35
+ }
36
+ };
37
+ };
38
+ exports.useSelectComposition = useSelectComposition;
39
+ const InitialCompositionLoader = () => {
40
+ const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
41
+ const selectComposition = (0, exports.useSelectComposition)();
42
+ (0, react_1.useEffect)(() => {
43
+ if (currentComposition) {
44
+ return;
45
+ }
46
+ const compositionFromUrl = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
47
+ if (compositionFromUrl) {
48
+ const exists = compositions.find((c) => c.id === compositionFromUrl);
49
+ if (exists) {
50
+ selectComposition(exists);
51
+ return;
52
+ }
53
+ }
54
+ if (compositions.length > 0) {
55
+ selectComposition(compositions[0]);
56
+ }
57
+ }, [compositions, currentComposition, selectComposition]);
58
+ return null;
59
+ };
60
+ exports.InitialCompositionLoader = InitialCompositionLoader;
@@ -48,6 +48,6 @@ const KeyboardShortcuts = () => {
48
48
  const onQuit = (0, react_1.useCallback)(() => {
49
49
  setSelectedModal(null);
50
50
  }, [setSelectedModal]);
51
- return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onEscape: onQuit, onOutsideClick: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Keyboard shortcuts" }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [(0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback" }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }, void 0), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}, void 0) }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second back" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}, void 0) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Previous frame" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Space" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Pause" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}, void 0) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Next frame" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }, void 0), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}, void 0) }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second forward" }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("br", {}, void 0), (0, jsx_runtime_1.jsx)("br", {}, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reverse playback" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "L" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Speed up" }, void 0)] }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 8 }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Navigation" }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "N" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "New composition" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "T" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle checkerboard transparency" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "?" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Show keyboard shortcuts" }, void 0)] }, void 0), (0, jsx_runtime_1.jsx)("br", {}, void 0), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback range" }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "I" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set In Point" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "O" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set Out Point" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" }, void 0)] }, void 0)] }, void 0)] }, void 0)] }, void 0));
51
+ return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onEscape: onQuit, onOutsideClick: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Keyboard shortcuts" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [(0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second back" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Previous frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Space" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Next frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second forward" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "A" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to beginning" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "E" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to end" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reverse playback" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "L" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Speed up" })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 8 }), (0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Navigation" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "N" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "New composition" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "T" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle checkerboard transparency" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "?" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Show keyboard shortcuts" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback range" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "I" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set In Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "O" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set Out Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] })] })] })] }));
52
52
  };
53
53
  exports.KeyboardShortcuts = KeyboardShortcuts;
@@ -30,6 +30,6 @@ const Loading = () => {
30
30
  animation: anim 2s;
31
31
  animation-fill-mode: forwards;
32
32
  }
33
- ` }, void 0), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("p", { style: label, children: "Loading..." }, void 0)] }, void 0));
33
+ ` }), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }), (0, jsx_runtime_1.jsx)("p", { style: label, children: "Loading..." })] }));
34
34
  };
35
35
  exports.Loading = Loading;
@@ -18,6 +18,6 @@ const LoopToggle = ({ loop, setLoop }) => {
18
18
  if (isStill) {
19
19
  return null;
20
20
  }
21
- return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: (0, jsx_runtime_1.jsx)("path", { fill: loop ? 'var(--blue)' : '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" }, void 0) }, void 0) }, void 0));
21
+ return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: (0, jsx_runtime_1.jsx)("path", { fill: loop ? 'var(--blue)' : '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" }) }) }));
22
22
  };
23
23
  exports.LoopToggle = LoopToggle;
@@ -10,6 +10,6 @@ const menuDivider = {
10
10
  backgroundColor: colors_1.INPUT_BORDER_COLOR_HOVERED,
11
11
  };
12
12
  const MenuDivider = () => {
13
- return (0, jsx_runtime_1.jsx)("div", { style: menuDivider }, void 0);
13
+ return (0, jsx_runtime_1.jsx)("div", { style: menuDivider });
14
14
  };
15
15
  exports.MenuDivider = MenuDivider;
@@ -69,8 +69,8 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
69
69
  top: ((_a = size === null || size === void 0 ? void 0 : size.top) !== null && _a !== void 0 ? _a : 0) + ((_b = size === null || size === void 0 ? void 0 : size.height) !== null && _b !== void 0 ? _b : 0),
70
70
  };
71
71
  }, [size]);
72
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { ref: ref, role: "button", tabIndex: tabIndex, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: containerStyle, type: "button", children: itemName }, void 0), portalStyle
73
- ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: outerStyle, children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onItemQuit, onOutsideClick: onItemQuit, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: onPreviousMenu, onPreviousMenu: onNextMenu, values: menu.items, onHide: onItemQuit, leaveLeftSpace: menu.leaveLeftPadding, preselectIndex: false, topItemCanBeUnselected: true }, void 0) }, void 0) }, void 0) }, void 0), (0, portals_1.getPortal)(currentZIndex))
74
- : null] }, void 0));
72
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { ref: ref, role: "button", tabIndex: tabIndex, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: containerStyle, type: "button", children: itemName }), portalStyle
73
+ ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: outerStyle, children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onItemQuit, onOutsideClick: onItemQuit, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: onPreviousMenu, onPreviousMenu: onNextMenu, values: menu.items, onHide: onItemQuit, leaveLeftSpace: menu.leaveLeftPadding, preselectIndex: false, topItemCanBeUnselected: true }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
74
+ : null] }));
75
75
  };
76
76
  exports.MenuItem = MenuItem;
@@ -84,8 +84,8 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
84
84
  }, 100);
85
85
  return () => clearTimeout(hi);
86
86
  }, [hovered, selected, setSubMenuActivated, subMenu]);
87
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: style, onClick: onClick, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [leaveLeftSpace ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: leftSpace, children: leftItem }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }, void 0)] }, void 0)) : null, (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: label }, void 0), " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 2 }, void 0), subMenu ? (0, jsx_runtime_1.jsx)(caret_1.Caret, {}, void 0) : null, keyHint ? (0, jsx_runtime_1.jsx)("span", { style: keyHintCss, children: keyHint }, void 0) : null, portalStyle && subMenu
88
- ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(SubMenu_1.SubMenuComponent, { onQuitFullMenu: onQuitMenu, subMenu: subMenu, onQuitSubMenu: onQuitSubmenu, portalStyle: portalStyle, subMenuActivated: subMenuActivated }, void 0), (0, portals_1.getPortal)(currentZIndex))
89
- : null] }, void 0) }, void 0));
87
+ return ((0, jsx_runtime_1.jsx)("div", { ref: ref, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: style, onClick: onClick, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [leaveLeftSpace ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: leftSpace, children: leftItem }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 })] })) : null, (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: label }), " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 2 }), subMenu ? (0, jsx_runtime_1.jsx)(caret_1.CaretRight, {}) : null, keyHint ? (0, jsx_runtime_1.jsx)("span", { style: keyHintCss, children: keyHint }) : null, portalStyle && subMenu
88
+ ? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(SubMenu_1.SubMenuComponent, { onQuitFullMenu: onQuitMenu, subMenu: subMenu, onQuitSubMenu: onQuitSubmenu, portalStyle: portalStyle, subMenuActivated: subMenuActivated }), (0, portals_1.getPortal)(currentZIndex))
89
+ : null] }) }));
90
90
  };
91
91
  exports.MenuSubItem = MenuSubItem;
@@ -9,6 +9,6 @@ const SubMenuComponent = ({ portalStyle, subMenuActivated, subMenu, onQuitFullMe
9
9
  return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onQuitFullMenu, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, className: "css-reset", children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: onQuitSubMenu, values: subMenu.items, onHide: noop_1.noop, leaveLeftSpace: subMenu.leaveLeftSpace, preselectIndex: subMenuActivated === 'without-mouse' &&
10
10
  typeof subMenu.preselectIndex === 'number'
11
11
  ? subMenu.preselectIndex
12
- : false, topItemCanBeUnselected: false }, void 0) }, void 0) }, void 0));
12
+ : false, topItemCanBeUnselected: false }) }) }));
13
13
  };
14
14
  exports.SubMenuComponent = SubMenuComponent;