remotion 4.0.495 → 4.0.497
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.d.ts +35 -0
- package/dist/cjs/HtmlInCanvas.js +7 -5
- package/dist/cjs/Img.d.ts +55 -3
- package/dist/cjs/Img.js +20 -5
- package/dist/cjs/Interactive.d.ts +74 -6
- package/dist/cjs/Interactive.js +17 -2
- package/dist/cjs/animated-image/AnimatedImage.d.ts +135 -1
- package/dist/cjs/animated-image/AnimatedImage.js +47 -9
- package/dist/cjs/animated-image/create-image-decoder.d.ts +9 -0
- package/dist/cjs/animated-image/create-image-decoder.js +26 -0
- package/dist/cjs/animated-image/decode-image.d.ts +1 -0
- package/dist/cjs/animated-image/decode-image.js +14 -16
- package/dist/cjs/animated-image/get-duration-in-seconds.d.ts +6 -0
- package/dist/cjs/animated-image/get-duration-in-seconds.js +31 -0
- package/dist/cjs/animated-image/props.d.ts +2 -2
- package/dist/cjs/audio/shared-audio-tags.js +18 -16
- package/dist/cjs/audio/shared-element-source-node.d.ts +2 -1
- package/dist/cjs/audio/shared-element-source-node.js +6 -2
- package/dist/cjs/canvas-image/CanvasImage.d.ts +53 -1
- package/dist/cjs/canvas-image/CanvasImage.js +17 -2
- package/dist/cjs/canvas-image/props.d.ts +2 -2
- package/dist/cjs/effects/Solid.d.ts +35 -0
- package/dist/cjs/effects/Solid.js +2 -0
- package/dist/cjs/interactivity-schema.d.ts +144 -32
- package/dist/cjs/interactivity-schema.js +44 -10
- package/dist/cjs/internals.d.ts +77 -26
- package/dist/cjs/internals.js +2 -1
- package/dist/cjs/no-react.d.ts +35 -6
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/series/index.js +1 -0
- package/dist/cjs/use-amplification.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +367 -113
- package/dist/esm/no-react.mjs +42 -10
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/dist/cjs/interpolate-translate.d.ts +0 -8
- package/dist/cjs/interpolate-translate.js +0 -70
- package/dist/cjs/sequence-field-schema.d.ts +0 -425
- package/dist/cjs/sequence-field-schema.js +0 -133
- package/dist/cjs/wrap-in-schema.d.ts +0 -20
- package/dist/cjs/wrap-in-schema.js +0 -203
|
@@ -100,6 +100,41 @@ export declare const htmlInCanvasSchema: {
|
|
|
100
100
|
readonly description: "Opacity";
|
|
101
101
|
readonly hiddenFromList: false;
|
|
102
102
|
};
|
|
103
|
+
readonly 'style.borderWidth': {
|
|
104
|
+
readonly type: "number";
|
|
105
|
+
readonly default: undefined;
|
|
106
|
+
readonly min: 0;
|
|
107
|
+
readonly step: 1;
|
|
108
|
+
readonly description: "Border width";
|
|
109
|
+
readonly hiddenFromList: false;
|
|
110
|
+
};
|
|
111
|
+
readonly 'style.borderStyle': {
|
|
112
|
+
readonly type: "enum";
|
|
113
|
+
readonly default: "none";
|
|
114
|
+
readonly description: "Border style";
|
|
115
|
+
readonly variants: {
|
|
116
|
+
readonly none: {};
|
|
117
|
+
readonly hidden: {};
|
|
118
|
+
readonly solid: {};
|
|
119
|
+
readonly dashed: {};
|
|
120
|
+
readonly dotted: {};
|
|
121
|
+
readonly double: {};
|
|
122
|
+
readonly groove: {};
|
|
123
|
+
readonly ridge: {};
|
|
124
|
+
readonly inset: {};
|
|
125
|
+
readonly outset: {};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly 'style.borderColor': {
|
|
129
|
+
readonly type: "color";
|
|
130
|
+
readonly default: undefined;
|
|
131
|
+
readonly description: "Border color";
|
|
132
|
+
};
|
|
133
|
+
readonly 'style.backgroundColor': {
|
|
134
|
+
readonly type: "color";
|
|
135
|
+
readonly default: "transparent";
|
|
136
|
+
readonly description: "Color";
|
|
137
|
+
};
|
|
103
138
|
readonly durationInFrames: {
|
|
104
139
|
readonly type: "number";
|
|
105
140
|
readonly default: undefined;
|
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.HtmlInCanvas = exports.htmlInCanvasSchema = exports.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = exports.isHtmlInCanvasSupported = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const delay_render_js_1 = require("./delay-render.js");
|
|
7
6
|
const run_effect_chain_js_1 = require("./effects/run-effect-chain.js");
|
|
8
7
|
const use_effect_chain_state_js_1 = require("./effects/use-effect-chain-state.js");
|
|
9
8
|
const use_memoized_effects_js_1 = require("./effects/use-memoized-effects.js");
|
|
@@ -87,7 +86,7 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
87
86
|
const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
|
|
88
87
|
const canvasWidth = Math.ceil(width * resolvedPixelDensity);
|
|
89
88
|
const canvasHeight = Math.ceil(height * resolvedPixelDensity);
|
|
90
|
-
const { continueRender, cancelRender } = (0, use_delay_render_js_1.useDelayRender)();
|
|
89
|
+
const { delayRender, continueRender, cancelRender } = (0, use_delay_render_js_1.useDelayRender)();
|
|
91
90
|
const { isClientSideRendering, isRendering } = (0, use_remotion_environment_js_1.useRemotionEnvironment)();
|
|
92
91
|
const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
|
|
93
92
|
const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
|
|
@@ -144,7 +143,7 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
144
143
|
if (!placeholderCanvas) {
|
|
145
144
|
throw new Error('Canvas not found');
|
|
146
145
|
}
|
|
147
|
-
const handle =
|
|
146
|
+
const handle = delayRender('onPaint');
|
|
148
147
|
if (!initializedRef.current) {
|
|
149
148
|
const currentOnInit = onInitRef.current;
|
|
150
149
|
if (!currentOnInit) {
|
|
@@ -265,6 +264,7 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
265
264
|
chainState,
|
|
266
265
|
continueRender,
|
|
267
266
|
cancelRender,
|
|
267
|
+
delayRender,
|
|
268
268
|
resolvedPixelDensity,
|
|
269
269
|
canRetryMissingPaintRecord,
|
|
270
270
|
]);
|
|
@@ -323,14 +323,14 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
323
323
|
if (!canvas) {
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
|
-
const handle =
|
|
326
|
+
const handle = delayRender('waiting for first paint after canvas resize');
|
|
327
327
|
canvas.addEventListener('paint', () => {
|
|
328
328
|
continueRender(handle);
|
|
329
329
|
}, { once: true });
|
|
330
330
|
return () => {
|
|
331
331
|
continueRender(handle);
|
|
332
332
|
};
|
|
333
|
-
}, [width, height, continueRender, canvasSizeKey]);
|
|
333
|
+
}, [width, height, continueRender, delayRender, canvasSizeKey]);
|
|
334
334
|
const innerStyle = (0, react_1.useMemo)(() => {
|
|
335
335
|
return {
|
|
336
336
|
width,
|
|
@@ -382,6 +382,8 @@ exports.htmlInCanvasSchema = {
|
|
|
382
382
|
hiddenFromList: false,
|
|
383
383
|
},
|
|
384
384
|
...interactivity_schema_js_1.transformSchema,
|
|
385
|
+
...interactivity_schema_js_1.backgroundSchema,
|
|
386
|
+
...interactivity_schema_js_1.borderSchema,
|
|
385
387
|
};
|
|
386
388
|
const HtmlInCanvasWrapped = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
|
|
387
389
|
Component: HtmlInCanvasInner,
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { EffectsProp } from './effects/effect-types.js';
|
|
3
|
-
import type { InteractiveBaseProps } from './Interactive.js';
|
|
3
|
+
import type { InteractiveBaseProps, InteractivePremountProps } from './Interactive.js';
|
|
4
4
|
type NativeImgProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'src'>;
|
|
5
5
|
export type ImgProps = NativeImgProps & {
|
|
6
6
|
readonly maxRetries?: number;
|
|
@@ -16,7 +16,7 @@ export type ImgProps = NativeImgProps & {
|
|
|
16
16
|
* @deprecated For internal use only
|
|
17
17
|
*/
|
|
18
18
|
readonly stack?: string;
|
|
19
|
-
} & InteractiveBaseProps;
|
|
19
|
+
} & InteractiveBaseProps & InteractivePremountProps;
|
|
20
20
|
export declare const imgSchema: {
|
|
21
21
|
readonly 'style.transformOrigin': {
|
|
22
22
|
readonly type: "transform-origin";
|
|
@@ -53,6 +53,58 @@ export declare const imgSchema: {
|
|
|
53
53
|
readonly description: "Opacity";
|
|
54
54
|
readonly hiddenFromList: false;
|
|
55
55
|
};
|
|
56
|
+
readonly 'style.borderWidth': {
|
|
57
|
+
readonly type: "number";
|
|
58
|
+
readonly default: undefined;
|
|
59
|
+
readonly min: 0;
|
|
60
|
+
readonly step: 1;
|
|
61
|
+
readonly description: "Border width";
|
|
62
|
+
readonly hiddenFromList: false;
|
|
63
|
+
};
|
|
64
|
+
readonly 'style.borderStyle': {
|
|
65
|
+
readonly type: "enum";
|
|
66
|
+
readonly default: "none";
|
|
67
|
+
readonly description: "Border style";
|
|
68
|
+
readonly variants: {
|
|
69
|
+
readonly none: {};
|
|
70
|
+
readonly hidden: {};
|
|
71
|
+
readonly solid: {};
|
|
72
|
+
readonly dashed: {};
|
|
73
|
+
readonly dotted: {};
|
|
74
|
+
readonly double: {};
|
|
75
|
+
readonly groove: {};
|
|
76
|
+
readonly ridge: {};
|
|
77
|
+
readonly inset: {};
|
|
78
|
+
readonly outset: {};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly 'style.borderColor': {
|
|
82
|
+
readonly type: "color";
|
|
83
|
+
readonly default: undefined;
|
|
84
|
+
readonly description: "Border color";
|
|
85
|
+
};
|
|
86
|
+
readonly 'style.backgroundColor': {
|
|
87
|
+
readonly type: "color";
|
|
88
|
+
readonly default: "transparent";
|
|
89
|
+
readonly description: "Color";
|
|
90
|
+
};
|
|
91
|
+
readonly premountFor: {
|
|
92
|
+
readonly type: "number";
|
|
93
|
+
readonly default: 0;
|
|
94
|
+
readonly description: "Premount For";
|
|
95
|
+
readonly min: 0;
|
|
96
|
+
readonly step: 1;
|
|
97
|
+
readonly hiddenFromList: false;
|
|
98
|
+
readonly keyframable: false;
|
|
99
|
+
};
|
|
100
|
+
readonly postmountFor: {
|
|
101
|
+
readonly type: "number";
|
|
102
|
+
readonly default: 0;
|
|
103
|
+
readonly min: 0;
|
|
104
|
+
readonly step: 1;
|
|
105
|
+
readonly hiddenFromList: true;
|
|
106
|
+
readonly keyframable: false;
|
|
107
|
+
};
|
|
56
108
|
readonly durationInFrames: {
|
|
57
109
|
readonly type: "number";
|
|
58
110
|
readonly default: undefined;
|
|
@@ -103,5 +155,5 @@ export declare const Img: React.ComponentType<NativeImgProps & {
|
|
|
103
155
|
* @deprecated For internal use only
|
|
104
156
|
*/
|
|
105
157
|
readonly stack?: string | undefined;
|
|
106
|
-
} & InteractiveBaseProps>;
|
|
158
|
+
} & InteractiveBaseProps & InteractivePremountProps>;
|
|
107
159
|
export {};
|
package/dist/cjs/Img.js
CHANGED
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const index_js_1 = require("./canvas-image/index.js");
|
|
7
7
|
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
8
|
+
const freeze_js_1 = require("./freeze.js");
|
|
8
9
|
const get_cross_origin_value_js_1 = require("./get-cross-origin-value.js");
|
|
9
10
|
const interactivity_schema_js_1 = require("./interactivity-schema.js");
|
|
10
11
|
const prefetch_js_1 = require("./prefetch.js");
|
|
@@ -13,6 +14,7 @@ const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
|
13
14
|
const truncate_src_for_label_js_1 = require("./truncate-src-for-label.js");
|
|
14
15
|
const use_buffer_state_js_1 = require("./use-buffer-state.js");
|
|
15
16
|
const use_delay_render_js_1 = require("./use-delay-render.js");
|
|
17
|
+
const use_premounting_js_1 = require("./use-premounting.js");
|
|
16
18
|
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
17
19
|
const with_interactivity_schema_js_1 = require("./with-interactivity-schema.js");
|
|
18
20
|
function exponentialBackoff(errorCount) {
|
|
@@ -192,11 +194,21 @@ const ImgContent = ({ onError, maxRetries = 2, src, pauseWhenLoading, delayRende
|
|
|
192
194
|
// blocks frame rendering.
|
|
193
195
|
return (jsx_runtime_1.jsx("img", { ...props, ref: imageCallbackRef, crossOrigin: crossOriginValue, onError: didGetError, decoding: isRendering ? 'sync' : decoding }));
|
|
194
196
|
};
|
|
195
|
-
const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, trimBefore, durationInFrames, freeze, controls, outlineRef: refForOutline, ...props }) => {
|
|
197
|
+
const NativeImgInner = ({ hidden, name, stack, showInTimeline, src, from, trimBefore, durationInFrames, freeze, premountFor, postmountFor, style, styleWhilePremounted, styleWhilePostmounted, controls, outlineRef: refForOutline, ...props }) => {
|
|
196
198
|
if (!src) {
|
|
197
199
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
198
200
|
}
|
|
199
|
-
|
|
201
|
+
const { effectivePostmountFor, effectivePremountFor, freezeFrame, isPremountingOrPostmounting, postmountingActive, premountingActive, premountingStyle, } = (0, use_premounting_js_1.usePremounting)({
|
|
202
|
+
from: from !== null && from !== void 0 ? from : 0,
|
|
203
|
+
durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity,
|
|
204
|
+
premountFor: premountFor !== null && premountFor !== void 0 ? premountFor : null,
|
|
205
|
+
postmountFor: postmountFor !== null && postmountFor !== void 0 ? postmountFor : null,
|
|
206
|
+
style: style !== null && style !== void 0 ? style : null,
|
|
207
|
+
styleWhilePremounted: styleWhilePremounted !== null && styleWhilePremounted !== void 0 ? styleWhilePremounted : null,
|
|
208
|
+
styleWhilePostmounted: styleWhilePostmounted !== null && styleWhilePostmounted !== void 0 ? styleWhilePostmounted : null,
|
|
209
|
+
hideWhilePremounted: 'display-none',
|
|
210
|
+
});
|
|
211
|
+
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, _remotionInternalStack: stack, _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: premountingStyle !== null && premountingStyle !== void 0 ? premountingStyle : undefined, ...props }) }) }));
|
|
200
212
|
};
|
|
201
213
|
const CanvasImageWithPrivateProps = index_js_1.CanvasImage;
|
|
202
214
|
exports.imgSchema = {
|
|
@@ -207,7 +219,10 @@ exports.imgSchema = {
|
|
|
207
219
|
keyframable: false,
|
|
208
220
|
},
|
|
209
221
|
...interactivity_schema_js_1.baseSchema,
|
|
222
|
+
...interactivity_schema_js_1.premountSchema,
|
|
210
223
|
...interactivity_schema_js_1.transformSchema,
|
|
224
|
+
...interactivity_schema_js_1.backgroundSchema,
|
|
225
|
+
...interactivity_schema_js_1.borderSchema,
|
|
211
226
|
};
|
|
212
227
|
const imgCanvasFallbackIncompatibleProps = new Set([
|
|
213
228
|
'alt',
|
|
@@ -248,11 +263,11 @@ const getFitFromObjectFit = (style) => {
|
|
|
248
263
|
}
|
|
249
264
|
return undefined;
|
|
250
265
|
};
|
|
251
|
-
const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src, from, trimBefore, durationInFrames, freeze, controls, width, height, className, style, id, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }) => {
|
|
266
|
+
const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src, from, trimBefore, durationInFrames, freeze, premountFor, postmountFor, styleWhilePremounted, styleWhilePostmounted, controls, width, height, className, style, id, pauseWhenLoading, maxRetries, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }) => {
|
|
252
267
|
var _a;
|
|
253
268
|
const refForOutline = (0, react_1.useRef)(null);
|
|
254
269
|
if (effects.length === 0) {
|
|
255
|
-
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name, stack: stack, showInTimeline: showInTimeline, src: src, from: from, trimBefore: trimBefore, durationInFrames: durationInFrames, freeze: freeze, controls: controls, width: width, height: height, className: className, style: style, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, outlineRef: refForOutline }));
|
|
270
|
+
return (jsx_runtime_1.jsx(NativeImgInner, { ...props, ref: ref, hidden: hidden, name: name, stack: stack, 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, id: id, pauseWhenLoading: pauseWhenLoading, maxRetries: maxRetries, delayRenderRetries: delayRenderRetries, delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds, outlineRef: refForOutline }));
|
|
256
271
|
}
|
|
257
272
|
if (!src) {
|
|
258
273
|
throw new Error('No "src" prop was passed to <Img>.');
|
|
@@ -267,7 +282,7 @@ const ImgInner = ({ effects = [], ref, hidden, name, stack, showInTimeline, src,
|
|
|
267
282
|
const canvasHeight = typeof height === 'number' ? height : undefined;
|
|
268
283
|
const canvasProps = props;
|
|
269
284
|
const canvasFit = (_a = getFitFromObjectFit(style)) !== null && _a !== void 0 ? _a : 'fill';
|
|
270
|
-
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, trimBefore: trimBefore, durationInFrames: durationInFrames, freeze: freeze, hidden: hidden, name: name !== null && name !== void 0 ? name : '<Img>', showInTimeline: showInTimeline, stack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", controls: controls, outlineRef: refForOutline, ...canvasProps }));
|
|
285
|
+
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, 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, stack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img", controls: controls, outlineRef: refForOutline, ...canvasProps }));
|
|
271
286
|
};
|
|
272
287
|
/*
|
|
273
288
|
* @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.
|
|
@@ -167,6 +167,45 @@ export declare const Interactive: {
|
|
|
167
167
|
readonly hiddenFromList: false;
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
|
+
backgroundSchema: {
|
|
171
|
+
readonly 'style.backgroundColor': {
|
|
172
|
+
readonly type: "color";
|
|
173
|
+
readonly default: "transparent";
|
|
174
|
+
readonly description: "Color";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
borderSchema: {
|
|
178
|
+
readonly 'style.borderWidth': {
|
|
179
|
+
readonly type: "number";
|
|
180
|
+
readonly default: undefined;
|
|
181
|
+
readonly min: 0;
|
|
182
|
+
readonly step: 1;
|
|
183
|
+
readonly description: "Border width";
|
|
184
|
+
readonly hiddenFromList: false;
|
|
185
|
+
};
|
|
186
|
+
readonly 'style.borderStyle': {
|
|
187
|
+
readonly type: "enum";
|
|
188
|
+
readonly default: "none";
|
|
189
|
+
readonly description: "Border style";
|
|
190
|
+
readonly variants: {
|
|
191
|
+
readonly none: {};
|
|
192
|
+
readonly hidden: {};
|
|
193
|
+
readonly solid: {};
|
|
194
|
+
readonly dashed: {};
|
|
195
|
+
readonly dotted: {};
|
|
196
|
+
readonly double: {};
|
|
197
|
+
readonly groove: {};
|
|
198
|
+
readonly ridge: {};
|
|
199
|
+
readonly inset: {};
|
|
200
|
+
readonly outset: {};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
readonly 'style.borderColor': {
|
|
204
|
+
readonly type: "color";
|
|
205
|
+
readonly default: undefined;
|
|
206
|
+
readonly description: "Border color";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
170
209
|
premountSchema: {
|
|
171
210
|
readonly premountFor: {
|
|
172
211
|
readonly type: "number";
|
|
@@ -257,6 +296,41 @@ export declare const Interactive: {
|
|
|
257
296
|
readonly description: "Opacity";
|
|
258
297
|
readonly hiddenFromList: false;
|
|
259
298
|
};
|
|
299
|
+
readonly 'style.borderWidth': {
|
|
300
|
+
readonly type: "number";
|
|
301
|
+
readonly default: undefined;
|
|
302
|
+
readonly min: 0;
|
|
303
|
+
readonly step: 1;
|
|
304
|
+
readonly description: "Border width";
|
|
305
|
+
readonly hiddenFromList: false;
|
|
306
|
+
};
|
|
307
|
+
readonly 'style.borderStyle': {
|
|
308
|
+
readonly type: "enum";
|
|
309
|
+
readonly default: "none";
|
|
310
|
+
readonly description: "Border style";
|
|
311
|
+
readonly variants: {
|
|
312
|
+
readonly none: {};
|
|
313
|
+
readonly hidden: {};
|
|
314
|
+
readonly solid: {};
|
|
315
|
+
readonly dashed: {};
|
|
316
|
+
readonly dotted: {};
|
|
317
|
+
readonly double: {};
|
|
318
|
+
readonly groove: {};
|
|
319
|
+
readonly ridge: {};
|
|
320
|
+
readonly inset: {};
|
|
321
|
+
readonly outset: {};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
readonly 'style.borderColor': {
|
|
325
|
+
readonly type: "color";
|
|
326
|
+
readonly default: undefined;
|
|
327
|
+
readonly description: "Border color";
|
|
328
|
+
};
|
|
329
|
+
readonly 'style.backgroundColor': {
|
|
330
|
+
readonly type: "color";
|
|
331
|
+
readonly default: "transparent";
|
|
332
|
+
readonly description: "Color";
|
|
333
|
+
};
|
|
260
334
|
readonly premountFor: {
|
|
261
335
|
readonly type: "number";
|
|
262
336
|
readonly default: 0;
|
|
@@ -274,12 +348,6 @@ export declare const Interactive: {
|
|
|
274
348
|
readonly hiddenFromList: true;
|
|
275
349
|
readonly keyframable: false;
|
|
276
350
|
};
|
|
277
|
-
readonly styleWhilePremounted: {
|
|
278
|
-
readonly type: "hidden";
|
|
279
|
-
};
|
|
280
|
-
readonly styleWhilePostmounted: {
|
|
281
|
-
readonly type: "hidden";
|
|
282
|
-
};
|
|
283
351
|
};
|
|
284
352
|
readonly none: {};
|
|
285
353
|
};
|
package/dist/cjs/Interactive.js
CHANGED
|
@@ -59,7 +59,20 @@ const interactiveElementSchema = {
|
|
|
59
59
|
...interactivity_schema_js_1.baseSchema,
|
|
60
60
|
...interactivity_schema_js_1.transformSchema,
|
|
61
61
|
};
|
|
62
|
+
const interactiveBackgroundElementSchema = {
|
|
63
|
+
...interactiveElementSchema,
|
|
64
|
+
...interactivity_schema_js_1.backgroundSchema,
|
|
65
|
+
};
|
|
66
|
+
const interactiveBorderElementSchema = {
|
|
67
|
+
...interactiveBackgroundElementSchema,
|
|
68
|
+
...interactivity_schema_js_1.borderSchema,
|
|
69
|
+
};
|
|
62
70
|
const interactiveTextElementSchema = {
|
|
71
|
+
...interactiveBorderElementSchema,
|
|
72
|
+
...interactivity_schema_js_1.textSchema,
|
|
73
|
+
...interactivity_schema_js_1.textContentSchema,
|
|
74
|
+
};
|
|
75
|
+
const interactiveSvgTextElementSchema = {
|
|
63
76
|
...interactiveElementSchema,
|
|
64
77
|
...interactivity_schema_js_1.textSchema,
|
|
65
78
|
...interactivity_schema_js_1.textContentSchema,
|
|
@@ -117,6 +130,8 @@ exports.Interactive = {
|
|
|
117
130
|
baseSchema: interactivity_schema_js_1.baseSchema,
|
|
118
131
|
transformSchema: interactivity_schema_js_1.transformSchema,
|
|
119
132
|
textSchema: interactivity_schema_js_1.textSchema,
|
|
133
|
+
backgroundSchema: interactivity_schema_js_1.backgroundSchema,
|
|
134
|
+
borderSchema: interactivity_schema_js_1.borderSchema,
|
|
120
135
|
premountSchema: interactivity_schema_js_1.premountSchema,
|
|
121
136
|
sequenceSchema: interactivity_schema_js_1.sequenceSchema,
|
|
122
137
|
withSchema,
|
|
@@ -153,7 +168,7 @@ exports.Interactive = {
|
|
|
153
168
|
Small: makeInteractiveTextElement('small', '<Interactive.Small>'),
|
|
154
169
|
Span: makeInteractiveTextElement('span', '<Interactive.Span>'),
|
|
155
170
|
Strong: makeInteractiveTextElement('strong', '<Interactive.Strong>'),
|
|
156
|
-
Svg:
|
|
157
|
-
Text:
|
|
171
|
+
Svg: makeInteractiveElement('svg', '<Interactive.Svg>', interactiveBorderElementSchema),
|
|
172
|
+
Text: makeInteractiveElement('text', '<Interactive.Text>', interactiveSvgTextElementSchema),
|
|
158
173
|
Ul: makeInteractiveTextElement('ul', '<Interactive.Ul>'),
|
|
159
174
|
};
|
|
@@ -1,7 +1,141 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { SequenceControls } from '../CompositionManager.js';
|
|
3
3
|
import type { EffectsProp } from '../effects/effect-types.js';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const animatedImageSchema: {
|
|
5
|
+
readonly 'style.transformOrigin': {
|
|
6
|
+
readonly type: "transform-origin";
|
|
7
|
+
readonly step: 1;
|
|
8
|
+
readonly default: "50% 50%";
|
|
9
|
+
readonly description: "Transform origin";
|
|
10
|
+
};
|
|
11
|
+
readonly 'style.translate': {
|
|
12
|
+
readonly type: "translate";
|
|
13
|
+
readonly step: 1;
|
|
14
|
+
readonly default: "0px 0px";
|
|
15
|
+
readonly description: "Offset";
|
|
16
|
+
};
|
|
17
|
+
readonly 'style.scale': {
|
|
18
|
+
readonly type: "scale";
|
|
19
|
+
readonly max: 100;
|
|
20
|
+
readonly step: 0.01;
|
|
21
|
+
readonly default: 1;
|
|
22
|
+
readonly description: "Scale";
|
|
23
|
+
readonly defaultKeyframeOutput: "perceptual-scale";
|
|
24
|
+
};
|
|
25
|
+
readonly 'style.rotate': {
|
|
26
|
+
readonly type: "rotation-css";
|
|
27
|
+
readonly step: 1;
|
|
28
|
+
readonly default: "0deg";
|
|
29
|
+
readonly description: "Rotation";
|
|
30
|
+
};
|
|
31
|
+
readonly 'style.opacity': {
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly min: 0;
|
|
34
|
+
readonly max: 1;
|
|
35
|
+
readonly step: 0.01;
|
|
36
|
+
readonly default: 1;
|
|
37
|
+
readonly description: "Opacity";
|
|
38
|
+
readonly hiddenFromList: false;
|
|
39
|
+
};
|
|
40
|
+
readonly 'style.borderWidth': {
|
|
41
|
+
readonly type: "number";
|
|
42
|
+
readonly default: undefined;
|
|
43
|
+
readonly min: 0;
|
|
44
|
+
readonly step: 1;
|
|
45
|
+
readonly description: "Border width";
|
|
46
|
+
readonly hiddenFromList: false;
|
|
47
|
+
};
|
|
48
|
+
readonly 'style.borderStyle': {
|
|
49
|
+
readonly type: "enum";
|
|
50
|
+
readonly default: "none";
|
|
51
|
+
readonly description: "Border style";
|
|
52
|
+
readonly variants: {
|
|
53
|
+
readonly none: {};
|
|
54
|
+
readonly hidden: {};
|
|
55
|
+
readonly solid: {};
|
|
56
|
+
readonly dashed: {};
|
|
57
|
+
readonly dotted: {};
|
|
58
|
+
readonly double: {};
|
|
59
|
+
readonly groove: {};
|
|
60
|
+
readonly ridge: {};
|
|
61
|
+
readonly inset: {};
|
|
62
|
+
readonly outset: {};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly 'style.borderColor': {
|
|
66
|
+
readonly type: "color";
|
|
67
|
+
readonly default: undefined;
|
|
68
|
+
readonly description: "Border color";
|
|
69
|
+
};
|
|
70
|
+
readonly 'style.backgroundColor': {
|
|
71
|
+
readonly type: "color";
|
|
72
|
+
readonly default: "transparent";
|
|
73
|
+
readonly description: "Color";
|
|
74
|
+
};
|
|
75
|
+
readonly premountFor: {
|
|
76
|
+
readonly type: "number";
|
|
77
|
+
readonly default: 0;
|
|
78
|
+
readonly description: "Premount For";
|
|
79
|
+
readonly min: 0;
|
|
80
|
+
readonly step: 1;
|
|
81
|
+
readonly hiddenFromList: false;
|
|
82
|
+
readonly keyframable: false;
|
|
83
|
+
};
|
|
84
|
+
readonly postmountFor: {
|
|
85
|
+
readonly type: "number";
|
|
86
|
+
readonly default: 0;
|
|
87
|
+
readonly min: 0;
|
|
88
|
+
readonly step: 1;
|
|
89
|
+
readonly hiddenFromList: true;
|
|
90
|
+
readonly keyframable: false;
|
|
91
|
+
};
|
|
92
|
+
readonly durationInFrames: {
|
|
93
|
+
readonly type: "number";
|
|
94
|
+
readonly default: undefined;
|
|
95
|
+
readonly min: 1;
|
|
96
|
+
readonly step: 1;
|
|
97
|
+
readonly hiddenFromList: true;
|
|
98
|
+
};
|
|
99
|
+
readonly from: {
|
|
100
|
+
readonly type: "number";
|
|
101
|
+
readonly default: 0;
|
|
102
|
+
readonly step: 1;
|
|
103
|
+
readonly hiddenFromList: true;
|
|
104
|
+
};
|
|
105
|
+
readonly trimBefore: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
readonly default: 0;
|
|
108
|
+
readonly min: 0;
|
|
109
|
+
readonly step: 1;
|
|
110
|
+
readonly hiddenFromList: true;
|
|
111
|
+
};
|
|
112
|
+
readonly freeze: {
|
|
113
|
+
readonly type: "number";
|
|
114
|
+
readonly default: null;
|
|
115
|
+
readonly step: 1;
|
|
116
|
+
readonly hiddenFromList: true;
|
|
117
|
+
};
|
|
118
|
+
readonly hidden: import("../interactivity-schema.js").BooleanFieldSchema;
|
|
119
|
+
readonly name: import("../interactivity-schema.js").HiddenFieldSchema;
|
|
120
|
+
readonly showInTimeline: import("../interactivity-schema.js").HiddenFieldSchema;
|
|
121
|
+
readonly src: {
|
|
122
|
+
readonly type: "asset";
|
|
123
|
+
readonly default: undefined;
|
|
124
|
+
readonly description: "Source";
|
|
125
|
+
readonly keyframable: false;
|
|
126
|
+
};
|
|
127
|
+
readonly playbackRate: {
|
|
128
|
+
readonly type: "number";
|
|
129
|
+
readonly min: 0;
|
|
130
|
+
readonly max: 10;
|
|
131
|
+
readonly step: 0.1;
|
|
132
|
+
readonly default: 1;
|
|
133
|
+
readonly description: "Playback rate";
|
|
134
|
+
readonly hiddenFromList: false;
|
|
135
|
+
readonly keyframable: false;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export declare const AnimatedImage: React.ComponentType<import("../Interactive.js").InteractiveBaseProps & import("../Interactive.js").InteractivePremountProps & {
|
|
5
139
|
src: string;
|
|
6
140
|
width?: number | undefined;
|
|
7
141
|
height?: number | undefined;
|