remotion 4.0.147 → 4.0.148
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.
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type { LayoutAndStyle, SequenceProps } from '../Sequence.js';
|
|
4
|
+
import { ENABLE_V5_BREAKING_CHANGES } from '../v5-flag.js';
|
|
3
5
|
type SeriesSequenceProps = PropsWithChildren<{
|
|
4
|
-
durationInFrames: number;
|
|
5
|
-
offset?: number;
|
|
6
|
-
className?: string;
|
|
6
|
+
readonly durationInFrames: number;
|
|
7
|
+
readonly offset?: number;
|
|
8
|
+
readonly className?: string;
|
|
7
9
|
} & Pick<SequenceProps, 'layout' | 'name'> & LayoutAndStyle>;
|
|
8
|
-
declare const SeriesSequence:
|
|
10
|
+
declare const SeriesSequence: React.ForwardRefExoticComponent<SeriesSequenceProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
type V4Props = {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
type V5Props = SequenceProps;
|
|
15
|
+
type SeriesProps = true extends typeof ENABLE_V5_BREAKING_CHANGES ? V5Props : V4Props;
|
|
9
16
|
/**
|
|
10
17
|
* @description with this component, you can easily stitch together scenes that should play sequentially after another.
|
|
11
18
|
* @see [Documentation](https://www.remotion.dev/docs/series)
|
|
12
19
|
*/
|
|
13
|
-
declare const Series: FC<{
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}> & {
|
|
20
|
+
declare const Series: FC<SeriesProps> & {
|
|
16
21
|
Sequence: typeof SeriesSequence;
|
|
17
22
|
};
|
|
18
23
|
export { Series };
|
package/dist/cjs/series/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Sequence_js_1 = require("../Sequence.js");
|
|
7
7
|
const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-traces.js");
|
|
8
|
+
const v5_flag_js_1 = require("../v5-flag.js");
|
|
8
9
|
const validate_duration_in_frames_js_1 = require("../validation/validate-duration-in-frames.js");
|
|
9
10
|
const flatten_children_js_1 = require("./flatten-children.js");
|
|
10
11
|
const is_inside_series_js_1 = require("./is-inside-series.js");
|
|
@@ -19,10 +20,10 @@ const SeriesSequence = (0, react_1.forwardRef)(SeriesSequenceRefForwardingFuncti
|
|
|
19
20
|
* @description with this component, you can easily stitch together scenes that should play sequentially after another.
|
|
20
21
|
* @see [Documentation](https://www.remotion.dev/docs/series)
|
|
21
22
|
*/
|
|
22
|
-
const Series = (
|
|
23
|
+
const Series = (props) => {
|
|
23
24
|
const childrenValue = (0, react_1.useMemo)(() => {
|
|
24
25
|
let startFrame = 0;
|
|
25
|
-
const flattenedChildren = (0, flatten_children_js_1.flattenChildren)(children);
|
|
26
|
+
const flattenedChildren = (0, flatten_children_js_1.flattenChildren)(props.children);
|
|
26
27
|
return react_1.Children.map(flattenedChildren, (child, i) => {
|
|
27
28
|
var _a;
|
|
28
29
|
const castedChild = child;
|
|
@@ -63,7 +64,10 @@ const Series = ({ children }) => {
|
|
|
63
64
|
startFrame += durationInFramesProp + offset;
|
|
64
65
|
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { name: name || '<Series.Sequence>', from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, ref: castedChild.ref, children: child }));
|
|
65
66
|
});
|
|
66
|
-
}, [children]);
|
|
67
|
+
}, [props.children]);
|
|
68
|
+
if (v5_flag_js_1.ENABLE_V5_BREAKING_CHANGES) {
|
|
69
|
+
return ((0, jsx_runtime_1.jsx)(is_inside_series_js_1.IsInsideSeriesContainer, { children: (0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { ...props, children: childrenValue }) }));
|
|
70
|
+
}
|
|
67
71
|
return (0, jsx_runtime_1.jsx)(is_inside_series_js_1.IsInsideSeriesContainer, { children: childrenValue });
|
|
68
72
|
};
|
|
69
73
|
exports.Series = Series;
|
|
@@ -11,6 +11,9 @@ const advanceCache = {};
|
|
|
11
11
|
function advance({ animation, now, config, }) {
|
|
12
12
|
const { toValue, lastTimestamp, current, velocity } = animation;
|
|
13
13
|
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
14
|
+
if (config.damping <= 0) {
|
|
15
|
+
throw new Error('Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.');
|
|
16
|
+
}
|
|
14
17
|
const c = config.damping;
|
|
15
18
|
const m = config.mass;
|
|
16
19
|
const k = config.stiffness;
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -110,7 +110,7 @@ function truthy(value) {
|
|
|
110
110
|
* @see [Documentation](https://remotion.dev/docs/version)
|
|
111
111
|
* @returns {string} The current version of the remotion package
|
|
112
112
|
*/
|
|
113
|
-
const VERSION = '4.0.
|
|
113
|
+
const VERSION = '4.0.148';
|
|
114
114
|
|
|
115
115
|
const checkMultipleRemotionVersions = () => {
|
|
116
116
|
if (typeof globalThis === 'undefined') {
|
|
@@ -4523,10 +4523,10 @@ const SeriesSequence = forwardRef(SeriesSequenceRefForwardingFunction);
|
|
|
4523
4523
|
* @description with this component, you can easily stitch together scenes that should play sequentially after another.
|
|
4524
4524
|
* @see [Documentation](https://www.remotion.dev/docs/series)
|
|
4525
4525
|
*/
|
|
4526
|
-
const Series = (
|
|
4526
|
+
const Series = (props) => {
|
|
4527
4527
|
const childrenValue = useMemo(() => {
|
|
4528
4528
|
let startFrame = 0;
|
|
4529
|
-
const flattenedChildren = flattenChildren(children);
|
|
4529
|
+
const flattenedChildren = flattenChildren(props.children);
|
|
4530
4530
|
return Children.map(flattenedChildren, (child, i) => {
|
|
4531
4531
|
var _a;
|
|
4532
4532
|
const castedChild = child;
|
|
@@ -4567,7 +4567,7 @@ const Series = ({ children }) => {
|
|
|
4567
4567
|
startFrame += durationInFramesProp + offset;
|
|
4568
4568
|
return (jsx(Sequence, { name: name || '<Series.Sequence>', from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, ref: castedChild.ref, children: child }));
|
|
4569
4569
|
});
|
|
4570
|
-
}, [children]);
|
|
4570
|
+
}, [props.children]);
|
|
4571
4571
|
return jsx(IsInsideSeriesContainer, { children: childrenValue });
|
|
4572
4572
|
};
|
|
4573
4573
|
Series.Sequence = SeriesSequence;
|
|
@@ -4601,6 +4601,9 @@ const advanceCache = {};
|
|
|
4601
4601
|
function advance({ animation, now, config, }) {
|
|
4602
4602
|
const { toValue, lastTimestamp, current, velocity } = animation;
|
|
4603
4603
|
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
4604
|
+
if (config.damping <= 0) {
|
|
4605
|
+
throw new Error('Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.');
|
|
4606
|
+
}
|
|
4604
4607
|
const c = config.damping;
|
|
4605
4608
|
const m = config.mass;
|
|
4606
4609
|
const k = config.stiffness;
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.148",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"@happy-dom/global-registrator": "14.5.1",
|
|
25
25
|
"happy-dom": "14.5.1",
|
|
26
26
|
"@types/node": "18.14.6",
|
|
27
|
-
"@types/react": "18.
|
|
28
|
-
"@types/react-dom": "18.
|
|
27
|
+
"@types/react": "18.3.1",
|
|
28
|
+
"@types/react-dom": "18.3.0",
|
|
29
29
|
"eslint": "8.56.0",
|
|
30
30
|
"eslint-plugin-require-extensions": "^0.1.2",
|
|
31
31
|
"jsdom": "21.1.0",
|
|
32
32
|
"prettier": "3.2.5",
|
|
33
33
|
"prettier-plugin-organize-imports": "3.2.4",
|
|
34
|
-
"react": "18.
|
|
35
|
-
"react-dom": "18.
|
|
34
|
+
"react": "18.3.1",
|
|
35
|
+
"react-dom": "18.3.1",
|
|
36
36
|
"rimraf": "^3.0.2",
|
|
37
37
|
"rollup": "^2.70.1",
|
|
38
38
|
"vitest": "0.31.1",
|