@remotion/transitions 4.0.148 → 4.0.150
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/bundle.ts +17 -5
- package/dist/TransitionSeries.d.ts +1 -1
- package/dist/TransitionSeries.js +13 -5
- package/dist/esm/clock-wipe.mjs +10 -9
- package/dist/esm/fade.mjs +1 -1
- package/dist/esm/flip.mjs +2 -2
- package/dist/esm/index.mjs +13 -16
- package/dist/esm/slide.mjs +1 -2
- package/dist/esm/wipe.mjs +10 -9
- package/dist/presentations/slide.js +0 -1
- package/package.json +7 -8
package/bundle.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import {build} from 'bun';
|
|
1
|
+
import {build, revision} from 'bun';
|
|
3
2
|
import path from 'path';
|
|
4
3
|
|
|
4
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5
|
+
throw new Error('This script must be run using NODE_ENV=production');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (!revision.startsWith('07ce')) {
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
10
|
+
console.warn('warn: Remotion currently uses a fork of Bun to bundle.');
|
|
11
|
+
// eslint-disable-next-line no-console
|
|
12
|
+
console.log(
|
|
13
|
+
'You dont currently run the fork, this could lead to duplicate key warnings in React.',
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const presentations = ['slide', 'flip', 'wipe', 'fade', 'clock-wipe'];
|
|
18
|
+
|
|
5
19
|
const output = await build({
|
|
6
20
|
entrypoints: [
|
|
7
21
|
'src/index.ts',
|
|
@@ -22,9 +36,7 @@ const output = await build({
|
|
|
22
36
|
|
|
23
37
|
for (const file of output.outputs) {
|
|
24
38
|
const str = await file.text();
|
|
25
|
-
const newStr = str
|
|
26
|
-
.replace(/jsxDEV/g, 'jsx')
|
|
27
|
-
.replace(/react\/jsx-dev-runtime/g, 'react/jsx-runtime');
|
|
39
|
+
const newStr = str;
|
|
28
40
|
|
|
29
41
|
Bun.write(path.join('dist', 'esm', file.path), newStr);
|
|
30
42
|
}
|
|
@@ -13,7 +13,7 @@ type SeriesSequenceProps = PropsWithChildren<{
|
|
|
13
13
|
*/
|
|
14
14
|
readonly stack?: string;
|
|
15
15
|
} & LayoutBasedProps & Pick<SequencePropsWithoutDuration, 'name'>>;
|
|
16
|
-
declare const SeriesSequence: ({ children }: SeriesSequenceProps) => import("react
|
|
16
|
+
declare const SeriesSequence: ({ children }: SeriesSequenceProps) => import("react").ReactNode;
|
|
17
17
|
/**
|
|
18
18
|
* @description A React component designed to manage a series of transitions and sequences where each transition may have specific timing and presentation components. It extends the capabilities of `<Sequence>` and is specifically structured to handle transitions that involve entering and exiting sequences.
|
|
19
19
|
* @see [Documentation](https://remotion.dev/docs/transitions/transitionseries)
|
package/dist/TransitionSeries.js
CHANGED
|
@@ -16,7 +16,7 @@ _props) {
|
|
|
16
16
|
};
|
|
17
17
|
const SeriesSequence = ({ children }) => {
|
|
18
18
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
19
|
-
return
|
|
19
|
+
return children;
|
|
20
20
|
};
|
|
21
21
|
const TransitionSeriesChildren = ({ children, }) => {
|
|
22
22
|
const { fps } = (0, remotion_1.useVideoConfig)();
|
|
@@ -123,19 +123,27 @@ const TransitionSeriesChildren = ({ children, }) => {
|
|
|
123
123
|
const prevPresentation = (_c = prev.props.presentation) !== null && _c !== void 0 ? _c : (0, slide_js_1.slide)();
|
|
124
124
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
125
125
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
126
|
-
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
126
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
127
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
128
|
+
, { from: Math.floor(actualStartFrame), durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: (0, jsx_runtime_1.jsx)(UppercaseNextPresentation, { passedProps: (_d = nextPresentation.props) !== null && _d !== void 0 ? _d : {}, presentationDirection: "exiting", presentationProgress: nextProgress, children: (0, jsx_runtime_1.jsx)(UppercasePrevPresentation, { passedProps: (_e = prevPresentation.props) !== null && _e !== void 0 ? _e : {}, presentationDirection: "entering", presentationProgress: prevProgress, children: child }) }) }, i));
|
|
127
129
|
}
|
|
128
130
|
if (prevProgress !== null && prev) {
|
|
129
131
|
const prevPresentation = (_f = prev.props.presentation) !== null && _f !== void 0 ? _f : (0, slide_js_1.slide)();
|
|
130
132
|
const UppercasePrevPresentation = prevPresentation.component;
|
|
131
|
-
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
133
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
134
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
135
|
+
, { from: Math.floor(actualStartFrame), durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: (0, jsx_runtime_1.jsx)(UppercasePrevPresentation, { passedProps: (_g = prevPresentation.props) !== null && _g !== void 0 ? _g : {}, presentationDirection: "entering", presentationProgress: prevProgress, children: child }) }, i));
|
|
132
136
|
}
|
|
133
137
|
if (nextProgress !== null && next) {
|
|
134
138
|
const nextPresentation = (_h = next.props.presentation) !== null && _h !== void 0 ? _h : (0, slide_js_1.slide)();
|
|
135
139
|
const UppercaseNextPresentation = nextPresentation.component;
|
|
136
|
-
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
140
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
141
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
142
|
+
, { from: Math.floor(actualStartFrame), durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: (0, jsx_runtime_1.jsx)(UppercaseNextPresentation, { passedProps: (_j = nextPresentation.props) !== null && _j !== void 0 ? _j : {}, presentationDirection: "exiting", presentationProgress: nextProgress, children: child }) }, i));
|
|
137
143
|
}
|
|
138
|
-
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
144
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Sequence
|
|
145
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
146
|
+
, { from: Math.floor(actualStartFrame), durationInFrames: durationInFramesProp, ...passedProps, name: passedProps.name || '<TS.Sequence>', children: child }, i));
|
|
139
147
|
});
|
|
140
148
|
}, [children, fps, frame]);
|
|
141
149
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
package/dist/esm/clock-wipe.mjs
CHANGED
|
@@ -4,7 +4,8 @@ import {makePie} from "@remotion/shapes";
|
|
|
4
4
|
import {useMemo, useState} from "react";
|
|
5
5
|
import {AbsoluteFill, random} from "remotion";
|
|
6
6
|
import {
|
|
7
|
-
jsx
|
|
7
|
+
jsx,
|
|
8
|
+
jsxs
|
|
8
9
|
} from "react/jsx-runtime";
|
|
9
10
|
var ClockWipePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {
|
|
10
11
|
const finishedRadius = Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;
|
|
@@ -34,13 +35,13 @@ var ClockWipePresentation = ({ children, presentationDirection, presentationProg
|
|
|
34
35
|
passedProps.outerExitStyle,
|
|
35
36
|
presentationDirection
|
|
36
37
|
]);
|
|
37
|
-
return
|
|
38
|
+
return jsxs(AbsoluteFill, {
|
|
38
39
|
style: outerStyle,
|
|
39
40
|
children: [
|
|
40
41
|
jsx(AbsoluteFill, {
|
|
41
42
|
style,
|
|
42
43
|
children
|
|
43
|
-
}
|
|
44
|
+
}),
|
|
44
45
|
presentationDirection === "exiting" ? null : jsx(AbsoluteFill, {
|
|
45
46
|
children: jsx("svg", {
|
|
46
47
|
children: jsx("defs", {
|
|
@@ -49,13 +50,13 @@ var ClockWipePresentation = ({ children, presentationDirection, presentationProg
|
|
|
49
50
|
children: jsx("path", {
|
|
50
51
|
d: translatedPath,
|
|
51
52
|
fill: "black"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
57
58
|
]
|
|
58
|
-
}
|
|
59
|
+
});
|
|
59
60
|
};
|
|
60
61
|
var clockWipe = (props) => {
|
|
61
62
|
return { component: ClockWipePresentation, props: props ?? {} };
|
package/dist/esm/fade.mjs
CHANGED
package/dist/esm/flip.mjs
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -13,7 +13,6 @@ var SlidePresentation = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const directionStyle = useMemo(() => {
|
|
15
15
|
const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;
|
|
16
|
-
console.log(presentationProgressWithEpsilonCorrection);
|
|
17
16
|
if (presentationDirection === "exiting") {
|
|
18
17
|
switch (direction) {
|
|
19
18
|
case "from-left":
|
|
@@ -70,7 +69,7 @@ var SlidePresentation = ({
|
|
|
70
69
|
return jsx(AbsoluteFill, {
|
|
71
70
|
style,
|
|
72
71
|
children
|
|
73
|
-
}
|
|
72
|
+
});
|
|
74
73
|
};
|
|
75
74
|
var slide = (props) => {
|
|
76
75
|
return {
|
|
@@ -158,9 +157,7 @@ var TransitionSeriesTransition = function(_props) {
|
|
|
158
157
|
return null;
|
|
159
158
|
};
|
|
160
159
|
var SeriesSequence = ({ children }) => {
|
|
161
|
-
return
|
|
162
|
-
children
|
|
163
|
-
}, undefined, false, undefined, this);
|
|
160
|
+
return children;
|
|
164
161
|
};
|
|
165
162
|
var TransitionSeriesChildren = ({
|
|
166
163
|
children
|
|
@@ -265,9 +262,9 @@ var TransitionSeriesChildren = ({
|
|
|
265
262
|
presentationDirection: "entering",
|
|
266
263
|
presentationProgress: prevProgress,
|
|
267
264
|
children: child
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
},
|
|
265
|
+
})
|
|
266
|
+
})
|
|
267
|
+
}, i);
|
|
271
268
|
}
|
|
272
269
|
if (prevProgress !== null && prev) {
|
|
273
270
|
const prevPresentation = prev.props.presentation ?? slide();
|
|
@@ -282,8 +279,8 @@ var TransitionSeriesChildren = ({
|
|
|
282
279
|
presentationDirection: "entering",
|
|
283
280
|
presentationProgress: prevProgress,
|
|
284
281
|
children: child
|
|
285
|
-
}
|
|
286
|
-
},
|
|
282
|
+
})
|
|
283
|
+
}, i);
|
|
287
284
|
}
|
|
288
285
|
if (nextProgress !== null && next) {
|
|
289
286
|
const nextPresentation = next.props.presentation ?? slide();
|
|
@@ -298,8 +295,8 @@ var TransitionSeriesChildren = ({
|
|
|
298
295
|
presentationDirection: "exiting",
|
|
299
296
|
presentationProgress: nextProgress,
|
|
300
297
|
children: child
|
|
301
|
-
}
|
|
302
|
-
},
|
|
298
|
+
})
|
|
299
|
+
}, i);
|
|
303
300
|
}
|
|
304
301
|
return jsx2(Sequence, {
|
|
305
302
|
from: Math.floor(actualStartFrame),
|
|
@@ -307,12 +304,12 @@ var TransitionSeriesChildren = ({
|
|
|
307
304
|
...passedProps,
|
|
308
305
|
name: passedProps.name || "<TS.Sequence>",
|
|
309
306
|
children: child
|
|
310
|
-
},
|
|
307
|
+
}, i);
|
|
311
308
|
});
|
|
312
309
|
}, [children, fps, frame]);
|
|
313
310
|
return jsx2(Fragment, {
|
|
314
311
|
children: childrenValue
|
|
315
|
-
}
|
|
312
|
+
});
|
|
316
313
|
};
|
|
317
314
|
var TransitionSeries = ({ children, name, layout: passedLayout, ...otherProps }) => {
|
|
318
315
|
const displayName = name ?? "<TransitionSeries>";
|
|
@@ -326,8 +323,8 @@ var TransitionSeries = ({ children, name, layout: passedLayout, ...otherProps })
|
|
|
326
323
|
...otherProps,
|
|
327
324
|
children: jsx2(TransitionSeriesChildren, {
|
|
328
325
|
children
|
|
329
|
-
}
|
|
330
|
-
}
|
|
326
|
+
})
|
|
327
|
+
});
|
|
331
328
|
};
|
|
332
329
|
TransitionSeries.Sequence = SeriesSequence;
|
|
333
330
|
TransitionSeries.Transition = TransitionSeriesTransition;
|
package/dist/esm/slide.mjs
CHANGED
|
@@ -13,7 +13,6 @@ var SlidePresentation = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
const directionStyle = useMemo(() => {
|
|
15
15
|
const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;
|
|
16
|
-
console.log(presentationProgressWithEpsilonCorrection);
|
|
17
16
|
if (presentationDirection === "exiting") {
|
|
18
17
|
switch (direction) {
|
|
19
18
|
case "from-left":
|
|
@@ -70,7 +69,7 @@ var SlidePresentation = ({
|
|
|
70
69
|
return jsx(AbsoluteFill, {
|
|
71
70
|
style,
|
|
72
71
|
children
|
|
73
|
-
}
|
|
72
|
+
});
|
|
74
73
|
};
|
|
75
74
|
var slide = (props) => {
|
|
76
75
|
return {
|
package/dist/esm/wipe.mjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import {useMemo, useState} from "react";
|
|
3
3
|
import {AbsoluteFill, random} from "remotion";
|
|
4
4
|
import {
|
|
5
|
-
jsx
|
|
5
|
+
jsx,
|
|
6
|
+
jsxs
|
|
6
7
|
} from "react/jsx-runtime";
|
|
7
8
|
var makePathIn = (progress, direction) => {
|
|
8
9
|
switch (direction) {
|
|
@@ -155,13 +156,13 @@ var WipePresentation = ({
|
|
|
155
156
|
pointerEvents: "none"
|
|
156
157
|
};
|
|
157
158
|
}, []);
|
|
158
|
-
return
|
|
159
|
+
return jsxs(AbsoluteFill, {
|
|
159
160
|
style: outerStyle,
|
|
160
161
|
children: [
|
|
161
162
|
jsx(AbsoluteFill, {
|
|
162
163
|
style,
|
|
163
164
|
children
|
|
164
|
-
}
|
|
165
|
+
}),
|
|
165
166
|
jsx(AbsoluteFill, {
|
|
166
167
|
children: jsx("svg", {
|
|
167
168
|
viewBox: "0 0 1 1",
|
|
@@ -173,13 +174,13 @@ var WipePresentation = ({
|
|
|
173
174
|
children: jsx("path", {
|
|
174
175
|
d: path,
|
|
175
176
|
fill: "black"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
})
|
|
181
182
|
]
|
|
182
|
-
}
|
|
183
|
+
});
|
|
183
184
|
};
|
|
184
185
|
var wipe = (props) => {
|
|
185
186
|
return {
|
|
@@ -12,7 +12,6 @@ const SlidePresentation = ({ children, presentationProgress, presentationDirecti
|
|
|
12
12
|
const presentationProgressWithEpsilonCorrection = presentationProgress === 1
|
|
13
13
|
? presentationProgress * 100
|
|
14
14
|
: presentationProgress * 100 - epsilon;
|
|
15
|
-
console.log(presentationProgressWithEpsilonCorrection);
|
|
16
15
|
if (presentationDirection === 'exiting') {
|
|
17
16
|
switch (direction) {
|
|
18
17
|
case 'from-left':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/transitions",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.150",
|
|
4
4
|
"description": "Transition presets for Remotion",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/esm/index.mjs",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"remotion": "4.0.
|
|
20
|
-
"@remotion/
|
|
21
|
-
"@remotion/
|
|
19
|
+
"remotion": "4.0.150",
|
|
20
|
+
"@remotion/paths": "4.0.150",
|
|
21
|
+
"@remotion/shapes": "4.0.150"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jonny/eslint-config": "3.0.281",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@types/react-dom": "18.3.0",
|
|
33
33
|
"@types/bun": "^1.0.12",
|
|
34
34
|
"@vitejs/plugin-react": "^2.0.0",
|
|
35
|
-
"remotion": "4.0.
|
|
36
|
-
"@remotion/test-utils": "4.0.
|
|
35
|
+
"remotion": "4.0.150",
|
|
36
|
+
"@remotion/test-utils": "4.0.150"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=16.8.0",
|
|
@@ -108,7 +108,6 @@
|
|
|
108
108
|
"test": "vitest src --run",
|
|
109
109
|
"lint": "eslint src --ext ts,tsx",
|
|
110
110
|
"formatting": "prettier src --check",
|
|
111
|
-
"
|
|
112
|
-
"build": "tsc -d && bun bundle.ts"
|
|
111
|
+
"build": "bun --env-file=../.env.bundle bundle.ts"
|
|
113
112
|
}
|
|
114
113
|
}
|