@remotion/promo-pages 4.0.487 → 4.0.489

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
package/dist/experts.js CHANGED
@@ -1100,7 +1100,13 @@ import {
1100
1100
  import { jsx as jsx26 } from "react/jsx-runtime";
1101
1101
  import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
1102
1102
  import { jsx as jsx27 } from "react/jsx-runtime";
1103
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
1103
+ import {
1104
+ useCallback as useCallback19,
1105
+ useContext as useContext33,
1106
+ useLayoutEffect as useLayoutEffect11,
1107
+ useRef as useRef24,
1108
+ useState as useState18
1109
+ } from "react";
1104
1110
  import { jsx as jsx28 } from "react/jsx-runtime";
1105
1111
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
1106
1112
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -1111,7 +1117,7 @@ import {
1111
1117
  useImperativeHandle as useImperativeHandle8,
1112
1118
  useMemo as useMemo32,
1113
1119
  useRef as useRef26,
1114
- useState as useState18
1120
+ useState as useState19
1115
1121
  } from "react";
1116
1122
  import { jsx as jsx30 } from "react/jsx-runtime";
1117
1123
  import React31 from "react";
@@ -1129,7 +1135,7 @@ import {
1129
1135
  useEffect as useEffect17,
1130
1136
  useLayoutEffect as useLayoutEffect12,
1131
1137
  useMemo as useMemo35,
1132
- useState as useState19
1138
+ useState as useState20
1133
1139
  } from "react";
1134
1140
  import { jsx as jsx33 } from "react/jsx-runtime";
1135
1141
  import React37, {
@@ -1140,7 +1146,7 @@ import React37, {
1140
1146
  useImperativeHandle as useImperativeHandle9,
1141
1147
  useMemo as useMemo36,
1142
1148
  useRef as useRef27,
1143
- useState as useState20
1149
+ useState as useState21
1144
1150
  } from "react";
1145
1151
  import { useEffect as useEffect18 } from "react";
1146
1152
  import { jsx as jsx34 } from "react/jsx-runtime";
@@ -2335,7 +2341,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2335
2341
  var addSequenceStackTraces = (component) => {
2336
2342
  componentsToAddStacksTo.push(component);
2337
2343
  };
2338
- var VERSION = "4.0.487";
2344
+ var VERSION = "4.0.489";
2339
2345
  var checkMultipleRemotionVersions = () => {
2340
2346
  if (typeof globalThis === "undefined") {
2341
2347
  return;
@@ -6019,7 +6025,7 @@ var useEffectChainState = () => {
6019
6025
  }
6020
6026
  }), []);
6021
6027
  };
6022
- var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
6028
+ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
6023
6029
  const canvasRef = useRef8(null);
6024
6030
  const chainState = useEffectChainState();
6025
6031
  const sourceCanvas = useMemo16(() => {
@@ -6083,7 +6089,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
6083
6089
  return /* @__PURE__ */ jsx13("canvas", {
6084
6090
  ref: canvasRef,
6085
6091
  className,
6086
- style
6092
+ style,
6093
+ ...props
6087
6094
  });
6088
6095
  };
6089
6096
  var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
@@ -6260,6 +6267,16 @@ var animatedImageSchema = {
6260
6267
  },
6261
6268
  ...transformSchema
6262
6269
  };
