@remotion/cli 4.0.0-alpha11 → 4.0.0-alpha13

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 (66) hide show
  1. package/dist/config/image-format.d.ts +1 -1
  2. package/dist/config/index.d.ts +1 -1
  3. package/dist/config/max-timeline-tracks.js +2 -1
  4. package/dist/editor/components/AudioWaveform.d.ts +0 -1
  5. package/dist/editor/components/AudioWaveform.js +11 -6
  6. package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
  7. package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
  8. package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
  9. package/dist/editor/components/RenderModal/RenderModalData.d.ts +2 -3
  10. package/dist/editor/components/RenderModal/RenderModalData.js +34 -23
  11. package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
  12. package/dist/editor/components/Splitter/SplitterContainer.js +1 -0
  13. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
  14. package/dist/editor/components/Timeline/MaxTimelineTracks.js +3 -2
  15. package/dist/editor/components/Timeline/Timeline.js +4 -5
  16. package/dist/editor/components/Timeline/TimelineDragHandler.js +26 -11
  17. package/dist/editor/components/Timeline/TimelineInOutPointer.js +7 -5
  18. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +9 -3
  19. package/dist/editor/components/Timeline/TimelineSequence.d.ts +0 -1
  20. package/dist/editor/components/Timeline/TimelineSequence.js +23 -21
  21. package/dist/editor/components/Timeline/TimelineSlider.js +17 -4
  22. package/dist/editor/components/Timeline/TimelineTimeIndicators.js +21 -23
  23. package/dist/editor/components/Timeline/TimelineTracks.d.ts +0 -1
  24. package/dist/editor/components/Timeline/TimelineTracks.js +2 -2
  25. package/dist/editor/components/Timeline/TimelineWidthProvider.d.ts +7 -0
  26. package/dist/editor/components/Timeline/TimelineWidthProvider.js +17 -0
  27. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +0 -4
  28. package/dist/editor/helpers/get-left-of-timeline-slider.js +1 -24
  29. package/dist/get-cli-options.d.ts +1 -1
  30. package/dist/index.d.ts +5 -5
  31. package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
  32. package/dist/preview-server/start-server.js +4 -4
  33. package/dist/preview.js +0 -2
  34. package/package.json +8 -8
  35. package/dist/ansi/ansi-regex.d.ts +0 -2
  36. package/dist/ansi/ansi-regex.js +0 -18
  37. package/dist/config/ffmpeg-executable.d.ts +0 -5
  38. package/dist/config/ffmpeg-executable.js +0 -21
  39. package/dist/config/quality.d.ts +0 -2
  40. package/dist/config/quality.js +0 -17
  41. package/dist/editor/components/ClipboardIcon.d.ts +0 -2
  42. package/dist/editor/components/ClipboardIcon.js +0 -12
  43. package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
  44. package/dist/editor/components/CollapsedCompositionSelector.js +0 -39
  45. package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
  46. package/dist/editor/components/RichTimelineToggle.js +0 -29
  47. package/dist/editor/components/Thumbnail.d.ts +0 -8
  48. package/dist/editor/components/Thumbnail.js +0 -76
  49. package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
  50. package/dist/editor/helpers/use-compact-ui.js +0 -18
  51. package/dist/editor/icons/film.d.ts +0 -3
  52. package/dist/editor/icons/film.js +0 -8
  53. package/dist/editor/icons/timeline.d.ts +0 -3
  54. package/dist/editor/icons/timeline.js +0 -9
  55. package/dist/editor/state/rich-timeline.d.ts +0 -9
  56. package/dist/editor/state/rich-timeline.js +0 -17
  57. package/dist/get-render-media-options.d.ts +0 -8
  58. package/dist/get-render-media-options.js +0 -55
  59. package/dist/install.d.ts +0 -2
  60. package/dist/install.js +0 -36
  61. package/dist/is-javascript.d.ts +0 -2
  62. package/dist/is-javascript.js +0 -9
  63. package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -1
  64. package/dist/preview-server/dev-middleware/is-color-supported.js +0 -37
  65. package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -1
  66. package/dist/preview-server/hot-middleware/strip-ansi.js +0 -21
