remotion 4.0.475 → 4.0.477
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/CompositionManager.d.ts +2 -0
- package/dist/cjs/HtmlInCanvas.js +3 -3
- package/dist/cjs/Img.d.ts +8 -2
- package/dist/cjs/Img.js +7 -5
- package/dist/cjs/Interactive.d.ts +1 -1
- package/dist/cjs/Interactive.js +4 -2
- package/dist/cjs/Sequence.d.ts +1 -0
- package/dist/cjs/Sequence.js +35 -5
- package/dist/cjs/SequenceContext.d.ts +1 -0
- package/dist/cjs/animated-image/AnimatedImage.js +2 -0
- package/dist/cjs/audio/AudioForPreview.js +1 -1
- package/dist/cjs/canvas-image/CanvasImage.d.ts +7 -1
- package/dist/cjs/canvas-image/CanvasImage.js +4 -2
- package/dist/cjs/canvas-image/props.d.ts +1 -1
- package/dist/cjs/easing.d.ts +3 -0
- package/dist/cjs/easing.js +18 -0
- package/dist/cjs/effects/Solid.d.ts +1 -1
- package/dist/cjs/effects/Solid.js +4 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/internals.d.ts +19 -3
- package/dist/cjs/internals.js +1 -0
- package/dist/cjs/interpolate-translate.d.ts +8 -0
- package/dist/cjs/interpolate-translate.js +70 -0
- package/dist/cjs/loop/index.js +1 -1
- package/dist/cjs/no-react.d.ts +9 -0
- package/dist/cjs/sequence-field-schema.d.ts +29 -1
- package/dist/cjs/sequence-field-schema.js +28 -5
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/series/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/VideoForPreview.js +4 -6
- package/dist/cjs/wrap-in-schema.d.ts +3 -2
- package/dist/cjs/wrap-in-schema.js +8 -5
- package/dist/esm/index.mjs +650 -547
- package/dist/esm/no-react.mjs +26 -4
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -50,11 +50,13 @@ export type LoopDisplay = {
|
|
|
50
50
|
startOffset: number;
|
|
51
51
|
durationInFrames: number;
|
|
52
52
|
};
|
|
53
|
+
export type JsxComponentIdentity = string;
|
|
53
54
|
export type SequenceControls = {
|
|
54
55
|
schema: SequenceSchema;
|
|
55
56
|
currentRuntimeValueDotNotation: Record<string, unknown>;
|
|
56
57
|
overrideId: string;
|
|
57
58
|
supportsEffects: boolean;
|
|
59
|
+
componentIdentity: JsxComponentIdentity | null;
|
|
58
60
|
};
|
|
59
61
|
export type TSequence = {
|
|
60
62
|
from: number;
|
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -290,19 +290,19 @@ const HtmlInCanvasInner = (0, react_1.forwardRef)(({ width, height, effects = []
|
|
|
290
290
|
node;
|
|
291
291
|
}
|
|
292
292
|
}, [ref]);
|
|
293
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: resolvedDuration, name: name !== null && name !== void 0 ? name : '<HtmlInCanvas>', _remotionInternalDocumentationLink:
|
|
294
|
-
? 'https://www.remotion.dev/docs/remotion/html-in-canvas'
|
|
295
|
-
: undefined, _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalRefForOutline: actualRef, layout: "none", ...sequenceProps, children: jsx_runtime_1.jsx(HtmlInCanvasContent, { ref: setCanvasRef, width: width, height: height, effects: effects, onPaint: onPaint, onInit: onInit, pixelDensity: pixelDensity, controls: controls, style: style, children: children }) }));
|
|
293
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: resolvedDuration, name: name !== null && name !== void 0 ? name : '<HtmlInCanvas>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas", _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalRefForOutline: actualRef, layout: "none", ...sequenceProps, children: jsx_runtime_1.jsx(HtmlInCanvasContent, { ref: setCanvasRef, width: width, height: height, effects: effects, onPaint: onPaint, onInit: onInit, pixelDensity: pixelDensity, controls: controls, style: style, children: children }) }));
|
|
296
294
|
});
|
|
297
295
|
HtmlInCanvasInner.displayName = 'HtmlInCanvas';
|
|
298
296
|
const htmlInCanvasSchema = {
|
|
299
297
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
300
298
|
from: sequence_field_schema_js_1.fromField,
|
|
299
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
301
300
|
...sequence_field_schema_js_1.sequenceVisualStyleSchema,
|
|
302
301
|
hidden: sequence_field_schema_js_1.hiddenField,
|
|
303
302
|
};
|
|
304
303
|
const HtmlInCanvasWrapped = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
305
304
|
Component: HtmlInCanvasInner,
|
|
305
|
+
componentIdentity: 'dev.remotion.remotion.HtmlInCanvas',
|
|
306
306
|
schema: htmlInCanvasSchema,
|
|
307
307
|
supportsEffects: true,
|
|
308
308
|
});
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type ImgProps = NativeImgProps & {
|
|
|
16
16
|
* @deprecated For internal use only
|
|
17
17
|
*/
|
|
18
18
|
readonly stack?: string;
|
|
19
|
-
} & Pick<SequenceProps, 'durationInFrames' | 'from' | 'hidden'>;
|
|
19
|
+
} & Pick<SequenceProps, 'durationInFrames' | 'from' | 'freeze' | 'hidden'>;
|
|
20
20
|
export declare const imgSchema: {
|
|
21
21
|
readonly 'style.transformOrigin': {
|
|
22
22
|
readonly type: "transform-origin";
|
|
@@ -65,6 +65,12 @@ export declare const imgSchema: {
|
|
|
65
65
|
readonly step: 1;
|
|
66
66
|
readonly hiddenFromList: true;
|
|
67
67
|
};
|
|
68
|
+
readonly freeze: {
|
|
69
|
+
readonly type: "number";
|
|
70
|
+
readonly default: null;
|
|
71
|
+
readonly step: 1;
|
|
72
|
+
readonly hiddenFromList: true;
|
|
73
|
+
};
|
|
68
74
|
readonly hidden: import("./sequence-field-schema.js").SequenceFieldSchema;
|
|
69
75
|
};
|
|
70
76
|
export declare const Img: React.ComponentType<NativeImgProps & {
|
|
@@ -81,5 +87,5 @@ export declare const Img: React.ComponentType<NativeImgProps & {
|
|
|
81
87
|
* @deprecated For internal use only
|
|
82
88
|
*/
|
|
83
89
|
readonly stack?: string | undefined;
|
|
84
|
-
} & Pick<SequenceProps, "durationInFrames" | "from" | "hidden">>;
|
|
90
|
+
} & Pick<SequenceProps, "durationInFrames" | "freeze" | "from" | "hidden">>;
|
|
85
91
|
export {};
|
package/dist/cjs/Img.js
CHANGED
|
@@ -183,16 +183,17 @@ const ImgContent = ({ onError, maxRetries = 2, src, pauseWhenLoading, delayRende
|
|
|
183
183
|
// src gets set once we've loaded and decoded the image.
|
|
184
184
|
return (jsx_runtime_1.jsx("img", { ...props, ref: imageCallbackRef, crossOrigin: crossOriginValue, onError: didGetError, decoding: isRendering ? 'sync' : decoding }));
|
|
185
185
|
};
|
|
186
|
-
const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, durationInFrames, _experimentalControls: controls, _remotionInternalRefForOutline: refForOutline, ...props }) => {
|
|
186
|
+
const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, durationInFrames, freeze, _experimentalControls: controls, _remotionInternalRefForOutline: refForOutline, ...props }) => {
|
|
187
187
|
if (!src) {
|
|
188
188
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
189
189
|
}
|
|
190
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, _remotionInternalStack: stack, _remotionInternalDocumentationLink:
|
|
190
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, freeze: freeze, _remotionInternalStack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", _remotionInternalIsMedia: { type: 'image', src }, name: name !== null && name !== void 0 ? name : '<Img>', _experimentalControls: controls, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, hidden: hidden, _remotionInternalRefForOutline: refForOutline, children: jsx_runtime_1.jsx(ImgContent, { src: src, refForOutline: refForOutline, ...props }) }));
|
|
191
191
|
};
|
|
192
192
|
const CanvasImageWithPrivateProps = index_js_1.CanvasImage;
|
|
193
193
|
exports.imgSchema = {
|
|
194
194
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
195
195
|
from: sequence_field_schema_js_1.fromField,
|
|
196
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
196
197
|
...sequence_field_schema_js_1.sequenceVisualStyleSchema,
|
|
197
198
|
hidden: sequence_field_schema_js_1.hiddenField,
|
|
198
199
|
};
|
|
@@ -235,11 +236,11 @@ const getFitFromObjectFit = (style) => {
|
|
|
235
236
|
}
|
|
236
237
|
return undefined;
|
|
237
238
|
};
|
|
238
|
-
const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src, from, durationInFrames, _experimentalControls: controls, width, height, className, style, id, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }) => {
|
|
239
|
+
const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src, from, durationInFrames, freeze, _experimentalControls: controls, width, height, className, style, id, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }) => {
|
|
239
240
|
var _a;
|
|
240
241
|
const refForOutline = (0, react_1.useRef)(null);
|
|
241
242
|
if (effects.length === 0) {
|
|
242
|
-
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name, stack: stack, showInTimeline: showInTimeline, src: src, from: from, durationInFrames: durationInFrames, _experimentalControls: controls, width: width, height: height, className: className, style: style, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, _remotionInternalRefForOutline: refForOutline }));
|
|
243
|
+
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name, stack: stack, showInTimeline: showInTimeline, src: src, from: from, durationInFrames: durationInFrames, freeze: freeze, _experimentalControls: controls, width: width, height: height, className: className, style: style, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, _remotionInternalRefForOutline: refForOutline }));
|
|
243
244
|
}
|
|
244
245
|
if (!src) {
|
|
245
246
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
@@ -254,7 +255,7 @@ const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src,
|
|
|
254
255
|
const canvasHeight = typeof height === 'number' ? height : undefined;
|
|
255
256
|
const canvasProps = props;
|
|
256
257
|
const canvasFit = (_a = getFitFromObjectFit(style)) !== null && _a !== void 0 ? _a : 'fill';
|
|
257
|
-
return (jsx_runtime_1.jsx(CanvasImageWithPrivateProps, { src: src, width: canvasWidth, height: canvasHeight, fit: canvasFit, effects: effects, className: className, style: style, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, from: from, durationInFrames: durationInFrames, hidden: hidden, name: name !== null && name !== void 0 ? name : '<Img>', showInTimeline: showInTimeline, stack: stack, _remotionInternalDocumentationLink:
|
|
258
|
+
return (jsx_runtime_1.jsx(CanvasImageWithPrivateProps, { src: src, width: canvasWidth, height: canvasHeight, fit: canvasFit, effects: effects, className: className, style: style, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, from: from, durationInFrames: durationInFrames, freeze: freeze, hidden: hidden, name: name !== null && name !== void 0 ? name : '<Img>', showInTimeline: showInTimeline, stack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", _experimentalControls: controls, _remotionInternalRefForOutline: refForOutline, ...canvasProps }));
|
|
258
259
|
};
|
|
259
260
|
/*
|
|
260
261
|
* @description Works just like a regular HTML img tag. When you use the <Img> tag, Remotion will ensure that the image is loaded before rendering the frame.
|
|
@@ -262,6 +263,7 @@ const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src,
|
|
|
262
263
|
*/
|
|
263
264
|
exports.Img = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
264
265
|
Component: ImgInner,
|
|
266
|
+
componentIdentity: 'dev.remotion.remotion.Img',
|
|
265
267
|
schema: exports.imgSchema,
|
|
266
268
|
supportsEffects: true,
|
|
267
269
|
});
|
|
@@ -4,7 +4,7 @@ type InteractiveHtmlTag = 'a' | 'article' | 'aside' | 'button' | 'code' | 'div'
|
|
|
4
4
|
type InteractiveSvgTag = 'circle' | 'ellipse' | 'g' | 'line' | 'path' | 'rect' | 'svg' | 'text';
|
|
5
5
|
type InteractiveTag = InteractiveHtmlTag | InteractiveSvgTag;
|
|
6
6
|
type ElementForTag<Tag extends InteractiveTag> = Tag extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[Tag] : Tag extends keyof SVGElementTagNameMap ? SVGElementTagNameMap[Tag] : Element;
|
|
7
|
-
type InteractiveSequenceProps = Pick<SequenceProps, 'durationInFrames' | 'from' | 'hidden' | 'name' | 'showInTimeline'> & {
|
|
7
|
+
type InteractiveSequenceProps = Pick<SequenceProps, 'durationInFrames' | 'from' | 'freeze' | 'hidden' | 'name' | 'showInTimeline'> & {
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated For internal use only
|
|
10
10
|
*/
|
package/dist/cjs/Interactive.js
CHANGED
|
@@ -43,6 +43,7 @@ const wrap_in_schema_js_1 = require("./wrap-in-schema.js");
|
|
|
43
43
|
const interactiveElementSchema = {
|
|
44
44
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
45
45
|
from: sequence_field_schema_js_1.fromField,
|
|
46
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
46
47
|
...sequence_field_schema_js_1.sequenceVisualStyleSchema,
|
|
47
48
|
hidden: sequence_field_schema_js_1.hiddenField,
|
|
48
49
|
};
|
|
@@ -56,13 +57,13 @@ const setRef = (ref, value) => {
|
|
|
56
57
|
};
|
|
57
58
|
const makeInteractiveElement = (tag, displayName) => {
|
|
58
59
|
const Inner = (0, react_1.forwardRef)((propsWithControls, ref) => {
|
|
59
|
-
const { durationInFrames, from, hidden, name, showInTimeline, stack, _experimentalControls, ...props } = propsWithControls;
|
|
60
|
+
const { durationInFrames, from, freeze, hidden, name, showInTimeline, stack, _experimentalControls, ...props } = propsWithControls;
|
|
60
61
|
const refForOutline = (0, react_1.useRef)(null);
|
|
61
62
|
const callbackRef = (0, react_1.useCallback)((element) => {
|
|
62
63
|
refForOutline.current = element;
|
|
63
64
|
setRef(ref, element);
|
|
64
65
|
}, [ref]);
|
|
65
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, hidden: hidden, name: name !== null && name !== void 0 ? name : displayName, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, _experimentalControls: _experimentalControls, _remotionInternalStack: stack, _remotionInternalRefForOutline: refForOutline, children: react_1.default.createElement(tag, {
|
|
66
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, freeze: freeze, hidden: hidden, name: name !== null && name !== void 0 ? name : displayName, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, _experimentalControls: _experimentalControls, _remotionInternalStack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive", _remotionInternalRefForOutline: refForOutline, children: react_1.default.createElement(tag, {
|
|
66
67
|
...props,
|
|
67
68
|
ref: callbackRef,
|
|
68
69
|
}) }));
|
|
@@ -70,6 +71,7 @@ const makeInteractiveElement = (tag, displayName) => {
|
|
|
70
71
|
Inner.displayName = displayName;
|
|
71
72
|
const Wrapped = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
72
73
|
Component: Inner,
|
|
74
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
73
75
|
schema: interactiveElementSchema,
|
|
74
76
|
supportsEffects: false,
|
|
75
77
|
});
|
package/dist/cjs/Sequence.d.ts
CHANGED
package/dist/cjs/Sequence.js
CHANGED
|
@@ -19,8 +19,8 @@ const use_video_config_js_1 = require("./use-video-config.js");
|
|
|
19
19
|
const v5_flag_js_1 = require("./v5-flag.js");
|
|
20
20
|
const wrap_in_schema_js_1 = require("./wrap-in-schema.js");
|
|
21
21
|
const EMPTY_EFFECTS = [];
|
|
22
|
-
const RegularSequenceRefForwardingFunction = ({ from = 0, 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:
|
|
23
|
-
var _a;
|
|
22
|
+
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) => {
|
|
23
|
+
var _a, _b;
|
|
24
24
|
const { layout = 'absolute-fill' } = other;
|
|
25
25
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
26
26
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
@@ -28,6 +28,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
28
28
|
const cumulatedFrom = parentSequence
|
|
29
29
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
30
30
|
: 0;
|
|
31
|
+
const absoluteFrom = ((_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.absoluteFrom) !== null && _a !== void 0 ? _a : 0) + from;
|
|
31
32
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
32
33
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
33
34
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -50,6 +51,17 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
50
51
|
if (!Number.isFinite(from)) {
|
|
51
52
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
52
53
|
}
|
|
54
|
+
if (typeof freeze !== 'undefined' && freeze !== null) {
|
|
55
|
+
if (typeof freeze !== 'number') {
|
|
56
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
57
|
+
}
|
|
58
|
+
if (Number.isNaN(freeze)) {
|
|
59
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
|
|
60
|
+
}
|
|
61
|
+
if (!Number.isFinite(freeze)) {
|
|
62
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
53
65
|
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
|
|
54
66
|
const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
|
|
55
67
|
const parentSequenceDuration = parentSequence
|
|
@@ -57,6 +69,10 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
57
69
|
: durationInFrames;
|
|
58
70
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
59
71
|
const { registerSequence, unregisterSequence } = (0, react_1.useContext)(SequenceManager_js_1.SequenceManager);
|
|
72
|
+
const wrapperRefForOutline = (0, react_1.useRef)(null);
|
|
73
|
+
const refForOutline = other.layout === 'none'
|
|
74
|
+
? (passedRefForOutline !== null && passedRefForOutline !== void 0 ? passedRefForOutline : null)
|
|
75
|
+
: (passedRefForOutline !== null && passedRefForOutline !== void 0 ? passedRefForOutline : wrapperRefForOutline);
|
|
60
76
|
const premounting = (0, react_1.useMemo)(() => {
|
|
61
77
|
// || is intentional, ?? would not trigger on `false`
|
|
62
78
|
return ((parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.premounting) ||
|
|
@@ -92,6 +108,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
92
108
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
93
109
|
var _a, _b, _c;
|
|
94
110
|
return {
|
|
111
|
+
absoluteFrom,
|
|
95
112
|
cumulatedFrom,
|
|
96
113
|
relativeFrom: from,
|
|
97
114
|
cumulatedNegativeFrom,
|
|
@@ -107,6 +124,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
107
124
|
};
|
|
108
125
|
}, [
|
|
109
126
|
cumulatedFrom,
|
|
127
|
+
absoluteFrom,
|
|
110
128
|
from,
|
|
111
129
|
actualDurationInFrames,
|
|
112
130
|
parentSequence,
|
|
@@ -122,10 +140,10 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
122
140
|
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
123
141
|
return name !== null && name !== void 0 ? name : '';
|
|
124
142
|
}, [name]);
|
|
125
|
-
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink :
|
|
143
|
+
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink : 'https://www.remotion.dev/docs/sequence';
|
|
126
144
|
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
127
145
|
const isInsideSeries = (0, react_1.useContext)(is_inside_series_js_1.IsInsideSeriesContext);
|
|
128
|
-
const inheritedStack = (
|
|
146
|
+
const inheritedStack = (_b = other === null || other === void 0 ? void 0 : other.stack) !== null && _b !== void 0 ? _b : null;
|
|
129
147
|
// Our assumption: Stack doesnt' change. After we symbolicate we assign it a nodePath
|
|
130
148
|
// and if it changes, it would lead to-remounting of the sequence.
|
|
131
149
|
const stackRef = (0, react_1.useRef)(null);
|
|
@@ -245,7 +263,17 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
245
263
|
: absoluteFrame > endThreshold
|
|
246
264
|
? null
|
|
247
265
|
: children;
|
|
266
|
+
const frozenContent = content === null || typeof freeze === 'undefined' || freeze === null ? (content) : (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freeze, children: content }));
|
|
248
267
|
const styleIfThere = other.layout === 'none' ? undefined : other.style;
|
|
268
|
+
const sequenceRef = (0, react_1.useCallback)((node) => {
|
|
269
|
+
wrapperRefForOutline.current = node;
|
|
270
|
+
if (typeof ref === 'function') {
|
|
271
|
+
ref(node);
|
|
272
|
+
}
|
|
273
|
+
else if (ref) {
|
|
274
|
+
ref.current = node;
|
|
275
|
+
}
|
|
276
|
+
}, [ref]);
|
|
249
277
|
const defaultStyle = (0, react_1.useMemo)(() => {
|
|
250
278
|
return {
|
|
251
279
|
flexDirection: undefined,
|
|
@@ -260,7 +288,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
260
288
|
if (hidden) {
|
|
261
289
|
return null;
|
|
262
290
|
}
|
|
263
|
-
return (jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children:
|
|
291
|
+
return (jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children: frozenContent === null ? null : other.layout === 'none' ? (frozenContent) : (jsx_runtime_1.jsx(AbsoluteFill_js_1.AbsoluteFill, { ref: sequenceRef, style: defaultStyle, className: other.className, children: frozenContent })) }));
|
|
264
292
|
};
|
|
265
293
|
const RegularSequence = (0, react_1.forwardRef)(RegularSequenceRefForwardingFunction);
|
|
266
294
|
const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
@@ -323,11 +351,13 @@ exports.SequenceWithoutSchema = SequenceInner;
|
|
|
323
351
|
*/
|
|
324
352
|
exports.Sequence = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
325
353
|
Component: SequenceInner,
|
|
354
|
+
componentIdentity: 'dev.remotion.remotion.Sequence',
|
|
326
355
|
schema: sequence_field_schema_js_1.sequenceSchema,
|
|
327
356
|
supportsEffects: false,
|
|
328
357
|
});
|
|
329
358
|
exports.SequenceWithoutFrom = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
330
359
|
Component: SequenceInner,
|
|
360
|
+
componentIdentity: null,
|
|
331
361
|
schema: sequence_field_schema_js_1.sequenceSchemaWithoutFrom,
|
|
332
362
|
supportsEffects: false,
|
|
333
363
|
});
|
|
@@ -19,6 +19,7 @@ const resolve_image_source_1 = require("./resolve-image-source");
|
|
|
19
19
|
const animatedImageSchema = {
|
|
20
20
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
21
21
|
from: sequence_field_schema_js_1.fromField,
|
|
22
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
22
23
|
playbackRate: {
|
|
23
24
|
type: 'number',
|
|
24
25
|
min: 0,
|
|
@@ -177,6 +178,7 @@ const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, lo
|
|
|
177
178
|
};
|
|
178
179
|
exports.AnimatedImage = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
179
180
|
Component: AnimatedImageInner,
|
|
181
|
+
componentIdentity: 'dev.remotion.remotion.AnimatedImage',
|
|
180
182
|
schema: animatedImageSchema,
|
|
181
183
|
supportsEffects: true,
|
|
182
184
|
});
|
|
@@ -134,7 +134,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
134
134
|
premountDisplay: (_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premountDisplay) !== null && _a !== void 0 ? _a : null,
|
|
135
135
|
postmountDisplay: (_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.postmountDisplay) !== null && _b !== void 0 ? _b : null,
|
|
136
136
|
loopDisplay: undefined,
|
|
137
|
-
documentationLink:
|
|
137
|
+
documentationLink: 'https://www.remotion.dev/docs/html5-audio',
|
|
138
138
|
refForOutline: null,
|
|
139
139
|
});
|
|
140
140
|
// putting playback before useVolume
|
|
@@ -49,6 +49,12 @@ export declare const canvasImageSchema: {
|
|
|
49
49
|
readonly step: 1;
|
|
50
50
|
readonly hiddenFromList: true;
|
|
51
51
|
};
|
|
52
|
+
readonly freeze: {
|
|
53
|
+
readonly type: "number";
|
|
54
|
+
readonly default: null;
|
|
55
|
+
readonly step: 1;
|
|
56
|
+
readonly hiddenFromList: true;
|
|
57
|
+
};
|
|
52
58
|
readonly fit: {
|
|
53
59
|
readonly type: "enum";
|
|
54
60
|
readonly default: "fill";
|
|
@@ -61,7 +67,7 @@ export declare const canvasImageSchema: {
|
|
|
61
67
|
};
|
|
62
68
|
readonly hidden: import("../sequence-field-schema.js").SequenceFieldSchema;
|
|
63
69
|
};
|
|
64
|
-
export declare const CanvasImage: import("react").ComponentType<Pick<import("../Sequence.js").SequenceProps, "durationInFrames" | "from" | "hidden" | "name" | "showInTimeline"> & {
|
|
70
|
+
export declare const CanvasImage: import("react").ComponentType<Pick<import("../Sequence.js").SequenceProps, "durationInFrames" | "freeze" | "from" | "hidden" | "name" | "showInTimeline"> & {
|
|
65
71
|
readonly stack?: string | undefined;
|
|
66
72
|
} & CanvasImageCanvasProps & {
|
|
67
73
|
readonly src: string;
|
|
@@ -19,6 +19,7 @@ const wrap_in_schema_js_1 = require("../wrap-in-schema.js");
|
|
|
19
19
|
exports.canvasImageSchema = {
|
|
20
20
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
21
21
|
from: sequence_field_schema_js_1.fromField,
|
|
22
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
22
23
|
fit: {
|
|
23
24
|
type: 'enum',
|
|
24
25
|
default: 'fill',
|
|
@@ -236,7 +237,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
|
|
|
236
237
|
return (jsx_runtime_1.jsx("canvas", { ...canvasProps, ref: canvasRef, width: width, height: height, className: className, style: style, id: id }));
|
|
237
238
|
});
|
|
238
239
|
CanvasImageContent.displayName = 'CanvasImageContent';
|
|
239
|
-
const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, effects = [], className, style, id, onError, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, durationInFrames, from, hidden, name, showInTimeline, stack, _experimentalControls: controls, _remotionInternalDocumentationLink, _remotionInternalRefForOutline, ...canvasProps }, ref) => {
|
|
240
|
+
const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, effects = [], className, style, id, onError, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, durationInFrames, from, freeze, hidden, name, showInTimeline, stack, _experimentalControls: controls, _remotionInternalDocumentationLink, _remotionInternalRefForOutline, ...canvasProps }, ref) => {
|
|
240
241
|
if (!src) {
|
|
241
242
|
throw new Error('No "src" prop was passed to <CanvasImage>.');
|
|
242
243
|
}
|
|
@@ -245,7 +246,7 @@ const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, eff
|
|
|
245
246
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
246
247
|
return actualRef.current;
|
|
247
248
|
}, []);
|
|
248
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, hidden: hidden, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, name: name !== null && name !== void 0 ? name : '<CanvasImage>', _remotionInternalDocumentationLink: _remotionInternalDocumentationLink !== null && _remotionInternalDocumentationLink !== void 0 ? _remotionInternalDocumentationLink : 'https://www.remotion.dev/docs/canvasimage', _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalIsMedia: { type: 'image', src }, _remotionInternalStack: stack, _remotionInternalRefForOutline: _remotionInternalRefForOutline !== null && _remotionInternalRefForOutline !== void 0 ? _remotionInternalRefForOutline : actualRef, children: jsx_runtime_1.jsx(CanvasImageContent, { ref: actualRef, src: src, width: width, height: height, fit: fit, effects: effects, controls: controls, className: className, style: style, id: id, onError: onError, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, refForOutline: _remotionInternalRefForOutline !== null && _remotionInternalRefForOutline !== void 0 ? _remotionInternalRefForOutline : null, ...canvasProps }) }));
|
|
249
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, name: name !== null && name !== void 0 ? name : '<CanvasImage>', _remotionInternalDocumentationLink: _remotionInternalDocumentationLink !== null && _remotionInternalDocumentationLink !== void 0 ? _remotionInternalDocumentationLink : 'https://www.remotion.dev/docs/canvasimage', _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalIsMedia: { type: 'image', src }, _remotionInternalStack: stack, _remotionInternalRefForOutline: _remotionInternalRefForOutline !== null && _remotionInternalRefForOutline !== void 0 ? _remotionInternalRefForOutline : actualRef, children: jsx_runtime_1.jsx(CanvasImageContent, { ref: actualRef, src: src, width: width, height: height, fit: fit, effects: effects, controls: controls, className: className, style: style, id: id, onError: onError, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, refForOutline: _remotionInternalRefForOutline !== null && _remotionInternalRefForOutline !== void 0 ? _remotionInternalRefForOutline : null, ...canvasProps }) }));
|
|
249
250
|
});
|
|
250
251
|
/*
|
|
251
252
|
* @description Renders a static image to a `<canvas>` and applies Remotion effects.
|
|
@@ -253,6 +254,7 @@ const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, eff
|
|
|
253
254
|
*/
|
|
254
255
|
exports.CanvasImage = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
255
256
|
Component: CanvasImageInner,
|
|
257
|
+
componentIdentity: 'dev.remotion.remotion.CanvasImage',
|
|
256
258
|
schema: exports.canvasImageSchema,
|
|
257
259
|
supportsEffects: true,
|
|
258
260
|
});
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { ImageFit } from '../calculate-image-fit.js';
|
|
3
3
|
import type { EffectsProp } from '../effects/effect-types.js';
|
|
4
4
|
import type { SequenceProps } from '../Sequence.js';
|
|
5
|
-
type CanvasImageSequenceProps = Pick<SequenceProps, 'durationInFrames' | 'from' | 'hidden' | 'name' | 'showInTimeline'> & {
|
|
5
|
+
type CanvasImageSequenceProps = Pick<SequenceProps, 'durationInFrames' | 'from' | 'freeze' | 'hidden' | 'name' | 'showInTimeline'> & {
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated For internal use only.
|
|
8
8
|
*/
|
package/dist/cjs/easing.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { SpringConfig } from './spring/spring-utils.js';
|
|
2
|
+
export type EasingSpringConfig = Partial<Pick<SpringConfig, 'damping' | 'mass' | 'stiffness' | 'overshootClamping'>>;
|
|
1
3
|
/**
|
|
2
4
|
* @description The Easing module implements common easing functions. You can use it with the interpolate() API.
|
|
3
5
|
* @see [Documentation](https://www.remotion.dev/docs/easing)
|
|
@@ -15,6 +17,7 @@ export declare class Easing {
|
|
|
15
17
|
static exp(t: number): number;
|
|
16
18
|
static elastic(bounciness?: number): (t: number) => number;
|
|
17
19
|
static back(s?: number): (t: number) => number;
|
|
20
|
+
static spring(config?: EasingSpringConfig): (t: number) => number;
|
|
18
21
|
static bounce(t: number): number;
|
|
19
22
|
static bezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number;
|
|
20
23
|
static in(easing: (t: number) => number): (t: number) => number;
|
package/dist/cjs/easing.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Easing = void 0;
|
|
5
5
|
const bezier_js_1 = require("./bezier.js");
|
|
6
|
+
const index_js_1 = require("./spring/index.js");
|
|
6
7
|
// Some easing curves are only defined on [0, 1] (e.g. quarter circle, bounce segments).
|
|
7
8
|
// `interpolate(..., { extrapolate: 'extend' })` can pass values outside that interval; clamp
|
|
8
9
|
// there so we return endpoints instead of NaN or unintended extrapolation.
|
|
9
10
|
const clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
11
|
+
const springEasingDurationInFrames = 30;
|
|
10
12
|
/**
|
|
11
13
|
* @description The Easing module implements common easing functions. You can use it with the interpolate() API.
|
|
12
14
|
* @see [Documentation](https://www.remotion.dev/docs/easing)
|
|
@@ -50,6 +52,22 @@ class Easing {
|
|
|
50
52
|
static back(s = 1.70158) {
|
|
51
53
|
return (t) => t * t * ((s + 1) * t - s);
|
|
52
54
|
}
|
|
55
|
+
static spring(config = {}) {
|
|
56
|
+
return (t) => {
|
|
57
|
+
if (t <= 0) {
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
if (t >= 1) {
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
return (0, index_js_1.spring)({
|
|
64
|
+
fps: springEasingDurationInFrames,
|
|
65
|
+
frame: t * springEasingDurationInFrames,
|
|
66
|
+
config,
|
|
67
|
+
durationInFrames: springEasingDurationInFrames,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
53
71
|
static bounce(t) {
|
|
54
72
|
const u = clampUnit(t);
|
|
55
73
|
if (u < 1 / 2.75) {
|
|
@@ -13,5 +13,5 @@ type OptionalProps = {
|
|
|
13
13
|
readonly pixelDensity: number | undefined;
|
|
14
14
|
};
|
|
15
15
|
export type SolidProps = MandatoryProps & Partial<OptionalProps>;
|
|
16
|
-
export declare const Solid: React.ComponentType<MandatoryProps & Partial<OptionalProps> & Pick<SequenceProps, "durationInFrames" | "from" | "hidden" | "name" | "showInTimeline"> & React.RefAttributes<HTMLCanvasElement>>;
|
|
16
|
+
export declare const Solid: React.ComponentType<MandatoryProps & Partial<OptionalProps> & Pick<SequenceProps, "durationInFrames" | "freeze" | "from" | "hidden" | "name" | "showInTimeline"> & React.RefAttributes<HTMLCanvasElement>>;
|
|
17
17
|
export {};
|
|
@@ -25,6 +25,7 @@ const resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
25
25
|
const solidSchema = {
|
|
26
26
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
27
27
|
from: sequence_field_schema_js_1.fromField,
|
|
28
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
28
29
|
color: {
|
|
29
30
|
type: 'color',
|
|
30
31
|
default: 'transparent',
|
|
@@ -140,7 +141,7 @@ const SolidInner = ({ color, width, height, effects = [], className, style, pixe
|
|
|
140
141
|
}, [height, style, width]);
|
|
141
142
|
return (jsx_runtime_1.jsx("canvas", { ref: canvasRef, width: canvasWidth, height: canvasHeight, className: className, style: canvasStyle }));
|
|
142
143
|
};
|
|
143
|
-
const SolidOuter = (0, react_1.forwardRef)(({ effects = [], _experimentalControls: controls, color, height, width, className, durationInFrames, style, name, from, hidden, showInTimeline, pixelDensity, ...props }, ref) => {
|
|
144
|
+
const SolidOuter = (0, react_1.forwardRef)(({ effects = [], _experimentalControls: controls, color, height, width, className, durationInFrames, style, name, from, freeze, hidden, showInTimeline, pixelDensity, ...props }, ref) => {
|
|
144
145
|
var _a;
|
|
145
146
|
props;
|
|
146
147
|
const memoizedEffectDefinitions = (0, use_memoized_effects_js_1.useMemoizedEffectDefinitions)(effects);
|
|
@@ -148,10 +149,11 @@ const SolidOuter = (0, react_1.forwardRef)(({ effects = [], _experimentalControl
|
|
|
148
149
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
149
150
|
return actualRef.current;
|
|
150
151
|
}, []);
|
|
151
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from, hidden: hidden, showInTimeline: showInTimeline, _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', _remotionInternalRefForOutline: actualRef, _remotionInternalDocumentationLink:
|
|
152
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline, _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', _remotionInternalRefForOutline: actualRef, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid", ...props, children: jsx_runtime_1.jsx(SolidInner, { reference: actualRef, overrideId: (_a = controls === null || controls === void 0 ? void 0 : controls.overrideId) !== null && _a !== void 0 ? _a : null, color: color, height: height, width: width, className: className, style: style, effects: effects, pixelDensity: pixelDensity }) }));
|
|
152
153
|
});
|
|
153
154
|
exports.Solid = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
154
155
|
Component: SolidOuter,
|
|
156
|
+
componentIdentity: 'dev.remotion.remotion.Solid',
|
|
155
157
|
schema: solidSchema,
|
|
156
158
|
supportsEffects: true,
|
|
157
159
|
});
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './_check-rsc.js';
|
|
2
2
|
import './asset-types.js';
|
|
3
3
|
import type { Codec } from './codec.js';
|
|
4
|
-
import type { AnyCompMetadata, AnyComposition, AudioOrVideoAsset, LoopDisplay, SequenceControls, TRenderAsset } from './CompositionManager.js';
|
|
4
|
+
import type { AnyCompMetadata, AnyComposition, AudioOrVideoAsset, JsxComponentIdentity, LoopDisplay, SequenceControls, TRenderAsset } from './CompositionManager.js';
|
|
5
5
|
import type { DelayRenderScope } from './delay-render.js';
|
|
6
6
|
import { type TFolder } from './Folder.js';
|
|
7
7
|
import type { StaticFile } from './get-static-files.js';
|
|
@@ -182,4 +182,4 @@ export type _InternalTypes = {
|
|
|
182
182
|
TRenderAsset: TRenderAsset;
|
|
183
183
|
ProResProfile: ProResProfile;
|
|
184
184
|
};
|
|
185
|
-
export type { AnyComposition, ArrayFieldSchema, ArrayItemFieldSchema, DelayRenderScope, LoopDisplay, SequenceControls, SequenceFieldSchema, SequenceSchema, UseBufferState, };
|
|
185
|
+
export type { AnyComposition, ArrayFieldSchema, ArrayItemFieldSchema, DelayRenderScope, JsxComponentIdentity, LoopDisplay, SequenceControls, SequenceFieldSchema, SequenceSchema, UseBufferState, };
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ScheduleAudioNodeResult } from './audio/shared-audio-tags.js';
|
|
|
2
2
|
import { type ScheduleAudioNodeOptions } from './audio/shared-audio-tags.js';
|
|
3
3
|
import type { RemotionAudioContextState } from './audio/use-audio-context.js';
|
|
4
4
|
import { type CompProps } from './Composition.js';
|
|
5
|
-
import type { TCompMetadata, TComposition, TRenderAsset, TSequence } from './CompositionManager.js';
|
|
5
|
+
import type { JsxComponentIdentity, TCompMetadata, TComposition, TRenderAsset, TSequence } from './CompositionManager.js';
|
|
6
6
|
import type { CompositionManagerContext } from './CompositionManagerContext.js';
|
|
7
7
|
import * as CSSUtils from './default-css.js';
|
|
8
8
|
import type { SerializedJSONWithCustomFields } from './input-props-serialization.js';
|
|
@@ -77,21 +77,29 @@ export declare const Internals: {
|
|
|
77
77
|
readonly SequenceManager: import("react").Context<import("./SequenceManager.js").SequenceManagerContext>;
|
|
78
78
|
readonly SequenceManagerRefContext: import("react").Context<import("./SequenceManager.js").SequenceManagerRef>;
|
|
79
79
|
readonly SequenceStackTracesUpdateContext: import("react").Context<import("./sequence-stack-traces.js").UpdateResolvedStackTraceFn>;
|
|
80
|
-
readonly wrapInSchema: <S extends SequenceSchema, Props extends object>({ Component, schema, supportsEffects, }: {
|
|
80
|
+
readonly wrapInSchema: <S extends SequenceSchema, Props extends object>({ Component, componentIdentity, schema, supportsEffects, }: {
|
|
81
81
|
Component: import("react").ComponentType<Props & {
|
|
82
82
|
readonly _experimentalControls: import("./CompositionManager.js").SequenceControls | undefined;
|
|
83
83
|
}>;
|
|
84
|
+
componentIdentity: string | null;
|
|
84
85
|
schema: S;
|
|
85
86
|
supportsEffects: boolean;
|
|
86
87
|
}) => import("react").ComponentType<Props>;
|
|
87
88
|
readonly sequenceSchema: {
|
|
88
89
|
readonly hidden: import("./sequence-field-schema.js").BooleanFieldSchema;
|
|
90
|
+
readonly showInTimeline: import("./sequence-field-schema.js").HiddenFieldSchema;
|
|
89
91
|
readonly from: {
|
|
90
92
|
readonly type: "number";
|
|
91
93
|
readonly default: 0;
|
|
92
94
|
readonly step: 1;
|
|
93
95
|
readonly hiddenFromList: true;
|
|
94
96
|
};
|
|
97
|
+
readonly freeze: {
|
|
98
|
+
readonly type: "number";
|
|
99
|
+
readonly default: null;
|
|
100
|
+
readonly step: 1;
|
|
101
|
+
readonly hiddenFromList: true;
|
|
102
|
+
};
|
|
95
103
|
readonly durationInFrames: {
|
|
96
104
|
readonly type: "number";
|
|
97
105
|
readonly default: undefined;
|
|
@@ -164,6 +172,8 @@ export declare const Internals: {
|
|
|
164
172
|
readonly none: {};
|
|
165
173
|
};
|
|
166
174
|
};
|
|
175
|
+
} & {
|
|
176
|
+
name: SequenceFieldSchema;
|
|
167
177
|
};
|
|
168
178
|
readonly SequenceWithoutSchema: import("react").ForwardRefExoticComponent<import("./Sequence.js").SequenceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
169
179
|
readonly sequenceStyleSchema: {
|
|
@@ -736,6 +746,12 @@ export declare const Internals: {
|
|
|
736
746
|
readonly step: 1;
|
|
737
747
|
readonly hiddenFromList: true;
|
|
738
748
|
};
|
|
749
|
+
readonly freezeField: {
|
|
750
|
+
readonly type: "number";
|
|
751
|
+
readonly default: null;
|
|
752
|
+
readonly step: 1;
|
|
753
|
+
readonly hiddenFromList: true;
|
|
754
|
+
};
|
|
739
755
|
readonly fromField: {
|
|
740
756
|
readonly type: "number";
|
|
741
757
|
readonly default: 0;
|
|
@@ -743,4 +759,4 @@ export declare const Internals: {
|
|
|
743
759
|
readonly hiddenFromList: true;
|
|
744
760
|
};
|
|
745
761
|
};
|
|
746
|
-
export type { ArrayFieldSchema, ArrayItemFieldSchema, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateEffectPropsResponseFalse, CanUpdateEffectPropsResponseTrue, CanUpdateSequencePropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, CompositionManagerContext, CompProps, DragOverrides, DragOverrideValue, EffectDragOverrides, GetDragOverrides, GetEffectDragOverrides, GetEffectPropStatuses, GetPropStatuses, LoggingContextValue, MediaVolumeContextValue, NonceHistory, OverrideIdsToNodePathsGettersContext, OverrideIdsToNodePathsSettersContext, OverrideIdToNodePaths, OverrideToNodePathGetters, OverrideToNodeSetters, PlaybackRateContextValue, PropStatuses, RemotionAudioContextState, RemotionEnvironment, ResolvedStackLocation, ScheduleAudioNodeOptions, ScheduleAudioNodeResult, SequenceFieldSchema, SequenceNodePath, SequencePropsSubscriptionKey, SequenceSchema, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, VisibleFieldSchema, WatchRemotionStaticFilesPayload, };
|
|
762
|
+
export type { ArrayFieldSchema, ArrayItemFieldSchema, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateEffectPropsResponseFalse, CanUpdateEffectPropsResponseTrue, CanUpdateSequencePropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, CompositionManagerContext, CompProps, DragOverrides, DragOverrideValue, EffectDragOverrides, GetDragOverrides, GetEffectDragOverrides, GetEffectPropStatuses, GetPropStatuses, JsxComponentIdentity, LoggingContextValue, MediaVolumeContextValue, NonceHistory, OverrideIdsToNodePathsGettersContext, OverrideIdsToNodePathsSettersContext, OverrideIdToNodePaths, OverrideToNodePathGetters, OverrideToNodeSetters, PlaybackRateContextValue, PropStatuses, RemotionAudioContextState, RemotionEnvironment, ResolvedStackLocation, ScheduleAudioNodeOptions, ScheduleAudioNodeResult, SequenceFieldSchema, SequenceNodePath, SequencePropsSubscriptionKey, SequenceSchema, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, VisibleFieldSchema, WatchRemotionStaticFilesPayload, };
|
package/dist/cjs/internals.js
CHANGED
|
@@ -262,5 +262,6 @@ exports.Internals = {
|
|
|
262
262
|
getEffectPropStatusesCtx: use_memoized_effects_js_1.getEffectPropStatusesCtx,
|
|
263
263
|
hiddenField: sequence_field_schema_js_1.hiddenField,
|
|
264
264
|
durationInFramesField: sequence_field_schema_js_1.durationInFramesField,
|
|
265
|
+
freezeField: sequence_field_schema_js_1.freezeField,
|
|
265
266
|
fromField: sequence_field_schema_js_1.fromField,
|
|
266
267
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InterpolateOptions } from './interpolate.js';
|
|
2
|
+
export type InterpolateTranslateOptions = InterpolateOptions;
|
|
3
|
+
export declare const interpolateTranslate: (input: number, inputRange: readonly number[], outputRange: readonly string[], options?: Partial<{
|
|
4
|
+
easing: import("./interpolate.js").EasingFunction | readonly import("./interpolate.js").EasingFunction[];
|
|
5
|
+
extrapolateLeft: import("./interpolate.js").ExtrapolateType;
|
|
6
|
+
extrapolateRight: import("./interpolate.js").ExtrapolateType;
|
|
7
|
+
posterize: number;
|
|
8
|
+
}> | undefined) => string;
|