remotion 4.0.474 → 4.0.476
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/HtmlInCanvas.js +1 -3
- package/dist/cjs/Img.d.ts +6 -0
- package/dist/cjs/Img.js +2 -2
- package/dist/cjs/Interactive.d.ts +56 -0
- package/dist/cjs/Interactive.js +119 -0
- package/dist/cjs/Sequence.js +6 -3
- package/dist/cjs/SequenceContext.d.ts +1 -0
- package/dist/cjs/animated-image/AnimatedImage.js +1 -1
- package/dist/cjs/audio/AudioForPreview.js +1 -1
- package/dist/cjs/canvas-image/CanvasImage.d.ts +6 -0
- package/dist/cjs/easing.d.ts +3 -0
- package/dist/cjs/easing.js +18 -0
- package/dist/cjs/effects/Solid.js +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/internals.d.ts +21 -0
- package/dist/cjs/interpolate-colors.d.ts +2 -3
- package/dist/cjs/interpolate-colors.js +1 -0
- package/dist/cjs/interpolate-keyframed-status.js +1 -0
- package/dist/cjs/interpolate.js +147 -0
- package/dist/cjs/loop/index.js +1 -1
- package/dist/cjs/no-react.d.ts +9 -0
- package/dist/cjs/sequence-field-schema.d.ts +42 -1
- package/dist/cjs/sequence-field-schema.js +26 -5
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/VideoForPreview.js +4 -6
- package/dist/cjs/wrap-in-schema.d.ts +1 -1
- package/dist/cjs/wrap-in-schema.js +6 -4
- package/dist/esm/index.mjs +860 -583
- package/dist/esm/no-react.mjs +157 -4
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -290,9 +290,7 @@ const HtmlInCanvasInner = (0, react_1.forwardRef)(({ width, height, effects = []
|
|
|
290
290
|
node;
|
|
291
291
|
}
|
|
292
292
|
}, [ref]);
|
|
293
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: resolvedDuration, name: name !== null && name !== void 0 ? name : '<HtmlInCanvas>', _remotionInternalDocumentationLink:
|
|
294
|
-
? 'https://www.remotion.dev/docs/remotion/html-in-canvas'
|
|
295
|
-
: undefined, _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalRefForOutline: actualRef, layout: "none", ...sequenceProps, children: jsx_runtime_1.jsx(HtmlInCanvasContent, { ref: setCanvasRef, width: width, height: height, effects: effects, onPaint: onPaint, onInit: onInit, pixelDensity: pixelDensity, controls: controls, style: style, children: children }) }));
|
|
293
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: resolvedDuration, name: name !== null && name !== void 0 ? name : '<HtmlInCanvas>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas", _experimentalControls: controls, _remotionInternalEffects: memoizedEffectDefinitions, _remotionInternalRefForOutline: actualRef, layout: "none", ...sequenceProps, children: jsx_runtime_1.jsx(HtmlInCanvasContent, { ref: setCanvasRef, width: width, height: height, effects: effects, onPaint: onPaint, onInit: onInit, pixelDensity: pixelDensity, controls: controls, style: style, children: children }) }));
|
|
296
294
|
});
|
|
297
295
|
HtmlInCanvasInner.displayName = 'HtmlInCanvas';
|
|
298
296
|
const htmlInCanvasSchema = {
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export type ImgProps = NativeImgProps & {
|
|
|
18
18
|
readonly stack?: string;
|
|
19
19
|
} & Pick<SequenceProps, 'durationInFrames' | 'from' | 'hidden'>;
|
|
20
20
|
export declare const imgSchema: {
|
|
21
|
+
readonly 'style.transformOrigin': {
|
|
22
|
+
readonly type: "transform-origin";
|
|
23
|
+
readonly step: 1;
|
|
24
|
+
readonly default: "50% 50%";
|
|
25
|
+
readonly description: "Transform origin";
|
|
26
|
+
};
|
|
21
27
|
readonly 'style.translate': {
|
|
22
28
|
readonly type: "translate";
|
|
23
29
|
readonly step: 1;
|
package/dist/cjs/Img.js
CHANGED
|
@@ -187,7 +187,7 @@ const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, durati
|
|
|
187
187
|
if (!src) {
|
|
188
188
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
189
189
|
}
|
|
190
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, _remotionInternalStack: stack, _remotionInternalDocumentationLink:
|
|
190
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, _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 = {
|
|
@@ -254,7 +254,7 @@ const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src,
|
|
|
254
254
|
const canvasHeight = typeof height === 'number' ? height : undefined;
|
|
255
255
|
const canvasProps = props;
|
|
256
256
|
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:
|
|
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
258
|
};
|
|
259
259
|
/*
|
|
260
260
|
* @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.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SequenceProps } from './Sequence.js';
|
|
3
|
+
type InteractiveHtmlTag = 'a' | 'article' | 'aside' | 'button' | 'code' | 'div' | 'em' | 'footer' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'header' | 'label' | 'li' | 'main' | 'nav' | 'ol' | 'p' | 'pre' | 'section' | 'small' | 'span' | 'strong' | 'ul';
|
|
4
|
+
type InteractiveSvgTag = 'circle' | 'ellipse' | 'g' | 'line' | 'path' | 'rect' | 'svg' | 'text';
|
|
5
|
+
type InteractiveTag = InteractiveHtmlTag | InteractiveSvgTag;
|
|
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'> & {
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated For internal use only
|
|
10
|
+
*/
|
|
11
|
+
readonly stack?: string;
|
|
12
|
+
};
|
|
13
|
+
type InteractiveElementProps<Tag extends InteractiveTag> = Omit<React.ComponentPropsWithoutRef<Tag>, keyof InteractiveSequenceProps> & InteractiveSequenceProps;
|
|
14
|
+
type InteractiveElementComponent<Tag extends InteractiveTag> = React.ComponentType<InteractiveElementProps<Tag> & React.RefAttributes<ElementForTag<Tag>>>;
|
|
15
|
+
/**
|
|
16
|
+
* @description HTML and SVG elements that are registered in the Remotion Studio timeline and can be visually edited.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Interactive: {
|
|
19
|
+
A: InteractiveElementComponent<"a">;
|
|
20
|
+
Article: InteractiveElementComponent<"article">;
|
|
21
|
+
Aside: InteractiveElementComponent<"aside">;
|
|
22
|
+
Button: InteractiveElementComponent<"button">;
|
|
23
|
+
Circle: InteractiveElementComponent<"circle">;
|
|
24
|
+
Code: InteractiveElementComponent<"code">;
|
|
25
|
+
Div: InteractiveElementComponent<"div">;
|
|
26
|
+
Ellipse: InteractiveElementComponent<"ellipse">;
|
|
27
|
+
Em: InteractiveElementComponent<"em">;
|
|
28
|
+
Footer: InteractiveElementComponent<"footer">;
|
|
29
|
+
G: InteractiveElementComponent<"g">;
|
|
30
|
+
H1: InteractiveElementComponent<"h1">;
|
|
31
|
+
H2: InteractiveElementComponent<"h2">;
|
|
32
|
+
H3: InteractiveElementComponent<"h3">;
|
|
33
|
+
H4: InteractiveElementComponent<"h4">;
|
|
34
|
+
H5: InteractiveElementComponent<"h5">;
|
|
35
|
+
H6: InteractiveElementComponent<"h6">;
|
|
36
|
+
Header: InteractiveElementComponent<"header">;
|
|
37
|
+
Label: InteractiveElementComponent<"label">;
|
|
38
|
+
Li: InteractiveElementComponent<"li">;
|
|
39
|
+
Line: InteractiveElementComponent<"line">;
|
|
40
|
+
Main: InteractiveElementComponent<"main">;
|
|
41
|
+
Nav: InteractiveElementComponent<"nav">;
|
|
42
|
+
Ol: InteractiveElementComponent<"ol">;
|
|
43
|
+
P: InteractiveElementComponent<"p">;
|
|
44
|
+
Path: InteractiveElementComponent<"path">;
|
|
45
|
+
Pre: InteractiveElementComponent<"pre">;
|
|
46
|
+
Rect: InteractiveElementComponent<"rect">;
|
|
47
|
+
Section: InteractiveElementComponent<"section">;
|
|
48
|
+
Small: InteractiveElementComponent<"small">;
|
|
49
|
+
Span: InteractiveElementComponent<"span">;
|
|
50
|
+
Strong: InteractiveElementComponent<"strong">;
|
|
51
|
+
Svg: InteractiveElementComponent<"svg">;
|
|
52
|
+
Text: InteractiveElementComponent<"text">;
|
|
53
|
+
Ul: InteractiveElementComponent<"ul">;
|
|
54
|
+
};
|
|
55
|
+
export type InteractiveProps<Tag extends InteractiveTag> = InteractiveElementProps<Tag>;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Interactive = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
40
|
+
const sequence_field_schema_js_1 = require("./sequence-field-schema.js");
|
|
41
|
+
const Sequence_js_1 = require("./Sequence.js");
|
|
42
|
+
const wrap_in_schema_js_1 = require("./wrap-in-schema.js");
|
|
43
|
+
const interactiveElementSchema = {
|
|
44
|
+
durationInFrames: sequence_field_schema_js_1.durationInFramesField,
|
|
45
|
+
from: sequence_field_schema_js_1.fromField,
|
|
46
|
+
...sequence_field_schema_js_1.sequenceVisualStyleSchema,
|
|
47
|
+
hidden: sequence_field_schema_js_1.hiddenField,
|
|
48
|
+
};
|
|
49
|
+
const setRef = (ref, value) => {
|
|
50
|
+
if (typeof ref === 'function') {
|
|
51
|
+
ref(value);
|
|
52
|
+
}
|
|
53
|
+
else if (ref) {
|
|
54
|
+
ref.current = value;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const makeInteractiveElement = (tag, displayName) => {
|
|
58
|
+
const Inner = (0, react_1.forwardRef)((propsWithControls, ref) => {
|
|
59
|
+
const { durationInFrames, from, hidden, name, showInTimeline, stack, _experimentalControls, ...props } = propsWithControls;
|
|
60
|
+
const refForOutline = (0, react_1.useRef)(null);
|
|
61
|
+
const callbackRef = (0, react_1.useCallback)((element) => {
|
|
62
|
+
refForOutline.current = element;
|
|
63
|
+
setRef(ref, element);
|
|
64
|
+
}, [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
|
+
...props,
|
|
67
|
+
ref: callbackRef,
|
|
68
|
+
}) }));
|
|
69
|
+
});
|
|
70
|
+
Inner.displayName = displayName;
|
|
71
|
+
const Wrapped = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
72
|
+
Component: Inner,
|
|
73
|
+
schema: interactiveElementSchema,
|
|
74
|
+
supportsEffects: false,
|
|
75
|
+
});
|
|
76
|
+
Wrapped.displayName = displayName;
|
|
77
|
+
(0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(Wrapped);
|
|
78
|
+
return Wrapped;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* @description HTML and SVG elements that are registered in the Remotion Studio timeline and can be visually edited.
|
|
82
|
+
*/
|
|
83
|
+
exports.Interactive = {
|
|
84
|
+
A: makeInteractiveElement('a', '<Interactive.A>'),
|
|
85
|
+
Article: makeInteractiveElement('article', '<Interactive.Article>'),
|
|
86
|
+
Aside: makeInteractiveElement('aside', '<Interactive.Aside>'),
|
|
87
|
+
Button: makeInteractiveElement('button', '<Interactive.Button>'),
|
|
88
|
+
Circle: makeInteractiveElement('circle', '<Interactive.Circle>'),
|
|
89
|
+
Code: makeInteractiveElement('code', '<Interactive.Code>'),
|
|
90
|
+
Div: makeInteractiveElement('div', '<Interactive.Div>'),
|
|
91
|
+
Ellipse: makeInteractiveElement('ellipse', '<Interactive.Ellipse>'),
|
|
92
|
+
Em: makeInteractiveElement('em', '<Interactive.Em>'),
|
|
93
|
+
Footer: makeInteractiveElement('footer', '<Interactive.Footer>'),
|
|
94
|
+
G: makeInteractiveElement('g', '<Interactive.G>'),
|
|
95
|
+
H1: makeInteractiveElement('h1', '<Interactive.H1>'),
|
|
96
|
+
H2: makeInteractiveElement('h2', '<Interactive.H2>'),
|
|
97
|
+
H3: makeInteractiveElement('h3', '<Interactive.H3>'),
|
|
98
|
+
H4: makeInteractiveElement('h4', '<Interactive.H4>'),
|
|
99
|
+
H5: makeInteractiveElement('h5', '<Interactive.H5>'),
|
|
100
|
+
H6: makeInteractiveElement('h6', '<Interactive.H6>'),
|
|
101
|
+
Header: makeInteractiveElement('header', '<Interactive.Header>'),
|
|
102
|
+
Label: makeInteractiveElement('label', '<Interactive.Label>'),
|
|
103
|
+
Li: makeInteractiveElement('li', '<Interactive.Li>'),
|
|
104
|
+
Line: makeInteractiveElement('line', '<Interactive.Line>'),
|
|
105
|
+
Main: makeInteractiveElement('main', '<Interactive.Main>'),
|
|
106
|
+
Nav: makeInteractiveElement('nav', '<Interactive.Nav>'),
|
|
107
|
+
Ol: makeInteractiveElement('ol', '<Interactive.Ol>'),
|
|
108
|
+
P: makeInteractiveElement('p', '<Interactive.P>'),
|
|
109
|
+
Path: makeInteractiveElement('path', '<Interactive.Path>'),
|
|
110
|
+
Pre: makeInteractiveElement('pre', '<Interactive.Pre>'),
|
|
111
|
+
Rect: makeInteractiveElement('rect', '<Interactive.Rect>'),
|
|
112
|
+
Section: makeInteractiveElement('section', '<Interactive.Section>'),
|
|
113
|
+
Small: makeInteractiveElement('small', '<Interactive.Small>'),
|
|
114
|
+
Span: makeInteractiveElement('span', '<Interactive.Span>'),
|
|
115
|
+
Strong: makeInteractiveElement('strong', '<Interactive.Strong>'),
|
|
116
|
+
Svg: makeInteractiveElement('svg', '<Interactive.Svg>'),
|
|
117
|
+
Text: makeInteractiveElement('text', '<Interactive.Text>'),
|
|
118
|
+
Ul: makeInteractiveElement('ul', '<Interactive.Ul>'),
|
|
119
|
+
};
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -20,7 +20,7 @@ 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
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: refForOutline, ...other }, ref) => {
|
|
23
|
-
var _a;
|
|
23
|
+
var _a, _b;
|
|
24
24
|
const { layout = 'absolute-fill' } = other;
|
|
25
25
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
26
26
|
const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
@@ -28,6 +28,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
28
28
|
const cumulatedFrom = parentSequence
|
|
29
29
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
30
30
|
: 0;
|
|
31
|
+
const absoluteFrom = ((_a = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.absoluteFrom) !== null && _a !== void 0 ? _a : 0) + from;
|
|
31
32
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
32
33
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
33
34
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -92,6 +93,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
92
93
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
93
94
|
var _a, _b, _c;
|
|
94
95
|
return {
|
|
96
|
+
absoluteFrom,
|
|
95
97
|
cumulatedFrom,
|
|
96
98
|
relativeFrom: from,
|
|
97
99
|
cumulatedNegativeFrom,
|
|
@@ -107,6 +109,7 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
107
109
|
};
|
|
108
110
|
}, [
|
|
109
111
|
cumulatedFrom,
|
|
112
|
+
absoluteFrom,
|
|
110
113
|
from,
|
|
111
114
|
actualDurationInFrames,
|
|
112
115
|
parentSequence,
|
|
@@ -122,10 +125,10 @@ const RegularSequenceRefForwardingFunction = ({ from = 0, durationInFrames = Inf
|
|
|
122
125
|
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
123
126
|
return name !== null && name !== void 0 ? name : '';
|
|
124
127
|
}, [name]);
|
|
125
|
-
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink :
|
|
128
|
+
const resolvedDocumentationLink = documentationLink !== null && documentationLink !== void 0 ? documentationLink : 'https://www.remotion.dev/docs/sequence';
|
|
126
129
|
const env = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
127
130
|
const isInsideSeries = (0, react_1.useContext)(is_inside_series_js_1.IsInsideSeriesContext);
|
|
128
|
-
const inheritedStack = (
|
|
131
|
+
const inheritedStack = (_b = other === null || other === void 0 ? void 0 : other.stack) !== null && _b !== void 0 ? _b : null;
|
|
129
132
|
// Our assumption: Stack doesnt' change. After we symbolicate we assign it a nodePath
|
|
130
133
|
// and if it changes, it would lead to-remounting of the sequence.
|
|
131
134
|
const stackRef = (0, react_1.useRef)(null);
|
|
@@ -134,7 +134,7 @@ const AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
134
134
|
premountDisplay: (_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premountDisplay) !== null && _a !== void 0 ? _a : null,
|
|
135
135
|
postmountDisplay: (_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.postmountDisplay) !== null && _b !== void 0 ? _b : null,
|
|
136
136
|
loopDisplay: undefined,
|
|
137
|
-
documentationLink:
|
|
137
|
+
documentationLink: 'https://www.remotion.dev/docs/html5-audio',
|
|
138
138
|
refForOutline: null,
|
|
139
139
|
});
|
|
140
140
|
// putting playback before useVolume
|
|
@@ -2,6 +2,12 @@ import { type RefObject } from 'react';
|
|
|
2
2
|
import type { EffectsProp } from '../effects/effect-types.js';
|
|
3
3
|
import type { CanvasImageCanvasProps } from './props.js';
|
|
4
4
|
export declare const canvasImageSchema: {
|
|
5
|
+
readonly 'style.transformOrigin': {
|
|
6
|
+
readonly type: "transform-origin";
|
|
7
|
+
readonly step: 1;
|
|
8
|
+
readonly default: "50% 50%";
|
|
9
|
+
readonly description: "Transform origin";
|
|
10
|
+
};
|
|
5
11
|
readonly 'style.translate': {
|
|
6
12
|
readonly type: "translate";
|
|
7
13
|
readonly step: 1;
|
package/dist/cjs/easing.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { SpringConfig } from './spring/spring-utils.js';
|
|
2
|
+
export type EasingSpringConfig = Partial<Pick<SpringConfig, 'damping' | 'mass' | 'stiffness' | 'overshootClamping'>>;
|
|
1
3
|
/**
|
|
2
4
|
* @description The Easing module implements common easing functions. You can use it with the interpolate() API.
|
|
3
5
|
* @see [Documentation](https://www.remotion.dev/docs/easing)
|
|
@@ -15,6 +17,7 @@ export declare class Easing {
|
|
|
15
17
|
static exp(t: number): number;
|
|
16
18
|
static elastic(bounciness?: number): (t: number) => number;
|
|
17
19
|
static back(s?: number): (t: number) => number;
|
|
20
|
+
static spring(config?: EasingSpringConfig): (t: number) => number;
|
|
18
21
|
static bounce(t: number): number;
|
|
19
22
|
static bezier(x1: number, y1: number, x2: number, y2: number): (t: number) => number;
|
|
20
23
|
static in(easing: (t: number) => number): (t: number) => number;
|
package/dist/cjs/easing.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Easing = void 0;
|
|
5
5
|
const bezier_js_1 = require("./bezier.js");
|
|
6
|
+
const index_js_1 = require("./spring/index.js");
|
|
6
7
|
// Some easing curves are only defined on [0, 1] (e.g. quarter circle, bounce segments).
|
|
7
8
|
// `interpolate(..., { extrapolate: 'extend' })` can pass values outside that interval; clamp
|
|
8
9
|
// there so we return endpoints instead of NaN or unintended extrapolation.
|
|
9
10
|
const clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
11
|
+
const springEasingDurationInFrames = 30;
|
|
10
12
|
/**
|
|
11
13
|
* @description The Easing module implements common easing functions. You can use it with the interpolate() API.
|
|
12
14
|
* @see [Documentation](https://www.remotion.dev/docs/easing)
|
|
@@ -50,6 +52,22 @@ class Easing {
|
|
|
50
52
|
static back(s = 1.70158) {
|
|
51
53
|
return (t) => t * t * ((s + 1) * t - s);
|
|
52
54
|
}
|
|
55
|
+
static spring(config = {}) {
|
|
56
|
+
return (t) => {
|
|
57
|
+
if (t <= 0) {
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
if (t >= 1) {
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
return (0, index_js_1.spring)({
|
|
64
|
+
fps: springEasingDurationInFrames,
|
|
65
|
+
frame: t * springEasingDurationInFrames,
|
|
66
|
+
config,
|
|
67
|
+
durationInFrames: springEasingDurationInFrames,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
53
71
|
static bounce(t) {
|
|
54
72
|
const u = clampUnit(t);
|
|
55
73
|
if (u < 1 / 2.75) {
|
|
@@ -148,7 +148,7 @@ const SolidOuter = (0, react_1.forwardRef)(({ effects = [], _experimentalControl
|
|
|
148
148
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
149
149
|
return actualRef.current;
|
|
150
150
|
}, []);
|
|
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:
|
|
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
152
|
});
|
|
153
153
|
exports.Solid = (0, wrap_in_schema_js_1.wrapInSchema)({
|
|
154
154
|
Component: SolidOuter,
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ export { getRemotionEnvironment } from './get-remotion-environment.js';
|
|
|
127
127
|
export { getStaticFiles, StaticFile } from './get-static-files.js';
|
|
128
128
|
export * from './IFrame.js';
|
|
129
129
|
export { Img, ImgProps } from './Img.js';
|
|
130
|
+
export { Interactive, type InteractiveProps } from './Interactive.js';
|
|
130
131
|
export * from './internals.js';
|
|
131
132
|
export { interpolateColors, type InterpolateColorsOptions, } from './interpolate-colors.js';
|
|
132
133
|
export { LogLevel } from './log.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Config = exports.Experimental = exports.watchStaticFile = exports.MediaPlaybackError = exports.Video = exports.OffthreadVideo = exports.Html5Video = exports.useRemotionEnvironment = exports.usePixelDensity = exports.useDelayRender = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.assertValidInterpolatePosterizeOption = exports.assertValidInterpolateEasingOption = exports.Loop = exports.interpolateColors = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.CanvasImage = exports.isHtmlInCanvasSupported = exports.HtmlInCanvas = exports.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = exports.Solid = exports.cancelRender = exports.Html5Audio = exports.Audio = exports.Artifact = void 0;
|
|
17
|
+
exports.Config = exports.Experimental = exports.watchStaticFile = exports.MediaPlaybackError = exports.Video = exports.OffthreadVideo = exports.Html5Video = exports.useRemotionEnvironment = exports.usePixelDensity = exports.useDelayRender = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.assertValidInterpolatePosterizeOption = exports.assertValidInterpolateEasingOption = exports.Loop = exports.interpolateColors = exports.Interactive = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.CanvasImage = exports.isHtmlInCanvasSupported = exports.HtmlInCanvas = exports.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = exports.Solid = exports.cancelRender = exports.Html5Audio = exports.Audio = exports.Artifact = void 0;
|
|
18
18
|
require("./_check-rsc.js");
|
|
19
19
|
require("./asset-types.js");
|
|
20
20
|
const Clipper_js_1 = require("./Clipper.js");
|
|
@@ -64,6 +64,8 @@ Object.defineProperty(exports, "getStaticFiles", { enumerable: true, get: functi
|
|
|
64
64
|
__exportStar(require("./IFrame.js"), exports);
|
|
65
65
|
const Img_js_1 = require("./Img.js");
|
|
66
66
|
Object.defineProperty(exports, "Img", { enumerable: true, get: function () { return Img_js_1.Img; } });
|
|
67
|
+
const Interactive_js_1 = require("./Interactive.js");
|
|
68
|
+
Object.defineProperty(exports, "Interactive", { enumerable: true, get: function () { return Interactive_js_1.Interactive; } });
|
|
67
69
|
__exportStar(require("./internals.js"), exports);
|
|
68
70
|
const interpolate_colors_js_1 = require("./interpolate-colors.js");
|
|
69
71
|
Object.defineProperty(exports, "interpolateColors", { enumerable: true, get: function () { return interpolate_colors_js_1.interpolateColors; } });
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ export declare const Internals: {
|
|
|
86
86
|
}) => import("react").ComponentType<Props>;
|
|
87
87
|
readonly sequenceSchema: {
|
|
88
88
|
readonly hidden: import("./sequence-field-schema.js").BooleanFieldSchema;
|
|
89
|
+
readonly showInTimeline: import("./sequence-field-schema.js").HiddenFieldSchema;
|
|
89
90
|
readonly from: {
|
|
90
91
|
readonly type: "number";
|
|
91
92
|
readonly default: 0;
|
|
@@ -105,6 +106,12 @@ export declare const Internals: {
|
|
|
105
106
|
readonly description: "Layout";
|
|
106
107
|
readonly variants: {
|
|
107
108
|
readonly 'absolute-fill': {
|
|
109
|
+
readonly 'style.transformOrigin': {
|
|
110
|
+
readonly type: "transform-origin";
|
|
111
|
+
readonly step: 1;
|
|
112
|
+
readonly default: "50% 50%";
|
|
113
|
+
readonly description: "Transform origin";
|
|
114
|
+
};
|
|
108
115
|
readonly 'style.translate': {
|
|
109
116
|
readonly type: "translate";
|
|
110
117
|
readonly step: 1;
|
|
@@ -158,9 +165,17 @@ export declare const Internals: {
|
|
|
158
165
|
readonly none: {};
|
|
159
166
|
};
|
|
160
167
|
};
|
|
168
|
+
} & {
|
|
169
|
+
name: SequenceFieldSchema;
|
|
161
170
|
};
|
|
162
171
|
readonly SequenceWithoutSchema: import("react").ForwardRefExoticComponent<import("./Sequence.js").SequenceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
163
172
|
readonly sequenceStyleSchema: {
|
|
173
|
+
readonly 'style.transformOrigin': {
|
|
174
|
+
readonly type: "transform-origin";
|
|
175
|
+
readonly step: 1;
|
|
176
|
+
readonly default: "50% 50%";
|
|
177
|
+
readonly description: "Transform origin";
|
|
178
|
+
};
|
|
164
179
|
readonly 'style.translate': {
|
|
165
180
|
readonly type: "translate";
|
|
166
181
|
readonly step: 1;
|
|
@@ -212,6 +227,12 @@ export declare const Internals: {
|
|
|
212
227
|
};
|
|
213
228
|
};
|
|
214
229
|
readonly sequenceVisualStyleSchema: {
|
|
230
|
+
readonly 'style.transformOrigin': {
|
|
231
|
+
readonly type: "transform-origin";
|
|
232
|
+
readonly step: 1;
|
|
233
|
+
readonly default: "50% 50%";
|
|
234
|
+
readonly description: "Transform origin";
|
|
235
|
+
};
|
|
215
236
|
readonly 'style.translate': {
|
|
216
237
|
readonly type: "translate";
|
|
217
238
|
readonly step: 1;
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Copied from:
|
|
3
3
|
* https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/Colors.ts
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
5
|
+
import { type InterpolateOptions } from './interpolate.js';
|
|
6
|
+
export type InterpolateColorsOptions = Pick<InterpolateOptions, 'easing' | 'posterize'>;
|
|
8
7
|
export declare const colorNames: {
|
|
9
8
|
[key: string]: number;
|
|
10
9
|
};
|
|
@@ -539,6 +539,7 @@ function processColor(color) {
|
|
|
539
539
|
const interpolateColorsRGB = (value, inputRange, colors, options) => {
|
|
540
540
|
const [r, g, b, a] = [red, green, blue, opacity].map((f) => {
|
|
541
541
|
const unrounded = (0, interpolate_js_1.interpolate)(value, inputRange, colors.map((c) => f(c)), {
|
|
542
|
+
easing: options === null || options === void 0 ? void 0 : options.easing,
|
|
542
543
|
extrapolateLeft: 'clamp',
|
|
543
544
|
extrapolateRight: 'clamp',
|
|
544
545
|
posterize: options === null || options === void 0 ? void 0 : options.posterize,
|