@@ -8,6 +8,7 @@ const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timelin
8
8
  const imperative_state_1 = require("./imperative-state");
9
9
  const timeline_refs_1 = require("./timeline-refs");
10
10
  const TimelineSliderHandle_1 = require("./TimelineSliderHandle");
11
+ const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
11
12
  const container = {
12
13
  position: 'absolute',
13
14
  bottom: 0,
@@ -22,16 +23,29 @@ const line = {
22
23
  };
23
24
  exports.redrawTimelineSliderFast = (0, react_1.createRef)();
24
25
  const TimelineSlider = () => {
26
+ const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
27
+ const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
28
+ if (videoConfig === null || timelineWidth === null) {
29
+ return null;
30
+ }
31
+ return (0, jsx_runtime_1.jsx)(Inner, {});
32
+ };
33
+ exports.TimelineSlider = TimelineSlider;
34
+ const Inner = () => {
35
+ const videoConfig = (0, remotion_1.useVideoConfig)();
25
36
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
26
- const { get } = (0, get_left_of_timeline_slider_1.useGetXPositionOfItemInTimeline)();
27
37
  const ref = (0, react_1.useRef)(null);
38
+ const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
39
+ if (timelineWidth === null) {
40
+ throw new Error('Unexpectedly did not have timeline width');
41
+ }
28
42
  const style = (0, react_1.useMemo)(() => {
29
- const left = get(timelinePosition);
43
+ const left = (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(timelinePosition, videoConfig.durationInFrames, timelineWidth);
30
44
  return {
31
45
  ...container,
32
46
  transform: `translateX(${left}px)`,
33
47
  };
34
- }, [timelinePosition, get]);
48
+ }, [timelinePosition, videoConfig.durationInFrames, timelineWidth]);
35
49
  (0, react_1.useImperativeHandle)(exports.redrawTimelineSliderFast, () => {
36
50
  return {
37
51
  draw: (frame, width) => {
@@ -63,4 +77,3 @@ const TimelineSlider = () => {
63
77
  }, []);
64
78
  return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, style: style, children: [(0, jsx_runtime_1.jsx)("div", { style: line }), (0, jsx_runtime_1.jsx)(TimelineSliderHandle_1.TimelineSliderHandle, {})] }));
65
79
  };
66
- exports.TimelineSlider = TimelineSlider;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelineTimeIndicators = exports.TimelineTimePadding = exports.TimelineTimePlaceholders = exports.TIMELINE_TIME_INDICATOR_HEIGHT = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const player_1 = require("@remotion/player");
6
5
  const react_1 = require("react");
7
6
  const remotion_1 = require("remotion");
8
7
  const colors_1 = require("../../helpers/colors");
@@ -12,6 +11,7 @@ const TimeValue_1 = require("../TimeValue");
12
11
  const timeline_refs_1 = require("./timeline-refs");
13
12
  const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
14
13
  const TimelineListItem_1 = require("./TimelineListItem");
14
+ const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
15
15
  exports.TIMELINE_TIME_INDICATOR_HEIGHT = 30;
16
16
  const container = {
17
17
  height: exports.TIMELINE_TIME_INDICATOR_HEIGHT - 4,
@@ -77,13 +77,18 @@ const TimelineTimePadding = () => {
77
77
  };
78
78
  exports.TimelineTimePadding = TimelineTimePadding;
79
79
  const TimelineTimeIndicators = () => {
80
- var _a;
81
- const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
82
- triggerOnWindowResize: false,
83
- shouldApplyCssTransforms: true,
84
- });
80
+ const sliderTrack = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
85
81
  const video = remotion_1.Internals.useVideo();
