@remotion/cli 3.3.80 → 3.3.81

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 (64) hide show
  1. package/dist/codemods/update-default-props.js +57 -11
  2. package/dist/editor/components/CollapsedSidebarExpander.js +1 -0
  3. package/dist/editor/components/CurrentCompositionSideEffects.js +0 -1
  4. package/dist/editor/components/InlineAction.js +1 -0
  5. package/dist/editor/components/NewComposition/RemTextarea.js +4 -2
  6. package/dist/editor/components/RenderButton.js +1 -1
  7. package/dist/editor/components/RenderModal/EnvInput.d.ts +1 -0
  8. package/dist/editor/components/RenderModal/EnvInput.js +22 -2
  9. package/dist/editor/components/RenderModal/InfoTooltip.js +2 -1
  10. package/dist/editor/components/RenderModal/InlineEyeIcon.js +3 -27
  11. package/dist/editor/components/RenderModal/InlineRemoveButton.js +0 -2
  12. package/dist/editor/components/RenderModal/RenderModal.js +44 -9
  13. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +6 -1
  14. package/dist/editor/components/RenderModal/RenderModalAudio.js +4 -1
  15. package/dist/editor/components/RenderModal/RenderModalBasic.js +4 -1
  16. package/dist/editor/components/RenderModal/RenderModalData.d.ts +0 -1
  17. package/dist/editor/components/RenderModal/RenderModalData.js +14 -6
  18. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +8 -5
  19. package/dist/editor/components/RenderModal/RenderModalGif.js +4 -1
  20. package/dist/editor/components/RenderModal/RenderModalInput.js +1 -1
  21. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +2 -0
  22. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +14 -3
  23. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +1 -1
  24. package/dist/editor/components/RenderModal/RenderModalPicture.js +4 -1
  25. package/dist/editor/components/RenderModal/RenderStatusModal.js +2 -1
  26. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +39 -5
  27. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +2 -0
  28. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +15 -0
  29. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -3
  30. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -0
  31. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +2 -1
  32. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +14 -0
  33. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +69 -0
  34. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
  35. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +6 -2
  36. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +6 -1
  37. package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +2 -0
  38. package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +21 -0
  39. package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
  40. package/dist/editor/components/RenderModal/layout.js +0 -1
  41. package/dist/editor/components/RenderModal/out-name-checker.js +2 -1
  42. package/dist/editor/components/RenderQueue/context.d.ts +0 -1
  43. package/dist/editor/components/RenderQueue/context.js +1 -8
  44. package/dist/editor/components/RenderQueue/index.js +1 -0
  45. package/dist/editor/components/RenderToolbarIcon.d.ts +1 -1
  46. package/dist/editor/components/RenderToolbarIcon.js +5 -5
  47. package/dist/editor/components/RendersTab.js +1 -1
  48. package/dist/editor/components/RightPanel.d.ts +6 -0
  49. package/dist/editor/components/RightPanel.js +42 -4
  50. package/dist/editor/components/Tabs/index.js +1 -1
  51. package/dist/editor/helpers/convert-env-variables.js +2 -2
  52. package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
  53. package/dist/editor/helpers/use-breakpoint.d.ts +1 -0
  54. package/dist/editor/helpers/use-breakpoint.js +17 -0
  55. package/dist/editor/icons/render.d.ts +3 -0
  56. package/dist/editor/icons/render.js +6 -2
  57. package/dist/preview-server/render-queue/queue.js +1 -0
  58. package/dist/render-flows/render.js +1 -5
  59. package/dist/render-flows/still.js +0 -3
  60. package/package.json +6 -6
  61. package/dist/editor/components/SidebarContent.d.ts +0 -5
  62. package/dist/editor/components/SidebarContent.js +0 -53
  63. package/dist/editor/icons/save.d.ts +0 -2
  64. package/dist/editor/icons/save.js +0 -8
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RenderStillButton = void 0;
3
+ exports.RenderButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
@@ -10,18 +10,18 @@ const client_id_1 = require("../helpers/client-id");
10
10
  const render_1 = require("../icons/render");
