🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

remotion

Package Overview
Dependencies
Maintainers
1
Versions
1220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remotion - npm Package Compare versions

Comparing version
4.0.477
to
4.0.478
+3
-0
dist/cjs/CompositionManager.d.ts

@@ -37,2 +37,3 @@ import type { ComponentType, LazyExoticComponent } from 'react';

playbackRate: number;
frozenMediaFrame: number | null;
} | {

@@ -45,2 +46,3 @@ type: 'video';

playbackRate: number;
frozenMediaFrame: number | null;
} | {

@@ -81,2 +83,3 @@ type: 'image';

isInsideSeries: boolean;
frozenFrame: number | null;
} & EnhancedTSequenceData;

@@ -83,0 +86,0 @@ export type AudioOrVideoAsset = {

@@ -23,3 +23,3 @@ "use strict";

const RegularSequenceRefForwardingFunction = ({ from = 0, freeze, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, hidden = false, _experimentalControls: controls, _remotionInternalEffects, _remotionInternalLoopDisplay: loopDisplay, _remotionInternalStack: stack, _remotionInternalDocumentationLink: documentationLink, _remotionInternalPremountDisplay: premountDisplay, _remotionInternalPostmountDisplay: postmountDisplay, _remotionInternalIsMedia: isMedia, _remotionInternalRefForOutline: passedRefForOutline, ...other }, ref) => {
var _a, _b;
var _a, _b, _c;
const { layout = 'absolute-fill' } = other;

@@ -152,2 +152,21 @@ const [id] = (0, react_1.useState)(() => String(Math.random()));

stackRef.current = stack !== null && stack !== void 0 ? stack : inheritedStack;
const registeredFrozenFrame = typeof freeze === 'number' ? freeze : null;
const parentCumulatedNegativeFrom = (_c = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.cumulatedNegativeFrom) !== null && _c !== void 0 ? _c : 0;
const startMediaFrom = isMedia && isMedia.type !== 'image'
? isMedia.data.startMediaFrom +
parentCumulatedNegativeFrom -
cumulatedNegativeFrom
: null;
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== 'image'
? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom
: null;
const frozenMediaFrame = isMedia && isMedia.type !== 'image' && mediaFrameAtSequenceZero !== null
? registeredFrozenFrame === null
? null
: mediaFrameAtSequenceZero +
(loopDisplay
? registeredFrozenFrame % loopDisplay.durationInFrames
: registeredFrozenFrame) *
isMedia.data.playbackRate
: null;
(0, react_1.useEffect)(() => {

@@ -180,2 +199,3 @@ var _a, _b, _c;

isInsideSeries,
frozenFrame: registeredFrozenFrame,
});

@@ -204,6 +224,8 @@ }

getStack: () => stackRef.current,
startMediaFrom: isMedia.data.startMediaFrom,
startMediaFrom: startMediaFrom !== null && startMediaFrom !== void 0 ? startMediaFrom : isMedia.data.startMediaFrom,
volume: isMedia.data.volumes,
refForOutline: refForOutline !== null && refForOutline !== void 0 ? refForOutline : null,
isInsideSeries,
frozenFrame: registeredFrozenFrame,
frozenMediaFrame,
});

@@ -234,2 +256,3 @@ }

isInsideSeries,
frozenFrame: registeredFrozenFrame,
});

@@ -262,2 +285,5 @@ return () => {

isInsideSeries,
registeredFrozenFrame,
startMediaFrom,
frozenMediaFrame,
]);

@@ -264,0 +290,0 @@ // Ceil to support floats

@@ -145,2 +145,4 @@ "use strict";

isInsideSeries: false,
frozenFrame: null,
frozenMediaFrame: null,
});