86
- const windowWidth = (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : 0;
82
+ if (sliderTrack === null) {
83
+ return null;
84
+ }
85
+ if (video === null) {
86
+ return null;
87
+ }
88
+ return ((0, jsx_runtime_1.jsx)(Inner, { durationInFrames: video.durationInFrames, fps: video.fps, windowWidth: sliderTrack }));
89
+ };
90
+ exports.TimelineTimeIndicators = TimelineTimeIndicators;
91
+ const Inner = ({ windowWidth, durationInFrames, fps }) => {
87
92
  const ref = (0, react_1.useRef)(null);
88
93
  (0, react_1.useEffect)(() => {
89
94
  const currentRef = ref.current;
@@ -110,29 +115,26 @@ const TimelineTimeIndicators = () => {
110
115
  };
111
116
  }, [windowWidth]);
112
117
  const ticks = (0, react_1.useMemo)(() => {
113
- if (!video) {
114
- return [];
115
- }
116
- const frameInterval = (0, timeline_scroll_logic_1.getFrameIncrementFromWidth)(video.durationInFrames, windowWidth);
118
+ const frameInterval = (0, timeline_scroll_logic_1.getFrameIncrementFromWidth)(durationInFrames, windowWidth);
117
119
  const MIN_SPACING_BETWEEN_TICKS_PX = 5;
118
- const seconds = Math.floor(video.durationInFrames / video.fps);
119
- const secondMarkerEveryNth = Math.ceil((MIN_SPACING_BETWEEN_TICKS_PX * video.fps) / (frameInterval * video.fps));
120
+ const seconds = Math.floor(durationInFrames / fps);
121
+ const secondMarkerEveryNth = Math.ceil((MIN_SPACING_BETWEEN_TICKS_PX * fps) / (frameInterval * fps));
120
122
  const frameMarkerEveryNth = Math.ceil(MIN_SPACING_BETWEEN_TICKS_PX / frameInterval);
121
123
  // Big ticks showing for every second
122
124
  const secondTicks = new Array(seconds)
123
125
  .fill(true)
124
126
  .map((_, index) => {
125
127
  return {
126
- frame: index * video.fps,
128
+ frame: index * fps,
127
129
  style: {
128
130
  ...secondTick,
129
- left: frameInterval * index * video.fps + timeline_layout_1.TIMELINE_PADDING,
131
+ left: frameInterval * index * fps + timeline_layout_1.TIMELINE_PADDING,
130
132
  },
131
133
  showTime: index > 0,
132
134
  };
133
135
  })
134
136
  .filter((_, idx) => idx % secondMarkerEveryNth === 0);
135
- const frameTicks = new Array(video.durationInFrames)
137
+ const frameTicks = new Array(durationInFrames)
136
138
  .fill(true)
137
139
  .map((_, index) => {
138
140
  return {
@@ -140,7 +142,7 @@ const TimelineTimeIndicators = () => {
140
142
  style: {
141
143
  ...tick,
142
144
  left: frameInterval * index + timeline_layout_1.TIMELINE_PADDING,
143
- height: index % video.fps === 0
145
+ height: index % fps === 0
144
146
  ? 10
145
147
  : (index / frameMarkerEveryNth) % 2 === 0
146
148
  ? 5
@@ -157,12 +159,8 @@ const TimelineTimeIndicators = () => {
157
159
  hasTicks.push(t.frame);
158
160
  return !alreadyUsed;
159
161
  });
160
- }, [video, windowWidth]);
161
- if (!video) {
162
- return null;
163
- }
162
+ }, [durationInFrames, fps, windowWidth]);
164
163
  return ((0, jsx_runtime_1.jsx)("div", { ref: ref, style: style, children: ticks.map((t) => {
165
- return ((0, jsx_runtime_1.jsx)("div", { style: t.style, children: t.showTime ? ((0, jsx_runtime_1.jsx)("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame, video.fps) })) : null }, t.frame));
164
+ return ((0, jsx_runtime_1.jsx)("div", { style: t.style, children: t.showTime ? ((0, jsx_runtime_1.jsx)("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame, fps) })) : null }, t.frame));
166
165
  }) }));
167
166
  };
168
- exports.TimelineTimeIndicators = TimelineTimeIndicators;
@@ -3,7 +3,6 @@ import type { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key
3
3
  import type { TimelineViewState } from './timeline-state-reducer';
4
4
  export declare const TimelineTracks: React.FC<{
5
5
  timeline: TrackWithHash[];
6
- fps: number;
7
6
  viewState: TimelineViewState;
8
7
  hasBeenCut: boolean;
9
8
  }>;
@@ -15,7 +15,7 @@ const content = {
15
15
  const timelineContent = {
16
16
  minHeight: '100%',
17
17
  };
18
- const TimelineTracks = ({ timeline, fps, viewState, hasBeenCut }) => {
18
+ const TimelineTracks = ({ timeline, viewState, hasBeenCut }) => {
19
19
  const inner = (0, react_1.useMemo)(() => {
20
20
  return {
21
21
  height: timeline_layout_1.TIMELINE_LAYER_HEIGHT + timeline_layout_1.TIMELINE_BORDER * 2,
@@ -31,7 +31,7 @@ const TimelineTracks = ({ timeline, fps, viewState, hasBeenCut }) => {
31
31
  if ((0, is_collapsed_1.isTrackHidden)(track, timeline, viewState)) {
32
32
  return null;
33
33
  }
34
- return ((0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(TimelineSequence_1.TimelineSequence, { fps: fps, s: track.sequence }) }, track.sequence.id));
34
+ return ((0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }, track.sequence.id));
35
35
  }), (0, jsx_runtime_1.jsx)(TimelineTimeIndicators_1.TimelineTimeIndicators, {})] }), hasBeenCut ? (0, jsx_runtime_1.jsx)(MaxTimelineTracks_1.MaxTimelineTracksReached, {}) : null] }));
36
36
  };
37
37
  exports.TimelineTracks = TimelineTracks;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare type TimelineWidthContextType = number | null;
3
+ export declare const TimelineWidthContext: import("react").Context<TimelineWidthContextType>;
4
+ export declare const TimelineWidthProvider: React.FC<{
5
+ children: React.ReactNode;
6
+ }>;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineWidthProvider = exports.TimelineWidthContext = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const player_1 = require("@remotion/player");
6
+ const react_1 = require("react");
7
+ const timeline_refs_1 = require("./timeline-refs");
8
+ exports.TimelineWidthContext = (0, react_1.createContext)(null);
9
+ const TimelineWidthProvider = ({ children }) => {
10
+ var _a;
11
+ const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
12
+ triggerOnWindowResize: false,
13
+ shouldApplyCssTransforms: true,
14
+ });
15
+ return ((0, jsx_runtime_1.jsx)(exports.TimelineWidthContext.Provider, { value: (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : null, children: children }));
16
+ };
17
+ exports.TimelineWidthProvider = TimelineWidthProvider;
@@ -1,5 +1 @@
1
- export declare const useGetXPositionOfItemInTimeline: () => {
2
- get: (frame: number) => number;
3
- width: number;
4
- };
5
1
  export declare const getXPositionOfItemInTimelineImperatively: (frame: number, duration: number, width: number) => number;
@@ -1,30 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getXPositionOfItemInTimelineImperatively = exports.useGetXPositionOfItemInTimeline = void 0;
4
- const player_1 = require("@remotion/player");
5
- const react_1 = require("react");
6
- const remotion_1 = require("remotion");
7
- const timeline_refs_1 = require("../components/Timeline/timeline-refs");
3
+ exports.getXPositionOfItemInTimelineImperatively = void 0;
8
4
  const timeline_layout_1 = require("./timeline-layout");
9
- const useGetXPositionOfItemInTimeline = () => {
10
- var _a;
11
- const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
12
- triggerOnWindowResize: false,
13
- shouldApplyCssTransforms: true,
14
- });
15
- const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
16
- const width = (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : 0;
17
- const get = (0, react_1.useCallback)((frame) => {
18
- if (!videoConfig) {
19
- return 0;
20
- }
21
- return (0, exports.getXPositionOfItemInTimelineImperatively)(frame, videoConfig.durationInFrames, width);
22
- }, [videoConfig, width]);
23
- return (0, react_1.useMemo)(() => {
24
- return { get, width };
25
- }, [get, width]);
26
- };
27
- exports.useGetXPositionOfItemInTimeline = useGetXPositionOfItemInTimeline;
28
5
  const getXPositionOfItemInTimelineImperatively = (frame, duration, width) => {
29
6
  const proportion = frame / (duration - 1);
30
7
  return proportion * (width - timeline_layout_1.TIMELINE_PADDING * 2) + timeline_layout_1.TIMELINE_PADDING;
@@ -33,5 +33,5 @@ export declare const getCliOptions: (options: {
33
33
  videoBitrate: string | null;
34
34
  height: number | null;
35
35
  width: number | null;
36
- configFileImageFormat: "png" | "jpeg" | "none" | undefined;
36
+ configFileImageFormat: "none" | "png" | "jpeg" | undefined;
37
37
  }>;
package/dist/index.d.ts CHANGED
@@ -111,7 +111,7 @@ export declare const CliInternals: {
111
111
  videoBitrate: string | null;
112
112
  height: number | null;
113
113
  width: number | null;
114
- configFileImageFormat: "png" | "jpeg" | "none" | undefined;
114
+ configFileImageFormat: "none" | "png" | "jpeg" | undefined;
115
115
  }>;
116
116
  loadConfig: (remotionRoot: string) => Promise<string | null>;
117
117
  initializeCli: (remotionRoot: string) => Promise<void>;
@@ -120,7 +120,7 @@ export declare const CliInternals: {
120
120
  parsedCli: {
121
121
  "browser-executable": import("@remotion/renderer").BrowserExecutable;
122
122
  "pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
123
- "image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
123
+ "image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
124
124
  "prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
125
125
  "bundle-cache": string;
126
126
  "env-file": string;
@@ -184,7 +184,7 @@ export declare const CliInternals: {
184
184
  downloadName: string | null;
185
185
  outName: string | null;
186
186
  configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
187
- cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
187
+ cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
188
188
  isLambda: boolean;
189
189
  fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
190
190
  }) => {
@@ -199,8 +199,8 @@ export declare const CliInternals: {
199
199
  };
200
200
  getVideoImageFormat: ({ codec, uiImageFormat, }: {
201
201
  codec: import("@remotion/renderer").CodecOrUndefined;
202
- uiImageFormat: "png" | "jpeg" | "none" | null;
203
- }) => "png" | "jpeg" | "none";
202
+ uiImageFormat: "none" | "png" | "jpeg" | null;
203
+ }) => "none" | "png" | "jpeg";
204
204
  printCompositions: (compositions: import("remotion").AnyCompMetadata[]) => void;
205
205
  getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
206
206
  cliFlag: import("@remotion/renderer").CodecOrUndefined;
@@ -11,5 +11,5 @@ declare type Range = {
11
11
  declare type Ranges = Range[] & {
12
12
  type?: string;
13
13
  };
14
- export declare function parseRange(size: number, str: string | string[]): -1 | Ranges | -2;
14
+ export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
15
15
  export {};
@@ -8,21 +8,21 @@ const bundler_1 = require("@remotion/bundler");
8
8
  const renderer_1 = require("@remotion/renderer");
9
9
  const node_http_1 = __importDefault(require("node:http"));
10
10
  const config_1 = require("../config");
11
+ const MaxTimelineTracks_1 = require("../editor/components/Timeline/MaxTimelineTracks");
11
12
  const log_1 = require("../log");
12
13
  const dev_middleware_1 = require("./dev-middleware");
13
14
  const hot_middleware_1 = require("./hot-middleware");
14
15
  const live_events_1 = require("./live-events");
15
16
  const routes_1 = require("./routes");
16
17
  const startServer = async (options) => {
17
- var _a, _b, _c, _d;
18
+ var _a, _b, _c;
18
19
  const [, config] = bundler_1.BundlerInternals.webpackConfig({
19
20
  entry: options.entry,
20
21
  userDefinedComponent: options.userDefinedComponent,
21
22
  outDir: null,
22
23
  environment: 'development',
23
24
  webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getWebpackOverrideFn(),
24
- envVariables: (_b = options === null || options === void 0 ? void 0 : options.getEnvVariables()) !== null && _b !== void 0 ? _b : {},
25
- maxTimelineTracks: (_c = options === null || options === void 0 ? void 0 : options.maxTimelineTracks) !== null && _c !== void 0 ? _c : 15,
25
+ maxTimelineTracks: (_b = options === null || options === void 0 ? void 0 : options.maxTimelineTracks) !== null && _b !== void 0 ? _b : MaxTimelineTracks_1.DEFAULT_TIMELINE_TRACKS,
26
26
  entryPoints: [
27
27
  require.resolve('./hot-middleware/client'),
28
28
  require.resolve('./error-overlay/entry-basic.js'),
@@ -75,7 +75,7 @@ const startServer = async (options) => {
75
75
  }
76
76
  });
77
77
  });
78
- const desiredPort = (_d = options === null || options === void 0 ? void 0 : options.port) !== null && _d !== void 0 ? _d : undefined;
78
+ const desiredPort = (_c = options === null || options === void 0 ? void 0 : options.port) !== null && _c !== void 0 ? _c : undefined;
79
79
  const maxTries = 5;
80
80
  for (let i = 0; i < maxTries; i++) {
81
81
  try {
package/dist/preview.js CHANGED
@@ -20,7 +20,6 @@ const get_absolute_public_dir_1 = require("./preview-server/get-absolute-public-
20
20
  const live_events_1 = require("./preview-server/live-events");
21
21
  const public_folder_1 = require("./preview-server/public-folder");
22
22
  const start_server_1 = require("./preview-server/start-server");
23
- const watch_root_file_1 = require("./watch-root-file");
24
23
  const noop = () => undefined;
25
24
  const getShouldOpenBrowser = () => {
26
25
  var _a;
@@ -99,7 +98,6 @@ const previewCommand = async (remotionRoot, args) => {
99
98
  },
100
99
  staticHash,
101
100
  });
102
- (0, watch_root_file_1.watchRootFile)(remotionRoot);
103
101
  const { port, liveEventsServer } = await (0, start_server_1.startServer)({
104
102
  entry: node_path_1.default.resolve(__dirname, 'previewEntry.js'),
105
103
  userDefinedComponent: fullEntryPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.0-alpha11",
3
+ "version": "4.0.0-alpha13",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -35,11 +35,11 @@
35
35
  "prompts": "2.4.1",
36
36
  "semver": "7.3.5",
37
37
  "source-map": "0.6.1",
38
- "@remotion/bundler": "4.0.0-alpha11",
39
- "@remotion/media-utils": "4.0.0-alpha11",
40
- "@remotion/player": "4.0.0-alpha11",
41
- "@remotion/renderer": "4.0.0-alpha11",
42
- "remotion": "4.0.0-alpha11"
38
+ "@remotion/bundler": "4.0.0-alpha13",
39
+ "@remotion/renderer": "4.0.0-alpha13",
40
+ "@remotion/player": "4.0.0-alpha13",
41
+ "@remotion/media-utils": "4.0.0-alpha13",
42
+ "remotion": "4.0.0-alpha13"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -67,8 +67,8 @@
67
67
  "typescript": "^4.7.0",
68
68
  "vitest": "0.31.1",
69
69
  "zod": "^3.21.4",
70
- "@remotion/tailwind": "4.0.0-alpha11",
71
- "@remotion/zod-types": "4.0.0-alpha11"
70
+ "@remotion/zod-types": "4.0.0-alpha13",
71
+ "@remotion/tailwind": "4.0.0-alpha13"
72
72
  },
73
73
  "keywords": [
74
74
  "remotion",
@@ -1,2 +0,0 @@
1
- export declare const ansiRegex: () => RegExp;
2
- export declare const stripAnsi: (str: string) => string;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripAnsi = exports.ansiRegex = void 0;
4
- const ansiRegex = () => {
5
- const pattern = [
6
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
7
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
8
- ].join('|');
9
- return new RegExp(pattern, 'g');
10
- };
11
- exports.ansiRegex = ansiRegex;
12
- const stripAnsi = (str) => {
13
- if (typeof str !== 'string') {
14
- throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
15
- }
16
- return str.replace((0, exports.ansiRegex)(), '');
17
- };
18
- exports.stripAnsi = stripAnsi;
@@ -1,5 +0,0 @@
1
- import type { FfmpegExecutable } from '@remotion/renderer';
2
- export declare const setFfmpegExecutable: (ffmpegPath: FfmpegExecutable) => void;
3
- export declare const getCustomFfmpegExecutable: () => FfmpegExecutable;
4
- export declare const setFfprobeExecutable: (ffprobePath: FfmpegExecutable) => void;
5
- export declare const getCustomFfprobeExecutable: () => FfmpegExecutable;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCustomFfprobeExecutable = exports.setFfprobeExecutable = exports.getCustomFfmpegExecutable = exports.setFfmpegExecutable = void 0;
4
- let currentFfmpegExecutablePath = null;
5
- let currentFfprobeExecutablePath = null;
6
- const setFfmpegExecutable = (ffmpegPath) => {
7
- currentFfmpegExecutablePath = ffmpegPath;
8
- };
9
- exports.setFfmpegExecutable = setFfmpegExecutable;
10
- const getCustomFfmpegExecutable = () => {
11
- return currentFfmpegExecutablePath;
12
- };
13
- exports.getCustomFfmpegExecutable = getCustomFfmpegExecutable;
14
- const setFfprobeExecutable = (ffprobePath) => {
15
- currentFfprobeExecutablePath = ffprobePath;
16
- };
17
- exports.setFfprobeExecutable = setFfprobeExecutable;
18
- const getCustomFfprobeExecutable = () => {
19
- return currentFfprobeExecutablePath;
20
- };
21
- exports.getCustomFfprobeExecutable = getCustomFfprobeExecutable;
@@ -1,2 +0,0 @@
1
- export declare const setQuality: (q: number | undefined) => void;
2
- export declare const getQuality: () => number | undefined;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getQuality = exports.setQuality = void 0;
4
- const renderer_1 = require("@remotion/renderer");
5
- const defaultValue = undefined;
6
- let quality = defaultValue;
7
- const setQuality = (q) => {
8
- renderer_1.RenderInternals.validateQuality(q);
9
- if (q === 0 || q === undefined) {
10
- quality = defaultValue;
11
- return;
12
- }
13
- quality = q;
14
- };
15
- exports.setQuality = setQuality;
16
- const getQuality = () => quality;
17
- exports.getQuality = getQuality;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ClipboardIcon: React.FC;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClipboardIcon = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const ClipboardIcon = () => {
6
- return ((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: {
7
- height: 16,
8
- verticalAlign: 'middle',
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" }) }));
11
- };
12
- exports.ClipboardIcon = ClipboardIcon;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const CollapsedCompositionSelector: React.FC<{
3
- onExpand: () => void;
4
- }>;
@@ -1,39 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const RichTimelineToggle: React.FC;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RichTimelineToggle = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
7
- const timeline_1 = require("../icons/timeline");
8
- const rich_timeline_1 = require("../state/rich-timeline");
9
- const ControlButton_1 = require("./ControlButton");
10
- const tooltip = 'Enable rich timeline. Go to remotion.dev/docs/timeline for more information.';
11
- const RichTimelineToggle = () => {
12
- const { richTimeline, setRichTimeline } = (0, react_1.useContext)(rich_timeline_1.RichTimelineContext);
13
- const isStill = (0, is_current_selected_still_1.useIsStill)();
14
- const onClick = (0, react_1.useCallback)(() => {
15
- setRichTimeline((c) => {
16
- (0, rich_timeline_1.persistRichTimelineOption)(!c);
17
- return !c;
18
- });
19
- }, [setRichTimeline]);
20
- if (isStill) {
21
- return null;
22
- }
23
- return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: tooltip, "aria-label": tooltip, onClick: onClick, children: (0, jsx_runtime_1.jsx)(timeline_1.TimelineIcon, { style: {
24
- width: 16,
25
- height: 16,
26
- color: richTimeline ? 'var(--blue)' : 'white',
27
- } }) }));
28
- };
29
- exports.RichTimelineToggle = RichTimelineToggle;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { TComposition } from 'remotion';
3
- export declare const Thumbnail: React.FC<{
4
- composition: TComposition<unknown>;
5
- targetHeight: number;
6
- targetWidth: number;
7
- frameToDisplay: number;
8
- }>;