@remotion/promo-pages 4.0.491 → 4.0.493
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 +371 -273
- package/dist/design.js +331 -271
- package/dist/experts.js +182 -122
- package/dist/homepage/Pricing.js +331 -271
- package/dist/prompts/PromptsGallery.js +331 -271
- package/dist/prompts/PromptsShow.js +331 -271
- package/dist/prompts/PromptsSubmit.js +331 -271
- package/dist/team.js +331 -271
- package/dist/template-modal-content.js +331 -271
- package/dist/templates.js +331 -271
- package/package.json +13 -13
package/dist/design.js
CHANGED
|
@@ -33,7 +33,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// ../design/dist/esm/index.mjs
|
|
36
|
-
import * as
|
|
36
|
+
import * as React24 from "react";
|
|
37
37
|
import * as React3 from "react";
|
|
38
38
|
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
39
39
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1378
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1379
|
|
|
1380
1380
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import
|
|
1381
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1382
1382
|
|
|
1383
1383
|
// ../paths/dist/esm/index.mjs
|
|
1384
1384
|
var cutLInstruction = ({
|
|
@@ -4171,6 +4171,7 @@ import * as React6 from "react";
|
|
|
4171
4171
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
4172
4172
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
4173
4173
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4174
|
+
import React9 from "react";
|
|
4174
4175
|
import {
|
|
4175
4176
|
forwardRef as forwardRef3,
|
|
4176
4177
|
useCallback as useCallback6,
|
|
@@ -4196,11 +4197,11 @@ import { useContext as useContext13 } from "react";
|
|
|
4196
4197
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4197
4198
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4198
4199
|
import { createContext as createContext14 } from "react";
|
|
4199
|
-
import
|
|
4200
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4200
4201
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4201
|
-
import
|
|
4202
|
+
import React13, { createContext as createContext15 } from "react";
|
|
4202
4203
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4203
|
-
import
|
|
4204
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
4204
4205
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
4205
4206
|
import { createContext as createContext16 } from "react";
|
|
4206
4207
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4212,7 +4213,7 @@ import {
|
|
|
4212
4213
|
useRef as useRef9,
|
|
4213
4214
|
useState as useState6
|
|
4214
4215
|
} from "react";
|
|
4215
|
-
import
|
|
4216
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4216
4217
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
4217
4218
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4218
4219
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -4228,7 +4229,7 @@ import {
|
|
|
4228
4229
|
} from "react";
|
|
4229
4230
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4230
4231
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
4231
|
-
import
|
|
4232
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
4232
4233
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4233
4234
|
import { useContext as useContext19 } from "react";
|
|
4234
4235
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -4236,7 +4237,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
4236
4237
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
4237
4238
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4238
4239
|
import { useCallback as useCallback13 } from "react";
|
|
4239
|
-
import
|
|
4240
|
+
import React23, {
|
|
4240
4241
|
forwardRef as forwardRef5,
|
|
4241
4242
|
useContext as useContext28,
|
|
4242
4243
|
useEffect as useEffect14,
|
|
@@ -4246,7 +4247,7 @@ import React22, {
|
|
|
4246
4247
|
useState as useState14
|
|
4247
4248
|
} from "react";
|
|
4248
4249
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4249
|
-
import
|
|
4250
|
+
import React20, {
|
|
4250
4251
|
createContext as createContext21,
|
|
4251
4252
|
createRef as createRef2,
|
|
4252
4253
|
useCallback as useCallback9,
|
|
@@ -4270,7 +4271,7 @@ import {
|
|
|
4270
4271
|
} from "react";
|
|
4271
4272
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
4272
4273
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
4273
|
-
import
|
|
4274
|
+
import React21, {
|
|
4274
4275
|
useCallback as useCallback10,
|
|
4275
4276
|
useContext as useContext24,
|
|
4276
4277
|
useEffect as useEffect9,
|
|
@@ -4280,7 +4281,7 @@ import React20, {
|
|
|
4280
4281
|
useState as useState12
|
|
4281
4282
|
} from "react";
|
|
4282
4283
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4283
|
-
import
|
|
4284
|
+
import React22 from "react";
|
|
4284
4285
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4285
4286
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4286
4287
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4338,10 +4339,10 @@ import {
|
|
|
4338
4339
|
useState as useState18
|
|
4339
4340
|
} from "react";
|
|
4340
4341
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4341
|
-
import
|
|
4342
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4342
4343
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4343
4344
|
import { createRef as createRef3 } from "react";
|
|
4344
|
-
import
|
|
4345
|
+
import React31 from "react";
|
|
4345
4346
|
import {
|
|
4346
4347
|
useCallback as useCallback21,
|
|
4347
4348
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -4350,14 +4351,14 @@ import {
|
|
|
4350
4351
|
useState as useState19
|
|
4351
4352
|
} from "react";
|
|
4352
4353
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4353
|
-
import
|
|
4354
|
+
import React32 from "react";
|
|
4354
4355
|
import { useMemo as useMemo34 } from "react";
|
|
4355
4356
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
4356
4357
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4357
4358
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4358
|
-
import
|
|
4359
|
-
import
|
|
4360
|
-
import
|
|
4359
|
+
import React34 from "react";
|
|
4360
|
+
import React35, { createContext as createContext25 } from "react";
|
|
4361
|
+
import React36, { useContext as useContext35 } from "react";
|
|
4361
4362
|
import { useCallback as useCallback24 } from "react";
|
|
4362
4363
|
import {
|
|
4363
4364
|
useCallback as useCallback22,
|
|
@@ -4368,7 +4369,7 @@ import {
|
|
|
4368
4369
|
useState as useState20
|
|
4369
4370
|
} from "react";
|
|
4370
4371
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4371
|
-
import
|
|
4372
|
+
import React38, {
|
|
4372
4373
|
forwardRef as forwardRef13,
|
|
4373
4374
|
useCallback as useCallback23,
|
|
4374
4375
|
useContext as useContext37,
|
|
@@ -4381,15 +4382,15 @@ import React37, {
|
|
|
4381
4382
|
import { useEffect as useEffect18 } from "react";
|
|
4382
4383
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4383
4384
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4384
|
-
import
|
|
4385
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
4385
4386
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4386
|
-
import
|
|
4387
|
+
import React42, {
|
|
4387
4388
|
forwardRef as forwardRef14,
|
|
4388
4389
|
useMemo as useMemo38
|
|
4389
4390
|
} from "react";
|
|
4390
|
-
import
|
|
4391
|
+
import React41 from "react";
|
|
4391
4392
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4392
|
-
import
|
|
4393
|
+
import React43 from "react";
|
|
4393
4394
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
4394
4395
|
import {
|
|
4395
4396
|
forwardRef as forwardRef15,
|
|
@@ -5051,6 +5052,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5051
5052
|
if (currentCompositionMetadata) {
|
|
5052
5053
|
return {
|
|
5053
5054
|
type: "success",
|
|
5055
|
+
metadataSource: null,
|
|
5054
5056
|
result: {
|
|
5055
5057
|
...currentCompositionMetadata,
|
|
5056
5058
|
id: composition.id,
|
|
@@ -5068,6 +5070,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5068
5070
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
5069
5071
|
return {
|
|
5070
5072
|
type: "success",
|
|
5073
|
+
metadataSource: null,
|
|
5071
5074
|
result: {
|
|
5072
5075
|
width: composition.width,
|
|
5073
5076
|
height: composition.height,
|
|
@@ -5467,6 +5470,7 @@ var InnerComposition = ({
|
|
|
5467
5470
|
}
|
|
5468
5471
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
5469
5472
|
const stack = compProps.stack ?? null;
|
|
5473
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
5470
5474
|
useEffect2(() => {
|
|
5471
5475
|
if (!id) {
|
|
5472
5476
|
throw new Error("No id for composition passed.");
|
|
@@ -5484,6 +5488,7 @@ var InnerComposition = ({
|
|
|
5484
5488
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
5485
5489
|
nonce: nonce.get(),
|
|
5486
5490
|
parentFolderName: parentName,
|
|
5491
|
+
componentFromProps,
|
|
5487
5492
|
schema: schema ?? null,
|
|
5488
5493
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
5489
5494
|
stack
|
|
@@ -5502,6 +5507,7 @@ var InnerComposition = ({
|
|
|
5502
5507
|
width,
|
|
5503
5508
|
nonce,
|
|
5504
5509
|
parentName,
|
|
5510
|
+
componentFromProps,
|
|
5505
5511
|
schema,
|
|
5506
5512
|
compProps.calculateMetadata,
|
|
5507
5513
|
stack,
|
|
@@ -5560,11 +5566,30 @@ var Composition = (props) => {
|
|
|
5560
5566
|
});
|
|
5561
5567
|
};
|
|
5562
5568
|
var componentsToAddStacksTo = [];
|
|
5569
|
+
var sequenceComponent = null;
|
|
5563
5570
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
5564
5571
|
var addSequenceStackTraces = (component) => {
|
|
5565
5572
|
componentsToAddStacksTo.push(component);
|
|
5566
5573
|
};
|
|
5567
|
-
var
|
|
5574
|
+
var setSequenceComponent = (component) => {
|
|
5575
|
+
sequenceComponent = component;
|
|
5576
|
+
};
|
|
5577
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
5578
|
+
var getSingleChildComponent = (children) => {
|
|
5579
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
5580
|
+
if (mountedChildren.length !== 1) {
|
|
5581
|
+
return null;
|
|
5582
|
+
}
|
|
5583
|
+
const child = mountedChildren[0];
|
|
5584
|
+
if (!React9.isValidElement(child)) {
|
|
5585
|
+
return null;
|
|
5586
|
+
}
|
|
5587
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
5588
|
+
return null;
|
|
5589
|
+
}
|
|
5590
|
+
return child.type;
|
|
5591
|
+
};
|
|
5592
|
+
var VERSION = "4.0.493";
|
|
5568
5593
|
var checkMultipleRemotionVersions = () => {
|
|
5569
5594
|
if (typeof globalThis === "undefined") {
|
|
5570
5595
|
return;
|
|
@@ -6164,7 +6189,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6164
6189
|
var PremountContext = createContext14({
|
|
6165
6190
|
premountFramesRemaining: 0
|
|
6166
6191
|
});
|
|
6167
|
-
var SequenceManager =
|
|
6192
|
+
var SequenceManager = React12.createContext({
|
|
6168
6193
|
registerSequence: () => {
|
|
6169
6194
|
throw new Error("SequenceManagerContext not initialized");
|
|
6170
6195
|
},
|
|
@@ -6173,19 +6198,19 @@ var SequenceManager = React11.createContext({
|
|
|
6173
6198
|
},
|
|
6174
6199
|
sequences: []
|
|
6175
6200
|
});
|
|
6176
|
-
var SequenceManagerRefContext =
|
|
6201
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
6177
6202
|
current: []
|
|
6178
6203
|
});
|
|
6179
6204
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
6180
6205
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
6181
6206
|
};
|
|
6182
|
-
var VisualModePropStatusesContext =
|
|
6207
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
6183
6208
|
propStatuses: {}
|
|
6184
6209
|
});
|
|
6185
|
-
var VisualModePropStatusesRefContext =
|
|
6210
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
6186
6211
|
current: {}
|
|
6187
6212
|
});
|
|
6188
|
-
var VisualModeDragOverridesContext =
|
|
6213
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
6189
6214
|
getDragOverrides: () => {
|
|
6190
6215
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6191
6216
|
},
|
|
@@ -6193,7 +6218,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
6193
6218
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6194
6219
|
}
|
|
6195
6220
|
});
|
|
6196
|
-
var VisualModeSettersContext =
|
|
6221
|
+
var VisualModeSettersContext = React12.createContext({
|
|
6197
6222
|
setDragOverrides: () => {
|
|
6198
6223
|
throw new Error("VisualModeSettersContext not initialized");
|
|
6199
6224
|
},
|
|
@@ -6357,7 +6382,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
6357
6382
|
});
|
|
6358
6383
|
};
|
|
6359
6384
|
var useRequireToBeInsideSeries = () => {
|
|
6360
|
-
const isInsideSeries =
|
|
6385
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
6361
6386
|
if (!isInsideSeries) {
|
|
6362
6387
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6363
6388
|
}
|
|
@@ -8426,6 +8451,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
8426
8451
|
shouldResortToDefaultValueIfUndefined: false
|
|
8427
8452
|
});
|
|
8428
8453
|
}
|
|
8454
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
8455
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
8456
|
+
}
|
|
8429
8457
|
if (value === undefined) {
|
|
8430
8458
|
propsToDelete.add(key);
|
|
8431
8459
|
}
|
|
@@ -8524,7 +8552,7 @@ var withInteractivitySchema = ({
|
|
|
8524
8552
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8525
8553
|
const env = useRemotionEnvironment();
|
|
8526
8554
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8527
|
-
return
|
|
8555
|
+
return React14.createElement(Component, {
|
|
8528
8556
|
...props,
|
|
8529
8557
|
controls: null,
|
|
8530
8558
|
ref
|
|
@@ -8535,7 +8563,7 @@ var withInteractivitySchema = ({
|
|
|
8535
8563
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8536
8564
|
const frame = useCurrentFrame();
|
|
8537
8565
|
if (props.controls) {
|
|
8538
|
-
return
|
|
8566
|
+
return React14.createElement(Component, {
|
|
8539
8567
|
...props,
|
|
8540
8568
|
ref
|
|
8541
8569
|
});
|
|
@@ -8593,7 +8621,7 @@ var withInteractivitySchema = ({
|
|
|
8593
8621
|
schemaKeys: activeKeys,
|
|
8594
8622
|
propsToDelete
|
|
8595
8623
|
});
|
|
8596
|
-
return
|
|
8624
|
+
return React14.createElement(Component, {
|
|
8597
8625
|
...mergedProps,
|
|
8598
8626
|
controls,
|
|
8599
8627
|
ref
|
|
@@ -8619,6 +8647,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8619
8647
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8620
8648
|
_remotionInternalStack: stack,
|
|
8621
8649
|
_remotionInternalDocumentationLink: documentationLink,
|
|
8650
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
8622
8651
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8623
8652
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8624
8653
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8765,7 +8794,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8765
8794
|
getStack: () => stackRef.current,
|
|
8766
8795
|
refForOutline: refForOutline ?? null,
|
|
8767
8796
|
isInsideSeries,
|
|
8768
|
-
frozenFrame: registeredFrozenFrame
|
|
8797
|
+
frozenFrame: registeredFrozenFrame,
|
|
8798
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8769
8799
|
});
|
|
8770
8800
|
} else {
|
|
8771
8801
|
registerSequence({
|
|
@@ -8795,7 +8825,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8795
8825
|
refForOutline: refForOutline ?? null,
|
|
8796
8826
|
isInsideSeries,
|
|
8797
8827
|
frozenFrame: registeredFrozenFrame,
|
|
8798
|
-
frozenMediaFrame
|
|
8828
|
+
frozenMediaFrame,
|
|
8829
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8799
8830
|
});
|
|
8800
8831
|
}
|
|
8801
8832
|
return () => {
|
|
@@ -8822,7 +8853,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8822
8853
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
8823
8854
|
refForOutline: refForOutline ?? null,
|
|
8824
8855
|
isInsideSeries,
|
|
8825
|
-
frozenFrame: registeredFrozenFrame
|
|
8856
|
+
frozenFrame: registeredFrozenFrame,
|
|
8857
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8826
8858
|
});
|
|
8827
8859
|
return () => {
|
|
8828
8860
|
unregisterSequence(id);
|
|
@@ -8855,7 +8887,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8855
8887
|
registeredFrozenFrame,
|
|
8856
8888
|
startMediaFrom,
|
|
8857
8889
|
mediaFrameAtSequenceZero,
|
|
8858
|
-
frozenMediaFrame
|
|
8890
|
+
frozenMediaFrame,
|
|
8891
|
+
singleChildComponent
|
|
8859
8892
|
]);
|
|
8860
8893
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
8861
8894
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -9357,7 +9390,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9357
9390
|
...props
|
|
9358
9391
|
});
|
|
9359
9392
|
};
|
|
9360
|
-
var Canvas =
|
|
9393
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9361
9394
|
var CACHE_SIZE = 5;
|
|
9362
9395
|
var getActualTime = ({
|
|
9363
9396
|
loopBehavior,
|
|
@@ -9518,6 +9551,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9518
9551
|
return new URL(src, window.origin).href;
|
|
9519
9552
|
};
|
|
9520
9553
|
var animatedImageSchema = {
|
|
9554
|
+
src: {
|
|
9555
|
+
type: "asset",
|
|
9556
|
+
default: undefined,
|
|
9557
|
+
description: "Source",
|
|
9558
|
+
keyframable: false
|
|
9559
|
+
},
|
|
9521
9560
|
...baseSchema,
|
|
9522
9561
|
playbackRate: {
|
|
9523
9562
|
type: "number",
|
|
@@ -9935,7 +9974,7 @@ var calculateMediaDuration = ({
|
|
|
9935
9974
|
};
|
|
9936
9975
|
var LoopContext = createContext18(null);
|
|
9937
9976
|
var useLoop = () => {
|
|
9938
|
-
return
|
|
9977
|
+
return React17.useContext(LoopContext);
|
|
9939
9978
|
};
|
|
9940
9979
|
var Loop = ({
|
|
9941
9980
|
durationInFrames,
|
|
@@ -10786,7 +10825,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10786
10825
|
};
|
|
10787
10826
|
});
|
|
10788
10827
|
}, [audioContext, numberOfAudioTags]);
|
|
10789
|
-
const effectToUse =
|
|
10828
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10790
10829
|
effectToUse(() => {
|
|
10791
10830
|
return () => {
|
|
10792
10831
|
requestAnimationFrame(() => {
|
|
@@ -10956,7 +10995,7 @@ var useSharedAudio = ({
|
|
|
10956
10995
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10957
10996
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
10958
10997
|
}
|
|
10959
|
-
const el =
|
|
10998
|
+
const el = React20.createRef();
|
|
10960
10999
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
10961
11000
|
audioContext: audioCtx.audioContext,
|
|
10962
11001
|
ref: el
|
|
@@ -10975,7 +11014,7 @@ var useSharedAudio = ({
|
|
|
10975
11014
|
}
|
|
10976
11015
|
};
|
|
10977
11016
|
});
|
|
10978
|
-
const effectToUse =
|
|
11017
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10979
11018
|
if (typeof document !== "undefined") {
|
|
10980
11019
|
effectToUse(() => {
|
|
10981
11020
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -11527,7 +11566,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11527
11566
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11528
11567
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11529
11568
|
};
|
|
11530
|
-
var BufferingContextReact =
|
|
11569
|
+
var BufferingContextReact = React21.createContext(null);
|
|
11531
11570
|
var BufferingProvider = ({ children }) => {
|
|
11532
11571
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
11533
11572
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -11740,7 +11779,7 @@ var getMediaSyncAction = (input) => {
|
|
|
11740
11779
|
return { type: "none" };
|
|
11741
11780
|
};
|
|
11742
11781
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11743
|
-
const lastUpdate =
|
|
11782
|
+
const lastUpdate = React22.useRef({
|
|
11744
11783
|
time: mediaRef.current?.currentTime ?? 0,
|
|
11745
11784
|
lastUpdate: performance.now()
|
|
11746
11785
|
});
|
|
@@ -12493,7 +12532,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12493
12532
|
volume: userPreferredVolume,
|
|
12494
12533
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
12495
12534
|
});
|
|
12496
|
-
const effectToUse =
|
|
12535
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
12497
12536
|
effectToUse(() => {
|
|
12498
12537
|
return () => {
|
|
12499
12538
|
requestAnimationFrame(() => {
|
|
@@ -14039,6 +14078,12 @@ var NativeImgInner = ({
|
|
|
14039
14078
|
};
|
|
14040
14079
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
14041
14080
|
var imgSchema = {
|
|
14081
|
+
src: {
|
|
14082
|
+
type: "asset",
|
|
14083
|
+
default: undefined,
|
|
14084
|
+
description: "Source",
|
|
14085
|
+
keyframable: false
|
|
14086
|
+
},
|
|
14042
14087
|
...baseSchema,
|
|
14043
14088
|
...transformSchema
|
|
14044
14089
|
};
|
|
@@ -14249,7 +14294,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14249
14294
|
_remotionInternalStack: stack,
|
|
14250
14295
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
14251
14296
|
outlineRef: refForOutline,
|
|
14252
|
-
children:
|
|
14297
|
+
children: React30.createElement(tag, {
|
|
14253
14298
|
...props2,
|
|
14254
14299
|
ref: callbackRef
|
|
14255
14300
|
})
|
|
@@ -14313,7 +14358,7 @@ var Interactive = {
|
|
|
14313
14358
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
14314
14359
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
14315
14360
|
};
|
|
14316
|
-
var compositionsRef =
|
|
14361
|
+
var compositionsRef = React31.createRef();
|
|
14317
14362
|
var CompositionManagerProvider = ({
|
|
14318
14363
|
children,
|
|
14319
14364
|
onlyRenderComposition,
|
|
@@ -14462,7 +14507,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
14462
14507
|
var getPreviewDomElement = () => {
|
|
14463
14508
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
14464
14509
|
};
|
|
14465
|
-
var MaxMediaCacheSizeContext =
|
|
14510
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
14466
14511
|
var Root = null;
|
|
14467
14512
|
var listeners = [];
|
|
14468
14513
|
var getRoot = () => {
|
|
@@ -14630,7 +14675,46 @@ var validateCalculated = ({
|
|
|
14630
14675
|
defaultSampleRate
|
|
14631
14676
|
};
|
|
14632
14677
|
};
|
|
14633
|
-
var
|
|
14678
|
+
var makeVideoConfigWithMetadata = ({
|
|
14679
|
+
calculated,
|
|
14680
|
+
compositionDurationInFrames,
|
|
14681
|
+
compositionFps,
|
|
14682
|
+
compositionHeight,
|
|
14683
|
+
compositionId,
|
|
14684
|
+
compositionWidth,
|
|
14685
|
+
defaultProps,
|
|
14686
|
+
originalProps
|
|
14687
|
+
}) => {
|
|
14688
|
+
const data = validateCalculated({
|
|
14689
|
+
calculated,
|
|
14690
|
+
compositionDurationInFrames,
|
|
14691
|
+
compositionFps,
|
|
14692
|
+
compositionHeight,
|
|
14693
|
+
compositionWidth,
|
|
14694
|
+
compositionId
|
|
14695
|
+
});
|
|
14696
|
+
return {
|
|
14697
|
+
metadataSource: {
|
|
14698
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
14699
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
14700
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
14701
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
14702
|
+
},
|
|
14703
|
+
videoConfig: {
|
|
14704
|
+
...data,
|
|
14705
|
+
id: compositionId,
|
|
14706
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14707
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
14708
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
14709
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
14710
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
14711
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
14712
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
14713
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
14714
|
+
}
|
|
14715
|
+
};
|
|
14716
|
+
};
|
|
14717
|
+
var resolveVideoConfigWithMetadata = ({
|
|
14634
14718
|
calculateMetadata,
|
|
14635
14719
|
signal,
|
|
14636
14720
|
defaultProps,
|
|
@@ -14650,76 +14734,48 @@ var resolveVideoConfig = ({
|
|
|
14650
14734
|
}) : null;
|
|
14651
14735
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
14652
14736
|
return calculatedProm.then((c2) => {
|
|
14653
|
-
|
|
14654
|
-
height,
|
|
14655
|
-
width,
|
|
14656
|
-
durationInFrames,
|
|
14657
|
-
fps,
|
|
14658
|
-
defaultCodec,
|
|
14659
|
-
defaultOutName,
|
|
14660
|
-
defaultVideoImageFormat,
|
|
14661
|
-
defaultPixelFormat,
|
|
14662
|
-
defaultProResProfile,
|
|
14663
|
-
defaultSampleRate
|
|
14664
|
-
} = validateCalculated({
|
|
14737
|
+
return makeVideoConfigWithMetadata({
|
|
14665
14738
|
calculated: c2,
|
|
14666
14739
|
compositionDurationInFrames,
|
|
14667
14740
|
compositionFps,
|
|
14668
14741
|
compositionHeight,
|
|
14669
14742
|
compositionWidth,
|
|
14670
|
-
compositionId
|
|
14743
|
+
compositionId,
|
|
14744
|
+
defaultProps,
|
|
14745
|
+
originalProps
|
|
14671
14746
|
});
|
|
14672
|
-
return {
|
|
14673
|
-
width,
|
|
14674
|
-
height,
|
|
14675
|
-
fps,
|
|
14676
|
-
durationInFrames,
|
|
14677
|
-
id: compositionId,
|
|
14678
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
14679
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
14680
|
-
defaultCodec: defaultCodec ?? null,
|
|
14681
|
-
defaultOutName: defaultOutName ?? null,
|
|
14682
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
14683
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
14684
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
14685
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
14686
|
-
};
|
|
14687
14747
|
});
|
|
14688
14748
|
}
|
|
14689
|
-
|
|
14749
|
+
return makeVideoConfigWithMetadata({
|
|
14690
14750
|
calculated: calculatedProm,
|
|
14691
14751
|
compositionDurationInFrames,
|
|
14692
14752
|
compositionFps,
|
|
14693
14753
|
compositionHeight,
|
|
14694
14754
|
compositionWidth,
|
|
14695
|
-
compositionId
|
|
14755
|
+
compositionId,
|
|
14756
|
+
defaultProps,
|
|
14757
|
+
originalProps
|
|
14696
14758
|
});
|
|
14697
|
-
|
|
14759
|
+
};
|
|
14760
|
+
var resolveVideoConfig = (params) => {
|
|
14761
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
14762
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
14763
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
14764
|
+
}
|
|
14765
|
+
return resolved.videoConfig;
|
|
14766
|
+
};
|
|
14767
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
14768
|
+
try {
|
|
14698
14769
|
return {
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
defaultPixelFormat: null,
|
|
14707
|
-
defaultProResProfile: null,
|
|
14708
|
-
defaultSampleRate: null
|
|
14770
|
+
type: "success",
|
|
14771
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
14772
|
+
};
|
|
14773
|
+
} catch (err) {
|
|
14774
|
+
return {
|
|
14775
|
+
type: "error",
|
|
14776
|
+
error: err
|
|
14709
14777
|
};
|
|
14710
14778
|
}
|
|
14711
|
-
return {
|
|
14712
|
-
...data,
|
|
14713
|
-
id: compositionId,
|
|
14714
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14715
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
14716
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
14717
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
14718
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
14719
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
14720
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
14721
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
14722
|
-
};
|
|
14723
14779
|
};
|
|
14724
14780
|
var resolveVideoConfigOrCatch = (params) => {
|
|
14725
14781
|
try {
|
|
@@ -14735,7 +14791,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
14735
14791
|
};
|
|
14736
14792
|
}
|
|
14737
14793
|
};
|
|
14738
|
-
var SequenceStackTracesUpdateContext =
|
|
14794
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
14739
14795
|
var getEnvVariables = () => {
|
|
14740
14796
|
if (getRemotionEnvironment().isRendering) {
|
|
14741
14797
|
const param = window.remotion_envVariables;
|
|
@@ -14761,7 +14817,7 @@ var setupEnvVariables = () => {
|
|
|
14761
14817
|
window.process.env[key] = env[key];
|
|
14762
14818
|
});
|
|
14763
14819
|
};
|
|
14764
|
-
var CurrentScaleContext =
|
|
14820
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
14765
14821
|
var PreviewSizeContext = createContext25({
|
|
14766
14822
|
setSize: () => {
|
|
14767
14823
|
return;
|
|
@@ -14785,7 +14841,7 @@ var calculateScale = ({
|
|
|
14785
14841
|
}
|
|
14786
14842
|
return Number(previewSize);
|
|
14787
14843
|
};
|
|
14788
|
-
var PixelDensityContext =
|
|
14844
|
+
var PixelDensityContext = React36.createContext(null);
|
|
14789
14845
|
var getOffthreadVideoSource = ({
|
|
14790
14846
|
src,
|
|
14791
14847
|
transparent,
|
|
@@ -15052,7 +15108,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15052
15108
|
ref: videoRef
|
|
15053
15109
|
});
|
|
15054
15110
|
}, [context.audioContext]);
|
|
15055
|
-
const effectToUse =
|
|
15111
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
15056
15112
|
effectToUse(() => {
|
|
15057
15113
|
return () => {
|
|
15058
15114
|
requestAnimationFrame(() => {
|
|
@@ -15428,20 +15484,20 @@ var OffthreadVideo = ({
|
|
|
15428
15484
|
addSequenceStackTraces(OffthreadVideo);
|
|
15429
15485
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
15430
15486
|
function useRemotionContexts() {
|
|
15431
|
-
const compositionManagerCtx =
|
|
15432
|
-
const timelineContext =
|
|
15433
|
-
const setTimelineContext =
|
|
15434
|
-
const sequenceContext =
|
|
15435
|
-
const nonceContext =
|
|
15436
|
-
const canUseRemotionHooksContext =
|
|
15437
|
-
const preloadContext =
|
|
15438
|
-
const resolveCompositionContext =
|
|
15439
|
-
const renderAssetManagerContext =
|
|
15440
|
-
const sequenceManagerContext =
|
|
15441
|
-
const sequenceManagerRefContext =
|
|
15442
|
-
const visualModePropStatusesRefContext =
|
|
15443
|
-
const bufferManagerContext =
|
|
15444
|
-
const logLevelContext =
|
|
15487
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
15488
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
15489
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
15490
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
15491
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
15492
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
15493
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
15494
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
15495
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
15496
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
15497
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
15498
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15499
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15500
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15445
15501
|
return useMemo37(() => ({
|
|
15446
15502
|
compositionManagerCtx,
|
|
15447
15503
|
timelineContext,
|
|
@@ -15599,6 +15655,7 @@ var Internals = {
|
|
|
15599
15655
|
NonceContext,
|
|
15600
15656
|
resolveVideoConfig,
|
|
15601
15657
|
resolveVideoConfigOrCatch,
|
|
15658
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
15602
15659
|
ResolveCompositionContext,
|
|
15603
15660
|
useResolvedVideoConfig,
|
|
15604
15661
|
resolveCompositionsRef,
|
|
@@ -15615,6 +15672,8 @@ var Internals = {
|
|
|
15615
15672
|
BufferingProvider,
|
|
15616
15673
|
BufferingContextReact,
|
|
15617
15674
|
getComponentsToAddStacksTo,
|
|
15675
|
+
getSequenceComponent,
|
|
15676
|
+
getSingleChildComponent,
|
|
15618
15677
|
CurrentScaleContext,
|
|
15619
15678
|
PixelDensityContext,
|
|
15620
15679
|
PreviewSizeContext,
|
|
@@ -15672,9 +15731,9 @@ var Internals = {
|
|
|
15672
15731
|
fromField
|
|
15673
15732
|
};
|
|
15674
15733
|
var flattenChildren = (children) => {
|
|
15675
|
-
const childrenArray =
|
|
15734
|
+
const childrenArray = React41.Children.toArray(children);
|
|
15676
15735
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15677
|
-
if (child.type ===
|
|
15736
|
+
if (child.type === React41.Fragment) {
|
|
15678
15737
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15679
15738
|
}
|
|
15680
15739
|
flatChildren.push(child);
|
|
@@ -15762,7 +15821,7 @@ var SeriesInner = (props2) => {
|
|
|
15762
15821
|
index: i,
|
|
15763
15822
|
childrenLength: flattenedChildren.length
|
|
15764
15823
|
});
|
|
15765
|
-
return
|
|
15824
|
+
return React42.cloneElement(castedElement, {
|
|
15766
15825
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15767
15826
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15768
15827
|
const {
|
|
@@ -15920,7 +15979,7 @@ var Still = (props2) => {
|
|
|
15920
15979
|
durationInFrames: 1,
|
|
15921
15980
|
fps: 1
|
|
15922
15981
|
};
|
|
15923
|
-
return
|
|
15982
|
+
return React43.createElement(Composition, newProps);
|
|
15924
15983
|
};
|
|
15925
15984
|
addSequenceStackTraces(Still);
|
|
15926
15985
|
var roundTo6Commas = (num) => {
|
|
@@ -16399,6 +16458,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
16399
16458
|
});
|
|
16400
16459
|
Sequence.displayName = "Sequence";
|
|
16401
16460
|
addSequenceStackTraces(Sequence);
|
|
16461
|
+
setSequenceComponent(Sequence);
|
|
16402
16462
|
addSequenceStackTraces(Composition);
|
|
16403
16463
|
addSequenceStackTraces(Folder);
|
|
16404
16464
|
|
|
@@ -19328,12 +19388,12 @@ import React72 from "react";
|
|
|
19328
19388
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19329
19389
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
19330
19390
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19331
|
-
import * as
|
|
19391
|
+
import * as React362 from "react";
|
|
19332
19392
|
import * as ReactDOM4 from "react-dom";
|
|
19333
|
-
import
|
|
19393
|
+
import React11 from "react";
|
|
19334
19394
|
import * as React8 from "react";
|
|
19335
19395
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19336
|
-
import * as
|
|
19396
|
+
import * as React92 from "react";
|
|
19337
19397
|
import * as React10 from "react";
|
|
19338
19398
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
19339
19399
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -19343,15 +19403,15 @@ import * as React162 from "react";
|
|
|
19343
19403
|
import * as React132 from "react";
|
|
19344
19404
|
import * as ReactDOM from "react-dom";
|
|
19345
19405
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
19346
|
-
import * as
|
|
19347
|
-
import * as
|
|
19406
|
+
import * as React142 from "react";
|
|
19407
|
+
import * as React15 from "react";
|
|
19348
19408
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
19349
|
-
import * as
|
|
19409
|
+
import * as React172 from "react";
|
|
19350
19410
|
import * as React18 from "react";
|
|
19351
19411
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
19352
19412
|
import * as React202 from "react";
|
|
19353
|
-
import * as
|
|
19354
|
-
import * as
|
|
19413
|
+
import * as React19 from "react";
|
|
19414
|
+
import * as React242 from "react";
|
|
19355
19415
|
import * as React212 from "react";
|
|
19356
19416
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
19357
19417
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -19369,7 +19429,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
19369
19429
|
import * as React352 from "react";
|
|
19370
19430
|
import * as React312 from "react";
|
|
19371
19431
|
import { useState as useState112 } from "react";
|
|
19372
|
-
import * as
|
|
19432
|
+
import * as React29 from "react";
|
|
19373
19433
|
import * as React302 from "react";
|
|
19374
19434
|
import * as React342 from "react";
|
|
19375
19435
|
import * as React332 from "react";
|
|
@@ -19377,22 +19437,22 @@ import * as React322 from "react";
|
|
|
19377
19437
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
19378
19438
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
19379
19439
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
19380
|
-
import * as
|
|
19440
|
+
import * as React37 from "react";
|
|
19381
19441
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19382
19442
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
19383
19443
|
import * as React49 from "react";
|
|
19384
|
-
import * as
|
|
19444
|
+
import * as React382 from "react";
|
|
19385
19445
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
19386
19446
|
import * as React47 from "react";
|
|
19387
19447
|
import React402 from "react";
|
|
19388
|
-
import * as
|
|
19448
|
+
import * as React39 from "react";
|
|
19389
19449
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
19390
19450
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
19391
19451
|
import React210 from "react";
|
|
19392
19452
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
19393
19453
|
import * as React422 from "react";
|
|
19394
19454
|
import * as React412 from "react";
|
|
19395
|
-
import * as
|
|
19455
|
+
import * as React432 from "react";
|
|
19396
19456
|
import * as ReactDOM5 from "react-dom";
|
|
19397
19457
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
19398
19458
|
import * as React44 from "react";
|
|
@@ -19444,7 +19504,7 @@ function useComposedRefs(...refs) {
|
|
|
19444
19504
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
19445
19505
|
}
|
|
19446
19506
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
19447
|
-
var use =
|
|
19507
|
+
var use = React24[" use ".trim().toString()];
|
|
19448
19508
|
function isPromiseLike(value) {
|
|
19449
19509
|
return typeof value === "object" && value !== null && "then" in value;
|
|
19450
19510
|
}
|
|
@@ -19453,25 +19513,25 @@ function isLazyComponent(element) {
|
|
|
19453
19513
|
}
|
|
19454
19514
|
function createSlot(ownerName) {
|
|
19455
19515
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19456
|
-
const Slot2 =
|
|
19516
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
19457
19517
|
let { children, ...slotProps } = props;
|
|
19458
19518
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19459
19519
|
children = use(children._payload);
|
|
19460
19520
|
}
|
|
19461
|
-
const childrenArray =
|
|
19521
|
+
const childrenArray = React24.Children.toArray(children);
|
|
19462
19522
|
const slottable = childrenArray.find(isSlottable);
|
|
19463
19523
|
if (slottable) {
|
|
19464
19524
|
const newElement = slottable.props.children;
|
|
19465
19525
|
const newChildren = childrenArray.map((child) => {
|
|
19466
19526
|
if (child === slottable) {
|
|
19467
|
-
if (
|
|
19468
|
-
return
|
|
19469
|
-
return
|
|
19527
|
+
if (React24.Children.count(newElement) > 1)
|
|
19528
|
+
return React24.Children.only(null);
|
|
19529
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
19470
19530
|
} else {
|
|
19471
19531
|
return child;
|
|
19472
19532
|
}
|
|
19473
19533
|
});
|
|
19474
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
19534
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
19475
19535
|
}
|
|
19476
19536
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
19477
19537
|
});
|
|
@@ -19480,20 +19540,20 @@ function createSlot(ownerName) {
|
|
|
19480
19540
|
}
|
|
19481
19541
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
19482
19542
|
function createSlotClone(ownerName) {
|
|
19483
|
-
const SlotClone =
|
|
19543
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
19484
19544
|
let { children, ...slotProps } = props;
|
|
19485
19545
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19486
19546
|
children = use(children._payload);
|
|
19487
19547
|
}
|
|
19488
|
-
if (
|
|
19548
|
+
if (React24.isValidElement(children)) {
|
|
19489
19549
|
const childrenRef = getElementRef(children);
|
|
19490
19550
|
const props2 = mergeProps(slotProps, children.props);
|
|
19491
|
-
if (children.type !==
|
|
19551
|
+
if (children.type !== React24.Fragment) {
|
|
19492
19552
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
19493
19553
|
}
|
|
19494
|
-
return
|
|
19554
|
+
return React24.cloneElement(children, props2);
|
|
19495
19555
|
}
|
|
19496
|
-
return
|
|
19556
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
19497
19557
|
});
|
|
19498
19558
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
19499
19559
|
return SlotClone;
|
|
@@ -19509,7 +19569,7 @@ function createSlottable(ownerName) {
|
|
|
19509
19569
|
}
|
|
19510
19570
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
19511
19571
|
function isSlottable(child) {
|
|
19512
|
-
return
|
|
19572
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19513
19573
|
}
|
|
19514
19574
|
function mergeProps(slotProps, childProps) {
|
|
19515
19575
|
const overrideProps = { ...childProps };
|
|
@@ -19566,7 +19626,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
19566
19626
|
return childNode;
|
|
19567
19627
|
};
|
|
19568
19628
|
var useHoverTransforms = (ref, disabled) => {
|
|
19569
|
-
const [state, setState] =
|
|
19629
|
+
const [state, setState] = React33.useState({
|
|
19570
19630
|
progress: 0,
|
|
19571
19631
|
isActive: false
|
|
19572
19632
|
});
|
|
@@ -19578,7 +19638,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19578
19638
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
19579
19639
|
}
|
|
19580
19640
|
}, [disabled, eventTarget]);
|
|
19581
|
-
|
|
19641
|
+
React33.useEffect(() => {
|
|
19582
19642
|
const element = ref.current;
|
|
19583
19643
|
if (!element)
|
|
19584
19644
|
return;
|
|
@@ -19653,8 +19713,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19653
19713
|
return state;
|
|
19654
19714
|
};
|
|
19655
19715
|
var useClickTransforms = (ref) => {
|
|
19656
|
-
const [hoverProgress, setHoverProgress] =
|
|
19657
|
-
|
|
19716
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
19717
|
+
React33.useEffect(() => {
|
|
19658
19718
|
const element = getChildNodeFrom(ref.current);
|
|
19659
19719
|
if (!element) {
|
|
19660
19720
|
return;
|
|
@@ -20230,7 +20290,7 @@ function composeRefs2(...refs) {
|
|
|
20230
20290
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
20231
20291
|
}
|
|
20232
20292
|
function useComposedRefs2(...refs) {
|
|
20233
|
-
return
|
|
20293
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
20234
20294
|
}
|
|
20235
20295
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
20236
20296
|
const { children, ...slotProps } = props;
|
|
@@ -20312,13 +20372,13 @@ function createCollection(name) {
|
|
|
20312
20372
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
20313
20373
|
const CollectionProvider = (props) => {
|
|
20314
20374
|
const { scope, children } = props;
|
|
20315
|
-
const ref =
|
|
20316
|
-
const itemMap =
|
|
20375
|
+
const ref = React11.useRef(null);
|
|
20376
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
20317
20377
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
20318
20378
|
};
|
|
20319
20379
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
20320
20380
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
20321
|
-
const CollectionSlot =
|
|
20381
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20322
20382
|
const { scope, children } = props;
|
|
20323
20383
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
20324
20384
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -20327,12 +20387,12 @@ function createCollection(name) {
|
|
|
20327
20387
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
20328
20388
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
20329
20389
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
20330
|
-
const CollectionItemSlot =
|
|
20390
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20331
20391
|
const { scope, children, ...itemData } = props;
|
|
20332
|
-
const ref =
|
|
20392
|
+
const ref = React11.useRef(null);
|
|
20333
20393
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20334
20394
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
20335
|
-
|
|
20395
|
+
React11.useEffect(() => {
|
|
20336
20396
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
20337
20397
|
return () => void context.itemMap.delete(ref);
|
|
20338
20398
|
});
|
|
@@ -20341,7 +20401,7 @@ function createCollection(name) {
|
|
|
20341
20401
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
20342
20402
|
function useCollection(scope) {
|
|
20343
20403
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
20344
|
-
const getItems =
|
|
20404
|
+
const getItems = React11.useCallback(() => {
|
|
20345
20405
|
const collectionNode = context.collectionRef.current;
|
|
20346
20406
|
if (!collectionNode)
|
|
20347
20407
|
return [];
|
|
@@ -20398,15 +20458,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20398
20458
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
20399
20459
|
}
|
|
20400
20460
|
function useCallbackRef(callback) {
|
|
20401
|
-
const callbackRef =
|
|
20402
|
-
|
|
20461
|
+
const callbackRef = React142.useRef(callback);
|
|
20462
|
+
React142.useEffect(() => {
|
|
20403
20463
|
callbackRef.current = callback;
|
|
20404
20464
|
});
|
|
20405
|
-
return
|
|
20465
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20406
20466
|
}
|
|
20407
20467
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20408
20468
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
20409
|
-
|
|
20469
|
+
React15.useEffect(() => {
|
|
20410
20470
|
const handleKeyDown = (event) => {
|
|
20411
20471
|
if (event.key === "Escape") {
|
|
20412
20472
|
onEscapeKeyDown(event);
|
|
@@ -20613,7 +20673,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
20613
20673
|
}
|
|
20614
20674
|
var count = 0;
|
|
20615
20675
|
function useFocusGuards() {
|
|
20616
|
-
|
|
20676
|
+
React172.useEffect(() => {
|
|
20617
20677
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20618
20678
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20619
20679
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -20848,7 +20908,7 @@ function arrayRemove(array, item) {
|
|
|
20848
20908
|
function removeLinks(items) {
|
|
20849
20909
|
return items.filter((item) => item.tagName !== "A");
|
|
20850
20910
|
}
|
|
20851
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
20911
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
20852
20912
|
var useReactId = React202["useId".toString()] || (() => {
|
|
20853
20913
|
return;
|
|
20854
20914
|
});
|
|
@@ -22700,17 +22760,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
22700
22760
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22701
22761
|
var Popper = (props) => {
|
|
22702
22762
|
const { __scopePopper, children } = props;
|
|
22703
|
-
const [anchor, setAnchor] =
|
|
22763
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
22704
22764
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22705
22765
|
};
|
|
22706
22766
|
Popper.displayName = POPPER_NAME;
|
|
22707
22767
|
var ANCHOR_NAME = "PopperAnchor";
|
|
22708
|
-
var PopperAnchor =
|
|
22768
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
22709
22769
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
22710
22770
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
22711
|
-
const ref =
|
|
22771
|
+
const ref = React242.useRef(null);
|
|
22712
22772
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
22713
|
-
|
|
22773
|
+
React242.useEffect(() => {
|
|
22714
22774
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
22715
22775
|
});
|
|
22716
22776
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -22718,7 +22778,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
22718
22778
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
22719
22779
|
var CONTENT_NAME = "PopperContent";
|
|
22720
22780
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
22721
|
-
var PopperContent =
|
|
22781
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
22722
22782
|
const {
|
|
22723
22783
|
__scopePopper,
|
|
22724
22784
|
side = "bottom",
|
|
@@ -22736,9 +22796,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22736
22796
|
...contentProps
|
|
22737
22797
|
} = props;
|
|
22738
22798
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
22739
|
-
const [content, setContent] =
|
|
22799
|
+
const [content, setContent] = React242.useState(null);
|
|
22740
22800
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
22741
|
-
const [arrow4, setArrow] =
|
|
22801
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
22742
22802
|
const arrowSize = useSize(arrow4);
|
|
22743
22803
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
22744
22804
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -22798,7 +22858,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22798
22858
|
const arrowX = middlewareData.arrow?.x;
|
|
22799
22859
|
const arrowY = middlewareData.arrow?.y;
|
|
22800
22860
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
22801
|
-
const [contentZIndex, setContentZIndex] =
|
|
22861
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
22802
22862
|
useLayoutEffect22(() => {
|
|
22803
22863
|
if (content)
|
|
22804
22864
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -22849,7 +22909,7 @@ var OPPOSITE_SIDE = {
|
|
|
22849
22909
|
bottom: "top",
|
|
22850
22910
|
left: "right"
|
|
22851
22911
|
};
|
|
22852
|
-
var PopperArrow =
|
|
22912
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
22853
22913
|
const { __scopePopper, ...arrowProps } = props;
|
|
22854
22914
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
22855
22915
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -23192,7 +23252,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
23192
23252
|
ref.callback = callback;
|
|
23193
23253
|
return ref.facade;
|
|
23194
23254
|
}
|
|
23195
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
23255
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
23196
23256
|
var currentValues = new WeakMap;
|
|
23197
23257
|
function useMergeRefs(refs, defaultValue) {
|
|
23198
23258
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -23828,9 +23888,9 @@ var Select = (props) => {
|
|
|
23828
23888
|
required
|
|
23829
23889
|
} = props;
|
|
23830
23890
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23831
|
-
const [trigger, setTrigger] =
|
|
23832
|
-
const [valueNode, setValueNode] =
|
|
23833
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
23891
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
23892
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
23893
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
23834
23894
|
const direction = useDirection(dir);
|
|
23835
23895
|
const [open = false, setOpen] = useControllableState({
|
|
23836
23896
|
prop: openProp,
|
|
@@ -23842,9 +23902,9 @@ var Select = (props) => {
|
|
|
23842
23902
|
defaultProp: defaultValue,
|
|
23843
23903
|
onChange: onValueChange
|
|
23844
23904
|
});
|
|
23845
|
-
const triggerPointerDownPosRef =
|
|
23905
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
23846
23906
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
23847
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
23907
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
23848
23908
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
23849
23909
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
23850
23910
|
required,
|
|
@@ -23866,10 +23926,10 @@ var Select = (props) => {
|
|
|
23866
23926
|
children: [
|
|
23867
23927
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
23868
23928
|
scope: props.__scopeSelect,
|
|
23869
|
-
onNativeOptionAdd:
|
|
23929
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
23870
23930
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
23871
23931
|
}, []),
|
|
23872
|
-
onNativeOptionRemove:
|
|
23932
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
23873
23933
|
setNativeOptionsSet((prev) => {
|
|
23874
23934
|
const optionsSet = new Set(prev);
|
|
23875
23935
|
optionsSet.delete(option);
|
|
@@ -23897,7 +23957,7 @@ var Select = (props) => {
|
|
|
23897
23957
|
};
|
|
23898
23958
|
Select.displayName = SELECT_NAME;
|
|
23899
23959
|
var TRIGGER_NAME = "SelectTrigger";
|
|
23900
|
-
var SelectTrigger =
|
|
23960
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
23901
23961
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
23902
23962
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23903
23963
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -23965,7 +24025,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
23965
24025
|
});
|
|
23966
24026
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
23967
24027
|
var VALUE_NAME = "SelectValue";
|
|
23968
|
-
var SelectValue =
|
|
24028
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
23969
24029
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
23970
24030
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
23971
24031
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -23983,7 +24043,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
23983
24043
|
});
|
|
23984
24044
|
SelectValue.displayName = VALUE_NAME;
|
|
23985
24045
|
var ICON_NAME = "SelectIcon";
|
|
23986
|
-
var SelectIcon =
|
|
24046
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
23987
24047
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
23988
24048
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
23989
24049
|
});
|
|
@@ -23994,9 +24054,9 @@ var SelectPortal = (props) => {
|
|
|
23994
24054
|
};
|
|
23995
24055
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
23996
24056
|
var CONTENT_NAME2 = "SelectContent";
|
|
23997
|
-
var SelectContent =
|
|
24057
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
23998
24058
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
23999
|
-
const [fragment, setFragment] =
|
|
24059
|
+
const [fragment, setFragment] = React362.useState();
|
|
24000
24060
|
useLayoutEffect22(() => {
|
|
24001
24061
|
setFragment(new DocumentFragment);
|
|
24002
24062
|
}, []);
|
|
@@ -24010,7 +24070,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
24010
24070
|
var CONTENT_MARGIN = 10;
|
|
24011
24071
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
24012
24072
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
24013
|
-
var SelectContentImpl =
|
|
24073
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24014
24074
|
const {
|
|
24015
24075
|
__scopeSelect,
|
|
24016
24076
|
position = "item-aligned",
|
|
@@ -24030,20 +24090,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24030
24090
|
...contentProps
|
|
24031
24091
|
} = props;
|
|
24032
24092
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24033
|
-
const [content, setContent] =
|
|
24034
|
-
const [viewport, setViewport] =
|
|
24093
|
+
const [content, setContent] = React362.useState(null);
|
|
24094
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
24035
24095
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24036
|
-
const [selectedItem, setSelectedItem] =
|
|
24037
|
-
const [selectedItemText, setSelectedItemText] =
|
|
24096
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
24097
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
24038
24098
|
const getItems = useCollection(__scopeSelect);
|
|
24039
|
-
const [isPositioned, setIsPositioned] =
|
|
24040
|
-
const firstValidItemFoundRef =
|
|
24041
|
-
|
|
24099
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
24100
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
24101
|
+
React362.useEffect(() => {
|
|
24042
24102
|
if (content)
|
|
24043
24103
|
return hideOthers(content);
|
|
24044
24104
|
}, [content]);
|
|
24045
24105
|
useFocusGuards();
|
|
24046
|
-
const focusFirst2 =
|
|
24106
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
24047
24107
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
24048
24108
|
const [lastItem] = restItems.slice(-1);
|
|
24049
24109
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -24060,14 +24120,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24060
24120
|
return;
|
|
24061
24121
|
}
|
|
24062
24122
|
}, [getItems, viewport]);
|
|
24063
|
-
const focusSelectedItem =
|
|
24064
|
-
|
|
24123
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
24124
|
+
React362.useEffect(() => {
|
|
24065
24125
|
if (isPositioned) {
|
|
24066
24126
|
focusSelectedItem();
|
|
24067
24127
|
}
|
|
24068
24128
|
}, [isPositioned, focusSelectedItem]);
|
|
24069
24129
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
24070
|
-
|
|
24130
|
+
React362.useEffect(() => {
|
|
24071
24131
|
if (content) {
|
|
24072
24132
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
24073
24133
|
const handlePointerMove = (event) => {
|
|
@@ -24097,7 +24157,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24097
24157
|
};
|
|
24098
24158
|
}
|
|
24099
24159
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
24100
|
-
|
|
24160
|
+
React362.useEffect(() => {
|
|
24101
24161
|
const close = () => onOpenChange(false);
|
|
24102
24162
|
window.addEventListener("blur", close);
|
|
24103
24163
|
window.addEventListener("resize", close);
|
|
@@ -24114,7 +24174,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24114
24174
|
setTimeout(() => nextItem.ref.current.focus());
|
|
24115
24175
|
}
|
|
24116
24176
|
});
|
|
24117
|
-
const itemRefCallback =
|
|
24177
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24118
24178
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24119
24179
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24120
24180
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24123,8 +24183,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24123
24183
|
firstValidItemFoundRef.current = true;
|
|
24124
24184
|
}
|
|
24125
24185
|
}, [context.value]);
|
|
24126
|
-
const handleItemLeave =
|
|
24127
|
-
const itemTextRefCallback =
|
|
24186
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
24187
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24128
24188
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24129
24189
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24130
24190
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24219,18 +24279,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24219
24279
|
});
|
|
24220
24280
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
24221
24281
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
24222
|
-
var SelectItemAlignedPosition =
|
|
24282
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24223
24283
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
24224
24284
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24225
24285
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
24226
|
-
const [contentWrapper, setContentWrapper] =
|
|
24227
|
-
const [content, setContent] =
|
|
24286
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
24287
|
+
const [content, setContent] = React362.useState(null);
|
|
24228
24288
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24229
24289
|
const getItems = useCollection(__scopeSelect);
|
|
24230
|
-
const shouldExpandOnScrollRef =
|
|
24231
|
-
const shouldRepositionRef =
|
|
24290
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
24291
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
24232
24292
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
24233
|
-
const position =
|
|
24293
|
+
const position = React362.useCallback(() => {
|
|
24234
24294
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
24235
24295
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
24236
24296
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -24311,12 +24371,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24311
24371
|
onPlaced
|
|
24312
24372
|
]);
|
|
24313
24373
|
useLayoutEffect22(() => position(), [position]);
|
|
24314
|
-
const [contentZIndex, setContentZIndex] =
|
|
24374
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
24315
24375
|
useLayoutEffect22(() => {
|
|
24316
24376
|
if (content)
|
|
24317
24377
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
24318
24378
|
}, [content]);
|
|
24319
|
-
const handleScrollButtonChange =
|
|
24379
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
24320
24380
|
if (node && shouldRepositionRef.current === true) {
|
|
24321
24381
|
position();
|
|
24322
24382
|
focusSelectedItem?.();
|
|
@@ -24350,7 +24410,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24350
24410
|
});
|
|
24351
24411
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
24352
24412
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
24353
|
-
var SelectPopperPosition =
|
|
24413
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24354
24414
|
const {
|
|
24355
24415
|
__scopeSelect,
|
|
24356
24416
|
align = "start",
|
|
@@ -24380,12 +24440,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24380
24440
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
24381
24441
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
24382
24442
|
var VIEWPORT_NAME = "SelectViewport";
|
|
24383
|
-
var SelectViewport =
|
|
24443
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
24384
24444
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
24385
24445
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
24386
24446
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
24387
24447
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
24388
|
-
const prevScrollTopRef =
|
|
24448
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
24389
24449
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
24390
24450
|
/* @__PURE__ */ jsx242("style", {
|
|
24391
24451
|
dangerouslySetInnerHTML: {
|
|
@@ -24434,14 +24494,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
24434
24494
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
24435
24495
|
var GROUP_NAME = "SelectGroup";
|
|
24436
24496
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
24437
|
-
var SelectGroup =
|
|
24497
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
24438
24498
|
const { __scopeSelect, ...groupProps } = props;
|
|
24439
24499
|
const groupId = useId();
|
|
24440
24500
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
24441
24501
|
});
|
|
24442
24502
|
SelectGroup.displayName = GROUP_NAME;
|
|
24443
24503
|
var LABEL_NAME = "SelectLabel";
|
|
24444
|
-
var SelectLabel =
|
|
24504
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
24445
24505
|
const { __scopeSelect, ...labelProps } = props;
|
|
24446
24506
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
24447
24507
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -24449,7 +24509,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
24449
24509
|
SelectLabel.displayName = LABEL_NAME;
|
|
24450
24510
|
var ITEM_NAME = "SelectItem";
|
|
24451
24511
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
24452
|
-
var SelectItem =
|
|
24512
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
24453
24513
|
const {
|
|
24454
24514
|
__scopeSelect,
|
|
24455
24515
|
value,
|
|
@@ -24460,8 +24520,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24460
24520
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
24461
24521
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
24462
24522
|
const isSelected = context.value === value;
|
|
24463
|
-
const [textValue, setTextValue] =
|
|
24464
|
-
const [isFocused, setIsFocused] =
|
|
24523
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
24524
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
24465
24525
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
24466
24526
|
const textId = useId();
|
|
24467
24527
|
const handleSelect = () => {
|
|
@@ -24479,7 +24539,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24479
24539
|
disabled,
|
|
24480
24540
|
textId,
|
|
24481
24541
|
isSelected,
|
|
24482
|
-
onItemTextChange:
|
|
24542
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
24483
24543
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
24484
24544
|
}, []),
|
|
24485
24545
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -24528,16 +24588,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24528
24588
|
});
|
|
24529
24589
|
SelectItem.displayName = ITEM_NAME;
|
|
24530
24590
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
24531
|
-
var SelectItemText =
|
|
24591
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
24532
24592
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
24533
24593
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24534
24594
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24535
24595
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24536
24596
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24537
|
-
const [itemTextNode, setItemTextNode] =
|
|
24597
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
24538
24598
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
24539
24599
|
const textContent = itemTextNode?.textContent;
|
|
24540
|
-
const nativeOption =
|
|
24600
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
24541
24601
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
24542
24602
|
useLayoutEffect22(() => {
|
|
24543
24603
|
onNativeOptionAdd(nativeOption);
|
|
@@ -24550,17 +24610,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
24550
24610
|
});
|
|
24551
24611
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
24552
24612
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
24553
|
-
var SelectItemIndicator =
|
|
24613
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
24554
24614
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
24555
24615
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
24556
24616
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
24557
24617
|
});
|
|
24558
24618
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
24559
24619
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
24560
|
-
var SelectScrollUpButton =
|
|
24620
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
24561
24621
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24562
24622
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24563
|
-
const [canScrollUp, setCanScrollUp] =
|
|
24623
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
24564
24624
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24565
24625
|
useLayoutEffect22(() => {
|
|
24566
24626
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24588,10 +24648,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24588
24648
|
});
|
|
24589
24649
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
24590
24650
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
24591
|
-
var SelectScrollDownButton =
|
|
24651
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
24592
24652
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24593
24653
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24594
|
-
const [canScrollDown, setCanScrollDown] =
|
|
24654
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
24595
24655
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24596
24656
|
useLayoutEffect22(() => {
|
|
24597
24657
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24619,18 +24679,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24619
24679
|
}) : null;
|
|
24620
24680
|
});
|
|
24621
24681
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
24622
|
-
var SelectScrollButtonImpl =
|
|
24682
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24623
24683
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
24624
24684
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
24625
|
-
const autoScrollTimerRef =
|
|
24685
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
24626
24686
|
const getItems = useCollection(__scopeSelect);
|
|
24627
|
-
const clearAutoScrollTimer =
|
|
24687
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
24628
24688
|
if (autoScrollTimerRef.current !== null) {
|
|
24629
24689
|
window.clearInterval(autoScrollTimerRef.current);
|
|
24630
24690
|
autoScrollTimerRef.current = null;
|
|
24631
24691
|
}
|
|
24632
24692
|
}, []);
|
|
24633
|
-
|
|
24693
|
+
React362.useEffect(() => {
|
|
24634
24694
|
return () => clearAutoScrollTimer();
|
|
24635
24695
|
}, [clearAutoScrollTimer]);
|
|
24636
24696
|
useLayoutEffect22(() => {
|
|
@@ -24659,13 +24719,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24659
24719
|
});
|
|
24660
24720
|
});
|
|
24661
24721
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
24662
|
-
var SelectSeparator =
|
|
24722
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
24663
24723
|
const { __scopeSelect, ...separatorProps } = props;
|
|
24664
24724
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
24665
24725
|
});
|
|
24666
24726
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
24667
24727
|
var ARROW_NAME2 = "SelectArrow";
|
|
24668
|
-
var SelectArrow =
|
|
24728
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
24669
24729
|
const { __scopeSelect, ...arrowProps } = props;
|
|
24670
24730
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24671
24731
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -24676,12 +24736,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
24676
24736
|
function shouldShowPlaceholder(value) {
|
|
24677
24737
|
return value === "" || value === undefined;
|
|
24678
24738
|
}
|
|
24679
|
-
var BubbleSelect =
|
|
24739
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
24680
24740
|
const { value, ...selectProps } = props;
|
|
24681
|
-
const ref =
|
|
24741
|
+
const ref = React362.useRef(null);
|
|
24682
24742
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24683
24743
|
const prevValue = usePrevious(value);
|
|
24684
|
-
|
|
24744
|
+
React362.useEffect(() => {
|
|
24685
24745
|
const select = ref.current;
|
|
24686
24746
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
24687
24747
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -24697,9 +24757,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
24697
24757
|
BubbleSelect.displayName = "BubbleSelect";
|
|
24698
24758
|
function useTypeaheadSearch(onSearchChange) {
|
|
24699
24759
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
24700
|
-
const searchRef =
|
|
24701
|
-
const timerRef =
|
|
24702
|
-
const handleTypeaheadSearch =
|
|
24760
|
+
const searchRef = React362.useRef("");
|
|
24761
|
+
const timerRef = React362.useRef(0);
|
|
24762
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
24703
24763
|
const search = searchRef.current + key;
|
|
24704
24764
|
handleSearchChange(search);
|
|
24705
24765
|
(function updateSearch(value) {
|
|
@@ -24709,11 +24769,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
24709
24769
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
24710
24770
|
})(search);
|
|
24711
24771
|
}, [handleSearchChange]);
|
|
24712
|
-
const resetTypeahead =
|
|
24772
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
24713
24773
|
searchRef.current = "";
|
|
24714
24774
|
window.clearTimeout(timerRef.current);
|
|
24715
24775
|
}, []);
|
|
24716
|
-
|
|
24776
|
+
React362.useEffect(() => {
|
|
24717
24777
|
return () => window.clearTimeout(timerRef.current);
|
|
24718
24778
|
}, []);
|
|
24719
24779
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -24802,7 +24862,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
24802
24862
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
24803
24863
|
var Select2 = Root222;
|
|
24804
24864
|
var SelectValue2 = Value;
|
|
24805
|
-
var SelectTrigger2 =
|
|
24865
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
24806
24866
|
ref,
|
|
24807
24867
|
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),
|
|
24808
24868
|
...props,
|
|
@@ -24817,7 +24877,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
24817
24877
|
]
|
|
24818
24878
|
}));
|
|
24819
24879
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
24820
|
-
var SelectScrollUpButton2 =
|
|
24880
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
24821
24881
|
ref,
|
|
24822
24882
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24823
24883
|
...props,
|
|
@@ -24826,7 +24886,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
24826
24886
|
})
|
|
24827
24887
|
}));
|
|
24828
24888
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
24829
|
-
var SelectScrollDownButton2 =
|
|
24889
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
24830
24890
|
ref,
|
|
24831
24891
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24832
24892
|
...props,
|
|
@@ -24835,7 +24895,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
24835
24895
|
})
|
|
24836
24896
|
}));
|
|
24837
24897
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
24838
|
-
var SelectContent2 =
|
|
24898
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
24839
24899
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
24840
24900
|
ref,
|
|
24841
24901
|
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),
|
|
@@ -24852,13 +24912,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
24852
24912
|
})
|
|
24853
24913
|
}));
|
|
24854
24914
|
SelectContent2.displayName = Content2.displayName;
|
|
24855
|
-
var SelectLabel2 =
|
|
24915
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
24856
24916
|
ref,
|
|
24857
24917
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
24858
24918
|
...props
|
|
24859
24919
|
}));
|
|
24860
24920
|
SelectLabel2.displayName = Label.displayName;
|
|
24861
|
-
var SelectItem2 =
|
|
24921
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
24862
24922
|
ref,
|
|
24863
24923
|
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),
|
|
24864
24924
|
...props,
|
|
@@ -24877,7 +24937,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
24877
24937
|
]
|
|
24878
24938
|
}));
|
|
24879
24939
|
SelectItem2.displayName = Item.displayName;
|
|
24880
|
-
var SelectSeparator2 =
|
|
24940
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
24881
24941
|
ref,
|
|
24882
24942
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
24883
24943
|
...props
|
|
@@ -24910,19 +24970,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
24910
24970
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
24911
24971
|
let defaultContexts = [];
|
|
24912
24972
|
function createContext32(rootComponentName, defaultContext) {
|
|
24913
|
-
const BaseContext =
|
|
24973
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
24914
24974
|
const index2 = defaultContexts.length;
|
|
24915
24975
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
24916
24976
|
const Provider = (props) => {
|
|
24917
24977
|
const { scope, children, ...context } = props;
|
|
24918
24978
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24919
|
-
const value =
|
|
24979
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
24920
24980
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
24921
24981
|
};
|
|
24922
24982
|
Provider.displayName = rootComponentName + "Provider";
|
|
24923
24983
|
function useContext222(consumerName, scope) {
|
|
24924
24984
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24925
|
-
const context =
|
|
24985
|
+
const context = React382.useContext(Context);
|
|
24926
24986
|
if (context)
|
|
24927
24987
|
return context;
|
|
24928
24988
|
if (defaultContext !== undefined)
|
|
@@ -24933,11 +24993,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
24933
24993
|
}
|
|
24934
24994
|
const createScope = () => {
|
|
24935
24995
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
24936
|
-
return
|
|
24996
|
+
return React382.createContext(defaultContext);
|
|
24937
24997
|
});
|
|
24938
24998
|
return function useScope(scope) {
|
|
24939
24999
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
24940
|
-
return
|
|
25000
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
24941
25001
|
};
|
|
24942
25002
|
};
|
|
24943
25003
|
createScope.scopeName = scopeName;
|
|
@@ -24958,7 +25018,7 @@ function composeContextScopes2(...scopes) {
|
|
|
24958
25018
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
24959
25019
|
return { ...nextScopes2, ...currentScope };
|
|
24960
25020
|
}, {});
|
|
24961
|
-
return
|
|
25021
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
24962
25022
|
};
|
|
24963
25023
|
};
|
|
24964
25024
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -24966,22 +25026,22 @@ function composeContextScopes2(...scopes) {
|
|
|
24966
25026
|
}
|
|
24967
25027
|
function createSlot2(ownerName) {
|
|
24968
25028
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
24969
|
-
const Slot22 =
|
|
25029
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
24970
25030
|
const { children, ...slotProps } = props;
|
|
24971
|
-
const childrenArray =
|
|
25031
|
+
const childrenArray = React39.Children.toArray(children);
|
|
24972
25032
|
const slottable = childrenArray.find(isSlottable3);
|
|
24973
25033
|
if (slottable) {
|
|
24974
25034
|
const newElement = slottable.props.children;
|
|
24975
25035
|
const newChildren = childrenArray.map((child) => {
|
|
24976
25036
|
if (child === slottable) {
|
|
24977
|
-
if (
|
|
24978
|
-
return
|
|
24979
|
-
return
|
|
25037
|
+
if (React39.Children.count(newElement) > 1)
|
|
25038
|
+
return React39.Children.only(null);
|
|
25039
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
24980
25040
|
} else {
|
|
24981
25041
|
return child;
|
|
24982
25042
|
}
|
|
24983
25043
|
});
|
|
24984
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
25044
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
24985
25045
|
}
|
|
24986
25046
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
24987
25047
|
});
|
|
@@ -24989,24 +25049,24 @@ function createSlot2(ownerName) {
|
|
|
24989
25049
|
return Slot22;
|
|
24990
25050
|
}
|
|
24991
25051
|
function createSlotClone2(ownerName) {
|
|
24992
|
-
const SlotClone2 =
|
|
25052
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
24993
25053
|
const { children, ...slotProps } = props;
|
|
24994
|
-
if (
|
|
25054
|
+
if (React39.isValidElement(children)) {
|
|
24995
25055
|
const childrenRef = getElementRef3(children);
|
|
24996
25056
|
const props2 = mergeProps3(slotProps, children.props);
|
|
24997
|
-
if (children.type !==
|
|
25057
|
+
if (children.type !== React39.Fragment) {
|
|
24998
25058
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
24999
25059
|
}
|
|
25000
|
-
return
|
|
25060
|
+
return React39.cloneElement(children, props2);
|
|
25001
25061
|
}
|
|
25002
|
-
return
|
|
25062
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
25003
25063
|
});
|
|
25004
25064
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
25005
25065
|
return SlotClone2;
|
|
25006
25066
|
}
|
|
25007
25067
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
25008
25068
|
function isSlottable3(child) {
|
|
25009
|
-
return
|
|
25069
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
25010
25070
|
}
|
|
25011
25071
|
function mergeProps3(slotProps, childProps) {
|
|
25012
25072
|
const overrideProps = { ...childProps };
|
|
@@ -25434,7 +25494,7 @@ var NODES2 = [
|
|
|
25434
25494
|
];
|
|
25435
25495
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
25436
25496
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
25437
|
-
const Node2 =
|
|
25497
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
25438
25498
|
const { asChild, ...primitiveProps } = props;
|
|
25439
25499
|
const Comp = asChild ? Slot3 : node;
|
|
25440
25500
|
if (typeof window !== "undefined") {
|