@remotion/promo-pages 4.0.341 → 4.0.344

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.341 make /Users/jonathanburger/remotion/packages/promo-pages
3
+ > @remotion/promo-pages@4.0.344 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 30ms
8
+ Done in 39ms
package/dist/Homepage.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  useContext as useContext10,
28
28
  useEffect as useEffect3,
29
29
  useMemo as useMemo9,
30
- useState as useState4
30
+ useState as useState5
31
31
  } from "react";
32
32
  import { forwardRef, useMemo as useMemo2 } from "react";
33
33
  import { jsx as jsx22 } from "react/jsx-runtime";
@@ -36,6 +36,7 @@ import React32, { useCallback as useCallback2, useMemo as useMemo22, useState as
36
36
  import { jsx as jsx32 } from "react/jsx-runtime";
37
37
  import { createContext as createContext4, useContext as useContext2, useEffect as useEffect2, useRef, useState as useState22 } from "react";
38
38
  import { createContext as createContext8, useContext as useContext5, useMemo as useMemo6 } from "react";
39
+ import { useState as useState3 } from "react";
39
40
  import { useContext as useContext4, useMemo as useMemo5 } from "react";
40
41
  import { createContext as createContext5 } from "react";
41
42
  import {
@@ -46,7 +47,7 @@ import {
46
47
  useEffect as useEffect22,
47
48
  useImperativeHandle as useImperativeHandle2,
48
49
  useMemo as useMemo4,
49
- useState as useState3
50
+ useState as useState4
50
51
  } from "react";
51
52
  import React42, {
52
53
  createContext as createContext6,
@@ -70,25 +71,25 @@ import {
70
71
  useImperativeHandle as useImperativeHandle4,
71
72
  useLayoutEffect,
72
73
  useRef as useRef3,
73
- useState as useState5
74
+ useState as useState6
74
75
  } from "react";
75
76
  import React8, { useCallback as useCallback4, useImperativeHandle as useImperativeHandle3, useRef as useRef2 } from "react";
76
77
  import { jsx as jsx92 } from "react/jsx-runtime";
77
78
  import { jsx as jsx102 } from "react/jsx-runtime";
78
- import { useContext as useContext11, useEffect as useEffect5, useState as useState7 } from "react";
79
+ import { useContext as useContext11, useEffect as useEffect5, useState as useState8 } from "react";
79
80
  import {
80
81
  createContext as createContext10,
81
82
  useCallback as useCallback5,
82
83
  useLayoutEffect as useLayoutEffect2,
83
84
  useMemo as useMemo10,
84
- useState as useState6
85
+ useState as useState7
85
86
  } from "react";
86
87
  import { jsx as jsx11 } from "react/jsx-runtime";
87
88
  import { forwardRef as forwardRef6, useCallback as useCallback10, useContext as useContext24 } from "react";
88
89
  import React9, { createContext as createContext11, useMemo as useMemo11 } from "react";
89
90
  import { jsx as jsx12 } from "react/jsx-runtime";
90
91
  import { useContext as useContext12 } from "react";
91
- import { createContext as createContext12, useEffect as useEffect6, useState as useState8 } from "react";
92
+ import { createContext as createContext12, useEffect as useEffect6, useState as useState9 } from "react";
92
93
  import { jsx as jsx13 } from "react/jsx-runtime";
93
94
  import { createContext as createContext13, useMemo as useMemo12, useReducer } from "react";
94
95
  import { jsx as jsx14 } from "react/jsx-runtime";
@@ -99,7 +100,7 @@ import {
99
100
  useImperativeHandle as useImperativeHandle5,
100
101
  useMemo as useMemo20,
101
102
  useRef as useRef11,
102
- useState as useState13
103
+ useState as useState14
103
104
  } from "react";
104
105
  import { createContext as createContext14 } from "react";
105
106
  import * as React12 from "react";
@@ -112,12 +113,12 @@ import React13, {
112
113
  useEffect as useEffect7,
113
114
  useMemo as useMemo14,
114
115
  useRef as useRef4,
115
- useState as useState9
116
+ useState as useState10
116
117
  } from "react";
117
118
  import { useMemo as useMemo13 } from "react";
118
119
  import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
119
120
  import { useRef as useRef5 } from "react";
120
- import { useContext as useContext17, useEffect as useEffect8, useMemo as useMemo15, useState as useState10 } from "react";
121
+ import { useContext as useContext17, useEffect as useEffect8, useMemo as useMemo15, useState as useState11 } from "react";
121
122
  import { useContext as useContext16 } from "react";
122
123
  import {
123
124
  useCallback as useCallback9,
@@ -135,11 +136,11 @@ import React14, {
135
136
  useLayoutEffect as useLayoutEffect4,
136
137
  useMemo as useMemo16,
137
138
  useRef as useRef7,
138
- useState as useState11
139
+ useState as useState12
139
140
  } from "react";
140
141
  import { jsx as jsx16 } from "react/jsx-runtime";
141
142
  import React15 from "react";
142
- import { useEffect as useEffect10, useState as useState12 } from "react";
143
+ import { useEffect as useEffect10, useState as useState13 } from "react";
143
144
  import { useEffect as useEffect11, useRef as useRef9 } from "react";
144
145
  import { createContext as createContext16, useContext as useContext21, useMemo as useMemo19 } from "react";
145
146
  import { jsx as jsx17 } from "react/jsx-runtime";
@@ -161,7 +162,7 @@ import { jsx as jsx20 } from "react/jsx-runtime";
161
162
  import { jsx as jsx21, jsxs as jsxs22 } from "react/jsx-runtime";
162
163
  import React19, { useMemo as useMemo23 } from "react";
163
164
  import { jsx as jsx222 } from "react/jsx-runtime";
164
- import { forwardRef as forwardRef7, useCallback as useCallback11, useState as useState14 } from "react";
165
+ import { forwardRef as forwardRef7, useCallback as useCallback11, useState as useState15 } from "react";
165
166
  import { jsx as jsx23 } from "react/jsx-runtime";
166
167
  import {
167
168
  forwardRef as forwardRef8,
@@ -178,7 +179,7 @@ import React23, {
178
179
  useImperativeHandle as useImperativeHandle8,
179
180
  useMemo as useMemo24,
180
181
  useRef as useRef14,
181
- useState as useState15
182
+ useState as useState16
182
183
  } from "react";
183
184
  import { jsx as jsx25 } from "react/jsx-runtime";
184
185
  import {
@@ -186,7 +187,7 @@ import {
186
187
  useLayoutEffect as useLayoutEffect8,
187
188
  useMemo as useMemo25,
188
189
  useRef as useRef15,
189
- useState as useState16
190
+ useState as useState17
190
191
  } from "react";
191
192
  import { jsx as jsx26 } from "react/jsx-runtime";
192
193
  import React25, { createContext as createContext18 } from "react";
@@ -197,7 +198,7 @@ import {
197
198
  useImperativeHandle as useImperativeHandle9,
198
199
  useMemo as useMemo26,
199
200
  useRef as useRef16,
200
- useState as useState17
201
+ useState as useState18
201
202
  } from "react";
202
203
  import { useEffect as useEffect18 } from "react";
203
204
  import { jsx as jsx27 } from "react/jsx-runtime";
@@ -209,18 +210,19 @@ import React29, { createContext as createContext19 } from "react";
209
210
  import { jsx as jsx29 } from "react/jsx-runtime";
210
211
  import { jsx as jsx30 } from "react/jsx-runtime";
211
212
  import React31 from "react";
212
- import { useCallback as useCallback15 } from "react";
213
+ import { useCallback as useCallback14 } from "react";
214
+ import { useCallback as useCallback16 } from "react";
213
215
  import {
214
- useCallback as useCallback14,
216
+ useCallback as useCallback15,
215
217
  useContext as useContext29,
216
218
  useEffect as useEffect20,
217
219
  useLayoutEffect as useLayoutEffect9,
218
220
  useMemo as useMemo29,
219
- useState as useState18
221
+ useState as useState19
220
222
  } from "react";
221
223
  import { jsx as jsx31 } from "react/jsx-runtime";
222
224
  import { jsx as jsx322 } from "react/jsx-runtime";
223
- import { forwardRef as forwardRef12, useCallback as useCallback16, useContext as useContext31 } from "react";
225
+ import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext31 } from "react";
224
226
  import {
225
227
  forwardRef as forwardRef11,
226
228
  useContext as useContext30,
@@ -735,7 +737,7 @@ var __defProp2, __export2 = (target, all) => {
735
737
  });
736
738
  }, useIsPlayer = () => {
737
739
  return useContext(IsPlayerContext);
738
- }, VERSION = "4.0.341", checkMultipleRemotionVersions = () => {
740
+ }, VERSION = "4.0.344", checkMultipleRemotionVersions = () => {
739
741
  if (typeof globalThis === "undefined") {
740
742
  return;
741
743
  }
@@ -893,7 +895,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
893
895
  setNonce(context.getNonce);
894
896
  }, [context]);
895
897
  return nonce;
896
- }, exports_timeline_position_state, CompositionManager, CompositionSetters, EditorPropsContext, editorPropsProviderRef, timeValueRef, EditorPropsProvider = ({ children }) => {
898
+ }, exports_timeline_position_state, useRemotionEnvironment = () => {
899
+ const [env] = useState3(() => getRemotionEnvironment());
900
+ return env;
901
+ }, CompositionManager, CompositionSetters, EditorPropsContext, editorPropsProviderRef, timeValueRef, EditorPropsProvider = ({ children }) => {
897
902
  const [props, setProps] = React42.useState({});
898
903
  const updateProps = useCallback22(({
899
904
  defaultProps,
@@ -1058,7 +1063,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1058
1063
  defaultProps,
1059
1064
  props: originalProps,
1060
1065
  abortSignal: signal,
1061
- compositionId
1066
+ compositionId,
1067
+ isRendering: getRemotionEnvironment().isRendering
1062
1068
  }) : null;
1063
1069
  if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
1064
1070
  return calculatedProm.then((c) => {
@@ -1140,7 +1146,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1140
1146
  }, ResolveCompositionContext, resolveCompositionsRef, needsResolution = (composition) => {
1141
1147
  return Boolean(composition.calculateMetadata);
1142
1148
  }, PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally", ResolveCompositionConfig = ({ children }) => {
1143
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState3(null);
1149
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState4(null);
1144
1150
  const { compositions, canvasContent, currentCompositionMetadata } = useContext3(CompositionManager);
1145
1151
  const { fastRefreshes, manualRefreshes } = useContext3(NonceContext);
1146
1152
  if (manualRefreshes) {}
@@ -1149,10 +1155,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
1149
1155
  }, [canvasContent, compositions]);
1150
1156
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
1151
1157
  const { props: allEditorProps } = useContext3(EditorPropsContext);
1158
+ const env = useRemotionEnvironment();
1152
1159
  const inputProps = useMemo4(() => {
1153
- return typeof window === "undefined" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {};
1154
- }, []);
1155
- const [resolvedConfigs, setResolvedConfigs] = useState3({});
1160
+ return typeof window === "undefined" || env.isPlayer ? {} : getInputProps() ?? {};
1161
+ }, [env.isPlayer]);
1162
+ const [resolvedConfigs, setResolvedConfigs] = useState4({});
1156
1163
  const selectedEditorProps = useMemo4(() => {
1157
1164
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
1158
1165
  }, [allEditorProps, selectedComposition]);
@@ -1399,6 +1406,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1399
1406
  const selectedEditorProps = useMemo4(() => {
1400
1407
  return composition ? allEditorProps[composition.id] ?? {} : {};
1401
1408
  }, [allEditorProps, composition]);
1409
+ const env = useRemotionEnvironment();
1402
1410
  return useMemo4(() => {
1403
1411
  if (!composition) {
1404
1412
  return null;
@@ -1433,7 +1441,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1433
1441
  props: {
1434
1442
  ...composition.defaultProps ?? {},
1435
1443
  ...selectedEditorProps ?? {},
1436
- ...typeof window === "undefined" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {}
1444
+ ...typeof window === "undefined" || env.isPlayer ? {} : getInputProps() ?? {}
1437
1445
  },
1438
1446
  defaultCodec: null,
1439
1447
  defaultOutName: null,
@@ -1446,7 +1454,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
1446
1454
  return null;
1447
1455
  }
1448
1456
  return context[composition.id];
1449
- }, [composition, context, currentCompositionMetadata, selectedEditorProps]);
1457
+ }, [
1458
+ composition,
1459
+ context,
1460
+ currentCompositionMetadata,
1461
+ selectedEditorProps,
1462
+ env.isPlayer
1463
+ ]);
1450
1464
  }, useVideo = () => {
1451
1465
  const { canvasContent, compositions, currentCompositionMetadata } = useContext4(CompositionManager);
1452
1466
  const selected = compositions.find((c) => {
@@ -1495,10 +1509,11 @@ Check that all your Remotion packages are on the same version. If your dependenc
1495
1509
  }, useTimelinePosition = () => {
1496
1510
  const videoConfig = useVideo();
1497
1511
  const state = useContext5(TimelineContext);
1512
+ const env = useRemotionEnvironment();
1498
1513
  if (!videoConfig) {
1499
1514
  return typeof window === "undefined" ? 0 : window.remotion_initialFrame ?? 0;
1500
1515
  }
1501
- const unclamped = state.frame[videoConfig.id] ?? (getRemotionEnvironment().isPlayer ? 0 : getFrameForComposition(videoConfig.id));
1516
+ const unclamped = state.frame[videoConfig.id] ?? (env.isPlayer ? 0 : getFrameForComposition(videoConfig.id));
1502
1517
  return Math.min(videoConfig.durationInFrames - 1, unclamped);
1503
1518
  }, useTimelineSetFrame = () => {
1504
1519
  const { setFrame } = useContext5(SetTimelineContext);
@@ -1569,8 +1584,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
1569
1584
  return videoConfig;
1570
1585
  }, useCurrentFrame = () => {
1571
1586
  const canUseRemotionHooks = useContext8(CanUseRemotionHooks);
1587
+ const env = useRemotionEnvironment();
1572
1588
  if (!canUseRemotionHooks) {
1573
- if (getRemotionEnvironment().isPlayer) {
1589
+ if (env.isPlayer) {
1574
1590
  throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);
1575
1591
  }
1576
1592
  throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
@@ -1643,7 +1659,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1643
1659
  ...other
1644
1660
  }, ref) => {
1645
1661
  const { layout = "absolute-fill" } = other;
1646
- const [id] = useState4(() => String(Math.random()));
1662
+ const [id] = useState5(() => String(Math.random()));
1647
1663
  const parentSequence = useContext10(SequenceContext);
1648
1664
  const { rootId } = useContext10(TimelineContext);
1649
1665
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
@@ -1704,8 +1720,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
1704
1720
  const timelineClipName = useMemo9(() => {
1705
1721
  return name ?? "";
1706
1722
  }, [name]);
1723
+ const env = useRemotionEnvironment();
1707
1724
  useEffect3(() => {
1708
- if (!getRemotionEnvironment().isStudio) {
1725
+ if (!env.isStudio) {
1709
1726
  return;
1710
1727
  }
1711
1728
  registerSequence({
@@ -1742,7 +1759,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1742
1759
  loopDisplay,
1743
1760
  stack,
1744
1761
  premountDisplay,
1745
- postmountDisplay
1762
+ postmountDisplay,
1763
+ env.isStudio
1746
1764
  ]);
1747
1765
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
1748
1766
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
@@ -1822,7 +1840,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1822
1840
  })
1823
1841
  });
1824
1842
  }, PremountedPostmountedSequence, SequenceRefForwardingFunction = (props, ref) => {
1825
- if (props.layout !== "none" && !getRemotionEnvironment().isRendering) {
1843
+ const env = useRemotionEnvironment();
1844
+ if (props.layout !== "none" && !env.isRendering) {
1826
1845
  if (props.premountFor || props.postmountFor) {
1827
1846
  return /* @__PURE__ */ jsx82(PremountedPostmountedSequence, {
1828
1847
  ...props,
@@ -1861,14 +1880,14 @@ Check that all your Remotion packages are on the same version. If your dependenc
1861
1880
  return logLevels.indexOf(level);
1862
1881
  }, isEqualOrBelowLogLevel = (currentLevel, level) => {
1863
1882
  return getNumberForLogLevel(currentLevel) <= getNumberForLogLevel(level);
1864
- }, 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, delayRender = (label, options) => {
1883
+ }, 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) => {
1865
1884
  if (typeof label !== "string" && typeof label !== "undefined") {
1866
1885
  throw new Error("The label parameter of delayRender() must be a string or undefined, got: " + JSON.stringify(label));
1867
1886
  }
1868
1887
  const handle = Math.random();
1869
1888
  handles.push(handle);
1870
1889
  const called = Error().stack?.replace(/^Error/g, "") ?? "";
1871
- if (getRemotionEnvironment().isRendering) {
1890
+ if (environment.isRendering) {
1872
1891
  const timeoutToUse = (options?.timeoutInMilliseconds ?? (typeof window === "undefined" ? defaultTimeout : window.remotion_puppeteerTimeout ?? defaultTimeout)) - 2000;
1873
1892
  if (typeof window !== "undefined") {
1874
1893
  const retriesLeft = (options?.retries ?? 0) - (window.remotion_attempt - 1);
@@ -1894,7 +1913,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
1894
1913
  window.remotion_renderReady = false;
1895
1914
  }
1896
1915
  return handle;
1897
- }, continueRender = (handle) => {
1916
+ }, delayRender = (label, options) => {
1917
+ return delayRenderInternal(getRemotionEnvironment(), label, options);
1918
+ }, continueRenderInternal = (handle, environment) => {
1898
1919
  if (typeof handle === "undefined") {
1899
1920
  throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");
1900
1921
  }
@@ -1903,7 +1924,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
1903
1924
  }
1904
1925
  handles = handles.filter((h) => {
1905
1926
  if (h === handle) {
1906
- if (getRemotionEnvironment().isRendering) {
1927
+ if (environment.isRendering) {
1907
1928
  if (!window.remotion_delayRenderTimeouts[handle]) {
1908
1929
  return false;
1909
1930
  }
@@ -1924,6 +1945,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
1924
1945
  if (handles.length === 0 && typeof window !== "undefined") {
1925
1946
  window.remotion_renderReady = true;
1926
1947
  }
1948
+ }, continueRender = (handle) => {
1949
+ continueRenderInternal(handle, getRemotionEnvironment());
1927
1950
  }, calcArgs = (fit, frameSize, canvasSize) => {
1928
1951
  switch (fit) {
1929
1952
  case "fill": {
@@ -2186,7 +2209,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2186
2209
  }
2187
2210
  validateContent(artifact.content);
2188
2211
  }, RenderAssetManager, RenderAssetManagerProvider = ({ children }) => {
2189
- const [renderAssets, setRenderAssets] = useState6([]);
2212
+ const [renderAssets, setRenderAssets] = useState7([]);
2190
2213
  const registerRenderAsset = useCallback5((renderAsset) => {
2191
2214
  validateRenderAsset(renderAsset);
2192
2215
  setRenderAssets((assets) => {
@@ -2219,9 +2242,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
2219
2242
  });
2220
2243
  }, ArtifactThumbnail, Artifact = ({ filename, content, downloadBehavior }) => {
2221
2244
  const { registerRenderAsset, unregisterRenderAsset } = useContext11(RenderAssetManager);
2222
- const [env] = useState7(() => getRemotionEnvironment());
2245
+ const env = useRemotionEnvironment();
2223
2246
  const frame = useCurrentFrame();
2224
- const [id] = useState7(() => {
2247
+ const [id] = useState8(() => {
2225
2248
  return String(Math.random());
2226
2249
  });
2227
2250
  useEffect5(() => {
@@ -2357,7 +2380,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2357
2380
  preloads = updater(preloads);
2358
2381
  updaters.forEach((u) => u());
2359
2382
  }, PrefetchProvider = ({ children }) => {
2360
- const [_preloads, _setPreloads] = useState8(() => preloads);
2383
+ const [_preloads, _setPreloads] = useState9(() => preloads);
2361
2384
  useEffect6(() => {
2362
2385
  const updaterFunction = () => {
2363
2386
  _setPreloads(preloads);
@@ -2712,7 +2735,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
2712
2735
  onAutoPlayError,
2713
2736
  logLevel,
2714
2737
  mountTime,
2715
- reason
2738
+ reason,
2739
+ isPlayer
2716
2740
  }) => {
2717
2741
  const { current } = mediaRef;
2718
2742
  if (!current) {
@@ -2757,7 +2781,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2757
2781
  return;
2758
2782
  }
2759
2783
  console.log(`The video will be muted and we'll retry playing it.`);
2760
- if (mediaType === "video" && getRemotionEnvironment().isPlayer) {
2784
+ if (mediaType === "video" && isPlayer) {
2761
2785
  console.log("Use onAutoPlayError() to handle this error yourself.");
2762
2786
  }
2763
2787
  current.muted = true;
@@ -2827,7 +2851,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2827
2851
  return true;
2828
2852
  }, SharedAudioContext, SharedAudioContextProvider = ({ children, numberOfAudioTags, component, audioLatencyHint }) => {
2829
2853
  const audios = useRef4([]);
2830
- const [initialNumberOfAudioTags] = useState9(numberOfAudioTags);
2854
+ const [initialNumberOfAudioTags] = useState10(numberOfAudioTags);
2831
2855
  if (numberOfAudioTags !== initialNumberOfAudioTags) {
2832
2856
  throw new Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");
2833
2857
  }
@@ -2933,6 +2957,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2933
2957
  }
2934
2958
  }, [rerenderAudios]);
2935
2959
  const mountTime = useMountTime();
2960
+ const env = useRemotionEnvironment();
2936
2961
  const playAllAudios = useCallback6(() => {
2937
2962
  refs.forEach((ref) => {
2938
2963
  const audio = audios.current.find((a) => a.el === ref.ref);
@@ -2945,11 +2970,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
2945
2970
  onAutoPlayError: null,
2946
2971
  logLevel,
2947
2972
  mountTime,
2948
- reason: "playing all audios"
2973
+ reason: "playing all audios",
2974
+ isPlayer: env.isPlayer
2949
2975
  });
2950
2976
  });
2951
2977
  audioContext?.resume();
2952
- }, [audioContext, logLevel, mountTime, refs]);
2978
+ }, [audioContext, logLevel, mountTime, refs, env.isPlayer]);
2953
2979
  const value = useMemo14(() => {
2954
2980
  return {
2955
2981
  registerAudio,
@@ -2996,7 +3022,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
2996
3022
  premounting
2997
3023
  }) => {
2998
3024
  const ctx = useContext14(SharedAudioContext);
2999
- const [elem] = useState9(() => {
3025
+ const [elem] = useState10(() => {
3000
3026
  if (ctx && ctx.numberOfAudioTags > 0) {
3001
3027
  return ctx.registerAudio({ aud, audioId, premounting });
3002
3028
  }
@@ -3272,7 +3298,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3272
3298
  const { imperativePlaying } = useContext17(TimelineContext);
3273
3299
  const startsAt = useMediaStartsAt();
3274
3300
  const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
3275
- const [initialVolume] = useState10(() => volume);
3301
+ const [initialVolume] = useState11(() => volume);
3276
3302
  const logLevel = useLogLevel();
3277
3303
  const mountTime = useMountTime();
3278
3304
  const nonce = useNonce();
@@ -3295,6 +3321,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3295
3321
  warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume`);
3296
3322
  }
3297
3323
  }, [initialVolume, mediaType, src, volume]);
3324
+ const env = useRemotionEnvironment();
3298
3325
  useEffect8(() => {
3299
3326
  if (!mediaRef.current) {
3300
3327
  return;
@@ -3302,7 +3329,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3302
3329
  if (!src) {
3303
3330
  throw new Error("No src passed");
3304
3331
  }
3305
- if (!getRemotionEnvironment().isStudio && window.process?.env?.NODE_ENV !== "test") {
3332
+ if (!env.isStudio && window.process?.env?.NODE_ENV !== "test") {
3306
3333
  return;
3307
3334
  }
3308
3335
  if (!showInTimeline) {
@@ -3352,7 +3379,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
3352
3379
  stack,
3353
3380
  showInTimeline,
3354
3381
  premountDisplay,
3355
- postmountDisplay
3382
+ postmountDisplay,
3383
+ env.isStudio
3356
3384
  ]);
3357
3385
  useEffect8(() => {
3358
3386
  const tag = {
@@ -3370,7 +3398,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
3370
3398
  onAutoPlayError,
3371
3399
  logLevel,
3372
3400
  mountTime,
3373
- reason
3401
+ reason,
3402
+ isPlayer: env.isPlayer
3374
3403
  });
3375
3404
  }
3376
3405
  };
@@ -3388,12 +3417,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
3388
3417
  isPremounting,
3389
3418
  isPostmounting,
3390
3419
  logLevel,
3391
- mountTime
3420
+ mountTime,
3421
+ env.isPlayer
3392
3422
  ]);
3393
3423
  }, useBufferManager = (logLevel, mountTime) => {
3394
- const [blocks, setBlocks] = useState11([]);
3395
- const [onBufferingCallbacks, setOnBufferingCallbacks] = useState11([]);
3396
- const [onResumeCallbacks, setOnResumeCallbacks] = useState11([]);
3424
+ const [blocks, setBlocks] = useState12([]);
3425
+ const [onBufferingCallbacks, setOnBufferingCallbacks] = useState12([]);
3426
+ const [onResumeCallbacks, setOnResumeCallbacks] = useState12([]);
3397
3427
  const buffering = useRef7(false);
3398
3428
  const addBlock = useCallback7((block) => {
3399
3429
  setBlocks((b) => [...b, block]);
@@ -3460,7 +3490,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3460
3490
  children
3461
3491
  });
3462
3492
  }, useIsPlayerBuffering = (bufferManager) => {
3463
- const [isBuffering, setIsBuffering] = useState11(bufferManager.buffering.current);
3493
+ const [isBuffering, setIsBuffering] = useState12(bufferManager.buffering.current);
3464
3494
  useEffect9(() => {
3465
3495
  const onBuffer = () => {
3466
3496
  setIsBuffering(true);
@@ -3623,7 +3653,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3623
3653
  src
3624
3654
  }) => {
3625
3655
  const buffer = useBufferState();
3626
- const [isBuffering, setIsBuffering] = useState12(false);
3656
+ const [isBuffering, setIsBuffering] = useState13(false);
3627
3657
  useEffect10(() => {
3628
3658
  let cleanupFns = [];
3629
3659
  const { current } = element;
@@ -3976,6 +4006,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
3976
4006
  playing,
3977
4007
  isPostmounting
3978
4008
  ]);
4009
+ const env = useRemotionEnvironment();
3979
4010
  useLayoutEffect5(() => {
3980
4011
  const playbackRateToSet = Math.max(0, playbackRate);
3981
4012
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
@@ -4019,7 +4050,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4019
4050
  onAutoPlayError,
4020
4051
  logLevel,
4021
4052
  mountTime,
4022
- reason: "player is playing but media tag is paused, and just seeked"
4053
+ reason: "player is playing but media tag is paused, and just seeked",
4054
+ isPlayer: env.isPlayer
4023
4055
  });
4024
4056
  }
4025
4057
  }
@@ -4066,7 +4098,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4066
4098
  onAutoPlayError,
4067
4099
  logLevel,
4068
4100
  mountTime,
4069
- reason: `player is playing and ${reason}`
4101
+ reason: `player is playing and ${reason}`,
4102
+ isPlayer: env.isPlayer
4070
4103
  });
4071
4104
  if (!isVariableFpsVideo && playbackRate > 0) {
4072
4105
  bufferUntilFirstFrame(shouldBeTime);
@@ -4093,7 +4126,8 @@ Check that all your Remotion packages are on the same version. If your dependenc
4093
4126
  isPostmounting,
4094
4127
  pauseWhenBuffering,
4095
4128
  mountTime,
4096
- mediaTagCurrentTime
4129
+ mediaTagCurrentTime,
4130
+ env.isPlayer
4097
4131
  ]);
4098
4132
  }, MediaVolumeContext, SetMediaVolumeContext, useMediaVolumeState = () => {
4099
4133
  const { mediaVolume } = useContext21(MediaVolumeContext);
@@ -4108,7 +4142,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4108
4142
  return [mediaMuted, setMediaMuted];
4109
4143
  }, [mediaMuted, setMediaMuted]);
4110
4144
  }, AudioForDevelopmentForwardRefFunction = (props, ref) => {
4111
- const [initialShouldPreMountAudioElements] = useState13(props.shouldPreMountAudioTags);
4145
+ const [initialShouldPreMountAudioElements] = useState14(props.shouldPreMountAudioTags);
4112
4146
  if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {
4113
4147
  throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");
4114
4148
  }
@@ -4153,7 +4187,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4153
4187
  }
4154
4188
  const preloadedSrc = usePreload(src);
4155
4189
  const sequenceContext = useContext22(SequenceContext);
4156
- const [timelineId] = useState13(() => String(Math.random()));
4190
+ const [timelineId] = useState14(() => String(Math.random()));
4157
4191
  const isSequenceHidden = hidden[timelineId] ?? false;
4158
4192
  const userPreferredVolume = evaluateVolume({
4159
4193
  frame: volumePropFrame,
@@ -4408,7 +4442,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4408
4442
  } = props;
4409
4443
  const { loop, ...propsOtherThanLoop } = props;
4410
4444
  const { fps } = useVideoConfig();
4411
- const environment = getRemotionEnvironment();
4445
+ const environment = useRemotionEnvironment();
4412
4446
  const { durations, setDurations } = useContext24(DurationsContext);
4413
4447
  if (typeof props.src !== "string") {
4414
4448
  throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
@@ -4631,7 +4665,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4631
4665
  });
4632
4666
  const nonce = useNonce();
4633
4667
  const isPlayer = useIsPlayer();
4634
- const environment = getRemotionEnvironment();
4668
+ const environment = useRemotionEnvironment();
4635
4669
  const canUseComposition = useContext26(CanUseRemotionHooks);
4636
4670
  if (canUseComposition) {
4637
4671
  if (isPlayer) {
@@ -4731,7 +4765,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
4731
4765
  delayRenderTimeoutInMilliseconds,
4732
4766
  ...props2
4733
4767
  }, ref) => {
4734
- const [handle] = useState14(() => delayRender(`Loading <IFrame> with source ${props2.src}`, {
4768
+ const [handle] = useState15(() => delayRender(`Loading <IFrame> with source ${props2.src}`, {
4735
4769
  retries: delayRenderRetries ?? undefined,
4736
4770
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
4737
4771
  }));
@@ -4901,10 +4935,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
4901
4935
  currentCompositionMetadata,
4902
4936
  audioLatencyHint
4903
4937
  }) => {
4904
- const [compositions, setCompositions] = useState15([]);
4938
+ const [compositions, setCompositions] = useState16([]);
4905
4939
  const currentcompositionsRef = useRef14(compositions);
4906
- const [folders, setFolders] = useState15([]);
4907
- const [canvasContent, setCanvasContent] = useState15(null);
4940
+ const [folders, setFolders] = useState16([]);
4941
+ const [canvasContent, setCanvasContent] = useState16(null);
4908
4942
  const updateCompositions = useCallback13((updateComps) => {
4909
4943
  setCompositions((comps) => {
4910
4944
  const updated = updateComps(comps);
@@ -5068,13 +5102,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
5068
5102
  currentCompositionMetadata,
5069
5103
  audioLatencyHint
5070
5104
  }) => {
5071
- const [remotionRootId] = useState16(() => String(random(null)));
5072
- const [frame, setFrame] = useState16(() => getInitialFrameState());
5073
- const [playing, setPlaying] = useState16(false);
5105
+ const [remotionRootId] = useState17(() => String(random(null)));
5106
+ const [frame, setFrame] = useState17(() => getInitialFrameState());
5107
+ const [playing, setPlaying] = useState17(false);
5074
5108
  const imperativePlaying = useRef15(false);
5075
- const [fastRefreshes, setFastRefreshes] = useState16(0);
5076
- const [manualRefreshes, setManualRefreshes] = useState16(0);
5077
- const [playbackRate, setPlaybackRate] = useState16(1);
5109
+ const [fastRefreshes, setFastRefreshes] = useState17(0);
5110
+ const [manualRefreshes, setManualRefreshes] = useState17(0);
5111
+ const [playbackRate, setPlaybackRate] = useState17(1);
5078
5112
  const audioAndVideoTags = useRef15([]);
5079
5113
  if (typeof window !== "undefined") {
5080
5114
  useLayoutEffect8(() => {
@@ -5295,7 +5329,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5295
5329
  const { hidden } = useContext28(SequenceVisibilityToggleContext);
5296
5330
  const logLevel = useLogLevel();
5297
5331
  const mountTime = useMountTime();
5298
- const [timelineId] = useState17(() => String(Math.random()));
5332
+ const [timelineId] = useState18(() => String(Math.random()));
5299
5333
  const isSequenceHidden = hidden[timelineId] ?? false;
5300
5334
  if (typeof acceptableTimeShift !== "undefined") {
5301
5335
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
@@ -5355,7 +5389,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5355
5389
  useImperativeHandle9(ref, () => {
5356
5390
  return videoRef.current;
5357
5391
  }, []);
5358
- useState17(() => playbackLogging({
5392
+ useState18(() => playbackLogging({
5359
5393
  logLevel,
5360
5394
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
5361
5395
  tag: "video",
@@ -5817,7 +5851,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
5817
5851
  const videoRef = useRef17(null);
5818
5852
  const sequenceContext = useContext30(SequenceContext);
5819
5853
  const mediaStartsAt = useMediaStartsAt();
5820
- const environment = getRemotionEnvironment();
5854
+ const environment = useRemotionEnvironment();
5821
5855
  const logLevel = useLogLevel();
5822
5856
  const mountTime = useMountTime();
5823
5857
  const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
@@ -6008,7 +6042,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
6008
6042
  } = props2;
6009
6043
  const { loop, ...propsOtherThanLoop } = props2;
6010
6044
  const { fps } = useVideoConfig();
6011
- const environment = getRemotionEnvironment();
6045
+ const environment = useRemotionEnvironment();
6012
6046
  const { durations, setDurations } = useContext31(DurationsContext);
6013
6047
  if (typeof ref === "string") {
6014
6048
  throw new Error("string refs are not supported");
@@ -6017,10 +6051,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
6017
6051
  throw new TypeError(`The \`<Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
6018
6052
  }
6019
6053
  const preloadedSrc = usePreload(props2.src);
6020
- const onDuration = useCallback16((src, durationInSeconds) => {
6054
+ const onDuration = useCallback17((src, durationInSeconds) => {
6021
6055
  setDurations({ type: "got-duration", durationInSeconds, src });
6022
6056
  }, [setDurations]);
6023
- const onVideoFrame = useCallback16(() => {}, []);
6057
+ const onVideoFrame = useCallback17(() => {}, []);
6024
6058
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
6025
6059
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
6026
6060
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -6277,8 +6311,8 @@ var init_esm = __esm(() => {
6277
6311
  };
6278
6312
  }, []);
6279
6313
  const resolvedSrc = resolveAnimatedImageSource(src);
6280
- const [imageDecoder, setImageDecoder] = useState5(null);
6281
- const [decodeHandle] = useState5(() => delayRender(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
6314
+ const [imageDecoder, setImageDecoder] = useState6(null);
6315
+ const [decodeHandle] = useState6(() => delayRender(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
6282
6316
  const frame = useCurrentFrame();
6283
6317
  const { fps } = useVideoConfig();
6284
6318
  const currentTime = frame / playbackRate / fps;
@@ -6292,7 +6326,7 @@ var init_esm = __esm(() => {
6292
6326
  }
6293
6327
  return c;
6294
6328
  }, []);
6295
- const [initialLoopBehavior] = useState5(() => loopBehavior);
6329
+ const [initialLoopBehavior] = useState6(() => loopBehavior);
6296
6330
  useEffect4(() => {
6297
6331
  const controller = new AbortController;
6298
6332
  decodeImage({
@@ -6580,7 +6614,7 @@ __export(exports_esm, {
6580
6614
  Lottie: () => Lottie
6581
6615
  });
6582
6616
  import lottie from "lottie-web";
6583
- import { useEffect as useEffect26, useRef as useRef21, useState as useState21 } from "react";
6617
+ import { useEffect as useEffect26, useRef as useRef21, useState as useState24 } from "react";
6584
6618
  import { jsx as jsx41 } from "react/jsx-runtime";
6585
6619
  var getLottieMetadata = (animationData) => {
6586
6620
  const width2 = animationData.w;
@@ -6650,7 +6684,7 @@ var getLottieMetadata = (animationData) => {
6650
6684
  const containerRef = useRef21(null);
6651
6685
  const onAnimationLoadedRef = useRef21(onAnimationLoaded);
6652
6686
  onAnimationLoadedRef.current = onAnimationLoaded;
6653
- const [handle] = useState21(() => delayRender("Waiting for Lottie animation to load"));
6687
+ const [handle] = useState24(() => delayRender("Waiting for Lottie animation to load"));
6654
6688
  useEffect26(() => {
6655
6689
  return () => {
6656
6690
  continueRender(handle);
@@ -11705,10 +11739,10 @@ init_esm();
11705
11739
  import { jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
11706
11740
  import { jsx as jsx210, jsxs as jsxs23, Fragment } from "react/jsx-runtime";
11707
11741
  import React5 from "react";
11708
- import { useContext as useContext210, useEffect as useEffect23, useState as useState19 } from "react";
11742
+ import { useContext as useContext210, useEffect as useEffect23, useState as useState20 } from "react";
11709
11743
  import { useContext as useContext32, useEffect as useEffect24 } from "react";
11710
11744
  import { jsx as jsx36 } from "react/jsx-runtime";
11711
- import { useCallback as useCallback17, useRef as useRef18 } from "react";
11745
+ import { useCallback as useCallback18, useRef as useRef18 } from "react";
11712
11746
  import { useEffect as useEffect32, useState as useState23 } from "react";
11713
11747
  import { useContext as useContext42, useEffect as useEffect62, useRef as useRef42 } from "react";
11714
11748
  import { useEffect as useEffect42 } from "react";
@@ -12859,7 +12893,7 @@ var useBufferStateEmitter = (emitter) => {
12859
12893
  }, [bufferManager, emitter]);
12860
12894
  };
12861
12895
  var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
12862
- const [emitter] = useState19(() => new PlayerEmitter);
12896
+ const [emitter] = useState20(() => new PlayerEmitter);
12863
12897
  const bufferManager = useContext210(Internals.BufferingContextReact);
12864
12898
  if (!bufferManager) {
12865
12899
  throw new Error("BufferingContextReact not found");
@@ -15748,11 +15782,11 @@ var Thumbnail = forward2(ThumbnailFn);
15748
15782
 
15749
15783
  // src/components/homepage/Demo/index.tsx
15750
15784
  import {
15751
- useCallback as useCallback33,
15785
+ useCallback as useCallback35,
15752
15786
  useEffect as useEffect38,
15753
15787
  useMemo as useMemo41,
15754
15788
  useRef as useRef28,
15755
- useState as useState31
15789
+ useState as useState33
15756
15790
  } from "react";
15757
15791
 
15758
15792
  // ../../node_modules/.pnpm/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/extends.js
@@ -16527,21 +16561,21 @@ function useColorMode() {
16527
16561
 
16528
16562
  // src/components/homepage/Demo/Comp.tsx
16529
16563
  init_esm();
16530
- import { useCallback as useCallback26, useEffect as useEffect30, useMemo as useMemo36, useState as useState27 } from "react";
16564
+ import { useCallback as useCallback27, useEffect as useEffect30, useMemo as useMemo36, useState as useState28 } from "react";
16531
16565
 
16532
16566
  // src/components/homepage/Demo/Cards.tsx
16533
16567
  init_esm();
16534
16568
  import {
16535
16569
  createRef as createRef4,
16536
- useCallback as useCallback24,
16570
+ useCallback as useCallback26,
16537
16571
  useEffect as useEffect29,
16538
16572
  useRef as useRef25,
16539
- useState as useState26
16573
+ useState as useState27
16540
16574
  } from "react";
16541
16575
 
16542
16576
  // src/components/homepage/Demo/Card.tsx
16543
16577
  init_esm();
16544
- import { useCallback as useCallback20, useRef as useRef20 } from "react";
16578
+ import { useCallback as useCallback21, useRef as useRef20 } from "react";
16545
16579
 
16546
16580
  // src/components/homepage/Demo/math.ts
16547
16581
  var paddingAndMargin = 20;
@@ -16575,10 +16609,10 @@ var getIndexFromPosition = (clientX, clientY) => {
16575
16609
  };
16576
16610
 
16577
16611
  // src/components/homepage/Demo/Switcher.tsx
16578
- import { useCallback as useCallback19 } from "react";
16612
+ import { useCallback as useCallback20 } from "react";
16579
16613
  import { jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
16580
16614
  var Switcher = ({ type, theme, onTap }) => {
16581
- const onPointerDown = useCallback19((e) => {
16615
+ const onPointerDown = useCallback20((e) => {
16582
16616
  e.stopPropagation();
16583
16617
  onTap();
16584
16618
  }, [onTap]);
@@ -16641,7 +16675,7 @@ var Card = ({
16641
16675
  const refToUse = refsToUse[index];
16642
16676
  const stopPrevious = useRef20([]);
16643
16677
  let newIndices = [...indices];
16644
- const applyPositions = useCallback20((except) => {
16678
+ const applyPositions = useCallback21((except) => {
16645
16679
  let stopped = false;
16646
16680
  stopPrevious.current.forEach((s) => {
16647
16681
  s();
@@ -16714,7 +16748,7 @@ var Card = ({
16714
16748
  update();
16715
16749
  });
16716
16750
  }, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
16717
- const onPointerDown = useCallback20((e) => {
16751
+ const onPointerDown = useCallback21((e) => {
16718
16752
  e.currentTarget.setPointerCapture(e.pointerId);
16719
16753
  const cardLeft = refToUse.current.offsetLeft;
16720
16754
  const cardTop = refToUse.current.offsetTop;
@@ -16775,7 +16809,7 @@ var Card = ({
16775
16809
  }, { once: true });
16776
16810
  refToUse.current.addEventListener("pointermove", onMove);
16777
16811
  }, [applyPositions, index, positions, refToUse, shouldBePositions]);
16778
- const onPointerUp = useCallback20((e) => {
16812
+ const onPointerUp = useCallback21((e) => {
16779
16813
  e.currentTarget.releasePointerCapture(e.pointerId);
16780
16814
  }, []);
16781
16815
  const { x, y } = getPositionForIndex(index);
@@ -16904,7 +16938,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
16904
16938
  init_esm();
16905
16939
  import {
16906
16940
  forwardRef as forwardRef15,
16907
- useCallback as useCallback21,
16941
+ useCallback as useCallback24,
16908
16942
  useEffect as useEffect28,
16909
16943
  useImperativeHandle as useImperativeHandle13,
16910
16944
  useRef as useRef23
@@ -16912,12 +16946,12 @@ import {
16912
16946
 
16913
16947
  // src/components/homepage/Demo/DisplayedEmoji.tsx
16914
16948
  init_esm();
16915
- import { useEffect as useEffect27, useMemo as useMemo34, useState as useState24 } from "react";
16949
+ import { useEffect as useEffect27, useMemo as useMemo34, useState as useState26 } from "react";
16916
16950
  import { jsx as jsx44 } from "react/jsx-runtime";
16917
16951
  var DisplayedEmoji = ({ emoji }) => {
16918
- const [data, setData] = useState24(null);
16952
+ const [data, setData] = useState26(null);
16919
16953
  const { durationInFrames, fps } = useVideoConfig();
16920
- const [browser, setBrowser] = useState24(typeof document !== "undefined");
16954
+ const [browser, setBrowser] = useState26(typeof document !== "undefined");
16921
16955
  const src = useMemo34(() => {
16922
16956
  if (emoji === "melting") {
16923
16957
  return "https://fonts.gstatic.com/s/e/notoemoji/latest/1fae0/lottie.json";
@@ -16930,7 +16964,7 @@ var DisplayedEmoji = ({ emoji }) => {
16930
16964
  }
16931
16965
  throw new Error("Unknown emoji");
16932
16966
  }, [emoji]);
16933
- const [handle] = useState24(() => delayRender());
16967
+ const [handle] = useState26(() => delayRender());
16934
16968
  useEffect27(() => {
16935
16969
  Promise.all([
16936
16970
  fetch(src).then((res) => res.json()),
@@ -17023,7 +17057,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
17023
17057
  const ref2 = useRef23(null);
17024
17058
  const ref3 = useRef23(null);
17025
17059
  const transforms = useRef23([-100, 0, 100]);
17026
- const onLeft = useCallback21(() => {
17060
+ const onLeft = useCallback24(() => {
17027
17061
  if (!ref1.current || !ref2.current || !ref3.current) {
17028
17062
  return;
17029
17063
  }
@@ -17034,7 +17068,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
17034
17068
  transforms: transforms.current
17035
17069
  });
17036
17070
  }, []);
17037
- const onRight = useCallback21(() => {
17071
+ const onRight = useCallback24(() => {
17038
17072
  if (!ref1.current || !ref2.current || !ref3.current) {
17039
17073
  return;
17040
17074
  }
@@ -17073,6 +17107,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
17073
17107
  transforms: transforms.current
17074
17108
  });
17075
17109
  }, []);
17110
+ const env = useRemotionEnvironment();
17076
17111
  return /* @__PURE__ */ jsxs14(AbsoluteFill, {
17077
17112
  style: {
17078
17113
  justifyContent: "center",
@@ -17100,7 +17135,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
17100
17135
  whiteSpace: "nowrap",
17101
17136
  height: "100%"
17102
17137
  },
17103
- children: getRemotionEnvironment().isRendering ? /* @__PURE__ */ jsx46("div", {
17138
+ children: env.isRendering ? /* @__PURE__ */ jsx46("div", {
17104
17139
  style: emojiStyle,
17105
17140
  children: /* @__PURE__ */ jsx46(DisplayedEmoji, {
17106
17141
  emoji: emojiIndex
@@ -17475,14 +17510,14 @@ var Cards = ({
17475
17510
  trending
17476
17511
  }) => {
17477
17512
  const container4 = useRef25(null);
17478
- const [refs] = useState26(() => {
17513
+ const [refs] = useState27(() => {
17479
17514
  return new Array(4).fill(true).map(() => {
17480
17515
  return createRef4();
17481
17516
  });
17482
17517
  });
17483
17518
  const positions = useRef25(getInitialPositions());
17484
17519
  const shouldBePositions = useRef25(getInitialPositions());
17485
- const { isRendering } = getRemotionEnvironment();
17520
+ const { isRendering } = useRemotionEnvironment();
17486
17521
  useEffect29(() => {
17487
17522
  const { current } = container4;
17488
17523
  if (!current) {
@@ -17500,11 +17535,11 @@ var Cards = ({
17500
17535
  };
17501
17536
  }, [onToggle]);
17502
17537
  const ref = useRef25(null);
17503
- const onLeft = useCallback24(() => {
17538
+ const onLeft = useCallback26(() => {
17504
17539
  ref.current?.onRight();
17505
17540
  onRightPress();
17506
17541
  }, [onRightPress]);
17507
- const onRight = useCallback24(() => {
17542
+ const onRight = useCallback26(() => {
17508
17543
  ref.current?.onLeft();
17509
17544
  onLeftPress();
17510
17545
  }, [onLeftPress]);
@@ -17573,8 +17608,8 @@ var HomepageVideoComp = ({
17573
17608
  onClickLeft,
17574
17609
  onClickRight
17575
17610
  }) => {
17576
- const [rerenders, setRerenders] = useState27(0);
17577
- const onUpdate = useCallback26((newIndices) => {
17611
+ const [rerenders, setRerenders] = useState28(0);
17612
+ const onUpdate = useCallback27((newIndices) => {
17578
17613
  setRerenders(rerenders + 1);
17579
17614
  updateCardOrder(newIndices);
17580
17615
  }, [rerenders, updateCardOrder]);
@@ -17644,7 +17679,7 @@ var DemoError = () => {
17644
17679
  };
17645
17680
 
17646
17681
  // src/components/homepage/Demo/DemoRender.tsx
17647
- import React34, { useCallback as useCallback27 } from "react";
17682
+ import React34, { useCallback as useCallback28 } from "react";
17648
17683
  import { z } from "zod";
17649
17684
 
17650
17685
  // src/components/homepage/Demo/DemoErrorIcon.tsx
@@ -18003,7 +18038,7 @@ var RenderButton = ({ renderData, onError }) => {
18003
18038
  const [state, setState] = React34.useState({
18004
18039
  type: "idle"
18005
18040
  });
18006
- const triggerRender = useCallback27(async () => {
18041
+ const triggerRender = useCallback28(async () => {
18007
18042
  if (renderData === null) {
18008
18043
  return;
18009
18044
  }
@@ -18180,12 +18215,12 @@ var DragAndDropNudge = () => {
18180
18215
 
18181
18216
  // src/components/homepage/Demo/PlayerSeekBar.tsx
18182
18217
  init_esm();
18183
- import { useCallback as useCallback29, useEffect as useEffect33, useMemo as useMemo40, useRef as useRef26, useState as useState29 } from "react";
18218
+ import { useCallback as useCallback30, useEffect as useEffect33, useMemo as useMemo40, useRef as useRef26, useState as useState30 } from "react";
18184
18219
 
18185
18220
  // src/components/homepage/layout/use-el-size.ts
18186
- import { useCallback as useCallback28, useEffect as useEffect31, useMemo as useMemo39, useState as useState28 } from "react";
18221
+ import { useCallback as useCallback29, useEffect as useEffect31, useMemo as useMemo39, useState as useState29 } from "react";
18187
18222
  var useElementSize2 = (ref) => {
18188
- const [size, setSize] = useState28(null);
18223
+ const [size, setSize] = useState29(null);
18189
18224
  const observer = useMemo39(() => {
18190
18225
  if (typeof ResizeObserver === "undefined") {
18191
18226
  return;
@@ -18197,7 +18232,7 @@ var useElementSize2 = (ref) => {
18197
18232
  });
18198
18233
  });
18199
18234
  }, []);
18200
- const updateSize = useCallback28(() => {
18235
+ const updateSize = useCallback29(() => {
18201
18236
  if (ref === null) {
18202
18237
  return;
18203
18238
  }
@@ -18262,7 +18297,7 @@ var findBodyInWhichDivIsLocated2 = (div) => {
18262
18297
  return current;
18263
18298
  };
18264
18299
  var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
18265
- const [hovered, setHovered] = useState29(false);
18300
+ const [hovered, setHovered] = useState30(false);
18266
18301
  useEffect33(() => {
18267
18302
  const { current } = ref;
18268
18303
  if (!current) {
@@ -18312,8 +18347,8 @@ var PlayerSeekBar2 = ({
18312
18347
  const containerRef = useRef26(null);
18313
18348
  const barHovered = useHoverState2(containerRef, false);
18314
18349
  const size = useElementSize2(containerRef.current);
18315
- const [playing, setPlaying] = useState29(false);
18316
- const [frame, setFrame] = useState29(0);
18350
+ const [playing, setPlaying] = useState30(false);
18351
+ const [frame, setFrame] = useState30(0);
18317
18352
  useEffect33(() => {
18318
18353
  const { current } = playerRef;
18319
18354
  if (!current) {
@@ -18345,11 +18380,11 @@ var PlayerSeekBar2 = ({
18345
18380
  current.removeEventListener("pause", onPause);
18346
18381
  };
18347
18382
  }, [playerRef]);
18348
- const [dragging, setDragging] = useState29({
18383
+ const [dragging, setDragging] = useState30({
18349
18384
  dragging: false
18350
18385
  });
18351
18386
  const width2 = size?.width ?? 0;
18352
- const onPointerDown = useCallback29((e) => {
18387
+ const onPointerDown = useCallback30((e) => {
18353
18388
  if (e.button !== 0) {
18354
18389
  return;
18355
18390
  }
@@ -18363,7 +18398,7 @@ var PlayerSeekBar2 = ({
18363
18398
  });
18364
18399
  onSeekStart();
18365
18400
  }, [durationInFrames, width2, playerRef, playing, onSeekStart]);
18366
- const onPointerMove = useCallback29((e) => {
18401
+ const onPointerMove = useCallback30((e) => {
18367
18402
  if (!size) {
18368
18403
  throw new Error("Player has no size");
18369
18404
  }
@@ -18374,7 +18409,7 @@ var PlayerSeekBar2 = ({
18374
18409
  const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size.width);
18375
18410
  playerRef.current.seekTo(_frame);
18376
18411
  }, [dragging.dragging, durationInFrames, playerRef, size]);
18377
- const onPointerUp = useCallback29(() => {
18412
+ const onPointerUp = useCallback30(() => {
18378
18413
  setDragging({
18379
18414
  dragging: false
18380
18415
  });
@@ -18458,7 +18493,7 @@ var PlayerSeekBar2 = ({
18458
18493
  };
18459
18494
 
18460
18495
  // src/components/homepage/Demo/PlayerVolume.tsx
18461
- import { useCallback as useCallback30, useEffect as useEffect35, useRef as useRef27, useState as useState30 } from "react";
18496
+ import { useCallback as useCallback31, useEffect as useEffect35, useRef as useRef27, useState as useState31 } from "react";
18462
18497
 
18463
18498
  // src/components/homepage/Demo/icons.tsx
18464
18499
  import { jsx as jsx71 } from "react/jsx-runtime";
@@ -18516,8 +18551,8 @@ var IsMutedIcon = (props) => {
18516
18551
  // src/components/homepage/Demo/PlayerVolume.tsx
18517
18552
  import { jsx as jsx75 } from "react/jsx-runtime";
18518
18553
  var PlayerVolume = ({ playerRef }) => {
18519
- const [muted, setIsMuted] = useState30(() => playerRef.current?.isMuted() ?? true);
18520
- const [isHovered, setIsHovered] = useState30(false);
18554
+ const [muted, setIsMuted] = useState31(() => playerRef.current?.isMuted() ?? true);
18555
+ const [isHovered, setIsHovered] = useState31(false);
18521
18556
  const timerRef = useRef27(null);
18522
18557
  useEffect35(() => {
18523
18558
  const { current } = playerRef;
@@ -18539,7 +18574,7 @@ var PlayerVolume = ({ playerRef }) => {
18539
18574
  document.body.style.userSelect = "auto";
18540
18575
  }
18541
18576
  }, [isHovered]);
18542
- const onClick = useCallback30(() => {
18577
+ const onClick = useCallback31(() => {
18543
18578
  if (timerRef.current !== null) {
18544
18579
  clearTimeout(timerRef.current);
18545
18580
  timerRef.current = null;
@@ -18577,7 +18612,7 @@ var PlayerVolume = ({ playerRef }) => {
18577
18612
  };
18578
18613
 
18579
18614
  // src/components/homepage/Demo/PlayPauseButton.tsx
18580
- import React38, { useCallback as useCallback31, useEffect as useEffect36 } from "react";
18615
+ import React38, { useCallback as useCallback33, useEffect as useEffect36 } from "react";
18581
18616
  import { jsx as jsx77 } from "react/jsx-runtime";
18582
18617
  var playerButtonStyle2 = {
18583
18618
  appearance: "none",
@@ -18613,7 +18648,7 @@ var PlayPauseButton = ({ playerRef }) => {
18613
18648
  current.removeEventListener("pause", onPause);
18614
18649
  };
18615
18650
  }, [playerRef]);
18616
- const onToggle = useCallback31(() => {
18651
+ const onToggle = useCallback33(() => {
18617
18652
  playerRef.current?.toggle();
18618
18653
  }, [playerRef]);
18619
18654
  const playPauseIconStyle = {
@@ -18806,12 +18841,12 @@ var playerWrapper = {
18806
18841
  };
18807
18842
  var Demo = () => {
18808
18843
  const { colorMode } = useColorMode();
18809
- const [data2, setData] = useState31(null);
18844
+ const [data2, setData] = useState33(null);
18810
18845
  const ref = useRef28(null);
18811
- const [isFullscreen, setIsFullscreen] = useState31(false);
18812
- const [cardOrder, setCardOrder] = useState31([0, 1, 2, 3]);
18813
- const [emojiIndex, setEmojiIndex] = useState31(0);
18814
- const [error, setError] = useState31(false);
18846
+ const [isFullscreen, setIsFullscreen] = useState33(false);
18847
+ const [cardOrder, setCardOrder] = useState33([0, 1, 2, 3]);
18848
+ const [emojiIndex, setEmojiIndex] = useState33(0);
18849
+ const [error, setError] = useState33(false);
18815
18850
  useEffect38(() => {
18816
18851
  getDataAndProps().then((d) => {
18817
18852
  setData(d);
@@ -18833,7 +18868,7 @@ var Demo = () => {
18833
18868
  playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
18834
18869
  };
18835
18870
  }, [data2]);
18836
- const updateCardOrder = useCallback33((newCardOrder) => {
18871
+ const updateCardOrder = useCallback35((newCardOrder) => {
18837
18872
  setCardOrder(newCardOrder);
18838
18873
  }, []);
18839
18874
  const props = useMemo41(() => {
@@ -18855,7 +18890,7 @@ var Demo = () => {
18855
18890
  emojiIndex
18856
18891
  };
18857
18892
  }, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
18858
- const onError = useCallback33(() => {
18893
+ const onError = useCallback35(() => {
18859
18894
  setError(true);
18860
18895
  }, []);
18861
18896
  return /* @__PURE__ */ jsxs33("div", {
@@ -18964,7 +18999,7 @@ import { forwardRef as forwardRef17, useEffect as useEffect40, useImperativeHand
18964
18999
  // src/components/homepage/VideoPlayerWithControls.tsx
18965
19000
  import Hls from "hls.js";
18966
19001
  import"plyr/dist/plyr.css";
18967
- import { forwardRef as forwardRef16, useCallback as useCallback35, useEffect as useEffect39, useRef as useRef29, useState as useState33 } from "react";
19002
+ import { forwardRef as forwardRef16, useCallback as useCallback36, useEffect as useEffect39, useRef as useRef29, useState as useState35 } from "react";
18968
19003
  import { jsx as jsx87 } from "react/jsx-runtime";
18969
19004
  var useCombinedRefs = function(...refs) {
18970
19005
  const targetRef = useRef29(null);
@@ -18985,9 +19020,9 @@ var VideoPlayerWithControls = forwardRef16(({ playbackId, poster, currentTime, o
18985
19020
  const videoRef = useRef29(null);
18986
19021
  const metaRef = useCombinedRefs(ref, videoRef);
18987
19022
  const playerRef = useRef29(null);
18988
- const [playerInitTime] = useState33(Date.now());
18989
- const videoError = useCallback35((event) => onError(event), [onError]);
18990
- const onImageLoad = useCallback35((event) => {
19023
+ const [playerInitTime] = useState35(Date.now());
19024
+ const videoError = useCallback36((event) => onError(event), [onError]);
19025
+ const onImageLoad = useCallback36((event) => {
18991
19026
  const [w, h] = [event.target.width, event.target.height];
18992
19027
  if (w && h) {
18993
19028
  onSize({ width: w, height: h });
@@ -19185,10 +19220,10 @@ var EditorStarterSection = () => {
19185
19220
  var EditorStarterSection_default = EditorStarterSection;
19186
19221
 
19187
19222
  // src/components/homepage/EvaluateRemotion.tsx
19188
- import { useEffect as useEffect41, useState as useState35 } from "react";
19223
+ import { useEffect as useEffect41, useState as useState36 } from "react";
19189
19224
  import { jsx as jsx90, jsxs as jsxs36 } from "react/jsx-runtime";
19190
19225
  var EvaluateRemotionSection = () => {
19191
- const [dailyAvatars, setDailyAvatars] = useState35([]);
19226
+ const [dailyAvatars, setDailyAvatars] = useState36([]);
19192
19227
  useEffect41(() => {
19193
19228
  const avatars = [
19194
19229
  "/img/freelancers/alex.jpeg",
@@ -19288,7 +19323,7 @@ var EvaluateRemotionSection = () => {
19288
19323
  var EvaluateRemotion_default = EvaluateRemotionSection;
19289
19324
 
19290
19325
  // src/components/homepage/IfYouKnowReact.tsx
19291
- import { useEffect as useEffect43, useState as useState36 } from "react";
19326
+ import { useEffect as useEffect43, useState as useState37 } from "react";
19292
19327
  import { jsx as jsx91, jsxs as jsxs37 } from "react/jsx-runtime";
19293
19328
  var isWebkit = () => {
19294
19329
  if (typeof window === "undefined") {
@@ -19303,7 +19338,7 @@ var icon2 = {
19303
19338
  marginLeft: 10
19304
19339
  };
19305
19340
  var IfYouKnowReact = () => {
19306
- const [vid, setVid] = useState36("/img/compose.webm");
19341
+ const [vid, setVid] = useState37("/img/compose.webm");
19307
19342
  useEffect43(() => {
19308
19343
  if (isWebkit()) {
19309
19344
  setVid("/img/compose.mp4");
@@ -19460,7 +19495,7 @@ var MoreVideoPowerSection = () => {
19460
19495
  };
19461
19496
 
19462
19497
  // src/components/homepage/NewsletterButton.tsx
19463
- import { useCallback as useCallback36, useState as useState37 } from "react";
19498
+ import { useCallback as useCallback37, useState as useState38 } from "react";
19464
19499
 
19465
19500
  // src/components/homepage/Spacer.tsx
19466
19501
  import { jsx as jsx97 } from "react/jsx-runtime";
@@ -19473,10 +19508,10 @@ var Spacer = () => {
19473
19508
  // src/components/homepage/NewsletterButton.tsx
19474
19509
  import { jsx as jsx98, jsxs as jsxs39 } from "react/jsx-runtime";
19475
19510
  var NewsletterButton = () => {
19476
- const [email, setEmail] = useState37("");
19477
- const [submitting, setSubmitting] = useState37(false);
19478
- const [subscribed, setSubscribed] = useState37(false);
19479
- const handleSubmit = useCallback36(async (e) => {
19511
+ const [email, setEmail] = useState38("");
19512
+ const [submitting, setSubmitting] = useState38(false);
19513
+ const [subscribed, setSubscribed] = useState38(false);
19514
+ const handleSubmit = useCallback37(async (e) => {
19480
19515
  try {
19481
19516
  setSubmitting(true);
19482
19517
  e.preventDefault();
@@ -19553,7 +19588,7 @@ var NewsletterButton = () => {
19553
19588
  };
19554
19589
 
19555
19590
  // src/components/homepage/ParameterizeAndEdit.tsx
19556
- import { useEffect as useEffect45, useRef as useRef31, useState as useState38 } from "react";
19591
+ import { useEffect as useEffect45, useRef as useRef31, useState as useState39 } from "react";
19557
19592
  import { jsx as jsx99, jsxs as jsxs40 } from "react/jsx-runtime";
19558
19593
  var icon3 = {
19559
19594
  height: 16,
@@ -19561,7 +19596,7 @@ var icon3 = {
19561
19596
  };
19562
19597
  var ParameterizeAndEdit = () => {
19563
19598
  const ref = useRef31(null);
19564
- const [vid, setVid] = useState38("/img/editing-vp9-chrome.webm");
19599
+ const [vid, setVid] = useState39("/img/editing-vp9-chrome.webm");
19565
19600
  useEffect45(() => {
19566
19601
  if (isWebkit()) {
19567
19602
  setVid("/img/editing-safari.mp4");
@@ -19676,7 +19711,7 @@ var ParameterizeAndEdit = () => {
19676
19711
  };
19677
19712
 
19678
19713
  // src/components/homepage/RealMp4Videos.tsx
19679
- import { useEffect as useEffect46, useRef as useRef33, useState as useState39 } from "react";
19714
+ import { useEffect as useEffect46, useRef as useRef33, useState as useState40 } from "react";
19680
19715
  import { jsx as jsx100, jsxs as jsxs41 } from "react/jsx-runtime";
19681
19716
  var icon4 = {
19682
19717
  height: 16,
@@ -19685,7 +19720,7 @@ var icon4 = {
19685
19720
  var RealMP4Videos = () => {
19686
19721
  const ref = useRef33(null);
19687
19722
  const videoRef = useRef33(null);
19688
- const [vid, setVid] = useState39("/img/render-progress.webm");
19723
+ const [vid, setVid] = useState40("/img/render-progress.webm");
19689
19724
  useEffect46(() => {
19690
19725
  if (isWebkit()) {
19691
19726
  setVid("/img/render-progress.mp4");
@@ -19985,7 +20020,7 @@ var TrustedByBanner = () => {
19985
20020
  var TrustedByBanner_default = TrustedByBanner;
19986
20021
 
19987
20022
  // src/components/homepage/VideoAppsShowcase.tsx
19988
- import { useEffect as useEffect47, useRef as useRef35, useState as useState40 } from "react";
20023
+ import { useEffect as useEffect47, useRef as useRef35, useState as useState41 } from "react";
19989
20024
  import { jsx as jsx104, jsxs as jsxs45 } from "react/jsx-runtime";
19990
20025
  var tabs = [
19991
20026
  "Music visualization",
@@ -20038,9 +20073,9 @@ var icon5 = {
20038
20073
  marginLeft: 10
20039
20074
  };
20040
20075
  var VideoAppsShowcase = () => {
20041
- const [activeTab, setActiveTab] = useState40(0);
20042
- const [isMuted, setIsMuted] = useState40(true);
20043
- const [isPlaying, setIsPlaying] = useState40(false);
20076
+ const [activeTab, setActiveTab] = useState41(0);
20077
+ const [isMuted, setIsMuted] = useState41(true);
20078
+ const [isPlaying, setIsPlaying] = useState41(false);
20044
20079
  const videoRef = useRef35(null);
20045
20080
  const containerRef = useRef35(null);
20046
20081
  useEffect47(() => {
@@ -21323,7 +21358,7 @@ var ChooseTemplate = () => {
21323
21358
  };
21324
21359
 
21325
21360
  // src/components/homepage/GetStartedStrip.tsx
21326
- import { useState as useState41 } from "react";
21361
+ import { useState as useState43 } from "react";
21327
21362
 
21328
21363
  // src/components/homepage/GitHubButton.tsx
21329
21364
  import { jsx as jsx130, jsxs as jsxs56 } from "react/jsx-runtime";
@@ -21358,7 +21393,7 @@ var GithubButton = () => {
21358
21393
  // src/components/homepage/GetStartedStrip.tsx
21359
21394
  import { jsx as jsx131, jsxs as jsxs57 } from "react/jsx-runtime";
21360
21395
  var GetStarted = () => {
21361
- const [clicked, setClicked] = useState41(null);
21396
+ const [clicked, setClicked] = useState43(null);
21362
21397
  return /* @__PURE__ */ jsxs57("div", {
21363
21398
  className: "flex flex-col lg:flex-row items-center justify-center text-center w-full",
21364
21399
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.341",
3
+ "version": "4.0.344",
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/animated-emoji": "4.0.341",
14
- "@remotion/player": "4.0.341",
15
- "@remotion/lambda": "4.0.341",
16
- "@remotion/shapes": "4.0.341",
17
- "@remotion/lottie": "4.0.341",
18
- "@remotion/paths": "4.0.341",
19
- "create-video": "4.0.341",
20
- "remotion": "4.0.341"
13
+ "@remotion/animated-emoji": "4.0.344",
14
+ "@remotion/lottie": "4.0.344",
15
+ "@remotion/lambda": "4.0.344",
16
+ "@remotion/player": "4.0.344",
17
+ "@remotion/shapes": "4.0.344",
18
+ "create-video": "4.0.344",
19
+ "@remotion/paths": "4.0.344",
20
+ "remotion": "4.0.344"
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.341"
37
+ "@remotion/eslint-config-internal": "4.0.344"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"
@@ -6,7 +6,7 @@ import React, {
6
6
  useRef,
7
7
  useState,
8
8
  } from 'react';
9
- import {AbsoluteFill, getRemotionEnvironment} from 'remotion';
9
+ import {AbsoluteFill, useRemotionEnvironment} from 'remotion';
10
10
  import {Card} from './Card';
11
11
  import type {RemoteData} from './Comp';
12
12
  import {CurrentCountry} from './CurrentCountry';
@@ -47,7 +47,7 @@ export const Cards: React.FC<{
47
47
 
48
48
  const positions = useRef(getInitialPositions());
49
49
  const shouldBePositions = useRef(getInitialPositions());
50
- const {isRendering} = getRemotionEnvironment();
50
+ const {isRendering} = useRemotionEnvironment();
51
51
 
52
52
  useEffect(() => {
53
53
  const {current} = container;
@@ -6,7 +6,7 @@ import React, {
6
6
  useImperativeHandle,
7
7
  useRef,
8
8
  } from 'react';
9
- import {AbsoluteFill, getRemotionEnvironment} from 'remotion';
9
+ import {AbsoluteFill, useRemotionEnvironment} from 'remotion';
10
10
  import {DisplayedEmoji} from './DisplayedEmoji';
11
11
 
12
12
  export type EmojiCardRef = {
@@ -141,6 +141,8 @@ const EmojiCardRefFn: React.ForwardRefRenderFunction<
141
141
  });
142
142
  }, []);
143
143
 
144
+ const env = useRemotionEnvironment();
145
+
144
146
  return (
145
147
  <AbsoluteFill
146
148
  style={{
@@ -171,7 +173,7 @@ const EmojiCardRefFn: React.ForwardRefRenderFunction<
171
173
  height: '100%',
172
174
  }}
173
175
  >
174
- {getRemotionEnvironment().isRendering ? (
176
+ {env.isRendering ? (
175
177
  <div style={emojiStyle}>
176
178
  <DisplayedEmoji emoji={emojiIndex} />
177
179
  </div>