@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
|
@@ -21528,7 +21528,13 @@ import React13, { createContext as createContext14 } from "react";
|
|
|
21528
21528
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
21529
21529
|
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
21530
21530
|
import { createContext as createContext15 } from "react";
|
|
21531
|
-
import React14, {
|
|
21531
|
+
import React14, {
|
|
21532
|
+
forwardRef as forwardRef2,
|
|
21533
|
+
useContext as useContext17,
|
|
21534
|
+
useLayoutEffect as useLayoutEffect2,
|
|
21535
|
+
useMemo as useMemo14,
|
|
21536
|
+
useState as useState4
|
|
21537
|
+
} from "react";
|
|
21532
21538
|
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
21533
21539
|
import { createContext as createContext16 } from "react";
|
|
21534
21540
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -21538,7 +21544,7 @@ import {
|
|
|
21538
21544
|
forwardRef as forwardRef4,
|
|
21539
21545
|
useEffect as useEffect5,
|
|
21540
21546
|
useImperativeHandle as useImperativeHandle2,
|
|
21541
|
-
useLayoutEffect as
|
|
21547
|
+
useLayoutEffect as useLayoutEffect3,
|
|
21542
21548
|
useRef as useRef10,
|
|
21543
21549
|
useState as useState6
|
|
21544
21550
|
} from "react";
|
|
@@ -21547,12 +21553,12 @@ import React17, { useCallback as useCallback8, useImperativeHandle, useMemo as u
|
|
|
21547
21553
|
import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
21548
21554
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
21549
21555
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
21550
|
-
import { useContext as useContext19, useLayoutEffect as
|
|
21556
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState8 } from "react";
|
|
21551
21557
|
import {
|
|
21552
21558
|
createContext as createContext17,
|
|
21553
21559
|
useCallback as useCallback9,
|
|
21554
21560
|
useImperativeHandle as useImperativeHandle3,
|
|
21555
|
-
useLayoutEffect as
|
|
21561
|
+
useLayoutEffect as useLayoutEffect4,
|
|
21556
21562
|
useMemo as useMemo19,
|
|
21557
21563
|
useRef as useRef11,
|
|
21558
21564
|
useState as useState7
|
|
@@ -21576,7 +21582,7 @@ import React24, {
|
|
|
21576
21582
|
useRef as useRef20,
|
|
21577
21583
|
useState as useState14
|
|
21578
21584
|
} from "react";
|
|
21579
|
-
import { useContext as useContext22, useLayoutEffect as
|
|
21585
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef15 } from "react";
|
|
21580
21586
|
import React21, {
|
|
21581
21587
|
createContext as createContext21,
|
|
21582
21588
|
createRef as createRef2,
|
|
@@ -21596,7 +21602,7 @@ import {
|
|
|
21596
21602
|
useCallback as useCallback13,
|
|
21597
21603
|
useContext as useContext27,
|
|
21598
21604
|
useEffect as useEffect12,
|
|
21599
|
-
useLayoutEffect as
|
|
21605
|
+
useLayoutEffect as useLayoutEffect8,
|
|
21600
21606
|
useRef as useRef19
|
|
21601
21607
|
} from "react";
|
|
21602
21608
|
import { useCallback as useCallback12, useMemo as useMemo27, useRef as useRef17 } from "react";
|
|
@@ -21605,7 +21611,7 @@ import React22, {
|
|
|
21605
21611
|
useCallback as useCallback11,
|
|
21606
21612
|
useContext as useContext25,
|
|
21607
21613
|
useEffect as useEffect9,
|
|
21608
|
-
useLayoutEffect as
|
|
21614
|
+
useLayoutEffect as useLayoutEffect7,
|
|
21609
21615
|
useMemo as useMemo25,
|
|
21610
21616
|
useRef as useRef16,
|
|
21611
21617
|
useState as useState12
|
|
@@ -21622,7 +21628,7 @@ import {
|
|
|
21622
21628
|
useContext as useContext30,
|
|
21623
21629
|
useEffect as useEffect15,
|
|
21624
21630
|
useImperativeHandle as useImperativeHandle5,
|
|
21625
|
-
useLayoutEffect as
|
|
21631
|
+
useLayoutEffect as useLayoutEffect9,
|
|
21626
21632
|
useMemo as useMemo30,
|
|
21627
21633
|
useRef as useRef21
|
|
21628
21634
|
} from "react";
|
|
@@ -21643,7 +21649,7 @@ import {
|
|
|
21643
21649
|
forwardRef as forwardRef9,
|
|
21644
21650
|
useCallback as useCallback17,
|
|
21645
21651
|
useContext as useContext32,
|
|
21646
|
-
useLayoutEffect as
|
|
21652
|
+
useLayoutEffect as useLayoutEffect10,
|
|
21647
21653
|
useMemo as useMemo32,
|
|
21648
21654
|
useRef as useRef23
|
|
21649
21655
|
} from "react";
|
|
@@ -21653,7 +21659,7 @@ import {
|
|
|
21653
21659
|
useCallback as useCallback18,
|
|
21654
21660
|
useContext as useContext33,
|
|
21655
21661
|
useImperativeHandle as useImperativeHandle7,
|
|
21656
|
-
useLayoutEffect as
|
|
21662
|
+
useLayoutEffect as useLayoutEffect11,
|
|
21657
21663
|
useMemo as useMemo33,
|
|
21658
21664
|
useRef as useRef24,
|
|
21659
21665
|
useState as useState16
|
|
@@ -21664,7 +21670,7 @@ import { jsx as jsx28 } from "react/jsx-runtime";
|
|
|
21664
21670
|
import {
|
|
21665
21671
|
useCallback as useCallback20,
|
|
21666
21672
|
useContext as useContext34,
|
|
21667
|
-
useLayoutEffect as
|
|
21673
|
+
useLayoutEffect as useLayoutEffect12,
|
|
21668
21674
|
useRef as useRef25,
|
|
21669
21675
|
useState as useState18
|
|
21670
21676
|
} from "react";
|
|
@@ -21694,7 +21700,7 @@ import {
|
|
|
21694
21700
|
useCallback as useCallback23,
|
|
21695
21701
|
useContext as useContext37,
|
|
21696
21702
|
useEffect as useEffect17,
|
|
21697
|
-
useLayoutEffect as
|
|
21703
|
+
useLayoutEffect as useLayoutEffect13,
|
|
21698
21704
|
useMemo as useMemo37,
|
|
21699
21705
|
useState as useState20
|
|
21700
21706
|
} from "react";
|
|
@@ -21727,7 +21733,7 @@ import {
|
|
|
21727
21733
|
useContext as useContext39,
|
|
21728
21734
|
useEffect as useEffect20,
|
|
21729
21735
|
useImperativeHandle as useImperativeHandle10,
|
|
21730
|
-
useLayoutEffect as
|
|
21736
|
+
useLayoutEffect as useLayoutEffect14,
|
|
21731
21737
|
useMemo as useMemo41,
|
|
21732
21738
|
useRef as useRef29
|
|
21733
21739
|
} from "react";
|
|
@@ -22920,7 +22926,7 @@ var getSingleChildComponent = (children) => {
|
|
|
22920
22926
|
}
|
|
22921
22927
|
return child.type;
|
|
22922
22928
|
};
|
|
22923
|
-
var VERSION = "4.0.
|
|
22929
|
+
var VERSION = "4.0.506";
|
|
22924
22930
|
var checkMultipleRemotionVersions = () => {
|
|
22925
22931
|
if (typeof globalThis === "undefined") {
|
|
22926
22932
|
return;
|
|
@@ -22971,6 +22977,7 @@ var SetTimelineContext = createContext13({
|
|
|
22971
22977
|
}
|
|
22972
22978
|
});
|
|
22973
22979
|
var TimelineContext = createContext13(null);
|
|
22980
|
+
var TimelineImperativeContext = createContext13(null);
|
|
22974
22981
|
var PlaybackRateContext = createContext13(null);
|
|
22975
22982
|
var AbsoluteTimeContext = createContext13(null);
|
|
22976
22983
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
@@ -22980,6 +22987,8 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
22980
22987
|
const audioAndVideoTags = useRef3([]);
|
|
22981
22988
|
const [_frame, setFrame] = useState2(() => getInitialFrameState());
|
|
22982
22989
|
const frame = frameState ?? _frame;
|
|
22990
|
+
const frameRef = useRef3(frame);
|
|
22991
|
+
frameRef.current = frame;
|
|
22983
22992
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
22984
22993
|
if (typeof window !== "undefined") {
|
|
22985
22994
|
useLayoutEffect(() => {
|
|
@@ -23015,6 +23024,13 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
23015
23024
|
audioAndVideoTags
|
|
23016
23025
|
};
|
|
23017
23026
|
}, [frame, playing]);
|
|
23027
|
+
const timelineImperativeContextValue = useMemo8(() => {
|
|
23028
|
+
return {
|
|
23029
|
+
frameRef,
|
|
23030
|
+
imperativePlaying,
|
|
23031
|
+
audioAndVideoTags
|
|
23032
|
+
};
|
|
23033
|
+
}, []);
|
|
23018
23034
|
const playbackRateContextValue = useMemo8(() => {
|
|
23019
23035
|
return {
|
|
23020
23036
|
playbackRate,
|
|
@@ -23031,11 +23047,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
23031
23047
|
value: timelineContextValue,
|
|
23032
23048
|
children: /* @__PURE__ */ jsx8(PlaybackRateContext.Provider, {
|
|
23033
23049
|
value: playbackRateContextValue,
|
|
23034
|
-
children: /* @__PURE__ */ jsx8(
|
|
23035
|
-
value:
|
|
23036
|
-
children: /* @__PURE__ */ jsx8(
|
|
23037
|
-
value:
|
|
23038
|
-
children
|
|
23050
|
+
children: /* @__PURE__ */ jsx8(TimelineImperativeContext.Provider, {
|
|
23051
|
+
value: timelineImperativeContextValue,
|
|
23052
|
+
children: /* @__PURE__ */ jsx8(TimelineContext.Provider, {
|
|
23053
|
+
value: timelineContextValue,
|
|
23054
|
+
children: /* @__PURE__ */ jsx8(SetTimelineContext.Provider, {
|
|
23055
|
+
value: setTimelineContextValue,
|
|
23056
|
+
children
|
|
23057
|
+
})
|
|
23039
23058
|
})
|
|
23040
23059
|
})
|
|
23041
23060
|
})
|
|
@@ -25860,6 +25879,31 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
25860
25879
|
}
|
|
25861
25880
|
return out;
|
|
25862
25881
|
};
|
|
25882
|
+
var createRuntimeValueStore = (initialSnapshot) => {
|
|
25883
|
+
let snapshot = initialSnapshot;
|
|
25884
|
+
const listeners = new Set;
|
|
25885
|
+
const store = {
|
|
25886
|
+
getSnapshot: () => snapshot,
|
|
25887
|
+
subscribe: (listener) => {
|
|
25888
|
+
listeners.add(listener);
|
|
25889
|
+
return () => {
|
|
25890
|
+
listeners.delete(listener);
|
|
25891
|
+
};
|
|
25892
|
+
}
|
|
25893
|
+
};
|
|
25894
|
+
return {
|
|
25895
|
+
store,
|
|
25896
|
+
setSnapshot: (newSnapshot) => {
|
|
25897
|
+
if (snapshot === newSnapshot) {
|
|
25898
|
+
return;
|
|
25899
|
+
}
|
|
25900
|
+
snapshot = newSnapshot;
|
|
25901
|
+
for (const listener of listeners) {
|
|
25902
|
+
listener();
|
|
25903
|
+
}
|
|
25904
|
+
}
|
|
25905
|
+
};
|
|
25906
|
+
};
|
|
25863
25907
|
var findPropsToDelete = ({
|
|
25864
25908
|
schema,
|
|
25865
25909
|
key,
|
|
@@ -26161,16 +26205,21 @@ var withInteractivitySchema = ({
|
|
|
26161
26205
|
props: cleanProps
|
|
26162
26206
|
}));
|
|
26163
26207
|
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(cleanProps, flatKeys, flatSchema), runtimeValues);
|
|
26208
|
+
const [runtimeValueStore] = useState4(() => createRuntimeValueStore(currentRuntimeValueDotNotation));
|
|
26209
|
+
useLayoutEffect2(() => {
|
|
26210
|
+
runtimeValueStore.setSnapshot(currentRuntimeValueDotNotation);
|
|
26211
|
+
}, [currentRuntimeValueDotNotation, runtimeValueStore]);
|
|
26164
26212
|
const controls = useMemo14(() => {
|
|
26165
26213
|
return {
|
|
26166
26214
|
schema: schemaWithSequenceName,
|
|
26167
26215
|
currentRuntimeValueDotNotation,
|
|
26216
|
+
runtimeValues: runtimeValueStore.store,
|
|
26168
26217
|
overrideId,
|
|
26169
26218
|
supportsEffects,
|
|
26170
26219
|
componentIdentity,
|
|
26171
26220
|
componentName
|
|
26172
26221
|
};
|
|
26173
|
-
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
26222
|
+
}, [currentRuntimeValueDotNotation, overrideId, runtimeValueStore.store]);
|
|
26174
26223
|
setStackForControls(controls, internalStack);
|
|
26175
26224
|
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
26176
26225
|
return computeEffectiveSchemaValuesDotNotation({
|
|
@@ -26355,6 +26404,32 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26355
26404
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
26356
26405
|
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
26357
26406
|
const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
|
|
26407
|
+
const controlsSchema = controls?.schema;
|
|
26408
|
+
const controlsRuntimeValues = controls?.runtimeValues;
|
|
26409
|
+
const controlsOverrideId = controls?.overrideId;
|
|
26410
|
+
const controlsSupportsEffects = controls?.supportsEffects;
|
|
26411
|
+
const controlsComponentIdentity = controls?.componentIdentity;
|
|
26412
|
+
const controlsComponentName = controls?.componentName;
|
|
26413
|
+
const registrationControls = useMemo15(() => {
|
|
26414
|
+
if (controlsSchema === undefined || controlsRuntimeValues === undefined || controlsOverrideId === undefined || controlsSupportsEffects === undefined || controlsComponentIdentity === undefined || controlsComponentName === undefined) {
|
|
26415
|
+
return null;
|
|
26416
|
+
}
|
|
26417
|
+
return {
|
|
26418
|
+
schema: controlsSchema,
|
|
26419
|
+
runtimeValues: controlsRuntimeValues,
|
|
26420
|
+
overrideId: controlsOverrideId,
|
|
26421
|
+
supportsEffects: controlsSupportsEffects,
|
|
26422
|
+
componentIdentity: controlsComponentIdentity,
|
|
26423
|
+
componentName: controlsComponentName
|
|
26424
|
+
};
|
|
26425
|
+
}, [
|
|
26426
|
+
controlsComponentIdentity,
|
|
26427
|
+
controlsComponentName,
|
|
26428
|
+
controlsOverrideId,
|
|
26429
|
+
controlsRuntimeValues,
|
|
26430
|
+
controlsSchema,
|
|
26431
|
+
controlsSupportsEffects
|
|
26432
|
+
]);
|
|
26358
26433
|
useEffect3(() => {
|
|
26359
26434
|
if (!env.isStudio) {
|
|
26360
26435
|
return;
|
|
@@ -26363,7 +26438,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26363
26438
|
if (isMedia.type === "image") {
|
|
26364
26439
|
registerSequence({
|
|
26365
26440
|
type: "image",
|
|
26366
|
-
controls:
|
|
26441
|
+
controls: registrationControls,
|
|
26367
26442
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
26368
26443
|
displayName: timelineClipName,
|
|
26369
26444
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -26387,7 +26462,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26387
26462
|
} else {
|
|
26388
26463
|
registerSequence({
|
|
26389
26464
|
type: isMedia.type,
|
|
26390
|
-
controls:
|
|
26465
|
+
controls: registrationControls,
|
|
26391
26466
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
26392
26467
|
displayName: timelineClipName,
|
|
26393
26468
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -26434,7 +26509,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26434
26509
|
getStack: () => stackRef.current,
|
|
26435
26510
|
premountDisplay: premountDisplay ?? null,
|
|
26436
26511
|
postmountDisplay: postmountDisplay ?? null,
|
|
26437
|
-
controls:
|
|
26512
|
+
controls: registrationControls,
|
|
26438
26513
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
26439
26514
|
refForOutline: refForOutline ?? null,
|
|
26440
26515
|
isInsideSeries,
|
|
@@ -26462,7 +26537,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26462
26537
|
premountDisplay,
|
|
26463
26538
|
postmountDisplay,
|
|
26464
26539
|
env.isStudio,
|
|
26465
|
-
|
|
26540
|
+
registrationControls,
|
|
26466
26541
|
_remotionInternalEffects,
|
|
26467
26542
|
isMedia,
|
|
26468
26543
|
resolvedDocumentationLink,
|
|
@@ -27388,7 +27463,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
27388
27463
|
imageDecoder?.close();
|
|
27389
27464
|
};
|
|
27390
27465
|
}, [imageDecoder]);
|
|
27391
|
-
|
|
27466
|
+
useLayoutEffect3(() => {
|
|
27392
27467
|
if (!imageDecoder) {
|
|
27393
27468
|
return;
|
|
27394
27469
|
}
|
|
@@ -27645,7 +27720,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
27645
27720
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
27646
27721
|
setRenderAssets(renderAssetsRef.current);
|
|
27647
27722
|
}, []);
|
|
27648
|
-
|
|
27723
|
+
useLayoutEffect4(() => {
|
|
27649
27724
|
if (typeof window !== "undefined") {
|
|
27650
27725
|
window.remotion_collectAssets = () => {
|
|
27651
27726
|
const assets = renderAssetsRef.current;
|
|
@@ -27675,7 +27750,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
|
27675
27750
|
const [id] = useState8(() => {
|
|
27676
27751
|
return String(Math.random());
|
|
27677
27752
|
});
|
|
27678
|
-
|
|
27753
|
+
useLayoutEffect5(() => {
|
|
27679
27754
|
if (!env.isRendering) {
|
|
27680
27755
|
return;
|
|
27681
27756
|
}
|
|
@@ -28993,7 +29068,7 @@ var useVolume = ({
|
|
|
28993
29068
|
}
|
|
28994
29069
|
const { audioContext, gainNode: masterGainNode } = sharedAudioContext;
|
|
28995
29070
|
if (typeof window !== "undefined") {
|
|
28996
|
-
|
|
29071
|
+
useLayoutEffect6(() => {
|
|
28997
29072
|
if (!audioContext) {
|
|
28998
29073
|
return;
|
|
28999
29074
|
}
|
|
@@ -29359,7 +29434,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
29359
29434
|
}
|
|
29360
29435
|
}, [blocks]);
|
|
29361
29436
|
if (typeof window !== "undefined") {
|
|
29362
|
-
|
|
29437
|
+
useLayoutEffect7(() => {
|
|
29363
29438
|
if (rendering) {
|
|
29364
29439
|
return;
|
|
29365
29440
|
}
|
|
@@ -29993,7 +30068,7 @@ var useMediaPlayback = ({
|
|
|
29993
30068
|
isPostmounting
|
|
29994
30069
|
]);
|
|
29995
30070
|
const env = useRemotionEnvironment();
|
|
29996
|
-
|
|
30071
|
+
useLayoutEffect8(() => {
|
|
29997
30072
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
29998
30073
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
29999
30074
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
@@ -30471,7 +30546,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
30471
30546
|
]);
|
|
30472
30547
|
const { src } = props;
|
|
30473
30548
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
30474
|
-
|
|
30549
|
+
useLayoutEffect9(() => {
|
|
30475
30550
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
30476
30551
|
return;
|
|
30477
30552
|
}
|
|
@@ -31118,7 +31193,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
31118
31193
|
resolvedPixelDensity,
|
|
31119
31194
|
canRetryMissingPaintRecord
|
|
31120
31195
|
]);
|
|
31121
|
-
|
|
31196
|
+
useLayoutEffect10(() => {
|
|
31122
31197
|
const placeholder = canvas2dRef.current;
|
|
31123
31198
|
if (!placeholder) {
|
|
31124
31199
|
throw new Error("Canvas not found");
|
|
@@ -31150,7 +31225,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
31150
31225
|
usesDirectLayoutCanvas
|
|
31151
31226
|
]);
|
|
31152
31227
|
const onPaintChangedRef = useRef23(false);
|
|
31153
|
-
|
|
31228
|
+
useLayoutEffect10(() => {
|
|
31154
31229
|
if (!onPaintChangedRef.current) {
|
|
31155
31230
|
onPaintChangedRef.current = true;
|
|
31156
31231
|
return;
|
|
@@ -31161,7 +31236,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
31161
31236
|
}
|
|
31162
31237
|
canvas.requestPaint?.();
|
|
31163
31238
|
}, [onPaint, memoizedEffects]);
|
|
31164
|
-
|
|
31239
|
+
useLayoutEffect10(() => {
|
|
31165
31240
|
const canvas = canvas2dRef.current;
|
|
31166
31241
|
if (!canvas) {
|
|
31167
31242
|
return;
|
|
@@ -31459,7 +31534,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
31459
31534
|
ref.current = canvas;
|
|
31460
31535
|
}
|
|
31461
31536
|
}, [ref, refForOutline]);
|
|
31462
|
-
|
|
31537
|
+
useLayoutEffect11(() => {
|
|
31463
31538
|
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
31464
31539
|
return;
|
|
31465
31540
|
}
|
|
@@ -31471,7 +31546,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
31471
31546
|
isPremounting,
|
|
31472
31547
|
pauseWhenLoading
|
|
31473
31548
|
]);
|
|
31474
|
-
|
|
31549
|
+
useLayoutEffect11(() => {
|
|
31475
31550
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
31476
31551
|
retries: delayRenderRetries ?? undefined,
|
|
31477
31552
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
@@ -31533,7 +31608,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
31533
31608
|
maxRetries,
|
|
31534
31609
|
onError
|
|
31535
31610
|
]);
|
|
31536
|
-
|
|
31611
|
+
useLayoutEffect11(() => {
|
|
31537
31612
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
31538
31613
|
return;
|
|
31539
31614
|
}
|
|
@@ -31861,7 +31936,7 @@ var ImgContent = ({
|
|
|
31861
31936
|
} catch {}
|
|
31862
31937
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
31863
31938
|
if (typeof window !== "undefined") {
|
|
31864
|
-
|
|
31939
|
+
useLayoutEffect12(() => {
|
|
31865
31940
|
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
31866
31941
|
return;
|
|
31867
31942
|
}
|
|
@@ -31873,7 +31948,7 @@ var ImgContent = ({
|
|
|
31873
31948
|
isPremounting,
|
|
31874
31949
|
pauseWhenLoading
|
|
31875
31950
|
]);
|
|
31876
|
-
|
|
31951
|
+
useLayoutEffect12(() => {
|
|
31877
31952
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
31878
31953
|
if (imageRef.current) {
|
|
31879
31954
|
imageRef.current.src = actualSrc;
|
|
@@ -32224,7 +32299,8 @@ var makeRemotionComponentIdentity = ({
|
|
|
32224
32299
|
};
|
|
32225
32300
|
var interactiveElementSchema = {
|
|
32226
32301
|
...baseSchema,
|
|
32227
|
-
...transformSchema
|
|
32302
|
+
...transformSchema,
|
|
32303
|
+
...cropSchema
|
|
32228
32304
|
};
|
|
32229
32305
|
var interactiveBackgroundElementSchema = {
|
|
32230
32306
|
...interactiveElementSchema,
|
|
@@ -32281,8 +32357,21 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
32281
32357
|
name,
|
|
32282
32358
|
showInTimeline,
|
|
32283
32359
|
controls,
|
|
32360
|
+
cropLeft,
|
|
32361
|
+
cropRight,
|
|
32362
|
+
cropTop,
|
|
32363
|
+
cropBottom,
|
|
32364
|
+
style,
|
|
32284
32365
|
...props2
|
|
32285
32366
|
} = propsWithControls;
|
|
32367
|
+
const croppedStyle = useCropStyle({
|
|
32368
|
+
cropLeft,
|
|
32369
|
+
cropRight,
|
|
32370
|
+
cropTop,
|
|
32371
|
+
cropBottom,
|
|
32372
|
+
style: style ?? null,
|
|
32373
|
+
componentName: displayName
|
|
32374
|
+
});
|
|
32286
32375
|
const refForOutline = useRef26(null);
|
|
32287
32376
|
const callbackRef = useCallback21((element) => {
|
|
32288
32377
|
refForOutline.current = element;
|
|
@@ -32302,6 +32391,7 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
32302
32391
|
outlineRef: refForOutline,
|
|
32303
32392
|
children: React31.createElement(tag, {
|
|
32304
32393
|
...props2,
|
|
32394
|
+
style: croppedStyle ?? undefined,
|
|
32305
32395
|
ref: callbackRef
|
|
32306
32396
|
})
|
|
32307
32397
|
});
|
|
@@ -33003,7 +33093,7 @@ var OffthreadVideoForRendering = ({
|
|
|
33003
33093
|
}, [toneMapped, currentTime, src, transparent]);
|
|
33004
33094
|
const [imageSrc, setImageSrc] = useState20(null);
|
|
33005
33095
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
33006
|
-
|
|
33096
|
+
useLayoutEffect13(() => {
|
|
33007
33097
|
if (!window.remotion_videoEnabled) {
|
|
33008
33098
|
return;
|
|
33009
33099
|
}
|
|
@@ -33538,6 +33628,7 @@ var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
|
33538
33628
|
function useRemotionContexts() {
|
|
33539
33629
|
const compositionManagerCtx = React41.useContext(CompositionManager);
|
|
33540
33630
|
const timelineContext = React41.useContext(TimelineContext);
|
|
33631
|
+
const timelineImperativeContext = React41.useContext(TimelineImperativeContext);
|
|
33541
33632
|
const setTimelineContext = React41.useContext(SetTimelineContext);
|
|
33542
33633
|
const sequenceContext = React41.useContext(SequenceContext);
|
|
33543
33634
|
const nonceContext = React41.useContext(NonceContext);
|
|
@@ -33553,6 +33644,7 @@ function useRemotionContexts() {
|
|
|
33553
33644
|
return useMemo39(() => ({
|
|
33554
33645
|
compositionManagerCtx,
|
|
33555
33646
|
timelineContext,
|
|
33647
|
+
timelineImperativeContext,
|
|
33556
33648
|
setTimelineContext,
|
|
33557
33649
|
sequenceContext,
|
|
33558
33650
|
nonceContext,
|
|
@@ -33571,6 +33663,7 @@ function useRemotionContexts() {
|
|
|
33571
33663
|
sequenceContext,
|
|
33572
33664
|
setTimelineContext,
|
|
33573
33665
|
timelineContext,
|
|
33666
|
+
timelineImperativeContext,
|
|
33574
33667
|
canUseRemotionHooksContext,
|
|
33575
33668
|
preloadContext,
|
|
33576
33669
|
resolveCompositionContext,
|
|
@@ -33604,15 +33697,18 @@ var RemotionContextProvider = (props2) => {
|
|
|
33604
33697
|
value: contexts.renderAssetManagerContext,
|
|
33605
33698
|
children: /* @__PURE__ */ jsx37(ResolveCompositionContext.Provider, {
|
|
33606
33699
|
value: contexts.resolveCompositionContext,
|
|
33607
|
-
children: /* @__PURE__ */ jsx37(
|
|
33608
|
-
value: contexts.
|
|
33609
|
-
children: /* @__PURE__ */ jsx37(
|
|
33610
|
-
value: contexts.
|
|
33611
|
-
children: /* @__PURE__ */ jsx37(
|
|
33612
|
-
value: contexts.
|
|
33613
|
-
children: /* @__PURE__ */ jsx37(
|
|
33614
|
-
value: contexts.
|
|
33615
|
-
children
|
|
33700
|
+
children: /* @__PURE__ */ jsx37(TimelineImperativeContext.Provider, {
|
|
33701
|
+
value: contexts.timelineImperativeContext,
|
|
33702
|
+
children: /* @__PURE__ */ jsx37(TimelineContext.Provider, {
|
|
33703
|
+
value: contexts.timelineContext,
|
|
33704
|
+
children: /* @__PURE__ */ jsx37(SetTimelineContext.Provider, {
|
|
33705
|
+
value: contexts.setTimelineContext,
|
|
33706
|
+
children: /* @__PURE__ */ jsx37(SequenceContext.Provider, {
|
|
33707
|
+
value: contexts.sequenceContext,
|
|
33708
|
+
children: /* @__PURE__ */ jsx37(BufferingContextReact.Provider, {
|
|
33709
|
+
value: contexts.bufferManagerContext,
|
|
33710
|
+
children
|
|
33711
|
+
})
|
|
33616
33712
|
})
|
|
33617
33713
|
})
|
|
33618
33714
|
})
|
|
@@ -33756,6 +33852,7 @@ var Internals = {
|
|
|
33756
33852
|
TimelinePosition: exports_timeline_position_state,
|
|
33757
33853
|
DelayRenderContextType,
|
|
33758
33854
|
TimelineContext,
|
|
33855
|
+
TimelineImperativeContext,
|
|
33759
33856
|
PlaybackRateContext,
|
|
33760
33857
|
AbsoluteTimeContext,
|
|
33761
33858
|
RenderAssetManagerProvider,
|
|
@@ -34340,7 +34437,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
34340
34437
|
]);
|
|
34341
34438
|
const { src } = props2;
|
|
34342
34439
|
if (environment.isRendering) {
|
|
34343
|
-
|
|
34440
|
+
useLayoutEffect14(() => {
|
|
34344
34441
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
34345
34442
|
return;
|
|
34346
34443
|
}
|