remotion 4.0.499 → 4.0.501

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/cjs/AbsoluteFill.d.ts +237 -1
  2. package/dist/cjs/AbsoluteFill.js +40 -103
  3. package/dist/cjs/AbsoluteFillElement.d.ts +3 -0
  4. package/dist/cjs/AbsoluteFillElement.js +111 -0
  5. package/dist/cjs/Composition.js +2 -1
  6. package/dist/cjs/CompositionManager.d.ts +0 -1
  7. package/dist/cjs/Folder.js +2 -1
  8. package/dist/cjs/HtmlInCanvas.d.ts +84 -3
  9. package/dist/cjs/HtmlInCanvas.js +30 -2
  10. package/dist/cjs/Img.d.ts +84 -11
  11. package/dist/cjs/Img.js +16 -5
  12. package/dist/cjs/Interactive.d.ts +211 -6
  13. package/dist/cjs/Interactive.js +33 -11
  14. package/dist/cjs/Sequence.d.ts +4 -0
  15. package/dist/cjs/Sequence.js +30 -13
  16. package/dist/cjs/TimelineContext.d.ts +0 -1
  17. package/dist/cjs/TimelineContext.js +1 -4
  18. package/dist/cjs/animated-image/AnimatedImage.d.ts +82 -1
  19. package/dist/cjs/animated-image/AnimatedImage.js +13 -2
  20. package/dist/cjs/animated-image/props.d.ts +2 -2
  21. package/dist/cjs/audio/AudioForPreview.d.ts +0 -1
  22. package/dist/cjs/audio/AudioForPreview.js +1 -1
  23. package/dist/cjs/audio/html5-audio.d.ts +2 -2
  24. package/dist/cjs/audio/html5-audio.js +2 -2
  25. package/dist/cjs/canvas-image/CanvasImage.d.ts +83 -3
  26. package/dist/cjs/canvas-image/CanvasImage.js +13 -2
  27. package/dist/cjs/canvas-image/props.d.ts +6 -7
  28. package/dist/cjs/effects/Solid.d.ts +84 -3
  29. package/dist/cjs/effects/Solid.js +13 -2
  30. package/dist/cjs/enable-sequence-stack-traces.d.ts +4 -0
  31. package/dist/cjs/enable-sequence-stack-traces.js +16 -1
  32. package/dist/cjs/index.d.ts +3 -3
  33. package/dist/cjs/interactivity-schema.d.ts +420 -1
  34. package/dist/cjs/interactivity-schema.js +122 -1
  35. package/dist/cjs/internals.d.ts +211 -2
  36. package/dist/cjs/internals.js +7 -0
  37. package/dist/cjs/no-react.d.ts +81 -0
  38. package/dist/cjs/sequence-crop.d.ts +20 -0
  39. package/dist/cjs/sequence-crop.js +59 -0
  40. package/dist/cjs/series/index.js +4 -4
  41. package/dist/cjs/static-file.js +10 -0
  42. package/dist/cjs/truncate-src-for-label.js +5 -1
  43. package/dist/cjs/use-crop-style.d.ts +6 -0
  44. package/dist/cjs/use-crop-style.js +19 -0
  45. package/dist/cjs/use-media-in-timeline.d.ts +0 -1
  46. package/dist/cjs/use-media-in-timeline.js +1 -7
  47. package/dist/cjs/version.d.ts +1 -1
  48. package/dist/cjs/version.js +1 -1
  49. package/dist/cjs/video/OffthreadVideo.js +6 -6
  50. package/dist/cjs/video/html5-video.d.ts +2 -2
  51. package/dist/cjs/video/html5-video.js +5 -5
  52. package/dist/cjs/video/props.d.ts +1 -1
  53. package/dist/cjs/with-interactivity-schema.js +22 -12
  54. package/dist/esm/index.mjs +2453 -2022
  55. package/dist/esm/no-react.mjs +111 -0
  56. package/dist/esm/version.mjs +1 -1
  57. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { InteractiveBaseProps } from '../Interactive.js';
2
+ import type { InteractiveBaseProps, InteractiveCropProps } from '../Interactive.js';
3
3
  import type { EffectsProp } from './effect-types.js';
