@remotion/vercel 4.0.537 → 4.0.538
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/add-bundle-to-sandbox.d.ts +1 -1
- package/dist/create-sandbox.d.ts +1 -1
- package/dist/esm/index.mjs +54 -44
- package/dist/get-render-progress.d.ts +1 -1
- package/dist/internals/disposable.d.ts +2 -1
- package/dist/internals/format-sandbox-error.d.ts +1 -1
- package/dist/internals/install-browser.d.ts +1 -1
- package/dist/internals/install-js-dependencies.d.ts +1 -1
- package/dist/internals/install-system-dependencies.d.ts +1 -1
- package/dist/internals/patch-compositor.d.ts +1 -1
- package/dist/render-still-on-vercel.d.ts +1 -1
- package/dist/upload-to-vercel-blob.d.ts +1 -1
- package/package.json +7 -7
package/dist/create-sandbox.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Sandbox } from '@vercel/sandbox';
|
|
|
2
2
|
import type { CreateSandboxOnProgress, VercelSandbox } from './types';
|
|
3
3
|
type CreateSandboxResources = NonNullable<NonNullable<Parameters<typeof Sandbox.create>[0]>['resources']>;
|
|
4
4
|
export declare const SANDBOX_CREATING_TIMEOUT: number;
|
|
5
|
-
export declare function createSandbox({ onProgress, resources, timeoutInMilliseconds }?: {
|
|
5
|
+
export declare function createSandbox({ onProgress, resources, timeoutInMilliseconds, }?: {
|
|
6
6
|
onProgress?: CreateSandboxOnProgress;
|
|
7
7
|
resources?: CreateSandboxResources;
|
|
8
8
|
timeoutInMilliseconds?: number;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -426,27 +426,30 @@ function springCalculation({
|
|
|
426
426
|
stiffness: config.stiffness ?? defaultSpringConfig.stiffness,
|
|
427
427
|
overshootClamping: config.overshootClamping ?? defaultSpringConfig.overshootClamping
|
|
428
428
|
};
|
|
429
|
-
const
|
|
430
|
-
frame,
|
|
429
|
+
const configKey = [
|
|
431
430
|
fps,
|
|
432
431
|
resolvedConfig.damping,
|
|
433
432
|
resolvedConfig.mass,
|
|
434
433
|
resolvedConfig.overshootClamping,
|
|
435
434
|
resolvedConfig.stiffness
|
|
436
435
|
].join("-");
|
|
436
|
+
const cacheKey = \`\${frame}-\${configKey}\`;
|
|
437
437
|
if (calculationCache[cacheKey]) {
|
|
438
438
|
return calculationCache[cacheKey];
|
|
439
439
|
}
|
|
440
|
-
|
|
440
|
+
const frameClamped = Math.max(0, frame);
|
|
441
|
+
const previousFrame = Math.ceil(frameClamped) - 1;
|
|
442
|
+
const previousAnimation = previousFrame >= 0 ? calculationCache[\`\${previousFrame}-\${configKey}\`] : undefined;
|
|
443
|
+
let animation = previousAnimation ?? {
|
|
441
444
|
lastTimestamp: 0,
|
|
442
445
|
current: from,
|
|
443
446
|
toValue: to,
|
|
444
447
|
velocity: 0,
|
|
445
448
|
prevPosition: 0
|
|
446
449
|
};
|
|
447
|
-
const frameClamped = Math.max(0, frame);
|
|
448
450
|
const unevenRest = frameClamped % 1;
|
|
449
|
-
|
|
451
|
+
const startFrame = previousAnimation ? previousFrame + 1 : 0;
|
|
452
|
+
for (let f = startFrame;f <= Math.floor(frameClamped); f++) {
|
|
450
453
|
const time = f / fps * 1000;
|
|
451
454
|
animation = advance({
|
|
452
455
|
animation,
|
|
@@ -580,6 +583,7 @@ function spring({
|
|
|
580
583
|
}
|
|
581
584
|
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
582
585
|
var springEasingDurationInFrames = 30;
|
|
586
|
+
var easeBezier = null;
|
|
583
587
|
|
|
584
588
|
class Easing {
|
|
585
589
|
static step0(n) {
|
|
@@ -592,7 +596,8 @@ class Easing {
|
|
|
592
596
|
return t;
|
|
593
597
|
}
|
|
594
598
|
static ease(t) {
|
|
595
|
-
|
|
599
|
+
easeBezier ??= Easing.bezier(0.42, 0, 1, 1);
|
|
600
|
+
return easeBezier(t);
|
|
596
601
|
}
|
|
597
602
|
static quad(t) {
|
|
598
603
|
return t * t;
|
|
@@ -1990,23 +1995,23 @@ var MODERN_VALUE = "(?:none|[-+]?\\\\d*\\\\.?\\\\d+(?:%|deg|rad|grad|turn)?)";
|
|
|
1990
1995
|
function modernColorCall(name) {
|
|
1991
1996
|
return new RegExp(name + "\\\\(\\\\s*(" + MODERN_VALUE + ")\\\\s+(" + MODERN_VALUE + ")\\\\s+(" + MODERN_VALUE + ")(?:\\\\s*\\\\/\\\\s*(" + MODERN_VALUE + "))?\\\\s*\\\\)");
|
|
1992
1997
|
}
|
|
1998
|
+
var cachedMatchers = {
|
|
1999
|
+
rgb: undefined,
|
|
2000
|
+
rgba: undefined,
|
|
2001
|
+
hsl: undefined,
|
|
2002
|
+
hsla: undefined,
|
|
2003
|
+
hex3: undefined,
|
|
2004
|
+
hex4: undefined,
|
|
2005
|
+
hex5: undefined,
|
|
2006
|
+
hex6: undefined,
|
|
2007
|
+
hex8: undefined,
|
|
2008
|
+
oklch: undefined,
|
|
2009
|
+
oklab: undefined,
|
|
2010
|
+
lab: undefined,
|
|
2011
|
+
lch: undefined,
|
|
2012
|
+
hwb: undefined
|
|
2013
|
+
};
|
|
1993
2014
|
function getMatchers() {
|
|
1994
|
-
const cachedMatchers = {
|
|
1995
|
-
rgb: undefined,
|
|
1996
|
-
rgba: undefined,
|
|
1997
|
-
hsl: undefined,
|
|
1998
|
-
hsla: undefined,
|
|
1999
|
-
hex3: undefined,
|
|
2000
|
-
hex4: undefined,
|
|
2001
|
-
hex5: undefined,
|
|
2002
|
-
hex6: undefined,
|
|
2003
|
-
hex8: undefined,
|
|
2004
|
-
oklch: undefined,
|
|
2005
|
-
oklab: undefined,
|
|
2006
|
-
lab: undefined,
|
|
2007
|
-
lch: undefined,
|
|
2008
|
-
hwb: undefined
|
|
2009
|
-
};
|
|
2010
2015
|
if (cachedMatchers.rgb === undefined) {
|
|
2011
2016
|
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
2012
2017
|
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
@@ -3040,27 +3045,30 @@ function springCalculation({
|
|
|
3040
3045
|
stiffness: config.stiffness ?? defaultSpringConfig.stiffness,
|
|
3041
3046
|
overshootClamping: config.overshootClamping ?? defaultSpringConfig.overshootClamping
|
|
3042
3047
|
};
|
|
3043
|
-
const
|
|
3044
|
-
frame,
|
|
3048
|
+
const configKey = [
|
|
3045
3049
|
fps,
|
|
3046
3050
|
resolvedConfig.damping,
|
|
3047
3051
|
resolvedConfig.mass,
|
|
3048
3052
|
resolvedConfig.overshootClamping,
|
|
3049
3053
|
resolvedConfig.stiffness
|
|
3050
3054
|
].join("-");
|
|
3055
|
+
const cacheKey = \`\${frame}-\${configKey}\`;
|
|
3051
3056
|
if (calculationCache[cacheKey]) {
|
|
3052
3057
|
return calculationCache[cacheKey];
|
|
3053
3058
|
}
|
|
3054
|
-
|
|
3059
|
+
const frameClamped = Math.max(0, frame);
|
|
3060
|
+
const previousFrame = Math.ceil(frameClamped) - 1;
|
|
3061
|
+
const previousAnimation = previousFrame >= 0 ? calculationCache[\`\${previousFrame}-\${configKey}\`] : undefined;
|
|
3062
|
+
let animation = previousAnimation ?? {
|
|
3055
3063
|
lastTimestamp: 0,
|
|
3056
3064
|
current: from,
|
|
3057
3065
|
toValue: to,
|
|
3058
3066
|
velocity: 0,
|
|
3059
3067
|
prevPosition: 0
|
|
3060
3068
|
};
|
|
3061
|
-
const frameClamped = Math.max(0, frame);
|
|
3062
3069
|
const unevenRest = frameClamped % 1;
|
|
3063
|
-
|
|
3070
|
+
const startFrame = previousAnimation ? previousFrame + 1 : 0;
|
|
3071
|
+
for (let f = startFrame;f <= Math.floor(frameClamped); f++) {
|
|
3064
3072
|
const time = f / fps * 1000;
|
|
3065
3073
|
animation = advance({
|
|
3066
3074
|
animation,
|
|
@@ -3194,6 +3202,7 @@ function spring({
|
|
|
3194
3202
|
}
|
|
3195
3203
|
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
3196
3204
|
var springEasingDurationInFrames = 30;
|
|
3205
|
+
var easeBezier = null;
|
|
3197
3206
|
|
|
3198
3207
|
class Easing {
|
|
3199
3208
|
static step0(n) {
|
|
@@ -3206,7 +3215,8 @@ class Easing {
|
|
|
3206
3215
|
return t;
|
|
3207
3216
|
}
|
|
3208
3217
|
static ease(t) {
|
|
3209
|
-
|
|
3218
|
+
easeBezier ??= Easing.bezier(0.42, 0, 1, 1);
|
|
3219
|
+
return easeBezier(t);
|
|
3210
3220
|
}
|
|
3211
3221
|
static quad(t) {
|
|
3212
3222
|
return t * t;
|
|
@@ -4604,23 +4614,23 @@ var MODERN_VALUE = "(?:none|[-+]?\\\\d*\\\\.?\\\\d+(?:%|deg|rad|grad|turn)?)";
|
|
|
4604
4614
|
function modernColorCall(name) {
|
|
4605
4615
|
return new RegExp(name + "\\\\(\\\\s*(" + MODERN_VALUE + ")\\\\s+(" + MODERN_VALUE + ")\\\\s+(" + MODERN_VALUE + ")(?:\\\\s*\\\\/\\\\s*(" + MODERN_VALUE + "))?\\\\s*\\\\)");
|
|
4606
4616
|
}
|
|
4617
|
+
var cachedMatchers = {
|
|
4618
|
+
rgb: undefined,
|
|
4619
|
+
rgba: undefined,
|
|
4620
|
+
hsl: undefined,
|
|
4621
|
+
hsla: undefined,
|
|
4622
|
+
hex3: undefined,
|
|
4623
|
+
hex4: undefined,
|
|
4624
|
+
hex5: undefined,
|
|
4625
|
+
hex6: undefined,
|
|
4626
|
+
hex8: undefined,
|
|
4627
|
+
oklch: undefined,
|
|
4628
|
+
oklab: undefined,
|
|
4629
|
+
lab: undefined,
|
|
4630
|
+
lch: undefined,
|
|
4631
|
+
hwb: undefined
|
|
4632
|
+
};
|
|
4607
4633
|
function getMatchers() {
|
|
4608
|
-
const cachedMatchers = {
|
|
4609
|
-
rgb: undefined,
|
|
4610
|
-
rgba: undefined,
|
|
4611
|
-
hsl: undefined,
|
|
4612
|
-
hsla: undefined,
|
|
4613
|
-
hex3: undefined,
|
|
4614
|
-
hex4: undefined,
|
|
4615
|
-
hex5: undefined,
|
|
4616
|
-
hex6: undefined,
|
|
4617
|
-
hex8: undefined,
|
|
4618
|
-
oklch: undefined,
|
|
4619
|
-
oklab: undefined,
|
|
4620
|
-
lab: undefined,
|
|
4621
|
-
lch: undefined,
|
|
4622
|
-
hwb: undefined
|
|
4623
|
-
};
|
|
4624
4634
|
if (cachedMatchers.rgb === undefined) {
|
|
4625
4635
|
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
4626
4636
|
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { Sandbox } from '@vercel/sandbox';
|
|
1
2
|
import type { VercelSandbox } from '../types';
|
|
2
|
-
export declare const createDisposableSandbox: (options:
|
|
3
|
+
export declare const createDisposableSandbox: (options: Parameters<typeof Sandbox.create>[0]) => Promise<VercelSandbox>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
-
export declare function installBrowser({ sandbox, onProgress }: {
|
|
2
|
+
export declare function installBrowser({ sandbox, onProgress, }: {
|
|
3
3
|
sandbox: Sandbox;
|
|
4
4
|
onProgress: (progress: number) => Promise<void>;
|
|
5
5
|
}): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Sandbox } from '@vercel/sandbox';
|
|
2
|
-
export declare function installSystemDependencies({ sandbox, onProgress }: {
|
|
2
|
+
export declare function installSystemDependencies({ sandbox, onProgress, }: {
|
|
3
3
|
sandbox: Sandbox;
|
|
4
4
|
onProgress: (progress: number) => Promise<void>;
|
|
5
5
|
}): Promise<void>;
|
|
@@ -9,6 +9,6 @@ import type { Sandbox } from '@vercel/sandbox';
|
|
|
9
9
|
*
|
|
10
10
|
* Only the `remotion` binary needs patching - ffmpeg/ffprobe work fine on glibc 2.34.
|
|
11
11
|
*/
|
|
12
|
-
export declare function patchCompositor({ sandbox }: {
|
|
12
|
+
export declare function patchCompositor({ sandbox, }: {
|
|
13
13
|
sandbox: Sandbox;
|
|
14
14
|
}): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sandbox } from '@vercel/sandbox';
|
|
2
2
|
import type { ChromiumOptions, LogLevel, RenderStillOnVercelProgress, StillImageFormat } from './types';
|
|
3
|
-
export declare function renderStillOnVercel({ sandbox, compositionId, inputProps, onProgress, outputFile, frame, imageFormat, jpegQuality, envVariables, chromiumOptions, scale, logLevel, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoThreads, licenseKey }: {
|
|
3
|
+
export declare function renderStillOnVercel({ sandbox, compositionId, inputProps, onProgress, outputFile, frame, imageFormat, jpegQuality, envVariables, chromiumOptions, scale, logLevel, timeoutInMilliseconds, offthreadVideoCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoThreads, licenseKey, }: {
|
|
4
4
|
sandbox: Sandbox;
|
|
5
5
|
compositionId: string;
|
|
6
6
|
inputProps: Record<string, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Sandbox } from '@vercel/sandbox';
|
|
2
2
|
import type { VercelBlobAccess } from './types';
|
|
3
|
-
export declare function uploadToVercelBlob({ sandbox, sandboxFilePath, blobPath, contentType, blobToken, access }: {
|
|
3
|
+
export declare function uploadToVercelBlob({ sandbox, sandboxFilePath, blobPath, contentType, blobToken, access, }: {
|
|
4
4
|
sandbox: Sandbox;
|
|
5
5
|
sandboxFilePath: string;
|
|
6
6
|
blobPath?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.538",
|
|
4
4
|
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"formatting": "oxfmt src --check",
|
|
14
14
|
"format": "oxfmt src",
|
|
15
15
|
"lint": "eslint src",
|
|
16
|
-
"watch": "
|
|
17
|
-
"make": "bun --env-file=../.env.bundle bundle.ts &&
|
|
16
|
+
"watch": "tsc -w",
|
|
17
|
+
"make": "bun --env-file=../.env.bundle bundle.ts && tsc && bun check -p tsconfig.scripts.json"
|
|
18
18
|
},
|
|
19
19
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
20
20
|
"contributors": [],
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"remotion": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.538",
|
|
27
|
+
"remotion": "4.0.538"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@vercel/sandbox": ">=1.0.0"
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.538",
|
|
42
42
|
"@vercel/blob": "2.3.0",
|
|
43
43
|
"@vercel/sandbox": "1.6.0",
|
|
44
44
|
"eslint": "9.19.0",
|
|
45
|
-
"
|
|
45
|
+
"typescript": "7.1.0-beta"
|
|
46
46
|
},
|
|
47
47
|
"keywords": [
|
|
48
48
|
"remotion",
|