remotion 4.0.499 → 4.0.501
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/AbsoluteFill.d.ts +237 -1
- package/dist/cjs/AbsoluteFill.js +40 -103
- package/dist/cjs/AbsoluteFillElement.d.ts +3 -0
- package/dist/cjs/AbsoluteFillElement.js +111 -0
- package/dist/cjs/Composition.js +2 -1
- package/dist/cjs/CompositionManager.d.ts +0 -1
- package/dist/cjs/Folder.js +2 -1
- package/dist/cjs/HtmlInCanvas.d.ts +84 -3
- package/dist/cjs/HtmlInCanvas.js +30 -2
- package/dist/cjs/Img.d.ts +84 -11
- package/dist/cjs/Img.js +16 -5
- package/dist/cjs/Interactive.d.ts +211 -6
- package/dist/cjs/Interactive.js +33 -11
- package/dist/cjs/Sequence.d.ts +4 -0
- package/dist/cjs/Sequence.js +30 -13
- package/dist/cjs/TimelineContext.d.ts +0 -1
- package/dist/cjs/TimelineContext.js +1 -4
- package/dist/cjs/animated-image/AnimatedImage.d.ts +82 -1
- package/dist/cjs/animated-image/AnimatedImage.js +13 -2
- package/dist/cjs/animated-image/props.d.ts +2 -2
- package/dist/cjs/audio/AudioForPreview.d.ts +0 -1
- package/dist/cjs/audio/AudioForPreview.js +1 -1
- package/dist/cjs/audio/html5-audio.d.ts +2 -2
- package/dist/cjs/audio/html5-audio.js +2 -2
- package/dist/cjs/canvas-image/CanvasImage.d.ts +83 -3
- package/dist/cjs/canvas-image/CanvasImage.js +13 -2
- package/dist/cjs/canvas-image/props.d.ts +6 -7
- package/dist/cjs/effects/Solid.d.ts +84 -3
- package/dist/cjs/effects/Solid.js +13 -2
- package/dist/cjs/enable-sequence-stack-traces.d.ts +4 -0
- package/dist/cjs/enable-sequence-stack-traces.js +16 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/interactivity-schema.d.ts +420 -1
- package/dist/cjs/interactivity-schema.js +122 -1
- package/dist/cjs/internals.d.ts +211 -2
- package/dist/cjs/internals.js +7 -0
- package/dist/cjs/no-react.d.ts +81 -0
- package/dist/cjs/sequence-crop.d.ts +20 -0
- package/dist/cjs/sequence-crop.js +59 -0
- package/dist/cjs/series/index.js +4 -4
- package/dist/cjs/static-file.js +10 -0
- package/dist/cjs/truncate-src-for-label.js +5 -1
- package/dist/cjs/use-crop-style.d.ts +6 -0
- package/dist/cjs/use-crop-style.js +19 -0
- package/dist/cjs/use-media-in-timeline.d.ts +0 -1
- package/dist/cjs/use-media-in-timeline.js +1 -7
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/OffthreadVideo.js +6 -6
- package/dist/cjs/video/html5-video.d.ts +2 -2
- package/dist/cjs/video/html5-video.js +5 -5
- package/dist/cjs/video/props.d.ts +1 -1
- package/dist/cjs/with-interactivity-schema.js +22 -12
- package/dist/esm/index.mjs +2453 -2022
- package/dist/esm/no-react.mjs +111 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/Sequence.js
CHANGED
|
@@ -4,10 +4,12 @@ exports.SequenceWithoutFrom = exports.Sequence = exports.SequenceWithoutSchema =
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const
|
|
7
|
+
const AbsoluteFillElement_js_1 = require("./AbsoluteFillElement.js");
|
|
8
|
+
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
8
9
|
const freeze_js_1 = require("./freeze.js");
|
|
9
10
|
const interactivity_schema_js_1 = require("./interactivity-schema.js");
|
|
10
11
|
const nonce_js_1 = require("./nonce.js");
|
|
12
|
+
const sequence_crop_js_1 = require("./sequence-crop.js");
|
|
11
13
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
12
14
|
const SequenceManager_js_1 = require("./SequenceManager.js");
|
|
13
15
|
const is_inside_series_js_1 = require("./series/is-inside-series.js");
|
|
@@ -18,12 +20,11 @@ const use_video_config_js_1 = require("./use-video-config.js");
|
|
|
18
20
|
const v5_flag_js_1 = require("./v5-flag.js");
|
|
19
21
|
const with_interactivity_schema_js_1 = require("./with-interactivity-schema.js");
|
|
20
22
|
const EMPTY_EFFECTS = [];
|
|
21
|
-
const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, hidden = false, controls, _remotionInternalEffects, _remotionInternalLoopDisplay: loopDisplay, _remotionInternalStack: stack, _remotionInternalDocumentationLink: documentationLink, _remotionInternalSingleChildComponent: singleChildComponent, _remotionInternalPremountDisplay: premountDisplay, _remotionInternalPostmountDisplay: postmountDisplay, _remotionInternalIsMedia: isMedia, outlineRef: passedRefForOutline, ...other }, ref) => {
|
|
22
|
-
var _a, _b, _c;
|
|
23
|
+
const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze, durationInFrames = Infinity, children, name, height, width, showInTimeline = true, hidden = false, controls, _remotionInternalEffects, _remotionInternalLoopDisplay: loopDisplay, _remotionInternalStack: stack, _remotionInternalDocumentationLink: documentationLink, _remotionInternalSingleChildComponent: singleChildComponent, _remotionInternalPremountDisplay: premountDisplay, _remotionInternalPostmountDisplay: postmountDisplay, _remotionInternalIsMedia: isMedia, outlineRef: passedRefForOutline, cropLeft, cropRight, cropTop, cropBottom, ...other }, ref) => {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
23
25
|
const { layout = 'absolute-fill' } = other;
|
|
24
26
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
25
27
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
26
|
-
const { rootId } = (0, timeline_position_state_js_1.useTimelineContext)();
|
|
27
28
|
const cumulatedFrom = parentSequence
|
|
28
29
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
29
30
|
: 0;
|
|
@@ -31,6 +32,13 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
31
32
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
32
33
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
33
34
|
}
|
|
35
|
+
const cropProps = { cropLeft, cropRight, cropTop, cropBottom };
|
|
36
|
+
const hasCropProp = Object.values(cropProps).some((value) => value !== undefined);
|
|
37
|
+
if (layout === 'none' && hasCropProp) {
|
|
38
|
+
throw new TypeError('The cropLeft, cropRight, cropTop and cropBottom props of <Sequence /> are only supported with layout="absolute-fill".');
|
|
39
|
+
}
|
|
40
|
+
(0, sequence_crop_js_1.validateSequenceCrop)(cropProps);
|
|
41
|
+
const { left: resolvedCropLeft, right: resolvedCropRight, top: resolvedCropTop, bottom: resolvedCropBottom, } = (0, sequence_crop_js_1.resolveSequenceCrop)(cropProps);
|
|
34
42
|
// @ts-expect-error
|
|
35
43
|
if (layout === 'none' && typeof other.style !== 'undefined') {
|
|
36
44
|
throw new TypeError('If layout="none", you may not pass a style. Passed: ' +
|
|
@@ -155,14 +163,15 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
155
163
|
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink : 'https://www.remotion.dev/docs/sequence';
|
|
156
164
|
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
157
165
|
const isInsideSeries = (0, react_1.useContext)(is_inside_series_js_1.IsInsideSeriesContext);
|
|
158
|
-
const inheritedStack = (_b = other === null || other === void 0 ? void 0 : other.stack) !== null && _b !== void 0 ? _b : null;
|
|
159
166
|
// Our assumption: Stack doesnt' change. After we symbolicate we assign it a nodePath
|
|
160
167
|
// and if it changes, it would lead to-remounting of the sequence.
|
|
161
168
|
const stackRef = (0, react_1.useRef)(null);
|
|
162
|
-
stackRef.current =
|
|
169
|
+
stackRef.current = controls
|
|
170
|
+
? ((_c = (_b = (0, enable_sequence_stack_traces_js_1.getStackForControls)(controls)) !== null && _b !== void 0 ? _b : stack) !== null && _c !== void 0 ? _c : null)
|
|
171
|
+
: (stack !== null && stack !== void 0 ? stack : null);
|
|
163
172
|
const registeredFrozenFrame = typeof freeze === 'number' ? freeze : null;
|
|
164
173
|
const registeredTrimBefore = trimBefore === 0 ? null : trimBefore;
|
|
165
|
-
const parentCumulatedNegativeFrom = (
|
|
174
|
+
const parentCumulatedNegativeFrom = (_d = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.cumulatedNegativeFrom) !== null && _d !== void 0 ? _d : 0;
|
|
166
175
|
const startMediaFrom = isMedia && isMedia.type !== 'image'
|
|
167
176
|
? isMedia.data.startMediaFrom +
|
|
168
177
|
parentCumulatedNegativeFrom -
|
|
@@ -202,7 +211,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
202
211
|
parent: (_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id) !== null && _a !== void 0 ? _a : null,
|
|
203
212
|
postmountDisplay: postmountDisplay !== null && postmountDisplay !== void 0 ? postmountDisplay : null,
|
|
204
213
|
premountDisplay: premountDisplay !== null && premountDisplay !== void 0 ? premountDisplay : null,
|
|
205
|
-
rootId,
|
|
206
214
|
showInTimeline,
|
|
207
215
|
src: isMedia.src,
|
|
208
216
|
getStack: () => stackRef.current,
|
|
@@ -230,7 +238,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
230
238
|
playbackRate: isMedia.data.playbackRate,
|
|
231
239
|
postmountDisplay: postmountDisplay !== null && postmountDisplay !== void 0 ? postmountDisplay : null,
|
|
232
240
|
premountDisplay: premountDisplay !== null && premountDisplay !== void 0 ? premountDisplay : null,
|
|
233
|
-
rootId,
|
|
234
241
|
showInTimeline,
|
|
235
242
|
src: isMedia.data.src,
|
|
236
243
|
getStack: () => stackRef.current,
|
|
@@ -257,7 +264,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
257
264
|
documentationLink: resolvedDocumentationLink,
|
|
258
265
|
parent: (_c = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id) !== null && _c !== void 0 ? _c : null,
|
|
259
266
|
type: 'sequence',
|
|
260
|
-
rootId,
|
|
261
267
|
showInTimeline,
|
|
262
268
|
nonce: nonce.get(),
|
|
263
269
|
loopDisplay,
|
|
@@ -283,7 +289,6 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
283
289
|
unregisterSequence,
|
|
284
290
|
parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.id,
|
|
285
291
|
actualDurationInFrames,
|
|
286
|
-
rootId,
|
|
287
292
|
from,
|
|
288
293
|
trimBefore,
|
|
289
294
|
registeredTrimBefore,
|
|
@@ -315,6 +320,13 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
315
320
|
: children;
|
|
316
321
|
const frozenContent = content === null || typeof freeze === 'undefined' || freeze === null ? (content) : (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freeze, children: content }));
|
|
317
322
|
const styleIfThere = other.layout === 'none' ? undefined : other.style;
|
|
323
|
+
const cropClipPath = (0, sequence_crop_js_1.getSequenceCropClipPath)({
|
|
324
|
+
left: resolvedCropLeft,
|
|
325
|
+
right: resolvedCropRight,
|
|
326
|
+
top: resolvedCropTop,
|
|
327
|
+
bottom: resolvedCropBottom,
|
|
328
|
+
style: styleIfThere,
|
|
329
|
+
});
|
|
318
330
|
const sequenceRef = (0, react_1.useCallback)((node) => {
|
|
319
331
|
wrapperRefForOutline.current = node;
|
|
320
332
|
if (typeof ref === 'function') {
|
|
@@ -330,15 +342,20 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
330
342
|
...(width ? { width } : {}),
|
|
331
343
|
...(height ? { height } : {}),
|
|
332
344
|
...(styleIfThere !== null && styleIfThere !== void 0 ? styleIfThere : {}),
|
|
345
|
+
...(cropClipPath
|
|
346
|
+
? {
|
|
347
|
+
clipPath: cropClipPath,
|
|
348
|
+
}
|
|
349
|
+
: {}),
|
|
333
350
|
};
|
|
334
|
-
}, [height, styleIfThere, width]);
|
|
351
|
+
}, [cropClipPath, height, styleIfThere, width]);
|
|
335
352
|
if (ref !== null && layout === 'none') {
|
|
336
353
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
337
354
|
}
|
|
338
355
|
if (hidden) {
|
|
339
356
|
return null;
|
|
340
357
|
}
|
|
341
|
-
return (jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children: frozenContent === null ? null : other.layout === 'none' ? (frozenContent) : (jsx_runtime_1.jsx(
|
|
358
|
+
return (jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: contextValue, children: frozenContent === null ? null : other.layout === 'none' ? (frozenContent) : (jsx_runtime_1.jsx(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: sequenceRef, style: defaultStyle, className: other.className, children: frozenContent })) }));
|
|
342
359
|
};
|
|
343
360
|
const RegularSequence = (0, react_1.forwardRef)(RegularSequenceRefForwardingFunction);
|
|
344
361
|
const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
@@ -4,7 +4,6 @@ import { type PlayableMediaTag } from './timeline-position-state';
|
|
|
4
4
|
export type TimelineContextValue = {
|
|
5
5
|
frame: Record<string, number>;
|
|
6
6
|
playing: boolean;
|
|
7
|
-
rootId: string;
|
|
8
7
|
imperativePlaying: RefObject<boolean>;
|
|
9
8
|
audioAndVideoTags: RefObject<PlayableMediaTag[]>;
|
|
10
9
|
};
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineContextProvider = exports.AbsoluteTimeContext = exports.PlaybackRateContext = exports.TimelineContext = exports.SetTimelineContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const random_1 = require("./random");
|
|
7
6
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
8
7
|
const use_delay_render_1 = require("./use-delay-render");
|
|
9
8
|
exports.SetTimelineContext = (0, react_1.createContext)({
|
|
@@ -22,7 +21,6 @@ const TimelineContextProvider = ({ children, frameState }) => {
|
|
|
22
21
|
const imperativePlaying = (0, react_1.useRef)(false);
|
|
23
22
|
const [playbackRate, setPlaybackRate] = (0, react_1.useState)(1);
|
|
24
23
|
const audioAndVideoTags = (0, react_1.useRef)([]);
|
|
25
|
-
const [remotionRootId] = (0, react_1.useState)(() => String((0, random_1.random)(null)));
|
|
26
24
|
const [_frame, setFrame] = (0, react_1.useState)(() => (0, timeline_position_state_1.getInitialFrameState)());
|
|
27
25
|
const frame = frameState !== null && frameState !== void 0 ? frameState : _frame;
|
|
28
26
|
const { delayRender, continueRender } = (0, use_delay_render_1.useDelayRender)();
|
|
@@ -62,10 +60,9 @@ const TimelineContextProvider = ({ children, frameState }) => {
|
|
|
62
60
|
frame,
|
|
63
61
|
playing,
|
|
64
62
|
imperativePlaying,
|
|
65
|
-
rootId: remotionRootId,
|
|
66
63
|
audioAndVideoTags,
|
|
67
64
|
};
|
|
68
|
-
}, [frame, playing
|
|
65
|
+
}, [frame, playing]);
|
|
69
66
|
const playbackRateContextValue = (0, react_1.useMemo)(() => {
|
|
70
67
|
return {
|
|
71
68
|
playbackRate,
|
|
@@ -67,6 +67,47 @@ export declare const animatedImageSchema: {
|
|
|
67
67
|
readonly default: undefined;
|
|
68
68
|
readonly description: "Border color";
|
|
69
69
|
};
|
|
70
|
+
readonly 'style.borderRadius': {
|
|
71
|
+
readonly type: "number";
|
|
72
|
+
readonly default: 0;
|
|
73
|
+
readonly min: 0;
|
|
74
|
+
readonly step: 1;
|
|
75
|
+
readonly description: "Border radius";
|
|
76
|
+
readonly hiddenFromList: false;
|
|
77
|
+
readonly keyframable: true;
|
|
78
|
+
};
|
|
79
|
+
readonly 'style.borderTopLeftRadius': {
|
|
80
|
+
readonly type: "number";
|
|
81
|
+
readonly default: 0;
|
|
82
|
+
readonly min: 0;
|
|
83
|
+
readonly step: 1;
|
|
84
|
+
readonly description: "Top left radius";
|
|
85
|
+
readonly hiddenFromList: false;
|
|
86
|
+
};
|
|
87
|
+
readonly 'style.borderTopRightRadius': {
|
|
88
|
+
readonly type: "number";
|
|
89
|
+
readonly default: 0;
|
|
90
|
+
readonly min: 0;
|
|
91
|
+
readonly step: 1;
|
|
92
|
+
readonly description: "Top right radius";
|
|
93
|
+
readonly hiddenFromList: false;
|
|
94
|
+
};
|
|
95
|
+
readonly 'style.borderBottomRightRadius': {
|
|
96
|
+
readonly type: "number";
|
|
97
|
+
readonly default: 0;
|
|
98
|
+
readonly min: 0;
|
|
99
|
+
readonly step: 1;
|
|
100
|
+
readonly description: "Bottom right radius";
|
|
101
|
+
readonly hiddenFromList: false;
|
|
102
|
+
};
|
|
103
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
104
|
+
readonly type: "number";
|
|
105
|
+
readonly default: 0;
|
|
106
|
+
readonly min: 0;
|
|
107
|
+
readonly step: 1;
|
|
108
|
+
readonly description: "Bottom left radius";
|
|
109
|
+
readonly hiddenFromList: false;
|
|
110
|
+
};
|
|
70
111
|
readonly 'style.backgroundColor': {
|
|
71
112
|
readonly type: "color";
|
|
72
113
|
readonly default: "transparent";
|
|
@@ -89,6 +130,46 @@ export declare const animatedImageSchema: {
|
|
|
89
130
|
readonly hiddenFromList: true;
|
|
90
131
|
readonly keyframable: false;
|
|
91
132
|
};
|
|
133
|
+
readonly cropLeft: {
|
|
134
|
+
readonly type: "number";
|
|
135
|
+
readonly default: 0;
|
|
136
|
+
readonly description: "Crop left";
|
|
137
|
+
readonly min: 0;
|
|
138
|
+
readonly max: 1;
|
|
139
|
+
readonly step: 0.01;
|
|
140
|
+
readonly hiddenFromList: false;
|
|
141
|
+
readonly keyframable: true;
|
|
142
|
+
};
|
|
143
|
+
readonly cropRight: {
|
|
144
|
+
readonly type: "number";
|
|
145
|
+
readonly default: 0;
|
|
146
|
+
readonly description: "Crop right";
|
|
147
|
+
readonly min: 0;
|
|
148
|
+
readonly max: 1;
|
|
149
|
+
readonly step: 0.01;
|
|
150
|
+
readonly hiddenFromList: false;
|
|
151
|
+
readonly keyframable: true;
|
|
152
|
+
};
|
|
153
|
+
readonly cropTop: {
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly default: 0;
|
|
156
|
+
readonly description: "Crop top";
|
|
157
|
+
readonly min: 0;
|
|
158
|
+
readonly max: 1;
|
|
159
|
+
readonly step: 0.01;
|
|
160
|
+
readonly hiddenFromList: false;
|
|
161
|
+
readonly keyframable: true;
|
|
162
|
+
};
|
|
163
|
+
readonly cropBottom: {
|
|
164
|
+
readonly type: "number";
|
|
165
|
+
readonly default: 0;
|
|
166
|
+
readonly description: "Crop bottom";
|
|
167
|
+
readonly min: 0;
|
|
168
|
+
readonly max: 1;
|
|
169
|
+
readonly step: 0.01;
|
|
170
|
+
readonly hiddenFromList: false;
|
|
171
|
+
readonly keyframable: true;
|
|
172
|
+
};
|
|
92
173
|
readonly durationInFrames: {
|
|
93
174
|
readonly type: "number";
|
|
94
175
|
readonly default: undefined;
|
|
@@ -135,7 +216,7 @@ export declare const animatedImageSchema: {
|
|
|
135
216
|
readonly keyframable: false;
|
|
136
217
|
};
|
|
137
218
|
};
|
|
138
|
-
export declare const AnimatedImage: React.ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractivePremountProps & {
|
|
219
|
+
export declare const AnimatedImage: React.ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractiveCropProps & import("../Interactive.js").InteractivePremountProps & {
|
|
139
220
|
src: string;
|
|
140
221
|
width?: number | undefined;
|
|
141
222
|
height?: number | undefined;
|
|
@@ -9,6 +9,7 @@ const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-trac
|
|
|
9
9
|
const freeze_js_1 = require("../freeze.js");
|
|
10
10
|
const interactivity_schema_js_1 = require("../interactivity-schema.js");
|
|
11
11
|
const Sequence_js_1 = require("../Sequence.js");
|
|
12
|
+
const use_crop_style_js_1 = require("../use-crop-style.js");
|
|
12
13
|
const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
13
14
|
const use_delay_render_js_1 = require("../use-delay-render.js");
|
|
14
15
|
const use_premounting_js_1 = require("../use-premounting.js");
|
|
@@ -27,6 +28,7 @@ exports.animatedImageSchema = {
|
|
|
27
28
|
keyframable: false,
|
|
28
29
|
},
|
|
29
30
|
...interactivity_schema_js_1.baseSchema,
|
|
31
|
+
...interactivity_schema_js_1.cropSchema,
|
|
30
32
|
...interactivity_schema_js_1.premountSchema,
|
|
31
33
|
playbackRate: {
|
|
32
34
|
type: 'number',
|
|
@@ -41,6 +43,7 @@ exports.animatedImageSchema = {
|
|
|
41
43
|
...interactivity_schema_js_1.transformSchema,
|
|
42
44
|
...interactivity_schema_js_1.backgroundSchema,
|
|
43
45
|
...interactivity_schema_js_1.borderSchema,
|
|
46
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
44
47
|
};
|
|
45
48
|
const getCanvasPropsFromSequenceProps = (props) => {
|
|
46
49
|
const canvasProps = {};
|
|
@@ -196,7 +199,7 @@ const AnimatedImageContent = (0, react_1.forwardRef)(({ src, width, height, onEr
|
|
|
196
199
|
return (jsx_runtime_1.jsx(canvas_1.Canvas, { ref: ref, width: width, height: height, fit: fit, effects: memoizedEffects, ...props }));
|
|
197
200
|
});
|
|
198
201
|
AnimatedImageContent.displayName = 'AnimatedImageContent';
|
|
199
|
-
const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, loopBehavior, id, className, style, durationInFrames, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, requestInit, effects = [], controls, ref, ...sequenceProps }) => {
|
|
202
|
+
const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, loopBehavior, id, className, style, durationInFrames, from, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, cropLeft, cropRight, cropTop, cropBottom, requestInit, effects = [], controls, ref, ...sequenceProps }) => {
|
|
200
203
|
const actualRef = (0, react_1.useRef)(null);
|
|
201
204
|
const memoizedEffectDefinitions = (0, use_memoized_effects_js_1.useMemoizedEffectDefinitions)(effects);
|
|
202
205
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
@@ -212,6 +215,14 @@ const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, lo
|
|
|
212
215
|
styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
|
|
213
216
|
hideWhilePremounted: 'display-none',
|
|
214
217
|
});
|
|
218
|
+
const croppedStyle = (0, use_crop_style_js_1.useCropStyle)({
|
|
219
|
+
cropLeft,
|
|
220
|
+
cropRight,
|
|
221
|
+
cropTop,
|
|
222
|
+
cropBottom,
|
|
223
|
+
style: premountingStyle,
|
|
224
|
+
componentName: '<AnimatedImage />',
|
|
225
|
+
});
|
|
215
226
|
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
216
227
|
const animatedImageProps = {
|
|
217
228
|
src,
|
|
@@ -223,7 +234,7 @@ const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, lo
|
|
|
223
234
|
loopBehavior,
|
|
224
235
|
id,
|
|
225
236
|
className,
|
|
226
|
-
style:
|
|
237
|
+
style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined,
|
|
227
238
|
requestInit,
|
|
228
239
|
...canvasProps,
|
|
229
240
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageFit } from '../calculate-image-fit.js';
|
|
2
2
|
import type { EffectsProp } from '../effects/effect-types.js';
|
|
3
|
-
import type { InteractiveBaseProps, InteractivePremountProps } from '../Interactive.js';
|
|
3
|
+
import type { InteractiveBaseProps, InteractiveCropProps, InteractivePremountProps } from '../Interactive.js';
|
|
4
4
|
export type RemotionAnimatedImageLoopBehavior = 'loop' | 'pause-after-finish' | 'clear-after-finish';
|
|
5
5
|
export type AnimatedImageCanvasProps = React.AriaAttributes & Record<`data-${string}`, string | undefined>;
|
|
6
6
|
export type RemotionAnimatedImageProps = {
|
|
@@ -16,7 +16,7 @@ export type RemotionAnimatedImageProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
requestInit?: RequestInit;
|
|
18
18
|
} & AnimatedImageCanvasProps;
|
|
19
|
-
export type AnimatedImageProps = InteractiveBaseProps & InteractivePremountProps & RemotionAnimatedImageProps & {
|
|
19
|
+
export type AnimatedImageProps = InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps & RemotionAnimatedImageProps & {
|
|
20
20
|
readonly effects?: EffectsProp;
|
|
21
21
|
};
|
|
22
22
|
export type AnimatedImageFillMode = ImageFit;
|
|
@@ -7,7 +7,6 @@ type AudioForPreviewProps = RemotionAudioProps & {
|
|
|
7
7
|
readonly _remotionInternalNativeLoopPassed: boolean;
|
|
8
8
|
readonly _remotionInternalStack: string | null;
|
|
9
9
|
readonly showInTimeline: boolean;
|
|
10
|
-
readonly stack?: string | undefined;
|
|
11
10
|
readonly onNativeError: React.ReactEventHandler<HTMLAudioElement>;
|
|
12
11
|
};
|
|
13
12
|
export declare const AudioForPreview: React.ForwardRefExoticComponent<Omit<AudioForPreviewProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -58,7 +58,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
58
58
|
throw new Error('Cannot change the behavior for pre-mounting audio tags dynamically.');
|
|
59
59
|
}
|
|
60
60
|
const logLevel = (0, log_level_context_js_1.useLogLevel)();
|
|
61
|
-
const { volume, muted, playbackRate, preservePitch, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, loopVolumeCurveBehavior,
|
|
61
|
+
const { volume, muted, playbackRate, preservePitch, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, loopVolumeCurveBehavior, crossOrigin, delayRenderRetries, delayRenderTimeoutInMilliseconds, toneFrequency, useWebAudioApi, onError, onNativeError, audioStreamIndex, ...nativeProps } = props;
|
|
62
62
|
// Typecheck that we are not accidentially passing unrecognized props
|
|
63
63
|
// to the DOM
|
|
64
64
|
const _propsValid = true;
|
|
@@ -26,7 +26,7 @@ export declare const Html5Audio: React.ForwardRefExoticComponent<Omit<import("./
|
|
|
26
26
|
/**
|
|
27
27
|
* @deprecated For internal use only
|
|
28
28
|
*/
|
|
29
|
-
readonly
|
|
29
|
+
readonly _remotionInternalStack?: string | undefined;
|
|
30
30
|
}, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
31
31
|
/**
|
|
32
32
|
* @deprecated This component has been renamed to `Html5Audio`.
|
|
@@ -54,5 +54,5 @@ export declare const Audio: React.ForwardRefExoticComponent<Omit<import("./props
|
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated For internal use only
|
|
56
56
|
*/
|
|
57
|
-
readonly
|
|
57
|
+
readonly _remotionInternalStack?: string | undefined;
|
|
58
58
|
}, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -24,7 +24,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
24
24
|
var _a, _b, _c;
|
|
25
25
|
const audioTagsContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioTagsContext);
|
|
26
26
|
const propsWithFreeze = props;
|
|
27
|
-
const { startFrom, endAt, trimBefore, trimAfter, name,
|
|
27
|
+
const { startFrom, endAt, trimBefore, trimAfter, name, _remotionInternalStack, pauseWhenBuffering, showInTimeline, onError: onRemotionError, freeze, ...otherProps } = propsWithFreeze;
|
|
28
28
|
const { loop, freeze: _freeze, ...propsOtherThanLoop } = propsWithFreeze;
|
|
29
29
|
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
30
30
|
const environment = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
@@ -94,7 +94,7 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
94
94
|
if (environment.isRendering) {
|
|
95
95
|
return (jsx_runtime_1.jsx(AudioForRendering_js_1.AudioForRendering, { onDuration: onDuration, ...props, ref: ref, onNativeError: onError, _remotionInternalNeedsDurationCalculation: Boolean(loop) }));
|
|
96
96
|
}
|
|
97
|
-
return (jsx_runtime_1.jsx(AudioForPreview_js_1.AudioForPreview, { _remotionInternalNativeLoopPassed: (_c = props._remotionInternalNativeLoopPassed) !== null && _c !== void 0 ? _c : false, _remotionInternalStack:
|
|
97
|
+
return (jsx_runtime_1.jsx(AudioForPreview_js_1.AudioForPreview, { _remotionInternalNativeLoopPassed: (_c = props._remotionInternalNativeLoopPassed) !== null && _c !== void 0 ? _c : false, _remotionInternalStack: _remotionInternalStack !== null && _remotionInternalStack !== void 0 ? _remotionInternalStack : null, shouldPreMountAudioTags: audioTagsContext !== null && audioTagsContext.numberOfAudioTags > 0, ...props, ref: ref, onNativeError: onError, onDuration: onDuration, pauseWhenBuffering: shouldPauseWhenBuffering, _remotionInternalNeedsDurationCalculation: Boolean(loop), showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true }));
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
|
|
@@ -67,6 +67,47 @@ export declare const canvasImageSchema: {
|
|
|
67
67
|
readonly default: undefined;
|
|
68
68
|
readonly description: "Border color";
|
|
69
69
|
};
|
|
70
|
+
readonly 'style.borderRadius': {
|
|
71
|
+
readonly type: "number";
|
|
72
|
+
readonly default: 0;
|
|
73
|
+
readonly min: 0;
|
|
74
|
+
readonly step: 1;
|
|
75
|
+
readonly description: "Border radius";
|
|
76
|
+
readonly hiddenFromList: false;
|
|
77
|
+
readonly keyframable: true;
|
|
78
|
+
};
|
|
79
|
+
readonly 'style.borderTopLeftRadius': {
|
|
80
|
+
readonly type: "number";
|
|
81
|
+
readonly default: 0;
|
|
82
|
+
readonly min: 0;
|
|
83
|
+
readonly step: 1;
|
|
84
|
+
readonly description: "Top left radius";
|
|
85
|
+
readonly hiddenFromList: false;
|
|
86
|
+
};
|
|
87
|
+
readonly 'style.borderTopRightRadius': {
|
|
88
|
+
readonly type: "number";
|
|
89
|
+
readonly default: 0;
|
|
90
|
+
readonly min: 0;
|
|
91
|
+
readonly step: 1;
|
|
92
|
+
readonly description: "Top right radius";
|
|
93
|
+
readonly hiddenFromList: false;
|
|
94
|
+
};
|
|
95
|
+
readonly 'style.borderBottomRightRadius': {
|
|
96
|
+
readonly type: "number";
|
|
97
|
+
readonly default: 0;
|
|
98
|
+
readonly min: 0;
|
|
99
|
+
readonly step: 1;
|
|
100
|
+
readonly description: "Bottom right radius";
|
|
101
|
+
readonly hiddenFromList: false;
|
|
102
|
+
};
|
|
103
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
104
|
+
readonly type: "number";
|
|
105
|
+
readonly default: 0;
|
|
106
|
+
readonly min: 0;
|
|
107
|
+
readonly step: 1;
|
|
108
|
+
readonly description: "Bottom left radius";
|
|
109
|
+
readonly hiddenFromList: false;
|
|
110
|
+
};
|
|
70
111
|
readonly 'style.backgroundColor': {
|
|
71
112
|
readonly type: "color";
|
|
72
113
|
readonly default: "transparent";
|
|
@@ -89,6 +130,46 @@ export declare const canvasImageSchema: {
|
|
|
89
130
|
readonly hiddenFromList: true;
|
|
90
131
|
readonly keyframable: false;
|
|
91
132
|
};
|
|
133
|
+
readonly cropLeft: {
|
|
134
|
+
readonly type: "number";
|
|
135
|
+
readonly default: 0;
|
|
136
|
+
readonly description: "Crop left";
|
|
137
|
+
readonly min: 0;
|
|
138
|
+
readonly max: 1;
|
|
139
|
+
readonly step: 0.01;
|
|
140
|
+
readonly hiddenFromList: false;
|
|
141
|
+
readonly keyframable: true;
|
|
142
|
+
};
|
|
143
|
+
readonly cropRight: {
|
|
144
|
+
readonly type: "number";
|
|
145
|
+
readonly default: 0;
|
|
146
|
+
readonly description: "Crop right";
|
|
147
|
+
readonly min: 0;
|
|
148
|
+
readonly max: 1;
|
|
149
|
+
readonly step: 0.01;
|
|
150
|
+
readonly hiddenFromList: false;
|
|
151
|
+
readonly keyframable: true;
|
|
152
|
+
};
|
|
153
|
+
readonly cropTop: {
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly default: 0;
|
|
156
|
+
readonly description: "Crop top";
|
|
157
|
+
readonly min: 0;
|
|
158
|
+
readonly max: 1;
|
|
159
|
+
readonly step: 0.01;
|
|
160
|
+
readonly hiddenFromList: false;
|
|
161
|
+
readonly keyframable: true;
|
|
162
|
+
};
|
|
163
|
+
readonly cropBottom: {
|
|
164
|
+
readonly type: "number";
|
|
165
|
+
readonly default: 0;
|
|
166
|
+
readonly description: "Crop bottom";
|
|
167
|
+
readonly min: 0;
|
|
168
|
+
readonly max: 1;
|
|
169
|
+
readonly step: 0.01;
|
|
170
|
+
readonly hiddenFromList: false;
|
|
171
|
+
readonly keyframable: true;
|
|
172
|
+
};
|
|
92
173
|
readonly durationInFrames: {
|
|
93
174
|
readonly type: "number";
|
|
94
175
|
readonly default: undefined;
|
|
@@ -129,9 +210,7 @@ export declare const canvasImageSchema: {
|
|
|
129
210
|
};
|
|
130
211
|
};
|
|
131
212
|
};
|
|
132
|
-
export declare const CanvasImage: import("react").ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractivePremountProps & {
|
|
133
|
-
readonly stack?: string | undefined;
|
|
134
|
-
} & CanvasImageCanvasProps & {
|
|
213
|
+
export declare const CanvasImage: import("react").ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractiveCropProps & import("../Interactive.js").InteractivePremountProps & CanvasImageCanvasProps & {
|
|
135
214
|
readonly src: string;
|
|
136
215
|
readonly width?: number | undefined;
|
|
137
216
|
readonly height?: number | undefined;
|
|
@@ -146,5 +225,6 @@ export declare const CanvasImage: import("react").ComponentType<import("../Inter
|
|
|
146
225
|
readonly delayRenderRetries?: number | undefined;
|
|
147
226
|
readonly delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
148
227
|
readonly _remotionInternalDocumentationLink?: string | undefined;
|
|
228
|
+
readonly _remotionInternalCropComponentName?: string | undefined;
|
|
149
229
|
readonly outlineRef?: RefObject<HTMLElement | null> | null | undefined;
|
|
150
230
|
} & import("react").RefAttributes<HTMLCanvasElement>>;
|
|
@@ -15,11 +15,13 @@ const Sequence_js_1 = require("../Sequence.js");
|
|
|
15
15
|
const SequenceContext_js_1 = require("../SequenceContext.js");
|
|
16
16
|
const truncate_src_for_label_js_1 = require("../truncate-src-for-label.js");
|
|
17
17
|
const use_buffer_state_js_1 = require("../use-buffer-state.js");
|
|
18
|
+
const use_crop_style_js_1 = require("../use-crop-style.js");
|
|
18
19
|
const use_delay_render_js_1 = require("../use-delay-render.js");
|
|
19
20
|
const use_premounting_js_1 = require("../use-premounting.js");
|
|
20
21
|
const with_interactivity_schema_js_1 = require("../with-interactivity-schema.js");
|
|
21
22
|
exports.canvasImageSchema = {
|
|
22
23
|
...interactivity_schema_js_1.baseSchema,
|
|
24
|
+
...interactivity_schema_js_1.cropSchema,
|
|
23
25
|
...interactivity_schema_js_1.premountSchema,
|
|
24
26
|
fit: {
|
|
25
27
|
type: 'enum',
|
|
@@ -34,6 +36,7 @@ exports.canvasImageSchema = {
|
|
|
34
36
|
...interactivity_schema_js_1.transformSchema,
|
|
35
37
|
...interactivity_schema_js_1.backgroundSchema,
|
|
36
38
|
...interactivity_schema_js_1.borderSchema,
|
|
39
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
37
40
|
};
|
|
38
41
|
const makeAbortError = () => {
|
|
39
42
|
if (typeof DOMException !== 'undefined') {
|
|
@@ -319,7 +322,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
|
|
|
319
322
|
return (jsx_runtime_1.jsx("canvas", { ...canvasProps, ref: canvasRef, width: width, height: height, className: className, style: style, id: id }));
|
|
320
323
|
});
|
|
321
324
|
CanvasImageContent.displayName = 'CanvasImageContent';
|
|
322
|
-
const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, effects = [], className, style, id, onError, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, durationInFrames, from, trimBefore, freeze, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, hidden, name, showInTimeline,
|
|
325
|
+
const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, effects = [], className, style, id, onError, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, durationInFrames, from, trimBefore, freeze, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, hidden, name, showInTimeline, cropLeft, cropRight, cropTop, cropBottom, controls, _remotionInternalDocumentationLink, _remotionInternalCropComponentName, outlineRef, ...canvasProps }, ref) => {
|
|
323
326
|
if (!src) {
|
|
324
327
|
throw new Error('No "src" prop was passed to <CanvasImage>.');
|
|
325
328
|
}
|
|
@@ -338,7 +341,15 @@ const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, eff
|
|
|
338
341
|
styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
|
|
339
342
|
hideWhilePremounted: 'display-none',
|
|
340
343
|
});
|
|
341
|
-
|
|
344
|
+
const croppedStyle = (0, use_crop_style_js_1.useCropStyle)({
|
|
345
|
+
cropLeft,
|
|
346
|
+
cropRight,
|
|
347
|
+
cropTop,
|
|
348
|
+
cropBottom,
|
|
349
|
+
style: premountingStyle,
|
|
350
|
+
componentName: _remotionInternalCropComponentName !== null && _remotionInternalCropComponentName !== void 0 ? _remotionInternalCropComponentName : '<CanvasImage />',
|
|
351
|
+
});
|
|
352
|
+
return (jsx_runtime_1.jsx(freeze_js_1.Freeze, { frame: freezeFrame, active: isPremountingOrPostmounting, children: jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, trimBefore: trimBefore, 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', controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalIsMedia: { type: 'image', src }, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, outlineRef: outlineRef !== null && outlineRef !== void 0 ? outlineRef : actualRef, children: jsx_runtime_1.jsx(CanvasImageContent, { ref: actualRef, src: src, width: width, height: height, fit: fit, effects: effects, controls: controls, className: className, style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined, id: id, onError: onError, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, refForOutline: outlineRef !== null && outlineRef !== void 0 ? outlineRef : null, ...canvasProps }) }) }));
|
|
342
353
|
});
|
|
343
354
|
/*
|
|
344
355
|
* @description Renders a static image to a `<canvas>` and applies Remotion effects.
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
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
|
-
import type { InteractiveBaseProps, InteractivePremountProps } from '../Interactive.js';
|
|
5
|
-
type CanvasImageSequenceProps = InteractiveBaseProps &
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated For internal use only.
|
|
8
|
-
*/
|
|
9
|
-
readonly stack?: string;
|
|
10
|
-
};
|
|
4
|
+
import type { InteractiveBaseProps, InteractiveCropProps, InteractivePremountProps } from '../Interactive.js';
|
|
5
|
+
type CanvasImageSequenceProps = InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps;
|
|
11
6
|
export type CanvasImageCanvasProps = Omit<React.CanvasHTMLAttributes<HTMLCanvasElement>, 'children' | 'height' | 'onError' | 'width'>;
|
|
12
7
|
export type CanvasImageProps = CanvasImageSequenceProps & CanvasImageCanvasProps & {
|
|
13
8
|
readonly src: string;
|
|
@@ -27,6 +22,10 @@ export type CanvasImageProps = CanvasImageSequenceProps & CanvasImageCanvasProps
|
|
|
27
22
|
* @deprecated For internal use only.
|
|
28
23
|
*/
|
|
29
24
|
readonly _remotionInternalDocumentationLink?: string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated For internal use only.
|
|
27
|
+
*/
|
|
28
|
+
readonly _remotionInternalCropComponentName?: string;
|
|
30
29
|
/**
|
|
31
30
|
* A React ref pointing to the element that Remotion Studio should use for
|
|
32
31
|
* drawing the selection outline in the preview.
|