@remotion/promo-pages 4.0.492 → 4.0.493

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.
@@ -5055,6 +5055,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
5055
5055
  if (currentCompositionMetadata) {
5056
5056
  return {
5057
5057
  type: "success",
5058
+ metadataSource: null,
5058
5059
  result: {
5059
5060
  ...currentCompositionMetadata,
5060
5061
  id: composition.id,
@@ -5072,6 +5073,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
5072
5073
  validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
5073
5074
  return {
5074
5075
  type: "success",
5076
+ metadataSource: null,
5075
5077
  result: {
5076
5078
  width: composition.width,
5077
5079
  height: composition.height,
@@ -5590,7 +5592,7 @@ var getSingleChildComponent = (children) => {
5590
5592
  }
5591
5593
  return child.type;
5592
5594
  };
5593
- var VERSION = "4.0.492";
5595
+ var VERSION = "4.0.493";
5594
5596
  var checkMultipleRemotionVersions = () => {
5595
5597
  if (typeof globalThis === "undefined") {
5596
5598
  return;
@@ -14676,7 +14678,46 @@ var validateCalculated = ({
14676
14678
  defaultSampleRate
14677
14679
  };
14678
14680
  };
14679
- var resolveVideoConfig = ({
14681
+ var makeVideoConfigWithMetadata = ({
14682
+ calculated,
14683
+ compositionDurationInFrames,
14684
+ compositionFps,
14685
+ compositionHeight,
14686
+ compositionId,
14687
+ compositionWidth,
14688
+ defaultProps,
14689
+ originalProps
14690
+ }) => {
14691
+ const data = validateCalculated({
14692
+ calculated,
14693
+ compositionDurationInFrames,
14694
+ compositionFps,
14695
+ compositionHeight,
14696
+ compositionWidth,
14697
+ compositionId
14698
+ });
14699
+ return {
14700
+ metadataSource: {
14701
+ durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
14702
+ fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
14703
+ height: calculated?.height === undefined ? "composition" : "calculate-metadata",
14704
+ width: calculated?.width === undefined ? "composition" : "calculate-metadata"
14705
+ },
14706
+ videoConfig: {
14707
+ ...data,
14708
+ id: compositionId,
14709
+ defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14710
+ props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
14711
+ defaultCodec: data.defaultCodec ?? null,
14712
+ defaultOutName: data.defaultOutName ?? null,
14713
+ defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
14714
+ defaultPixelFormat: data.defaultPixelFormat ?? null,
14715
+ defaultProResProfile: data.defaultProResProfile ?? null,
14716
+ defaultSampleRate: data.defaultSampleRate ?? null
14717
+ }
14718
+ };
14719
+ };
14720
+ var resolveVideoConfigWithMetadata = ({
14680
14721
  calculateMetadata,
14681
14722
  signal,
14682
14723
  defaultProps,
@@ -14696,76 +14737,48 @@ var resolveVideoConfig = ({
14696
14737
  }) : null;
14697
14738
  if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
14698
14739
  return calculatedProm.then((c2) => {
14699
- const {
14700
- height,
14701
- width,
14702
- durationInFrames,
14703
- fps,
14704
- defaultCodec,
14705
- defaultOutName,
14706
- defaultVideoImageFormat,
14707
- defaultPixelFormat,
14708
- defaultProResProfile,
14709
- defaultSampleRate
14710
- } = validateCalculated({
14740
+ return makeVideoConfigWithMetadata({
14711
14741
  calculated: c2,
14712
14742
  compositionDurationInFrames,
14713
14743
  compositionFps,
14714
14744
  compositionHeight,
14715
14745
  compositionWidth,
14716
- compositionId
14746
+ compositionId,
14747
+ defaultProps,
14748
+ originalProps
14717
14749
  });
14718
- return {
14719
- width,
14720
- height,
14721
- fps,
14722
- durationInFrames,
14723
- id: compositionId,
14724
- defaultProps: serializeThenDeserializeInStudio(defaultProps),
14725
- props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
14726
- defaultCodec: defaultCodec ?? null,
14727
- defaultOutName: defaultOutName ?? null,
14728
- defaultVideoImageFormat: defaultVideoImageFormat ?? null,
14729
- defaultPixelFormat: defaultPixelFormat ?? null,
14730
- defaultProResProfile: defaultProResProfile ?? null,
14731
- defaultSampleRate: defaultSampleRate ?? null
14732
- };
14733
14750
  });
14734
14751
  }
14735
- const data = validateCalculated({
14752
+ return makeVideoConfigWithMetadata({
14736
14753
  calculated: calculatedProm,
14737
14754
  compositionDurationInFrames,
14738
14755
  compositionFps,
14739
14756
  compositionHeight,
14740
14757
  compositionWidth,
14741
- compositionId
14758
+ compositionId,
14759
+ defaultProps,
14760
+ originalProps
14742
14761
  });
14743
- if (calculatedProm === null) {
14762
+ };
14763
+ var resolveVideoConfig = (params) => {
14764
+ const resolved = resolveVideoConfigWithMetadata(params);
14765
+ if (typeof resolved === "object" && "then" in resolved) {
14766
+ return resolved.then(({ videoConfig }) => videoConfig);
14767
+ }
14768
+ return resolved.videoConfig;
14769
+ };
14770
+ var resolveVideoConfigWithMetadataOrCatch = (params) => {
14771
+ try {
14744
14772
  return {
14745
- ...data,
14746
- id: compositionId,
14747
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14748
- props: serializeThenDeserializeInStudio(originalProps),
14749
- defaultCodec: null,
14750
- defaultOutName: null,
14751
- defaultVideoImageFormat: null,
14752
- defaultPixelFormat: null,
14753
- defaultProResProfile: null,
14754
- defaultSampleRate: null
14773
+ type: "success",
14774
+ result: resolveVideoConfigWithMetadata(params)
14775
+ };
14776
+ } catch (err) {
14777
+ return {
14778
+ type: "error",
14779
+ error: err
14755
14780
  };
14756
14781
  }
14757
- return {
14758
- ...data,
14759
- id: compositionId,
14760
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14761
- props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
14762
- defaultCodec: calculatedProm.defaultCodec ?? null,
14763
- defaultOutName: calculatedProm.defaultOutName ?? null,
14764
- defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
14765
- defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
14766
- defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
14767
- defaultSampleRate: calculatedProm.defaultSampleRate ?? null
14768
- };
14769
14782
  };
14770
14783
  var resolveVideoConfigOrCatch = (params) => {
14771
14784
  try {
@@ -15645,6 +15658,7 @@ var Internals = {
15645
15658
  NonceContext,
15646
15659
  resolveVideoConfig,
15647
15660
  resolveVideoConfigOrCatch,
15661
+ resolveVideoConfigWithMetadataOrCatch,
15648
15662
  ResolveCompositionContext,
15649
15663
  useResolvedVideoConfig,
15650
15664
  resolveCompositionsRef,
@@ -5052,6 +5052,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
5052
5052
  if (currentCompositionMetadata) {
5053
5053
  return {
5054
5054
  type: "success",
5055
+ metadataSource: null,
5055
5056
  result: {
5056
5057
  ...currentCompositionMetadata,
5057
5058
  id: composition.id,
@@ -5069,6 +5070,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
5069
5070
  validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
5070
5071
  return {
5071
5072
  type: "success",
5073
+ metadataSource: null,
5072
5074
  result: {
5073
5075
  width: composition.width,
5074
5076
  height: composition.height,
@@ -5587,7 +5589,7 @@ var getSingleChildComponent = (children) => {
5587
5589
  }
5588
5590
  return child.type;
5589
5591
  };
5590
- var VERSION = "4.0.492";
5592
+ var VERSION = "4.0.493";
5591
5593
  var checkMultipleRemotionVersions = () => {
5592
5594
  if (typeof globalThis === "undefined") {
5593
5595
  return;
@@ -14673,7 +14675,46 @@ var validateCalculated = ({
14673
14675
  defaultSampleRate
14674
14676
  };
14675
14677
  };
14676
- var resolveVideoConfig = ({
14678
+ var makeVideoConfigWithMetadata = ({
14679
+ calculated,
14680
+ compositionDurationInFrames,
14681
+ compositionFps,
14682
+ compositionHeight,
14683
+ compositionId,
14684
+ compositionWidth,
14685
+ defaultProps,
14686
+ originalProps
14687
+ }) => {
14688
+ const data = validateCalculated({
14689
+ calculated,
14690
+ compositionDurationInFrames,
14691
+ compositionFps,
14692
+ compositionHeight,
14693
+ compositionWidth,
14694
+ compositionId
14695
+ });
14696
+ return {
14697
+ metadataSource: {
14698
+ durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
14699
+ fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
14700
+ height: calculated?.height === undefined ? "composition" : "calculate-metadata",
14701
+ width: calculated?.width === undefined ? "composition" : "calculate-metadata"
14702
+ },
14703
+ videoConfig: {
14704
+ ...data,
14705
+ id: compositionId,
14706
+ defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14707
+ props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
14708
+ defaultCodec: data.defaultCodec ?? null,
14709
+ defaultOutName: data.defaultOutName ?? null,
14710
+ defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
14711
+ defaultPixelFormat: data.defaultPixelFormat ?? null,
14712
+ defaultProResProfile: data.defaultProResProfile ?? null,
14713
+ defaultSampleRate: data.defaultSampleRate ?? null
14714
+ }
14715
+ };
14716
+ };
14717
+ var resolveVideoConfigWithMetadata = ({
14677
14718
  calculateMetadata,
14678
14719
  signal,
14679
14720
  defaultProps,
@@ -14693,76 +14734,48 @@ var resolveVideoConfig = ({
14693
14734
  }) : null;
14694
14735
  if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
14695
14736
  return calculatedProm.then((c2) => {
14696
- const {
14697
- height,
14698
- width,
14699
- durationInFrames,
14700
- fps,
14701
- defaultCodec,
14702
- defaultOutName,
14703
- defaultVideoImageFormat,
14704
- defaultPixelFormat,
14705
- defaultProResProfile,
14706
- defaultSampleRate
14707
- } = validateCalculated({
14737
+ return makeVideoConfigWithMetadata({
14708
14738
  calculated: c2,
14709
14739
  compositionDurationInFrames,
14710
14740
  compositionFps,
14711
14741
  compositionHeight,
14712
14742
  compositionWidth,
14713
- compositionId
14743
+ compositionId,
14744
+ defaultProps,
14745
+ originalProps
14714
14746
  });
14715
- return {
14716
- width,
14717
- height,
14718
- fps,
14719
- durationInFrames,
14720
- id: compositionId,
14721
- defaultProps: serializeThenDeserializeInStudio(defaultProps),
14722
- props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
14723
- defaultCodec: defaultCodec ?? null,
14724
- defaultOutName: defaultOutName ?? null,
14725
- defaultVideoImageFormat: defaultVideoImageFormat ?? null,
14726
- defaultPixelFormat: defaultPixelFormat ?? null,
14727
- defaultProResProfile: defaultProResProfile ?? null,
14728
- defaultSampleRate: defaultSampleRate ?? null
14729
- };
14730
14747
  });
14731
14748
  }
14732
- const data = validateCalculated({
14749
+ return makeVideoConfigWithMetadata({
14733
14750
  calculated: calculatedProm,
14734
14751
  compositionDurationInFrames,
14735
14752
  compositionFps,
14736
14753
  compositionHeight,
14737
14754
  compositionWidth,
14738
- compositionId
14755
+ compositionId,
14756
+ defaultProps,
14757
+ originalProps
14739
14758
  });
14740
- if (calculatedProm === null) {
14759
+ };
14760
+ var resolveVideoConfig = (params) => {
14761
+ const resolved = resolveVideoConfigWithMetadata(params);
14762
+ if (typeof resolved === "object" && "then" in resolved) {
14763
+ return resolved.then(({ videoConfig }) => videoConfig);
14764
+ }
14765
+ return resolved.videoConfig;
14766
+ };
14767
+ var resolveVideoConfigWithMetadataOrCatch = (params) => {
14768
+ try {
14741
14769
  return {
14742
- ...data,
14743
- id: compositionId,
14744
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14745
- props: serializeThenDeserializeInStudio(originalProps),
14746
- defaultCodec: null,
14747
- defaultOutName: null,
14748
- defaultVideoImageFormat: null,
14749
- defaultPixelFormat: null,
14750
- defaultProResProfile: null,
14751
- defaultSampleRate: null
14770
+ type: "success",
14771
+ result: resolveVideoConfigWithMetadata(params)
14772
+ };
14773
+ } catch (err) {
14774
+ return {
14775
+ type: "error",
14776
+ error: err
14752
14777
  };
14753
14778
  }
14754
- return {
14755
- ...data,
14756
- id: compositionId,
14757
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
14758
- props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
14759
- defaultCodec: calculatedProm.defaultCodec ?? null,
14760
- defaultOutName: calculatedProm.defaultOutName ?? null,
14761
- defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
14762
- defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
14763
- defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
14764
- defaultSampleRate: calculatedProm.defaultSampleRate ?? null
14765
- };
14766
14779
  };
14767
14780
  var resolveVideoConfigOrCatch = (params) => {
14768
14781
  try {
@@ -15642,6 +15655,7 @@ var Internals = {
15642
15655
  NonceContext,
15643
15656
  resolveVideoConfig,
15644
15657
  resolveVideoConfigOrCatch,
15658
+ resolveVideoConfigWithMetadataOrCatch,
15645
15659
  ResolveCompositionContext,
15646
15660
  useResolvedVideoConfig,
15647
15661
  resolveCompositionsRef,
@@ -22386,6 +22386,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
22386
22386
  if (currentCompositionMetadata) {
22387
22387
  return {
22388
22388
  type: "success",
22389
+ metadataSource: null,
22389
22390
  result: {
22390
22391
  ...currentCompositionMetadata,
22391
22392
  id: composition.id,
@@ -22403,6 +22404,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
22403
22404
  validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
22404
22405
  return {
22405
22406
  type: "success",
22407
+ metadataSource: null,
22406
22408
  result: {
22407
22409
  width: composition.width,
22408
22410
  height: composition.height,
@@ -22921,7 +22923,7 @@ var getSingleChildComponent = (children) => {
22921
22923
  }
22922
22924
  return child.type;
22923
22925
  };
22924
- var VERSION = "4.0.492";
22926
+ var VERSION = "4.0.493";
22925
22927
  var checkMultipleRemotionVersions = () => {
22926
22928
  if (typeof globalThis === "undefined") {
22927
22929
  return;
@@ -32007,7 +32009,46 @@ var validateCalculated = ({
32007
32009
  defaultSampleRate
32008
32010
  };
32009
32011
  };
32010
- var resolveVideoConfig = ({
32012
+ var makeVideoConfigWithMetadata = ({
32013
+ calculated,
32014
+ compositionDurationInFrames,
32015
+ compositionFps,
32016
+ compositionHeight,
32017
+ compositionId,
32018
+ compositionWidth,
32019
+ defaultProps,
32020
+ originalProps
32021
+ }) => {
32022
+ const data = validateCalculated({
32023
+ calculated,
32024
+ compositionDurationInFrames,
32025
+ compositionFps,
32026
+ compositionHeight,
32027
+ compositionWidth,
32028
+ compositionId
32029
+ });
32030
+ return {
32031
+ metadataSource: {
32032
+ durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
32033
+ fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
32034
+ height: calculated?.height === undefined ? "composition" : "calculate-metadata",
32035
+ width: calculated?.width === undefined ? "composition" : "calculate-metadata"
32036
+ },
32037
+ videoConfig: {
32038
+ ...data,
32039
+ id: compositionId,
32040
+ defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
32041
+ props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
32042
+ defaultCodec: data.defaultCodec ?? null,
32043
+ defaultOutName: data.defaultOutName ?? null,
32044
+ defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
32045
+ defaultPixelFormat: data.defaultPixelFormat ?? null,
32046
+ defaultProResProfile: data.defaultProResProfile ?? null,
32047
+ defaultSampleRate: data.defaultSampleRate ?? null
32048
+ }
32049
+ };
32050
+ };
32051
+ var resolveVideoConfigWithMetadata = ({
32011
32052
  calculateMetadata,
32012
32053
  signal,
32013
32054
  defaultProps,
@@ -32027,76 +32068,48 @@ var resolveVideoConfig = ({
32027
32068
  }) : null;
32028
32069
  if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
32029
32070
  return calculatedProm.then((c2) => {
32030
- const {
32031
- height,
32032
- width,
32033
- durationInFrames,
32034
- fps,
32035
- defaultCodec,
32036
- defaultOutName,
32037
- defaultVideoImageFormat,
32038
- defaultPixelFormat,
32039
- defaultProResProfile,
32040
- defaultSampleRate
32041
- } = validateCalculated({
32071
+ return makeVideoConfigWithMetadata({
32042
32072
  calculated: c2,
32043
32073
  compositionDurationInFrames,
32044
32074
  compositionFps,
32045
32075
  compositionHeight,
32046
32076
  compositionWidth,
32047
- compositionId
32077
+ compositionId,
32078
+ defaultProps,
32079
+ originalProps
32048
32080
  });
32049
- return {
32050
- width,
32051
- height,
32052
- fps,
32053
- durationInFrames,
32054
- id: compositionId,
32055
- defaultProps: serializeThenDeserializeInStudio(defaultProps),
32056
- props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
32057
- defaultCodec: defaultCodec ?? null,
32058
- defaultOutName: defaultOutName ?? null,
32059
- defaultVideoImageFormat: defaultVideoImageFormat ?? null,
32060
- defaultPixelFormat: defaultPixelFormat ?? null,
32061
- defaultProResProfile: defaultProResProfile ?? null,
32062
- defaultSampleRate: defaultSampleRate ?? null
32063
- };
32064
32081
  });
32065
32082
  }
32066
- const data = validateCalculated({
32083
+ return makeVideoConfigWithMetadata({
32067
32084
  calculated: calculatedProm,
32068
32085
  compositionDurationInFrames,
32069
32086
  compositionFps,
32070
32087
  compositionHeight,
32071
32088
  compositionWidth,
32072
- compositionId
32089
+ compositionId,
32090
+ defaultProps,
32091
+ originalProps
32073
32092
  });
32074
- if (calculatedProm === null) {
32093
+ };
32094
+ var resolveVideoConfig = (params) => {
32095
+ const resolved = resolveVideoConfigWithMetadata(params);
32096
+ if (typeof resolved === "object" && "then" in resolved) {
32097
+ return resolved.then(({ videoConfig }) => videoConfig);
32098
+ }
32099
+ return resolved.videoConfig;
32100
+ };
32101
+ var resolveVideoConfigWithMetadataOrCatch = (params) => {
32102
+ try {
32075
32103
  return {
32076
- ...data,
32077
- id: compositionId,
32078
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
32079
- props: serializeThenDeserializeInStudio(originalProps),
32080
- defaultCodec: null,
32081
- defaultOutName: null,
32082
- defaultVideoImageFormat: null,
32083
- defaultPixelFormat: null,
32084
- defaultProResProfile: null,
32085
- defaultSampleRate: null
32104
+ type: "success",
32105
+ result: resolveVideoConfigWithMetadata(params)
32106
+ };
32107
+ } catch (err) {
32108
+ return {
32109
+ type: "error",
32110
+ error: err
32086
32111
  };
32087
32112
  }
32088
- return {
32089
- ...data,
32090
- id: compositionId,
32091
- defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
32092
- props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
32093
- defaultCodec: calculatedProm.defaultCodec ?? null,
32094
- defaultOutName: calculatedProm.defaultOutName ?? null,
32095
- defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
32096
- defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
32097
- defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
32098
- defaultSampleRate: calculatedProm.defaultSampleRate ?? null
32099
- };
32100
32113
  };
32101
32114
  var resolveVideoConfigOrCatch = (params) => {
32102
32115
  try {
@@ -32976,6 +32989,7 @@ var Internals = {
32976
32989
  NonceContext,
32977
32990
  resolveVideoConfig,
32978
32991
  resolveVideoConfigOrCatch,
32992
+ resolveVideoConfigWithMetadataOrCatch,
32979
32993
  ResolveCompositionContext,
32980
32994
  useResolvedVideoConfig,
32981
32995
  resolveCompositionsRef,