@remotion/cli 3.1.8 → 3.2.0

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 (89) hide show
  1. package/dist/code-frame.js +2 -1
  2. package/dist/editor/components/Canvas.js +2 -0
  3. package/dist/editor/components/CompositionSelector.js +2 -0
  4. package/dist/editor/components/CompositionSelectorItem.js +1 -0
  5. package/dist/editor/components/CurrentComposition.js +5 -0
  6. package/dist/editor/components/Editor.js +3 -1
  7. package/dist/editor/components/InitialCompositionLoader.js +13 -0
  8. package/dist/editor/components/MenuToolbar.js +2 -0
  9. package/dist/editor/components/Notifications/Notification.js +1 -1
  10. package/dist/editor/components/Notifications/NotificationCenter.js +1 -0
  11. package/dist/editor/components/PlayPause.js +41 -23
  12. package/dist/editor/components/PreviewToolbar.js +4 -2
  13. package/dist/editor/components/Splitter/SplitterElement.js +1 -0
  14. package/dist/editor/components/TimeValue.js +9 -5
  15. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
  16. package/dist/editor/components/Timeline/MaxTimelineTracks.js +5 -3
  17. package/dist/editor/components/Timeline/Timeline.js +11 -4
  18. package/dist/editor/components/Timeline/TimelineDragHandler.js +120 -23
  19. package/dist/editor/components/Timeline/TimelineList.js +7 -4
  20. package/dist/editor/components/Timeline/TimelineListItem.d.ts +1 -0
  21. package/dist/editor/components/Timeline/TimelineListItem.js +8 -4
  22. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.d.ts +2 -0
  23. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +76 -0
  24. package/dist/editor/components/Timeline/TimelineScrollable.js +4 -2
  25. package/dist/editor/components/Timeline/TimelineSlider.d.ts +3 -0
  26. package/dist/editor/components/Timeline/TimelineSlider.js +35 -2
  27. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -3
  28. package/dist/editor/components/Timeline/TimelineTimeIndicators.d.ts +5 -0
  29. package/dist/editor/components/Timeline/TimelineTimeIndicators.js +168 -0
  30. package/dist/editor/components/Timeline/TimelineTracks.js +14 -9
  31. package/dist/editor/components/Timeline/TimelineZoomControls.js +18 -2
  32. package/dist/editor/components/Timeline/imperative-state.d.ts +12 -0
  33. package/dist/editor/components/Timeline/imperative-state.js +39 -0
  34. package/dist/editor/components/Timeline/timeline-refs.d.ts +2 -0
  35. package/dist/editor/components/Timeline/timeline-refs.js +3 -1
  36. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +40 -0
  37. package/dist/editor/components/Timeline/timeline-scroll-logic.js +206 -1
  38. package/dist/editor/components/ZoomPersistor.d.ts +4 -0
  39. package/dist/editor/components/ZoomPersistor.js +37 -0
  40. package/dist/editor/helpers/colors.d.ts +1 -0
  41. package/dist/editor/helpers/colors.js +2 -1
  42. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +1 -0
  43. package/dist/editor/helpers/get-left-of-timeline-slider.js +7 -4
  44. package/dist/editor/helpers/get-timeline-sequence-layout.js +29 -9
  45. package/dist/editor/icons/minus.d.ts +3 -0
  46. package/dist/editor/icons/minus.js +8 -0
  47. package/dist/editor/icons/plus.d.ts +3 -0
  48. package/dist/editor/icons/plus.js +8 -0
  49. package/dist/editor/state/timeline-zoom.d.ts +1 -1
  50. package/dist/editor/state/timeline-zoom.js +15 -1
  51. package/dist/handle-common-errors.js +5 -0
  52. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +1 -0
  53. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +9 -2
  54. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +5 -1
  55. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.js +24 -0
  56. package/dist/preview-server/live-events.js +4 -0
  57. package/dist/preview-server/routes.js +16 -2
  58. package/dist/preview-server/start-server.js +1 -1
  59. package/dist/upgrade.js +1 -0
  60. package/dist/versions.js +1 -0
  61. package/package.json +7 -7
  62. package/dist/bundle-on-cli.d.ts +0 -2
  63. package/dist/bundle-on-cli.js +0 -41
  64. package/dist/bundle.d.ts +0 -1
  65. package/dist/bundle.js +0 -31
  66. package/dist/chalk/symbols.d.ts +0 -111
  67. package/dist/chalk/symbols.js +0 -75
  68. package/dist/chalk/utilities.d.ts +0 -2
  69. package/dist/chalk/utilities.js +0 -37
  70. package/dist/editor/components/CompositionManager.d.ts +0 -4
  71. package/dist/editor/components/CompositionManager.js +0 -60
  72. package/dist/editor/components/LoadingIndicator.d.ts +0 -2
  73. package/dist/editor/components/LoadingIndicator.js +0 -35
  74. package/dist/prepare-entry-point.d.ts +0 -11
  75. package/dist/prepare-entry-point.js +0 -36
  76. package/dist/preview-server/fast-refresh/helpers.d.ts +0 -39
  77. package/dist/preview-server/fast-refresh/helpers.js +0 -145
  78. package/dist/preview-server/fast-refresh/index.d.ts +0 -30
  79. package/dist/preview-server/fast-refresh/index.js +0 -86
  80. package/dist/preview-server/fast-refresh/loader.d.ts +0 -35
  81. package/dist/preview-server/fast-refresh/loader.js +0 -81
  82. package/dist/preview-server/fast-refresh/runtime.d.ts +0 -35
  83. package/dist/preview-server/fast-refresh/runtime.js +0 -32
  84. package/dist/preview-server/static-preview.d.ts +0 -1
  85. package/dist/preview-server/static-preview.js +0 -40
  86. package/dist/preview-server/webpack-cache.d.ts +0 -12
  87. package/dist/preview-server/webpack-cache.js +0 -66
  88. package/dist/webpack-cache.d.ts +0 -12
  89. package/dist/webpack-cache.js +0 -66
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useGetXPositionOfItemInTimeline = void 0;
3
+ exports.getXPositionOfItemInTimelineImperatively = exports.useGetXPositionOfItemInTimeline = void 0;
4
4
  const player_1 = require("@remotion/player");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
