@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/design.js
CHANGED
|
@@ -33,7 +33,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// ../design/dist/esm/index.mjs
|
|
36
|
-
import * as
|
|
36
|
+
import * as React24 from "react";
|
|
37
37
|
import * as React3 from "react";
|
|
38
38
|
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
39
39
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
|
|
|
1378
1378
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1379
1379
|
|
|
1380
1380
|
// ../design/dist/esm/index.mjs
|
|
1381
|
-
import
|
|
1381
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1382
1382
|
|
|
1383
1383
|
// ../paths/dist/esm/index.mjs
|
|
1384
1384
|
var cutLInstruction = ({
|
|
@@ -4171,6 +4171,7 @@ import * as React6 from "react";
|
|
|
4171
4171
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
4172
4172
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
4173
4173
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4174
|
+
import React9 from "react";
|
|
4174
4175
|
import {
|
|
4175
4176
|
forwardRef as forwardRef3,
|
|
4176
4177
|
useCallback as useCallback6,
|
|
@@ -4196,11 +4197,11 @@ import { useContext as useContext13 } from "react";
|
|
|
4196
4197
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4197
4198
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4198
4199
|
import { createContext as createContext14 } from "react";
|
|
4199
|
-
import
|
|
4200
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4200
4201
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4201
|
-
import
|
|
4202
|
+
import React13, { createContext as createContext15 } from "react";
|
|
4202
4203
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4203
|
-
import
|
|
4204
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
4204
4205
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
4205
4206
|
import { createContext as createContext16 } from "react";
|
|
4206
4207
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4212,7 +4213,7 @@ import {
|
|
|
4212
4213
|
useRef as useRef9,
|
|
4213
4214
|
useState as useState6
|
|
4214
4215
|
} from "react";
|
|
4215
|
-
import
|
|
4216
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4216
4217
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
4217
4218
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4218
4219
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -4228,7 +4229,7 @@ import {
|
|
|
4228
4229
|
} from "react";
|
|
4229
4230
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4230
4231
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
4231
|
-
import
|
|
4232
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
4232
4233
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4233
4234
|
import { useContext as useContext19 } from "react";
|
|
4234
4235
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -4236,7 +4237,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
4236
4237
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
4237
4238
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4238
4239
|
import { useCallback as useCallback13 } from "react";
|
|
4239
|
-
import
|
|
4240
|
+
import React23, {
|
|
4240
4241
|
forwardRef as forwardRef5,
|
|
4241
4242
|
useContext as useContext28,
|
|
4242
4243
|
useEffect as useEffect14,
|
|
@@ -4246,7 +4247,7 @@ import React22, {
|
|
|
4246
4247
|
useState as useState14
|
|
4247
4248
|
} from "react";
|
|
4248
4249
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4249
|
-
import
|
|
4250
|
+
import React20, {
|
|
4250
4251
|
createContext as createContext21,
|
|
4251
4252
|
createRef as createRef2,
|
|
4252
4253
|
useCallback as useCallback9,
|
|
@@ -4270,7 +4271,7 @@ import {
|
|
|
4270
4271
|
} from "react";
|
|
4271
4272
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
4272
4273
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
4273
|
-
import
|
|
4274
|
+
import React21, {
|
|
4274
4275
|
useCallback as useCallback10,
|
|
4275
4276
|
useContext as useContext24,
|
|
4276
4277
|
useEffect as useEffect9,
|
|
@@ -4280,7 +4281,7 @@ import React20, {
|
|
|
4280
4281
|
useState as useState12
|
|
4281
4282
|
} from "react";
|
|
4282
4283
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4283
|
-
import
|
|
4284
|
+
import React22 from "react";
|
|
4284
4285
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4285
4286
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4286
4287
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4338,10 +4339,10 @@ import {
|
|
|
4338
4339
|
useState as useState18
|
|
4339
4340
|
} from "react";
|
|
4340
4341
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4341
|
-
import
|
|
4342
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4342
4343
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4343
4344
|
import { createRef as createRef3 } from "react";
|
|
4344
|
-
import
|
|
4345
|
+
import React31 from "react";
|
|
4345
4346
|
import {
|
|
4346
4347
|
useCallback as useCallback21,
|
|
4347
4348
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -4350,14 +4351,14 @@ import {
|
|
|
4350
4351
|
useState as useState19
|
|
4351
4352
|
} from "react";
|
|
4352
4353
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4353
|
-
import
|
|
4354
|
+
import React32 from "react";
|
|
4354
4355
|
import { useMemo as useMemo34 } from "react";
|
|
4355
4356
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
4356
4357
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4357
4358
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4358
|
-
import
|
|
4359
|
-
import
|
|
4360
|
-
import
|
|
4359
|
+
import React34 from "react";
|
|
4360
|
+
import React35, { createContext as createContext25 } from "react";
|
|
4361
|
+
import React36, { useContext as useContext35 } from "react";
|
|
4361
4362
|
import { useCallback as useCallback24 } from "react";
|
|
4362
4363
|
import {
|
|
4363
4364
|
useCallback as useCallback22,
|
|
@@ -4368,7 +4369,7 @@ import {
|
|
|
4368
4369
|
useState as useState20
|
|
4369
4370
|
} from "react";
|
|
4370
4371
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4371
|
-
import
|
|
4372
|
+
import React38, {
|
|
4372
4373
|
forwardRef as forwardRef13,
|
|
4373
4374
|
useCallback as useCallback23,
|
|
4374
4375
|
useContext as useContext37,
|
|
@@ -4381,15 +4382,15 @@ import React37, {
|
|
|
4381
4382
|
import { useEffect as useEffect18 } from "react";
|
|
4382
4383
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4383
4384
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4384
|
-
import
|
|
4385
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
4385
4386
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4386
|
-
import
|
|
4387
|
+
import React42, {
|
|
4387
4388
|
forwardRef as forwardRef14,
|
|
4388
4389
|
useMemo as useMemo38
|
|
4389
4390
|
} from "react";
|
|
4390
|
-
import
|
|
4391
|
+
import React41 from "react";
|
|
4391
4392
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4392
|
-
import
|
|
4393
|
+
import React43 from "react";
|
|
4393
4394
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
4394
4395
|
import {
|
|
4395
4396
|
forwardRef as forwardRef15,
|
|
@@ -5467,6 +5468,7 @@ var InnerComposition = ({
|
|
|
5467
5468
|
}
|
|
5468
5469
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
5469
5470
|
const stack = compProps.stack ?? null;
|
|
5471
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
5470
5472
|
useEffect2(() => {
|
|
5471
5473
|
if (!id) {
|
|
5472
5474
|
throw new Error("No id for composition passed.");
|
|
@@ -5484,6 +5486,7 @@ var InnerComposition = ({
|
|
|
5484
5486
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
5485
5487
|
nonce: nonce.get(),
|
|
5486
5488
|
parentFolderName: parentName,
|
|
5489
|
+
componentFromProps,
|
|
5487
5490
|
schema: schema ?? null,
|
|
5488
5491
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
5489
5492
|
stack
|
|
@@ -5502,6 +5505,7 @@ var InnerComposition = ({
|
|
|
5502
5505
|
width,
|
|
5503
5506
|
nonce,
|
|
5504
5507
|
parentName,
|
|
5508
|
+
componentFromProps,
|
|
5505
5509
|
schema,
|
|
5506
5510
|
compProps.calculateMetadata,
|
|
5507
5511
|
stack,
|
|
@@ -5560,11 +5564,30 @@ var Composition = (props) => {
|
|
|
5560
5564
|
});
|
|
5561
5565
|
};
|
|
5562
5566
|
var componentsToAddStacksTo = [];
|
|
5567
|
+
var sequenceComponent = null;
|
|
5563
5568
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
5564
5569
|
var addSequenceStackTraces = (component) => {
|
|
5565
5570
|
componentsToAddStacksTo.push(component);
|
|
5566
5571
|
};
|
|
5567
|
-
var
|
|
5572
|
+
var setSequenceComponent = (component) => {
|
|
5573
|
+
sequenceComponent = component;
|
|
5574
|
+
};
|
|
5575
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
5576
|
+
var getSingleChildComponent = (children) => {
|
|
5577
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
5578
|
+
if (mountedChildren.length !== 1) {
|
|
5579
|
+
return null;
|
|
5580
|
+
}
|
|
5581
|
+
const child = mountedChildren[0];
|
|
5582
|
+
if (!React9.isValidElement(child)) {
|
|
5583
|
+
return null;
|
|
5584
|
+
}
|
|
5585
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
5586
|
+
return null;
|
|
5587
|
+
}
|
|
5588
|
+
return child.type;
|
|
5589
|
+
};
|
|
5590
|
+
var VERSION = "4.0.492";
|
|
5568
5591
|
var checkMultipleRemotionVersions = () => {
|
|
5569
5592
|
if (typeof globalThis === "undefined") {
|
|
5570
5593
|
return;
|
|
@@ -6164,7 +6187,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6164
6187
|
var PremountContext = createContext14({
|
|
6165
6188
|
premountFramesRemaining: 0
|
|
6166
6189
|
});
|
|
6167
|
-
var SequenceManager =
|
|
6190
|
+
var SequenceManager = React12.createContext({
|
|
6168
6191
|
registerSequence: () => {
|
|
6169
6192
|
throw new Error("SequenceManagerContext not initialized");
|
|
6170
6193
|
},
|
|
@@ -6173,19 +6196,19 @@ var SequenceManager = React11.createContext({
|
|
|
6173
6196
|
},
|
|
6174
6197
|
sequences: []
|
|
6175
6198
|
});
|
|
6176
|
-
var SequenceManagerRefContext =
|
|
6199
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
6177
6200
|
current: []
|
|
6178
6201
|
});
|
|
6179
6202
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
6180
6203
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
6181
6204
|
};
|
|
6182
|
-
var VisualModePropStatusesContext =
|
|
6205
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
6183
6206
|
propStatuses: {}
|
|
6184
6207
|
});
|
|
6185
|
-
var VisualModePropStatusesRefContext =
|
|
6208
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
6186
6209
|
current: {}
|
|
6187
6210
|
});
|
|
6188
|
-
var VisualModeDragOverridesContext =
|
|
6211
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
6189
6212
|
getDragOverrides: () => {
|
|
6190
6213
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6191
6214
|
},
|
|
@@ -6193,7 +6216,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
6193
6216
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6194
6217
|
}
|
|
6195
6218
|
});
|
|
6196
|
-
var VisualModeSettersContext =
|
|
6219
|
+
var VisualModeSettersContext = React12.createContext({
|
|
6197
6220
|
setDragOverrides: () => {
|
|
6198
6221
|
throw new Error("VisualModeSettersContext not initialized");
|
|
6199
6222
|
},
|
|
@@ -6357,7 +6380,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
6357
6380
|
});
|
|
6358
6381
|
};
|
|
6359
6382
|
var useRequireToBeInsideSeries = () => {
|
|
6360
|
-
const isInsideSeries =
|
|
6383
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
6361
6384
|
if (!isInsideSeries) {
|
|
6362
6385
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6363
6386
|
}
|
|
@@ -8426,6 +8449,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
8426
8449
|
shouldResortToDefaultValueIfUndefined: false
|
|
8427
8450
|
});
|
|
8428
8451
|
}
|
|
8452
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
8453
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
8454
|
+
}
|
|
8429
8455
|
if (value === undefined) {
|
|
8430
8456
|
propsToDelete.add(key);
|
|
8431
8457
|
}
|
|
@@ -8524,7 +8550,7 @@ var withInteractivitySchema = ({
|
|
|
8524
8550
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8525
8551
|
const env = useRemotionEnvironment();
|
|
8526
8552
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8527
|
-
return
|
|
8553
|
+
return React14.createElement(Component, {
|
|
8528
8554
|
...props,
|
|
8529
8555
|
controls: null,
|
|
8530
8556
|
ref
|
|
@@ -8535,7 +8561,7 @@ var withInteractivitySchema = ({
|
|
|
8535
8561
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8536
8562
|
const frame = useCurrentFrame();
|
|
8537
8563
|
if (props.controls) {
|
|
8538
|
-
return
|
|
8564
|
+
return React14.createElement(Component, {
|
|
8539
8565
|
...props,
|
|
8540
8566
|
ref
|
|
8541
8567
|
});
|
|
@@ -8593,7 +8619,7 @@ var withInteractivitySchema = ({
|
|
|
8593
8619
|
schemaKeys: activeKeys,
|
|
8594
8620
|
propsToDelete
|
|
8595
8621
|
});
|
|
8596
|
-
return
|
|
8622
|
+
return React14.createElement(Component, {
|
|
8597
8623
|
...mergedProps,
|
|
8598
8624
|
controls,
|
|
8599
8625
|
ref
|
|
@@ -8619,6 +8645,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8619
8645
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8620
8646
|
_remotionInternalStack: stack,
|
|
8621
8647
|
_remotionInternalDocumentationLink: documentationLink,
|
|
8648
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
8622
8649
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8623
8650
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8624
8651
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8765,7 +8792,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8765
8792
|
getStack: () => stackRef.current,
|
|
8766
8793
|
refForOutline: refForOutline ?? null,
|
|
8767
8794
|
isInsideSeries,
|
|
8768
|
-
frozenFrame: registeredFrozenFrame
|
|
8795
|
+
frozenFrame: registeredFrozenFrame,
|
|
8796
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8769
8797
|
});
|
|
8770
8798
|
} else {
|
|
8771
8799
|
registerSequence({
|
|
@@ -8795,7 +8823,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8795
8823
|
refForOutline: refForOutline ?? null,
|
|
8796
8824
|
isInsideSeries,
|
|
8797
8825
|
frozenFrame: registeredFrozenFrame,
|
|
8798
|
-
frozenMediaFrame
|
|
8826
|
+
frozenMediaFrame,
|
|
8827
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8799
8828
|
});
|
|
8800
8829
|
}
|
|
8801
8830
|
return () => {
|
|
@@ -8822,7 +8851,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8822
8851
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
8823
8852
|
refForOutline: refForOutline ?? null,
|
|
8824
8853
|
isInsideSeries,
|
|
8825
|
-
frozenFrame: registeredFrozenFrame
|
|
8854
|
+
frozenFrame: registeredFrozenFrame,
|
|
8855
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8826
8856
|
});
|
|
8827
8857
|
return () => {
|
|
8828
8858
|
unregisterSequence(id);
|
|
@@ -8855,7 +8885,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8855
8885
|
registeredFrozenFrame,
|
|
8856
8886
|
startMediaFrom,
|
|
8857
8887
|
mediaFrameAtSequenceZero,
|
|
8858
|
-
frozenMediaFrame
|
|
8888
|
+
frozenMediaFrame,
|
|
8889
|
+
singleChildComponent
|
|
8859
8890
|
]);
|
|
8860
8891
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
8861
8892
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -9357,7 +9388,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9357
9388
|
...props
|
|
9358
9389
|
});
|
|
9359
9390
|
};
|
|
9360
|
-
var Canvas =
|
|
9391
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9361
9392
|
var CACHE_SIZE = 5;
|
|
9362
9393
|
var getActualTime = ({
|
|
9363
9394
|
loopBehavior,
|
|
@@ -9518,6 +9549,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9518
9549
|
return new URL(src, window.origin).href;
|
|
9519
9550
|
};
|
|
9520
9551
|
var animatedImageSchema = {
|
|
9552
|
+
src: {
|
|
9553
|
+
type: "asset",
|
|
9554
|
+
default: undefined,
|
|
9555
|
+
description: "Source",
|
|
9556
|
+
keyframable: false
|
|
9557
|
+
},
|
|
9521
9558
|
...baseSchema,
|
|
9522
9559
|
playbackRate: {
|
|
9523
9560
|
type: "number",
|
|
@@ -9935,7 +9972,7 @@ var calculateMediaDuration = ({
|
|
|
9935
9972
|
};
|
|
9936
9973
|
var LoopContext = createContext18(null);
|
|
9937
9974
|
var useLoop = () => {
|
|
9938
|
-
return
|
|
9975
|
+
return React17.useContext(LoopContext);
|
|
9939
9976
|
};
|
|
9940
9977
|
var Loop = ({
|
|
9941
9978
|
durationInFrames,
|
|
@@ -10786,7 +10823,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10786
10823
|
};
|
|
10787
10824
|
});
|
|
10788
10825
|
}, [audioContext, numberOfAudioTags]);
|
|
10789
|
-
const effectToUse =
|
|
10826
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10790
10827
|
effectToUse(() => {
|
|
10791
10828
|
return () => {
|
|
10792
10829
|
requestAnimationFrame(() => {
|
|
@@ -10956,7 +10993,7 @@ var useSharedAudio = ({
|
|
|
10956
10993
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10957
10994
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
10958
10995
|
}
|
|
10959
|
-
const el =
|
|
10996
|
+
const el = React20.createRef();
|
|
10960
10997
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
10961
10998
|
audioContext: audioCtx.audioContext,
|
|
10962
10999
|
ref: el
|
|
@@ -10975,7 +11012,7 @@ var useSharedAudio = ({
|
|
|
10975
11012
|
}
|
|
10976
11013
|
};
|
|
10977
11014
|
});
|
|
10978
|
-
const effectToUse =
|
|
11015
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10979
11016
|
if (typeof document !== "undefined") {
|
|
10980
11017
|
effectToUse(() => {
|
|
10981
11018
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -11527,7 +11564,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11527
11564
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11528
11565
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11529
11566
|
};
|
|
11530
|
-
var BufferingContextReact =
|
|
11567
|
+
var BufferingContextReact = React21.createContext(null);
|
|
11531
11568
|
var BufferingProvider = ({ children }) => {
|
|
11532
11569
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
11533
11570
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -11740,7 +11777,7 @@ var getMediaSyncAction = (input) => {
|
|
|
11740
11777
|
return { type: "none" };
|
|
11741
11778
|
};
|
|
11742
11779
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11743
|
-
const lastUpdate =
|
|
11780
|
+
const lastUpdate = React22.useRef({
|
|
11744
11781
|
time: mediaRef.current?.currentTime ?? 0,
|
|
11745
11782
|
lastUpdate: performance.now()
|
|
11746
11783
|
});
|
|
@@ -12493,7 +12530,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12493
12530
|
volume: userPreferredVolume,
|
|
12494
12531
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
12495
12532
|
});
|
|
12496
|
-
const effectToUse =
|
|
12533
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
12497
12534
|
effectToUse(() => {
|
|
12498
12535
|
return () => {
|
|
12499
12536
|
requestAnimationFrame(() => {
|
|
@@ -14039,6 +14076,12 @@ var NativeImgInner = ({
|
|
|
14039
14076
|
};
|
|
14040
14077
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
14041
14078
|
var imgSchema = {
|
|
14079
|
+
src: {
|
|
14080
|
+
type: "asset",
|
|
14081
|
+
default: undefined,
|
|
14082
|
+
description: "Source",
|
|
14083
|
+
keyframable: false
|
|
14084
|
+
},
|
|
14042
14085
|
...baseSchema,
|
|
14043
14086
|
...transformSchema
|
|
14044
14087
|
};
|
|
@@ -14249,7 +14292,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14249
14292
|
_remotionInternalStack: stack,
|
|
14250
14293
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
14251
14294
|
outlineRef: refForOutline,
|
|
14252
|
-
children:
|
|
14295
|
+
children: React30.createElement(tag, {
|
|
14253
14296
|
...props2,
|
|
14254
14297
|
ref: callbackRef
|
|
14255
14298
|
})
|
|
@@ -14313,7 +14356,7 @@ var Interactive = {
|
|
|
14313
14356
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
14314
14357
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
14315
14358
|
};
|
|
14316
|
-
var compositionsRef =
|
|
14359
|
+
var compositionsRef = React31.createRef();
|
|
14317
14360
|
var CompositionManagerProvider = ({
|
|
14318
14361
|
children,
|
|
14319
14362
|
onlyRenderComposition,
|
|
@@ -14462,7 +14505,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
14462
14505
|
var getPreviewDomElement = () => {
|
|
14463
14506
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
14464
14507
|
};
|
|
14465
|
-
var MaxMediaCacheSizeContext =
|
|
14508
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
14466
14509
|
var Root = null;
|
|
14467
14510
|
var listeners = [];
|
|
14468
14511
|
var getRoot = () => {
|
|
@@ -14735,7 +14778,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
14735
14778
|
};
|
|
14736
14779
|
}
|
|
14737
14780
|
};
|
|
14738
|
-
var SequenceStackTracesUpdateContext =
|
|
14781
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
14739
14782
|
var getEnvVariables = () => {
|
|
14740
14783
|
if (getRemotionEnvironment().isRendering) {
|
|
14741
14784
|
const param = window.remotion_envVariables;
|
|
@@ -14761,7 +14804,7 @@ var setupEnvVariables = () => {
|
|
|
14761
14804
|
window.process.env[key] = env[key];
|
|
14762
14805
|
});
|
|
14763
14806
|
};
|
|
14764
|
-
var CurrentScaleContext =
|
|
14807
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
14765
14808
|
var PreviewSizeContext = createContext25({
|
|
14766
14809
|
setSize: () => {
|
|
14767
14810
|
return;
|
|
@@ -14785,7 +14828,7 @@ var calculateScale = ({
|
|
|
14785
14828
|
}
|
|
14786
14829
|
return Number(previewSize);
|
|
14787
14830
|
};
|
|
14788
|
-
var PixelDensityContext =
|
|
14831
|
+
var PixelDensityContext = React36.createContext(null);
|
|
14789
14832
|
var getOffthreadVideoSource = ({
|
|
14790
14833
|
src,
|
|
14791
14834
|
transparent,
|
|
@@ -15052,7 +15095,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15052
15095
|
ref: videoRef
|
|
15053
15096
|
});
|
|
15054
15097
|
}, [context.audioContext]);
|
|
15055
|
-
const effectToUse =
|
|
15098
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
15056
15099
|
effectToUse(() => {
|
|
15057
15100
|
return () => {
|
|
15058
15101
|
requestAnimationFrame(() => {
|
|
@@ -15428,20 +15471,20 @@ var OffthreadVideo = ({
|
|
|
15428
15471
|
addSequenceStackTraces(OffthreadVideo);
|
|
15429
15472
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
15430
15473
|
function useRemotionContexts() {
|
|
15431
|
-
const compositionManagerCtx =
|
|
15432
|
-
const timelineContext =
|
|
15433
|
-
const setTimelineContext =
|
|
15434
|
-
const sequenceContext =
|
|
15435
|
-
const nonceContext =
|
|
15436
|
-
const canUseRemotionHooksContext =
|
|
15437
|
-
const preloadContext =
|
|
15438
|
-
const resolveCompositionContext =
|
|
15439
|
-
const renderAssetManagerContext =
|
|
15440
|
-
const sequenceManagerContext =
|
|
15441
|
-
const sequenceManagerRefContext =
|
|
15442
|
-
const visualModePropStatusesRefContext =
|
|
15443
|
-
const bufferManagerContext =
|
|
15444
|
-
const logLevelContext =
|
|
15474
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
15475
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
15476
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
15477
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
15478
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
15479
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
15480
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
15481
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
15482
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
15483
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
15484
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
15485
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15486
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15487
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15445
15488
|
return useMemo37(() => ({
|
|
15446
15489
|
compositionManagerCtx,
|
|
15447
15490
|
timelineContext,
|
|
@@ -15615,6 +15658,8 @@ var Internals = {
|
|
|
15615
15658
|
BufferingProvider,
|
|
15616
15659
|
BufferingContextReact,
|
|
15617
15660
|
getComponentsToAddStacksTo,
|
|
15661
|
+
getSequenceComponent,
|
|
15662
|
+
getSingleChildComponent,
|
|
15618
15663
|
CurrentScaleContext,
|
|
15619
15664
|
PixelDensityContext,
|
|
15620
15665
|
PreviewSizeContext,
|
|
@@ -15672,9 +15717,9 @@ var Internals = {
|
|
|
15672
15717
|
fromField
|
|
15673
15718
|
};
|
|
15674
15719
|
var flattenChildren = (children) => {
|
|
15675
|
-
const childrenArray =
|
|
15720
|
+
const childrenArray = React41.Children.toArray(children);
|
|
15676
15721
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15677
|
-
if (child.type ===
|
|
15722
|
+
if (child.type === React41.Fragment) {
|
|
15678
15723
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15679
15724
|
}
|
|
15680
15725
|
flatChildren.push(child);
|
|
@@ -15762,7 +15807,7 @@ var SeriesInner = (props2) => {
|
|
|
15762
15807
|
index: i,
|
|
15763
15808
|
childrenLength: flattenedChildren.length
|
|
15764
15809
|
});
|
|
15765
|
-
return
|
|
15810
|
+
return React42.cloneElement(castedElement, {
|
|
15766
15811
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15767
15812
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15768
15813
|
const {
|
|
@@ -15920,7 +15965,7 @@ var Still = (props2) => {
|
|
|
15920
15965
|
durationInFrames: 1,
|
|
15921
15966
|
fps: 1
|
|
15922
15967
|
};
|
|
15923
|
-
return
|
|
15968
|
+
return React43.createElement(Composition, newProps);
|
|
15924
15969
|
};
|
|
15925
15970
|
addSequenceStackTraces(Still);
|
|
15926
15971
|
var roundTo6Commas = (num) => {
|
|
@@ -16399,6 +16444,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
16399
16444
|
});
|
|
16400
16445
|
Sequence.displayName = "Sequence";
|
|
16401
16446
|
addSequenceStackTraces(Sequence);
|
|
16447
|
+
setSequenceComponent(Sequence);
|
|
16402
16448
|
addSequenceStackTraces(Composition);
|
|
16403
16449
|
addSequenceStackTraces(Folder);
|
|
16404
16450
|
|
|
@@ -19328,12 +19374,12 @@ import React72 from "react";
|
|
|
19328
19374
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19329
19375
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
19330
19376
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19331
|
-
import * as
|
|
19377
|
+
import * as React362 from "react";
|
|
19332
19378
|
import * as ReactDOM4 from "react-dom";
|
|
19333
|
-
import
|
|
19379
|
+
import React11 from "react";
|
|
19334
19380
|
import * as React8 from "react";
|
|
19335
19381
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19336
|
-
import * as
|
|
19382
|
+
import * as React92 from "react";
|
|
19337
19383
|
import * as React10 from "react";
|
|
19338
19384
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
19339
19385
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -19343,15 +19389,15 @@ import * as React162 from "react";
|
|
|
19343
19389
|
import * as React132 from "react";
|
|
19344
19390
|
import * as ReactDOM from "react-dom";
|
|
19345
19391
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
19346
|
-
import * as
|
|
19347
|
-
import * as
|
|
19392
|
+
import * as React142 from "react";
|
|
19393
|
+
import * as React15 from "react";
|
|
19348
19394
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
19349
|
-
import * as
|
|
19395
|
+
import * as React172 from "react";
|
|
19350
19396
|
import * as React18 from "react";
|
|
19351
19397
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
19352
19398
|
import * as React202 from "react";
|
|
19353
|
-
import * as
|
|
19354
|
-
import * as
|
|
19399
|
+
import * as React19 from "react";
|
|
19400
|
+
import * as React242 from "react";
|
|
19355
19401
|
import * as React212 from "react";
|
|
19356
19402
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
19357
19403
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -19369,7 +19415,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
19369
19415
|
import * as React352 from "react";
|
|
19370
19416
|
import * as React312 from "react";
|
|
19371
19417
|
import { useState as useState112 } from "react";
|
|
19372
|
-
import * as
|
|
19418
|
+
import * as React29 from "react";
|
|
19373
19419
|
import * as React302 from "react";
|
|
19374
19420
|
import * as React342 from "react";
|
|
19375
19421
|
import * as React332 from "react";
|
|
@@ -19377,22 +19423,22 @@ import * as React322 from "react";
|
|
|
19377
19423
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
19378
19424
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
19379
19425
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
19380
|
-
import * as
|
|
19426
|
+
import * as React37 from "react";
|
|
19381
19427
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19382
19428
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
19383
19429
|
import * as React49 from "react";
|
|
19384
|
-
import * as
|
|
19430
|
+
import * as React382 from "react";
|
|
19385
19431
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
19386
19432
|
import * as React47 from "react";
|
|
19387
19433
|
import React402 from "react";
|
|
19388
|
-
import * as
|
|
19434
|
+
import * as React39 from "react";
|
|
19389
19435
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
19390
19436
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
19391
19437
|
import React210 from "react";
|
|
19392
19438
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
19393
19439
|
import * as React422 from "react";
|
|
19394
19440
|
import * as React412 from "react";
|
|
19395
|
-
import * as
|
|
19441
|
+
import * as React432 from "react";
|
|
19396
19442
|
import * as ReactDOM5 from "react-dom";
|
|
19397
19443
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
19398
19444
|
import * as React44 from "react";
|
|
@@ -19444,7 +19490,7 @@ function useComposedRefs(...refs) {
|
|
|
19444
19490
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
19445
19491
|
}
|
|
19446
19492
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
19447
|
-
var use =
|
|
19493
|
+
var use = React24[" use ".trim().toString()];
|
|
19448
19494
|
function isPromiseLike(value) {
|
|
19449
19495
|
return typeof value === "object" && value !== null && "then" in value;
|
|
19450
19496
|
}
|
|
@@ -19453,25 +19499,25 @@ function isLazyComponent(element) {
|
|
|
19453
19499
|
}
|
|
19454
19500
|
function createSlot(ownerName) {
|
|
19455
19501
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19456
|
-
const Slot2 =
|
|
19502
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
19457
19503
|
let { children, ...slotProps } = props;
|
|
19458
19504
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19459
19505
|
children = use(children._payload);
|
|
19460
19506
|
}
|
|
19461
|
-
const childrenArray =
|
|
19507
|
+
const childrenArray = React24.Children.toArray(children);
|
|
19462
19508
|
const slottable = childrenArray.find(isSlottable);
|
|
19463
19509
|
if (slottable) {
|
|
19464
19510
|
const newElement = slottable.props.children;
|
|
19465
19511
|
const newChildren = childrenArray.map((child) => {
|
|
19466
19512
|
if (child === slottable) {
|
|
19467
|
-
if (
|
|
19468
|
-
return
|
|
19469
|
-
return
|
|
19513
|
+
if (React24.Children.count(newElement) > 1)
|
|
19514
|
+
return React24.Children.only(null);
|
|
19515
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
19470
19516
|
} else {
|
|
19471
19517
|
return child;
|
|
19472
19518
|
}
|
|
19473
19519
|
});
|
|
19474
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
19520
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
19475
19521
|
}
|
|
19476
19522
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
19477
19523
|
});
|
|
@@ -19480,20 +19526,20 @@ function createSlot(ownerName) {
|
|
|
19480
19526
|
}
|
|
19481
19527
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
19482
19528
|
function createSlotClone(ownerName) {
|
|
19483
|
-
const SlotClone =
|
|
19529
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
19484
19530
|
let { children, ...slotProps } = props;
|
|
19485
19531
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19486
19532
|
children = use(children._payload);
|
|
19487
19533
|
}
|
|
19488
|
-
if (
|
|
19534
|
+
if (React24.isValidElement(children)) {
|
|
19489
19535
|
const childrenRef = getElementRef(children);
|
|
19490
19536
|
const props2 = mergeProps(slotProps, children.props);
|
|
19491
|
-
if (children.type !==
|
|
19537
|
+
if (children.type !== React24.Fragment) {
|
|
19492
19538
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
19493
19539
|
}
|
|
19494
|
-
return
|
|
19540
|
+
return React24.cloneElement(children, props2);
|
|
19495
19541
|
}
|
|
19496
|
-
return
|
|
19542
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
19497
19543
|
});
|
|
19498
19544
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
19499
19545
|
return SlotClone;
|
|
@@ -19509,7 +19555,7 @@ function createSlottable(ownerName) {
|
|
|
19509
19555
|
}
|
|
19510
19556
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
19511
19557
|
function isSlottable(child) {
|
|
19512
|
-
return
|
|
19558
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19513
19559
|
}
|
|
19514
19560
|
function mergeProps(slotProps, childProps) {
|
|
19515
19561
|
const overrideProps = { ...childProps };
|
|
@@ -19566,7 +19612,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
19566
19612
|
return childNode;
|
|
19567
19613
|
};
|
|
19568
19614
|
var useHoverTransforms = (ref, disabled) => {
|
|
19569
|
-
const [state, setState] =
|
|
19615
|
+
const [state, setState] = React33.useState({
|
|
19570
19616
|
progress: 0,
|
|
19571
19617
|
isActive: false
|
|
19572
19618
|
});
|
|
@@ -19578,7 +19624,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19578
19624
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
19579
19625
|
}
|
|
19580
19626
|
}, [disabled, eventTarget]);
|
|
19581
|
-
|
|
19627
|
+
React33.useEffect(() => {
|
|
19582
19628
|
const element = ref.current;
|
|
19583
19629
|
if (!element)
|
|
19584
19630
|
return;
|
|
@@ -19653,8 +19699,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19653
19699
|
return state;
|
|
19654
19700
|
};
|
|
19655
19701
|
var useClickTransforms = (ref) => {
|
|
19656
|
-
const [hoverProgress, setHoverProgress] =
|
|
19657
|
-
|
|
19702
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
19703
|
+
React33.useEffect(() => {
|
|
19658
19704
|
const element = getChildNodeFrom(ref.current);
|
|
19659
19705
|
if (!element) {
|
|
19660
19706
|
return;
|
|
@@ -20230,7 +20276,7 @@ function composeRefs2(...refs) {
|
|
|
20230
20276
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
20231
20277
|
}
|
|
20232
20278
|
function useComposedRefs2(...refs) {
|
|
20233
|
-
return
|
|
20279
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
20234
20280
|
}
|
|
20235
20281
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
20236
20282
|
const { children, ...slotProps } = props;
|
|
@@ -20312,13 +20358,13 @@ function createCollection(name) {
|
|
|
20312
20358
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
20313
20359
|
const CollectionProvider = (props) => {
|
|
20314
20360
|
const { scope, children } = props;
|
|
20315
|
-
const ref =
|
|
20316
|
-
const itemMap =
|
|
20361
|
+
const ref = React11.useRef(null);
|
|
20362
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
20317
20363
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
20318
20364
|
};
|
|
20319
20365
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
20320
20366
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
20321
|
-
const CollectionSlot =
|
|
20367
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20322
20368
|
const { scope, children } = props;
|
|
20323
20369
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
20324
20370
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -20327,12 +20373,12 @@ function createCollection(name) {
|
|
|
20327
20373
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
20328
20374
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
20329
20375
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
20330
|
-
const CollectionItemSlot =
|
|
20376
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20331
20377
|
const { scope, children, ...itemData } = props;
|
|
20332
|
-
const ref =
|
|
20378
|
+
const ref = React11.useRef(null);
|
|
20333
20379
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20334
20380
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
20335
|
-
|
|
20381
|
+
React11.useEffect(() => {
|
|
20336
20382
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
20337
20383
|
return () => void context.itemMap.delete(ref);
|
|
20338
20384
|
});
|
|
@@ -20341,7 +20387,7 @@ function createCollection(name) {
|
|
|
20341
20387
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
20342
20388
|
function useCollection(scope) {
|
|
20343
20389
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
20344
|
-
const getItems =
|
|
20390
|
+
const getItems = React11.useCallback(() => {
|
|
20345
20391
|
const collectionNode = context.collectionRef.current;
|
|
20346
20392
|
if (!collectionNode)
|
|
20347
20393
|
return [];
|
|
@@ -20398,15 +20444,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20398
20444
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
20399
20445
|
}
|
|
20400
20446
|
function useCallbackRef(callback) {
|
|
20401
|
-
const callbackRef =
|
|
20402
|
-
|
|
20447
|
+
const callbackRef = React142.useRef(callback);
|
|
20448
|
+
React142.useEffect(() => {
|
|
20403
20449
|
callbackRef.current = callback;
|
|
20404
20450
|
});
|
|
20405
|
-
return
|
|
20451
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20406
20452
|
}
|
|
20407
20453
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20408
20454
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
20409
|
-
|
|
20455
|
+
React15.useEffect(() => {
|
|
20410
20456
|
const handleKeyDown = (event) => {
|
|
20411
20457
|
if (event.key === "Escape") {
|
|
20412
20458
|
onEscapeKeyDown(event);
|
|
@@ -20613,7 +20659,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
20613
20659
|
}
|
|
20614
20660
|
var count = 0;
|
|
20615
20661
|
function useFocusGuards() {
|
|
20616
|
-
|
|
20662
|
+
React172.useEffect(() => {
|
|
20617
20663
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20618
20664
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20619
20665
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -20848,7 +20894,7 @@ function arrayRemove(array, item) {
|
|
|
20848
20894
|
function removeLinks(items) {
|
|
20849
20895
|
return items.filter((item) => item.tagName !== "A");
|
|
20850
20896
|
}
|
|
20851
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
20897
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
20852
20898
|
var useReactId = React202["useId".toString()] || (() => {
|
|
20853
20899
|
return;
|
|
20854
20900
|
});
|
|
@@ -22700,17 +22746,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
22700
22746
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22701
22747
|
var Popper = (props) => {
|
|
22702
22748
|
const { __scopePopper, children } = props;
|
|
22703
|
-
const [anchor, setAnchor] =
|
|
22749
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
22704
22750
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22705
22751
|
};
|
|
22706
22752
|
Popper.displayName = POPPER_NAME;
|
|
22707
22753
|
var ANCHOR_NAME = "PopperAnchor";
|
|
22708
|
-
var PopperAnchor =
|
|
22754
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
22709
22755
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
22710
22756
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
22711
|
-
const ref =
|
|
22757
|
+
const ref = React242.useRef(null);
|
|
22712
22758
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
22713
|
-
|
|
22759
|
+
React242.useEffect(() => {
|
|
22714
22760
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
22715
22761
|
});
|
|
22716
22762
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -22718,7 +22764,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
22718
22764
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
22719
22765
|
var CONTENT_NAME = "PopperContent";
|
|
22720
22766
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
22721
|
-
var PopperContent =
|
|
22767
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
22722
22768
|
const {
|
|
22723
22769
|
__scopePopper,
|
|
22724
22770
|
side = "bottom",
|
|
@@ -22736,9 +22782,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22736
22782
|
...contentProps
|
|
22737
22783
|
} = props;
|
|
22738
22784
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
22739
|
-
const [content, setContent] =
|
|
22785
|
+
const [content, setContent] = React242.useState(null);
|
|
22740
22786
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
22741
|
-
const [arrow4, setArrow] =
|
|
22787
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
22742
22788
|
const arrowSize = useSize(arrow4);
|
|
22743
22789
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
22744
22790
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -22798,7 +22844,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22798
22844
|
const arrowX = middlewareData.arrow?.x;
|
|
22799
22845
|
const arrowY = middlewareData.arrow?.y;
|
|
22800
22846
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
22801
|
-
const [contentZIndex, setContentZIndex] =
|
|
22847
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
22802
22848
|
useLayoutEffect22(() => {
|
|
22803
22849
|
if (content)
|
|
22804
22850
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -22849,7 +22895,7 @@ var OPPOSITE_SIDE = {
|
|
|
22849
22895
|
bottom: "top",
|
|
22850
22896
|
left: "right"
|
|
22851
22897
|
};
|
|
22852
|
-
var PopperArrow =
|
|
22898
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
22853
22899
|
const { __scopePopper, ...arrowProps } = props;
|
|
22854
22900
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
22855
22901
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -23192,7 +23238,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
23192
23238
|
ref.callback = callback;
|
|
23193
23239
|
return ref.facade;
|
|
23194
23240
|
}
|
|
23195
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
23241
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
23196
23242
|
var currentValues = new WeakMap;
|
|
23197
23243
|
function useMergeRefs(refs, defaultValue) {
|
|
23198
23244
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -23828,9 +23874,9 @@ var Select = (props) => {
|
|
|
23828
23874
|
required
|
|
23829
23875
|
} = props;
|
|
23830
23876
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23831
|
-
const [trigger, setTrigger] =
|
|
23832
|
-
const [valueNode, setValueNode] =
|
|
23833
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
23877
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
23878
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
23879
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
23834
23880
|
const direction = useDirection(dir);
|
|
23835
23881
|
const [open = false, setOpen] = useControllableState({
|
|
23836
23882
|
prop: openProp,
|
|
@@ -23842,9 +23888,9 @@ var Select = (props) => {
|
|
|
23842
23888
|
defaultProp: defaultValue,
|
|
23843
23889
|
onChange: onValueChange
|
|
23844
23890
|
});
|
|
23845
|
-
const triggerPointerDownPosRef =
|
|
23891
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
23846
23892
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
23847
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
23893
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
23848
23894
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
23849
23895
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
23850
23896
|
required,
|
|
@@ -23866,10 +23912,10 @@ var Select = (props) => {
|
|
|
23866
23912
|
children: [
|
|
23867
23913
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
23868
23914
|
scope: props.__scopeSelect,
|
|
23869
|
-
onNativeOptionAdd:
|
|
23915
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
23870
23916
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
23871
23917
|
}, []),
|
|
23872
|
-
onNativeOptionRemove:
|
|
23918
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
23873
23919
|
setNativeOptionsSet((prev) => {
|
|
23874
23920
|
const optionsSet = new Set(prev);
|
|
23875
23921
|
optionsSet.delete(option);
|
|
@@ -23897,7 +23943,7 @@ var Select = (props) => {
|
|
|
23897
23943
|
};
|
|
23898
23944
|
Select.displayName = SELECT_NAME;
|
|
23899
23945
|
var TRIGGER_NAME = "SelectTrigger";
|
|
23900
|
-
var SelectTrigger =
|
|
23946
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
23901
23947
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
23902
23948
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23903
23949
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -23965,7 +24011,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
23965
24011
|
});
|
|
23966
24012
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
23967
24013
|
var VALUE_NAME = "SelectValue";
|
|
23968
|
-
var SelectValue =
|
|
24014
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
23969
24015
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
23970
24016
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
23971
24017
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -23983,7 +24029,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
23983
24029
|
});
|
|
23984
24030
|
SelectValue.displayName = VALUE_NAME;
|
|
23985
24031
|
var ICON_NAME = "SelectIcon";
|
|
23986
|
-
var SelectIcon =
|
|
24032
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
23987
24033
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
23988
24034
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
23989
24035
|
});
|
|
@@ -23994,9 +24040,9 @@ var SelectPortal = (props) => {
|
|
|
23994
24040
|
};
|
|
23995
24041
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
23996
24042
|
var CONTENT_NAME2 = "SelectContent";
|
|
23997
|
-
var SelectContent =
|
|
24043
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
23998
24044
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
23999
|
-
const [fragment, setFragment] =
|
|
24045
|
+
const [fragment, setFragment] = React362.useState();
|
|
24000
24046
|
useLayoutEffect22(() => {
|
|
24001
24047
|
setFragment(new DocumentFragment);
|
|
24002
24048
|
}, []);
|
|
@@ -24010,7 +24056,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
24010
24056
|
var CONTENT_MARGIN = 10;
|
|
24011
24057
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
24012
24058
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
24013
|
-
var SelectContentImpl =
|
|
24059
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24014
24060
|
const {
|
|
24015
24061
|
__scopeSelect,
|
|
24016
24062
|
position = "item-aligned",
|
|
@@ -24030,20 +24076,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24030
24076
|
...contentProps
|
|
24031
24077
|
} = props;
|
|
24032
24078
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24033
|
-
const [content, setContent] =
|
|
24034
|
-
const [viewport, setViewport] =
|
|
24079
|
+
const [content, setContent] = React362.useState(null);
|
|
24080
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
24035
24081
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24036
|
-
const [selectedItem, setSelectedItem] =
|
|
24037
|
-
const [selectedItemText, setSelectedItemText] =
|
|
24082
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
24083
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
24038
24084
|
const getItems = useCollection(__scopeSelect);
|
|
24039
|
-
const [isPositioned, setIsPositioned] =
|
|
24040
|
-
const firstValidItemFoundRef =
|
|
24041
|
-
|
|
24085
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
24086
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
24087
|
+
React362.useEffect(() => {
|
|
24042
24088
|
if (content)
|
|
24043
24089
|
return hideOthers(content);
|
|
24044
24090
|
}, [content]);
|
|
24045
24091
|
useFocusGuards();
|
|
24046
|
-
const focusFirst2 =
|
|
24092
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
24047
24093
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
24048
24094
|
const [lastItem] = restItems.slice(-1);
|
|
24049
24095
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -24060,14 +24106,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24060
24106
|
return;
|
|
24061
24107
|
}
|
|
24062
24108
|
}, [getItems, viewport]);
|
|
24063
|
-
const focusSelectedItem =
|
|
24064
|
-
|
|
24109
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
24110
|
+
React362.useEffect(() => {
|
|
24065
24111
|
if (isPositioned) {
|
|
24066
24112
|
focusSelectedItem();
|
|
24067
24113
|
}
|
|
24068
24114
|
}, [isPositioned, focusSelectedItem]);
|
|
24069
24115
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
24070
|
-
|
|
24116
|
+
React362.useEffect(() => {
|
|
24071
24117
|
if (content) {
|
|
24072
24118
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
24073
24119
|
const handlePointerMove = (event) => {
|
|
@@ -24097,7 +24143,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24097
24143
|
};
|
|
24098
24144
|
}
|
|
24099
24145
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
24100
|
-
|
|
24146
|
+
React362.useEffect(() => {
|
|
24101
24147
|
const close = () => onOpenChange(false);
|
|
24102
24148
|
window.addEventListener("blur", close);
|
|
24103
24149
|
window.addEventListener("resize", close);
|
|
@@ -24114,7 +24160,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24114
24160
|
setTimeout(() => nextItem.ref.current.focus());
|
|
24115
24161
|
}
|
|
24116
24162
|
});
|
|
24117
|
-
const itemRefCallback =
|
|
24163
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24118
24164
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24119
24165
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24120
24166
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24123,8 +24169,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24123
24169
|
firstValidItemFoundRef.current = true;
|
|
24124
24170
|
}
|
|
24125
24171
|
}, [context.value]);
|
|
24126
|
-
const handleItemLeave =
|
|
24127
|
-
const itemTextRefCallback =
|
|
24172
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
24173
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24128
24174
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24129
24175
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24130
24176
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24219,18 +24265,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24219
24265
|
});
|
|
24220
24266
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
24221
24267
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
24222
|
-
var SelectItemAlignedPosition =
|
|
24268
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24223
24269
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
24224
24270
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24225
24271
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
24226
|
-
const [contentWrapper, setContentWrapper] =
|
|
24227
|
-
const [content, setContent] =
|
|
24272
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
24273
|
+
const [content, setContent] = React362.useState(null);
|
|
24228
24274
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24229
24275
|
const getItems = useCollection(__scopeSelect);
|
|
24230
|
-
const shouldExpandOnScrollRef =
|
|
24231
|
-
const shouldRepositionRef =
|
|
24276
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
24277
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
24232
24278
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
24233
|
-
const position =
|
|
24279
|
+
const position = React362.useCallback(() => {
|
|
24234
24280
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
24235
24281
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
24236
24282
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -24311,12 +24357,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24311
24357
|
onPlaced
|
|
24312
24358
|
]);
|
|
24313
24359
|
useLayoutEffect22(() => position(), [position]);
|
|
24314
|
-
const [contentZIndex, setContentZIndex] =
|
|
24360
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
24315
24361
|
useLayoutEffect22(() => {
|
|
24316
24362
|
if (content)
|
|
24317
24363
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
24318
24364
|
}, [content]);
|
|
24319
|
-
const handleScrollButtonChange =
|
|
24365
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
24320
24366
|
if (node && shouldRepositionRef.current === true) {
|
|
24321
24367
|
position();
|
|
24322
24368
|
focusSelectedItem?.();
|
|
@@ -24350,7 +24396,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24350
24396
|
});
|
|
24351
24397
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
24352
24398
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
24353
|
-
var SelectPopperPosition =
|
|
24399
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24354
24400
|
const {
|
|
24355
24401
|
__scopeSelect,
|
|
24356
24402
|
align = "start",
|
|
@@ -24380,12 +24426,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24380
24426
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
24381
24427
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
24382
24428
|
var VIEWPORT_NAME = "SelectViewport";
|
|
24383
|
-
var SelectViewport =
|
|
24429
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
24384
24430
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
24385
24431
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
24386
24432
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
24387
24433
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
24388
|
-
const prevScrollTopRef =
|
|
24434
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
24389
24435
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
24390
24436
|
/* @__PURE__ */ jsx242("style", {
|
|
24391
24437
|
dangerouslySetInnerHTML: {
|
|
@@ -24434,14 +24480,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
24434
24480
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
24435
24481
|
var GROUP_NAME = "SelectGroup";
|
|
24436
24482
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
24437
|
-
var SelectGroup =
|
|
24483
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
24438
24484
|
const { __scopeSelect, ...groupProps } = props;
|
|
24439
24485
|
const groupId = useId();
|
|
24440
24486
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
24441
24487
|
});
|
|
24442
24488
|
SelectGroup.displayName = GROUP_NAME;
|
|
24443
24489
|
var LABEL_NAME = "SelectLabel";
|
|
24444
|
-
var SelectLabel =
|
|
24490
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
24445
24491
|
const { __scopeSelect, ...labelProps } = props;
|
|
24446
24492
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
24447
24493
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -24449,7 +24495,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
24449
24495
|
SelectLabel.displayName = LABEL_NAME;
|
|
24450
24496
|
var ITEM_NAME = "SelectItem";
|
|
24451
24497
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
24452
|
-
var SelectItem =
|
|
24498
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
24453
24499
|
const {
|
|
24454
24500
|
__scopeSelect,
|
|
24455
24501
|
value,
|
|
@@ -24460,8 +24506,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24460
24506
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
24461
24507
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
24462
24508
|
const isSelected = context.value === value;
|
|
24463
|
-
const [textValue, setTextValue] =
|
|
24464
|
-
const [isFocused, setIsFocused] =
|
|
24509
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
24510
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
24465
24511
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
24466
24512
|
const textId = useId();
|
|
24467
24513
|
const handleSelect = () => {
|
|
@@ -24479,7 +24525,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24479
24525
|
disabled,
|
|
24480
24526
|
textId,
|
|
24481
24527
|
isSelected,
|
|
24482
|
-
onItemTextChange:
|
|
24528
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
24483
24529
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
24484
24530
|
}, []),
|
|
24485
24531
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -24528,16 +24574,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24528
24574
|
});
|
|
24529
24575
|
SelectItem.displayName = ITEM_NAME;
|
|
24530
24576
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
24531
|
-
var SelectItemText =
|
|
24577
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
24532
24578
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
24533
24579
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24534
24580
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24535
24581
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24536
24582
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24537
|
-
const [itemTextNode, setItemTextNode] =
|
|
24583
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
24538
24584
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
24539
24585
|
const textContent = itemTextNode?.textContent;
|
|
24540
|
-
const nativeOption =
|
|
24586
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
24541
24587
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
24542
24588
|
useLayoutEffect22(() => {
|
|
24543
24589
|
onNativeOptionAdd(nativeOption);
|
|
@@ -24550,17 +24596,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
24550
24596
|
});
|
|
24551
24597
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
24552
24598
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
24553
|
-
var SelectItemIndicator =
|
|
24599
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
24554
24600
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
24555
24601
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
24556
24602
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
24557
24603
|
});
|
|
24558
24604
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
24559
24605
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
24560
|
-
var SelectScrollUpButton =
|
|
24606
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
24561
24607
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24562
24608
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24563
|
-
const [canScrollUp, setCanScrollUp] =
|
|
24609
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
24564
24610
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24565
24611
|
useLayoutEffect22(() => {
|
|
24566
24612
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24588,10 +24634,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24588
24634
|
});
|
|
24589
24635
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
24590
24636
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
24591
|
-
var SelectScrollDownButton =
|
|
24637
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
24592
24638
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24593
24639
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24594
|
-
const [canScrollDown, setCanScrollDown] =
|
|
24640
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
24595
24641
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24596
24642
|
useLayoutEffect22(() => {
|
|
24597
24643
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24619,18 +24665,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24619
24665
|
}) : null;
|
|
24620
24666
|
});
|
|
24621
24667
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
24622
|
-
var SelectScrollButtonImpl =
|
|
24668
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24623
24669
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
24624
24670
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
24625
|
-
const autoScrollTimerRef =
|
|
24671
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
24626
24672
|
const getItems = useCollection(__scopeSelect);
|
|
24627
|
-
const clearAutoScrollTimer =
|
|
24673
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
24628
24674
|
if (autoScrollTimerRef.current !== null) {
|
|
24629
24675
|
window.clearInterval(autoScrollTimerRef.current);
|
|
24630
24676
|
autoScrollTimerRef.current = null;
|
|
24631
24677
|
}
|
|
24632
24678
|
}, []);
|
|
24633
|
-
|
|
24679
|
+
React362.useEffect(() => {
|
|
24634
24680
|
return () => clearAutoScrollTimer();
|
|
24635
24681
|
}, [clearAutoScrollTimer]);
|
|
24636
24682
|
useLayoutEffect22(() => {
|
|
@@ -24659,13 +24705,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24659
24705
|
});
|
|
24660
24706
|
});
|
|
24661
24707
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
24662
|
-
var SelectSeparator =
|
|
24708
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
24663
24709
|
const { __scopeSelect, ...separatorProps } = props;
|
|
24664
24710
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
24665
24711
|
});
|
|
24666
24712
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
24667
24713
|
var ARROW_NAME2 = "SelectArrow";
|
|
24668
|
-
var SelectArrow =
|
|
24714
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
24669
24715
|
const { __scopeSelect, ...arrowProps } = props;
|
|
24670
24716
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24671
24717
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -24676,12 +24722,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
24676
24722
|
function shouldShowPlaceholder(value) {
|
|
24677
24723
|
return value === "" || value === undefined;
|
|
24678
24724
|
}
|
|
24679
|
-
var BubbleSelect =
|
|
24725
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
24680
24726
|
const { value, ...selectProps } = props;
|
|
24681
|
-
const ref =
|
|
24727
|
+
const ref = React362.useRef(null);
|
|
24682
24728
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24683
24729
|
const prevValue = usePrevious(value);
|
|
24684
|
-
|
|
24730
|
+
React362.useEffect(() => {
|
|
24685
24731
|
const select = ref.current;
|
|
24686
24732
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
24687
24733
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -24697,9 +24743,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
24697
24743
|
BubbleSelect.displayName = "BubbleSelect";
|
|
24698
24744
|
function useTypeaheadSearch(onSearchChange) {
|
|
24699
24745
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
24700
|
-
const searchRef =
|
|
24701
|
-
const timerRef =
|
|
24702
|
-
const handleTypeaheadSearch =
|
|
24746
|
+
const searchRef = React362.useRef("");
|
|
24747
|
+
const timerRef = React362.useRef(0);
|
|
24748
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
24703
24749
|
const search = searchRef.current + key;
|
|
24704
24750
|
handleSearchChange(search);
|
|
24705
24751
|
(function updateSearch(value) {
|
|
@@ -24709,11 +24755,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
24709
24755
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
24710
24756
|
})(search);
|
|
24711
24757
|
}, [handleSearchChange]);
|
|
24712
|
-
const resetTypeahead =
|
|
24758
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
24713
24759
|
searchRef.current = "";
|
|
24714
24760
|
window.clearTimeout(timerRef.current);
|
|
24715
24761
|
}, []);
|
|
24716
|
-
|
|
24762
|
+
React362.useEffect(() => {
|
|
24717
24763
|
return () => window.clearTimeout(timerRef.current);
|
|
24718
24764
|
}, []);
|
|
24719
24765
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -24802,7 +24848,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
24802
24848
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
24803
24849
|
var Select2 = Root222;
|
|
24804
24850
|
var SelectValue2 = Value;
|
|
24805
|
-
var SelectTrigger2 =
|
|
24851
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
24806
24852
|
ref,
|
|
24807
24853
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
24808
24854
|
...props,
|
|
@@ -24817,7 +24863,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
24817
24863
|
]
|
|
24818
24864
|
}));
|
|
24819
24865
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
24820
|
-
var SelectScrollUpButton2 =
|
|
24866
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
24821
24867
|
ref,
|
|
24822
24868
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24823
24869
|
...props,
|
|
@@ -24826,7 +24872,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
24826
24872
|
})
|
|
24827
24873
|
}));
|
|
24828
24874
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
24829
|
-
var SelectScrollDownButton2 =
|
|
24875
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
24830
24876
|
ref,
|
|
24831
24877
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24832
24878
|
...props,
|
|
@@ -24835,7 +24881,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
24835
24881
|
})
|
|
24836
24882
|
}));
|
|
24837
24883
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
24838
|
-
var SelectContent2 =
|
|
24884
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
24839
24885
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
24840
24886
|
ref,
|
|
24841
24887
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
@@ -24852,13 +24898,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
24852
24898
|
})
|
|
24853
24899
|
}));
|
|
24854
24900
|
SelectContent2.displayName = Content2.displayName;
|
|
24855
|
-
var SelectLabel2 =
|
|
24901
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
24856
24902
|
ref,
|
|
24857
24903
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
24858
24904
|
...props
|
|
24859
24905
|
}));
|
|
24860
24906
|
SelectLabel2.displayName = Label.displayName;
|
|
24861
|
-
var SelectItem2 =
|
|
24907
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
24862
24908
|
ref,
|
|
24863
24909
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
24864
24910
|
...props,
|
|
@@ -24877,7 +24923,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
24877
24923
|
]
|
|
24878
24924
|
}));
|
|
24879
24925
|
SelectItem2.displayName = Item.displayName;
|
|
24880
|
-
var SelectSeparator2 =
|
|
24926
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
24881
24927
|
ref,
|
|
24882
24928
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
24883
24929
|
...props
|
|
@@ -24910,19 +24956,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
24910
24956
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
24911
24957
|
let defaultContexts = [];
|
|
24912
24958
|
function createContext32(rootComponentName, defaultContext) {
|
|
24913
|
-
const BaseContext =
|
|
24959
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
24914
24960
|
const index2 = defaultContexts.length;
|
|
24915
24961
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
24916
24962
|
const Provider = (props) => {
|
|
24917
24963
|
const { scope, children, ...context } = props;
|
|
24918
24964
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24919
|
-
const value =
|
|
24965
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
24920
24966
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
24921
24967
|
};
|
|
24922
24968
|
Provider.displayName = rootComponentName + "Provider";
|
|
24923
24969
|
function useContext222(consumerName, scope) {
|
|
24924
24970
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24925
|
-
const context =
|
|
24971
|
+
const context = React382.useContext(Context);
|
|
24926
24972
|
if (context)
|
|
24927
24973
|
return context;
|
|
24928
24974
|
if (defaultContext !== undefined)
|
|
@@ -24933,11 +24979,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
24933
24979
|
}
|
|
24934
24980
|
const createScope = () => {
|
|
24935
24981
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
24936
|
-
return
|
|
24982
|
+
return React382.createContext(defaultContext);
|
|
24937
24983
|
});
|
|
24938
24984
|
return function useScope(scope) {
|
|
24939
24985
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
24940
|
-
return
|
|
24986
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
24941
24987
|
};
|
|
24942
24988
|
};
|
|
24943
24989
|
createScope.scopeName = scopeName;
|
|
@@ -24958,7 +25004,7 @@ function composeContextScopes2(...scopes) {
|
|
|
24958
25004
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
24959
25005
|
return { ...nextScopes2, ...currentScope };
|
|
24960
25006
|
}, {});
|
|
24961
|
-
return
|
|
25007
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
24962
25008
|
};
|
|
24963
25009
|
};
|
|
24964
25010
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -24966,22 +25012,22 @@ function composeContextScopes2(...scopes) {
|
|
|
24966
25012
|
}
|
|
24967
25013
|
function createSlot2(ownerName) {
|
|
24968
25014
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
24969
|
-
const Slot22 =
|
|
25015
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
24970
25016
|
const { children, ...slotProps } = props;
|
|
24971
|
-
const childrenArray =
|
|
25017
|
+
const childrenArray = React39.Children.toArray(children);
|
|
24972
25018
|
const slottable = childrenArray.find(isSlottable3);
|
|
24973
25019
|
if (slottable) {
|
|
24974
25020
|
const newElement = slottable.props.children;
|
|
24975
25021
|
const newChildren = childrenArray.map((child) => {
|
|
24976
25022
|
if (child === slottable) {
|
|
24977
|
-
if (
|
|
24978
|
-
return
|
|
24979
|
-
return
|
|
25023
|
+
if (React39.Children.count(newElement) > 1)
|
|
25024
|
+
return React39.Children.only(null);
|
|
25025
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
24980
25026
|
} else {
|
|
24981
25027
|
return child;
|
|
24982
25028
|
}
|
|
24983
25029
|
});
|
|
24984
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
25030
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
24985
25031
|
}
|
|
24986
25032
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
24987
25033
|
});
|
|
@@ -24989,24 +25035,24 @@ function createSlot2(ownerName) {
|
|
|
24989
25035
|
return Slot22;
|
|
24990
25036
|
}
|
|
24991
25037
|
function createSlotClone2(ownerName) {
|
|
24992
|
-
const SlotClone2 =
|
|
25038
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
24993
25039
|
const { children, ...slotProps } = props;
|
|
24994
|
-
if (
|
|
25040
|
+
if (React39.isValidElement(children)) {
|
|
24995
25041
|
const childrenRef = getElementRef3(children);
|
|
24996
25042
|
const props2 = mergeProps3(slotProps, children.props);
|
|
24997
|
-
if (children.type !==
|
|
25043
|
+
if (children.type !== React39.Fragment) {
|
|
24998
25044
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
24999
25045
|
}
|
|
25000
|
-
return
|
|
25046
|
+
return React39.cloneElement(children, props2);
|
|
25001
25047
|
}
|
|
25002
|
-
return
|
|
25048
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
25003
25049
|
});
|
|
25004
25050
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
25005
25051
|
return SlotClone2;
|
|
25006
25052
|
}
|
|
25007
25053
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
25008
25054
|
function isSlottable3(child) {
|
|
25009
|
-
return
|
|
25055
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
25010
25056
|
}
|
|
25011
25057
|
function mergeProps3(slotProps, childProps) {
|
|
25012
25058
|
const overrideProps = { ...childProps };
|
|
@@ -25434,7 +25480,7 @@ var NODES2 = [
|
|
|
25434
25480
|
];
|
|
25435
25481
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
25436
25482
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
25437
|
-
const Node2 =
|
|
25483
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
25438
25484
|
const { asChild, ...primitiveProps } = props;
|
|
25439
25485
|
const Comp = asChild ? Slot3 : node;
|
|
25440
25486
|
if (typeof window !== "undefined") {
|