@remotion/promo-pages 4.0.487 → 4.0.488

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.
Files changed (33) hide show
  1. package/dist/Homepage.js +246 -196
  2. package/dist/components/Homepage.js +21 -5
  3. package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
  4. package/dist/components/homepage/CanvasSectionTitle.js +14 -0
  5. package/dist/components/homepage/CommunityStatsItems.js +2 -2
  6. package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
  7. package/dist/components/homepage/Demo/DisplayedEmoji.js +3 -5
  8. package/dist/components/homepage/Demo/math.d.ts +1 -1
  9. package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
  10. package/dist/components/homepage/EditorStarterSection.js +8 -0
  11. package/dist/components/homepage/GitHubButton.js +1 -1
  12. package/dist/components/homepage/MakeVideosAgentically.d.ts +10 -0
  13. package/dist/components/homepage/MakeVideosAgentically.js +37 -0
  14. package/dist/components/homepage/MakeVideosInteractively.d.ts +9 -0
  15. package/dist/components/homepage/MakeVideosInteractively.js +16 -0
  16. package/dist/components/homepage/MakeVideosLinks.d.ts +9 -0
  17. package/dist/components/homepage/MakeVideosLinks.js +17 -0
  18. package/dist/components/homepage/MakeVideosProgrammatically.d.ts +9 -0
  19. package/dist/components/homepage/MakeVideosProgrammatically.js +8 -0
  20. package/dist/components/homepage/Pricing.d.ts +1 -3
  21. package/dist/components/homepage/Pricing.js +2 -6
  22. package/dist/components/homepage/WriteInReact.js +1 -2
  23. package/dist/components/team/TrustSection.js +1 -1
  24. package/dist/design.js +89 -55
  25. package/dist/experts.js +78 -44
  26. package/dist/homepage/Pricing.js +80 -46
  27. package/dist/prompts/PromptsGallery.js +89 -55
  28. package/dist/prompts/PromptsShow.js +95 -61
  29. package/dist/prompts/PromptsSubmit.js +80 -46
  30. package/dist/team.js +80 -46
  31. package/dist/template-modal-content.js +86 -52
  32. package/dist/templates.js +80 -46
  33. package/package.json +17 -17
@@ -1381,7 +1381,7 @@ var getDefaultConfig = () => {
1381
1381
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1382
1382
 
1383
1383
  // ../design/dist/esm/index.mjs
1384
- import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState21 } from "react";
1384
+ import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
1385
1385
 
1386
1386
  // ../paths/dist/esm/index.mjs
