remotion 4.0.0-alpha12 → 4.0.0-alpha13

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.
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
7
7
  const input_props_js_1 = require("./config/input-props.js");
8
8
  const EditorProps_js_1 = require("./EditorProps.js");
9
+ const get_environment_js_1 = require("./get-environment.js");
9
10
  const resolve_video_config_js_1 = require("./resolve-video-config.js");
10
11
  exports.ResolveCompositionContext = (0, react_1.createContext)(null);
11
12
  exports.resolveCompositionsRef = (0, react_1.createRef)();
@@ -160,7 +161,11 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
160
161
  defaultProps: {
161
162
  ...((_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {}),
162
163
  ...(selectedEditorProps !== null && selectedEditorProps !== void 0 ? selectedEditorProps : {}),
163
- ...(typeof window === 'undefined' ? {} : (_b = (0, input_props_js_1.getInputProps)()) !== null && _b !== void 0 ? _b : {}),
164
+ ...(typeof window === 'undefined' ||
165
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-development' ||
166
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-production'
167
+ ? {}
168
+ : (_b = (0, input_props_js_1.getInputProps)()) !== null && _b !== void 0 ? _b : {}),
164
169
  },
165
170
  },
166
171
  };
@@ -125,5 +125,6 @@ export declare const Internals: {
125
125
  children: import("react").ReactNode;
126
126
  }>>;
127
127
  REMOTION_STUDIO_CONTAINER_ELEMENT: string;
128
+ AssetManager: import("react").Context<import("./AssetManager.js").AssetManagerContext>;
128
129
  };
129
130
  export type { TComposition, Timeline, TCompMetadata, TSequence, TAsset, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, RemotionEnvironment, };
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Internals = void 0;
27
+ const AssetManager_js_1 = require("./AssetManager.js");
27
28
  const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
28
29
  const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
29
30
  const CompositionManager_js_1 = require("./CompositionManager.js");
@@ -114,4 +115,5 @@ exports.Internals = {
114
115
  resolveCompositionsRef: ResolveCompositionConfig_js_1.resolveCompositionsRef,
115
116
  ResolveCompositionConfig: ResolveCompositionConfig_js_1.ResolveCompositionConfig,
116
117
  REMOTION_STUDIO_CONTAINER_ELEMENT: get_preview_dom_element_js_1.REMOTION_STUDIO_CONTAINER_ELEMENT,
118
+ AssetManager: AssetManager_js_1.AssetManager,
117
119
  };
@@ -2,17 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveVideoConfig = void 0;
4
4
  const input_props_js_1 = require("./config/input-props.js");
5
+ const get_environment_js_1 = require("./get-environment.js");
5
6
  const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
6
7
  const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
7
8
  const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined, signal, }) => {
8
- var _a, _b, _c;
9
+ var _a, _b, _c, _d;
9
10
  const calculatedProm = composition.calculateMetadata
10
11
  ? composition.calculateMetadata({
11
12
  defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
12
13
  props: {
13
14
  ...((_b = composition.defaultProps) !== null && _b !== void 0 ? _b : {}),
14
15
  ...(editorPropsOrUndefined !== null && editorPropsOrUndefined !== void 0 ? editorPropsOrUndefined : {}),
15
- ...(typeof window === 'undefined' ? {} : (_c = (0, input_props_js_1.getInputProps)()) !== null && _c !== void 0 ? _c : {}),
16
+ ...(typeof window === 'undefined' ||
17
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-development' ||
18
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-production'
19
+ ? {}
20
+ : (_c = (0, input_props_js_1.getInputProps)()) !== null && _c !== void 0 ? _c : {}),
16
21
  },
17
22
  abortSignal: signal,
18
23
  })
@@ -31,7 +36,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
31
36
  fps,
32
37
  durationInFrames,
33
38
  id: composition.id,
34
- defaultProps: composition.defaultProps,
39
+ defaultProps: c.props,
35
40
  };
36
41
  });
37
42
  }