11
11
  const modals_1 = require("../state/modals");
12
12
  const ControlButton_1 = require("./ControlButton");
13
- const RenderStillButton = () => {
13
+ const RenderButton = () => {
14
14
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
15
15
  const { type } = (0, react_1.useContext)(client_id_1.PreviewServerConnectionCtx);
16
16
  const iconStyle = (0, react_1.useMemo)(() => {
17
17
  return {
18
18
  style: {
19
- height: 15,
19
+ height: 18,
20
20
  },
21
21
  };
22
22
  }, []);
23
23
  const tooltip = type === 'connected'
24
- ? 'Export the current frame as a still image'
24
+ ? 'Export the current composition'
25
25
  : 'Connect to the preview server to render';
26
26
  const video = remotion_1.Internals.useVideo();
27
27
  const frame = (0, remotion_1.useCurrentFrame)();
@@ -81,4 +81,4 @@ const RenderStillButton = () => {
81
81
  }
82
82
  return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { id: "render-modal-button", disabled: type !== 'connected', title: tooltip, "aria-label": tooltip, onClick: onClick, children: (0, jsx_runtime_1.jsx)(render_1.RenderIcon, { svgProps: iconStyle }) }));
83
83
  };
84
- exports.RenderStillButton = RenderStillButton;
84
+ exports.RenderButton = RenderButton;
@@ -10,7 +10,7 @@ const Tabs_1 = require("./Tabs");
10
10
  const row = {
11
11
  display: 'flex',
12
12
  flexDirection: 'row',
13
- fontSize: 13,
13
+ fontSize: 14,
14
14
  justifyContent: 'center',
15
15
  color: 'inherit',
16
16
  alignItems: 'center',
@@ -1,2 +1,8 @@
1
1
  import React from 'react';
2
+ declare type SidebarPanel = 'input-props' | 'renders';
3
+ export declare const persistSelectedPanel: (panel: SidebarPanel) => void;
4
+ export declare const rightSidebarTabs: React.RefObject<{
5
+ selectRendersPanel: () => void;
6
+ }>;
2
7
  export declare const RightPanel: React.FC<{}>;
8
+ export {};
@@ -1,15 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RightPanel = void 0;
3
+ exports.RightPanel = exports.rightSidebarTabs = exports.persistSelectedPanel = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const colors_1 = require("../helpers/colors");
7
8
  const RenderModalData_1 = require("./RenderModal/RenderModalData");
9
+ const RenderQueue_1 = require("./RenderQueue");
10
+ const RendersTab_1 = require("./RendersTab");
11
+ const Tabs_1 = require("./Tabs");
8
12
  const container = {
9
13
  height: '100%',
10
14
  width: '100%',
11
15
  position: 'absolute',
12
- overflow: 'auto',
16
+ display: 'flex',
17
+ flexDirection: 'column',
13
18
  };
14
19
  const PropsEditor = ({ composition }) => {
15
20
  var _a;
@@ -23,9 +28,42 @@ const PropsEditor = ({ composition }) => {
23
28
  newProps: newProps,
24
29
  });
25
30
  }, [composition.defaultProps, composition.id, updateProps]);
26
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { composition: composition, inputProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps, setInputProps: setInputProps, compact: true, updateButton: true, showSaveButton: true }) }));
31
+ return ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { composition: composition, inputProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps, setInputProps: setInputProps, compact: true, showSaveButton: true }));
27
32
  };
