@remotion/transitions 4.0.423 → 4.0.424
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/TransitionSeries.d.ts +1 -1
- package/dist/TransitionSeries.js +11 -11
- package/dist/context.js +2 -2
- package/dist/flatten-children.d.ts +1 -3
- package/dist/index.js +4 -4
- package/dist/presentations/clock-wipe.js +2 -1
- package/dist/presentations/fade.d.ts +1 -1
- package/dist/presentations/fade.js +1 -1
- package/dist/presentations/flip.d.ts +1 -1
- package/dist/presentations/flip.js +1 -1
- package/dist/presentations/iris.js +2 -1
- package/dist/presentations/none.d.ts +1 -1
- package/dist/presentations/none.js +1 -1
- package/dist/presentations/slide.d.ts +1 -1
- package/dist/presentations/slide.js +1 -1
- package/dist/presentations/wipe.d.ts +1 -1
- package/dist/presentations/wipe.js +3 -1
- package/dist/timings/spring-timing.d.ts +4 -4
- package/package.json +11 -10
|
@@ -14,7 +14,7 @@ type SeriesSequenceProps = PropsWithChildren<{
|
|
|
14
14
|
*/
|
|
15
15
|
readonly stack?: string;
|
|
16
16
|
} & LayoutBasedProps & Pick<SequencePropsWithoutDuration, 'name'>>;
|
|
17
|
-
declare const SeriesSequence: ({ children }: SeriesSequenceProps) => import("react/jsx-runtime
|
|
17
|
+
declare const SeriesSequence: ({ children }: SeriesSequenceProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare const TransitionSeries: FC<SequencePropsWithoutDuration> & {
|
|
19
19
|
Sequence: typeof SeriesSequence;
|
|
20
20
|
Transition: typeof TransitionSeriesTransition;
|
package/dist/TransitionSeries.js
CHANGED
|
@@ -17,7 +17,7 @@ const SeriesOverlay = () => {
|
|
|
17
17
|
};
|
|
18
18
|
const SeriesSequence = ({ children }) => {
|
|
19
19
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
20
|
-
return
|
|
20
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: children });
|
|
21
21
|
};
|
|
22
22
|
const TransitionSeriesChildren = ({ children, }) => {
|
|
23
23
|
const { fps } = (0, remotion_1.useVideoConfig)();
|
|
@@ -206,37 +206,37 @@ const TransitionSeriesChildren = ({ children, }) => {
|
|
|
206
206
|
const prevPresentation = (_d = prev.props.presentation) !== null && _d !== void 0 ? _d : (0, slide_js_1.slide)();
|
|
207
207
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
208
208
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
209
|
-
return (
|
|
209
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence
|
|
210
210
|
// eslint-disable-next-line react/no-array-index-key
|
|
211
|
-
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children:
|
|
211
|
+
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: jsx_runtime_1.jsx(UppercaseNextPresentation, { passedProps: (_e = nextPresentation.props) !== null && _e !== void 0 ? _e : {}, presentationDirection: "exiting", presentationProgress: nextProgress, presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }), children: jsx_runtime_1.jsx(context_js_1.WrapInExitingProgressContext, { presentationProgress: nextProgress, children: jsx_runtime_1.jsx(UppercasePrevPresentation, { passedProps: (_f = prevPresentation.props) !== null && _f !== void 0 ? _f : {}, presentationDirection: "entering", presentationProgress: prevProgress, presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }), children: jsx_runtime_1.jsx(context_js_1.WrapInEnteringProgressContext, { presentationProgress: prevProgress, children: child }) }) }) }) }, i));
|
|
212
212
|
}
|
|
213
213
|
if (prevProgress !== null && prev) {
|
|
214
214
|
const prevPresentation = (_g = prev.props.presentation) !== null && _g !== void 0 ? _g : (0, slide_js_1.slide)();
|
|
215
215
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
216
|
-
return (
|
|
216
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence
|
|
217
217
|
// eslint-disable-next-line react/no-array-index-key
|
|
218
|
-
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children:
|
|
218
|
+
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: jsx_runtime_1.jsx(UppercasePrevPresentation, { passedProps: (_h = prevPresentation.props) !== null && _h !== void 0 ? _h : {}, presentationDirection: "entering", presentationProgress: prevProgress, presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }), children: jsx_runtime_1.jsx(context_js_1.WrapInEnteringProgressContext, { presentationProgress: prevProgress, children: child }) }) }, i));
|
|
219
219
|
}
|
|
220
220
|
if (nextProgress !== null && next) {
|
|
221
221
|
const nextPresentation = (_j = next.props.presentation) !== null && _j !== void 0 ? _j : (0, slide_js_1.slide)();
|
|
222
222
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
223
|
-
return (
|
|
223
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence
|
|
224
224
|
// eslint-disable-next-line react/no-array-index-key
|
|
225
|
-
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children:
|
|
225
|
+
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: jsx_runtime_1.jsx(UppercaseNextPresentation, { passedProps: (_k = nextPresentation.props) !== null && _k !== void 0 ? _k : {}, presentationDirection: "exiting", presentationProgress: nextProgress, presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }), children: jsx_runtime_1.jsx(context_js_1.WrapInExitingProgressContext, { presentationProgress: nextProgress, children: child }) }) }, i));
|
|
226
226
|
}
|
|
227
|
-
return (
|
|
227
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence
|
|
228
228
|
// eslint-disable-next-line react/no-array-index-key
|
|
229
229
|
, { from: actualStartFrame, durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: child }, i));
|
|
230
230
|
});
|
|
231
231
|
// Now render overlay sequences
|
|
232
232
|
const overlayElements = overlayRenders.map((overlayInfo) => {
|
|
233
233
|
const info = overlayInfo;
|
|
234
|
-
return (
|
|
234
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence, { from: Math.round(info.overlayFrom), durationInFrames: info.durationInFrames, name: "<TS.Overlay>", layout: "absolute-fill", children: info.children }, `overlay-${info.index}`));
|
|
235
235
|
});
|
|
236
236
|
return [...(mainChildren || []), ...overlayElements];
|
|
237
237
|
}, [children, fps, frame]);
|
|
238
238
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
239
|
-
return
|
|
239
|
+
return jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: childrenValue });
|
|
240
240
|
};
|
|
241
241
|
/*
|
|
242
242
|
* @description Manages a series of transitions and sequences for advanced animation controls in Remotion projects, handling cases with varying timings and presentations.
|
|
@@ -249,7 +249,7 @@ const TransitionSeries = ({ children, name, layout: passedLayout, ...otherProps
|
|
|
249
249
|
layout !== 'absolute-fill') {
|
|
250
250
|
throw new TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);
|
|
251
251
|
}
|
|
252
|
-
return (
|
|
252
|
+
return (jsx_runtime_1.jsx(remotion_1.Sequence, { name: displayName, layout: layout, ...otherProps, children: jsx_runtime_1.jsx(TransitionSeriesChildren, { children: children }) }));
|
|
253
253
|
};
|
|
254
254
|
exports.TransitionSeries = TransitionSeries;
|
|
255
255
|
exports.TransitionSeries.Sequence = SeriesSequence;
|
package/dist/context.js
CHANGED
|
@@ -44,7 +44,7 @@ const WrapInEnteringProgressContext = ({ presentationProgress, children }) => {
|
|
|
44
44
|
enteringProgress: presentationProgress,
|
|
45
45
|
};
|
|
46
46
|
}, [presentationProgress]);
|
|
47
|
-
return (
|
|
47
|
+
return (jsx_runtime_1.jsx(exports.EnteringContext.Provider, { value: value, children: children }));
|
|
48
48
|
};
|
|
49
49
|
exports.WrapInEnteringProgressContext = WrapInEnteringProgressContext;
|
|
50
50
|
const WrapInExitingProgressContext = ({ presentationProgress, children }) => {
|
|
@@ -53,6 +53,6 @@ const WrapInExitingProgressContext = ({ presentationProgress, children }) => {
|
|
|
53
53
|
exitingProgress: presentationProgress,
|
|
54
54
|
};
|
|
55
55
|
}, [presentationProgress]);
|
|
56
|
-
return (
|
|
56
|
+
return (jsx_runtime_1.jsx(exports.ExitingContext.Provider, { value: value, children: children }));
|
|
57
57
|
};
|
|
58
58
|
exports.WrapInExitingProgressContext = WrapInExitingProgressContext;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const flattenChildren: (children: React.ReactNode) => ReactChildArray;
|
|
4
|
-
export {};
|
|
2
|
+
export declare const flattenChildren: (children: React.ReactNode) => (string | number | bigint | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal)[];
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTransitionProgress = exports.TransitionSeries = exports.springTiming = exports.linearTiming = void 0;
|
|
4
4
|
// Timings
|
|
5
|
-
|
|
5
|
+
const linear_timing_js_1 = require("./timings/linear-timing.js");
|
|
6
6
|
Object.defineProperty(exports, "linearTiming", { enumerable: true, get: function () { return linear_timing_js_1.linearTiming; } });
|
|
7
|
-
|
|
7
|
+
const spring_timing_js_1 = require("./timings/spring-timing.js");
|
|
8
8
|
Object.defineProperty(exports, "springTiming", { enumerable: true, get: function () { return spring_timing_js_1.springTiming; } });
|
|
9
9
|
// Component
|
|
10
|
-
|
|
10
|
+
const TransitionSeries_js_1 = require("./TransitionSeries.js");
|
|
11
11
|
Object.defineProperty(exports, "TransitionSeries", { enumerable: true, get: function () { return TransitionSeries_js_1.TransitionSeries; } });
|
|
12
12
|
// Hooks
|
|
13
|
-
|
|
13
|
+
const use_transition_progress_js_1 = require("./use-transition-progress.js");
|
|
14
14
|
Object.defineProperty(exports, "useTransitionProgress", { enumerable: true, get: function () { return use_transition_progress_js_1.useTransitionProgress; } });
|
|
@@ -38,7 +38,8 @@ const ClockWipePresentation = ({ children, presentationDirection, presentationPr
|
|
|
38
38
|
passedProps.outerExitStyle,
|
|
39
39
|
presentationDirection,
|
|
40
40
|
]);
|
|
41
|
-
return (
|
|
41
|
+
return (jsx_runtime_1.jsxs(remotion_1.AbsoluteFill, { style: outerStyle, children: [
|
|
42
|
+
jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { children: jsx_runtime_1.jsx("svg", { children: jsx_runtime_1.jsx("defs", { children: jsx_runtime_1.jsx("clipPath", { id: clipId, children: jsx_runtime_1.jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
|
|
42
43
|
};
|
|
43
44
|
/*
|
|
44
45
|
* @description Creates a clock wipe transition that uses a circular wipe to reveal the underlying scene as the current scene exits.
|
|
@@ -4,4 +4,4 @@ export type FadeProps = {
|
|
|
4
4
|
exitStyle?: React.CSSProperties;
|
|
5
5
|
shouldFadeOutExitingScene?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare const fade: (props?: FadeProps) => TransitionPresentation<FadeProps>;
|
|
7
|
+
export declare const fade: (props?: FadeProps | undefined) => TransitionPresentation<FadeProps>;
|
|
@@ -25,7 +25,7 @@ const FadePresentation = ({ children, presentationDirection, presentationProgres
|
|
|
25
25
|
presentationDirection,
|
|
26
26
|
presentationProgress,
|
|
27
27
|
]);
|
|
28
|
-
return
|
|
28
|
+
return jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children });
|
|
29
29
|
};
|
|
30
30
|
/*
|
|
31
31
|
* @description Provides a simple fade transition component for sliding elements in and out.
|
|
@@ -9,4 +9,4 @@ export type FlipProps = {
|
|
|
9
9
|
innerEnterStyle?: React.CSSProperties;
|
|
10
10
|
innerExitStyle?: React.CSSProperties;
|
|
11
11
|
};
|
|
12
|
-
export declare const flip: (props?: FlipProps) => TransitionPresentation<FlipProps>;
|
|
12
|
+
export declare const flip: (props?: FlipProps | undefined) => TransitionPresentation<FlipProps>;
|
|
@@ -41,7 +41,7 @@ const Flip = ({ children, presentationDirection, presentationProgress, passedPro
|
|
|
41
41
|
: outerExitStyle),
|
|
42
42
|
};
|
|
43
43
|
}, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);
|
|
44
|
-
return (
|
|
44
|
+
return (jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: outer, children: jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children }) }));
|
|
45
45
|
};
|
|
46
46
|
/*
|
|
47
47
|
* @description A presentation where the exiting slide flips by 180 degrees, revealing the next slide on the back side.
|
|
@@ -45,7 +45,8 @@ const IrisPresentation = ({ children, presentationDirection, presentationProgres
|
|
|
45
45
|
passedProps.outerExitStyle,
|
|
46
46
|
presentationDirection,
|
|
47
47
|
]);
|
|
48
|
-
return (
|
|
48
|
+
return (jsx_runtime_1.jsxs(remotion_1.AbsoluteFill, { style: outerStyle, children: [
|
|
49
|
+
jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { children: jsx_runtime_1.jsx("svg", { children: jsx_runtime_1.jsx("defs", { children: jsx_runtime_1.jsx("clipPath", { id: clipId, children: jsx_runtime_1.jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
|
|
49
50
|
};
|
|
50
51
|
/*
|
|
51
52
|
* @description Creates an iris transition that uses a circular mask starting from the center to reveal the underlying scene.
|
|
@@ -4,4 +4,4 @@ export type NoneProps = {
|
|
|
4
4
|
enterStyle?: React.CSSProperties;
|
|
5
5
|
exitStyle?: React.CSSProperties;
|
|
6
6
|
};
|
|
7
|
-
export declare const none: (props?: NoneProps) => TransitionPresentation<NoneProps>;
|
|
7
|
+
export declare const none: (props?: NoneProps | undefined) => TransitionPresentation<NoneProps>;
|
|
@@ -12,7 +12,7 @@ const NonePresentation = ({ children, presentationDirection, passedProps }) => {
|
|
|
12
12
|
: passedProps.exitStyle),
|
|
13
13
|
};
|
|
14
14
|
}, [passedProps.enterStyle, passedProps.exitStyle, presentationDirection]);
|
|
15
|
-
return
|
|
15
|
+
return jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children });
|
|
16
16
|
};
|
|
17
17
|
/*
|
|
18
18
|
* @description A presentation that has no visual effect on its own. Instead, you control the visual effect by using the useTransitionProgress() hook.
|
|
@@ -6,4 +6,4 @@ export type SlideProps = {
|
|
|
6
6
|
exitStyle?: React.CSSProperties;
|
|
7
7
|
enterStyle?: React.CSSProperties;
|
|
8
8
|
};
|
|
9
|
-
export declare const slide: (props?: SlideProps) => TransitionPresentation<SlideProps>;
|
|
9
|
+
export declare const slide: (props?: SlideProps | undefined) => TransitionPresentation<SlideProps>;
|
|
@@ -65,7 +65,7 @@ const SlidePresentation = ({ children, presentationProgress, presentationDirecti
|
|
|
65
65
|
...(presentationDirection === 'entering' ? enterStyle : exitStyle),
|
|
66
66
|
};
|
|
67
67
|
}, [directionStyle, enterStyle, exitStyle, presentationDirection]);
|
|
68
|
-
return
|
|
68
|
+
return jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children });
|
|
69
69
|
};
|
|
70
70
|
/*
|
|
71
71
|
* @description Implements a sliding transition for presentation components where the entering slide pushes the outgoing slide in a specified direction.
|
|
@@ -8,4 +8,4 @@ export type WipeProps = {
|
|
|
8
8
|
innerEnterStyle?: React.CSSProperties;
|
|
9
9
|
innerExitStyle?: React.CSSProperties;
|
|
10
10
|
};
|
|
11
|
-
export declare const wipe: (props?: WipeProps) => TransitionPresentation<WipeProps>;
|
|
11
|
+
export declare const wipe: (props?: WipeProps | undefined) => TransitionPresentation<WipeProps>;
|
|
@@ -152,7 +152,9 @@ const WipePresentation = ({ children, presentationProgress, presentationDirectio
|
|
|
152
152
|
pointerEvents: 'none',
|
|
153
153
|
};
|
|
154
154
|
}, []);
|
|
155
|
-
return (
|
|
155
|
+
return (jsx_runtime_1.jsxs(remotion_1.AbsoluteFill, { style: outerStyle, children: [
|
|
156
|
+
jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { style: style, children: children }), jsx_runtime_1.jsx(remotion_1.AbsoluteFill, { children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 1 1", style: svgStyle, children: jsx_runtime_1.jsx("defs", { children: jsx_runtime_1.jsx("clipPath", { id: clipId, clipPathUnits: "objectBoundingBox", children: jsx_runtime_1.jsx("path", { d: path, fill: "black" }) }) }) }) })
|
|
157
|
+
] }));
|
|
156
158
|
};
|
|
157
159
|
/*
|
|
158
160
|
* @description A presentation where the entering slide slides over the exiting slide.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SpringConfig } from 'remotion';
|
|
2
2
|
import type { TransitionTiming } from '../types.js';
|
|
3
3
|
export declare const springTiming: (options?: {
|
|
4
|
-
config?: Partial<SpringConfig
|
|
5
|
-
durationInFrames?: number;
|
|
6
|
-
durationRestThreshold?: number;
|
|
7
|
-
reverse?: boolean;
|
|
4
|
+
config?: Partial<SpringConfig> | undefined;
|
|
5
|
+
durationInFrames?: number | undefined;
|
|
6
|
+
durationRestThreshold?: number | undefined;
|
|
7
|
+
reverse?: boolean | undefined;
|
|
8
8
|
}) => TransitionTiming;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/transitions"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/transitions",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.424",
|
|
7
7
|
"description": "Library for creating transitions in Remotion",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"main": "dist/esm/index.mjs",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "bun test src",
|
|
14
14
|
"lint": "eslint src",
|
|
15
15
|
"formatting": "prettier --experimental-cli src --check",
|
|
16
|
-
"make": "
|
|
16
|
+
"make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts"
|
|
17
17
|
},
|
|
18
18
|
"author": "Jonny Burger",
|
|
19
19
|
"contributors": [],
|
|
@@ -22,19 +22,20 @@
|
|
|
22
22
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"remotion": "4.0.
|
|
26
|
-
"@remotion/shapes": "4.0.
|
|
27
|
-
"@remotion/paths": "4.0.
|
|
25
|
+
"remotion": "4.0.424",
|
|
26
|
+
"@remotion/shapes": "4.0.424",
|
|
27
|
+
"@remotion/paths": "4.0.424"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@happy-dom/global-registrator": "14.5.1",
|
|
31
|
-
"remotion": "4.0.
|
|
31
|
+
"remotion": "4.0.424",
|
|
32
32
|
"react": "19.2.3",
|
|
33
33
|
"react-dom": "19.2.3",
|
|
34
|
-
"@remotion/test-utils": "4.0.
|
|
35
|
-
"@remotion/player": "4.0.
|
|
36
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
37
|
-
"eslint": "9.19.0"
|
|
34
|
+
"@remotion/test-utils": "4.0.424",
|
|
35
|
+
"@remotion/player": "4.0.424",
|
|
36
|
+
"@remotion/eslint-config-internal": "4.0.424",
|
|
37
|
+
"eslint": "9.19.0",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
41
|
"react": ">=16.8.0",
|