@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/homepage/Pricing.js
CHANGED
|
@@ -4197,7 +4197,13 @@ import React13, { createContext as createContext14 } from "react";
|
|
|
4197
4197
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4198
4198
|
import { useContext as useContext15, useMemo as useMemo13 } from "react";
|
|
4199
4199
|
import { createContext as createContext15 } from "react";
|
|
4200
|
-
import React14, {
|
|
4200
|
+
import React14, {
|
|
4201
|
+
forwardRef as forwardRef2,
|
|
4202
|
+
useContext as useContext17,
|
|
4203
|
+
useLayoutEffect as useLayoutEffect2,
|
|
4204
|
+
useMemo as useMemo14,
|
|
4205
|
+
useState as useState4
|
|
4206
|
+
} from "react";
|
|
4201
4207
|
import { useContext as useContext16, useRef as useRef5 } from "react";
|
|
4202
4208
|
import { createContext as createContext16 } from "react";
|
|
4203
4209
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4207,7 +4213,7 @@ import {
|
|
|
4207
4213
|
forwardRef as forwardRef4,
|
|
4208
4214
|
useEffect as useEffect5,
|
|
4209
4215
|
useImperativeHandle as useImperativeHandle2,
|
|
4210
|
-
useLayoutEffect as
|
|
4216
|
+
useLayoutEffect as useLayoutEffect3,
|
|
4211
4217
|
useRef as useRef10,
|
|
4212
4218
|
useState as useState6
|
|
4213
4219
|
} from "react";
|
|
@@ -4216,12 +4222,12 @@ import React17, { useCallback as useCallback8, useImperativeHandle, useMemo as u
|
|
|
4216
4222
|
import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef8 } from "react";
|
|
4217
4223
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
4218
4224
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4219
|
-
import { useContext as useContext19, useLayoutEffect as
|
|
4225
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState8 } from "react";
|
|
4220
4226
|
import {
|
|
4221
4227
|
createContext as createContext17,
|
|
4222
4228
|
useCallback as useCallback9,
|
|
4223
4229
|
useImperativeHandle as useImperativeHandle3,
|
|
4224
|
-
useLayoutEffect as
|
|
4230
|
+
useLayoutEffect as useLayoutEffect4,
|
|
4225
4231
|
useMemo as useMemo19,
|
|
4226
4232
|
useRef as useRef11,
|
|
4227
4233
|
useState as useState7
|
|
@@ -4245,7 +4251,7 @@ import React24, {
|
|
|
4245
4251
|
useRef as useRef20,
|
|
4246
4252
|
useState as useState14
|
|
4247
4253
|
} from "react";
|
|
4248
|
-
import { useContext as useContext22, useLayoutEffect as
|
|
4254
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef15 } from "react";
|
|
4249
4255
|
import React21, {
|
|
4250
4256
|
createContext as createContext21,
|
|
4251
4257
|
createRef as createRef2,
|
|
@@ -4265,7 +4271,7 @@ import {
|
|
|
4265
4271
|
useCallback as useCallback13,
|
|
4266
4272
|
useContext as useContext27,
|
|
4267
4273
|
useEffect as useEffect12,
|
|
4268
|
-
useLayoutEffect as
|
|
4274
|
+
useLayoutEffect as useLayoutEffect8,
|
|
4269
4275
|
useRef as useRef19
|
|
4270
4276
|
} from "react";
|
|
4271
4277
|
import { useCallback as useCallback12, useMemo as useMemo27, useRef as useRef17 } from "react";
|
|
@@ -4274,7 +4280,7 @@ import React22, {
|
|
|
4274
4280
|
useCallback as useCallback11,
|
|
4275
4281
|
useContext as useContext25,
|
|
4276
4282
|
useEffect as useEffect9,
|
|
4277
|
-
useLayoutEffect as
|
|
4283
|
+
useLayoutEffect as useLayoutEffect7,
|
|
4278
4284
|
useMemo as useMemo25,
|
|
4279
4285
|
useRef as useRef16,
|
|
4280
4286
|
useState as useState12
|
|
@@ -4291,7 +4297,7 @@ import {
|
|
|
4291
4297
|
useContext as useContext30,
|
|
4292
4298
|
useEffect as useEffect15,
|
|
4293
4299
|
useImperativeHandle as useImperativeHandle5,
|
|
4294
|
-
useLayoutEffect as
|
|
4300
|
+
useLayoutEffect as useLayoutEffect9,
|
|
4295
4301
|
useMemo as useMemo30,
|
|
4296
4302
|
useRef as useRef21
|
|
4297
4303
|
} from "react";
|
|
@@ -4312,7 +4318,7 @@ import {
|
|
|
4312
4318
|
forwardRef as forwardRef9,
|
|
4313
4319
|
useCallback as useCallback17,
|
|
4314
4320
|
useContext as useContext32,
|
|
4315
|
-
useLayoutEffect as
|
|
4321
|
+
useLayoutEffect as useLayoutEffect10,
|
|
4316
4322
|
useMemo as useMemo32,
|
|
4317
4323
|
useRef as useRef23
|
|
4318
4324
|
} from "react";
|
|
@@ -4322,7 +4328,7 @@ import {
|
|
|
4322
4328
|
useCallback as useCallback18,
|
|
4323
4329
|
useContext as useContext33,
|
|
4324
4330
|
useImperativeHandle as useImperativeHandle7,
|
|
4325
|
-
useLayoutEffect as
|
|
4331
|
+
useLayoutEffect as useLayoutEffect11,
|
|
4326
4332
|
useMemo as useMemo33,
|
|
4327
4333
|
useRef as useRef24,
|
|
4328
4334
|
useState as useState16
|
|
@@ -4333,7 +4339,7 @@ import { jsx as jsx28 } from "react/jsx-runtime";
|
|
|
4333
4339
|
import {
|
|
4334
4340
|
useCallback as useCallback20,
|
|
4335
4341
|
useContext as useContext34,
|
|
4336
|
-
useLayoutEffect as
|
|
4342
|
+
useLayoutEffect as useLayoutEffect12,
|
|
4337
4343
|
useRef as useRef25,
|
|
4338
4344
|
useState as useState18
|
|
4339
4345
|
} from "react";
|
|
@@ -4363,7 +4369,7 @@ import {
|
|
|
4363
4369
|
useCallback as useCallback23,
|
|
4364
4370
|
useContext as useContext37,
|
|
4365
4371
|
useEffect as useEffect17,
|
|
4366
|
-
useLayoutEffect as
|
|
4372
|
+
useLayoutEffect as useLayoutEffect13,
|
|
4367
4373
|
useMemo as useMemo37,
|
|
4368
4374
|
useState as useState20
|
|
4369
4375
|
} from "react";
|
|
@@ -4396,7 +4402,7 @@ import {
|
|
|
4396
4402
|
useContext as useContext39,
|
|
4397
4403
|
useEffect as useEffect20,
|
|
4398
4404
|
useImperativeHandle as useImperativeHandle10,
|
|
4399
|
-
useLayoutEffect as
|
|
4405
|
+
useLayoutEffect as useLayoutEffect14,
|
|
4400
4406
|
useMemo as useMemo41,
|
|
4401
4407
|
useRef as useRef29
|
|
4402
4408
|
} from "react";
|
|
@@ -5589,7 +5595,7 @@ var getSingleChildComponent = (children) => {
|
|
|
5589
5595
|
}
|
|
5590
5596
|
return child.type;
|
|
5591
5597
|
};
|
|
5592
|
-
var VERSION = "4.0.
|
|
5598
|
+
var VERSION = "4.0.506";
|
|
5593
5599
|
var checkMultipleRemotionVersions = () => {
|
|
5594
5600
|
if (typeof globalThis === "undefined") {
|
|
5595
5601
|
return;
|
|
@@ -5640,6 +5646,7 @@ var SetTimelineContext = createContext13({
|
|
|
5640
5646
|
}
|
|
5641
5647
|
});
|
|
5642
5648
|
var TimelineContext = createContext13(null);
|
|
5649
|
+
var TimelineImperativeContext = createContext13(null);
|
|
5643
5650
|
var PlaybackRateContext = createContext13(null);
|
|
5644
5651
|
var AbsoluteTimeContext = createContext13(null);
|
|
5645
5652
|
var TimelineContextProvider = ({ children, frameState }) => {
|
|
@@ -5649,6 +5656,8 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
5649
5656
|
const audioAndVideoTags = useRef3([]);
|
|
5650
5657
|
const [_frame, setFrame] = useState2(() => getInitialFrameState());
|
|
5651
5658
|
const frame = frameState ?? _frame;
|
|
5659
|
+
const frameRef = useRef3(frame);
|
|
5660
|
+
frameRef.current = frame;
|
|
5652
5661
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
5653
5662
|
if (typeof window !== "undefined") {
|
|
5654
5663
|
useLayoutEffect(() => {
|
|
@@ -5684,6 +5693,13 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
5684
5693
|
audioAndVideoTags
|
|
5685
5694
|
};
|
|
5686
5695
|
}, [frame, playing]);
|
|
5696
|
+
const timelineImperativeContextValue = useMemo8(() => {
|
|
5697
|
+
return {
|
|
5698
|
+
frameRef,
|
|
5699
|
+
imperativePlaying,
|
|
5700
|
+
audioAndVideoTags
|
|
5701
|
+
};
|
|
5702
|
+
}, []);
|
|
5687
5703
|
const playbackRateContextValue = useMemo8(() => {
|
|
5688
5704
|
return {
|
|
5689
5705
|
playbackRate,
|
|
@@ -5700,11 +5716,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
|
|
|
5700
5716
|
value: timelineContextValue,
|
|
5701
5717
|
children: /* @__PURE__ */ jsx8(PlaybackRateContext.Provider, {
|
|
5702
5718
|
value: playbackRateContextValue,
|
|
5703
|
-
children: /* @__PURE__ */ jsx8(
|
|
5704
|
-
value:
|
|
5705
|
-
children: /* @__PURE__ */ jsx8(
|
|
5706
|
-
value:
|
|
5707
|
-
children
|
|
5719
|
+
children: /* @__PURE__ */ jsx8(TimelineImperativeContext.Provider, {
|
|
5720
|
+
value: timelineImperativeContextValue,
|
|
5721
|
+
children: /* @__PURE__ */ jsx8(TimelineContext.Provider, {
|
|
5722
|
+
value: timelineContextValue,
|
|
5723
|
+
children: /* @__PURE__ */ jsx8(SetTimelineContext.Provider, {
|
|
5724
|
+
value: setTimelineContextValue,
|
|
5725
|
+
children
|
|
5726
|
+
})
|
|
5708
5727
|
})
|
|
5709
5728
|
})
|
|
5710
5729
|
})
|
|
@@ -8529,6 +8548,31 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
8529
8548
|
}
|
|
8530
8549
|
return out;
|
|
8531
8550
|
};
|
|
8551
|
+
var createRuntimeValueStore = (initialSnapshot) => {
|
|
8552
|
+
let snapshot = initialSnapshot;
|
|
8553
|
+
const listeners = new Set;
|
|
8554
|
+
const store = {
|
|
8555
|
+
getSnapshot: () => snapshot,
|
|
8556
|
+
subscribe: (listener) => {
|
|
8557
|
+
listeners.add(listener);
|
|
8558
|
+
return () => {
|
|
8559
|
+
listeners.delete(listener);
|
|
8560
|
+
};
|
|
8561
|
+
}
|
|
8562
|
+
};
|
|
8563
|
+
return {
|
|
8564
|
+
store,
|
|
8565
|
+
setSnapshot: (newSnapshot) => {
|
|
8566
|
+
if (snapshot === newSnapshot) {
|
|
8567
|
+
return;
|
|
8568
|
+
}
|
|
8569
|
+
snapshot = newSnapshot;
|
|
8570
|
+
for (const listener of listeners) {
|
|
8571
|
+
listener();
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
};
|
|
8575
|
+
};
|
|
8532
8576
|
var findPropsToDelete = ({
|
|
8533
8577
|
schema,
|
|
8534
8578
|
key,
|
|
@@ -8830,16 +8874,21 @@ var withInteractivitySchema = ({
|
|
|
8830
8874
|
props: cleanProps
|
|
8831
8875
|
}));
|
|
8832
8876
|
const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(cleanProps, flatKeys, flatSchema), runtimeValues);
|
|
8877
|
+
const [runtimeValueStore] = useState4(() => createRuntimeValueStore(currentRuntimeValueDotNotation));
|
|
8878
|
+
useLayoutEffect2(() => {
|
|
8879
|
+
runtimeValueStore.setSnapshot(currentRuntimeValueDotNotation);
|
|
8880
|
+
}, [currentRuntimeValueDotNotation, runtimeValueStore]);
|
|
8833
8881
|
const controls = useMemo14(() => {
|
|
8834
8882
|
return {
|
|
8835
8883
|
schema: schemaWithSequenceName,
|
|
8836
8884
|
currentRuntimeValueDotNotation,
|
|
8885
|
+
runtimeValues: runtimeValueStore.store,
|
|
8837
8886
|
overrideId,
|
|
8838
8887
|
supportsEffects,
|
|
8839
8888
|
componentIdentity,
|
|
8840
8889
|
componentName
|
|
8841
8890
|
};
|
|
8842
|
-
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
8891
|
+
}, [currentRuntimeValueDotNotation, overrideId, runtimeValueStore.store]);
|
|
8843
8892
|
setStackForControls(controls, internalStack);
|
|
8844
8893
|
const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
|
|
8845
8894
|
return computeEffectiveSchemaValuesDotNotation({
|
|
@@ -9024,6 +9073,32 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9024
9073
|
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
9025
9074
|
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
9026
9075
|
const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
|
|
9076
|
+
const controlsSchema = controls?.schema;
|
|
9077
|
+
const controlsRuntimeValues = controls?.runtimeValues;
|
|
9078
|
+
const controlsOverrideId = controls?.overrideId;
|
|
9079
|
+
const controlsSupportsEffects = controls?.supportsEffects;
|
|
9080
|
+
const controlsComponentIdentity = controls?.componentIdentity;
|
|
9081
|
+
const controlsComponentName = controls?.componentName;
|
|
9082
|
+
const registrationControls = useMemo15(() => {
|
|
9083
|
+
if (controlsSchema === undefined || controlsRuntimeValues === undefined || controlsOverrideId === undefined || controlsSupportsEffects === undefined || controlsComponentIdentity === undefined || controlsComponentName === undefined) {
|
|
9084
|
+
return null;
|
|
9085
|
+
}
|
|
9086
|
+
return {
|
|
9087
|
+
schema: controlsSchema,
|
|
9088
|
+
runtimeValues: controlsRuntimeValues,
|
|
9089
|
+
overrideId: controlsOverrideId,
|
|
9090
|
+
supportsEffects: controlsSupportsEffects,
|
|
9091
|
+
componentIdentity: controlsComponentIdentity,
|
|
9092
|
+
componentName: controlsComponentName
|
|
9093
|
+
};
|
|
9094
|
+
}, [
|
|
9095
|
+
controlsComponentIdentity,
|
|
9096
|
+
controlsComponentName,
|
|
9097
|
+
controlsOverrideId,
|
|
9098
|
+
controlsRuntimeValues,
|
|
9099
|
+
controlsSchema,
|
|
9100
|
+
controlsSupportsEffects
|
|
9101
|
+
]);
|
|
9027
9102
|
useEffect3(() => {
|
|
9028
9103
|
if (!env.isStudio) {
|
|
9029
9104
|
return;
|
|
@@ -9032,7 +9107,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9032
9107
|
if (isMedia.type === "image") {
|
|
9033
9108
|
registerSequence({
|
|
9034
9109
|
type: "image",
|
|
9035
|
-
controls:
|
|
9110
|
+
controls: registrationControls,
|
|
9036
9111
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
9037
9112
|
displayName: timelineClipName,
|
|
9038
9113
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -9056,7 +9131,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9056
9131
|
} else {
|
|
9057
9132
|
registerSequence({
|
|
9058
9133
|
type: isMedia.type,
|
|
9059
|
-
controls:
|
|
9134
|
+
controls: registrationControls,
|
|
9060
9135
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
9061
9136
|
displayName: timelineClipName,
|
|
9062
9137
|
documentationLink: resolvedDocumentationLink,
|
|
@@ -9103,7 +9178,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9103
9178
|
getStack: () => stackRef.current,
|
|
9104
9179
|
premountDisplay: premountDisplay ?? null,
|
|
9105
9180
|
postmountDisplay: postmountDisplay ?? null,
|
|
9106
|
-
controls:
|
|
9181
|
+
controls: registrationControls,
|
|
9107
9182
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
9108
9183
|
refForOutline: refForOutline ?? null,
|
|
9109
9184
|
isInsideSeries,
|
|
@@ -9131,7 +9206,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9131
9206
|
premountDisplay,
|
|
9132
9207
|
postmountDisplay,
|
|
9133
9208
|
env.isStudio,
|
|
9134
|
-
|
|
9209
|
+
registrationControls,
|
|
9135
9210
|
_remotionInternalEffects,
|
|
9136
9211
|
isMedia,
|
|
9137
9212
|
resolvedDocumentationLink,
|
|
@@ -10057,7 +10132,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
10057
10132
|
imageDecoder?.close();
|
|
10058
10133
|
};
|
|
10059
10134
|
}, [imageDecoder]);
|
|
10060
|
-
|
|
10135
|
+
useLayoutEffect3(() => {
|
|
10061
10136
|
if (!imageDecoder) {
|
|
10062
10137
|
return;
|
|
10063
10138
|
}
|
|
@@ -10314,7 +10389,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
10314
10389
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
10315
10390
|
setRenderAssets(renderAssetsRef.current);
|
|
10316
10391
|
}, []);
|
|
10317
|
-
|
|
10392
|
+
useLayoutEffect4(() => {
|
|
10318
10393
|
if (typeof window !== "undefined") {
|
|
10319
10394
|
window.remotion_collectAssets = () => {
|
|
10320
10395
|
const assets = renderAssetsRef.current;
|
|
@@ -10344,7 +10419,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
|
10344
10419
|
const [id] = useState8(() => {
|
|
10345
10420
|
return String(Math.random());
|
|
10346
10421
|
});
|
|
10347
|
-
|
|
10422
|
+
useLayoutEffect5(() => {
|
|
10348
10423
|
if (!env.isRendering) {
|
|
10349
10424
|
return;
|
|
10350
10425
|
}
|
|
@@ -11662,7 +11737,7 @@ var useVolume = ({
|
|
|
11662
11737
|
}
|
|
11663
11738
|
const { audioContext, gainNode: masterGainNode } = sharedAudioContext;
|
|
11664
11739
|
if (typeof window !== "undefined") {
|
|
11665
|
-
|
|
11740
|
+
useLayoutEffect6(() => {
|
|
11666
11741
|
if (!audioContext) {
|
|
11667
11742
|
return;
|
|
11668
11743
|
}
|
|
@@ -12028,7 +12103,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
12028
12103
|
}
|
|
12029
12104
|
}, [blocks]);
|
|
12030
12105
|
if (typeof window !== "undefined") {
|
|
12031
|
-
|
|
12106
|
+
useLayoutEffect7(() => {
|
|
12032
12107
|
if (rendering) {
|
|
12033
12108
|
return;
|
|
12034
12109
|
}
|
|
@@ -12662,7 +12737,7 @@ var useMediaPlayback = ({
|
|
|
12662
12737
|
isPostmounting
|
|
12663
12738
|
]);
|
|
12664
12739
|
const env = useRemotionEnvironment();
|
|
12665
|
-
|
|
12740
|
+
useLayoutEffect8(() => {
|
|
12666
12741
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
12667
12742
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
12668
12743
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
@@ -13140,7 +13215,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
13140
13215
|
]);
|
|
13141
13216
|
const { src } = props;
|
|
13142
13217
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
13143
|
-
|
|
13218
|
+
useLayoutEffect9(() => {
|
|
13144
13219
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
13145
13220
|
return;
|
|
13146
13221
|
}
|
|
@@ -13787,7 +13862,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13787
13862
|
resolvedPixelDensity,
|
|
13788
13863
|
canRetryMissingPaintRecord
|
|
13789
13864
|
]);
|
|
13790
|
-
|
|
13865
|
+
useLayoutEffect10(() => {
|
|
13791
13866
|
const placeholder = canvas2dRef.current;
|
|
13792
13867
|
if (!placeholder) {
|
|
13793
13868
|
throw new Error("Canvas not found");
|
|
@@ -13819,7 +13894,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13819
13894
|
usesDirectLayoutCanvas
|
|
13820
13895
|
]);
|
|
13821
13896
|
const onPaintChangedRef = useRef23(false);
|
|
13822
|
-
|
|
13897
|
+
useLayoutEffect10(() => {
|
|
13823
13898
|
if (!onPaintChangedRef.current) {
|
|
13824
13899
|
onPaintChangedRef.current = true;
|
|
13825
13900
|
return;
|
|
@@ -13830,7 +13905,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
13830
13905
|
}
|
|
13831
13906
|
canvas.requestPaint?.();
|
|
13832
13907
|
}, [onPaint, memoizedEffects]);
|
|
13833
|
-
|
|
13908
|
+
useLayoutEffect10(() => {
|
|
13834
13909
|
const canvas = canvas2dRef.current;
|
|
13835
13910
|
if (!canvas) {
|
|
13836
13911
|
return;
|
|
@@ -14128,7 +14203,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
14128
14203
|
ref.current = canvas;
|
|
14129
14204
|
}
|
|
14130
14205
|
}, [ref, refForOutline]);
|
|
14131
|
-
|
|
14206
|
+
useLayoutEffect11(() => {
|
|
14132
14207
|
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
14133
14208
|
return;
|
|
14134
14209
|
}
|
|
@@ -14140,7 +14215,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
14140
14215
|
isPremounting,
|
|
14141
14216
|
pauseWhenLoading
|
|
14142
14217
|
]);
|
|
14143
|
-
|
|
14218
|
+
useLayoutEffect11(() => {
|
|
14144
14219
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
14145
14220
|
retries: delayRenderRetries ?? undefined,
|
|
14146
14221
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
@@ -14202,7 +14277,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
14202
14277
|
maxRetries,
|
|
14203
14278
|
onError
|
|
14204
14279
|
]);
|
|
14205
|
-
|
|
14280
|
+
useLayoutEffect11(() => {
|
|
14206
14281
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
14207
14282
|
return;
|
|
14208
14283
|
}
|
|
@@ -14530,7 +14605,7 @@ var ImgContent = ({
|
|
|
14530
14605
|
} catch {}
|
|
14531
14606
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
14532
14607
|
if (typeof window !== "undefined") {
|
|
14533
|
-
|
|
14608
|
+
useLayoutEffect12(() => {
|
|
14534
14609
|
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
14535
14610
|
return;
|
|
14536
14611
|
}
|
|
@@ -14542,7 +14617,7 @@ var ImgContent = ({
|
|
|
14542
14617
|
isPremounting,
|
|
14543
14618
|
pauseWhenLoading
|
|
14544
14619
|
]);
|
|
14545
|
-
|
|
14620
|
+
useLayoutEffect12(() => {
|
|
14546
14621
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
14547
14622
|
if (imageRef.current) {
|
|
14548
14623
|
imageRef.current.src = actualSrc;
|
|
@@ -14893,7 +14968,8 @@ var makeRemotionComponentIdentity = ({
|
|
|
14893
14968
|
};
|
|
14894
14969
|
var interactiveElementSchema = {
|
|
14895
14970
|
...baseSchema,
|
|
14896
|
-
...transformSchema
|
|
14971
|
+
...transformSchema,
|
|
14972
|
+
...cropSchema
|
|
14897
14973
|
};
|
|
14898
14974
|
var interactiveBackgroundElementSchema = {
|
|
14899
14975
|
...interactiveElementSchema,
|
|
@@ -14950,8 +15026,21 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
14950
15026
|
name,
|
|
14951
15027
|
showInTimeline,
|
|
14952
15028
|
controls,
|
|
15029
|
+
cropLeft,
|
|
15030
|
+
cropRight,
|
|
15031
|
+
cropTop,
|
|
15032
|
+
cropBottom,
|
|
15033
|
+
style,
|
|
14953
15034
|
...props2
|
|
14954
15035
|
} = propsWithControls;
|
|
15036
|
+
const croppedStyle = useCropStyle({
|
|
15037
|
+
cropLeft,
|
|
15038
|
+
cropRight,
|
|
15039
|
+
cropTop,
|
|
15040
|
+
cropBottom,
|
|
15041
|
+
style: style ?? null,
|
|
15042
|
+
componentName: displayName
|
|
15043
|
+
});
|
|
14955
15044
|
const refForOutline = useRef26(null);
|
|
14956
15045
|
const callbackRef = useCallback21((element) => {
|
|
14957
15046
|
refForOutline.current = element;
|
|
@@ -14971,6 +15060,7 @@ var makeInteractiveElement = (tag, displayName, schema) => {
|
|
|
14971
15060
|
outlineRef: refForOutline,
|
|
14972
15061
|
children: React31.createElement(tag, {
|
|
14973
15062
|
...props2,
|
|
15063
|
+
style: croppedStyle ?? undefined,
|
|
14974
15064
|
ref: callbackRef
|
|
14975
15065
|
})
|
|
14976
15066
|
});
|
|
@@ -15672,7 +15762,7 @@ var OffthreadVideoForRendering = ({
|
|
|
15672
15762
|
}, [toneMapped, currentTime, src, transparent]);
|
|
15673
15763
|
const [imageSrc, setImageSrc] = useState20(null);
|
|
15674
15764
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
15675
|
-
|
|
15765
|
+
useLayoutEffect13(() => {
|
|
15676
15766
|
if (!window.remotion_videoEnabled) {
|
|
15677
15767
|
return;
|
|
15678
15768
|
}
|
|
@@ -16207,6 +16297,7 @@ var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
|
16207
16297
|
function useRemotionContexts() {
|
|
16208
16298
|
const compositionManagerCtx = React41.useContext(CompositionManager);
|
|
16209
16299
|
const timelineContext = React41.useContext(TimelineContext);
|
|
16300
|
+
const timelineImperativeContext = React41.useContext(TimelineImperativeContext);
|
|
16210
16301
|
const setTimelineContext = React41.useContext(SetTimelineContext);
|
|
16211
16302
|
const sequenceContext = React41.useContext(SequenceContext);
|
|
16212
16303
|
const nonceContext = React41.useContext(NonceContext);
|
|
@@ -16222,6 +16313,7 @@ function useRemotionContexts() {
|
|
|
16222
16313
|
return useMemo39(() => ({
|
|
16223
16314
|
compositionManagerCtx,
|
|
16224
16315
|
timelineContext,
|
|
16316
|
+
timelineImperativeContext,
|
|
16225
16317
|
setTimelineContext,
|
|
16226
16318
|
sequenceContext,
|
|
16227
16319
|
nonceContext,
|
|
@@ -16240,6 +16332,7 @@ function useRemotionContexts() {
|
|
|
16240
16332
|
sequenceContext,
|
|
16241
16333
|
setTimelineContext,
|
|
16242
16334
|
timelineContext,
|
|
16335
|
+
timelineImperativeContext,
|
|
16243
16336
|
canUseRemotionHooksContext,
|
|
16244
16337
|
preloadContext,
|
|
16245
16338
|
resolveCompositionContext,
|
|
@@ -16273,15 +16366,18 @@ var RemotionContextProvider = (props2) => {
|
|
|
16273
16366
|
value: contexts.renderAssetManagerContext,
|
|
16274
16367
|
children: /* @__PURE__ */ jsx37(ResolveCompositionContext.Provider, {
|
|
16275
16368
|
value: contexts.resolveCompositionContext,
|
|
16276
|
-
children: /* @__PURE__ */ jsx37(
|
|
16277
|
-
value: contexts.
|
|
16278
|
-
children: /* @__PURE__ */ jsx37(
|
|
16279
|
-
value: contexts.
|
|
16280
|
-
children: /* @__PURE__ */ jsx37(
|
|
16281
|
-
value: contexts.
|
|
16282
|
-
children: /* @__PURE__ */ jsx37(
|
|
16283
|
-
value: contexts.
|
|
16284
|
-
children
|
|
16369
|
+
children: /* @__PURE__ */ jsx37(TimelineImperativeContext.Provider, {
|
|
16370
|
+
value: contexts.timelineImperativeContext,
|
|
16371
|
+
children: /* @__PURE__ */ jsx37(TimelineContext.Provider, {
|
|
16372
|
+
value: contexts.timelineContext,
|
|
16373
|
+
children: /* @__PURE__ */ jsx37(SetTimelineContext.Provider, {
|
|
16374
|
+
value: contexts.setTimelineContext,
|
|
16375
|
+
children: /* @__PURE__ */ jsx37(SequenceContext.Provider, {
|
|
16376
|
+
value: contexts.sequenceContext,
|
|
16377
|
+
children: /* @__PURE__ */ jsx37(BufferingContextReact.Provider, {
|
|
16378
|
+
value: contexts.bufferManagerContext,
|
|
16379
|
+
children
|
|
16380
|
+
})
|
|
16285
16381
|
})
|
|
16286
16382
|
})
|
|
16287
16383
|
})
|
|
@@ -16425,6 +16521,7 @@ var Internals = {
|
|
|
16425
16521
|
TimelinePosition: exports_timeline_position_state,
|
|
16426
16522
|
DelayRenderContextType,
|
|
16427
16523
|
TimelineContext,
|
|
16524
|
+
TimelineImperativeContext,
|
|
16428
16525
|
PlaybackRateContext,
|
|
16429
16526
|
AbsoluteTimeContext,
|
|
16430
16527
|
RenderAssetManagerProvider,
|
|
@@ -17009,7 +17106,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
17009
17106
|
]);
|
|
17010
17107
|
const { src } = props2;
|
|
17011
17108
|
if (environment.isRendering) {
|
|
17012
|
-
|
|
17109
|
+
useLayoutEffect14(() => {
|
|
17013
17110
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
17014
17111
|
return;
|
|
17015
17112
|
}
|