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
|
@@ -1,2 +1,238 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { type AbsoluteFillElementProps } from './AbsoluteFillElement.js';
|
|
3
|
+
import type { InteractiveBaseProps } from './Interactive.js';
|
|
4
|
+
export type AbsoluteFillProps = Omit<AbsoluteFillElementProps, keyof InteractiveBaseProps> & InteractiveBaseProps & {
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated For internal use only
|
|
7
|
+
*/
|
|
8
|
+
readonly stack?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const absoluteFillSchema: {
|
|
11
|
+
readonly 'style.transformOrigin': {
|
|
12
|
+
readonly type: "transform-origin";
|
|
13
|
+
readonly step: 1;
|
|
14
|
+
readonly default: "50% 50%";
|
|
15
|
+
readonly description: "Transform origin";
|
|
16
|
+
};
|
|
17
|
+
readonly 'style.translate': {
|
|
18
|
+
readonly type: "translate";
|
|
19
|
+
readonly step: 1;
|
|
20
|
+
readonly default: "0px 0px";
|
|
21
|
+
readonly description: "Offset";
|
|
22
|
+
};
|
|
23
|
+
readonly 'style.scale': {
|
|
24
|
+
readonly type: "scale";
|
|
25
|
+
readonly max: 100;
|
|
26
|
+
readonly step: 0.01;
|
|
27
|
+
readonly default: 1;
|
|
28
|
+
readonly description: "Scale";
|
|
29
|
+
readonly defaultKeyframeOutput: "perceptual-scale";
|
|
30
|
+
};
|
|
31
|
+
readonly 'style.rotate': {
|
|
32
|
+
readonly type: "rotation-css";
|
|
33
|
+
readonly step: 1;
|
|
34
|
+
readonly default: "0deg";
|
|
35
|
+
readonly description: "Rotation";
|
|
36
|
+
};
|
|
37
|
+
readonly 'style.opacity': {
|
|
38
|
+
readonly type: "number";
|
|
39
|
+
readonly min: 0;
|
|
40
|
+
readonly max: 1;
|
|
41
|
+
readonly step: 0.01;
|
|
42
|
+
readonly default: 1;
|
|
43
|
+
readonly description: "Opacity";
|
|
44
|
+
readonly hiddenFromList: false;
|
|
45
|
+
};
|
|
46
|
+
readonly 'style.color': {
|
|
47
|
+
readonly type: "color";
|
|
48
|
+
readonly default: undefined;
|
|
49
|
+
readonly description: "Color";
|
|
50
|
+
};
|
|
51
|
+
readonly 'style.fontFamily': {
|
|
52
|
+
readonly type: "font-family";
|
|
53
|
+
readonly default: undefined;
|
|
54
|
+
readonly description: "Font family";
|
|
55
|
+
readonly keyframable: false;
|
|
56
|
+
};
|
|
57
|
+
readonly 'style.fontSize': {
|
|
58
|
+
readonly type: "number";
|
|
59
|
+
readonly default: undefined;
|
|
60
|
+
readonly min: 0;
|
|
61
|
+
readonly step: 1;
|
|
62
|
+
readonly description: "Font size";
|
|
63
|
+
readonly hiddenFromList: false;
|
|
64
|
+
};
|
|
65
|
+
readonly 'style.lineHeight': {
|
|
66
|
+
readonly type: "number";
|
|
67
|
+
readonly default: undefined;
|
|
68
|
+
readonly min: 0;
|
|
69
|
+
readonly step: 0.05;
|
|
70
|
+
readonly description: "Line height";
|
|
71
|
+
readonly hiddenFromList: false;
|
|
72
|
+
};
|
|
73
|
+
readonly 'style.fontWeight': {
|
|
74
|
+
readonly type: "enum";
|
|
75
|
+
readonly default: "400";
|
|
76
|
+
readonly description: "Font weight";
|
|
77
|
+
readonly variants: {
|
|
78
|
+
readonly '100': {};
|
|
79
|
+
readonly '200': {};
|
|
80
|
+
readonly '300': {};
|
|
81
|
+
readonly '400': {};
|
|
82
|
+
readonly '500': {};
|
|
83
|
+
readonly '600': {};
|
|
84
|
+
readonly '700': {};
|
|
85
|
+
readonly '800': {};
|
|
86
|
+
readonly '900': {};
|
|
87
|
+
readonly normal: {};
|
|
88
|
+
readonly bold: {};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
readonly 'style.fontStyle': {
|
|
92
|
+
readonly type: "enum";
|
|
93
|
+
readonly default: "normal";
|
|
94
|
+
readonly description: "Font style";
|
|
95
|
+
readonly variants: {
|
|
96
|
+
readonly normal: {};
|
|
97
|
+
readonly italic: {};
|
|
98
|
+
readonly oblique: {};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly 'style.textAlign': {
|
|
102
|
+
readonly type: "enum";
|
|
103
|
+
readonly default: "left";
|
|
104
|
+
readonly description: "Text align";
|
|
105
|
+
readonly variants: {
|
|
106
|
+
readonly left: {};
|
|
107
|
+
readonly center: {};
|
|
108
|
+
readonly right: {};
|
|
109
|
+
readonly justify: {};
|
|
110
|
+
readonly start: {};
|
|
111
|
+
readonly end: {};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly 'style.letterSpacing': {
|
|
115
|
+
readonly type: "number";
|
|
116
|
+
readonly default: undefined;
|
|
117
|
+
readonly step: 0.1;
|
|
118
|
+
readonly description: "Letter spacing";
|
|
119
|
+
readonly hiddenFromList: false;
|
|
120
|
+
};
|
|
121
|
+
readonly 'style.borderWidth': {
|
|
122
|
+
readonly type: "number";
|
|
123
|
+
readonly default: undefined;
|
|
124
|
+
readonly min: 0;
|
|
125
|
+
readonly step: 1;
|
|
126
|
+
readonly description: "Border width";
|
|
127
|
+
readonly hiddenFromList: false;
|
|
128
|
+
};
|
|
129
|
+
readonly 'style.borderStyle': {
|
|
130
|
+
readonly type: "enum";
|
|
131
|
+
readonly default: "none";
|
|
132
|
+
readonly description: "Border style";
|
|
133
|
+
readonly variants: {
|
|
134
|
+
readonly none: {};
|
|
135
|
+
readonly hidden: {};
|
|
136
|
+
readonly solid: {};
|
|
137
|
+
readonly dashed: {};
|
|
138
|
+
readonly dotted: {};
|
|
139
|
+
readonly double: {};
|
|
140
|
+
readonly groove: {};
|
|
141
|
+
readonly ridge: {};
|
|
142
|
+
readonly inset: {};
|
|
143
|
+
readonly outset: {};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly 'style.borderColor': {
|
|
147
|
+
readonly type: "color";
|
|
148
|
+
readonly default: undefined;
|
|
149
|
+
readonly description: "Border color";
|
|
150
|
+
};
|
|
151
|
+
readonly 'style.borderRadius': {
|
|
152
|
+
readonly type: "number";
|
|
153
|
+
readonly default: 0;
|
|
154
|
+
readonly min: 0;
|
|
155
|
+
readonly step: 1;
|
|
156
|
+
readonly description: "Border radius";
|
|
157
|
+
readonly hiddenFromList: false;
|
|
158
|
+
readonly keyframable: true;
|
|
159
|
+
};
|
|
160
|
+
readonly 'style.borderTopLeftRadius': {
|
|
161
|
+
readonly type: "number";
|
|
162
|
+
readonly default: 0;
|
|
163
|
+
readonly min: 0;
|
|
164
|
+
readonly step: 1;
|
|
165
|
+
readonly description: "Top left radius";
|
|
166
|
+
readonly hiddenFromList: false;
|
|
167
|
+
};
|
|
168
|
+
readonly 'style.borderTopRightRadius': {
|
|
169
|
+
readonly type: "number";
|
|
170
|
+
readonly default: 0;
|
|
171
|
+
readonly min: 0;
|
|
172
|
+
readonly step: 1;
|
|
173
|
+
readonly description: "Top right radius";
|
|
174
|
+
readonly hiddenFromList: false;
|
|
175
|
+
};
|
|
176
|
+
readonly 'style.borderBottomRightRadius': {
|
|
177
|
+
readonly type: "number";
|
|
178
|
+
readonly default: 0;
|
|
179
|
+
readonly min: 0;
|
|
180
|
+
readonly step: 1;
|
|
181
|
+
readonly description: "Bottom right radius";
|
|
182
|
+
readonly hiddenFromList: false;
|
|
183
|
+
};
|
|
184
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
185
|
+
readonly type: "number";
|
|
186
|
+
readonly default: 0;
|
|
187
|
+
readonly min: 0;
|
|
188
|
+
readonly step: 1;
|
|
189
|
+
readonly description: "Bottom left radius";
|
|
190
|
+
readonly hiddenFromList: false;
|
|
191
|
+
};
|
|
192
|
+
readonly 'style.backgroundColor': {
|
|
193
|
+
readonly type: "color";
|
|
194
|
+
readonly default: "transparent";
|
|
195
|
+
readonly description: "Color";
|
|
196
|
+
};
|
|
197
|
+
readonly children: {
|
|
198
|
+
readonly type: "text-content";
|
|
199
|
+
readonly default: "";
|
|
200
|
+
readonly description: "Text";
|
|
201
|
+
readonly keyframable: false;
|
|
202
|
+
};
|
|
203
|
+
readonly durationInFrames: {
|
|
204
|
+
readonly type: "number";
|
|
205
|
+
readonly default: undefined;
|
|
206
|
+
readonly min: 1;
|
|
207
|
+
readonly step: 1;
|
|
208
|
+
readonly hiddenFromList: true;
|
|
209
|
+
};
|
|
210
|
+
readonly from: {
|
|
211
|
+
readonly type: "number";
|
|
212
|
+
readonly default: 0;
|
|
213
|
+
readonly step: 1;
|
|
214
|
+
readonly hiddenFromList: true;
|
|
215
|
+
};
|
|
216
|
+
readonly trimBefore: {
|
|
217
|
+
readonly type: "number";
|
|
218
|
+
readonly default: 0;
|
|
219
|
+
readonly min: 0;
|
|
220
|
+
readonly step: 1;
|
|
221
|
+
readonly hiddenFromList: true;
|
|
222
|
+
};
|
|
223
|
+
readonly freeze: {
|
|
224
|
+
readonly type: "number";
|
|
225
|
+
readonly default: null;
|
|
226
|
+
readonly step: 1;
|
|
227
|
+
readonly hiddenFromList: true;
|
|
228
|
+
};
|
|
229
|
+
readonly hidden: import("./interactivity-schema.js").BooleanFieldSchema;
|
|
230
|
+
readonly name: import("./interactivity-schema.js").HiddenFieldSchema;
|
|
231
|
+
readonly showInTimeline: import("./interactivity-schema.js").HiddenFieldSchema;
|
|
232
|
+
};
|
|
233
|
+
export declare const AbsoluteFill: React.ComponentType<Omit<AbsoluteFillElementProps, "durationInFrames" | "freeze" | "from" | "hidden" | "name" | "showInTimeline" | "trimBefore"> & InteractiveBaseProps & {
|
|
234
|
+
/**
|
|
235
|
+
* @deprecated For internal use only
|
|
236
|
+
*/
|
|
237
|
+
readonly stack?: string | undefined;
|
|
238
|
+
}>;
|
package/dist/cjs/AbsoluteFill.js
CHANGED
|
@@ -1,115 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbsoluteFill = void 0;
|
|
3
|
+
exports.AbsoluteFill = exports.absoluteFillSchema = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const AbsoluteFillElement_js_1 = require("./AbsoluteFillElement.js");
|
|
7
|
+
const enable_sequence_stack_traces_js_1 = require("./enable-sequence-stack-traces.js");
|
|
8
|
+
const interactivity_schema_js_1 = require("./interactivity-schema.js");
|
|
9
|
+
const Sequence_js_1 = require("./Sequence.js");
|
|
10
|
+
const use_unsafe_video_config_js_1 = require("./use-unsafe-video-config.js");
|
|
11
|
+
const with_interactivity_schema_js_1 = require("./with-interactivity-schema.js");
|
|
12
|
+
exports.absoluteFillSchema = {
|
|
13
|
+
...interactivity_schema_js_1.baseSchema,
|
|
14
|
+
...interactivity_schema_js_1.transformSchema,
|
|
15
|
+
...interactivity_schema_js_1.backgroundSchema,
|
|
16
|
+
...interactivity_schema_js_1.borderSchema,
|
|
17
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
18
|
+
...interactivity_schema_js_1.textSchema,
|
|
19
|
+
...interactivity_schema_js_1.textContentSchema,
|
|
20
|
+
};
|
|
21
|
+
const setRef = (ref, value) => {
|
|
22
|
+
if (typeof ref === 'function') {
|
|
23
|
+
ref(value);
|
|
9
24
|
}
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
return classPrefix.some((token) => {
|
|
13
|
-
return split.some((part) => {
|
|
14
|
-
return (part.trim() === token ||
|
|
15
|
-
part.trim().endsWith(`:${token}`) ||
|
|
16
|
-
part.trim().endsWith(`!${token}`));
|
|
17
|
-
});
|
|
18
|
-
});
|
|
25
|
+
else if (ref) {
|
|
26
|
+
ref.current = value;
|
|
19
27
|
}
|
|
20
|
-
return classPrefix.some((prefix) => {
|
|
21
|
-
return (className.startsWith(prefix) ||
|
|
22
|
-
className.includes(` ${prefix}`) ||
|
|
23
|
-
className.includes(`!${prefix}`) ||
|
|
24
|
-
className.includes(`:${prefix}`));
|
|
25
|
-
});
|
|
26
28
|
};
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
? undefined
|
|
39
|
-
: 0,
|
|
40
|
-
left: hasTailwindClassName({
|
|
41
|
-
className: other.className,
|
|
42
|
-
classPrefix: ['left-', 'inset-'],
|
|
43
|
-
type: 'prefix',
|
|
44
|
-
})
|
|
45
|
-
? undefined
|
|
46
|
-
: 0,
|
|
47
|
-
right: hasTailwindClassName({
|
|
48
|
-
className: other.className,
|
|
49
|
-
classPrefix: ['right-', 'inset-'],
|
|
50
|
-
type: 'prefix',
|
|
51
|
-
})
|
|
52
|
-
? undefined
|
|
53
|
-
: 0,
|
|
54
|
-
bottom: hasTailwindClassName({
|
|
55
|
-
className: other.className,
|
|
56
|
-
classPrefix: ['bottom-', 'inset-'],
|
|
57
|
-
type: 'prefix',
|
|
58
|
-
})
|
|
59
|
-
? undefined
|
|
60
|
-
: 0,
|
|
61
|
-
width: hasTailwindClassName({
|
|
62
|
-
className: other.className,
|
|
63
|
-
classPrefix: ['w-'],
|
|
64
|
-
type: 'prefix',
|
|
65
|
-
})
|
|
66
|
-
? undefined
|
|
67
|
-
: '100%',
|
|
68
|
-
height: hasTailwindClassName({
|
|
69
|
-
className: other.className,
|
|
70
|
-
classPrefix: ['h-'],
|
|
71
|
-
type: 'prefix',
|
|
72
|
-
})
|
|
73
|
-
? undefined
|
|
74
|
-
: '100%',
|
|
75
|
-
display: hasTailwindClassName({
|
|
76
|
-
className: other.className,
|
|
77
|
-
classPrefix: [
|
|
78
|
-
'block',
|
|
79
|
-
'inline-block',
|
|
80
|
-
'inline',
|
|
81
|
-
'flex',
|
|
82
|
-
'inline-flex',
|
|
83
|
-
'flow-root',
|
|
84
|
-
'grid',
|
|
85
|
-
'inline-grid',
|
|
86
|
-
'contents',
|
|
87
|
-
'list-item',
|
|
88
|
-
'hidden',
|
|
89
|
-
],
|
|
90
|
-
type: 'exact',
|
|
91
|
-
})
|
|
92
|
-
? undefined
|
|
93
|
-
: 'flex',
|
|
94
|
-
flexDirection: hasTailwindClassName({
|
|
95
|
-
className: other.className,
|
|
96
|
-
classPrefix: [
|
|
97
|
-
'flex-row',
|
|
98
|
-
'flex-col',
|
|
99
|
-
'flex-row-reverse',
|
|
100
|
-
'flex-col-reverse',
|
|
101
|
-
],
|
|
102
|
-
type: 'exact',
|
|
103
|
-
})
|
|
104
|
-
? undefined
|
|
105
|
-
: 'column',
|
|
106
|
-
...style,
|
|
107
|
-
};
|
|
108
|
-
}, [other.className, style]);
|
|
109
|
-
return jsx_runtime_1.jsx("div", { ref: ref, style: actualStyle, ...other });
|
|
29
|
+
const AbsoluteFillInner = ({ ref, from, trimBefore, freeze, durationInFrames, hidden, name, showInTimeline, stack, controls, children, ...divProps }) => {
|
|
30
|
+
const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)();
|
|
31
|
+
const refForOutline = (0, react_1.useRef)(null);
|
|
32
|
+
const callbackRef = (0, react_1.useCallback)((element) => {
|
|
33
|
+
refForOutline.current = element;
|
|
34
|
+
setRef(ref, element);
|
|
35
|
+
}, [ref]);
|
|
36
|
+
if (videoConfig === null) {
|
|
37
|
+
return hidden ? null : (jsx_runtime_1.jsx(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, children: children }));
|
|
38
|
+
}
|
|
39
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from !== null && from !== void 0 ? from : 0, trimBefore: trimBefore, freeze: freeze, durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : Infinity, hidden: hidden, name: name !== null && name !== void 0 ? name : '<AbsoluteFill>', showInTimeline: showInTimeline !== null && showInTimeline !== void 0 ? showInTimeline : true, controls: controls, _remotionInternalStack: stack, _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/absolute-fill", outlineRef: refForOutline, children: jsx_runtime_1.jsx(AbsoluteFillElement_js_1.AbsoluteFillElement, { ref: callbackRef, ...divProps, children: children }) }));
|
|
110
40
|
};
|
|
111
41
|
/*
|
|
112
42
|
* @description A helper component which renders an absolutely positioned <div> element with full width, height, and flex display suited for content layering.
|
|
113
43
|
* @see [Documentation](https://remotion.dev/docs/absolute-fill)
|
|
114
44
|
*/
|
|
115
|
-
exports.AbsoluteFill = (0,
|
|
45
|
+
exports.AbsoluteFill = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
|
|
46
|
+
Component: AbsoluteFillInner,
|
|
47
|
+
componentName: '<AbsoluteFill>',
|
|
48
|
+
componentIdentity: 'dev.remotion.remotion.AbsoluteFill',
|
|
49
|
+
schema: exports.absoluteFillSchema,
|
|
50
|
+
supportsEffects: false,
|
|
51
|
+
});
|
|
52
|
+
(0, enable_sequence_stack_traces_js_1.addSequenceStackTraces)(exports.AbsoluteFill);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AbsoluteFillElementProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
3
|
+
export declare const AbsoluteFillElement: React.ForwardRefExoticComponent<Omit<AbsoluteFillElementProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbsoluteFillElement = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const hasTailwindClassName = ({ className, classPrefix, type, }) => {
|
|
7
|
+
if (!className) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
if (type === 'exact') {
|
|
11
|
+
const split = className.split(' ');
|
|
12
|
+
return classPrefix.some((token) => {
|
|
13
|
+
return split.some((part) => {
|
|
14
|
+
return (part.trim() === token ||
|
|
15
|
+
part.trim().endsWith(`:${token}`) ||
|
|
16
|
+
part.trim().endsWith(`!${token}`));
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return classPrefix.some((prefix) => {
|
|
21
|
+
return (className.startsWith(prefix) ||
|
|
22
|
+
className.includes(` ${prefix}`) ||
|
|
23
|
+
className.includes(`!${prefix}`) ||
|
|
24
|
+
className.includes(`:${prefix}`));
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const AbsoluteFillElementRefForwarding = (props, ref) => {
|
|
28
|
+
const { style, ...other } = props;
|
|
29
|
+
const actualStyle = (0, react_1.useMemo)(() => {
|
|
30
|
+
// Make TailwindCSS classes get accepted
|
|
31
|
+
return {
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
top: hasTailwindClassName({
|
|
34
|
+
className: other.className,
|
|
35
|
+
classPrefix: ['top-', 'inset-'],
|
|
36
|
+
type: 'prefix',
|
|
37
|
+
})
|
|
38
|
+
? undefined
|
|
39
|
+
: 0,
|
|
40
|
+
left: hasTailwindClassName({
|
|
41
|
+
className: other.className,
|
|
42
|
+
classPrefix: ['left-', 'inset-'],
|
|
43
|
+
type: 'prefix',
|
|
44
|
+
})
|
|
45
|
+
? undefined
|
|
46
|
+
: 0,
|
|
47
|
+
right: hasTailwindClassName({
|
|
48
|
+
className: other.className,
|
|
49
|
+
classPrefix: ['right-', 'inset-'],
|
|
50
|
+
type: 'prefix',
|
|
51
|
+
})
|
|
52
|
+
? undefined
|
|
53
|
+
: 0,
|
|
54
|
+
bottom: hasTailwindClassName({
|
|
55
|
+
className: other.className,
|
|
56
|
+
classPrefix: ['bottom-', 'inset-'],
|
|
57
|
+
type: 'prefix',
|
|
58
|
+
})
|
|
59
|
+
? undefined
|
|
60
|
+
: 0,
|
|
61
|
+
width: hasTailwindClassName({
|
|
62
|
+
className: other.className,
|
|
63
|
+
classPrefix: ['w-'],
|
|
64
|
+
type: 'prefix',
|
|
65
|
+
})
|
|
66
|
+
? undefined
|
|
67
|
+
: '100%',
|
|
68
|
+
height: hasTailwindClassName({
|
|
69
|
+
className: other.className,
|
|
70
|
+
classPrefix: ['h-'],
|
|
71
|
+
type: 'prefix',
|
|
72
|
+
})
|
|
73
|
+
? undefined
|
|
74
|
+
: '100%',
|
|
75
|
+
display: hasTailwindClassName({
|
|
76
|
+
className: other.className,
|
|
77
|
+
classPrefix: [
|
|
78
|
+
'block',
|
|
79
|
+
'inline-block',
|
|
80
|
+
'inline',
|
|
81
|
+
'flex',
|
|
82
|
+
'inline-flex',
|
|
83
|
+
'flow-root',
|
|
84
|
+
'grid',
|
|
85
|
+
'inline-grid',
|
|
86
|
+
'contents',
|
|
87
|
+
'list-item',
|
|
88
|
+
'hidden',
|
|
89
|
+
],
|
|
90
|
+
type: 'exact',
|
|
91
|
+
})
|
|
92
|
+
? undefined
|
|
93
|
+
: 'flex',
|
|
94
|
+
flexDirection: hasTailwindClassName({
|
|
95
|
+
className: other.className,
|
|
96
|
+
classPrefix: [
|
|
97
|
+
'flex-row',
|
|
98
|
+
'flex-col',
|
|
99
|
+
'flex-row-reverse',
|
|
100
|
+
'flex-col-reverse',
|
|
101
|
+
],
|
|
102
|
+
type: 'exact',
|
|
103
|
+
})
|
|
104
|
+
? undefined
|
|
105
|
+
: 'column',
|
|
106
|
+
...style,
|
|
107
|
+
};
|
|
108
|
+
}, [other.className, style]);
|
|
109
|
+
return jsx_runtime_1.jsx("div", { ref: ref, style: actualStyle, ...other });
|
|
110
|
+
};
|
|
111
|
+
exports.AbsoluteFillElement = (0, react_1.forwardRef)(AbsoluteFillElementRefForwarding);
|
package/dist/cjs/Composition.js
CHANGED
|
@@ -54,7 +54,8 @@ const InnerComposition = ({ width, height, fps, durationInFrames, id, defaultPro
|
|
|
54
54
|
throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
|
|
55
55
|
}
|
|
56
56
|
const { folderName, parentName } = (0, react_1.useContext)(Folder_js_1.FolderContext);
|
|
57
|
-
const stack = (_b = compProps
|
|
57
|
+
const stack = (_b = compProps
|
|
58
|
+
._remotionInternalStack) !== null && _b !== void 0 ? _b : null;
|
|
58
59
|
const componentFromProps = 'component' in compProps ? compProps.component : null;
|
|
59
60
|
(0, react_1.useEffect)(() => {
|
|
60
61
|
var _a;
|
package/dist/cjs/Folder.js
CHANGED
|
@@ -21,7 +21,8 @@ const Folder = (props) => {
|
|
|
21
21
|
const parent = (0, react_1.useContext)(exports.FolderContext);
|
|
22
22
|
const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManagerContext_js_1.CompositionSetters);
|
|
23
23
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
24
|
-
const stack = (_a = props
|
|
24
|
+
const stack = (_a = props
|
|
25
|
+
._remotionInternalStack) !== null && _a !== void 0 ? _a : null;
|
|
25
26
|
(0, validate_folder_name_js_1.validateFolderName)(name);
|
|
26
27
|
const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_js_1.truthy);
|
|
27
28
|
const parentName = parentNameArr.length === 0 ? null : parentNameArr.join('/');
|
|
@@ -130,6 +130,47 @@ export declare const htmlInCanvasSchema: {
|
|
|
130
130
|
readonly default: undefined;
|
|
131
131
|
readonly description: "Border color";
|
|
132
132
|
};
|
|
133
|
+
readonly 'style.borderRadius': {
|
|
134
|
+
readonly type: "number";
|
|
135
|
+
readonly default: 0;
|
|
136
|
+
readonly min: 0;
|
|
137
|
+
readonly step: 1;
|
|
138
|
+
readonly description: "Border radius";
|
|
139
|
+
readonly hiddenFromList: false;
|
|
140
|
+
readonly keyframable: true;
|
|
141
|
+
};
|
|
142
|
+
readonly 'style.borderTopLeftRadius': {
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
readonly default: 0;
|
|
145
|
+
readonly min: 0;
|
|
146
|
+
readonly step: 1;
|
|
147
|
+
readonly description: "Top left radius";
|
|
148
|
+
readonly hiddenFromList: false;
|
|
149
|
+
};
|
|
150
|
+
readonly 'style.borderTopRightRadius': {
|
|
151
|
+
readonly type: "number";
|
|
152
|
+
readonly default: 0;
|
|
153
|
+
readonly min: 0;
|
|
154
|
+
readonly step: 1;
|
|
155
|
+
readonly description: "Top right radius";
|
|
156
|
+
readonly hiddenFromList: false;
|
|
157
|
+
};
|
|
158
|
+
readonly 'style.borderBottomRightRadius': {
|
|
159
|
+
readonly type: "number";
|
|
160
|
+
readonly default: 0;
|
|
161
|
+
readonly min: 0;
|
|
162
|
+
readonly step: 1;
|
|
163
|
+
readonly description: "Bottom right radius";
|
|
164
|
+
readonly hiddenFromList: false;
|
|
165
|
+
};
|
|
166
|
+
readonly 'style.borderBottomLeftRadius': {
|
|
167
|
+
readonly type: "number";
|
|
168
|
+
readonly default: 0;
|
|
169
|
+
readonly min: 0;
|
|
170
|
+
readonly step: 1;
|
|
171
|
+
readonly description: "Bottom left radius";
|
|
172
|
+
readonly hiddenFromList: false;
|
|
173
|
+
};
|
|
133
174
|
readonly 'style.backgroundColor': {
|
|
134
175
|
readonly type: "color";
|
|
135
176
|
readonly default: "transparent";
|
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -410,6 +410,7 @@ exports.htmlInCanvasSchema = {
|
|
|
410
410
|
...interactivity_schema_js_1.transformSchema,
|
|
411
411
|
...interactivity_schema_js_1.backgroundSchema,
|
|
412
412
|
...interactivity_schema_js_1.borderSchema,
|
|
413
|
+
...interactivity_schema_js_1.borderRadiusSchema,
|
|
413
414
|
...interactivity_schema_js_1.cropSchema,
|
|
414
415
|
};
|
|
415
416
|
const HtmlInCanvasWrapped = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -12,10 +12,6 @@ export type ImgProps = NativeImgProps & {
|
|
|
12
12
|
readonly effects?: EffectsProp;
|
|
13
13
|
readonly showInTimeline?: boolean;
|
|
14
14
|
readonly name?: string;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated For internal use only
|
|
17
|
-
*/
|
|
18
|
-
readonly stack?: string;
|
|
19
15
|
} & InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps;
|
|
20
16
|
export declare const imgSchema: {
|
|
21
17
|
readonly 'style.transformOrigin': {
|
|
@@ -83,6 +79,47 @@ export declare const imgSchema: {
|
|
|
83
79
|
readonly default: undefined;
|
|
84
80
|
readonly description: "Border color";
|
|
85
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
|
+
};
|
|
86
123
|
readonly 'style.backgroundColor': {
|
|
87
124
|
readonly type: "color";
|
|
88
125
|
readonly default: "transparent";
|
|
@@ -191,9 +228,5 @@ export declare const Img: React.ComponentType<NativeImgProps & {
|
|
|
191
228
|
readonly effects?: EffectsProp | undefined;
|
|
192
229
|
readonly showInTimeline?: boolean | undefined;
|
|
193
230
|
readonly name?: string | undefined;
|
|
194
|
-
/**
|
|
195
|
-
* @deprecated For internal use only
|
|
196
|
-
*/
|
|
197
|
-
readonly stack?: string | undefined;
|
|
198
231
|
} & InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps>;
|
|
199
232
|
export {};
|