@@ -18,12 +18,15 @@ const useGetXPositionOfItemInTimeline = () => {
18
18
  if (!videoConfig) {
19
19
  return 0;
20
20
  }
21
- return ((frame / (videoConfig.durationInFrames - 1)) *
22
- (width - timeline_layout_1.TIMELINE_PADDING * 2) +
23
- timeline_layout_1.TIMELINE_PADDING);
21
+ return (0, exports.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, width);
24
22
  }, [videoConfig, width]);
25
23
  return (0, react_1.useMemo)(() => {
26
24
  return { get, width };
27
25
  }, [get, width]);
28
26
  };
29
27
  exports.useGetXPositionOfItemInTimeline = useGetXPositionOfItemInTimeline;
28
+ const getXPositionOfItemInTimelineImperatively = (frame, duration, width) => {
29
+ const proportion = frame / (duration - 1);
30
+ return proportion * (width - timeline_layout_1.TIMELINE_PADDING * 2) + timeline_layout_1.TIMELINE_PADDING;
31
+ };
32
+ exports.getXPositionOfItemInTimelineImperatively = getXPositionOfItemInTimelineImperatively;
@@ -3,23 +3,43 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTimelineSequenceLayout = exports.SEQUENCE_BORDER_WIDTH = void 0;
4
4
  const timeline_layout_1 = require("./timeline-layout");
5
5
  exports.SEQUENCE_BORDER_WIDTH = 1;