@@ -147,0 +149,0 @@ return () => {

+1
-1

@@ -6,2 +6,2 @@ /**

*/
export declare const VERSION = "4.0.477";
export declare const VERSION = "4.0.478";

@@ -10,2 +10,2 @@ "use strict";

*/
exports.VERSION = '4.0.477';
exports.VERSION = '4.0.478';
// src/version.ts
var VERSION = "4.0.477";
var VERSION = "4.0.478";
export {
VERSION
};

@@ -6,3 +6,3 @@ {

"name": "remotion",
"version": "4.0.477",
"version": "4.0.478",
"description": "Make videos programmatically",

@@ -39,3 +39,3 @@ "main": "dist/cjs/index.js",

"zod": "4.3.6",
"@remotion/eslint-config-internal": "4.0.477",
"@remotion/eslint-config-internal": "4.0.478",
"eslint": "9.19.0",

@@ -42,0 +42,0 @@ "@typescript/native-preview": "7.0.0-dev.20260217.1"

import { type InterpolateOptions } from './interpolate.js';
export type InterpolateTranslateOptions = InterpolateOptions;
export declare const interpolateTranslate: (input: number, inputRange: readonly number[], outputRange: readonly string[], options?: Partial<{
easing: import("./interpolate.js").EasingFunction | readonly import("./interpolate.js").EasingFunction[];
extrapolateLeft: import("./interpolate.js").ExtrapolateType;
extrapolateRight: import("./interpolate.js").ExtrapolateType;
posterize: number;
}> | undefined) => string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.interpolateTranslate = void 0;
const interpolate_js_1 = require("./interpolate.js");
const pixelValueRegex = /^([+-]?(?:\d+\.?\d*|\.\d+))px$/;
const parseTranslate = (value) => {
if (typeof value !== 'string') {
throw new TypeError(`outputRange must contain only strings, but got ${typeof value}`);
}
const parts = value.trim().split(/\s+/);
if (parts.length < 1 || parts.length > 3 || parts[0] === '') {
throw new TypeError(`translate values must contain 1 to 3 pixel values, but got "${value}"`);
}
return parts.map((part) => {
const match = pixelValueRegex.exec(part);
if (match === null) {
throw new TypeError(`interpolateTranslate() only supports px values, but got "${part}" in "${value}"`);
}
return Number(match[1]);
});
};
/*
* @description Allows you to map a range of values to CSS translate values using pixel units.
* @see [Documentation](https://remotion.dev/docs/interpolate-translate)
*/
const interpolateTranslate = (input, inputRange, outputRange, options) => {
var _a;
if (typeof input === 'undefined') {
throw new TypeError('input can not be undefined');
}
if (typeof inputRange === 'undefined') {
throw new TypeError('inputRange can not be undefined');
}
if (typeof outputRange === 'undefined') {
throw new TypeError('outputRange can not be undefined');
}
if (inputRange.length !== outputRange.length) {
throw new TypeError('inputRange (' +
inputRange.length +
' values provided) and outputRange (' +
outputRange.length +
' values provided) must have the same length');
}
const parsedOutputRange = outputRange.map((translateValue) => parseTranslate(translateValue));
const firstValueLength = (_a = parsedOutputRange[0]) === null || _a === void 0 ? void 0 : _a.length;
if (firstValueLength === undefined) {
throw new TypeError('outputRange must have at least 1 element');
}
for (const parsedTranslate of parsedOutputRange) {
if (parsedTranslate.length !== firstValueLength) {
throw new TypeError(`All translate values must have the same number of pixel values, but got ${firstValueLength} and ${parsedTranslate.length}`);
}
}
return new Array(firstValueLength)
.fill(true)
.map((_, index) => {
const outputValues = [];
for (const translateValue of parsedOutputRange) {
const value = translateValue[index];
if (value === undefined) {
throw new TypeError(`All translate values must have the same number of pixel values, but got ${firstValueLength} and ${translateValue.length}`);
}
outputValues.push(value);
}
const interpolatedValue = (0, interpolate_js_1.interpolate)(input, inputRange, outputValues, options);
return `${interpolatedValue}px`;
})
.join(' ');
};
exports.interpolateTranslate = interpolateTranslate;

Sorry, the diff of this file is too big to display