6270
+ var getCanvasPropsFromSequenceProps = (props) => {
6271
+ const canvasProps = {};
6272
+ const mutableCanvasProps = canvasProps;
6273
+ for (const key in props) {
6274
+ if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
6275
+ mutableCanvasProps[key] = props[key];
6276
+ }
6277
+ }
6278
+ return canvasProps;
6279
+ };
6263
6280
  var AnimatedImageContent = forwardRef4(({
6264
6281
  src,
6265
6282
  width,
@@ -6414,6 +6431,7 @@ var AnimatedImageInner = ({
6414
6431
  useImperativeHandle2(ref, () => {
6415
6432
  return actualRef.current;
6416
6433
  }, []);
6434
+ const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
6417
6435
  const animatedImageProps = {
6418
6436
  src,
6419
6437
  width,
@@ -6425,7 +6443,8 @@ var AnimatedImageInner = ({
6425
6443
  id,
6426
6444
  className,
6427
6445
  style,
6428
- requestInit
6446
+ requestInit,
6447
+ ...canvasProps
6429
6448
  };
6430
6449
  return /* @__PURE__ */ jsx14(Sequence, {
6431
6450
  layout: "none",
@@ -7362,6 +7381,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
7362
7381
  return ({
7363
7382
  node,
7364
7383
  mediaTimestamp,
7384
+ sourceOffset,
7365
7385
  scheduledTime,
7366
7386
  duration,
7367
7387
  offset,
@@ -7390,7 +7410,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
7390
7410
  }
7391
7411
  }
7392
7412
  const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
7393
- const mediaTime = mediaTimestamp + offset;
7413
+ const mediaTime = mediaTimestamp + offset - sourceOffset;
7394
7414
  const mediaEndTime = mediaTime + duration;
7395
7415
  const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
7396
7416
  const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
@@ -10187,13 +10207,18 @@ var CanvasImageContent = forwardRef10(({
10187
10207
  });
10188
10208
  const sequenceContext = useContext32(SequenceContext);
10189
10209
  const pendingLoadDelayRef = useRef23(null);
10190
- const continuePendingLoadDelay = useCallback17(() => {
10210
+ const [isLoadPending, setIsLoadPending] = useState16(false);
10211
+ const isPremounting = Boolean(sequenceContext?.premounting);
10212
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
10213
+ const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
10191
10214
  const pending = pendingLoadDelayRef.current;
10192
10215
  if (!pending || pending.continued) {
10193
10216
  return;
10194
10217
  }
10195
10218
  pending.continued = true;
10196
- pending.unblock();
10219
+ if (markAsReady) {
10220
+ setIsLoadPending(false);
10221
+ }
10197
10222
  continueRender2(pending.handle);
10198
10223
  pendingLoadDelayRef.current = null;
10199
10224
  }, [continueRender2]);
@@ -10215,23 +10240,30 @@ var CanvasImageContent = forwardRef10(({
10215
10240
  }
10216
10241
  }, [ref, refForOutline]);
10217
10242
  useLayoutEffect10(() => {
10218
- const isPremounting = Boolean(sequenceContext?.premounting);
10219
- const isPostmounting = Boolean(sequenceContext?.postmounting);
10243
+ if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
10244
+ return;
10245
+ }
10246
+ return delayPlayback().unblock;
10247
+ }, [
10248
+ delayPlayback,
10249
+ isLoadPending,
10250
+ isPostmounting,
10251
+ isPremounting,
10252
+ pauseWhenLoading
10253
+ ]);
10254
+ useLayoutEffect10(() => {
10220
10255
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
10221
10256
  retries: delayRenderRetries ?? undefined,
10222
10257
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
10223
10258
  });
10224
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
10225
- return;
10226
- };
10227
10259
  const controller = new AbortController;
10228
10260
  let cancelled = false;
10229
10261
  let errorCount = 0;
10230
10262
  let timeoutId = null;
10231
10263
  setLoadedImage(null);
10264
+ setIsLoadPending(true);
10232
10265
  pendingLoadDelayRef.current = {
10233
10266
  handle,
10234
- unblock,
10235
10267
  continued: false
10236
10268
  };
10237
10269
  const attemptLoad = () => {
@@ -10242,7 +10274,7 @@ var CanvasImageContent = forwardRef10(({
10242
10274
  setLoadedImage(image);
10243
10275
  }).catch((err) => {
10244
10276
  if (err.name === "AbortError") {
10245
- continuePendingLoadDelay();
10277
+ continuePendingLoadDelay({ markAsReady: false });
10246
10278
  return;
10247
10279
  }
10248
10280
  errorCount++;
@@ -10256,7 +10288,7 @@ var CanvasImageContent = forwardRef10(({
10256
10288
  }, backoff);
10257
10289
  } else if (onError) {
10258
10290
  onError(err);
10259
- continuePendingLoadDelay();
10291
+ continuePendingLoadDelay({ markAsReady: true });
10260
10292
  } else {
10261
10293
  cancelRender2(err);
10262
10294
  }
@@ -10269,21 +10301,17 @@ var CanvasImageContent = forwardRef10(({
10269
10301
  clearTimeout(timeoutId);
10270
10302
  }
10271
10303
  controller.abort();
10272
- continuePendingLoadDelay();
10304
+ continuePendingLoadDelay({ markAsReady: false });
10273
10305
  };
10274
10306
  }, [
10275
10307
  actualSrc,
10276
10308
  cancelRender2,
10277
10309
  continuePendingLoadDelay,
10278
- delayPlayback,
10279
10310
  delayRender2,
10280
10311
  delayRenderRetries,
10281
10312
  delayRenderTimeoutInMilliseconds,
10282
10313
  maxRetries,
10283
- onError,
10284
- pauseWhenLoading,
10285
- sequenceContext?.postmounting,
10286
- sequenceContext?.premounting
10314
+ onError
10287
10315
  ]);
10288
10316
  useLayoutEffect10(() => {
10289
10317
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
@@ -10335,7 +10363,7 @@ var CanvasImageContent = forwardRef10(({
10335
10363
  return;
10336
10364
  }
10337
10365
  continueRenderOnce();
10338
- continuePendingLoadDelay();
10366
+ continuePendingLoadDelay({ markAsReady: true });
10339
10367
  }
10340
10368
  });
10341
10369
  }
@@ -10346,7 +10374,7 @@ var CanvasImageContent = forwardRef10(({
10346
10374
  if (onError) {
10347
10375
  onError(err);
10348
10376
  continueRenderOnce();
10349
- continuePendingLoadDelay();
10377
+ continuePendingLoadDelay({ markAsReady: true });
10350
10378
  } else {
10351
10379
  cancelRender2(err);
10352
10380
  }
@@ -10517,6 +10545,7 @@ var ImgContent = ({
10517
10545
  const errors = useRef24({});
10518
10546
  const { delayPlayback } = useBufferState();
10519
10547
  const sequenceContext = useContext33(SequenceContext);
10548
+ const [isLoading, setIsLoading] = useState18(false);
10520
10549
  const _propsValid = true;
10521
10550
  if (!_propsValid) {
10522
10551
  throw new Error("typecheck error");
@@ -10549,6 +10578,8 @@ var ImgContent = ({
10549
10578
  }, timeout);
10550
10579
  }, []);
10551
10580
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
10581
+ const isPremounting = Boolean(sequenceContext?.premounting);
10582
+ const isPostmounting = Boolean(sequenceContext?.postmounting);
10552
10583
  const didGetError = useCallback19((e) => {
10553
10584
  if (!errors.current) {
10554
10585
  return;
@@ -10569,8 +10600,18 @@ var ImgContent = ({
10569
10600
  } catch {}
10570
10601
  }, [cancelRender2, maxRetries, onError, retryIn]);
10571
10602
  if (typeof window !== "undefined") {
10572
- const isPremounting = Boolean(sequenceContext?.premounting);
10573
- const isPostmounting = Boolean(sequenceContext?.postmounting);
10603
+ useLayoutEffect11(() => {
10604
+ if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
10605
+ return;
10606
+ }
10607
+ return delayPlayback().unblock;
10608
+ }, [
10609
+ delayPlayback,
10610
+ isLoading,
10611
+ isPostmounting,
10612
+ isPremounting,
10613
+ pauseWhenLoading
10614
+ ]);
10574
10615
  useLayoutEffect11(() => {
10575
10616
  if (window.process?.env?.NODE_ENV === "test") {
10576
10617
  if (imageRef.current) {
@@ -10582,13 +10623,11 @@ var ImgContent = ({
10582
10623
  if (!current) {
10583
10624
  return;
10584
10625
  }
10626
+ setIsLoading(true);
10585
10627
  const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
10586
10628
  retries: delayRenderRetries ?? undefined,
10587
10629
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
10588
10630
  });
10589
- const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
10590
- return;
10591
- };
10592
10631
  let unmounted = false;
10593
10632
  const onComplete = () => {
10594
10633
  if (unmounted) {
@@ -10602,7 +10641,7 @@ var ImgContent = ({
10602
10641
  if (current) {
10603
10642
  onImageFrame?.(current);
10604
10643
  }
10605
- unblock();
10644
+ setIsLoading(false);
10606
10645
  continueRender2(newHandle);
10607
10646
  };
10608
10647
  if (!imageRef.current) {
@@ -10621,17 +10660,12 @@ var ImgContent = ({
10621
10660
  return () => {
10622
10661
  unmounted = true;
10623
10662
  current.removeEventListener("load", onComplete);
10624
- unblock();
10625
10663
  continueRender2(newHandle);
10626
10664
  };
10627
10665
  }, [
10628
10666
  actualSrc,
10629
- delayPlayback,
10630
10667
  delayRenderRetries,
10631
10668
  delayRenderTimeoutInMilliseconds,
10632
- pauseWhenLoading,
10633
- isPremounting,
10634
- isPostmounting,
10635
10669
  onImageFrame,
10636
10670
  continueRender2,
10637
10671
  delayRender2
@@ -10949,9 +10983,9 @@ var CompositionManagerProvider = ({
10949
10983
  initialCompositions,
10950
10984
  initialCanvasContent
10951
10985
  }) => {
10952
- const [folders, setFolders] = useState18([]);
10953
- const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
10954
- const [compositions, setCompositions] = useState18(initialCompositions);
10986
+ const [folders, setFolders] = useState19([]);
10987
+ const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
10988
+ const [compositions, setCompositions] = useState19(initialCompositions);
10955
10989
  const currentcompositionsRef = useRef26(compositions);
10956
10990
  const updateCompositions = useCallback21((updateComps) => {
10957
10991
  setCompositions((comps) => {
@@ -11522,7 +11556,7 @@ var OffthreadVideoForRendering = ({
11522
11556
  toneMapped
11523
11557
  });
11524
11558
  }, [toneMapped, currentTime, src, transparent]);
11525
- const [imageSrc, setImageSrc] = useState19(null);
11559
+ const [imageSrc, setImageSrc] = useState20(null);
11526
11560
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
11527
11561
  useLayoutEffect12(() => {
11528
11562
  if (!window.remotion_videoEnabled) {
@@ -11726,7 +11760,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11726
11760
  const parentSequence = useContext37(SequenceContext);
11727
11761
  const logLevel = useLogLevel();
11728
11762
  const mountTime = useMountTime();
11729
- const [timelineId] = useState20(() => String(Math.random()));
11763
+ const [timelineId] = useState21(() => String(Math.random()));
11730
11764
  if (typeof acceptableTimeShift !== "undefined") {
11731
11765
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
11732
11766
  }
@@ -11797,7 +11831,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11797
11831
  useImperativeHandle9(ref, () => {
11798
11832
  return videoRef.current;
11799
11833
  }, []);
11800
- useState20(() => playbackLogging({
11834
+ useState21(() => playbackLogging({
11801
11835
  logLevel,
11802
11836
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
11803
11837
  tag: "video",