6
+ const getWidthOfTrack = ({ durationInFrames, lastFrame, windowWidth, spatialDuration, nonNegativeMarginLeft, }) => {
7
+ const fullWidth = windowWidth - timeline_layout_1.TIMELINE_PADDING * 2;
8
+ const base = durationInFrames === Infinity || lastFrame === 0
9
+ ? fullWidth
10
+ : (spatialDuration / lastFrame) * fullWidth;
11
+ return base - exports.SEQUENCE_BORDER_WIDTH + nonNegativeMarginLeft;
12
+ };
6
13
  const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, }) => {
7
14
  var _a;
8
15
  const maxMediaSequenceDuration = (maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity) - startFromMedia;
9
- const spatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames - 1);
16
+ let spatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames - 1);
10
17
  const lastFrame = ((_a = video.durationInFrames) !== null && _a !== void 0 ? _a : 1) - 1;
18
+ const shouldAddHalfAFrameAtEnd = startFrom + durationInFrames < lastFrame;
19
+ const shouldAddHalfAFrameAtStart = startFrom > 0;
20
+ if (shouldAddHalfAFrameAtEnd) {
21
+ spatialDuration += 0.5;
22
+ }
23
+ if (shouldAddHalfAFrameAtStart) {
24
+ spatialDuration += 0.5;
25
+ }
26
+ const startFromWithOffset = shouldAddHalfAFrameAtStart
27
+ ? startFrom - 0.5
28
+ : startFrom;
11
29
  const marginLeft = lastFrame === 0
12
30
  ? 0
13
- : (startFrom / lastFrame) * (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2);
14
- const negativeMarginLeft = Math.min(marginLeft, 0);
15
- const width = (durationInFrames === Infinity || lastFrame === 0
16
- ? windowWidth - timeline_layout_1.TIMELINE_PADDING * 2
17
- : (spatialDuration / lastFrame) * (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2)) -
18
- exports.SEQUENCE_BORDER_WIDTH +
19
- negativeMarginLeft;
31
+ : (startFromWithOffset / lastFrame) *
32
+ (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2);
33
+ const nonNegativeMarginLeft = Math.min(marginLeft, 0);
20
34
  return {
21
35
  marginLeft: Math.round(Math.max(marginLeft, 0)),
22
- width: Math.floor(width),
36
+ width: Math.floor(getWidthOfTrack({
37
+ durationInFrames,
38
+ lastFrame,
39
+ nonNegativeMarginLeft,
40
+ spatialDuration,
41
+ windowWidth,
42
+ })),
23
43
  };
24
44
  };
25
45
  exports.getTimelineSequenceLayout = getTimelineSequenceLayout;
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ export declare const Minus: React.FC<SVGProps<SVGSVGElement>>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Minus = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Minus = (props) => {
6
+ return ((0, jsx_runtime_1.jsx)("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z" }) }));
7
+ };
8
+ exports.Minus = Minus;
@@ -0,0 +1,3 @@
1
+ import type { SVGProps } from 'react';
2
+ import React from 'react';
3
+ export declare const Plus: React.FC<SVGProps<SVGSVGElement>>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Plus = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Plus = (props) => {
6
+ return ((0, jsx_runtime_1.jsx)("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z" }) }));
7
+ };
8
+ exports.Plus = Plus;
@@ -3,7 +3,7 @@ export declare const TIMELINE_MIN_ZOOM = 1;
3
3
  export declare const TIMELINE_MAX_ZOOM = 5;
4
4
  export declare const TimelineZoomCtx: React.Context<{
5
5
  zoom: number;
6
- setZoom: React.Dispatch<React.SetStateAction<number>>;
6
+ setZoom: (prev: (prevZoom: number) => number) => void;
7
7
  }>;
