@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
|
@@ -17367,7 +17367,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
17367
17367
|
});
|
|
17368
17368
|
|
|
17369
17369
|
// ../design/dist/esm/index.mjs
|
|
17370
|
-
import * as
|
|
17370
|
+
import * as React24 from "react";
|
|
17371
17371
|
import * as React3 from "react";
|
|
17372
17372
|
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
17373
17373
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import
|
|
18715
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -21505,6 +21505,7 @@ import * as React6 from "react";
|
|
|
21505
21505
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
21506
21506
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
21507
21507
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
21508
|
+
import React9 from "react";
|
|
21508
21509
|
import {
|
|
21509
21510
|
forwardRef as forwardRef3,
|
|
21510
21511
|
useCallback as useCallback6,
|
|
@@ -21530,11 +21531,11 @@ import { useContext as useContext13 } from "react";
|
|
|
21530
21531
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
21531
21532
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
21532
21533
|
import { createContext as createContext14 } from "react";
|
|
21533
|
-
import
|
|
21534
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
21534
21535
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
21535
|
-
import
|
|
21536
|
+
import React13, { createContext as createContext15 } from "react";
|
|
21536
21537
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
21537
|
-
import
|
|
21538
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
21538
21539
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
21539
21540
|
import { createContext as createContext16 } from "react";
|
|
21540
21541
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -21546,7 +21547,7 @@ import {
|
|
|
21546
21547
|
useRef as useRef9,
|
|
21547
21548
|
useState as useState6
|
|
21548
21549
|
} from "react";
|
|
21549
|
-
import
|
|
21550
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
21550
21551
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
21551
21552
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
21552
21553
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -21562,7 +21563,7 @@ import {
|
|
|
21562
21563
|
} from "react";
|
|
21563
21564
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
21564
21565
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
21565
|
-
import
|
|
21566
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
21566
21567
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
21567
21568
|
import { useContext as useContext19 } from "react";
|
|
21568
21569
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -21570,7 +21571,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
21570
21571
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
21571
21572
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
21572
21573
|
import { useCallback as useCallback13 } from "react";
|
|
21573
|
-
import
|
|
21574
|
+
import React23, {
|
|
21574
21575
|
forwardRef as forwardRef5,
|
|
21575
21576
|
useContext as useContext28,
|
|
21576
21577
|
useEffect as useEffect14,
|
|
@@ -21580,7 +21581,7 @@ import React22, {
|
|
|
21580
21581
|
useState as useState14
|
|
21581
21582
|
} from "react";
|
|
21582
21583
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
21583
|
-
import
|
|
21584
|
+
import React20, {
|
|
21584
21585
|
createContext as createContext21,
|
|
21585
21586
|
createRef as createRef2,
|
|
21586
21587
|
useCallback as useCallback9,
|
|
@@ -21604,7 +21605,7 @@ import {
|
|
|
21604
21605
|
} from "react";
|
|
21605
21606
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
21606
21607
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
21607
|
-
import
|
|
21608
|
+
import React21, {
|
|
21608
21609
|
useCallback as useCallback10,
|
|
21609
21610
|
useContext as useContext24,
|
|
21610
21611
|
useEffect as useEffect9,
|
|
@@ -21614,7 +21615,7 @@ import React20, {
|
|
|
21614
21615
|
useState as useState12
|
|
21615
21616
|
} from "react";
|
|
21616
21617
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
21617
|
-
import
|
|
21618
|
+
import React22 from "react";
|
|
21618
21619
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
21619
21620
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
21620
21621
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -21672,10 +21673,10 @@ import {
|
|
|
21672
21673
|
useState as useState18
|
|
21673
21674
|
} from "react";
|
|
21674
21675
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21675
|
-
import
|
|
21676
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
21676
21677
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
21677
21678
|
import { createRef as createRef3 } from "react";
|
|
21678
|
-
import
|
|
21679
|
+
import React31 from "react";
|
|
21679
21680
|
import {
|
|
21680
21681
|
useCallback as useCallback21,
|
|
21681
21682
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -21684,14 +21685,14 @@ import {
|
|
|
21684
21685
|
useState as useState19
|
|
21685
21686
|
} from "react";
|
|
21686
21687
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21687
|
-
import
|
|
21688
|
+
import React32 from "react";
|
|
21688
21689
|
import { useMemo as useMemo34 } from "react";
|
|
21689
21690
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
21690
21691
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
21691
21692
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
21692
|
-
import
|
|
21693
|
-
import
|
|
21694
|
-
import
|
|
21693
|
+
import React34 from "react";
|
|
21694
|
+
import React35, { createContext as createContext25 } from "react";
|
|
21695
|
+
import React36, { useContext as useContext35 } from "react";
|
|
21695
21696
|
import { useCallback as useCallback24 } from "react";
|
|
21696
21697
|
import {
|
|
21697
21698
|
useCallback as useCallback22,
|
|
@@ -21702,7 +21703,7 @@ import {
|
|
|
21702
21703
|
useState as useState20
|
|
21703
21704
|
} from "react";
|
|
21704
21705
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21705
|
-
import
|
|
21706
|
+
import React38, {
|
|
21706
21707
|
forwardRef as forwardRef13,
|
|
21707
21708
|
useCallback as useCallback23,
|
|
21708
21709
|
useContext as useContext37,
|
|
@@ -21715,15 +21716,15 @@ import React37, {
|
|
|
21715
21716
|
import { useEffect as useEffect18 } from "react";
|
|
21716
21717
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
21717
21718
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21718
|
-
import
|
|
21719
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
21719
21720
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
21720
|
-
import
|
|
21721
|
+
import React42, {
|
|
21721
21722
|
forwardRef as forwardRef14,
|
|
21722
21723
|
useMemo as useMemo38
|
|
21723
21724
|
} from "react";
|
|
21724
|
-
import
|
|
21725
|
+
import React41 from "react";
|
|
21725
21726
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
21726
|
-
import
|
|
21727
|
+
import React43 from "react";
|
|
21727
21728
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
21728
21729
|
import {
|
|
21729
21730
|
forwardRef as forwardRef15,
|
|
@@ -22801,6 +22802,7 @@ var InnerComposition = ({
|
|
|
22801
22802
|
}
|
|
22802
22803
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
22803
22804
|
const stack = compProps.stack ?? null;
|
|
22805
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
22804
22806
|
useEffect2(() => {
|
|
22805
22807
|
if (!id) {
|
|
22806
22808
|
throw new Error("No id for composition passed.");
|
|
@@ -22818,6 +22820,7 @@ var InnerComposition = ({
|
|
|
22818
22820
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
22819
22821
|
nonce: nonce.get(),
|
|
22820
22822
|
parentFolderName: parentName,
|
|
22823
|
+
componentFromProps,
|
|
22821
22824
|
schema: schema ?? null,
|
|
22822
22825
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
22823
22826
|
stack
|
|
@@ -22836,6 +22839,7 @@ var InnerComposition = ({
|
|
|
22836
22839
|
width,
|
|
22837
22840
|
nonce,
|
|
22838
22841
|
parentName,
|
|
22842
|
+
componentFromProps,
|
|
22839
22843
|
schema,
|
|
22840
22844
|
compProps.calculateMetadata,
|
|
22841
22845
|
stack,
|
|
@@ -22894,11 +22898,30 @@ var Composition = (props) => {
|
|
|
22894
22898
|
});
|
|
22895
22899
|
};
|
|
22896
22900
|
var componentsToAddStacksTo = [];
|
|
22901
|
+
var sequenceComponent = null;
|
|
22897
22902
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
22898
22903
|
var addSequenceStackTraces = (component) => {
|
|
22899
22904
|
componentsToAddStacksTo.push(component);
|
|
22900
22905
|
};
|
|
22901
|
-
var
|
|
22906
|
+
var setSequenceComponent = (component) => {
|
|
22907
|
+
sequenceComponent = component;
|
|
22908
|
+
};
|
|
22909
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
22910
|
+
var getSingleChildComponent = (children) => {
|
|
22911
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
22912
|
+
if (mountedChildren.length !== 1) {
|
|
22913
|
+
return null;
|
|
22914
|
+
}
|
|
22915
|
+
const child = mountedChildren[0];
|
|
22916
|
+
if (!React9.isValidElement(child)) {
|
|
22917
|
+
return null;
|
|
22918
|
+
}
|
|
22919
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
22920
|
+
return null;
|
|
22921
|
+
}
|
|
22922
|
+
return child.type;
|
|
22923
|
+
};
|
|
22924
|
+
var VERSION = "4.0.492";
|
|
22902
22925
|
var checkMultipleRemotionVersions = () => {
|
|
22903
22926
|
if (typeof globalThis === "undefined") {
|
|
22904
22927
|
return;
|
|
@@ -23498,7 +23521,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
23498
23521
|
var PremountContext = createContext14({
|
|
23499
23522
|
premountFramesRemaining: 0
|
|
23500
23523
|
});
|
|
23501
|
-
var SequenceManager =
|
|
23524
|
+
var SequenceManager = React12.createContext({
|
|
23502
23525
|
registerSequence: () => {
|
|
23503
23526
|
throw new Error("SequenceManagerContext not initialized");
|
|
23504
23527
|
},
|
|
@@ -23507,19 +23530,19 @@ var SequenceManager = React11.createContext({
|
|
|
23507
23530
|
},
|
|
23508
23531
|
sequences: []
|
|
23509
23532
|
});
|
|
23510
|
-
var SequenceManagerRefContext =
|
|
23533
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
23511
23534
|
current: []
|
|
23512
23535
|
});
|
|
23513
23536
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
23514
23537
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
23515
23538
|
};
|
|
23516
|
-
var VisualModePropStatusesContext =
|
|
23539
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
23517
23540
|
propStatuses: {}
|
|
23518
23541
|
});
|
|
23519
|
-
var VisualModePropStatusesRefContext =
|
|
23542
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
23520
23543
|
current: {}
|
|
23521
23544
|
});
|
|
23522
|
-
var VisualModeDragOverridesContext =
|
|
23545
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
23523
23546
|
getDragOverrides: () => {
|
|
23524
23547
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
23525
23548
|
},
|
|
@@ -23527,7 +23550,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
23527
23550
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
23528
23551
|
}
|
|
23529
23552
|
});
|
|
23530
|
-
var VisualModeSettersContext =
|
|
23553
|
+
var VisualModeSettersContext = React12.createContext({
|
|
23531
23554
|
setDragOverrides: () => {
|
|
23532
23555
|
throw new Error("VisualModeSettersContext not initialized");
|
|
23533
23556
|
},
|
|
@@ -23691,7 +23714,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
23691
23714
|
});
|
|
23692
23715
|
};
|
|
23693
23716
|
var useRequireToBeInsideSeries = () => {
|
|
23694
|
-
const isInsideSeries =
|
|
23717
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
23695
23718
|
if (!isInsideSeries) {
|
|
23696
23719
|
throw new Error("This component must be inside a <Series /> component.");
|
|
23697
23720
|
}
|
|
@@ -25760,6 +25783,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
25760
25783
|
shouldResortToDefaultValueIfUndefined: false
|
|
25761
25784
|
});
|
|
25762
25785
|
}
|
|
25786
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
25787
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
25788
|
+
}
|
|
25763
25789
|
if (value === undefined) {
|
|
25764
25790
|
propsToDelete.add(key);
|
|
25765
25791
|
}
|
|
@@ -25858,7 +25884,7 @@ var withInteractivitySchema = ({
|
|
|
25858
25884
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25859
25885
|
const env = useRemotionEnvironment();
|
|
25860
25886
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
25861
|
-
return
|
|
25887
|
+
return React14.createElement(Component, {
|
|
25862
25888
|
...props,
|
|
25863
25889
|
controls: null,
|
|
25864
25890
|
ref
|
|
@@ -25869,7 +25895,7 @@ var withInteractivitySchema = ({
|
|
|
25869
25895
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
25870
25896
|
const frame = useCurrentFrame();
|
|
25871
25897
|
if (props.controls) {
|
|
25872
|
-
return
|
|
25898
|
+
return React14.createElement(Component, {
|
|
25873
25899
|
...props,
|
|
25874
25900
|
ref
|
|
25875
25901
|
});
|
|
@@ -25927,7 +25953,7 @@ var withInteractivitySchema = ({
|
|
|
25927
25953
|
schemaKeys: activeKeys,
|
|
25928
25954
|
propsToDelete
|
|
25929
25955
|
});
|
|
25930
|
-
return
|
|
25956
|
+
return React14.createElement(Component, {
|
|
25931
25957
|
...mergedProps,
|
|
25932
25958
|
controls,
|
|
25933
25959
|
ref
|
|
@@ -25953,6 +25979,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25953
25979
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
25954
25980
|
_remotionInternalStack: stack,
|
|
25955
25981
|
_remotionInternalDocumentationLink: documentationLink,
|
|
25982
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
25956
25983
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
25957
25984
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
25958
25985
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -26099,7 +26126,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26099
26126
|
getStack: () => stackRef.current,
|
|
26100
26127
|
refForOutline: refForOutline ?? null,
|
|
26101
26128
|
isInsideSeries,
|
|
26102
|
-
frozenFrame: registeredFrozenFrame
|
|
26129
|
+
frozenFrame: registeredFrozenFrame,
|
|
26130
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26103
26131
|
});
|
|
26104
26132
|
} else {
|
|
26105
26133
|
registerSequence({
|
|
@@ -26129,7 +26157,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26129
26157
|
refForOutline: refForOutline ?? null,
|
|
26130
26158
|
isInsideSeries,
|
|
26131
26159
|
frozenFrame: registeredFrozenFrame,
|
|
26132
|
-
frozenMediaFrame
|
|
26160
|
+
frozenMediaFrame,
|
|
26161
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26133
26162
|
});
|
|
26134
26163
|
}
|
|
26135
26164
|
return () => {
|
|
@@ -26156,7 +26185,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26156
26185
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
26157
26186
|
refForOutline: refForOutline ?? null,
|
|
26158
26187
|
isInsideSeries,
|
|
26159
|
-
frozenFrame: registeredFrozenFrame
|
|
26188
|
+
frozenFrame: registeredFrozenFrame,
|
|
26189
|
+
singleChildComponent: singleChildComponent ?? null
|
|
26160
26190
|
});
|
|
26161
26191
|
return () => {
|
|
26162
26192
|
unregisterSequence(id);
|
|
@@ -26189,7 +26219,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
26189
26219
|
registeredFrozenFrame,
|
|
26190
26220
|
startMediaFrom,
|
|
26191
26221
|
mediaFrameAtSequenceZero,
|
|
26192
|
-
frozenMediaFrame
|
|
26222
|
+
frozenMediaFrame,
|
|
26223
|
+
singleChildComponent
|
|
26193
26224
|
]);
|
|
26194
26225
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
26195
26226
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -26691,7 +26722,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
26691
26722
|
...props
|
|
26692
26723
|
});
|
|
26693
26724
|
};
|
|
26694
|
-
var Canvas =
|
|
26725
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
26695
26726
|
var CACHE_SIZE = 5;
|
|
26696
26727
|
var getActualTime = ({
|
|
26697
26728
|
loopBehavior,
|
|
@@ -26852,6 +26883,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
26852
26883
|
return new URL(src, window.origin).href;
|
|
26853
26884
|
};
|
|
26854
26885
|
var animatedImageSchema = {
|
|
26886
|
+
src: {
|
|
26887
|
+
type: "asset",
|
|
26888
|
+
default: undefined,
|
|
26889
|
+
description: "Source",
|
|
26890
|
+
keyframable: false
|
|
26891
|
+
},
|
|
26855
26892
|
...baseSchema,
|
|
26856
26893
|
playbackRate: {
|
|
26857
26894
|
type: "number",
|
|
@@ -27269,7 +27306,7 @@ var calculateMediaDuration = ({
|
|
|
27269
27306
|
};
|
|
27270
27307
|
var LoopContext = createContext18(null);
|
|
27271
27308
|
var useLoop = () => {
|
|
27272
|
-
return
|
|
27309
|
+
return React17.useContext(LoopContext);
|
|
27273
27310
|
};
|
|
27274
27311
|
var Loop = ({
|
|
27275
27312
|
durationInFrames,
|
|
@@ -28120,7 +28157,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
28120
28157
|
};
|
|
28121
28158
|
});
|
|
28122
28159
|
}, [audioContext, numberOfAudioTags]);
|
|
28123
|
-
const effectToUse =
|
|
28160
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
28124
28161
|
effectToUse(() => {
|
|
28125
28162
|
return () => {
|
|
28126
28163
|
requestAnimationFrame(() => {
|
|
@@ -28290,7 +28327,7 @@ var useSharedAudio = ({
|
|
|
28290
28327
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
28291
28328
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
28292
28329
|
}
|
|
28293
|
-
const el =
|
|
28330
|
+
const el = React20.createRef();
|
|
28294
28331
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
28295
28332
|
audioContext: audioCtx.audioContext,
|
|
28296
28333
|
ref: el
|
|
@@ -28309,7 +28346,7 @@ var useSharedAudio = ({
|
|
|
28309
28346
|
}
|
|
28310
28347
|
};
|
|
28311
28348
|
});
|
|
28312
|
-
const effectToUse =
|
|
28349
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
28313
28350
|
if (typeof document !== "undefined") {
|
|
28314
28351
|
effectToUse(() => {
|
|
28315
28352
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -28861,7 +28898,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28861
28898
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
28862
28899
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
28863
28900
|
};
|
|
28864
|
-
var BufferingContextReact =
|
|
28901
|
+
var BufferingContextReact = React21.createContext(null);
|
|
28865
28902
|
var BufferingProvider = ({ children }) => {
|
|
28866
28903
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
28867
28904
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -29074,7 +29111,7 @@ var getMediaSyncAction = (input) => {
|
|
|
29074
29111
|
return { type: "none" };
|
|
29075
29112
|
};
|
|
29076
29113
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
29077
|
-
const lastUpdate =
|
|
29114
|
+
const lastUpdate = React22.useRef({
|
|
29078
29115
|
time: mediaRef.current?.currentTime ?? 0,
|
|
29079
29116
|
lastUpdate: performance.now()
|
|
29080
29117
|
});
|
|
@@ -29827,7 +29864,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29827
29864
|
volume: userPreferredVolume,
|
|
29828
29865
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
29829
29866
|
});
|
|
29830
|
-
const effectToUse =
|
|
29867
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
29831
29868
|
effectToUse(() => {
|
|
29832
29869
|
return () => {
|
|
29833
29870
|
requestAnimationFrame(() => {
|
|
@@ -31373,6 +31410,12 @@ var NativeImgInner = ({
|
|
|
31373
31410
|
};
|
|
31374
31411
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
31375
31412
|
var imgSchema = {
|
|
31413
|
+
src: {
|
|
31414
|
+
type: "asset",
|
|
31415
|
+
default: undefined,
|
|
31416
|
+
description: "Source",
|
|
31417
|
+
keyframable: false
|
|
31418
|
+
},
|
|
31376
31419
|
...baseSchema,
|
|
31377
31420
|
...transformSchema
|
|
31378
31421
|
};
|
|
@@ -31583,7 +31626,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
31583
31626
|
_remotionInternalStack: stack,
|
|
31584
31627
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
31585
31628
|
outlineRef: refForOutline,
|
|
31586
|
-
children:
|
|
31629
|
+
children: React30.createElement(tag, {
|
|
31587
31630
|
...props2,
|
|
31588
31631
|
ref: callbackRef
|
|
31589
31632
|
})
|
|
@@ -31647,7 +31690,7 @@ var Interactive = {
|
|
|
31647
31690
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
31648
31691
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
31649
31692
|
};
|
|
31650
|
-
var compositionsRef =
|
|
31693
|
+
var compositionsRef = React31.createRef();
|
|
31651
31694
|
var CompositionManagerProvider = ({
|
|
31652
31695
|
children,
|
|
31653
31696
|
onlyRenderComposition,
|
|
@@ -31796,7 +31839,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
31796
31839
|
var getPreviewDomElement = () => {
|
|
31797
31840
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
31798
31841
|
};
|
|
31799
|
-
var MaxMediaCacheSizeContext =
|
|
31842
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
31800
31843
|
var Root = null;
|
|
31801
31844
|
var listeners = [];
|
|
31802
31845
|
var getRoot = () => {
|
|
@@ -32069,7 +32112,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
32069
32112
|
};
|
|
32070
32113
|
}
|
|
32071
32114
|
};
|
|
32072
|
-
var SequenceStackTracesUpdateContext =
|
|
32115
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
32073
32116
|
var getEnvVariables = () => {
|
|
32074
32117
|
if (getRemotionEnvironment().isRendering) {
|
|
32075
32118
|
const param = window.remotion_envVariables;
|
|
@@ -32095,7 +32138,7 @@ var setupEnvVariables = () => {
|
|
|
32095
32138
|
window.process.env[key] = env[key];
|
|
32096
32139
|
});
|
|
32097
32140
|
};
|
|
32098
|
-
var CurrentScaleContext =
|
|
32141
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
32099
32142
|
var PreviewSizeContext = createContext25({
|
|
32100
32143
|
setSize: () => {
|
|
32101
32144
|
return;
|
|
@@ -32119,7 +32162,7 @@ var calculateScale = ({
|
|
|
32119
32162
|
}
|
|
32120
32163
|
return Number(previewSize);
|
|
32121
32164
|
};
|
|
32122
|
-
var PixelDensityContext =
|
|
32165
|
+
var PixelDensityContext = React36.createContext(null);
|
|
32123
32166
|
var getOffthreadVideoSource = ({
|
|
32124
32167
|
src,
|
|
32125
32168
|
transparent,
|
|
@@ -32386,7 +32429,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32386
32429
|
ref: videoRef
|
|
32387
32430
|
});
|
|
32388
32431
|
}, [context.audioContext]);
|
|
32389
|
-
const effectToUse =
|
|
32432
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
32390
32433
|
effectToUse(() => {
|
|
32391
32434
|
return () => {
|
|
32392
32435
|
requestAnimationFrame(() => {
|
|
@@ -32762,20 +32805,20 @@ var OffthreadVideo = ({
|
|
|
32762
32805
|
addSequenceStackTraces(OffthreadVideo);
|
|
32763
32806
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
32764
32807
|
function useRemotionContexts() {
|
|
32765
|
-
const compositionManagerCtx =
|
|
32766
|
-
const timelineContext =
|
|
32767
|
-
const setTimelineContext =
|
|
32768
|
-
const sequenceContext =
|
|
32769
|
-
const nonceContext =
|
|
32770
|
-
const canUseRemotionHooksContext =
|
|
32771
|
-
const preloadContext =
|
|
32772
|
-
const resolveCompositionContext =
|
|
32773
|
-
const renderAssetManagerContext =
|
|
32774
|
-
const sequenceManagerContext =
|
|
32775
|
-
const sequenceManagerRefContext =
|
|
32776
|
-
const visualModePropStatusesRefContext =
|
|
32777
|
-
const bufferManagerContext =
|
|
32778
|
-
const logLevelContext =
|
|
32808
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
32809
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
32810
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
32811
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
32812
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
32813
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
32814
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
32815
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
32816
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
32817
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
32818
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
32819
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
32820
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
32821
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
32779
32822
|
return useMemo37(() => ({
|
|
32780
32823
|
compositionManagerCtx,
|
|
32781
32824
|
timelineContext,
|
|
@@ -32949,6 +32992,8 @@ var Internals = {
|
|
|
32949
32992
|
BufferingProvider,
|
|
32950
32993
|
BufferingContextReact,
|
|
32951
32994
|
getComponentsToAddStacksTo,
|
|
32995
|
+
getSequenceComponent,
|
|
32996
|
+
getSingleChildComponent,
|
|
32952
32997
|
CurrentScaleContext,
|
|
32953
32998
|
PixelDensityContext,
|
|
32954
32999
|
PreviewSizeContext,
|
|
@@ -33006,9 +33051,9 @@ var Internals = {
|
|
|
33006
33051
|
fromField
|
|
33007
33052
|
};
|
|
33008
33053
|
var flattenChildren = (children) => {
|
|
33009
|
-
const childrenArray =
|
|
33054
|
+
const childrenArray = React41.Children.toArray(children);
|
|
33010
33055
|
return childrenArray.reduce((flatChildren, child) => {
|
|
33011
|
-
if (child.type ===
|
|
33056
|
+
if (child.type === React41.Fragment) {
|
|
33012
33057
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
33013
33058
|
}
|
|
33014
33059
|
flatChildren.push(child);
|
|
@@ -33096,7 +33141,7 @@ var SeriesInner = (props2) => {
|
|
|
33096
33141
|
index: i,
|
|
33097
33142
|
childrenLength: flattenedChildren.length
|
|
33098
33143
|
});
|
|
33099
|
-
return
|
|
33144
|
+
return React42.cloneElement(castedElement, {
|
|
33100
33145
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
33101
33146
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
33102
33147
|
const {
|
|
@@ -33254,7 +33299,7 @@ var Still = (props2) => {
|
|
|
33254
33299
|
durationInFrames: 1,
|
|
33255
33300
|
fps: 1
|
|
33256
33301
|
};
|
|
33257
|
-
return
|
|
33302
|
+
return React43.createElement(Composition, newProps);
|
|
33258
33303
|
};
|
|
33259
33304
|
addSequenceStackTraces(Still);
|
|
33260
33305
|
var roundTo6Commas = (num) => {
|
|
@@ -33733,6 +33778,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
33733
33778
|
});
|
|
33734
33779
|
Sequence.displayName = "Sequence";
|
|
33735
33780
|
addSequenceStackTraces(Sequence);
|
|
33781
|
+
setSequenceComponent(Sequence);
|
|
33736
33782
|
addSequenceStackTraces(Composition);
|
|
33737
33783
|
addSequenceStackTraces(Folder);
|
|
33738
33784
|
|
|
@@ -36662,12 +36708,12 @@ import React72 from "react";
|
|
|
36662
36708
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
36663
36709
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
36664
36710
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
36665
|
-
import * as
|
|
36711
|
+
import * as React362 from "react";
|
|
36666
36712
|
import * as ReactDOM4 from "react-dom";
|
|
36667
|
-
import
|
|
36713
|
+
import React11 from "react";
|
|
36668
36714
|
import * as React8 from "react";
|
|
36669
36715
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
36670
|
-
import * as
|
|
36716
|
+
import * as React92 from "react";
|
|
36671
36717
|
import * as React10 from "react";
|
|
36672
36718
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
36673
36719
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -36677,15 +36723,15 @@ import * as React162 from "react";
|
|
|
36677
36723
|
import * as React132 from "react";
|
|
36678
36724
|
import * as ReactDOM from "react-dom";
|
|
36679
36725
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
36680
|
-
import * as
|
|
36681
|
-
import * as
|
|
36726
|
+
import * as React142 from "react";
|
|
36727
|
+
import * as React15 from "react";
|
|
36682
36728
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
36683
|
-
import * as
|
|
36729
|
+
import * as React172 from "react";
|
|
36684
36730
|
import * as React18 from "react";
|
|
36685
36731
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
36686
36732
|
import * as React202 from "react";
|
|
36687
|
-
import * as
|
|
36688
|
-
import * as
|
|
36733
|
+
import * as React19 from "react";
|
|
36734
|
+
import * as React242 from "react";
|
|
36689
36735
|
import * as React212 from "react";
|
|
36690
36736
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
36691
36737
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -36703,7 +36749,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
36703
36749
|
import * as React352 from "react";
|
|
36704
36750
|
import * as React312 from "react";
|
|
36705
36751
|
import { useState as useState112 } from "react";
|
|
36706
|
-
import * as
|
|
36752
|
+
import * as React29 from "react";
|
|
36707
36753
|
import * as React302 from "react";
|
|
36708
36754
|
import * as React342 from "react";
|
|
36709
36755
|
import * as React332 from "react";
|
|
@@ -36711,22 +36757,22 @@ import * as React322 from "react";
|
|
|
36711
36757
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
36712
36758
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
36713
36759
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
36714
|
-
import * as
|
|
36760
|
+
import * as React37 from "react";
|
|
36715
36761
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
36716
36762
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
36717
36763
|
import * as React49 from "react";
|
|
36718
|
-
import * as
|
|
36764
|
+
import * as React382 from "react";
|
|
36719
36765
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
36720
36766
|
import * as React47 from "react";
|
|
36721
36767
|
import React402 from "react";
|
|
36722
|
-
import * as
|
|
36768
|
+
import * as React39 from "react";
|
|
36723
36769
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
36724
36770
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
36725
36771
|
import React210 from "react";
|
|
36726
36772
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
36727
36773
|
import * as React422 from "react";
|
|
36728
36774
|
import * as React412 from "react";
|
|
36729
|
-
import * as
|
|
36775
|
+
import * as React432 from "react";
|
|
36730
36776
|
import * as ReactDOM5 from "react-dom";
|
|
36731
36777
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
36732
36778
|
import * as React44 from "react";
|
|
@@ -36778,7 +36824,7 @@ function useComposedRefs(...refs) {
|
|
|
36778
36824
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
36779
36825
|
}
|
|
36780
36826
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
36781
|
-
var use =
|
|
36827
|
+
var use = React24[" use ".trim().toString()];
|
|
36782
36828
|
function isPromiseLike(value) {
|
|
36783
36829
|
return typeof value === "object" && value !== null && "then" in value;
|
|
36784
36830
|
}
|
|
@@ -36787,25 +36833,25 @@ function isLazyComponent(element) {
|
|
|
36787
36833
|
}
|
|
36788
36834
|
function createSlot(ownerName) {
|
|
36789
36835
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
36790
|
-
const Slot2 =
|
|
36836
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
36791
36837
|
let { children, ...slotProps } = props;
|
|
36792
36838
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
36793
36839
|
children = use(children._payload);
|
|
36794
36840
|
}
|
|
36795
|
-
const childrenArray =
|
|
36841
|
+
const childrenArray = React24.Children.toArray(children);
|
|
36796
36842
|
const slottable = childrenArray.find(isSlottable);
|
|
36797
36843
|
if (slottable) {
|
|
36798
36844
|
const newElement = slottable.props.children;
|
|
36799
36845
|
const newChildren = childrenArray.map((child) => {
|
|
36800
36846
|
if (child === slottable) {
|
|
36801
|
-
if (
|
|
36802
|
-
return
|
|
36803
|
-
return
|
|
36847
|
+
if (React24.Children.count(newElement) > 1)
|
|
36848
|
+
return React24.Children.only(null);
|
|
36849
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
36804
36850
|
} else {
|
|
36805
36851
|
return child;
|
|
36806
36852
|
}
|
|
36807
36853
|
});
|
|
36808
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
36854
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
36809
36855
|
}
|
|
36810
36856
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
36811
36857
|
});
|
|
@@ -36814,20 +36860,20 @@ function createSlot(ownerName) {
|
|
|
36814
36860
|
}
|
|
36815
36861
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
36816
36862
|
function createSlotClone(ownerName) {
|
|
36817
|
-
const SlotClone =
|
|
36863
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
36818
36864
|
let { children, ...slotProps } = props;
|
|
36819
36865
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
36820
36866
|
children = use(children._payload);
|
|
36821
36867
|
}
|
|
36822
|
-
if (
|
|
36868
|
+
if (React24.isValidElement(children)) {
|
|
36823
36869
|
const childrenRef = getElementRef(children);
|
|
36824
36870
|
const props2 = mergeProps(slotProps, children.props);
|
|
36825
|
-
if (children.type !==
|
|
36871
|
+
if (children.type !== React24.Fragment) {
|
|
36826
36872
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
36827
36873
|
}
|
|
36828
|
-
return
|
|
36874
|
+
return React24.cloneElement(children, props2);
|
|
36829
36875
|
}
|
|
36830
|
-
return
|
|
36876
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
36831
36877
|
});
|
|
36832
36878
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
36833
36879
|
return SlotClone;
|
|
@@ -36843,7 +36889,7 @@ function createSlottable(ownerName) {
|
|
|
36843
36889
|
}
|
|
36844
36890
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
36845
36891
|
function isSlottable(child) {
|
|
36846
|
-
return
|
|
36892
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
36847
36893
|
}
|
|
36848
36894
|
function mergeProps(slotProps, childProps) {
|
|
36849
36895
|
const overrideProps = { ...childProps };
|
|
@@ -36900,7 +36946,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
36900
36946
|
return childNode;
|
|
36901
36947
|
};
|
|
36902
36948
|
var useHoverTransforms = (ref, disabled) => {
|
|
36903
|
-
const [state, setState] =
|
|
36949
|
+
const [state, setState] = React33.useState({
|
|
36904
36950
|
progress: 0,
|
|
36905
36951
|
isActive: false
|
|
36906
36952
|
});
|
|
@@ -36912,7 +36958,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36912
36958
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
36913
36959
|
}
|
|
36914
36960
|
}, [disabled, eventTarget]);
|
|
36915
|
-
|
|
36961
|
+
React33.useEffect(() => {
|
|
36916
36962
|
const element = ref.current;
|
|
36917
36963
|
if (!element)
|
|
36918
36964
|
return;
|
|
@@ -36987,8 +37033,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36987
37033
|
return state;
|
|
36988
37034
|
};
|
|
36989
37035
|
var useClickTransforms = (ref) => {
|
|
36990
|
-
const [hoverProgress, setHoverProgress] =
|
|
36991
|
-
|
|
37036
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
37037
|
+
React33.useEffect(() => {
|
|
36992
37038
|
const element = getChildNodeFrom(ref.current);
|
|
36993
37039
|
if (!element) {
|
|
36994
37040
|
return;
|
|
@@ -37564,7 +37610,7 @@ function composeRefs2(...refs) {
|
|
|
37564
37610
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
37565
37611
|
}
|
|
37566
37612
|
function useComposedRefs2(...refs) {
|
|
37567
|
-
return
|
|
37613
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
37568
37614
|
}
|
|
37569
37615
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
37570
37616
|
const { children, ...slotProps } = props;
|
|
@@ -37646,13 +37692,13 @@ function createCollection(name) {
|
|
|
37646
37692
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
37647
37693
|
const CollectionProvider = (props) => {
|
|
37648
37694
|
const { scope, children } = props;
|
|
37649
|
-
const ref =
|
|
37650
|
-
const itemMap =
|
|
37695
|
+
const ref = React11.useRef(null);
|
|
37696
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
37651
37697
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
37652
37698
|
};
|
|
37653
37699
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
37654
37700
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
37655
|
-
const CollectionSlot =
|
|
37701
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
37656
37702
|
const { scope, children } = props;
|
|
37657
37703
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
37658
37704
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -37661,12 +37707,12 @@ function createCollection(name) {
|
|
|
37661
37707
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
37662
37708
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
37663
37709
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
37664
|
-
const CollectionItemSlot =
|
|
37710
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
37665
37711
|
const { scope, children, ...itemData } = props;
|
|
37666
|
-
const ref =
|
|
37712
|
+
const ref = React11.useRef(null);
|
|
37667
37713
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
37668
37714
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
37669
|
-
|
|
37715
|
+
React11.useEffect(() => {
|
|
37670
37716
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
37671
37717
|
return () => void context.itemMap.delete(ref);
|
|
37672
37718
|
});
|
|
@@ -37675,7 +37721,7 @@ function createCollection(name) {
|
|
|
37675
37721
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
37676
37722
|
function useCollection(scope) {
|
|
37677
37723
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
37678
|
-
const getItems =
|
|
37724
|
+
const getItems = React11.useCallback(() => {
|
|
37679
37725
|
const collectionNode = context.collectionRef.current;
|
|
37680
37726
|
if (!collectionNode)
|
|
37681
37727
|
return [];
|
|
@@ -37732,15 +37778,15 @@ function dispatchDiscreteCustomEvent(target, event2) {
|
|
|
37732
37778
|
ReactDOM.flushSync(() => target.dispatchEvent(event2));
|
|
37733
37779
|
}
|
|
37734
37780
|
function useCallbackRef(callback) {
|
|
37735
|
-
const callbackRef =
|
|
37736
|
-
|
|
37781
|
+
const callbackRef = React142.useRef(callback);
|
|
37782
|
+
React142.useEffect(() => {
|
|
37737
37783
|
callbackRef.current = callback;
|
|
37738
37784
|
});
|
|
37739
|
-
return
|
|
37785
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
37740
37786
|
}
|
|
37741
37787
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
37742
37788
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
37743
|
-
|
|
37789
|
+
React15.useEffect(() => {
|
|
37744
37790
|
const handleKeyDown = (event2) => {
|
|
37745
37791
|
if (event2.key === "Escape") {
|
|
37746
37792
|
onEscapeKeyDown(event2);
|
|
@@ -37947,7 +37993,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
37947
37993
|
}
|
|
37948
37994
|
var count = 0;
|
|
37949
37995
|
function useFocusGuards() {
|
|
37950
|
-
|
|
37996
|
+
React172.useEffect(() => {
|
|
37951
37997
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
37952
37998
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
37953
37999
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -38182,7 +38228,7 @@ function arrayRemove(array, item) {
|
|
|
38182
38228
|
function removeLinks(items) {
|
|
38183
38229
|
return items.filter((item) => item.tagName !== "A");
|
|
38184
38230
|
}
|
|
38185
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
38231
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
38186
38232
|
var useReactId = React202["useId".toString()] || (() => {
|
|
38187
38233
|
return;
|
|
38188
38234
|
});
|
|
@@ -40034,17 +40080,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
40034
40080
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
40035
40081
|
var Popper = (props) => {
|
|
40036
40082
|
const { __scopePopper, children } = props;
|
|
40037
|
-
const [anchor, setAnchor] =
|
|
40083
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
40038
40084
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
40039
40085
|
};
|
|
40040
40086
|
Popper.displayName = POPPER_NAME;
|
|
40041
40087
|
var ANCHOR_NAME = "PopperAnchor";
|
|
40042
|
-
var PopperAnchor =
|
|
40088
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
40043
40089
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
40044
40090
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
40045
|
-
const ref =
|
|
40091
|
+
const ref = React242.useRef(null);
|
|
40046
40092
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
40047
|
-
|
|
40093
|
+
React242.useEffect(() => {
|
|
40048
40094
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
40049
40095
|
});
|
|
40050
40096
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -40052,7 +40098,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
40052
40098
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
40053
40099
|
var CONTENT_NAME = "PopperContent";
|
|
40054
40100
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
40055
|
-
var PopperContent =
|
|
40101
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
40056
40102
|
const {
|
|
40057
40103
|
__scopePopper,
|
|
40058
40104
|
side = "bottom",
|
|
@@ -40070,9 +40116,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
40070
40116
|
...contentProps
|
|
40071
40117
|
} = props;
|
|
40072
40118
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
40073
|
-
const [content, setContent] =
|
|
40119
|
+
const [content, setContent] = React242.useState(null);
|
|
40074
40120
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
40075
|
-
const [arrow4, setArrow] =
|
|
40121
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
40076
40122
|
const arrowSize = useSize(arrow4);
|
|
40077
40123
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
40078
40124
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -40132,7 +40178,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
40132
40178
|
const arrowX = middlewareData.arrow?.x;
|
|
40133
40179
|
const arrowY = middlewareData.arrow?.y;
|
|
40134
40180
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
40135
|
-
const [contentZIndex, setContentZIndex] =
|
|
40181
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
40136
40182
|
useLayoutEffect22(() => {
|
|
40137
40183
|
if (content)
|
|
40138
40184
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -40183,7 +40229,7 @@ var OPPOSITE_SIDE = {
|
|
|
40183
40229
|
bottom: "top",
|
|
40184
40230
|
left: "right"
|
|
40185
40231
|
};
|
|
40186
|
-
var PopperArrow =
|
|
40232
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
40187
40233
|
const { __scopePopper, ...arrowProps } = props;
|
|
40188
40234
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
40189
40235
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -40526,7 +40572,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
40526
40572
|
ref.callback = callback;
|
|
40527
40573
|
return ref.facade;
|
|
40528
40574
|
}
|
|
40529
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
40575
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
40530
40576
|
var currentValues = new WeakMap;
|
|
40531
40577
|
function useMergeRefs(refs, defaultValue) {
|
|
40532
40578
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -41162,9 +41208,9 @@ var Select = (props) => {
|
|
|
41162
41208
|
required
|
|
41163
41209
|
} = props;
|
|
41164
41210
|
const popperScope = usePopperScope(__scopeSelect);
|
|
41165
|
-
const [trigger, setTrigger] =
|
|
41166
|
-
const [valueNode, setValueNode] =
|
|
41167
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
41211
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
41212
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
41213
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
41168
41214
|
const direction = useDirection(dir);
|
|
41169
41215
|
const [open = false, setOpen] = useControllableState({
|
|
41170
41216
|
prop: openProp,
|
|
@@ -41176,9 +41222,9 @@ var Select = (props) => {
|
|
|
41176
41222
|
defaultProp: defaultValue,
|
|
41177
41223
|
onChange: onValueChange
|
|
41178
41224
|
});
|
|
41179
|
-
const triggerPointerDownPosRef =
|
|
41225
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
41180
41226
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
41181
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
41227
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
41182
41228
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
41183
41229
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
41184
41230
|
required,
|
|
@@ -41200,10 +41246,10 @@ var Select = (props) => {
|
|
|
41200
41246
|
children: [
|
|
41201
41247
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
41202
41248
|
scope: props.__scopeSelect,
|
|
41203
|
-
onNativeOptionAdd:
|
|
41249
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
41204
41250
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
41205
41251
|
}, []),
|
|
41206
|
-
onNativeOptionRemove:
|
|
41252
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
41207
41253
|
setNativeOptionsSet((prev) => {
|
|
41208
41254
|
const optionsSet = new Set(prev);
|
|
41209
41255
|
optionsSet.delete(option);
|
|
@@ -41231,7 +41277,7 @@ var Select = (props) => {
|
|
|
41231
41277
|
};
|
|
41232
41278
|
Select.displayName = SELECT_NAME;
|
|
41233
41279
|
var TRIGGER_NAME = "SelectTrigger";
|
|
41234
|
-
var SelectTrigger =
|
|
41280
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
41235
41281
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
41236
41282
|
const popperScope = usePopperScope(__scopeSelect);
|
|
41237
41283
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -41299,7 +41345,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
41299
41345
|
});
|
|
41300
41346
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
41301
41347
|
var VALUE_NAME = "SelectValue";
|
|
41302
|
-
var SelectValue =
|
|
41348
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
41303
41349
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
41304
41350
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
41305
41351
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -41317,7 +41363,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
41317
41363
|
});
|
|
41318
41364
|
SelectValue.displayName = VALUE_NAME;
|
|
41319
41365
|
var ICON_NAME = "SelectIcon";
|
|
41320
|
-
var SelectIcon =
|
|
41366
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
41321
41367
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
41322
41368
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
41323
41369
|
});
|
|
@@ -41328,9 +41374,9 @@ var SelectPortal = (props) => {
|
|
|
41328
41374
|
};
|
|
41329
41375
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
41330
41376
|
var CONTENT_NAME2 = "SelectContent";
|
|
41331
|
-
var SelectContent =
|
|
41377
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
41332
41378
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
41333
|
-
const [fragment, setFragment] =
|
|
41379
|
+
const [fragment, setFragment] = React362.useState();
|
|
41334
41380
|
useLayoutEffect22(() => {
|
|
41335
41381
|
setFragment(new DocumentFragment);
|
|
41336
41382
|
}, []);
|
|
@@ -41344,7 +41390,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
41344
41390
|
var CONTENT_MARGIN = 10;
|
|
41345
41391
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
41346
41392
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
41347
|
-
var SelectContentImpl =
|
|
41393
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
41348
41394
|
const {
|
|
41349
41395
|
__scopeSelect,
|
|
41350
41396
|
position = "item-aligned",
|
|
@@ -41364,20 +41410,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41364
41410
|
...contentProps
|
|
41365
41411
|
} = props;
|
|
41366
41412
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
41367
|
-
const [content, setContent] =
|
|
41368
|
-
const [viewport, setViewport] =
|
|
41413
|
+
const [content, setContent] = React362.useState(null);
|
|
41414
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
41369
41415
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
41370
|
-
const [selectedItem, setSelectedItem] =
|
|
41371
|
-
const [selectedItemText, setSelectedItemText] =
|
|
41416
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
41417
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
41372
41418
|
const getItems = useCollection(__scopeSelect);
|
|
41373
|
-
const [isPositioned, setIsPositioned] =
|
|
41374
|
-
const firstValidItemFoundRef =
|
|
41375
|
-
|
|
41419
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
41420
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
41421
|
+
React362.useEffect(() => {
|
|
41376
41422
|
if (content)
|
|
41377
41423
|
return hideOthers(content);
|
|
41378
41424
|
}, [content]);
|
|
41379
41425
|
useFocusGuards();
|
|
41380
|
-
const focusFirst2 =
|
|
41426
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
41381
41427
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
41382
41428
|
const [lastItem] = restItems.slice(-1);
|
|
41383
41429
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -41394,14 +41440,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41394
41440
|
return;
|
|
41395
41441
|
}
|
|
41396
41442
|
}, [getItems, viewport]);
|
|
41397
|
-
const focusSelectedItem =
|
|
41398
|
-
|
|
41443
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
41444
|
+
React362.useEffect(() => {
|
|
41399
41445
|
if (isPositioned) {
|
|
41400
41446
|
focusSelectedItem();
|
|
41401
41447
|
}
|
|
41402
41448
|
}, [isPositioned, focusSelectedItem]);
|
|
41403
41449
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
41404
|
-
|
|
41450
|
+
React362.useEffect(() => {
|
|
41405
41451
|
if (content) {
|
|
41406
41452
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
41407
41453
|
const handlePointerMove = (event2) => {
|
|
@@ -41431,7 +41477,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41431
41477
|
};
|
|
41432
41478
|
}
|
|
41433
41479
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
41434
|
-
|
|
41480
|
+
React362.useEffect(() => {
|
|
41435
41481
|
const close = () => onOpenChange(false);
|
|
41436
41482
|
window.addEventListener("blur", close);
|
|
41437
41483
|
window.addEventListener("resize", close);
|
|
@@ -41448,7 +41494,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41448
41494
|
setTimeout(() => nextItem.ref.current.focus());
|
|
41449
41495
|
}
|
|
41450
41496
|
});
|
|
41451
|
-
const itemRefCallback =
|
|
41497
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
41452
41498
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
41453
41499
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
41454
41500
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -41457,8 +41503,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41457
41503
|
firstValidItemFoundRef.current = true;
|
|
41458
41504
|
}
|
|
41459
41505
|
}, [context.value]);
|
|
41460
|
-
const handleItemLeave =
|
|
41461
|
-
const itemTextRefCallback =
|
|
41506
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
41507
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
41462
41508
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
41463
41509
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
41464
41510
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -41553,18 +41599,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41553
41599
|
});
|
|
41554
41600
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
41555
41601
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
41556
|
-
var SelectItemAlignedPosition =
|
|
41602
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
41557
41603
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
41558
41604
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
41559
41605
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
41560
|
-
const [contentWrapper, setContentWrapper] =
|
|
41561
|
-
const [content, setContent] =
|
|
41606
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
41607
|
+
const [content, setContent] = React362.useState(null);
|
|
41562
41608
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
41563
41609
|
const getItems = useCollection(__scopeSelect);
|
|
41564
|
-
const shouldExpandOnScrollRef =
|
|
41565
|
-
const shouldRepositionRef =
|
|
41610
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
41611
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
41566
41612
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
41567
|
-
const position =
|
|
41613
|
+
const position = React362.useCallback(() => {
|
|
41568
41614
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
41569
41615
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
41570
41616
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -41645,12 +41691,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41645
41691
|
onPlaced
|
|
41646
41692
|
]);
|
|
41647
41693
|
useLayoutEffect22(() => position(), [position]);
|
|
41648
|
-
const [contentZIndex, setContentZIndex] =
|
|
41694
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
41649
41695
|
useLayoutEffect22(() => {
|
|
41650
41696
|
if (content)
|
|
41651
41697
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
41652
41698
|
}, [content]);
|
|
41653
|
-
const handleScrollButtonChange =
|
|
41699
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
41654
41700
|
if (node && shouldRepositionRef.current === true) {
|
|
41655
41701
|
position();
|
|
41656
41702
|
focusSelectedItem?.();
|
|
@@ -41684,7 +41730,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41684
41730
|
});
|
|
41685
41731
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
41686
41732
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
41687
|
-
var SelectPopperPosition =
|
|
41733
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
41688
41734
|
const {
|
|
41689
41735
|
__scopeSelect,
|
|
41690
41736
|
align = "start",
|
|
@@ -41714,12 +41760,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
41714
41760
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
41715
41761
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
41716
41762
|
var VIEWPORT_NAME = "SelectViewport";
|
|
41717
|
-
var SelectViewport =
|
|
41763
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
41718
41764
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
41719
41765
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
41720
41766
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
41721
41767
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
41722
|
-
const prevScrollTopRef =
|
|
41768
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
41723
41769
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
41724
41770
|
/* @__PURE__ */ jsx242("style", {
|
|
41725
41771
|
dangerouslySetInnerHTML: {
|
|
@@ -41768,14 +41814,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
41768
41814
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
41769
41815
|
var GROUP_NAME = "SelectGroup";
|
|
41770
41816
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
41771
|
-
var SelectGroup =
|
|
41817
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
41772
41818
|
const { __scopeSelect, ...groupProps } = props;
|
|
41773
41819
|
const groupId = useId();
|
|
41774
41820
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
41775
41821
|
});
|
|
41776
41822
|
SelectGroup.displayName = GROUP_NAME;
|
|
41777
41823
|
var LABEL_NAME = "SelectLabel";
|
|
41778
|
-
var SelectLabel =
|
|
41824
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
41779
41825
|
const { __scopeSelect, ...labelProps } = props;
|
|
41780
41826
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
41781
41827
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -41783,7 +41829,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
41783
41829
|
SelectLabel.displayName = LABEL_NAME;
|
|
41784
41830
|
var ITEM_NAME = "SelectItem";
|
|
41785
41831
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
41786
|
-
var SelectItem =
|
|
41832
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
41787
41833
|
const {
|
|
41788
41834
|
__scopeSelect,
|
|
41789
41835
|
value,
|
|
@@ -41794,8 +41840,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41794
41840
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
41795
41841
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
41796
41842
|
const isSelected = context.value === value;
|
|
41797
|
-
const [textValue, setTextValue] =
|
|
41798
|
-
const [isFocused, setIsFocused] =
|
|
41843
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
41844
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
41799
41845
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
41800
41846
|
const textId = useId();
|
|
41801
41847
|
const handleSelect = () => {
|
|
@@ -41813,7 +41859,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41813
41859
|
disabled,
|
|
41814
41860
|
textId,
|
|
41815
41861
|
isSelected,
|
|
41816
|
-
onItemTextChange:
|
|
41862
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
41817
41863
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
41818
41864
|
}, []),
|
|
41819
41865
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -41862,16 +41908,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
41862
41908
|
});
|
|
41863
41909
|
SelectItem.displayName = ITEM_NAME;
|
|
41864
41910
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
41865
|
-
var SelectItemText =
|
|
41911
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
41866
41912
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
41867
41913
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41868
41914
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41869
41915
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41870
41916
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
41871
|
-
const [itemTextNode, setItemTextNode] =
|
|
41917
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
41872
41918
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
41873
41919
|
const textContent = itemTextNode?.textContent;
|
|
41874
|
-
const nativeOption =
|
|
41920
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
41875
41921
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
41876
41922
|
useLayoutEffect22(() => {
|
|
41877
41923
|
onNativeOptionAdd(nativeOption);
|
|
@@ -41884,17 +41930,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
41884
41930
|
});
|
|
41885
41931
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
41886
41932
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
41887
|
-
var SelectItemIndicator =
|
|
41933
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
41888
41934
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
41889
41935
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
41890
41936
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
41891
41937
|
});
|
|
41892
41938
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
41893
41939
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
41894
|
-
var SelectScrollUpButton =
|
|
41940
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
41895
41941
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
41896
41942
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
41897
|
-
const [canScrollUp, setCanScrollUp] =
|
|
41943
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
41898
41944
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
41899
41945
|
useLayoutEffect22(() => {
|
|
41900
41946
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -41922,10 +41968,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
41922
41968
|
});
|
|
41923
41969
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
41924
41970
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
41925
|
-
var SelectScrollDownButton =
|
|
41971
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
41926
41972
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
41927
41973
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
41928
|
-
const [canScrollDown, setCanScrollDown] =
|
|
41974
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
41929
41975
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
41930
41976
|
useLayoutEffect22(() => {
|
|
41931
41977
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -41953,18 +41999,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
41953
41999
|
}) : null;
|
|
41954
42000
|
});
|
|
41955
42001
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
41956
|
-
var SelectScrollButtonImpl =
|
|
42002
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
41957
42003
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
41958
42004
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
41959
|
-
const autoScrollTimerRef =
|
|
42005
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
41960
42006
|
const getItems = useCollection(__scopeSelect);
|
|
41961
|
-
const clearAutoScrollTimer =
|
|
42007
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
41962
42008
|
if (autoScrollTimerRef.current !== null) {
|
|
41963
42009
|
window.clearInterval(autoScrollTimerRef.current);
|
|
41964
42010
|
autoScrollTimerRef.current = null;
|
|
41965
42011
|
}
|
|
41966
42012
|
}, []);
|
|
41967
|
-
|
|
42013
|
+
React362.useEffect(() => {
|
|
41968
42014
|
return () => clearAutoScrollTimer();
|
|
41969
42015
|
}, [clearAutoScrollTimer]);
|
|
41970
42016
|
useLayoutEffect22(() => {
|
|
@@ -41993,13 +42039,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
41993
42039
|
});
|
|
41994
42040
|
});
|
|
41995
42041
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
41996
|
-
var SelectSeparator =
|
|
42042
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
41997
42043
|
const { __scopeSelect, ...separatorProps } = props;
|
|
41998
42044
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
41999
42045
|
});
|
|
42000
42046
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
42001
42047
|
var ARROW_NAME2 = "SelectArrow";
|
|
42002
|
-
var SelectArrow =
|
|
42048
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
42003
42049
|
const { __scopeSelect, ...arrowProps } = props;
|
|
42004
42050
|
const popperScope = usePopperScope(__scopeSelect);
|
|
42005
42051
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -42010,12 +42056,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
42010
42056
|
function shouldShowPlaceholder(value) {
|
|
42011
42057
|
return value === "" || value === undefined;
|
|
42012
42058
|
}
|
|
42013
|
-
var BubbleSelect =
|
|
42059
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
42014
42060
|
const { value, ...selectProps } = props;
|
|
42015
|
-
const ref =
|
|
42061
|
+
const ref = React362.useRef(null);
|
|
42016
42062
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
42017
42063
|
const prevValue = usePrevious(value);
|
|
42018
|
-
|
|
42064
|
+
React362.useEffect(() => {
|
|
42019
42065
|
const select = ref.current;
|
|
42020
42066
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
42021
42067
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -42031,9 +42077,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
42031
42077
|
BubbleSelect.displayName = "BubbleSelect";
|
|
42032
42078
|
function useTypeaheadSearch(onSearchChange) {
|
|
42033
42079
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
42034
|
-
const searchRef =
|
|
42035
|
-
const timerRef =
|
|
42036
|
-
const handleTypeaheadSearch =
|
|
42080
|
+
const searchRef = React362.useRef("");
|
|
42081
|
+
const timerRef = React362.useRef(0);
|
|
42082
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
42037
42083
|
const search = searchRef.current + key;
|
|
42038
42084
|
handleSearchChange(search);
|
|
42039
42085
|
(function updateSearch(value) {
|
|
@@ -42043,11 +42089,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
42043
42089
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
42044
42090
|
})(search);
|
|
42045
42091
|
}, [handleSearchChange]);
|
|
42046
|
-
const resetTypeahead =
|
|
42092
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
42047
42093
|
searchRef.current = "";
|
|
42048
42094
|
window.clearTimeout(timerRef.current);
|
|
42049
42095
|
}, []);
|
|
42050
|
-
|
|
42096
|
+
React362.useEffect(() => {
|
|
42051
42097
|
return () => window.clearTimeout(timerRef.current);
|
|
42052
42098
|
}, []);
|
|
42053
42099
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -42136,7 +42182,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
42136
42182
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
42137
42183
|
var Select2 = Root222;
|
|
42138
42184
|
var SelectValue2 = Value;
|
|
42139
|
-
var SelectTrigger2 =
|
|
42185
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
42140
42186
|
ref,
|
|
42141
42187
|
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),
|
|
42142
42188
|
...props,
|
|
@@ -42151,7 +42197,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
42151
42197
|
]
|
|
42152
42198
|
}));
|
|
42153
42199
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
42154
|
-
var SelectScrollUpButton2 =
|
|
42200
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
42155
42201
|
ref,
|
|
42156
42202
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
42157
42203
|
...props,
|
|
@@ -42160,7 +42206,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
42160
42206
|
})
|
|
42161
42207
|
}));
|
|
42162
42208
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
42163
|
-
var SelectScrollDownButton2 =
|
|
42209
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
42164
42210
|
ref,
|
|
42165
42211
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
42166
42212
|
...props,
|
|
@@ -42169,7 +42215,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
42169
42215
|
})
|
|
42170
42216
|
}));
|
|
42171
42217
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
42172
|
-
var SelectContent2 =
|
|
42218
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
42173
42219
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
42174
42220
|
ref,
|
|
42175
42221
|
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),
|
|
@@ -42186,13 +42232,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
42186
42232
|
})
|
|
42187
42233
|
}));
|
|
42188
42234
|
SelectContent2.displayName = Content2.displayName;
|
|
42189
|
-
var SelectLabel2 =
|
|
42235
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
42190
42236
|
ref,
|
|
42191
42237
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
42192
42238
|
...props
|
|
42193
42239
|
}));
|
|
42194
42240
|
SelectLabel2.displayName = Label.displayName;
|
|
42195
|
-
var SelectItem2 =
|
|
42241
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
42196
42242
|
ref,
|
|
42197
42243
|
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),
|
|
42198
42244
|
...props,
|
|
@@ -42211,7 +42257,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
42211
42257
|
]
|
|
42212
42258
|
}));
|
|
42213
42259
|
SelectItem2.displayName = Item.displayName;
|
|
42214
|
-
var SelectSeparator2 =
|
|
42260
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
42215
42261
|
ref,
|
|
42216
42262
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
42217
42263
|
...props
|
|
@@ -42244,19 +42290,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
42244
42290
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
42245
42291
|
let defaultContexts = [];
|
|
42246
42292
|
function createContext32(rootComponentName, defaultContext) {
|
|
42247
|
-
const BaseContext =
|
|
42293
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
42248
42294
|
const index2 = defaultContexts.length;
|
|
42249
42295
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
42250
42296
|
const Provider = (props) => {
|
|
42251
42297
|
const { scope, children, ...context } = props;
|
|
42252
42298
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
42253
|
-
const value =
|
|
42299
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
42254
42300
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
42255
42301
|
};
|
|
42256
42302
|
Provider.displayName = rootComponentName + "Provider";
|
|
42257
42303
|
function useContext222(consumerName, scope) {
|
|
42258
42304
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
42259
|
-
const context =
|
|
42305
|
+
const context = React382.useContext(Context);
|
|
42260
42306
|
if (context)
|
|
42261
42307
|
return context;
|
|
42262
42308
|
if (defaultContext !== undefined)
|
|
@@ -42267,11 +42313,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
42267
42313
|
}
|
|
42268
42314
|
const createScope = () => {
|
|
42269
42315
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
42270
|
-
return
|
|
42316
|
+
return React382.createContext(defaultContext);
|
|
42271
42317
|
});
|
|
42272
42318
|
return function useScope(scope) {
|
|
42273
42319
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
42274
|
-
return
|
|
42320
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
42275
42321
|
};
|
|
42276
42322
|
};
|
|
42277
42323
|
createScope.scopeName = scopeName;
|
|
@@ -42292,7 +42338,7 @@ function composeContextScopes2(...scopes) {
|
|
|
42292
42338
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
42293
42339
|
return { ...nextScopes2, ...currentScope };
|
|
42294
42340
|
}, {});
|
|
42295
|
-
return
|
|
42341
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
42296
42342
|
};
|
|
42297
42343
|
};
|
|
42298
42344
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -42300,22 +42346,22 @@ function composeContextScopes2(...scopes) {
|
|
|
42300
42346
|
}
|
|
42301
42347
|
function createSlot2(ownerName) {
|
|
42302
42348
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
42303
|
-
const Slot22 =
|
|
42349
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
42304
42350
|
const { children, ...slotProps } = props;
|
|
42305
|
-
const childrenArray =
|
|
42351
|
+
const childrenArray = React39.Children.toArray(children);
|
|
42306
42352
|
const slottable = childrenArray.find(isSlottable3);
|
|
42307
42353
|
if (slottable) {
|
|
42308
42354
|
const newElement = slottable.props.children;
|
|
42309
42355
|
const newChildren = childrenArray.map((child) => {
|
|
42310
42356
|
if (child === slottable) {
|
|
42311
|
-
if (
|
|
42312
|
-
return
|
|
42313
|
-
return
|
|
42357
|
+
if (React39.Children.count(newElement) > 1)
|
|
42358
|
+
return React39.Children.only(null);
|
|
42359
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
42314
42360
|
} else {
|
|
42315
42361
|
return child;
|
|
42316
42362
|
}
|
|
42317
42363
|
});
|
|
42318
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
42364
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
42319
42365
|
}
|
|
42320
42366
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
42321
42367
|
});
|
|
@@ -42323,24 +42369,24 @@ function createSlot2(ownerName) {
|
|
|
42323
42369
|
return Slot22;
|
|
42324
42370
|
}
|
|
42325
42371
|
function createSlotClone2(ownerName) {
|
|
42326
|
-
const SlotClone2 =
|
|
42372
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
42327
42373
|
const { children, ...slotProps } = props;
|
|
42328
|
-
if (
|
|
42374
|
+
if (React39.isValidElement(children)) {
|
|
42329
42375
|
const childrenRef = getElementRef3(children);
|
|
42330
42376
|
const props2 = mergeProps3(slotProps, children.props);
|
|
42331
|
-
if (children.type !==
|
|
42377
|
+
if (children.type !== React39.Fragment) {
|
|
42332
42378
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
42333
42379
|
}
|
|
42334
|
-
return
|
|
42380
|
+
return React39.cloneElement(children, props2);
|
|
42335
42381
|
}
|
|
42336
|
-
return
|
|
42382
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
42337
42383
|
});
|
|
42338
42384
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
42339
42385
|
return SlotClone2;
|
|
42340
42386
|
}
|
|
42341
42387
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
42342
42388
|
function isSlottable3(child) {
|
|
42343
|
-
return
|
|
42389
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
42344
42390
|
}
|
|
42345
42391
|
function mergeProps3(slotProps, childProps) {
|
|
42346
42392
|
const overrideProps = { ...childProps };
|
|
@@ -42768,7 +42814,7 @@ var NODES2 = [
|
|
|
42768
42814
|
];
|
|
42769
42815
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
42770
42816
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
42771
|
-
const Node2 =
|
|
42817
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
42772
42818
|
const { asChild, ...primitiveProps } = props;
|
|
42773
42819
|
const Comp = asChild ? Slot3 : node;
|
|
42774
42820
|
if (typeof window !== "undefined") {
|