@remotion/promo-pages 4.0.504 → 4.0.506
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 +825 -571
- package/dist/components/Homepage.js +4 -2
- package/dist/components/homepage/DiscoverRemotion.d.ts +10 -0
- package/dist/components/homepage/DiscoverRemotion.js +114 -0
- package/dist/components/homepage/ReactSourceOfTruth.d.ts +2 -0
- package/dist/components/homepage/ReactSourceOfTruth.js +4 -0
- package/dist/design.js +148 -51
- package/dist/experts.js +148 -51
- package/dist/homepage/Pricing.js +148 -51
- package/dist/prompts/PromptsGallery.js +148 -51
- package/dist/prompts/PromptsShow.js +148 -51
- package/dist/prompts/PromptsSubmit.js +148 -51
- package/dist/tailwind.css +15 -4
- package/dist/team.js +300 -224
- package/dist/template-modal-content.js +148 -51
- package/dist/templates.js +148 -51
- package/package.json +14 -14
package/dist/experts.js
CHANGED
|
@@ -972,7 +972,13 @@ import React13, { createContext as createContext14 } from "react";
|
|
|
972
972
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
973
973
|
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
974
974
|
import { createContext as createContext15 } from "react";
|
|
975
|
-
import React14, {
|
|
975
|
+
import React14, {
|
|
976
|
+
forwardRef as forwardRef2,
|
|
977
|
+
useContext as useContext17,
|
|
978
|
+
useLayoutEffect as useLayoutEffect2,
|
|
979
|
+
useMemo as useMemo14,
|
|
980
|
+
useState as useState4
|
|
981
|
+
} from "react";
|
|
976
982
|
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
977
983
|
import { createContext as createContext16 } from "react";
|
|
978
984
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -982,7 +988,7 @@ import {
|
|
|
982
988
|
forwardRef as forwardRef4,
|
|
983
989
|
useEffect as useEffect5,
|
|
984
990
|
useImperativeHandle as useImperativeHandle2,
|
|
985
|
-
useLayoutEffect as
|
|
991
|
+
useLayoutEffect as useLayoutEffect3,
|
|
986
992
|
useRef as useRef10,
|
|
987
993
|
useState as useState6
|
|
988
994
|
} from "react";
|
|
@@ -991,12 +997,12 @@ import React17, { useCallback as useCallback8, useImperativeHandle, useMemo as u
|
|
|
991
997
|
import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
992
998
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
993
999
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
994
|
-
import { useContext as useContext19, useLayoutEffect as
|
|
1000
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState8 } from "react";
|
|
995
1001
|
import {
|
|
996
1002
|
createContext as createContext17,
|
|
997
1003
|
useCallback as useCallback9,
|
|
998
1004
|
useImperativeHandle as useImperativeHandle3,
|
|
999
|
-
useLayoutEffect as
|
|
1005
|
+
useLayoutEffect as useLayoutEffect4,
|
|
1000
1006
|
useMemo as useMemo19,
|
|
1001
1007
|
useRef as useRef11,
|
|
1002
1008
|
useState as useState7
|
|
@@ -1020,7 +1026,7 @@ import React24, {
|
|
|
1020
1026
|
useRef as useRef20,
|
|
1021
1027
|
useState as useState14
|
|
1022
1028
|
} from "react";
|
|
1023
|
-
import { useContext as useContext22, useLayoutEffect as
|
|
1029
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef15 } from "react";
|
|
1024
1030
|
import React21, {
|
|
1025
1031
|
createContext as createContext21,
|
|
1026
1032
|
createRef as createRef2,
|
|
@@ -1040,7 +1046,7 @@ import {
|
|
|
1040
1046
|
useCallback as useCallback13,
|
|
1041
1047
|
useContext as useContext27,
|
|
1042
1048
|
useEffect as useEffect12,
|
|
1043
|
-
useLayoutEffect as
|
|
1049
|
+
useLayoutEffect as useLayoutEffect8,
|
|
1044
1050
|
useRef as useRef19
|
|
1045
1051
|
} from "react";
|
|
1046
1052
|
import { useCallback as useCallback12, useMemo as useMemo27, useRef as useRef17 } from "react";
|
|
@@ -1049,7 +1055,7 @@ import React22, {
|
|
|
1049
1055
|
useCallback as useCallback11,
|
|
1050
1056
|
useContext as useContext25,
|
|
1051
1057
|
useEffect as useEffect9,
|
|
1052
|
-
useLayoutEffect as
|
|
1058
|
+
useLayoutEffect as useLayoutEffect7,
|
|
1053
1059
|
useMemo as useMemo25,
|
|
1054
1060
|
useRef as useRef16,
|
|
1055
1061
|
useState as useState12
|
|
@@ -1066,7 +1072,7 @@ import {
|
|
|
1066
1072
|
useContext as useContext30,
|
|
1067
1073
|
useEffect as useEffect15,
|
|
1068
1074
|
useImperativeHandle as useImperativeHandle5,
|
|
1069
|
-
useLayoutEffect as
|
|
1075
|
+
useLayoutEffect as useLayoutEffect9,
|
|
1070
1076
|
useMemo as useMemo30,
|
|
1071
1077
|
useRef as useRef21
|
|
1072
1078
|
} from "react";
|
|
@@ -1087,7 +1093,7 @@ import {
|
|
|
1087
1093
|
forwardRef as forwardRef9,
|
|
1088
1094
|
useCallback as useCallback17,
|
|
1089
1095
|
useContext as useContext32,
|
|
1090
|
-
useLayoutEffect as
|
|
1096
|
+
useLayoutEffect as useLayoutEffect10,
|
|
1091
1097
|
useMemo as useMemo32,
|
|
1092
1098
|
useRef as useRef23
|
|
1093
1099
|
} from "react";
|
|
@@ -1097,7 +1103,7 @@ import {
|
|
|
1097
1103
|
useCallback as useCallback18,
|
|
1098
1104
|
useContext as useContext33,
|
|
1099
1105
|
useImperativeHandle as useImperativeHandle7,
|
|
1100
|
-
useLayoutEffect as
|
|
1106
|
+
useLayoutEffect as useLayoutEffect11,
|
|
1101
1107
|
useMemo as useMemo33,
|
|
1102
1108
|
useRef as useRef24,
|
|
1103
1109
|
useState as useState16
|
|
@@ -1108,7 +1114,7 @@ import { jsx as jsx28 } from "react/jsx-runtime";
|
|
|
1108
1114
|
import {
|
|
1109
1115
|
useCallback as useCallback20,
|
|
1110
1116
|
useContext as useContext34,
|
|
1111
|
-
useLayoutEffect as
|
|
1117
|
+
useLayoutEffect as useLayoutEffect12,
|
|
1112
1118
|
useRef as useRef25,
|
|
1113
1119
|
useState as useState18
|
|
1114
1120
|
} from "react";
|
|
@@ -1138,7 +1144,7 @@ import {
|
|
|
1138
1144
|
useCallback as useCallback23,
|
|
1139
1145
|
useContext as useContext37,
|
|
1140
1146
|
useEffect as useEffect17,
|
|
1141
|
-
useLayoutEffect as
|
|
1147
|
+
useLayoutEffect as useLayoutEffect13,
|
|
1142
1148
|
useMemo as useMemo37,
|
|
1143
1149
|
useState as useState20
|
|
1144
1150
|
} from "react";
|
|
@@ -1171,7 +1177,7 @@ import {
|
|
|
1171
1177
|
useContext as useContext39,
|
|
1172
1178
|
useEffect as useEffect20,
|
|
1173
1179
|
useImperativeHandle as useImperativeHandle10,
|
|
1174
|
-
useLayoutEffect as
|
|
1180
|
+
useLayoutEffect as useLayoutEffect14,
|
|
1175
1181
|
useMemo as useMemo41,
|
|
1176
1182
|
useRef as useRef29
|
|
1177
1183
|
} from "react";
|
|
@@ -2364,7 +2370,7 @@ var getSingleChildComponent = (children) => {
|
|
|
2364
2370
|
}
|
|
2365
2371
|
return child.type;
|
|
2366
2372
|
};
|
|
2367
|
-
var VERSION = "4.0.
|
|
2373
|
+
var VERSION = "4.0.506";
|
|
2368
2374
|
var checkMultipleRemotionVersions = () => {
|
|
2369
2375
|
if (typeof globalThis === "undefined") {
|
|
2370
2376
|
return;
|
|
@@ -2415,6 +2421,7 @@ var SetTimelineContext = createContext13({
|
|
|
2415
2421
|
}
|
|
2416
2422
|
});
|
|
2417
2423
|
var TimelineContext = createContext13(null);
|
|
2424
|
+
var TimelineImperativeContext = createContext13(null);
|
|
2418
2425
|
var PlaybackRateContext = createContext13(null);
|
|
2419
2426
|
var AbsoluteTimeContext = createContext13(null);
|
|
2420
2427
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
@@ -2424,6 +2431,8 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
2424
2431
|
const audioAndVideoTags = useRef3([]);
|
|
2425
2432
|
const [_frame, setFrame] = useState2(() => getInitialFrameState());
|
|
2426
2433
|
const frame = frameState ?? _frame;
|
|
2434
|
+
const frameRef = useRef3(frame);
|
|
2435
|
+
frameRef.current = frame;
|
|
2427
2436
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
2428
2437
|
if (typeof window !== "undefined") {
|
|
2429
2438
|
useLayoutEffect(() => {
|
|
@@ -2459,6 +2468,13 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
2459
2468
|
audioAndVideoTags
|
|
2460
2469
|
};
|
|
2461
2470
|
}, [frame, playing]);
|
|
2471
|
+
const timelineImperativeContextValue = useMemo8(() => {
|
|
2472
|
+
return {
|
|
2473
|
+
frameRef,
|
|
2474
|
+
imperativePlaying,
|
|
2475
|
+
audioAndVideoTags
|
|
2476
|
+
};
|
|
2477
|
+
}, []);
|
|
2462
2478
|
const playbackRateContextValue = useMemo8(() => {
|
|
2463
2479
|
return {
|
|
2464
2480
|
playbackRate,
|
|
@@ -2475,11 +2491,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
2475
2491
|
value: timelineContextValue,
|
|
2476
2492
|
children: /* @__PURE__ */ jsx8(PlaybackRateContext.Provider, {
|
|
2477
2493
|
value: playbackRateContextValue,
|
|
2478
|
-
children: /* @__PURE__ */ jsx8(
|
|
2479
|
-
value:
|
|
2480
|
-
children: /* @__PURE__ */ jsx8(
|
|
2481
|
-
value:
|
|
2482
|
-
children
|
|
2494
|
+
children: /* @__PURE__ */ jsx8(TimelineImperativeContext.Provider, {
|
|
2495
|
+
value: timelineImperativeContextValue,
|
|
2496
|
+
children: /* @__PURE__ */ jsx8(TimelineContext.Provider, {
|
|
2497
|
+
value: timelineContextValue,
|
|
2498
|
+
children: /* @__PURE__ */ jsx8(SetTimelineContext.Provider, {
|
|
2499
|
+
value: setTimelineContextValue,
|
|
2500
|
+
children
|
|
2501
|
+
})
|
|
2483
2502
|
})
|
|
2484
2503
|
})
|
|
2485
2504
|
})
|
|
@@ -5304,6 +5323,31 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
5304
5323
|
}
|
|
5305
5324
|
return out;
|
|
5306
5325
|
};
|
|
5326
|
+
var createRuntimeValueStore = (initialSnapshot) => {
|
|
5327
|
+
let snapshot = initialSnapshot;
|
|
5328
|
+
const listeners = new Set;
|
|
5329
|
+
const store = {
|
|
5330
|
+
getSnapshot: () => snapshot,
|
|
5331
|
+
subscribe: (listener) => {
|
|
5332
|
+
listeners.add(listener);
|
|
5333
|
+
return () => {
|
|
5334
|
+
listeners.delete(listener);
|
|
5335
|
+
};
|
|
5336
|
+
}
|
|
5337
|
+
};
|
|
5338
|
+
return {
|
|
5339
|
+
store,
|
|
5340
|
+
setSnapshot: (newSnapshot) => {
|
|
5341
|
+
if (snapshot === newSnapshot) {
|
|
5342
|
+
return;
|
|
5343
|
+
}
|
|
5344
|
+
snapshot = newSnapshot;
|
|
5345
|
+
for (const listener of listeners) {
|
|
5346
|
+
listener();
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
};
|
|
5350
|
+
};
|
|
5307
5351
|
var findPropsToDelete = ({
|
|
5308
5352
|
schema,
|
|
5309
5353
|
key,
|
|
@@ -5605,16 +5649,21 @@ var withInteractivitySchema = ({
|
|
|
5605
5649
|
props: cleanProps
|
|
5606
5650
|
}));
|
|
5607
5651
|
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(cleanProps, flatKeys, flatSchema), runtimeValues);
|
|
5652
|
+
const [runtimeValueStore] = useState4(() => createRuntimeValueStore(currentRuntimeValueDotNotation));
|
|
5653
|
+
useLayoutEffect2(() => {
|
|
5654
|
+
runtimeValueStore.setSnapshot(currentRuntimeValueDotNotation);
|
|
5655
|
+
}, [currentRuntimeValueDotNotation, runtimeValueStore]);
|
|
5608
5656
|
const controls = useMemo14(() => {
|
|
5609
5657
|
return {
|
|
5610
5658
|
schema: schemaWithSequenceName,
|
|
5611
5659
|
currentRuntimeValueDotNotation,
|
|
5660
|
+
runtimeValues: runtimeValueStore.store,
|
|
5612
5661
|
overrideId,
|
|
5613
5662
|
supportsEffects,
|
|
5614
5663
|
componentIdentity,
|
|
5615
5664
|
componentName
|
|
5616
5665
|
};
|
|
5617
|
-
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
5666
|
+
}, [currentRuntimeValueDotNotation, overrideId, runtimeValueStore.store]);
|
|
5618
5667
|
setStackForControls(controls, internalStack);
|
|
5619
5668
|
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
5620
5669
|
return computeEffectiveSchemaValuesDotNotation({
|
|
@@ -5799,6 +5848,32 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5799
5848
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
5800
5849
|
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
5801
5850
|
const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
|
|
5851
|
+
const controlsSchema = controls?.schema;
|
|
5852
|
+
const controlsRuntimeValues = controls?.runtimeValues;
|
|
5853
|
+
const controlsOverrideId = controls?.overrideId;
|
|
5854
|
+
const controlsSupportsEffects = controls?.supportsEffects;
|
|
5855
|
+
const controlsComponentIdentity = controls?.componentIdentity;
|
|
5856
|
+
const controlsComponentName = controls?.componentName;
|
|
5857
|
+
const registrationControls = useMemo15(() => {
|
|
5858
|
+
if (controlsSchema === undefined || controlsRuntimeValues === undefined || controlsOverrideId === undefined || controlsSupportsEffects === undefined || controlsComponentIdentity === undefined || controlsComponentName === undefined) {
|
|
5859
|
+
return null;
|
|
5860
|
+
}
|
|
5861
|
+
return {
|
|
5862
|
+
schema: controlsSchema,
|
|
5863
|
+
runtimeValues: controlsRuntimeValues,
|
|
5864
|
+
overrideId: controlsOverrideId,
|
|
5865
|
+
supportsEffects: controlsSupportsEffects,
|
|
5866
|
+
componentIdentity: controlsComponentIdentity,
|
|
5867
|
+
componentName: controlsComponentName
|
|
5868
|
+
};
|
|
5869
|
+
}, [
|
|
5870
|
+
controlsComponentIdentity,
|
|
5871
|
+
controlsComponentName,
|
|
5872
|
+
controlsOverrideId,
|
|
5873
|
+
controlsRuntimeValues,
|
|
5874
|
+
controlsSchema,
|
|
5875
|
+
controlsSupportsEffects
|
|
5876
|
+
]);
|
|
5802
5877
|
useEffect3(() => {
|
|
5803
5878
|
if (!env.isStudio) {
|
|
5804
5879
|
return;
|
|
@@ -5807,7 +5882,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5807
5882
|
if (isMedia.type === "image") {
|
|
5808
5883
|
registerSequence({
|
|
5809
5884
|
type: "image",
|
|
5810
|
-
controls:
|
|
5885
|
+
controls: registrationControls,
|
|
5811
5886
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
5812
5887
|
displayName: timelineClipName,
|
|
5813
5888
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -5831,7 +5906,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5831
5906
|
} else {
|
|
5832
5907
|
registerSequence({
|
|
5833
5908
|
type: isMedia.type,
|
|
5834
|
-
controls:
|
|
5909
|
+
controls: registrationControls,
|
|
5835
5910
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
5836
5911
|
displayName: timelineClipName,
|
|
5837
5912
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -5878,7 +5953,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5878
5953
|
getStack: () => stackRef.current,
|
|
5879
5954
|
premountDisplay: premountDisplay ?? null,
|
|
5880
5955
|
postmountDisplay: postmountDisplay ?? null,
|
|
5881
|
-
controls:
|
|
5956
|
+
controls: registrationControls,
|
|
5882
5957
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
5883
5958
|
refForOutline: refForOutline ?? null,
|
|
5884
5959
|
isInsideSeries,
|
|
@@ -5906,7 +5981,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5906
5981
|
premountDisplay,
|
|
5907
5982
|
postmountDisplay,
|
|
5908
5983
|
env.isStudio,
|
|
5909
|
-
|
|
5984
|
+
registrationControls,
|
|
5910
5985
|
_remotionInternalEffects,
|
|
5911
5986
|
isMedia,
|
|
5912
5987
|
resolvedDocumentationLink,
|
|
@@ -6832,7 +6907,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
6832
6907
|
imageDecoder?.close();
|
|
6833
6908
|
};
|
|
6834
6909
|
}, [imageDecoder]);
|
|
6835
|
-
|
|
6910
|
+
useLayoutEffect3(() => {
|
|
6836
6911
|
if (!imageDecoder) {
|
|
6837
6912
|
return;
|
|
6838
6913
|
}
|
|
@@ -7089,7 +7164,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
7089
7164
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
7090
7165
|
setRenderAssets(renderAssetsRef.current);
|
|
7091
7166
|
}, []);
|
|
7092
|
-
|
|
7167
|
+
useLayoutEffect4(() => {
|
|
7093
7168
|
if (typeof window !== "undefined") {
|
|
7094
7169
|
window.remotion_collectAssets = () => {
|
|
7095
7170
|
const assets = renderAssetsRef.current;
|
|
@@ -7119,7 +7194,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
|
7119
7194
|
const [id] = useState8(() => {
|
|
7120
7195
|
return String(Math.random());
|
|
7121
7196
|
});
|
|
7122
|
-
|
|
7197
|
+
useLayoutEffect5(() => {
|
|
7123
7198
|
if (!env.isRendering) {
|
|
7124
7199
|
return;
|
|
7125
7200
|
}
|
|
@@ -8437,7 +8512,7 @@ var useVolume = ({
|
|
|
8437
8512
|
}
|
|
8438
8513
|
const { audioContext, gainNode: masterGainNode } = sharedAudioContext;
|
|
8439
8514
|
if (typeof window !== "undefined") {
|
|
8440
|
-
|
|
8515
|
+
useLayoutEffect6(() => {
|
|
8441
8516
|
if (!audioContext) {
|
|
8442
8517
|
return;
|
|
8443
8518
|
}
|
|
@@ -8803,7 +8878,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8803
8878
|
}
|
|
8804
8879
|
}, [blocks]);
|
|
8805
8880
|
if (typeof window !== "undefined") {
|
|
8806
|
-
|
|
8881
|
+
useLayoutEffect7(() => {
|
|
8807
8882
|
if (rendering) {
|
|
8808
8883
|
return;
|
|
8809
8884
|
}
|
|
@@ -9437,7 +9512,7 @@ var useMediaPlayback = ({
|
|
|
9437
9512
|
isPostmounting
|
|
9438
9513
|
]);
|
|
9439
9514
|
const env = useRemotionEnvironment();
|
|
9440
|
-
|
|
9515
|
+
useLayoutEffect8(() => {
|
|
9441
9516
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
9442
9517
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
9443
9518
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
@@ -9915,7 +9990,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
9915
9990
|
]);
|
|
9916
9991
|
const { src } = props;
|
|
9917
9992
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
9918
|
-
|
|
9993
|
+
useLayoutEffect9(() => {
|
|
9919
9994
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
9920
9995
|
return;
|
|
9921
9996
|
}
|
|
@@ -10562,7 +10637,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10562
10637
|
resolvedPixelDensity,
|
|
10563
10638
|
canRetryMissingPaintRecord
|
|
10564
10639
|
]);
|
|
10565
|
-
|
|
10640
|
+
useLayoutEffect10(() => {
|
|
10566
10641
|
const placeholder = canvas2dRef.current;
|
|
10567
10642
|
if (!placeholder) {
|
|
10568
10643
|
throw new Error("Canvas not found");
|
|
@@ -10594,7 +10669,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10594
10669
|
usesDirectLayoutCanvas
|
|
10595
10670
|
]);
|
|
10596
10671
|
const onPaintChangedRef = useRef23(false);
|
|
10597
|
-
|
|
10672
|
+
useLayoutEffect10(() => {
|
|
10598
10673
|
if (!onPaintChangedRef.current) {
|
|
10599
10674
|
onPaintChangedRef.current = true;
|
|
10600
10675
|
return;
|
|
@@ -10605,7 +10680,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
10605
10680
|
}
|
|
10606
10681
|
canvas.requestPaint?.();
|
|
10607
10682
|
}, [onPaint, memoizedEffects]);
|
|
10608
|
-
|
|
10683
|
+
useLayoutEffect10(() => {
|
|
10609
10684
|
const canvas = canvas2dRef.current;
|
|
10610
10685
|
if (!canvas) {
|
|
10611
10686
|
return;
|
|
@@ -10903,7 +10978,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10903
10978
|
ref.current = canvas;
|
|
10904
10979
|
}
|
|
10905
10980
|
}, [ref, refForOutline]);
|
|
10906
|
-
|
|
10981
|
+
useLayoutEffect11(() => {
|
|
10907
10982
|
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
10908
10983
|
return;
|
|
10909
10984
|
}
|
|
@@ -10915,7 +10990,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10915
10990
|
isPremounting,
|
|
10916
10991
|
pauseWhenLoading
|
|
10917
10992
|
]);
|
|
10918
|
-
|
|
10993
|
+
useLayoutEffect11(() => {
|
|
10919
10994
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
10920
10995
|
retries: delayRenderRetries ?? undefined,
|
|
10921
10996
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
@@ -10977,7 +11052,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
10977
11052
|
maxRetries,
|
|
10978
11053
|
onError
|
|
10979
11054
|
]);
|
|
10980
|
-
|
|
11055
|
+
useLayoutEffect11(() => {
|
|
10981
11056
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
10982
11057
|
return;
|
|
10983
11058
|
}
|
|
@@ -11305,7 +11380,7 @@ var ImgContent = ({
|
|
|
11305
11380
|
} catch {}
|
|
11306
11381
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
11307
11382
|
if (typeof window !== "undefined") {
|
|
11308
|
-
|
|
11383
|
+
useLayoutEffect12(() => {
|
|
11309
11384
|
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
11310
11385
|
return;
|
|
11311
11386
|
}
|
|
@@ -11317,7 +11392,7 @@ var ImgContent = ({
|
|
|
11317
11392
|
isPremounting,
|
|
11318
11393
|
pauseWhenLoading
|
|
11319
11394
|
]);
|
|
11320
|
-
|
|
11395
|
+
useLayoutEffect12(() => {
|
|
11321
11396
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
11322
11397
|
if (imageRef.current) {
|
|
11323
11398
|
imageRef.current.src = actualSrc;
|
|
@@ -11668,7 +11743,8 @@ var makeRemotionComponentIdentity = ({
|
|
|
11668
11743
|
};
|
|
11669
11744
|
var interactiveElementSchema = {
|
|
11670
11745
|
...baseSchema,
|
|
11671
|
-
...transformSchema
|
|
11746
|
+
...transformSchema,
|
|
11747
|
+
...cropSchema
|
|
11672
11748
|
};
|
|
11673
11749
|
var interactiveBackgroundElementSchema = {
|
|
11674
11750
|
...interactiveElementSchema,
|
|
@@ -11725,8 +11801,21 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
11725
11801
|
name,
|
|
11726
11802
|
showInTimeline,
|
|
11727
11803
|
controls,
|
|
11804
|
+
cropLeft,
|
|
11805
|
+
cropRight,
|
|
11806
|
+
cropTop,
|
|
11807
|
+
cropBottom,
|
|
11808
|
+
style,
|
|
11728
11809
|
...props2
|
|
11729
11810
|
} = propsWithControls;
|
|
11811
|
+
const croppedStyle = useCropStyle({
|
|
11812
|
+
cropLeft,
|
|
11813
|
+
cropRight,
|
|
11814
|
+
cropTop,
|
|
11815
|
+
cropBottom,
|
|
11816
|
+
style: style ?? null,
|
|
11817
|
+
componentName: displayName
|
|
11818
|
+
});
|
|
11730
11819
|
const refForOutline = useRef26(null);
|
|
11731
11820
|
const callbackRef = useCallback21((element) => {
|
|
11732
11821
|
refForOutline.current = element;
|
|
@@ -11746,6 +11835,7 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
11746
11835
|
outlineRef: refForOutline,
|
|
11747
11836
|
children: React31.createElement(tag, {
|
|
11748
11837
|
...props2,
|
|
11838
|
+
style: croppedStyle ?? undefined,
|
|
11749
11839
|
ref: callbackRef
|
|
11750
11840
|
})
|
|
11751
11841
|
});
|
|
@@ -12447,7 +12537,7 @@ var OffthreadVideoForRendering = ({
|
|
|
12447
12537
|
}, [toneMapped, currentTime, src, transparent]);
|
|
12448
12538
|
const [imageSrc, setImageSrc] = useState20(null);
|
|
12449
12539
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
12450
|
-
|
|
12540
|
+
useLayoutEffect13(() => {
|
|
12451
12541
|
if (!window.remotion_videoEnabled) {
|
|
12452
12542
|
return;
|
|
12453
12543
|
}
|
|
@@ -12982,6 +13072,7 @@ var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
|
12982
13072
|
function useRemotionContexts() {
|
|
12983
13073
|
const compositionManagerCtx = React41.useContext(CompositionManager);
|
|
12984
13074
|
const timelineContext = React41.useContext(TimelineContext);
|
|
13075
|
+
const timelineImperativeContext = React41.useContext(TimelineImperativeContext);
|
|
12985
13076
|
const setTimelineContext = React41.useContext(SetTimelineContext);
|
|
12986
13077
|
const sequenceContext = React41.useContext(SequenceContext);
|
|
12987
13078
|
const nonceContext = React41.useContext(NonceContext);
|
|
@@ -12997,6 +13088,7 @@ function useRemotionContexts() {
|
|
|
12997
13088
|
return useMemo39(() => ({
|
|
12998
13089
|
compositionManagerCtx,
|
|
12999
13090
|
timelineContext,
|
|
13091
|
+
timelineImperativeContext,
|
|
13000
13092
|
setTimelineContext,
|
|
13001
13093
|
sequenceContext,
|
|
13002
13094
|
nonceContext,
|
|
@@ -13015,6 +13107,7 @@ function useRemotionContexts() {
|
|
|
13015
13107
|
sequenceContext,
|
|
13016
13108
|
setTimelineContext,
|
|
13017
13109
|
timelineContext,
|
|
13110
|
+
timelineImperativeContext,
|
|
13018
13111
|
canUseRemotionHooksContext,
|
|
13019
13112
|
preloadContext,
|
|
13020
13113
|
resolveCompositionContext,
|
|
@@ -13048,15 +13141,18 @@ var RemotionContextProvider = (props2) => {
|
|
|
13048
13141
|
value: contexts.renderAssetManagerContext,
|
|
13049
13142
|
children: /* @__PURE__ */ jsx37(ResolveCompositionContext.Provider, {
|
|
13050
13143
|
value: contexts.resolveCompositionContext,
|
|
13051
|
-
children: /* @__PURE__ */ jsx37(
|
|
13052
|
-
value: contexts.
|
|
13053
|
-
children: /* @__PURE__ */ jsx37(
|
|
13054
|
-
value: contexts.
|
|
13055
|
-
children: /* @__PURE__ */ jsx37(
|
|
13056
|
-
value: contexts.
|
|
13057
|
-
children: /* @__PURE__ */ jsx37(
|
|
13058
|
-
value: contexts.
|
|
13059
|
-
children
|
|
13144
|
+
children: /* @__PURE__ */ jsx37(TimelineImperativeContext.Provider, {
|
|
13145
|
+
value: contexts.timelineImperativeContext,
|
|
13146
|
+
children: /* @__PURE__ */ jsx37(TimelineContext.Provider, {
|
|
13147
|
+
value: contexts.timelineContext,
|
|
13148
|
+
children: /* @__PURE__ */ jsx37(SetTimelineContext.Provider, {
|
|
13149
|
+
value: contexts.setTimelineContext,
|
|
13150
|
+
children: /* @__PURE__ */ jsx37(SequenceContext.Provider, {
|
|
13151
|
+
value: contexts.sequenceContext,
|
|
13152
|
+
children: /* @__PURE__ */ jsx37(BufferingContextReact.Provider, {
|
|
13153
|
+
value: contexts.bufferManagerContext,
|
|
13154
|
+
children
|
|
13155
|
+
})
|
|
13060
13156
|
})
|
|
13061
13157
|
})
|
|
13062
13158
|
})
|
|
@@ -13200,6 +13296,7 @@ var Internals = {
|
|
|
13200
13296
|
TimelinePosition: exports_timeline_position_state,
|
|
13201
13297
|
DelayRenderContextType,
|
|
13202
13298
|
TimelineContext,
|
|
13299
|
+
TimelineImperativeContext,
|
|
13203
13300
|
PlaybackRateContext,
|
|
13204
13301
|
AbsoluteTimeContext,
|
|
13205
13302
|
RenderAssetManagerProvider,
|
|
@@ -13784,7 +13881,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
13784
13881
|
]);
|
|
13785
13882
|
const { src } = props2;
|
|
13786
13883
|
if (environment.isRendering) {
|
|
13787
|
-
|
|
13884
|
+
useLayoutEffect14(() => {
|
|
13788
13885
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
13789
13886
|
return;
|
|
13790
13887
|
}
|