@remotion/gif 4.0.498 → 4.0.500
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/cjs/Gif.d.ts +3 -3
- package/dist/cjs/Gif.js +11 -2
- package/dist/esm/index.mjs +15 -2
- package/package.json +3 -3
package/dist/cjs/Gif.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type EffectsProp, type InteractiveBaseProps, type InteractivePremountProps, type InteractiveTransformProps, type SequenceControls, type InteractivitySchema } from 'remotion';
|
|
2
|
+
import { type EffectsProp, type InteractiveBaseProps, type InteractiveCropProps, type InteractivePremountProps, type InteractiveTransformProps, type SequenceControls, type InteractivitySchema } from 'remotion';
|
|
3
3
|
import type { RemotionGifProps } from './props';
|
|
4
|
-
export type GifProps = InteractiveBaseProps & InteractivePremountProps & InteractiveTransformProps & RemotionGifProps & {
|
|
4
|
+
export type GifProps = InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps & InteractiveTransformProps & RemotionGifProps & {
|
|
5
5
|
readonly effects?: EffectsProp;
|
|
6
6
|
};
|
|
7
7
|
export declare const gifSchema: InteractivitySchema;
|
|
8
|
-
export declare const Gif: React.ComponentType<InteractiveBaseProps & InteractivePremountProps & InteractiveTransformProps & RemotionGifProps & {
|
|
8
|
+
export declare const Gif: React.ComponentType<InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps & InteractiveTransformProps & RemotionGifProps & {
|
|
9
9
|
readonly effects?: EffectsProp | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
readonly controls?: SequenceControls | undefined;
|
package/dist/cjs/Gif.js
CHANGED
|
@@ -30,8 +30,9 @@ exports.gifSchema = {
|
|
|
30
30
|
...remotion_1.Internals.transformSchema,
|
|
31
31
|
...remotion_1.Interactive.backgroundSchema,
|
|
32
32
|
...remotion_1.Interactive.borderSchema,
|
|
33
|
+
...remotion_1.Interactive.cropSchema,
|
|
33
34
|
};
|
|
34
|
-
const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loopBehavior, id, delayRenderTimeoutInMilliseconds, requestInit, durationInFrames, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, style, controls, effects = [], ref, ...sequenceProps }) => {
|
|
35
|
+
const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loopBehavior, id, delayRenderTimeoutInMilliseconds, requestInit, durationInFrames, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, style, cropLeft, cropRight, cropTop, cropBottom, controls, effects = [], ref, ...sequenceProps }) => {
|
|
35
36
|
var _a;
|
|
36
37
|
const env = (0, remotion_1.useRemotionEnvironment)();
|
|
37
38
|
const refForOutline = react_1.default.useRef(null);
|
|
@@ -45,6 +46,14 @@ const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loop
|
|
|
45
46
|
styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
|
|
46
47
|
hideWhilePremounted: 'display-none',
|
|
47
48
|
});
|
|
49
|
+
const croppedStyle = remotion_1.Internals.useCropStyle({
|
|
50
|
+
cropLeft,
|
|
51
|
+
cropRight,
|
|
52
|
+
cropTop,
|
|
53
|
+
cropBottom,
|
|
54
|
+
style: premountingStyle,
|
|
55
|
+
componentName: '<Gif />',
|
|
56
|
+
});
|
|
48
57
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
49
58
|
const memoizedEffects = useMemoizedEffects({
|
|
50
59
|
effects,
|
|
@@ -62,7 +71,7 @@ const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loop
|
|
|
62
71
|
id,
|
|
63
72
|
delayRenderTimeoutInMilliseconds,
|
|
64
73
|
requestInit,
|
|
65
|
-
style:
|
|
74
|
+
style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined,
|
|
66
75
|
effects: memoizedEffects,
|
|
67
76
|
};
|
|
68
77
|
const inner = env.isRendering ? (jsx_runtime_1.jsx(GifForRendering_1.GifForRendering, { ...gifProps, ref: ref })) : (jsx_runtime_1.jsx(GifForDevelopment_1.GifForDevelopment, { ...gifProps, ref: ref, refForOutline: refForOutline }));
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1456,7 +1456,8 @@ var gifSchema = {
|
|
|
1456
1456
|
},
|
|
1457
1457
|
...Internals3.transformSchema,
|
|
1458
1458
|
...Interactive.backgroundSchema,
|
|
1459
|
-
...Interactive.borderSchema
|
|
1459
|
+
...Interactive.borderSchema,
|
|
1460
|
+
...Interactive.cropSchema
|
|
1460
1461
|
};
|
|
1461
1462
|
var GifInner = ({
|
|
1462
1463
|
src: src2,
|
|
@@ -1477,6 +1478,10 @@ var GifInner = ({
|
|
|
1477
1478
|
styleWhilePremounted,
|
|
1478
1479
|
styleWhilePostmounted,
|
|
1479
1480
|
style,
|
|
1481
|
+
cropLeft,
|
|
1482
|
+
cropRight,
|
|
1483
|
+
cropTop,
|
|
1484
|
+
cropBottom,
|
|
1480
1485
|
controls,
|
|
1481
1486
|
effects = [],
|
|
1482
1487
|
ref,
|
|
@@ -1502,6 +1507,14 @@ var GifInner = ({
|
|
|
1502
1507
|
styleWhilePostmounted: styleWhilePostmounted ?? null,
|
|
1503
1508
|
hideWhilePremounted: "display-none"
|
|
1504
1509
|
});
|
|
1510
|
+
const croppedStyle = Internals3.useCropStyle({
|
|
1511
|
+
cropLeft,
|
|
1512
|
+
cropRight,
|
|
1513
|
+
cropTop,
|
|
1514
|
+
cropBottom,
|
|
1515
|
+
style: premountingStyle,
|
|
1516
|
+
componentName: "<Gif />"
|
|
1517
|
+
});
|
|
1505
1518
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
1506
1519
|
const memoizedEffects = useMemoizedEffects({
|
|
1507
1520
|
effects,
|
|
@@ -1519,7 +1532,7 @@ var GifInner = ({
|
|
|
1519
1532
|
id,
|
|
1520
1533
|
delayRenderTimeoutInMilliseconds,
|
|
1521
1534
|
requestInit,
|
|
1522
|
-
style:
|
|
1535
|
+
style: croppedStyle ?? undefined,
|
|
1523
1536
|
effects: memoizedEffects
|
|
1524
1537
|
};
|
|
1525
1538
|
const inner = env.isRendering ? /* @__PURE__ */ jsx4(GifForRendering, {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/gif"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/gif",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.500",
|
|
7
7
|
"description": "Embed GIFs in a Remotion video",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"remotion": "4.0.
|
|
33
|
+
"remotion": "4.0.500"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@testing-library/react": "16.1.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react": "19.2.3",
|
|
39
39
|
"react-dom": "19.2.3",
|
|
40
40
|
"webpack": "5.105.0",
|
|
41
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.500",
|
|
42
42
|
"eslint": "9.19.0",
|
|
43
43
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
44
44
|
},
|