@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.js
CHANGED
|
@@ -941,6 +941,7 @@ import * as React6 from "react";
|
|
|
941
941
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
942
942
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
943
943
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
944
|
+
import React9 from "react";
|
|
944
945
|
import {
|
|
945
946
|
forwardRef as forwardRef3,
|
|
946
947
|
useCallback as useCallback6,
|
|
@@ -966,11 +967,11 @@ import { useContext as useContext13 } from "react";
|
|
|
966
967
|
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
967
968
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
968
969
|
import { createContext as createContext14 } from "react";
|
|
969
|
-
import
|
|
970
|
+
import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
970
971
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
971
|
-
import
|
|
972
|
+
import React13, { createContext as createContext15 } from "react";
|
|
972
973
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
973
|
-
import
|
|
974
|
+
import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
|
|
974
975
|
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
975
976
|
import { createContext as createContext16 } from "react";
|
|
976
977
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -982,7 +983,7 @@ import {
|
|
|
982
983
|
useRef as useRef9,
|
|
983
984
|
useState as useState6
|
|
984
985
|
} from "react";
|
|
985
|
-
import
|
|
986
|
+
import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
986
987
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
987
988
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
988
989
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
@@ -998,7 +999,7 @@ import {
|
|
|
998
999
|
} from "react";
|
|
999
1000
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1000
1001
|
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
1001
|
-
import
|
|
1002
|
+
import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
1002
1003
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1003
1004
|
import { useContext as useContext19 } from "react";
|
|
1004
1005
|
import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
|
|
@@ -1006,7 +1007,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
|
|
|
1006
1007
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
1007
1008
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1008
1009
|
import { useCallback as useCallback13 } from "react";
|
|
1009
|
-
import
|
|
1010
|
+
import React23, {
|
|
1010
1011
|
forwardRef as forwardRef5,
|
|
1011
1012
|
useContext as useContext28,
|
|
1012
1013
|
useEffect as useEffect14,
|
|
@@ -1016,7 +1017,7 @@ import React22, {
|
|
|
1016
1017
|
useState as useState14
|
|
1017
1018
|
} from "react";
|
|
1018
1019
|
import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
|
|
1019
|
-
import
|
|
1020
|
+
import React20, {
|
|
1020
1021
|
createContext as createContext21,
|
|
1021
1022
|
createRef as createRef2,
|
|
1022
1023
|
useCallback as useCallback9,
|
|
@@ -1040,7 +1041,7 @@ import {
|
|
|
1040
1041
|
} from "react";
|
|
1041
1042
|
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
1042
1043
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
1043
|
-
import
|
|
1044
|
+
import React21, {
|
|
1044
1045
|
useCallback as useCallback10,
|
|
1045
1046
|
useContext as useContext24,
|
|
1046
1047
|
useEffect as useEffect9,
|
|
@@ -1050,7 +1051,7 @@ import React20, {
|
|
|
1050
1051
|
useState as useState12
|
|
1051
1052
|
} from "react";
|
|
1052
1053
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1053
|
-
import
|
|
1054
|
+
import React22 from "react";
|
|
1054
1055
|
import { useEffect as useEffect10, useState as useState13 } from "react";
|
|
1055
1056
|
import { useEffect as useEffect11, useRef as useRef17 } from "react";
|
|
1056
1057
|
import { useEffect as useEffect13 } from "react";
|
|
@@ -1108,10 +1109,10 @@ import {
|
|
|
1108
1109
|
useState as useState18
|
|
1109
1110
|
} from "react";
|
|
1110
1111
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1111
|
-
import
|
|
1112
|
+
import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
1112
1113
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1113
1114
|
import { createRef as createRef3 } from "react";
|
|
1114
|
-
import
|
|
1115
|
+
import React31 from "react";
|
|
1115
1116
|
import {
|
|
1116
1117
|
useCallback as useCallback21,
|
|
1117
1118
|
useImperativeHandle as useImperativeHandle8,
|
|
@@ -1120,14 +1121,14 @@ import {
|
|
|
1120
1121
|
useState as useState19
|
|
1121
1122
|
} from "react";
|
|
1122
1123
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1123
|
-
import
|
|
1124
|
+
import React32 from "react";
|
|
1124
1125
|
import { useMemo as useMemo34 } from "react";
|
|
1125
1126
|
import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
|
|
1126
1127
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1127
1128
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1128
|
-
import
|
|
1129
|
-
import
|
|
1130
|
-
import
|
|
1129
|
+
import React34 from "react";
|
|
1130
|
+
import React35, { createContext as createContext25 } from "react";
|
|
1131
|
+
import React36, { useContext as useContext35 } from "react";
|
|
1131
1132
|
import { useCallback as useCallback24 } from "react";
|
|
1132
1133
|
import {
|
|
1133
1134
|
useCallback as useCallback22,
|
|
@@ -1138,7 +1139,7 @@ import {
|
|
|
1138
1139
|
useState as useState20
|
|
1139
1140
|
} from "react";
|
|
1140
1141
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1141
|
-
import
|
|
1142
|
+
import React38, {
|
|
1142
1143
|
forwardRef as forwardRef13,
|
|
1143
1144
|
useCallback as useCallback23,
|
|
1144
1145
|
useContext as useContext37,
|
|
@@ -1151,15 +1152,15 @@ import React37, {
|
|
|
1151
1152
|
import { useEffect as useEffect18 } from "react";
|
|
1152
1153
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1153
1154
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1154
|
-
import
|
|
1155
|
+
import React40, { useMemo as useMemo37 } from "react";
|
|
1155
1156
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1156
|
-
import
|
|
1157
|
+
import React42, {
|
|
1157
1158
|
forwardRef as forwardRef14,
|
|
1158
1159
|
useMemo as useMemo38
|
|
1159
1160
|
} from "react";
|
|
1160
|
-
import
|
|
1161
|
+
import React41 from "react";
|
|
1161
1162
|
import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
1162
|
-
import
|
|
1163
|
+
import React43 from "react";
|
|
1163
1164
|
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
1164
1165
|
import {
|
|
1165
1166
|
forwardRef as forwardRef15,
|
|
@@ -2237,6 +2238,7 @@ var InnerComposition = ({
|
|
|
2237
2238
|
}
|
|
2238
2239
|
const { folderName, parentName } = useContext9(FolderContext);
|
|
2239
2240
|
const stack = compProps.stack ?? null;
|
|
2241
|
+
const componentFromProps = "component" in compProps ? compProps.component : null;
|
|
2240
2242
|
useEffect2(() => {
|
|
2241
2243
|
if (!id) {
|
|
2242
2244
|
throw new Error("No id for composition passed.");
|
|
@@ -2254,6 +2256,7 @@ var InnerComposition = ({
|
|
|
2254
2256
|
defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
|
|
2255
2257
|
nonce: nonce.get(),
|
|
2256
2258
|
parentFolderName: parentName,
|
|
2259
|
+
componentFromProps,
|
|
2257
2260
|
schema: schema ?? null,
|
|
2258
2261
|
calculateMetadata: compProps.calculateMetadata ?? null,
|
|
2259
2262
|
stack
|
|
@@ -2272,6 +2275,7 @@ var InnerComposition = ({
|
|
|
2272
2275
|
width,
|
|
2273
2276
|
nonce,
|
|
2274
2277
|
parentName,
|
|
2278
|
+
componentFromProps,
|
|
2275
2279
|
schema,
|
|
2276
2280
|
compProps.calculateMetadata,
|
|
2277
2281
|
stack,
|
|
@@ -2330,11 +2334,30 @@ var Composition = (props) => {
|
|
|
2330
2334
|
});
|
|
2331
2335
|
};
|
|
2332
2336
|
var componentsToAddStacksTo = [];
|
|
2337
|
+
var sequenceComponent = null;
|
|
2333
2338
|
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
2334
2339
|
var addSequenceStackTraces = (component) => {
|
|
2335
2340
|
componentsToAddStacksTo.push(component);
|
|
2336
2341
|
};
|
|
2337
|
-
var
|
|
2342
|
+
var setSequenceComponent = (component) => {
|
|
2343
|
+
sequenceComponent = component;
|
|
2344
|
+
};
|
|
2345
|
+
var getSequenceComponent = () => sequenceComponent;
|
|
2346
|
+
var getSingleChildComponent = (children) => {
|
|
2347
|
+
const mountedChildren = React9.Children.toArray(children);
|
|
2348
|
+
if (mountedChildren.length !== 1) {
|
|
2349
|
+
return null;
|
|
2350
|
+
}
|
|
2351
|
+
const child = mountedChildren[0];
|
|
2352
|
+
if (!React9.isValidElement(child)) {
|
|
2353
|
+
return null;
|
|
2354
|
+
}
|
|
2355
|
+
if (typeof child.type !== "function" && typeof child.type !== "object") {
|
|
2356
|
+
return null;
|
|
2357
|
+
}
|
|
2358
|
+
return child.type;
|
|
2359
|
+
};
|
|
2360
|
+
var VERSION = "4.0.492";
|
|
2338
2361
|
var checkMultipleRemotionVersions = () => {
|
|
2339
2362
|
if (typeof globalThis === "undefined") {
|
|
2340
2363
|
return;
|
|
@@ -2934,7 +2957,7 @@ var sequenceSchemaDefaultLayoutNone = {
|
|
|
2934
2957
|
var PremountContext = createContext14({
|
|
2935
2958
|
premountFramesRemaining: 0
|
|
2936
2959
|
});
|
|
2937
|
-
var SequenceManager =
|
|
2960
|
+
var SequenceManager = React12.createContext({
|
|
2938
2961
|
registerSequence: () => {
|
|
2939
2962
|
throw new Error("SequenceManagerContext not initialized");
|
|
2940
2963
|
},
|
|
@@ -2943,19 +2966,19 @@ var SequenceManager = React11.createContext({
|
|
|
2943
2966
|
},
|
|
2944
2967
|
sequences: []
|
|
2945
2968
|
});
|
|
2946
|
-
var SequenceManagerRefContext =
|
|
2969
|
+
var SequenceManagerRefContext = React12.createContext({
|
|
2947
2970
|
current: []
|
|
2948
2971
|
});
|
|
2949
2972
|
var makeSequencePropsSubscriptionKey = (key) => {
|
|
2950
2973
|
return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
2951
2974
|
};
|
|
2952
|
-
var VisualModePropStatusesContext =
|
|
2975
|
+
var VisualModePropStatusesContext = React12.createContext({
|
|
2953
2976
|
propStatuses: {}
|
|
2954
2977
|
});
|
|
2955
|
-
var VisualModePropStatusesRefContext =
|
|
2978
|
+
var VisualModePropStatusesRefContext = React12.createContext({
|
|
2956
2979
|
current: {}
|
|
2957
2980
|
});
|
|
2958
|
-
var VisualModeDragOverridesContext =
|
|
2981
|
+
var VisualModeDragOverridesContext = React12.createContext({
|
|
2959
2982
|
getDragOverrides: () => {
|
|
2960
2983
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
2961
2984
|
},
|
|
@@ -2963,7 +2986,7 @@ var VisualModeDragOverridesContext = React11.createContext({
|
|
|
2963
2986
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
2964
2987
|
}
|
|
2965
2988
|
});
|
|
2966
|
-
var VisualModeSettersContext =
|
|
2989
|
+
var VisualModeSettersContext = React12.createContext({
|
|
2967
2990
|
setDragOverrides: () => {
|
|
2968
2991
|
throw new Error("VisualModeSettersContext not initialized");
|
|
2969
2992
|
},
|
|
@@ -3127,7 +3150,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
|
|
|
3127
3150
|
});
|
|
3128
3151
|
};
|
|
3129
3152
|
var useRequireToBeInsideSeries = () => {
|
|
3130
|
-
const isInsideSeries =
|
|
3153
|
+
const isInsideSeries = React13.useContext(IsInsideSeriesContext);
|
|
3131
3154
|
if (!isInsideSeries) {
|
|
3132
3155
|
throw new Error("This component must be inside a <Series /> component.");
|
|
3133
3156
|
}
|
|
@@ -5196,6 +5219,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
5196
5219
|
shouldResortToDefaultValueIfUndefined: false
|
|
5197
5220
|
});
|
|
5198
5221
|
}
|
|
5222
|
+
if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
|
|
5223
|
+
value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
|
|
5224
|
+
}
|
|
5199
5225
|
if (value === undefined) {
|
|
5200
5226
|
propsToDelete.add(key);
|
|
5201
5227
|
}
|
|
@@ -5294,7 +5320,7 @@ var withInteractivitySchema = ({
|
|
|
5294
5320
|
const Wrapped = forwardRef2((props, ref) => {
|
|
5295
5321
|
const env = useRemotionEnvironment();
|
|
5296
5322
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
5297
|
-
return
|
|
5323
|
+
return React14.createElement(Component, {
|
|
5298
5324
|
...props,
|
|
5299
5325
|
controls: null,
|
|
5300
5326
|
ref
|
|
@@ -5305,7 +5331,7 @@ var withInteractivitySchema = ({
|
|
|
5305
5331
|
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
5306
5332
|
const frame = useCurrentFrame();
|
|
5307
5333
|
if (props.controls) {
|
|
5308
|
-
return
|
|
5334
|
+
return React14.createElement(Component, {
|
|
5309
5335
|
...props,
|
|
5310
5336
|
ref
|
|
5311
5337
|
});
|
|
@@ -5363,7 +5389,7 @@ var withInteractivitySchema = ({
|
|
|
5363
5389
|
schemaKeys: activeKeys,
|
|
5364
5390
|
propsToDelete
|
|
5365
5391
|
});
|
|
5366
|
-
return
|
|
5392
|
+
return React14.createElement(Component, {
|
|
5367
5393
|
...mergedProps,
|
|
5368
5394
|
controls,
|
|
5369
5395
|
ref
|
|
@@ -5389,6 +5415,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5389
5415
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
5390
5416
|
_remotionInternalStack: stack,
|
|
5391
5417
|
_remotionInternalDocumentationLink: documentationLink,
|
|
5418
|
+
_remotionInternalSingleChildComponent: singleChildComponent,
|
|
5392
5419
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
5393
5420
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
5394
5421
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -5535,7 +5562,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5535
5562
|
getStack: () => stackRef.current,
|
|
5536
5563
|
refForOutline: refForOutline ?? null,
|
|
5537
5564
|
isInsideSeries,
|
|
5538
|
-
frozenFrame: registeredFrozenFrame
|
|
5565
|
+
frozenFrame: registeredFrozenFrame,
|
|
5566
|
+
singleChildComponent: singleChildComponent ?? null
|
|
5539
5567
|
});
|
|
5540
5568
|
} else {
|
|
5541
5569
|
registerSequence({
|
|
@@ -5565,7 +5593,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5565
5593
|
refForOutline: refForOutline ?? null,
|
|
5566
5594
|
isInsideSeries,
|
|
5567
5595
|
frozenFrame: registeredFrozenFrame,
|
|
5568
|
-
frozenMediaFrame
|
|
5596
|
+
frozenMediaFrame,
|
|
5597
|
+
singleChildComponent: singleChildComponent ?? null
|
|
5569
5598
|
});
|
|
5570
5599
|
}
|
|
5571
5600
|
return () => {
|
|
@@ -5592,7 +5621,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5592
5621
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
5593
5622
|
refForOutline: refForOutline ?? null,
|
|
5594
5623
|
isInsideSeries,
|
|
5595
|
-
frozenFrame: registeredFrozenFrame
|
|
5624
|
+
frozenFrame: registeredFrozenFrame,
|
|
5625
|
+
singleChildComponent: singleChildComponent ?? null
|
|
5596
5626
|
});
|
|
5597
5627
|
return () => {
|
|
5598
5628
|
unregisterSequence(id);
|
|
@@ -5625,7 +5655,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
5625
5655
|
registeredFrozenFrame,
|
|
5626
5656
|
startMediaFrom,
|
|
5627
5657
|
mediaFrameAtSequenceZero,
|
|
5628
|
-
frozenMediaFrame
|
|
5658
|
+
frozenMediaFrame,
|
|
5659
|
+
singleChildComponent
|
|
5629
5660
|
]);
|
|
5630
5661
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
5631
5662
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
@@ -6127,7 +6158,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
6127
6158
|
...props
|
|
6128
6159
|
});
|
|
6129
6160
|
};
|
|
6130
|
-
var Canvas =
|
|
6161
|
+
var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
|
|
6131
6162
|
var CACHE_SIZE = 5;
|
|
6132
6163
|
var getActualTime = ({
|
|
6133
6164
|
loopBehavior,
|
|
@@ -6288,6 +6319,12 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
6288
6319
|
return new URL(src, window.origin).href;
|
|
6289
6320
|
};
|
|
6290
6321
|
var animatedImageSchema = {
|
|
6322
|
+
src: {
|
|
6323
|
+
type: "asset",
|
|
6324
|
+
default: undefined,
|
|
6325
|
+
description: "Source",
|
|
6326
|
+
keyframable: false
|
|
6327
|
+
},
|
|
6291
6328
|
...baseSchema,
|
|
6292
6329
|
playbackRate: {
|
|
6293
6330
|
type: "number",
|
|
@@ -6705,7 +6742,7 @@ var calculateMediaDuration = ({
|
|
|
6705
6742
|
};
|
|
6706
6743
|
var LoopContext = createContext18(null);
|
|
6707
6744
|
var useLoop = () => {
|
|
6708
|
-
return
|
|
6745
|
+
return React17.useContext(LoopContext);
|
|
6709
6746
|
};
|
|
6710
6747
|
var Loop = ({
|
|
6711
6748
|
durationInFrames,
|
|
@@ -7556,7 +7593,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
7556
7593
|
};
|
|
7557
7594
|
});
|
|
7558
7595
|
}, [audioContext, numberOfAudioTags]);
|
|
7559
|
-
const effectToUse =
|
|
7596
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
7560
7597
|
effectToUse(() => {
|
|
7561
7598
|
return () => {
|
|
7562
7599
|
requestAnimationFrame(() => {
|
|
@@ -7726,7 +7763,7 @@ var useSharedAudio = ({
|
|
|
7726
7763
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
7727
7764
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
7728
7765
|
}
|
|
7729
|
-
const el =
|
|
7766
|
+
const el = React20.createRef();
|
|
7730
7767
|
const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
|
|
7731
7768
|
audioContext: audioCtx.audioContext,
|
|
7732
7769
|
ref: el
|
|
@@ -7745,7 +7782,7 @@ var useSharedAudio = ({
|
|
|
7745
7782
|
}
|
|
7746
7783
|
};
|
|
7747
7784
|
});
|
|
7748
|
-
const effectToUse =
|
|
7785
|
+
const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
|
|
7749
7786
|
if (typeof document !== "undefined") {
|
|
7750
7787
|
effectToUse(() => {
|
|
7751
7788
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
@@ -8297,7 +8334,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
8297
8334
|
return { addBlock, listenForBuffering, listenForResume, buffering };
|
|
8298
8335
|
}, [addBlock, buffering, listenForBuffering, listenForResume]);
|
|
8299
8336
|
};
|
|
8300
|
-
var BufferingContextReact =
|
|
8337
|
+
var BufferingContextReact = React21.createContext(null);
|
|
8301
8338
|
var BufferingProvider = ({ children }) => {
|
|
8302
8339
|
const { logLevel, mountTime } = useContext24(LogLevelContext);
|
|
8303
8340
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
@@ -8510,7 +8547,7 @@ var getMediaSyncAction = (input) => {
|
|
|
8510
8547
|
return { type: "none" };
|
|
8511
8548
|
};
|
|
8512
8549
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
8513
|
-
const lastUpdate =
|
|
8550
|
+
const lastUpdate = React22.useRef({
|
|
8514
8551
|
time: mediaRef.current?.currentTime ?? 0,
|
|
8515
8552
|
lastUpdate: performance.now()
|
|
8516
8553
|
});
|
|
@@ -9263,7 +9300,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
9263
9300
|
volume: userPreferredVolume,
|
|
9264
9301
|
shouldUseWebAudioApi: useWebAudioApi ?? false
|
|
9265
9302
|
});
|
|
9266
|
-
const effectToUse =
|
|
9303
|
+
const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
|
|
9267
9304
|
effectToUse(() => {
|
|
9268
9305
|
return () => {
|
|
9269
9306
|
requestAnimationFrame(() => {
|
|
@@ -10809,6 +10846,12 @@ var NativeImgInner = ({
|
|
|
10809
10846
|
};
|
|
10810
10847
|
var CanvasImageWithPrivateProps = CanvasImage;
|
|
10811
10848
|
var imgSchema = {
|
|
10849
|
+
src: {
|
|
10850
|
+
type: "asset",
|
|
10851
|
+
default: undefined,
|
|
10852
|
+
description: "Source",
|
|
10853
|
+
keyframable: false
|
|
10854
|
+
},
|
|
10812
10855
|
...baseSchema,
|
|
10813
10856
|
...transformSchema
|
|
10814
10857
|
};
|
|
@@ -11019,7 +11062,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
11019
11062
|
_remotionInternalStack: stack,
|
|
11020
11063
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
11021
11064
|
outlineRef: refForOutline,
|
|
11022
|
-
children:
|
|
11065
|
+
children: React30.createElement(tag, {
|
|
11023
11066
|
...props2,
|
|
11024
11067
|
ref: callbackRef
|
|
11025
11068
|
})
|
|
@@ -11083,7 +11126,7 @@ var Interactive = {
|
|
|
11083
11126
|
Text: makeInteractiveElement("text", "<Interactive.Text>"),
|
|
11084
11127
|
Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
|
|
11085
11128
|
};
|
|
11086
|
-
var compositionsRef =
|
|
11129
|
+
var compositionsRef = React31.createRef();
|
|
11087
11130
|
var CompositionManagerProvider = ({
|
|
11088
11131
|
children,
|
|
11089
11132
|
onlyRenderComposition,
|
|
@@ -11232,7 +11275,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
|
11232
11275
|
var getPreviewDomElement = () => {
|
|
11233
11276
|
return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
|
|
11234
11277
|
};
|
|
11235
|
-
var MaxMediaCacheSizeContext =
|
|
11278
|
+
var MaxMediaCacheSizeContext = React32.createContext(null);
|
|
11236
11279
|
var Root = null;
|
|
11237
11280
|
var listeners = [];
|
|
11238
11281
|
var getRoot = () => {
|
|
@@ -11505,7 +11548,7 @@ var resolveVideoConfigOrCatch = (params) => {
|
|
|
11505
11548
|
};
|
|
11506
11549
|
}
|
|
11507
11550
|
};
|
|
11508
|
-
var SequenceStackTracesUpdateContext =
|
|
11551
|
+
var SequenceStackTracesUpdateContext = React34.createContext(() => {});
|
|
11509
11552
|
var getEnvVariables = () => {
|
|
11510
11553
|
if (getRemotionEnvironment().isRendering) {
|
|
11511
11554
|
const param = window.remotion_envVariables;
|
|
@@ -11531,7 +11574,7 @@ var setupEnvVariables = () => {
|
|
|
11531
11574
|
window.process.env[key] = env[key];
|
|
11532
11575
|
});
|
|
11533
11576
|
};
|
|
11534
|
-
var CurrentScaleContext =
|
|
11577
|
+
var CurrentScaleContext = React35.createContext(null);
|
|
11535
11578
|
var PreviewSizeContext = createContext25({
|
|
11536
11579
|
setSize: () => {
|
|
11537
11580
|
return;
|
|
@@ -11555,7 +11598,7 @@ var calculateScale = ({
|
|
|
11555
11598
|
}
|
|
11556
11599
|
return Number(previewSize);
|
|
11557
11600
|
};
|
|
11558
|
-
var PixelDensityContext =
|
|
11601
|
+
var PixelDensityContext = React36.createContext(null);
|
|
11559
11602
|
var getOffthreadVideoSource = ({
|
|
11560
11603
|
src,
|
|
11561
11604
|
transparent,
|
|
@@ -11822,7 +11865,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
11822
11865
|
ref: videoRef
|
|
11823
11866
|
});
|
|
11824
11867
|
}, [context.audioContext]);
|
|
11825
|
-
const effectToUse =
|
|
11868
|
+
const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
|
|
11826
11869
|
effectToUse(() => {
|
|
11827
11870
|
return () => {
|
|
11828
11871
|
requestAnimationFrame(() => {
|
|
@@ -12198,20 +12241,20 @@ var OffthreadVideo = ({
|
|
|
12198
12241
|
addSequenceStackTraces(OffthreadVideo);
|
|
12199
12242
|
var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
|
|
12200
12243
|
function useRemotionContexts() {
|
|
12201
|
-
const compositionManagerCtx =
|
|
12202
|
-
const timelineContext =
|
|
12203
|
-
const setTimelineContext =
|
|
12204
|
-
const sequenceContext =
|
|
12205
|
-
const nonceContext =
|
|
12206
|
-
const canUseRemotionHooksContext =
|
|
12207
|
-
const preloadContext =
|
|
12208
|
-
const resolveCompositionContext =
|
|
12209
|
-
const renderAssetManagerContext =
|
|
12210
|
-
const sequenceManagerContext =
|
|
12211
|
-
const sequenceManagerRefContext =
|
|
12212
|
-
const visualModePropStatusesRefContext =
|
|
12213
|
-
const bufferManagerContext =
|
|
12214
|
-
const logLevelContext =
|
|
12244
|
+
const compositionManagerCtx = React40.useContext(CompositionManager);
|
|
12245
|
+
const timelineContext = React40.useContext(TimelineContext);
|
|
12246
|
+
const setTimelineContext = React40.useContext(SetTimelineContext);
|
|
12247
|
+
const sequenceContext = React40.useContext(SequenceContext);
|
|
12248
|
+
const nonceContext = React40.useContext(NonceContext);
|
|
12249
|
+
const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
|
|
12250
|
+
const preloadContext = React40.useContext(PreloadContext);
|
|
12251
|
+
const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
|
|
12252
|
+
const renderAssetManagerContext = React40.useContext(RenderAssetManager);
|
|
12253
|
+
const sequenceManagerContext = React40.useContext(SequenceManager);
|
|
12254
|
+
const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
|
|
12255
|
+
const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
|
|
12256
|
+
const bufferManagerContext = React40.useContext(BufferingContextReact);
|
|
12257
|
+
const logLevelContext = React40.useContext(LogLevelContext);
|
|
12215
12258
|
return useMemo37(() => ({
|
|
12216
12259
|
compositionManagerCtx,
|
|
12217
12260
|
timelineContext,
|
|
@@ -12385,6 +12428,8 @@ var Internals = {
|
|
|
12385
12428
|
BufferingProvider,
|
|
12386
12429
|
BufferingContextReact,
|
|
12387
12430
|
getComponentsToAddStacksTo,
|
|
12431
|
+
getSequenceComponent,
|
|
12432
|
+
getSingleChildComponent,
|
|
12388
12433
|
CurrentScaleContext,
|
|
12389
12434
|
PixelDensityContext,
|
|
12390
12435
|
PreviewSizeContext,
|
|
@@ -12442,9 +12487,9 @@ var Internals = {
|
|
|
12442
12487
|
fromField
|
|
12443
12488
|
};
|
|
12444
12489
|
var flattenChildren = (children) => {
|
|
12445
|
-
const childrenArray =
|
|
12490
|
+
const childrenArray = React41.Children.toArray(children);
|
|
12446
12491
|
return childrenArray.reduce((flatChildren, child) => {
|
|
12447
|
-
if (child.type ===
|
|
12492
|
+
if (child.type === React41.Fragment) {
|
|
12448
12493
|
return flatChildren.concat(flattenChildren(child.props.children));
|
|
12449
12494
|
}
|
|
12450
12495
|
flatChildren.push(child);
|
|
@@ -12532,7 +12577,7 @@ var SeriesInner = (props2) => {
|
|
|
12532
12577
|
index: i,
|
|
12533
12578
|
childrenLength: flattenedChildren.length
|
|
12534
12579
|
});
|
|
12535
|
-
return
|
|
12580
|
+
return React42.cloneElement(castedElement, {
|
|
12536
12581
|
_remotionInternalRender: (resolvedProps, ref) => {
|
|
12537
12582
|
const durationInFramesProp = resolvedProps.durationInFrames;
|
|
12538
12583
|
const {
|
|
@@ -12690,7 +12735,7 @@ var Still = (props2) => {
|
|
|
12690
12735
|
durationInFrames: 1,
|
|
12691
12736
|
fps: 1
|
|
12692
12737
|
};
|
|
12693
|
-
return
|
|
12738
|
+
return React43.createElement(Composition, newProps);
|
|
12694
12739
|
};
|
|
12695
12740
|
addSequenceStackTraces(Still);
|
|
12696
12741
|
var roundTo6Commas = (num) => {
|
|
@@ -13169,6 +13214,7 @@ var Config = new Proxy(proxyObj, {
|
|
|
13169
13214
|
});
|
|
13170
13215
|
Sequence.displayName = "Sequence";
|
|
13171
13216
|
addSequenceStackTraces(Sequence);
|
|
13217
|
+
setSequenceComponent(Sequence);
|
|
13172
13218
|
addSequenceStackTraces(Composition);
|
|
13173
13219
|
addSequenceStackTraces(Folder);
|
|
13174
13220
|
|
|
@@ -13611,7 +13657,7 @@ var ExpertsPageContent = ({ Link }) => {
|
|
|
13611
13657
|
import { useMemo as useMemo53 } from "react";
|
|
13612
13658
|
|
|
13613
13659
|
// ../design/dist/esm/index.mjs
|
|
13614
|
-
import * as
|
|
13660
|
+
import * as React24 from "react";
|
|
13615
13661
|
import * as React8 from "react";
|
|
13616
13662
|
import { Fragment as Fragment22, jsx as jsx46 } from "react/jsx-runtime";
|
|
13617
13663
|
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
@@ -14956,7 +15002,7 @@ var getDefaultConfig = () => {
|
|
|
14956
15002
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
14957
15003
|
|
|
14958
15004
|
// ../design/dist/esm/index.mjs
|
|
14959
|
-
import
|
|
15005
|
+
import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
|
|
14960
15006
|
|
|
14961
15007
|
// ../paths/dist/esm/index.mjs
|
|
14962
15008
|
var cutLInstruction = ({
|
|
@@ -20647,12 +20693,12 @@ import React72 from "react";
|
|
|
20647
20693
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
20648
20694
|
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
20649
20695
|
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
20650
|
-
import * as
|
|
20696
|
+
import * as React362 from "react";
|
|
20651
20697
|
import * as ReactDOM4 from "react-dom";
|
|
20652
|
-
import
|
|
20698
|
+
import React11 from "react";
|
|
20653
20699
|
import * as React82 from "react";
|
|
20654
20700
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
20655
|
-
import * as
|
|
20701
|
+
import * as React92 from "react";
|
|
20656
20702
|
import * as React10 from "react";
|
|
20657
20703
|
import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
|
|
20658
20704
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
@@ -20662,15 +20708,15 @@ import * as React162 from "react";
|
|
|
20662
20708
|
import * as React132 from "react";
|
|
20663
20709
|
import * as ReactDOM from "react-dom";
|
|
20664
20710
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
20665
|
-
import * as
|
|
20666
|
-
import * as
|
|
20711
|
+
import * as React142 from "react";
|
|
20712
|
+
import * as React15 from "react";
|
|
20667
20713
|
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
20668
|
-
import * as
|
|
20714
|
+
import * as React172 from "react";
|
|
20669
20715
|
import * as React18 from "react";
|
|
20670
20716
|
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
20671
20717
|
import * as React202 from "react";
|
|
20672
|
-
import * as
|
|
20673
|
-
import * as
|
|
20718
|
+
import * as React19 from "react";
|
|
20719
|
+
import * as React242 from "react";
|
|
20674
20720
|
import * as React212 from "react";
|
|
20675
20721
|
import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
|
|
20676
20722
|
import * as ReactDOM2 from "react-dom";
|
|
@@ -20688,7 +20734,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
|
|
|
20688
20734
|
import * as React352 from "react";
|
|
20689
20735
|
import * as React312 from "react";
|
|
20690
20736
|
import { useState as useState112 } from "react";
|
|
20691
|
-
import * as
|
|
20737
|
+
import * as React29 from "react";
|
|
20692
20738
|
import * as React302 from "react";
|
|
20693
20739
|
import * as React342 from "react";
|
|
20694
20740
|
import * as React332 from "react";
|
|
@@ -20696,22 +20742,22 @@ import * as React322 from "react";
|
|
|
20696
20742
|
import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
20697
20743
|
import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
|
|
20698
20744
|
import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
|
|
20699
|
-
import * as
|
|
20745
|
+
import * as React37 from "react";
|
|
20700
20746
|
import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
20701
20747
|
import { jsx as jsx262 } from "react/jsx-runtime";
|
|
20702
20748
|
import * as React49 from "react";
|
|
20703
|
-
import * as
|
|
20749
|
+
import * as React382 from "react";
|
|
20704
20750
|
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
20705
20751
|
import * as React47 from "react";
|
|
20706
20752
|
import React402 from "react";
|
|
20707
|
-
import * as
|
|
20753
|
+
import * as React39 from "react";
|
|
20708
20754
|
import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
|
|
20709
20755
|
import { jsx as jsx292 } from "react/jsx-runtime";
|
|
20710
20756
|
import React210 from "react";
|
|
20711
20757
|
import { jsx as jsx2102 } from "react/jsx-runtime";
|
|
20712
20758
|
import * as React422 from "react";
|
|
20713
20759
|
import * as React412 from "react";
|
|
20714
|
-
import * as
|
|
20760
|
+
import * as React432 from "react";
|
|
20715
20761
|
import * as ReactDOM5 from "react-dom";
|
|
20716
20762
|
import { jsx as jsx302 } from "react/jsx-runtime";
|
|
20717
20763
|
import * as React44 from "react";
|
|
@@ -20763,7 +20809,7 @@ function useComposedRefs(...refs) {
|
|
|
20763
20809
|
return React8.useCallback(composeRefs(...refs), refs);
|
|
20764
20810
|
}
|
|
20765
20811
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
20766
|
-
var use =
|
|
20812
|
+
var use = React24[" use ".trim().toString()];
|
|
20767
20813
|
function isPromiseLike(value) {
|
|
20768
20814
|
return typeof value === "object" && value !== null && "then" in value;
|
|
20769
20815
|
}
|
|
@@ -20772,25 +20818,25 @@ function isLazyComponent(element) {
|
|
|
20772
20818
|
}
|
|
20773
20819
|
function createSlot(ownerName) {
|
|
20774
20820
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
20775
|
-
const Slot2 =
|
|
20821
|
+
const Slot2 = React24.forwardRef((props, forwardedRef) => {
|
|
20776
20822
|
let { children, ...slotProps } = props;
|
|
20777
20823
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
20778
20824
|
children = use(children._payload);
|
|
20779
20825
|
}
|
|
20780
|
-
const childrenArray =
|
|
20826
|
+
const childrenArray = React24.Children.toArray(children);
|
|
20781
20827
|
const slottable = childrenArray.find(isSlottable);
|
|
20782
20828
|
if (slottable) {
|
|
20783
20829
|
const newElement = slottable.props.children;
|
|
20784
20830
|
const newChildren = childrenArray.map((child) => {
|
|
20785
20831
|
if (child === slottable) {
|
|
20786
|
-
if (
|
|
20787
|
-
return
|
|
20788
|
-
return
|
|
20832
|
+
if (React24.Children.count(newElement) > 1)
|
|
20833
|
+
return React24.Children.only(null);
|
|
20834
|
+
return React24.isValidElement(newElement) ? newElement.props.children : null;
|
|
20789
20835
|
} else {
|
|
20790
20836
|
return child;
|
|
20791
20837
|
}
|
|
20792
20838
|
});
|
|
20793
|
-
return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
20839
|
+
return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
|
|
20794
20840
|
}
|
|
20795
20841
|
return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
20796
20842
|
});
|
|
@@ -20799,20 +20845,20 @@ function createSlot(ownerName) {
|
|
|
20799
20845
|
}
|
|
20800
20846
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
20801
20847
|
function createSlotClone(ownerName) {
|
|
20802
|
-
const SlotClone =
|
|
20848
|
+
const SlotClone = React24.forwardRef((props, forwardedRef) => {
|
|
20803
20849
|
let { children, ...slotProps } = props;
|
|
20804
20850
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
20805
20851
|
children = use(children._payload);
|
|
20806
20852
|
}
|
|
20807
|
-
if (
|
|
20853
|
+
if (React24.isValidElement(children)) {
|
|
20808
20854
|
const childrenRef = getElementRef(children);
|
|
20809
20855
|
const props2 = mergeProps(slotProps, children.props);
|
|
20810
|
-
if (children.type !==
|
|
20856
|
+
if (children.type !== React24.Fragment) {
|
|
20811
20857
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
20812
20858
|
}
|
|
20813
|
-
return
|
|
20859
|
+
return React24.cloneElement(children, props2);
|
|
20814
20860
|
}
|
|
20815
|
-
return
|
|
20861
|
+
return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
|
|
20816
20862
|
});
|
|
20817
20863
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
20818
20864
|
return SlotClone;
|
|
@@ -20828,7 +20874,7 @@ function createSlottable(ownerName) {
|
|
|
20828
20874
|
}
|
|
20829
20875
|
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
20830
20876
|
function isSlottable(child) {
|
|
20831
|
-
return
|
|
20877
|
+
return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
20832
20878
|
}
|
|
20833
20879
|
function mergeProps(slotProps, childProps) {
|
|
20834
20880
|
const overrideProps = { ...childProps };
|
|
@@ -20885,7 +20931,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
20885
20931
|
return childNode;
|
|
20886
20932
|
};
|
|
20887
20933
|
var useHoverTransforms = (ref, disabled) => {
|
|
20888
|
-
const [state, setState] =
|
|
20934
|
+
const [state, setState] = React33.useState({
|
|
20889
20935
|
progress: 0,
|
|
20890
20936
|
isActive: false
|
|
20891
20937
|
});
|
|
@@ -20897,7 +20943,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
20897
20943
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
20898
20944
|
}
|
|
20899
20945
|
}, [disabled, eventTarget]);
|
|
20900
|
-
|
|
20946
|
+
React33.useEffect(() => {
|
|
20901
20947
|
const element = ref.current;
|
|
20902
20948
|
if (!element)
|
|
20903
20949
|
return;
|
|
@@ -20972,8 +21018,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
20972
21018
|
return state;
|
|
20973
21019
|
};
|
|
20974
21020
|
var useClickTransforms = (ref) => {
|
|
20975
|
-
const [hoverProgress, setHoverProgress] =
|
|
20976
|
-
|
|
21021
|
+
const [hoverProgress, setHoverProgress] = React33.useState(0);
|
|
21022
|
+
React33.useEffect(() => {
|
|
20977
21023
|
const element = getChildNodeFrom(ref.current);
|
|
20978
21024
|
if (!element) {
|
|
20979
21025
|
return;
|
|
@@ -21549,7 +21595,7 @@ function composeRefs2(...refs) {
|
|
|
21549
21595
|
return (node) => refs.forEach((ref) => setRef22(ref, node));
|
|
21550
21596
|
}
|
|
21551
21597
|
function useComposedRefs2(...refs) {
|
|
21552
|
-
return
|
|
21598
|
+
return React92.useCallback(composeRefs2(...refs), refs);
|
|
21553
21599
|
}
|
|
21554
21600
|
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
21555
21601
|
const { children, ...slotProps } = props;
|
|
@@ -21631,13 +21677,13 @@ function createCollection(name) {
|
|
|
21631
21677
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
21632
21678
|
const CollectionProvider = (props) => {
|
|
21633
21679
|
const { scope, children } = props;
|
|
21634
|
-
const ref =
|
|
21635
|
-
const itemMap =
|
|
21680
|
+
const ref = React11.useRef(null);
|
|
21681
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
21636
21682
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
21637
21683
|
};
|
|
21638
21684
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
21639
21685
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
21640
|
-
const CollectionSlot =
|
|
21686
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
21641
21687
|
const { scope, children } = props;
|
|
21642
21688
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
21643
21689
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -21646,12 +21692,12 @@ function createCollection(name) {
|
|
|
21646
21692
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
21647
21693
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
21648
21694
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
21649
|
-
const CollectionItemSlot =
|
|
21695
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
21650
21696
|
const { scope, children, ...itemData } = props;
|
|
21651
|
-
const ref =
|
|
21697
|
+
const ref = React11.useRef(null);
|
|
21652
21698
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
21653
21699
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
21654
|
-
|
|
21700
|
+
React11.useEffect(() => {
|
|
21655
21701
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
21656
21702
|
return () => void context.itemMap.delete(ref);
|
|
21657
21703
|
});
|
|
@@ -21660,7 +21706,7 @@ function createCollection(name) {
|
|
|
21660
21706
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
21661
21707
|
function useCollection(scope) {
|
|
21662
21708
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
21663
|
-
const getItems =
|
|
21709
|
+
const getItems = React11.useCallback(() => {
|
|
21664
21710
|
const collectionNode = context.collectionRef.current;
|
|
21665
21711
|
if (!collectionNode)
|
|
21666
21712
|
return [];
|
|
@@ -21717,15 +21763,15 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
21717
21763
|
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
21718
21764
|
}
|
|
21719
21765
|
function useCallbackRef(callback) {
|
|
21720
|
-
const callbackRef =
|
|
21721
|
-
|
|
21766
|
+
const callbackRef = React142.useRef(callback);
|
|
21767
|
+
React142.useEffect(() => {
|
|
21722
21768
|
callbackRef.current = callback;
|
|
21723
21769
|
});
|
|
21724
|
-
return
|
|
21770
|
+
return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
21725
21771
|
}
|
|
21726
21772
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
21727
21773
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
21728
|
-
|
|
21774
|
+
React15.useEffect(() => {
|
|
21729
21775
|
const handleKeyDown = (event) => {
|
|
21730
21776
|
if (event.key === "Escape") {
|
|
21731
21777
|
onEscapeKeyDown(event);
|
|
@@ -21932,7 +21978,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
21932
21978
|
}
|
|
21933
21979
|
var count = 0;
|
|
21934
21980
|
function useFocusGuards() {
|
|
21935
|
-
|
|
21981
|
+
React172.useEffect(() => {
|
|
21936
21982
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
21937
21983
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
21938
21984
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -22167,7 +22213,7 @@ function arrayRemove(array, item) {
|
|
|
22167
22213
|
function removeLinks(items) {
|
|
22168
22214
|
return items.filter((item) => item.tagName !== "A");
|
|
22169
22215
|
}
|
|
22170
|
-
var useLayoutEffect22 = Boolean(globalThis?.document) ?
|
|
22216
|
+
var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
22171
22217
|
var useReactId = React202["useId".toString()] || (() => {
|
|
22172
22218
|
return;
|
|
22173
22219
|
});
|
|
@@ -24019,17 +24065,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
24019
24065
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
24020
24066
|
var Popper = (props) => {
|
|
24021
24067
|
const { __scopePopper, children } = props;
|
|
24022
|
-
const [anchor, setAnchor] =
|
|
24068
|
+
const [anchor, setAnchor] = React242.useState(null);
|
|
24023
24069
|
return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
24024
24070
|
};
|
|
24025
24071
|
Popper.displayName = POPPER_NAME;
|
|
24026
24072
|
var ANCHOR_NAME = "PopperAnchor";
|
|
24027
|
-
var PopperAnchor =
|
|
24073
|
+
var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
|
|
24028
24074
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
24029
24075
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
24030
|
-
const ref =
|
|
24076
|
+
const ref = React242.useRef(null);
|
|
24031
24077
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
24032
|
-
|
|
24078
|
+
React242.useEffect(() => {
|
|
24033
24079
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
24034
24080
|
});
|
|
24035
24081
|
return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
@@ -24037,7 +24083,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
|
24037
24083
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
24038
24084
|
var CONTENT_NAME = "PopperContent";
|
|
24039
24085
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
24040
|
-
var PopperContent =
|
|
24086
|
+
var PopperContent = React242.forwardRef((props, forwardedRef) => {
|
|
24041
24087
|
const {
|
|
24042
24088
|
__scopePopper,
|
|
24043
24089
|
side = "bottom",
|
|
@@ -24055,9 +24101,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
24055
24101
|
...contentProps
|
|
24056
24102
|
} = props;
|
|
24057
24103
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
24058
|
-
const [content, setContent] =
|
|
24104
|
+
const [content, setContent] = React242.useState(null);
|
|
24059
24105
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
24060
|
-
const [arrow4, setArrow] =
|
|
24106
|
+
const [arrow4, setArrow] = React242.useState(null);
|
|
24061
24107
|
const arrowSize = useSize(arrow4);
|
|
24062
24108
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
24063
24109
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -24117,7 +24163,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
|
24117
24163
|
const arrowX = middlewareData.arrow?.x;
|
|
24118
24164
|
const arrowY = middlewareData.arrow?.y;
|
|
24119
24165
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
24120
|
-
const [contentZIndex, setContentZIndex] =
|
|
24166
|
+
const [contentZIndex, setContentZIndex] = React242.useState();
|
|
24121
24167
|
useLayoutEffect22(() => {
|
|
24122
24168
|
if (content)
|
|
24123
24169
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
@@ -24168,7 +24214,7 @@ var OPPOSITE_SIDE = {
|
|
|
24168
24214
|
bottom: "top",
|
|
24169
24215
|
left: "right"
|
|
24170
24216
|
};
|
|
24171
|
-
var PopperArrow =
|
|
24217
|
+
var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
24172
24218
|
const { __scopePopper, ...arrowProps } = props;
|
|
24173
24219
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
24174
24220
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -24511,7 +24557,7 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
24511
24557
|
ref.callback = callback;
|
|
24512
24558
|
return ref.facade;
|
|
24513
24559
|
}
|
|
24514
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
24560
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
24515
24561
|
var currentValues = new WeakMap;
|
|
24516
24562
|
function useMergeRefs(refs, defaultValue) {
|
|
24517
24563
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -25147,9 +25193,9 @@ var Select = (props) => {
|
|
|
25147
25193
|
required
|
|
25148
25194
|
} = props;
|
|
25149
25195
|
const popperScope = usePopperScope(__scopeSelect);
|
|
25150
|
-
const [trigger, setTrigger] =
|
|
25151
|
-
const [valueNode, setValueNode] =
|
|
25152
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
25196
|
+
const [trigger, setTrigger] = React362.useState(null);
|
|
25197
|
+
const [valueNode, setValueNode] = React362.useState(null);
|
|
25198
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
|
|
25153
25199
|
const direction = useDirection(dir);
|
|
25154
25200
|
const [open = false, setOpen] = useControllableState({
|
|
25155
25201
|
prop: openProp,
|
|
@@ -25161,9 +25207,9 @@ var Select = (props) => {
|
|
|
25161
25207
|
defaultProp: defaultValue,
|
|
25162
25208
|
onChange: onValueChange
|
|
25163
25209
|
});
|
|
25164
|
-
const triggerPointerDownPosRef =
|
|
25210
|
+
const triggerPointerDownPosRef = React362.useRef(null);
|
|
25165
25211
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
25166
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
25212
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
|
|
25167
25213
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
25168
25214
|
return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
|
|
25169
25215
|
required,
|
|
@@ -25185,10 +25231,10 @@ var Select = (props) => {
|
|
|
25185
25231
|
children: [
|
|
25186
25232
|
/* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
|
|
25187
25233
|
scope: props.__scopeSelect,
|
|
25188
|
-
onNativeOptionAdd:
|
|
25234
|
+
onNativeOptionAdd: React362.useCallback((option) => {
|
|
25189
25235
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
25190
25236
|
}, []),
|
|
25191
|
-
onNativeOptionRemove:
|
|
25237
|
+
onNativeOptionRemove: React362.useCallback((option) => {
|
|
25192
25238
|
setNativeOptionsSet((prev) => {
|
|
25193
25239
|
const optionsSet = new Set(prev);
|
|
25194
25240
|
optionsSet.delete(option);
|
|
@@ -25216,7 +25262,7 @@ var Select = (props) => {
|
|
|
25216
25262
|
};
|
|
25217
25263
|
Select.displayName = SELECT_NAME;
|
|
25218
25264
|
var TRIGGER_NAME = "SelectTrigger";
|
|
25219
|
-
var SelectTrigger =
|
|
25265
|
+
var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
|
|
25220
25266
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
25221
25267
|
const popperScope = usePopperScope(__scopeSelect);
|
|
25222
25268
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
@@ -25284,7 +25330,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
|
25284
25330
|
});
|
|
25285
25331
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
25286
25332
|
var VALUE_NAME = "SelectValue";
|
|
25287
|
-
var SelectValue =
|
|
25333
|
+
var SelectValue = React362.forwardRef((props, forwardedRef) => {
|
|
25288
25334
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
25289
25335
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
25290
25336
|
const { onValueNodeHasChildrenChange } = context;
|
|
@@ -25302,7 +25348,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
|
25302
25348
|
});
|
|
25303
25349
|
SelectValue.displayName = VALUE_NAME;
|
|
25304
25350
|
var ICON_NAME = "SelectIcon";
|
|
25305
|
-
var SelectIcon =
|
|
25351
|
+
var SelectIcon = React362.forwardRef((props, forwardedRef) => {
|
|
25306
25352
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
25307
25353
|
return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
25308
25354
|
});
|
|
@@ -25313,9 +25359,9 @@ var SelectPortal = (props) => {
|
|
|
25313
25359
|
};
|
|
25314
25360
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
25315
25361
|
var CONTENT_NAME2 = "SelectContent";
|
|
25316
|
-
var SelectContent =
|
|
25362
|
+
var SelectContent = React362.forwardRef((props, forwardedRef) => {
|
|
25317
25363
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
25318
|
-
const [fragment, setFragment] =
|
|
25364
|
+
const [fragment, setFragment] = React362.useState();
|
|
25319
25365
|
useLayoutEffect22(() => {
|
|
25320
25366
|
setFragment(new DocumentFragment);
|
|
25321
25367
|
}, []);
|
|
@@ -25329,7 +25375,7 @@ SelectContent.displayName = CONTENT_NAME2;
|
|
|
25329
25375
|
var CONTENT_MARGIN = 10;
|
|
25330
25376
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
25331
25377
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
25332
|
-
var SelectContentImpl =
|
|
25378
|
+
var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
|
|
25333
25379
|
const {
|
|
25334
25380
|
__scopeSelect,
|
|
25335
25381
|
position = "item-aligned",
|
|
@@ -25349,20 +25395,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25349
25395
|
...contentProps
|
|
25350
25396
|
} = props;
|
|
25351
25397
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
25352
|
-
const [content, setContent] =
|
|
25353
|
-
const [viewport, setViewport] =
|
|
25398
|
+
const [content, setContent] = React362.useState(null);
|
|
25399
|
+
const [viewport, setViewport] = React362.useState(null);
|
|
25354
25400
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
25355
|
-
const [selectedItem, setSelectedItem] =
|
|
25356
|
-
const [selectedItemText, setSelectedItemText] =
|
|
25401
|
+
const [selectedItem, setSelectedItem] = React362.useState(null);
|
|
25402
|
+
const [selectedItemText, setSelectedItemText] = React362.useState(null);
|
|
25357
25403
|
const getItems = useCollection(__scopeSelect);
|
|
25358
|
-
const [isPositioned, setIsPositioned] =
|
|
25359
|
-
const firstValidItemFoundRef =
|
|
25360
|
-
|
|
25404
|
+
const [isPositioned, setIsPositioned] = React362.useState(false);
|
|
25405
|
+
const firstValidItemFoundRef = React362.useRef(false);
|
|
25406
|
+
React362.useEffect(() => {
|
|
25361
25407
|
if (content)
|
|
25362
25408
|
return hideOthers(content);
|
|
25363
25409
|
}, [content]);
|
|
25364
25410
|
useFocusGuards();
|
|
25365
|
-
const focusFirst2 =
|
|
25411
|
+
const focusFirst2 = React362.useCallback((candidates) => {
|
|
25366
25412
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
25367
25413
|
const [lastItem] = restItems.slice(-1);
|
|
25368
25414
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -25379,14 +25425,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25379
25425
|
return;
|
|
25380
25426
|
}
|
|
25381
25427
|
}, [getItems, viewport]);
|
|
25382
|
-
const focusSelectedItem =
|
|
25383
|
-
|
|
25428
|
+
const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
25429
|
+
React362.useEffect(() => {
|
|
25384
25430
|
if (isPositioned) {
|
|
25385
25431
|
focusSelectedItem();
|
|
25386
25432
|
}
|
|
25387
25433
|
}, [isPositioned, focusSelectedItem]);
|
|
25388
25434
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
25389
|
-
|
|
25435
|
+
React362.useEffect(() => {
|
|
25390
25436
|
if (content) {
|
|
25391
25437
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
25392
25438
|
const handlePointerMove = (event) => {
|
|
@@ -25416,7 +25462,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25416
25462
|
};
|
|
25417
25463
|
}
|
|
25418
25464
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
25419
|
-
|
|
25465
|
+
React362.useEffect(() => {
|
|
25420
25466
|
const close = () => onOpenChange(false);
|
|
25421
25467
|
window.addEventListener("blur", close);
|
|
25422
25468
|
window.addEventListener("resize", close);
|
|
@@ -25433,7 +25479,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25433
25479
|
setTimeout(() => nextItem.ref.current.focus());
|
|
25434
25480
|
}
|
|
25435
25481
|
});
|
|
25436
|
-
const itemRefCallback =
|
|
25482
|
+
const itemRefCallback = React362.useCallback((node, value, disabled) => {
|
|
25437
25483
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
25438
25484
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
25439
25485
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -25442,8 +25488,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25442
25488
|
firstValidItemFoundRef.current = true;
|
|
25443
25489
|
}
|
|
25444
25490
|
}, [context.value]);
|
|
25445
|
-
const handleItemLeave =
|
|
25446
|
-
const itemTextRefCallback =
|
|
25491
|
+
const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
|
|
25492
|
+
const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
|
|
25447
25493
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
25448
25494
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
25449
25495
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -25538,18 +25584,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25538
25584
|
});
|
|
25539
25585
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
25540
25586
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
25541
|
-
var SelectItemAlignedPosition =
|
|
25587
|
+
var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
|
|
25542
25588
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
25543
25589
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
25544
25590
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
25545
|
-
const [contentWrapper, setContentWrapper] =
|
|
25546
|
-
const [content, setContent] =
|
|
25591
|
+
const [contentWrapper, setContentWrapper] = React362.useState(null);
|
|
25592
|
+
const [content, setContent] = React362.useState(null);
|
|
25547
25593
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
25548
25594
|
const getItems = useCollection(__scopeSelect);
|
|
25549
|
-
const shouldExpandOnScrollRef =
|
|
25550
|
-
const shouldRepositionRef =
|
|
25595
|
+
const shouldExpandOnScrollRef = React362.useRef(false);
|
|
25596
|
+
const shouldRepositionRef = React362.useRef(true);
|
|
25551
25597
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
25552
|
-
const position =
|
|
25598
|
+
const position = React362.useCallback(() => {
|
|
25553
25599
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
25554
25600
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
25555
25601
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -25630,12 +25676,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
25630
25676
|
onPlaced
|
|
25631
25677
|
]);
|
|
25632
25678
|
useLayoutEffect22(() => position(), [position]);
|
|
25633
|
-
const [contentZIndex, setContentZIndex] =
|
|
25679
|
+
const [contentZIndex, setContentZIndex] = React362.useState();
|
|
25634
25680
|
useLayoutEffect22(() => {
|
|
25635
25681
|
if (content)
|
|
25636
25682
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
25637
25683
|
}, [content]);
|
|
25638
|
-
const handleScrollButtonChange =
|
|
25684
|
+
const handleScrollButtonChange = React362.useCallback((node) => {
|
|
25639
25685
|
if (node && shouldRepositionRef.current === true) {
|
|
25640
25686
|
position();
|
|
25641
25687
|
focusSelectedItem?.();
|
|
@@ -25669,7 +25715,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
25669
25715
|
});
|
|
25670
25716
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
25671
25717
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
25672
|
-
var SelectPopperPosition =
|
|
25718
|
+
var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
|
|
25673
25719
|
const {
|
|
25674
25720
|
__scopeSelect,
|
|
25675
25721
|
align = "start",
|
|
@@ -25699,12 +25745,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
|
25699
25745
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
25700
25746
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
25701
25747
|
var VIEWPORT_NAME = "SelectViewport";
|
|
25702
|
-
var SelectViewport =
|
|
25748
|
+
var SelectViewport = React362.forwardRef((props, forwardedRef) => {
|
|
25703
25749
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
25704
25750
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
25705
25751
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
25706
25752
|
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
25707
|
-
const prevScrollTopRef =
|
|
25753
|
+
const prevScrollTopRef = React362.useRef(0);
|
|
25708
25754
|
return /* @__PURE__ */ jsxs42(Fragment8, { children: [
|
|
25709
25755
|
/* @__PURE__ */ jsx242("style", {
|
|
25710
25756
|
dangerouslySetInnerHTML: {
|
|
@@ -25753,14 +25799,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
|
25753
25799
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
25754
25800
|
var GROUP_NAME = "SelectGroup";
|
|
25755
25801
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
25756
|
-
var SelectGroup =
|
|
25802
|
+
var SelectGroup = React362.forwardRef((props, forwardedRef) => {
|
|
25757
25803
|
const { __scopeSelect, ...groupProps } = props;
|
|
25758
25804
|
const groupId = useId();
|
|
25759
25805
|
return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
25760
25806
|
});
|
|
25761
25807
|
SelectGroup.displayName = GROUP_NAME;
|
|
25762
25808
|
var LABEL_NAME = "SelectLabel";
|
|
25763
|
-
var SelectLabel =
|
|
25809
|
+
var SelectLabel = React362.forwardRef((props, forwardedRef) => {
|
|
25764
25810
|
const { __scopeSelect, ...labelProps } = props;
|
|
25765
25811
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
25766
25812
|
return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
@@ -25768,7 +25814,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
|
25768
25814
|
SelectLabel.displayName = LABEL_NAME;
|
|
25769
25815
|
var ITEM_NAME = "SelectItem";
|
|
25770
25816
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
25771
|
-
var SelectItem =
|
|
25817
|
+
var SelectItem = React362.forwardRef((props, forwardedRef) => {
|
|
25772
25818
|
const {
|
|
25773
25819
|
__scopeSelect,
|
|
25774
25820
|
value,
|
|
@@ -25779,8 +25825,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
25779
25825
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
25780
25826
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
25781
25827
|
const isSelected = context.value === value;
|
|
25782
|
-
const [textValue, setTextValue] =
|
|
25783
|
-
const [isFocused, setIsFocused] =
|
|
25828
|
+
const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
|
|
25829
|
+
const [isFocused, setIsFocused] = React362.useState(false);
|
|
25784
25830
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
25785
25831
|
const textId = useId();
|
|
25786
25832
|
const handleSelect = () => {
|
|
@@ -25798,7 +25844,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
25798
25844
|
disabled,
|
|
25799
25845
|
textId,
|
|
25800
25846
|
isSelected,
|
|
25801
|
-
onItemTextChange:
|
|
25847
|
+
onItemTextChange: React362.useCallback((node) => {
|
|
25802
25848
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
25803
25849
|
}, []),
|
|
25804
25850
|
children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
|
|
@@ -25847,16 +25893,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
|
25847
25893
|
});
|
|
25848
25894
|
SelectItem.displayName = ITEM_NAME;
|
|
25849
25895
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
25850
|
-
var SelectItemText =
|
|
25896
|
+
var SelectItemText = React362.forwardRef((props, forwardedRef) => {
|
|
25851
25897
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
25852
25898
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
25853
25899
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
25854
25900
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
25855
25901
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
25856
|
-
const [itemTextNode, setItemTextNode] =
|
|
25902
|
+
const [itemTextNode, setItemTextNode] = React362.useState(null);
|
|
25857
25903
|
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
25858
25904
|
const textContent = itemTextNode?.textContent;
|
|
25859
|
-
const nativeOption =
|
|
25905
|
+
const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
25860
25906
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
25861
25907
|
useLayoutEffect22(() => {
|
|
25862
25908
|
onNativeOptionAdd(nativeOption);
|
|
@@ -25869,17 +25915,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
|
25869
25915
|
});
|
|
25870
25916
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
25871
25917
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
25872
|
-
var SelectItemIndicator =
|
|
25918
|
+
var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
|
|
25873
25919
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
25874
25920
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
25875
25921
|
return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
25876
25922
|
});
|
|
25877
25923
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
25878
25924
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
25879
|
-
var SelectScrollUpButton =
|
|
25925
|
+
var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
|
|
25880
25926
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
25881
25927
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
25882
|
-
const [canScrollUp, setCanScrollUp] =
|
|
25928
|
+
const [canScrollUp, setCanScrollUp] = React362.useState(false);
|
|
25883
25929
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
25884
25930
|
useLayoutEffect22(() => {
|
|
25885
25931
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -25907,10 +25953,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
25907
25953
|
});
|
|
25908
25954
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
25909
25955
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
25910
|
-
var SelectScrollDownButton =
|
|
25956
|
+
var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
|
|
25911
25957
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
25912
25958
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
25913
|
-
const [canScrollDown, setCanScrollDown] =
|
|
25959
|
+
const [canScrollDown, setCanScrollDown] = React362.useState(false);
|
|
25914
25960
|
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
25915
25961
|
useLayoutEffect22(() => {
|
|
25916
25962
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -25938,18 +25984,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
|
25938
25984
|
}) : null;
|
|
25939
25985
|
});
|
|
25940
25986
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
25941
|
-
var SelectScrollButtonImpl =
|
|
25987
|
+
var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
|
|
25942
25988
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
25943
25989
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
25944
|
-
const autoScrollTimerRef =
|
|
25990
|
+
const autoScrollTimerRef = React362.useRef(null);
|
|
25945
25991
|
const getItems = useCollection(__scopeSelect);
|
|
25946
|
-
const clearAutoScrollTimer =
|
|
25992
|
+
const clearAutoScrollTimer = React362.useCallback(() => {
|
|
25947
25993
|
if (autoScrollTimerRef.current !== null) {
|
|
25948
25994
|
window.clearInterval(autoScrollTimerRef.current);
|
|
25949
25995
|
autoScrollTimerRef.current = null;
|
|
25950
25996
|
}
|
|
25951
25997
|
}, []);
|
|
25952
|
-
|
|
25998
|
+
React362.useEffect(() => {
|
|
25953
25999
|
return () => clearAutoScrollTimer();
|
|
25954
26000
|
}, [clearAutoScrollTimer]);
|
|
25955
26001
|
useLayoutEffect22(() => {
|
|
@@ -25978,13 +26024,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
|
25978
26024
|
});
|
|
25979
26025
|
});
|
|
25980
26026
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
25981
|
-
var SelectSeparator =
|
|
26027
|
+
var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
|
|
25982
26028
|
const { __scopeSelect, ...separatorProps } = props;
|
|
25983
26029
|
return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
25984
26030
|
});
|
|
25985
26031
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
25986
26032
|
var ARROW_NAME2 = "SelectArrow";
|
|
25987
|
-
var SelectArrow =
|
|
26033
|
+
var SelectArrow = React362.forwardRef((props, forwardedRef) => {
|
|
25988
26034
|
const { __scopeSelect, ...arrowProps } = props;
|
|
25989
26035
|
const popperScope = usePopperScope(__scopeSelect);
|
|
25990
26036
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
@@ -25995,12 +26041,12 @@ SelectArrow.displayName = ARROW_NAME2;
|
|
|
25995
26041
|
function shouldShowPlaceholder(value) {
|
|
25996
26042
|
return value === "" || value === undefined;
|
|
25997
26043
|
}
|
|
25998
|
-
var BubbleSelect =
|
|
26044
|
+
var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
|
|
25999
26045
|
const { value, ...selectProps } = props;
|
|
26000
|
-
const ref =
|
|
26046
|
+
const ref = React362.useRef(null);
|
|
26001
26047
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
26002
26048
|
const prevValue = usePrevious(value);
|
|
26003
|
-
|
|
26049
|
+
React362.useEffect(() => {
|
|
26004
26050
|
const select = ref.current;
|
|
26005
26051
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
26006
26052
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -26016,9 +26062,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
|
26016
26062
|
BubbleSelect.displayName = "BubbleSelect";
|
|
26017
26063
|
function useTypeaheadSearch(onSearchChange) {
|
|
26018
26064
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
26019
|
-
const searchRef =
|
|
26020
|
-
const timerRef =
|
|
26021
|
-
const handleTypeaheadSearch =
|
|
26065
|
+
const searchRef = React362.useRef("");
|
|
26066
|
+
const timerRef = React362.useRef(0);
|
|
26067
|
+
const handleTypeaheadSearch = React362.useCallback((key) => {
|
|
26022
26068
|
const search = searchRef.current + key;
|
|
26023
26069
|
handleSearchChange(search);
|
|
26024
26070
|
(function updateSearch(value) {
|
|
@@ -26028,11 +26074,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
26028
26074
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
26029
26075
|
})(search);
|
|
26030
26076
|
}, [handleSearchChange]);
|
|
26031
|
-
const resetTypeahead =
|
|
26077
|
+
const resetTypeahead = React362.useCallback(() => {
|
|
26032
26078
|
searchRef.current = "";
|
|
26033
26079
|
window.clearTimeout(timerRef.current);
|
|
26034
26080
|
}, []);
|
|
26035
|
-
|
|
26081
|
+
React362.useEffect(() => {
|
|
26036
26082
|
return () => window.clearTimeout(timerRef.current);
|
|
26037
26083
|
}, []);
|
|
26038
26084
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -26121,7 +26167,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
26121
26167
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
26122
26168
|
var Select2 = Root222;
|
|
26123
26169
|
var SelectValue2 = Value;
|
|
26124
|
-
var SelectTrigger2 =
|
|
26170
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
26125
26171
|
ref,
|
|
26126
26172
|
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),
|
|
26127
26173
|
...props,
|
|
@@ -26136,7 +26182,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
|
|
|
26136
26182
|
]
|
|
26137
26183
|
}));
|
|
26138
26184
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
26139
|
-
var SelectScrollUpButton2 =
|
|
26185
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
|
|
26140
26186
|
ref,
|
|
26141
26187
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
26142
26188
|
...props,
|
|
@@ -26145,7 +26191,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
|
|
|
26145
26191
|
})
|
|
26146
26192
|
}));
|
|
26147
26193
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
26148
|
-
var SelectScrollDownButton2 =
|
|
26194
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
|
|
26149
26195
|
ref,
|
|
26150
26196
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
26151
26197
|
...props,
|
|
@@ -26154,7 +26200,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
|
|
|
26154
26200
|
})
|
|
26155
26201
|
}));
|
|
26156
26202
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
26157
|
-
var SelectContent2 =
|
|
26203
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
|
|
26158
26204
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
26159
26205
|
ref,
|
|
26160
26206
|
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),
|
|
@@ -26171,13 +26217,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
|
|
|
26171
26217
|
})
|
|
26172
26218
|
}));
|
|
26173
26219
|
SelectContent2.displayName = Content2.displayName;
|
|
26174
|
-
var SelectLabel2 =
|
|
26220
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
|
|
26175
26221
|
ref,
|
|
26176
26222
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
26177
26223
|
...props
|
|
26178
26224
|
}));
|
|
26179
26225
|
SelectLabel2.displayName = Label.displayName;
|
|
26180
|
-
var SelectItem2 =
|
|
26226
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
26181
26227
|
ref,
|
|
26182
26228
|
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),
|
|
26183
26229
|
...props,
|
|
@@ -26196,7 +26242,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
|
|
|
26196
26242
|
]
|
|
26197
26243
|
}));
|
|
26198
26244
|
SelectItem2.displayName = Item.displayName;
|
|
26199
|
-
var SelectSeparator2 =
|
|
26245
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
|
|
26200
26246
|
ref,
|
|
26201
26247
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
26202
26248
|
...props
|
|
@@ -26229,19 +26275,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
26229
26275
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
26230
26276
|
let defaultContexts = [];
|
|
26231
26277
|
function createContext32(rootComponentName, defaultContext) {
|
|
26232
|
-
const BaseContext =
|
|
26278
|
+
const BaseContext = React382.createContext(defaultContext);
|
|
26233
26279
|
const index2 = defaultContexts.length;
|
|
26234
26280
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
26235
26281
|
const Provider = (props) => {
|
|
26236
26282
|
const { scope, children, ...context } = props;
|
|
26237
26283
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
26238
|
-
const value =
|
|
26284
|
+
const value = React382.useMemo(() => context, Object.values(context));
|
|
26239
26285
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
26240
26286
|
};
|
|
26241
26287
|
Provider.displayName = rootComponentName + "Provider";
|
|
26242
26288
|
function useContext222(consumerName, scope) {
|
|
26243
26289
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
26244
|
-
const context =
|
|
26290
|
+
const context = React382.useContext(Context);
|
|
26245
26291
|
if (context)
|
|
26246
26292
|
return context;
|
|
26247
26293
|
if (defaultContext !== undefined)
|
|
@@ -26252,11 +26298,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
26252
26298
|
}
|
|
26253
26299
|
const createScope = () => {
|
|
26254
26300
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
26255
|
-
return
|
|
26301
|
+
return React382.createContext(defaultContext);
|
|
26256
26302
|
});
|
|
26257
26303
|
return function useScope(scope) {
|
|
26258
26304
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
26259
|
-
return
|
|
26305
|
+
return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
26260
26306
|
};
|
|
26261
26307
|
};
|
|
26262
26308
|
createScope.scopeName = scopeName;
|
|
@@ -26277,7 +26323,7 @@ function composeContextScopes2(...scopes) {
|
|
|
26277
26323
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
26278
26324
|
return { ...nextScopes2, ...currentScope };
|
|
26279
26325
|
}, {});
|
|
26280
|
-
return
|
|
26326
|
+
return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
26281
26327
|
};
|
|
26282
26328
|
};
|
|
26283
26329
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -26285,22 +26331,22 @@ function composeContextScopes2(...scopes) {
|
|
|
26285
26331
|
}
|
|
26286
26332
|
function createSlot2(ownerName) {
|
|
26287
26333
|
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
26288
|
-
const Slot22 =
|
|
26334
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
26289
26335
|
const { children, ...slotProps } = props;
|
|
26290
|
-
const childrenArray =
|
|
26336
|
+
const childrenArray = React39.Children.toArray(children);
|
|
26291
26337
|
const slottable = childrenArray.find(isSlottable3);
|
|
26292
26338
|
if (slottable) {
|
|
26293
26339
|
const newElement = slottable.props.children;
|
|
26294
26340
|
const newChildren = childrenArray.map((child) => {
|
|
26295
26341
|
if (child === slottable) {
|
|
26296
|
-
if (
|
|
26297
|
-
return
|
|
26298
|
-
return
|
|
26342
|
+
if (React39.Children.count(newElement) > 1)
|
|
26343
|
+
return React39.Children.only(null);
|
|
26344
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
26299
26345
|
} else {
|
|
26300
26346
|
return child;
|
|
26301
26347
|
}
|
|
26302
26348
|
});
|
|
26303
|
-
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children:
|
|
26349
|
+
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
26304
26350
|
}
|
|
26305
26351
|
return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
26306
26352
|
});
|
|
@@ -26308,24 +26354,24 @@ function createSlot2(ownerName) {
|
|
|
26308
26354
|
return Slot22;
|
|
26309
26355
|
}
|
|
26310
26356
|
function createSlotClone2(ownerName) {
|
|
26311
|
-
const SlotClone2 =
|
|
26357
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
26312
26358
|
const { children, ...slotProps } = props;
|
|
26313
|
-
if (
|
|
26359
|
+
if (React39.isValidElement(children)) {
|
|
26314
26360
|
const childrenRef = getElementRef3(children);
|
|
26315
26361
|
const props2 = mergeProps3(slotProps, children.props);
|
|
26316
|
-
if (children.type !==
|
|
26362
|
+
if (children.type !== React39.Fragment) {
|
|
26317
26363
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
26318
26364
|
}
|
|
26319
|
-
return
|
|
26365
|
+
return React39.cloneElement(children, props2);
|
|
26320
26366
|
}
|
|
26321
|
-
return
|
|
26367
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
26322
26368
|
});
|
|
26323
26369
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
26324
26370
|
return SlotClone2;
|
|
26325
26371
|
}
|
|
26326
26372
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
26327
26373
|
function isSlottable3(child) {
|
|
26328
|
-
return
|
|
26374
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
26329
26375
|
}
|
|
26330
26376
|
function mergeProps3(slotProps, childProps) {
|
|
26331
26377
|
const overrideProps = { ...childProps };
|
|
@@ -26753,7 +26799,7 @@ var NODES2 = [
|
|
|
26753
26799
|
];
|
|
26754
26800
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
26755
26801
|
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
26756
|
-
const Node2 =
|
|
26802
|
+
const Node2 = React432.forwardRef((props, forwardedRef) => {
|
|
26757
26803
|
const { asChild, ...primitiveProps } = props;
|
|
26758
26804
|
const Comp = asChild ? Slot3 : node;
|
|
26759
26805
|
if (typeof window !== "undefined") {
|
|
@@ -40740,6 +40786,12 @@ var AudioForRendering2 = ({
|
|
|
40740
40786
|
};
|
|
40741
40787
|
var { validateMediaProps: validateMediaProps2 } = Internals;
|
|
40742
40788
|
var audioSchema = {
|
|
40789
|
+
src: {
|
|
40790
|
+
type: "asset",
|
|
40791
|
+
default: undefined,
|
|
40792
|
+
description: "Source",
|
|
40793
|
+
keyframable: false
|
|
40794
|
+
},
|
|
40743
40795
|
...Internals.baseSchema,
|
|
40744
40796
|
volume: {
|
|
40745
40797
|
type: "number",
|
|
@@ -40850,6 +40902,24 @@ var Audio2 = Interactive.withSchema({
|
|
|
40850
40902
|
schema: audioSchema,
|
|
40851
40903
|
supportsEffects: false
|
|
40852
40904
|
});
|
|
40905
|
+
var getVideoSequenceDuration = ({
|
|
40906
|
+
durationInFrames,
|
|
40907
|
+
loop,
|
|
40908
|
+
playbackRate,
|
|
40909
|
+
trimAfter,
|
|
40910
|
+
trimBefore
|
|
40911
|
+
}) => {
|
|
40912
|
+
if (loop || trimAfter === undefined) {
|
|
40913
|
+
return durationInFrames;
|
|
40914
|
+
}
|
|
40915
|
+
const trimmedDuration = Internals.calculateMediaDuration({
|
|
40916
|
+
trimAfter,
|
|
40917
|
+
trimBefore,
|
|
40918
|
+
playbackRate,
|
|
40919
|
+
mediaDurationInFrames: Infinity
|
|
40920
|
+
});
|
|
40921
|
+
return Math.min(durationInFrames ?? Infinity, trimmedDuration);
|
|
40922
|
+
};
|
|
40853
40923
|
var PRORES_DOCS_URL = "https://www.remotion.dev/docs/videos/prores";
|
|
40854
40924
|
var proresDecoderNotEnabledMessage = (src) => {
|
|
40855
40925
|
return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}. ` + `(This is required to decode a ProRes source for both preview and rendering — it is unrelated to exporting a video as ProRes.)`;
|
|
@@ -41624,6 +41694,12 @@ var VideoForRendering2 = ({
|
|
|
41624
41694
|
};
|
|
41625
41695
|
var { validateMediaTrimProps: validateMediaTrimProps2, resolveTrimProps: resolveTrimProps2, validateMediaProps: validateMediaProps22 } = Internals;
|
|
41626
41696
|
var videoSchema = {
|
|
41697
|
+
src: {
|
|
41698
|
+
type: "asset",
|
|
41699
|
+
default: undefined,
|
|
41700
|
+
description: "Source",
|
|
41701
|
+
keyframable: false
|
|
41702
|
+
},
|
|
41627
41703
|
...Internals.baseSchema,
|
|
41628
41704
|
volume: {
|
|
41629
41705
|
type: "number",
|
|
@@ -41643,6 +41719,7 @@ var videoSchema = {
|
|
|
41643
41719
|
hiddenFromList: false,
|
|
41644
41720
|
keyframable: false
|
|
41645
41721
|
},
|
|
41722
|
+
muted: { type: "boolean", default: false, description: "Muted" },
|
|
41646
41723
|
loop: { type: "boolean", default: false, description: "Loop" },
|
|
41647
41724
|
...Internals.transformSchema
|
|
41648
41725
|
};
|
|
@@ -41801,6 +41878,13 @@ var VideoInner = ({
|
|
|
41801
41878
|
const mediaStartsAt = Internals.useMediaStartsAt();
|
|
41802
41879
|
const videoConfig = useVideoConfig();
|
|
41803
41880
|
const sequenceDurationInFrames = Math.min(durationInFrames ?? Infinity, Math.max(0, videoConfig.durationInFrames - (from ?? 0)));
|
|
41881
|
+
const videoSequenceDuration = getVideoSequenceDuration({
|
|
41882
|
+
durationInFrames,
|
|
41883
|
+
loop: loop ?? false,
|
|
41884
|
+
playbackRate: playbackRate ?? 1,
|
|
41885
|
+
trimAfter,
|
|
41886
|
+
trimBefore
|
|
41887
|
+
});
|
|
41804
41888
|
const basicInfo = Internals.useBasicMediaInTimeline({
|
|
41805
41889
|
src,
|
|
41806
41890
|
volume,
|
|
@@ -41848,7 +41932,7 @@ var VideoInner = ({
|
|
|
41848
41932
|
return /* @__PURE__ */ jsx65(Sequence, {
|
|
41849
41933
|
layout: "none",
|
|
41850
41934
|
from: from ?? 0,
|
|
41851
|
-
durationInFrames:
|
|
41935
|
+
durationInFrames: videoSequenceDuration,
|
|
41852
41936
|
freeze,
|
|
41853
41937
|
_remotionInternalStack: stack,
|
|
41854
41938
|
_remotionInternalIsMedia: isMedia,
|
|
@@ -43210,7 +43294,7 @@ import {
|
|
|
43210
43294
|
import { BufferTarget, StreamTarget } from "mediabunny";
|
|
43211
43295
|
|
|
43212
43296
|
// ../core/dist/esm/version.mjs
|
|
43213
|
-
var VERSION2 = "4.0.
|
|
43297
|
+
var VERSION2 = "4.0.492";
|
|
43214
43298
|
|
|
43215
43299
|
// ../web-renderer/dist/esm/index.mjs
|
|
43216
43300
|
import { AudioSample, VideoSample } from "mediabunny";
|