@remotion/cli 4.0.62 → 4.0.63
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/better-opn/index.d.ts +0 -2
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/editor/components/CurrentComposition.d.ts +0 -1
- package/dist/editor/components/EditorRuler/Ruler.d.ts +16 -0
- package/dist/editor/components/EditorRuler/Ruler.js +40 -0
- package/dist/editor/components/EditorRuler/index.d.ts +10 -0
- package/dist/editor/components/EditorRuler/index.js +98 -0
- package/dist/editor/components/NewComposition/NewCompCode.d.ts +0 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/ShowGuidesProvider.d.ts +4 -0
- package/dist/editor/components/ShowGuidesProvider.js +24 -0
- package/dist/editor/components/ShowRulersProvider.d.ts +4 -0
- package/dist/editor/components/ShowRulersProvider.js +24 -0
- package/dist/editor/components/UpdateCheck.d.ts +0 -1
- package/dist/editor/helpers/convert-env-variables.d.ts +8 -2
- package/dist/editor/helpers/editor-ruler.d.ts +34 -0
- package/dist/editor/helpers/editor-ruler.js +84 -0
- package/dist/editor/helpers/presets-labels.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/editor/icons/Checkmark.d.ts +0 -1
- package/dist/editor/state/editor-guides.d.ts +9 -0
- package/dist/editor/state/editor-guides.js +17 -0
- package/dist/editor/state/editor-rulers.d.ts +14 -0
- package/dist/editor/state/editor-rulers.js +24 -0
- package/dist/get-cli-options.d.ts +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/lambda-command.d.ts +2 -1
- package/dist/lambda-command.js +2 -2
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/routes.d.ts +0 -1
- package/package.json +8 -8
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -307,7 +307,7 @@ export declare const ConfigInternals: {
|
|
|
307
307
|
getBrowser: () => null;
|
|
308
308
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
309
309
|
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
310
|
-
getPresetProfile: () => "
|
|
310
|
+
getPresetProfile: () => "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
311
311
|
getShouldOverwrite: ({ defaultValue, }: {
|
|
312
312
|
defaultValue: boolean;
|
|
313
313
|
}) => boolean;
|
|
@@ -329,7 +329,7 @@ export declare const ConfigInternals: {
|
|
|
329
329
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
330
330
|
getDotEnvLocation: () => string | null;
|
|
331
331
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
332
|
-
getUserPreferredVideoImageFormat: () => "
|
|
332
|
+
getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
|
|
333
333
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
334
334
|
getWebpackCaching: () => boolean;
|
|
335
335
|
getOutputLocation: () => string | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Point {
|
|
3
|
+
value: number;
|
|
4
|
+
position: number;
|
|
5
|
+
}
|
|
6
|
+
interface RulerProps {
|
|
7
|
+
scale: number;
|
|
8
|
+
points: Point[];
|
|
9
|
+
originOffset: number;
|
|
10
|
+
startMarking: number;
|
|
11
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
12
|
+
markingGaps: number;
|
|
13
|
+
orientation: 'horizontal' | 'vertical';
|
|
14
|
+
}
|
|
15
|
+
declare const Ruler: React.FC<RulerProps>;
|
|
16
|
+
export default Ruler;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const editor_ruler_1 = require("../../helpers/editor-ruler");
|
|
6
|
+
const editor_rulers_1 = require("../../state/editor-rulers");
|
|
7
|
+
const Ruler = ({ scale, points, originOffset, startMarking, containerRef, markingGaps, orientation, }) => {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
const rulerCanvasRef = (0, react_1.useRef)(null);
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
(0, editor_ruler_1.drawMarkingOnRulerCanvas)({
|
|
12
|
+
scale,
|
|
13
|
+
points,
|
|
14
|
+
startMarking,
|
|
15
|
+
originOffset,
|
|
16
|
+
markingGaps,
|
|
17
|
+
orientation,
|
|
18
|
+
rulerCanvasRef,
|
|
19
|
+
});
|
|
20
|
+
}, [scale, points, startMarking, originOffset, markingGaps, orientation]);
|
|
21
|
+
const canvasContainerWidth = ((_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) || 0;
|
|
22
|
+
const canvasContainerHeight = ((_d = (_c = containerRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) === null || _d === void 0 ? void 0 : _d.height) || 0;
|
|
23
|
+
const rulerWidth = orientation === 'horizontal' ? canvasContainerWidth : editor_rulers_1.RULER_WIDTH;
|
|
24
|
+
const rulerHeight = orientation === 'horizontal' ? editor_rulers_1.RULER_WIDTH : canvasContainerHeight;
|
|
25
|
+
const rulerStyle = (0, react_1.useMemo)(() => ({
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
background: '#000000',
|
|
28
|
+
width: `${rulerWidth}px`,
|
|
29
|
+
height: `${rulerHeight}px`,
|
|
30
|
+
...(orientation === 'vertical'
|
|
31
|
+
? {
|
|
32
|
+
left: 0,
|
|
33
|
+
}
|
|
34
|
+
: {
|
|
35
|
+
top: 0,
|
|
36
|
+
}),
|
|
37
|
+
}), [orientation, rulerWidth, rulerHeight]);
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)("canvas", { ref: rulerCanvasRef, width: rulerWidth * devicePixelRatio, height: rulerHeight * devicePixelRatio, style: rulerStyle }));
|
|
39
|
+
};
|
|
40
|
+
exports.default = Ruler;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Size } from '@remotion/player';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { AssetMetadata } from '../../helpers/get-asset-metadata';
|
|
4
|
+
import type { Dimensions } from '../../helpers/is-current-selected-still';
|
|
5
|
+
export declare const EditorRulers: React.FC<{
|
|
6
|
+
canvasSize: Size | null;
|
|
7
|
+
contentDimensions: Dimensions | 'none' | null;
|
|
8
|
+
assetMetadata: AssetMetadata | null;
|
|
9
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EditorRulers = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const player_1 = require("@remotion/player");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const editor_ruler_1 = require("../../helpers/editor-ruler");
|
|
11
|
+
const editor_rulers_1 = require("../../state/editor-rulers");
|
|
12
|
+
const preview_size_1 = require("../../state/preview-size");
|
|
13
|
+
const Ruler_1 = __importDefault(require("./Ruler"));
|
|
14
|
+
const originBlockStyles = {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: 0,
|
|
17
|
+
left: 0,
|
|
18
|
+
borderBottom: '1px solid #444444',
|
|
19
|
+
borderRight: '1px solid #444444',
|
|
20
|
+
width: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
21
|
+
height: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
22
|
+
background: '#000000',
|
|
23
|
+
};
|
|
24
|
+
const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef }) => {
|
|
25
|
+
const { size: previewSize } = (0, react_1.useContext)(preview_size_1.PreviewSizeContext);
|
|
26
|
+
const { centerX, centerY, scale } = (0, react_1.useMemo)(() => {
|
|
27
|
+
if (contentDimensions === 'none' ||
|
|
28
|
+
contentDimensions === null ||
|
|
29
|
+
(assetMetadata && assetMetadata.type === 'not-found') ||
|
|
30
|
+
!canvasSize) {
|
|
31
|
+
return {
|
|
32
|
+
centerX: previewSize.translation.x,
|
|
33
|
+
centerY: previewSize.translation.y,
|
|
34
|
+
scale: 1,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return player_1.PlayerInternals.calculateCanvasTransformation({
|
|
38
|
+
canvasSize,
|
|
39
|
+
compositionHeight: contentDimensions.height,
|
|
40
|
+
compositionWidth: contentDimensions.width,
|
|
41
|
+
previewSize: previewSize.size,
|
|
42
|
+
});
|
|
43
|
+
}, [
|
|
44
|
+
canvasSize,
|
|
45
|
+
contentDimensions,
|
|
46
|
+
previewSize.size,
|
|
47
|
+
previewSize.translation.y,
|
|
48
|
+
previewSize.translation.x,
|
|
49
|
+
assetMetadata,
|
|
50
|
+
]);
|
|
51
|
+
const canvasDimensions = (0, react_1.useMemo)(() => {
|
|
52
|
+
return {
|
|
53
|
+
left: centerX - previewSize.translation.x,
|
|
54
|
+
top: centerY - previewSize.translation.y,
|
|
55
|
+
width: contentDimensions === 'none' || !contentDimensions
|
|
56
|
+
? (canvasSize === null || canvasSize === void 0 ? void 0 : canvasSize.width) || 0
|
|
57
|
+
: contentDimensions.width * scale,
|
|
58
|
+
height: contentDimensions === 'none' || !contentDimensions
|
|
59
|
+
? (canvasSize === null || canvasSize === void 0 ? void 0 : canvasSize.height) || 0
|
|
60
|
+
: contentDimensions.height * scale,
|
|
61
|
+
};
|
|
62
|
+
}, [
|
|
63
|
+
scale,
|
|
64
|
+
centerX,
|
|
65
|
+
previewSize.translation.x,
|
|
66
|
+
previewSize.translation.y,
|
|
67
|
+
centerY,
|
|
68
|
+
canvasSize,
|
|
69
|
+
contentDimensions,
|
|
70
|
+
]);
|
|
71
|
+
const rulerMarkingGaps = (0, react_1.useMemo)(() => {
|
|
72
|
+
const minimumGap = editor_rulers_1.MINIMUM_RULER_MARKING_GAP_PX;
|
|
73
|
+
const predefinedGap = editor_rulers_1.PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
|
|
74
|
+
return predefinedGap || editor_rulers_1.MAXIMUM_PREDEFINED_RULER_SCALE_GAP;
|
|
75
|
+
}, [scale]);
|
|
76
|
+
const horizontalRulerScaleRange = (0, react_1.useMemo)(() => (0, editor_ruler_1.getRulerScaleRange)({
|
|
77
|
+
canvasLength: canvasDimensions.width,
|
|
78
|
+
containerRef,
|
|
79
|
+
scale,
|
|
80
|
+
}), [canvasDimensions.width, containerRef, scale]);
|
|
81
|
+
const verticalRulerScaleRange = (0, react_1.useMemo)(() => (0, editor_ruler_1.getRulerScaleRange)({
|
|
82
|
+
canvasLength: canvasDimensions.height,
|
|
83
|
+
containerRef,
|
|
84
|
+
scale,
|
|
85
|
+
}), [canvasDimensions.height, containerRef, scale]);
|
|
86
|
+
const { points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, } = (0, react_1.useMemo)(() => (0, editor_ruler_1.getRulerPoints)({
|
|
87
|
+
rulerScaleRange: horizontalRulerScaleRange,
|
|
88
|
+
rulerMarkingGaps,
|
|
89
|
+
scale,
|
|
90
|
+
}), [horizontalRulerScaleRange, rulerMarkingGaps, scale]);
|
|
91
|
+
const { points: verticalRulerPoints, startMarking: verticalRulerStartMarking } = (0, react_1.useMemo)(() => (0, editor_ruler_1.getRulerPoints)({
|
|
92
|
+
rulerScaleRange: verticalRulerScaleRange,
|
|
93
|
+
rulerMarkingGaps,
|
|
94
|
+
scale,
|
|
95
|
+
}), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
|
|
96
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: originBlockStyles }), (0, jsx_runtime_1.jsx)(Ruler_1.default, { orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, containerRef: containerRef, markingGaps: rulerMarkingGaps, originOffset: canvasDimensions.left }), (0, jsx_runtime_1.jsx)(Ruler_1.default, { orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, containerRef: containerRef, markingGaps: rulerMarkingGaps, originOffset: canvasDimensions.top })] }));
|
|
97
|
+
};
|
|
98
|
+
exports.EditorRulers = EditorRulers;
|
|
@@ -13,5 +13,5 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
15
|
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" |
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "GIF" | "AAC" | "MP3" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShowGuidesProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const editor_guides_1 = require("../state/editor-guides");
|
|
7
|
+
const ShowGuidesProvider = ({ children }) => {
|
|
8
|
+
const [editorShowGuides, setEditorShowGuidesState] = (0, react_1.useState)(() => (0, editor_guides_1.loadEditorShowGuidesOption)());
|
|
9
|
+
const setEditorShowGuides = (0, react_1.useCallback)((newValue) => {
|
|
10
|
+
setEditorShowGuidesState((prevState) => {
|
|
11
|
+
const newVal = newValue(prevState);
|
|
12
|
+
(0, editor_guides_1.persistEditorShowGuidesOption)(newVal);
|
|
13
|
+
return newVal;
|
|
14
|
+
});
|
|
15
|
+
}, []);
|
|
16
|
+
const editorShowGuidesCtx = (0, react_1.useMemo)(() => {
|
|
17
|
+
return {
|
|
18
|
+
editorShowGuides,
|
|
19
|
+
setEditorShowGuides,
|
|
20
|
+
};
|
|
21
|
+
}, [editorShowGuides, setEditorShowGuides]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(editor_guides_1.EditorShowGuidesContext.Provider, { value: editorShowGuidesCtx, children: children }));
|
|
23
|
+
};
|
|
24
|
+
exports.ShowGuidesProvider = ShowGuidesProvider;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShowRulersProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const editor_rulers_1 = require("../state/editor-rulers");
|
|
7
|
+
const ShowRulersProvider = ({ children }) => {
|
|
8
|
+
const [editorShowRulers, setEditorShowRulersState] = (0, react_1.useState)(() => (0, editor_rulers_1.loadEditorShowRulersOption)());
|
|
9
|
+
const setEditorShowRulers = (0, react_1.useCallback)((newValue) => {
|
|
10
|
+
setEditorShowRulersState((prevState) => {
|
|
11
|
+
const newVal = newValue(prevState);
|
|
12
|
+
(0, editor_rulers_1.persistEditorShowRulersOption)(newVal);
|
|
13
|
+
return newVal;
|
|
14
|
+
});
|
|
15
|
+
}, []);
|
|
16
|
+
const editorShowRulersCtx = (0, react_1.useMemo)(() => {
|
|
17
|
+
return {
|
|
18
|
+
editorShowRulers,
|
|
19
|
+
setEditorShowRulers,
|
|
20
|
+
};
|
|
21
|
+
}, [editorShowRulers, setEditorShowRulers]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(editor_rulers_1.EditorShowRulersContext.Provider, { value: editorShowRulersCtx, children: children }));
|
|
23
|
+
};
|
|
24
|
+
exports.ShowRulersProvider = ShowRulersProvider;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
|
|
2
|
-
|
|
1
|
+
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
|
|
2
|
+
string,
|
|
3
|
+
string
|
|
4
|
+
][];
|
|
5
|
+
export declare const envVariablesArrayToObject: (envVariables: [
|
|
6
|
+
string,
|
|
7
|
+
string
|
|
8
|
+
][]) => Record<string, string>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const drawMarkingOnRulerCanvas: ({ scale, points, startMarking, originOffset, markingGaps, orientation, rulerCanvasRef, }: {
|
|
2
|
+
scale: number;
|
|
3
|
+
points: Array<{
|
|
4
|
+
position: number;
|
|
5
|
+
value: number;
|
|
6
|
+
}>;
|
|
7
|
+
startMarking: number;
|
|
8
|
+
originOffset: number;
|
|
9
|
+
markingGaps: number;
|
|
10
|
+
orientation: 'horizontal' | 'vertical';
|
|
11
|
+
rulerCanvasRef: React.RefObject<HTMLCanvasElement>;
|
|
12
|
+
}) => void;
|
|
13
|
+
export declare const getRulerPoints: ({ rulerScaleRange, rulerMarkingGaps, scale, }: {
|
|
14
|
+
rulerScaleRange: {
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
};
|
|
18
|
+
rulerMarkingGaps: number;
|
|
19
|
+
scale: number;
|
|
20
|
+
}) => {
|
|
21
|
+
points: {
|
|
22
|
+
value: number;
|
|
23
|
+
position: number;
|
|
24
|
+
}[];
|
|
25
|
+
startMarking: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const getRulerScaleRange: ({ canvasLength, containerRef, scale, }: {
|
|
28
|
+
canvasLength: number;
|
|
29
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
30
|
+
scale: number;
|
|
31
|
+
}) => {
|
|
32
|
+
start: number;
|
|
33
|
+
end: number;
|
|
34
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRulerScaleRange = exports.getRulerPoints = exports.drawMarkingOnRulerCanvas = void 0;
|
|
4
|
+
const editor_rulers_1 = require("../state/editor-rulers");
|
|
5
|
+
const drawMarkingOnRulerCanvas = ({ scale, points, startMarking, originOffset, markingGaps, orientation, rulerCanvasRef, }) => {
|
|
6
|
+
const canvas = rulerCanvasRef.current;
|
|
7
|
+
if (!canvas)
|
|
8
|
+
return;
|
|
9
|
+
const context = canvas.getContext('2d');
|
|
10
|
+
if (!context)
|
|
11
|
+
return;
|
|
12
|
+
const canvasWidth = canvas.clientWidth * window.devicePixelRatio;
|
|
13
|
+
const canvasHeight = canvas.clientHeight * window.devicePixelRatio;
|
|
14
|
+
canvas.width = canvasWidth;
|
|
15
|
+
canvas.height = canvasHeight;
|
|
16
|
+
context.scale(window.devicePixelRatio, window.devicePixelRatio);
|
|
17
|
+
context.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
18
|
+
context.strokeStyle = '#dbe3e8';
|
|
19
|
+
context.lineWidth = 1;
|
|
20
|
+
context.beginPath();
|
|
21
|
+
context.strokeStyle = '#dbe3e8';
|
|
22
|
+
context.lineWidth = 1;
|
|
23
|
+
points.forEach((point) => {
|
|
24
|
+
const originDistance = point.position + originOffset - startMarking * scale;
|
|
25
|
+
context.beginPath();
|
|
26
|
+
if (orientation === 'horizontal') {
|
|
27
|
+
context.moveTo(originDistance, 0);
|
|
28
|
+
context.lineTo(originDistance, canvasHeight);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
context.moveTo(0, originDistance);
|
|
32
|
+
context.lineTo(canvasWidth, originDistance);
|
|
33
|
+
}
|
|
34
|
+
for (let i = 1; i < 5; i++) {
|
|
35
|
+
if (orientation === 'horizontal') {
|
|
36
|
+
context.moveTo(originDistance + (i * markingGaps * scale) / 5, 0);
|
|
37
|
+
context.lineTo(originDistance + (i * markingGaps * scale) / 5, 4);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
context.moveTo(0, originDistance + (i * markingGaps * scale) / 5);
|
|
41
|
+
context.lineTo(4, originDistance + (i * markingGaps * scale) / 5);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
context.stroke();
|
|
45
|
+
context.font = '10px Arial, Helvetica, sans-serif';
|
|
46
|
+
context.textAlign = 'left';
|
|
47
|
+
context.fillStyle = '#dbe3e8';
|
|
48
|
+
if (orientation === 'horizontal') {
|
|
49
|
+
context.fillText(point.value.toString().split('').join(String.fromCharCode(8202)), originDistance + 4, 16);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
context.rotate(-Math.PI / 2);
|
|
53
|
+
context.fillText(point.value.toString().split('').join(String.fromCharCode(8202)), -originDistance + 4, 16);
|
|
54
|
+
context.rotate(Math.PI / 2);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
exports.drawMarkingOnRulerCanvas = drawMarkingOnRulerCanvas;
|
|
59
|
+
const getRulerPoints = ({ rulerScaleRange, rulerMarkingGaps, scale, }) => {
|
|
60
|
+
const points = [];
|
|
61
|
+
const startPoint = Math.ceil(rulerScaleRange.start / rulerMarkingGaps);
|
|
62
|
+
const endPoint = Math.floor(rulerScaleRange.end / rulerMarkingGaps);
|
|
63
|
+
for (let i = startPoint; i <= endPoint; i++) {
|
|
64
|
+
points.push({
|
|
65
|
+
value: i * rulerMarkingGaps,
|
|
66
|
+
position: (i * rulerMarkingGaps + startPoint * rulerMarkingGaps) * scale,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
points,
|
|
71
|
+
startMarking: startPoint * rulerMarkingGaps,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
exports.getRulerPoints = getRulerPoints;
|
|
75
|
+
const getRulerScaleRange = ({ canvasLength, containerRef, scale, }) => {
|
|
76
|
+
var _a, _b;
|
|
77
|
+
const scaleRangeBeyondCanvas = (((_b = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) ||
|
|
78
|
+
editor_rulers_1.MINIMUM_VISIBLE_CANVAS_SIZE - editor_rulers_1.MINIMUM_VISIBLE_CANVAS_SIZE) / scale;
|
|
79
|
+
return {
|
|
80
|
+
start: -scaleRangeBeyondCanvas,
|
|
81
|
+
end: scaleRangeBeyondCanvas + canvasLength,
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
exports.getRulerScaleRange = getRulerScaleRange;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { X264Preset } from '@remotion/renderer';
|
|
2
|
-
export declare const labelx264Preset: (profile: X264Preset) => "
|
|
2
|
+
export declare const labelx264Preset: (profile: X264Preset) => "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type State = {
|
|
3
|
+
editorShowGuides: boolean;
|
|
4
|
+
setEditorShowGuides: (cb: (prevState: boolean) => boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const persistEditorShowGuidesOption: (option: boolean) => void;
|
|
7
|
+
export declare const loadEditorShowGuidesOption: () => boolean;
|
|
8
|
+
export declare const EditorShowGuidesContext: import("react").Context<State>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditorShowGuidesContext = exports.loadEditorShowGuidesOption = exports.persistEditorShowGuidesOption = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const persistEditorShowGuidesOption = (option) => {
|
|
6
|
+
localStorage.setItem('remotion.editorShowGuides', String(option));
|
|
7
|
+
};
|
|
8
|
+
exports.persistEditorShowGuidesOption = persistEditorShowGuidesOption;
|
|
9
|
+
const loadEditorShowGuidesOption = () => {
|
|
10
|
+
const item = localStorage.getItem('remotion.editorShowGuides');
|
|
11
|
+
return item === 'true';
|
|
12
|
+
};
|
|
13
|
+
exports.loadEditorShowGuidesOption = loadEditorShowGuidesOption;
|
|
14
|
+
exports.EditorShowGuidesContext = (0, react_1.createContext)({
|
|
15
|
+
editorShowGuides: (0, exports.loadEditorShowGuidesOption)(),
|
|
16
|
+
setEditorShowGuides: () => undefined,
|
|
17
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type State = {
|
|
3
|
+
editorShowRulers: boolean;
|
|
4
|
+
setEditorShowRulers: (cb: (prevState: boolean) => boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const persistEditorShowRulersOption: (option: boolean) => void;
|
|
7
|
+
export declare const loadEditorShowRulersOption: () => boolean;
|
|
8
|
+
export declare const EditorShowRulersContext: import("react").Context<State>;
|
|
9
|
+
export declare const RULER_WIDTH = 20;
|
|
10
|
+
export declare const MINIMUM_VISIBLE_CANVAS_SIZE = 50;
|
|
11
|
+
export declare const PREDEFINED_RULER_SCALE_GAPS: number[];
|
|
12
|
+
export declare const MAXIMUM_PREDEFINED_RULER_SCALE_GAP = 5000;
|
|
13
|
+
export declare const MINIMUM_RULER_MARKING_GAP_PX = 50;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MINIMUM_RULER_MARKING_GAP_PX = exports.MAXIMUM_PREDEFINED_RULER_SCALE_GAP = exports.PREDEFINED_RULER_SCALE_GAPS = exports.MINIMUM_VISIBLE_CANVAS_SIZE = exports.RULER_WIDTH = exports.EditorShowRulersContext = exports.loadEditorShowRulersOption = exports.persistEditorShowRulersOption = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const persistEditorShowRulersOption = (option) => {
|
|
6
|
+
localStorage.setItem('remotion.editorShowRulers', String(option));
|
|
7
|
+
};
|
|
8
|
+
exports.persistEditorShowRulersOption = persistEditorShowRulersOption;
|
|
9
|
+
const loadEditorShowRulersOption = () => {
|
|
10
|
+
const item = localStorage.getItem('remotion.editorShowRulers');
|
|
11
|
+
return item === 'true';
|
|
12
|
+
};
|
|
13
|
+
exports.loadEditorShowRulersOption = loadEditorShowRulersOption;
|
|
14
|
+
exports.EditorShowRulersContext = (0, react_1.createContext)({
|
|
15
|
+
editorShowRulers: (0, exports.loadEditorShowRulersOption)(),
|
|
16
|
+
setEditorShowRulers: () => undefined,
|
|
17
|
+
});
|
|
18
|
+
exports.RULER_WIDTH = 20;
|
|
19
|
+
exports.MINIMUM_VISIBLE_CANVAS_SIZE = 50;
|
|
20
|
+
exports.PREDEFINED_RULER_SCALE_GAPS = [
|
|
21
|
+
1, 2, 5, 10, 20, 50, 100, 250, 500, 1000, 2000, 5000,
|
|
22
|
+
];
|
|
23
|
+
exports.MAXIMUM_PREDEFINED_RULER_SCALE_GAP = 5000;
|
|
24
|
+
exports.MINIMUM_RULER_MARKING_GAP_PX = 50;
|
|
@@ -17,7 +17,7 @@ export declare const getCliOptions: (options: {
|
|
|
17
17
|
crf: import("@remotion/renderer").Crf | null;
|
|
18
18
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
19
19
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
20
|
-
x264Preset: "
|
|
20
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
21
21
|
everyNthFrame: number;
|
|
22
22
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
23
23
|
stillFrame: number;
|
|
@@ -34,7 +34,7 @@ export declare const getCliOptions: (options: {
|
|
|
34
34
|
videoBitrate: string | null;
|
|
35
35
|
height: number | null;
|
|
36
36
|
width: number | null;
|
|
37
|
-
configFileImageFormat: "
|
|
37
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
38
38
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
39
39
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
40
40
|
colorSpace: "default" | "bt709";
|
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export declare const CliInternals: {
|
|
|
87
87
|
crf: import("@remotion/renderer").Crf | null;
|
|
88
88
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
89
89
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
90
|
-
x264Preset: "
|
|
90
|
+
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
|
|
91
91
|
everyNthFrame: number;
|
|
92
92
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
93
93
|
stillFrame: number;
|
|
@@ -104,7 +104,7 @@ export declare const CliInternals: {
|
|
|
104
104
|
videoBitrate: string | null;
|
|
105
105
|
height: number | null;
|
|
106
106
|
width: number | null;
|
|
107
|
-
configFileImageFormat: "
|
|
107
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
108
108
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
109
109
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
110
110
|
colorSpace: "default" | "bt709";
|
|
@@ -116,9 +116,9 @@ export declare const CliInternals: {
|
|
|
116
116
|
parsedCli: {
|
|
117
117
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
118
118
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
119
|
-
"image-format": "
|
|
119
|
+
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
120
120
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
121
|
-
"x264-preset": "
|
|
121
|
+
"x264-preset": "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
|
|
122
122
|
"bundle-cache": string;
|
|
123
123
|
"env-file": string;
|
|
124
124
|
"ignore-certificate-errors": string;
|
|
@@ -187,7 +187,7 @@ export declare const CliInternals: {
|
|
|
187
187
|
downloadName: string | null;
|
|
188
188
|
outName: string | null;
|
|
189
189
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
190
|
-
cliFlag: "
|
|
190
|
+
cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
|
|
191
191
|
isLambda: boolean;
|
|
192
192
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
193
193
|
}) => {
|
|
@@ -202,8 +202,8 @@ export declare const CliInternals: {
|
|
|
202
202
|
};
|
|
203
203
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
204
204
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
205
|
-
uiImageFormat: "
|
|
206
|
-
}) => "
|
|
205
|
+
uiImageFormat: "png" | "jpeg" | "none" | null;
|
|
206
|
+
}) => "png" | "jpeg" | "none";
|
|
207
207
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
208
208
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }: {
|
|
209
209
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ const cli = async () => {
|
|
|
76
76
|
await (0, studio_1.studioCommand)(remotionRoot, args, logLevel);
|
|
77
77
|
}
|
|
78
78
|
else if (command === 'lambda') {
|
|
79
|
-
await (0, lambda_command_1.lambdaCommand)(remotionRoot, args);
|
|
79
|
+
await (0, lambda_command_1.lambdaCommand)(remotionRoot, args, logLevel);
|
|
80
80
|
}
|
|
81
81
|
else if (command === 'cloudrun') {
|
|
82
82
|
await (0, cloudrun_command_1.cloudrunCommand)(remotionRoot, args, logLevel);
|
package/dist/lambda-command.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const lambdaCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<never>;
|
package/dist/lambda-command.js
CHANGED
|
@@ -4,13 +4,13 @@ exports.lambdaCommand = void 0;
|
|
|
4
4
|
const log_1 = require("./log");
|
|
5
5
|
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
6
6
|
const update_available_1 = require("./preview-server/update-available");
|
|
7
|
-
const lambdaCommand = async (remotionRoot, args) => {
|
|
7
|
+
const lambdaCommand = async (remotionRoot, args, logLevel) => {
|
|
8
8
|
try {
|
|
9
9
|
const path = require.resolve('@remotion/lambda', {
|
|
10
10
|
paths: [remotionRoot],
|
|
11
11
|
});
|
|
12
12
|
const { LambdaInternals } = require(path);
|
|
13
|
-
await LambdaInternals.executeCommand(args, remotionRoot);
|
|
13
|
+
await LambdaInternals.executeCommand(args, remotionRoot, logLevel);
|
|
14
14
|
process.exit(0);
|
|
15
15
|
}
|
|
16
16
|
catch (err) {
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | Ranges | -2;
|
|
15
15
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.63",
|
|
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.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/bundler": "4.0.
|
|
39
|
-
"@remotion/player": "4.0.
|
|
40
|
-
"remotion": "4.0.
|
|
41
|
-
"@remotion/
|
|
42
|
-
"
|
|
38
|
+
"@remotion/bundler": "4.0.63",
|
|
39
|
+
"@remotion/player": "4.0.63",
|
|
40
|
+
"@remotion/media-utils": "4.0.63",
|
|
41
|
+
"@remotion/renderer": "4.0.63",
|
|
42
|
+
"remotion": "4.0.63"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"react-dom": "18.2.0",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.22.3",
|
|
68
|
-
"@remotion/
|
|
69
|
-
"@remotion/
|
|
68
|
+
"@remotion/zod-types": "4.0.63",
|
|
69
|
+
"@remotion/tailwind": "4.0.63"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|