@remotion/promo-pages 4.0.438 → 4.0.439
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/Homepage.js +237 -92
- package/dist/design.js +23 -77
- package/dist/experts.js +23 -77
- package/dist/homepage/Pricing.js +23 -77
- package/dist/prompts/PromptsGallery.js +23 -77
- package/dist/prompts/PromptsShow.js +23 -77
- package/dist/prompts/PromptsSubmit.js +23 -77
- package/dist/tailwind.css +22 -0
- package/dist/team.js +20167 -31
- package/dist/template-modal-content.js +25 -79
- package/dist/templates.js +23 -77
- package/package.json +13 -13
package/dist/design.js
CHANGED
|
@@ -5744,12 +5744,7 @@ import { jsx as jsx32 } from "react/jsx-runtime";
|
|
|
5744
5744
|
import { useContext as useContext6, useMemo as useMemo5 } from "react";
|
|
5745
5745
|
import { createContext as createContext7 } from "react";
|
|
5746
5746
|
import { createContext as createContext9, createRef, useContext as useContext5, useMemo as useMemo4 } from "react";
|
|
5747
|
-
import React5, {
|
|
5748
|
-
createContext as createContext8,
|
|
5749
|
-
useCallback as useCallback2,
|
|
5750
|
-
useImperativeHandle,
|
|
5751
|
-
useMemo as useMemo3
|
|
5752
|
-
} from "react";
|
|
5747
|
+
import React5, { createContext as createContext8, useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
5753
5748
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5754
5749
|
import { useContext as useContext8 } from "react";
|
|
5755
5750
|
import { createContext as createContext10 } from "react";
|
|
@@ -5765,19 +5760,19 @@ import { jsx as jsx82 } from "react/jsx-runtime";
|
|
|
5765
5760
|
import {
|
|
5766
5761
|
forwardRef as forwardRef3,
|
|
5767
5762
|
useEffect as useEffect2,
|
|
5768
|
-
useImperativeHandle as
|
|
5763
|
+
useImperativeHandle as useImperativeHandle2,
|
|
5769
5764
|
useLayoutEffect as useLayoutEffect2,
|
|
5770
5765
|
useRef as useRef5,
|
|
5771
5766
|
useState as useState5
|
|
5772
5767
|
} from "react";
|
|
5773
|
-
import React10, { useCallback as useCallback5, useImperativeHandle
|
|
5768
|
+
import React10, { useCallback as useCallback5, useImperativeHandle, useRef as useRef4 } from "react";
|
|
5774
5769
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5775
5770
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5776
5771
|
import { useContext as useContext14, useLayoutEffect as useLayoutEffect4, useState as useState7 } from "react";
|
|
5777
5772
|
import {
|
|
5778
5773
|
createContext as createContext13,
|
|
5779
5774
|
useCallback as useCallback6,
|
|
5780
|
-
useImperativeHandle as
|
|
5775
|
+
useImperativeHandle as useImperativeHandle3,
|
|
5781
5776
|
useLayoutEffect as useLayoutEffect3,
|
|
5782
5777
|
useMemo as useMemo12,
|
|
5783
5778
|
useRef as useRef6,
|
|
@@ -5796,7 +5791,7 @@ import React17, {
|
|
|
5796
5791
|
forwardRef as forwardRef4,
|
|
5797
5792
|
useContext as useContext24,
|
|
5798
5793
|
useEffect as useEffect10,
|
|
5799
|
-
useImperativeHandle as
|
|
5794
|
+
useImperativeHandle as useImperativeHandle4,
|
|
5800
5795
|
useMemo as useMemo222,
|
|
5801
5796
|
useRef as useRef14,
|
|
5802
5797
|
useState as useState13
|
|
@@ -5845,7 +5840,7 @@ import {
|
|
|
5845
5840
|
forwardRef as forwardRef5,
|
|
5846
5841
|
useContext as useContext25,
|
|
5847
5842
|
useEffect as useEffect11,
|
|
5848
|
-
useImperativeHandle as
|
|
5843
|
+
useImperativeHandle as useImperativeHandle5,
|
|
5849
5844
|
useLayoutEffect as useLayoutEffect8,
|
|
5850
5845
|
useMemo as useMemo23,
|
|
5851
5846
|
useRef as useRef15
|
|
@@ -5865,7 +5860,7 @@ import {
|
|
|
5865
5860
|
forwardRef as forwardRef8,
|
|
5866
5861
|
useCallback as useCallback13,
|
|
5867
5862
|
useContext as useContext29,
|
|
5868
|
-
useImperativeHandle as
|
|
5863
|
+
useImperativeHandle as useImperativeHandle6,
|
|
5869
5864
|
useLayoutEffect as useLayoutEffect9,
|
|
5870
5865
|
useRef as useRef17
|
|
5871
5866
|
} from "react";
|
|
@@ -5874,7 +5869,7 @@ import { createRef as createRef3 } from "react";
|
|
|
5874
5869
|
import React24 from "react";
|
|
5875
5870
|
import {
|
|
5876
5871
|
useCallback as useCallback14,
|
|
5877
|
-
useImperativeHandle as
|
|
5872
|
+
useImperativeHandle as useImperativeHandle7,
|
|
5878
5873
|
useMemo as useMemo26,
|
|
5879
5874
|
useRef as useRef18,
|
|
5880
5875
|
useState as useState15
|
|
@@ -5903,7 +5898,7 @@ import React30, {
|
|
|
5903
5898
|
forwardRef as forwardRef9,
|
|
5904
5899
|
useContext as useContext34,
|
|
5905
5900
|
useEffect as useEffect16,
|
|
5906
|
-
useImperativeHandle as
|
|
5901
|
+
useImperativeHandle as useImperativeHandle8,
|
|
5907
5902
|
useMemo as useMemo31,
|
|
5908
5903
|
useRef as useRef19,
|
|
5909
5904
|
useState as useState18
|
|
@@ -5925,7 +5920,7 @@ import {
|
|
|
5925
5920
|
forwardRef as forwardRef12,
|
|
5926
5921
|
useContext as useContext35,
|
|
5927
5922
|
useEffect as useEffect17,
|
|
5928
|
-
useImperativeHandle as
|
|
5923
|
+
useImperativeHandle as useImperativeHandle9,
|
|
5929
5924
|
useLayoutEffect as useLayoutEffect11,
|
|
5930
5925
|
useMemo as useMemo35,
|
|
5931
5926
|
useRef as useRef20
|
|
@@ -5977,7 +5972,7 @@ var useIsPlayer = () => {
|
|
|
5977
5972
|
function truthy2(value) {
|
|
5978
5973
|
return Boolean(value);
|
|
5979
5974
|
}
|
|
5980
|
-
var VERSION = "4.0.
|
|
5975
|
+
var VERSION = "4.0.439";
|
|
5981
5976
|
var checkMultipleRemotionVersions = () => {
|
|
5982
5977
|
if (typeof globalThis === "undefined") {
|
|
5983
5978
|
return;
|
|
@@ -6498,9 +6493,6 @@ var CompositionSetters = createContext7({
|
|
|
6498
6493
|
setCanvasContent: () => {
|
|
6499
6494
|
return;
|
|
6500
6495
|
},
|
|
6501
|
-
updateCompositionDefaultProps: () => {
|
|
6502
|
-
return;
|
|
6503
|
-
},
|
|
6504
6496
|
onlyRenderComposition: null
|
|
6505
6497
|
});
|
|
6506
6498
|
var getKey = () => {
|
|
@@ -6620,12 +6612,8 @@ var EditorPropsContext = createContext8({
|
|
|
6620
6612
|
props: {},
|
|
6621
6613
|
updateProps: () => {
|
|
6622
6614
|
throw new Error("Not implemented");
|
|
6623
|
-
},
|
|
6624
|
-
resetUnsaved: () => {
|
|
6625
|
-
throw new Error("Not implemented");
|
|
6626
6615
|
}
|
|
6627
6616
|
});
|
|
6628
|
-
var editorPropsProviderRef = React5.createRef();
|
|
6629
6617
|
var timeValueRef = React5.createRef();
|
|
6630
6618
|
var EditorPropsProvider = ({ children }) => {
|
|
6631
6619
|
const [props, setProps] = React5.useState({});
|
|
@@ -6641,25 +6629,9 @@ var EditorPropsProvider = ({ children }) => {
|
|
|
6641
6629
|
};
|
|
6642
6630
|
});
|
|
6643
6631
|
}, []);
|
|
6644
|
-
const resetUnsaved = useCallback2((compositionId) => {
|
|
6645
|
-
setProps((prev) => {
|
|
6646
|
-
if (prev[compositionId]) {
|
|
6647
|
-
const newProps = { ...prev };
|
|
6648
|
-
delete newProps[compositionId];
|
|
6649
|
-
return newProps;
|
|
6650
|
-
}
|
|
6651
|
-
return prev;
|
|
6652
|
-
});
|
|
6653
|
-
}, []);
|
|
6654
|
-
useImperativeHandle(editorPropsProviderRef, () => {
|
|
6655
|
-
return {
|
|
6656
|
-
getProps: () => props,
|
|
6657
|
-
setProps
|
|
6658
|
-
};
|
|
6659
|
-
}, [props]);
|
|
6660
6632
|
const ctx = useMemo3(() => {
|
|
6661
|
-
return { props, updateProps
|
|
6662
|
-
}, [props,
|
|
6633
|
+
return { props, updateProps };
|
|
6634
|
+
}, [props, updateProps]);
|
|
6663
6635
|
return /* @__PURE__ */ jsx42(EditorPropsContext.Provider, {
|
|
6664
6636
|
value: ctx,
|
|
6665
6637
|
children
|
|
@@ -6722,7 +6694,6 @@ var resolveCompositionsRef = createRef();
|
|
|
6722
6694
|
var needsResolution = (composition) => {
|
|
6723
6695
|
return Boolean(composition.calculateMetadata);
|
|
6724
6696
|
};
|
|
6725
|
-
var PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally";
|
|
6726
6697
|
var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
6727
6698
|
const context = useContext5(ResolveCompositionContext);
|
|
6728
6699
|
const { props: allEditorProps } = useContext5(EditorPropsContext);
|
|
@@ -7493,7 +7464,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
|
|
|
7493
7464
|
height: canvasHeight
|
|
7494
7465
|
}));
|
|
7495
7466
|
}, [fit, height, width]);
|
|
7496
|
-
|
|
7467
|
+
useImperativeHandle(ref, () => {
|
|
7497
7468
|
return {
|
|
7498
7469
|
draw,
|
|
7499
7470
|
getCanvas: () => {
|
|
@@ -7692,7 +7663,7 @@ var AnimatedImage = forwardRef3(({
|
|
|
7692
7663
|
const currentTimeRef = useRef5(currentTime);
|
|
7693
7664
|
currentTimeRef.current = currentTime;
|
|
7694
7665
|
const ref = useRef5(null);
|
|
7695
|
-
|
|
7666
|
+
useImperativeHandle2(canvasRef, () => {
|
|
7696
7667
|
const c = ref.current?.getCanvas();
|
|
7697
7668
|
if (!c) {
|
|
7698
7669
|
throw new Error("Canvas ref is not set");
|
|
@@ -7818,7 +7789,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
7818
7789
|
setRenderAssets(renderAssetsRef.current);
|
|
7819
7790
|
}, []);
|
|
7820
7791
|
if (collectAssets) {
|
|
7821
|
-
|
|
7792
|
+
useImperativeHandle3(collectAssets, () => {
|
|
7822
7793
|
return {
|
|
7823
7794
|
collectAssets: () => {
|
|
7824
7795
|
const assets = renderAssetsRef.current;
|
|
@@ -10249,7 +10220,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
10249
10220
|
});
|
|
10250
10221
|
};
|
|
10251
10222
|
}, [cleanupOnMediaTagUnmount]);
|
|
10252
|
-
|
|
10223
|
+
useImperativeHandle4(ref, () => {
|
|
10253
10224
|
return audioRef.current;
|
|
10254
10225
|
}, [audioRef]);
|
|
10255
10226
|
const currentOnDurationCallback = useRef14(onDuration);
|
|
@@ -10320,7 +10291,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
10320
10291
|
mediaVolume: 1
|
|
10321
10292
|
});
|
|
10322
10293
|
warnAboutTooHighVolume(volume);
|
|
10323
|
-
|
|
10294
|
+
useImperativeHandle5(ref, () => {
|
|
10324
10295
|
return audioRef.current;
|
|
10325
10296
|
}, []);
|
|
10326
10297
|
useEffect11(() => {
|
|
@@ -10749,13 +10720,6 @@ var InnerComposition = ({
|
|
|
10749
10720
|
registerComposition,
|
|
10750
10721
|
unregisterComposition
|
|
10751
10722
|
]);
|
|
10752
|
-
useEffect13(() => {
|
|
10753
|
-
window.dispatchEvent(new CustomEvent(PROPS_UPDATED_EXTERNALLY, {
|
|
10754
|
-
detail: {
|
|
10755
|
-
resetUnsaved: id
|
|
10756
|
-
}
|
|
10757
|
-
}));
|
|
10758
|
-
}, [defaultProps, id]);
|
|
10759
10723
|
const resolved = useResolvedVideoConfig(id);
|
|
10760
10724
|
if (environment.isStudio && video && video.component === lazy && video.id === id) {
|
|
10761
10725
|
const Comp = lazy;
|
|
@@ -10856,7 +10820,7 @@ var ImgRefForwarding = ({
|
|
|
10856
10820
|
if (!_propsValid) {
|
|
10857
10821
|
throw new Error("typecheck error");
|
|
10858
10822
|
}
|
|
10859
|
-
|
|
10823
|
+
useImperativeHandle6(ref, () => {
|
|
10860
10824
|
return imageRef.current;
|
|
10861
10825
|
}, []);
|
|
10862
10826
|
const actualSrc = usePreload(src);
|
|
@@ -11030,25 +10994,11 @@ var CompositionManagerProvider = ({
|
|
|
11030
10994
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
11031
10995
|
});
|
|
11032
10996
|
}, []);
|
|
11033
|
-
|
|
10997
|
+
useImperativeHandle7(compositionsRef, () => {
|
|
11034
10998
|
return {
|
|
11035
10999
|
getCompositions: () => currentcompositionsRef.current
|
|
11036
11000
|
};
|
|
11037
11001
|
}, []);
|
|
11038
|
-
const updateCompositionDefaultProps = useCallback14((id, newDefaultProps) => {
|
|
11039
|
-
setCompositions((comps) => {
|
|
11040
|
-
const updated = comps.map((c2) => {
|
|
11041
|
-
if (c2.id === id) {
|
|
11042
|
-
return {
|
|
11043
|
-
...c2,
|
|
11044
|
-
defaultProps: newDefaultProps
|
|
11045
|
-
};
|
|
11046
|
-
}
|
|
11047
|
-
return c2;
|
|
11048
|
-
});
|
|
11049
|
-
return updated;
|
|
11050
|
-
});
|
|
11051
|
-
}, []);
|
|
11052
11002
|
const compositionManagerSetters = useMemo26(() => {
|
|
11053
11003
|
return {
|
|
11054
11004
|
registerComposition,
|
|
@@ -11056,7 +11006,6 @@ var CompositionManagerProvider = ({
|
|
|
11056
11006
|
registerFolder,
|
|
11057
11007
|
unregisterFolder,
|
|
11058
11008
|
setCanvasContent,
|
|
11059
|
-
updateCompositionDefaultProps,
|
|
11060
11009
|
onlyRenderComposition
|
|
11061
11010
|
};
|
|
11062
11011
|
}, [
|
|
@@ -11064,7 +11013,6 @@ var CompositionManagerProvider = ({
|
|
|
11064
11013
|
registerFolder,
|
|
11065
11014
|
unregisterComposition,
|
|
11066
11015
|
unregisterFolder,
|
|
11067
|
-
updateCompositionDefaultProps,
|
|
11068
11016
|
onlyRenderComposition
|
|
11069
11017
|
]);
|
|
11070
11018
|
const compositionManagerContextValue = useMemo26(() => {
|
|
@@ -11523,7 +11471,7 @@ var useSchema = (schema, currentValue) => {
|
|
|
11523
11471
|
const overrideValues = overrides[overrideId] ?? {};
|
|
11524
11472
|
const propStatus = codeValues[overrideId];
|
|
11525
11473
|
const currentValueKeys = Object.keys(currentValue);
|
|
11526
|
-
const keysToUpdate = new Set(currentValueKeys)
|
|
11474
|
+
const keysToUpdate = [...new Set(currentValueKeys)];
|
|
11527
11475
|
const merged = {};
|
|
11528
11476
|
for (const key of keysToUpdate) {
|
|
11529
11477
|
const codeValueStatus = propStatus?.[key] ?? null;
|
|
@@ -11916,7 +11864,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11916
11864
|
duration,
|
|
11917
11865
|
fps
|
|
11918
11866
|
});
|
|
11919
|
-
|
|
11867
|
+
useImperativeHandle8(ref, () => {
|
|
11920
11868
|
return videoRef.current;
|
|
11921
11869
|
}, []);
|
|
11922
11870
|
useState18(() => playbackLogging({
|
|
@@ -12389,8 +12337,6 @@ var Internals = {
|
|
|
12389
12337
|
CurrentScaleContext,
|
|
12390
12338
|
PreviewSizeContext,
|
|
12391
12339
|
calculateScale,
|
|
12392
|
-
editorPropsProviderRef,
|
|
12393
|
-
PROPS_UPDATED_EXTERNALLY,
|
|
12394
12340
|
validateRenderAsset,
|
|
12395
12341
|
Log,
|
|
12396
12342
|
LogLevelContext,
|
|
@@ -13074,7 +13020,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13074
13020
|
sequenceContext?.relativeFrom,
|
|
13075
13021
|
audioStreamIndex
|
|
13076
13022
|
]);
|
|
13077
|
-
|
|
13023
|
+
useImperativeHandle9(ref, () => {
|
|
13078
13024
|
return videoRef.current;
|
|
13079
13025
|
}, []);
|
|
13080
13026
|
useEffect17(() => {
|
package/dist/experts.js
CHANGED
|
@@ -770,12 +770,7 @@ import { jsx as jsx3 } from "react/jsx-runtime";
|
|
|
770
770
|
import { useContext as useContext6, useMemo as useMemo5 } from "react";
|
|
771
771
|
import { createContext as createContext7 } from "react";
|
|
772
772
|
import { createContext as createContext9, createRef, useContext as useContext5, useMemo as useMemo4 } from "react";
|
|
773
|
-
import React5, {
|
|
774
|
-
createContext as createContext8,
|
|
775
|
-
useCallback as useCallback2,
|
|
776
|
-
useImperativeHandle,
|
|
777
|
-
useMemo as useMemo3
|
|
778
|
-
} from "react";
|
|
773
|
+
import React5, { createContext as createContext8, useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
779
774
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
780
775
|
import { useContext as useContext8 } from "react";
|
|
781
776
|
import { createContext as createContext10 } from "react";
|
|
@@ -791,19 +786,19 @@ import { jsx as jsx8 } from "react/jsx-runtime";
|
|
|
791
786
|
import {
|
|
792
787
|
forwardRef as forwardRef3,
|
|
793
788
|
useEffect as useEffect2,
|
|
794
|
-
useImperativeHandle as
|
|
789
|
+
useImperativeHandle as useImperativeHandle2,
|
|
795
790
|
useLayoutEffect as useLayoutEffect2,
|
|
796
791
|
useRef as useRef5,
|
|
797
792
|
useState as useState5
|
|
798
793
|
} from "react";
|
|
799
|
-
import React10, { useCallback as useCallback5, useImperativeHandle
|
|
794
|
+
import React10, { useCallback as useCallback5, useImperativeHandle, useRef as useRef4 } from "react";
|
|
800
795
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
801
796
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
802
797
|
import { useContext as useContext14, useLayoutEffect as useLayoutEffect4, useState as useState7 } from "react";
|
|
803
798
|
import {
|
|
804
799
|
createContext as createContext13,
|
|
805
800
|
useCallback as useCallback6,
|
|
806
|
-
useImperativeHandle as
|
|
801
|
+
useImperativeHandle as useImperativeHandle3,
|
|
807
802
|
useLayoutEffect as useLayoutEffect3,
|
|
808
803
|
useMemo as useMemo12,
|
|
809
804
|
useRef as useRef6,
|
|
@@ -822,7 +817,7 @@ import React17, {
|
|
|
822
817
|
forwardRef as forwardRef4,
|
|
823
818
|
useContext as useContext24,
|
|
824
819
|
useEffect as useEffect10,
|
|
825
|
-
useImperativeHandle as
|
|
820
|
+
useImperativeHandle as useImperativeHandle4,
|
|
826
821
|
useMemo as useMemo22,
|
|
827
822
|
useRef as useRef14,
|
|
828
823
|
useState as useState13
|
|
@@ -871,7 +866,7 @@ import {
|
|
|
871
866
|
forwardRef as forwardRef5,
|
|
872
867
|
useContext as useContext25,
|
|
873
868
|
useEffect as useEffect11,
|
|
874
|
-
useImperativeHandle as
|
|
869
|
+
useImperativeHandle as useImperativeHandle5,
|
|
875
870
|
useLayoutEffect as useLayoutEffect8,
|
|
876
871
|
useMemo as useMemo23,
|
|
877
872
|
useRef as useRef15
|
|
@@ -891,7 +886,7 @@ import {
|
|
|
891
886
|
forwardRef as forwardRef8,
|
|
892
887
|
useCallback as useCallback13,
|
|
893
888
|
useContext as useContext29,
|
|
894
|
-
useImperativeHandle as
|
|
889
|
+
useImperativeHandle as useImperativeHandle6,
|
|
895
890
|
useLayoutEffect as useLayoutEffect9,
|
|
896
891
|
useRef as useRef17
|
|
897
892
|
} from "react";
|
|
@@ -900,7 +895,7 @@ import { createRef as createRef3 } from "react";
|
|
|
900
895
|
import React24 from "react";
|
|
901
896
|
import {
|
|
902
897
|
useCallback as useCallback14,
|
|
903
|
-
useImperativeHandle as
|
|
898
|
+
useImperativeHandle as useImperativeHandle7,
|
|
904
899
|
useMemo as useMemo26,
|
|
905
900
|
useRef as useRef18,
|
|
906
901
|
useState as useState15
|
|
@@ -929,7 +924,7 @@ import React30, {
|
|
|
929
924
|
forwardRef as forwardRef9,
|
|
930
925
|
useContext as useContext34,
|
|
931
926
|
useEffect as useEffect16,
|
|
932
|
-
useImperativeHandle as
|
|
927
|
+
useImperativeHandle as useImperativeHandle8,
|
|
933
928
|
useMemo as useMemo31,
|
|
934
929
|
useRef as useRef19,
|
|
935
930
|
useState as useState18
|
|
@@ -951,7 +946,7 @@ import {
|
|
|
951
946
|
forwardRef as forwardRef12,
|
|
952
947
|
useContext as useContext35,
|
|
953
948
|
useEffect as useEffect17,
|
|
954
|
-
useImperativeHandle as
|
|
949
|
+
useImperativeHandle as useImperativeHandle9,
|
|
955
950
|
useLayoutEffect as useLayoutEffect11,
|
|
956
951
|
useMemo as useMemo35,
|
|
957
952
|
useRef as useRef20
|
|
@@ -1003,7 +998,7 @@ var useIsPlayer = () => {
|
|
|
1003
998
|
function truthy(value) {
|
|
1004
999
|
return Boolean(value);
|
|
1005
1000
|
}
|
|
1006
|
-
var VERSION = "4.0.
|
|
1001
|
+
var VERSION = "4.0.439";
|
|
1007
1002
|
var checkMultipleRemotionVersions = () => {
|
|
1008
1003
|
if (typeof globalThis === "undefined") {
|
|
1009
1004
|
return;
|
|
@@ -1524,9 +1519,6 @@ var CompositionSetters = createContext7({
|
|
|
1524
1519
|
setCanvasContent: () => {
|
|
1525
1520
|
return;
|
|
1526
1521
|
},
|
|
1527
|
-
updateCompositionDefaultProps: () => {
|
|
1528
|
-
return;
|
|
1529
|
-
},
|
|
1530
1522
|
onlyRenderComposition: null
|
|
1531
1523
|
});
|
|
1532
1524
|
var getKey = () => {
|
|
@@ -1646,12 +1638,8 @@ var EditorPropsContext = createContext8({
|
|
|
1646
1638
|
props: {},
|
|
1647
1639
|
updateProps: () => {
|
|
1648
1640
|
throw new Error("Not implemented");
|
|
1649
|
-
},
|
|
1650
|
-
resetUnsaved: () => {
|
|
1651
|
-
throw new Error("Not implemented");
|
|
1652
1641
|
}
|
|
1653
1642
|
});
|
|
1654
|
-
var editorPropsProviderRef = React5.createRef();
|
|
1655
1643
|
var timeValueRef = React5.createRef();
|
|
1656
1644
|
var EditorPropsProvider = ({ children }) => {
|
|
1657
1645
|
const [props, setProps] = React5.useState({});
|
|
@@ -1667,25 +1655,9 @@ var EditorPropsProvider = ({ children }) => {
|
|
|
1667
1655
|
};
|
|
1668
1656
|
});
|
|
1669
1657
|
}, []);
|
|
1670
|
-
const resetUnsaved = useCallback2((compositionId) => {
|
|
1671
|
-
setProps((prev) => {
|
|
1672
|
-
if (prev[compositionId]) {
|
|
1673
|
-
const newProps = { ...prev };
|
|
1674
|
-
delete newProps[compositionId];
|
|
1675
|
-
return newProps;
|
|
1676
|
-
}
|
|
1677
|
-
return prev;
|
|
1678
|
-
});
|
|
1679
|
-
}, []);
|
|
1680
|
-
useImperativeHandle(editorPropsProviderRef, () => {
|
|
1681
|
-
return {
|
|
1682
|
-
getProps: () => props,
|
|
1683
|
-
setProps
|
|
1684
|
-
};
|
|
1685
|
-
}, [props]);
|
|
1686
1658
|
const ctx = useMemo3(() => {
|
|
1687
|
-
return { props, updateProps
|
|
1688
|
-
}, [props,
|
|
1659
|
+
return { props, updateProps };
|
|
1660
|
+
}, [props, updateProps]);
|
|
1689
1661
|
return /* @__PURE__ */ jsx4(EditorPropsContext.Provider, {
|
|
1690
1662
|
value: ctx,
|
|
1691
1663
|
children
|
|
@@ -1748,7 +1720,6 @@ var resolveCompositionsRef = createRef();
|
|
|
1748
1720
|
var needsResolution = (composition) => {
|
|
1749
1721
|
return Boolean(composition.calculateMetadata);
|
|
1750
1722
|
};
|
|
1751
|
-
var PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally";
|
|
1752
1723
|
var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
1753
1724
|
const context = useContext5(ResolveCompositionContext);
|
|
1754
1725
|
const { props: allEditorProps } = useContext5(EditorPropsContext);
|
|
@@ -2519,7 +2490,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref
|
|
|
2519
2490
|
height: canvasHeight
|
|
2520
2491
|
}));
|
|
2521
2492
|
}, [fit, height, width]);
|
|
2522
|
-
|
|
2493
|
+
useImperativeHandle(ref, () => {
|
|
2523
2494
|
return {
|
|
2524
2495
|
draw,
|
|
2525
2496
|
getCanvas: () => {
|
|
@@ -2718,7 +2689,7 @@ var AnimatedImage = forwardRef3(({
|
|
|
2718
2689
|
const currentTimeRef = useRef5(currentTime);
|
|
2719
2690
|
currentTimeRef.current = currentTime;
|
|
2720
2691
|
const ref = useRef5(null);
|
|
2721
|
-
|
|
2692
|
+
useImperativeHandle2(canvasRef, () => {
|
|
2722
2693
|
const c = ref.current?.getCanvas();
|
|
2723
2694
|
if (!c) {
|
|
2724
2695
|
throw new Error("Canvas ref is not set");
|
|
@@ -2844,7 +2815,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
2844
2815
|
setRenderAssets(renderAssetsRef.current);
|
|
2845
2816
|
}, []);
|
|
2846
2817
|
if (collectAssets) {
|
|
2847
|
-
|
|
2818
|
+
useImperativeHandle3(collectAssets, () => {
|
|
2848
2819
|
return {
|
|
2849
2820
|
collectAssets: () => {
|
|
2850
2821
|
const assets = renderAssetsRef.current;
|
|
@@ -5275,7 +5246,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
5275
5246
|
});
|
|
5276
5247
|
};
|
|
5277
5248
|
}, [cleanupOnMediaTagUnmount]);
|
|
5278
|
-
|
|
5249
|
+
useImperativeHandle4(ref, () => {
|
|
5279
5250
|
return audioRef.current;
|
|
5280
5251
|
}, [audioRef]);
|
|
5281
5252
|
const currentOnDurationCallback = useRef14(onDuration);
|
|
@@ -5346,7 +5317,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
5346
5317
|
mediaVolume: 1
|
|
5347
5318
|
});
|
|
5348
5319
|
warnAboutTooHighVolume(volume);
|
|
5349
|
-
|
|
5320
|
+
useImperativeHandle5(ref, () => {
|
|
5350
5321
|
return audioRef.current;
|
|
5351
5322
|
}, []);
|
|
5352
5323
|
useEffect11(() => {
|
|
@@ -5775,13 +5746,6 @@ var InnerComposition = ({
|
|
|
5775
5746
|
registerComposition,
|
|
5776
5747
|
unregisterComposition
|
|
5777
5748
|
]);
|
|
5778
|
-
useEffect13(() => {
|
|
5779
|
-
window.dispatchEvent(new CustomEvent(PROPS_UPDATED_EXTERNALLY, {
|
|
5780
|
-
detail: {
|
|
5781
|
-
resetUnsaved: id
|
|
5782
|
-
}
|
|
5783
|
-
}));
|
|
5784
|
-
}, [defaultProps, id]);
|
|
5785
5749
|
const resolved = useResolvedVideoConfig(id);
|
|
5786
5750
|
if (environment.isStudio && video && video.component === lazy && video.id === id) {
|
|
5787
5751
|
const Comp = lazy;
|
|
@@ -5882,7 +5846,7 @@ var ImgRefForwarding = ({
|
|
|
5882
5846
|
if (!_propsValid) {
|
|
5883
5847
|
throw new Error("typecheck error");
|
|
5884
5848
|
}
|
|
5885
|
-
|
|
5849
|
+
useImperativeHandle6(ref, () => {
|
|
5886
5850
|
return imageRef.current;
|
|
5887
5851
|
}, []);
|
|
5888
5852
|
const actualSrc = usePreload(src);
|
|
@@ -6056,25 +6020,11 @@ var CompositionManagerProvider = ({
|
|
|
6056
6020
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
6057
6021
|
});
|
|
6058
6022
|
}, []);
|
|
6059
|
-
|
|
6023
|
+
useImperativeHandle7(compositionsRef, () => {
|
|
6060
6024
|
return {
|
|
6061
6025
|
getCompositions: () => currentcompositionsRef.current
|
|
6062
6026
|
};
|
|
6063
6027
|
}, []);
|
|
6064
|
-
const updateCompositionDefaultProps = useCallback14((id, newDefaultProps) => {
|
|
6065
|
-
setCompositions((comps) => {
|
|
6066
|
-
const updated = comps.map((c2) => {
|
|
6067
|
-
if (c2.id === id) {
|
|
6068
|
-
return {
|
|
6069
|
-
...c2,
|
|
6070
|
-
defaultProps: newDefaultProps
|
|
6071
|
-
};
|
|
6072
|
-
}
|
|
6073
|
-
return c2;
|
|
6074
|
-
});
|
|
6075
|
-
return updated;
|
|
6076
|
-
});
|
|
6077
|
-
}, []);
|
|
6078
6028
|
const compositionManagerSetters = useMemo26(() => {
|
|
6079
6029
|
return {
|
|
6080
6030
|
registerComposition,
|
|
@@ -6082,7 +6032,6 @@ var CompositionManagerProvider = ({
|
|
|
6082
6032
|
registerFolder,
|
|
6083
6033
|
unregisterFolder,
|
|
6084
6034
|
setCanvasContent,
|
|
6085
|
-
updateCompositionDefaultProps,
|
|
6086
6035
|
onlyRenderComposition
|
|
6087
6036
|
};
|
|
6088
6037
|
}, [
|
|
@@ -6090,7 +6039,6 @@ var CompositionManagerProvider = ({
|
|
|
6090
6039
|
registerFolder,
|
|
6091
6040
|
unregisterComposition,
|
|
6092
6041
|
unregisterFolder,
|
|
6093
|
-
updateCompositionDefaultProps,
|
|
6094
6042
|
onlyRenderComposition
|
|
6095
6043
|
]);
|
|
6096
6044
|
const compositionManagerContextValue = useMemo26(() => {
|
|
@@ -6549,7 +6497,7 @@ var useSchema = (schema, currentValue) => {
|
|
|
6549
6497
|
const overrideValues = overrides[overrideId] ?? {};
|
|
6550
6498
|
const propStatus = codeValues[overrideId];
|
|
6551
6499
|
const currentValueKeys = Object.keys(currentValue);
|
|
6552
|
-
const keysToUpdate = new Set(currentValueKeys)
|
|
6500
|
+
const keysToUpdate = [...new Set(currentValueKeys)];
|
|
6553
6501
|
const merged = {};
|
|
6554
6502
|
for (const key of keysToUpdate) {
|
|
6555
6503
|
const codeValueStatus = propStatus?.[key] ?? null;
|
|
@@ -6942,7 +6890,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
6942
6890
|
duration,
|
|
6943
6891
|
fps
|
|
6944
6892
|
});
|
|
6945
|
-
|
|
6893
|
+
useImperativeHandle8(ref, () => {
|
|
6946
6894
|
return videoRef.current;
|
|
6947
6895
|
}, []);
|
|
6948
6896
|
useState18(() => playbackLogging({
|
|
@@ -7415,8 +7363,6 @@ var Internals = {
|
|
|
7415
7363
|
CurrentScaleContext,
|
|
7416
7364
|
PreviewSizeContext,
|
|
7417
7365
|
calculateScale,
|
|
7418
|
-
editorPropsProviderRef,
|
|
7419
|
-
PROPS_UPDATED_EXTERNALLY,
|
|
7420
7366
|
validateRenderAsset,
|
|
7421
7367
|
Log,
|
|
7422
7368
|
LogLevelContext,
|
|
@@ -8100,7 +8046,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
8100
8046
|
sequenceContext?.relativeFrom,
|
|
8101
8047
|
audioStreamIndex
|
|
8102
8048
|
]);
|
|
8103
|
-
|
|
8049
|
+
useImperativeHandle9(ref, () => {
|
|
8104
8050
|
return videoRef.current;
|
|
8105
8051
|
}, []);
|
|
8106
8052
|
useEffect17(() => {
|