@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/team.js CHANGED
@@ -4375,7 +4375,13 @@ import React13, { createContext as createContext14 } from "react";
4375
4375
  import { jsx as jsx11 } from "react/jsx-runtime";
4376
4376
  import { useContext as useContext15, useMemo as useMemo13 } from "react";
4377
4377
  import { createContext as createContext15 } from "react";
4378
- import React14, { forwardRef as forwardRef2, useContext as useContext17, useMemo as useMemo14, useState as useState4 } from "react";
4378
+ import React14, {
4379
+ forwardRef as forwardRef2,
4380
+ useContext as useContext17,
4381
+ useLayoutEffect as useLayoutEffect2,
4382
+ useMemo as useMemo14,
4383
+ useState as useState4
4384
+ } from "react";
4379
4385
  import { useContext as useContext16, useRef as useRef5 } from "react";
4380
4386
  import { createContext as createContext16 } from "react";
4381
4387
  import { jsx as jsx12 } from "react/jsx-runtime";
@@ -4385,7 +4391,7 @@ import {
4385
4391
  forwardRef as forwardRef4,
4386
4392
  useEffect as useEffect5,
4387
4393
  useImperativeHandle as useImperativeHandle2,
4388
- useLayoutEffect as useLayoutEffect2,
4394
+ useLayoutEffect as useLayoutEffect3,
4389
4395
  useRef as useRef10,
4390
4396
  useState as useState6
4391
4397
  } from "react";