1387
1387
  var cutLInstruction = ({
@@ -4333,7 +4333,13 @@ import {
4333
4333
  import { jsx as jsx26 } from "react/jsx-runtime";
4334
4334
  import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
4335
4335
  import { jsx as jsx27 } from "react/jsx-runtime";
4336
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
4336
+ import {
4337
+ useCallback as useCallback19,
4338
+ useContext as useContext33,
4339
+ useLayoutEffect as useLayoutEffect11,
4340
+ useRef as useRef24,
4341
+ useState as useState18
4342
+ } from "react";
4337
4343
  import { jsx as jsx28 } from "react/jsx-runtime";
4338
4344
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4339
4345
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -4344,7 +4350,7 @@ import {
4344
4350
  useImperativeHandle as useImperativeHandle8,
4345
4351
  useMemo as useMemo32,
4346
4352
  useRef as useRef26,
4347
- useState as useState18
4353
+ useState as useState19
4348
4354
  } from "react";
4349
4355
  import { jsx as jsx30 } from "react/jsx-runtime";
4350
4356
  import React31 from "react";
@@ -4362,7 +4368,7 @@ import {
4362
4368
  useEffect as useEffect17,
4363
4369
  useLayoutEffect as useLayoutEffect12,
4364
4370
  useMemo as useMemo35,
4365
- useState as useState19
4371
+ useState as useState20
4366
4372
  } from "react";
4367
4373
  import { jsx as jsx33 } from "react/jsx-runtime";
4368
4374
  import React37, {
@@ -4373,7 +4379,7 @@ import React37, {
4373
4379
  useImperativeHandle as useImperativeHandle9,
4374
4380
  useMemo as useMemo36,
4375
4381
  useRef as useRef27,
4376
- useState as useState20
4382
+ useState as useState21
4377
4383
  } from "react";
4378
4384
  import { useEffect as useEffect18 } from "react";
4379
4385
  import { jsx as jsx34 } from "react/jsx-runtime";
@@ -5568,7 +5574,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5568
5574
  var addSequenceStackTraces = (component) => {
5569
5575
  componentsToAddStacksTo.push(component);
5570
5576
  };
5571
- var VERSION = "4.0.487";
5577
+ var VERSION = "4.0.488";
5572
5578
  var checkMultipleRemotionVersions = () => {
5573
5579
  if (typeof globalThis === "undefined") {
5574
5580
  return;
@@ -9252,7 +9258,7 @@ var useEffectChainState = () => {
9252
9258
  }
9253
9259
  }), []);
9254
9260
  };
9255
- var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
9261
+ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
9256
9262
  const canvasRef = useRef8(null);
9257
9263
  const chainState = useEffectChainState();
9258
9264
  const sourceCanvas = useMemo16(() => {
@@ -9316,7 +9322,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
9316
9322
  return /* @__PURE__ */ jsx13("canvas", {
9317
9323
  ref: canvasRef,
9318
9324
  className,
9319
- style
9325
+ style,
9326
+ ...props
9320
9327
  });
9321
9328
  };
9322
9329
  var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
@@ -9493,6 +9500,16 @@ var animatedImageSchema = {
9493
9500
  },
9494
9501
  ...transformSchema
9495
9502
  };
9503
+ var getCanvasPropsFromSequenceProps = (props) => {
9504
+ const canvasProps = {};
9505
+ const mutableCanvasProps = canvasProps;
9506
+ for (const key in props) {
9507
+ if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
9508
+ mutableCanvasProps[key] = props[key];
9509
+ }
9510
+ }
9511
+ return canvasProps;
9512
+ };
9496
9513
  var AnimatedImageContent = forwardRef4(({
9497
9514
  src,
9498
9515
  width,
@@ -9647,6 +9664,7 @@ var AnimatedImageInner = ({
9647
9664
  useImperativeHandle2(ref, () => {
9648
9665
  return actualRef.current;
9649
9666
  }, []);
9667
+ const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
9650
9668
  const animatedImageProps = {
9651
9669
  src,
9652
9670
  width,
@@ -9658,7 +9676,8 @@ var AnimatedImageInner = ({
9658
9676
  id,
9659
9677
  className,
9660
9678
  style,
9661
- requestInit
9679
+ requestInit,
9680
+ ...canvasProps
9662
9681
  };
9663
9682
  return /* @__PURE__ */ jsx14(Sequence, {
9664
9683
  layout: "none",
@@ -10595,6 +10614,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
10595
10614
  return ({
10596
10615
  node,
10597
10616
  mediaTimestamp,
10617
+ sourceOffset,
10598
10618
  scheduledTime,
10599
10619
  duration,
10600
10620
  offset,
@@ -10623,7 +10643,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
10623
10643
  }
10624
10644
  }
10625
10645
  const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
10626
- const mediaTime = mediaTimestamp + offset;
10646
+ const mediaTime = mediaTimestamp + offset - sourceOffset;
10627
10647
  const mediaEndTime = mediaTime + duration;
10628
10648
  const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
10629
10649
  const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
@@ -13420,13 +13440,18 @@ var CanvasImageContent = forwardRef10(({
13420
13440
  });
13421
13441
  const sequenceContext = useContext32(SequenceContext);
13422
13442
  const pendingLoadDelayRef = useRef23(null);
13423
- const continuePendingLoadDelay = useCallback17(() => {
13443
+ const [isLoadPending, setIsLoadPending] = useState16(false);
13444
+ const isPremounting = Boolean(sequenceContext?.premounting);
13445
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
13446
+ const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
13424
13447
  const pending = pendingLoadDelayRef.current;
13425
13448
  if (!pending || pending.continued) {
13426
13449
  return;
13427
13450
  }
13428
13451
  pending.continued = true;
13429
- pending.unblock();
13452
+ if (markAsReady) {
13453
+ setIsLoadPending(false);
13454
+ }
13430
13455
  continueRender2(pending.handle);
13431
13456
  pendingLoadDelayRef.current = null;
13432
13457
  }, [continueRender2]);
@@ -13448,23 +13473,30 @@ var CanvasImageContent = forwardRef10(({
13448
13473
  }
13449
13474
  }, [ref, refForOutline]);
13450
13475
  useLayoutEffect10(() => {
13451
- const isPremounting = Boolean(sequenceContext?.premounting);
13452
- const isPostmounting = Boolean(sequenceContext?.postmounting);
13476
+ if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
13477
+ return;
13478
+ }
13479
+ return delayPlayback().unblock;
13480
+ }, [
13481
+ delayPlayback,
13482
+ isLoadPending,
13483
+ isPostmounting,
13484
+ isPremounting,
13485
+ pauseWhenLoading
13486
+ ]);
13487
+ useLayoutEffect10(() => {
13453
13488
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
13454
13489
  retries: delayRenderRetries ?? undefined,
13455
13490
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
13456
13491
  });
13457
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
13458
- return;
13459
- };
13460
13492
  const controller = new AbortController;
13461
13493
  let cancelled = false;
13462
13494
  let errorCount = 0;
13463
13495
  let timeoutId = null;
13464
13496
  setLoadedImage(null);
13497
+ setIsLoadPending(true);
13465
13498
  pendingLoadDelayRef.current = {
13466
13499
  handle,
13467
- unblock,
13468
13500
  continued: false
13469
13501
  };
13470
13502
  const attemptLoad = () => {
@@ -13475,7 +13507,7 @@ var CanvasImageContent = forwardRef10(({
13475
13507
  setLoadedImage(image);
13476
13508
  }).catch((err) => {
13477
13509
  if (err.name === "AbortError") {
13478
- continuePendingLoadDelay();
13510
+ continuePendingLoadDelay({ markAsReady: false });
13479
13511
  return;
13480
13512
  }
13481
13513
  errorCount++;
@@ -13489,7 +13521,7 @@ var CanvasImageContent = forwardRef10(({
13489
13521
  }, backoff);
13490
13522
  } else if (onError) {
13491
13523
  onError(err);
13492
- continuePendingLoadDelay();
13524
+ continuePendingLoadDelay({ markAsReady: true });
13493
13525
  } else {
13494
13526
  cancelRender2(err);
13495
13527
  }
@@ -13502,21 +13534,17 @@ var CanvasImageContent = forwardRef10(({
13502
13534
  clearTimeout(timeoutId);
13503
13535
  }
13504
13536
  controller.abort();
13505
- continuePendingLoadDelay();
13537
+ continuePendingLoadDelay({ markAsReady: false });
13506
13538
  };
13507
13539
  }, [
13508
13540
  actualSrc,
13509
13541
  cancelRender2,
13510
13542
  continuePendingLoadDelay,
13511
- delayPlayback,
13512
13543
  delayRender2,
13513
13544
  delayRenderRetries,
13514
13545
  delayRenderTimeoutInMilliseconds,
13515
13546
  maxRetries,
13516
- onError,
13517
- pauseWhenLoading,
13518
- sequenceContext?.postmounting,
13519
- sequenceContext?.premounting
13547
+ onError
13520
13548
  ]);
13521
13549
  useLayoutEffect10(() => {
13522
13550
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
@@ -13568,7 +13596,7 @@ var CanvasImageContent = forwardRef10(({
13568
13596
  return;
13569
13597
  }
13570
13598
  continueRenderOnce();
13571
- continuePendingLoadDelay();
13599
+ continuePendingLoadDelay({ markAsReady: true });
13572
13600
  }
13573
13601
  });
13574
13602
  }
@@ -13579,7 +13607,7 @@ var CanvasImageContent = forwardRef10(({
13579
13607
  if (onError) {
13580
13608
  onError(err);
13581
13609
  continueRenderOnce();
13582
- continuePendingLoadDelay();
13610
+ continuePendingLoadDelay({ markAsReady: true });
13583
13611
  } else {
13584
13612
  cancelRender2(err);
13585
13613
  }
@@ -13750,6 +13778,7 @@ var ImgContent = ({
13750
13778
  const errors = useRef24({});
13751
13779
  const { delayPlayback } = useBufferState();
13752
13780
  const sequenceContext = useContext33(SequenceContext);
13781
+ const [isLoading, setIsLoading] = useState18(false);
13753
13782
  const _propsValid = true;
13754
13783
  if (!_propsValid) {
13755
13784
  throw new Error("typecheck error");
@@ -13782,6 +13811,8 @@ var ImgContent = ({
13782
13811
  }, timeout);
13783
13812
  }, []);
13784
13813
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
13814
+ const isPremounting = Boolean(sequenceContext?.premounting);
13815
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
13785
13816
  const didGetError = useCallback19((e) => {
13786
13817
  if (!errors.current) {
13787
13818
  return;
@@ -13802,8 +13833,18 @@ var ImgContent = ({
13802
13833
  } catch {}
13803
13834
  }, [cancelRender2, maxRetries, onError, retryIn]);
13804
13835
  if (typeof window !== "undefined") {
13805
- const isPremounting = Boolean(sequenceContext?.premounting);
13806
- const isPostmounting = Boolean(sequenceContext?.postmounting);
13836
+ useLayoutEffect11(() => {
13837
+ if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
13838
+ return;
13839
+ }
13840
+ return delayPlayback().unblock;
13841
+ }, [
13842
+ delayPlayback,
13843
+ isLoading,
13844
+ isPostmounting,
13845
+ isPremounting,
13846
+ pauseWhenLoading
13847
+ ]);
13807
13848
  useLayoutEffect11(() => {
13808
13849
  if (window.process?.env?.NODE_ENV === "test") {
13809
13850
  if (imageRef.current) {
@@ -13815,13 +13856,11 @@ var ImgContent = ({
13815
13856
  if (!current) {
13816
13857
  return;
13817
13858
  }
13859
+ setIsLoading(true);
13818
13860
  const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
13819
13861
  retries: delayRenderRetries ?? undefined,
13820
13862
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
13821
13863
  });
13822
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
13823
- return;
13824
- };
13825
13864
  let unmounted = false;
13826
13865
  const onComplete = () => {
13827
13866
  if (unmounted) {
@@ -13835,7 +13874,7 @@ var ImgContent = ({
13835
13874
  if (current) {
13836
13875
  onImageFrame?.(current);
13837
13876
  }
13838
- unblock();
13877
+ setIsLoading(false);
13839
13878
  continueRender2(newHandle);
13840
13879
  };
13841
13880
  if (!imageRef.current) {
@@ -13854,17 +13893,12 @@ var ImgContent = ({
13854
13893
  return () => {
13855
13894
  unmounted = true;
13856
13895
  current.removeEventListener("load", onComplete);
13857
- unblock();
13858
13896
  continueRender2(newHandle);
13859
13897
  };
13860
13898
  }, [
13861
13899
  actualSrc,
13862
- delayPlayback,
13863
13900
  delayRenderRetries,
13864
13901
  delayRenderTimeoutInMilliseconds,
13865
- pauseWhenLoading,
13866
- isPremounting,
13867
- isPostmounting,
13868
13902
  onImageFrame,
13869
13903
  continueRender2,
13870
13904
  delayRender2
@@ -14182,9 +14216,9 @@ var CompositionManagerProvider = ({
14182
14216
  initialCompositions,
14183
14217
  initialCanvasContent
14184
14218
  }) => {
14185
- const [folders, setFolders] = useState18([]);
14186
- const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
14187
- const [compositions, setCompositions] = useState18(initialCompositions);
14219
+ const [folders, setFolders] = useState19([]);
14220
+ const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
14221
+ const [compositions, setCompositions] = useState19(initialCompositions);
14188
14222
  const currentcompositionsRef = useRef26(compositions);
14189
14223
  const updateCompositions = useCallback21((updateComps) => {
14190
14224
  setCompositions((comps) => {
@@ -14755,7 +14789,7 @@ var OffthreadVideoForRendering = ({
14755
14789
  toneMapped
14756
14790
  });
14757
14791
  }, [toneMapped, currentTime, src, transparent]);
14758
- const [imageSrc, setImageSrc] = useState19(null);
14792
+ const [imageSrc, setImageSrc] = useState20(null);
14759
14793
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
14760
14794
  useLayoutEffect12(() => {
14761
14795
  if (!window.remotion_videoEnabled) {
@@ -14959,7 +14993,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14959
14993
  const parentSequence = useContext37(SequenceContext);
14960
14994
  const logLevel = useLogLevel();
14961
14995
  const mountTime = useMountTime();
14962
- const [timelineId] = useState20(() => String(Math.random()));
14996
+ const [timelineId] = useState21(() => String(Math.random()));
14963
14997
  if (typeof acceptableTimeShift !== "undefined") {
14964
14998
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
14965
14999
  }
@@ -15030,7 +15064,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
15030
15064
  useImperativeHandle9(ref, () => {
15031
15065
  return videoRef.current;
15032
15066
  }, []);
15033
- useState20(() => playbackLogging({
15067
+ useState21(() => playbackLogging({
15034
15068
  logLevel,
15035
15069
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
15036
15070
  tag: "video",
@@ -19525,7 +19559,7 @@ var getAngle = (ref, coordinates) => {
19525
19559
  };
19526
19560
  var lastCoordinates = null;
19527
19561
  var useMousePosition = (ref) => {
19528
- const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
19562
+ const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
19529
19563
  useEffect21(() => {
19530
19564
  const element = ref.current;
19531
19565
  if (!element) {