33
+ const localStorageKey = 'remotion.sidebarPanel';
34
+ const getSelectedPanel = () => {
35
+ const panel = localStorage.getItem(localStorageKey);
36
+ if (panel === 'renders') {
37
+ return 'renders';
38
+ }
39
+ return 'input-props';
40
+ };
41
+ const tabsContainer = {
42
+ borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
43
+ };
44
+ const persistSelectedPanel = (panel) => {
45
+ localStorage.setItem(localStorageKey, panel);
46
+ };
47
+ exports.persistSelectedPanel = persistSelectedPanel;
48
+ exports.rightSidebarTabs = (0, react_1.createRef)();
28
49
  const RightPanel = () => {
50
+ const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
51
+ const onCompositionsSelected = (0, react_1.useCallback)(() => {
52
+ setPanel('input-props');
53
+ (0, exports.persistSelectedPanel)('input-props');
54
+ }, []);
55
+ const onRendersSelected = (0, react_1.useCallback)(() => {
56
+ setPanel('renders');
57
+ (0, exports.persistSelectedPanel)('renders');
58
+ }, []);
59
+ (0, react_1.useImperativeHandle)(exports.rightSidebarTabs, () => {
60
+ return {
61
+ selectRendersPanel: () => {
62
+ setPanel('renders');
63
+ (0, exports.persistSelectedPanel)('renders');
64
+ },
65
+ };
66
+ }, []);
29
67
  const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
30
68
  const composition = (0, react_1.useMemo)(() => {
31
69
  for (const comp of compositions) {
@@ -38,6 +76,6 @@ const RightPanel = () => {
38
76
  if (composition === null) {
39
77
  return null;
40
78
  }
41
- return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }) }));
79
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, children: "Default Props" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }))] }));
42
80
  };
43
81
  exports.RightPanel = RightPanel;
@@ -23,7 +23,7 @@ const selectorButton = {
23
23
  border: 'none',
24
24
  flex: 1,
25
25
  padding: 8,
26
- fontSize: 13,
26
+ fontSize: 14,
27
27
  };
