@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
|
@@ -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);
|
|
@@ -8571,7 +8591,7 @@ var getDefaultConfig = () => {
|
|
|
8571
8591
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
8572
8592
|
|
|
8573
8593
|
// ../design/dist/esm/index.mjs
|
|
8574
|
-
import React7, { useEffect as
|
|
8594
|
+
import React7, { useEffect as useEffect22, useMemo as useMemo33, useState as useState21 } from "react";
|
|
8575
8595
|
|
|
8576
8596
|
// ../paths/dist/esm/index.mjs
|
|
8577
8597
|
var cutLInstruction = ({
|
|
@@ -12712,7 +12732,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
12712
12732
|
init_esm();
|
|
12713
12733
|
import { jsx as jsx37, Fragment } from "react/jsx-runtime";
|
|
12714
12734
|
import { jsx as jsx210, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
12715
|
-
import { useEffect as
|
|
12735
|
+
import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef18 } from "react";
|
|
12716
12736
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
12717
12737
|
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
12718
12738
|
import React42 from "react";
|
|
@@ -12722,7 +12742,7 @@ import { jsx as jsx73, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
|
12722
12742
|
import React52 from "react";
|
|
12723
12743
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
12724
12744
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
12725
|
-
import * as
|
|
12745
|
+
import * as React342 from "react";
|
|
12726
12746
|
import * as ReactDOM4 from "react-dom";
|
|
12727
12747
|
import React9 from "react";
|
|
12728
12748
|
import * as React62 from "react";
|
|
@@ -12758,20 +12778,20 @@ import ReactDOM3 from "react-dom";
|
|
|
12758
12778
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
12759
12779
|
import * as React24 from "react";
|
|
12760
12780
|
import * as React252 from "react";
|
|
12761
|
-
import * as
|
|
12781
|
+
import * as React262 from "react";
|
|
12762
12782
|
import { jsx as jsx202 } from "react/jsx-runtime";
|
|
12763
12783
|
import * as React332 from "react";
|
|
12764
12784
|
import * as React29 from "react";
|
|
12765
12785
|
import { useState as useState112 } from "react";
|
|
12766
|
-
import * as
|
|
12767
|
-
import * as
|
|
12786
|
+
import * as React27 from "react";
|
|
12787
|
+
import * as React282 from "react";
|
|
12768
12788
|
import * as React322 from "react";
|
|
12769
|
-
import * as
|
|
12789
|
+
import * as React31 from "react";
|
|
12770
12790
|
import * as React30 from "react";
|
|
12771
12791
|
import { Fragment as Fragment52, jsx as jsx212, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
12772
12792
|
import { forwardRef as forwardRef132, createElement as createElement7 } from "react";
|
|
12773
12793
|
import { forwardRef as forwardRef122, createElement as createElement6 } from "react";
|
|
12774
|
-
import * as
|
|
12794
|
+
import * as React35 from "react";
|
|
12775
12795
|
import { jsx as jsx223, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
12776
12796
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
12777
12797
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
@@ -12798,7 +12818,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
12798
12818
|
isActive: false
|
|
12799
12819
|
});
|
|
12800
12820
|
const eventTarget = useMemo33(() => new EventTarget, []);
|
|
12801
|
-
|
|
12821
|
+
useEffect22(() => {
|
|
12802
12822
|
if (disabled) {
|
|
12803
12823
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
12804
12824
|
} else {
|
|
@@ -12945,7 +12965,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
12945
12965
|
var lastCoordinates = null;
|
|
12946
12966
|
var useMousePosition = (ref) => {
|
|
12947
12967
|
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
12948
|
-
|
|
12968
|
+
useEffect22(() => {
|
|
12949
12969
|
const element = ref.current;
|
|
12950
12970
|
if (!element) {
|
|
12951
12971
|
return;
|
|
@@ -13004,6 +13024,7 @@ var Outer = ({
|
|
|
13004
13024
|
const depth = depthFromHover;
|
|
13005
13025
|
const frontFace = reduceMatrices([
|
|
13006
13026
|
translateZ(-depth / 2 + depthFromClick),
|
|
13027
|
+
translateZ(1.1),
|
|
13007
13028
|
transformation
|
|
13008
13029
|
]);
|
|
13009
13030
|
const centerOriented = reduceMatrices([
|
|
@@ -13065,7 +13086,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
13065
13086
|
};
|
|
13066
13087
|
}, [size]);
|
|
13067
13088
|
const pathsRef = useRef18([]);
|
|
13068
|
-
|
|
13089
|
+
useEffect23(() => {
|
|
13069
13090
|
const animate = () => {
|
|
13070
13091
|
const now = performance.now();
|
|
13071
13092
|
for (let index = 0;index < lines; index++) {
|
|
@@ -13145,7 +13166,7 @@ var Button = ({ children, className, disabled, depth, loading, ...buttonProps })
|
|
|
13145
13166
|
...buttonProps,
|
|
13146
13167
|
children: [
|
|
13147
13168
|
/* @__PURE__ */ jsx43("div", {
|
|
13148
|
-
className: cn(loading && "invisible"),
|
|
13169
|
+
className: cn(loading && "invisible", "inline-flex"),
|
|
13149
13170
|
children
|
|
13150
13171
|
}),
|
|
13151
13172
|
loading ? /* @__PURE__ */ jsx43("div", {
|
|
@@ -16143,7 +16164,7 @@ function usePrevious(value) {
|
|
|
16143
16164
|
}, [value]);
|
|
16144
16165
|
}
|
|
16145
16166
|
var NAME2 = "VisuallyHidden";
|
|
16146
|
-
var VisuallyHidden =
|
|
16167
|
+
var VisuallyHidden = React262.forwardRef((props, forwardedRef) => {
|
|
16147
16168
|
return /* @__PURE__ */ jsx202(Primitive.span, {
|
|
16148
16169
|
...props,
|
|
16149
16170
|
ref: forwardedRef,
|
|
@@ -16351,7 +16372,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
16351
16372
|
ref.callback = callback;
|
|
16352
16373
|
return ref.facade;
|
|
16353
16374
|
}
|
|
16354
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
16375
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React27.useLayoutEffect : React27.useEffect;
|
|
16355
16376
|
var currentValues = new WeakMap;
|
|
16356
16377
|
function useMergeRefs(refs, defaultValue) {
|
|
16357
16378
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -16473,7 +16494,7 @@ var SideCar = function(_a) {
|
|
|
16473
16494
|
if (!Target) {
|
|
16474
16495
|
throw new Error("Sidecar medium not found");
|
|
16475
16496
|
}
|
|
16476
|
-
return
|
|
16497
|
+
return React282.createElement(Target, __assign({}, rest));
|
|
16477
16498
|
};
|
|
16478
16499
|
SideCar.isSideCarExport = true;
|
|
16479
16500
|
function exportSidecar(medium, exported) {
|
|
@@ -16668,7 +16689,7 @@ var getCurrentUseCounter = function() {
|
|
|
16668
16689
|
return isFinite(counter) ? counter : 0;
|
|
16669
16690
|
};
|
|
16670
16691
|
var useLockAttribute = function() {
|
|
16671
|
-
|
|
16692
|
+
React31.useEffect(function() {
|
|
16672
16693
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
16673
16694
|
return function() {
|
|
16674
16695
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -16683,10 +16704,10 @@ var useLockAttribute = function() {
|
|
|
16683
16704
|
var RemoveScrollBar = function(_a) {
|
|
16684
16705
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
16685
16706
|
useLockAttribute();
|
|
16686
|
-
var gap =
|
|
16707
|
+
var gap = React31.useMemo(function() {
|
|
16687
16708
|
return getGapWidth(gapMode);
|
|
16688
16709
|
}, [gapMode]);
|
|
16689
|
-
return
|
|
16710
|
+
return React31.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
16690
16711
|
};
|
|
16691
16712
|
var passiveSupported = false;
|
|
16692
16713
|
if (typeof window !== "undefined") {
|
|
@@ -16987,9 +17008,9 @@ var Select = (props) => {
|
|
|
16987
17008
|
required
|
|
16988
17009
|
} = props;
|
|
16989
17010
|
const popperScope = usePopperScope(__scopeSelect);
|
|
16990
|
-
const [trigger, setTrigger] =
|
|
16991
|
-
const [valueNode, setValueNode] =
|
|
16992
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
17011
|
+
const [trigger, setTrigger] = React342.useState(null);
|
|
17012
|
+
const [valueNode, setValueNode] = React342.useState(null);
|
|
17013
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React342.useState(false);
|
|
16993
17014
|
const direction = useDirection(dir);
|
|
16994
17015
|
const [open = false, setOpen] = useControllableState({
|
|
16995
17016
|
prop: openProp,
|
|
@@ -17001,9 +17022,9 @@ var Select = (props) => {
|
|
|
17001
17022
|
defaultProp: defaultValue,
|
|
17002
17023
|
onChange: onValueChange
|
|
17003
17024
|
});
|
|
17004
|
-
const triggerPointerDownPosRef =
|
|
17025
|
+
const triggerPointerDownPosRef = React342.useRef(null);
|
|
17005
17026
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
17006
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
17027
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React342.useState(/* @__PURE__ */ new Set);
|
|
17007
17028
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
17008
17029
|
return /* @__PURE__ */ jsx212(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
17009
17030
|
required,
|
|
@@ -17025,10 +17046,10 @@ var Select = (props) => {
|
|
|
17025
17046
|
children: [
|
|
17026
17047
|
/* @__PURE__ */ jsx212(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx212(SelectNativeOptionsProvider, {
|
|
17027
17048
|
scope: props.__scopeSelect,
|
|
17028
|
-
onNativeOptionAdd:
|
|
17049
|
+
onNativeOptionAdd: React342.useCallback((option) => {
|
|
17029
17050
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
17030
17051
|
}, []),
|
|
17031
|
-
onNativeOptionRemove:
|
|
17052
|
+
onNativeOptionRemove: React342.useCallback((option) => {
|
|
17032
17053
|
setNativeOptionsSet((prev) => {
|
|
17033
17054
|
const optionsSet = new Set(prev);
|
|
17034
17055
|
optionsSet.delete(option);
|
|
@@ -17056,7 +17077,7 @@ var Select = (props) => {
|
|
|
17056
17077
|
};
|
|
17057
17078
|
Select.displayName = SELECT_NAME;
|
|
17058
17079
|
var TRIGGER_NAME = "SelectTrigger";
|
|
17059
|
-
var SelectTrigger =
|
|
17080
|
+
var SelectTrigger = React342.forwardRef((props, forwardedRef) => {
|
|
17060
17081
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
17061
17082
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17062
17083
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -17124,7 +17145,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
17124
17145
|
});
|
|
17125
17146
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
17126
17147
|
var VALUE_NAME = "SelectValue";
|
|
17127
|
-
var SelectValue =
|
|
17148
|
+
var SelectValue = React342.forwardRef((props, forwardedRef) => {
|
|
17128
17149
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
17129
17150
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
17130
17151
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -17142,7 +17163,7 @@ var SelectValue = React34.forwardRef((props, forwardedRef) => {
|
|
|
17142
17163
|
});
|
|
17143
17164
|
SelectValue.displayName = VALUE_NAME;
|
|
17144
17165
|
var ICON_NAME = "SelectIcon";
|
|
17145
|
-
var SelectIcon =
|
|
17166
|
+
var SelectIcon = React342.forwardRef((props, forwardedRef) => {
|
|
17146
17167
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
17147
17168
|
return /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
17148
17169
|
});
|
|
@@ -17153,9 +17174,9 @@ var SelectPortal = (props) => {
|
|
|
17153
17174
|
};
|
|
17154
17175
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
17155
17176
|
var CONTENT_NAME2 = "SelectContent";
|
|
17156
|
-
var SelectContent =
|
|
17177
|
+
var SelectContent = React342.forwardRef((props, forwardedRef) => {
|
|
17157
17178
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
17158
|
-
const [fragment, setFragment] =
|
|
17179
|
+
const [fragment, setFragment] = React342.useState();
|
|
17159
17180
|
useLayoutEffect22(() => {
|
|
17160
17181
|
setFragment(new DocumentFragment);
|
|
17161
17182
|
}, []);
|
|
@@ -17169,7 +17190,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
17169
17190
|
var CONTENT_MARGIN = 10;
|
|
17170
17191
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
17171
17192
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
17172
|
-
var SelectContentImpl =
|
|
17193
|
+
var SelectContentImpl = React342.forwardRef((props, forwardedRef) => {
|
|
17173
17194
|
const {
|
|
17174
17195
|
__scopeSelect,
|
|
17175
17196
|
position = "item-aligned",
|
|
@@ -17189,20 +17210,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17189
17210
|
...contentProps
|
|
17190
17211
|
} = props;
|
|
17191
17212
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17192
|
-
const [content, setContent] =
|
|
17193
|
-
const [viewport, setViewport] =
|
|
17213
|
+
const [content, setContent] = React342.useState(null);
|
|
17214
|
+
const [viewport, setViewport] = React342.useState(null);
|
|
17194
17215
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17195
|
-
const [selectedItem, setSelectedItem] =
|
|
17196
|
-
const [selectedItemText, setSelectedItemText] =
|
|
17216
|
+
const [selectedItem, setSelectedItem] = React342.useState(null);
|
|
17217
|
+
const [selectedItemText, setSelectedItemText] = React342.useState(null);
|
|
17197
17218
|
const getItems = useCollection(__scopeSelect);
|
|
17198
|
-
const [isPositioned, setIsPositioned] =
|
|
17199
|
-
const firstValidItemFoundRef =
|
|
17200
|
-
|
|
17219
|
+
const [isPositioned, setIsPositioned] = React342.useState(false);
|
|
17220
|
+
const firstValidItemFoundRef = React342.useRef(false);
|
|
17221
|
+
React342.useEffect(() => {
|
|
17201
17222
|
if (content)
|
|
17202
17223
|
return hideOthers(content);
|
|
17203
17224
|
}, [content]);
|
|
17204
17225
|
useFocusGuards();
|
|
17205
|
-
const focusFirst2 =
|
|
17226
|
+
const focusFirst2 = React342.useCallback((candidates) => {
|
|
17206
17227
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
17207
17228
|
const [lastItem] = restItems.slice(-1);
|
|
17208
17229
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -17219,14 +17240,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17219
17240
|
return;
|
|
17220
17241
|
}
|
|
17221
17242
|
}, [getItems, viewport]);
|
|
17222
|
-
const focusSelectedItem =
|
|
17223
|
-
|
|
17243
|
+
const focusSelectedItem = React342.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
17244
|
+
React342.useEffect(() => {
|
|
17224
17245
|
if (isPositioned) {
|
|
17225
17246
|
focusSelectedItem();
|
|
17226
17247
|
}
|
|
17227
17248
|
}, [isPositioned, focusSelectedItem]);
|
|
17228
17249
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
17229
|
-
|
|
17250
|
+
React342.useEffect(() => {
|
|
17230
17251
|
if (content) {
|
|
17231
17252
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
17232
17253
|
const handlePointerMove = (event) => {
|
|
@@ -17256,7 +17277,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17256
17277
|
};
|
|
17257
17278
|
}
|
|
17258
17279
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
17259
|
-
|
|
17280
|
+
React342.useEffect(() => {
|
|
17260
17281
|
const close = () => onOpenChange(false);
|
|
17261
17282
|
window.addEventListener("blur", close);
|
|
17262
17283
|
window.addEventListener("resize", close);
|
|
@@ -17273,7 +17294,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17273
17294
|
setTimeout(() => nextItem.ref.current.focus());
|
|
17274
17295
|
}
|
|
17275
17296
|
});
|
|
17276
|
-
const itemRefCallback =
|
|
17297
|
+
const itemRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17277
17298
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17278
17299
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17279
17300
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17282,8 +17303,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17282
17303
|
firstValidItemFoundRef.current = true;
|
|
17283
17304
|
}
|
|
17284
17305
|
}, [context.value]);
|
|
17285
|
-
const handleItemLeave =
|
|
17286
|
-
const itemTextRefCallback =
|
|
17306
|
+
const handleItemLeave = React342.useCallback(() => content?.focus(), [content]);
|
|
17307
|
+
const itemTextRefCallback = React342.useCallback((node, value, disabled) => {
|
|
17287
17308
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
17288
17309
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
17289
17310
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -17378,18 +17399,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17378
17399
|
});
|
|
17379
17400
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
17380
17401
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
17381
|
-
var SelectItemAlignedPosition =
|
|
17402
|
+
var SelectItemAlignedPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17382
17403
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
17383
17404
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
17384
17405
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
17385
|
-
const [contentWrapper, setContentWrapper] =
|
|
17386
|
-
const [content, setContent] =
|
|
17406
|
+
const [contentWrapper, setContentWrapper] = React342.useState(null);
|
|
17407
|
+
const [content, setContent] = React342.useState(null);
|
|
17387
17408
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
17388
17409
|
const getItems = useCollection(__scopeSelect);
|
|
17389
|
-
const shouldExpandOnScrollRef =
|
|
17390
|
-
const shouldRepositionRef =
|
|
17410
|
+
const shouldExpandOnScrollRef = React342.useRef(false);
|
|
17411
|
+
const shouldRepositionRef = React342.useRef(true);
|
|
17391
17412
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
17392
|
-
const position =
|
|
17413
|
+
const position = React342.useCallback(() => {
|
|
17393
17414
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
17394
17415
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
17395
17416
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -17470,12 +17491,12 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17470
17491
|
onPlaced
|
|
17471
17492
|
]);
|
|
17472
17493
|
useLayoutEffect22(() => position(), [position]);
|
|
17473
|
-
const [contentZIndex, setContentZIndex] =
|
|
17494
|
+
const [contentZIndex, setContentZIndex] = React342.useState();
|
|
17474
17495
|
useLayoutEffect22(() => {
|
|
17475
17496
|
if (content)
|
|
17476
17497
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
17477
17498
|
}, [content]);
|
|
17478
|
-
const handleScrollButtonChange =
|
|
17499
|
+
const handleScrollButtonChange = React342.useCallback((node) => {
|
|
17479
17500
|
if (node && shouldRepositionRef.current === true) {
|
|
17480
17501
|
position();
|
|
17481
17502
|
focusSelectedItem?.();
|
|
@@ -17509,7 +17530,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17509
17530
|
});
|
|
17510
17531
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
17511
17532
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
17512
|
-
var SelectPopperPosition =
|
|
17533
|
+
var SelectPopperPosition = React342.forwardRef((props, forwardedRef) => {
|
|
17513
17534
|
const {
|
|
17514
17535
|
__scopeSelect,
|
|
17515
17536
|
align = "start",
|
|
@@ -17539,12 +17560,12 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
17539
17560
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
17540
17561
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
17541
17562
|
var VIEWPORT_NAME = "SelectViewport";
|
|
17542
|
-
var SelectViewport =
|
|
17563
|
+
var SelectViewport = React342.forwardRef((props, forwardedRef) => {
|
|
17543
17564
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
17544
17565
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
17545
17566
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
17546
17567
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
17547
|
-
const prevScrollTopRef =
|
|
17568
|
+
const prevScrollTopRef = React342.useRef(0);
|
|
17548
17569
|
return /* @__PURE__ */ jsxs4(Fragment52, { children: [
|
|
17549
17570
|
/* @__PURE__ */ jsx212("style", {
|
|
17550
17571
|
dangerouslySetInnerHTML: {
|
|
@@ -17593,14 +17614,14 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
17593
17614
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
17594
17615
|
var GROUP_NAME = "SelectGroup";
|
|
17595
17616
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
17596
|
-
var SelectGroup =
|
|
17617
|
+
var SelectGroup = React342.forwardRef((props, forwardedRef) => {
|
|
17597
17618
|
const { __scopeSelect, ...groupProps } = props;
|
|
17598
17619
|
const groupId = useId();
|
|
17599
17620
|
return /* @__PURE__ */ jsx212(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx212(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
17600
17621
|
});
|
|
17601
17622
|
SelectGroup.displayName = GROUP_NAME;
|
|
17602
17623
|
var LABEL_NAME = "SelectLabel";
|
|
17603
|
-
var SelectLabel =
|
|
17624
|
+
var SelectLabel = React342.forwardRef((props, forwardedRef) => {
|
|
17604
17625
|
const { __scopeSelect, ...labelProps } = props;
|
|
17605
17626
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
17606
17627
|
return /* @__PURE__ */ jsx212(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -17608,7 +17629,7 @@ var SelectLabel = React34.forwardRef((props, forwardedRef) => {
|
|
|
17608
17629
|
SelectLabel.displayName = LABEL_NAME;
|
|
17609
17630
|
var ITEM_NAME = "SelectItem";
|
|
17610
17631
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
17611
|
-
var SelectItem =
|
|
17632
|
+
var SelectItem = React342.forwardRef((props, forwardedRef) => {
|
|
17612
17633
|
const {
|
|
17613
17634
|
__scopeSelect,
|
|
17614
17635
|
value,
|
|
@@ -17619,8 +17640,8 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17619
17640
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
17620
17641
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
17621
17642
|
const isSelected = context.value === value;
|
|
17622
|
-
const [textValue, setTextValue] =
|
|
17623
|
-
const [isFocused, setIsFocused] =
|
|
17643
|
+
const [textValue, setTextValue] = React342.useState(textValueProp ?? "");
|
|
17644
|
+
const [isFocused, setIsFocused] = React342.useState(false);
|
|
17624
17645
|
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
17625
17646
|
const textId = useId();
|
|
17626
17647
|
const handleSelect = () => {
|
|
@@ -17638,7 +17659,7 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17638
17659
|
disabled,
|
|
17639
17660
|
textId,
|
|
17640
17661
|
isSelected,
|
|
17641
|
-
onItemTextChange:
|
|
17662
|
+
onItemTextChange: React342.useCallback((node) => {
|
|
17642
17663
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
17643
17664
|
}, []),
|
|
17644
17665
|
children: /* @__PURE__ */ jsx212(Collection.ItemSlot, {
|
|
@@ -17687,16 +17708,16 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
17687
17708
|
});
|
|
17688
17709
|
SelectItem.displayName = ITEM_NAME;
|
|
17689
17710
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
17690
|
-
var SelectItemText =
|
|
17711
|
+
var SelectItemText = React342.forwardRef((props, forwardedRef) => {
|
|
17691
17712
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
17692
17713
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17693
17714
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17694
17715
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17695
17716
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
17696
|
-
const [itemTextNode, setItemTextNode] =
|
|
17717
|
+
const [itemTextNode, setItemTextNode] = React342.useState(null);
|
|
17697
17718
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
17698
17719
|
const textContent = itemTextNode?.textContent;
|
|
17699
|
-
const nativeOption =
|
|
17720
|
+
const nativeOption = React342.useMemo(() => /* @__PURE__ */ jsx212("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
17700
17721
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
17701
17722
|
useLayoutEffect22(() => {
|
|
17702
17723
|
onNativeOptionAdd(nativeOption);
|
|
@@ -17709,17 +17730,17 @@ var SelectItemText = React34.forwardRef((props, forwardedRef) => {
|
|
|
17709
17730
|
});
|
|
17710
17731
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
17711
17732
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
17712
|
-
var SelectItemIndicator =
|
|
17733
|
+
var SelectItemIndicator = React342.forwardRef((props, forwardedRef) => {
|
|
17713
17734
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
17714
17735
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
17715
17736
|
return itemContext.isSelected ? /* @__PURE__ */ jsx212(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
17716
17737
|
});
|
|
17717
17738
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
17718
17739
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
17719
|
-
var SelectScrollUpButton =
|
|
17740
|
+
var SelectScrollUpButton = React342.forwardRef((props, forwardedRef) => {
|
|
17720
17741
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17721
17742
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
17722
|
-
const [canScrollUp, setCanScrollUp] =
|
|
17743
|
+
const [canScrollUp, setCanScrollUp] = React342.useState(false);
|
|
17723
17744
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17724
17745
|
useLayoutEffect22(() => {
|
|
17725
17746
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17747,10 +17768,10 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
17747
17768
|
});
|
|
17748
17769
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
17749
17770
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
17750
|
-
var SelectScrollDownButton =
|
|
17771
|
+
var SelectScrollDownButton = React342.forwardRef((props, forwardedRef) => {
|
|
17751
17772
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17752
17773
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
17753
|
-
const [canScrollDown, setCanScrollDown] =
|
|
17774
|
+
const [canScrollDown, setCanScrollDown] = React342.useState(false);
|
|
17754
17775
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
17755
17776
|
useLayoutEffect22(() => {
|
|
17756
17777
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -17778,18 +17799,18 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
17778
17799
|
}) : null;
|
|
17779
17800
|
});
|
|
17780
17801
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
17781
|
-
var SelectScrollButtonImpl =
|
|
17802
|
+
var SelectScrollButtonImpl = React342.forwardRef((props, forwardedRef) => {
|
|
17782
17803
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
17783
17804
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
17784
|
-
const autoScrollTimerRef =
|
|
17805
|
+
const autoScrollTimerRef = React342.useRef(null);
|
|
17785
17806
|
const getItems = useCollection(__scopeSelect);
|
|
17786
|
-
const clearAutoScrollTimer =
|
|
17807
|
+
const clearAutoScrollTimer = React342.useCallback(() => {
|
|
17787
17808
|
if (autoScrollTimerRef.current !== null) {
|
|
17788
17809
|
window.clearInterval(autoScrollTimerRef.current);
|
|
17789
17810
|
autoScrollTimerRef.current = null;
|
|
17790
17811
|
}
|
|
17791
17812
|
}, []);
|
|
17792
|
-
|
|
17813
|
+
React342.useEffect(() => {
|
|
17793
17814
|
return () => clearAutoScrollTimer();
|
|
17794
17815
|
}, [clearAutoScrollTimer]);
|
|
17795
17816
|
useLayoutEffect22(() => {
|
|
@@ -17818,13 +17839,13 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
17818
17839
|
});
|
|
17819
17840
|
});
|
|
17820
17841
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
17821
|
-
var SelectSeparator =
|
|
17842
|
+
var SelectSeparator = React342.forwardRef((props, forwardedRef) => {
|
|
17822
17843
|
const { __scopeSelect, ...separatorProps } = props;
|
|
17823
17844
|
return /* @__PURE__ */ jsx212(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
17824
17845
|
});
|
|
17825
17846
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
17826
17847
|
var ARROW_NAME2 = "SelectArrow";
|
|
17827
|
-
var SelectArrow =
|
|
17848
|
+
var SelectArrow = React342.forwardRef((props, forwardedRef) => {
|
|
17828
17849
|
const { __scopeSelect, ...arrowProps } = props;
|
|
17829
17850
|
const popperScope = usePopperScope(__scopeSelect);
|
|
17830
17851
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -17835,12 +17856,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
17835
17856
|
function shouldShowPlaceholder(value) {
|
|
17836
17857
|
return value === "" || value === undefined;
|
|
17837
17858
|
}
|
|
17838
|
-
var BubbleSelect =
|
|
17859
|
+
var BubbleSelect = React342.forwardRef((props, forwardedRef) => {
|
|
17839
17860
|
const { value, ...selectProps } = props;
|
|
17840
|
-
const ref =
|
|
17861
|
+
const ref = React342.useRef(null);
|
|
17841
17862
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
17842
17863
|
const prevValue = usePrevious(value);
|
|
17843
|
-
|
|
17864
|
+
React342.useEffect(() => {
|
|
17844
17865
|
const select = ref.current;
|
|
17845
17866
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
17846
17867
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -17856,9 +17877,9 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
17856
17877
|
BubbleSelect.displayName = "BubbleSelect";
|
|
17857
17878
|
function useTypeaheadSearch(onSearchChange) {
|
|
17858
17879
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
17859
|
-
const searchRef =
|
|
17860
|
-
const timerRef =
|
|
17861
|
-
const handleTypeaheadSearch =
|
|
17880
|
+
const searchRef = React342.useRef("");
|
|
17881
|
+
const timerRef = React342.useRef(0);
|
|
17882
|
+
const handleTypeaheadSearch = React342.useCallback((key) => {
|
|
17862
17883
|
const search = searchRef.current + key;
|
|
17863
17884
|
handleSearchChange(search);
|
|
17864
17885
|
(function updateSearch(value) {
|
|
@@ -17868,11 +17889,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
17868
17889
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
17869
17890
|
})(search);
|
|
17870
17891
|
}, [handleSearchChange]);
|
|
17871
|
-
const resetTypeahead =
|
|
17892
|
+
const resetTypeahead = React342.useCallback(() => {
|
|
17872
17893
|
searchRef.current = "";
|
|
17873
17894
|
window.clearTimeout(timerRef.current);
|
|
17874
17895
|
}, []);
|
|
17875
|
-
|
|
17896
|
+
React342.useEffect(() => {
|
|
17876
17897
|
return () => window.clearTimeout(timerRef.current);
|
|
17877
17898
|
}, []);
|
|
17878
17899
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -17961,7 +17982,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
17961
17982
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
17962
17983
|
var Select2 = Root222;
|
|
17963
17984
|
var SelectValue2 = Value;
|
|
17964
|
-
var SelectTrigger2 =
|
|
17985
|
+
var SelectTrigger2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
17965
17986
|
ref,
|
|
17966
17987
|
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),
|
|
17967
17988
|
...props,
|
|
@@ -17976,7 +17997,7 @@ var SelectTrigger2 = React352.forwardRef(({ className, children, ...props }, ref
|
|
|
17976
17997
|
]
|
|
17977
17998
|
}));
|
|
17978
17999
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
17979
|
-
var SelectScrollUpButton2 =
|
|
18000
|
+
var SelectScrollUpButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollUpButton, {
|
|
17980
18001
|
ref,
|
|
17981
18002
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
17982
18003
|
...props,
|
|
@@ -17985,7 +18006,7 @@ var SelectScrollUpButton2 = React352.forwardRef(({ className, ...props }, ref) =
|
|
|
17985
18006
|
})
|
|
17986
18007
|
}));
|
|
17987
18008
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
17988
|
-
var SelectScrollDownButton2 =
|
|
18009
|
+
var SelectScrollDownButton2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(ScrollDownButton, {
|
|
17989
18010
|
ref,
|
|
17990
18011
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
17991
18012
|
...props,
|
|
@@ -17994,7 +18015,7 @@ var SelectScrollDownButton2 = React352.forwardRef(({ className, ...props }, ref)
|
|
|
17994
18015
|
})
|
|
17995
18016
|
}));
|
|
17996
18017
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
17997
|
-
var SelectContent2 =
|
|
18018
|
+
var SelectContent2 = React35.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx223(Portal2, {
|
|
17998
18019
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
17999
18020
|
ref,
|
|
18000
18021
|
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),
|
|
@@ -18011,13 +18032,13 @@ var SelectContent2 = React352.forwardRef(({ className, children, position = "pop
|
|
|
18011
18032
|
})
|
|
18012
18033
|
}));
|
|
18013
18034
|
SelectContent2.displayName = Content2.displayName;
|
|
18014
|
-
var SelectLabel2 =
|
|
18035
|
+
var SelectLabel2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Label, {
|
|
18015
18036
|
ref,
|
|
18016
18037
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
18017
18038
|
...props
|
|
18018
18039
|
}));
|
|
18019
18040
|
SelectLabel2.displayName = Label.displayName;
|
|
18020
|
-
var SelectItem2 =
|
|
18041
|
+
var SelectItem2 = React35.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
18021
18042
|
ref,
|
|
18022
18043
|
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),
|
|
18023
18044
|
...props,
|
|
@@ -18036,7 +18057,7 @@ var SelectItem2 = React352.forwardRef(({ className, children, ...props }, ref) =
|
|
|
18036
18057
|
]
|
|
18037
18058
|
}));
|
|
18038
18059
|
SelectItem2.displayName = Item.displayName;
|
|
18039
|
-
var SelectSeparator2 =
|
|
18060
|
+
var SelectSeparator2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx223(Separator, {
|
|
18040
18061
|
ref,
|
|
18041
18062
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
18042
18063
|
...props
|