@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/homepage/Pricing.js
CHANGED
|
@@ -36,7 +36,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
36
36
|
import { useMemo as useMemo52 } from "react";
|
|
37
37
|
|
|
38
38
|
// ../design/dist/esm/index.mjs
|
|
39
|
-
import * as
|
|
39
|
+
import * as React24 from "react";
|
|
40
40
|
import * as React3 from "react";
|
|
41
41
|
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
42
42
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -1381,7 +1381,7 @@ var getDefaultConfig = () => {
|
|
|
1381
1381
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1382
1382
|
|
|
1383
1383
|
// ../design/dist/esm/index.mjs
|
|
1384
|
-
import
|
|
1384
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1385
1385
|
|
|
1386
1386
|
// ../paths/dist/esm/index.mjs
|
|
1387
1387
|
var cutLInstruction = ({
|
|
@@ -4174,6 +4174,7 @@ import * as React6 from "react";
|
|
|
4174
4174
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
4175
4175
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
4176
4176
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4177
|
+
import React9 from "react";
|
|
4177
4178
|
import {
|
|
4178
4179
|
forwardRef as forwardRef3,
|
|
4179
4180
|
useCallback as useCallback6,
|
|
@@ -4199,11 +4200,11 @@ import { useContext as useContext13 } from "react";
|
|
|
4199
4200
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4200
4201
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4201
4202
|
import { createContext as createContext14 } from "react";
|
|
4202
|
-
import
|
|
4203
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4203
4204
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4204
|
-
import
|
|
4205
|
+
import React13, { createContext as createContext15 } from "react";
|
|
4205
4206
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4206
|
-
import
|
|
4207
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
4207
4208
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
4208
4209
|
import { createContext as createContext16 } from "react";
|
|
4209
4210
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4215,7 +4216,7 @@ import {
|
|
|
4215
4216
|
useRef as useRef9,
|
|
4216
4217
|
useState as useState6
|
|
4217
4218
|
} from "react";
|
|
4218
|
-
import
|
|
4219
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4219
4220
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
4220
4221
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4221
4222
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -4231,7 +4232,7 @@ import {
|
|
|
4231
4232
|
} from "react";
|
|
4232
4233
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4233
4234
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
4234
|
-
import
|
|
4235
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
4235
4236
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4236
4237
|
import { useContext as useContext19 } from "react";
|
|
4237
4238
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -4239,7 +4240,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
4239
4240
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
4240
4241
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4241
4242
|
import { useCallback as useCallback13 } from "react";
|
|
4242
|
-
import
|
|
4243
|
+
import React23, {
|
|
4243
4244
|
forwardRef as forwardRef5,
|
|
4244
4245
|
useContext as useContext28,
|
|
4245
4246
|
useEffect as useEffect14,
|
|
@@ -4249,7 +4250,7 @@ import React22, {
|
|
|
4249
4250
|
useState as useState14
|
|
4250
4251
|
} from "react";
|
|
4251
4252
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4252
|
-
import
|
|
4253
|
+
import React20, {
|
|
4253
4254
|
createContext as createContext21,
|
|
4254
4255
|
createRef as createRef2,
|
|
4255
4256
|
useCallback as useCallback9,
|
|
@@ -4273,7 +4274,7 @@ import {
|
|
|
4273
4274
|
} from "react";
|
|
4274
4275
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
4275
4276
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
4276
|
-
import
|
|
4277
|
+
import React21, {
|
|
4277
4278
|
useCallback as useCallback10,
|
|
4278
4279
|
useContext as useContext24,
|
|
4279
4280
|
useEffect as useEffect9,
|
|
@@ -4283,7 +4284,7 @@ import React20, {
|
|
|
4283
4284
|
useState as useState12
|
|
4284
4285
|
} from "react";
|
|
4285
4286
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4286
|
-
import
|
|
4287
|
+
import React22 from "react";
|
|
4287
4288
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4288
4289
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4289
4290
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4341,10 +4342,10 @@ import {
|
|
|
4341
4342
|
useState as useState18
|
|
4342
4343
|
} from "react";
|
|
4343
4344
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4344
|
-
import
|
|
4345
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4345
4346
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4346
4347
|
import { createRef as createRef3 } from "react";
|
|
4347
|
-
import
|
|
4348
|
+
import React31 from "react";
|
|
4348
4349
|
import {
|
|
4349
4350
|
useCallback as useCallback21,
|
|
4350
4351
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -4353,14 +4354,14 @@ import {
|
|
|
4353
4354
|
useState as useState19
|
|
4354
4355
|
} from "react";
|
|
4355
4356
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4356
|
-
import
|
|
4357
|
+
import React32 from "react";
|
|
4357
4358
|
import { useMemo as useMemo34 } from "react";
|
|
4358
4359
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
4359
4360
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4360
4361
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4361
|
-
import
|
|
4362
|
-
import
|
|
4363
|
-
import
|
|
4362
|
+
import React34 from "react";
|
|
4363
|
+
import React35, { createContext as createContext25 } from "react";
|
|
4364
|
+
import React36, { useContext as useContext35 } from "react";
|
|
4364
4365
|
import { useCallback as useCallback24 } from "react";
|
|
4365
4366
|
import {
|
|
4366
4367
|
useCallback as useCallback22,
|
|
@@ -4371,7 +4372,7 @@ import {
|
|
|
4371
4372
|
useState as useState20
|
|
4372
4373
|
} from "react";
|
|
4373
4374
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4374
|
-
import
|
|
4375
|
+
import React38, {
|
|
4375
4376
|
forwardRef as forwardRef13,
|
|
4376
4377
|
useCallback as useCallback23,
|
|
4377
4378
|
useContext as useContext37,
|
|
@@ -4384,15 +4385,15 @@ import React37, {
|
|
|
4384
4385
|
import { useEffect as useEffect18 } from "react";
|
|
4385
4386
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4386
4387
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4387
|
-
import
|
|
4388
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
4388
4389
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4389
|
-
import
|
|
4390
|
+
import React42, {
|
|
4390
4391
|
forwardRef as forwardRef14,
|
|
4391
4392
|
useMemo as useMemo38
|
|
4392
4393
|
} from "react";
|
|
4393
|
-
import
|
|
4394
|
+
import React41 from "react";
|
|
4394
4395
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4395
|
-
import
|
|
4396
|
+
import React43 from "react";
|
|
4396
4397
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
4397
4398
|
import {
|
|
4398
4399
|
forwardRef as forwardRef15,
|
|
@@ -5054,6 +5055,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5054
5055
|
if (currentCompositionMetadata) {
|
|
5055
5056
|
return {
|
|
5056
5057
|
type: "success",
|
|
5058
|
+
metadataSource: null,
|
|
5057
5059
|
result: {
|
|
5058
5060
|
...currentCompositionMetadata,
|
|
5059
5061
|
id: composition.id,
|
|
@@ -5071,6 +5073,7 @@ var useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
5071
5073
|
validateDimension(composition.height, "height", `in <Composition id="${composition.id}">`);
|
|
5072
5074
|
return {
|
|
5073
5075
|
type: "success",
|
|
5076
|
+
metadataSource: null,
|
|
5074
5077
|
result: {
|
|
5075
5078
|
width: composition.width,
|
|
5076
5079
|
height: composition.height,
|
|
@@ -5470,6 +5473,7 @@ var InnerComposition = ({
|
|
|
5470
5473
|
}
|
|
5471
5474
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
5472
5475
|
const stack = compProps.stack ?? null;
|
|
5476
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
5473
5477
|
useEffect2(() => {
|
|
5474
5478
|
if (!id) {
|
|
5475
5479
|
throw new Error("No id for composition passed.");
|
|
@@ -5487,6 +5491,7 @@ var InnerComposition = ({
|
|
|
5487
5491
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
5488
5492
|
nonce: nonce.get(),
|
|
5489
5493
|
parentFolderName: parentName,
|
|
5494
|
+
componentFromProps,
|
|
5490
5495
|
schema: schema ?? null,
|
|
5491
5496
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
5492
5497
|
stack
|
|
@@ -5505,6 +5510,7 @@ var InnerComposition = ({
|
|
|
5505
5510
|
width,
|
|
5506
5511
|
nonce,
|
|
5507
5512
|
parentName,
|
|
5513
|
+
componentFromProps,
|
|
5508
5514
|
schema,
|
|
5509
5515
|
compProps.calculateMetadata,
|
|
5510
5516
|
stack,
|
|
@@ -5563,11 +5569,30 @@ var Composition = (props) => {
|
|
|
5563
5569
|
});
|
|
5564
5570
|
};
|
|
5565
5571
|
var componentsToAddStacksTo = [];
|
|
5572
|
+
var sequenceComponent = null;
|
|
5566
5573
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
5567
5574
|
var addSequenceStackTraces = (component) => {
|
|
5568
5575
|
componentsToAddStacksTo.push(component);
|
|
5569
5576
|
};
|
|
5570
|
-
var
|
|
5577
|
+
var setSequenceComponent = (component) => {
|
|
5578
|
+
sequenceComponent = component;
|
|
5579
|
+
};
|
|
5580
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
5581
|
+
var getSingleChildComponent = (children) => {
|
|
5582
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
5583
|
+
if (mountedChildren.length !== 1) {
|
|
5584
|
+
return null;
|
|
5585
|
+
}
|
|
5586
|
+
const child = mountedChildren[0];
|
|
5587
|
+
if (!React9.isValidElement(child)) {
|
|
5588
|
+
return null;
|
|
5589
|
+
}
|
|
5590
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
5591
|
+
return null;
|
|
5592
|
+
}
|
|
5593
|
+
return child.type;
|
|
5594
|
+
};
|
|
5595
|
+
var VERSION = "4.0.493";
|
|
5571
5596
|
var checkMultipleRemotionVersions = () => {
|
|
5572
5597
|
if (typeof globalThis === "undefined") {
|
|
5573
5598
|
return;
|
|
@@ -6167,7 +6192,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6167
6192
|
var PremountContext = createContext14({
|
|
6168
6193
|
premountFramesRemaining: 0
|
|
6169
6194
|
});
|
|
6170
|
-
var SequenceManager =
|
|
6195
|
+
var SequenceManager = React12.createContext({
|
|
6171
6196
|
registerSequence: () => {
|
|
6172
6197
|
throw new Error("SequenceManagerContext not initialized");
|
|
6173
6198
|
},
|
|
@@ -6176,19 +6201,19 @@ var SequenceManager = React11.createContext({
|
|
|
6176
6201
|
},
|
|
6177
6202
|
sequences: []
|
|
6178
6203
|
});
|
|
6179
|
-
var SequenceManagerRefContext =
|
|
6204
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
6180
6205
|
current: []
|
|
6181
6206
|
});
|
|
6182
6207
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
6183
6208
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
6184
6209
|
};
|
|
6185
|
-
var VisualModePropStatusesContext =
|
|
6210
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
6186
6211
|
propStatuses: {}
|
|
6187
6212
|
});
|
|
6188
|
-
var VisualModePropStatusesRefContext =
|
|
6213
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
6189
6214
|
current: {}
|
|
6190
6215
|
});
|
|
6191
|
-
var VisualModeDragOverridesContext =
|
|
6216
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
6192
6217
|
getDragOverrides: () => {
|
|
6193
6218
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6194
6219
|
},
|
|
@@ -6196,7 +6221,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
6196
6221
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6197
6222
|
}
|
|
6198
6223
|
});
|
|
6199
|
-
var VisualModeSettersContext =
|
|
6224
|
+
var VisualModeSettersContext = React12.createContext({
|
|
6200
6225
|
setDragOverrides: () => {
|
|
6201
6226
|
throw new Error("VisualModeSettersContext not initialized");
|
|
6202
6227
|
},
|
|
@@ -6360,7 +6385,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
6360
6385
|
});
|
|
6361
6386
|
};
|
|
6362
6387
|
var useRequireToBeInsideSeries = () => {
|
|
6363
|
-
const isInsideSeries =
|
|
6388
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
6364
6389
|
if (!isInsideSeries) {
|
|
6365
6390
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6366
6391
|
}
|
|
@@ -8429,6 +8454,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
8429
8454
|
shouldResortToDefaultValueIfUndefined: false
|
|
8430
8455
|
});
|
|
8431
8456
|
}
|
|
8457
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
8458
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
8459
|
+
}
|
|
8432
8460
|
if (value === undefined) {
|
|
8433
8461
|
propsToDelete.add(key);
|
|
8434
8462
|
}
|
|
@@ -8527,7 +8555,7 @@ var withInteractivitySchema = ({
|
|
|
8527
8555
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8528
8556
|
const env = useRemotionEnvironment();
|
|
8529
8557
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8530
|
-
return
|
|
8558
|
+
return React14.createElement(Component, {
|
|
8531
8559
|
...props,
|
|
8532
8560
|
controls: null,
|
|
8533
8561
|
ref
|
|
@@ -8538,7 +8566,7 @@ var withInteractivitySchema = ({
|
|
|
8538
8566
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8539
8567
|
const frame = useCurrentFrame();
|
|
8540
8568
|
if (props.controls) {
|
|
8541
|
-
return
|
|
8569
|
+
return React14.createElement(Component, {
|
|
8542
8570
|
...props,
|
|
8543
8571
|
ref
|
|
8544
8572
|
});
|
|
@@ -8596,7 +8624,7 @@ var withInteractivitySchema = ({
|
|
|
8596
8624
|
schemaKeys: activeKeys,
|
|
8597
8625
|
propsToDelete
|
|
8598
8626
|
});
|
|
8599
|
-
return
|
|
8627
|
+
return React14.createElement(Component, {
|
|
8600
8628
|
...mergedProps,
|
|
8601
8629
|
controls,
|
|
8602
8630
|
ref
|
|
@@ -8622,6 +8650,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8622
8650
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8623
8651
|
_remotionInternalStack: stack,
|
|
8624
8652
|
_remotionInternalDocumentationLink: documentationLink,
|
|
8653
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
8625
8654
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8626
8655
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8627
8656
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8768,7 +8797,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8768
8797
|
getStack: () => stackRef.current,
|
|
8769
8798
|
refForOutline: refForOutline ?? null,
|
|
8770
8799
|
isInsideSeries,
|
|
8771
|
-
frozenFrame: registeredFrozenFrame
|
|
8800
|
+
frozenFrame: registeredFrozenFrame,
|
|
8801
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8772
8802
|
});
|
|
8773
8803
|
} else {
|
|
8774
8804
|
registerSequence({
|
|
@@ -8798,7 +8828,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8798
8828
|
refForOutline: refForOutline ?? null,
|
|
8799
8829
|
isInsideSeries,
|
|
8800
8830
|
frozenFrame: registeredFrozenFrame,
|
|
8801
|
-
frozenMediaFrame
|
|
8831
|
+
frozenMediaFrame,
|
|
8832
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8802
8833
|
});
|
|
8803
8834
|
}
|
|
8804
8835
|
return () => {
|
|
@@ -8825,7 +8856,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8825
8856
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
8826
8857
|
refForOutline: refForOutline ?? null,
|
|
8827
8858
|
isInsideSeries,
|
|
8828
|
-
frozenFrame: registeredFrozenFrame
|
|
8859
|
+
frozenFrame: registeredFrozenFrame,
|
|
8860
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8829
8861
|
});
|
|
8830
8862
|
return () => {
|
|
8831
8863
|
unregisterSequence(id);
|
|
@@ -8858,7 +8890,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8858
8890
|
registeredFrozenFrame,
|
|
8859
8891
|
startMediaFrom,
|
|
8860
8892
|
mediaFrameAtSequenceZero,
|
|
8861
|
-
frozenMediaFrame
|
|
8893
|
+
frozenMediaFrame,
|
|
8894
|
+
singleChildComponent
|
|
8862
8895
|
]);
|
|
8863
8896
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
8864
8897
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -9360,7 +9393,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9360
9393
|
...props
|
|
9361
9394
|
});
|
|
9362
9395
|
};
|
|
9363
|
-
var Canvas =
|
|
9396
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9364
9397
|
var CACHE_SIZE = 5;
|
|
9365
9398
|
var getActualTime = ({
|
|
9366
9399
|
loopBehavior,
|
|
@@ -9521,6 +9554,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9521
9554
|
return new URL(src, window.origin).href;
|
|
9522
9555
|
};
|
|
9523
9556
|
var animatedImageSchema = {
|
|
9557
|
+
src: {
|
|
9558
|
+
type: "asset",
|
|
9559
|
+
default: undefined,
|
|
9560
|
+
description: "Source",
|
|
9561
|
+
keyframable: false
|
|
9562
|
+
},
|
|
9524
9563
|
...baseSchema,
|
|
9525
9564
|
playbackRate: {
|
|
9526
9565
|
type: "number",
|
|
@@ -9938,7 +9977,7 @@ var calculateMediaDuration = ({
|
|
|
9938
9977
|
};
|
|
9939
9978
|
var LoopContext = createContext18(null);
|
|
9940
9979
|
var useLoop = () => {
|
|
9941
|
-
return
|
|
9980
|
+
return React17.useContext(LoopContext);
|
|
9942
9981
|
};
|
|
9943
9982
|
var Loop = ({
|
|
9944
9983
|
durationInFrames,
|
|
@@ -10789,7 +10828,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10789
10828
|
};
|
|
10790
10829
|
});
|
|
10791
10830
|
}, [audioContext, numberOfAudioTags]);
|
|
10792
|
-
const effectToUse =
|
|
10831
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10793
10832
|
effectToUse(() => {
|
|
10794
10833
|
return () => {
|
|
10795
10834
|
requestAnimationFrame(() => {
|
|
@@ -10959,7 +10998,7 @@ var useSharedAudio = ({
|
|
|
10959
10998
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10960
10999
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
10961
11000
|
}
|
|
10962
|
-
const el =
|
|
11001
|
+
const el = React20.createRef();
|
|
10963
11002
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
10964
11003
|
audioContext: audioCtx.audioContext,
|
|
10965
11004
|
ref: el
|
|
@@ -10978,7 +11017,7 @@ var useSharedAudio = ({
|
|
|
10978
11017
|
}
|
|
10979
11018
|
};
|
|
10980
11019
|
});
|
|
10981
|
-
const effectToUse =
|
|
11020
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10982
11021
|
if (typeof document !== "undefined") {
|
|
10983
11022
|
effectToUse(() => {
|
|
10984
11023
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -11530,7 +11569,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11530
11569
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11531
11570
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11532
11571
|
};
|
|
11533
|
-
var BufferingContextReact =
|
|
11572
|
+
var BufferingContextReact = React21.createContext(null);
|
|
11534
11573
|
var BufferingProvider = ({ children }) => {
|
|
11535
11574
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
11536
11575
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -11743,7 +11782,7 @@ var getMediaSyncAction = (input) => {
|
|
|
11743
11782
|
return { type: "none" };
|
|
11744
11783
|
};
|
|
11745
11784
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11746
|
-
const lastUpdate =
|
|
11785
|
+
const lastUpdate = React22.useRef({
|
|
11747
11786
|
time: mediaRef.current?.currentTime ?? 0,
|
|
11748
11787
|
lastUpdate: performance.now()
|
|
11749
11788
|
});
|
|
@@ -12496,7 +12535,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12496
12535
|
volume: userPreferredVolume,
|
|
12497
12536
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
12498
12537
|
});
|
|
12499
|
-
const effectToUse =
|
|
12538
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
12500
12539
|
effectToUse(() => {
|
|
12501
12540
|
return () => {
|
|
12502
12541
|
requestAnimationFrame(() => {
|
|
@@ -14042,6 +14081,12 @@ var NativeImgInner = ({
|
|
|
14042
14081
|
};
|
|
14043
14082
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
14044
14083
|
var imgSchema = {
|
|
14084
|
+
src: {
|
|
14085
|
+
type: "asset",
|
|
14086
|
+
default: undefined,
|
|
14087
|
+
description: "Source",
|
|
14088
|
+
keyframable: false
|
|
14089
|
+
},
|
|
14045
14090
|
...baseSchema,
|
|
14046
14091
|
...transformSchema
|
|
14047
14092
|
};
|
|
@@ -14252,7 +14297,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14252
14297
|
_remotionInternalStack: stack,
|
|
14253
14298
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
14254
14299
|
outlineRef: refForOutline,
|
|
14255
|
-
children:
|
|
14300
|
+
children: React30.createElement(tag, {
|
|
14256
14301
|
...props2,
|
|
14257
14302
|
ref: callbackRef
|
|
14258
14303
|
})
|
|
@@ -14316,7 +14361,7 @@ var Interactive = {
|
|
|
14316
14361
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
14317
14362
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
14318
14363
|
};
|
|
14319
|
-
var compositionsRef =
|
|
14364
|
+
var compositionsRef = React31.createRef();
|
|
14320
14365
|
var CompositionManagerProvider = ({
|
|
14321
14366
|
children,
|
|
14322
14367
|
onlyRenderComposition,
|
|
@@ -14465,7 +14510,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
14465
14510
|
var getPreviewDomElement = () => {
|
|
14466
14511
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
14467
14512
|
};
|
|
14468
|
-
var MaxMediaCacheSizeContext =
|
|
14513
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
14469
14514
|
var Root = null;
|
|
14470
14515
|
var listeners = [];
|
|
14471
14516
|
var getRoot = () => {
|
|
@@ -14633,7 +14678,46 @@ var validateCalculated = ({
|
|
|
14633
14678
|
defaultSampleRate
|
|
14634
14679
|
};
|
|
14635
14680
|
};
|
|
14636
|
-
var
|
|
14681
|
+
var makeVideoConfigWithMetadata = ({
|
|
14682
|
+
calculated,
|
|
14683
|
+
compositionDurationInFrames,
|
|
14684
|
+
compositionFps,
|
|
14685
|
+
compositionHeight,
|
|
14686
|
+
compositionId,
|
|
14687
|
+
compositionWidth,
|
|
14688
|
+
defaultProps,
|
|
14689
|
+
originalProps
|
|
14690
|
+
}) => {
|
|
14691
|
+
const data = validateCalculated({
|
|
14692
|
+
calculated,
|
|
14693
|
+
compositionDurationInFrames,
|
|
14694
|
+
compositionFps,
|
|
14695
|
+
compositionHeight,
|
|
14696
|
+
compositionWidth,
|
|
14697
|
+
compositionId
|
|
14698
|
+
});
|
|
14699
|
+
return {
|
|
14700
|
+
metadataSource: {
|
|
14701
|
+
durationInFrames: calculated?.durationInFrames === undefined ? "composition" : "calculate-metadata",
|
|
14702
|
+
fps: calculated?.fps === undefined ? "composition" : "calculate-metadata",
|
|
14703
|
+
height: calculated?.height === undefined ? "composition" : "calculate-metadata",
|
|
14704
|
+
width: calculated?.width === undefined ? "composition" : "calculate-metadata"
|
|
14705
|
+
},
|
|
14706
|
+
videoConfig: {
|
|
14707
|
+
...data,
|
|
14708
|
+
id: compositionId,
|
|
14709
|
+
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14710
|
+
props: serializeThenDeserializeInStudio(calculated?.props ?? originalProps),
|
|
14711
|
+
defaultCodec: data.defaultCodec ?? null,
|
|
14712
|
+
defaultOutName: data.defaultOutName ?? null,
|
|
14713
|
+
defaultVideoImageFormat: data.defaultVideoImageFormat ?? null,
|
|
14714
|
+
defaultPixelFormat: data.defaultPixelFormat ?? null,
|
|
14715
|
+
defaultProResProfile: data.defaultProResProfile ?? null,
|
|
14716
|
+
defaultSampleRate: data.defaultSampleRate ?? null
|
|
14717
|
+
}
|
|
14718
|
+
};
|
|
14719
|
+
};
|
|
14720
|
+
var resolveVideoConfigWithMetadata = ({
|
|
14637
14721
|
calculateMetadata,
|
|
14638
14722
|
signal,
|
|
14639
14723
|
defaultProps,
|
|
@@ -14653,76 +14737,48 @@ var resolveVideoConfig = ({
|
|
|
14653
14737
|
}) : null;
|
|
14654
14738
|
if (calculatedProm !== null && typeof calculatedProm === "object" && "then" in calculatedProm) {
|
|
14655
14739
|
return calculatedProm.then((c2) => {
|
|
14656
|
-
|
|
14657
|
-
height,
|
|
14658
|
-
width,
|
|
14659
|
-
durationInFrames,
|
|
14660
|
-
fps,
|
|
14661
|
-
defaultCodec,
|
|
14662
|
-
defaultOutName,
|
|
14663
|
-
defaultVideoImageFormat,
|
|
14664
|
-
defaultPixelFormat,
|
|
14665
|
-
defaultProResProfile,
|
|
14666
|
-
defaultSampleRate
|
|
14667
|
-
} = validateCalculated({
|
|
14740
|
+
return makeVideoConfigWithMetadata({
|
|
14668
14741
|
calculated: c2,
|
|
14669
14742
|
compositionDurationInFrames,
|
|
14670
14743
|
compositionFps,
|
|
14671
14744
|
compositionHeight,
|
|
14672
14745
|
compositionWidth,
|
|
14673
|
-
compositionId
|
|
14746
|
+
compositionId,
|
|
14747
|
+
defaultProps,
|
|
14748
|
+
originalProps
|
|
14674
14749
|
});
|
|
14675
|
-
return {
|
|
14676
|
-
width,
|
|
14677
|
-
height,
|
|
14678
|
-
fps,
|
|
14679
|
-
durationInFrames,
|
|
14680
|
-
id: compositionId,
|
|
14681
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps),
|
|
14682
|
-
props: serializeThenDeserializeInStudio(c2.props ?? originalProps),
|
|
14683
|
-
defaultCodec: defaultCodec ?? null,
|
|
14684
|
-
defaultOutName: defaultOutName ?? null,
|
|
14685
|
-
defaultVideoImageFormat: defaultVideoImageFormat ?? null,
|
|
14686
|
-
defaultPixelFormat: defaultPixelFormat ?? null,
|
|
14687
|
-
defaultProResProfile: defaultProResProfile ?? null,
|
|
14688
|
-
defaultSampleRate: defaultSampleRate ?? null
|
|
14689
|
-
};
|
|
14690
14750
|
});
|
|
14691
14751
|
}
|
|
14692
|
-
|
|
14752
|
+
return makeVideoConfigWithMetadata({
|
|
14693
14753
|
calculated: calculatedProm,
|
|
14694
14754
|
compositionDurationInFrames,
|
|
14695
14755
|
compositionFps,
|
|
14696
14756
|
compositionHeight,
|
|
14697
14757
|
compositionWidth,
|
|
14698
|
-
compositionId
|
|
14758
|
+
compositionId,
|
|
14759
|
+
defaultProps,
|
|
14760
|
+
originalProps
|
|
14699
14761
|
});
|
|
14700
|
-
|
|
14762
|
+
};
|
|
14763
|
+
var resolveVideoConfig = (params) => {
|
|
14764
|
+
const resolved = resolveVideoConfigWithMetadata(params);
|
|
14765
|
+
if (typeof resolved === "object" && "then" in resolved) {
|
|
14766
|
+
return resolved.then(({ videoConfig }) => videoConfig);
|
|
14767
|
+
}
|
|
14768
|
+
return resolved.videoConfig;
|
|
14769
|
+
};
|
|
14770
|
+
var resolveVideoConfigWithMetadataOrCatch = (params) => {
|
|
14771
|
+
try {
|
|
14701
14772
|
return {
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
defaultPixelFormat: null,
|
|
14710
|
-
defaultProResProfile: null,
|
|
14711
|
-
defaultSampleRate: null
|
|
14773
|
+
type: "success",
|
|
14774
|
+
result: resolveVideoConfigWithMetadata(params)
|
|
14775
|
+
};
|
|
14776
|
+
} catch (err) {
|
|
14777
|
+
return {
|
|
14778
|
+
type: "error",
|
|
14779
|
+
error: err
|
|
14712
14780
|
};
|
|
14713
14781
|
}
|
|
14714
|
-
return {
|
|
14715
|
-
...data,
|
|
14716
|
-
id: compositionId,
|
|
14717
|
-
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
14718
|
-
props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),
|
|
14719
|
-
defaultCodec: calculatedProm.defaultCodec ?? null,
|
|
14720
|
-
defaultOutName: calculatedProm.defaultOutName ?? null,
|
|
14721
|
-
defaultVideoImageFormat: calculatedProm.defaultVideoImageFormat ?? null,
|
|
14722
|
-
defaultPixelFormat: calculatedProm.defaultPixelFormat ?? null,
|
|
14723
|
-
defaultProResProfile: calculatedProm.defaultProResProfile ?? null,
|
|
14724
|
-
defaultSampleRate: calculatedProm.defaultSampleRate ?? null
|
|
14725
|
-
};
|
|
14726
14782
|
};
|
|
14727
14783
|
var resolveVideoConfigOrCatch = (params) => {
|
|
14728
14784
|
try {
|
|
@@ -14738,7 +14794,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
14738
14794
|
};
|
|
14739
14795
|
}
|
|
14740
14796
|
};
|
|
14741
|
-
var SequenceStackTracesUpdateContext =
|
|
14797
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
14742
14798
|
var getEnvVariables = () => {
|
|
14743
14799
|
if (getRemotionEnvironment().isRendering) {
|
|
14744
14800
|
const param = window.remotion_envVariables;
|
|
@@ -14764,7 +14820,7 @@ var setupEnvVariables = () => {
|
|
|
14764
14820
|
window.process.env[key] = env[key];
|
|
14765
14821
|
});
|
|
14766
14822
|
};
|
|
14767
|
-
var CurrentScaleContext =
|
|
14823
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
14768
14824
|
var PreviewSizeContext = createContext25({
|
|
14769
14825
|
setSize: () => {
|
|
14770
14826
|
return;
|
|
@@ -14788,7 +14844,7 @@ var calculateScale = ({
|
|
|
14788
14844
|
}
|
|
14789
14845
|
return Number(previewSize);
|
|
14790
14846
|
};
|
|
14791
|
-
var PixelDensityContext =
|
|
14847
|
+
var PixelDensityContext = React36.createContext(null);
|
|
14792
14848
|
var getOffthreadVideoSource = ({
|
|
14793
14849
|
src,
|
|
14794
14850
|
transparent,
|
|
@@ -15055,7 +15111,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15055
15111
|
ref: videoRef
|
|
15056
15112
|
});
|
|
15057
15113
|
}, [context.audioContext]);
|
|
15058
|
-
const effectToUse =
|
|
15114
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
15059
15115
|
effectToUse(() => {
|
|
15060
15116
|
return () => {
|
|
15061
15117
|
requestAnimationFrame(() => {
|
|
@@ -15431,20 +15487,20 @@ var OffthreadVideo = ({
|
|
|
15431
15487
|
addSequenceStackTraces(OffthreadVideo);
|
|
15432
15488
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
15433
15489
|
function useRemotionContexts() {
|
|
15434
|
-
const compositionManagerCtx =
|
|
15435
|
-
const timelineContext =
|
|
15436
|
-
const setTimelineContext =
|
|
15437
|
-
const sequenceContext =
|
|
15438
|
-
const nonceContext =
|
|
15439
|
-
const canUseRemotionHooksContext =
|
|
15440
|
-
const preloadContext =
|
|
15441
|
-
const resolveCompositionContext =
|
|
15442
|
-
const renderAssetManagerContext =
|
|
15443
|
-
const sequenceManagerContext =
|
|
15444
|
-
const sequenceManagerRefContext =
|
|
15445
|
-
const visualModePropStatusesRefContext =
|
|
15446
|
-
const bufferManagerContext =
|
|
15447
|
-
const logLevelContext =
|
|
15490
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
15491
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
15492
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
15493
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
15494
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
15495
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
15496
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
15497
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
15498
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
15499
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
15500
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
15501
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15502
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15503
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15448
15504
|
return useMemo37(() => ({
|
|
15449
15505
|
compositionManagerCtx,
|
|
15450
15506
|
timelineContext,
|
|
@@ -15602,6 +15658,7 @@ var Internals = {
|
|
|
15602
15658
|
NonceContext,
|
|
15603
15659
|
resolveVideoConfig,
|
|
15604
15660
|
resolveVideoConfigOrCatch,
|
|
15661
|
+
resolveVideoConfigWithMetadataOrCatch,
|
|
15605
15662
|
ResolveCompositionContext,
|
|
15606
15663
|
useResolvedVideoConfig,
|
|
15607
15664
|
resolveCompositionsRef,
|
|
@@ -15618,6 +15675,8 @@ var Internals = {
|
|
|
15618
15675
|
BufferingProvider,
|
|
15619
15676
|
BufferingContextReact,
|
|
15620
15677
|
getComponentsToAddStacksTo,
|
|
15678
|
+
getSequenceComponent,
|
|
15679
|
+
getSingleChildComponent,
|
|
15621
15680
|
CurrentScaleContext,
|
|
15622
15681
|
PixelDensityContext,
|
|
15623
15682
|
PreviewSizeContext,
|
|
@@ -15675,9 +15734,9 @@ var Internals = {
|
|
|
15675
15734
|
fromField
|
|
15676
15735
|
};
|
|
15677
15736
|
var flattenChildren = (children) => {
|
|
15678
|
-
const childrenArray =
|
|
15737
|
+
const childrenArray = React41.Children.toArray(children);
|
|
15679
15738
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15680
|
-
if (child.type ===
|
|
15739
|
+
if (child.type === React41.Fragment) {
|
|
15681
15740
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15682
15741
|
}
|
|
15683
15742
|
flatChildren.push(child);
|
|
@@ -15765,7 +15824,7 @@ var SeriesInner = (props2) => {
|
|
|
15765
15824
|
index: i,
|
|
15766
15825
|
childrenLength: flattenedChildren.length
|
|
15767
15826
|
});
|
|
15768
|
-
return
|
|
15827
|
+
return React42.cloneElement(castedElement, {
|
|
15769
15828
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15770
15829
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15771
15830
|
const {
|
|
@@ -15923,7 +15982,7 @@ var Still = (props2) => {
|
|
|
15923
15982
|
durationInFrames: 1,
|
|
15924
15983
|
fps: 1
|
|
15925
15984
|
};
|
|
15926
|
-
return
|
|
15985
|
+
return React43.createElement(Composition, newProps);
|
|
15927
15986
|
};
|
|
15928
15987
|
addSequenceStackTraces(Still);
|
|
15929
15988
|
var roundTo6Commas = (num) => {
|
|
@@ -16402,6 +16461,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
16402
16461
|
});
|
|
16403
16462
|
Sequence.displayName = "Sequence";
|
|
16404
16463
|
addSequenceStackTraces(Sequence);
|
|
16464
|
+
setSequenceComponent(Sequence);
|
|
16405
16465
|
addSequenceStackTraces(Composition);
|
|
16406
16466
|
addSequenceStackTraces(Folder);
|
|
16407
16467
|
|
|
@@ -19331,12 +19391,12 @@ import React72 from "react";
|
|
|
19331
19391
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19332
19392
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
19333
19393
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19334
|
-
import * as
|
|
19394
|
+
import * as React362 from "react";
|
|
19335
19395
|
import * as ReactDOM4 from "react-dom";
|
|
19336
|
-
import
|
|
19396
|
+
import React11 from "react";
|
|
19337
19397
|
import * as React8 from "react";
|
|
19338
19398
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19339
|
-
import * as
|
|
19399
|
+
import * as React92 from "react";
|
|
19340
19400
|
import * as React10 from "react";
|
|
19341
19401
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
19342
19402
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -19346,15 +19406,15 @@ import * as React162 from "react";
|
|
|
19346
19406
|
import * as React132 from "react";
|
|
19347
19407
|
import * as ReactDOM from "react-dom";
|
|
19348
19408
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
19349
|
-
import * as
|
|
19350
|
-
import * as
|
|
19409
|
+
import * as React142 from "react";
|
|
19410
|
+
import * as React15 from "react";
|
|
19351
19411
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
19352
|
-
import * as
|
|
19412
|
+
import * as React172 from "react";
|
|
19353
19413
|
import * as React18 from "react";
|
|
19354
19414
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
19355
19415
|
import * as React202 from "react";
|
|
19356
|
-
import * as
|
|
19357
|
-
import * as
|
|
19416
|
+
import * as React19 from "react";
|
|
19417
|
+
import * as React242 from "react";
|
|
19358
19418
|
import * as React212 from "react";
|
|
19359
19419
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
19360
19420
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -19372,7 +19432,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
19372
19432
|
import * as React352 from "react";
|
|
19373
19433
|
import * as React312 from "react";
|
|
19374
19434
|
import { useState as useState112 } from "react";
|
|
19375
|
-
import * as
|
|
19435
|
+
import * as React29 from "react";
|
|
19376
19436
|
import * as React302 from "react";
|
|
19377
19437
|
import * as React342 from "react";
|
|
19378
19438
|
import * as React332 from "react";
|
|
@@ -19380,22 +19440,22 @@ import * as React322 from "react";
|
|
|
19380
19440
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
19381
19441
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
19382
19442
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
19383
|
-
import * as
|
|
19443
|
+
import * as React37 from "react";
|
|
19384
19444
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19385
19445
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
19386
19446
|
import * as React49 from "react";
|
|
19387
|
-
import * as
|
|
19447
|
+
import * as React382 from "react";
|
|
19388
19448
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
19389
19449
|
import * as React47 from "react";
|
|
19390
19450
|
import React402 from "react";
|
|
19391
|
-
import * as
|
|
19451
|
+
import * as React39 from "react";
|
|
19392
19452
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
19393
19453
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
19394
19454
|
import React210 from "react";
|
|
19395
19455
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
19396
19456
|
import * as React422 from "react";
|
|
19397
19457
|
import * as React412 from "react";
|
|
19398
|
-
import * as
|
|
19458
|
+
import * as React432 from "react";
|
|
19399
19459
|
import * as ReactDOM5 from "react-dom";
|
|
19400
19460
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
19401
19461
|
import * as React44 from "react";
|
|
@@ -19447,7 +19507,7 @@ function useComposedRefs(...refs) {
|
|
|
19447
19507
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
19448
19508
|
}
|
|
19449
19509
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
19450
|
-
var use =
|
|
19510
|
+
var use = React24[" use ".trim().toString()];
|
|
19451
19511
|
function isPromiseLike(value) {
|
|
19452
19512
|
return typeof value === "object" && value !== null && "then" in value;
|
|
19453
19513
|
}
|
|
@@ -19456,25 +19516,25 @@ function isLazyComponent(element) {
|
|
|
19456
19516
|
}
|
|
19457
19517
|
function createSlot(ownerName) {
|
|
19458
19518
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19459
|
-
const Slot2 =
|
|
19519
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
19460
19520
|
let { children, ...slotProps } = props;
|
|
19461
19521
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19462
19522
|
children = use(children._payload);
|
|
19463
19523
|
}
|
|
19464
|
-
const childrenArray =
|
|
19524
|
+
const childrenArray = React24.Children.toArray(children);
|
|
19465
19525
|
const slottable = childrenArray.find(isSlottable);
|
|
19466
19526
|
if (slottable) {
|
|
19467
19527
|
const newElement = slottable.props.children;
|
|
19468
19528
|
const newChildren = childrenArray.map((child) => {
|
|
19469
19529
|
if (child === slottable) {
|
|
19470
|
-
if (
|
|
19471
|
-
return
|
|
19472
|
-
return
|
|
19530
|
+
if (React24.Children.count(newElement) > 1)
|
|
19531
|
+
return React24.Children.only(null);
|
|
19532
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
19473
19533
|
} else {
|
|
19474
19534
|
return child;
|
|
19475
19535
|
}
|
|
19476
19536
|
});
|
|
19477
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
19537
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
19478
19538
|
}
|
|
19479
19539
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
19480
19540
|
});
|
|
@@ -19483,20 +19543,20 @@ function createSlot(ownerName) {
|
|
|
19483
19543
|
}
|
|
19484
19544
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
19485
19545
|
function createSlotClone(ownerName) {
|
|
19486
|
-
const SlotClone =
|
|
19546
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
19487
19547
|
let { children, ...slotProps } = props;
|
|
19488
19548
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19489
19549
|
children = use(children._payload);
|
|
19490
19550
|
}
|
|
19491
|
-
if (
|
|
19551
|
+
if (React24.isValidElement(children)) {
|
|
19492
19552
|
const childrenRef = getElementRef(children);
|
|
19493
19553
|
const props2 = mergeProps(slotProps, children.props);
|
|
19494
|
-
if (children.type !==
|
|
19554
|
+
if (children.type !== React24.Fragment) {
|
|
19495
19555
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
19496
19556
|
}
|
|
19497
|
-
return
|
|
19557
|
+
return React24.cloneElement(children, props2);
|
|
19498
19558
|
}
|
|
19499
|
-
return
|
|
19559
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
19500
19560
|
});
|
|
19501
19561
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
19502
19562
|
return SlotClone;
|
|
@@ -19512,7 +19572,7 @@ function createSlottable(ownerName) {
|
|
|
19512
19572
|
}
|
|
19513
19573
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
19514
19574
|
function isSlottable(child) {
|
|
19515
|
-
return
|
|
19575
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19516
19576
|
}
|
|
19517
19577
|
function mergeProps(slotProps, childProps) {
|
|
19518
19578
|
const overrideProps = { ...childProps };
|
|
@@ -19569,7 +19629,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
19569
19629
|
return childNode;
|
|
19570
19630
|
};
|
|
19571
19631
|
var useHoverTransforms = (ref, disabled) => {
|
|
19572
|
-
const [state, setState] =
|
|
19632
|
+
const [state, setState] = React33.useState({
|
|
19573
19633
|
progress: 0,
|
|
19574
19634
|
isActive: false
|
|
19575
19635
|
});
|
|
@@ -19581,7 +19641,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19581
19641
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
19582
19642
|
}
|
|
19583
19643
|
}, [disabled, eventTarget]);
|
|
19584
|
-
|
|
19644
|
+
React33.useEffect(() => {
|
|
19585
19645
|
const element = ref.current;
|
|
19586
19646
|
if (!element)
|
|
19587
19647
|
return;
|
|
@@ -19656,8 +19716,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19656
19716
|
return state;
|
|
19657
19717
|
};
|
|
19658
19718
|
var useClickTransforms = (ref) => {
|
|
19659
|
-
const [hoverProgress, setHoverProgress] =
|
|
19660
|
-
|
|
19719
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
19720
|
+
React33.useEffect(() => {
|
|
19661
19721
|
const element = getChildNodeFrom(ref.current);
|
|
19662
19722
|
if (!element) {
|
|
19663
19723
|
return;
|
|
@@ -20233,7 +20293,7 @@ function composeRefs2(...refs) {
|
|
|
20233
20293
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
20234
20294
|
}
|
|
20235
20295
|
function useComposedRefs2(...refs) {
|
|
20236
|
-
return
|
|
20296
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
20237
20297
|
}
|
|
20238
20298
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
20239
20299
|
const { children, ...slotProps } = props;
|
|
@@ -20315,13 +20375,13 @@ function createCollection(name) {
|
|
|
20315
20375
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
20316
20376
|
const CollectionProvider = (props) => {
|
|
20317
20377
|
const { scope, children } = props;
|
|
20318
|
-
const ref =
|
|
20319
|
-
const itemMap =
|
|
20378
|
+
const ref = React11.useRef(null);
|
|
20379
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
20320
20380
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
20321
20381
|
};
|
|
20322
20382
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
20323
20383
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
20324
|
-
const CollectionSlot =
|
|
20384
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20325
20385
|
const { scope, children } = props;
|
|
20326
20386
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
20327
20387
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -20330,12 +20390,12 @@ function createCollection(name) {
|
|
|
20330
20390
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
20331
20391
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
20332
20392
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
20333
|
-
const CollectionItemSlot =
|
|
20393
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20334
20394
|
const { scope, children, ...itemData } = props;
|
|
20335
|
-
const ref =
|
|
20395
|
+
const ref = React11.useRef(null);
|
|
20336
20396
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20337
20397
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
20338
|
-
|
|
20398
|
+
React11.useEffect(() => {
|
|
20339
20399
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
20340
20400
|
return () => void context.itemMap.delete(ref);
|
|
20341
20401
|
});
|
|
@@ -20344,7 +20404,7 @@ function createCollection(name) {
|
|
|
20344
20404
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
20345
20405
|
function useCollection(scope) {
|
|
20346
20406
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
20347
|
-
const getItems =
|
|
20407
|
+
const getItems = React11.useCallback(() => {
|
|
20348
20408
|
const collectionNode = context.collectionRef.current;
|
|
20349
20409
|
if (!collectionNode)
|
|
20350
20410
|
return [];
|
|
@@ -20401,15 +20461,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20401
20461
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
20402
20462
|
}
|
|
20403
20463
|
function useCallbackRef(callback) {
|
|
20404
|
-
const callbackRef =
|
|
20405
|
-
|
|
20464
|
+
const callbackRef = React142.useRef(callback);
|
|
20465
|
+
React142.useEffect(() => {
|
|
20406
20466
|
callbackRef.current = callback;
|
|
20407
20467
|
});
|
|
20408
|
-
return
|
|
20468
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20409
20469
|
}
|
|
20410
20470
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20411
20471
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
20412
|
-
|
|
20472
|
+
React15.useEffect(() => {
|
|
20413
20473
|
const handleKeyDown = (event) => {
|
|
20414
20474
|
if (event.key === "Escape") {
|
|
20415
20475
|
onEscapeKeyDown(event);
|
|
@@ -20616,7 +20676,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
20616
20676
|
}
|
|
20617
20677
|
var count = 0;
|
|
20618
20678
|
function useFocusGuards() {
|
|
20619
|
-
|
|
20679
|
+
React172.useEffect(() => {
|
|
20620
20680
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20621
20681
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20622
20682
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -20851,7 +20911,7 @@ function arrayRemove(array, item) {
|
|
|
20851
20911
|
function removeLinks(items) {
|
|
20852
20912
|
return items.filter((item) => item.tagName !== "A");
|
|
20853
20913
|
}
|
|
20854
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
20914
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
20855
20915
|
var useReactId = React202["useId".toString()] || (() => {
|
|
20856
20916
|
return;
|
|
20857
20917
|
});
|
|
@@ -22703,17 +22763,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
22703
22763
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22704
22764
|
var Popper = (props) => {
|
|
22705
22765
|
const { __scopePopper, children } = props;
|
|
22706
|
-
const [anchor, setAnchor] =
|
|
22766
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
22707
22767
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22708
22768
|
};
|
|
22709
22769
|
Popper.displayName = POPPER_NAME;
|
|
22710
22770
|
var ANCHOR_NAME = "PopperAnchor";
|
|
22711
|
-
var PopperAnchor =
|
|
22771
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
22712
22772
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
22713
22773
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
22714
|
-
const ref =
|
|
22774
|
+
const ref = React242.useRef(null);
|
|
22715
22775
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
22716
|
-
|
|
22776
|
+
React242.useEffect(() => {
|
|
22717
22777
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
22718
22778
|
});
|
|
22719
22779
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -22721,7 +22781,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
22721
22781
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
22722
22782
|
var CONTENT_NAME = "PopperContent";
|
|
22723
22783
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
22724
|
-
var PopperContent =
|
|
22784
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
22725
22785
|
const {
|
|
22726
22786
|
__scopePopper,
|
|
22727
22787
|
side = "bottom",
|
|
@@ -22739,9 +22799,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22739
22799
|
...contentProps
|
|
22740
22800
|
} = props;
|
|
22741
22801
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
22742
|
-
const [content, setContent] =
|
|
22802
|
+
const [content, setContent] = React242.useState(null);
|
|
22743
22803
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
22744
|
-
const [arrow4, setArrow] =
|
|
22804
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
22745
22805
|
const arrowSize = useSize(arrow4);
|
|
22746
22806
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
22747
22807
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -22801,7 +22861,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22801
22861
|
const arrowX = middlewareData.arrow?.x;
|
|
22802
22862
|
const arrowY = middlewareData.arrow?.y;
|
|
22803
22863
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
22804
|
-
const [contentZIndex, setContentZIndex] =
|
|
22864
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
22805
22865
|
useLayoutEffect22(() => {
|
|
22806
22866
|
if (content)
|
|
22807
22867
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -22852,7 +22912,7 @@ var OPPOSITE_SIDE = {
|
|
|
22852
22912
|
bottom: "top",
|
|
22853
22913
|
left: "right"
|
|
22854
22914
|
};
|
|
22855
|
-
var PopperArrow =
|
|
22915
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
22856
22916
|
const { __scopePopper, ...arrowProps } = props;
|
|
22857
22917
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
22858
22918
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -23195,7 +23255,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
23195
23255
|
ref.callback = callback;
|
|
23196
23256
|
return ref.facade;
|
|
23197
23257
|
}
|
|
23198
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
23258
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
23199
23259
|
var currentValues = new WeakMap;
|
|
23200
23260
|
function useMergeRefs(refs, defaultValue) {
|
|
23201
23261
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -23831,9 +23891,9 @@ var Select = (props) => {
|
|
|
23831
23891
|
required
|
|
23832
23892
|
} = props;
|
|
23833
23893
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23834
|
-
const [trigger, setTrigger] =
|
|
23835
|
-
const [valueNode, setValueNode] =
|
|
23836
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
23894
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
23895
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
23896
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
23837
23897
|
const direction = useDirection(dir);
|
|
23838
23898
|
const [open = false, setOpen] = useControllableState({
|
|
23839
23899
|
prop: openProp,
|
|
@@ -23845,9 +23905,9 @@ var Select = (props) => {
|
|
|
23845
23905
|
defaultProp: defaultValue,
|
|
23846
23906
|
onChange: onValueChange
|
|
23847
23907
|
});
|
|
23848
|
-
const triggerPointerDownPosRef =
|
|
23908
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
23849
23909
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
23850
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
23910
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
23851
23911
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
23852
23912
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
23853
23913
|
required,
|
|
@@ -23869,10 +23929,10 @@ var Select = (props) => {
|
|
|
23869
23929
|
children: [
|
|
23870
23930
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
23871
23931
|
scope: props.__scopeSelect,
|
|
23872
|
-
onNativeOptionAdd:
|
|
23932
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
23873
23933
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
23874
23934
|
}, []),
|
|
23875
|
-
onNativeOptionRemove:
|
|
23935
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
23876
23936
|
setNativeOptionsSet((prev) => {
|
|
23877
23937
|
const optionsSet = new Set(prev);
|
|
23878
23938
|
optionsSet.delete(option);
|
|
@@ -23900,7 +23960,7 @@ var Select = (props) => {
|
|
|
23900
23960
|
};
|
|
23901
23961
|
Select.displayName = SELECT_NAME;
|
|
23902
23962
|
var TRIGGER_NAME = "SelectTrigger";
|
|
23903
|
-
var SelectTrigger =
|
|
23963
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
23904
23964
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
23905
23965
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23906
23966
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -23968,7 +24028,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
23968
24028
|
});
|
|
23969
24029
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
23970
24030
|
var VALUE_NAME = "SelectValue";
|
|
23971
|
-
var SelectValue =
|
|
24031
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
23972
24032
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
23973
24033
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
23974
24034
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -23986,7 +24046,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
23986
24046
|
});
|
|
23987
24047
|
SelectValue.displayName = VALUE_NAME;
|
|
23988
24048
|
var ICON_NAME = "SelectIcon";
|
|
23989
|
-
var SelectIcon =
|
|
24049
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
23990
24050
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
23991
24051
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
23992
24052
|
});
|
|
@@ -23997,9 +24057,9 @@ var SelectPortal = (props) => {
|
|
|
23997
24057
|
};
|
|
23998
24058
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
23999
24059
|
var CONTENT_NAME2 = "SelectContent";
|
|
24000
|
-
var SelectContent =
|
|
24060
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
24001
24061
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
24002
|
-
const [fragment, setFragment] =
|
|
24062
|
+
const [fragment, setFragment] = React362.useState();
|
|
24003
24063
|
useLayoutEffect22(() => {
|
|
24004
24064
|
setFragment(new DocumentFragment);
|
|
24005
24065
|
}, []);
|
|
@@ -24013,7 +24073,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
24013
24073
|
var CONTENT_MARGIN = 10;
|
|
24014
24074
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
24015
24075
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
24016
|
-
var SelectContentImpl =
|
|
24076
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24017
24077
|
const {
|
|
24018
24078
|
__scopeSelect,
|
|
24019
24079
|
position = "item-aligned",
|
|
@@ -24033,20 +24093,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24033
24093
|
...contentProps
|
|
24034
24094
|
} = props;
|
|
24035
24095
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24036
|
-
const [content, setContent] =
|
|
24037
|
-
const [viewport, setViewport] =
|
|
24096
|
+
const [content, setContent] = React362.useState(null);
|
|
24097
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
24038
24098
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24039
|
-
const [selectedItem, setSelectedItem] =
|
|
24040
|
-
const [selectedItemText, setSelectedItemText] =
|
|
24099
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
24100
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
24041
24101
|
const getItems = useCollection(__scopeSelect);
|
|
24042
|
-
const [isPositioned, setIsPositioned] =
|
|
24043
|
-
const firstValidItemFoundRef =
|
|
24044
|
-
|
|
24102
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
24103
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
24104
|
+
React362.useEffect(() => {
|
|
24045
24105
|
if (content)
|
|
24046
24106
|
return hideOthers(content);
|
|
24047
24107
|
}, [content]);
|
|
24048
24108
|
useFocusGuards();
|
|
24049
|
-
const focusFirst2 =
|
|
24109
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
24050
24110
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
24051
24111
|
const [lastItem] = restItems.slice(-1);
|
|
24052
24112
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -24063,14 +24123,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24063
24123
|
return;
|
|
24064
24124
|
}
|
|
24065
24125
|
}, [getItems, viewport]);
|
|
24066
|
-
const focusSelectedItem =
|
|
24067
|
-
|
|
24126
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
24127
|
+
React362.useEffect(() => {
|
|
24068
24128
|
if (isPositioned) {
|
|
24069
24129
|
focusSelectedItem();
|
|
24070
24130
|
}
|
|
24071
24131
|
}, [isPositioned, focusSelectedItem]);
|
|
24072
24132
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
24073
|
-
|
|
24133
|
+
React362.useEffect(() => {
|
|
24074
24134
|
if (content) {
|
|
24075
24135
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
24076
24136
|
const handlePointerMove = (event) => {
|
|
@@ -24100,7 +24160,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24100
24160
|
};
|
|
24101
24161
|
}
|
|
24102
24162
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
24103
|
-
|
|
24163
|
+
React362.useEffect(() => {
|
|
24104
24164
|
const close = () => onOpenChange(false);
|
|
24105
24165
|
window.addEventListener("blur", close);
|
|
24106
24166
|
window.addEventListener("resize", close);
|
|
@@ -24117,7 +24177,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24117
24177
|
setTimeout(() => nextItem.ref.current.focus());
|
|
24118
24178
|
}
|
|
24119
24179
|
});
|
|
24120
|
-
const itemRefCallback =
|
|
24180
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24121
24181
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24122
24182
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24123
24183
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24126,8 +24186,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24126
24186
|
firstValidItemFoundRef.current = true;
|
|
24127
24187
|
}
|
|
24128
24188
|
}, [context.value]);
|
|
24129
|
-
const handleItemLeave =
|
|
24130
|
-
const itemTextRefCallback =
|
|
24189
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
24190
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24131
24191
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24132
24192
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24133
24193
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24222,18 +24282,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24222
24282
|
});
|
|
24223
24283
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
24224
24284
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
24225
|
-
var SelectItemAlignedPosition =
|
|
24285
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24226
24286
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
24227
24287
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24228
24288
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
24229
|
-
const [contentWrapper, setContentWrapper] =
|
|
24230
|
-
const [content, setContent] =
|
|
24289
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
24290
|
+
const [content, setContent] = React362.useState(null);
|
|
24231
24291
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24232
24292
|
const getItems = useCollection(__scopeSelect);
|
|
24233
|
-
const shouldExpandOnScrollRef =
|
|
24234
|
-
const shouldRepositionRef =
|
|
24293
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
24294
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
24235
24295
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
24236
|
-
const position =
|
|
24296
|
+
const position = React362.useCallback(() => {
|
|
24237
24297
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
24238
24298
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
24239
24299
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -24314,12 +24374,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24314
24374
|
onPlaced
|
|
24315
24375
|
]);
|
|
24316
24376
|
useLayoutEffect22(() => position(), [position]);
|
|
24317
|
-
const [contentZIndex, setContentZIndex] =
|
|
24377
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
24318
24378
|
useLayoutEffect22(() => {
|
|
24319
24379
|
if (content)
|
|
24320
24380
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
24321
24381
|
}, [content]);
|
|
24322
|
-
const handleScrollButtonChange =
|
|
24382
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
24323
24383
|
if (node && shouldRepositionRef.current === true) {
|
|
24324
24384
|
position();
|
|
24325
24385
|
focusSelectedItem?.();
|
|
@@ -24353,7 +24413,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24353
24413
|
});
|
|
24354
24414
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
24355
24415
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
24356
|
-
var SelectPopperPosition =
|
|
24416
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24357
24417
|
const {
|
|
24358
24418
|
__scopeSelect,
|
|
24359
24419
|
align = "start",
|
|
@@ -24383,12 +24443,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24383
24443
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
24384
24444
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
24385
24445
|
var VIEWPORT_NAME = "SelectViewport";
|
|
24386
|
-
var SelectViewport =
|
|
24446
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
24387
24447
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
24388
24448
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
24389
24449
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
24390
24450
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
24391
|
-
const prevScrollTopRef =
|
|
24451
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
24392
24452
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
24393
24453
|
/* @__PURE__ */ jsx242("style", {
|
|
24394
24454
|
dangerouslySetInnerHTML: {
|
|
@@ -24437,14 +24497,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
24437
24497
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
24438
24498
|
var GROUP_NAME = "SelectGroup";
|
|
24439
24499
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
24440
|
-
var SelectGroup =
|
|
24500
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
24441
24501
|
const { __scopeSelect, ...groupProps } = props;
|
|
24442
24502
|
const groupId = useId();
|
|
24443
24503
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
24444
24504
|
});
|
|
24445
24505
|
SelectGroup.displayName = GROUP_NAME;
|
|
24446
24506
|
var LABEL_NAME = "SelectLabel";
|
|
24447
|
-
var SelectLabel =
|
|
24507
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
24448
24508
|
const { __scopeSelect, ...labelProps } = props;
|
|
24449
24509
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
24450
24510
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -24452,7 +24512,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
24452
24512
|
SelectLabel.displayName = LABEL_NAME;
|
|
24453
24513
|
var ITEM_NAME = "SelectItem";
|
|
24454
24514
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
24455
|
-
var SelectItem =
|
|
24515
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
24456
24516
|
const {
|
|
24457
24517
|
__scopeSelect,
|
|
24458
24518
|
value,
|
|
@@ -24463,8 +24523,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24463
24523
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
24464
24524
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
24465
24525
|
const isSelected = context.value === value;
|
|
24466
|
-
const [textValue, setTextValue] =
|
|
24467
|
-
const [isFocused, setIsFocused] =
|
|
24526
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
24527
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
24468
24528
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
24469
24529
|
const textId = useId();
|
|
24470
24530
|
const handleSelect = () => {
|
|
@@ -24482,7 +24542,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24482
24542
|
disabled,
|
|
24483
24543
|
textId,
|
|
24484
24544
|
isSelected,
|
|
24485
|
-
onItemTextChange:
|
|
24545
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
24486
24546
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
24487
24547
|
}, []),
|
|
24488
24548
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -24531,16 +24591,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24531
24591
|
});
|
|
24532
24592
|
SelectItem.displayName = ITEM_NAME;
|
|
24533
24593
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
24534
|
-
var SelectItemText =
|
|
24594
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
24535
24595
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
24536
24596
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24537
24597
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24538
24598
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24539
24599
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24540
|
-
const [itemTextNode, setItemTextNode] =
|
|
24600
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
24541
24601
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
24542
24602
|
const textContent = itemTextNode?.textContent;
|
|
24543
|
-
const nativeOption =
|
|
24603
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
24544
24604
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
24545
24605
|
useLayoutEffect22(() => {
|
|
24546
24606
|
onNativeOptionAdd(nativeOption);
|
|
@@ -24553,17 +24613,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
24553
24613
|
});
|
|
24554
24614
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
24555
24615
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
24556
|
-
var SelectItemIndicator =
|
|
24616
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
24557
24617
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
24558
24618
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
24559
24619
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
24560
24620
|
});
|
|
24561
24621
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
24562
24622
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
24563
|
-
var SelectScrollUpButton =
|
|
24623
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
24564
24624
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24565
24625
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24566
|
-
const [canScrollUp, setCanScrollUp] =
|
|
24626
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
24567
24627
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24568
24628
|
useLayoutEffect22(() => {
|
|
24569
24629
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24591,10 +24651,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24591
24651
|
});
|
|
24592
24652
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
24593
24653
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
24594
|
-
var SelectScrollDownButton =
|
|
24654
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
24595
24655
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24596
24656
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24597
|
-
const [canScrollDown, setCanScrollDown] =
|
|
24657
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
24598
24658
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24599
24659
|
useLayoutEffect22(() => {
|
|
24600
24660
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24622,18 +24682,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24622
24682
|
}) : null;
|
|
24623
24683
|
});
|
|
24624
24684
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
24625
|
-
var SelectScrollButtonImpl =
|
|
24685
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24626
24686
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
24627
24687
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
24628
|
-
const autoScrollTimerRef =
|
|
24688
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
24629
24689
|
const getItems = useCollection(__scopeSelect);
|
|
24630
|
-
const clearAutoScrollTimer =
|
|
24690
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
24631
24691
|
if (autoScrollTimerRef.current !== null) {
|
|
24632
24692
|
window.clearInterval(autoScrollTimerRef.current);
|
|
24633
24693
|
autoScrollTimerRef.current = null;
|
|
24634
24694
|
}
|
|
24635
24695
|
}, []);
|
|
24636
|
-
|
|
24696
|
+
React362.useEffect(() => {
|
|
24637
24697
|
return () => clearAutoScrollTimer();
|
|
24638
24698
|
}, [clearAutoScrollTimer]);
|
|
24639
24699
|
useLayoutEffect22(() => {
|
|
@@ -24662,13 +24722,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24662
24722
|
});
|
|
24663
24723
|
});
|
|
24664
24724
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
24665
|
-
var SelectSeparator =
|
|
24725
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
24666
24726
|
const { __scopeSelect, ...separatorProps } = props;
|
|
24667
24727
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
24668
24728
|
});
|
|
24669
24729
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
24670
24730
|
var ARROW_NAME2 = "SelectArrow";
|
|
24671
|
-
var SelectArrow =
|
|
24731
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
24672
24732
|
const { __scopeSelect, ...arrowProps } = props;
|
|
24673
24733
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24674
24734
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -24679,12 +24739,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
24679
24739
|
function shouldShowPlaceholder(value) {
|
|
24680
24740
|
return value === "" || value === undefined;
|
|
24681
24741
|
}
|
|
24682
|
-
var BubbleSelect =
|
|
24742
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
24683
24743
|
const { value, ...selectProps } = props;
|
|
24684
|
-
const ref =
|
|
24744
|
+
const ref = React362.useRef(null);
|
|
24685
24745
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24686
24746
|
const prevValue = usePrevious(value);
|
|
24687
|
-
|
|
24747
|
+
React362.useEffect(() => {
|
|
24688
24748
|
const select = ref.current;
|
|
24689
24749
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
24690
24750
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -24700,9 +24760,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
24700
24760
|
BubbleSelect.displayName = "BubbleSelect";
|
|
24701
24761
|
function useTypeaheadSearch(onSearchChange) {
|
|
24702
24762
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
24703
|
-
const searchRef =
|
|
24704
|
-
const timerRef =
|
|
24705
|
-
const handleTypeaheadSearch =
|
|
24763
|
+
const searchRef = React362.useRef("");
|
|
24764
|
+
const timerRef = React362.useRef(0);
|
|
24765
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
24706
24766
|
const search = searchRef.current + key;
|
|
24707
24767
|
handleSearchChange(search);
|
|
24708
24768
|
(function updateSearch(value) {
|
|
@@ -24712,11 +24772,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
24712
24772
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
24713
24773
|
})(search);
|
|
24714
24774
|
}, [handleSearchChange]);
|
|
24715
|
-
const resetTypeahead =
|
|
24775
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
24716
24776
|
searchRef.current = "";
|
|
24717
24777
|
window.clearTimeout(timerRef.current);
|
|
24718
24778
|
}, []);
|
|
24719
|
-
|
|
24779
|
+
React362.useEffect(() => {
|
|
24720
24780
|
return () => window.clearTimeout(timerRef.current);
|
|
24721
24781
|
}, []);
|
|
24722
24782
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -24805,7 +24865,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
24805
24865
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
24806
24866
|
var Select2 = Root222;
|
|
24807
24867
|
var SelectValue2 = Value;
|
|
24808
|
-
var SelectTrigger2 =
|
|
24868
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
24809
24869
|
ref,
|
|
24810
24870
|
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),
|
|
24811
24871
|
...props,
|
|
@@ -24820,7 +24880,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
24820
24880
|
]
|
|
24821
24881
|
}));
|
|
24822
24882
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
24823
|
-
var SelectScrollUpButton2 =
|
|
24883
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
24824
24884
|
ref,
|
|
24825
24885
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24826
24886
|
...props,
|
|
@@ -24829,7 +24889,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
24829
24889
|
})
|
|
24830
24890
|
}));
|
|
24831
24891
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
24832
|
-
var SelectScrollDownButton2 =
|
|
24892
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
24833
24893
|
ref,
|
|
24834
24894
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24835
24895
|
...props,
|
|
@@ -24838,7 +24898,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
24838
24898
|
})
|
|
24839
24899
|
}));
|
|
24840
24900
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
24841
|
-
var SelectContent2 =
|
|
24901
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
24842
24902
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
24843
24903
|
ref,
|
|
24844
24904
|
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),
|
|
@@ -24855,13 +24915,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
24855
24915
|
})
|
|
24856
24916
|
}));
|
|
24857
24917
|
SelectContent2.displayName = Content2.displayName;
|
|
24858
|
-
var SelectLabel2 =
|
|
24918
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
24859
24919
|
ref,
|
|
24860
24920
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
24861
24921
|
...props
|
|
24862
24922
|
}));
|
|
24863
24923
|
SelectLabel2.displayName = Label.displayName;
|
|
24864
|
-
var SelectItem2 =
|
|
24924
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
24865
24925
|
ref,
|
|
24866
24926
|
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),
|
|
24867
24927
|
...props,
|
|
@@ -24880,7 +24940,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
24880
24940
|
]
|
|
24881
24941
|
}));
|
|
24882
24942
|
SelectItem2.displayName = Item.displayName;
|
|
24883
|
-
var SelectSeparator2 =
|
|
24943
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
24884
24944
|
ref,
|
|
24885
24945
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
24886
24946
|
...props
|
|
@@ -24913,19 +24973,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
24913
24973
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
24914
24974
|
let defaultContexts = [];
|
|
24915
24975
|
function createContext32(rootComponentName, defaultContext) {
|
|
24916
|
-
const BaseContext =
|
|
24976
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
24917
24977
|
const index2 = defaultContexts.length;
|
|
24918
24978
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
24919
24979
|
const Provider = (props) => {
|
|
24920
24980
|
const { scope, children, ...context } = props;
|
|
24921
24981
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24922
|
-
const value =
|
|
24982
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
24923
24983
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
24924
24984
|
};
|
|
24925
24985
|
Provider.displayName = rootComponentName + "Provider";
|
|
24926
24986
|
function useContext222(consumerName, scope) {
|
|
24927
24987
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24928
|
-
const context =
|
|
24988
|
+
const context = React382.useContext(Context);
|
|
24929
24989
|
if (context)
|
|
24930
24990
|
return context;
|
|
24931
24991
|
if (defaultContext !== undefined)
|
|
@@ -24936,11 +24996,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
24936
24996
|
}
|
|
24937
24997
|
const createScope = () => {
|
|
24938
24998
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
24939
|
-
return
|
|
24999
|
+
return React382.createContext(defaultContext);
|
|
24940
25000
|
});
|
|
24941
25001
|
return function useScope(scope) {
|
|
24942
25002
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
24943
|
-
return
|
|
25003
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
24944
25004
|
};
|
|
24945
25005
|
};
|
|
24946
25006
|
createScope.scopeName = scopeName;
|
|
@@ -24961,7 +25021,7 @@ function composeContextScopes2(...scopes) {
|
|
|
24961
25021
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
24962
25022
|
return { ...nextScopes2, ...currentScope };
|
|
24963
25023
|
}, {});
|
|
24964
|
-
return
|
|
25024
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
24965
25025
|
};
|
|
24966
25026
|
};
|
|
24967
25027
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -24969,22 +25029,22 @@ function composeContextScopes2(...scopes) {
|
|
|
24969
25029
|
}
|
|
24970
25030
|
function createSlot2(ownerName) {
|
|
24971
25031
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
24972
|
-
const Slot22 =
|
|
25032
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
24973
25033
|
const { children, ...slotProps } = props;
|
|
24974
|
-
const childrenArray =
|
|
25034
|
+
const childrenArray = React39.Children.toArray(children);
|
|
24975
25035
|
const slottable = childrenArray.find(isSlottable3);
|
|
24976
25036
|
if (slottable) {
|
|
24977
25037
|
const newElement = slottable.props.children;
|
|
24978
25038
|
const newChildren = childrenArray.map((child) => {
|
|
24979
25039
|
if (child === slottable) {
|
|
24980
|
-
if (
|
|
24981
|
-
return
|
|
24982
|
-
return
|
|
25040
|
+
if (React39.Children.count(newElement) > 1)
|
|
25041
|
+
return React39.Children.only(null);
|
|
25042
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
24983
25043
|
} else {
|
|
24984
25044
|
return child;
|
|
24985
25045
|
}
|
|
24986
25046
|
});
|
|
24987
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
25047
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
24988
25048
|
}
|
|
24989
25049
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
24990
25050
|
});
|
|
@@ -24992,24 +25052,24 @@ function createSlot2(ownerName) {
|
|
|
24992
25052
|
return Slot22;
|
|
24993
25053
|
}
|
|
24994
25054
|
function createSlotClone2(ownerName) {
|
|
24995
|
-
const SlotClone2 =
|
|
25055
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
24996
25056
|
const { children, ...slotProps } = props;
|
|
24997
|
-
if (
|
|
25057
|
+
if (React39.isValidElement(children)) {
|
|
24998
25058
|
const childrenRef = getElementRef3(children);
|
|
24999
25059
|
const props2 = mergeProps3(slotProps, children.props);
|
|
25000
|
-
if (children.type !==
|
|
25060
|
+
if (children.type !== React39.Fragment) {
|
|
25001
25061
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
25002
25062
|
}
|
|
25003
|
-
return
|
|
25063
|
+
return React39.cloneElement(children, props2);
|
|
25004
25064
|
}
|
|
25005
|
-
return
|
|
25065
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
25006
25066
|
});
|
|
25007
25067
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
25008
25068
|
return SlotClone2;
|
|
25009
25069
|
}
|
|
25010
25070
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
25011
25071
|
function isSlottable3(child) {
|
|
25012
|
-
return
|
|
25072
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
25013
25073
|
}
|
|
25014
25074
|
function mergeProps3(slotProps, childProps) {
|
|
25015
25075
|
const overrideProps = { ...childProps };
|
|
@@ -25437,7 +25497,7 @@ var NODES2 = [
|
|
|
25437
25497
|
];
|
|
25438
25498
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
25439
25499
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
25440
|
-
const Node2 =
|
|
25500
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
25441
25501
|
const { asChild, ...primitiveProps } = props;
|
|
25442
25502
|
const Comp = asChild ? Slot3 : node;
|
|
25443
25503
|
if (typeof window !== "undefined") {
|