@remotion/promo-pages 4.0.491 → 4.0.492
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 +303 -219
- package/dist/design.js +263 -217
- package/dist/experts.js +114 -68
- package/dist/homepage/Pricing.js +263 -217
- package/dist/prompts/PromptsGallery.js +263 -217
- package/dist/prompts/PromptsShow.js +263 -217
- package/dist/prompts/PromptsSubmit.js +263 -217
- package/dist/team.js +263 -217
- package/dist/template-modal-content.js +263 -217
- package/dist/templates.js +263 -217
- package/package.json +13 -13
package/dist/team.js
CHANGED
|
@@ -214,7 +214,7 @@ var TitleTeamCards = () => {
|
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
// ../design/dist/esm/index.mjs
|
|
217
|
-
import * as
|
|
217
|
+
import * as React24 from "react";
|
|
218
218
|
import * as React3 from "react";
|
|
219
219
|
import { Fragment as Fragment22, jsx as jsx44 } from "react/jsx-runtime";
|
|
220
220
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -1559,7 +1559,7 @@ var getDefaultConfig = () => {
|
|
|
1559
1559
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1560
1560
|
|
|
1561
1561
|
// ../design/dist/esm/index.mjs
|
|
1562
|
-
import
|
|
1562
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1563
1563
|
|
|
1564
1564
|
// ../paths/dist/esm/index.mjs
|
|
1565
1565
|
var cutLInstruction = ({
|
|
@@ -4352,6 +4352,7 @@ import * as React6 from "react";
|
|
|
4352
4352
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
4353
4353
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
4354
4354
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4355
|
+
import React9 from "react";
|
|
4355
4356
|
import {
|
|
4356
4357
|
forwardRef as forwardRef3,
|
|
4357
4358
|
useCallback as useCallback6,
|
|
@@ -4377,11 +4378,11 @@ import { useContext as useContext13 } from "react";
|
|
|
4377
4378
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4378
4379
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4379
4380
|
import { createContext as createContext14 } from "react";
|
|
4380
|
-
import
|
|
4381
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4381
4382
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4382
|
-
import
|
|
4383
|
+
import React13, { createContext as createContext15 } from "react";
|
|
4383
4384
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4384
|
-
import
|
|
4385
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
4385
4386
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
4386
4387
|
import { createContext as createContext16 } from "react";
|
|
4387
4388
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4393,7 +4394,7 @@ import {
|
|
|
4393
4394
|
useRef as useRef9,
|
|
4394
4395
|
useState as useState6
|
|
4395
4396
|
} from "react";
|
|
4396
|
-
import
|
|
4397
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4397
4398
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
4398
4399
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4399
4400
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -4409,7 +4410,7 @@ import {
|
|
|
4409
4410
|
} from "react";
|
|
4410
4411
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4411
4412
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
4412
|
-
import
|
|
4413
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
4413
4414
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4414
4415
|
import { useContext as useContext19 } from "react";
|
|
4415
4416
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -4417,7 +4418,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
4417
4418
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
4418
4419
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4419
4420
|
import { useCallback as useCallback13 } from "react";
|
|
4420
|
-
import
|
|
4421
|
+
import React23, {
|
|
4421
4422
|
forwardRef as forwardRef5,
|
|
4422
4423
|
useContext as useContext28,
|
|
4423
4424
|
useEffect as useEffect14,
|
|
@@ -4427,7 +4428,7 @@ import React22, {
|
|
|
4427
4428
|
useState as useState14
|
|
4428
4429
|
} from "react";
|
|
4429
4430
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4430
|
-
import
|
|
4431
|
+
import React20, {
|
|
4431
4432
|
createContext as createContext21,
|
|
4432
4433
|
createRef as createRef2,
|
|
4433
4434
|
useCallback as useCallback9,
|
|
@@ -4451,7 +4452,7 @@ import {
|
|
|
4451
4452
|
} from "react";
|
|
4452
4453
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
4453
4454
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
4454
|
-
import
|
|
4455
|
+
import React21, {
|
|
4455
4456
|
useCallback as useCallback10,
|
|
4456
4457
|
useContext as useContext24,
|
|
4457
4458
|
useEffect as useEffect9,
|
|
@@ -4461,7 +4462,7 @@ import React20, {
|
|
|
4461
4462
|
useState as useState12
|
|
4462
4463
|
} from "react";
|
|
4463
4464
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4464
|
-
import
|
|
4465
|
+
import React22 from "react";
|
|
4465
4466
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4466
4467
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4467
4468
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4519,10 +4520,10 @@ import {
|
|
|
4519
4520
|
useState as useState18
|
|
4520
4521
|
} from "react";
|
|
4521
4522
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4522
|
-
import
|
|
4523
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4523
4524
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4524
4525
|
import { createRef as createRef3 } from "react";
|
|
4525
|
-
import
|
|
4526
|
+
import React31 from "react";
|
|
4526
4527
|
import {
|
|
4527
4528
|
useCallback as useCallback21,
|
|
4528
4529
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -4531,14 +4532,14 @@ import {
|
|
|
4531
4532
|
useState as useState19
|
|
4532
4533
|
} from "react";
|
|
4533
4534
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4534
|
-
import
|
|
4535
|
+
import React32 from "react";
|
|
4535
4536
|
import { useMemo as useMemo34 } from "react";
|
|
4536
4537
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
4537
4538
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4538
4539
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
4539
|
-
import
|
|
4540
|
-
import
|
|
4541
|
-
import
|
|
4540
|
+
import React34 from "react";
|
|
4541
|
+
import React35, { createContext as createContext25 } from "react";
|
|
4542
|
+
import React36, { useContext as useContext35 } from "react";
|
|
4542
4543
|
import { useCallback as useCallback24 } from "react";
|
|
4543
4544
|
import {
|
|
4544
4545
|
useCallback as useCallback22,
|
|
@@ -4549,7 +4550,7 @@ import {
|
|
|
4549
4550
|
useState as useState20
|
|
4550
4551
|
} from "react";
|
|
4551
4552
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4552
|
-
import
|
|
4553
|
+
import React38, {
|
|
4553
4554
|
forwardRef as forwardRef13,
|
|
4554
4555
|
useCallback as useCallback23,
|
|
4555
4556
|
useContext as useContext37,
|
|
@@ -4562,15 +4563,15 @@ import React37, {
|
|
|
4562
4563
|
import { useEffect as useEffect18 } from "react";
|
|
4563
4564
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4564
4565
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4565
|
-
import
|
|
4566
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
4566
4567
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4567
|
-
import
|
|
4568
|
+
import React42, {
|
|
4568
4569
|
forwardRef as forwardRef14,
|
|
4569
4570
|
useMemo as useMemo38
|
|
4570
4571
|
} from "react";
|
|
4571
|
-
import
|
|
4572
|
+
import React41 from "react";
|
|
4572
4573
|
import { jsx as jsx37, jsxs as jsxs32, Fragment } from "react/jsx-runtime";
|
|
4573
|
-
import
|
|
4574
|
+
import React43 from "react";
|
|
4574
4575
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
4575
4576
|
import {
|
|
4576
4577
|
forwardRef as forwardRef15,
|
|
@@ -5648,6 +5649,7 @@ var InnerComposition = ({
|
|
|
5648
5649
|
}
|
|
5649
5650
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
5650
5651
|
const stack = compProps.stack ?? null;
|
|
5652
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
5651
5653
|
useEffect2(() => {
|
|
5652
5654
|
if (!id) {
|
|
5653
5655
|
throw new Error("No id for composition passed.");
|
|
@@ -5665,6 +5667,7 @@ var InnerComposition = ({
|
|
|
5665
5667
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
5666
5668
|
nonce: nonce.get(),
|
|
5667
5669
|
parentFolderName: parentName,
|
|
5670
|
+
componentFromProps,
|
|
5668
5671
|
schema: schema ?? null,
|
|
5669
5672
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
5670
5673
|
stack
|
|
@@ -5683,6 +5686,7 @@ var InnerComposition = ({
|
|
|
5683
5686
|
width,
|
|
5684
5687
|
nonce,
|
|
5685
5688
|
parentName,
|
|
5689
|
+
componentFromProps,
|
|
5686
5690
|
schema,
|
|
5687
5691
|
compProps.calculateMetadata,
|
|
5688
5692
|
stack,
|
|
@@ -5741,11 +5745,30 @@ var Composition = (props) => {
|
|
|
5741
5745
|
});
|
|
5742
5746
|
};
|
|
5743
5747
|
var componentsToAddStacksTo = [];
|
|
5748
|
+
var sequenceComponent = null;
|
|
5744
5749
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
5745
5750
|
var addSequenceStackTraces = (component) => {
|
|
5746
5751
|
componentsToAddStacksTo.push(component);
|
|
5747
5752
|
};
|
|
5748
|
-
var
|
|
5753
|
+
var setSequenceComponent = (component) => {
|
|
5754
|
+
sequenceComponent = component;
|
|
5755
|
+
};
|
|
5756
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
5757
|
+
var getSingleChildComponent = (children) => {
|
|
5758
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
5759
|
+
if (mountedChildren.length !== 1) {
|
|
5760
|
+
return null;
|
|
5761
|
+
}
|
|
5762
|
+
const child = mountedChildren[0];
|
|
5763
|
+
if (!React9.isValidElement(child)) {
|
|
5764
|
+
return null;
|
|
5765
|
+
}
|
|
5766
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
5767
|
+
return null;
|
|
5768
|
+
}
|
|
5769
|
+
return child.type;
|
|
5770
|
+
};
|
|
5771
|
+
var VERSION = "4.0.492";
|
|
5749
5772
|
var checkMultipleRemotionVersions = () => {
|
|
5750
5773
|
if (typeof globalThis === "undefined") {
|
|
5751
5774
|
return;
|
|
@@ -6345,7 +6368,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6345
6368
|
var PremountContext = createContext14({
|
|
6346
6369
|
premountFramesRemaining: 0
|
|
6347
6370
|
});
|
|
6348
|
-
var SequenceManager =
|
|
6371
|
+
var SequenceManager = React12.createContext({
|
|
6349
6372
|
registerSequence: () => {
|
|
6350
6373
|
throw new Error("SequenceManagerContext not initialized");
|
|
6351
6374
|
},
|
|
@@ -6354,19 +6377,19 @@ var SequenceManager = React11.createContext({
|
|
|
6354
6377
|
},
|
|
6355
6378
|
sequences: []
|
|
6356
6379
|
});
|
|
6357
|
-
var SequenceManagerRefContext =
|
|
6380
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
6358
6381
|
current: []
|
|
6359
6382
|
});
|
|
6360
6383
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
6361
6384
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
6362
6385
|
};
|
|
6363
|
-
var VisualModePropStatusesContext =
|
|
6386
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
6364
6387
|
propStatuses: {}
|
|
6365
6388
|
});
|
|
6366
|
-
var VisualModePropStatusesRefContext =
|
|
6389
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
6367
6390
|
current: {}
|
|
6368
6391
|
});
|
|
6369
|
-
var VisualModeDragOverridesContext =
|
|
6392
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
6370
6393
|
getDragOverrides: () => {
|
|
6371
6394
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6372
6395
|
},
|
|
@@ -6374,7 +6397,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
6374
6397
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6375
6398
|
}
|
|
6376
6399
|
});
|
|
6377
|
-
var VisualModeSettersContext =
|
|
6400
|
+
var VisualModeSettersContext = React12.createContext({
|
|
6378
6401
|
setDragOverrides: () => {
|
|
6379
6402
|
throw new Error("VisualModeSettersContext not initialized");
|
|
6380
6403
|
},
|
|
@@ -6538,7 +6561,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
6538
6561
|
});
|
|
6539
6562
|
};
|
|
6540
6563
|
var useRequireToBeInsideSeries = () => {
|
|
6541
|
-
const isInsideSeries =
|
|
6564
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
6542
6565
|
if (!isInsideSeries) {
|
|
6543
6566
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6544
6567
|
}
|
|
@@ -8607,6 +8630,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
8607
8630
|
shouldResortToDefaultValueIfUndefined: false
|
|
8608
8631
|
});
|
|
8609
8632
|
}
|
|
8633
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
8634
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
8635
|
+
}
|
|
8610
8636
|
if (value === undefined) {
|
|
8611
8637
|
propsToDelete.add(key);
|
|
8612
8638
|
}
|
|
@@ -8705,7 +8731,7 @@ var withInteractivitySchema = ({
|
|
|
8705
8731
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8706
8732
|
const env = useRemotionEnvironment();
|
|
8707
8733
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8708
|
-
return
|
|
8734
|
+
return React14.createElement(Component, {
|
|
8709
8735
|
...props,
|
|
8710
8736
|
controls: null,
|
|
8711
8737
|
ref
|
|
@@ -8716,7 +8742,7 @@ var withInteractivitySchema = ({
|
|
|
8716
8742
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8717
8743
|
const frame = useCurrentFrame();
|
|
8718
8744
|
if (props.controls) {
|
|
8719
|
-
return
|
|
8745
|
+
return React14.createElement(Component, {
|
|
8720
8746
|
...props,
|
|
8721
8747
|
ref
|
|
8722
8748
|
});
|
|
@@ -8774,7 +8800,7 @@ var withInteractivitySchema = ({
|
|
|
8774
8800
|
schemaKeys: activeKeys,
|
|
8775
8801
|
propsToDelete
|
|
8776
8802
|
});
|
|
8777
|
-
return
|
|
8803
|
+
return React14.createElement(Component, {
|
|
8778
8804
|
...mergedProps,
|
|
8779
8805
|
controls,
|
|
8780
8806
|
ref
|
|
@@ -8800,6 +8826,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8800
8826
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8801
8827
|
_remotionInternalStack: stack,
|
|
8802
8828
|
_remotionInternalDocumentationLink: documentationLink,
|
|
8829
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
8803
8830
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8804
8831
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8805
8832
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8946,7 +8973,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8946
8973
|
getStack: () => stackRef.current,
|
|
8947
8974
|
refForOutline: refForOutline ?? null,
|
|
8948
8975
|
isInsideSeries,
|
|
8949
|
-
frozenFrame: registeredFrozenFrame
|
|
8976
|
+
frozenFrame: registeredFrozenFrame,
|
|
8977
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8950
8978
|
});
|
|
8951
8979
|
} else {
|
|
8952
8980
|
registerSequence({
|
|
@@ -8976,7 +9004,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8976
9004
|
refForOutline: refForOutline ?? null,
|
|
8977
9005
|
isInsideSeries,
|
|
8978
9006
|
frozenFrame: registeredFrozenFrame,
|
|
8979
|
-
frozenMediaFrame
|
|
9007
|
+
frozenMediaFrame,
|
|
9008
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8980
9009
|
});
|
|
8981
9010
|
}
|
|
8982
9011
|
return () => {
|
|
@@ -9003,7 +9032,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9003
9032
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
9004
9033
|
refForOutline: refForOutline ?? null,
|
|
9005
9034
|
isInsideSeries,
|
|
9006
|
-
frozenFrame: registeredFrozenFrame
|
|
9035
|
+
frozenFrame: registeredFrozenFrame,
|
|
9036
|
+
singleChildComponent: singleChildComponent ?? null
|
|
9007
9037
|
});
|
|
9008
9038
|
return () => {
|
|
9009
9039
|
unregisterSequence(id);
|
|
@@ -9036,7 +9066,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
9036
9066
|
registeredFrozenFrame,
|
|
9037
9067
|
startMediaFrom,
|
|
9038
9068
|
mediaFrameAtSequenceZero,
|
|
9039
|
-
frozenMediaFrame
|
|
9069
|
+
frozenMediaFrame,
|
|
9070
|
+
singleChildComponent
|
|
9040
9071
|
]);
|
|
9041
9072
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
9042
9073
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -9538,7 +9569,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9538
9569
|
...props
|
|
9539
9570
|
});
|
|
9540
9571
|
};
|
|
9541
|
-
var Canvas =
|
|
9572
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9542
9573
|
var CACHE_SIZE = 5;
|
|
9543
9574
|
var getActualTime = ({
|
|
9544
9575
|
loopBehavior,
|
|
@@ -9699,6 +9730,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9699
9730
|
return new URL(src, window.origin).href;
|
|
9700
9731
|
};
|
|
9701
9732
|
var animatedImageSchema = {
|
|
9733
|
+
src: {
|
|
9734
|
+
type: "asset",
|
|
9735
|
+
default: undefined,
|
|
9736
|
+
description: "Source",
|
|
9737
|
+
keyframable: false
|
|
9738
|
+
},
|
|
9702
9739
|
...baseSchema,
|
|
9703
9740
|
playbackRate: {
|
|
9704
9741
|
type: "number",
|
|
@@ -10116,7 +10153,7 @@ var calculateMediaDuration = ({
|
|
|
10116
10153
|
};
|
|
10117
10154
|
var LoopContext = createContext18(null);
|
|
10118
10155
|
var useLoop = () => {
|
|
10119
|
-
return
|
|
10156
|
+
return React17.useContext(LoopContext);
|
|
10120
10157
|
};
|
|
10121
10158
|
var Loop = ({
|
|
10122
10159
|
durationInFrames,
|
|
@@ -10967,7 +11004,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10967
11004
|
};
|
|
10968
11005
|
});
|
|
10969
11006
|
}, [audioContext, numberOfAudioTags]);
|
|
10970
|
-
const effectToUse =
|
|
11007
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10971
11008
|
effectToUse(() => {
|
|
10972
11009
|
return () => {
|
|
10973
11010
|
requestAnimationFrame(() => {
|
|
@@ -11137,7 +11174,7 @@ var useSharedAudio = ({
|
|
|
11137
11174
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
11138
11175
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
11139
11176
|
}
|
|
11140
|
-
const el =
|
|
11177
|
+
const el = React20.createRef();
|
|
11141
11178
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
11142
11179
|
audioContext: audioCtx.audioContext,
|
|
11143
11180
|
ref: el
|
|
@@ -11156,7 +11193,7 @@ var useSharedAudio = ({
|
|
|
11156
11193
|
}
|
|
11157
11194
|
};
|
|
11158
11195
|
});
|
|
11159
|
-
const effectToUse =
|
|
11196
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
11160
11197
|
if (typeof document !== "undefined") {
|
|
11161
11198
|
effectToUse(() => {
|
|
11162
11199
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -11708,7 +11745,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11708
11745
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11709
11746
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11710
11747
|
};
|
|
11711
|
-
var BufferingContextReact =
|
|
11748
|
+
var BufferingContextReact = React21.createContext(null);
|
|
11712
11749
|
var BufferingProvider = ({ children }) => {
|
|
11713
11750
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
11714
11751
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -11921,7 +11958,7 @@ var getMediaSyncAction = (input) => {
|
|
|
11921
11958
|
return { type: "none" };
|
|
11922
11959
|
};
|
|
11923
11960
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11924
|
-
const lastUpdate =
|
|
11961
|
+
const lastUpdate = React22.useRef({
|
|
11925
11962
|
time: mediaRef.current?.currentTime ?? 0,
|
|
11926
11963
|
lastUpdate: performance.now()
|
|
11927
11964
|
});
|
|
@@ -12674,7 +12711,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12674
12711
|
volume: userPreferredVolume,
|
|
12675
12712
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
12676
12713
|
});
|
|
12677
|
-
const effectToUse =
|
|
12714
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
12678
12715
|
effectToUse(() => {
|
|
12679
12716
|
return () => {
|
|
12680
12717
|
requestAnimationFrame(() => {
|
|
@@ -14220,6 +14257,12 @@ var NativeImgInner = ({
|
|
|
14220
14257
|
};
|
|
14221
14258
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
14222
14259
|
var imgSchema = {
|
|
14260
|
+
src: {
|
|
14261
|
+
type: "asset",
|
|
14262
|
+
default: undefined,
|
|
14263
|
+
description: "Source",
|
|
14264
|
+
keyframable: false
|
|
14265
|
+
},
|
|
14223
14266
|
...baseSchema,
|
|
14224
14267
|
...transformSchema
|
|
14225
14268
|
};
|
|
@@ -14430,7 +14473,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14430
14473
|
_remotionInternalStack: stack,
|
|
14431
14474
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
14432
14475
|
outlineRef: refForOutline,
|
|
14433
|
-
children:
|
|
14476
|
+
children: React30.createElement(tag, {
|
|
14434
14477
|
...props2,
|
|
14435
14478
|
ref: callbackRef
|
|
14436
14479
|
})
|
|
@@ -14494,7 +14537,7 @@ var Interactive = {
|
|
|
14494
14537
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
14495
14538
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
14496
14539
|
};
|
|
14497
|
-
var compositionsRef =
|
|
14540
|
+
var compositionsRef = React31.createRef();
|
|
14498
14541
|
var CompositionManagerProvider = ({
|
|
14499
14542
|
children,
|
|
14500
14543
|
onlyRenderComposition,
|
|
@@ -14643,7 +14686,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
14643
14686
|
var getPreviewDomElement = () => {
|
|
14644
14687
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
14645
14688
|
};
|
|
14646
|
-
var MaxMediaCacheSizeContext =
|
|
14689
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
14647
14690
|
var Root = null;
|
|
14648
14691
|
var listeners = [];
|
|
14649
14692
|
var getRoot = () => {
|
|
@@ -14916,7 +14959,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
14916
14959
|
};
|
|
14917
14960
|
}
|
|
14918
14961
|
};
|
|
14919
|
-
var SequenceStackTracesUpdateContext =
|
|
14962
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
14920
14963
|
var getEnvVariables = () => {
|
|
14921
14964
|
if (getRemotionEnvironment().isRendering) {
|
|
14922
14965
|
const param = window.remotion_envVariables;
|
|
@@ -14942,7 +14985,7 @@ var setupEnvVariables = () => {
|
|
|
14942
14985
|
window.process.env[key] = env[key];
|
|
14943
14986
|
});
|
|
14944
14987
|
};
|
|
14945
|
-
var CurrentScaleContext =
|
|
14988
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
14946
14989
|
var PreviewSizeContext = createContext25({
|
|
14947
14990
|
setSize: () => {
|
|
14948
14991
|
return;
|
|
@@ -14966,7 +15009,7 @@ var calculateScale = ({
|
|
|
14966
15009
|
}
|
|
14967
15010
|
return Number(previewSize);
|
|
14968
15011
|
};
|
|
14969
|
-
var PixelDensityContext =
|
|
15012
|
+
var PixelDensityContext = React36.createContext(null);
|
|
14970
15013
|
var getOffthreadVideoSource = ({
|
|
14971
15014
|
src,
|
|
14972
15015
|
transparent,
|
|
@@ -15233,7 +15276,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15233
15276
|
ref: videoRef
|
|
15234
15277
|
});
|
|
15235
15278
|
}, [context.audioContext]);
|
|
15236
|
-
const effectToUse =
|
|
15279
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
15237
15280
|
effectToUse(() => {
|
|
15238
15281
|
return () => {
|
|
15239
15282
|
requestAnimationFrame(() => {
|
|
@@ -15609,20 +15652,20 @@ var OffthreadVideo = ({
|
|
|
15609
15652
|
addSequenceStackTraces(OffthreadVideo);
|
|
15610
15653
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
15611
15654
|
function useRemotionContexts() {
|
|
15612
|
-
const compositionManagerCtx =
|
|
15613
|
-
const timelineContext =
|
|
15614
|
-
const setTimelineContext =
|
|
15615
|
-
const sequenceContext =
|
|
15616
|
-
const nonceContext =
|
|
15617
|
-
const canUseRemotionHooksContext =
|
|
15618
|
-
const preloadContext =
|
|
15619
|
-
const resolveCompositionContext =
|
|
15620
|
-
const renderAssetManagerContext =
|
|
15621
|
-
const sequenceManagerContext =
|
|
15622
|
-
const sequenceManagerRefContext =
|
|
15623
|
-
const visualModePropStatusesRefContext =
|
|
15624
|
-
const bufferManagerContext =
|
|
15625
|
-
const logLevelContext =
|
|
15655
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
15656
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
15657
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
15658
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
15659
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
15660
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
15661
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
15662
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
15663
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
15664
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
15665
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
15666
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15667
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15668
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15626
15669
|
return useMemo37(() => ({
|
|
15627
15670
|
compositionManagerCtx,
|
|
15628
15671
|
timelineContext,
|
|
@@ -15796,6 +15839,8 @@ var Internals = {
|
|
|
15796
15839
|
BufferingProvider,
|
|
15797
15840
|
BufferingContextReact,
|
|
15798
15841
|
getComponentsToAddStacksTo,
|
|
15842
|
+
getSequenceComponent,
|
|
15843
|
+
getSingleChildComponent,
|
|
15799
15844
|
CurrentScaleContext,
|
|
15800
15845
|
PixelDensityContext,
|
|
15801
15846
|
PreviewSizeContext,
|
|
@@ -15853,9 +15898,9 @@ var Internals = {
|
|
|
15853
15898
|
fromField
|
|
15854
15899
|
};
|
|
15855
15900
|
var flattenChildren = (children) => {
|
|
15856
|
-
const childrenArray =
|
|
15901
|
+
const childrenArray = React41.Children.toArray(children);
|
|
15857
15902
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15858
|
-
if (child.type ===
|
|
15903
|
+
if (child.type === React41.Fragment) {
|
|
15859
15904
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15860
15905
|
}
|
|
15861
15906
|
flatChildren.push(child);
|
|
@@ -15943,7 +15988,7 @@ var SeriesInner = (props2) => {
|
|
|
15943
15988
|
index: i,
|
|
15944
15989
|
childrenLength: flattenedChildren.length
|
|
15945
15990
|
});
|
|
15946
|
-
return
|
|
15991
|
+
return React42.cloneElement(castedElement, {
|
|
15947
15992
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15948
15993
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15949
15994
|
const {
|
|
@@ -16101,7 +16146,7 @@ var Still = (props2) => {
|
|
|
16101
16146
|
durationInFrames: 1,
|
|
16102
16147
|
fps: 1
|
|
16103
16148
|
};
|
|
16104
|
-
return
|
|
16149
|
+
return React43.createElement(Composition, newProps);
|
|
16105
16150
|
};
|
|
16106
16151
|
addSequenceStackTraces(Still);
|
|
16107
16152
|
var roundTo6Commas = (num) => {
|
|
@@ -16580,6 +16625,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
16580
16625
|
});
|
|
16581
16626
|
Sequence.displayName = "Sequence";
|
|
16582
16627
|
addSequenceStackTraces(Sequence);
|
|
16628
|
+
setSequenceComponent(Sequence);
|
|
16583
16629
|
addSequenceStackTraces(Composition);
|
|
16584
16630
|
addSequenceStackTraces(Folder);
|
|
16585
16631
|
|
|
@@ -19509,12 +19555,12 @@ import React72 from "react";
|
|
|
19509
19555
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19510
19556
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
19511
19557
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19512
|
-
import * as
|
|
19558
|
+
import * as React362 from "react";
|
|
19513
19559
|
import * as ReactDOM4 from "react-dom";
|
|
19514
|
-
import
|
|
19560
|
+
import React11 from "react";
|
|
19515
19561
|
import * as React8 from "react";
|
|
19516
19562
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19517
|
-
import * as
|
|
19563
|
+
import * as React92 from "react";
|
|
19518
19564
|
import * as React10 from "react";
|
|
19519
19565
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
19520
19566
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -19524,15 +19570,15 @@ import * as React162 from "react";
|
|
|
19524
19570
|
import * as React132 from "react";
|
|
19525
19571
|
import * as ReactDOM from "react-dom";
|
|
19526
19572
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
19527
|
-
import * as
|
|
19528
|
-
import * as
|
|
19573
|
+
import * as React142 from "react";
|
|
19574
|
+
import * as React15 from "react";
|
|
19529
19575
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
19530
|
-
import * as
|
|
19576
|
+
import * as React172 from "react";
|
|
19531
19577
|
import * as React18 from "react";
|
|
19532
19578
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
19533
19579
|
import * as React202 from "react";
|
|
19534
|
-
import * as
|
|
19535
|
-
import * as
|
|
19580
|
+
import * as React19 from "react";
|
|
19581
|
+
import * as React242 from "react";
|
|
19536
19582
|
import * as React212 from "react";
|
|
19537
19583
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
19538
19584
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -19550,7 +19596,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
19550
19596
|
import * as React352 from "react";
|
|
19551
19597
|
import * as React312 from "react";
|
|
19552
19598
|
import { useState as useState112 } from "react";
|
|
19553
|
-
import * as
|
|
19599
|
+
import * as React29 from "react";
|
|
19554
19600
|
import * as React302 from "react";
|
|
19555
19601
|
import * as React342 from "react";
|
|
19556
19602
|
import * as React332 from "react";
|
|
@@ -19558,22 +19604,22 @@ import * as React322 from "react";
|
|
|
19558
19604
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
19559
19605
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
19560
19606
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
19561
|
-
import * as
|
|
19607
|
+
import * as React37 from "react";
|
|
19562
19608
|
import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
19563
19609
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
19564
19610
|
import * as React49 from "react";
|
|
19565
|
-
import * as
|
|
19611
|
+
import * as React382 from "react";
|
|
19566
19612
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
19567
19613
|
import * as React47 from "react";
|
|
19568
19614
|
import React402 from "react";
|
|
19569
|
-
import * as
|
|
19615
|
+
import * as React39 from "react";
|
|
19570
19616
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
19571
19617
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
19572
19618
|
import React210 from "react";
|
|
19573
19619
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
19574
19620
|
import * as React422 from "react";
|
|
19575
19621
|
import * as React412 from "react";
|
|
19576
|
-
import * as
|
|
19622
|
+
import * as React432 from "react";
|
|
19577
19623
|
import * as ReactDOM5 from "react-dom";
|
|
19578
19624
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
19579
19625
|
import * as React44 from "react";
|
|
@@ -19625,7 +19671,7 @@ function useComposedRefs(...refs) {
|
|
|
19625
19671
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
19626
19672
|
}
|
|
19627
19673
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
19628
|
-
var use =
|
|
19674
|
+
var use = React24[" use ".trim().toString()];
|
|
19629
19675
|
function isPromiseLike(value) {
|
|
19630
19676
|
return typeof value === "object" && value !== null && "then" in value;
|
|
19631
19677
|
}
|
|
@@ -19634,25 +19680,25 @@ function isLazyComponent(element) {
|
|
|
19634
19680
|
}
|
|
19635
19681
|
function createSlot(ownerName) {
|
|
19636
19682
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19637
|
-
const Slot2 =
|
|
19683
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
19638
19684
|
let { children, ...slotProps } = props;
|
|
19639
19685
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19640
19686
|
children = use(children._payload);
|
|
19641
19687
|
}
|
|
19642
|
-
const childrenArray =
|
|
19688
|
+
const childrenArray = React24.Children.toArray(children);
|
|
19643
19689
|
const slottable = childrenArray.find(isSlottable);
|
|
19644
19690
|
if (slottable) {
|
|
19645
19691
|
const newElement = slottable.props.children;
|
|
19646
19692
|
const newChildren = childrenArray.map((child) => {
|
|
19647
19693
|
if (child === slottable) {
|
|
19648
|
-
if (
|
|
19649
|
-
return
|
|
19650
|
-
return
|
|
19694
|
+
if (React24.Children.count(newElement) > 1)
|
|
19695
|
+
return React24.Children.only(null);
|
|
19696
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
19651
19697
|
} else {
|
|
19652
19698
|
return child;
|
|
19653
19699
|
}
|
|
19654
19700
|
});
|
|
19655
|
-
return /* @__PURE__ */ jsx44(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
19701
|
+
return /* @__PURE__ */ jsx44(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
19656
19702
|
}
|
|
19657
19703
|
return /* @__PURE__ */ jsx44(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
19658
19704
|
});
|
|
@@ -19661,20 +19707,20 @@ function createSlot(ownerName) {
|
|
|
19661
19707
|
}
|
|
19662
19708
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
19663
19709
|
function createSlotClone(ownerName) {
|
|
19664
|
-
const SlotClone =
|
|
19710
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
19665
19711
|
let { children, ...slotProps } = props;
|
|
19666
19712
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19667
19713
|
children = use(children._payload);
|
|
19668
19714
|
}
|
|
19669
|
-
if (
|
|
19715
|
+
if (React24.isValidElement(children)) {
|
|
19670
19716
|
const childrenRef = getElementRef(children);
|
|
19671
19717
|
const props2 = mergeProps(slotProps, children.props);
|
|
19672
|
-
if (children.type !==
|
|
19718
|
+
if (children.type !== React24.Fragment) {
|
|
19673
19719
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
19674
19720
|
}
|
|
19675
|
-
return
|
|
19721
|
+
return React24.cloneElement(children, props2);
|
|
19676
19722
|
}
|
|
19677
|
-
return
|
|
19723
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
19678
19724
|
});
|
|
19679
19725
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
19680
19726
|
return SlotClone;
|
|
@@ -19690,7 +19736,7 @@ function createSlottable(ownerName) {
|
|
|
19690
19736
|
}
|
|
19691
19737
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
19692
19738
|
function isSlottable(child) {
|
|
19693
|
-
return
|
|
19739
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19694
19740
|
}
|
|
19695
19741
|
function mergeProps(slotProps, childProps) {
|
|
19696
19742
|
const overrideProps = { ...childProps };
|
|
@@ -19747,7 +19793,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
19747
19793
|
return childNode;
|
|
19748
19794
|
};
|
|
19749
19795
|
var useHoverTransforms = (ref, disabled) => {
|
|
19750
|
-
const [state, setState] =
|
|
19796
|
+
const [state, setState] = React33.useState({
|
|
19751
19797
|
progress: 0,
|
|
19752
19798
|
isActive: false
|
|
19753
19799
|
});
|
|
@@ -19759,7 +19805,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19759
19805
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
19760
19806
|
}
|
|
19761
19807
|
}, [disabled, eventTarget]);
|
|
19762
|
-
|
|
19808
|
+
React33.useEffect(() => {
|
|
19763
19809
|
const element = ref.current;
|
|
19764
19810
|
if (!element)
|
|
19765
19811
|
return;
|
|
@@ -19834,8 +19880,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19834
19880
|
return state;
|
|
19835
19881
|
};
|
|
19836
19882
|
var useClickTransforms = (ref) => {
|
|
19837
|
-
const [hoverProgress, setHoverProgress] =
|
|
19838
|
-
|
|
19883
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
19884
|
+
React33.useEffect(() => {
|
|
19839
19885
|
const element = getChildNodeFrom(ref.current);
|
|
19840
19886
|
if (!element) {
|
|
19841
19887
|
return;
|
|
@@ -20411,7 +20457,7 @@ function composeRefs2(...refs) {
|
|
|
20411
20457
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
20412
20458
|
}
|
|
20413
20459
|
function useComposedRefs2(...refs) {
|
|
20414
|
-
return
|
|
20460
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
20415
20461
|
}
|
|
20416
20462
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
20417
20463
|
const { children, ...slotProps } = props;
|
|
@@ -20493,13 +20539,13 @@ function createCollection(name) {
|
|
|
20493
20539
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
20494
20540
|
const CollectionProvider = (props) => {
|
|
20495
20541
|
const { scope, children } = props;
|
|
20496
|
-
const ref =
|
|
20497
|
-
const itemMap =
|
|
20542
|
+
const ref = React11.useRef(null);
|
|
20543
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
20498
20544
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
20499
20545
|
};
|
|
20500
20546
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
20501
20547
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
20502
|
-
const CollectionSlot =
|
|
20548
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20503
20549
|
const { scope, children } = props;
|
|
20504
20550
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
20505
20551
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -20508,12 +20554,12 @@ function createCollection(name) {
|
|
|
20508
20554
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
20509
20555
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
20510
20556
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
20511
|
-
const CollectionItemSlot =
|
|
20557
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20512
20558
|
const { scope, children, ...itemData } = props;
|
|
20513
|
-
const ref =
|
|
20559
|
+
const ref = React11.useRef(null);
|
|
20514
20560
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20515
20561
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
20516
|
-
|
|
20562
|
+
React11.useEffect(() => {
|
|
20517
20563
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
20518
20564
|
return () => void context.itemMap.delete(ref);
|
|
20519
20565
|
});
|
|
@@ -20522,7 +20568,7 @@ function createCollection(name) {
|
|
|
20522
20568
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
20523
20569
|
function useCollection(scope) {
|
|
20524
20570
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
20525
|
-
const getItems =
|
|
20571
|
+
const getItems = React11.useCallback(() => {
|
|
20526
20572
|
const collectionNode = context.collectionRef.current;
|
|
20527
20573
|
if (!collectionNode)
|
|
20528
20574
|
return [];
|
|
@@ -20579,15 +20625,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20579
20625
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
20580
20626
|
}
|
|
20581
20627
|
function useCallbackRef(callback) {
|
|
20582
|
-
const callbackRef =
|
|
20583
|
-
|
|
20628
|
+
const callbackRef = React142.useRef(callback);
|
|
20629
|
+
React142.useEffect(() => {
|
|
20584
20630
|
callbackRef.current = callback;
|
|
20585
20631
|
});
|
|
20586
|
-
return
|
|
20632
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20587
20633
|
}
|
|
20588
20634
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20589
20635
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
20590
|
-
|
|
20636
|
+
React15.useEffect(() => {
|
|
20591
20637
|
const handleKeyDown = (event) => {
|
|
20592
20638
|
if (event.key === "Escape") {
|
|
20593
20639
|
onEscapeKeyDown(event);
|
|
@@ -20794,7 +20840,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
20794
20840
|
}
|
|
20795
20841
|
var count = 0;
|
|
20796
20842
|
function useFocusGuards() {
|
|
20797
|
-
|
|
20843
|
+
React172.useEffect(() => {
|
|
20798
20844
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20799
20845
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20800
20846
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -21029,7 +21075,7 @@ function arrayRemove(array, item) {
|
|
|
21029
21075
|
function removeLinks(items) {
|
|
21030
21076
|
return items.filter((item) => item.tagName !== "A");
|
|
21031
21077
|
}
|
|
21032
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
21078
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
21033
21079
|
var useReactId = React202["useId".toString()] || (() => {
|
|
21034
21080
|
return;
|
|
21035
21081
|
});
|
|
@@ -22881,17 +22927,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
22881
22927
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22882
22928
|
var Popper = (props) => {
|
|
22883
22929
|
const { __scopePopper, children } = props;
|
|
22884
|
-
const [anchor, setAnchor] =
|
|
22930
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
22885
22931
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22886
22932
|
};
|
|
22887
22933
|
Popper.displayName = POPPER_NAME;
|
|
22888
22934
|
var ANCHOR_NAME = "PopperAnchor";
|
|
22889
|
-
var PopperAnchor =
|
|
22935
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
22890
22936
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
22891
22937
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
22892
|
-
const ref =
|
|
22938
|
+
const ref = React242.useRef(null);
|
|
22893
22939
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
22894
|
-
|
|
22940
|
+
React242.useEffect(() => {
|
|
22895
22941
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
22896
22942
|
});
|
|
22897
22943
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -22899,7 +22945,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
22899
22945
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
22900
22946
|
var CONTENT_NAME = "PopperContent";
|
|
22901
22947
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
22902
|
-
var PopperContent =
|
|
22948
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
22903
22949
|
const {
|
|
22904
22950
|
__scopePopper,
|
|
22905
22951
|
side = "bottom",
|
|
@@ -22917,9 +22963,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22917
22963
|
...contentProps
|
|
22918
22964
|
} = props;
|
|
22919
22965
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
22920
|
-
const [content, setContent] =
|
|
22966
|
+
const [content, setContent] = React242.useState(null);
|
|
22921
22967
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
22922
|
-
const [arrow4, setArrow] =
|
|
22968
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
22923
22969
|
const arrowSize = useSize(arrow4);
|
|
22924
22970
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
22925
22971
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -22979,7 +23025,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22979
23025
|
const arrowX = middlewareData.arrow?.x;
|
|
22980
23026
|
const arrowY = middlewareData.arrow?.y;
|
|
22981
23027
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
22982
|
-
const [contentZIndex, setContentZIndex] =
|
|
23028
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
22983
23029
|
useLayoutEffect22(() => {
|
|
22984
23030
|
if (content)
|
|
22985
23031
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -23030,7 +23076,7 @@ var OPPOSITE_SIDE = {
|
|
|
23030
23076
|
bottom: "top",
|
|
23031
23077
|
left: "right"
|
|
23032
23078
|
};
|
|
23033
|
-
var PopperArrow =
|
|
23079
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
23034
23080
|
const { __scopePopper, ...arrowProps } = props;
|
|
23035
23081
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
23036
23082
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -23373,7 +23419,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
23373
23419
|
ref.callback = callback;
|
|
23374
23420
|
return ref.facade;
|
|
23375
23421
|
}
|
|
23376
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
23422
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
23377
23423
|
var currentValues = new WeakMap;
|
|
23378
23424
|
function useMergeRefs(refs, defaultValue) {
|
|
23379
23425
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -24009,9 +24055,9 @@ var Select = (props) => {
|
|
|
24009
24055
|
required
|
|
24010
24056
|
} = props;
|
|
24011
24057
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24012
|
-
const [trigger, setTrigger] =
|
|
24013
|
-
const [valueNode, setValueNode] =
|
|
24014
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
24058
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
24059
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
24060
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
24015
24061
|
const direction = useDirection(dir);
|
|
24016
24062
|
const [open = false, setOpen] = useControllableState({
|
|
24017
24063
|
prop: openProp,
|
|
@@ -24023,9 +24069,9 @@ var Select = (props) => {
|
|
|
24023
24069
|
defaultProp: defaultValue,
|
|
24024
24070
|
onChange: onValueChange
|
|
24025
24071
|
});
|
|
24026
|
-
const triggerPointerDownPosRef =
|
|
24072
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
24027
24073
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
24028
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
24074
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
24029
24075
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
24030
24076
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
24031
24077
|
required,
|
|
@@ -24047,10 +24093,10 @@ var Select = (props) => {
|
|
|
24047
24093
|
children: [
|
|
24048
24094
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
24049
24095
|
scope: props.__scopeSelect,
|
|
24050
|
-
onNativeOptionAdd:
|
|
24096
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
24051
24097
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
24052
24098
|
}, []),
|
|
24053
|
-
onNativeOptionRemove:
|
|
24099
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
24054
24100
|
setNativeOptionsSet((prev) => {
|
|
24055
24101
|
const optionsSet = new Set(prev);
|
|
24056
24102
|
optionsSet.delete(option);
|
|
@@ -24078,7 +24124,7 @@ var Select = (props) => {
|
|
|
24078
24124
|
};
|
|
24079
24125
|
Select.displayName = SELECT_NAME;
|
|
24080
24126
|
var TRIGGER_NAME = "SelectTrigger";
|
|
24081
|
-
var SelectTrigger =
|
|
24127
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
24082
24128
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
24083
24129
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24084
24130
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -24146,7 +24192,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
24146
24192
|
});
|
|
24147
24193
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
24148
24194
|
var VALUE_NAME = "SelectValue";
|
|
24149
|
-
var SelectValue =
|
|
24195
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
24150
24196
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
24151
24197
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
24152
24198
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -24164,7 +24210,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
24164
24210
|
});
|
|
24165
24211
|
SelectValue.displayName = VALUE_NAME;
|
|
24166
24212
|
var ICON_NAME = "SelectIcon";
|
|
24167
|
-
var SelectIcon =
|
|
24213
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
24168
24214
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
24169
24215
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
24170
24216
|
});
|
|
@@ -24175,9 +24221,9 @@ var SelectPortal = (props) => {
|
|
|
24175
24221
|
};
|
|
24176
24222
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
24177
24223
|
var CONTENT_NAME2 = "SelectContent";
|
|
24178
|
-
var SelectContent =
|
|
24224
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
24179
24225
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
24180
|
-
const [fragment, setFragment] =
|
|
24226
|
+
const [fragment, setFragment] = React362.useState();
|
|
24181
24227
|
useLayoutEffect22(() => {
|
|
24182
24228
|
setFragment(new DocumentFragment);
|
|
24183
24229
|
}, []);
|
|
@@ -24191,7 +24237,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
24191
24237
|
var CONTENT_MARGIN = 10;
|
|
24192
24238
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
24193
24239
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
24194
|
-
var SelectContentImpl =
|
|
24240
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24195
24241
|
const {
|
|
24196
24242
|
__scopeSelect,
|
|
24197
24243
|
position = "item-aligned",
|
|
@@ -24211,20 +24257,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24211
24257
|
...contentProps
|
|
24212
24258
|
} = props;
|
|
24213
24259
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24214
|
-
const [content, setContent] =
|
|
24215
|
-
const [viewport, setViewport] =
|
|
24260
|
+
const [content, setContent] = React362.useState(null);
|
|
24261
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
24216
24262
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24217
|
-
const [selectedItem, setSelectedItem] =
|
|
24218
|
-
const [selectedItemText, setSelectedItemText] =
|
|
24263
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
24264
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
24219
24265
|
const getItems = useCollection(__scopeSelect);
|
|
24220
|
-
const [isPositioned, setIsPositioned] =
|
|
24221
|
-
const firstValidItemFoundRef =
|
|
24222
|
-
|
|
24266
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
24267
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
24268
|
+
React362.useEffect(() => {
|
|
24223
24269
|
if (content)
|
|
24224
24270
|
return hideOthers(content);
|
|
24225
24271
|
}, [content]);
|
|
24226
24272
|
useFocusGuards();
|
|
24227
|
-
const focusFirst2 =
|
|
24273
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
24228
24274
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
24229
24275
|
const [lastItem] = restItems.slice(-1);
|
|
24230
24276
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -24241,14 +24287,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24241
24287
|
return;
|
|
24242
24288
|
}
|
|
24243
24289
|
}, [getItems, viewport]);
|
|
24244
|
-
const focusSelectedItem =
|
|
24245
|
-
|
|
24290
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
24291
|
+
React362.useEffect(() => {
|
|
24246
24292
|
if (isPositioned) {
|
|
24247
24293
|
focusSelectedItem();
|
|
24248
24294
|
}
|
|
24249
24295
|
}, [isPositioned, focusSelectedItem]);
|
|
24250
24296
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
24251
|
-
|
|
24297
|
+
React362.useEffect(() => {
|
|
24252
24298
|
if (content) {
|
|
24253
24299
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
24254
24300
|
const handlePointerMove = (event) => {
|
|
@@ -24278,7 +24324,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24278
24324
|
};
|
|
24279
24325
|
}
|
|
24280
24326
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
24281
|
-
|
|
24327
|
+
React362.useEffect(() => {
|
|
24282
24328
|
const close = () => onOpenChange(false);
|
|
24283
24329
|
window.addEventListener("blur", close);
|
|
24284
24330
|
window.addEventListener("resize", close);
|
|
@@ -24295,7 +24341,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24295
24341
|
setTimeout(() => nextItem.ref.current.focus());
|
|
24296
24342
|
}
|
|
24297
24343
|
});
|
|
24298
|
-
const itemRefCallback =
|
|
24344
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24299
24345
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24300
24346
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24301
24347
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24304,8 +24350,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24304
24350
|
firstValidItemFoundRef.current = true;
|
|
24305
24351
|
}
|
|
24306
24352
|
}, [context.value]);
|
|
24307
|
-
const handleItemLeave =
|
|
24308
|
-
const itemTextRefCallback =
|
|
24353
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
24354
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24309
24355
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24310
24356
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24311
24357
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24400,18 +24446,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24400
24446
|
});
|
|
24401
24447
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
24402
24448
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
24403
|
-
var SelectItemAlignedPosition =
|
|
24449
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24404
24450
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
24405
24451
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24406
24452
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
24407
|
-
const [contentWrapper, setContentWrapper] =
|
|
24408
|
-
const [content, setContent] =
|
|
24453
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
24454
|
+
const [content, setContent] = React362.useState(null);
|
|
24409
24455
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24410
24456
|
const getItems = useCollection(__scopeSelect);
|
|
24411
|
-
const shouldExpandOnScrollRef =
|
|
24412
|
-
const shouldRepositionRef =
|
|
24457
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
24458
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
24413
24459
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
24414
|
-
const position =
|
|
24460
|
+
const position = React362.useCallback(() => {
|
|
24415
24461
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
24416
24462
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
24417
24463
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -24492,12 +24538,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24492
24538
|
onPlaced
|
|
24493
24539
|
]);
|
|
24494
24540
|
useLayoutEffect22(() => position(), [position]);
|
|
24495
|
-
const [contentZIndex, setContentZIndex] =
|
|
24541
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
24496
24542
|
useLayoutEffect22(() => {
|
|
24497
24543
|
if (content)
|
|
24498
24544
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
24499
24545
|
}, [content]);
|
|
24500
|
-
const handleScrollButtonChange =
|
|
24546
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
24501
24547
|
if (node && shouldRepositionRef.current === true) {
|
|
24502
24548
|
position();
|
|
24503
24549
|
focusSelectedItem?.();
|
|
@@ -24531,7 +24577,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24531
24577
|
});
|
|
24532
24578
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
24533
24579
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
24534
|
-
var SelectPopperPosition =
|
|
24580
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24535
24581
|
const {
|
|
24536
24582
|
__scopeSelect,
|
|
24537
24583
|
align = "start",
|
|
@@ -24561,12 +24607,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24561
24607
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
24562
24608
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
24563
24609
|
var VIEWPORT_NAME = "SelectViewport";
|
|
24564
|
-
var SelectViewport =
|
|
24610
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
24565
24611
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
24566
24612
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
24567
24613
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
24568
24614
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
24569
|
-
const prevScrollTopRef =
|
|
24615
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
24570
24616
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
24571
24617
|
/* @__PURE__ */ jsx242("style", {
|
|
24572
24618
|
dangerouslySetInnerHTML: {
|
|
@@ -24615,14 +24661,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
24615
24661
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
24616
24662
|
var GROUP_NAME = "SelectGroup";
|
|
24617
24663
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
24618
|
-
var SelectGroup =
|
|
24664
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
24619
24665
|
const { __scopeSelect, ...groupProps } = props;
|
|
24620
24666
|
const groupId = useId();
|
|
24621
24667
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
24622
24668
|
});
|
|
24623
24669
|
SelectGroup.displayName = GROUP_NAME;
|
|
24624
24670
|
var LABEL_NAME = "SelectLabel";
|
|
24625
|
-
var SelectLabel =
|
|
24671
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
24626
24672
|
const { __scopeSelect, ...labelProps } = props;
|
|
24627
24673
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
24628
24674
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -24630,7 +24676,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
24630
24676
|
SelectLabel.displayName = LABEL_NAME;
|
|
24631
24677
|
var ITEM_NAME = "SelectItem";
|
|
24632
24678
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
24633
|
-
var SelectItem =
|
|
24679
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
24634
24680
|
const {
|
|
24635
24681
|
__scopeSelect,
|
|
24636
24682
|
value,
|
|
@@ -24641,8 +24687,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24641
24687
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
24642
24688
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
24643
24689
|
const isSelected = context.value === value;
|
|
24644
|
-
const [textValue, setTextValue] =
|
|
24645
|
-
const [isFocused, setIsFocused] =
|
|
24690
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
24691
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
24646
24692
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
24647
24693
|
const textId = useId();
|
|
24648
24694
|
const handleSelect = () => {
|
|
@@ -24660,7 +24706,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24660
24706
|
disabled,
|
|
24661
24707
|
textId,
|
|
24662
24708
|
isSelected,
|
|
24663
|
-
onItemTextChange:
|
|
24709
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
24664
24710
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
24665
24711
|
}, []),
|
|
24666
24712
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -24709,16 +24755,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24709
24755
|
});
|
|
24710
24756
|
SelectItem.displayName = ITEM_NAME;
|
|
24711
24757
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
24712
|
-
var SelectItemText =
|
|
24758
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
24713
24759
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
24714
24760
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24715
24761
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24716
24762
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24717
24763
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24718
|
-
const [itemTextNode, setItemTextNode] =
|
|
24764
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
24719
24765
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
24720
24766
|
const textContent = itemTextNode?.textContent;
|
|
24721
|
-
const nativeOption =
|
|
24767
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
24722
24768
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
24723
24769
|
useLayoutEffect22(() => {
|
|
24724
24770
|
onNativeOptionAdd(nativeOption);
|
|
@@ -24731,17 +24777,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
24731
24777
|
});
|
|
24732
24778
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
24733
24779
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
24734
|
-
var SelectItemIndicator =
|
|
24780
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
24735
24781
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
24736
24782
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
24737
24783
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
24738
24784
|
});
|
|
24739
24785
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
24740
24786
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
24741
|
-
var SelectScrollUpButton =
|
|
24787
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
24742
24788
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24743
24789
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24744
|
-
const [canScrollUp, setCanScrollUp] =
|
|
24790
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
24745
24791
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24746
24792
|
useLayoutEffect22(() => {
|
|
24747
24793
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24769,10 +24815,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24769
24815
|
});
|
|
24770
24816
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
24771
24817
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
24772
|
-
var SelectScrollDownButton =
|
|
24818
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
24773
24819
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24774
24820
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24775
|
-
const [canScrollDown, setCanScrollDown] =
|
|
24821
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
24776
24822
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24777
24823
|
useLayoutEffect22(() => {
|
|
24778
24824
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24800,18 +24846,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24800
24846
|
}) : null;
|
|
24801
24847
|
});
|
|
24802
24848
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
24803
|
-
var SelectScrollButtonImpl =
|
|
24849
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24804
24850
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
24805
24851
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
24806
|
-
const autoScrollTimerRef =
|
|
24852
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
24807
24853
|
const getItems = useCollection(__scopeSelect);
|
|
24808
|
-
const clearAutoScrollTimer =
|
|
24854
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
24809
24855
|
if (autoScrollTimerRef.current !== null) {
|
|
24810
24856
|
window.clearInterval(autoScrollTimerRef.current);
|
|
24811
24857
|
autoScrollTimerRef.current = null;
|
|
24812
24858
|
}
|
|
24813
24859
|
}, []);
|
|
24814
|
-
|
|
24860
|
+
React362.useEffect(() => {
|
|
24815
24861
|
return () => clearAutoScrollTimer();
|
|
24816
24862
|
}, [clearAutoScrollTimer]);
|
|
24817
24863
|
useLayoutEffect22(() => {
|
|
@@ -24840,13 +24886,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24840
24886
|
});
|
|
24841
24887
|
});
|
|
24842
24888
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
24843
|
-
var SelectSeparator =
|
|
24889
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
24844
24890
|
const { __scopeSelect, ...separatorProps } = props;
|
|
24845
24891
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
24846
24892
|
});
|
|
24847
24893
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
24848
24894
|
var ARROW_NAME2 = "SelectArrow";
|
|
24849
|
-
var SelectArrow =
|
|
24895
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
24850
24896
|
const { __scopeSelect, ...arrowProps } = props;
|
|
24851
24897
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24852
24898
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -24857,12 +24903,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
24857
24903
|
function shouldShowPlaceholder(value) {
|
|
24858
24904
|
return value === "" || value === undefined;
|
|
24859
24905
|
}
|
|
24860
|
-
var BubbleSelect =
|
|
24906
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
24861
24907
|
const { value, ...selectProps } = props;
|
|
24862
|
-
const ref =
|
|
24908
|
+
const ref = React362.useRef(null);
|
|
24863
24909
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24864
24910
|
const prevValue = usePrevious(value);
|
|
24865
|
-
|
|
24911
|
+
React362.useEffect(() => {
|
|
24866
24912
|
const select = ref.current;
|
|
24867
24913
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
24868
24914
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -24878,9 +24924,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
24878
24924
|
BubbleSelect.displayName = "BubbleSelect";
|
|
24879
24925
|
function useTypeaheadSearch(onSearchChange) {
|
|
24880
24926
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
24881
|
-
const searchRef =
|
|
24882
|
-
const timerRef =
|
|
24883
|
-
const handleTypeaheadSearch =
|
|
24927
|
+
const searchRef = React362.useRef("");
|
|
24928
|
+
const timerRef = React362.useRef(0);
|
|
24929
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
24884
24930
|
const search = searchRef.current + key;
|
|
24885
24931
|
handleSearchChange(search);
|
|
24886
24932
|
(function updateSearch(value) {
|
|
@@ -24890,11 +24936,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
24890
24936
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
24891
24937
|
})(search);
|
|
24892
24938
|
}, [handleSearchChange]);
|
|
24893
|
-
const resetTypeahead =
|
|
24939
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
24894
24940
|
searchRef.current = "";
|
|
24895
24941
|
window.clearTimeout(timerRef.current);
|
|
24896
24942
|
}, []);
|
|
24897
|
-
|
|
24943
|
+
React362.useEffect(() => {
|
|
24898
24944
|
return () => window.clearTimeout(timerRef.current);
|
|
24899
24945
|
}, []);
|
|
24900
24946
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -24983,7 +25029,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
24983
25029
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
24984
25030
|
var Select2 = Root222;
|
|
24985
25031
|
var SelectValue2 = Value;
|
|
24986
|
-
var SelectTrigger2 =
|
|
25032
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
|
|
24987
25033
|
ref,
|
|
24988
25034
|
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),
|
|
24989
25035
|
...props,
|
|
@@ -24998,7 +25044,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
24998
25044
|
]
|
|
24999
25045
|
}));
|
|
25000
25046
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
25001
|
-
var SelectScrollUpButton2 =
|
|
25047
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
25002
25048
|
ref,
|
|
25003
25049
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
25004
25050
|
...props,
|
|
@@ -25007,7 +25053,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
25007
25053
|
})
|
|
25008
25054
|
}));
|
|
25009
25055
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
25010
|
-
var SelectScrollDownButton2 =
|
|
25056
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
25011
25057
|
ref,
|
|
25012
25058
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
25013
25059
|
...props,
|
|
@@ -25016,7 +25062,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
25016
25062
|
})
|
|
25017
25063
|
}));
|
|
25018
25064
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
25019
|
-
var SelectContent2 =
|
|
25065
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
25020
25066
|
children: /* @__PURE__ */ jsxs52(Content2, {
|
|
25021
25067
|
ref,
|
|
25022
25068
|
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),
|
|
@@ -25033,13 +25079,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
25033
25079
|
})
|
|
25034
25080
|
}));
|
|
25035
25081
|
SelectContent2.displayName = Content2.displayName;
|
|
25036
|
-
var SelectLabel2 =
|
|
25082
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
25037
25083
|
ref,
|
|
25038
25084
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
25039
25085
|
...props
|
|
25040
25086
|
}));
|
|
25041
25087
|
SelectLabel2.displayName = Label.displayName;
|
|
25042
|
-
var SelectItem2 =
|
|
25088
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
|
|
25043
25089
|
ref,
|
|
25044
25090
|
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),
|
|
25045
25091
|
...props,
|
|
@@ -25058,7 +25104,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
25058
25104
|
]
|
|
25059
25105
|
}));
|
|
25060
25106
|
SelectItem2.displayName = Item.displayName;
|
|
25061
|
-
var SelectSeparator2 =
|
|
25107
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
25062
25108
|
ref,
|
|
25063
25109
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
25064
25110
|
...props
|
|
@@ -25091,19 +25137,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
25091
25137
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
25092
25138
|
let defaultContexts = [];
|
|
25093
25139
|
function createContext32(rootComponentName, defaultContext) {
|
|
25094
|
-
const BaseContext =
|
|
25140
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
25095
25141
|
const index2 = defaultContexts.length;
|
|
25096
25142
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
25097
25143
|
const Provider = (props) => {
|
|
25098
25144
|
const { scope, children, ...context } = props;
|
|
25099
25145
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
25100
|
-
const value =
|
|
25146
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
25101
25147
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
25102
25148
|
};
|
|
25103
25149
|
Provider.displayName = rootComponentName + "Provider";
|
|
25104
25150
|
function useContext222(consumerName, scope) {
|
|
25105
25151
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
25106
|
-
const context =
|
|
25152
|
+
const context = React382.useContext(Context);
|
|
25107
25153
|
if (context)
|
|
25108
25154
|
return context;
|
|
25109
25155
|
if (defaultContext !== undefined)
|
|
@@ -25114,11 +25160,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
25114
25160
|
}
|
|
25115
25161
|
const createScope = () => {
|
|
25116
25162
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
25117
|
-
return
|
|
25163
|
+
return React382.createContext(defaultContext);
|
|
25118
25164
|
});
|
|
25119
25165
|
return function useScope(scope) {
|
|
25120
25166
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
25121
|
-
return
|
|
25167
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
25122
25168
|
};
|
|
25123
25169
|
};
|
|
25124
25170
|
createScope.scopeName = scopeName;
|
|
@@ -25139,7 +25185,7 @@ function composeContextScopes2(...scopes) {
|
|
|
25139
25185
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
25140
25186
|
return { ...nextScopes2, ...currentScope };
|
|
25141
25187
|
}, {});
|
|
25142
|
-
return
|
|
25188
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
25143
25189
|
};
|
|
25144
25190
|
};
|
|
25145
25191
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -25147,22 +25193,22 @@ function composeContextScopes2(...scopes) {
|
|
|
25147
25193
|
}
|
|
25148
25194
|
function createSlot2(ownerName) {
|
|
25149
25195
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
25150
|
-
const Slot22 =
|
|
25196
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
25151
25197
|
const { children, ...slotProps } = props;
|
|
25152
|
-
const childrenArray =
|
|
25198
|
+
const childrenArray = React39.Children.toArray(children);
|
|
25153
25199
|
const slottable = childrenArray.find(isSlottable3);
|
|
25154
25200
|
if (slottable) {
|
|
25155
25201
|
const newElement = slottable.props.children;
|
|
25156
25202
|
const newChildren = childrenArray.map((child) => {
|
|
25157
25203
|
if (child === slottable) {
|
|
25158
|
-
if (
|
|
25159
|
-
return
|
|
25160
|
-
return
|
|
25204
|
+
if (React39.Children.count(newElement) > 1)
|
|
25205
|
+
return React39.Children.only(null);
|
|
25206
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
25161
25207
|
} else {
|
|
25162
25208
|
return child;
|
|
25163
25209
|
}
|
|
25164
25210
|
});
|
|
25165
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
25211
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
25166
25212
|
}
|
|
25167
25213
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
25168
25214
|
});
|
|
@@ -25170,24 +25216,24 @@ function createSlot2(ownerName) {
|
|
|
25170
25216
|
return Slot22;
|
|
25171
25217
|
}
|
|
25172
25218
|
function createSlotClone2(ownerName) {
|
|
25173
|
-
const SlotClone2 =
|
|
25219
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
25174
25220
|
const { children, ...slotProps } = props;
|
|
25175
|
-
if (
|
|
25221
|
+
if (React39.isValidElement(children)) {
|
|
25176
25222
|
const childrenRef = getElementRef3(children);
|
|
25177
25223
|
const props2 = mergeProps3(slotProps, children.props);
|
|
25178
|
-
if (children.type !==
|
|
25224
|
+
if (children.type !== React39.Fragment) {
|
|
25179
25225
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
25180
25226
|
}
|
|
25181
|
-
return
|
|
25227
|
+
return React39.cloneElement(children, props2);
|
|
25182
25228
|
}
|
|
25183
|
-
return
|
|
25229
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
25184
25230
|
});
|
|
25185
25231
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
25186
25232
|
return SlotClone2;
|
|
25187
25233
|
}
|
|
25188
25234
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
25189
25235
|
function isSlottable3(child) {
|
|
25190
|
-
return
|
|
25236
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
25191
25237
|
}
|
|
25192
25238
|
function mergeProps3(slotProps, childProps) {
|
|
25193
25239
|
const overrideProps = { ...childProps };
|
|
@@ -25615,7 +25661,7 @@ var NODES2 = [
|
|
|
25615
25661
|
];
|
|
25616
25662
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
25617
25663
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
25618
|
-
const Node2 =
|
|
25664
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
25619
25665
|
const { asChild, ...primitiveProps } = props;
|
|
25620
25666
|
const Comp = asChild ? Slot3 : node;
|
|
25621
25667
|
if (typeof window !== "undefined") {
|