8
8
  export declare const TimelineZoomContext: React.FC<{
9
9
  children: React.ReactNode;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelineZoomContext = exports.TimelineZoomCtx = exports.TIMELINE_MAX_ZOOM = exports.TIMELINE_MIN_ZOOM = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const imperative_state_1 = require("../components/Timeline/imperative-state");
7
+ const timeline_scroll_logic_1 = require("../components/Timeline/timeline-scroll-logic");
6
8
  exports.TIMELINE_MIN_ZOOM = 1;
7
9
  exports.TIMELINE_MAX_ZOOM = 5;
8
10
  exports.TimelineZoomCtx = (0, react_1.createContext)({
@@ -16,7 +18,19 @@ const TimelineZoomContext = ({ children }) => {
16
18
  const value = (0, react_1.useMemo)(() => {
17
19
  return {
18
20
  zoom,
19
- setZoom,
21
+ setZoom: (callback) => {
22
+ setZoom((prevZoom) => {
23
+ const newZoomWithFloatingPointErrors = Math.min(exports.TIMELINE_MAX_ZOOM, Math.max(exports.TIMELINE_MIN_ZOOM, callback(prevZoom)));
24
+ const newZoom = Math.round(newZoomWithFloatingPointErrors * 10) / 10;
25
+ (0, timeline_scroll_logic_1.zoomAndPreserveCursor)({
26
+ oldZoom: prevZoom,
27
+ newZoom,
28
+ currentDurationInFrames: (0, imperative_state_1.getCurrentDuration)(),
29
+ currentFrame: (0, imperative_state_1.getCurrentFrame)(),
30
+ });
31
+ return newZoom;
32
+ });
33
+ },
20
34
  };
21
35
  }, [zoom]);
22
36
  return ((0, jsx_runtime_1.jsx)(exports.TimelineZoomCtx.Provider, { value: value, children: children }));
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleCommonError = void 0;
4
+ const chalk_1 = require("./chalk");
4
5
  const log_1 = require("./log");
5
6
  const print_error_1 = require("./print-error");
6
7
  const handleCommonError = async (err) => {
@@ -21,5 +22,9 @@ const handleCommonError = async (err) => {
21
22
  log_1.Log.info();
22
23
  log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
23
24
  }
25
+ if (err.message.includes('The bucket does not allow ACLs')) {
26
+ log_1.Log.info();
27
+ log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
28
+ }
24
29
  };
25
30
  exports.handleCommonError = handleCommonError;
@@ -3,4 +3,5 @@ export declare const Button: React.FC<{
3
3
  onClick: () => void;
4
4
  disabled?: boolean;
5
5
  children: React.ReactNode;
6
+ style?: React.CSSProperties;
6
7
  }>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Button = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
5
6
  const colors_1 = require("../../../editor/helpers/colors");
6
7
  const button = {
7
8
  border: `1px solid ${colors_1.INPUT_BORDER_COLOR_UNHOVERED}`,
@@ -18,7 +19,13 @@ const buttonContainer = {
18
19
  cursor: 'pointer',
19
20
  fontSize: 14,
20
21
  };
21
- const Button = ({ children, onClick, disabled }) => {
22
- return ((0, jsx_runtime_1.jsx)("button", { style: button, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { style: buttonContainer, children: children }) }));
22
+ const Button = ({ children, onClick, disabled, style }) => {
23
+ const combined = (0, react_1.useMemo)(() => {
24
+ return {
25
+ ...button,
26
+ ...(style !== null && style !== void 0 ? style : {}),
27
+ };
28
+ }, [style]);
29
+ return ((0, jsx_runtime_1.jsx)("button", { style: combined, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { style: buttonContainer, children: children }) }));
23
30
  };
24
31
  exports.Button = Button;
@@ -6,6 +6,10 @@ const react_1 = require("react");
6
6
  const use_keybinding_1 = require("../../../editor/helpers/use-keybinding");
7
7
  const Button_1 = require("./Button");
8
8
  const ShortcutHint_1 = require("./ShortcutHint");
9
+ const buttonStyle = {
10
+ backgroundColor: 'var(--blue)',
11
+ color: 'white',
12
+ };
9
13
  const HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
10
14
  const openLink = (0, react_1.useCallback)(() => {
11
15
  window.open(link.url, '_blank');
@@ -26,6 +30,6 @@ const HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
26
30
  });
27
31
  return () => unregister();
28
32
  }, [canHaveKeyboardShortcuts, openLink, registerKeybinding]);
29
- return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: openLink, children: ["Help: ", '"', link.title, '"', canHaveKeyboardShortcuts ? ((0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "h", cmdOrCtrl: true })) : null] }));
33
+ return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { style: buttonStyle, onClick: openLink, children: ["Help: ", '"', link.title, '"', canHaveKeyboardShortcuts ? ((0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "h", cmdOrCtrl: true })) : null] }));
30
34
  };
