remotion 4.0.500 → 4.0.502
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/Folder.js +2 -1
- package/dist/cjs/HtmlInCanvas.d.ts +41 -0
- package/dist/cjs/HtmlInCanvas.js +1 -0
- package/dist/cjs/Img.d.ts +41 -8
- package/dist/cjs/Img.js +6 -5
- package/dist/cjs/Interactive.d.ts +93 -6
- package/dist/cjs/Interactive.js +5 -2
- package/dist/cjs/Sequence.js +9 -7
- package/dist/cjs/animated-image/AnimatedImage.d.ts +41 -0
- package/dist/cjs/animated-image/AnimatedImage.js +1 -0
- 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 +42 -3
- package/dist/cjs/canvas-image/CanvasImage.js +3 -2
- package/dist/cjs/canvas-image/props.d.ts +1 -6
- package/dist/cjs/effects/Solid.d.ts +41 -0
- package/dist/cjs/effects/Solid.js +1 -0
- 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 +2 -2
- package/dist/cjs/interactivity-schema.d.ts +181 -1
- package/dist/cjs/interactivity-schema.js +53 -1
- package/dist/cjs/internals.d.ts +84 -1
- package/dist/cjs/internals.js +2 -0
- package/dist/cjs/no-react.d.ts +41 -0
- package/dist/cjs/sequence-crop.d.ts +4 -3
- package/dist/cjs/sequence-crop.js +16 -2
- 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.js +1 -1
- 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 +18 -10
- package/dist/esm/index.mjs +2598 -2435
- package/dist/esm/no-react.mjs +44 -0
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/Img.js
CHANGED
|
@@ -196,7 +196,7 @@ const ImgContent = ({ onError, maxRetries = 2, src, pauseWhenLoading, delayRende
|
|
|
196
196
|
// blocks frame rendering.
|
|
197
197
|
return (jsx_runtime_1.jsx("img", { ...props, ref: imageCallbackRef, crossOrigin: crossOriginValue, onError: didGetError, decoding: isRendering ? 'sync' : decoding }));
|
|
198
198
|
};
|
|
199
|
-
const NativeImgInner = ({ hidden, name,
|
|
199
|
+
const NativeImgInner = ({ hidden, name, showInTimeline, src, from, trimBefore, durationInFrames, freeze, premountFor, postmountFor, style, styleWhilePremounted, styleWhilePostmounted, cropLeft, cropRight, cropTop, cropBottom, controls, outlineRef: refForOutline, ...props }) => {
|
|
200
200
|
if (!src) {
|
|
201
201
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
202
202
|
}
|
|
@@ -218,7 +218,7 @@ const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, trimBe
|
|
|
218
218
|
style: premountingStyle,
|
|
219
219
|
componentName: '<Img />',
|
|
220
220
|
});
|
|
221
|
-
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,
|
|
221
|
+
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, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", _remotionInternalIsMedia: { type: 'image', src }, _remotionInternalPremountDisplay: effectivePremountFor || null, _remotionInternalPostmountDisplay: effectivePostmountFor || null, _remotionInternalIsPremounting: premountingActive, _remotionInternalIsPostmounting: postmountingActive, name: name !== null && name !== void 0 ? name : '<Img>', controls: controls, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, hidden: hidden, outlineRef: refForOutline, children: jsx_runtime_1.jsx(ImgContent, { src: src, refForOutline: refForOutline, style: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined, ...props }) }) }));
|
|
222
222
|
};
|
|
223
223
|
const CanvasImageWithPrivateProps = index_js_1.CanvasImage;
|
|
224
224
|
exports.imgSchema = {
|
|
@@ -234,6 +234,7 @@ exports.imgSchema = {
|
|
|
234
234
|
...interactivity_schema_js_1.transformSchema,
|
|
235
235
|
...interactivity_schema_js_1.backgroundSchema,
|
|
236
236
|
...interactivity_schema_js_1.borderSchema,
|
|
237
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
237
238
|
};
|
|
238
239
|
const imgCanvasFallbackIncompatibleProps = new Set([
|
|
239
240
|
'alt',
|
|
@@ -274,12 +275,12 @@ const getFitFromObjectFit = (style) => {
|
|
|
274
275
|
}
|
|
275
276
|
return undefined;
|
|
276
277
|
};
|
|
277
|
-
const ImgInner = ({ effects = [], ref, hidden, name,
|
|
278
|
+
const ImgInner = ({ effects = [], ref, hidden, name, showInTimeline, src, from, trimBefore, durationInFrames, freeze, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, controls, width, height, className, style, cropLeft, cropRight, cropTop, cropBottom, id, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }) => {
|
|
278
279
|
var _a;
|
|
279
280
|
const refForOutline = (0, react_1.useRef)(null);
|
|
280
281
|
const shouldPauseWhenLoading = (0, v5_flag_js_1.resolveV5Default)(pauseWhenLoading);
|
|
281
282
|
if (effects.length === 0) {
|
|
282
|
-
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name,
|
|
283
|
+
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name, showInTimeline: showInTimeline, src: src, from: from, trimBefore: trimBefore, durationInFrames: durationInFrames, freeze: freeze, premountFor: premountFor, postmountFor: postmountFor, styleWhilePremounted: styleWhilePremounted, styleWhilePostmounted: styleWhilePostmounted, controls: controls, width: width, height: height, className: className, style: style, cropLeft: cropLeft, cropRight: cropRight, cropTop: cropTop, cropBottom: cropBottom, id: id, pauseWhenLoading: shouldPauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, outlineRef: refForOutline }));
|
|
283
284
|
}
|
|
284
285
|
if (!src) {
|
|
285
286
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
@@ -294,7 +295,7 @@ const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src,
|
|
|
294
295
|
const canvasHeight = typeof height === 'number' ? height : undefined;
|
|
295
296
|
const canvasProps = props;
|
|
296
297
|
const canvasFit = (_a = getFitFromObjectFit(style)) !== null && _a !== void 0 ? _a : 'fill';
|
|
297
|
-
return (jsx_runtime_1.jsx(CanvasImageWithPrivateProps, { src: src, width: canvasWidth, height: canvasHeight, fit: canvasFit, effects: effects, className: className, style: style, cropLeft: cropLeft, cropRight: cropRight, cropTop: cropTop, cropBottom: cropBottom, id: id, pauseWhenLoading: shouldPauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, from: from, trimBefore: trimBefore, durationInFrames: durationInFrames, freeze: freeze, premountFor: premountFor, postmountFor: postmountFor, styleWhilePremounted: styleWhilePremounted, styleWhilePostmounted: styleWhilePostmounted, hidden: hidden, name: name !== null && name !== void 0 ? name : '<Img>', showInTimeline: showInTimeline,
|
|
298
|
+
return (jsx_runtime_1.jsx(CanvasImageWithPrivateProps, { src: src, width: canvasWidth, height: canvasHeight, fit: canvasFit, effects: effects, className: className, style: style, cropLeft: cropLeft, cropRight: cropRight, cropTop: cropTop, cropBottom: cropBottom, id: id, pauseWhenLoading: shouldPauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, from: from, trimBefore: trimBefore, durationInFrames: durationInFrames, freeze: freeze, premountFor: premountFor, postmountFor: postmountFor, styleWhilePremounted: styleWhilePremounted, styleWhilePostmounted: styleWhilePostmounted, hidden: hidden, name: name !== null && name !== void 0 ? name : '<Img>', showInTimeline: showInTimeline, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", _remotionInternalCropComponentName: "<Img />", controls: controls, outlineRef: refForOutline, ...canvasProps }));
|
|
298
299
|
};
|
|
299
300
|
/*
|
|
300
301
|
* @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.
|
|
@@ -10,12 +10,7 @@ export type InteractiveBaseProps = Pick<SequenceProps, 'durationInFrames' | 'fro
|
|
|
10
10
|
export type InteractiveTransformProps = Pick<AbsoluteFillLayout, 'style'>;
|
|
11
11
|
export type InteractiveCropProps = Pick<SequenceProps, 'cropLeft' | 'cropRight' | 'cropTop' | 'cropBottom'>;
|
|
12
12
|
export type InteractivePremountProps = Pick<AbsoluteFillLayout, 'premountFor' | 'postmountFor' | 'styleWhilePremounted' | 'styleWhilePostmounted'>;
|
|
13
|
-
type InteractiveSequenceProps = InteractiveBaseProps
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated For internal use only
|
|
16
|
-
*/
|
|
17
|
-
readonly stack?: string;
|
|
18
|
-
};
|
|
13
|
+
type InteractiveSequenceProps = InteractiveBaseProps;
|
|
19
14
|
type InteractiveElementProps<Tag extends InteractiveTag> = Omit<React.ComponentPropsWithoutRef<Tag>, keyof InteractiveSequenceProps> & InteractiveSequenceProps;
|
|
20
15
|
type InteractiveElementComponent<Tag extends InteractiveTag> = React.ComponentType<InteractiveElementProps<Tag> & React.RefAttributes<ElementForTag<Tag>>>;
|
|
21
16
|
type RemotionComponentIdentityPackage = 'remotion' | `@remotion/${string}`;
|
|
@@ -54,6 +49,14 @@ export declare const Interactive: {
|
|
|
54
49
|
readonly name: import("./interactivity-schema.js").HiddenFieldSchema;
|
|
55
50
|
readonly showInTimeline: import("./interactivity-schema.js").HiddenFieldSchema;
|
|
56
51
|
};
|
|
52
|
+
captionsSchema: {
|
|
53
|
+
readonly captions: {
|
|
54
|
+
readonly type: "remotion-captions";
|
|
55
|
+
readonly default: undefined;
|
|
56
|
+
readonly description: "Captions";
|
|
57
|
+
readonly keyframable: false;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
57
60
|
transformSchema: {
|
|
58
61
|
readonly 'style.transformOrigin': {
|
|
59
62
|
readonly type: "transform-origin";
|
|
@@ -207,6 +210,49 @@ export declare const Interactive: {
|
|
|
207
210
|
readonly description: "Border color";
|
|
208
211
|
};
|
|
209
212
|
};
|
|
213
|
+
borderRadiusSchema: {
|
|
214
|
+
readonly 'style.borderRadius': {
|
|
215
|
+
readonly type: "number";
|
|
216
|
+
readonly default: 0;
|
|
217
|
+
readonly min: 0;
|
|
218
|
+
readonly step: 1;
|
|
219
|
+
readonly description: "Border radius";
|
|
220
|
+
readonly hiddenFromList: false;
|
|
221
|
+
readonly keyframable: true;
|
|
222
|
+
};
|
|
223
|
+
readonly 'style.borderTopLeftRadius': {
|
|
224
|
+
readonly type: "number";
|
|
225
|
+
readonly default: 0;
|
|
226
|
+
readonly min: 0;
|
|
227
|
+
readonly step: 1;
|
|
228
|
+
readonly description: "Top left radius";
|
|
229
|
+
readonly hiddenFromList: false;
|
|
230
|
+
};
|
|
231
|
+
readonly 'style.borderTopRightRadius': {
|
|
232
|
+
readonly type: "number";
|
|
233
|
+
readonly default: 0;
|
|
234
|
+
readonly min: 0;
|
|
235
|
+
readonly step: 1;
|
|
236
|
+
readonly description: "Top right radius";
|
|
237
|
+
readonly hiddenFromList: false;
|
|
238
|
+
};
|
|
239
|
+
readonly 'style.borderBottomRightRadius': {
|
|
240
|
+
readonly type: "number";
|
|
241
|
+
readonly default: 0;
|
|
242
|
+
readonly min: 0;
|
|
243
|
+
readonly step: 1;
|
|
244
|
+
readonly description: "Bottom right radius";
|
|
245
|
+
readonly hiddenFromList: false;
|
|
246
|
+
};
|
|
247
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
248
|
+
readonly type: "number";
|
|
249
|
+
readonly default: 0;
|
|
250
|
+
readonly min: 0;
|
|
251
|
+
readonly step: 1;
|
|
252
|
+
readonly description: "Bottom left radius";
|
|
253
|
+
readonly hiddenFromList: false;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
210
256
|
cropSchema: {
|
|
211
257
|
readonly cropLeft: {
|
|
212
258
|
readonly type: "number";
|
|
@@ -404,6 +450,47 @@ export declare const Interactive: {
|
|
|
404
450
|
readonly default: undefined;
|
|
405
451
|
readonly description: "Border color";
|
|
406
452
|
};
|
|
453
|
+
readonly 'style.borderRadius': {
|
|
454
|
+
readonly type: "number";
|
|
455
|
+
readonly default: 0;
|
|
456
|
+
readonly min: 0;
|
|
457
|
+
readonly step: 1;
|
|
458
|
+
readonly description: "Border radius";
|
|
459
|
+
readonly hiddenFromList: false;
|
|
460
|
+
readonly keyframable: true;
|
|
461
|
+
};
|
|
462
|
+
readonly 'style.borderTopLeftRadius': {
|
|
463
|
+
readonly type: "number";
|
|
464
|
+
readonly default: 0;
|
|
465
|
+
readonly min: 0;
|
|
466
|
+
readonly step: 1;
|
|
467
|
+
readonly description: "Top left radius";
|
|
468
|
+
readonly hiddenFromList: false;
|
|
469
|
+
};
|
|
470
|
+
readonly 'style.borderTopRightRadius': {
|
|
471
|
+
readonly type: "number";
|
|
472
|
+
readonly default: 0;
|
|
473
|
+
readonly min: 0;
|
|
474
|
+
readonly step: 1;
|
|
475
|
+
readonly description: "Top right radius";
|
|
476
|
+
readonly hiddenFromList: false;
|
|
477
|
+
};
|
|
478
|
+
readonly 'style.borderBottomRightRadius': {
|
|
479
|
+
readonly type: "number";
|
|
480
|
+
readonly default: 0;
|
|
481
|
+
readonly min: 0;
|
|
482
|
+
readonly step: 1;
|
|
483
|
+
readonly description: "Bottom right radius";
|
|
484
|
+
readonly hiddenFromList: false;
|
|
485
|
+
};
|
|
486
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
487
|
+
readonly type: "number";
|
|
488
|
+
readonly default: 0;
|
|
489
|
+
readonly min: 0;
|
|
490
|
+
readonly step: 1;
|
|
491
|
+
readonly description: "Bottom left radius";
|
|
492
|
+
readonly hiddenFromList: false;
|
|
493
|
+
};
|
|
407
494
|
readonly 'style.backgroundColor': {
|
|
408
495
|
readonly type: "color";
|
|
409
496
|
readonly default: "transparent";
|
package/dist/cjs/Interactive.js
CHANGED
|
@@ -66,6 +66,7 @@ const interactiveBackgroundElementSchema = {
|
|
|
66
66
|
const interactiveBorderElementSchema = {
|
|
67
67
|
...interactiveBackgroundElementSchema,
|
|
68
68
|
...interactivity_schema_js_1.borderSchema,
|
|
69
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
69
70
|
};
|
|
70
71
|
const interactiveTextElementSchema = {
|
|
71
72
|
...interactiveBorderElementSchema,
|
|
@@ -105,13 +106,13 @@ const withSchema = (options) => {
|
|
|
105
106
|
};
|
|
106
107
|
const makeInteractiveElement = (tag, displayName, schema) => {
|
|
107
108
|
const Inner = (0, react_1.forwardRef)((propsWithControls, ref) => {
|
|
108
|
-
const { durationInFrames, from, trimBefore, freeze, hidden, name, showInTimeline,
|
|
109
|
+
const { durationInFrames, from, trimBefore, freeze, hidden, name, showInTimeline, controls, ...props } = propsWithControls;
|
|
109
110
|
const refForOutline = (0, react_1.useRef)(null);
|
|
110
111
|
const callbackRef = (0, react_1.useCallback)((element) => {
|
|
111
112
|
refForOutline.current = element;
|
|
112
113
|
setRef(ref, element);
|
|
113
114
|
}, [ref]);
|
|
114
|
-
return (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, name: name !== null && name !== void 0 ? name : displayName, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, controls: controls,
|
|
115
|
+
return (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, name: name !== null && name !== void 0 ? name : displayName, showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, controls: controls, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive", outlineRef: refForOutline, children: react_1.default.createElement(tag, {
|
|
115
116
|
...props,
|
|
116
117
|
ref: callbackRef,
|
|
117
118
|
}) }));
|
|
@@ -144,10 +145,12 @@ const makeInteractiveSvgStrokeElement = (tag, displayName) => {
|
|
|
144
145
|
*/
|
|
145
146
|
exports.Interactive = {
|
|
146
147
|
baseSchema: interactivity_schema_js_1.baseSchema,
|
|
148
|
+
captionsSchema: interactivity_schema_js_1.captionsSchema,
|
|
147
149
|
transformSchema: interactivity_schema_js_1.transformSchema,
|
|
148
150
|
textSchema: interactivity_schema_js_1.textSchema,
|
|
149
151
|
backgroundSchema: interactivity_schema_js_1.backgroundSchema,
|
|
150
152
|
borderSchema: interactivity_schema_js_1.borderSchema,
|
|
153
|
+
borderRadiusSchema: interactivity_schema_js_1.borderRadiusSchema,
|
|
151
154
|
cropSchema: interactivity_schema_js_1.cropSchema,
|
|
152
155
|
svgPaintSchema: interactivity_schema_js_1.svgPaintSchema,
|
|
153
156
|
svgStrokeSchema: interactivity_schema_js_1.svgStrokeSchema,
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -4,7 +4,8 @@ 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");
|
|
@@ -20,7 +21,7 @@ const v5_flag_js_1 = require("./v5-flag.js");
|
|
|
20
21
|
const with_interactivity_schema_js_1 = require("./with-interactivity-schema.js");
|
|
21
22
|
const EMPTY_EFFECTS = [];
|
|
22
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) => {
|
|
23
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d;
|
|
24
25
|
const { layout = 'absolute-fill' } = other;
|
|
25
26
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
26
27
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
@@ -162,14 +163,15 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
162
163
|
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink : 'https://www.remotion.dev/docs/sequence';
|
|
163
164
|
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
164
165
|
const isInsideSeries = (0, react_1.useContext)(is_inside_series_js_1.IsInsideSeriesContext);
|
|
165
|
-
const inheritedStack = (_b = other === null || other === void 0 ? void 0 : other.stack) !== null && _b !== void 0 ? _b : null;
|
|
166
166
|
// Our assumption: Stack doesnt' change. After we symbolicate we assign it a nodePath
|
|
167
167
|
// and if it changes, it would lead to-remounting of the sequence.
|
|
168
168
|
const stackRef = (0, react_1.useRef)(null);
|
|
169
|
-
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);
|
|
170
172
|
const registeredFrozenFrame = typeof freeze === 'number' ? freeze : null;
|
|
171
173
|
const registeredTrimBefore = trimBefore === 0 ? null : trimBefore;
|
|
172
|
-
const parentCumulatedNegativeFrom = (
|
|
174
|
+
const parentCumulatedNegativeFrom = (_d = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.cumulatedNegativeFrom) !== null && _d !== void 0 ? _d : 0;
|
|
173
175
|
const startMediaFrom = isMedia && isMedia.type !== 'image'
|
|
174
176
|
? isMedia.data.startMediaFrom +
|
|
175
177
|
parentCumulatedNegativeFrom -
|
|
@@ -323,7 +325,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
323
325
|
right: resolvedCropRight,
|
|
324
326
|
top: resolvedCropTop,
|
|
325
327
|
bottom: resolvedCropBottom,
|
|
326
|
-
|
|
328
|
+
style: styleIfThere,
|
|
327
329
|
});
|
|
328
330
|
const sequenceRef = (0, react_1.useCallback)((node) => {
|
|
329
331
|
wrapperRefForOutline.current = node;
|
|
@@ -353,7 +355,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, trimBefore = 0, freeze
|
|
|
353
355
|
if (hidden) {
|
|
354
356
|
return null;
|
|
355
357
|
}
|
|
356
|
-
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 })) }));
|
|
357
359
|
};
|
|
358
360
|
const RegularSequence = (0, react_1.forwardRef)(RegularSequenceRefForwardingFunction);
|
|
359
361
|
const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
@@ -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";
|
|
@@ -43,6 +43,7 @@ exports.animatedImageSchema = {
|
|
|
43
43
|
...interactivity_schema_js_1.transformSchema,
|
|
44
44
|
...interactivity_schema_js_1.backgroundSchema,
|
|
45
45
|
...interactivity_schema_js_1.borderSchema,
|
|
46
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
46
47
|
};
|
|
47
48
|
const getCanvasPropsFromSequenceProps = (props) => {
|
|
48
49
|
const canvasProps = {};
|
|
@@ -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";
|
|
@@ -169,9 +210,7 @@ export declare const canvasImageSchema: {
|
|
|
169
210
|
};
|
|
170
211
|
};
|
|
171
212
|
};
|
|
172
|
-
export declare const CanvasImage: import("react").ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractiveCropProps & import("../Interactive.js").InteractivePremountProps & {
|
|
173
|
-
readonly stack?: string | undefined;
|
|
174
|
-
} & CanvasImageCanvasProps & {
|
|
213
|
+
export declare const CanvasImage: import("react").ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractiveCropProps & import("../Interactive.js").InteractivePremountProps & CanvasImageCanvasProps & {
|
|
175
214
|
readonly src: string;
|
|
176
215
|
readonly width?: number | undefined;
|
|
177
216
|
readonly height?: number | undefined;
|
|
@@ -36,6 +36,7 @@ exports.canvasImageSchema = {
|
|
|
36
36
|
...interactivity_schema_js_1.transformSchema,
|
|
37
37
|
...interactivity_schema_js_1.backgroundSchema,
|
|
38
38
|
...interactivity_schema_js_1.borderSchema,
|
|
39
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
39
40
|
};
|
|
40
41
|
const makeAbortError = () => {
|
|
41
42
|
if (typeof DOMException !== 'undefined') {
|
|
@@ -321,7 +322,7 @@ const CanvasImageContent = (0, react_1.forwardRef)(({ src, width, height, fit =
|
|
|
321
322
|
return (jsx_runtime_1.jsx("canvas", { ...canvasProps, ref: canvasRef, width: width, height: height, className: className, style: style, id: id }));
|
|
322
323
|
});
|
|
323
324
|
CanvasImageContent.displayName = 'CanvasImageContent';
|
|
324
|
-
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,
|
|
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) => {
|
|
325
326
|
if (!src) {
|
|
326
327
|
throw new Error('No "src" prop was passed to <CanvasImage>.');
|
|
327
328
|
}
|
|
@@ -348,7 +349,7 @@ const CanvasImageInner = (0, react_1.forwardRef)(({ src, width, height, fit, eff
|
|
|
348
349
|
style: premountingStyle,
|
|
349
350
|
componentName: _remotionInternalCropComponentName !== null && _remotionInternalCropComponentName !== void 0 ? _remotionInternalCropComponentName : '<CanvasImage />',
|
|
350
351
|
});
|
|
351
|
-
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 },
|
|
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 }) }) }));
|
|
352
353
|
});
|
|
353
354
|
/*
|
|
354
355
|
* @description Renders a static image to a `<canvas>` and applies Remotion effects.
|
|
@@ -2,12 +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 { InteractiveBaseProps, InteractiveCropProps, InteractivePremountProps } from '../Interactive.js';
|
|
5
|
-
type CanvasImageSequenceProps = InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated For internal use only.
|
|
8
|
-
*/
|
|
9
|
-
readonly stack?: string;
|
|
10
|
-
};
|
|
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;
|
|
@@ -79,6 +79,47 @@ export declare const solidSchema: {
|
|
|
79
79
|
readonly default: undefined;
|
|
80
80
|
readonly description: "Border color";
|
|
81
81
|
};
|
|
82
|
+
readonly 'style.borderRadius': {
|
|
83
|
+
readonly type: "number";
|
|
84
|
+
readonly default: 0;
|
|
85
|
+
readonly min: 0;
|
|
86
|
+
readonly step: 1;
|
|
87
|
+
readonly description: "Border radius";
|
|
88
|
+
readonly hiddenFromList: false;
|
|
89
|
+
readonly keyframable: true;
|
|
90
|
+
};
|
|
91
|
+
readonly 'style.borderTopLeftRadius': {
|
|
92
|
+
readonly type: "number";
|
|
93
|
+
readonly default: 0;
|
|
94
|
+
readonly min: 0;
|
|
95
|
+
readonly step: 1;
|
|
96
|
+
readonly description: "Top left radius";
|
|
97
|
+
readonly hiddenFromList: false;
|
|
98
|
+
};
|
|
99
|
+
readonly 'style.borderTopRightRadius': {
|
|
100
|
+
readonly type: "number";
|
|
101
|
+
readonly default: 0;
|
|
102
|
+
readonly min: 0;
|
|
103
|
+
readonly step: 1;
|
|
104
|
+
readonly description: "Top right radius";
|
|
105
|
+
readonly hiddenFromList: false;
|
|
106
|
+
};
|
|
107
|
+
readonly 'style.borderBottomRightRadius': {
|
|
108
|
+
readonly type: "number";
|
|
109
|
+
readonly default: 0;
|
|
110
|
+
readonly min: 0;
|
|
111
|
+
readonly step: 1;
|
|
112
|
+
readonly description: "Bottom right radius";
|
|
113
|
+
readonly hiddenFromList: false;
|
|
114
|
+
};
|
|
115
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
116
|
+
readonly type: "number";
|
|
117
|
+
readonly default: 0;
|
|
118
|
+
readonly min: 0;
|
|
119
|
+
readonly step: 1;
|
|
120
|
+
readonly description: "Bottom left radius";
|
|
121
|
+
readonly hiddenFromList: false;
|
|
122
|
+
};
|
|
82
123
|
readonly 'style.backgroundColor': {
|
|
83
124
|
readonly type: "color";
|
|
84
125
|
readonly default: "transparent";
|
|
@@ -58,6 +58,7 @@ exports.solidSchema = {
|
|
|
58
58
|
...interactivity_schema_js_1.transformSchema,
|
|
59
59
|
...interactivity_schema_js_1.backgroundSchema,
|
|
60
60
|
...interactivity_schema_js_1.borderSchema,
|
|
61
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
61
62
|
...interactivity_schema_js_1.cropSchema,
|
|
62
63
|
};
|
|
63
64
|
const SolidInner = ({ color, width, height, effects = [], className, style, pixelDensity, overrideId, reference, }) => {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { SequenceControls } from './CompositionManager.js';
|
|
3
|
+
export declare const REMOTION_INTERNAL_STACK_PROP = "_remotionInternalStack";
|
|
2
4
|
export declare const getComponentsToAddStacksTo: () => unknown[];
|
|
3
5
|
export declare const addSequenceStackTraces: (component: unknown) => void;
|
|
4
6
|
export declare const setSequenceComponent: (component: unknown) => void;
|
|
5
7
|
export declare const getSequenceComponent: () => unknown;
|
|
8
|
+
export declare const setStackForControls: (controls: SequenceControls, stack: string | undefined) => void;
|
|
9
|
+
export declare const getStackForControls: (controls: SequenceControls) => string | null;
|
|
6
10
|
export declare const getSingleChildComponent: (children: React.ReactNode) => unknown;
|
|
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getSingleChildComponent = exports.getSequenceComponent = exports.setSequenceComponent = exports.addSequenceStackTraces = exports.getComponentsToAddStacksTo = void 0;
|
|
6
|
+
exports.getSingleChildComponent = exports.getStackForControls = exports.setStackForControls = exports.getSequenceComponent = exports.setSequenceComponent = exports.addSequenceStackTraces = exports.getComponentsToAddStacksTo = exports.REMOTION_INTERNAL_STACK_PROP = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const componentsToAddStacksTo = [];
|
|
9
9
|
let sequenceComponent = null;
|
|
10
|
+
const stacksByControls = new WeakMap();
|
|
11
|
+
exports.REMOTION_INTERNAL_STACK_PROP = '_remotionInternalStack';
|
|
10
12
|
const getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
11
13
|
exports.getComponentsToAddStacksTo = getComponentsToAddStacksTo;
|
|
12
14
|
const addSequenceStackTraces = (component) => {
|
|
@@ -19,6 +21,19 @@ const setSequenceComponent = (component) => {
|
|
|
19
21
|
exports.setSequenceComponent = setSequenceComponent;
|
|
20
22
|
const getSequenceComponent = () => sequenceComponent;
|
|
21
23
|
exports.getSequenceComponent = getSequenceComponent;
|
|
24
|
+
const setStackForControls = (controls, stack) => {
|
|
25
|
+
if (stack === undefined) {
|
|
26
|
+
stacksByControls.delete(controls);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
stacksByControls.set(controls, stack);
|
|
30
|
+
};
|
|
31
|
+
exports.setStackForControls = setStackForControls;
|
|
32
|
+
const getStackForControls = (controls) => {
|
|
33
|
+
var _a;
|
|
34
|
+
return (_a = stacksByControls.get(controls)) !== null && _a !== void 0 ? _a : null;
|
|
35
|
+
};
|
|
36
|
+
exports.getStackForControls = getStackForControls;
|
|
22
37
|
const getSingleChildComponent = (children) => {
|
|
23
38
|
const mountedChildren = react_1.default.Children.toArray(children);
|
|
24
39
|
if (mountedChildren.length !== 1) {
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AnyCompMetadata, AnyComposition, AudioOrVideoAsset, JsxComponentId
|
|
|
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';
|
|
8
|
-
import type { AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, InteractivitySchemaField, InteractivitySchema } from './interactivity-schema.js';
|
|
8
|
+
import type { AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, CaptionsFieldSchema, InteractivitySchemaField, InteractivitySchema } from './interactivity-schema.js';
|
|
9
9
|
import type { LogLevel } from './log.js';
|
|
10
10
|
import type { ProResProfile } from './prores-profile.js';
|
|
11
11
|
import type { PixelFormat, VideoImageFormat } from './render-types.js';
|
|
@@ -183,4 +183,4 @@ export type _InternalTypes = {
|
|
|
183
183
|
TRenderAsset: TRenderAsset;
|
|
184
184
|
ProResProfile: ProResProfile;
|
|
185
185
|
};
|
|
186
|
-
export type { AnyComposition, AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, DelayRenderScope, JsxComponentIdentity, LoopDisplay, SequenceControls, InteractivitySchemaField, InteractivitySchema, UseBufferState, };
|
|
186
|
+
export type { AnyComposition, AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, CaptionsFieldSchema, DelayRenderScope, JsxComponentIdentity, LoopDisplay, SequenceControls, InteractivitySchemaField, InteractivitySchema, UseBufferState, };
|