@remotion/web-renderer 4.0.404 → 4.0.406
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/compose.d.ts +3 -2
- package/dist/create-scaffold.d.ts +7 -2
- package/dist/drawing/draw-background.d.ts +2 -1
- package/dist/drawing/draw-element.d.ts +2 -1
- package/dist/drawing/get-background-fill.d.ts +8 -0
- package/dist/drawing/handle-3d-transform.d.ts +2 -1
- package/dist/drawing/handle-mask.d.ts +2 -1
- package/dist/drawing/process-node.d.ts +2 -1
- package/dist/drawing/scale-rect.d.ts +4 -0
- package/dist/drawing/text/draw-text.d.ts +2 -2
- package/dist/drawing/text/handle-text-node.d.ts +3 -2
- package/dist/drawing/transform-in-3d.d.ts +2 -1
- package/dist/drawing/transform.d.ts +2 -1
- package/dist/esm/index.mjs +329 -264
- package/dist/render-media-on-web.d.ts +1 -0
- package/dist/render-still-on-web.d.ts +1 -0
- package/dist/take-screenshot.d.ts +6 -31
- package/dist/throttle-progress.d.ts +5 -1
- package/dist/tree-walker-cleanup-after-children.d.ts +1 -1
- package/dist/validate-scale.d.ts +1 -0
- package/dist/{drawing/precompose-and-draw.d.ts → walk-over-node.d.ts} +9 -14
- package/package.json +7 -6
- package/dist/drawing/elements-and-bounds.d.ts +0 -9
- package/dist/drawing/precompose-element.d.ts +0 -0
- package/dist/drawing/renoun.d.ts +0 -125
- package/dist/drawing/transform-origin.d.ts +0 -21
- package/dist/drawing/transform-perspective-origin.d.ts +0 -17
- package/dist/get-audio-sample-source.d.ts +0 -8
- package/dist/renoun.d.ts +0 -119
package/dist/compose.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const compose: ({ element, context, logLevel, parentRect, internalState,
|
|
1
|
+
export declare const compose: ({ element, context, logLevel, parentRect, internalState, onlyBackgroundClipText, scale, }: {
|
|
2
2
|
element: HTMLElement | SVGElement;
|
|
3
3
|
context: OffscreenCanvasRenderingContext2D;
|
|
4
4
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
@@ -21,5 +21,6 @@ export declare const compose: ({ element, context, logLevel, parentRect, interna
|
|
|
21
21
|
getAudioMixingTime: () => number;
|
|
22
22
|
addAudioMixingTime: (time: number) => void;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
onlyBackgroundClipText: boolean;
|
|
25
|
+
scale: number;
|
|
25
26
|
}) => Promise<void>;
|
|
@@ -2,6 +2,10 @@ import { type ComponentType } from 'react';
|
|
|
2
2
|
import type { Codec, DelayRenderScope, LogLevel, TRenderAsset } from 'remotion';
|
|
3
3
|
import type { AnyZodObject } from 'zod';
|
|
4
4
|
import type { TimeUpdaterRef } from './update-time';
|
|
5
|
+
export type ErrorHolder = {
|
|
6
|
+
error: Error | null;
|
|
7
|
+
};
|
|
8
|
+
export declare function checkForError(errorHolder: ErrorHolder): void;
|
|
5
9
|
export declare function createScaffold<Props extends Record<string, unknown>>({ width, height, delayRenderTimeoutInMilliseconds, logLevel, resolvedProps, id, mediaCacheSizeInBytes, durationInFrames, fps, initialFrame, schema, Component, audioEnabled, videoEnabled, defaultCodec, defaultOutName }: {
|
|
6
10
|
width: number;
|
|
7
11
|
height: number;
|
|
@@ -19,12 +23,13 @@ export declare function createScaffold<Props extends Record<string, unknown>>({
|
|
|
19
23
|
videoEnabled: boolean;
|
|
20
24
|
defaultCodec: Codec | null;
|
|
21
25
|
defaultOutName: string | null;
|
|
22
|
-
}):
|
|
26
|
+
}): {
|
|
23
27
|
delayRenderScope: DelayRenderScope;
|
|
24
28
|
div: HTMLDivElement;
|
|
25
29
|
timeUpdater: React.RefObject<TimeUpdaterRef | null>;
|
|
26
30
|
collectAssets: React.RefObject<{
|
|
27
31
|
collectAssets: () => TRenderAsset[];
|
|
28
32
|
} | null>;
|
|
33
|
+
errorHolder: ErrorHolder;
|
|
29
34
|
[Symbol.dispose]: () => void;
|
|
30
|
-
}
|
|
35
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const drawBackground: ({ backgroundImage, context, rect, backgroundColor, backgroundClip, element, logLevel, internalState, computedStyle, offsetLeft: parentOffsetLeft, offsetTop: parentOffsetTop, }: {
|
|
1
|
+
export declare const drawBackground: ({ backgroundImage, context, rect, backgroundColor, backgroundClip, element, logLevel, internalState, computedStyle, offsetLeft: parentOffsetLeft, offsetTop: parentOffsetTop, scale, }: {
|
|
2
2
|
backgroundImage: string;
|
|
3
3
|
context: OffscreenCanvasRenderingContext2D;
|
|
4
4
|
rect: DOMRect;
|
|
@@ -27,4 +27,5 @@ export declare const drawBackground: ({ backgroundImage, context, rect, backgrou
|
|
|
27
27
|
computedStyle: CSSStyleDeclaration;
|
|
28
28
|
offsetLeft: number;
|
|
29
29
|
offsetTop: number;
|
|
30
|
+
scale: number;
|
|
30
31
|
}) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DrawFn } from './drawn-fn';
|
|
2
|
-
export declare const drawElement: ({ rect, computedStyle, context, draw, opacity, totalMatrix, parentRect, logLevel, element, internalState, }: {
|
|
2
|
+
export declare const drawElement: ({ rect, computedStyle, context, draw, opacity, totalMatrix, parentRect, logLevel, element, internalState, scale, }: {
|
|
3
3
|
rect: DOMRect;
|
|
4
4
|
computedStyle: CSSStyleDeclaration;
|
|
5
5
|
context: OffscreenCanvasRenderingContext2D;
|
|
@@ -27,6 +27,7 @@ export declare const drawElement: ({ rect, computedStyle, context, draw, opacity
|
|
|
27
27
|
getAudioMixingTime: () => number;
|
|
28
28
|
addAudioMixingTime: (time: number) => void;
|
|
29
29
|
};
|
|
30
|
+
scale: number;
|
|
30
31
|
}) => Promise<{
|
|
31
32
|
cleanupAfterChildren: () => void;
|
|
32
33
|
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getBackgroundFill: ({ backgroundColor, backgroundImage, contextToDraw, boundingRect, offsetLeft, offsetTop, }: {
|
|
2
|
+
backgroundImage: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
contextToDraw: OffscreenCanvasRenderingContext2D;
|
|
5
|
+
boundingRect: DOMRect;
|
|
6
|
+
offsetLeft: number;
|
|
7
|
+
offsetTop: number;
|
|
8
|
+
}) => string | CanvasGradient | null;
|
|
@@ -3,7 +3,7 @@ export declare const getPrecomposeRectFor3DTransform: ({ element, parentRect, ma
|
|
|
3
3
|
parentRect: DOMRect;
|
|
4
4
|
matrix: DOMMatrix;
|
|
5
5
|
}) => DOMRect | null;
|
|
6
|
-
export declare const handle3dTransform: ({ matrix, sourceRect, tempCanvas, rectAfterTransforms, internalState, }: {
|
|
6
|
+
export declare const handle3dTransform: ({ matrix, sourceRect, tempCanvas, rectAfterTransforms, internalState, scale, }: {
|
|
7
7
|
matrix: DOMMatrix;
|
|
8
8
|
sourceRect: DOMRect;
|
|
9
9
|
tempCanvas: OffscreenCanvas;
|
|
@@ -26,4 +26,5 @@ export declare const handle3dTransform: ({ matrix, sourceRect, tempCanvas, rectA
|
|
|
26
26
|
getAudioMixingTime: () => number;
|
|
27
27
|
addAudioMixingTime: (time: number) => void;
|
|
28
28
|
};
|
|
29
|
+
scale: number;
|
|
29
30
|
}) => OffscreenCanvas | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { LinearGradientInfo } from './parse-linear-gradient';
|
|
2
2
|
export declare const getPrecomposeRectForMask: (element: HTMLElement | SVGElement) => DOMRect;
|
|
3
|
-
export declare const handleMask: ({ gradientInfo, rect, precomposeRect, tempContext, }: {
|
|
3
|
+
export declare const handleMask: ({ gradientInfo, rect, precomposeRect, tempContext, scale, }: {
|
|
4
4
|
gradientInfo: LinearGradientInfo;
|
|
5
5
|
rect: DOMRect;
|
|
6
6
|
precomposeRect: DOMRect;
|
|
7
7
|
tempContext: OffscreenCanvasRenderingContext2D;
|
|
8
|
+
scale: number;
|
|
8
9
|
}) => void;
|
|
@@ -5,7 +5,7 @@ export type ProcessNodeReturnValue = {
|
|
|
5
5
|
} | {
|
|
6
6
|
type: 'skip-children';
|
|
7
7
|
};
|
|
8
|
-
export declare const processNode: ({ element, context, draw, logLevel, parentRect, internalState, rootElement, }: {
|
|
8
|
+
export declare const processNode: ({ element, context, draw, logLevel, parentRect, internalState, rootElement, scale, }: {
|
|
9
9
|
element: HTMLElement | SVGElement;
|
|
10
10
|
context: OffscreenCanvasRenderingContext2D;
|
|
11
11
|
draw: DrawFn;
|
|
@@ -30,4 +30,5 @@ export declare const processNode: ({ element, context, draw, logLevel, parentRec
|
|
|
30
30
|
addAudioMixingTime: (time: number) => void;
|
|
31
31
|
};
|
|
32
32
|
rootElement: HTMLElement | SVGElement;
|
|
33
|
+
scale: number;
|
|
33
34
|
}) => Promise<ProcessNodeReturnValue>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DrawFn } from '../drawn-fn';
|
|
2
|
-
export declare const drawText: ({ span, logLevel,
|
|
2
|
+
export declare const drawText: ({ span, logLevel, onlyBackgroundClipText, }: {
|
|
3
3
|
span: HTMLSpanElement;
|
|
4
4
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
5
|
-
|
|
5
|
+
onlyBackgroundClipText: boolean;
|
|
6
6
|
}) => DrawFn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProcessNodeReturnValue } from '../process-node';
|
|
2
|
-
export declare const handleTextNode: ({ node, context, logLevel, parentRect, internalState, rootElement,
|
|
2
|
+
export declare const handleTextNode: ({ node, context, logLevel, parentRect, internalState, rootElement, onlyBackgroundClipText, scale, }: {
|
|
3
3
|
node: Text;
|
|
4
4
|
context: OffscreenCanvasRenderingContext2D;
|
|
5
5
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
@@ -23,5 +23,6 @@ export declare const handleTextNode: ({ node, context, logLevel, parentRect, int
|
|
|
23
23
|
addAudioMixingTime: (time: number) => void;
|
|
24
24
|
};
|
|
25
25
|
rootElement: HTMLElement | SVGElement;
|
|
26
|
-
|
|
26
|
+
onlyBackgroundClipText: boolean;
|
|
27
|
+
scale: number;
|
|
27
28
|
}) => Promise<ProcessNodeReturnValue>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HelperCanvasState } from '../internal-state';
|
|
2
|
-
export declare const transformIn3d: ({ matrix, sourceCanvas, sourceRect, destRect, internalState, }: {
|
|
2
|
+
export declare const transformIn3d: ({ matrix, sourceCanvas, sourceRect, destRect, internalState, scale, }: {
|
|
3
3
|
sourceRect: DOMRect;
|
|
4
4
|
matrix: DOMMatrix;
|
|
5
5
|
sourceCanvas: OffscreenCanvas;
|
|
@@ -22,4 +22,5 @@ export declare const transformIn3d: ({ matrix, sourceCanvas, sourceRect, destRec
|
|
|
22
22
|
getAudioMixingTime: () => number;
|
|
23
23
|
addAudioMixingTime: (time: number) => void;
|
|
24
24
|
};
|
|
25
|
+
scale: number;
|
|
25
26
|
}) => OffscreenCanvas;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare const setTransform: ({ ctx, transform, parentRect, }: {
|
|
1
|
+
export declare const setTransform: ({ ctx, transform, parentRect, scale, }: {
|
|
2
2
|
ctx: OffscreenCanvasRenderingContext2D;
|
|
3
3
|
transform: DOMMatrix;
|
|
4
4
|
parentRect: DOMRect;
|
|
5
|
+
scale: number;
|
|
5
6
|
}) => () => void;
|