31
35
  exports.HelpLink = HelpLink;
@@ -14,6 +14,30 @@ const getHelpLink = (message) => {
14
14
  url: 'https://remotion.dev/docs/wrong-composition-mount',
15
15
  };
16
16
  }
17
+ if (message.includes('https://remotion.dev/docs/staticfile-relative-paths')) {
18
+ return {
19
+ title: 'staticFile() relative paths',
20
+ url: 'https://remotion.dev/docs/staticfile-relative-paths',
21
+ };
22
+ }
23
+ if (message.includes('https://remotion.dev/docs/staticfile-remote-urls')) {
24
+ return {
25
+ title: 'staticFile() remote URLs',
26
+ url: 'https://remotion.dev/docs/staticfile-remote-urls',
27
+ };
28
+ }
29
+ if (message.includes('https://remotion.dev/docs/non-seekable-media')) {
30
+ return {
31
+ title: 'Non-seekable media',
32
+ url: 'https://remotion.dev/docs/non-seekable-media',
33
+ };
34
+ }
35
+ if (message.includes('https://remotion.dev/docs/media-playback-error')) {
36
+ return {
37
+ title: 'Media playback error',
38
+ url: 'https://remotion.dev/docs/media-playback-error',
39
+ };
40
+ }
17
41
  return null;
18
42
  };
19
43
  exports.getHelpLink = getHelpLink;
@@ -13,6 +13,10 @@ const makeLiveEventsRouter = () => {
13
13
  'cache-control': 'no-cache',
14
14
  };
15
15
  response.writeHead(200, headers);
16
+ if (request.method === 'OPTIONS') {
17
+ response.end();
18
+ return;
19
+ }
16
20
  response.write(serializeMessage({ type: 'init' }));
17
21
  const clientId = String(Math.random());
