@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/homepage/Pricing.js
CHANGED
|
@@ -36,7 +36,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
36
36
|
import { useMemo as useMemo52 } from "react";
|
|
37
37
|
|
|
38
38
|
// ../design/dist/esm/index.mjs
|
|
39
|
-
import * as
|
|
39
|
+
import * as React24 from "react";
|
|
40
40
|
import * as React3 from "react";
|
|
41
41
|
import { Fragment as Fragment22, jsx as jsx43 } from "react/jsx-runtime";
|
|
42
42
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -1381,7 +1381,7 @@ var getDefaultConfig = () => {
|
|
|
1381
1381
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
1382
1382
|
|
|
1383
1383
|
// ../design/dist/esm/index.mjs
|
|
1384
|
-
import
|
|
1384
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
1385
1385
|
|
|
1386
1386
|
// ../paths/dist/esm/index.mjs
|
|
1387
1387
|
var cutLInstruction = ({
|
|
@@ -4174,6 +4174,7 @@ import * as React6 from "react";
|
|
|
4174
4174
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
4175
4175
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
4176
4176
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
4177
|
+
import React9 from "react";
|
|
4177
4178
|
import {
|
|
4178
4179
|
forwardRef as forwardRef3,
|
|
4179
4180
|
useCallback as useCallback6,
|
|
@@ -4199,11 +4200,11 @@ import { useContext as useContext13 } from "react";
|
|
|
4199
4200
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
4200
4201
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
4201
4202
|
import { createContext as createContext14 } from "react";
|
|
4202
|
-
import
|
|
4203
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
4203
4204
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
4204
|
-
import
|
|
4205
|
+
import React13, { createContext as createContext15 } from "react";
|
|
4205
4206
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
4206
|
-
import
|
|
4207
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
4207
4208
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
4208
4209
|
import { createContext as createContext16 } from "react";
|
|
4209
4210
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -4215,7 +4216,7 @@ import {
|
|
|
4215
4216
|
useRef as useRef9,
|
|
4216
4217
|
useState as useState6
|
|
4217
4218
|
} from "react";
|
|
4218
|
-
import
|
|
4219
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
4219
4220
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
4220
4221
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4221
4222
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -4231,7 +4232,7 @@ import {
|
|
|
4231
4232
|
} from "react";
|
|
4232
4233
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
4233
4234
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
4234
|
-
import
|
|
4235
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
4235
4236
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
4236
4237
|
import { useContext as useContext19 } from "react";
|
|
4237
4238
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -4239,7 +4240,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
4239
4240
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
4240
4241
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4241
4242
|
import { useCallback as useCallback13 } from "react";
|
|
4242
|
-
import
|
|
4243
|
+
import React23, {
|
|
4243
4244
|
forwardRef as forwardRef5,
|
|
4244
4245
|
useContext as useContext28,
|
|
4245
4246
|
useEffect as useEffect14,
|
|
@@ -4249,7 +4250,7 @@ import React22, {
|
|
|
4249
4250
|
useState as useState14
|
|
4250
4251
|
} from "react";
|
|
4251
4252
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
4252
|
-
import
|
|
4253
|
+
import React20, {
|
|
4253
4254
|
createContext as createContext21,
|
|
4254
4255
|
createRef as createRef2,
|
|
4255
4256
|
useCallback as useCallback9,
|
|
@@ -4273,7 +4274,7 @@ import {
|
|
|
4273
4274
|
} from "react";
|
|
4274
4275
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
4275
4276
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
4276
|
-
import
|
|
4277
|
+
import React21, {
|
|
4277
4278
|
useCallback as useCallback10,
|
|
4278
4279
|
useContext as useContext24,
|
|
4279
4280
|
useEffect as useEffect9,
|
|
@@ -4283,7 +4284,7 @@ import React20, {
|
|
|
4283
4284
|
useState as useState12
|
|
4284
4285
|
} from "react";
|
|
4285
4286
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4286
|
-
import
|
|
4287
|
+
import React22 from "react";
|
|
4287
4288
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
4288
4289
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
4289
4290
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -4341,10 +4342,10 @@ import {
|
|
|
4341
4342
|
useState as useState18
|
|
4342
4343
|
} from "react";
|
|
4343
4344
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4344
|
-
import
|
|
4345
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
4345
4346
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4346
4347
|
import { createRef as createRef3 } from "react";
|
|
4347
|
-
import
|
|
4348
|
+
import React31 from "react";
|
|
4348
4349
|
import {
|
|
4349
4350
|
useCallback as useCallback21,
|
|
4350
4351
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -4353,14 +4354,14 @@ import {
|
|
|
4353
4354
|
useState as useState19
|
|
4354
4355
|
} from "react";
|
|
4355
4356
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4356
|
-
import
|
|
4357
|
+
import React32 from "react";
|
|
4357
4358
|
import { useMemo as useMemo34 } from "react";
|
|
4358
4359
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
4359
4360
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4360
4361
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
4361
|
-
import
|
|
4362
|
-
import
|
|
4363
|
-
import
|
|
4362
|
+
import React34 from "react";
|
|
4363
|
+
import React35, { createContext as createContext25 } from "react";
|
|
4364
|
+
import React36, { useContext as useContext35 } from "react";
|
|
4364
4365
|
import { useCallback as useCallback24 } from "react";
|
|
4365
4366
|
import {
|
|
4366
4367
|
useCallback as useCallback22,
|
|
@@ -4371,7 +4372,7 @@ import {
|
|
|
4371
4372
|
useState as useState20
|
|
4372
4373
|
} from "react";
|
|
4373
4374
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4374
|
-
import
|
|
4375
|
+
import React38, {
|
|
4375
4376
|
forwardRef as forwardRef13,
|
|
4376
4377
|
useCallback as useCallback23,
|
|
4377
4378
|
useContext as useContext37,
|
|
@@ -4384,15 +4385,15 @@ import React37, {
|
|
|
4384
4385
|
import { useEffect as useEffect18 } from "react";
|
|
4385
4386
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4386
4387
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4387
|
-
import
|
|
4388
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
4388
4389
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4389
|
-
import
|
|
4390
|
+
import React42, {
|
|
4390
4391
|
forwardRef as forwardRef14,
|
|
4391
4392
|
useMemo as useMemo38
|
|
4392
4393
|
} from "react";
|
|
4393
|
-
import
|
|
4394
|
+
import React41 from "react";
|
|
4394
4395
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
4395
|
-
import
|
|
4396
|
+
import React43 from "react";
|
|
4396
4397
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
4397
4398
|
import {
|
|
4398
4399
|
forwardRef as forwardRef15,
|
|
@@ -5470,6 +5471,7 @@ var InnerComposition = ({
|
|
|
5470
5471
|
}
|
|
5471
5472
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
5472
5473
|
const stack = compProps.stack ?? null;
|
|
5474
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
5473
5475
|
useEffect2(() => {
|
|
5474
5476
|
if (!id) {
|
|
5475
5477
|
throw new Error("No id for composition passed.");
|
|
@@ -5487,6 +5489,7 @@ var InnerComposition = ({
|
|
|
5487
5489
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
5488
5490
|
nonce: nonce.get(),
|
|
5489
5491
|
parentFolderName: parentName,
|
|
5492
|
+
componentFromProps,
|
|
5490
5493
|
schema: schema ?? null,
|
|
5491
5494
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
5492
5495
|
stack
|
|
@@ -5505,6 +5508,7 @@ var InnerComposition = ({
|
|
|
5505
5508
|
width,
|
|
5506
5509
|
nonce,
|
|
5507
5510
|
parentName,
|
|
5511
|
+
componentFromProps,
|
|
5508
5512
|
schema,
|
|
5509
5513
|
compProps.calculateMetadata,
|
|
5510
5514
|
stack,
|
|
@@ -5563,11 +5567,30 @@ var Composition = (props) => {
|
|
|
5563
5567
|
});
|
|
5564
5568
|
};
|
|
5565
5569
|
var componentsToAddStacksTo = [];
|
|
5570
|
+
var sequenceComponent = null;
|
|
5566
5571
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
5567
5572
|
var addSequenceStackTraces = (component) => {
|
|
5568
5573
|
componentsToAddStacksTo.push(component);
|
|
5569
5574
|
};
|
|
5570
|
-
var
|
|
5575
|
+
var setSequenceComponent = (component) => {
|
|
5576
|
+
sequenceComponent = component;
|
|
5577
|
+
};
|
|
5578
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
5579
|
+
var getSingleChildComponent = (children) => {
|
|
5580
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
5581
|
+
if (mountedChildren.length !== 1) {
|
|
5582
|
+
return null;
|
|
5583
|
+
}
|
|
5584
|
+
const child = mountedChildren[0];
|
|
5585
|
+
if (!React9.isValidElement(child)) {
|
|
5586
|
+
return null;
|
|
5587
|
+
}
|
|
5588
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
5589
|
+
return null;
|
|
5590
|
+
}
|
|
5591
|
+
return child.type;
|
|
5592
|
+
};
|
|
5593
|
+
var VERSION = "4.0.492";
|
|
5571
5594
|
var checkMultipleRemotionVersions = () => {
|
|
5572
5595
|
if (typeof globalThis === "undefined") {
|
|
5573
5596
|
return;
|
|
@@ -6167,7 +6190,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
6167
6190
|
var PremountContext = createContext14({
|
|
6168
6191
|
premountFramesRemaining: 0
|
|
6169
6192
|
});
|
|
6170
|
-
var SequenceManager =
|
|
6193
|
+
var SequenceManager = React12.createContext({
|
|
6171
6194
|
registerSequence: () => {
|
|
6172
6195
|
throw new Error("SequenceManagerContext not initialized");
|
|
6173
6196
|
},
|
|
@@ -6176,19 +6199,19 @@ var SequenceManager = React11.createContext({
|
|
|
6176
6199
|
},
|
|
6177
6200
|
sequences: []
|
|
6178
6201
|
});
|
|
6179
|
-
var SequenceManagerRefContext =
|
|
6202
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
6180
6203
|
current: []
|
|
6181
6204
|
});
|
|
6182
6205
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
6183
6206
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
6184
6207
|
};
|
|
6185
|
-
var VisualModePropStatusesContext =
|
|
6208
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
6186
6209
|
propStatuses: {}
|
|
6187
6210
|
});
|
|
6188
|
-
var VisualModePropStatusesRefContext =
|
|
6211
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
6189
6212
|
current: {}
|
|
6190
6213
|
});
|
|
6191
|
-
var VisualModeDragOverridesContext =
|
|
6214
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
6192
6215
|
getDragOverrides: () => {
|
|
6193
6216
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6194
6217
|
},
|
|
@@ -6196,7 +6219,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
6196
6219
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
6197
6220
|
}
|
|
6198
6221
|
});
|
|
6199
|
-
var VisualModeSettersContext =
|
|
6222
|
+
var VisualModeSettersContext = React12.createContext({
|
|
6200
6223
|
setDragOverrides: () => {
|
|
6201
6224
|
throw new Error("VisualModeSettersContext not initialized");
|
|
6202
6225
|
},
|
|
@@ -6360,7 +6383,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
6360
6383
|
});
|
|
6361
6384
|
};
|
|
6362
6385
|
var useRequireToBeInsideSeries = () => {
|
|
6363
|
-
const isInsideSeries =
|
|
6386
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
6364
6387
|
if (!isInsideSeries) {
|
|
6365
6388
|
throw new Error("This component must be inside a <Series /> component.");
|
|
6366
6389
|
}
|
|
@@ -8429,6 +8452,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
8429
8452
|
shouldResortToDefaultValueIfUndefined: false
|
|
8430
8453
|
});
|
|
8431
8454
|
}
|
|
8455
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
8456
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
8457
|
+
}
|
|
8432
8458
|
if (value === undefined) {
|
|
8433
8459
|
propsToDelete.add(key);
|
|
8434
8460
|
}
|
|
@@ -8527,7 +8553,7 @@ var withInteractivitySchema = ({
|
|
|
8527
8553
|
const Wrapped = forwardRef2((props, ref) => {
|
|
8528
8554
|
const env = useRemotionEnvironment();
|
|
8529
8555
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
8530
|
-
return
|
|
8556
|
+
return React14.createElement(Component, {
|
|
8531
8557
|
...props,
|
|
8532
8558
|
controls: null,
|
|
8533
8559
|
ref
|
|
@@ -8538,7 +8564,7 @@ var withInteractivitySchema = ({
|
|
|
8538
8564
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
8539
8565
|
const frame = useCurrentFrame();
|
|
8540
8566
|
if (props.controls) {
|
|
8541
|
-
return
|
|
8567
|
+
return React14.createElement(Component, {
|
|
8542
8568
|
...props,
|
|
8543
8569
|
ref
|
|
8544
8570
|
});
|
|
@@ -8596,7 +8622,7 @@ var withInteractivitySchema = ({
|
|
|
8596
8622
|
schemaKeys: activeKeys,
|
|
8597
8623
|
propsToDelete
|
|
8598
8624
|
});
|
|
8599
|
-
return
|
|
8625
|
+
return React14.createElement(Component, {
|
|
8600
8626
|
...mergedProps,
|
|
8601
8627
|
controls,
|
|
8602
8628
|
ref
|
|
@@ -8622,6 +8648,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8622
8648
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
8623
8649
|
_remotionInternalStack: stack,
|
|
8624
8650
|
_remotionInternalDocumentationLink: documentationLink,
|
|
8651
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
8625
8652
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
8626
8653
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
8627
8654
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -8768,7 +8795,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8768
8795
|
getStack: () => stackRef.current,
|
|
8769
8796
|
refForOutline: refForOutline ?? null,
|
|
8770
8797
|
isInsideSeries,
|
|
8771
|
-
frozenFrame: registeredFrozenFrame
|
|
8798
|
+
frozenFrame: registeredFrozenFrame,
|
|
8799
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8772
8800
|
});
|
|
8773
8801
|
} else {
|
|
8774
8802
|
registerSequence({
|
|
@@ -8798,7 +8826,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8798
8826
|
refForOutline: refForOutline ?? null,
|
|
8799
8827
|
isInsideSeries,
|
|
8800
8828
|
frozenFrame: registeredFrozenFrame,
|
|
8801
|
-
frozenMediaFrame
|
|
8829
|
+
frozenMediaFrame,
|
|
8830
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8802
8831
|
});
|
|
8803
8832
|
}
|
|
8804
8833
|
return () => {
|
|
@@ -8825,7 +8854,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8825
8854
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
8826
8855
|
refForOutline: refForOutline ?? null,
|
|
8827
8856
|
isInsideSeries,
|
|
8828
|
-
frozenFrame: registeredFrozenFrame
|
|
8857
|
+
frozenFrame: registeredFrozenFrame,
|
|
8858
|
+
singleChildComponent: singleChildComponent ?? null
|
|
8829
8859
|
});
|
|
8830
8860
|
return () => {
|
|
8831
8861
|
unregisterSequence(id);
|
|
@@ -8858,7 +8888,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
8858
8888
|
registeredFrozenFrame,
|
|
8859
8889
|
startMediaFrom,
|
|
8860
8890
|
mediaFrameAtSequenceZero,
|
|
8861
|
-
frozenMediaFrame
|
|
8891
|
+
frozenMediaFrame,
|
|
8892
|
+
singleChildComponent
|
|
8862
8893
|
]);
|
|
8863
8894
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
8864
8895
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -9360,7 +9391,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
9360
9391
|
...props
|
|
9361
9392
|
});
|
|
9362
9393
|
};
|
|
9363
|
-
var Canvas =
|
|
9394
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
9364
9395
|
var CACHE_SIZE = 5;
|
|
9365
9396
|
var getActualTime = ({
|
|
9366
9397
|
loopBehavior,
|
|
@@ -9521,6 +9552,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
9521
9552
|
return new URL(src, window.origin).href;
|
|
9522
9553
|
};
|
|
9523
9554
|
var animatedImageSchema = {
|
|
9555
|
+
src: {
|
|
9556
|
+
type: "asset",
|
|
9557
|
+
default: undefined,
|
|
9558
|
+
description: "Source",
|
|
9559
|
+
keyframable: false
|
|
9560
|
+
},
|
|
9524
9561
|
...baseSchema,
|
|
9525
9562
|
playbackRate: {
|
|
9526
9563
|
type: "number",
|
|
@@ -9938,7 +9975,7 @@ var calculateMediaDuration = ({
|
|
|
9938
9975
|
};
|
|
9939
9976
|
var LoopContext = createContext18(null);
|
|
9940
9977
|
var useLoop = () => {
|
|
9941
|
-
return
|
|
9978
|
+
return React17.useContext(LoopContext);
|
|
9942
9979
|
};
|
|
9943
9980
|
var Loop = ({
|
|
9944
9981
|
durationInFrames,
|
|
@@ -10789,7 +10826,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
10789
10826
|
};
|
|
10790
10827
|
});
|
|
10791
10828
|
}, [audioContext, numberOfAudioTags]);
|
|
10792
|
-
const effectToUse =
|
|
10829
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10793
10830
|
effectToUse(() => {
|
|
10794
10831
|
return () => {
|
|
10795
10832
|
requestAnimationFrame(() => {
|
|
@@ -10959,7 +10996,7 @@ var useSharedAudio = ({
|
|
|
10959
10996
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
10960
10997
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
10961
10998
|
}
|
|
10962
|
-
const el =
|
|
10999
|
+
const el = React20.createRef();
|
|
10963
11000
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
10964
11001
|
audioContext: audioCtx.audioContext,
|
|
10965
11002
|
ref: el
|
|
@@ -10978,7 +11015,7 @@ var useSharedAudio = ({
|
|
|
10978
11015
|
}
|
|
10979
11016
|
};
|
|
10980
11017
|
});
|
|
10981
|
-
const effectToUse =
|
|
11018
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
10982
11019
|
if (typeof document !== "undefined") {
|
|
10983
11020
|
effectToUse(() => {
|
|
10984
11021
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -11530,7 +11567,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
11530
11567
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
11531
11568
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
11532
11569
|
};
|
|
11533
|
-
var BufferingContextReact =
|
|
11570
|
+
var BufferingContextReact = React21.createContext(null);
|
|
11534
11571
|
var BufferingProvider = ({ children }) => {
|
|
11535
11572
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
11536
11573
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -11743,7 +11780,7 @@ var getMediaSyncAction = (input) => {
|
|
|
11743
11780
|
return { type: "none" };
|
|
11744
11781
|
};
|
|
11745
11782
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
11746
|
-
const lastUpdate =
|
|
11783
|
+
const lastUpdate = React22.useRef({
|
|
11747
11784
|
time: mediaRef.current?.currentTime ?? 0,
|
|
11748
11785
|
lastUpdate: performance.now()
|
|
11749
11786
|
});
|
|
@@ -12496,7 +12533,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
12496
12533
|
volume: userPreferredVolume,
|
|
12497
12534
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
12498
12535
|
});
|
|
12499
|
-
const effectToUse =
|
|
12536
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
12500
12537
|
effectToUse(() => {
|
|
12501
12538
|
return () => {
|
|
12502
12539
|
requestAnimationFrame(() => {
|
|
@@ -14042,6 +14079,12 @@ var NativeImgInner = ({
|
|
|
14042
14079
|
};
|
|
14043
14080
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
14044
14081
|
var imgSchema = {
|
|
14082
|
+
src: {
|
|
14083
|
+
type: "asset",
|
|
14084
|
+
default: undefined,
|
|
14085
|
+
description: "Source",
|
|
14086
|
+
keyframable: false
|
|
14087
|
+
},
|
|
14045
14088
|
...baseSchema,
|
|
14046
14089
|
...transformSchema
|
|
14047
14090
|
};
|
|
@@ -14252,7 +14295,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
14252
14295
|
_remotionInternalStack: stack,
|
|
14253
14296
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
14254
14297
|
outlineRef: refForOutline,
|
|
14255
|
-
children:
|
|
14298
|
+
children: React30.createElement(tag, {
|
|
14256
14299
|
...props2,
|
|
14257
14300
|
ref: callbackRef
|
|
14258
14301
|
})
|
|
@@ -14316,7 +14359,7 @@ var Interactive = {
|
|
|
14316
14359
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
14317
14360
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
14318
14361
|
};
|
|
14319
|
-
var compositionsRef =
|
|
14362
|
+
var compositionsRef = React31.createRef();
|
|
14320
14363
|
var CompositionManagerProvider = ({
|
|
14321
14364
|
children,
|
|
14322
14365
|
onlyRenderComposition,
|
|
@@ -14465,7 +14508,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
14465
14508
|
var getPreviewDomElement = () => {
|
|
14466
14509
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
14467
14510
|
};
|
|
14468
|
-
var MaxMediaCacheSizeContext =
|
|
14511
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
14469
14512
|
var Root = null;
|
|
14470
14513
|
var listeners = [];
|
|
14471
14514
|
var getRoot = () => {
|
|
@@ -14738,7 +14781,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
14738
14781
|
};
|
|
14739
14782
|
}
|
|
14740
14783
|
};
|
|
14741
|
-
var SequenceStackTracesUpdateContext =
|
|
14784
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
14742
14785
|
var getEnvVariables = () => {
|
|
14743
14786
|
if (getRemotionEnvironment().isRendering) {
|
|
14744
14787
|
const param = window.remotion_envVariables;
|
|
@@ -14764,7 +14807,7 @@ var setupEnvVariables = () => {
|
|
|
14764
14807
|
window.process.env[key] = env[key];
|
|
14765
14808
|
});
|
|
14766
14809
|
};
|
|
14767
|
-
var CurrentScaleContext =
|
|
14810
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
14768
14811
|
var PreviewSizeContext = createContext25({
|
|
14769
14812
|
setSize: () => {
|
|
14770
14813
|
return;
|
|
@@ -14788,7 +14831,7 @@ var calculateScale = ({
|
|
|
14788
14831
|
}
|
|
14789
14832
|
return Number(previewSize);
|
|
14790
14833
|
};
|
|
14791
|
-
var PixelDensityContext =
|
|
14834
|
+
var PixelDensityContext = React36.createContext(null);
|
|
14792
14835
|
var getOffthreadVideoSource = ({
|
|
14793
14836
|
src,
|
|
14794
14837
|
transparent,
|
|
@@ -15055,7 +15098,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
15055
15098
|
ref: videoRef
|
|
15056
15099
|
});
|
|
15057
15100
|
}, [context.audioContext]);
|
|
15058
|
-
const effectToUse =
|
|
15101
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
15059
15102
|
effectToUse(() => {
|
|
15060
15103
|
return () => {
|
|
15061
15104
|
requestAnimationFrame(() => {
|
|
@@ -15431,20 +15474,20 @@ var OffthreadVideo = ({
|
|
|
15431
15474
|
addSequenceStackTraces(OffthreadVideo);
|
|
15432
15475
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
15433
15476
|
function useRemotionContexts() {
|
|
15434
|
-
const compositionManagerCtx =
|
|
15435
|
-
const timelineContext =
|
|
15436
|
-
const setTimelineContext =
|
|
15437
|
-
const sequenceContext =
|
|
15438
|
-
const nonceContext =
|
|
15439
|
-
const canUseRemotionHooksContext =
|
|
15440
|
-
const preloadContext =
|
|
15441
|
-
const resolveCompositionContext =
|
|
15442
|
-
const renderAssetManagerContext =
|
|
15443
|
-
const sequenceManagerContext =
|
|
15444
|
-
const sequenceManagerRefContext =
|
|
15445
|
-
const visualModePropStatusesRefContext =
|
|
15446
|
-
const bufferManagerContext =
|
|
15447
|
-
const logLevelContext =
|
|
15477
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
15478
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
15479
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
15480
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
15481
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
15482
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
15483
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
15484
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
15485
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
15486
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
15487
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
15488
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
15489
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
15490
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
15448
15491
|
return useMemo37(() => ({
|
|
15449
15492
|
compositionManagerCtx,
|
|
15450
15493
|
timelineContext,
|
|
@@ -15618,6 +15661,8 @@ var Internals = {
|
|
|
15618
15661
|
BufferingProvider,
|
|
15619
15662
|
BufferingContextReact,
|
|
15620
15663
|
getComponentsToAddStacksTo,
|
|
15664
|
+
getSequenceComponent,
|
|
15665
|
+
getSingleChildComponent,
|
|
15621
15666
|
CurrentScaleContext,
|
|
15622
15667
|
PixelDensityContext,
|
|
15623
15668
|
PreviewSizeContext,
|
|
@@ -15675,9 +15720,9 @@ var Internals = {
|
|
|
15675
15720
|
fromField
|
|
15676
15721
|
};
|
|
15677
15722
|
var flattenChildren = (children) => {
|
|
15678
|
-
const childrenArray =
|
|
15723
|
+
const childrenArray = React41.Children.toArray(children);
|
|
15679
15724
|
return childrenArray.reduce((flatChildren, child) => {
|
|
15680
|
-
if (child.type ===
|
|
15725
|
+
if (child.type === React41.Fragment) {
|
|
15681
15726
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
15682
15727
|
}
|
|
15683
15728
|
flatChildren.push(child);
|
|
@@ -15765,7 +15810,7 @@ var SeriesInner = (props2) => {
|
|
|
15765
15810
|
index: i,
|
|
15766
15811
|
childrenLength: flattenedChildren.length
|
|
15767
15812
|
});
|
|
15768
|
-
return
|
|
15813
|
+
return React42.cloneElement(castedElement, {
|
|
15769
15814
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
15770
15815
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
15771
15816
|
const {
|
|
@@ -15923,7 +15968,7 @@ var Still = (props2) => {
|
|
|
15923
15968
|
durationInFrames: 1,
|
|
15924
15969
|
fps: 1
|
|
15925
15970
|
};
|
|
15926
|
-
return
|
|
15971
|
+
return React43.createElement(Composition, newProps);
|
|
15927
15972
|
};
|
|
15928
15973
|
addSequenceStackTraces(Still);
|
|
15929
15974
|
var roundTo6Commas = (num) => {
|
|
@@ -16402,6 +16447,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
16402
16447
|
});
|
|
16403
16448
|
Sequence.displayName = "Sequence";
|
|
16404
16449
|
addSequenceStackTraces(Sequence);
|
|
16450
|
+
setSequenceComponent(Sequence);
|
|
16405
16451
|
addSequenceStackTraces(Composition);
|
|
16406
16452
|
addSequenceStackTraces(Folder);
|
|
16407
16453
|
|
|
@@ -19331,12 +19377,12 @@ import React72 from "react";
|
|
|
19331
19377
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
19332
19378
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
19333
19379
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
19334
|
-
import * as
|
|
19380
|
+
import * as React362 from "react";
|
|
19335
19381
|
import * as ReactDOM4 from "react-dom";
|
|
19336
|
-
import
|
|
19382
|
+
import React11 from "react";
|
|
19337
19383
|
import * as React8 from "react";
|
|
19338
19384
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
19339
|
-
import * as
|
|
19385
|
+
import * as React92 from "react";
|
|
19340
19386
|
import * as React10 from "react";
|
|
19341
19387
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
19342
19388
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -19346,15 +19392,15 @@ import * as React162 from "react";
|
|
|
19346
19392
|
import * as React132 from "react";
|
|
19347
19393
|
import * as ReactDOM from "react-dom";
|
|
19348
19394
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
19349
|
-
import * as
|
|
19350
|
-
import * as
|
|
19395
|
+
import * as React142 from "react";
|
|
19396
|
+
import * as React15 from "react";
|
|
19351
19397
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
19352
|
-
import * as
|
|
19398
|
+
import * as React172 from "react";
|
|
19353
19399
|
import * as React18 from "react";
|
|
19354
19400
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
19355
19401
|
import * as React202 from "react";
|
|
19356
|
-
import * as
|
|
19357
|
-
import * as
|
|
19402
|
+
import * as React19 from "react";
|
|
19403
|
+
import * as React242 from "react";
|
|
19358
19404
|
import * as React212 from "react";
|
|
19359
19405
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
19360
19406
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -19372,7 +19418,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
19372
19418
|
import * as React352 from "react";
|
|
19373
19419
|
import * as React312 from "react";
|
|
19374
19420
|
import { useState as useState112 } from "react";
|
|
19375
|
-
import * as
|
|
19421
|
+
import * as React29 from "react";
|
|
19376
19422
|
import * as React302 from "react";
|
|
19377
19423
|
import * as React342 from "react";
|
|
19378
19424
|
import * as React332 from "react";
|
|
@@ -19380,22 +19426,22 @@ import * as React322 from "react";
|
|
|
19380
19426
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
19381
19427
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
19382
19428
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
19383
|
-
import * as
|
|
19429
|
+
import * as React37 from "react";
|
|
19384
19430
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19385
19431
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
19386
19432
|
import * as React49 from "react";
|
|
19387
|
-
import * as
|
|
19433
|
+
import * as React382 from "react";
|
|
19388
19434
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
19389
19435
|
import * as React47 from "react";
|
|
19390
19436
|
import React402 from "react";
|
|
19391
|
-
import * as
|
|
19437
|
+
import * as React39 from "react";
|
|
19392
19438
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
19393
19439
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
19394
19440
|
import React210 from "react";
|
|
19395
19441
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
19396
19442
|
import * as React422 from "react";
|
|
19397
19443
|
import * as React412 from "react";
|
|
19398
|
-
import * as
|
|
19444
|
+
import * as React432 from "react";
|
|
19399
19445
|
import * as ReactDOM5 from "react-dom";
|
|
19400
19446
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
19401
19447
|
import * as React44 from "react";
|
|
@@ -19447,7 +19493,7 @@ function useComposedRefs(...refs) {
|
|
|
19447
19493
|
return React3.useCallback(composeRefs(...refs), refs);
|
|
19448
19494
|
}
|
|
19449
19495
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
19450
|
-
var use =
|
|
19496
|
+
var use = React24[" use ".trim().toString()];
|
|
19451
19497
|
function isPromiseLike(value) {
|
|
19452
19498
|
return typeof value === "object" && value !== null && "then" in value;
|
|
19453
19499
|
}
|
|
@@ -19456,25 +19502,25 @@ function isLazyComponent(element) {
|
|
|
19456
19502
|
}
|
|
19457
19503
|
function createSlot(ownerName) {
|
|
19458
19504
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
19459
|
-
const Slot2 =
|
|
19505
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
19460
19506
|
let { children, ...slotProps } = props;
|
|
19461
19507
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19462
19508
|
children = use(children._payload);
|
|
19463
19509
|
}
|
|
19464
|
-
const childrenArray =
|
|
19510
|
+
const childrenArray = React24.Children.toArray(children);
|
|
19465
19511
|
const slottable = childrenArray.find(isSlottable);
|
|
19466
19512
|
if (slottable) {
|
|
19467
19513
|
const newElement = slottable.props.children;
|
|
19468
19514
|
const newChildren = childrenArray.map((child) => {
|
|
19469
19515
|
if (child === slottable) {
|
|
19470
|
-
if (
|
|
19471
|
-
return
|
|
19472
|
-
return
|
|
19516
|
+
if (React24.Children.count(newElement) > 1)
|
|
19517
|
+
return React24.Children.only(null);
|
|
19518
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
19473
19519
|
} else {
|
|
19474
19520
|
return child;
|
|
19475
19521
|
}
|
|
19476
19522
|
});
|
|
19477
|
-
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
19523
|
+
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
19478
19524
|
}
|
|
19479
19525
|
return /* @__PURE__ */ jsx43(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
19480
19526
|
});
|
|
@@ -19483,20 +19529,20 @@ function createSlot(ownerName) {
|
|
|
19483
19529
|
}
|
|
19484
19530
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
19485
19531
|
function createSlotClone(ownerName) {
|
|
19486
|
-
const SlotClone =
|
|
19532
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
19487
19533
|
let { children, ...slotProps } = props;
|
|
19488
19534
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
19489
19535
|
children = use(children._payload);
|
|
19490
19536
|
}
|
|
19491
|
-
if (
|
|
19537
|
+
if (React24.isValidElement(children)) {
|
|
19492
19538
|
const childrenRef = getElementRef(children);
|
|
19493
19539
|
const props2 = mergeProps(slotProps, children.props);
|
|
19494
|
-
if (children.type !==
|
|
19540
|
+
if (children.type !== React24.Fragment) {
|
|
19495
19541
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
19496
19542
|
}
|
|
19497
|
-
return
|
|
19543
|
+
return React24.cloneElement(children, props2);
|
|
19498
19544
|
}
|
|
19499
|
-
return
|
|
19545
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
19500
19546
|
});
|
|
19501
19547
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
19502
19548
|
return SlotClone;
|
|
@@ -19512,7 +19558,7 @@ function createSlottable(ownerName) {
|
|
|
19512
19558
|
}
|
|
19513
19559
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
19514
19560
|
function isSlottable(child) {
|
|
19515
|
-
return
|
|
19561
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
19516
19562
|
}
|
|
19517
19563
|
function mergeProps(slotProps, childProps) {
|
|
19518
19564
|
const overrideProps = { ...childProps };
|
|
@@ -19569,7 +19615,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
19569
19615
|
return childNode;
|
|
19570
19616
|
};
|
|
19571
19617
|
var useHoverTransforms = (ref, disabled) => {
|
|
19572
|
-
const [state, setState] =
|
|
19618
|
+
const [state, setState] = React33.useState({
|
|
19573
19619
|
progress: 0,
|
|
19574
19620
|
isActive: false
|
|
19575
19621
|
});
|
|
@@ -19581,7 +19627,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19581
19627
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
19582
19628
|
}
|
|
19583
19629
|
}, [disabled, eventTarget]);
|
|
19584
|
-
|
|
19630
|
+
React33.useEffect(() => {
|
|
19585
19631
|
const element = ref.current;
|
|
19586
19632
|
if (!element)
|
|
19587
19633
|
return;
|
|
@@ -19656,8 +19702,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
19656
19702
|
return state;
|
|
19657
19703
|
};
|
|
19658
19704
|
var useClickTransforms = (ref) => {
|
|
19659
|
-
const [hoverProgress, setHoverProgress] =
|
|
19660
|
-
|
|
19705
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
19706
|
+
React33.useEffect(() => {
|
|
19661
19707
|
const element = getChildNodeFrom(ref.current);
|
|
19662
19708
|
if (!element) {
|
|
19663
19709
|
return;
|
|
@@ -20233,7 +20279,7 @@ function composeRefs2(...refs) {
|
|
|
20233
20279
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
20234
20280
|
}
|
|
20235
20281
|
function useComposedRefs2(...refs) {
|
|
20236
|
-
return
|
|
20282
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
20237
20283
|
}
|
|
20238
20284
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
20239
20285
|
const { children, ...slotProps } = props;
|
|
@@ -20315,13 +20361,13 @@ function createCollection(name) {
|
|
|
20315
20361
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
20316
20362
|
const CollectionProvider = (props) => {
|
|
20317
20363
|
const { scope, children } = props;
|
|
20318
|
-
const ref =
|
|
20319
|
-
const itemMap =
|
|
20364
|
+
const ref = React11.useRef(null);
|
|
20365
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
20320
20366
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
20321
20367
|
};
|
|
20322
20368
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
20323
20369
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
20324
|
-
const CollectionSlot =
|
|
20370
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20325
20371
|
const { scope, children } = props;
|
|
20326
20372
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
20327
20373
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -20330,12 +20376,12 @@ function createCollection(name) {
|
|
|
20330
20376
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
20331
20377
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
20332
20378
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
20333
|
-
const CollectionItemSlot =
|
|
20379
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
20334
20380
|
const { scope, children, ...itemData } = props;
|
|
20335
|
-
const ref =
|
|
20381
|
+
const ref = React11.useRef(null);
|
|
20336
20382
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
20337
20383
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
20338
|
-
|
|
20384
|
+
React11.useEffect(() => {
|
|
20339
20385
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
20340
20386
|
return () => void context.itemMap.delete(ref);
|
|
20341
20387
|
});
|
|
@@ -20344,7 +20390,7 @@ function createCollection(name) {
|
|
|
20344
20390
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
20345
20391
|
function useCollection(scope) {
|
|
20346
20392
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
20347
|
-
const getItems =
|
|
20393
|
+
const getItems = React11.useCallback(() => {
|
|
20348
20394
|
const collectionNode = context.collectionRef.current;
|
|
20349
20395
|
if (!collectionNode)
|
|
20350
20396
|
return [];
|
|
@@ -20401,15 +20447,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20401
20447
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
20402
20448
|
}
|
|
20403
20449
|
function useCallbackRef(callback) {
|
|
20404
|
-
const callbackRef =
|
|
20405
|
-
|
|
20450
|
+
const callbackRef = React142.useRef(callback);
|
|
20451
|
+
React142.useEffect(() => {
|
|
20406
20452
|
callbackRef.current = callback;
|
|
20407
20453
|
});
|
|
20408
|
-
return
|
|
20454
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20409
20455
|
}
|
|
20410
20456
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20411
20457
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
20412
|
-
|
|
20458
|
+
React15.useEffect(() => {
|
|
20413
20459
|
const handleKeyDown = (event) => {
|
|
20414
20460
|
if (event.key === "Escape") {
|
|
20415
20461
|
onEscapeKeyDown(event);
|
|
@@ -20616,7 +20662,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
20616
20662
|
}
|
|
20617
20663
|
var count = 0;
|
|
20618
20664
|
function useFocusGuards() {
|
|
20619
|
-
|
|
20665
|
+
React172.useEffect(() => {
|
|
20620
20666
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20621
20667
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20622
20668
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -20851,7 +20897,7 @@ function arrayRemove(array, item) {
|
|
|
20851
20897
|
function removeLinks(items) {
|
|
20852
20898
|
return items.filter((item) => item.tagName !== "A");
|
|
20853
20899
|
}
|
|
20854
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
20900
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
20855
20901
|
var useReactId = React202["useId".toString()] || (() => {
|
|
20856
20902
|
return;
|
|
20857
20903
|
});
|
|
@@ -22703,17 +22749,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
22703
22749
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22704
22750
|
var Popper = (props) => {
|
|
22705
22751
|
const { __scopePopper, children } = props;
|
|
22706
|
-
const [anchor, setAnchor] =
|
|
22752
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
22707
22753
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22708
22754
|
};
|
|
22709
22755
|
Popper.displayName = POPPER_NAME;
|
|
22710
22756
|
var ANCHOR_NAME = "PopperAnchor";
|
|
22711
|
-
var PopperAnchor =
|
|
22757
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
22712
22758
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
22713
22759
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
22714
|
-
const ref =
|
|
22760
|
+
const ref = React242.useRef(null);
|
|
22715
22761
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
22716
|
-
|
|
22762
|
+
React242.useEffect(() => {
|
|
22717
22763
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
22718
22764
|
});
|
|
22719
22765
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -22721,7 +22767,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
22721
22767
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
22722
22768
|
var CONTENT_NAME = "PopperContent";
|
|
22723
22769
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
22724
|
-
var PopperContent =
|
|
22770
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
22725
22771
|
const {
|
|
22726
22772
|
__scopePopper,
|
|
22727
22773
|
side = "bottom",
|
|
@@ -22739,9 +22785,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22739
22785
|
...contentProps
|
|
22740
22786
|
} = props;
|
|
22741
22787
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
22742
|
-
const [content, setContent] =
|
|
22788
|
+
const [content, setContent] = React242.useState(null);
|
|
22743
22789
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
22744
|
-
const [arrow4, setArrow] =
|
|
22790
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
22745
22791
|
const arrowSize = useSize(arrow4);
|
|
22746
22792
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
22747
22793
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -22801,7 +22847,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
22801
22847
|
const arrowX = middlewareData.arrow?.x;
|
|
22802
22848
|
const arrowY = middlewareData.arrow?.y;
|
|
22803
22849
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
22804
|
-
const [contentZIndex, setContentZIndex] =
|
|
22850
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
22805
22851
|
useLayoutEffect22(() => {
|
|
22806
22852
|
if (content)
|
|
22807
22853
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -22852,7 +22898,7 @@ var OPPOSITE_SIDE = {
|
|
|
22852
22898
|
bottom: "top",
|
|
22853
22899
|
left: "right"
|
|
22854
22900
|
};
|
|
22855
|
-
var PopperArrow =
|
|
22901
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
22856
22902
|
const { __scopePopper, ...arrowProps } = props;
|
|
22857
22903
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
22858
22904
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -23195,7 +23241,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
23195
23241
|
ref.callback = callback;
|
|
23196
23242
|
return ref.facade;
|
|
23197
23243
|
}
|
|
23198
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
23244
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
23199
23245
|
var currentValues = new WeakMap;
|
|
23200
23246
|
function useMergeRefs(refs, defaultValue) {
|
|
23201
23247
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -23831,9 +23877,9 @@ var Select = (props) => {
|
|
|
23831
23877
|
required
|
|
23832
23878
|
} = props;
|
|
23833
23879
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23834
|
-
const [trigger, setTrigger] =
|
|
23835
|
-
const [valueNode, setValueNode] =
|
|
23836
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
23880
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
23881
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
23882
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
23837
23883
|
const direction = useDirection(dir);
|
|
23838
23884
|
const [open = false, setOpen] = useControllableState({
|
|
23839
23885
|
prop: openProp,
|
|
@@ -23845,9 +23891,9 @@ var Select = (props) => {
|
|
|
23845
23891
|
defaultProp: defaultValue,
|
|
23846
23892
|
onChange: onValueChange
|
|
23847
23893
|
});
|
|
23848
|
-
const triggerPointerDownPosRef =
|
|
23894
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
23849
23895
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
23850
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
23896
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
23851
23897
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
23852
23898
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
23853
23899
|
required,
|
|
@@ -23869,10 +23915,10 @@ var Select = (props) => {
|
|
|
23869
23915
|
children: [
|
|
23870
23916
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
23871
23917
|
scope: props.__scopeSelect,
|
|
23872
|
-
onNativeOptionAdd:
|
|
23918
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
23873
23919
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
23874
23920
|
}, []),
|
|
23875
|
-
onNativeOptionRemove:
|
|
23921
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
23876
23922
|
setNativeOptionsSet((prev) => {
|
|
23877
23923
|
const optionsSet = new Set(prev);
|
|
23878
23924
|
optionsSet.delete(option);
|
|
@@ -23900,7 +23946,7 @@ var Select = (props) => {
|
|
|
23900
23946
|
};
|
|
23901
23947
|
Select.displayName = SELECT_NAME;
|
|
23902
23948
|
var TRIGGER_NAME = "SelectTrigger";
|
|
23903
|
-
var SelectTrigger =
|
|
23949
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
23904
23950
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
23905
23951
|
const popperScope = usePopperScope(__scopeSelect);
|
|
23906
23952
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -23968,7 +24014,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
23968
24014
|
});
|
|
23969
24015
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
23970
24016
|
var VALUE_NAME = "SelectValue";
|
|
23971
|
-
var SelectValue =
|
|
24017
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
23972
24018
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
23973
24019
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
23974
24020
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -23986,7 +24032,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
23986
24032
|
});
|
|
23987
24033
|
SelectValue.displayName = VALUE_NAME;
|
|
23988
24034
|
var ICON_NAME = "SelectIcon";
|
|
23989
|
-
var SelectIcon =
|
|
24035
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
23990
24036
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
23991
24037
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
23992
24038
|
});
|
|
@@ -23997,9 +24043,9 @@ var SelectPortal = (props) => {
|
|
|
23997
24043
|
};
|
|
23998
24044
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
23999
24045
|
var CONTENT_NAME2 = "SelectContent";
|
|
24000
|
-
var SelectContent =
|
|
24046
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
24001
24047
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
24002
|
-
const [fragment, setFragment] =
|
|
24048
|
+
const [fragment, setFragment] = React362.useState();
|
|
24003
24049
|
useLayoutEffect22(() => {
|
|
24004
24050
|
setFragment(new DocumentFragment);
|
|
24005
24051
|
}, []);
|
|
@@ -24013,7 +24059,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
24013
24059
|
var CONTENT_MARGIN = 10;
|
|
24014
24060
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
24015
24061
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
24016
|
-
var SelectContentImpl =
|
|
24062
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24017
24063
|
const {
|
|
24018
24064
|
__scopeSelect,
|
|
24019
24065
|
position = "item-aligned",
|
|
@@ -24033,20 +24079,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24033
24079
|
...contentProps
|
|
24034
24080
|
} = props;
|
|
24035
24081
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24036
|
-
const [content, setContent] =
|
|
24037
|
-
const [viewport, setViewport] =
|
|
24082
|
+
const [content, setContent] = React362.useState(null);
|
|
24083
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
24038
24084
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24039
|
-
const [selectedItem, setSelectedItem] =
|
|
24040
|
-
const [selectedItemText, setSelectedItemText] =
|
|
24085
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
24086
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
24041
24087
|
const getItems = useCollection(__scopeSelect);
|
|
24042
|
-
const [isPositioned, setIsPositioned] =
|
|
24043
|
-
const firstValidItemFoundRef =
|
|
24044
|
-
|
|
24088
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
24089
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
24090
|
+
React362.useEffect(() => {
|
|
24045
24091
|
if (content)
|
|
24046
24092
|
return hideOthers(content);
|
|
24047
24093
|
}, [content]);
|
|
24048
24094
|
useFocusGuards();
|
|
24049
|
-
const focusFirst2 =
|
|
24095
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
24050
24096
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
24051
24097
|
const [lastItem] = restItems.slice(-1);
|
|
24052
24098
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -24063,14 +24109,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24063
24109
|
return;
|
|
24064
24110
|
}
|
|
24065
24111
|
}, [getItems, viewport]);
|
|
24066
|
-
const focusSelectedItem =
|
|
24067
|
-
|
|
24112
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
24113
|
+
React362.useEffect(() => {
|
|
24068
24114
|
if (isPositioned) {
|
|
24069
24115
|
focusSelectedItem();
|
|
24070
24116
|
}
|
|
24071
24117
|
}, [isPositioned, focusSelectedItem]);
|
|
24072
24118
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
24073
|
-
|
|
24119
|
+
React362.useEffect(() => {
|
|
24074
24120
|
if (content) {
|
|
24075
24121
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
24076
24122
|
const handlePointerMove = (event) => {
|
|
@@ -24100,7 +24146,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24100
24146
|
};
|
|
24101
24147
|
}
|
|
24102
24148
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
24103
|
-
|
|
24149
|
+
React362.useEffect(() => {
|
|
24104
24150
|
const close = () => onOpenChange(false);
|
|
24105
24151
|
window.addEventListener("blur", close);
|
|
24106
24152
|
window.addEventListener("resize", close);
|
|
@@ -24117,7 +24163,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24117
24163
|
setTimeout(() => nextItem.ref.current.focus());
|
|
24118
24164
|
}
|
|
24119
24165
|
});
|
|
24120
|
-
const itemRefCallback =
|
|
24166
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24121
24167
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24122
24168
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24123
24169
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24126,8 +24172,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24126
24172
|
firstValidItemFoundRef.current = true;
|
|
24127
24173
|
}
|
|
24128
24174
|
}, [context.value]);
|
|
24129
|
-
const handleItemLeave =
|
|
24130
|
-
const itemTextRefCallback =
|
|
24175
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
24176
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
24131
24177
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
24132
24178
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
24133
24179
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -24222,18 +24268,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24222
24268
|
});
|
|
24223
24269
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
24224
24270
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
24225
|
-
var SelectItemAlignedPosition =
|
|
24271
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24226
24272
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
24227
24273
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
24228
24274
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
24229
|
-
const [contentWrapper, setContentWrapper] =
|
|
24230
|
-
const [content, setContent] =
|
|
24275
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
24276
|
+
const [content, setContent] = React362.useState(null);
|
|
24231
24277
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24232
24278
|
const getItems = useCollection(__scopeSelect);
|
|
24233
|
-
const shouldExpandOnScrollRef =
|
|
24234
|
-
const shouldRepositionRef =
|
|
24279
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
24280
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
24235
24281
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
24236
|
-
const position =
|
|
24282
|
+
const position = React362.useCallback(() => {
|
|
24237
24283
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
24238
24284
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
24239
24285
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -24314,12 +24360,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24314
24360
|
onPlaced
|
|
24315
24361
|
]);
|
|
24316
24362
|
useLayoutEffect22(() => position(), [position]);
|
|
24317
|
-
const [contentZIndex, setContentZIndex] =
|
|
24363
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
24318
24364
|
useLayoutEffect22(() => {
|
|
24319
24365
|
if (content)
|
|
24320
24366
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
24321
24367
|
}, [content]);
|
|
24322
|
-
const handleScrollButtonChange =
|
|
24368
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
24323
24369
|
if (node && shouldRepositionRef.current === true) {
|
|
24324
24370
|
position();
|
|
24325
24371
|
focusSelectedItem?.();
|
|
@@ -24353,7 +24399,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24353
24399
|
});
|
|
24354
24400
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
24355
24401
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
24356
|
-
var SelectPopperPosition =
|
|
24402
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
24357
24403
|
const {
|
|
24358
24404
|
__scopeSelect,
|
|
24359
24405
|
align = "start",
|
|
@@ -24383,12 +24429,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
24383
24429
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
24384
24430
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
24385
24431
|
var VIEWPORT_NAME = "SelectViewport";
|
|
24386
|
-
var SelectViewport =
|
|
24432
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
24387
24433
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
24388
24434
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
24389
24435
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
24390
24436
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
24391
|
-
const prevScrollTopRef =
|
|
24437
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
24392
24438
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
24393
24439
|
/* @__PURE__ */ jsx242("style", {
|
|
24394
24440
|
dangerouslySetInnerHTML: {
|
|
@@ -24437,14 +24483,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
24437
24483
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
24438
24484
|
var GROUP_NAME = "SelectGroup";
|
|
24439
24485
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
24440
|
-
var SelectGroup =
|
|
24486
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
24441
24487
|
const { __scopeSelect, ...groupProps } = props;
|
|
24442
24488
|
const groupId = useId();
|
|
24443
24489
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
24444
24490
|
});
|
|
24445
24491
|
SelectGroup.displayName = GROUP_NAME;
|
|
24446
24492
|
var LABEL_NAME = "SelectLabel";
|
|
24447
|
-
var SelectLabel =
|
|
24493
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
24448
24494
|
const { __scopeSelect, ...labelProps } = props;
|
|
24449
24495
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
24450
24496
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -24452,7 +24498,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
24452
24498
|
SelectLabel.displayName = LABEL_NAME;
|
|
24453
24499
|
var ITEM_NAME = "SelectItem";
|
|
24454
24500
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
24455
|
-
var SelectItem =
|
|
24501
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
24456
24502
|
const {
|
|
24457
24503
|
__scopeSelect,
|
|
24458
24504
|
value,
|
|
@@ -24463,8 +24509,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24463
24509
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
24464
24510
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
24465
24511
|
const isSelected = context.value === value;
|
|
24466
|
-
const [textValue, setTextValue] =
|
|
24467
|
-
const [isFocused, setIsFocused] =
|
|
24512
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
24513
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
24468
24514
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
24469
24515
|
const textId = useId();
|
|
24470
24516
|
const handleSelect = () => {
|
|
@@ -24482,7 +24528,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24482
24528
|
disabled,
|
|
24483
24529
|
textId,
|
|
24484
24530
|
isSelected,
|
|
24485
|
-
onItemTextChange:
|
|
24531
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
24486
24532
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
24487
24533
|
}, []),
|
|
24488
24534
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -24531,16 +24577,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
24531
24577
|
});
|
|
24532
24578
|
SelectItem.displayName = ITEM_NAME;
|
|
24533
24579
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
24534
|
-
var SelectItemText =
|
|
24580
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
24535
24581
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
24536
24582
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24537
24583
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24538
24584
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24539
24585
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
24540
|
-
const [itemTextNode, setItemTextNode] =
|
|
24586
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
24541
24587
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
24542
24588
|
const textContent = itemTextNode?.textContent;
|
|
24543
|
-
const nativeOption =
|
|
24589
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
24544
24590
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
24545
24591
|
useLayoutEffect22(() => {
|
|
24546
24592
|
onNativeOptionAdd(nativeOption);
|
|
@@ -24553,17 +24599,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
24553
24599
|
});
|
|
24554
24600
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
24555
24601
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
24556
|
-
var SelectItemIndicator =
|
|
24602
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
24557
24603
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
24558
24604
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
24559
24605
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
24560
24606
|
});
|
|
24561
24607
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
24562
24608
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
24563
|
-
var SelectScrollUpButton =
|
|
24609
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
24564
24610
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24565
24611
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
24566
|
-
const [canScrollUp, setCanScrollUp] =
|
|
24612
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
24567
24613
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24568
24614
|
useLayoutEffect22(() => {
|
|
24569
24615
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24591,10 +24637,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24591
24637
|
});
|
|
24592
24638
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
24593
24639
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
24594
|
-
var SelectScrollDownButton =
|
|
24640
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
24595
24641
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24596
24642
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
24597
|
-
const [canScrollDown, setCanScrollDown] =
|
|
24643
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
24598
24644
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
24599
24645
|
useLayoutEffect22(() => {
|
|
24600
24646
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -24622,18 +24668,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
24622
24668
|
}) : null;
|
|
24623
24669
|
});
|
|
24624
24670
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
24625
|
-
var SelectScrollButtonImpl =
|
|
24671
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
24626
24672
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
24627
24673
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
24628
|
-
const autoScrollTimerRef =
|
|
24674
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
24629
24675
|
const getItems = useCollection(__scopeSelect);
|
|
24630
|
-
const clearAutoScrollTimer =
|
|
24676
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
24631
24677
|
if (autoScrollTimerRef.current !== null) {
|
|
24632
24678
|
window.clearInterval(autoScrollTimerRef.current);
|
|
24633
24679
|
autoScrollTimerRef.current = null;
|
|
24634
24680
|
}
|
|
24635
24681
|
}, []);
|
|
24636
|
-
|
|
24682
|
+
React362.useEffect(() => {
|
|
24637
24683
|
return () => clearAutoScrollTimer();
|
|
24638
24684
|
}, [clearAutoScrollTimer]);
|
|
24639
24685
|
useLayoutEffect22(() => {
|
|
@@ -24662,13 +24708,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
24662
24708
|
});
|
|
24663
24709
|
});
|
|
24664
24710
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
24665
|
-
var SelectSeparator =
|
|
24711
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
24666
24712
|
const { __scopeSelect, ...separatorProps } = props;
|
|
24667
24713
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
24668
24714
|
});
|
|
24669
24715
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
24670
24716
|
var ARROW_NAME2 = "SelectArrow";
|
|
24671
|
-
var SelectArrow =
|
|
24717
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
24672
24718
|
const { __scopeSelect, ...arrowProps } = props;
|
|
24673
24719
|
const popperScope = usePopperScope(__scopeSelect);
|
|
24674
24720
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -24679,12 +24725,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
24679
24725
|
function shouldShowPlaceholder(value) {
|
|
24680
24726
|
return value === "" || value === undefined;
|
|
24681
24727
|
}
|
|
24682
|
-
var BubbleSelect =
|
|
24728
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
24683
24729
|
const { value, ...selectProps } = props;
|
|
24684
|
-
const ref =
|
|
24730
|
+
const ref = React362.useRef(null);
|
|
24685
24731
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24686
24732
|
const prevValue = usePrevious(value);
|
|
24687
|
-
|
|
24733
|
+
React362.useEffect(() => {
|
|
24688
24734
|
const select = ref.current;
|
|
24689
24735
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
24690
24736
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -24700,9 +24746,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
24700
24746
|
BubbleSelect.displayName = "BubbleSelect";
|
|
24701
24747
|
function useTypeaheadSearch(onSearchChange) {
|
|
24702
24748
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
24703
|
-
const searchRef =
|
|
24704
|
-
const timerRef =
|
|
24705
|
-
const handleTypeaheadSearch =
|
|
24749
|
+
const searchRef = React362.useRef("");
|
|
24750
|
+
const timerRef = React362.useRef(0);
|
|
24751
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
24706
24752
|
const search = searchRef.current + key;
|
|
24707
24753
|
handleSearchChange(search);
|
|
24708
24754
|
(function updateSearch(value) {
|
|
@@ -24712,11 +24758,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
24712
24758
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
24713
24759
|
})(search);
|
|
24714
24760
|
}, [handleSearchChange]);
|
|
24715
|
-
const resetTypeahead =
|
|
24761
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
24716
24762
|
searchRef.current = "";
|
|
24717
24763
|
window.clearTimeout(timerRef.current);
|
|
24718
24764
|
}, []);
|
|
24719
|
-
|
|
24765
|
+
React362.useEffect(() => {
|
|
24720
24766
|
return () => window.clearTimeout(timerRef.current);
|
|
24721
24767
|
}, []);
|
|
24722
24768
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -24805,7 +24851,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
24805
24851
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
24806
24852
|
var Select2 = Root222;
|
|
24807
24853
|
var SelectValue2 = Value;
|
|
24808
|
-
var SelectTrigger2 =
|
|
24854
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
24809
24855
|
ref,
|
|
24810
24856
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
24811
24857
|
...props,
|
|
@@ -24820,7 +24866,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
24820
24866
|
]
|
|
24821
24867
|
}));
|
|
24822
24868
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
24823
|
-
var SelectScrollUpButton2 =
|
|
24869
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
24824
24870
|
ref,
|
|
24825
24871
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24826
24872
|
...props,
|
|
@@ -24829,7 +24875,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
24829
24875
|
})
|
|
24830
24876
|
}));
|
|
24831
24877
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
24832
|
-
var SelectScrollDownButton2 =
|
|
24878
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
24833
24879
|
ref,
|
|
24834
24880
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
24835
24881
|
...props,
|
|
@@ -24838,7 +24884,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
24838
24884
|
})
|
|
24839
24885
|
}));
|
|
24840
24886
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
24841
|
-
var SelectContent2 =
|
|
24887
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
24842
24888
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
24843
24889
|
ref,
|
|
24844
24890
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
@@ -24855,13 +24901,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
24855
24901
|
})
|
|
24856
24902
|
}));
|
|
24857
24903
|
SelectContent2.displayName = Content2.displayName;
|
|
24858
|
-
var SelectLabel2 =
|
|
24904
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
24859
24905
|
ref,
|
|
24860
24906
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
24861
24907
|
...props
|
|
24862
24908
|
}));
|
|
24863
24909
|
SelectLabel2.displayName = Label.displayName;
|
|
24864
|
-
var SelectItem2 =
|
|
24910
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
24865
24911
|
ref,
|
|
24866
24912
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
24867
24913
|
...props,
|
|
@@ -24880,7 +24926,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
24880
24926
|
]
|
|
24881
24927
|
}));
|
|
24882
24928
|
SelectItem2.displayName = Item.displayName;
|
|
24883
|
-
var SelectSeparator2 =
|
|
24929
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
24884
24930
|
ref,
|
|
24885
24931
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
24886
24932
|
...props
|
|
@@ -24913,19 +24959,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
24913
24959
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
24914
24960
|
let defaultContexts = [];
|
|
24915
24961
|
function createContext32(rootComponentName, defaultContext) {
|
|
24916
|
-
const BaseContext =
|
|
24962
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
24917
24963
|
const index2 = defaultContexts.length;
|
|
24918
24964
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
24919
24965
|
const Provider = (props) => {
|
|
24920
24966
|
const { scope, children, ...context } = props;
|
|
24921
24967
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24922
|
-
const value =
|
|
24968
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
24923
24969
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
24924
24970
|
};
|
|
24925
24971
|
Provider.displayName = rootComponentName + "Provider";
|
|
24926
24972
|
function useContext222(consumerName, scope) {
|
|
24927
24973
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
24928
|
-
const context =
|
|
24974
|
+
const context = React382.useContext(Context);
|
|
24929
24975
|
if (context)
|
|
24930
24976
|
return context;
|
|
24931
24977
|
if (defaultContext !== undefined)
|
|
@@ -24936,11 +24982,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
24936
24982
|
}
|
|
24937
24983
|
const createScope = () => {
|
|
24938
24984
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
24939
|
-
return
|
|
24985
|
+
return React382.createContext(defaultContext);
|
|
24940
24986
|
});
|
|
24941
24987
|
return function useScope(scope) {
|
|
24942
24988
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
24943
|
-
return
|
|
24989
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
24944
24990
|
};
|
|
24945
24991
|
};
|
|
24946
24992
|
createScope.scopeName = scopeName;
|
|
@@ -24961,7 +25007,7 @@ function composeContextScopes2(...scopes) {
|
|
|
24961
25007
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
24962
25008
|
return { ...nextScopes2, ...currentScope };
|
|
24963
25009
|
}, {});
|
|
24964
|
-
return
|
|
25010
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
24965
25011
|
};
|
|
24966
25012
|
};
|
|
24967
25013
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -24969,22 +25015,22 @@ function composeContextScopes2(...scopes) {
|
|
|
24969
25015
|
}
|
|
24970
25016
|
function createSlot2(ownerName) {
|
|
24971
25017
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
24972
|
-
const Slot22 =
|
|
25018
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
24973
25019
|
const { children, ...slotProps } = props;
|
|
24974
|
-
const childrenArray =
|
|
25020
|
+
const childrenArray = React39.Children.toArray(children);
|
|
24975
25021
|
const slottable = childrenArray.find(isSlottable3);
|
|
24976
25022
|
if (slottable) {
|
|
24977
25023
|
const newElement = slottable.props.children;
|
|
24978
25024
|
const newChildren = childrenArray.map((child) => {
|
|
24979
25025
|
if (child === slottable) {
|
|
24980
|
-
if (
|
|
24981
|
-
return
|
|
24982
|
-
return
|
|
25026
|
+
if (React39.Children.count(newElement) > 1)
|
|
25027
|
+
return React39.Children.only(null);
|
|
25028
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
24983
25029
|
} else {
|
|
24984
25030
|
return child;
|
|
24985
25031
|
}
|
|
24986
25032
|
});
|
|
24987
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
25033
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
24988
25034
|
}
|
|
24989
25035
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
24990
25036
|
});
|
|
@@ -24992,24 +25038,24 @@ function createSlot2(ownerName) {
|
|
|
24992
25038
|
return Slot22;
|
|
24993
25039
|
}
|
|
24994
25040
|
function createSlotClone2(ownerName) {
|
|
24995
|
-
const SlotClone2 =
|
|
25041
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
24996
25042
|
const { children, ...slotProps } = props;
|
|
24997
|
-
if (
|
|
25043
|
+
if (React39.isValidElement(children)) {
|
|
24998
25044
|
const childrenRef = getElementRef3(children);
|
|
24999
25045
|
const props2 = mergeProps3(slotProps, children.props);
|
|
25000
|
-
if (children.type !==
|
|
25046
|
+
if (children.type !== React39.Fragment) {
|
|
25001
25047
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
25002
25048
|
}
|
|
25003
|
-
return
|
|
25049
|
+
return React39.cloneElement(children, props2);
|
|
25004
25050
|
}
|
|
25005
|
-
return
|
|
25051
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
25006
25052
|
});
|
|
25007
25053
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
25008
25054
|
return SlotClone2;
|
|
25009
25055
|
}
|
|
25010
25056
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
25011
25057
|
function isSlottable3(child) {
|
|
25012
|
-
return
|
|
25058
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
25013
25059
|
}
|
|
25014
25060
|
function mergeProps3(slotProps, childProps) {
|
|
25015
25061
|
const overrideProps = { ...childProps };
|
|
@@ -25437,7 +25483,7 @@ var NODES2 = [
|
|
|
25437
25483
|
];
|
|
25438
25484
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
25439
25485
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
25440
|
-
const Node2 =
|
|
25486
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
25441
25487
|
const { asChild, ...primitiveProps } = props;
|
|
25442
25488
|
const Comp = asChild ? Slot3 : node;
|
|
25443
25489
|
if (typeof window !== "undefined") {
|