@@ -42,7 +47,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
42
47
  return {
43
48
  ...data,
44
49
  id: composition.id,
45
- defaultProps: composition.defaultProps,
50
+ defaultProps: ((_d = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _d !== void 0 ? _d : {}),
46
51
  };
47
52
  };
48
53
  exports.resolveVideoConfig = resolveVideoConfig;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.0-alpha12";
1
+ export declare const VERSION = "4.0.0-alpha13";
@@ -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-alpha12';
5
+ exports.VERSION = '4.0.0-alpha13';
@@ -58,7 +58,7 @@ function truthy(value) {
58
58
  }
59
59
 
60
60
  // Automatically generated on publish
61
- const VERSION = '4.0.0-alpha12';
61
+ const VERSION = '4.0.0-alpha13';
62
62
 
63
63
  const checkMultipleRemotionVersions = () => {
64
64
  if (typeof globalThis === 'undefined') {
@@ -378,14 +378,18 @@ const validateDurationInFrames = ({ allowFloats, component, durationInFrames, })
378
378
  };
379
379
 
380
380
  const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined, signal, }) => {
381
- var _a, _b, _c;
381
+ var _a, _b, _c, _d;
382
382
  const calculatedProm = composition.calculateMetadata
383
383
  ? composition.calculateMetadata({
384
384
  defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
385
385
  props: {
386
386
  ...((_b = composition.defaultProps) !== null && _b !== void 0 ? _b : {}),
387
387
  ...(editorPropsOrUndefined !== null && editorPropsOrUndefined !== void 0 ? editorPropsOrUndefined : {}),
388
- ...(typeof window === 'undefined' ? {} : (_c = getInputProps()) !== null && _c !== void 0 ? _c : {}),
388
+ ...(typeof window === 'undefined' ||
389
+ getRemotionEnvironment() === 'player-development' ||
390
+ getRemotionEnvironment() === 'player-production'
391
+ ? {}
392
+ : (_c = getInputProps()) !== null && _c !== void 0 ? _c : {}),
389
393
  },
390
394
  abortSignal: signal,
391
395
  })
@@ -404,7 +408,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
404
408
  fps,
405
409
  durationInFrames,
406
410
  id: composition.id,
407
- defaultProps: composition.defaultProps,
411
+ defaultProps: c.props,
408
412
  };
409
413
  });
410
414
  }
@@ -415,7 +419,7 @@ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined,
415
419
  return {
416
420
  ...data,
417
421
  id: composition.id,
418
- defaultProps: composition.defaultProps,
422
+ defaultProps: ((_d = calculatedProm === null || calculatedProm === void 0 ? void 0 : calculatedProm.props) !== null && _d !== void 0 ? _d : {}),
419
423
  };
420
424
  };
421
425
  const validateCalculated = ({ composition, calculated, }) => {
@@ -598,7 +602,11 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
598
602
  defaultProps: {
599
603
  ...((_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {}),
600
604
  ...(selectedEditorProps !== null && selectedEditorProps !== void 0 ? selectedEditorProps : {}),
601
- ...(typeof window === 'undefined' ? {} : (_b = getInputProps()) !== null && _b !== void 0 ? _b : {}),
605
+ ...(typeof window === 'undefined' ||
606
+ getRemotionEnvironment() === 'player-development' ||
607
+ getRemotionEnvironment() === 'player-production'
608
+ ? {}
609
+ : (_b = getInputProps()) !== null && _b !== void 0 ? _b : {}),
602
610
  },
603
611
  },
604
612
  };
@@ -3632,6 +3640,7 @@ const Internals = {
3632
3640
  resolveCompositionsRef,
3633
3641
  ResolveCompositionConfig,
3634
3642
  REMOTION_STUDIO_CONTAINER_ELEMENT,
3643
+ AssetManager,
3635
3644
  };
3636
3645
 
3637
3646
  const flattenChildren = (children) => {
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.0-alpha12';
2
+ const VERSION = '4.0.0-alpha13';
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-alpha12",
3
+ "version": "4.0.0-alpha13",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",