@remotion/cli 4.0.0-alpha14 → 4.0.0-alpha16
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.
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +2 -3
- package/dist/editor/components/RenderModal/RenderModalData.js +34 -23
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/preview-server/routes.d.ts +1 -0
- package/dist/preview.js +0 -2
- package/package.json +8 -8
- package/dist/ansi/ansi-regex.d.ts +0 -2
- package/dist/ansi/ansi-regex.js +0 -18
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.js +0 -17
- package/dist/editor/components/ClipboardIcon.d.ts +0 -2
- package/dist/editor/components/ClipboardIcon.js +0 -12
- package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
- package/dist/editor/components/CollapsedCompositionSelector.js +0 -39
- package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
- package/dist/editor/components/RichTimelineToggle.js +0 -29
- package/dist/editor/components/Thumbnail.d.ts +0 -8
- package/dist/editor/components/Thumbnail.js +0 -76
- package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
- package/dist/editor/helpers/use-compact-ui.js +0 -18
- package/dist/editor/icons/film.d.ts +0 -3
- package/dist/editor/icons/film.js +0 -8
- package/dist/editor/icons/timeline.d.ts +0 -3
- package/dist/editor/icons/timeline.js +0 -9
- package/dist/editor/state/rich-timeline.d.ts +0 -9
- package/dist/editor/state/rich-timeline.js +0 -17
- package/dist/get-render-media-options.d.ts +0 -8
- package/dist/get-render-media-options.js +0 -55
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -36
- package/dist/is-javascript.d.ts +0 -2
- package/dist/is-javascript.js +0 -9
- package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -1
- package/dist/preview-server/dev-middleware/is-color-supported.js +0 -37
- package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -1
- package/dist/preview-server/hot-middleware/strip-ansi.js +0 -21
|
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
12
12
|
status: 'error' | 'warning' | 'ok';
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
|
-
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(
|
|
15
|
+
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.05)" | "rgba(0, 0, 0, 0.6)" | "#ff3232" | "#f1c40f";
|
|
16
16
|
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,15 +4,14 @@ export declare type State = {
|
|
|
4
4
|
str: string;
|
|
5
5
|
value: Record<string, unknown>;
|
|
6
6
|
validJSON: true;
|
|
7
|
-
zodValidation: Zod.SafeParseReturnType<unknown, unknown>;
|
|
8
7
|
} | {
|
|
9
8
|
str: string;
|
|
10
9
|
validJSON: false;
|
|
11
10
|
error: string;
|
|
12
11
|
};
|
|
13
12
|
export declare type PropsEditType = 'input-props' | 'default-props';
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
13
|
+
export declare const RenderModalData: React.FC<{
|
|
14
|
+
composition: AnyComposition;
|
|
16
15
|
inputProps: Record<string, unknown>;
|
|
17
16
|
setInputProps: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
|
|
18
17
|
compact: boolean;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.RenderModalData = void 0;
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const remotion_1 = require("remotion");
|
|
@@ -62,7 +62,6 @@ const outer = {
|
|
|
62
62
|
flexDirection: 'column',
|
|
63
63
|
flex: 1,
|
|
64
64
|
overflow: 'hidden',
|
|
65
|
-
backgroundColor: colors_1.BACKGROUND,
|
|
66
65
|
};
|
|
67
66
|
const controlContainer = {
|
|
68
67
|
flexDirection: 'column',
|
|
@@ -77,6 +76,15 @@ const tabWrapper = {
|
|
|
77
76
|
alignItems: 'center',
|
|
78
77
|
};
|
|
79
78
|
const persistanceKey = 'remotion.show-render-modalwarning';
|
|
79
|
+
const parseJSON = (str) => {
|
|
80
|
+
try {
|
|
81
|
+
const value = (0, input_props_serialization_1.deserializeJSONWithCustomFields)(str);
|
|
82
|
+
return { str, value, validJSON: true };
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
return { str, validJSON: false, error: e.message };
|
|
86
|
+
}
|
|
87
|
+
};
|
|
80
88
|
const getPersistedShowWarningState = () => {
|
|
81
89
|
const val = localStorage.getItem(persistanceKey);
|
|
82
90
|
if (!val) {
|
|
@@ -87,7 +95,7 @@ const getPersistedShowWarningState = () => {
|
|
|
87
95
|
const setPersistedShowWarningState = (val) => {
|
|
88
96
|
localStorage.setItem(persistanceKey, String(Boolean(val)));
|
|
89
97
|
};
|
|
90
|
-
const
|
|
98
|
+
const RenderModalData = ({ composition, inputProps, setInputProps, compact, mayShowSaveButton, propsEditType, }) => {
|
|
91
99
|
const [mode, setMode] = (0, react_1.useState)('schema');
|
|
92
100
|
const [valBeforeSafe, setValBeforeSafe] = (0, react_1.useState)(inputProps);
|
|
93
101
|
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
@@ -106,21 +114,21 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
106
114
|
}, [inJSONEditor, inputProps]);
|
|
107
115
|
const cliProps = (0, remotion_1.getInputProps)();
|
|
108
116
|
const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = (0, react_1.useState)({
|
|
109
|
-
[
|
|
117
|
+
[composition.id]: get_render_modal_warnings_1.defaultTypeCanSaveState,
|
|
110
118
|
});
|
|
111
119
|
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
112
120
|
const schema = (0, react_1.useMemo)(() => {
|
|
113
121
|
if (!z) {
|
|
114
122
|
return 'no-zod';
|
|
115
123
|
}
|
|
116
|
-
if (!
|
|
124
|
+
if (!composition.schema) {
|
|
117
125
|
return z.object({});
|
|
118
126
|
}
|
|
119
|
-
if (!(typeof
|
|
127
|
+
if (!(typeof composition.schema.safeParse === 'function')) {
|
|
120
128
|
throw new Error('A value which is not a Zod schema was passed to `schema`');
|
|
121
129
|
}
|
|
122
|
-
return
|
|
123
|
-
}, [
|
|
130
|
+
return composition.schema;
|
|
131
|
+
}, [composition.schema, z]);
|
|
124
132
|
const zodValidationResult = (0, react_1.useMemo)(() => {
|
|
125
133
|
if (schema === 'no-zod') {
|
|
126
134
|
return 'no-zod';
|
|
@@ -138,19 +146,19 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
138
146
|
});
|
|
139
147
|
}, []);
|
|
140
148
|
const canSaveDefaultProps = (0, react_1.useMemo)(() => {
|
|
141
|
-
return canSaveDefaultPropsObjectState[
|
|
142
|
-
? canSaveDefaultPropsObjectState[
|
|
149
|
+
return canSaveDefaultPropsObjectState[composition.id]
|
|
150
|
+
? canSaveDefaultPropsObjectState[composition.id]
|
|
143
151
|
: get_render_modal_warnings_1.defaultTypeCanSaveState;
|
|
144
|
-
}, [canSaveDefaultPropsObjectState,
|
|
152
|
+
}, [canSaveDefaultPropsObjectState, composition.id]);
|
|
145
153
|
const showSaveButton = mayShowSaveButton && canSaveDefaultProps.canUpdate;
|
|
146
154
|
const { fastRefreshes } = (0, react_1.useContext)(remotion_1.Internals.NonceContext);
|
|
147
155
|
(0, react_1.useEffect)(() => {
|
|
148
|
-
(0, actions_1.canUpdateDefaultProps)(
|
|
156
|
+
(0, actions_1.canUpdateDefaultProps)(composition.id)
|
|
149
157
|
.then((can) => {
|
|
150
158
|
if (can.canUpdate) {
|
|
151
159
|
setCanSaveDefaultProps((prevState) => ({
|
|
152
160
|
...prevState,
|
|
153
|
-
[
|
|
161
|
+
[composition.id]: {
|
|
154
162
|
canUpdate: true,
|
|
155
163
|
},
|
|
156
164
|
}));
|
|
@@ -158,7 +166,7 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
158
166
|
else {
|
|
159
167
|
setCanSaveDefaultProps((prevState) => ({
|
|
160
168
|
...prevState,
|
|
161
|
-
[
|
|
169
|
+
[composition.id]: {
|
|
162
170
|
canUpdate: false,
|
|
163
171
|
reason: can.reason,
|
|
164
172
|
determined: true,
|
|
@@ -169,14 +177,14 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
169
177
|
.catch((err) => {
|
|
170
178
|
setCanSaveDefaultProps((prevState) => ({
|
|
171
179
|
...prevState,
|
|
172
|
-
[
|
|
180
|
+
[composition.id]: {
|
|
173
181
|
canUpdate: false,
|
|
174
182
|
reason: err.message,
|
|
175
183
|
determined: true,
|
|
176
184
|
},
|
|
177
185
|
}));
|
|
178
186
|
});
|
|
179
|
-
}, [
|
|
187
|
+
}, [composition.id]);
|
|
180
188
|
const modeItems = (0, react_1.useMemo)(() => {
|
|
181
189
|
return [
|
|
182
190
|
{
|
|
@@ -197,18 +205,21 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
197
205
|
},
|
|
198
206
|
];
|
|
199
207
|
}, [mode]);
|
|
208
|
+
const switchToSchema = (0, react_1.useCallback)(() => {
|
|
209
|
+
setMode('schema');
|
|
210
|
+
}, []);
|
|
200
211
|
const onUpdate = (0, react_1.useCallback)(() => {
|
|
201
212
|
if (schema === 'no-zod' || z === null) {
|
|
202
213
|
(0, NotificationCenter_1.sendErrorNotification)('Cannot update default props: No Zod schema');
|
|
203
214
|
return;
|
|
204
215
|
}
|
|
205
216
|
setValBeforeSafe(inputProps);
|
|
206
|
-
(0, actions_1.updateDefaultProps)(
|
|
217
|
+
(0, actions_1.updateDefaultProps)(composition.id, inputProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, [])).then((response) => {
|
|
207
218
|
if (!response.success) {
|
|
208
219
|
(0, NotificationCenter_1.sendErrorNotification)('Cannot update default props: ' + response.reason);
|
|
209
220
|
}
|
|
210
221
|
});
|
|
211
|
-
}, [
|
|
222
|
+
}, [composition.id, inputProps, schema, z]);
|
|
212
223
|
(0, react_1.useEffect)(() => {
|
|
213
224
|
setSaving(false);
|
|
214
225
|
}, [fastRefreshes]);
|
|
@@ -218,7 +229,7 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
218
229
|
return;
|
|
219
230
|
}
|
|
220
231
|
setSaving(true);
|
|
221
|
-
(0, actions_1.updateDefaultProps)(
|
|
232
|
+
(0, actions_1.updateDefaultProps)(composition.id, updater(composition.defaultProps), (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, []))
|
|
222
233
|
.then((response) => {
|
|
223
234
|
if (!response.success) {
|
|
224
235
|
console.log(response.stack);
|
|
@@ -229,7 +240,7 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
229
240
|
(0, NotificationCenter_1.sendErrorNotification)(`Cannot update default props: ${err.message}`);
|
|
230
241
|
setSaving(false);
|
|
231
242
|
});
|
|
232
|
-
}, [
|
|
243
|
+
}, [composition.defaultProps, composition.id, schema, z]);
|
|
233
244
|
const connectionStatus = (0, react_1.useContext)(client_id_1.PreviewServerConnectionCtx).type;
|
|
234
245
|
const warnings = (0, react_1.useMemo)(() => {
|
|
235
246
|
return (0, get_render_modal_warnings_1.getRenderModalWarnings)({
|
|
@@ -267,11 +278,11 @@ const DataEditor = ({ unresolvedComposition, inputProps, setInputProps, compact,
|
|
|
267
278
|
if (typeName === z.ZodFirstPartyTypeKind.ZodAny) {
|
|
268
279
|
return (0, jsx_runtime_1.jsx)(SchemaErrorMessages_1.NoSchemaDefined, {});
|
|
269
280
|
}
|
|
270
|
-
if (!
|
|
281
|
+
if (!composition.defaultProps) {
|
|
271
282
|
return (0, jsx_runtime_1.jsx)(SchemaErrorMessages_1.NoDefaultProps, {});
|
|
272
283
|
}
|
|
273
284
|
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsxs)("div", { style: controlContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: tabWrapper, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), warnings.length > 0 ? ((0, jsx_runtime_1.jsx)(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: warnings.length })) : null] }), showWarning && warnings.length > 0
|
|
274
285
|
? warnings.map((warning) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: warning, align: "flex-start", type: "warning" })] }, warning)))
|
|
275
|
-
: null] }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: schema, zodValidationResult: zodValidationResult, compact: compact, defaultProps:
|
|
286
|
+
: null] }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: schema, zodValidationResult: zodValidationResult, compact: compact, defaultProps: composition.defaultProps, onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: !zodValidationResult.success })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONPropsEditor_1.RenderModalJSONPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, zodValidationResult: zodValidationResult, switchToSchema: switchToSchema, onSave: onUpdate, valBeforeSafe: valBeforeSafe, showSaveButton: showSaveButton, serializedJSON: serializedJSON, parseJSON: parseJSON }))] }));
|
|
276
287
|
};
|
|
277
|
-
exports.
|
|
288
|
+
exports.RenderModalData = RenderModalData;
|
|
@@ -16,4 +16,4 @@ export declare const BLUE_DISABLED = "#284f73";
|
|
|
16
16
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
17
17
|
selected: boolean;
|
|
18
18
|
hovered: boolean;
|
|
19
|
-
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "
|
|
19
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.25)";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { LiveEventsServer } from './live-events';
|
|
3
4
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
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-
|
|
3
|
+
"version": "4.0.0-alpha16",
|
|
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/
|
|
39
|
-
"
|
|
40
|
-
"remotion": "4.0.0-
|
|
41
|
-
"@remotion/
|
|
42
|
-
"@remotion/player": "4.0.0-
|
|
38
|
+
"@remotion/bundler": "4.0.0-alpha16",
|
|
39
|
+
"remotion": "4.0.0-alpha16",
|
|
40
|
+
"@remotion/renderer": "4.0.0-alpha16",
|
|
41
|
+
"@remotion/media-utils": "4.0.0-alpha16",
|
|
42
|
+
"@remotion/player": "4.0.0-alpha16"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "4.9.5",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.21.4",
|
|
68
|
-
"@remotion/
|
|
69
|
-
"@remotion/
|
|
68
|
+
"@remotion/zod-types": "4.0.0-alpha16",
|
|
69
|
+
"@remotion/tailwind": "4.0.0-alpha16"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|
package/dist/ansi/ansi-regex.js
DELETED
|
@@ -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;
|
package/dist/config/quality.d.ts
DELETED
package/dist/config/quality.js
DELETED
|
@@ -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,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,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,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,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Thumbnail = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
|
-
const checkerboard_background_1 = require("../helpers/checkerboard-background");
|
|
8
|
-
const checkerboard_1 = require("../state/checkerboard");
|
|
9
|
-
const Thumbnail = ({ composition, targetHeight, targetWidth, frameToDisplay }) => {
|
|
10
|
-
const { height, width } = composition;
|
|
11
|
-
const heightRatio = targetHeight / height;
|
|
12
|
-
const widthRatio = targetWidth / width;
|
|
13
|
-
const ratio = Math.min(heightRatio, widthRatio);
|
|
14
|
-
const scale = ratio;
|
|
15
|
-
const actualWidth = width * scale;
|
|
16
|
-
const actualHeight = height * scale;
|
|
17
|
-
const correction = 0 - (1 - scale) / 2;
|
|
18
|
-
const xCorrection = correction * width;
|
|
19
|
-
const yCorrection = correction * height;
|
|
20
|
-
const [thumbnailId] = (0, react_1.useState)(() => String((0, remotion_1.random)(null)));
|
|
21
|
-
const { checkerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
22
|
-
const container = (0, react_1.useMemo)(() => {
|
|
23
|
-
return {
|
|
24
|
-
width: targetWidth,
|
|
25
|
-
height: targetHeight,
|
|
26
|
-
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'center',
|
|
29
|
-
alignItems: 'center',
|
|
30
|
-
};
|
|
31
|
-
}, [targetHeight, targetWidth]);
|
|
32
|
-
const outer = (0, react_1.useMemo)(() => {
|
|
33
|
-
return {
|
|
34
|
-
width: actualWidth,
|
|
35
|
-
height: actualHeight,
|
|
36
|
-
backgroundColor: (0, checkerboard_background_1.checkerboardBackgroundColor)(checkerboard),
|
|
37
|
-
backgroundImage: (0, checkerboard_background_1.checkerboardBackgroundImage)(checkerboard),
|
|
38
|
-
backgroundPosition: (0, checkerboard_background_1.getCheckerboardBackgroundPos)(25),
|
|
39
|
-
backgroundSize: (0, checkerboard_background_1.getCheckerboardBackgroundPos)(25),
|
|
40
|
-
};
|
|
41
|
-
}, [actualHeight, actualWidth, checkerboard]);
|
|
42
|
-
const inner = (0, react_1.useMemo)(() => {
|
|
43
|
-
return {
|
|
44
|
-
width,
|
|
45
|
-
height,
|
|
46
|
-
transform: `scale(${scale}) `,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
marginLeft: xCorrection,
|
|
49
|
-
marginTop: yCorrection,
|
|
50
|
-
display: 'flex',
|
|
51
|
-
color: 'black',
|
|
52
|
-
};
|
|
53
|
-
}, [height, scale, width, xCorrection, yCorrection]);
|
|
54
|
-
const timelineState = (0, react_1.useMemo)(() => {
|
|
55
|
-
return {
|
|
56
|
-
playing: false,
|
|
57
|
-
frame: frameToDisplay,
|
|
58
|
-
rootId: thumbnailId,
|
|
59
|
-
imperativePlaying: {
|
|
60
|
-
current: false,
|
|
61
|
-
},
|
|
62
|
-
playbackRate: 1,
|
|
63
|
-
setPlaybackRate: () => {
|
|
64
|
-
throw new Error('thumbnail');
|
|
65
|
-
},
|
|
66
|
-
audioAndVideoTags: { current: [] },
|
|
67
|
-
};
|
|
68
|
-
}, [frameToDisplay, thumbnailId]);
|
|
69
|
-
const props = (0, react_1.useMemo)(() => {
|
|
70
|
-
var _a;
|
|
71
|
-
return (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {};
|
|
72
|
-
}, [composition.defaultProps]);
|
|
73
|
-
const ThumbnailComponent = composition.component;
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: null, children: (0, jsx_runtime_1.jsx)("div", { style: outer, children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineContext.Provider, { value: timelineState, children: (0, jsx_runtime_1.jsx)(ThumbnailComponent, { ...props }) }) }) }) }) }));
|
|
75
|
-
};
|
|
76
|
-
exports.Thumbnail = Thumbnail;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useCompactUI(): boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCompactUI = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const breakpoint = 1200;
|
|
6
|
-
function useCompactUI() {
|
|
7
|
-
const [compactUI, setCompactUI] = (0, react_1.useState)(window.innerWidth < breakpoint);
|
|
8
|
-
(0, react_1.useEffect)(() => {
|
|
9
|
-
function handleResize() {
|
|
10
|
-
setCompactUI(window.innerWidth < breakpoint);
|
|
11
|
-
}
|
|
12
|
-
window.addEventListener('resize', handleResize);
|
|
13
|
-
handleResize();
|
|
14
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
15
|
-
}, []);
|
|
16
|
-
return compactUI;
|
|
17
|
-
}
|
|
18
|
-
exports.useCompactUI = useCompactUI;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilmIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const FilmIcon = (props) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M488 64h-8v20c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12V64H96v20c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12V64h-8C10.7 64 0 74.7 0 88v336c0 13.3 10.7 24 24 24h8v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h320v-20c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v20h8c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24zM96 372c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12H44c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm280 208c0 6.6-5.4 12-12 12H148c-6.6 0-12-5.4-12-12V124c0-6.6 5.4-12 12-12h216c6.6 0 12 5.4 12 12v264zm104-16c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40zm0-96c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40z" }) }));
|
|
7
|
-
};
|
|
8
|
-
exports.FilmIcon = FilmIcon;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineIcon = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const TimelineIcon = (props) => {
|
|
6
|
-
var _a;
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "stream", className: "svg-inline--fa fa-stream fa-w-16", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: (_a = props.style) === null || _a === void 0 ? void 0 : _a.color, d: "M16 128h416c8.84 0 16-7.16 16-16V48c0-8.84-7.16-16-16-16H16C7.16 32 0 39.16 0 48v64c0 8.84 7.16 16 16 16zm480 80H80c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16zm-64 176H16c-8.84 0-16 7.16-16 16v64c0 8.84 7.16 16 16 16h416c8.84 0 16-7.16 16-16v-64c0-8.84-7.16-16-16-16z" }) }));
|
|
8
|
-
};
|
|
9
|
-
exports.TimelineIcon = TimelineIcon;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare type State = {
|
|
3
|
-
richTimeline: boolean;
|
|
4
|
-
setRichTimeline: (cb: (prevState: boolean) => boolean) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const persistRichTimelineOption: (option: boolean) => void;
|
|
7
|
-
export declare const loadRichTimelineOption: () => boolean;
|
|
8
|
-
export declare const RichTimelineContext: import("react").Context<State>;
|
|
9
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RichTimelineContext = exports.loadRichTimelineOption = exports.persistRichTimelineOption = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const persistRichTimelineOption = (option) => {
|
|
6
|
-
localStorage.setItem('richTimeline', String(option));
|
|
7
|
-
};
|
|
8
|
-
exports.persistRichTimelineOption = persistRichTimelineOption;
|
|
9
|
-
const loadRichTimelineOption = () => {
|
|
10
|
-
const item = localStorage.getItem('richTimeline');
|
|
11
|
-
return item === 'true';
|
|
12
|
-
};
|
|
13
|
-
exports.loadRichTimelineOption = loadRichTimelineOption;
|
|
14
|
-
exports.RichTimelineContext = (0, react_1.createContext)({
|
|
15
|
-
richTimeline: (0, exports.loadRichTimelineOption)(),
|
|
16
|
-
setRichTimeline: () => undefined,
|
|
17
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Codec, RenderMediaOptions } from '@remotion/renderer';
|
|
2
|
-
export declare const getRenderMediaOptions: ({ outputLocation, config, serveUrl, codec, remotionRoot, }: {
|
|
3
|
-
outputLocation: RenderMediaOptions['outputLocation'];
|
|
4
|
-
config: RenderMediaOptions['composition'];
|
|
5
|
-
serveUrl: string;
|
|
6
|
-
codec: Codec;
|
|
7
|
-
remotionRoot: string;
|
|
8
|
-
}) => Promise<RenderMediaOptions>;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRenderMediaOptions = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const config_1 = require("./config");
|
|
6
|
-
const get_audio_codec_1 = require("./get-audio-codec");
|
|
7
|
-
const get_cli_options_1 = require("./get-cli-options");
|
|
8
|
-
const image_formats_1 = require("./image-formats");
|
|
9
|
-
const getRenderMediaOptions = async ({ outputLocation, config, serveUrl, codec, remotionRoot, }) => {
|
|
10
|
-
const { proResProfile, concurrency, frameRange, overwrite, inputProps, envVariables, quality, crf, pixelFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, muted, enforceAudioTrack, ffmpegOverride, audioBitrate, videoBitrate, height, width, } = await (0, get_cli_options_1.getCliOptions)({
|
|
11
|
-
isLambda: false,
|
|
12
|
-
type: 'series',
|
|
13
|
-
remotionRoot,
|
|
14
|
-
});
|
|
15
|
-
const imageFormat = (0, image_formats_1.getImageFormat)(codec);
|
|
16
|
-
const audioCodec = (0, get_audio_codec_1.getResolvedAudioCodec)();
|
|
17
|
-
return {
|
|
18
|
-
outputLocation,
|
|
19
|
-
composition: {
|
|
20
|
-
...config,
|
|
21
|
-
width: width !== null && width !== void 0 ? width : config.width,
|
|
22
|
-
height: height !== null && height !== void 0 ? height : config.height,
|
|
23
|
-
},
|
|
24
|
-
crf,
|
|
25
|
-
envVariables,
|
|
26
|
-
ffmpegExecutable,
|
|
27
|
-
ffprobeExecutable,
|
|
28
|
-
frameRange,
|
|
29
|
-
imageFormat,
|
|
30
|
-
inputProps,
|
|
31
|
-
overwrite,
|
|
32
|
-
pixelFormat,
|
|
33
|
-
proResProfile,
|
|
34
|
-
quality,
|
|
35
|
-
dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
36
|
-
chromiumOptions,
|
|
37
|
-
timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
38
|
-
scale,
|
|
39
|
-
port,
|
|
40
|
-
numberOfGifLoops,
|
|
41
|
-
everyNthFrame,
|
|
42
|
-
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
43
|
-
muted,
|
|
44
|
-
enforceAudioTrack,
|
|
45
|
-
browserExecutable,
|
|
46
|
-
ffmpegOverride,
|
|
47
|
-
concurrency,
|
|
48
|
-
serveUrl,
|
|
49
|
-
codec,
|
|
50
|
-
audioBitrate,
|
|
51
|
-
videoBitrate,
|
|
52
|
-
audioCodec,
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
exports.getRenderMediaOptions = getRenderMediaOptions;
|
package/dist/install.d.ts
DELETED
package/dist/install.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installCommand = exports.INSTALL_COMMAND = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const log_1 = require("./log");
|
|
6
|
-
exports.INSTALL_COMMAND = 'install';
|
|
7
|
-
const installCommand = async (remotionRoot, args) => {
|
|
8
|
-
const firstArg = args[0];
|
|
9
|
-
if (firstArg === 'ffmpeg') {
|
|
10
|
-
const { wasAlreadyInstalled } = await (0, renderer_1.ensureFfmpeg)({ remotionRoot });
|
|
11
|
-
if (wasAlreadyInstalled) {
|
|
12
|
-
log_1.Log.info('FFmpeg is already installed');
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
log_1.Log.info('Successfully installed FFmpeg');
|
|
16
|
-
}
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (firstArg === 'ffprobe') {
|
|
20
|
-
const { wasAlreadyInstalled } = await (0, renderer_1.ensureFfprobe)({ remotionRoot });
|
|
21
|
-
if (wasAlreadyInstalled) {
|
|
22
|
-
log_1.Log.info('FFmpeg is already installed');
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
log_1.Log.info('Successfully installed FFmpeg');
|
|
26
|
-
}
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
log_1.Log.error('Please specify either "ffmpeg" or "ffprobe" as the first argument to the install command');
|
|
30
|
-
log_1.Log.error();
|
|
31
|
-
log_1.Log.info('Example Usage: ');
|
|
32
|
-
log_1.Log.info(' remotion install ffmpeg');
|
|
33
|
-
log_1.Log.info(' remotion install ffprobe');
|
|
34
|
-
process.exit(1);
|
|
35
|
-
};
|
|
36
|
-
exports.installCommand = installCommand;
|
package/dist/is-javascript.d.ts
DELETED
package/dist/is-javascript.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJavascript = void 0;
|
|
4
|
-
const isJavascript = (fullPath) => {
|
|
5
|
-
const splitFullPath = fullPath.split('.');
|
|
6
|
-
const extension = splitFullPath[splitFullPath.length - 1];
|
|
7
|
-
return extension === 'jsx' || extension === 'js';
|
|
8
|
-
};
|
|
9
|
-
exports.isJavascript = isJavascript;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isColorSupported: boolean;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var _a;
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.isColorSupported = void 0;
|
|
28
|
-
const tty = __importStar(require("tty"));
|
|
29
|
-
const argv = process.argv || [];
|
|
30
|
-
const env = process.env || {};
|
|
31
|
-
const isDisabled = 'NO_COLOR' in env || argv.includes('--no-color');
|
|
32
|
-
const isForced = 'FORCE_COLOR' in env || argv.includes('--color');
|
|
33
|
-
const isWindows = process.platform === 'win32';
|
|
34
|
-
const isCompatibleTerminal = ((_a = tty === null || tty === void 0 ? void 0 : tty.isatty) === null || _a === void 0 ? void 0 : _a.call(tty, 1)) && env.TERM && env.TERM !== 'dumb';
|
|
35
|
-
const isCI = 'CI' in env &&
|
|
36
|
-
('GITHUB_ACTIONS' in env || 'GITLAB_CI' in env || 'CIRCLECI' in env);
|
|
37
|
-
exports.isColorSupported = !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const stripAnsi: (str: string) => string;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stripAnsi = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Code inlined from https://github.com/chalk/strip-ansi#readme
|
|
6
|
-
* This file is MIT licensed.
|
|
7
|
-
*/
|
|
8
|
-
const ansiRegex = () => {
|
|
9
|
-
const pattern = [
|
|
10
|
-
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
11
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
12
|
-
].join('|');
|
|
13
|
-
return new RegExp(pattern, 'g');
|
|
14
|
-
};
|
|
15
|
-
const stripAnsi = (str) => {
|
|
16
|
-
if (typeof str !== 'string') {
|
|
17
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
|
|
18
|
-
}
|
|
19
|
-
return str.replace(ansiRegex(), '');
|
|
20
|
-
};
|
|
21
|
-
exports.stripAnsi = stripAnsi;
|