@remotion/promo-pages 4.0.352 → 4.0.353

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.
@@ -1,8 +1,8 @@
1
1
 
2
2
  
3
- > @remotion/promo-pages@4.0.352 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.353 make /Users/jonathanburger/remotion/packages/promo-pages
4
4
  > bun --env-file=../.env.bundle bundle.ts
5
5
 
6
6
  ≈ tailwindcss v4.1.1
7
7
 
8
- Done in 33ms
8
+ Done in 25ms
package/dist/Homepage.js CHANGED
@@ -739,7 +739,7 @@ var __defProp2, __export2 = (target, all) => {
739
739
  });
740
740
  }, useIsPlayer = () => {
741
741
  return useContext(IsPlayerContext);
742
- }, VERSION = "4.0.352", checkMultipleRemotionVersions = () => {
742
+ }, VERSION = "4.0.353", checkMultipleRemotionVersions = () => {
743
743
  if (typeof globalThis === "undefined") {
744
744
  return;
745
745
  }
@@ -1643,9 +1643,22 @@ Check that all your Remotion packages are on the same version. If your dependenc
1643
1643
  }
1644
1644
  };
1645
1645
  }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
1646
+ const newSequenceContext = useMemo8(() => {
1647
+ if (!sequenceContext) {
1648
+ return null;
1649
+ }
1650
+ return {
1651
+ ...sequenceContext,
1652
+ relativeFrom: 0,
1653
+ cumulatedFrom: 0
1654
+ };
1655
+ }, [sequenceContext]);
1646
1656
  return /* @__PURE__ */ jsx72(TimelineContext.Provider, {
1647
1657
  value: timelineValue,
1648
- children
1658
+ children: /* @__PURE__ */ jsx72(SequenceContext.Provider, {
1659
+ value: newSequenceContext,
1660
+ children
1661
+ })
1649
1662
  });
1650
1663
  }, RegularSequenceRefForwardingFunction = ({
1651
1664
  from = 0,
@@ -1883,6 +1896,37 @@ Check that all your Remotion packages are on the same version. If your dependenc
1883
1896
  return logLevels.indexOf(level);
1884
1897
  }, isEqualOrBelowLogLevel = (currentLevel, level) => {
1885
1898
  return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
1899
+ }, transformArgs = ({
1900
+ args,
1901
+ logLevel,
1902
+ tag
1903
+ }) => {
1904
+ const arr = [...args];
1905
+ if (getRemotionEnvironment().isRendering && !getRemotionEnvironment().isClientSideRendering) {
1906
+ arr.unshift(Symbol.for(`__remotion_level_${logLevel}`));
1907
+ }
1908
+ if (tag) {
1909
+ arr.unshift(Symbol.for(`__remotion_tag_${tag}`));
1910
+ }
1911
+ return arr;
1912
+ }, verbose = (options, ...args) => {
1913
+ if (isEqualOrBelowLogLevel(options.logLevel, "verbose")) {
1914
+ return console.debug(...transformArgs({ args, logLevel: "verbose", tag: options.tag }));
1915
+ }
1916
+ }, trace = (options, ...args) => {
1917
+ if (isEqualOrBelowLogLevel(options.logLevel, "trace")) {
1918
+ return console.debug(...transformArgs({ args, logLevel: "trace", tag: options.tag }));
1919
+ }
1920
+ }, info = (options, ...args) => {
1921
+ if (isEqualOrBelowLogLevel(options.logLevel, "info")) {
1922
+ return console.log(...transformArgs({ args, logLevel: "info", tag: options.tag }));
1923
+ }
1924
+ }, warn = (options, ...args) => {
1925
+ if (isEqualOrBelowLogLevel(options.logLevel, "warn")) {
1926
+ return console.warn(...transformArgs({ args, logLevel: "warn", tag: options.tag }));
1927
+ }
1928
+ }, error = (options, ...args) => {
1929
+ return console.error(...transformArgs({ args, logLevel: "error", tag: options.tag }));
1886
1930
  }, Log, handles, DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:", DELAY_RENDER_RETRIES_LEFT = "Retries left: ", DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.", DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after", defaultTimeout = 30000, delayRenderInternal = (environment, label, options) => {
1887
1931
  if (typeof label !== "string" && typeof label !== "undefined") {
1888
1932
  throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
@@ -1932,11 +1976,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
1932
1976
  const { label, startTime, timeout } = window.remotion_delayRenderTimeouts[handle];
1933
1977
  clearTimeout(timeout);
1934
1978
  const message = [
1935
- label ? `delayRender() "${label}"` : "A delayRender()",
1979
+ label ? `"${label}"` : "A handle",
1936
1980
  DELAY_RENDER_CLEAR_TOKEN,
1937
1981
  `${Date.now() - startTime}ms`
1938
1982
  ].filter(truthy).join(" ");
1939
- Log.verbose(window.remotion_logLevel, message);
1983
+ Log.verbose({ logLevel: window.remotion_logLevel, tag: "delayRender()" }, message);
1940
1984
  delete window.remotion_delayRenderTimeouts[handle];
1941
1985
  }
1942
1986
  return false;
@@ -2383,7 +2427,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2383
2427
  mountTime
2384
2428
  }) => {
2385
2429
  const tags = [mountTime ? Date.now() - mountTime + "ms " : null, tag].filter(Boolean).join(" ");
2386
- Log.trace(logLevel, `[${tags}]`, message);
2430
+ Log.trace({ logLevel, tag: null }, `[${tags}]`, message);
2387
2431
  }, PreloadContext, preloads, updaters, setPreloads = (updater) => {
2388
2432
  preloads = updater(preloads);
2389
2433
  updaters.forEach((u) => u());
@@ -2477,7 +2521,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2477
2521
  waitUntilDone: () => Promise.resolve(srcWithoutHash)
2478
2522
  };