@@ -4394,12 +4400,12 @@ import React17, { useCallback as useCallback8, useImperativeHandle, useMemo as u
4394
4400
  import { useEffect as useEffect4, useMemo as useMemo17, useRef as useRef8 } from "react";
4395
4401
  import { jsx as jsx14 } from "react/jsx-runtime";
4396
4402
  import { jsx as jsx15 } from "react/jsx-runtime";
4397
- import { useContext as useContext19, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
4403
+ import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState8 } from "react";
4398
4404
  import {
4399
4405
  createContext as createContext17,
4400
4406
  useCallback as useCallback9,
4401
4407
  useImperativeHandle as useImperativeHandle3,
4402
- useLayoutEffect as useLayoutEffect3,
4408
+ useLayoutEffect as useLayoutEffect4,
4403
4409
  useMemo as useMemo19,
4404
4410
  useRef as useRef11,
4405
4411
  useState as useState7
@@ -4423,7 +4429,7 @@ import React24, {
4423
4429
  useRef as useRef20,
4424
4430
  useState as useState14
4425
4431
  } from "react";
4426
- import { useContext as useContext22, useLayoutEffect as useLayoutEffect5, useRef as useRef15 } from "react";
4432
+ import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef15 } from "react";
4427
4433
  import React21, {
4428
4434
  createContext as createContext21,
4429
4435
  createRef as createRef2,
@@ -4443,7 +4449,7 @@ import {
4443
4449
  useCallback as useCallback13,
4444
4450
  useContext as useContext27,
4445
4451
  useEffect as useEffect12,
4446
- useLayoutEffect as useLayoutEffect7,
4452
+ useLayoutEffect as useLayoutEffect8,
4447
4453
  useRef as useRef19
4448
4454
  } from "react";
4449
4455
  import { useCallback as useCallback12, useMemo as useMemo27, useRef as useRef17 } from "react";
@@ -4452,7 +4458,7 @@ import React22, {
4452
4458
  useCallback as useCallback11,
4453
4459
  useContext as useContext25,
4454
4460
  useEffect as useEffect9,
4455
- useLayoutEffect as useLayoutEffect6,
4461
+ useLayoutEffect as useLayoutEffect7,
4456
4462
  useMemo as useMemo25,
4457
4463
  useRef as useRef16,
4458
4464
  useState as useState12
@@ -4469,7 +4475,7 @@ import {
4469
4475
  useContext as useContext30,
4470
4476
  useEffect as useEffect15,
4471
4477
  useImperativeHandle as useImperativeHandle5,
4472
- useLayoutEffect as useLayoutEffect8,
4478
+ useLayoutEffect as useLayoutEffect9,
4473
4479
  useMemo as useMemo30,
4474
4480
  useRef as useRef21
4475
4481
  } from "react";
@@ -4490,7 +4496,7 @@ import {
4490
4496
  forwardRef as forwardRef9,
4491
4497
  useCallback as useCallback17,
4492
4498
  useContext as useContext32,
4493
- useLayoutEffect as useLayoutEffect9,
4499
+ useLayoutEffect as useLayoutEffect10,
4494
4500
  useMemo as useMemo32,
4495
4501
  useRef as useRef23
4496
4502
  } from "react";
@@ -4500,7 +4506,7 @@ import {
4500
4506
  useCallback as useCallback18,
4501
4507
  useContext as useContext33,
4502
4508
  useImperativeHandle as useImperativeHandle7,
4503
- useLayoutEffect as useLayoutEffect10,
4509
+ useLayoutEffect as useLayoutEffect11,
4504
4510
  useMemo as useMemo33,
4505
4511
  useRef as useRef24,
4506
4512
  useState as useState16
@@ -4511,7 +4517,7 @@ import { jsx as jsx28 } from "react/jsx-runtime";
4511
4517
  import {
4512
4518
  useCallback as useCallback20,
4513
4519
  useContext as useContext34,
4514
- useLayoutEffect as useLayoutEffect11,
4520
+ useLayoutEffect as useLayoutEffect12,
4515
4521
  useRef as useRef25,
4516
4522
  useState as useState18
4517
4523
  } from "react";
@@ -4541,7 +4547,7 @@ import {
4541
4547
  useCallback as useCallback23,
4542
4548
  useContext as useContext37,
4543
4549
  useEffect as useEffect17,
4544
- useLayoutEffect as useLayoutEffect12,
4550
+ useLayoutEffect as useLayoutEffect13,
4545
4551
  useMemo as useMemo37,
4546
4552
  useState as useState20
4547
4553
  } from "react";
@@ -4574,7 +4580,7 @@ import {
4574
4580
  useContext as useContext39,
4575
4581
  useEffect as useEffect20,
4576
4582
  useImperativeHandle as useImperativeHandle10,
4577
- useLayoutEffect as useLayoutEffect13,
4583
+ useLayoutEffect as useLayoutEffect14,
4578
4584
  useMemo as useMemo41,
4579
4585
  useRef as useRef29
4580
4586
  } from "react";
@@ -5767,7 +5773,7 @@ var getSingleChildComponent = (children) => {
5767
5773
  }
5768
5774
  return child.type;
5769
5775
  };
5770
- var VERSION = "4.0.504";
5776
+ var VERSION = "4.0.506";
5771
5777
  var checkMultipleRemotionVersions = () => {
5772
5778
  if (typeof globalThis === "undefined") {
5773
5779
  return;
@@ -5818,6 +5824,7 @@ var SetTimelineContext = createContext13({
5818
5824
  }
5819
5825
  });
5820
5826
  var TimelineContext = createContext13(null);
5827
+ var TimelineImperativeContext = createContext13(null);
5821
5828
  var PlaybackRateContext = createContext13(null);
5822
5829
  var AbsoluteTimeContext = createContext13(null);
5823
5830
  var TimelineContextProvider = ({ children, frameState }) => {
@@ -5827,6 +5834,8 @@ var TimelineContextProvider = ({ children, frameState }) => {
5827
5834
  const audioAndVideoTags = useRef3([]);
5828
5835
  const [_frame, setFrame] = useState2(() => getInitialFrameState());
5829
5836
  const frame = frameState ?? _frame;
5837
+ const frameRef = useRef3(frame);
5838
+ frameRef.current = frame;
5830
5839
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
5831
5840
  if (typeof window !== "undefined") {
5832
5841
  useLayoutEffect(() => {
@@ -5862,6 +5871,13 @@ var TimelineContextProvider = ({ children, frameState }) => {
5862
5871
  audioAndVideoTags
5863
5872
  };
5864
5873
  }, [frame, playing]);
5874
+ const timelineImperativeContextValue = useMemo8(() => {
5875
+ return {
5876
+ frameRef,
5877
+ imperativePlaying,
5878
+ audioAndVideoTags
5879
+ };
5880
+ }, []);
5865
5881
  const playbackRateContextValue = useMemo8(() => {
5866
5882
  return {
5867
5883
  playbackRate,
@@ -5878,11 +5894,14 @@ var TimelineContextProvider = ({ children, frameState }) => {
5878
5894
  value: timelineContextValue,
5879
5895
  children: /* @__PURE__ */ jsx8(PlaybackRateContext.Provider, {
5880
5896
  value: playbackRateContextValue,
5881
- children: /* @__PURE__ */ jsx8(TimelineContext.Provider, {
5882
- value: timelineContextValue,
5883
- children: /* @__PURE__ */ jsx8(SetTimelineContext.Provider, {
5884
- value: setTimelineContextValue,
5885
- children
5897
+ children: /* @__PURE__ */ jsx8(TimelineImperativeContext.Provider, {
5898
+ value: timelineImperativeContextValue,
5899
+ children: /* @__PURE__ */ jsx8(TimelineContext.Provider, {
5900
+ value: timelineContextValue,
5901
+ children: /* @__PURE__ */ jsx8(SetTimelineContext.Provider, {
5902
+ value: setTimelineContextValue,
5903
+ children
5904
+ })
5886
5905
  })
5887
5906
  })
5888
5907
  })
@@ -8707,6 +8726,31 @@ var getFlatSchemaWithAllKeys = (schema) => {
8707
8726
  }
8708
8727
  return out;
8709
8728
  };
8729
+ var createRuntimeValueStore = (initialSnapshot) => {
8730
+ let snapshot = initialSnapshot;
8731
+ const listeners = new Set;
8732
+ const store = {
8733
+ getSnapshot: () => snapshot,
8734
+ subscribe: (listener) => {
8735
+ listeners.add(listener);
8736
+ return () => {
8737
+ listeners.delete(listener);
8738
+ };
8739
+ }
8740
+ };
8741
+ return {
8742
+ store,
8743
+ setSnapshot: (newSnapshot) => {
8744
+ if (snapshot === newSnapshot) {
8745
+ return;
8746
+ }
8747
+ snapshot = newSnapshot;
8748
+ for (const listener of listeners) {
8749
+ listener();
8750
+ }
8751
+ }
8752
+ };
8753
+ };
8710
8754
  var findPropsToDelete = ({
8711
8755
  schema,
8712
8756
  key,
@@ -9008,16 +9052,21 @@ var withInteractivitySchema = ({
9008
9052
  props: cleanProps
9009
9053
  }));
9010
9054
  const currentRuntimeValueDotNotation = useMemo14(() => readValuesFromProps(cleanProps, flatKeys, flatSchema), runtimeValues);
9055
+ const [runtimeValueStore] = useState4(() => createRuntimeValueStore(currentRuntimeValueDotNotation));
9056
+ useLayoutEffect2(() => {
9057
+ runtimeValueStore.setSnapshot(currentRuntimeValueDotNotation);
9058
+ }, [currentRuntimeValueDotNotation, runtimeValueStore]);
9011
9059
  const controls = useMemo14(() => {
9012
9060
  return {
9013
9061
  schema: schemaWithSequenceName,
9014
9062
  currentRuntimeValueDotNotation,
9063
+ runtimeValues: runtimeValueStore.store,
9015
9064
  overrideId,
9016
9065
  supportsEffects,
9017
9066
  componentIdentity,
9018
9067
  componentName
9019
9068
  };
9020
- }, [currentRuntimeValueDotNotation, overrideId]);
9069
+ }, [currentRuntimeValueDotNotation, overrideId, runtimeValueStore.store]);
9021
9070
  setStackForControls(controls, internalStack);
9022
9071
  const { merged: valuesDotNotation, propsToDelete } = useMemo14(() => {
9023
9072
  return computeEffectiveSchemaValuesDotNotation({
@@ -9202,6 +9251,32 @@ var RegularSequenceRefForwardingFunction = ({
9202
9251
  const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
9203
9252
  const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
9204
9253
  const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
9254
+ const controlsSchema = controls?.schema;
9255
+ const controlsRuntimeValues = controls?.runtimeValues;
9256
+ const controlsOverrideId = controls?.overrideId;
9257
+ const controlsSupportsEffects = controls?.supportsEffects;
9258
+ const controlsComponentIdentity = controls?.componentIdentity;
9259
+ const controlsComponentName = controls?.componentName;
9260
+ const registrationControls = useMemo15(() => {
9261
+ if (controlsSchema === undefined || controlsRuntimeValues === undefined || controlsOverrideId === undefined || controlsSupportsEffects === undefined || controlsComponentIdentity === undefined || controlsComponentName === undefined) {
9262
+ return null;
9263
+ }
9264
+ return {
9265
+ schema: controlsSchema,
9266
+ runtimeValues: controlsRuntimeValues,
9267
+ overrideId: controlsOverrideId,
9268
+ supportsEffects: controlsSupportsEffects,
9269
+ componentIdentity: controlsComponentIdentity,
9270
+ componentName: controlsComponentName
9271
+ };
9272
+ }, [
9273
+ controlsComponentIdentity,
9274
+ controlsComponentName,
9275
+ controlsOverrideId,
9276
+ controlsRuntimeValues,
9277
+ controlsSchema,
9278
+ controlsSupportsEffects
9279
+ ]);
9205
9280
  useEffect3(() => {
9206
9281
  if (!env.isStudio) {
9207
9282
  return;
@@ -9210,7 +9285,7 @@ var RegularSequenceRefForwardingFunction = ({
9210
9285
  if (isMedia.type === "image") {
9211
9286
  registerSequence({
9212
9287
  type: "image",
9213
- controls: controls ?? null,
9288
+ controls: registrationControls,
9214
9289
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
9215
9290
  displayName: timelineClipName,
9216
9291
  documentationLink: resolvedDocumentationLink,
@@ -9234,7 +9309,7 @@ var RegularSequenceRefForwardingFunction = ({
9234
9309
  } else {
9235
9310
  registerSequence({
9236
9311
  type: isMedia.type,
9237
- controls: controls ?? null,
9312
+ controls: registrationControls,
9238
9313
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
9239
9314
  displayName: timelineClipName,
9240
9315
  documentationLink: resolvedDocumentationLink,
@@ -9281,7 +9356,7 @@ var RegularSequenceRefForwardingFunction = ({
9281
9356
  getStack: () => stackRef.current,
9282
9357
  premountDisplay: premountDisplay ?? null,
9283
9358
  postmountDisplay: postmountDisplay ?? null,
9284
- controls: controls ?? null,
9359
+ controls: registrationControls,
9285
9360
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
9286
9361
  refForOutline: refForOutline ?? null,
9287
9362
  isInsideSeries,
@@ -9309,7 +9384,7 @@ var RegularSequenceRefForwardingFunction = ({
9309
9384
  premountDisplay,
9310
9385
  postmountDisplay,
9311
9386
  env.isStudio,
9312
- controls,
9387
+ registrationControls,
9313
9388
  _remotionInternalEffects,
9314
9389
  isMedia,
9315
9390
  resolvedDocumentationLink,
@@ -10235,7 +10310,7 @@ var AnimatedImageContent = forwardRef4(({
10235
10310
  imageDecoder?.close();
10236
10311
  };
10237
10312
  }, [imageDecoder]);
10238
- useLayoutEffect2(() => {
10313
+ useLayoutEffect3(() => {
10239
10314
  if (!imageDecoder) {
10240
10315
  return;
10241
10316
  }
@@ -10492,7 +10567,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
10492
10567
  renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
10493
10568
  setRenderAssets(renderAssetsRef.current);
10494
10569
  }, []);
10495
- useLayoutEffect3(() => {
10570
+ useLayoutEffect4(() => {
10496
10571
  if (typeof window !== "undefined") {
10497
10572
  window.remotion_collectAssets = () => {
10498
10573
  const assets = renderAssetsRef.current;
@@ -10522,7 +10597,7 @@ var Artifact = ({ filename, content, downloadBehavior }) => {
10522
10597
  const [id] = useState8(() => {
10523
10598
  return String(Math.random());
10524
10599
  });
10525
- useLayoutEffect4(() => {
10600
+ useLayoutEffect5(() => {
10526
10601
  if (!env.isRendering) {
10527
10602
  return;
10528
10603
  }
@@ -11840,7 +11915,7 @@ var useVolume = ({
11840
11915
  }
11841
11916
  const { audioContext, gainNode: masterGainNode } = sharedAudioContext;
11842
11917
  if (typeof window !== "undefined") {
11843
- useLayoutEffect5(() => {
11918
+ useLayoutEffect6(() => {
11844
11919
  if (!audioContext) {
11845
11920
  return;
11846
11921
  }
@@ -12206,7 +12281,7 @@ var useBufferManager = (logLevel, mountTime) => {
12206
12281
  }
12207
12282
  }, [blocks]);
12208
12283
  if (typeof window !== "undefined") {
12209
- useLayoutEffect6(() => {
12284
+ useLayoutEffect7(() => {
12210
12285
  if (rendering) {
12211
12286
  return;
12212
12287
  }
@@ -12840,7 +12915,7 @@ var useMediaPlayback = ({
12840
12915
  isPostmounting
12841
12916
  ]);
12842
12917
  const env = useRemotionEnvironment();
12843
- useLayoutEffect7(() => {
12918
+ useLayoutEffect8(() => {
12844
12919
  const playbackRateToSet = Math.max(0, playbackRate);
12845
12920
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
12846
12921
  mediaRef.current.playbackRate = playbackRateToSet;
@@ -13318,7 +13393,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
13318
13393
  ]);
13319
13394
  const { src } = props;
13320
13395
  const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
13321
- useLayoutEffect8(() => {
13396
+ useLayoutEffect9(() => {
13322
13397
  if (window.process?.env?.NODE_ENV === "test") {
13323
13398
  return;
13324
13399
  }
@@ -13965,7 +14040,7 @@ var HtmlInCanvasContent = forwardRef9(({
13965
14040
  resolvedPixelDensity,
13966
14041
  canRetryMissingPaintRecord
13967
14042
  ]);
13968
- useLayoutEffect9(() => {
14043
+ useLayoutEffect10(() => {
13969
14044
  const placeholder = canvas2dRef.current;
13970
14045
  if (!placeholder) {
13971
14046
  throw new Error("Canvas not found");
@@ -13997,7 +14072,7 @@ var HtmlInCanvasContent = forwardRef9(({
13997
14072
  usesDirectLayoutCanvas
13998
14073
  ]);
13999
14074
  const onPaintChangedRef = useRef23(false);
14000
- useLayoutEffect9(() => {
14075
+ useLayoutEffect10(() => {
14001
14076
  if (!onPaintChangedRef.current) {
14002
14077
  onPaintChangedRef.current = true;
14003
14078
  return;
@@ -14008,7 +14083,7 @@ var HtmlInCanvasContent = forwardRef9(({
14008
14083
  }
14009
14084
  canvas.requestPaint?.();
14010
14085
  }, [onPaint, memoizedEffects]);
14011
- useLayoutEffect9(() => {
14086
+ useLayoutEffect10(() => {
14012
14087
  const canvas = canvas2dRef.current;
14013
14088
  if (!canvas) {
14014
14089
  return;
@@ -14306,7 +14381,7 @@ var CanvasImageContent = forwardRef10(({
14306
14381
  ref.current = canvas;
14307
14382
  }
14308
14383
  }, [ref, refForOutline]);
14309
- useLayoutEffect10(() => {
14384
+ useLayoutEffect11(() => {
14310
14385
  if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
14311
14386
  return;
14312
14387
  }
@@ -14318,7 +14393,7 @@ var CanvasImageContent = forwardRef10(({
14318
14393
  isPremounting,
14319
14394
  pauseWhenLoading
14320
14395
  ]);
14321
- useLayoutEffect10(() => {
14396
+ useLayoutEffect11(() => {
14322
14397
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
14323
14398
  retries: delayRenderRetries ?? undefined,
14324
14399
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
@@ -14380,7 +14455,7 @@ var CanvasImageContent = forwardRef10(({
14380
14455
  maxRetries,
14381
14456
  onError
14382
14457
  ]);
14383
- useLayoutEffect10(() => {
14458
+ useLayoutEffect11(() => {
14384
14459
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
14385
14460
  return;
14386
14461
  }
@@ -14708,7 +14783,7 @@ var ImgContent = ({
14708
14783
  } catch {}
14709
14784
  }, [cancelRender2, maxRetries, onError, retryIn]);
14710
14785
  if (typeof window !== "undefined") {
14711
- useLayoutEffect11(() => {
14786
+ useLayoutEffect12(() => {
14712
14787
  if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
14713
14788
  return;
14714
14789
  }
@@ -14720,7 +14795,7 @@ var ImgContent = ({
14720
14795
  isPremounting,
14721
14796
  pauseWhenLoading
14722
14797
  ]);
14723
- useLayoutEffect11(() => {
14798
+ useLayoutEffect12(() => {
14724
14799
  if (window.process?.env?.NODE_ENV === "test") {
14725
14800
  if (imageRef.current) {
14726
14801
  imageRef.current.src = actualSrc;
@@ -15071,7 +15146,8 @@ var makeRemotionComponentIdentity = ({
15071
15146
  };
15072
15147
  var interactiveElementSchema = {
15073
15148
  ...baseSchema,
15074
- ...transformSchema
15149
+ ...transformSchema,
15150
+ ...cropSchema
15075
15151
  };
15076
15152
  var interactiveBackgroundElementSchema = {
15077
15153
  ...interactiveElementSchema,
@@ -15128,8 +15204,21 @@ var makeInteractiveElement = (tag, displayName, schema) => {
15128
15204
  name,
15129
15205
  showInTimeline,
15130
15206
  controls,
15207
+ cropLeft,
15208
+ cropRight,
15209
+ cropTop,
15210
+ cropBottom,
15211
+ style,
15131
15212
  ...props2
15132
15213
  } = propsWithControls;
15214
+ const croppedStyle = useCropStyle({
15215
+ cropLeft,
15216
+ cropRight,
15217
+ cropTop,
15218
+ cropBottom,
15219
+ style: style ?? null,
15220
+ componentName: displayName
15221
+ });
15133
15222
  const refForOutline = useRef26(null);
15134
15223
  const callbackRef = useCallback21((element) => {
15135
15224
  refForOutline.current = element;
@@ -15149,6 +15238,7 @@ var makeInteractiveElement = (tag, displayName, schema) => {
15149
15238
  outlineRef: refForOutline,
15150
15239
  children: React31.createElement(tag, {
15151
15240
  ...props2,
15241
+ style: croppedStyle ?? undefined,
15152
15242
  ref: callbackRef
15153
15243
  })
15154
15244
  });
@@ -15850,7 +15940,7 @@ var OffthreadVideoForRendering = ({
15850
15940
  }, [toneMapped, currentTime, src, transparent]);
15851
15941
  const [imageSrc, setImageSrc] = useState20(null);
15852
15942
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
15853
- useLayoutEffect12(() => {
15943
+ useLayoutEffect13(() => {
15854
15944
  if (!window.remotion_videoEnabled) {
15855
15945
  return;
15856
15946
  }
@@ -16385,6 +16475,7 @@ var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
16385
16475
  function useRemotionContexts() {
16386
16476
  const compositionManagerCtx = React41.useContext(CompositionManager);
16387
16477
  const timelineContext = React41.useContext(TimelineContext);
16478
+ const timelineImperativeContext = React41.useContext(TimelineImperativeContext);
16388
16479
  const setTimelineContext = React41.useContext(SetTimelineContext);
16389
16480
  const sequenceContext = React41.useContext(SequenceContext);
16390
16481
  const nonceContext = React41.useContext(NonceContext);
@@ -16400,6 +16491,7 @@ function useRemotionContexts() {
16400
16491
  return useMemo39(() => ({
16401
16492
  compositionManagerCtx,
16402
16493
  timelineContext,
16494
+ timelineImperativeContext,
16403
16495
  setTimelineContext,
16404
16496
  sequenceContext,
16405
16497
  nonceContext,
@@ -16418,6 +16510,7 @@ function useRemotionContexts() {
16418
16510
  sequenceContext,
16419
16511
  setTimelineContext,
16420
16512
  timelineContext,
16513
+ timelineImperativeContext,
16421
16514
  canUseRemotionHooksContext,
16422
16515
  preloadContext,
16423
16516
  resolveCompositionContext,
@@ -16451,15 +16544,18 @@ var RemotionContextProvider = (props2) => {
16451
16544
  value: contexts.renderAssetManagerContext,
16452
16545
  children: /* @__PURE__ */ jsx37(ResolveCompositionContext.Provider, {
16453
16546
  value: contexts.resolveCompositionContext,
16454
- children: /* @__PURE__ */ jsx37(TimelineContext.Provider, {
16455
- value: contexts.timelineContext,
16456
- children: /* @__PURE__ */ jsx37(SetTimelineContext.Provider, {
16457
- value: contexts.setTimelineContext,
16458
- children: /* @__PURE__ */ jsx37(SequenceContext.Provider, {
16459
- value: contexts.sequenceContext,
16460
- children: /* @__PURE__ */ jsx37(BufferingContextReact.Provider, {
16461
- value: contexts.bufferManagerContext,
16462
- children
16547
+ children: /* @__PURE__ */ jsx37(TimelineImperativeContext.Provider, {
16548
+ value: contexts.timelineImperativeContext,
16549
+ children: /* @__PURE__ */ jsx37(TimelineContext.Provider, {
16550
+ value: contexts.timelineContext,
16551
+ children: /* @__PURE__ */ jsx37(SetTimelineContext.Provider, {
16552
+ value: contexts.setTimelineContext,
16553
+ children: /* @__PURE__ */ jsx37(SequenceContext.Provider, {
16554
+ value: contexts.sequenceContext,
16555
+ children: /* @__PURE__ */ jsx37(BufferingContextReact.Provider, {
16556
+ value: contexts.bufferManagerContext,
16557
+ children
16558
+ })
16463
16559
  })
16464
16560
  })
16465
16561
  })
@@ -16603,6 +16699,7 @@ var Internals = {
16603
16699
  TimelinePosition: exports_timeline_position_state,
16604
16700
  DelayRenderContextType,
16605
16701
  TimelineContext,
16702
+ TimelineImperativeContext,
16606
16703
  PlaybackRateContext,
16607
16704
  AbsoluteTimeContext,
16608
16705
  RenderAssetManagerProvider,
@@ -17187,7 +17284,7 @@ var VideoForRenderingForwardFunction = ({
17187
17284
  ]);
17188
17285
  const { src } = props2;
17189
17286
  if (environment.isRendering) {
17190
- useLayoutEffect13(() => {
17287
+ useLayoutEffect14(() => {
17191
17288
  if (window.process?.env?.NODE_ENV === "test") {
17192
17289
  return;
17193
17290
  }
@@ -27113,205 +27210,184 @@ var StarIcon = () => {
27113
27210
  };
27114
27211
  var TrustSection = () => {
27115
27212
  return /* @__PURE__ */ jsxs6("div", {
27116
- className: "mt-10",
27213
+ className: "mt-10 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
27117
27214
  children: [
27118
- /* @__PURE__ */ jsxs6("div", {
27119
- className: "inline-flex flex-col lg:flex-row gap-4 flex-wrap",
27215
+ /* @__PURE__ */ jsxs6(Card, {
27216
+ className: "text-left px-4 py-6",
27120
27217
  children: [
27121
- /* @__PURE__ */ jsxs6(Card, {
27122
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27123
- children: [
27124
- /* @__PURE__ */ jsx46(SwissIcon, {}),
27125
- /* @__PURE__ */ jsx46("div", {
27126
- className: "h-4"
27127
- }),
27128
- /* @__PURE__ */ jsx46("div", {
27129
- className: "font-brand font-bold text-2xl mb-2",
27130
- children: "Swiss quality"
27131
- }),
27132
- /* @__PURE__ */ jsxs6("div", {
27133
- className: "font-brand",
27134
- children: [
27135
- "We are a company based in Zurich, Switzerland. We",
27136
- "'",
27137
- "re far away from the craziness that is Silicon Valley."
27138
- ]
27139
- })
27140
- ]
27218
+ /* @__PURE__ */ jsx46(SwissIcon, {}),
27219
+ /* @__PURE__ */ jsx46("div", {
27220
+ className: "h-4"
27221
+ }),
27222
+ /* @__PURE__ */ jsx46("div", {
27223
+ className: "font-brand font-bold text-2xl mb-2",
27224
+ children: "Swiss quality"
27141
27225
  }),
27142
- /* @__PURE__ */ jsxs6(Card, {
27143
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27226
+ /* @__PURE__ */ jsxs6("div", {
27227
+ className: "font-brand",
27144
27228
  children: [
27145
- /* @__PURE__ */ jsx46(ProfitableIcon, {}),
27146
- /* @__PURE__ */ jsx46("div", {
27147
- className: "h-4"
27148
- }),
27149
- /* @__PURE__ */ jsx46("div", {
27150
- className: "font-brand font-bold text-2xl mb-2",
27151
- children: "Sustainable business"
27152
- }),
27153
- /* @__PURE__ */ jsxs6("div", {
27154
- className: "font-brand",
27155
- children: [
27156
- "Remotion is profitable. Aside from our",
27157
- " ",
27158
- /* @__PURE__ */ jsx46("a", {
27159
- href: "/docs/investors",
27160
- className: "text-brand hover:underline underline-offset-4",
27161
- children: "early investors"
27162
- }),
27163
- ", we don",
27164
- "'",
27165
- "t need outside investment to sustain the business."
27166
- ]
27167
- })
27229
+ "We are a company based in Zurich, Switzerland. We",
27230
+ "'",
27231
+ "re far away from the craziness that is Silicon Valley."
27168
27232
  ]
27233
+ })
27234
+ ]
27235
+ }),
27236
+ /* @__PURE__ */ jsxs6(Card, {
27237
+ className: "text-left px-4 py-6",
27238
+ children: [
27239
+ /* @__PURE__ */ jsx46(ProfitableIcon, {}),
27240
+ /* @__PURE__ */ jsx46("div", {
27241
+ className: "h-4"
27169
27242
  }),
27170
- /* @__PURE__ */ jsxs6(Card, {
27171
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27243
+ /* @__PURE__ */ jsx46("div", {
27244
+ className: "font-brand font-bold text-2xl mb-2",
27245
+ children: "Sustainable business"
27246
+ }),
27247
+ /* @__PURE__ */ jsxs6("div", {
27248
+ className: "font-brand",
27172
27249
  children: [
27173
- /* @__PURE__ */ jsx46(KeyIcon, {}),
27174
- /* @__PURE__ */ jsx46("div", {
27175
- className: "h-4"
27176
- }),
27177
- /* @__PURE__ */ jsx46("div", {
27178
- className: "font-brand font-bold text-2xl mb-2",
27179
- children: "Founder-owned"
27250
+ "Remotion is profitable. Aside from our",
27251
+ " ",
27252
+ /* @__PURE__ */ jsx46("a", {
27253
+ href: "/docs/investors",
27254
+ className: "text-brand hover:underline underline-offset-4",
27255
+ children: "early investors"
27180
27256
  }),
27181
- /* @__PURE__ */ jsx46("div", {
27182
- className: "font-brand",
27183
- children: "We, the founders, own the company. And we just want one thing: Make programmatic video glorious."
27184
- })
27257
+ ", we don",
27258
+ "'",
27259
+ "t need outside investment to sustain the business."
27185
27260
  ]
27186
27261
  })
27187
27262
  ]
27188
27263
  }),
27189
- /* @__PURE__ */ jsx46("div", {
27190
- className: "h-4"
27264
+ /* @__PURE__ */ jsxs6(Card, {
27265
+ className: "text-left px-4 py-6",
27266
+ children: [
27267
+ /* @__PURE__ */ jsx46(KeyIcon, {}),
27268
+ /* @__PURE__ */ jsx46("div", {
27269
+ className: "h-4"
27270
+ }),
27271
+ /* @__PURE__ */ jsx46("div", {
27272
+ className: "font-brand font-bold text-2xl mb-2",
27273
+ children: "Founder-owned"
27274
+ }),
27275
+ /* @__PURE__ */ jsx46("div", {
27276
+ className: "font-brand",
27277
+ children: "We, the founders, own the company. And we just want one thing: Make programmatic video glorious."
27278
+ })
27279
+ ]
27191
27280
  }),
27192
- /* @__PURE__ */ jsxs6("div", {
27193
- className: "inline-flex flex-col lg:flex-row gap-4 flex-wrap",
27281
+ /* @__PURE__ */ jsxs6(Card, {
27282
+ className: "text-left px-4 py-6",
27194
27283
  children: [
27195
- /* @__PURE__ */ jsxs6(Card, {
27196
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27197
- children: [
27198
- /* @__PURE__ */ jsx46(ClockIcon, {}),
27199
- /* @__PURE__ */ jsx46("div", {
27200
- className: "h-4"
27201
- }),
27202
- /* @__PURE__ */ jsx46("div", {
27203
- className: "font-brand font-bold text-2xl mb-2",
27204
- children: "5 years and counting"
27205
- }),
27206
- /* @__PURE__ */ jsx46("div", {
27207
- className: "font-brand",
27208
- children: "Making Remotion since 2021. No plans to change our business model or sell the company."
27209
- })
27210
- ]
27284
+ /* @__PURE__ */ jsx46(ClockIcon, {}),
27285
+ /* @__PURE__ */ jsx46("div", {
27286
+ className: "h-4"
27211
27287
  }),
27212
- /* @__PURE__ */ jsxs6(Card, {
27213
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27214
- children: [
27215
- /* @__PURE__ */ jsx46(ShieldIcon, {}),
27216
- /* @__PURE__ */ jsx46("div", {
27217
- className: "h-4"
27218
- }),
27219
- /* @__PURE__ */ jsx46("div", {
27220
- className: "font-brand font-bold text-2xl mb-2",
27221
- children: "Succession plan"
27222
- }),
27223
- /* @__PURE__ */ jsxs6("div", {
27224
- className: "font-brand",
27225
- children: [
27226
- "If something happens to us, the project will fall under",
27227
- " ",
27228
- /* @__PURE__ */ jsx46("a", {
27229
- href: "https://github.com/wcandillon",
27230
- target: "_blank",
27231
- className: "text-brand hover:underline underline-offset-4",
27232
- children: "William Candillon"
27233
- }),
27234
- "'s",
27235
- " supervision."
27236
- ]
27237
- })
27238
- ]
27288
+ /* @__PURE__ */ jsx46("div", {
27289
+ className: "font-brand font-bold text-2xl mb-2",
27290
+ children: "5 years and counting"
27239
27291
  }),
27240
- /* @__PURE__ */ jsxs6(Card, {
27241
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27292
+ /* @__PURE__ */ jsx46("div", {
27293
+ className: "font-brand",
27294
+ children: "Making Remotion since 2021. No plans to change our business model or sell the company."
27295
+ })
27296
+ ]
27297
+ }),
27298
+ /* @__PURE__ */ jsxs6(Card, {
27299
+ className: "text-left px-4 py-6",
27300
+ children: [
27301
+ /* @__PURE__ */ jsx46(ShieldIcon, {}),
27302
+ /* @__PURE__ */ jsx46("div", {
27303
+ className: "h-4"
27304
+ }),
27305
+ /* @__PURE__ */ jsx46("div", {
27306
+ className: "font-brand font-bold text-2xl mb-2",
27307
+ children: "Succession plan"
27308
+ }),
27309
+ /* @__PURE__ */ jsxs6("div", {
27310
+ className: "font-brand",
27242
27311
  children: [
27243
- /* @__PURE__ */ jsx46(UsersIcon, {}),
27244
- /* @__PURE__ */ jsx46("div", {
27245
- className: "h-4"
27246
- }),
27247
- /* @__PURE__ */ jsx46("div", {
27248
- className: "font-brand font-bold text-2xl mb-2",
27249
- children: "300+ customers"
27312
+ "If something happens to us, the project will fall under",
27313
+ " ",
27314
+ /* @__PURE__ */ jsx46("a", {
27315
+ href: "https://github.com/wcandillon",
27316
+ target: "_blank",
27317
+ className: "text-brand hover:underline underline-offset-4",
27318
+ children: "William Candillon"
27250
27319
  }),
27251
- /* @__PURE__ */ jsx46("div", {
27252
- className: "font-brand",
27253
- children: "More than 300 companies trust Remotion, from small businesses to FAANG."
27254
- })
27320
+ "'s",
27321
+ " supervision."
27255
27322
  ]
27256
27323
  })
27257
27324
  ]
27258
27325
  }),
27259
- /* @__PURE__ */ jsx46("div", {
27260
- className: "h-4"
27326
+ /* @__PURE__ */ jsxs6(Card, {
27327
+ className: "text-left px-4 py-6",
27328
+ children: [
27329
+ /* @__PURE__ */ jsx46(UsersIcon, {}),
27330
+ /* @__PURE__ */ jsx46("div", {
27331
+ className: "h-4"
27332
+ }),
27333
+ /* @__PURE__ */ jsx46("div", {
27334
+ className: "font-brand font-bold text-2xl mb-2",
27335
+ children: "400+ customers"
27336
+ }),
27337
+ /* @__PURE__ */ jsx46("div", {
27338
+ className: "font-brand",
27339
+ children: "More than 400 companies trust Remotion, from small businesses to FAANG / MANGOS."
27340
+ })
27341
+ ]
27261
27342
  }),
27262
- /* @__PURE__ */ jsxs6("div", {
27263
- className: "inline-flex flex-col lg:flex-row gap-4 flex-wrap",
27343
+ /* @__PURE__ */ jsxs6(Card, {
27344
+ className: "text-left px-4 py-6",
27264
27345
  children: [
27265
- /* @__PURE__ */ jsxs6(Card, {
27266
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27267
- children: [
27268
- /* @__PURE__ */ jsx46(CodeIcon, {}),
27269
- /* @__PURE__ */ jsx46("div", {
27270
- className: "h-4"
27271
- }),
27272
- /* @__PURE__ */ jsx46("div", {
27273
- className: "font-brand font-bold text-2xl mb-2",
27274
- children: "Source-available"
27275
- }),
27276
- /* @__PURE__ */ jsx46("div", {
27277
- className: "font-brand",
27278
- children: "Our code is publicly available on GitHub. You can inspect, fork, and self-host it. Full transparency, no black boxes."
27279
- })
27280
- ]
27346
+ /* @__PURE__ */ jsx46(CodeIcon, {}),
27347
+ /* @__PURE__ */ jsx46("div", {
27348
+ className: "h-4"
27281
27349
  }),
27282
- /* @__PURE__ */ jsxs6(Card, {
27283
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27284
- children: [
27285
- /* @__PURE__ */ jsx46(VideoIcon, {}),
27286
- /* @__PURE__ */ jsx46("div", {
27287
- className: "h-4"
27288
- }),
27289
- /* @__PURE__ */ jsx46("div", {
27290
- className: "font-brand font-bold text-2xl mb-2",
27291
- children: "2M+ videos/month"
27292
- }),
27293
- /* @__PURE__ */ jsx46("div", {
27294
- className: "font-brand",
27295
- children: "More than one million videos are rendered with Remotion every month. Battle-tested at scale."
27296
- })
27297
- ]
27350
+ /* @__PURE__ */ jsx46("div", {
27351
+ className: "font-brand font-bold text-2xl mb-2",
27352
+ children: "Source-available"
27298
27353
  }),
27299
- /* @__PURE__ */ jsxs6(Card, {
27300
- className: "lg:w-[300px] text-left px-4 py-6 flex-1",
27301
- children: [
27302
- /* @__PURE__ */ jsx46(StarIcon, {}),
27303
- /* @__PURE__ */ jsx46("div", {
27304
- className: "h-4"
27305
- }),
27306
- /* @__PURE__ */ jsx46("div", {
27307
- className: "font-brand font-bold text-2xl mb-2",
27308
- children: "50,000+ GitHub stars"
27309
- }),
27310
- /* @__PURE__ */ jsx46("div", {
27311
- className: "font-brand",
27312
- children: "One of the most popular media projects on GitHub. Trusted by the developer community."
27313
- })
27314
- ]
27354
+ /* @__PURE__ */ jsx46("div", {
27355
+ className: "font-brand",
27356
+ children: "Our code is publicly available on GitHub. You can inspect, fork, and self-host it. Full transparency, no black boxes."
27357
+ })
27358
+ ]
27359
+ }),
27360
+ /* @__PURE__ */ jsxs6(Card, {
27361
+ className: "text-left px-4 py-6",
27362
+ children: [
27363
+ /* @__PURE__ */ jsx46(VideoIcon, {}),
27364
+ /* @__PURE__ */ jsx46("div", {
27365
+ className: "h-4"
27366
+ }),
27367
+ /* @__PURE__ */ jsx46("div", {
27368
+ className: "font-brand font-bold text-2xl mb-2",
27369
+ children: "2M+ videos/month"
27370
+ }),
27371
+ /* @__PURE__ */ jsx46("div", {
27372
+ className: "font-brand",
27373
+ children: "More than two million videos are rendered with Remotion every month. Battle-tested at scale."
27374
+ })
27375
+ ]
27376
+ }),
27377
+ /* @__PURE__ */ jsxs6(Card, {
27378
+ className: "text-left px-4 py-6",
27379
+ children: [
27380
+ /* @__PURE__ */ jsx46(StarIcon, {}),
27381
+ /* @__PURE__ */ jsx46("div", {
27382
+ className: "h-4"
27383
+ }),
27384
+ /* @__PURE__ */ jsx46("div", {
27385
+ className: "font-brand font-bold text-2xl mb-2",
27386
+ children: "55,000+ GitHub stars"
27387
+ }),
27388
+ /* @__PURE__ */ jsx46("div", {
27389
+ className: "font-brand",
27390
+ children: "One of the most popular media projects on GitHub. Trusted by the developer community."
27315
27391
  })
27316
27392
  ]
27317
27393
  })