18
22
  const newClient = {
@@ -43,7 +43,12 @@ const handleProjectInfo = async (remotionRoot, _, response) => {
43
43
  response.writeHead(200);
44
44
  response.end(JSON.stringify(data));
45
45
  };
46
- const handleFileSource = async (remotionRoot, search, _, response) => {
46
+ const handleFileSource = async ({ method, remotionRoot, search, response, }) => {
47
+ if (method === 'OPTIONS') {
48
+ response.writeHead(200);
49
+ response.end();
50
+ return;
51
+ }
47
52
  if (!search.startsWith('?')) {
48
53
  throw new Error('query must start with ?');
49
54
  }
@@ -58,6 +63,10 @@ const handleFileSource = async (remotionRoot, search, _, response) => {
58
63
  return response.end();
59
64
  };
60
65
  const handleOpenInEditor = async (remotionRoot, req, res) => {
66
+ if (req.method === 'OPTIONS') {
67
+ res.statusCode = 200;
68
+ res.end();
69
+ }
61
70
  try {
62
71
  const b = await new Promise((_resolve) => {
63
72
  let data = '';
@@ -114,7 +123,12 @@ const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, g
114
123
  return handleProjectInfo(remotionRoot, request, response);
115
124
  }
116
125
  if (url.pathname === '/api/file-source') {
117
- return handleFileSource(remotionRoot, url.search, request, response);
126
+ return handleFileSource({
127
+ remotionRoot,
128
+ search: url.search,
129
+ method: request.method,
130
+ response,
131
+ });
118
132
  }
119
133
  if (url.pathname === '/api/open-in-editor') {
120
134
  return handleOpenInEditor(remotionRoot, request, response);
@@ -53,7 +53,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
53
53
  });
54
54
  })
55
55
  .then(() => {
56
- (0, routes_1.handleRoutes)({
56
+ return (0, routes_1.handleRoutes)({
57
57
  hash,
58
58
  hashPrefix,
59
59
  request,
package/dist/upgrade.js CHANGED
@@ -37,6 +37,7 @@ const upgrade = async (remotionRoot) => {
37
37
  '@remotion/eslint-config',
38
38
  '@remotion/renderer',
39
39
  '@remotion/skia',
40
+ '@remotion/lottie',
40
41
  '@remotion/media-utils',
41
42
  '@remotion/babel-loader',
42
43
  '@remotion/lambda',
package/dist/versions.js CHANGED
@@ -16,6 +16,7 @@ const packages = [
16
16
  '@remotion/eslint-config',
17
17
  '@remotion/renderer',
18
18
  '@remotion/skia',
19
+ '@remotion/lottie',
19
20
  '@remotion/media-utils',
20
21
  '@remotion/babel-loader',
21
22
  '@remotion/lambda',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.1.8",
3
+ "version": "3.2.0",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,15 +23,15 @@
23
23
  "author": "Jonny Burger <jonny@remotion.dev>",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
25
25
  "dependencies": {
26
- "@remotion/bundler": "3.1.8",
27
- "@remotion/media-utils": "3.1.8",
28
- "@remotion/player": "3.1.8",
29
- "@remotion/renderer": "3.1.8",
26
+ "@remotion/bundler": "3.2.0",
27
+ "@remotion/media-utils": "3.2.0",
28
+ "@remotion/player": "3.2.0",
29
+ "@remotion/renderer": "3.2.0",
30
30
  "better-opn": "2.1.1",
31
31
  "dotenv": "9.0.2",
32
32
  "memfs": "3.4.3",
33
33
  "minimist": "1.2.6",
34
- "remotion": "3.1.8",
34
+ "remotion": "3.2.0",
35
35
  "semver": "7.3.5",
36
36
  "source-map": "0.6.1"
37
37
  },
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "57f34a02b0f830053f92af426a6b70b6824f887e"
74
+ "gitHead": "47b188161a9e922a247eaa998e72d37af9137707"
75
75
  }
@@ -1,2 +0,0 @@
1
- import { RenderStep } from './step';
2
- export declare const bundleOnCli: (fullPath: string, steps: RenderStep[]) => Promise<string>;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bundleOnCli = void 0;
4
- const bundler_1 = require("@remotion/bundler");
5
- const remotion_1 = require("remotion");
6
- const log_1 = require("./log");
7
- const parse_command_line_1 = require("./parse-command-line");
8
- const progress_bar_1 = require("./progress-bar");
9
- const bundleOnCli = async (fullPath, steps) => {
10
- var _a;
11
- const shouldCache = remotion_1.Internals.getWebpackCaching();
12
- const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists('production', null);
13
- if (cacheExistedBefore && !shouldCache) {
14
- log_1.Log.info('🧹 Cache disabled but found. Deleting... ');
15
- await bundler_1.BundlerInternals.clearCache('production', null);
16
- }
17
- const bundleStartTime = Date.now();
18
- const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
19
- const bundled = await (0, bundler_1.bundle)(fullPath, (progress) => {
20
- bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
21
- progress: progress / 100,
22
- steps,
23
- doneIn: null,
24
- }));
25
- }, {
26
- enableCaching: shouldCache,
27
- webpackOverride: (_a = remotion_1.Internals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : remotion_1.Internals.defaultOverrideFunction,
28
- });
29
- bundlingProgress.update((0, progress_bar_1.makeBundlingProgress)({
30
- progress: 1,
31
- steps,
32
- doneIn: Date.now() - bundleStartTime,
33
- }) + '\n');
34
- log_1.Log.verbose('Bundled under', bundled);
35
- const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists('production', null);
36
- if (cacheExistedAfter && !cacheExistedBefore) {
37
- log_1.Log.info('⚡️ Cached bundle. Subsequent renders will be faster.');
38
- }
39
- return bundled;
40
- };
41
- exports.bundleOnCli = bundleOnCli;
package/dist/bundle.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const bundleCommand: () => Promise<void>;
package/dist/bundle.js DELETED
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bundleCommand = void 0;
4
- const get_cli_options_1 = require("./get-cli-options");
5
- const initialize_render_cli_1 = require("./initialize-render-cli");
6
- const log_1 = require("./log");
7
- const parse_command_line_1 = require("./parse-command-line");
8
- const prepare_entry_point_1 = require("./prepare-entry-point");
9
- const bundleCommand = async () => {
10
- const file = parse_command_line_1.parsedCli._[1];
11
- if (!file) {
12
- log_1.Log.error('No entry point specified. Pass more arguments:');
13
- log_1.Log.error(' npx remotion bundle [entry-point]');
14
- log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
15
- process.exit(1);
16
- }
17
- await (0, initialize_render_cli_1.initializeRenderCli)('bundle');
18
- const { publicPath, bundleOutDir } = await (0, get_cli_options_1.getCliOptions)({
19
- isLambda: false,
20
- type: 'get-compositions-or-bundle',
21
- });
22
- const { urlOrBundle } = await (0, prepare_entry_point_1.prepareEntryPoint)({
23
- file,
24
- otherSteps: [],
25
- outDir: bundleOutDir,
26
- publicPath,
27
- });
28
- log_1.Log.info();
29
- log_1.Log.info(urlOrBundle);
30
- };
31
- exports.bundleCommand = bundleCommand;
@@ -1,111 +0,0 @@
1
- declare const isHyper: boolean;
2
- declare const isWindows: boolean;
3
- declare const isLinux: boolean;
4
- declare const common: {
5
- ballotDisabled: string;
6
- ballotOff: string;
7
- ballotOn: string;
8
- bullet: string;
9
- bulletWhite: string;
10
- fullBlock: string;
11
- heart: string;
12
- identicalTo: string;
13
- line: string;
14
- mark: string;
15
- middot: string;
16
- minus: string;
17
- multiplication: string;
18
- obelus: string;
19
- pencilDownRight: string;
20
- pencilRight: string;
21
- pencilUpRight: string;
22
- percent: string;
23
- pilcrow2: string;
24
- pilcrow: string;
25
- plusMinus: string;
26
- question: string;
27
- section: string;
28
- starsOff: string;
29
- starsOn: string;
30
- upDownArrow: string;
31
- };
32
- declare const windows: {
33
- check: string;
34
- cross: string;
35
- ellipsisLarge: string;
36
- ellipsis: string;
37
- info: string;
38
- questionSmall: string;
39
- pointer: string;
40
- pointerSmall: string;
41
- radioOff: string;
42
- radioOn: string;
43
- warning: string;
44
- ballotDisabled: string;
45
- ballotOff: string;
46
- ballotOn: string;
47
- bullet: string;
48
- bulletWhite: string;
49
- fullBlock: string;
50
- heart: string;
51
- identicalTo: string;
52
- line: string;
53
- mark: string;
54
- middot: string;
55
- minus: string;
56
- multiplication: string;
57
- obelus: string;
58
- pencilDownRight: string;
59
- pencilRight: string;
60
- pencilUpRight: string;
61
- percent: string;
62
- pilcrow2: string;
63
- pilcrow: string;
64
- plusMinus: string;
65
- question: string;
66
- section: string;
67
- starsOff: string;
68
- starsOn: string;
69
- upDownArrow: string;
70
- };
71
- declare const other: {
72
- ballotCross: string;
73
- check: string;
74
- cross: string;
75
- ellipsisLarge: string;
76
- ellipsis: string;
77
- info: string;
78
- questionFull: string;
79
- questionSmall: string;
80
- pointer: string;
81
- pointerSmall: string;
82
- radioOff: string;
83
- radioOn: string;
84
- warning: string;
85
- ballotDisabled: string;
86
- ballotOff: string;
87
- ballotOn: string;
88
- bullet: string;
89
- bulletWhite: string;
90
- fullBlock: string;
91
- heart: string;
92
- identicalTo: string;
93
- line: string;
94
- mark: string;
95
- middot: string;
96
- minus: string;
97
- multiplication: string;
98
- obelus: string;
99
- pencilDownRight: string;
100
- pencilRight: string;
101
- pencilUpRight: string;
102
- percent: string;
103
- pilcrow2: string;
104
- pilcrow: string;
105
- plusMinus: string;
106
- question: string;
107
- section: string;
108
- starsOff: string;
109
- starsOn: string;
110
- upDownArrow: string;
111
- };
@@ -1,75 +0,0 @@
1
- 'use strict';
2
- const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
3
- const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
4
- const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
5
- const common = {
6
- ballotDisabled: '☒',
7
- ballotOff: '☐',
8
- ballotOn: '☑',
9
- bullet: '•',
10
- bulletWhite: '◦',
11
- fullBlock: '█',
12
- heart: '❤',
13
- identicalTo: '≡',
14
- line: '─',
15
- mark: '※',
16
- middot: '·',
17
- minus: '-',
18
- multiplication: '×',
19
- obelus: '÷',
20
- pencilDownRight: '✎',
21
- pencilRight: '✏',
22
- pencilUpRight: '✐',
23
- percent: '%',
24
- pilcrow2: '❡',
25
- pilcrow: '¶',
26
- plusMinus: '±',
27
- question: '?',
28
- section: '§',
29
- starsOff: '☆',
30
- starsOn: '★',
31
- upDownArrow: '↕',
32
- };
33
- const windows = {
34
- ...common,
35
- check: '√',
36
- cross: '×',
37
- ellipsisLarge: '...',
38
- ellipsis: '...',
39
- info: 'i',
40
- questionSmall: '?',
41
- pointer: '>',
42
- pointerSmall: '»',
43
- radioOff: '( )',
44
- radioOn: '(*)',
45
- warning: '‼',
46
- };
47
- const other = {
48
- ...common,
49
- ballotCross: '✘',
50
- check: '✔',
51
- cross: '✖',
52
- ellipsisLarge: '⋯',
53
- ellipsis: '…',
54
- info: 'ℹ',
55
- questionFull: '?',
56
- questionSmall: '﹖',
57
- pointer: isLinux ? '▸' : '❯',
58
- pointerSmall: isLinux ? '‣' : '›',
59
- radioOff: '◯',
60
- radioOn: '◉',
61
- warning: '⚠',
62
- };
63
- module.exports = isWindows && !isHyper ? windows : other;
64
- Reflect.defineProperty(module.exports, 'common', {
65
- enumerable: false,
66
- value: common,
67
- });
68
- Reflect.defineProperty(module.exports, 'windows', {
69
- enumerable: false,
70
- value: windows,
71
- });
72
- Reflect.defineProperty(module.exports, 'other', {
73
- enumerable: false,
74
- value: other,
75
- });
@@ -1,2 +0,0 @@
1
- export declare function stringReplaceAll(string: string, substring: string, replacer: string): string;
2
- export declare function stringEncaseCRLFWithFirstIndex(string: string, prefix: string, postfix: string, index: number): string;