28
28
  const Tab = ({ children, onClick, style, selected }) => {
29
29
  const [hovered, setHovered] = (0, react_1.useState)(false);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.envVariablesArrayToObject = exports.envVariablesObjectToArray = void 0;
4
4
  const envVariablesObjectToArray = (envVariables) => {
5
5
  return Object.entries(envVariables).map(([key, one]) => [
6
- key.trim(),
6
+ key.trim().toUpperCase(),
7
7
  one.trim(),
8
8
  ]);
9
9
  };
@@ -13,7 +13,7 @@ const envVariablesArrayToObject = (envVariables) => {
13
13
  .map(([key, val]) => [key.trim(), val.trim()])
14
14
  .filter(([key, val]) => key && val)
15
15
  .reduce((acc, [key, value]) => {
16
- acc[key] = value;
16
+ acc[key.toUpperCase()] = value;
17
17
  return acc;
18
18
  }, {});
19
19
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Codec } from '@remotion/renderer';
3
2
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
4
3
  declare type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
@@ -0,0 +1 @@
1
+ export declare function useBreakpoint(breakpoint: number): boolean;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useBreakpoint = void 0;
4
+ const react_1 = require("react");
5
+ function useBreakpoint(breakpoint) {
6
+ const [compactUI, setCompactUI] = (0, react_1.useState)(window.innerWidth < breakpoint);
7
+ (0, react_1.useEffect)(() => {
8
+ function handleResize() {
9
+ setCompactUI(window.innerWidth < breakpoint);
10
+ }
11
+ window.addEventListener('resize', handleResize);
12
+ handleResize();
13
+ return () => window.removeEventListener('resize', handleResize);
14
+ }, [breakpoint]);
15
+ return compactUI;
16
+ }
17
+ exports.useBreakpoint = useBreakpoint;
@@ -3,3 +3,6 @@ import React from 'react';
3
3
  export declare const RenderIcon: React.FC<{
4
4
  svgProps: SVGProps<SVGSVGElement>;
5
5
  }>;
6
+ export declare const ThinRenderIcon: React.FC<{
7
+ svgProps: SVGProps<SVGSVGElement>;
8
+ }>;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RenderIcon = void 0;
3
+ exports.ThinRenderIcon = exports.RenderIcon = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const RenderIcon = (props) => {
6
- return ((0, jsx_runtime_1.jsx)("svg", { ...props.svgProps, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: "M408 143.1C408 166.1 390.1 183.1 368 183.1C345.9 183.1 328 166.1 328 143.1C328 121.9 345.9 103.1 368 103.1C390.1 103.1 408 121.9 408 143.1zM384 312.1V394.2C384 419.7 370.6 443.2 348.7 456.2L260.2 508.6C252.8 513 243.6 513.1 236.1 508.9C228.6 504.6 224 496.6 224 488V373.3C224 350.6 215 328.1 199 312.1C183 296.1 161.4 288 138.7 288H24C15.38 288 7.414 283.4 3.146 275.9C-1.123 268.4-1.042 259.2 3.357 251.8L55.83 163.3C68.79 141.4 92.33 127.1 117.8 127.1H199.9C281.7-3.798 408.8-8.546 483.9 5.272C495.6 7.411 504.6 16.45 506.7 28.07C520.5 103.2 515.8 230.3 384 312.1V312.1zM197.9 253.9C210.8 260.2 222.6 268.7 232.1 279C243.3 289.4 251.8 301.2 258.1 314.1C363.9 284.1 414.8 234.5 439.7 188C464.7 141.3 466.1 90.47 461.7 50.33C421.5 45.02 370.7 47.34 323.1 72.33C277.5 97.16 227.9 148.1 197.9 253.9H197.9zM41.98 345.5C76.37 311.1 132.1 311.1 166.5 345.5C200.9 379.9 200.9 435.6 166.5 470C117 519.5 .4765 511.5 .4765 511.5C.4765 511.5-7.516 394.1 41.98 345.5V345.5zM64.58 447.4C64.58 447.4 103.3 450.1 119.8 433.6C131.2 422.2 131.2 403.6 119.8 392.2C108.3 380.8 89.81 380.8 78.38 392.2C61.92 408.7 64.58 447.4 64.58 447.4z" }) }));
6
+ return ((0, jsx_runtime_1.jsx)("svg", { ...props.svgProps, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: "M156.6 384.9L125.7 354c-8.5-8.5-11.5-20.8-7.7-32.2c3-8.9 7-20.5 11.8-33.8L24 288c-8.6 0-16.6-4.6-20.9-12.1s-4.2-16.7 .2-24.1l52.5-88.5c13-21.9 36.5-35.3 61.9-35.3l82.3 0c2.4-4 4.8-7.7 7.2-11.3C289.1-4.1 411.1-8.1 483.9 5.3c11.6 2.1 20.6 11.2 22.8 22.8c13.4 72.9 9.3 194.8-111.4 276.7c-3.5 2.4-7.3 4.8-11.3 7.2v82.3c0 25.4-13.4 49-35.3 61.9l-88.5 52.5c-7.4 4.4-16.6 4.5-24.1 .2s-12.1-12.2-12.1-20.9V380.8c-14.1 4.9-26.4 8.9-35.7 11.9c-11.2 3.6-23.4 .5-31.8-7.8zM384 168a40 40 0 1 0 0-80 40 40 0 1 0 0 80z" }) }));
7
7
  };
8
8
  exports.RenderIcon = RenderIcon;
9
+ const ThinRenderIcon = (props) => {
10
+ return ((0, jsx_runtime_1.jsx)("svg", { ...props.svgProps, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: "M188.9 372l-50.4-50.4c18.6-42.6 61.7-137.7 95.1-187C304.6 30.1 409 24.6 475.7 36.3c11.7 66.7 6.2 171.1-98.4 242c-49.4 33.5-145.5 75.6-188.4 93.7zm-79.9-62.8c-5.2 11.9-2.5 25.7 6.7 34.9l50.7 50.7c9.1 9.1 22.7 11.9 34.5 6.9c6.5-2.7 14.3-6 23-9.8L224 496c0 5.5 2.9 10.7 7.6 13.6s10.6 3.2 15.6 .7l101.5-50.7c21.7-10.8 35.4-33 35.4-57.2V312.1c4-2.5 7.7-4.9 11.3-7.3C516.1 222.9 520.1 100.9 506.7 28.1c-2.1-11.6-11.2-20.6-22.8-22.8C411.1-8.1 289.1-4.1 207.2 116.7c-2.4 3.6-4.9 7.3-7.3 11.3l-90.2 0c-24.2 0-46.4 13.7-57.2 35.4L1.7 264.8c-2.5 5-2.2 10.8 .7 15.6s8.1 7.6 13.6 7.6H118.5c-3.6 8-6.8 15.2-9.4 21.2zM256 470.1l0-92.5c30.3-13.7 65.4-30.3 96-47v71.7c0 12.1-6.8 23.2-17.7 28.6L256 470.1zM109.7 160h71.5c-16.9 30.7-34 65.8-48.1 96H41.9L81 177.7c5.4-10.8 16.5-17.7 28.6-17.7zM392 144a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM368 88a56 56 0 1 0 0 112 56 56 0 1 0 0-112z" }) }));
11
+ };
12
+ exports.ThinRenderIcon = ThinRenderIcon;
@@ -94,6 +94,7 @@ const cancelJob = (jobId) => {
94
94
  }