4
4
  type MandatoryProps = {
5
5
  readonly width: number;
@@ -12,7 +12,7 @@ type OptionalProps = {
12
12
  readonly style: React.CSSProperties | undefined;
13
13
  readonly pixelDensity: number | undefined;
14
14
  };
15
- export type SolidProps = MandatoryProps & Partial<OptionalProps>;
15
+ export type SolidProps = MandatoryProps & Partial<OptionalProps> & InteractiveCropProps;
16
16
  export declare const solidSchema: {
17
17
  readonly 'style.transformOrigin': {
18
18
  readonly type: "transform-origin";
@@ -79,11 +79,92 @@ export declare const solidSchema: {
79
79
  readonly default: undefined;
80
80
  readonly description: "Border color";
81
81
  };
82
+ readonly 'style.borderRadius': {
83
+ readonly type: "number";
84
+ readonly default: 0;
85
+ readonly min: 0;
86
+ readonly step: 1;
87
+ readonly description: "Border radius";
88
+ readonly hiddenFromList: false;
89
+ readonly keyframable: true;
90
+ };
91
+ readonly 'style.borderTopLeftRadius': {
92
+ readonly type: "number";
93
+ readonly default: 0;
94
+ readonly min: 0;
95
+ readonly step: 1;
96
+ readonly description: "Top left radius";
97
+ readonly hiddenFromList: false;
98
+ };
99
+ readonly 'style.borderTopRightRadius': {
100
+ readonly type: "number";
101
+ readonly default: 0;
102
+ readonly min: 0;
103
+ readonly step: 1;
104
+ readonly description: "Top right radius";
105
+ readonly hiddenFromList: false;
106
+ };
107
+ readonly 'style.borderBottomRightRadius': {
108
+ readonly type: "number";
109
+ readonly default: 0;
110
+ readonly min: 0;
111
+ readonly step: 1;
112
+ readonly description: "Bottom right radius";
113
+ readonly hiddenFromList: false;
114
+ };
115
+ readonly 'style.borderBottomLeftRadius': {
116
+ readonly type: "number";
117
+ readonly default: 0;
118
+ readonly min: 0;
119
+ readonly step: 1;
120
+ readonly description: "Bottom left radius";
121
+ readonly hiddenFromList: false;
122
+ };
82
123
  readonly 'style.backgroundColor': {
83
124
  readonly type: "color";
84
125
  readonly default: "transparent";
85
126
  readonly description: "Color";
86
127
  };
128
+ readonly cropLeft: {
129
+ readonly type: "number";
130
+ readonly default: 0;
131
+ readonly description: "Crop left";
132
+ readonly min: 0;
133
+ readonly max: 1;
134
+ readonly step: 0.01;
135
+ readonly hiddenFromList: false;
136
+ readonly keyframable: true;
137
+ };
138
+ readonly cropRight: {
139
+ readonly type: "number";
140
+ readonly default: 0;
141
+ readonly description: "Crop right";
142
+ readonly min: 0;
143
+ readonly max: 1;
144
+ readonly step: 0.01;
145
+ readonly hiddenFromList: false;
146
+ readonly keyframable: true;
147
+ };
148
+ readonly cropTop: {
149
+ readonly type: "number";
150
+ readonly default: 0;
151
+ readonly description: "Crop top";
152
+ readonly min: 0;
153
+ readonly max: 1;
154
+ readonly step: 0.01;
155
+ readonly hiddenFromList: false;
156
+ readonly keyframable: true;
157
+ };
158
+ readonly cropBottom: {
159
+ readonly type: "number";
160
+ readonly default: 0;
161
+ readonly description: "Crop bottom";
162
+ readonly min: 0;
163
+ readonly max: 1;
164
+ readonly step: 0.01;
165
+ readonly hiddenFromList: false;
166
+ readonly keyframable: true;
167
+ };
87
168
  readonly durationInFrames: {
88
169
  readonly type: "number";
89
170
  readonly default: undefined;
@@ -144,5 +225,5 @@ export declare const solidSchema: {
144
225
  readonly hiddenFromList: false;
145
226
  };
146
227
  };
147
- export declare const Solid: React.ComponentType<MandatoryProps & Partial<OptionalProps> & InteractiveBaseProps & React.RefAttributes<HTMLCanvasElement>>;
228
+ export declare const Solid: React.ComponentType<MandatoryProps & Partial<OptionalProps> & InteractiveCropProps & InteractiveBaseProps & React.RefAttributes<HTMLCanvasElement>>;
148
229
  export {};
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const enable_sequence_stack_traces_js_1 = require("../enable-sequence-stack-traces.js");
7
7
  const interactivity_schema_js_1 = require("../interactivity-schema.js");
8
8
  const Sequence_js_1 = require("../Sequence.js");
9
+ const use_crop_style_js_1 = require("../use-crop-style.js");
9
10
  const use_delay_render_js_1 = require("../use-delay-render.js");
10
11
  const with_interactivity_schema_js_1 = require("../with-interactivity-schema.js");
11
12
  const run_effect_chain_js_1 = require("./run-effect-chain.js");
@@ -57,6 +58,8 @@ exports.solidSchema = {
57
58
  ...interactivity_schema_js_1.transformSchema,
58
59
  ...interactivity_schema_js_1.backgroundSchema,
59
60
  ...interactivity_schema_js_1.borderSchema,
61
+ ...interactivity_schema_js_1.borderRadiusSchema,
62
+ ...interactivity_schema_js_1.cropSchema,
60
63
  };
61
64
  const SolidInner = ({ color, width, height, effects = [], className, style, pixelDensity, overrideId, reference, }) => {
62
65
  const { delayRender, continueRender, cancelRender } = (0, use_delay_render_js_1.useDelayRender)();
@@ -149,7 +152,7 @@ const SolidInner = ({ color, width, height, effects = [], className, style, pixe
149
152
  }, [height, style, width]);
150
153
  return (jsx_runtime_1.jsx("canvas", { ref: canvasRef, width: canvasWidth, height: canvasHeight, className: className, style: canvasStyle }));
151
154
  };
152
- const SolidOuter = (0, react_1.forwardRef)(({ effects = [], controls, color, height, width, className, durationInFrames, style, name, from, trimBefore, freeze, hidden, showInTimeline, pixelDensity, ...props }, ref) => {
155
+ const SolidOuter = (0, react_1.forwardRef)(({ effects = [], controls, color, height, width, className, durationInFrames, style, name, from, trimBefore, freeze, hidden, showInTimeline, pixelDensity, cropLeft, cropRight, cropTop, cropBottom, ...props }, ref) => {
153
156
  var _a;
154
157
  props;
155
158
  const memoizedEffectDefinitions = (0, use_memoized_effects_js_1.useMemoizedEffectDefinitions)(effects);
@@ -157,7 +160,15 @@ const SolidOuter = (0, react_1.forwardRef)(({ effects = [], controls, color, hei
157
160
  (0, react_1.useImperativeHandle)(ref, () => {
158
161
  return actualRef.current;
159
162
  }, []);
160
- return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from, trimBefore: trimBefore, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline, controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', outlineRef: 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 }) }));
163
+ const croppedStyle = (0, use_crop_style_js_1.useCropStyle)({
164
+ cropLeft,
165
+ cropRight,
166
+ cropTop,
167
+ cropBottom,
168
+ style: style !== null && style !== void 0 ? style : null,
169
+ componentName: '<Solid />',
170
+ });
171
+ return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", from: from, trimBefore: trimBefore, freeze: freeze, hidden: hidden, showInTimeline: showInTimeline, controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<Solid>', outlineRef: 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: croppedStyle !== null && croppedStyle !== void 0 ? croppedStyle : undefined, effects: effects, pixelDensity: pixelDensity }) }));
161
172
  });
162
173
  exports.Solid = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
163
174
  Component: SolidOuter,
@@ -1,6 +1,10 @@
1
1
  import React from 'react';
2
+ import type { SequenceControls } from './CompositionManager.js';
3
+ export declare const REMOTION_INTERNAL_STACK_PROP = "_remotionInternalStack";
2
4
  export declare const getComponentsToAddStacksTo: () => unknown[];
3
5
  export declare const addSequenceStackTraces: (component: unknown) => void;
4
6
  export declare const setSequenceComponent: (component: unknown) => void;
5
7
  export declare const getSequenceComponent: () => unknown;
8
+ export declare const setStackForControls: (controls: SequenceControls, stack: string | undefined) => void;
9
+ export declare const getStackForControls: (controls: SequenceControls) => string | null;
6
10
  export declare const getSingleChildComponent: (children: React.ReactNode) => unknown;
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getSingleChildComponent = exports.getSequenceComponent = exports.setSequenceComponent = exports.addSequenceStackTraces = exports.getComponentsToAddStacksTo = void 0;
6
+ exports.getSingleChildComponent = exports.getStackForControls = exports.setStackForControls = exports.getSequenceComponent = exports.setSequenceComponent = exports.addSequenceStackTraces = exports.getComponentsToAddStacksTo = exports.REMOTION_INTERNAL_STACK_PROP = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const componentsToAddStacksTo = [];
9
9
  let sequenceComponent = null;
10
+ const stacksByControls = new WeakMap();
11
+ exports.REMOTION_INTERNAL_STACK_PROP = '_remotionInternalStack';
10
12
  const getComponentsToAddStacksTo = () => componentsToAddStacksTo;
11
13
  exports.getComponentsToAddStacksTo = getComponentsToAddStacksTo;
12
14
  const addSequenceStackTraces = (component) => {
@@ -19,6 +21,19 @@ const setSequenceComponent = (component) => {
19
21
  exports.setSequenceComponent = setSequenceComponent;
20
22
  const getSequenceComponent = () => sequenceComponent;
21
23
  exports.getSequenceComponent = getSequenceComponent;
24
+ const setStackForControls = (controls, stack) => {
25
+ if (stack === undefined) {
26
+ stacksByControls.delete(controls);
27
+ return;
28
+ }
29
+ stacksByControls.set(controls, stack);
30
+ };
31
+ exports.setStackForControls = setStackForControls;
32
+ const getStackForControls = (controls) => {
33
+ var _a;
34
+ return (_a = stacksByControls.get(controls)) !== null && _a !== void 0 ? _a : null;
35
+ };
36
+ exports.getStackForControls = getStackForControls;
22
37
  const getSingleChildComponent = (children) => {
23
38
  const mountedChildren = react_1.default.Children.toArray(children);
24
39
  if (mountedChildren.length !== 1) {
@@ -5,7 +5,7 @@ import type { AnyCompMetadata, AnyComposition, AudioOrVideoAsset, JsxComponentId
5
5
  import type { DelayRenderScope } from './delay-render.js';
6
6
  import { type TFolder } from './Folder.js';
7
7
  import type { StaticFile } from './get-static-files.js';
8
- import type { AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, InteractivitySchemaField, InteractivitySchema } from './interactivity-schema.js';
8
+ import type { AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, CaptionsFieldSchema, InteractivitySchemaField, InteractivitySchema } from './interactivity-schema.js';
9
9
  import type { LogLevel } from './log.js';
10
10
  import type { ProResProfile } from './prores-profile.js';
11
11
  import type { PixelFormat, VideoImageFormat } from './render-types.js';
@@ -128,7 +128,7 @@ export { getRemotionEnvironment } from './get-remotion-environment.js';
128
128
  export { getStaticFiles, StaticFile } from './get-static-files.js';
129
129
  export * from './IFrame.js';
130
130
  export { Img, ImgProps } from './Img.js';
131
- export { Interactive, type InteractiveBaseProps, type InteractivePremountProps, type InteractiveProps, type InteractiveTransformProps, } from './Interactive.js';
131
+ export { Interactive, type InteractiveBaseProps, type InteractiveCropProps, type InteractivePremountProps, type InteractiveProps, type InteractiveTransformProps, } from './Interactive.js';
132
132
  export * from './internals.js';
133
133
  export { interpolateColors, type InterpolateColorsOptions, } from './interpolate-colors.js';
134
134
  export { LogLevel } from './log.js';
@@ -183,4 +183,4 @@ export type _InternalTypes = {
183
183
  TRenderAsset: TRenderAsset;
184
184
  ProResProfile: ProResProfile;
185
185
  };
186
- export type { AnyComposition, AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, DelayRenderScope, JsxComponentIdentity, LoopDisplay, SequenceControls, InteractivitySchemaField, InteractivitySchema, UseBufferState, };
186
+ export type { AnyComposition, AssetFieldSchema, ArrayFieldSchema, ArrayItemFieldSchema, CaptionsFieldSchema, DelayRenderScope, JsxComponentIdentity, LoopDisplay, SequenceControls, InteractivitySchemaField, InteractivitySchema, UseBufferState, };