2479
2523
  }
2480
- Log.verbose(logLevel, `[prefetch] Starting prefetch ${srcWithoutHash}`);
2524
+ Log.verbose({ logLevel, tag: "prefetch" }, `Starting prefetch ${srcWithoutHash}`);
2481
2525
  let canceled = false;
2482
2526
  let objectUrl = null;
2483
2527
  let resolve = () => {
@@ -2821,7 +2865,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2821
2865
  }
2822
2866
  warned = true;
2823
2867
  if (typeof window !== "undefined") {
2824
- Log.warn(logLevel, "AudioContext is not supported in this browser");
2868
+ Log.warn({ logLevel, tag: null }, "AudioContext is not supported in this browser");
2825
2869
  }
2826
2870
  }, useSingletonAudioContext = (logLevel, latencyHint) => {
2827
2871
  const audioContext = useMemo13(() => {
@@ -3170,9 +3214,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
3170
3214
  return;
3171
3215
  }
3172
3216
  warned2 = true;
3173
- Log.warn(logLevel, "In Safari, setting a volume and a playback rate at the same time is buggy.");
3174
- Log.warn(logLevel, "In Desktop Safari, only volumes <= 1 will be applied.");
3175
- Log.warn(logLevel, "In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.");
3217
+ Log.warn({ logLevel, tag: null }, "In Safari, setting a volume and a playback rate at the same time is buggy.");
3218
+ Log.warn({ logLevel, tag: null }, "In Desktop Safari, only volumes <= 1 will be applied.");
3219
+ Log.warn({ logLevel, tag: null }, logLevel, "In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set.");
3176
3220
  }, useVolume = ({
3177
3221
  mediaRef,
3178
3222
  volume,
@@ -3215,7 +3259,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3215
3259
  audioStuffRef.current = {
3216
3260
  gainNode
3217
3261
  };
3218
- Log.trace(logLevel, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3262
+ Log.trace({ logLevel, tag: null }, `Starting to amplify ${mediaRef.current?.src}. Gain = ${currentVolumeRef.current}, playbackRate = ${mediaRef.current?.playbackRate}`);
3219
3263
  return () => {
3220
3264
  audioStuffRef.current = null;
3221
3265
  gainNode.disconnect();
@@ -3227,7 +3271,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3227
3271
  const valueToSet = volume;
3228
3272
  if (!isApproximatelyTheSame(audioStuffRef.current.gainNode.gain.value, valueToSet)) {
3229
3273
  audioStuffRef.current.gainNode.gain.value = valueToSet;
3230
- Log.trace(logLevel, `Setting gain to ${valueToSet} for ${mediaRef.current?.src}`);
3274
+ Log.trace({ logLevel, tag: null }, `Setting gain to ${valueToSet} for ${mediaRef.current?.src}`);
3231
3275
  }
3232
3276
  }
3233
3277
  const safariCase = isSafari() && mediaRef.current && mediaRef.current?.playbackRate !== 1;
@@ -3595,8 +3639,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
3595
3639
  const onEndedOrPauseOrCanPlay = () => {
3596
3640
  unblock();
3597
3641
  };
3598
- current.requestVideoFrameCallback((_, info) => {
3599
- const differenceFromRequested = Math.abs(info.mediaTime - requestedTime);
3642
+ current.requestVideoFrameCallback((_, info2) => {
3643
+ const differenceFromRequested = Math.abs(info2.mediaTime - requestedTime);
3600
3644
  if (differenceFromRequested > 0.5) {
3601
3645
  onVariableFpsVideoDetected();
3602
3646
  }
@@ -3820,16 +3864,16 @@ Check that all your Remotion packages are on the same version. If your dependenc
3820
3864
  if (!videoTag) {
3821
3865
  return;
3822
3866
  }
3823
- const cb = videoTag.requestVideoFrameCallback((_, info) => {
3867
+ const cb = videoTag.requestVideoFrameCallback((_, info2) => {
3824
3868
  if (currentTime.current !== null) {
3825
- const difference = Math.abs(currentTime.current.time - info.mediaTime);
3826
- const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info.mediaTime - lastSeek.current);
3827
- if (difference > 0.5 && differenceToLastSeek > 0.5 && info.mediaTime > currentTime.current.time) {
3869
+ const difference = Math.abs(currentTime.current.time - info2.mediaTime);
3870
+ const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info2.mediaTime - lastSeek.current);
3871
+ if (difference > 0.5 && differenceToLastSeek > 0.5 && info2.mediaTime > currentTime.current.time) {
3828
3872
  onVariableFpsVideoDetected();
3829
3873
  }
3830
3874
  }
3831
3875
  currentTime.current = {
3832
- time: info.mediaTime,
3876
+ time: info2.mediaTime,
3833
3877
  lastUpdate: performance.now()
3834
3878
  };
3835
3879
  request();
@@ -3932,7 +3976,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3932
3976
  if (isVariableFpsVideoMap.current[src]) {
3933
3977
  return;
3934
3978
  }
3935
- Log.verbose(logLevel, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
3979
+ Log.verbose({ logLevel, tag: null }, `Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);
3936
3980
  isVariableFpsVideoMap.current[src] = true;
3937
3981
  }, [logLevel, src]);
3938
3982
  const rvcCurrentTime = useRequestVideoCallbackTime({
@@ -6296,29 +6340,11 @@ var init_esm = __esm(() => {
6296
6340
  Sequence = forwardRef2(SequenceRefForwardingFunction);
6297
6341
  logLevels = ["trace", "verbose", "info", "warn", "error"];
6298
6342
  Log = {
6299
- trace: (logLevel, ...args) => {
6300
- if (isEqualOrBelowLogLevel(logLevel, "trace")) {
6301
- return console.log(...args);
6302
- }
6303
- },
6304
- verbose: (logLevel, ...args) => {
6305
- if (isEqualOrBelowLogLevel(logLevel, "verbose")) {
6306
- return console.log(...args);
6307
- }
6308
- },
6309
- info: (logLevel, ...args) => {
6310
- if (isEqualOrBelowLogLevel(logLevel, "info")) {
6311
- return console.log(...args);
6312
- }
6313
- },
6314
- warn: (logLevel, ...args) => {
6315
- if (isEqualOrBelowLogLevel(logLevel, "warn")) {
6316
- return console.warn(...args);
6317
- }
6318
- },
6319
- error: (...args) => {
6320
- return console.error(...args);
6321
- }
6343
+ trace,
6344
+ verbose,
6345
+ info,
6346
+ warn,
6347
+ error
6322
6348
  };
6323
6349
  if (typeof window !== "undefined") {
6324
6350
  window.remotion_renderReady = false;
@@ -12875,9 +12901,9 @@ class PlayerEmitter {
12875
12901
  scale
12876
12902
  });
12877
12903
  };
12878
- dispatchError = (error) => {
12904
+ dispatchError = (error2) => {
12879
12905
  this.dispatchEvent("error", {
12880
- error
12906
+ error: error2
12881
12907
  });
12882
12908
  };
12883
12909
  dispatchTimeUpdate = (event) => {
@@ -12917,9 +12943,9 @@ class ThumbnailEmitter {
12917
12943
  callback({ detail: context });
12918
12944
  });
12919
12945
  }
12920
- dispatchError = (error) => {
12946
+ dispatchError = (error2) => {
12921
12947
  this.dispatchEvent("error", {
12922
- error
12948
+ error: error2
12923
12949
  });
12924
12950
  };
12925
12951
  dispatchWaiting = (event) => {
@@ -14498,11 +14524,11 @@ var errorStyle = {
14498
14524
 
14499
14525
  class ErrorBoundary extends React8.Component {
14500
14526
  state = { hasError: null };
14501
- static getDerivedStateFromError(error) {
14502
- return { hasError: error };
14527
+ static getDerivedStateFromError(error2) {
14528
+ return { hasError: error2 };
14503
14529
  }
14504
- componentDidCatch(error) {
14505
- this.props.onError(error);
14530
+ componentDidCatch(error2) {
14531
+ this.props.onError(error2);
14506
14532
  }
14507
14533
  render() {
14508
14534
  if (this.state.hasError) {
@@ -14614,8 +14640,8 @@ var cancellablePromise = (promise) => {
14614
14640
  return;
14615
14641
  }
14616
14642
  resolve(value);
14617
- }).catch((error) => {
14618
- reject({ isCanceled, error });
14643
+ }).catch((error2) => {
14644
+ reject({ isCanceled, error: error2 });
14619
14645
  });
14620
14646
  });
14621
14647
  return {
@@ -14657,10 +14683,10 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
14657
14683
  api.removePendingPromise(waitForClick);
14658
14684
  onClick(e);
14659
14685
  } catch (errorInfo) {
14660
- const info = errorInfo;
14686
+ const info2 = errorInfo;
14661
14687
  api.removePendingPromise(waitForClick);
14662
- if (!info.isCanceled) {
14663
- throw info.error;
14688
+ if (!info2.isCanceled) {
14689
+ throw info2.error;
14664
14690
  }
14665
14691
  }
14666
14692
  }, [api, onClick]);
@@ -15001,9 +15027,9 @@ var PlayerUI = ({
15001
15027
  }, [config, layout, overflowVisible, scale]);
15002
15028
  const playerPause = player.pause;
15003
15029
  const playerDispatchError = player.emitter.dispatchError;
15004
- const onError = useCallback112((error) => {
15030
+ const onError = useCallback112((error2) => {
15005
15031
  playerPause();
15006
- playerDispatchError(error);
15032
+ playerDispatchError(error2);
15007
15033
  }, [playerDispatchError, playerPause]);
15008
15034
  const onFullscreenButtonClick = useCallback112((e) => {
15009
15035
  e.stopPropagation();
@@ -15173,7 +15199,7 @@ var persistVolume = (volume, logLevel, volumePersistenceKey) => {
15173
15199
  try {
15174
15200
  window.localStorage.setItem(volumePersistenceKey ?? DEFAULT_VOLUME_PERSISTANCE_KEY, String(volume));
15175
15201
  } catch (e) {
15176
- Internals.Log.error(logLevel, "Could not persist volume", e);
15202
+ Internals.Log.error({ logLevel, tag: null }, "Could not persist volume", e);
15177
15203
  }
15178
15204
  };
15179
15205
  var getPreferredVolume = (volumePersistenceKey) => {
@@ -15302,7 +15328,7 @@ var acknowledgeRemotionLicenseMessage = (acknowledge, logLevel) => {
15302
15328
  return;
15303
15329
  }
15304
15330
  warningShown = true;
15305
- Internals.Log.warn(logLevel, "Note: Some companies are required to obtain a license to use Remotion. See: https://remotion.dev/license\nPass the `acknowledgeRemotionLicense` prop to `<Player />` function to make this message disappear.");
15331
+ Internals.Log.warn({ logLevel, tag: null }, "Note: Some companies are required to obtain a license to use Remotion. See: https://remotion.dev/license\nPass the `acknowledgeRemotionLicense` prop to `<Player />` function to make this message disappear.");
15306
15332
  };
15307
15333
  var validateSingleFrame = (frame, variableName) => {
15308
15334
  if (typeof frame === "undefined" || frame === null) {
@@ -15707,8 +15733,8 @@ var ThumbnailUI = ({
15707
15733
  overflowVisible
15708
15734
  });
15709
15735
  }, [config, layout, overflowVisible, scale]);
15710
- const onError = useCallback132((error) => {
15711
- thumbnail.emitter.dispatchError(error);
15736
+ const onError = useCallback132((error2) => {
15737
+ thumbnail.emitter.dispatchError(error2);
15712
15738
  }, [thumbnail.emitter]);
15713
15739
  const loadingMarkup = useMemo162(() => {
15714
15740
  return renderLoading ? renderLoading({
@@ -18914,7 +18940,7 @@ var Demo = () => {
18914
18940
  const [isFullscreen, setIsFullscreen] = useState33(false);
18915
18941
  const [cardOrder, setCardOrder] = useState33([0, 1, 2, 3]);
18916
18942
  const [emojiIndex, setEmojiIndex] = useState33(0);
18917
- const [error, setError] = useState33(false);
18943
+ const [error2, setError] = useState33(false);
18918
18944
  useEffect38(() => {
18919
18945
  getDataAndProps().then((d) => {
18920
18946
  setData(d);
@@ -19010,7 +19036,7 @@ var Demo = () => {
19010
19036
  })
19011
19037
  ]
19012
19038
  }),
19013
- error ? /* @__PURE__ */ jsx81(DemoError, {}) : null,
19039
+ error2 ? /* @__PURE__ */ jsx81(DemoError, {}) : null,
19014
19040
  /* @__PURE__ */ jsx81(DownloadNudge, {})
19015
19041
  ]
19016
19042
  });
@@ -20162,8 +20188,8 @@ var VideoAppsShowcase = () => {
20162
20188
  if (playPromise !== undefined) {
20163
20189
  playPromise.then(() => {
20164
20190
  setIsPlaying(true);
20165
- }).catch((error) => {
20166
- console.error("Playback error:", error);
20191
+ }).catch((error2) => {
20192
+ console.error("Playback error:", error2);
20167
20193
  setIsPlaying(false);
20168
20194
  });
20169
20195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.352",
3
+ "version": "4.0.353",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,14 +10,14 @@
10
10
  "polished": "4.3.1",
11
11
  "zod": "3.22.3",
12
12
  "bun-plugin-tailwind": "0.0.15",
13
- "@remotion/lottie": "4.0.352",
14
- "@remotion/player": "4.0.352",
15
- "@remotion/shapes": "4.0.352",
16
- "@remotion/animated-emoji": "4.0.352",
17
- "create-video": "4.0.352",
18
- "remotion": "4.0.352",
19
- "@remotion/lambda": "4.0.352",
20
- "@remotion/paths": "4.0.352"
13
+ "@remotion/animated-emoji": "4.0.353",
14
+ "@remotion/lambda": "4.0.353",
15
+ "@remotion/lottie": "4.0.353",
16
+ "@remotion/paths": "4.0.353",
17
+ "@remotion/player": "4.0.353",
18
+ "@remotion/shapes": "4.0.353",
19
+ "remotion": "4.0.353",
20
+ "create-video": "4.0.353"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@eslint/eslintrc": "3.1.0",
@@ -34,7 +34,7 @@
34
34
  "tailwind-merge": "2.5.2",
35
35
  "bun-plugin-tailwind": "0.0.13",
36
36
  "clsx": "2.1.1",
37
- "@remotion/eslint-config-internal": "4.0.352"
37
+ "@remotion/eslint-config-internal": "4.0.353"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"