95
95
  };
96
96
  exports.cancelJob = cancelJob;
97
+ // TODO: Currently, concurrency = 1 is not enforced
97
98
  const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
98
99
  const nextJob = jobQueue.find((q) => {
99
100
  return q.status === 'idle';
@@ -9,7 +9,6 @@ const fs_1 = __importDefault(require("fs"));
9
9
  const os_1 = __importDefault(require("os"));
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const chalk_1 = require("../chalk");
12
- const cleanup_before_quit_1 = require("../cleanup-before-quit");
13
12
  const config_1 = require("../config");
14
13
  const get_cli_options_1 = require("../get-cli-options");
15
14
  const get_composition_with_dimension_override_1 = require("../get-composition-with-dimension-override");
@@ -27,7 +26,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
27
26
  const downloads = [];
28
27
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
29
28
  addCleanupCallback(() => renderer_1.RenderInternals.cleanDownloadMap(downloadMap));
30
- (0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.cleanDownloadMap(downloadMap));
31
29
  log_1.Log.verboseAdvanced({ indent, logLevel }, 'Browser executable: ', browserExecutable);
32
30
  log_1.Log.verboseAdvanced({ indent, logLevel }, 'Asset dirs', downloadMap.assetDir);
33
31
  const browserInstance = (0, renderer_1.openBrowser)(browser, {
@@ -87,7 +85,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
87
85
  bundlingStep: steps.indexOf('bundling'),
88
86
  steps: steps.length,
89
87
  });
90
- (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
91
88
  addCleanupCallback(() => cleanupBundle());
92
89
  const onDownload = (src) => {
93
90
  const id = Math.random();
@@ -108,7 +105,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
108
105
  };
109
106
  };
110
107
  const puppeteerInstance = await browserInstance;
111
- (0, cleanup_before_quit_1.registerCleanupJob)(() => puppeteerInstance.close(false));
112
108
  addCleanupCallback(() => puppeteerInstance.close(false));
113
109
  const comps = await (0, renderer_1.getCompositions)(urlOrBundle, {
114
110
  inputProps,
@@ -269,7 +265,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
269
265
  puppeteerInstance,
270
266
  onDownload,
271
267
  internal: {
272
- onCtrlCExit: cleanup_before_quit_1.registerCleanupJob,
268
+ onCtrlCExit: addCleanupCallback,
273
269
  downloadMap,
274
270
  },
275
271
  cancelSignal: cancelSignal !== null && cancelSignal !== void 0 ? cancelSignal : undefined,
@@ -9,7 +9,6 @@ const renderer_1 = require("@remotion/renderer");
9
9
  const fs_1 = require("fs");
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const chalk_1 = require("../chalk");
12
- const cleanup_before_quit_1 = require("../cleanup-before-quit");
13
12
  const config_1 = require("../config");
14
13
  const determine_image_format_1 = require("../determine-image-format");
15
14
  const get_cli_options_1 = require("../get-cli-options");
@@ -65,12 +64,10 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
65
64
  logLevel,
66
65
  bundlingStep: steps.indexOf('bundling'),
67
66
  });
68
- (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
69
67
  addCleanupCallback(() => cleanupBundle());
70
68
  const puppeteerInstance = await browserInstance;
71
69
  addCleanupCallback(() => puppeteerInstance.close(false));
72
70
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
73
- (0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.cleanDownloadMap(downloadMap));
74
71
  addCleanupCallback(() => renderer_1.RenderInternals.cleanDownloadMap(downloadMap));
75
72
  const comps = await (0, renderer_1.getCompositions)(urlOrBundle, {
76
73
  inputProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.3.80",
3
+ "version": "3.3.81",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -16,16 +16,16 @@
16
16
  "author": "Jonny Burger <jonny@remotion.dev>",
17
17
  "license": "SEE LICENSE IN LICENSE.md",
18
18
  "dependencies": {
19
- "@remotion/bundler": "3.3.80",
20
- "@remotion/media-utils": "3.3.80",
21
- "@remotion/player": "3.3.80",
22
- "@remotion/renderer": "3.3.80",
19
+ "@remotion/bundler": "3.3.81",
20
+ "@remotion/media-utils": "3.3.81",
21
+ "@remotion/player": "3.3.81",
22
+ "@remotion/renderer": "3.3.81",
23
23
  "dotenv": "9.0.2",
24
24
  "memfs": "3.4.3",
25
25
  "minimist": "1.2.6",
26
26
  "open": "^8.4.2",
27
27
  "prompts": "2.4.1",
28
- "remotion": "3.3.80",
28
+ "remotion": "3.3.81",
29
29
  "semver": "7.3.5",
30
30
  "source-map": "0.6.1"
31
31
  },
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare const leftSidebarTabs: React.RefObject<{
3
- selectRendersPanel: () => void;
4
- }>;
5
- export declare const SidebarContent: React.FC;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SidebarContent = exports.leftSidebarTabs = 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 CompositionSelector_1 = require("./CompositionSelector");
8
- const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
9
- const RenderQueue_1 = require("./RenderQueue");
10
- const context_1 = require("./RenderQueue/context");
11
- const RendersTab_1 = require("./RendersTab");
12
- const Tabs_1 = require("./Tabs");
13
- const container = {
14
- width: '100%',
15
- };
16
- const tabsContainer = {
17
- borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
18
- };
19
- exports.leftSidebarTabs = (0, react_1.createRef)();
20
- const localStorageKey = 'remotion.sidebarPanel';
21
- const persistSelectedPanel = (panel) => {
22
- localStorage.setItem(localStorageKey, panel);
23
- };
24
- const getSelectedPanel = (shouldRender) => {
25
- const panel = localStorage.getItem(localStorageKey);
26
- if (panel === 'renders' && shouldRender) {
27
- return 'renders';
28
- }
29
- return 'compositions';
30
- };
31
- const SidebarContent = () => {
32
- const shouldRender = (0, context_1.useShouldRenderLeftSidebarTabs)();
33
- const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel(shouldRender));
34
- const onCompositionsSelected = (0, react_1.useCallback)(() => {
35
- setPanel('compositions');
36
- persistSelectedPanel('compositions');
37
- }, []);
38
- const onRendersSelected = (0, react_1.useCallback)(() => {
39
- setPanel('renders');
40
- persistSelectedPanel('renders');
41
- }, []);
42
- (0, react_1.useImperativeHandle)(exports.leftSidebarTabs, () => {
43
- return {
44
- selectRendersPanel: () => {
45
- setPanel('renders');
46
- persistSelectedPanel('renders');
47
- },
48
- };
49
- }, []);
50
- // TODO: It is not perfectly aligned in example
51
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [shouldRender ? ((0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) })) : null, panel === 'renders' && shouldRender ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {})), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
52
- };
53
- exports.SidebarContent = SidebarContent;
@@ -1,2 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export declare const Save: (props: SVGProps<SVGSVGElement>) => JSX.Element;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Save = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Save = (props) => {
6
- return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 448 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentcolor", d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z" }) }));
7
- };
8
- exports.Save = Save;