remotion 4.0.0-alpha16 → 4.0.0-alpha18

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.
@@ -10,14 +10,14 @@ export type CompProps<Props> = {
10
10
  } | {
11
11
  component: LooseComponentType<Props>;
12
12
  };
13
- export type CalcMetadataReturnType<T> = {
13
+ export type CalcMetadataReturnType<T extends Record<string, unknown> | undefined> = {
14
14
  durationInFrames?: number;
15
15
  fps?: number;
16
16
  width?: number;
17
17
  height?: number;
18
18
  props?: T;
19
19
  };
20
- export type CalculateMetadataFunction<T> = (options: {
20
+ export type CalculateMetadataFunction<T extends Record<string, unknown> | undefined> = (options: {
21
21
  defaultProps: T;
22
22
  props: T;
23
23
  abortSignal: AbortSignal;
@@ -5,6 +5,6 @@ export type PropsIfHasProps<Schema extends AnyZodObject, Props extends Record<st
5
5
  } : {
6
6
  defaultProps: InferProps<Schema, Props>;
7
7
  };
8
- export type InferProps<Schema extends AnyZodObject, Props> = AnyZodObject extends Schema ? {} extends Props ? unknown : Props : {} extends Props ? z.infer<Schema> : // Props and schema specified
8
+ export type InferProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = AnyZodObject extends Schema ? {} extends Props ? Record<string, unknown> : Props : {} extends Props ? z.infer<Schema> : // Props and schema specified
9
9
  z.infer<Schema> & Props;
10
10
  export {};
@@ -6,7 +6,7 @@ const get_environment_js_1 = require("./get-environment.js");
6
6
  const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
7
7
  const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
8
8
  const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined, signal, }) => {
9
- var _a, _b, _c, _d, _e;
9
+ var _a, _b, _c, _d, _e, _f;
10
10
  const calculatedProm = composition.calculateMetadata
11
11
  ? composition.calculateMetadata({
12
12
  defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
@@ -26,6 +26,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
26
26
  typeof calculatedProm === 'object' &&
27
27
  'then' in calculatedProm) {
28
28
  return calculatedProm.then((c) => {
29
+ var _a, _b;
29
30
  const { height, width, durationInFrames, fps } = validateCalculated({
30
31
  calculated: c,
31
32
  composition,
@@ -36,7 +37,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
36
37
  fps,
37
38
  durationInFrames,
38
39
  id: composition.id,
39
- defaultProps: c.props,
40
+ defaultProps: (_b = (_a = c.props) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {},
40
41
  };
41
42
  });
42
43
  }
@@ -54,7 +55,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
54
55
  return {
55
56
  ...data,
56
57
  id: composition.id,
57
- defaultProps: ((_e = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _e !== void 0 ? _e : {}),
58
+ defaultProps: (_f = (_e = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _e !== void 0 ? _e : composition.defaultProps) !== null && _f !== void 0 ? _f : {},
58
59
  };
59
60
  };
60
61
  exports.resolveVideoConfig = resolveVideoConfig;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.0-alpha16";
1
+ export declare const VERSION = "4.0.0-alpha18";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.0-alpha16';
5
+ exports.VERSION = '4.0.0-alpha18';
@@ -58,7 +58,7 @@ function truthy(value) {
58
58
  }
59
59
 
60
60
  // Automatically generated on publish
61
- const VERSION = '4.0.0-alpha16';
61
+ const VERSION = '4.0.0-alpha18';
62
62
 
63
63
  const checkMultipleRemotionVersions = () => {
64
64
  if (typeof globalThis === 'undefined') {
@@ -378,7 +378,7 @@ const validateDurationInFrames = ({ allowFloats, component, durationInFrames, })
378
378
  };
379
379
 
380
380
  const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined, signal, }) => {
381
- var _a, _b, _c, _d, _e;
381
+ var _a, _b, _c, _d, _e, _f;
382
382
  const calculatedProm = composition.calculateMetadata
383
383
  ? composition.calculateMetadata({
384
384
  defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
@@ -398,6 +398,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
398
398
  typeof calculatedProm === 'object' &&
399
399
  'then' in calculatedProm) {
400
400
  return calculatedProm.then((c) => {
401
+ var _a, _b;
401
402
  const { height, width, durationInFrames, fps } = validateCalculated({
402
403
  calculated: c,
403
404
  composition,
@@ -408,7 +409,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
408
409
  fps,
409
410
  durationInFrames,
410
411
  id: composition.id,
411
- defaultProps: c.props,
412
+ defaultProps: (_b = (_a = c.props) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {},
412
413
  };
413
414
  });
414
415
  }
@@ -426,7 +427,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
426
427
  return {
427
428
  ...data,
428
429
  id: composition.id,
429
- defaultProps: ((_e = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _e !== void 0 ? _e : {}),
430
+ defaultProps: (_f = (_e = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _e !== void 0 ? _e : composition.defaultProps) !== null && _f !== void 0 ? _f : {},
430
431
  };
431
432
  };
432
433
  const validateCalculated = ({ composition, calculated, }) => {
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.0-alpha16';
2
+ const VERSION = '4.0.0-alpha18';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.0-alpha16",
3
+ "version": "4.0.0-alpha18",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",