remotion 4.0.476 → 4.0.478
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 +5 -0
- package/dist/cjs/HtmlInCanvas.js +2 -0
- 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 +57 -4
- package/dist/cjs/animated-image/AnimatedImage.js +2 -0
- 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/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 +16 -3
- package/dist/cjs/internals.js +1 -0
- package/dist/cjs/no-react.d.ts +6 -0
- package/dist/cjs/sequence-field-schema.d.ts +19 -1
- package/dist/cjs/sequence-field-schema.js +9 -1
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/series/index.js +1 -0
- package/dist/cjs/use-media-in-timeline.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrap-in-schema.d.ts +2 -1
- package/dist/cjs/wrap-in-schema.js +2 -1
- package/dist/esm/index.mjs +150 -72
- package/dist/esm/no-react.mjs +8 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -34,6 +34,7 @@ type EnhancedTSequenceData = {
|
|
|
34
34
|
doesVolumeChange: boolean;
|
|
35
35
|
startMediaFrom: number;
|
|
36
36
|
playbackRate: number;
|
|
37
|
+
frozenMediaFrame: number | null;
|
|
37
38
|
} | {
|
|
38
39
|
type: 'video';
|
|
39
40
|
src: string;
|
|
@@ -41,6 +42,7 @@ type EnhancedTSequenceData = {
|
|
|
41
42
|
doesVolumeChange: boolean;
|
|
42
43
|
startMediaFrom: number;
|
|
43
44
|
playbackRate: number;
|
|
45
|
+
frozenMediaFrame: number | null;
|
|
44
46
|
} | {
|
|
45
47
|
type: 'image';
|
|
46
48
|
src: string;
|
|
@@ -50,11 +52,13 @@ export type LoopDisplay = {
|
|
|
50
52
|
startOffset: number;
|
|
51
53
|
durationInFrames: number;
|
|
52
54
|
};
|
|
55
|
+
export type JsxComponentIdentity = string;
|
|
53
56
|
export type SequenceControls = {
|
|
54
57
|
schema: SequenceSchema;
|
|
55
58
|
currentRuntimeValueDotNotation: Record<string, unknown>;
|
|
56
59
|
overrideId: string;
|
|
57
60
|
supportsEffects: boolean;
|
|
61
|
+
componentIdentity: JsxComponentIdentity | null;
|
|
58
62
|
};
|
|
59
63
|
export type TSequence = {
|
|
60
64
|
from: number;
|
|
@@ -74,6 +78,7 @@ export type TSequence = {
|
|
|
74
78
|
refForOutline: React.RefObject<Element | null> | null;
|
|
75
79
|
effects: readonly EffectDefinition<unknown>[];
|
|
76
80
|
isInsideSeries: boolean;
|
|
81
|
+
frozenFrame: number | null;
|
|
77
82
|
} & EnhancedTSequenceData;
|
|
78
83
|
export type AudioOrVideoAsset = {
|
|
79
84
|
type: 'audio' | 'video';
|
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -296,11 +296,13 @@ HtmlInCanvasInner.displayName = 'HtmlInCanvas';
|
|
|
296
296
|
const htmlInCanvasSchema = {
|
|
297
297
|
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
298
298
|
from: sequence_field_schema_js_1.fromField,
|
|
299
|
+
freeze: sequence_field_schema_js_1.freezeField,
|
|
299
300
|
...sequence_field_schema_js_1.sequenceVisualStyleSchema,
|
|
300
301
|
hidden: sequence_field_schema_js_1.hiddenField,
|
|
301
302
|
};
|
|
302
303
|
const HtmlInCanvasWrapped = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
303
304
|
Component: HtmlInCanvasInner,
|
|
305
|
+
componentIdentity: 'dev.remotion.remotion.HtmlInCanvas',
|
|
304
306
|
schema: htmlInCanvasSchema,
|
|
305
307
|
supportsEffects: true,
|
|
306
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: "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 }) }));
|
|
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: "https://www.remotion.dev/docs/img", _experimentalControls: controls, _remotionInternalRefForOutline: refForOutline, ...canvasProps }));
|
|
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, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive", _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, _b;
|
|
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, _c;
|
|
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);
|
|
@@ -51,6 +51,17 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
51
51
|
if (!Number.isFinite(from)) {
|
|
52
52
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
53
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
|
+
}
|
|
54
65
|
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
|
|
55
66
|
const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
|
|
56
67
|
const parentSequenceDuration = parentSequence
|
|
@@ -58,6 +69,10 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
58
69
|
: durationInFrames;
|
|
59
70
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
60
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);
|
|
61
76
|
const premounting = (0, react_1.useMemo)(() => {
|
|
62
77
|
// || is intentional, ?? would not trigger on `false`
|
|
63
78
|
return ((parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.premounting) ||
|
|
@@ -133,6 +148,25 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
133
148
|
// and if it changes, it would lead to-remounting of the sequence.
|
|
134
149
|
const stackRef = (0, react_1.useRef)(null);
|
|
135
150
|
stackRef.current = stack !== null && stack !== void 0 ? stack : inheritedStack;
|
|
151
|
+
const registeredFrozenFrame = typeof freeze === 'number' ? freeze : null;
|
|
152
|
+
const parentCumulatedNegativeFrom = (_c = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.cumulatedNegativeFrom) !== null && _c !== void 0 ? _c : 0;
|
|
153
|
+
const startMediaFrom = isMedia && isMedia.type !== 'image'
|
|
154
|
+
? isMedia.data.startMediaFrom +
|
|
155
|
+
parentCumulatedNegativeFrom -
|
|
156
|
+
cumulatedNegativeFrom
|
|
157
|
+
: null;
|
|
158
|
+
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== 'image'
|
|
159
|
+
? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom
|
|
160
|
+
: null;
|
|
161
|
+
const frozenMediaFrame = isMedia && isMedia.type !== 'image' && mediaFrameAtSequenceZero !== null
|
|
162
|
+
? registeredFrozenFrame === null
|
|
163
|
+
? null
|
|
164
|
+
: mediaFrameAtSequenceZero +
|
|
165
|
+
(loopDisplay
|
|
166
|
+
? registeredFrozenFrame % loopDisplay.durationInFrames
|
|
167
|
+
: registeredFrozenFrame) *
|
|
168
|
+
isMedia.data.playbackRate
|
|
169
|
+
: null;
|
|
136
170
|
(0, react_1.useEffect)(() => {
|
|
137
171
|
var _a, _b, _c;
|
|
138
172
|
if (!env.isStudio) {
|
|
@@ -160,6 +194,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
160
194
|
getStack: () => stackRef.current,
|
|
161
195
|
refForOutline: refForOutline !== null && refForOutline !== void 0 ? refForOutline : null,
|
|
162
196
|
isInsideSeries,
|
|
197
|
+
frozenFrame: registeredFrozenFrame,
|
|
163
198
|
});
|
|
164
199
|
}
|
|
165
200
|
else {
|
|
@@ -183,10 +218,12 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
183
218
|
showInTimeline,
|
|
184
219
|
src: isMedia.data.src,
|
|
185
220
|
getStack: () => stackRef.current,
|
|
186
|
-
startMediaFrom: isMedia.data.startMediaFrom,
|
|
221
|
+
startMediaFrom: startMediaFrom !== null && startMediaFrom !== void 0 ? startMediaFrom : isMedia.data.startMediaFrom,
|
|
187
222
|
volume: isMedia.data.volumes,
|
|
188
223
|
refForOutline: refForOutline !== null && refForOutline !== void 0 ? refForOutline : null,
|
|
189
224
|
isInsideSeries,
|
|
225
|
+
frozenFrame: registeredFrozenFrame,
|
|
226
|
+
frozenMediaFrame,
|
|
190
227
|
});
|
|
191
228
|
}
|
|
192
229
|
return () => {
|
|
@@ -212,6 +249,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
212
249
|
effects: _remotionInternalEffects !== null && _remotionInternalEffects !== void 0 ? _remotionInternalEffects : EMPTY_EFFECTS,
|
|
213
250
|
refForOutline: refForOutline !== null && refForOutline !== void 0 ? refForOutline : null,
|
|
214
251
|
isInsideSeries,
|
|
252
|
+
frozenFrame: registeredFrozenFrame,
|
|
215
253
|
});
|
|
216
254
|
return () => {
|
|
217
255
|
unregisterSequence(id);
|
|
@@ -239,6 +277,9 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
239
277
|
resolvedDocumentationLink,
|
|
240
278
|
refForOutline,
|
|
241
279
|
isInsideSeries,
|
|
280
|
+
registeredFrozenFrame,
|
|
281
|
+
startMediaFrom,
|
|
282
|
+
frozenMediaFrame,
|
|
242
283
|
]);
|
|
243
284
|
// Ceil to support floats
|
|
244
285
|
// https://github.com/remotion-dev/remotion/issues/2958
|
|
@@ -248,7 +289,17 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
248
289
|
: absoluteFrame > endThreshold
|
|
249
290
|
? null
|
|
250
291
|
: children;
|
|
292
|
+
const frozenContent = content === null || typeof freeze === 'undefined' || freeze === null ? (content) : (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freeze, children: content }));
|
|
251
293
|
const styleIfThere = other.layout === 'none' ? undefined : other.style;
|
|
294
|
+
const sequenceRef = (0, react_1.useCallback)((node) => {
|
|
295
|
+
wrapperRefForOutline.current = node;
|
|
296
|
+
if (typeof ref === 'function') {
|
|
297
|
+
ref(node);
|
|
298
|
+
}
|
|
299
|
+
else if (ref) {
|
|
300
|
+
ref.current = node;
|
|
301
|
+
}
|
|
302
|
+
}, [ref]);
|
|
252
303
|
const defaultStyle = (0, react_1.useMemo)(() => {
|
|
253
304
|
return {
|
|
254
305
|
flexDirection: undefined,
|
|
@@ -263,7 +314,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
263
314
|
if (hidden) {
|
|
264
315
|
return null;
|
|
265
316
|
}
|
|
266
|
-
return (jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children:
|
|
317
|
+
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 })) }));
|
|
267
318
|
};
|
|
268
319
|
const RegularSequence = (0, react_1.forwardRef)(RegularSequenceRefForwardingFunction);
|
|
269
320
|
const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
@@ -326,11 +377,13 @@ exports.SequenceWithoutSchema = SequenceInner;
|
|
|
326
377
|
*/
|
|
327
378
|
exports.Sequence = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
328
379
|
Component: SequenceInner,
|
|
380
|
+
componentIdentity: 'dev.remotion.remotion.Sequence',
|
|
329
381
|
schema: sequence_field_schema_js_1.sequenceSchema,
|
|
330
382
|
supportsEffects: false,
|
|
331
383
|
});
|
|
332
384
|
exports.SequenceWithoutFrom = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
333
385
|
Component: SequenceInner,
|
|
386
|
+
componentIdentity: null,
|
|
334
387
|
schema: sequence_field_schema_js_1.sequenceSchemaWithoutFrom,
|
|
335
388
|
supportsEffects: false,
|
|
336
389
|
});
|
|
@@ -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
|
});
|
|
@@ -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
|
*/
|
|
@@ -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: "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
|
+
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,10 +77,11 @@ 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>;
|
|
@@ -93,6 +94,12 @@ export declare const Internals: {
|
|
|
93
94
|
readonly step: 1;
|
|
94
95
|
readonly hiddenFromList: true;
|
|
95
96
|
};
|
|
97
|
+
readonly freeze: {
|
|
98
|
+
readonly type: "number";
|
|
99
|
+
readonly default: null;
|
|
100
|
+
readonly step: 1;
|
|
101
|
+
readonly hiddenFromList: true;
|
|
102
|
+
};
|
|
96
103
|
readonly durationInFrames: {
|
|
97
104
|
readonly type: "number";
|
|
98
105
|
readonly default: undefined;
|
|
@@ -739,6 +746,12 @@ export declare const Internals: {
|
|
|
739
746
|
readonly step: 1;
|
|
740
747
|
readonly hiddenFromList: true;
|
|
741
748
|
};
|
|
749
|
+
readonly freezeField: {
|
|
750
|
+
readonly type: "number";
|
|
751
|
+
readonly default: null;
|
|
752
|
+
readonly step: 1;
|
|
753
|
+
readonly hiddenFromList: true;
|
|
754
|
+
};
|
|
742
755
|
readonly fromField: {
|
|
743
756
|
readonly type: "number";
|
|
744
757
|
readonly default: 0;
|
|
@@ -746,4 +759,4 @@ export declare const Internals: {
|
|
|
746
759
|
readonly hiddenFromList: true;
|
|
747
760
|
};
|
|
748
761
|
};
|
|
749
|
-
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
|
};
|
package/dist/cjs/no-react.d.ts
CHANGED
|
@@ -70,6 +70,12 @@ export declare const NoReactInternals: {
|
|
|
70
70
|
readonly step: 1;
|
|
71
71
|
readonly hiddenFromList: true;
|
|
72
72
|
};
|
|
73
|
+
readonly freeze: {
|
|
74
|
+
readonly type: "number";
|
|
75
|
+
readonly default: null;
|
|
76
|
+
readonly step: 1;
|
|
77
|
+
readonly hiddenFromList: true;
|
|
78
|
+
};
|
|
73
79
|
readonly durationInFrames: {
|
|
74
80
|
readonly type: "number";
|
|
75
81
|
readonly default: undefined;
|
|
@@ -7,7 +7,7 @@ export type NumberFieldSchema = {
|
|
|
7
7
|
min?: number;
|
|
8
8
|
max?: number;
|
|
9
9
|
step?: number;
|
|
10
|
-
default: number | undefined;
|
|
10
|
+
default: number | null | undefined;
|
|
11
11
|
description?: string;
|
|
12
12
|
hiddenFromList: boolean;
|
|
13
13
|
keyframable?: boolean;
|
|
@@ -242,6 +242,12 @@ export declare const fromField: {
|
|
|
242
242
|
readonly step: 1;
|
|
243
243
|
readonly hiddenFromList: true;
|
|
244
244
|
};
|
|
245
|
+
export declare const freezeField: {
|
|
246
|
+
readonly type: "number";
|
|
247
|
+
readonly default: null;
|
|
248
|
+
readonly step: 1;
|
|
249
|
+
readonly hiddenFromList: true;
|
|
250
|
+
};
|
|
245
251
|
export declare const sequenceSchema: {
|
|
246
252
|
readonly hidden: BooleanFieldSchema;
|
|
247
253
|
readonly showInTimeline: HiddenFieldSchema;
|
|
@@ -251,6 +257,12 @@ export declare const sequenceSchema: {
|
|
|
251
257
|
readonly step: 1;
|
|
252
258
|
readonly hiddenFromList: true;
|
|
253
259
|
};
|
|
260
|
+
readonly freeze: {
|
|
261
|
+
readonly type: "number";
|
|
262
|
+
readonly default: null;
|
|
263
|
+
readonly step: 1;
|
|
264
|
+
readonly hiddenFromList: true;
|
|
265
|
+
};
|
|
254
266
|
readonly durationInFrames: {
|
|
255
267
|
readonly type: "number";
|
|
256
268
|
readonly default: undefined;
|
|
@@ -329,6 +341,12 @@ export declare const sequenceSchema: {
|
|
|
329
341
|
export declare const sequenceSchemaWithoutFrom: {
|
|
330
342
|
readonly hidden: BooleanFieldSchema;
|
|
331
343
|
readonly showInTimeline: HiddenFieldSchema;
|
|
344
|
+
readonly freeze: {
|
|
345
|
+
readonly type: "number";
|
|
346
|
+
readonly default: null;
|
|
347
|
+
readonly step: 1;
|
|
348
|
+
readonly hiddenFromList: true;
|
|
349
|
+
};
|
|
332
350
|
readonly durationInFrames: {
|
|
333
351
|
readonly type: "number";
|
|
334
352
|
readonly default: undefined;
|