@remotion/promo-pages 4.0.374 → 4.0.376
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Homepage.js +339 -299
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/Homepage.js +339 -299
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/design.js +421 -287
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/homepage/Pricing.js +227 -206
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/template-modal-content.js +234 -213
- package/dist/Users/jonathanburger/remotion/packages/promo-pages/dist/templates.js +224 -203
- package/dist/design.js +421 -287
- package/dist/homepage/Pricing.js +227 -206
- package/dist/template-modal-content.js +234 -213
- package/dist/templates.js +224 -203
- package/package.json +12 -12
package/dist/Homepage.js
CHANGED
|
@@ -89,39 +89,41 @@ import {
|
|
|
89
89
|
import React11, { useCallback as useCallback5, useImperativeHandle as useImperativeHandle3, useRef as useRef3 } from "react";
|
|
90
90
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
91
91
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
92
|
-
import { useContext as useContext14,
|
|
92
|
+
import { useContext as useContext14, useLayoutEffect as useLayoutEffect4, useState as useState9 } from "react";
|
|
93
93
|
import {
|
|
94
94
|
createContext as createContext12,
|
|
95
95
|
useCallback as useCallback6,
|
|
96
|
+
useImperativeHandle as useImperativeHandle5,
|
|
96
97
|
useLayoutEffect as useLayoutEffect3,
|
|
97
98
|
useMemo as useMemo11,
|
|
98
99
|
useState as useState8
|
|
99
100
|
} from "react";
|
|
101
|
+
import { flushSync } from "react-dom";
|
|
100
102
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
101
103
|
import { forwardRef as forwardRef6, useCallback as useCallback11, useContext as useContext27 } from "react";
|
|
102
104
|
import React12, { createContext as createContext13, useMemo as useMemo12 } from "react";
|
|
103
105
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
104
106
|
import { useContext as useContext15 } from "react";
|
|
105
|
-
import { createContext as createContext14, useEffect as
|
|
107
|
+
import { createContext as createContext14, useEffect as useEffect5, useState as useState10 } from "react";
|
|
106
108
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
107
109
|
import { createContext as createContext15, useMemo as useMemo13, useReducer } from "react";
|
|
108
110
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
109
111
|
import {
|
|
110
112
|
forwardRef as forwardRef4,
|
|
111
113
|
useContext as useContext25,
|
|
112
|
-
useEffect as
|
|
113
|
-
useImperativeHandle as
|
|
114
|
+
useEffect as useEffect13,
|
|
115
|
+
useImperativeHandle as useImperativeHandle6,
|
|
114
116
|
useMemo as useMemo21,
|
|
115
117
|
useRef as useRef12,
|
|
116
118
|
useState as useState15
|
|
117
119
|
} from "react";
|
|
118
|
-
import { useContext as useContext17, useLayoutEffect as
|
|
120
|
+
import { useContext as useContext17, useLayoutEffect as useLayoutEffect5, useRef as useRef7 } from "react";
|
|
119
121
|
import React15, {
|
|
120
122
|
createContext as createContext16,
|
|
121
123
|
createRef as createRef2,
|
|
122
124
|
useCallback as useCallback7,
|
|
123
125
|
useContext as useContext16,
|
|
124
|
-
useEffect as
|
|
126
|
+
useEffect as useEffect6,
|
|
125
127
|
useMemo as useMemo15,
|
|
126
128
|
useRef as useRef5,
|
|
127
129
|
useState as useState11
|
|
@@ -129,13 +131,13 @@ import React15, {
|
|
|
129
131
|
import { useMemo as useMemo14 } from "react";
|
|
130
132
|
import { jsx as jsx16, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
131
133
|
import { useRef as useRef6 } from "react";
|
|
132
|
-
import { useContext as useContext19, useEffect as
|
|
134
|
+
import { useContext as useContext19, useEffect as useEffect7, useMemo as useMemo16, useState as useState12 } from "react";
|
|
133
135
|
import { useContext as useContext18 } from "react";
|
|
134
136
|
import {
|
|
135
137
|
useCallback as useCallback10,
|
|
136
138
|
useContext as useContext22,
|
|
137
|
-
useEffect as
|
|
138
|
-
useLayoutEffect as
|
|
139
|
+
useEffect as useEffect11,
|
|
140
|
+
useLayoutEffect as useLayoutEffect7,
|
|
139
141
|
useRef as useRef11
|
|
140
142
|
} from "react";
|
|
141
143
|
import { useCallback as useCallback9, useMemo as useMemo19, useRef as useRef9 } from "react";
|
|
@@ -143,33 +145,33 @@ import { useContext as useContext21, useMemo as useMemo18 } from "react";
|
|
|
143
145
|
import React16, {
|
|
144
146
|
useCallback as useCallback8,
|
|
145
147
|
useContext as useContext20,
|
|
146
|
-
useEffect as
|
|
147
|
-
useLayoutEffect as
|
|
148
|
+
useEffect as useEffect8,
|
|
149
|
+
useLayoutEffect as useLayoutEffect6,
|
|
148
150
|
useMemo as useMemo17,
|
|
149
151
|
useRef as useRef8,
|
|
150
152
|
useState as useState13
|
|
151
153
|
} from "react";
|
|
152
154
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
153
155
|
import React17 from "react";
|
|
154
|
-
import { useEffect as
|
|
155
|
-
import { useEffect as
|
|
156
|
-
import { useContext as useContext23, useEffect as
|
|
156
|
+
import { useEffect as useEffect9, useState as useState14 } from "react";
|
|
157
|
+
import { useEffect as useEffect10, useRef as useRef10 } from "react";
|
|
158
|
+
import { useContext as useContext23, useEffect as useEffect12 } from "react";
|
|
157
159
|
import { createContext as createContext17, useContext as useContext24, useMemo as useMemo20 } from "react";
|
|
158
160
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
159
161
|
import {
|
|
160
162
|
forwardRef as forwardRef5,
|
|
161
163
|
useContext as useContext26,
|
|
162
|
-
useEffect as
|
|
163
|
-
useImperativeHandle as
|
|
164
|
-
useLayoutEffect as
|
|
164
|
+
useEffect as useEffect14,
|
|
165
|
+
useImperativeHandle as useImperativeHandle7,
|
|
166
|
+
useLayoutEffect as useLayoutEffect8,
|
|
165
167
|
useMemo as useMemo222,
|
|
166
168
|
useRef as useRef13
|
|
167
169
|
} from "react";
|
|
168
170
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
169
171
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
170
|
-
import { Suspense, useContext as useContext29, useEffect as
|
|
172
|
+
import { Suspense, useContext as useContext29, useEffect as useEffect16 } from "react";
|
|
171
173
|
import { createPortal } from "react-dom";
|
|
172
|
-
import { createContext as createContext18, useContext as useContext28, useEffect as
|
|
174
|
+
import { createContext as createContext18, useContext as useContext28, useEffect as useEffect15, useMemo as useMemo23 } from "react";
|
|
173
175
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
174
176
|
import { jsx as jsx222, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
175
177
|
import React21, { useMemo as useMemo24 } from "react";
|
|
@@ -180,8 +182,8 @@ import {
|
|
|
180
182
|
forwardRef as forwardRef8,
|
|
181
183
|
useCallback as useCallback13,
|
|
182
184
|
useContext as useContext30,
|
|
183
|
-
useImperativeHandle as
|
|
184
|
-
useLayoutEffect as
|
|
185
|
+
useImperativeHandle as useImperativeHandle8,
|
|
186
|
+
useLayoutEffect as useLayoutEffect9,
|
|
185
187
|
useRef as useRef14
|
|
186
188
|
} from "react";
|
|
187
189
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -189,23 +191,24 @@ import { createRef as createRef3 } from "react";
|
|
|
189
191
|
import React25 from "react";
|
|
190
192
|
import {
|
|
191
193
|
useCallback as useCallback14,
|
|
192
|
-
useImperativeHandle as
|
|
194
|
+
useImperativeHandle as useImperativeHandle9,
|
|
193
195
|
useMemo as useMemo25,
|
|
194
196
|
useRef as useRef15,
|
|
195
197
|
useState as useState17
|
|
196
198
|
} from "react";
|
|
197
199
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
198
|
-
import
|
|
200
|
+
import React26 from "react";
|
|
201
|
+
import { useEffect as useEffect17, useMemo as useMemo27, useState as useState18 } from "react";
|
|
199
202
|
import { createContext as createContext19, useContext as useContext31, useMemo as useMemo26 } from "react";
|
|
200
203
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
201
204
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
202
|
-
import
|
|
205
|
+
import React28, { createContext as createContext20 } from "react";
|
|
203
206
|
import { useCallback as useCallback16 } from "react";
|
|
204
207
|
import {
|
|
205
208
|
useCallback as useCallback15,
|
|
206
209
|
useContext as useContext32,
|
|
207
|
-
useEffect as
|
|
208
|
-
useLayoutEffect as
|
|
210
|
+
useEffect as useEffect18,
|
|
211
|
+
useLayoutEffect as useLayoutEffect10,
|
|
209
212
|
useMemo as useMemo28,
|
|
210
213
|
useState as useState19
|
|
211
214
|
} from "react";
|
|
@@ -213,30 +216,30 @@ import { jsx as jsx29 } from "react/jsx-runtime";
|
|
|
213
216
|
import {
|
|
214
217
|
forwardRef as forwardRef9,
|
|
215
218
|
useContext as useContext33,
|
|
216
|
-
useEffect as
|
|
217
|
-
useImperativeHandle as
|
|
219
|
+
useEffect as useEffect20,
|
|
220
|
+
useImperativeHandle as useImperativeHandle10,
|
|
218
221
|
useMemo as useMemo29,
|
|
219
222
|
useRef as useRef16,
|
|
220
223
|
useState as useState20
|
|
221
224
|
} from "react";
|
|
222
|
-
import { useEffect as
|
|
225
|
+
import { useEffect as useEffect19 } from "react";
|
|
223
226
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
224
227
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
225
|
-
import
|
|
228
|
+
import React32, { useMemo as useMemo30 } from "react";
|
|
226
229
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
227
230
|
import { Children, forwardRef as forwardRef10, useMemo as useMemo31 } from "react";
|
|
228
|
-
import
|
|
229
|
-
import
|
|
231
|
+
import React33 from "react";
|
|
232
|
+
import React34, { createContext as createContext21 } from "react";
|
|
230
233
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
231
234
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
232
|
-
import
|
|
235
|
+
import React36 from "react";
|
|
233
236
|
import { forwardRef as forwardRef12, useCallback as useCallback17, useContext as useContext35 } from "react";
|
|
234
237
|
import {
|
|
235
238
|
forwardRef as forwardRef11,
|
|
236
239
|
useContext as useContext34,
|
|
237
|
-
useEffect as
|
|
238
|
-
useImperativeHandle as
|
|
239
|
-
useLayoutEffect as
|
|
240
|
+
useEffect as useEffect21,
|
|
241
|
+
useImperativeHandle as useImperativeHandle11,
|
|
242
|
+
useLayoutEffect as useLayoutEffect11,
|
|
240
243
|
useMemo as useMemo32,
|
|
241
244
|
useRef as useRef17
|
|
242
245
|
} from "react";
|
|
@@ -451,18 +454,18 @@ function exponentialBackoff(errorCount) {
|
|
|
451
454
|
return 1000 * 2 ** (errorCount - 1);
|
|
452
455
|
}
|
|
453
456
|
function useRemotionContexts() {
|
|
454
|
-
const compositionManagerCtx =
|
|
455
|
-
const timelineContext =
|
|
456
|
-
const setTimelineContext =
|
|
457
|
-
const sequenceContext =
|
|
458
|
-
const nonceContext =
|
|
459
|
-
const canUseRemotionHooksContext =
|
|
460
|
-
const preloadContext =
|
|
461
|
-
const resolveCompositionContext =
|
|
462
|
-
const renderAssetManagerContext =
|
|
463
|
-
const sequenceManagerContext =
|
|
464
|
-
const bufferManagerContext =
|
|
465
|
-
const logLevelContext =
|
|
457
|
+
const compositionManagerCtx = React32.useContext(CompositionManager);
|
|
458
|
+
const timelineContext = React32.useContext(TimelineContext);
|
|
459
|
+
const setTimelineContext = React32.useContext(SetTimelineContext);
|
|
460
|
+
const sequenceContext = React32.useContext(SequenceContext);
|
|
461
|
+
const nonceContext = React32.useContext(NonceContext);
|
|
462
|
+
const canUseRemotionHooksContext = React32.useContext(CanUseRemotionHooks);
|
|
463
|
+
const preloadContext = React32.useContext(PreloadContext);
|
|
464
|
+
const resolveCompositionContext = React32.useContext(ResolveCompositionContext);
|
|
465
|
+
const renderAssetManagerContext = React32.useContext(RenderAssetManager);
|
|
466
|
+
const sequenceManagerContext = React32.useContext(SequenceManager);
|
|
467
|
+
const bufferManagerContext = React32.useContext(BufferingContextReact);
|
|
468
|
+
const logLevelContext = React32.useContext(LogLevelContext);
|
|
466
469
|
return useMemo30(() => ({
|
|
467
470
|
compositionManagerCtx,
|
|
468
471
|
timelineContext,
|
|
@@ -753,7 +756,7 @@ var __defProp2, __export2 = (target, all) => {
|
|
|
753
756
|
});
|
|
754
757
|
}, useIsPlayer = () => {
|
|
755
758
|
return useContext(IsPlayerContext);
|
|
756
|
-
}, VERSION = "4.0.
|
|
759
|
+
}, VERSION = "4.0.376", checkMultipleRemotionVersions = () => {
|
|
757
760
|
if (typeof globalThis === "undefined") {
|
|
758
761
|
return;
|
|
759
762
|
}
|
|
@@ -1046,6 +1049,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1046
1049
|
if (override) {
|
|
1047
1050
|
return override;
|
|
1048
1051
|
}
|
|
1052
|
+
if (typeof window === "undefined" || typeof window.remotion_inputProps === "undefined") {
|
|
1053
|
+
throw new Error("Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.");
|
|
1054
|
+
}
|
|
1049
1055
|
const param = window.remotion_inputProps;
|
|
1050
1056
|
if (!param) {
|
|
1051
1057
|
return {};
|
|
@@ -1106,7 +1112,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1106
1112
|
calculateMetadata,
|
|
1107
1113
|
signal,
|
|
1108
1114
|
defaultProps,
|
|
1109
|
-
originalProps,
|
|
1115
|
+
inputProps: originalProps,
|
|
1110
1116
|
compositionId,
|
|
1111
1117
|
compositionDurationInFrames,
|
|
1112
1118
|
compositionFps,
|
|
@@ -1203,7 +1209,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1203
1209
|
}
|
|
1204
1210
|
}, ResolveCompositionContext, resolveCompositionsRef, needsResolution = (composition) => {
|
|
1205
1211
|
return Boolean(composition.calculateMetadata);
|
|
1206
|
-
}, PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally",
|
|
1212
|
+
}, PROPS_UPDATED_EXTERNALLY = "remotion.propsUpdatedExternally", ResolveCompositionConfigInStudio = ({ children }) => {
|
|
1207
1213
|
const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState4(null);
|
|
1208
1214
|
const { compositions, canvasContent, currentCompositionMetadata } = useContext4(CompositionManager);
|
|
1209
1215
|
const { fastRefreshes, manualRefreshes } = useContext4(NonceContext);
|
|
@@ -1243,7 +1249,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1243
1249
|
const result = resolveVideoConfigOrCatch({
|
|
1244
1250
|
compositionId,
|
|
1245
1251
|
calculateMetadata,
|
|
1246
|
-
|
|
1252
|
+
inputProps: combinedProps,
|
|
1247
1253
|
signal,
|
|
1248
1254
|
defaultProps,
|
|
1249
1255
|
compositionDurationInFrames,
|
|
@@ -1499,7 +1505,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1499
1505
|
props: {
|
|
1500
1506
|
...composition.defaultProps ?? {},
|
|
1501
1507
|
...selectedEditorProps ?? {},
|
|
1502
|
-
...typeof window === "undefined" || env.isPlayer ? {} : getInputProps() ?? {}
|
|
1508
|
+
...typeof window === "undefined" || env.isPlayer || !window.remotion_inputProps ? {} : getInputProps() ?? {}
|
|
1503
1509
|
},
|
|
1504
1510
|
defaultCodec: null,
|
|
1505
1511
|
defaultOutName: null,
|
|
@@ -1509,6 +1515,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
1509
1515
|
}
|
|
1510
1516
|
};
|
|
1511
1517
|
}
|
|
1518
|
+
if (!context) {
|
|
1519
|
+
return null;
|
|
1520
|
+
}
|
|
1512
1521
|
if (!context[composition.id]) {
|
|
1513
1522
|
return null;
|
|
1514
1523
|
}
|
|
@@ -2421,7 +2430,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2421
2430
|
return;
|
|
2422
2431
|
}
|
|
2423
2432
|
validateContent(artifact.content);
|
|
2424
|
-
}, RenderAssetManager, RenderAssetManagerProvider = ({ children }) => {
|
|
2433
|
+
}, RenderAssetManager, RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
2425
2434
|
const [renderAssets, setRenderAssets] = useState8([]);
|
|
2426
2435
|
const registerRenderAsset = useCallback6((renderAsset) => {
|
|
2427
2436
|
validateRenderAsset(renderAsset);
|
|
@@ -2429,6 +2438,18 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2429
2438
|
return [...assets, renderAsset];
|
|
2430
2439
|
});
|
|
2431
2440
|
}, []);
|
|
2441
|
+
if (collectAssets) {
|
|
2442
|
+
useImperativeHandle5(collectAssets, () => {
|
|
2443
|
+
return {
|
|
2444
|
+
collectAssets: () => {
|
|
2445
|
+
flushSync(() => {
|
|
2446
|
+
setRenderAssets([]);
|
|
2447
|
+
});
|
|
2448
|
+
return renderAssets;
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2451
|
+
}, [renderAssets]);
|
|
2452
|
+
}
|
|
2432
2453
|
const unregisterRenderAsset = useCallback6((id) => {
|
|
2433
2454
|
setRenderAssets((assts) => {
|
|
2434
2455
|
return assts.filter((a) => a.id !== id);
|
|
@@ -2460,7 +2481,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2460
2481
|
const [id] = useState9(() => {
|
|
2461
2482
|
return String(Math.random());
|
|
2462
2483
|
});
|
|
2463
|
-
|
|
2484
|
+
useLayoutEffect4(() => {
|
|
2464
2485
|
if (!env.isRendering) {
|
|
2465
2486
|
return;
|
|
2466
2487
|
}
|
|
@@ -2594,7 +2615,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
2594
2615
|
updaters.forEach((u) => u());
|
|
2595
2616
|
}, PrefetchProvider = ({ children }) => {
|
|
2596
2617
|
const [_preloads, _setPreloads] = useState10(() => preloads);
|
|
2597
|
-
|
|
2618
|
+
useEffect5(() => {
|
|
2598
2619
|
const updaterFunction = () => {
|
|
2599
2620
|
_setPreloads(preloads);
|
|
2600
2621
|
};
|
|
@@ -3187,7 +3208,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3187
3208
|
audios.current = [];
|
|
3188
3209
|
rerenderAudios();
|
|
3189
3210
|
}, [numberOfAudioTags, rerenderAudios]);
|
|
3190
|
-
|
|
3211
|
+
useEffect6(() => {
|
|
3191
3212
|
return () => {
|
|
3192
3213
|
resetAudio();
|
|
3193
3214
|
};
|
|
@@ -3370,7 +3391,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3370
3391
|
}
|
|
3371
3392
|
const { audioContext } = sharedAudioContext;
|
|
3372
3393
|
if (typeof window !== "undefined") {
|
|
3373
|
-
|
|
3394
|
+
useLayoutEffect5(() => {
|
|
3374
3395
|
if (!audioContext) {
|
|
3375
3396
|
return;
|
|
3376
3397
|
}
|
|
@@ -3499,7 +3520,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3499
3520
|
});
|
|
3500
3521
|
}).join(",");
|
|
3501
3522
|
}, [duration, startsAt, volume, mediaVolume]);
|
|
3502
|
-
|
|
3523
|
+
useEffect7(() => {
|
|
3503
3524
|
if (typeof volume === "number" && volume !== initialVolume) {
|
|
3504
3525
|
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`);
|
|
3505
3526
|
}
|
|
@@ -3552,7 +3573,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3552
3573
|
trimBefore: undefined,
|
|
3553
3574
|
playbackRate
|
|
3554
3575
|
});
|
|
3555
|
-
|
|
3576
|
+
useEffect7(() => {
|
|
3556
3577
|
if (!src) {
|
|
3557
3578
|
throw new Error("No src passed");
|
|
3558
3579
|
}
|
|
@@ -3642,7 +3663,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3642
3663
|
}
|
|
3643
3664
|
};
|
|
3644
3665
|
}, []);
|
|
3645
|
-
|
|
3666
|
+
useEffect8(() => {
|
|
3646
3667
|
if (blocks.length > 0) {
|
|
3647
3668
|
onBufferingCallbacks.forEach((c) => c());
|
|
3648
3669
|
playbackLogging({
|
|
@@ -3654,7 +3675,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3654
3675
|
}
|
|
3655
3676
|
}, [blocks]);
|
|
3656
3677
|
if (typeof window !== "undefined") {
|
|
3657
|
-
|
|
3678
|
+
useLayoutEffect6(() => {
|
|
3658
3679
|
if (blocks.length === 0) {
|
|
3659
3680
|
onResumeCallbacks.forEach((c) => c());
|
|
3660
3681
|
playbackLogging({
|
|
@@ -3678,7 +3699,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3678
3699
|
});
|
|
3679
3700
|
}, useIsPlayerBuffering = (bufferManager) => {
|
|
3680
3701
|
const [isBuffering, setIsBuffering] = useState13(bufferManager.buffering.current);
|
|
3681
|
-
|
|
3702
|
+
useEffect8(() => {
|
|
3682
3703
|
const onBuffer = () => {
|
|
3683
3704
|
setIsBuffering(true);
|
|
3684
3705
|
};
|
|
@@ -3841,7 +3862,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3841
3862
|
}) => {
|
|
3842
3863
|
const buffer = useBufferState();
|
|
3843
3864
|
const [isBuffering, setIsBuffering] = useState14(false);
|
|
3844
|
-
|
|
3865
|
+
useEffect9(() => {
|
|
3845
3866
|
let cleanupFns = [];
|
|
3846
3867
|
const { current } = element;
|
|
3847
3868
|
if (!current) {
|
|
@@ -3973,7 +3994,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
3973
3994
|
onVariableFpsVideoDetected
|
|
3974
3995
|
}) => {
|
|
3975
3996
|
const currentTime = useRef10(null);
|
|
3976
|
-
|
|
3997
|
+
useEffect10(() => {
|
|
3977
3998
|
const { current } = mediaRef;
|
|
3978
3999
|
if (current) {
|
|
3979
4000
|
currentTime.current = {
|
|
@@ -4155,7 +4176,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4155
4176
|
return acceptableTimeshift ?? defaultAcceptableTimeshift;
|
|
4156
4177
|
})();
|
|
4157
4178
|
const isPlayerBuffering = useIsPlayerBuffering(buffering);
|
|
4158
|
-
|
|
4179
|
+
useEffect11(() => {
|
|
4159
4180
|
if (mediaRef.current?.paused) {
|
|
4160
4181
|
return;
|
|
4161
4182
|
}
|
|
@@ -4194,13 +4215,13 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4194
4215
|
isPostmounting
|
|
4195
4216
|
]);
|
|
4196
4217
|
const env = useRemotionEnvironment();
|
|
4197
|
-
|
|
4218
|
+
useLayoutEffect7(() => {
|
|
4198
4219
|
const playbackRateToSet = Math.max(0, playbackRate);
|
|
4199
4220
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
4200
4221
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
4201
4222
|
}
|
|
4202
4223
|
}, [mediaRef, playbackRate]);
|
|
4203
|
-
|
|
4224
|
+
useEffect11(() => {
|
|
4204
4225
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
4205
4226
|
if (!mediaRef.current) {
|
|
4206
4227
|
throw new Error(`No ${mediaType} ref found`);
|
|
@@ -4328,7 +4349,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4328
4349
|
const logLevel = useLogLevel();
|
|
4329
4350
|
const mountTime = useMountTime();
|
|
4330
4351
|
const env = useRemotionEnvironment();
|
|
4331
|
-
|
|
4352
|
+
useEffect12(() => {
|
|
4332
4353
|
const tag = {
|
|
4333
4354
|
id,
|
|
4334
4355
|
play: (reason) => {
|
|
@@ -4516,12 +4537,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4516
4537
|
volume: userPreferredVolume,
|
|
4517
4538
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
4518
4539
|
});
|
|
4519
|
-
|
|
4540
|
+
useImperativeHandle6(ref, () => {
|
|
4520
4541
|
return audioRef.current;
|
|
4521
4542
|
}, [audioRef]);
|
|
4522
4543
|
const currentOnDurationCallback = useRef12(onDuration);
|
|
4523
4544
|
currentOnDurationCallback.current = onDuration;
|
|
4524
|
-
|
|
4545
|
+
useEffect13(() => {
|
|
4525
4546
|
const { current } = audioRef;
|
|
4526
4547
|
if (!current) {
|
|
4527
4548
|
return;
|
|
@@ -4585,10 +4606,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4585
4606
|
mediaVolume: 1
|
|
4586
4607
|
});
|
|
4587
4608
|
warnAboutTooHighVolume(volume);
|
|
4588
|
-
|
|
4609
|
+
useImperativeHandle7(ref, () => {
|
|
4589
4610
|
return audioRef.current;
|
|
4590
4611
|
}, []);
|
|
4591
|
-
|
|
4612
|
+
useEffect14(() => {
|
|
4592
4613
|
if (!props.src) {
|
|
4593
4614
|
throw new Error("No src passed");
|
|
4594
4615
|
}
|
|
@@ -4632,7 +4653,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4632
4653
|
]);
|
|
4633
4654
|
const { src } = props;
|
|
4634
4655
|
const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;
|
|
4635
|
-
|
|
4656
|
+
useLayoutEffect8(() => {
|
|
4636
4657
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
4637
4658
|
return;
|
|
4638
4659
|
}
|
|
@@ -4892,7 +4913,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4892
4913
|
}
|
|
4893
4914
|
}, Fallback = () => {
|
|
4894
4915
|
const { continueRender: continueRender2, delayRender: delayRender2 } = useDelayRender();
|
|
4895
|
-
|
|
4916
|
+
useEffect16(() => {
|
|
4896
4917
|
const fallback = delayRender2("Waiting for Root component to unsuspend");
|
|
4897
4918
|
return () => continueRender2(fallback);
|
|
4898
4919
|
}, [continueRender2, delayRender2]);
|
|
@@ -4929,7 +4950,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4929
4950
|
throw new Error("<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.");
|
|
4930
4951
|
}
|
|
4931
4952
|
const { folderName, parentName } = useContext29(FolderContext);
|
|
4932
|
-
|
|
4953
|
+
useEffect16(() => {
|
|
4933
4954
|
if (!id) {
|
|
4934
4955
|
throw new Error("No id for composition passed.");
|
|
4935
4956
|
}
|
|
@@ -4968,7 +4989,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
4968
4989
|
registerComposition,
|
|
4969
4990
|
unregisterComposition
|
|
4970
4991
|
]);
|
|
4971
|
-
|
|
4992
|
+
useEffect16(() => {
|
|
4972
4993
|
window.dispatchEvent(new CustomEvent(PROPS_UPDATED_EXTERNALLY, {
|
|
4973
4994
|
detail: {
|
|
4974
4995
|
resetUnsaved: id
|
|
@@ -5066,7 +5087,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5066
5087
|
if (!_propsValid) {
|
|
5067
5088
|
throw new Error("typecheck error");
|
|
5068
5089
|
}
|
|
5069
|
-
|
|
5090
|
+
useImperativeHandle8(ref, () => {
|
|
5070
5091
|
return imageRef.current;
|
|
5071
5092
|
}, []);
|
|
5072
5093
|
const actualSrc = usePreload(src);
|
|
@@ -5108,7 +5129,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5108
5129
|
if (typeof window !== "undefined") {
|
|
5109
5130
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
5110
5131
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
5111
|
-
|
|
5132
|
+
useLayoutEffect9(() => {
|
|
5112
5133
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
5113
5134
|
if (imageRef.current) {
|
|
5114
5135
|
imageRef.current.src = actualSrc;
|
|
@@ -5233,7 +5254,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5233
5254
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
5234
5255
|
});
|
|
5235
5256
|
}, []);
|
|
5236
|
-
|
|
5257
|
+
useImperativeHandle9(compositionsRef, () => {
|
|
5237
5258
|
return {
|
|
5238
5259
|
getCompositions: () => currentcompositionsRef.current
|
|
5239
5260
|
};
|
|
@@ -5326,7 +5347,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5326
5347
|
`;
|
|
5327
5348
|
}, REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container", getPreviewDomElement = () => {
|
|
5328
5349
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
5329
|
-
}, Root = null, listeners, getRoot = () => {
|
|
5350
|
+
}, MaxMediaCacheSizeContext, Root = null, listeners, getRoot = () => {
|
|
5330
5351
|
return Root;
|
|
5331
5352
|
}, waitForRoot = (fn) => {
|
|
5332
5353
|
if (Root) {
|
|
@@ -5367,7 +5388,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5367
5388
|
value,
|
|
5368
5389
|
children
|
|
5369
5390
|
});
|
|
5370
|
-
},
|
|
5391
|
+
}, RemotionRootContexts = ({
|
|
5371
5392
|
children,
|
|
5372
5393
|
numberOfAudioTags,
|
|
5373
5394
|
logLevel,
|
|
@@ -5393,7 +5414,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5393
5414
|
}
|
|
5394
5415
|
};
|
|
5395
5416
|
}, []);
|
|
5396
|
-
|
|
5417
|
+
useEffect17(() => {
|
|
5397
5418
|
if (typeof __webpack_module__ !== "undefined") {
|
|
5398
5419
|
if (__webpack_module__.hot) {
|
|
5399
5420
|
__webpack_module__.hot.addStatusHandler((status) => {
|
|
@@ -5421,16 +5442,12 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5421
5442
|
children: /* @__PURE__ */ jsx28(EditorPropsProvider, {
|
|
5422
5443
|
children: /* @__PURE__ */ jsx28(PrefetchProvider, {
|
|
5423
5444
|
children: /* @__PURE__ */ jsx28(SequenceManagerProvider, {
|
|
5424
|
-
children: /* @__PURE__ */ jsx28(
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
children
|
|
5430
|
-
children: /* @__PURE__ */ jsx28(BufferingProvider, {
|
|
5431
|
-
children
|
|
5432
|
-
})
|
|
5433
|
-
})
|
|
5445
|
+
children: /* @__PURE__ */ jsx28(SharedAudioContextProvider, {
|
|
5446
|
+
numberOfAudioTags,
|
|
5447
|
+
audioLatencyHint,
|
|
5448
|
+
children: /* @__PURE__ */ jsx28(DurationsContextProvider, {
|
|
5449
|
+
children: /* @__PURE__ */ jsx28(BufferingProvider, {
|
|
5450
|
+
children
|
|
5434
5451
|
})
|
|
5435
5452
|
})
|
|
5436
5453
|
})
|
|
@@ -5532,7 +5549,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5532
5549
|
mediaVolume: 1
|
|
5533
5550
|
});
|
|
5534
5551
|
warnAboutTooHighVolume(volume);
|
|
5535
|
-
|
|
5552
|
+
useEffect18(() => {
|
|
5536
5553
|
if (!src) {
|
|
5537
5554
|
throw new Error("No src passed");
|
|
5538
5555
|
}
|
|
@@ -5589,7 +5606,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5589
5606
|
}, [toneMapped, currentTime, src, transparent]);
|
|
5590
5607
|
const [imageSrc, setImageSrc] = useState19(null);
|
|
5591
5608
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
5592
|
-
|
|
5609
|
+
useLayoutEffect10(() => {
|
|
5593
5610
|
if (!window.remotion_videoEnabled) {
|
|
5594
5611
|
return;
|
|
5595
5612
|
}
|
|
@@ -5692,7 +5709,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5692
5709
|
ref,
|
|
5693
5710
|
onVideoFrame
|
|
5694
5711
|
}) => {
|
|
5695
|
-
|
|
5712
|
+
useEffect19(() => {
|
|
5696
5713
|
const { current } = ref;
|
|
5697
5714
|
if (!current) {
|
|
5698
5715
|
return;
|
|
@@ -5829,7 +5846,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5829
5846
|
duration,
|
|
5830
5847
|
fps
|
|
5831
5848
|
});
|
|
5832
|
-
|
|
5849
|
+
useImperativeHandle10(ref, () => {
|
|
5833
5850
|
return videoRef.current;
|
|
5834
5851
|
}, []);
|
|
5835
5852
|
useState20(() => playbackLogging({
|
|
@@ -5838,7 +5855,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5838
5855
|
tag: "video",
|
|
5839
5856
|
mountTime
|
|
5840
5857
|
}));
|
|
5841
|
-
|
|
5858
|
+
useEffect20(() => {
|
|
5842
5859
|
const { current } = videoRef;
|
|
5843
5860
|
if (!current) {
|
|
5844
5861
|
return;
|
|
@@ -5869,7 +5886,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5869
5886
|
const currentOnDurationCallback = useRef16(onDuration);
|
|
5870
5887
|
currentOnDurationCallback.current = onDuration;
|
|
5871
5888
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
5872
|
-
|
|
5889
|
+
useEffect20(() => {
|
|
5873
5890
|
const { current } = videoRef;
|
|
5874
5891
|
if (!current) {
|
|
5875
5892
|
return;
|
|
@@ -5886,7 +5903,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
5886
5903
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
5887
5904
|
};
|
|
5888
5905
|
}, [src]);
|
|
5889
|
-
|
|
5906
|
+
useEffect20(() => {
|
|
5890
5907
|
const { current } = videoRef;
|
|
5891
5908
|
if (!current) {
|
|
5892
5909
|
return;
|
|
@@ -6131,9 +6148,9 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6131
6148
|
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
6132
6149
|
}
|
|
6133
6150
|
}, flattenChildren = (children) => {
|
|
6134
|
-
const childrenArray =
|
|
6151
|
+
const childrenArray = React33.Children.toArray(children);
|
|
6135
6152
|
return childrenArray.reduce((flatChildren, child) => {
|
|
6136
|
-
if (child.type ===
|
|
6153
|
+
if (child.type === React33.Fragment) {
|
|
6137
6154
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
6138
6155
|
}
|
|
6139
6156
|
flatChildren.push(child);
|
|
@@ -6150,7 +6167,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6150
6167
|
children
|
|
6151
6168
|
});
|
|
6152
6169
|
}, useRequireToBeInsideSeries = () => {
|
|
6153
|
-
const isInsideSeries =
|
|
6170
|
+
const isInsideSeries = React34.useContext(IsInsideSeriesContext);
|
|
6154
6171
|
if (!isInsideSeries) {
|
|
6155
6172
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6156
6173
|
}
|
|
@@ -6464,7 +6481,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6464
6481
|
mediaVolume: 1
|
|
6465
6482
|
});
|
|
6466
6483
|
warnAboutTooHighVolume(volume);
|
|
6467
|
-
|
|
6484
|
+
useEffect21(() => {
|
|
6468
6485
|
if (!props2.src) {
|
|
6469
6486
|
throw new Error("No src passed");
|
|
6470
6487
|
}
|
|
@@ -6504,10 +6521,10 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6504
6521
|
sequenceContext?.relativeFrom,
|
|
6505
6522
|
audioStreamIndex
|
|
6506
6523
|
]);
|
|
6507
|
-
|
|
6524
|
+
useImperativeHandle11(ref, () => {
|
|
6508
6525
|
return videoRef.current;
|
|
6509
6526
|
}, []);
|
|
6510
|
-
|
|
6527
|
+
useEffect21(() => {
|
|
6511
6528
|
if (!window.remotion_videoEnabled) {
|
|
6512
6529
|
return;
|
|
6513
6530
|
}
|
|
@@ -6591,7 +6608,7 @@ Check that all your Remotion packages are on the same version. If your dependenc
|
|
|
6591
6608
|
]);
|
|
6592
6609
|
const { src } = props2;
|
|
6593
6610
|
if (environment.isRendering) {
|
|
6594
|
-
|
|
6611
|
+
useLayoutEffect11(() => {
|
|
6595
6612
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
6596
6613
|
return;
|
|
6597
6614
|
}
|
|
@@ -7061,9 +7078,10 @@ var init_esm = __esm(() => {
|
|
|
7061
7078
|
OBJECTFIT_CONTAIN_CLASS_NAME: () => OBJECTFIT_CONTAIN_CLASS_NAME
|
|
7062
7079
|
});
|
|
7063
7080
|
injected = {};
|
|
7081
|
+
MaxMediaCacheSizeContext = React26.createContext(null);
|
|
7064
7082
|
listeners = [];
|
|
7065
7083
|
MediaEnabledContext = createContext19(null);
|
|
7066
|
-
CurrentScaleContext =
|
|
7084
|
+
CurrentScaleContext = React28.createContext(null);
|
|
7067
7085
|
PreviewSizeContext = createContext20({
|
|
7068
7086
|
setSize: () => {
|
|
7069
7087
|
return;
|
|
@@ -7074,6 +7092,7 @@ var init_esm = __esm(() => {
|
|
|
7074
7092
|
addSequenceStackTraces(OffthreadVideo);
|
|
7075
7093
|
compositionSelectorRef = createRef3();
|
|
7076
7094
|
Internals = {
|
|
7095
|
+
MaxMediaCacheSizeContext,
|
|
7077
7096
|
useUnsafeVideoConfig,
|
|
7078
7097
|
useFrameForVolumeProp,
|
|
7079
7098
|
useTimelinePosition,
|
|
@@ -7088,7 +7107,7 @@ var init_esm = __esm(() => {
|
|
|
7088
7107
|
CompositionSetters,
|
|
7089
7108
|
SequenceManager,
|
|
7090
7109
|
SequenceVisibilityToggleContext,
|
|
7091
|
-
|
|
7110
|
+
RemotionRootContexts,
|
|
7092
7111
|
CompositionManagerProvider,
|
|
7093
7112
|
useVideo,
|
|
7094
7113
|
getRoot,
|
|
@@ -7129,7 +7148,7 @@ var init_esm = __esm(() => {
|
|
|
7129
7148
|
resolveVideoConfig,
|
|
7130
7149
|
useResolvedVideoConfig,
|
|
7131
7150
|
resolveCompositionsRef,
|
|
7132
|
-
|
|
7151
|
+
ResolveCompositionConfigInStudio,
|
|
7133
7152
|
REMOTION_STUDIO_CONTAINER_ELEMENT,
|
|
7134
7153
|
RenderAssetManager,
|
|
7135
7154
|
persistCurrentFrame,
|
|
@@ -7166,7 +7185,8 @@ var init_esm = __esm(() => {
|
|
|
7166
7185
|
useIsPlayerBuffering,
|
|
7167
7186
|
TimelinePosition: exports_timeline_position_state,
|
|
7168
7187
|
DelayRenderContextType,
|
|
7169
|
-
TimelineContext
|
|
7188
|
+
TimelineContext,
|
|
7189
|
+
RenderAssetManagerProvider
|
|
7170
7190
|
};
|
|
7171
7191
|
PERCENTAGE = NUMBER + "%";
|
|
7172
7192
|
IsInsideSeriesContext = createContext21(false);
|
|
@@ -7236,7 +7256,7 @@ __export(exports_esm, {
|
|
|
7236
7256
|
Lottie: () => Lottie
|
|
7237
7257
|
});
|
|
7238
7258
|
import lottie from "lottie-web";
|
|
7239
|
-
import { useEffect as
|
|
7259
|
+
import { useEffect as useEffect39, useRef as useRef36, useState as useState37 } from "react";
|
|
7240
7260
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
7241
7261
|
var getLottieMetadata = (animationData) => {
|
|
7242
7262
|
const width2 = animationData.w;
|
|
@@ -7308,14 +7328,14 @@ var getLottieMetadata = (animationData) => {
|
|
|
7308
7328
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
7309
7329
|
const { delayRender, continueRender } = useDelayRender();
|
|
7310
7330
|
const [handle] = useState37(() => delayRender("Waiting for Lottie animation to load"));
|
|
7311
|
-
|
|
7331
|
+
useEffect39(() => {
|
|
7312
7332
|
return () => {
|
|
7313
7333
|
continueRender(handle);
|
|
7314
7334
|
};
|
|
7315
7335
|
}, [handle, continueRender]);
|
|
7316
7336
|
const frame = useCurrentFrame();
|
|
7317
7337
|
currentFrameRef.current = frame;
|
|
7318
|
-
|
|
7338
|
+
useEffect39(() => {
|
|
7319
7339
|
if (!containerRef.current) {
|
|
7320
7340
|
return;
|
|
7321
7341
|
}
|
|
@@ -7360,17 +7380,17 @@ var getLottieMetadata = (animationData) => {
|
|
|
7360
7380
|
renderer,
|
|
7361
7381
|
continueRender
|
|
7362
7382
|
]);
|
|
7363
|
-
|
|
7383
|
+
useEffect39(() => {
|
|
7364
7384
|
if (animationRef.current && direction) {
|
|
7365
7385
|
animationRef.current.setDirection(direction === "backward" ? -1 : 1);
|
|
7366
7386
|
}
|
|
7367
7387
|
}, [direction]);
|
|
7368
|
-
|
|
7388
|
+
useEffect39(() => {
|
|
7369
7389
|
if (animationRef.current && playbackRate) {
|
|
7370
7390
|
animationRef.current.setSpeed(playbackRate);
|
|
7371
7391
|
}
|
|
7372
7392
|
}, [playbackRate]);
|
|
7373
|
-
|
|
7393
|
+
useEffect39(() => {
|
|
7374
7394
|
if (!animationRef.current) {
|
|
7375
7395
|
return;
|
|
7376
7396
|
}
|
|
@@ -8747,7 +8767,7 @@ var getDefaultConfig = () => {
|
|
|
8747
8767
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
8748
8768
|
|
|
8749
8769
|
// ../design/dist/esm/index.mjs
|
|
8750
|
-
import React7, { useEffect as
|
|
8770
|
+
import React7, { useEffect as useEffect22, useMemo as useMemo33, useState as useState21 } from "react";
|
|
8751
8771
|
|
|
8752
8772
|
// ../paths/dist/esm/index.mjs
|
|
8753
8773
|
var cutLInstruction = ({
|
|
@@ -12888,7 +12908,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
12888
12908
|
init_esm();
|
|
12889
12909
|
import { jsx as jsx37, Fragment } from "react/jsx-runtime";
|
|
12890
12910
|
import { jsx as jsx210, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
12891
|
-
import { useEffect as
|
|
12911
|
+
import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef18 } from "react";
|
|
12892
12912
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
12893
12913
|
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12894
12914
|
import React42 from "react";
|
|
@@ -12898,7 +12918,7 @@ import { jsx as jsx73, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
|
12898
12918
|
import React52 from "react";
|
|
12899
12919
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
12900
12920
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
12901
|
-
import * as
|
|
12921
|
+
import * as React342 from "react";
|
|
12902
12922
|
import * as ReactDOM4 from "react-dom";
|
|
12903
12923
|
import React9 from "react";
|
|
12904
12924
|
import * as React62 from "react";
|
|
@@ -12934,20 +12954,20 @@ import ReactDOM3 from "react-dom";
|
|
|
12934
12954
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
12935
12955
|
import * as React24 from "react";
|
|
12936
12956
|
import * as React252 from "react";
|
|
12937
|
-
import * as
|
|
12957
|
+
import * as React262 from "react";
|
|
12938
12958
|
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
12939
12959
|
import * as React332 from "react";
|
|
12940
12960
|
import * as React29 from "react";
|
|
12941
12961
|
import { useState as useState112 } from "react";
|
|
12942
|
-
import * as
|
|
12943
|
-
import * as
|
|
12962
|
+
import * as React27 from "react";
|
|
12963
|
+
import * as React282 from "react";
|
|
12944
12964
|
import * as React322 from "react";
|
|
12945
|
-
import * as
|
|
12965
|
+
import * as React31 from "react";
|
|
12946
12966
|
import * as React30 from "react";
|
|
12947
12967
|
import { Fragment as Fragment52, jsx as jsx212, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
12948
12968
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
12949
12969
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
12950
|
-
import * as
|
|
12970
|
+
import * as React35 from "react";
|
|
12951
12971
|
import { jsx as jsx223, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
12952
12972
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
12953
12973
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
@@ -12974,7 +12994,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
12974
12994
|
isActive: false
|
|
12975
12995
|
});
|
|
12976
12996
|
const eventTarget = useMemo33(() => new EventTarget, []);
|
|
12977
|
-
|
|
12997
|
+
useEffect22(() => {
|
|
12978
12998
|
if (disabled) {
|
|
12979
12999
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
12980
13000
|
} else {
|
|
@@ -13121,7 +13141,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
13121
13141
|
var lastCoordinates = null;
|
|
13122
13142
|
var useMousePosition = (ref) => {
|
|
13123
13143
|
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
13124
|
-
|
|
13144
|
+
useEffect22(() => {
|
|
13125
13145
|
const element = ref.current;
|
|
13126
13146
|
if (!element) {
|
|
13127
13147
|
return;
|
|
@@ -13180,6 +13200,7 @@ var Outer = ({
|
|
|
13180
13200
|
const depth = depthFromHover;
|
|
13181
13201
|
const frontFace = reduceMatrices([
|
|
13182
13202
|
translateZ(-depth / 2 + depthFromClick),
|
|
13203
|
+
translateZ(1.1),
|
|
13183
13204
|
transformation
|
|
13184
13205
|
]);
|
|
13185
13206
|
const centerOriented = reduceMatrices([
|
|
@@ -13241,7 +13262,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
13241
13262
|
};
|
|
13242
13263
|
}, [size]);
|
|
13243
13264
|
const pathsRef = useRef18([]);
|
|
13244
|
-
|
|
13265
|
+
useEffect23(() => {
|
|
13245
13266
|
const animate = () => {
|
|
13246
13267
|
const now = performance.now();
|
|
13247
13268
|
for (let index = 0;index < lines; index++) {
|
|
@@ -13321,7 +13342,7 @@ var Button = ({ children, className, disabled, depth, loading, ...buttonProps })
|
|
|
13321
13342
|
...buttonProps,
|
|
13322
13343
|
children: [
|
|
13323
13344
|
/* @__PURE__ */ jsx43("div", {
|
|
13324
|
-
className: cn(loading && "invisible"),
|
|
13345
|
+
className: cn(loading && "invisible", "inline-flex"),
|
|
13325
13346
|
children
|
|
13326
13347
|
}),
|
|
13327
13348
|
loading ? /* @__PURE__ */ jsx43("div", {
|
|
@@ -16319,7 +16340,7 @@ function usePrevious(value) {
|
|
|
16319
16340
|
}, [value]);
|
|
16320
16341
|
}
|
|
16321
16342
|
var NAME2 = "VisuallyHidden";
|
|
16322
|
-
var VisuallyHidden =
|
|
16343
|
+
var VisuallyHidden = React262.forwardRef((props, forwardedRef) => {
|
|
16323
16344
|
return /* @__PURE__ */ jsx202(Primitive.span, {
|
|
16324
16345
|
...props,
|
|
16325
16346
|
ref: forwardedRef,
|
|
@@ -16527,7 +16548,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
16527
16548
|
ref.callback = callback;
|
|
16528
16549
|
return ref.facade;
|
|
16529
16550
|
}
|
|
16530
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
16551
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React27.useLayoutEffect : React27.useEffect;
|
|
16531
16552
|
var currentValues = new WeakMap;
|
|
16532
16553
|
function useMergeRefs(refs, defaultValue) {
|
|
16533
16554
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -16649,7 +16670,7 @@ var SideCar = function(_a) {
|
|
|
16649
16670
|
if (!Target) {
|
|
16650
16671
|
throw new Error("Sidecar medium not found");
|
|
16651
16672
|
}
|
|
16652
|
-
return
|
|
16673
|
+
return React282.createElement(Target, __assign({}, rest));
|
|
16653
16674
|
};
|
|
16654
16675
|
SideCar.isSideCarExport = true;
|
|
16655
16676
|
function exportSidecar(medium, exported) {
|
|
@@ -16844,7 +16865,7 @@ var getCurrentUseCounter = function() {
|
|
|
16844
16865
|
return isFinite(counter) ? counter : 0;
|
|
16845
16866
|
};
|
|
16846
16867
|
var useLockAttribute = function() {
|
|
16847
|
-
|
|
16868
|
+
React31.useEffect(function() {
|
|
16848
16869
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
16849
16870
|
return function() {
|
|
16850
16871
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -16859,10 +16880,10 @@ var useLockAttribute = function() {
|
|
|
16859
16880
|
var RemoveScrollBar = function(_a) {
|
|
16860
16881
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
16861
16882
|
useLockAttribute();
|
|
16862
|
-
var gap =
|
|
16883
|
+
var gap = React31.useMemo(function() {
|
|
16863
16884
|
return getGapWidth(gapMode);
|
|
16864
16885
|
}, [gapMode]);
|
|
16865
|
-
return
|
|
16886
|
+
return React31.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
16866
16887
|
};
|
|
16867
16888
|
var passiveSupported = false;
|
|
16868
16889
|
if (typeof window !== "undefined") {
|
|
@@ -17163,9 +17184,9 @@ var Select = (props) => {
|
|
|
17163
17184
|
required
|
|
17164
17185
|
} = props;
|
|
17165
17186
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17166
|
-
const [trigger, setTrigger] =
|
|
17167
|
-
const [valueNode, setValueNode] =
|
|
17168
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
17187
|
+
const [trigger, setTrigger] = React342.useState(null);
|
|
17188
|
+
const [valueNode, setValueNode] = React342.useState(null);
|
|
17189
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React342.useState(false);
|
|
17169
17190
|
const direction = useDirection(dir);
|
|
17170
17191
|
const [open = false, setOpen] = useControllableState({
|
|
17171
17192
|
prop: openProp,
|
|
@@ -17177,9 +17198,9 @@ var Select = (props) => {
|
|
|
17177
17198
|
defaultProp: defaultValue,
|
|
17178
17199
|
onChange: onValueChange
|
|
17179
17200
|
});
|
|
17180
|
-
const triggerPointerDownPosRef =
|
|
17201
|
+
const triggerPointerDownPosRef = React342.useRef(null);
|
|
17181
17202
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
17182
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
17203
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React342.useState(/* @__PURE__ */ new Set);
|
|
17183
17204
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
17184
17205
|
return /* @__PURE__ */ jsx212(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
17185
17206
|
required,
|
|
@@ -17201,10 +17222,10 @@ var Select = (props) => {
|
|
|
17201
17222
|
children: [
|
|
17202
17223
|
/* @__PURE__ */ jsx212(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(SelectNativeOptionsProvider, {
|
|
17203
17224
|
scope: props.__scopeSelect,
|
|
17204
|
-
onNativeOptionAdd:
|
|
17225
|
+
onNativeOptionAdd: React342.useCallback((option) => {
|
|
17205
17226
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
17206
17227
|
}, []),
|
|
17207
|
-
onNativeOptionRemove:
|
|
17228
|
+
onNativeOptionRemove: React342.useCallback((option) => {
|
|
17208
17229
|
setNativeOptionsSet((prev) => {
|
|
17209
17230
|
const optionsSet = new Set(prev);
|
|
17210
17231
|
optionsSet.delete(option);
|
|
@@ -17232,7 +17253,7 @@ var Select = (props) => {
|
|
|
17232
17253
|
};
|
|
17233
17254
|
Select.displayName = SELECT_NAME;
|
|
17234
17255
|
var TRIGGER_NAME = "SelectTrigger";
|
|
17235
|
-
var SelectTrigger =
|
|
17256
|
+
var SelectTrigger = React342.forwardRef((props, forwardedRef) => {
|
|
17236
17257
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
17237
17258
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17238
17259
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -17300,7 +17321,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
17300
17321
|
});
|
|
17301
17322
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
17302
17323
|
var VALUE_NAME = "SelectValue";
|
|
17303
|
-
var SelectValue =
|
|
17324
|
+
var SelectValue = React342.forwardRef((props, forwardedRef) => {
|
|
17304
17325
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
17305
17326
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
17306
17327
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -17318,7 +17339,7 @@ var SelectValue = React34.forwardRef((props, forwardedRef) => {
|
|
|
17318
17339
|
});
|
|
17319
17340
|
SelectValue.displayName = VALUE_NAME;
|
|
17320
17341
|
var ICON_NAME = "SelectIcon";
|
|
17321
|
-
var SelectIcon =
|
|
17342
|
+
var SelectIcon = React342.forwardRef((props, forwardedRef) => {
|
|
17322
17343
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
17323
17344
|
return /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
17324
17345
|
});
|
|
@@ -17329,9 +17350,9 @@ var SelectPortal = (props) => {
|
|
|
17329
17350
|
};
|
|
17330
17351
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
17331
17352
|
var CONTENT_NAME2 = "SelectContent";
|
|
17332
|
-
var SelectContent =
|
|
17353
|
+
var SelectContent = React342.forwardRef((props, forwardedRef) => {
|
|
17333
17354
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
17334
|
-
const [fragment, setFragment] =
|
|
17355
|
+
const [fragment, setFragment] = React342.useState();
|
|
17335
17356
|
useLayoutEffect22(() => {
|
|
17336
17357
|
setFragment(new DocumentFragment);
|
|
17337
17358
|
}, []);
|
|
@@ -17345,7 +17366,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
17345
17366
|
var CONTENT_MARGIN = 10;
|
|
17346
17367
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
17347
17368
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
17348
|
-
var SelectContentImpl =
|
|
17369
|
+
var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
17349
17370
|
const {
|
|
17350
17371
|
__scopeSelect,
|
|
17351
17372
|
position = "item-aligned",
|
|
@@ -17365,20 +17386,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17365
17386
|
...contentProps
|
|
17366
17387
|
} = props;
|
|
17367
17388
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17368
|
-
const [content, setContent] =
|
|
17369
|
-
const [viewport, setViewport] =
|
|
17389
|
+
const [content, setContent] = React342.useState(null);
|
|
17390
|
+
const [viewport, setViewport] = React342.useState(null);
|
|
17370
17391
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17371
|
-
const [selectedItem, setSelectedItem] =
|
|
17372
|
-
const [selectedItemText, setSelectedItemText] =
|
|
17392
|
+
const [selectedItem, setSelectedItem] = React342.useState(null);
|
|
17393
|
+
const [selectedItemText, setSelectedItemText] = React342.useState(null);
|
|
17373
17394
|
const getItems = useCollection(__scopeSelect);
|
|
17374
|
-
const [isPositioned, setIsPositioned] =
|
|
17375
|
-
const firstValidItemFoundRef =
|
|
17376
|
-
|
|
17395
|
+
const [isPositioned, setIsPositioned] = React342.useState(false);
|
|
17396
|
+
const firstValidItemFoundRef = React342.useRef(false);
|
|
17397
|
+
React342.useEffect(() => {
|
|
17377
17398
|
if (content)
|
|
17378
17399
|
return hideOthers(content);
|
|
17379
17400
|
}, [content]);
|
|
17380
17401
|
useFocusGuards();
|
|
17381
|
-
const focusFirst2 =
|
|
17402
|
+
const focusFirst2 = React342.useCallback((candidates) => {
|
|
17382
17403
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
17383
17404
|
const [lastItem] = restItems.slice(-1);
|
|
17384
17405
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -17395,14 +17416,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17395
17416
|
return;
|
|
17396
17417
|
}
|
|
17397
17418
|
}, [getItems, viewport]);
|
|
17398
|
-
const focusSelectedItem =
|
|
17399
|
-
|
|
17419
|
+
const focusSelectedItem = React342.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
17420
|
+
React342.useEffect(() => {
|
|
17400
17421
|
if (isPositioned) {
|
|
17401
17422
|
focusSelectedItem();
|
|
17402
17423
|
}
|
|
17403
17424
|
}, [isPositioned, focusSelectedItem]);
|
|
17404
17425
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
17405
|
-
|
|
17426
|
+
React342.useEffect(() => {
|
|
17406
17427
|
if (content) {
|
|
17407
17428
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
17408
17429
|
const handlePointerMove = (event) => {
|
|
@@ -17432,7 +17453,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17432
17453
|
};
|
|
17433
17454
|
}
|
|
17434
17455
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
17435
|
-
|
|
17456
|
+
React342.useEffect(() => {
|
|
17436
17457
|
const close = () => onOpenChange(false);
|
|
17437
17458
|
window.addEventListener("blur", close);
|
|
17438
17459
|
window.addEventListener("resize", close);
|
|
@@ -17449,7 +17470,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17449
17470
|
setTimeout(() => nextItem.ref.current.focus());
|
|
17450
17471
|
}
|
|
17451
17472
|
});
|
|
17452
|
-
const itemRefCallback =
|
|
17473
|
+
const itemRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17453
17474
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17454
17475
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17455
17476
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17458,8 +17479,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17458
17479
|
firstValidItemFoundRef.current = true;
|
|
17459
17480
|
}
|
|
17460
17481
|
}, [context.value]);
|
|
17461
|
-
const handleItemLeave =
|
|
17462
|
-
const itemTextRefCallback =
|
|
17482
|
+
const handleItemLeave = React342.useCallback(() => content?.focus(), [content]);
|
|
17483
|
+
const itemTextRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17463
17484
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17464
17485
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17465
17486
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17554,18 +17575,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17554
17575
|
});
|
|
17555
17576
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
17556
17577
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
17557
|
-
var SelectItemAlignedPosition =
|
|
17578
|
+
var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17558
17579
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
17559
17580
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17560
17581
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
17561
|
-
const [contentWrapper, setContentWrapper] =
|
|
17562
|
-
const [content, setContent] =
|
|
17582
|
+
const [contentWrapper, setContentWrapper] = React342.useState(null);
|
|
17583
|
+
const [content, setContent] = React342.useState(null);
|
|
17563
17584
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17564
17585
|
const getItems = useCollection(__scopeSelect);
|
|
17565
|
-
const shouldExpandOnScrollRef =
|
|
17566
|
-
const shouldRepositionRef =
|
|
17586
|
+
const shouldExpandOnScrollRef = React342.useRef(false);
|
|
17587
|
+
const shouldRepositionRef = React342.useRef(true);
|
|
17567
17588
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
17568
|
-
const position =
|
|
17589
|
+
const position = React342.useCallback(() => {
|
|
17569
17590
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
17570
17591
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
17571
17592
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -17646,12 +17667,12 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17646
17667
|
onPlaced
|
|
17647
17668
|
]);
|
|
17648
17669
|
useLayoutEffect22(() => position(), [position]);
|
|
17649
|
-
const [contentZIndex, setContentZIndex] =
|
|
17670
|
+
const [contentZIndex, setContentZIndex] = React342.useState();
|
|
17650
17671
|
useLayoutEffect22(() => {
|
|
17651
17672
|
if (content)
|
|
17652
17673
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
17653
17674
|
}, [content]);
|
|
17654
|
-
const handleScrollButtonChange =
|
|
17675
|
+
const handleScrollButtonChange = React342.useCallback((node) => {
|
|
17655
17676
|
if (node && shouldRepositionRef.current === true) {
|
|
17656
17677
|
position();
|
|
17657
17678
|
focusSelectedItem?.();
|
|
@@ -17685,7 +17706,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17685
17706
|
});
|
|
17686
17707
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
17687
17708
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
17688
|
-
var SelectPopperPosition =
|
|
17709
|
+
var SelectPopperPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17689
17710
|
const {
|
|
17690
17711
|
__scopeSelect,
|
|
17691
17712
|
align = "start",
|
|
@@ -17715,12 +17736,12 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17715
17736
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
17716
17737
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
17717
17738
|
var VIEWPORT_NAME = "SelectViewport";
|
|
17718
|
-
var SelectViewport =
|
|
17739
|
+
var SelectViewport = React342.forwardRef((props, forwardedRef) => {
|
|
17719
17740
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
17720
17741
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
17721
17742
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
17722
17743
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
17723
|
-
const prevScrollTopRef =
|
|
17744
|
+
const prevScrollTopRef = React342.useRef(0);
|
|
17724
17745
|
return /* @__PURE__ */ jsxs4(Fragment52, { children: [
|
|
17725
17746
|
/* @__PURE__ */ jsx212("style", {
|
|
17726
17747
|
dangerouslySetInnerHTML: {
|
|
@@ -17769,14 +17790,14 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
17769
17790
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
17770
17791
|
var GROUP_NAME = "SelectGroup";
|
|
17771
17792
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
17772
|
-
var SelectGroup =
|
|
17793
|
+
var SelectGroup = React342.forwardRef((props, forwardedRef) => {
|
|
17773
17794
|
const { __scopeSelect, ...groupProps } = props;
|
|
17774
17795
|
const groupId = useId();
|
|
17775
17796
|
return /* @__PURE__ */ jsx212(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx212(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
17776
17797
|
});
|
|
17777
17798
|
SelectGroup.displayName = GROUP_NAME;
|
|
17778
17799
|
var LABEL_NAME = "SelectLabel";
|
|
17779
|
-
var SelectLabel =
|
|
17800
|
+
var SelectLabel = React342.forwardRef((props, forwardedRef) => {
|
|
17780
17801
|
const { __scopeSelect, ...labelProps } = props;
|
|
17781
17802
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
17782
17803
|
return /* @__PURE__ */ jsx212(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -17784,7 +17805,7 @@ var SelectLabel = React34.forwardRef((props, forwardedRef) => {
|
|
|
17784
17805
|
SelectLabel.displayName = LABEL_NAME;
|
|
17785
17806
|
var ITEM_NAME = "SelectItem";
|
|
17786
17807
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
17787
|
-
var SelectItem =
|
|
17808
|
+
var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
17788
17809
|
const {
|
|
17789
17810
|
__scopeSelect,
|
|
17790
17811
|
value,
|
|
@@ -17795,8 +17816,8 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17795
17816
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
17796
17817
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
17797
17818
|
const isSelected = context.value === value;
|
|
17798
|
-
const [textValue, setTextValue] =
|
|
17799
|
-
const [isFocused, setIsFocused] =
|
|
17819
|
+
const [textValue, setTextValue] = React342.useState(textValueProp ?? "");
|
|
17820
|
+
const [isFocused, setIsFocused] = React342.useState(false);
|
|
17800
17821
|
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
17801
17822
|
const textId = useId();
|
|
17802
17823
|
const handleSelect = () => {
|
|
@@ -17814,7 +17835,7 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17814
17835
|
disabled,
|
|
17815
17836
|
textId,
|
|
17816
17837
|
isSelected,
|
|
17817
|
-
onItemTextChange:
|
|
17838
|
+
onItemTextChange: React342.useCallback((node) => {
|
|
17818
17839
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
17819
17840
|
}, []),
|
|
17820
17841
|
children: /* @__PURE__ */ jsx212(Collection.ItemSlot, {
|
|
@@ -17863,16 +17884,16 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17863
17884
|
});
|
|
17864
17885
|
SelectItem.displayName = ITEM_NAME;
|
|
17865
17886
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
17866
|
-
var SelectItemText =
|
|
17887
|
+
var SelectItemText = React342.forwardRef((props, forwardedRef) => {
|
|
17867
17888
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
17868
17889
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17869
17890
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17870
17891
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17871
17892
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17872
|
-
const [itemTextNode, setItemTextNode] =
|
|
17893
|
+
const [itemTextNode, setItemTextNode] = React342.useState(null);
|
|
17873
17894
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
17874
17895
|
const textContent = itemTextNode?.textContent;
|
|
17875
|
-
const nativeOption =
|
|
17896
|
+
const nativeOption = React342.useMemo(() => /* @__PURE__ */ jsx212("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
17876
17897
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
17877
17898
|
useLayoutEffect22(() => {
|
|
17878
17899
|
onNativeOptionAdd(nativeOption);
|
|
@@ -17885,17 +17906,17 @@ var SelectItemText = React34.forwardRef((props, forwardedRef) => {
|
|
|
17885
17906
|
});
|
|
17886
17907
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
17887
17908
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
17888
|
-
var SelectItemIndicator =
|
|
17909
|
+
var SelectItemIndicator = React342.forwardRef((props, forwardedRef) => {
|
|
17889
17910
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
17890
17911
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
17891
17912
|
return itemContext.isSelected ? /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
17892
17913
|
});
|
|
17893
17914
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
17894
17915
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
17895
|
-
var SelectScrollUpButton =
|
|
17916
|
+
var SelectScrollUpButton = React342.forwardRef((props, forwardedRef) => {
|
|
17896
17917
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17897
17918
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17898
|
-
const [canScrollUp, setCanScrollUp] =
|
|
17919
|
+
const [canScrollUp, setCanScrollUp] = React342.useState(false);
|
|
17899
17920
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17900
17921
|
useLayoutEffect22(() => {
|
|
17901
17922
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17923,10 +17944,10 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
17923
17944
|
});
|
|
17924
17945
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
17925
17946
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
17926
|
-
var SelectScrollDownButton =
|
|
17947
|
+
var SelectScrollDownButton = React342.forwardRef((props, forwardedRef) => {
|
|
17927
17948
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17928
17949
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17929
|
-
const [canScrollDown, setCanScrollDown] =
|
|
17950
|
+
const [canScrollDown, setCanScrollDown] = React342.useState(false);
|
|
17930
17951
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17931
17952
|
useLayoutEffect22(() => {
|
|
17932
17953
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17954,18 +17975,18 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
17954
17975
|
}) : null;
|
|
17955
17976
|
});
|
|
17956
17977
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
17957
|
-
var SelectScrollButtonImpl =
|
|
17978
|
+
var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
17958
17979
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
17959
17980
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
17960
|
-
const autoScrollTimerRef =
|
|
17981
|
+
const autoScrollTimerRef = React342.useRef(null);
|
|
17961
17982
|
const getItems = useCollection(__scopeSelect);
|
|
17962
|
-
const clearAutoScrollTimer =
|
|
17983
|
+
const clearAutoScrollTimer = React342.useCallback(() => {
|
|
17963
17984
|
if (autoScrollTimerRef.current !== null) {
|
|
17964
17985
|
window.clearInterval(autoScrollTimerRef.current);
|
|
17965
17986
|
autoScrollTimerRef.current = null;
|
|
17966
17987
|
}
|
|
17967
17988
|
}, []);
|
|
17968
|
-
|
|
17989
|
+
React342.useEffect(() => {
|
|
17969
17990
|
return () => clearAutoScrollTimer();
|
|
17970
17991
|
}, [clearAutoScrollTimer]);
|
|
17971
17992
|
useLayoutEffect22(() => {
|
|
@@ -17994,13 +18015,13 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17994
18015
|
});
|
|
17995
18016
|
});
|
|
17996
18017
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
17997
|
-
var SelectSeparator =
|
|
18018
|
+
var SelectSeparator = React342.forwardRef((props, forwardedRef) => {
|
|
17998
18019
|
const { __scopeSelect, ...separatorProps } = props;
|
|
17999
18020
|
return /* @__PURE__ */ jsx212(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
18000
18021
|
});
|
|
18001
18022
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
18002
18023
|
var ARROW_NAME2 = "SelectArrow";
|
|
18003
|
-
var SelectArrow =
|
|
18024
|
+
var SelectArrow = React342.forwardRef((props, forwardedRef) => {
|
|
18004
18025
|
const { __scopeSelect, ...arrowProps } = props;
|
|
18005
18026
|
const popperScope = usePopperScope(__scopeSelect);
|
|
18006
18027
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -18011,12 +18032,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
18011
18032
|
function shouldShowPlaceholder(value) {
|
|
18012
18033
|
return value === "" || value === undefined;
|
|
18013
18034
|
}
|
|
18014
|
-
var BubbleSelect =
|
|
18035
|
+
var BubbleSelect = React342.forwardRef((props, forwardedRef) => {
|
|
18015
18036
|
const { value, ...selectProps } = props;
|
|
18016
|
-
const ref =
|
|
18037
|
+
const ref = React342.useRef(null);
|
|
18017
18038
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
18018
18039
|
const prevValue = usePrevious(value);
|
|
18019
|
-
|
|
18040
|
+
React342.useEffect(() => {
|
|
18020
18041
|
const select = ref.current;
|
|
18021
18042
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
18022
18043
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -18032,9 +18053,9 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
18032
18053
|
BubbleSelect.displayName = "BubbleSelect";
|
|
18033
18054
|
function useTypeaheadSearch(onSearchChange) {
|
|
18034
18055
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
18035
|
-
const searchRef =
|
|
18036
|
-
const timerRef =
|
|
18037
|
-
const handleTypeaheadSearch =
|
|
18056
|
+
const searchRef = React342.useRef("");
|
|
18057
|
+
const timerRef = React342.useRef(0);
|
|
18058
|
+
const handleTypeaheadSearch = React342.useCallback((key) => {
|
|
18038
18059
|
const search = searchRef.current + key;
|
|
18039
18060
|
handleSearchChange(search);
|
|
18040
18061
|
(function updateSearch(value) {
|
|
@@ -18044,11 +18065,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
18044
18065
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
18045
18066
|
})(search);
|
|
18046
18067
|
}, [handleSearchChange]);
|
|
18047
|
-
const resetTypeahead =
|
|
18068
|
+
const resetTypeahead = React342.useCallback(() => {
|
|
18048
18069
|
searchRef.current = "";
|
|
18049
18070
|
window.clearTimeout(timerRef.current);
|
|
18050
18071
|
}, []);
|
|
18051
|
-
|
|
18072
|
+
React342.useEffect(() => {
|
|
18052
18073
|
return () => window.clearTimeout(timerRef.current);
|
|
18053
18074
|
}, []);
|
|
18054
18075
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -18137,7 +18158,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
18137
18158
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
18138
18159
|
var Select2 = Root222;
|
|
18139
18160
|
var SelectValue2 = Value;
|
|
18140
|
-
var SelectTrigger2 =
|
|
18161
|
+
var SelectTrigger2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
18141
18162
|
ref,
|
|
18142
18163
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
18143
18164
|
...props,
|
|
@@ -18152,7 +18173,7 @@ var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref
|
|
|
18152
18173
|
]
|
|
18153
18174
|
}));
|
|
18154
18175
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
18155
|
-
var SelectScrollUpButton2 =
|
|
18176
|
+
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollUpButton, {
|
|
18156
18177
|
ref,
|
|
18157
18178
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
18158
18179
|
...props,
|
|
@@ -18161,7 +18182,7 @@ var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) =
|
|
|
18161
18182
|
})
|
|
18162
18183
|
}));
|
|
18163
18184
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
18164
|
-
var SelectScrollDownButton2 =
|
|
18185
|
+
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollDownButton, {
|
|
18165
18186
|
ref,
|
|
18166
18187
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
18167
18188
|
...props,
|
|
@@ -18170,7 +18191,7 @@ var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref)
|
|
|
18170
18191
|
})
|
|
18171
18192
|
}));
|
|
18172
18193
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
18173
|
-
var SelectContent2 =
|
|
18194
|
+
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx223(Portal2, {
|
|
18174
18195
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
18175
18196
|
ref,
|
|
18176
18197
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
@@ -18187,13 +18208,13 @@ var SelectContent2 = React352.forwardRef(({ className, children, position = "pop
|
|
|
18187
18208
|
})
|
|
18188
18209
|
}));
|
|
18189
18210
|
SelectContent2.displayName = Content2.displayName;
|
|
18190
|
-
var SelectLabel2 =
|
|
18211
|
+
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Label, {
|
|
18191
18212
|
ref,
|
|
18192
18213
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
18193
18214
|
...props
|
|
18194
18215
|
}));
|
|
18195
18216
|
SelectLabel2.displayName = Label.displayName;
|
|
18196
|
-
var SelectItem2 =
|
|
18217
|
+
var SelectItem2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
18197
18218
|
ref,
|
|
18198
18219
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
18199
18220
|
...props,
|
|
@@ -18212,7 +18233,7 @@ var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) =
|
|
|
18212
18233
|
]
|
|
18213
18234
|
}));
|
|
18214
18235
|
SelectItem2.displayName = Item.displayName;
|
|
18215
|
-
var SelectSeparator2 =
|
|
18236
|
+
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Separator, {
|
|
18216
18237
|
ref,
|
|
18217
18238
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
18218
18239
|
...props
|
|
@@ -18242,7 +18263,7 @@ var Triangle2 = (props) => {
|
|
|
18242
18263
|
};
|
|
18243
18264
|
|
|
18244
18265
|
// src/components/homepage/FreePricing.tsx
|
|
18245
|
-
import
|
|
18266
|
+
import React39, { useCallback as useCallback26, useMemo as useMemo41 } from "react";
|
|
18246
18267
|
|
|
18247
18268
|
// ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
18248
18269
|
var CLASS_PART_SEPARATOR2 = "-";
|
|
@@ -19801,8 +19822,8 @@ var icon = {
|
|
|
19801
19822
|
marginLeft: 4
|
|
19802
19823
|
};
|
|
19803
19824
|
var CompanyPricing = () => {
|
|
19804
|
-
const [devSeatCount, setDevSeatCount] =
|
|
19805
|
-
const [cloudRenders, setCloudRenders] =
|
|
19825
|
+
const [devSeatCount, setDevSeatCount] = React39.useState(1);
|
|
19826
|
+
const [cloudRenders, setCloudRenders] = React39.useState(1000);
|
|
19806
19827
|
const formatPrice = useCallback26((price) => {
|
|
19807
19828
|
const formatter = new Intl.NumberFormat("en-US", {
|
|
19808
19829
|
style: "currency",
|
|
@@ -20038,7 +20059,7 @@ var Pricing = () => {
|
|
|
20038
20059
|
};
|
|
20039
20060
|
|
|
20040
20061
|
// src/components/homepage/BackgroundAnimation.tsx
|
|
20041
|
-
import { useEffect as
|
|
20062
|
+
import { useEffect as useEffect36 } from "react";
|
|
20042
20063
|
import { jsx as jsx46, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
20043
20064
|
"use client";
|
|
20044
20065
|
var rx = 0.2;
|
|
@@ -20064,7 +20085,7 @@ var BackgroundAnimation = () => {
|
|
|
20064
20085
|
}
|
|
20065
20086
|
}
|
|
20066
20087
|
`;
|
|
20067
|
-
|
|
20088
|
+
useEffect36(() => {
|
|
20068
20089
|
const _style = document.createElement("style");
|
|
20069
20090
|
_style.innerHTML = css;
|
|
20070
20091
|
document.head.appendChild(_style);
|
|
@@ -20485,12 +20506,12 @@ init_esm();
|
|
|
20485
20506
|
init_esm();
|
|
20486
20507
|
import { jsx as jsx50, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
20487
20508
|
import { jsx as jsx213, jsxs as jsxs24, Fragment as Fragment6 } from "react/jsx-runtime";
|
|
20488
|
-
import
|
|
20509
|
+
import React41 from "react";
|
|
20489
20510
|
import { useContext as useContext210, useEffect as useEffect210, useState as useState35 } from "react";
|
|
20490
|
-
import { useContext as useContext40, useEffect as
|
|
20511
|
+
import { useContext as useContext40, useEffect as useEffect37 } from "react";
|
|
20491
20512
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
20492
20513
|
import { useCallback as useCallback27, useRef as useRef32 } from "react";
|
|
20493
|
-
import { useEffect as
|
|
20514
|
+
import { useEffect as useEffect38, useState as useState210 } from "react";
|
|
20494
20515
|
import { useContext as useContext42, useEffect as useEffect62, useRef as useRef42 } from "react";
|
|
20495
20516
|
import { useEffect as useEffect42 } from "react";
|
|
20496
20517
|
import { useCallback as useCallback28, useContext as useContext37, useMemo as useMemo42, useRef as useRef24, useState as useState36 } from "react";
|
|
@@ -20500,7 +20521,7 @@ import {
|
|
|
20500
20521
|
forwardRef as forwardRef26,
|
|
20501
20522
|
useEffect as useEffect142,
|
|
20502
20523
|
useImperativeHandle as useImperativeHandle22,
|
|
20503
|
-
useLayoutEffect as
|
|
20524
|
+
useLayoutEffect as useLayoutEffect15,
|
|
20504
20525
|
useMemo as useMemo142,
|
|
20505
20526
|
useRef as useRef112,
|
|
20506
20527
|
useState as useState132
|
|
@@ -20511,7 +20532,7 @@ import React102, {
|
|
|
20511
20532
|
useCallback as useCallback112,
|
|
20512
20533
|
useContext as useContext62,
|
|
20513
20534
|
useEffect as useEffect132,
|
|
20514
|
-
useImperativeHandle as
|
|
20535
|
+
useImperativeHandle as useImperativeHandle12,
|
|
20515
20536
|
useMemo as useMemo122,
|
|
20516
20537
|
useRef as useRef102,
|
|
20517
20538
|
useState as useState113
|
|
@@ -20519,7 +20540,7 @@ import React102, {
|
|
|
20519
20540
|
import { useCallback as useCallback82, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
|
|
20520
20541
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
20521
20542
|
import { useCallback as useCallback52, useMemo as useMemo43, useRef as useRef52, useState as useState62 } from "react";
|
|
20522
|
-
import
|
|
20543
|
+
import React38, { useCallback as useCallback42, useMemo as useMemo34, useState as useState52 } from "react";
|
|
20523
20544
|
import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
20524
20545
|
import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
20525
20546
|
import {
|
|
@@ -21514,8 +21535,8 @@ var calculateOuter = ({
|
|
|
21514
21535
|
overflow: overflowVisible ? "visible" : "hidden"
|
|
21515
21536
|
};
|
|
21516
21537
|
};
|
|
21517
|
-
var PlayerEventEmitterContext =
|
|
21518
|
-
var ThumbnailEmitterContext =
|
|
21538
|
+
var PlayerEventEmitterContext = React41.createContext(undefined);
|
|
21539
|
+
var ThumbnailEmitterContext = React41.createContext(undefined);
|
|
21519
21540
|
|
|
21520
21541
|
class PlayerEmitter {
|
|
21521
21542
|
listeners = {
|
|
@@ -21633,7 +21654,7 @@ var useBufferStateEmitter = (emitter) => {
|
|
|
21633
21654
|
if (!bufferManager) {
|
|
21634
21655
|
throw new Error("BufferingContextReact not found");
|
|
21635
21656
|
}
|
|
21636
|
-
|
|
21657
|
+
useEffect37(() => {
|
|
21637
21658
|
const clear1 = bufferManager.listenForBuffering(() => {
|
|
21638
21659
|
bufferManager.buffering.current = true;
|
|
21639
21660
|
emitter.dispatchWaiting({});
|
|
@@ -21667,7 +21688,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
|
|
|
21667
21688
|
};
|
|
21668
21689
|
var useHoverState = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
21669
21690
|
const [hovered, setHovered] = useState210(false);
|
|
21670
|
-
|
|
21691
|
+
useEffect38(() => {
|
|
21671
21692
|
const { current } = ref;
|
|
21672
21693
|
if (!current) {
|
|
21673
21694
|
return;
|
|
@@ -22315,7 +22336,7 @@ var DefaultVolumeSlider = ({
|
|
|
22315
22336
|
...common
|
|
22316
22337
|
};
|
|
22317
22338
|
}, [isVertical]);
|
|
22318
|
-
const randomId = typeof
|
|
22339
|
+
const randomId = typeof React38.useId === "undefined" ? "volume-slider" : React38.useId();
|
|
22319
22340
|
const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
|
|
22320
22341
|
const onVolumeChange = useCallback42((e) => {
|
|
22321
22342
|
setVolume(parseFloat(e.target.value));
|
|
@@ -23599,7 +23620,7 @@ var PlayerUI = ({
|
|
|
23599
23620
|
stopped = true;
|
|
23600
23621
|
};
|
|
23601
23622
|
}, [bufferStateDelayInMilliseconds, player.emitter]);
|
|
23602
|
-
|
|
23623
|
+
useImperativeHandle12(ref, () => {
|
|
23603
23624
|
const methods = {
|
|
23604
23625
|
play: player.play,
|
|
23605
23626
|
pause: () => {
|
|
@@ -23899,7 +23920,8 @@ var SharedPlayerContexts = ({
|
|
|
23899
23920
|
initiallyMuted,
|
|
23900
23921
|
logLevel,
|
|
23901
23922
|
audioLatencyHint,
|
|
23902
|
-
volumePersistenceKey
|
|
23923
|
+
volumePersistenceKey,
|
|
23924
|
+
inputProps
|
|
23903
23925
|
}) => {
|
|
23904
23926
|
const compositionManagerContext = useMemo132(() => {
|
|
23905
23927
|
const context = {
|
|
@@ -23919,11 +23941,29 @@ var SharedPlayerContexts = ({
|
|
|
23919
23941
|
}
|
|
23920
23942
|
],
|
|
23921
23943
|
folders: [],
|
|
23922
|
-
currentCompositionMetadata:
|
|
23944
|
+
currentCompositionMetadata: {
|
|
23945
|
+
defaultCodec: null,
|
|
23946
|
+
defaultOutName: null,
|
|
23947
|
+
defaultPixelFormat: null,
|
|
23948
|
+
defaultProResProfile: null,
|
|
23949
|
+
defaultVideoImageFormat: null,
|
|
23950
|
+
durationInFrames,
|
|
23951
|
+
fps,
|
|
23952
|
+
height: compositionHeight,
|
|
23953
|
+
width: compositionWidth,
|
|
23954
|
+
props: inputProps
|
|
23955
|
+
},
|
|
23923
23956
|
canvasContent: { type: "composition", compositionId: "player-comp" }
|
|
23924
23957
|
};
|
|
23925
23958
|
return context;
|
|
23926
|
-
}, [
|
|
23959
|
+
}, [
|
|
23960
|
+
component,
|
|
23961
|
+
durationInFrames,
|
|
23962
|
+
compositionHeight,
|
|
23963
|
+
compositionWidth,
|
|
23964
|
+
fps,
|
|
23965
|
+
inputProps
|
|
23966
|
+
]);
|
|
23927
23967
|
const [mediaMuted, setMediaMuted] = useState122(() => initiallyMuted);
|
|
23928
23968
|
const [mediaVolume, setMediaVolume] = useState122(() => getPreferredVolume(volumePersistenceKey ?? null));
|
|
23929
23969
|
const mediaVolumeContextValue = useMemo132(() => {
|
|
@@ -23966,19 +24006,17 @@ var SharedPlayerContexts = ({
|
|
|
23966
24006
|
value: timelineContext,
|
|
23967
24007
|
children: /* @__PURE__ */ jsx133(Internals.CompositionManager.Provider, {
|
|
23968
24008
|
value: compositionManagerContext,
|
|
23969
|
-
children: /* @__PURE__ */ jsx133(Internals.
|
|
23970
|
-
children: /* @__PURE__ */ jsx133(Internals.
|
|
23971
|
-
children: /* @__PURE__ */ jsx133(Internals.
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
children
|
|
23980
|
-
children
|
|
23981
|
-
})
|
|
24009
|
+
children: /* @__PURE__ */ jsx133(Internals.PrefetchProvider, {
|
|
24010
|
+
children: /* @__PURE__ */ jsx133(Internals.DurationsContextProvider, {
|
|
24011
|
+
children: /* @__PURE__ */ jsx133(Internals.MediaVolumeContext.Provider, {
|
|
24012
|
+
value: mediaVolumeContextValue,
|
|
24013
|
+
children: /* @__PURE__ */ jsx133(Internals.SetMediaVolumeContext.Provider, {
|
|
24014
|
+
value: setMediaVolumeContextValue,
|
|
24015
|
+
children: /* @__PURE__ */ jsx133(Internals.SharedAudioContextProvider, {
|
|
24016
|
+
numberOfAudioTags: numberOfSharedAudioTags,
|
|
24017
|
+
audioLatencyHint,
|
|
24018
|
+
children: /* @__PURE__ */ jsx133(Internals.BufferingProvider, {
|
|
24019
|
+
children
|
|
23982
24020
|
})
|
|
23983
24021
|
})
|
|
23984
24022
|
})
|
|
@@ -24255,7 +24293,7 @@ var PlayerFn = ({
|
|
|
24255
24293
|
};
|
|
24256
24294
|
}, [setFrame]);
|
|
24257
24295
|
if (typeof window !== "undefined") {
|
|
24258
|
-
|
|
24296
|
+
useLayoutEffect15(() => {
|
|
24259
24297
|
Internals.CSSUtils.injectCSS(Internals.CSSUtils.makeDefaultPreviewCSS(`.${playerCssClassname(overrideInternalClassName)}`, "#fff"));
|
|
24260
24298
|
}, [overrideInternalClassName]);
|
|
24261
24299
|
}
|
|
@@ -24278,6 +24316,7 @@ var PlayerFn = ({
|
|
|
24278
24316
|
logLevel,
|
|
24279
24317
|
audioLatencyHint,
|
|
24280
24318
|
volumePersistenceKey,
|
|
24319
|
+
inputProps: actualInputProps,
|
|
24281
24320
|
children: /* @__PURE__ */ jsx143(Internals.SetTimelineContext.Provider, {
|
|
24282
24321
|
value: setTimelineContextValue,
|
|
24283
24322
|
children: /* @__PURE__ */ jsx143(PlayerEmitterProvider, {
|
|
@@ -24525,6 +24564,7 @@ var ThumbnailFn = ({
|
|
|
24525
24564
|
initiallyMuted: true,
|
|
24526
24565
|
logLevel,
|
|
24527
24566
|
audioLatencyHint: "playback",
|
|
24567
|
+
inputProps: passedInputProps,
|
|
24528
24568
|
children: /* @__PURE__ */ jsx163(ThumbnailEmitterContext.Provider, {
|
|
24529
24569
|
value: emitter,
|
|
24530
24570
|
children: /* @__PURE__ */ jsx163(ThumbnailUI_default, {
|
|
@@ -24548,7 +24588,7 @@ var Thumbnail = forward2(ThumbnailFn);
|
|
|
24548
24588
|
// src/components/homepage/Demo/index.tsx
|
|
24549
24589
|
import {
|
|
24550
24590
|
useCallback as useCallback43,
|
|
24551
|
-
useEffect as
|
|
24591
|
+
useEffect as useEffect53,
|
|
24552
24592
|
useMemo as useMemo53,
|
|
24553
24593
|
useRef as useRef41,
|
|
24554
24594
|
useState as useState47
|
|
@@ -25300,9 +25340,9 @@ var UNDERLAY_RED = curriedTransparentize$1(0.9, RED);
|
|
|
25300
25340
|
var BLUE_TEXT = curriedDarken$1(0.3, "#42e9f5");
|
|
25301
25341
|
|
|
25302
25342
|
// src/components/homepage/layout/use-color-mode.tsx
|
|
25303
|
-
import
|
|
25343
|
+
import React43, { useContext as useContext41, useMemo as useMemo44 } from "react";
|
|
25304
25344
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
25305
|
-
var Context =
|
|
25345
|
+
var Context = React43.createContext(undefined);
|
|
25306
25346
|
var ColorModeProvider = ({
|
|
25307
25347
|
children,
|
|
25308
25348
|
colorMode,
|
|
@@ -25326,14 +25366,14 @@ function useColorMode() {
|
|
|
25326
25366
|
|
|
25327
25367
|
// src/components/homepage/Demo/Comp.tsx
|
|
25328
25368
|
init_esm();
|
|
25329
|
-
import { useCallback as useCallback36, useEffect as
|
|
25369
|
+
import { useCallback as useCallback36, useEffect as useEffect46, useMemo as useMemo48, useState as useState41 } from "react";
|
|
25330
25370
|
|
|
25331
25371
|
// src/components/homepage/Demo/Cards.tsx
|
|
25332
25372
|
init_esm();
|
|
25333
25373
|
import {
|
|
25334
25374
|
createRef as createRef4,
|
|
25335
25375
|
useCallback as useCallback35,
|
|
25336
|
-
useEffect as
|
|
25376
|
+
useEffect as useEffect45,
|
|
25337
25377
|
useRef as useRef38,
|
|
25338
25378
|
useState as useState40
|
|
25339
25379
|
} from "react";
|
|
@@ -25704,14 +25744,14 @@ init_esm();
|
|
|
25704
25744
|
import {
|
|
25705
25745
|
forwardRef as forwardRef29,
|
|
25706
25746
|
useCallback as useCallback33,
|
|
25707
|
-
useEffect as
|
|
25708
|
-
useImperativeHandle as
|
|
25747
|
+
useEffect as useEffect43,
|
|
25748
|
+
useImperativeHandle as useImperativeHandle14,
|
|
25709
25749
|
useRef as useRef37
|
|
25710
25750
|
} from "react";
|
|
25711
25751
|
|
|
25712
25752
|
// src/components/homepage/Demo/DisplayedEmoji.tsx
|
|
25713
25753
|
init_esm();
|
|
25714
|
-
import { useEffect as
|
|
25754
|
+
import { useEffect as useEffect41, useMemo as useMemo46, useState as useState39 } from "react";
|
|
25715
25755
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
25716
25756
|
var DisplayedEmoji = ({ emoji }) => {
|
|
25717
25757
|
const [data, setData] = useState39(null);
|
|
@@ -25731,7 +25771,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
25731
25771
|
throw new Error("Unknown emoji");
|
|
25732
25772
|
}, [emoji]);
|
|
25733
25773
|
const [handle] = useState39(() => delayRender());
|
|
25734
|
-
|
|
25774
|
+
useEffect41(() => {
|
|
25735
25775
|
Promise.all([
|
|
25736
25776
|
fetch(src).then((res) => res.json()),
|
|
25737
25777
|
Promise.resolve().then(() => (init_esm2(), exports_esm)).then(({ Lottie: Lottie2, getLottieMetadata: getLottieMetadata2 }) => ({
|
|
@@ -25749,7 +25789,7 @@ var DisplayedEmoji = ({ emoji }) => {
|
|
|
25749
25789
|
cancelRender(err);
|
|
25750
25790
|
});
|
|
25751
25791
|
}, [handle, src, continueRender]);
|
|
25752
|
-
|
|
25792
|
+
useEffect41(() => {
|
|
25753
25793
|
if (typeof document !== "undefined") {
|
|
25754
25794
|
setBrowser(true);
|
|
25755
25795
|
}
|
|
@@ -25845,7 +25885,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
25845
25885
|
transforms: transforms.current
|
|
25846
25886
|
});
|
|
25847
25887
|
}, []);
|
|
25848
|
-
|
|
25888
|
+
useEffect43(() => {
|
|
25849
25889
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
25850
25890
|
return;
|
|
25851
25891
|
}
|
|
@@ -25856,13 +25896,13 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
|
|
|
25856
25896
|
transforms: transforms.current
|
|
25857
25897
|
});
|
|
25858
25898
|
}, []);
|
|
25859
|
-
|
|
25899
|
+
useImperativeHandle14(ref, () => {
|
|
25860
25900
|
return {
|
|
25861
25901
|
onLeft,
|
|
25862
25902
|
onRight
|
|
25863
25903
|
};
|
|
25864
25904
|
}, [onLeft, onRight]);
|
|
25865
|
-
|
|
25905
|
+
useEffect43(() => {
|
|
25866
25906
|
if (!ref1.current || !ref2.current || !ref3.current) {
|
|
25867
25907
|
return;
|
|
25868
25908
|
}
|
|
@@ -26284,7 +26324,7 @@ var Cards = ({
|
|
|
26284
26324
|
const positions = useRef38(getInitialPositions());
|
|
26285
26325
|
const shouldBePositions = useRef38(getInitialPositions());
|
|
26286
26326
|
const { isRendering } = useRemotionEnvironment();
|
|
26287
|
-
|
|
26327
|
+
useEffect45(() => {
|
|
26288
26328
|
const { current } = container4;
|
|
26289
26329
|
if (!current) {
|
|
26290
26330
|
return;
|
|
@@ -26397,7 +26437,7 @@ var HomepageVideoComp = ({
|
|
|
26397
26437
|
}
|
|
26398
26438
|
return sadAudio;
|
|
26399
26439
|
}, [emoji]);
|
|
26400
|
-
|
|
26440
|
+
useEffect46(() => {
|
|
26401
26441
|
const a = prefetch(fireAudio);
|
|
26402
26442
|
const b = prefetch(partyHornAudio);
|
|
26403
26443
|
const c = prefetch(sadAudio);
|
|
@@ -26445,7 +26485,7 @@ var DemoError = () => {
|
|
|
26445
26485
|
};
|
|
26446
26486
|
|
|
26447
26487
|
// src/components/homepage/Demo/DemoRender.tsx
|
|
26448
|
-
import
|
|
26488
|
+
import React55, { useCallback as useCallback37 } from "react";
|
|
26449
26489
|
import { z } from "zod";
|
|
26450
26490
|
|
|
26451
26491
|
// src/components/homepage/Demo/DemoErrorIcon.tsx
|
|
@@ -26643,7 +26683,7 @@ var style2 = {
|
|
|
26643
26683
|
justifyContent: "center"
|
|
26644
26684
|
};
|
|
26645
26685
|
var RenderButton = ({ renderData, onError }) => {
|
|
26646
|
-
const [state, setState] =
|
|
26686
|
+
const [state, setState] = React55.useState({
|
|
26647
26687
|
type: "idle"
|
|
26648
26688
|
});
|
|
26649
26689
|
const triggerRender = useCallback37(async () => {
|
|
@@ -26823,10 +26863,10 @@ var DragAndDropNudge = () => {
|
|
|
26823
26863
|
|
|
26824
26864
|
// src/components/homepage/Demo/PlayerSeekBar.tsx
|
|
26825
26865
|
init_esm();
|
|
26826
|
-
import { useCallback as useCallback39, useEffect as
|
|
26866
|
+
import { useCallback as useCallback39, useEffect as useEffect48, useMemo as useMemo51, useRef as useRef39, useState as useState45 } from "react";
|
|
26827
26867
|
|
|
26828
26868
|
// src/components/homepage/layout/use-el-size.ts
|
|
26829
|
-
import { useCallback as useCallback38, useEffect as
|
|
26869
|
+
import { useCallback as useCallback38, useEffect as useEffect47, useMemo as useMemo50, useState as useState43 } from "react";
|
|
26830
26870
|
var useElementSize2 = (ref) => {
|
|
26831
26871
|
const [size4, setSize] = useState43(null);
|
|
26832
26872
|
const observer = useMemo50(() => {
|
|
@@ -26850,7 +26890,7 @@ var useElementSize2 = (ref) => {
|
|
|
26850
26890
|
height: rect[0].height
|
|
26851
26891
|
});
|
|
26852
26892
|
}, [ref]);
|
|
26853
|
-
|
|
26893
|
+
useEffect47(() => {
|
|
26854
26894
|
updateSize();
|
|
26855
26895
|
if (!observer) {
|
|
26856
26896
|
return;
|
|
@@ -26906,7 +26946,7 @@ var findBodyInWhichDivIsLocated2 = (div) => {
|
|
|
26906
26946
|
};
|
|
26907
26947
|
var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
|
|
26908
26948
|
const [hovered, setHovered] = useState45(false);
|
|
26909
|
-
|
|
26949
|
+
useEffect48(() => {
|
|
26910
26950
|
const { current } = ref;
|
|
26911
26951
|
if (!current) {
|
|
26912
26952
|
return;
|
|
@@ -26957,7 +26997,7 @@ var PlayerSeekBar2 = ({
|
|
|
26957
26997
|
const size4 = useElementSize2(containerRef.current);
|
|
26958
26998
|
const [playing, setPlaying] = useState45(false);
|
|
26959
26999
|
const [frame, setFrame] = useState45(0);
|
|
26960
|
-
|
|
27000
|
+
useEffect48(() => {
|
|
26961
27001
|
const { current } = playerRef;
|
|
26962
27002
|
if (!current) {
|
|
26963
27003
|
return;
|
|
@@ -26970,7 +27010,7 @@ var PlayerSeekBar2 = ({
|
|
|
26970
27010
|
current.removeEventListener("frameupdate", onFrameUpdate);
|
|
26971
27011
|
};
|
|
26972
27012
|
}, [playerRef]);
|
|
26973
|
-
|
|
27013
|
+
useEffect48(() => {
|
|
26974
27014
|
const { current } = playerRef;
|
|
26975
27015
|
if (!current) {
|
|
26976
27016
|
return;
|
|
@@ -27031,7 +27071,7 @@ var PlayerSeekBar2 = ({
|
|
|
27031
27071
|
}
|
|
27032
27072
|
onSeekEnd();
|
|
27033
27073
|
}, [dragging, onSeekEnd, playerRef]);
|
|
27034
|
-
|
|
27074
|
+
useEffect48(() => {
|
|
27035
27075
|
if (!dragging.dragging) {
|
|
27036
27076
|
return;
|
|
27037
27077
|
}
|
|
@@ -27101,7 +27141,7 @@ var PlayerSeekBar2 = ({
|
|
|
27101
27141
|
};
|
|
27102
27142
|
|
|
27103
27143
|
// src/components/homepage/Demo/PlayerVolume.tsx
|
|
27104
|
-
import { useCallback as useCallback40, useEffect as
|
|
27144
|
+
import { useCallback as useCallback40, useEffect as useEffect49, useRef as useRef40, useState as useState46 } from "react";
|
|
27105
27145
|
|
|
27106
27146
|
// src/components/homepage/Demo/icons.tsx
|
|
27107
27147
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
@@ -27162,7 +27202,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
27162
27202
|
const [muted, setIsMuted] = useState46(() => playerRef.current?.isMuted() ?? true);
|
|
27163
27203
|
const [isHovered, setIsHovered] = useState46(false);
|
|
27164
27204
|
const timerRef = useRef40(null);
|
|
27165
|
-
|
|
27205
|
+
useEffect49(() => {
|
|
27166
27206
|
const { current } = playerRef;
|
|
27167
27207
|
if (!current) {
|
|
27168
27208
|
return;
|
|
@@ -27175,7 +27215,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
27175
27215
|
current.removeEventListener("mutechange", onMutedChange);
|
|
27176
27216
|
};
|
|
27177
27217
|
}, [playerRef]);
|
|
27178
|
-
|
|
27218
|
+
useEffect49(() => {
|
|
27179
27219
|
if (isHovered) {
|
|
27180
27220
|
document.body.style.userSelect = "none";
|
|
27181
27221
|
} else {
|
|
@@ -27220,7 +27260,7 @@ var PlayerVolume = ({ playerRef }) => {
|
|
|
27220
27260
|
};
|
|
27221
27261
|
|
|
27222
27262
|
// src/components/homepage/Demo/PlayPauseButton.tsx
|
|
27223
|
-
import
|
|
27263
|
+
import React58, { useCallback as useCallback41, useEffect as useEffect50 } from "react";
|
|
27224
27264
|
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
27225
27265
|
var playerButtonStyle2 = {
|
|
27226
27266
|
appearance: "none",
|
|
@@ -27237,8 +27277,8 @@ var playerButtonStyle2 = {
|
|
|
27237
27277
|
color: PALETTE.TEXT_COLOR
|
|
27238
27278
|
};
|
|
27239
27279
|
var PlayPauseButton = ({ playerRef }) => {
|
|
27240
|
-
const [playing, setPlaying] =
|
|
27241
|
-
|
|
27280
|
+
const [playing, setPlaying] = React58.useState(true);
|
|
27281
|
+
useEffect50(() => {
|
|
27242
27282
|
const { current } = playerRef;
|
|
27243
27283
|
if (!current) {
|
|
27244
27284
|
return;
|
|
@@ -27275,7 +27315,7 @@ var PlayPauseButton = ({ playerRef }) => {
|
|
|
27275
27315
|
};
|
|
27276
27316
|
|
|
27277
27317
|
// src/components/homepage/Demo/TimeDisplay.tsx
|
|
27278
|
-
import
|
|
27318
|
+
import React59, { useEffect as useEffect51 } from "react";
|
|
27279
27319
|
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
27280
27320
|
var formatTime2 = (timeInSeconds) => {
|
|
27281
27321
|
const minutes = Math.floor(timeInSeconds / 60);
|
|
@@ -27283,8 +27323,8 @@ var formatTime2 = (timeInSeconds) => {
|
|
|
27283
27323
|
return `${String(minutes)}:${String(seconds).padStart(2, "0")}`;
|
|
27284
27324
|
};
|
|
27285
27325
|
var TimeDisplay = ({ fps, playerRef }) => {
|
|
27286
|
-
const [time, setTime] =
|
|
27287
|
-
|
|
27326
|
+
const [time, setTime] = React59.useState(0);
|
|
27327
|
+
useEffect51(() => {
|
|
27288
27328
|
const { current } = playerRef;
|
|
27289
27329
|
if (!current) {
|
|
27290
27330
|
return;
|
|
@@ -27362,7 +27402,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
|
|
|
27362
27402
|
};
|
|
27363
27403
|
|
|
27364
27404
|
// src/components/homepage/Demo/ThemeNudge.tsx
|
|
27365
|
-
import
|
|
27405
|
+
import React60 from "react";
|
|
27366
27406
|
import { jsx as jsx99, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
27367
27407
|
var origWidth3 = 21;
|
|
27368
27408
|
var scale3 = 0.4;
|
|
@@ -27384,7 +27424,7 @@ var Icon6 = () => {
|
|
|
27384
27424
|
};
|
|
27385
27425
|
var ThemeNudge = () => {
|
|
27386
27426
|
const { colorMode, setColorMode } = useColorMode();
|
|
27387
|
-
const toggleTheme =
|
|
27427
|
+
const toggleTheme = React60.useCallback((e) => {
|
|
27388
27428
|
e.preventDefault();
|
|
27389
27429
|
setColorMode(colorMode === "dark" ? "light" : "dark");
|
|
27390
27430
|
}, [colorMode, setColorMode]);
|
|
@@ -27455,7 +27495,7 @@ var Demo = () => {
|
|
|
27455
27495
|
const [cardOrder, setCardOrder] = useState47([0, 1, 2, 3]);
|
|
27456
27496
|
const [emojiIndex, setEmojiIndex] = useState47(0);
|
|
27457
27497
|
const [error2, setError] = useState47(false);
|
|
27458
|
-
|
|
27498
|
+
useEffect53(() => {
|
|
27459
27499
|
getDataAndProps().then((d2) => {
|
|
27460
27500
|
setData(d2);
|
|
27461
27501
|
}).catch((err) => {
|
|
@@ -27463,7 +27503,7 @@ var Demo = () => {
|
|
|
27463
27503
|
setError(true);
|
|
27464
27504
|
});
|
|
27465
27505
|
}, []);
|
|
27466
|
-
|
|
27506
|
+
useEffect53(() => {
|
|
27467
27507
|
const { current: playerRef } = ref;
|
|
27468
27508
|
if (!playerRef || !data2) {
|
|
27469
27509
|
return;
|
|
@@ -27597,16 +27637,16 @@ var ClearButton = (props) => {
|
|
|
27597
27637
|
|
|
27598
27638
|
// src/components/homepage/MuxVideo.tsx
|
|
27599
27639
|
import Hls2 from "hls.js";
|
|
27600
|
-
import { forwardRef as forwardRef31, useEffect as
|
|
27640
|
+
import { forwardRef as forwardRef31, useEffect as useEffect56, useImperativeHandle as useImperativeHandle15, useRef as useRef45 } from "react";
|
|
27601
27641
|
|
|
27602
27642
|
// src/components/homepage/VideoPlayerWithControls.tsx
|
|
27603
27643
|
import Hls from "hls.js";
|
|
27604
27644
|
import"plyr/dist/plyr.css";
|
|
27605
|
-
import { forwardRef as forwardRef30, useCallback as useCallback45, useEffect as
|
|
27645
|
+
import { forwardRef as forwardRef30, useCallback as useCallback45, useEffect as useEffect55, useRef as useRef43, useState as useState48 } from "react";
|
|
27606
27646
|
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
27607
27647
|
var useCombinedRefs = function(...refs) {
|
|
27608
27648
|
const targetRef = useRef43(null);
|
|
27609
|
-
|
|
27649
|
+
useEffect55(() => {
|
|
27610
27650
|
refs.forEach((ref) => {
|
|
27611
27651
|
if (!ref)
|
|
27612
27652
|
return;
|
|
@@ -27635,12 +27675,12 @@ var VideoPlayerWithControls = forwardRef30(({ playbackId, poster, currentTime, o
|
|
|
27635
27675
|
console.error("Error getting img dimensions", event);
|
|
27636
27676
|
}
|
|
27637
27677
|
}, [onLoaded, onSize]);
|
|
27638
|
-
|
|
27678
|
+
useEffect55(() => {
|
|
27639
27679
|
const img = new Image;
|
|
27640
27680
|
img.onload = (evt) => onImageLoad(evt);
|
|
27641
27681
|
img.src = poster;
|
|
27642
27682
|
}, [onImageLoad, poster]);
|
|
27643
|
-
|
|
27683
|
+
useEffect55(() => {
|
|
27644
27684
|
const video = videoRef.current;
|
|
27645
27685
|
const src = `https://stream.mux.com/${playbackId}.m3u8`;
|
|
27646
27686
|
let hls;
|
|
@@ -27683,7 +27723,7 @@ var VideoPlayerWithControls = forwardRef30(({ playbackId, poster, currentTime, o
|
|
|
27683
27723
|
}
|
|
27684
27724
|
};
|
|
27685
27725
|
}, [playbackId, playerInitTime, videoError, videoRef]);
|
|
27686
|
-
|
|
27726
|
+
useEffect55(() => {
|
|
27687
27727
|
const video = videoRef.current;
|
|
27688
27728
|
if (currentTime && video) {
|
|
27689
27729
|
video.currentTime = currentTime;
|
|
@@ -27709,8 +27749,8 @@ var getVideoToPlayUrl = (muxId) => {
|
|
|
27709
27749
|
var MuxVideoForward = ({ muxId, ...props }, ref) => {
|
|
27710
27750
|
const videoRef = useRef45(null);
|
|
27711
27751
|
const vidUrl = getVideoToPlayUrl(muxId);
|
|
27712
|
-
|
|
27713
|
-
|
|
27752
|
+
useImperativeHandle15(ref, () => videoRef.current, []);
|
|
27753
|
+
useEffect56(() => {
|
|
27714
27754
|
let hls;
|
|
27715
27755
|
if (videoRef.current) {
|
|
27716
27756
|
const { current } = videoRef;
|
|
@@ -27823,11 +27863,11 @@ var EditorStarterSection = () => {
|
|
|
27823
27863
|
var EditorStarterSection_default = EditorStarterSection;
|
|
27824
27864
|
|
|
27825
27865
|
// src/components/homepage/EvaluateRemotion.tsx
|
|
27826
|
-
import { useEffect as
|
|
27866
|
+
import { useEffect as useEffect57, useState as useState49 } from "react";
|
|
27827
27867
|
import { jsx as jsx109, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
27828
27868
|
var EvaluateRemotionSection = () => {
|
|
27829
27869
|
const [dailyAvatars, setDailyAvatars] = useState49([]);
|
|
27830
|
-
|
|
27870
|
+
useEffect57(() => {
|
|
27831
27871
|
const avatars = [
|
|
27832
27872
|
"/img/freelancers/alex.jpeg",
|
|
27833
27873
|
"/img/freelancers/antoine.jpeg",
|
|
@@ -27926,7 +27966,7 @@ var EvaluateRemotionSection = () => {
|
|
|
27926
27966
|
var EvaluateRemotion_default = EvaluateRemotionSection;
|
|
27927
27967
|
|
|
27928
27968
|
// src/components/homepage/IfYouKnowReact.tsx
|
|
27929
|
-
import { useEffect as
|
|
27969
|
+
import { useEffect as useEffect58, useState as useState50 } from "react";
|
|
27930
27970
|
import { jsx as jsx110, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
27931
27971
|
var isWebkit = () => {
|
|
27932
27972
|
if (typeof window === "undefined") {
|
|
@@ -27942,7 +27982,7 @@ var icon2 = {
|
|
|
27942
27982
|
};
|
|
27943
27983
|
var IfYouKnowReact = () => {
|
|
27944
27984
|
const [vid, setVid] = useState50("/img/compose.webm");
|
|
27945
|
-
|
|
27985
|
+
useEffect58(() => {
|
|
27946
27986
|
if (isWebkit()) {
|
|
27947
27987
|
setVid("/img/compose.mp4");
|
|
27948
27988
|
}
|
|
@@ -28089,7 +28129,7 @@ var NewsletterButton = () => {
|
|
|
28089
28129
|
};
|
|
28090
28130
|
|
|
28091
28131
|
// src/components/homepage/ParameterizeAndEdit.tsx
|
|
28092
|
-
import { useEffect as
|
|
28132
|
+
import { useEffect as useEffect59, useRef as useRef46, useState as useState53 } from "react";
|
|
28093
28133
|
import { jsx as jsx114, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
28094
28134
|
var icon3 = {
|
|
28095
28135
|
height: 16,
|
|
@@ -28098,7 +28138,7 @@ var icon3 = {
|
|
|
28098
28138
|
var ParameterizeAndEdit = () => {
|
|
28099
28139
|
const ref = useRef46(null);
|
|
28100
28140
|
const [vid, setVid] = useState53("/img/editing-vp9-chrome.webm");
|
|
28101
|
-
|
|
28141
|
+
useEffect59(() => {
|
|
28102
28142
|
if (isWebkit()) {
|
|
28103
28143
|
setVid("/img/editing-safari.mp4");
|
|
28104
28144
|
}
|
|
@@ -28212,7 +28252,7 @@ var ParameterizeAndEdit = () => {
|
|
|
28212
28252
|
};
|
|
28213
28253
|
|
|
28214
28254
|
// src/components/homepage/RealMp4Videos.tsx
|
|
28215
|
-
import { useEffect as
|
|
28255
|
+
import { useEffect as useEffect60, useRef as useRef47, useState as useState55 } from "react";
|
|
28216
28256
|
import { jsx as jsx116, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
28217
28257
|
var icon4 = {
|
|
28218
28258
|
height: 16,
|
|
@@ -28222,12 +28262,12 @@ var RealMP4Videos = () => {
|
|
|
28222
28262
|
const ref = useRef47(null);
|
|
28223
28263
|
const videoRef = useRef47(null);
|
|
28224
28264
|
const [vid, setVid] = useState55("/img/render-progress.webm");
|
|
28225
|
-
|
|
28265
|
+
useEffect60(() => {
|
|
28226
28266
|
if (isWebkit()) {
|
|
28227
28267
|
setVid("/img/render-progress.mp4");
|
|
28228
28268
|
}
|
|
28229
28269
|
}, []);
|
|
28230
|
-
|
|
28270
|
+
useEffect60(() => {
|
|
28231
28271
|
const { current } = ref;
|
|
28232
28272
|
if (!current) {
|
|
28233
28273
|
return;
|
|
@@ -28473,7 +28513,7 @@ var TrustedByBanner = () => {
|
|
|
28473
28513
|
var TrustedByBanner_default = TrustedByBanner;
|
|
28474
28514
|
|
|
28475
28515
|
// src/components/homepage/VideoAppsShowcase.tsx
|
|
28476
|
-
import { useEffect as
|
|
28516
|
+
import { useEffect as useEffect61, useRef as useRef48, useState as useState56 } from "react";
|
|
28477
28517
|
import { jsx as jsx118, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
28478
28518
|
var tabs = [
|
|
28479
28519
|
"Music visualization",
|
|
@@ -28531,7 +28571,7 @@ var VideoAppsShowcase = () => {
|
|
|
28531
28571
|
const [isPlaying, setIsPlaying] = useState56(false);
|
|
28532
28572
|
const videoRef = useRef48(null);
|
|
28533
28573
|
const containerRef = useRef48(null);
|
|
28534
|
-
|
|
28574
|
+
useEffect61(() => {
|
|
28535
28575
|
const video = videoRef.current;
|
|
28536
28576
|
if (video) {
|
|
28537
28577
|
video.pause();
|