@remotion/gif 4.0.499 → 4.0.501

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 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,10 @@ exports.gifSchema = {
30
30
  ...remotion_1.Internals.transformSchema,
31
31
  ...remotion_1.Interactive.backgroundSchema,
32
32
  ...remotion_1.Interactive.borderSchema,
33
+ ...remotion_1.Interactive.borderRadiusSchema,
34
+ ...remotion_1.Interactive.cropSchema,
33
35
  };
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 }) => {
36
+ 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
37
  var _a;
36
38
  const env = (0, remotion_1.useRemotionEnvironment)();
37
39
  const refForOutline = react_1.default.useRef(null);
@@ -45,6 +47,14 @@ const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loop
45
47
  styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
46
48
  hideWhilePremounted: 'display-none',
47
49
  });
50
+ const croppedStyle = remotion_1.Internals.useCropStyle({
51
+ cropLeft,
52
+ cropRight,
53
+ cropTop,
54
+ cropBottom,
55
+ style: premountingStyle,
56
+ componentName: '<Gif />',
57
+ });
48
58
  const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
49
59
  const memoizedEffects = useMemoizedEffects({
50
60
  effects,
@@ -62,7 +72,7 @@ const GifInner = ({ src, width, height, onLoad, onError, fit, playbackRate, loop
62
72
  id,
63
73
  delayRenderTimeoutInMilliseconds,
64
74
  requestInit,
65
- style: premountingStyle !== null && premountingStyle !== void 0 ? premountingStyle : undefined,
75
+ style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined,
66
76
  effects: memoizedEffects,
67
77
  };
68
78
  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 }));
@@ -1456,7 +1456,9 @@ var gifSchema = {
1456
1456
  },
1457
1457
  ...Internals3.transformSchema,
1458
1458
  ...Interactive.backgroundSchema,
1459
- ...Interactive.borderSchema
1459
+ ...Interactive.borderSchema,
1460
+ ...Interactive.borderRadiusSchema,
1461
+ ...Interactive.cropSchema
1460
1462
  };
1461
1463
  var GifInner = ({
1462
1464
  src: src2,
@@ -1477,6 +1479,10 @@ var GifInner = ({
1477
1479
  styleWhilePremounted,
1478
1480
  styleWhilePostmounted,
1479
1481
  style,
1482
+ cropLeft,
1483
+ cropRight,
1484
+ cropTop,
1485
+ cropBottom,
1480
1486
  controls,
1481
1487
  effects = [],
1482
1488
  ref,
@@ -1502,6 +1508,14 @@ var GifInner = ({
1502
1508
  styleWhilePostmounted: styleWhilePostmounted ?? null,
1503
1509
  hideWhilePremounted: "display-none"
1504
1510
  });
1511
+ const croppedStyle = Internals3.useCropStyle({
1512
+ cropLeft,
1513
+ cropRight,
1514
+ cropTop,
1515
+ cropBottom,
1516
+ style: premountingStyle,
1517
+ componentName: "<Gif />"
1518
+ });
1505
1519
  const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
1506
1520
  const memoizedEffects = useMemoizedEffects({
1507
1521
  effects,
@@ -1519,7 +1533,7 @@ var GifInner = ({
1519
1533
  id,
1520
1534
  delayRenderTimeoutInMilliseconds,
1521
1535
  requestInit,
1522
- style: premountingStyle ?? undefined,
1536
+ style: croppedStyle ?? undefined,
1523
1537
  effects: memoizedEffects
1524
1538
  };
1525
1539
  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.499",
6
+ "version": "4.0.501",
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.499"
33
+ "remotion": "4.0.501"
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.499",
41
+ "@remotion/eslint-config-internal": "4.0.501",
42
42
  "eslint": "9.19.0",
43
43
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
44
44
  },